all files / document-editor/implementation/list/ abstract-list.js

100% Statements 35/35
75% Branches 3/4
100% Functions 8/8
100% Lines 35/35
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55   120× 120× 120× 120×     86142×     94×               88× 84× 573× 573× 573× 573×   84×   88×   10×          
define(["require", "exports", "@syncfusion/ej2-base", "../editor/editor-helper"], function (require, exports, ej2_base_1, editor_helper_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    var WAbstractList = (function () {
        function WAbstractList() {
            this.abstractListIdIn = -1;
            this.nsid = -1;
            this.levels = [];
            this.nsid = parseInt(editor_helper_1.HelperMethods.generateHexDecimal(), 16);
        }
        Object.defineProperty(WAbstractList.prototype, "abstractListId", {
            get: function () {
                return this.abstractListIdIn;
            },
            set: function (abstractListId) {
                this.abstractListIdIn = abstractListId;
            },
            enumerable: true,
            configurable: true
        });
        WAbstractList.prototype.clear = function () {
            Eif (!ej2_base_1.isNullOrUndefined(this.levels)) {
                for (var i = 0; i < this.levels.length; i++) {
                    var listLevel = this.levels[parseInt(i.toString(), 10)];
                    listLevel.clearFormat();
                    this.levels.splice(this.levels.indexOf(listLevel), 1);
                    i--;
                }
                this.levels = [];
            }
        };
        WAbstractList.prototype.destroy = function () {
            if (!ej2_base_1.isNullOrUndefined(this.levels)) {
                for (var i = 0; i < this.levels.length; i++) {
                    var listLevel = this.levels[parseInt(i.toString(), 10)];
                    listLevel.destroy();
                    this.levels.splice(this.levels.indexOf(listLevel), 1);
                    i--;
                }
                this.levels = [];
            }
            this.levels = undefined;
        };
        WAbstractList.prototype.clone = function () {
            var absList = new WAbstractList();
            for (var i = 0; i < this.levels.length; i++) {
                absList.levels.push(this.levels[parseInt(i.toString(), 10)].clone(absList));
            }
            return absList;
        };
        return WAbstractList;
    }());
    exports.WAbstractList = WAbstractList;
});