UNPKG

igniteui-react-grids

Version:

Ignite UI React grid components.

1,163 lines 168 kB
import { __extends, __values } from "tslib"; import * as React from 'react'; import { delegateCombine, delegateRemove } from "igniteui-react-core"; import { IgrColumnCollection } from "./igr-column-collection"; import { IgrActionStripCollection } from "./igr-action-strip-collection"; import { IgrGridToolbarCollection } from "./igr-grid-toolbar-collection"; import { IgrPaginatorCollection } from "./igr-paginator-collection"; import { FilteringLogic_$type } from "./FilteringLogic"; import { IgrFilteringExpressionsTree } from "./igr-filtering-expressions-tree"; import { GridPagingMode_$type } from "./GridPagingMode"; import { GridValidationTrigger_$type } from "./GridValidationTrigger"; import { FilterMode_$type } from "./FilterMode"; import { GridSummaryPosition_$type } from "./GridSummaryPosition"; import { GridSummaryCalculationMode_$type } from "./GridSummaryCalculationMode"; import { GridSelectionMode_$type } from "./GridSelectionMode"; import { IgrForOfState } from "./igr-for-of-state"; import { IgrOverlayOutletDirective } from "./igr-overlay-outlet-directive"; import { IgrStateCollection } from "./igr-state-collection"; import { IgrFilteringExpressionsTreeEventArgs } from "./igr-filtering-expressions-tree-event-args"; import { IgrGridScrollEventArgs } from "./igr-grid-scroll-event-args"; import { IgrGridCellEventArgs } from "./igr-grid-cell-event-args"; import { IgrGridRowEventArgs } from "./igr-grid-row-event-args"; import { IgrGridFormGroupCreatedEventArgs } from "./igr-grid-form-group-created-event-args"; import { IgrGridValidationStatusEventArgs } from "./igr-grid-validation-status-event-args"; import { IgrRowSelectionEventArgs } from "./igr-row-selection-event-args"; import { IgrColumnSelectionEventArgs } from "./igr-column-selection-event-args"; import { IgrPinColumnCancellableEventArgs } from "./igr-pin-column-cancellable-event-args"; import { IgrPinColumnEventArgs } from "./igr-pin-column-event-args"; import { IgrGridEditEventArgs } from "./igr-grid-edit-event-args"; import { IgrGridEditDoneEventArgs } from "./igr-grid-edit-done-event-args"; import { IgrColumnComponentEventArgs } from "./igr-column-component-event-args"; import { IgrColumnsAutoGeneratedEventArgs } from "./igr-columns-auto-generated-event-args"; import { IgrSortingEventArgs } from "./igr-sorting-event-args"; import { IgrSortingExpressionEventArgs } from "./igr-sorting-expression-event-args"; import { IgrFilteringEventArgs } from "./igr-filtering-event-args"; import { IgrRowDataEventArgs } from "./igr-row-data-event-args"; import { IgrRowDataCancelableEventArgs } from "./igr-row-data-cancelable-event-args"; import { IgrColumnResizeEventArgs } from "./igr-column-resize-event-args"; import { IgrGridContextMenuEventArgs } from "./igr-grid-context-menu-event-args"; import { IgrColumnVisibilityChangingEventArgs } from "./igr-column-visibility-changing-event-args"; import { IgrColumnVisibilityChangedEventArgs } from "./igr-column-visibility-changed-event-args"; import { IgrColumnMovingStartEventArgs } from "./igr-column-moving-start-event-args"; import { IgrColumnMovingEventArgs } from "./igr-column-moving-event-args"; import { IgrColumnMovingEndEventArgs } from "./igr-column-moving-end-event-args"; import { IgrGridKeydownEventArgs } from "./igr-grid-keydown-event-args"; import { IgrRowDragStartEventArgs } from "./igr-row-drag-start-event-args"; import { IgrRowDragEndEventArgs } from "./igr-row-drag-end-event-args"; import { IgrGridClipboardEventEventArgs } from "./igr-grid-clipboard-event-event-args"; import { IgrComponentArrayDataValueChangedEventArgs } from "./igr-component-array-data-value-changed-event-args"; import { IgrRowToggleEventArgs } from "./igr-row-toggle-event-args"; import { IgrPinRowEventArgs } from "./igr-pin-row-event-args"; import { IgrActiveNodeChangeEventArgs } from "./igr-active-node-change-event-args"; import { IgrGridToolbarExportEventArgs } from "./igr-grid-toolbar-export-event-args"; import { IgrGridSelectionRangeEventArgs } from "./igr-grid-selection-range-event-args"; import { IgrVoidEventArgs } from "igniteui-react"; import { IgrForOfDataChangingEventArgs } from "./igr-for-of-data-changing-event-args"; import { IgrColumn } from "./igr-column"; import { TypeRegistrar } from "igniteui-react-core"; import { ReactRenderer, PortalManager } from "igniteui-react-core"; import { ContentChildrenManager } from "igniteui-react-core"; import { CollectionAdapter, NamePatcher, getModifiedProps, isValidProp, ensureBool, interfaceToInternal, ensureEnum, toSpinal, initializePropertiesFromCss } from "igniteui-react-core"; import { ReactTemplateAdapter } from "igniteui-react-core"; import { html } from "lit-html"; import { DataCloneStrategy } from "./DataCloneStrategy"; import { ClipboardOptions } from "./ClipboardOptions"; import { ColumnCollection as ColumnCollection_internal } from "./ColumnCollection"; import { Column } from "./Column"; import { SyncableObservableCollection$1 } from "igniteui-react-core"; import { NotifyCollectionChangedAction } from "igniteui-react-core"; import { ActionStrip } from "./ActionStrip"; import { IgrGridRowDragGhostContext } from "./igr-grid-row-drag-ghost-context"; import { IgrGridRowEditTextTemplateContext } from "./igr-grid-row-edit-text-template-context"; import { IgrGridEmptyTemplateContext } from "./igr-grid-empty-template-context"; import { IgrGridRowEditActionsTemplateContext } from "./igr-grid-row-edit-actions-template-context"; import { IgrGridRowTemplateContext } from "./igr-grid-row-template-context"; import { IgrGridTemplateContext } from "./igr-grid-template-context"; import { IgrGridHeaderTemplateContext } from "./igr-grid-header-template-context"; import { GridToolbar } from "./GridToolbar"; import { Paginator } from "./Paginator"; import { GridResourceStrings } from "./GridResourceStrings"; import { PinningConfig } from "./PinningConfig"; import { FilteringStrategy } from "./FilteringStrategy"; import { GridSortingStrategy } from "./GridSortingStrategy"; import { SortingOptions } from "./SortingOptions"; import { IgrHeadSelectorTemplateContext } from "./igr-head-selector-template-context"; import { IgrRowSelectorTemplateContext } from "./igr-row-selector-template-context"; import { GridState } from "./GridState"; import { SortingExpression } from "./SortingExpression"; import { GridSelectionRange } from "./GridSelectionRange"; import { OverlaySettings } from "./OverlaySettings"; var IgrGridBaseDirective = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrGridBaseDirective, _super); function IgrGridBaseDirective(props) { var _this = _super.call(this, props) || this; _this.mounted = false; _this._columnList = null; _this._actionStripComponents = null; _this._toolbar = null; _this._paginationComponents = null; _this._actualColumnList = null; _this._stateComponents = null; _this.__p = null; _this._hasUserValues = new Set(); _this._stylingContainer = null; _this._stylingParent = null; _this._inStyling = false; _this._filteringExpressionsTreeChange = null; _this._filteringExpressionsTreeChange_wrapped = null; _this._advancedFilteringExpressionsTreeChange = null; _this._advancedFilteringExpressionsTreeChange_wrapped = null; _this._gridScroll = null; _this._gridScroll_wrapped = null; _this._cellClick = null; _this._cellClick_wrapped = null; _this._rowClick = null; _this._rowClick_wrapped = null; _this._formGroupCreated = null; _this._formGroupCreated_wrapped = null; _this._validationStatusChange = null; _this._validationStatusChange_wrapped = null; _this._selected = null; _this._selected_wrapped = null; _this._rowSelectionChanging = null; _this._rowSelectionChanging_wrapped = null; _this._columnSelectionChanging = null; _this._columnSelectionChanging_wrapped = null; _this._columnPin = null; _this._columnPin_wrapped = null; _this._columnPinned = null; _this._columnPinned_wrapped = null; _this._cellEditEnter = null; _this._cellEditEnter_wrapped = null; _this._cellEditExit = null; _this._cellEditExit_wrapped = null; _this._cellEdit = null; _this._cellEdit_wrapped = null; _this._cellEditDone = null; _this._cellEditDone_wrapped = null; _this._rowEditEnter = null; _this._rowEditEnter_wrapped = null; _this._rowEdit = null; _this._rowEdit_wrapped = null; _this._rowEditDone = null; _this._rowEditDone_wrapped = null; _this._rowEditExit = null; _this._rowEditExit_wrapped = null; _this._columnInit = null; _this._columnInit_wrapped = null; _this._columnsAutogenerated = null; _this._columnsAutogenerated_wrapped = null; _this._sorting = null; _this._sorting_wrapped = null; _this._sortingDone = null; _this._sortingDone_wrapped = null; _this._filtering = null; _this._filtering_wrapped = null; _this._filteringDone = null; _this._filteringDone_wrapped = null; _this._rowAdded = null; _this._rowAdded_wrapped = null; _this._rowDeleted = null; _this._rowDeleted_wrapped = null; _this._rowDelete = null; _this._rowDelete_wrapped = null; _this._rowAdd = null; _this._rowAdd_wrapped = null; _this._columnResized = null; _this._columnResized_wrapped = null; _this._contextMenu = null; _this._contextMenu_wrapped = null; _this._doubleClick = null; _this._doubleClick_wrapped = null; _this._columnVisibilityChanging = null; _this._columnVisibilityChanging_wrapped = null; _this._columnVisibilityChanged = null; _this._columnVisibilityChanged_wrapped = null; _this._columnMovingStart = null; _this._columnMovingStart_wrapped = null; _this._columnMoving = null; _this._columnMoving_wrapped = null; _this._columnMovingEnd = null; _this._columnMovingEnd_wrapped = null; _this._gridKeydown = null; _this._gridKeydown_wrapped = null; _this._rowDragStart = null; _this._rowDragStart_wrapped = null; _this._rowDragEnd = null; _this._rowDragEnd_wrapped = null; _this._gridCopy = null; _this._gridCopy_wrapped = null; _this._selectedRowsChange = null; _this._selectedRowsChange_wrapped = null; _this._rowToggle = null; _this._rowToggle_wrapped = null; _this._rowPinning = null; _this._rowPinning_wrapped = null; _this._rowPinned = null; _this._rowPinned_wrapped = null; _this._activeNodeChange = null; _this._activeNodeChange_wrapped = null; _this._sortingExpressionsChange = null; _this._sortingExpressionsChange_wrapped = null; _this._toolbarExporting = null; _this._toolbarExporting_wrapped = null; _this._rangeSelected = null; _this._rangeSelected_wrapped = null; _this._rendered = null; _this._rendered_wrapped = null; _this._dataChanging = null; _this._dataChanging_wrapped = null; _this._dataChanged = null; _this._dataChanged_wrapped = null; if (_this._styling) { NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this)); } _this._implementation = _this.createImplementation(); _this._portalManager = new PortalManager("templates", function () { if (_this.mounted) { _this.setState({}); } }); if (typeof window !== 'undefined' && typeof document !== 'undefined') { _this._renderer = new ReactRenderer(_this._implementation.nativeElement, document, false, null, _this._portalManager); } _this._implementation.externalObject = _this; _this.onImplementationCreated(); if (_this._initializeAdapters) { _this._initializeAdapters(); } return _this; } IgrGridBaseDirective.prototype.createImplementation = function () { return null; }; Object.defineProperty(IgrGridBaseDirective.prototype, "nativeElement", { get: function () { return this._implementation.nativeElement; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; } /** * @hidden */, enumerable: false, configurable: true }); IgrGridBaseDirective._createFromInternal = function (internal) { if (!internal) { return null; } if (!internal.$type) { return null; } var name = internal.$type.name; var externalName = "Igr" + name; if (!TypeRegistrar.isRegistered(externalName)) { return null; } return TypeRegistrar.create(externalName); }; IgrGridBaseDirective.prototype.onImplementationCreated = function () { }; IgrGridBaseDirective.prototype._initializeAdapters = function () { var _this = this; if (!this._contentChildrenManager) { var resolveNested_1 = (function (props, propName, nestedPropName) { var _a; var prop = props[propName]; if (Array.isArray(prop)) { return prop.map(function (x) { var _a; return (_a = x[nestedPropName]) !== null && _a !== void 0 ? _a : resolveNested_1(x.props, propName, nestedPropName); }).join("_"); } else if (prop) { return (_a = prop.props[nestedPropName]) !== null && _a !== void 0 ? _a : resolveNested_1(prop.props, propName, nestedPropName); } else { return props[nestedPropName]; } }); this._contentChildrenManager = new ContentChildrenManager(function (ch) { var key = ch.key || ch.props.name; if (!key) { var type = (ch.type); var instance = new type; var name_1 = instance.i.$type.name; switch (name_1) { case "Column": return ch.props.field; case "ColumnGroup": return resolveNested_1(ch.props, "children", "field"); case "ColumnLayout": return resolveNested_1(ch.props, "children", "field"); case "ActionStrip": return "IgrActionStrip"; case "GridToolbar": return "IgrGridToolbar"; case "Paginator": return "IgrPaginator"; case "GridState": return "IgrGridState"; default: return undefined; } } return key; }, function (ch) { var key = ch.key || ch.props.name; if (!key) { var type = (ch.type); var instance = new type; var name_2 = instance.i.$type.name; switch (name_2) { case "Column": return ch.props.field; case "ColumnGroup": return resolveNested_1(ch.props, "children", "field"); case "ColumnLayout": return resolveNested_1(ch.props, "children", "field"); case "ActionStrip": return "IgrActionStrip"; case "GridToolbar": return "IgrGridToolbar"; case "Paginator": return "IgrPaginator"; case "GridState": return "IgrGridState"; default: return undefined; } } return key; }, function () { if (_this._updateContentChildren) { _this._updateContentChildren(); } else if (_this._updateAdapters) { _this._updateAdapters(); } }); } this._columnListAdapter = new CollectionAdapter(this.contentColumnList, this.i.u, this.combinedColumnList, function (c) { return c.i; }, function (i) { if (_this._initializeElement) { _this._initializeElement(i); } }, function (i) { if (_this._destroyElement) { _this._destroyElement(i); } }); this._actionStripComponentsAdapter = new CollectionAdapter(this.contentActionStripComponents, this.i.l, this.actualActionStripComponents, function (c) { return c.i; }, function (i) { if (_this._initializeElement) { _this._initializeElement(i); } }, function (i) { if (_this._destroyElement) { _this._destroyElement(i); } }); this._toolbarAdapter = new CollectionAdapter(this.contentToolbar, this.i.bh, this.actualToolbar, function (c) { return c.i; }, function (i) { if (_this._initializeElement) { _this._initializeElement(i); } }, function (i) { if (_this._destroyElement) { _this._destroyElement(i); } }); this._paginationComponentsAdapter = new CollectionAdapter(this.contentPaginationComponents, this.i.bm, this.actualPaginationComponents, function (c) { return c.i; }, function (i) { if (_this._initializeElement) { _this._initializeElement(i); } }, function (i) { if (_this._destroyElement) { _this._destroyElement(i); } }); this._stateComponentsAdapter = new CollectionAdapter(this.contentStateComponents, this.i.b5, this.actualStateComponents, function (c) { return c.i; }, function (i) { if (_this._initializeElement) { _this._initializeElement(i); } }, function (i) { if (_this._destroyElement) { _this._destroyElement(i); } }); if (_super.prototype["_initializeAdapters"]) { _super.prototype["_initializeAdapters"].call(this); } }; IgrGridBaseDirective.prototype._updateAdapters = function () { if (_super.prototype["_updateAdapters"]) { _super.prototype["_updateAdapters"].call(this); } var contentChildrenActual = this._contentChildrenManager.contentChildrenActual; this.contentColumnList.length = 0; for (var i = 0; i < contentChildrenActual.length; i++) { if ((Column.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentColumnList.push(contentChildrenActual[i]); } } if (this._columnListAdapter != null) { this._columnListAdapter.notifyContentChanged(); } this.contentActionStripComponents.length = 0; for (var i = 0; i < contentChildrenActual.length; i++) { if ((ActionStrip.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentActionStripComponents.push(contentChildrenActual[i]); } } if (this._actionStripComponentsAdapter != null) { this._actionStripComponentsAdapter.notifyContentChanged(); } this.contentToolbar.length = 0; for (var i = 0; i < contentChildrenActual.length; i++) { if ((GridToolbar.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentToolbar.push(contentChildrenActual[i]); } } if (this._toolbarAdapter != null) { this._toolbarAdapter.notifyContentChanged(); } this.contentPaginationComponents.length = 0; for (var i = 0; i < contentChildrenActual.length; i++) { if ((Paginator.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentPaginationComponents.push(contentChildrenActual[i]); } } if (this._paginationComponentsAdapter != null) { this._paginationComponentsAdapter.notifyContentChanged(); } this.contentStateComponents.length = 0; for (var i = 0; i < contentChildrenActual.length; i++) { if ((GridState.$type).isAssignableFrom(contentChildrenActual[i].i.$type)) { this.contentStateComponents.push(contentChildrenActual[i]); } } if (this._stateComponentsAdapter != null) { this._stateComponentsAdapter.notifyContentChanged(); } }; IgrGridBaseDirective.prototype.componentDidMount = function () { var e_1, _a; this.mounted = true; try { for (var _b = __values(Object.keys(this.props)), _c = _b.next(); !_c.done; _c = _b.next()) { var p = _c.value; if (isValidProp(this, p)) { this[p] = this.props[p]; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } }; IgrGridBaseDirective.prototype.shouldComponentUpdate = function (nextProps, nextState) { var e_2, _a; var mod = getModifiedProps(this.props, nextProps); try { for (var _b = __values(Object.keys(mod)), _c = _b.next(); !_c.done; _c = _b.next()) { var p = _c.value; if (isValidProp(this, p)) { this[p] = mod[p]; } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_2) throw e_2.error; } } return true; }; IgrGridBaseDirective.prototype.render = function () { var children = this._contentChildrenManager.getChildren(this.props.children); var div = React.createElement("div", { children: children }); return div; }; Object.defineProperty(IgrGridBaseDirective.prototype, "snackbarDisplayTime", { /** * Gets/Sets the display time for the row adding snackbar notification. * @remarks * By default it is 6000ms. */ get: function () { return this.i.cx; }, set: function (v) { this.i.cx = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "autoGenerate", { get: function () { return this.i.cc; }, set: function (v) { this.i.cc = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "autoGenerateExclude", { get: function () { return this.i.a; }, set: function (v) { if (v && !Array.isArray(v) && typeof (v) == "string") { var re = /\s*(?:,|\s|$)\s*/gm; v = v.split(re); } this.i.a = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "moving", { /** * Controls whether columns moving is enabled in the grid. */ get: function () { return this.i.ch; }, set: function (v) { this.i.ch = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "emptyGridTemplate", { get: function () { return this._emptyGridTemplate; }, set: function (v) { this._emptyGridTemplate = v; if (!this._emptyGridTemplateAdapter) { this._emptyGridTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dt", { html: html }); } this._emptyGridTemplateAdapter.setValue(this.i, this._emptyGridTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "addRowEmptyTemplate", { get: function () { return this._addRowEmptyTemplate; }, set: function (v) { this._addRowEmptyTemplate = v; if (!this._addRowEmptyTemplateAdapter) { this._addRowEmptyTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dq", { html: html }); } this._addRowEmptyTemplateAdapter.setValue(this.i, this._addRowEmptyTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "loadingGridTemplate", { get: function () { return this._loadingGridTemplate; }, set: function (v) { this._loadingGridTemplate = v; if (!this._loadingGridTemplateAdapter) { this._loadingGridTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dy", { html: html }); } this._loadingGridTemplateAdapter.setValue(this.i, this._loadingGridTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "summaryRowHeight", { /** * Get/Set IgxSummaryRow height */ get: function () { return this.i.cy; }, set: function (v) { this.i.cy = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "dataCloneStrategy", { get: function () { return this.i.af.nativeElement; }, set: function (v) { this.i.af = interfaceToInternal(v, function () { return new DataCloneStrategy(); }); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "clipboardOptions", { /** * Controls the copy behavior of the grid. */ get: function () { return this.i.p.nativeElement; }, set: function (v) { this.i.p = interfaceToInternal(v, function () { return new ClipboardOptions(); }); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowClasses", { get: function () { return this.i.c5; }, set: function (v) { this.i.c5 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowStyles", { get: function () { return this.i.c6; }, set: function (v) { this.i.c6 = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "primaryKey", { get: function () { return this.i.ee; }, set: function (v) { this.i.ee = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "combinedColumnList", { get: function () { if (!this._combinedColumnList) { this._combinedColumnList = []; } return this._combinedColumnList; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "contentColumnList", { get: function () { if (!this._contentColumnList) { this._contentColumnList = []; } return this._contentColumnList; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "columnList", { /** * @hidden @internal */ get: function () { var _this = this; if (this._columnList === null) { var coll = new IgrColumnCollection(); var inner = coll._innerColl; this._columnList = coll; inner.addListener(function (sender, e) { switch (e.action) { case NotifyCollectionChangedAction.Add: _this._columnListAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: _this._columnListAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: _this._columnListAdapter.removeManualItemAt(e.oldStartingIndex); _this._columnListAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: _this._columnListAdapter.clearManualItems(); break; } }); ; } return this._columnList; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "actualActionStripComponents", { get: function () { if (!this._actualActionStripComponents) { this._actualActionStripComponents = []; } return this._actualActionStripComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "contentActionStripComponents", { get: function () { if (!this._contentActionStripComponents) { this._contentActionStripComponents = []; } return this._contentActionStripComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "actionStripComponents", { /** * @hidden @internal */ get: function () { var _this = this; if (this._actionStripComponents === null) { var coll = new IgrActionStripCollection(); var inner = coll._innerColl; this._actionStripComponents = coll; inner.addListener(function (sender, e) { switch (e.action) { case NotifyCollectionChangedAction.Add: _this._actionStripComponentsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: _this._actionStripComponentsAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: _this._actionStripComponentsAdapter.removeManualItemAt(e.oldStartingIndex); _this._actionStripComponentsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: _this._actionStripComponentsAdapter.clearManualItems(); break; } }); ; } return this._actionStripComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "dragGhostCustomTemplate", { /** * Gets the custom template, if any, used for row drag ghost. */ get: function () { return this._dragGhostCustomTemplate; }, set: function (v) { this._dragGhostCustomTemplate = v; if (!this._dragGhostCustomTemplateAdapter) { this._dragGhostCustomTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dr", { html: html }, function () { return new IgrGridRowDragGhostContext(); }); } this._dragGhostCustomTemplateAdapter.setValue(this.i, this._dragGhostCustomTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowEditTextTemplate", { /** * Gets the row edit text template. */ get: function () { return this._rowEditTextTemplate; }, set: function (v) { this._rowEditTextTemplate = v; if (!this._rowEditTextTemplateAdapter) { this._rowEditTextTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d2", { html: html }, function () { return new IgrGridRowEditTextTemplateContext(); }); } this._rowEditTextTemplateAdapter.setValue(this.i, this._rowEditTextTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowAddTextTemplate", { /** * Gets the row add text template. */ get: function () { return this._rowAddTextTemplate; }, set: function (v) { this._rowAddTextTemplate = v; if (!this._rowAddTextTemplateAdapter) { this._rowAddTextTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dz", { html: html }, function () { return new IgrGridEmptyTemplateContext(); }); } this._rowAddTextTemplateAdapter.setValue(this.i, this._rowAddTextTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowEditActionsTemplate", { /** * Gets the row edit actions template. */ get: function () { return this._rowEditActionsTemplate; }, set: function (v) { this._rowEditActionsTemplate = v; if (!this._rowEditActionsTemplateAdapter) { this._rowEditActionsTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d1", { html: html }, function () { return new IgrGridRowEditActionsTemplateContext(); }); } this._rowEditActionsTemplateAdapter.setValue(this.i, this._rowEditActionsTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowExpandedIndicatorTemplate", { /** * Gets the row expand indicator template. */ get: function () { return this._rowExpandedIndicatorTemplate; }, set: function (v) { this._rowExpandedIndicatorTemplate = v; if (!this._rowExpandedIndicatorTemplateAdapter) { this._rowExpandedIndicatorTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d3", { html: html }, function () { return new IgrGridRowTemplateContext(); }); } this._rowExpandedIndicatorTemplateAdapter.setValue(this.i, this._rowExpandedIndicatorTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "rowCollapsedIndicatorTemplate", { /** * Gets the row collapse indicator template. */ get: function () { return this._rowCollapsedIndicatorTemplate; }, set: function (v) { this._rowCollapsedIndicatorTemplate = v; if (!this._rowCollapsedIndicatorTemplateAdapter) { this._rowCollapsedIndicatorTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d0", { html: html }, function () { return new IgrGridRowTemplateContext(); }); } this._rowCollapsedIndicatorTemplateAdapter.setValue(this.i, this._rowCollapsedIndicatorTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "headerExpandedIndicatorTemplate", { /** * Gets the header expand indicator template. */ get: function () { return this._headerExpandedIndicatorTemplate; }, set: function (v) { this._headerExpandedIndicatorTemplate = v; if (!this._headerExpandedIndicatorTemplateAdapter) { this._headerExpandedIndicatorTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dw", { html: html }, function () { return new IgrGridTemplateContext(); }); } this._headerExpandedIndicatorTemplateAdapter.setValue(this.i, this._headerExpandedIndicatorTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "headerCollapsedIndicatorTemplate", { /** * Gets the row collapse indicator template. */ get: function () { return this._headerCollapsedIndicatorTemplate; }, set: function (v) { this._headerCollapsedIndicatorTemplate = v; if (!this._headerCollapsedIndicatorTemplateAdapter) { this._headerCollapsedIndicatorTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "dv", { html: html }, function () { return new IgrGridTemplateContext(); }); } this._headerCollapsedIndicatorTemplateAdapter.setValue(this.i, this._headerCollapsedIndicatorTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "excelStyleHeaderIconTemplate", { /** * Gets the excel style header icon. */ get: function () { return this._excelStyleHeaderIconTemplate; }, set: function (v) { this._excelStyleHeaderIconTemplate = v; if (!this._excelStyleHeaderIconTemplateAdapter) { this._excelStyleHeaderIconTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "du", { html: html }, function () { return new IgrGridHeaderTemplateContext(); }); } this._excelStyleHeaderIconTemplateAdapter.setValue(this.i, this._excelStyleHeaderIconTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "sortAscendingHeaderIconTemplate", { /** * The custom template, if any, that should be used when rendering a header sorting indicator when columns are sorted in asc order. */ get: function () { return this._sortAscendingHeaderIconTemplate; }, set: function (v) { this._sortAscendingHeaderIconTemplate = v; if (!this._sortAscendingHeaderIconTemplateAdapter) { this._sortAscendingHeaderIconTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d5", { html: html }, function () { return new IgrGridHeaderTemplateContext(); }); } this._sortAscendingHeaderIconTemplateAdapter.setValue(this.i, this._sortAscendingHeaderIconTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "sortDescendingHeaderIconTemplate", { /** * The custom template, if any, that should be used when rendering a header sorting indicator when columns are sorted in desc order. */ get: function () { return this._sortDescendingHeaderIconTemplate; }, set: function (v) { this._sortDescendingHeaderIconTemplate = v; if (!this._sortDescendingHeaderIconTemplateAdapter) { this._sortDescendingHeaderIconTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d6", { html: html }, function () { return new IgrGridHeaderTemplateContext(); }); } this._sortDescendingHeaderIconTemplateAdapter.setValue(this.i, this._sortDescendingHeaderIconTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "sortHeaderIconTemplate", { /** * Gets custom template, if any, that should be used when rendering a header sorting indicator when columns are not sorted. */ get: function () { return this._sortHeaderIconTemplate; }, set: function (v) { this._sortHeaderIconTemplate = v; if (!this._sortHeaderIconTemplateAdapter) { this._sortHeaderIconTemplateAdapter = new ReactTemplateAdapter(this._renderer, this._portalManager, "d7", { html: html }, function () { return new IgrGridHeaderTemplateContext(); }); } this._sortHeaderIconTemplateAdapter.setValue(this.i, this._sortHeaderIconTemplate); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "actualToolbar", { get: function () { if (!this._actualToolbar) { this._actualToolbar = []; } return this._actualToolbar; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "contentToolbar", { get: function () { if (!this._contentToolbar) { this._contentToolbar = []; } return this._contentToolbar; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "toolbar", { /** * @hidden @internal */ get: function () { var _this = this; if (this._toolbar === null) { var coll = new IgrGridToolbarCollection(); var inner = coll._innerColl; this._toolbar = coll; inner.addListener(function (sender, e) { switch (e.action) { case NotifyCollectionChangedAction.Add: _this._toolbarAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: _this._toolbarAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: _this._toolbarAdapter.removeManualItemAt(e.oldStartingIndex); _this._toolbarAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: _this._toolbarAdapter.clearManualItems(); break; } }); ; } return this._toolbar; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "actualPaginationComponents", { get: function () { if (!this._actualPaginationComponents) { this._actualPaginationComponents = []; } return this._actualPaginationComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "contentPaginationComponents", { get: function () { if (!this._contentPaginationComponents) { this._contentPaginationComponents = []; } return this._contentPaginationComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "paginationComponents", { /** * @hidden @internal */ get: function () { var _this = this; if (this._paginationComponents === null) { var coll = new IgrPaginatorCollection(); var inner = coll._innerColl; this._paginationComponents = coll; inner.addListener(function (sender, e) { switch (e.action) { case NotifyCollectionChangedAction.Add: _this._paginationComponentsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Remove: _this._paginationComponentsAdapter.removeManualItemAt(e.oldStartingIndex); break; case NotifyCollectionChangedAction.Replace: _this._paginationComponentsAdapter.removeManualItemAt(e.oldStartingIndex); _this._paginationComponentsAdapter.insertManualItem(e.newStartingIndex, e.newItems.item(0)); break; case NotifyCollectionChangedAction.Reset: _this._paginationComponentsAdapter.clearManualItems(); break; } }); ; } return this._paginationComponents; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "resourceStrings", { /** * Gets/Sets the resource strings. * @remarks * By default it uses EN resources. */ get: function () { return this.i.a7.nativeElement; }, set: function (v) { this.i.a7 = interfaceToInternal(v, function () { return new GridResourceStrings(); }); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "filteringLogic", { get: function () { return this.i.am; }, set: function (v) { this.i.am = ensureEnum(FilteringLogic_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "filteringExpressionsTree", { get: function () { var r = this.i.ai; if (r == null) { return null; } if (!r.externalObject) { var e = new IgrFilteringExpressionsTree(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.ai = null : this.i.ai = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "advancedFilteringExpressionsTree", { /** * Gets/Sets the advanced filtering state. * @example * ```typescript * let advancedFilteringExpressionsTree = this.grid.advancedFilteringExpressionsTree; * this.grid.advancedFilteringExpressionsTree = logic; * ``` */ get: function () { var r = this.i.ah; if (r == null) { return null; } if (!r.externalObject) { var e = new IgrFilteringExpressionsTree(); if (r.$type) { e._implementation = r; } else { if (e.i.setNativeElement) { e.i.setNativeElement(r); } } r.externalObject = e; } return r.externalObject; }, set: function (v) { v == null ? this.i.ah = null : this.i.ah = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgrGridBaseDirective.prototype, "locale", { /** * Gets/Sets the locale. * @remarks * If not set, returns browser's language. */ get: functi