UNPKG

igniteui-webcomponents-grids

Version:

Ignite UI Web Components grid components.

198 lines (197 loc) 6.49 kB
import { __extends } from "tslib"; import { DataSourceSchemaPropertyType_$type } from "igniteui-webcomponents-core"; import { IgcGridFilterOperandsCollection } from "./igc-grid-filter-operands-collection"; import { IgcCellInfo } from "./igc-cell-info"; import { FilterCellModel as FilterCellModel_internal } from "./FilterCellModel"; import { ensureEnum } from "igniteui-webcomponents-core"; import { GridFilterOperandsCollection as GridFilterOperandsCollection_internal } from "./GridFilterOperandsCollection"; import { FilterOperand } from "./FilterOperand"; import { SyncableObservableCollection$1 } from "igniteui-webcomponents-core"; /** * Represents info about the current cell. */ var IgcFilterCellInfo = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcFilterCellInfo, _super); function IgcFilterCellInfo() { var _this = _super.call(this) || this; _this._filterOperands = null; return _this; } IgcFilterCellInfo.prototype.createImplementation = function () { return new FilterCellModel_internal(); }; Object.defineProperty(IgcFilterCellInfo.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "dataType", { /** * Gets or sets whether the cell is hit test visible. */ get: function () { return this.i.mk; }, set: function (v) { this.i.mk = ensureEnum(DataSourceSchemaPropertyType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "filter", { /** * Gets or sets the current filter to display in the cell. */ get: function () { return this.i.mi; }, set: function (v) { this.i.mi = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "filterExpression", { /** * Gets or sets the current filter expression applied to the column. */ get: function () { return this.i.mm; }, set: function (v) { this.i.mm = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "filterOperands", { get: function () { if (this._filterOperands === null) { var coll = new IgcGridFilterOperandsCollection(); var innerColl = this.i.mo; if (!innerColl) { innerColl = new GridFilterOperandsCollection_internal(); } this._filterOperands = coll._fromInner(innerColl); this.i.mo = innerColl; } return this._filterOperands; }, set: function (v) { if (this._filterOperands !== null) { this._filterOperands._setSyncTarget(null); this._filterOperands = null; } var coll = new IgcGridFilterOperandsCollection(); this._filterOperands = coll._fromOuter(v); var syncColl = new SyncableObservableCollection$1(FilterOperand.$type); var innerColl = this.i.mo; if (!innerColl) { innerColl = new GridFilterOperandsCollection_internal(); } syncColl._inner = innerColl; syncColl.clear(); this._filterOperands._setSyncTarget(syncColl); this.i.mo = innerColl; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "operatorType", { get: function () { return this.i.mg; }, set: function (v) { this.i.mg = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "filterValue", { get: function () { return this.i.m2; }, set: function (v) { this.i.m2 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "selectorTop", { get: function () { return this.i.mw; }, set: function (v) { this.i.mw = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "selectorLeft", { get: function () { return this.i.mv; }, set: function (v) { this.i.mv = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "editorTop", { get: function () { return this.i.mu; }, set: function (v) { this.i.mu = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "editorLeft", { get: function () { return this.i.mt; }, set: function (v) { this.i.mt = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "clearIconTop", { get: function () { return this.i.ms; }, set: function (v) { this.i.ms = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcFilterCellInfo.prototype, "clearIconLeft", { get: function () { return this.i.mr; }, set: function (v) { this.i.mr = +v; }, enumerable: false, configurable: true }); IgcFilterCellInfo.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.filterOperands != null && this.filterOperands.findByName && this.filterOperands.findByName(name)) { return this.filterOperands.findByName(name); } return null; }; return IgcFilterCellInfo; }(IgcCellInfo)); export { IgcFilterCellInfo };