UNPKG

igniteui-react-core

Version:
43 lines (42 loc) 1.48 kB
import { __extends } from "tslib"; import { IgCollection } from './IgCollection'; import { SyncableObservableCollection$2 } from './SyncableObservableCollection$2'; import { markType } from './type'; import { DataSeries } from './DataSeries'; var IgrDataSeriesCollection = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrDataSeriesCollection, _super); function IgrDataSeriesCollection(list) { var _this = _super.call(this) || this; if (!DataSeries.$type) { DataSeries.$type = markType(DataSeries, "DataSeries"); } if (list) { for (var i = 0; i < list.length; i++) { _this.add(list[i]); } } return _this; } IgrDataSeriesCollection.prototype._createInnerColl = function () { if (!DataSeries.$type) { DataSeries.$type = markType(DataSeries, "DataSeries"); } var coll = new SyncableObservableCollection$2(DataSeries.$type, DataSeries.$type, 0); coll.compare = function (ext, int) { var comp = ext; if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = function (ext) { return ext; }; coll.createFrom = function (int) { return int; }; return coll; }; return IgrDataSeriesCollection; }(IgCollection)); export { IgrDataSeriesCollection };