igniteui-react-core
Version:
Ignite UI React Core.
59 lines (58 loc) • 2.42 kB
JavaScript
import { __extends } from "tslib";
import { IgCollection } from './IgCollection';
import { markType } from './type';
import { SyncableObservableCollection$2 } from './SyncableObservableCollection$2';
import { GridLayoutSizeDefinition as GridLayoutSizeDefinition_internal } from './GridLayoutSizeDefinition';
import { IgrGridLayoutSizeDefinition as IgrGridLayoutSizeDefinition } from './igr-grid-layout-size-definition';
var IgrSizeDefinitionCollection = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrSizeDefinitionCollection, _super);
function IgrSizeDefinitionCollection(list) {
var _this = _super.call(this) || this;
if (!IgrGridLayoutSizeDefinition.$type) {
IgrGridLayoutSizeDefinition.$type = markType(IgrGridLayoutSizeDefinition, "IgrGridLayoutSizeDefinition");
}
if (list) {
for (var i = 0; i < list.length; i++) {
_this.add(list[i]);
}
}
return _this;
}
IgrSizeDefinitionCollection.prototype._createInnerColl = function () {
if (!IgrGridLayoutSizeDefinition.$type) {
IgrGridLayoutSizeDefinition.$type = markType(IgrGridLayoutSizeDefinition, "IgrGridLayoutSizeDefinition");
}
var coll = new SyncableObservableCollection$2(IgrGridLayoutSizeDefinition.$type, GridLayoutSizeDefinition_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 = new IgrGridLayoutSizeDefinition();
if (ext) {
if (!int.$type && ext._implementation.setNativeElement) {
ext._implementation.setNativeElement(int);
}
else {
ext._implementation = int;
}
}
}
return ext;
};
return coll;
};
return IgrSizeDefinitionCollection;
}(IgCollection));
export { IgrSizeDefinitionCollection };