UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

59 lines (58 loc) 2.44 kB
import { __extends } from "tslib"; import { IgCollection } from "igniteui-react-core"; import { markType } from "igniteui-react-core"; import { SyncableObservableCollection$2 } from "igniteui-react-core"; import { GridToolbarBaseAction as GridToolbarBaseAction_internal } from './GridToolbarBaseAction'; import { IgrGridToolbarBaseAction as IgrGridToolbarBaseAction } from './igr-grid-toolbar-base-action'; var IgrGridToolbarBaseActionCollection = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrGridToolbarBaseActionCollection, _super); function IgrGridToolbarBaseActionCollection(list) { var _this = _super.call(this) || this; if (!IgrGridToolbarBaseAction.$type) { IgrGridToolbarBaseAction.$type = markType(IgrGridToolbarBaseAction, "IgrGridToolbarBaseAction"); } if (list) { for (var i = 0; i < list.length; i++) { _this.add(list[i]); } } return _this; } IgrGridToolbarBaseActionCollection.prototype._createInnerColl = function () { if (!IgrGridToolbarBaseAction.$type) { IgrGridToolbarBaseAction.$type = markType(IgrGridToolbarBaseAction, "IgrGridToolbarBaseAction"); } var coll = new SyncableObservableCollection$2(IgrGridToolbarBaseAction.$type, GridToolbarBaseAction_internal.$type, 0); coll.compare = function (ext, int) { var comp = ext; if (comp._implementation) { comp = comp._implementation; } if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = function (ext) { return ext._implementation; }; coll.createFrom = function (int) { var ext = int.externalObject; if (!ext) { ext = IgrGridToolbarBaseAction._createFromInternal(int); if (ext) { if (!int.$type && ext._implementation.setNativeElement) { ext._implementation.setNativeElement(int); } else { ext._implementation = int; } } } return ext; }; return coll; }; return IgrGridToolbarBaseActionCollection; }(IgCollection)); export { IgrGridToolbarBaseActionCollection };