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