igniteui-angular 21.0.3 → 21.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/README.md +5 -6
- package/fesm2022/igniteui-angular-action-strip.mjs +39 -34
- package/fesm2022/igniteui-angular-action-strip.mjs.map +1 -1
- package/fesm2022/igniteui-angular-banner.mjs +64 -59
- package/fesm2022/igniteui-angular-banner.mjs.map +1 -1
- package/fesm2022/igniteui-angular-calendar.mjs +182 -161
- package/fesm2022/igniteui-angular-calendar.mjs.map +1 -1
- package/fesm2022/igniteui-angular-carousel.mjs +7 -3
- package/fesm2022/igniteui-angular-carousel.mjs.map +1 -1
- package/fesm2022/igniteui-angular-chips.mjs +140 -136
- package/fesm2022/igniteui-angular-chips.mjs.map +1 -1
- package/fesm2022/igniteui-angular-combo.mjs +360 -356
- package/fesm2022/igniteui-angular-combo.mjs.map +1 -1
- package/fesm2022/igniteui-angular-core.mjs +420 -618
- package/fesm2022/igniteui-angular-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-date-picker.mjs +124 -32
- package/fesm2022/igniteui-angular-date-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-directives.mjs +15 -10
- package/fesm2022/igniteui-angular-directives.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-core.mjs +75 -57
- package/fesm2022/igniteui-angular-grids-core.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-grid.mjs +71 -62
- package/fesm2022/igniteui-angular-grids-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs +51 -6
- package/fesm2022/igniteui-angular-grids-hierarchical-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs +6 -1
- package/fesm2022/igniteui-angular-grids-pivot-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs +8 -8
- package/fesm2022/igniteui-angular-grids-tree-grid.mjs.map +1 -1
- package/fesm2022/igniteui-angular-input-group.mjs +8 -4
- package/fesm2022/igniteui-angular-input-group.mjs.map +1 -1
- package/fesm2022/igniteui-angular-list.mjs +24 -19
- package/fesm2022/igniteui-angular-list.mjs.map +1 -1
- package/fesm2022/igniteui-angular-paginator.mjs +71 -66
- package/fesm2022/igniteui-angular-paginator.mjs.map +1 -1
- package/fesm2022/igniteui-angular-query-builder.mjs +51 -36
- package/fesm2022/igniteui-angular-query-builder.mjs.map +1 -1
- package/fesm2022/igniteui-angular-time-picker.mjs +50 -8
- package/fesm2022/igniteui-angular-time-picker.mjs.map +1 -1
- package/fesm2022/igniteui-angular-tree.mjs +64 -61
- package/fesm2022/igniteui-angular-tree.mjs.map +1 -1
- package/lib/core/styles/components/calendar/_calendar-theme.scss +2 -0
- package/lib/core/styles/components/grid/_grid-theme.scss +2 -1
- package/lib/core/styles/components/slider/_slider-theme.scss +0 -1
- package/lib/core/styles/components/tabs/_tabs-theme.scss +2 -1
- package/package.json +3 -2
- package/schematics/tsconfig.tsbuildinfo +1 -1
- package/schematics/utils/dependency-handler.js +1 -0
- package/styles/igniteui-angular-dark.css +1 -1
- package/styles/igniteui-angular.css +1 -1
- package/styles/igniteui-bootstrap-dark.css +1 -1
- package/styles/igniteui-bootstrap-light.css +1 -1
- package/styles/igniteui-dark-green.css +1 -1
- package/styles/igniteui-fluent-dark-excel.css +1 -1
- package/styles/igniteui-fluent-dark-word.css +1 -1
- package/styles/igniteui-fluent-dark.css +1 -1
- package/styles/igniteui-fluent-light-excel.css +1 -1
- package/styles/igniteui-fluent-light-word.css +1 -1
- package/styles/igniteui-fluent-light.css +1 -1
- package/styles/igniteui-indigo-dark.css +1 -1
- package/styles/igniteui-indigo-light.css +1 -1
- package/styles/maps/igniteui-angular-dark.css.map +1 -1
- package/styles/maps/igniteui-angular.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-dark.css.map +1 -1
- package/styles/maps/igniteui-bootstrap-light.css.map +1 -1
- package/styles/maps/igniteui-dark-green.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-dark.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-excel.css.map +1 -1
- package/styles/maps/igniteui-fluent-light-word.css.map +1 -1
- package/styles/maps/igniteui-fluent-light.css.map +1 -1
- package/styles/maps/igniteui-indigo-dark.css.map +1 -1
- package/styles/maps/igniteui-indigo-light.css.map +1 -1
- package/types/igniteui-angular-action-strip.d.ts +3 -0
- package/types/igniteui-angular-banner.d.ts +3 -0
- package/types/igniteui-angular-calendar.d.ts +37 -47
- package/types/igniteui-angular-carousel.d.ts +1 -0
- package/types/igniteui-angular-chips.d.ts +2 -0
- package/types/igniteui-angular-combo.d.ts +4 -2
- package/types/igniteui-angular-core.d.ts +152 -397
- package/types/igniteui-angular-date-picker.d.ts +22 -4
- package/types/igniteui-angular-directives.d.ts +8 -4
- package/types/igniteui-angular-grids-core.d.ts +18 -8
- package/types/igniteui-angular-grids-grid.d.ts +9 -7
- package/types/igniteui-angular-grids-hierarchical-grid.d.ts +20 -3
- package/types/igniteui-angular-input-group.d.ts +1 -0
- package/types/igniteui-angular-list.d.ts +3 -0
- package/types/igniteui-angular-paginator.d.ts +3 -0
- package/types/igniteui-angular-query-builder.d.ts +8 -0
- package/types/igniteui-angular-time-picker.d.ts +7 -2
- package/types/igniteui-angular-tree.d.ts +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, inject, ElementRef, ChangeDetectorRef, TemplateRef, HostBinding, HostListener, ViewChild, Input, ChangeDetectionStrategy, Component, Pipe, DOCUMENT, forwardRef, QueryList, NgZone, IterableDiffers, ViewContainerRef, Injector, EnvironmentInjector, LOCALE_ID, EventEmitter, createComponent, booleanAttribute, ViewChildren, ContentChildren, ContentChild, Output, Directive, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
|
|
4
4
|
import { GridBaseAPIService, IGX_GRID_BASE, IgxGridSelectionService, IgxFilteringService, GridSelectionMode, IgxColumnFormatterPipe, GridSummaryPosition, RowPinningPosition, IgxGridCellComponent, IgxGridCellImageAltPipe, IgxStringReplacePipe, IgxRowDirective, IgxRowDragDirective, IgxGridNotGroupedPipe, IgxGridTopLevelColumns, IgxGridCellStylesPipe, IgxGridCellStyleClassesPipe, IgxGridDataMapperPipe, IgxGridTransactionStatePipe, FilterMode, GridCellMergeMode, IgxGridValidationService, IgxColumnResizingService, IGX_GRID_SERVICE_BASE, IgxGridNavigationService, IgxGridSummaryService, IgxGridTransaction, RowEditPositionStrategy, getUUID, IgxGridExcelStyleFilteringComponent, DropPosition, IgxCell, IgxEditRow, IgxColumnComponent, CharSeparatedValueData, IgxAdvancedFilteringDialogComponent, IgxColumnGroupComponent, IgxGridColumnResizerComponent, IgxGridHeaderRowComponent, IgxGridGroupByAreaComponent, IgxGridBodyDirective, IgxRowEditTabStopDirective, IgxSummaryRowComponent, IgxExcelStyleLoadingValuesTemplateDirective, IgxRowAddTextDirective, IgxRowExpandedIndicatorDirective, IgxRowCollapsedIndicatorDirective, IgxHeaderExpandedIndicatorDirective, IgxHeaderCollapsedIndicatorDirective, IgxExcelStyleHeaderIconDirective, IgxSortAscendingHeaderIconDirective, IgxSortDescendingHeaderIconDirective, IgxSortHeaderIconDirective, IgxGridLoadingTemplateDirective, IgxGridEmptyTemplateDirective, IgxHeadSelectorDirective, IgxRowSelectorDirective, IgxRowDragGhostDirective, IgxRowEditTemplateDirective, IgxRowEditTextDirective, IgxRowEditActionsDirective, IgxDragIndicatorIconDirective, IgxToolbarToken, WatchChanges, IgxGridRow, IgxGridCell, IgxGroupByRow, IgxSummaryRow, IgxGridMRLNavigationService, IgxGridDragSelectDirective, IgxColumnMovingDropDirective, IgxGridTransactionPipe, IgxHasVisibleColumnsPipe, IgxGridRowPinningPipe, IgxGridAddRowPipe, IgxGridRowClassesPipe, IgxGridRowStylesPipe, IgxSummaryDataPipe, IgxGridDetailTemplateDirective, IgxGroupByRowTemplateDirective, IgxGroupByRowSelectorDirective, IgxGridCRUDService, IgxGridFooterComponent, IgxGridStateDirective, IgxGridPinningActionsComponent, IgxGridEditingActionsComponent, IgxGridActionsBaseDirective, IgxGridActionButtonComponent, IgxGridHeaderComponent, IgxGridHeaderGroupComponent, IgxFilterCellTemplateDirective, IgxSummaryTemplateDirective, IgxCellTemplateDirective, IgxCellValidationErrorDirective, IgxCellHeaderTemplateDirective, IgxCellFooterTemplateDirective, IgxCellEditorTemplateDirective, IgxCollapsibleIndicatorTemplateDirective, IgxColumnLayoutComponent, IgxColumnActionsComponent, IgxColumnHidingDirective, IgxColumnPinningDirective, IgxCSVTextDirective, IgxExcelTextDirective, IgxGridToolbarActionsComponent, IgxGridToolbarAdvancedFilteringComponent, IgxGridToolbarComponent, IgxGridToolbarExporterComponent, IgxGridToolbarHidingComponent, IgxGridToolbarPinningComponent, IgxGridToolbarTitleComponent, IgxGridToolbarDirective, IgxExcelStyleHeaderComponent, IgxExcelStyleSortingComponent, IgxExcelStylePinningComponent, IgxExcelStyleHidingComponent, IgxExcelStyleSelectingComponent, IgxExcelStyleClearFiltersComponent, IgxExcelStyleConditionalFilterComponent, IgxExcelStyleMovingComponent, IgxExcelStyleSearchComponent, IgxExcelStyleColumnOperationsTemplateDirective, IgxExcelStyleFilterOperationsTemplateDirective, IgxColumnRequiredValidatorDirective, IgxColumnMinValidatorDirective, IgxColumnMaxValidatorDirective, IgxColumnEmailValidatorDirective, IgxColumnMinLengthValidatorDirective, IgxColumnMaxLengthValidatorDirective, IgxColumnPatternValidatorDirective } from 'igniteui-angular/grids/core';
|
|
5
|
-
import { cloneArray, DataUtil, GridColumnDataType, GridSummaryCalculationMode, FilteringExpressionsTree, FilterUtil, HammerGesturesManager, isTree, FilteringLogic, FilteringExpressionsTreeType, isObject, TransactionType, IgxFlatTransactionFactory, IgxOverlayService, PlatformUtil, DefaultMergeStrategy, FilteringStrategy,
|
|
5
|
+
import { cloneArray, DataUtil, GridColumnDataType, IgxNumberFormatterPipe, IgxDateFormatterPipe, IgxPercentFormatterPipe, IgxCurrencyFormatterPipe, GridSummaryCalculationMode, FilteringExpressionsTree, FilterUtil, HammerGesturesManager, isTree, FilteringLogic, FilteringExpressionsTreeType, getCurrentResourceStrings, GridResourceStringsEN, isObject, TransactionType, IgxFlatTransactionFactory, IgxOverlayService, PlatformUtil, I18N_FORMATTER, DefaultMergeStrategy, FilteringStrategy, ColumnPinningPosition, VerticalAlignment, HorizontalAlignment, ConnectedPositioningStrategy, AbsoluteScrollStrategy, DefaultDataCloneStrategy, ɵSize as _Size, areEqualArrays, resizeObservable, compareMaps, TransactionEventOrigin, mergeObjects, ContainerPositionStrategy, resolveNestedPath, columnFieldPath, recreateTree, recreateTreeFromFields, DEFAULT_LOCALE, onResourceChangeHandle, IgxOverlayOutletDirective, IgxActionStripToken } from 'igniteui-angular/core';
|
|
6
6
|
import { takeUntil, shareReplay, filter, throttleTime, takeWhile, map, first, take } from 'rxjs/operators';
|
|
7
7
|
import { Subject, fromEvent, animationFrameScheduler, pipe, merge } from 'rxjs';
|
|
8
8
|
import { IgxIconComponent } from 'igniteui-angular/icon';
|
|
@@ -20,6 +20,7 @@ import { IgxSnackbarComponent } from 'igniteui-angular/snackbar';
|
|
|
20
20
|
import { __decorate } from 'tslib';
|
|
21
21
|
import { IgcTrialWatermark } from 'igniteui-trial-watermark';
|
|
22
22
|
import { IgxPaginatorToken, IgxPaginatorComponent, IgxPageNavigationComponent, IgxPageSizeSelectorComponent, IgxPaginatorContentDirective, IgxPaginatorDirective } from 'igniteui-angular/paginator';
|
|
23
|
+
import { getNumberFormatter, getCurrentI18n } from 'igniteui-i18n-core';
|
|
23
24
|
|
|
24
25
|
class IgxGridAPIService extends GridBaseAPIService {
|
|
25
26
|
groupBy(expression) {
|
|
@@ -170,8 +171,7 @@ class IgxGridGroupByRowComponent {
|
|
|
170
171
|
}
|
|
171
172
|
/** @hidden @internal */
|
|
172
173
|
get currencyCode() {
|
|
173
|
-
return this.groupRow.column.pipeArgs.currencyCode
|
|
174
|
-
this.groupRow.column.pipeArgs.currencyCode : getLocaleCurrencyCode(this.grid.locale);
|
|
174
|
+
return this.grid.i18nFormatter.getCurrencyCode(this.grid.locale, this.groupRow.column.pipeArgs.currencyCode);
|
|
175
175
|
}
|
|
176
176
|
constructor() {
|
|
177
177
|
this.grid = inject(IGX_GRID_BASE);
|
|
@@ -355,16 +355,16 @@ class IgxGridGroupByRowComponent {
|
|
|
355
355
|
return this.grid.rowSelection !== GridSelectionMode.none && !this.hideGroupRowSelectors;
|
|
356
356
|
}
|
|
357
357
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridGroupByRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridGroupByRowComponent, isStandalone: true, selector: "igx-grid-groupby-row", inputs: { hideGroupRowSelectors: "hideGroupRowSelectors", rowDraggable: "rowDraggable", index: "index", gridID: "gridID", groupRow: "groupRow", isFocused: "isFocused" }, host: { listeners: { "pointerdown": "activate()", "click": "onClick($event)" }, properties: { "attr.aria-expanded": "this.expanded", "attr.aria-describedby": "this.describedBy", "attr.data-rowIndex": "this.dataRowIndex", "attr.id": "this.attrCellID", "class": "this.styleClasses" } }, viewQueries: [{ propertyName: "groupContent", first: true, predicate: ["groupContent"], descendants: true, static: true }, { propertyName: "defaultGroupByExpandedTemplate", first: true, predicate: ["defaultGroupByExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultGroupByCollapsedTemplate", first: true, predicate: ["defaultGroupByCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-container #defaultGroupRow>\n\n @if (rowDraggable) {\n <div class=\"igx-grid__drag-indicator igx-grid__tr-action\">\n <igx-icon family=\"default\" name=\"drag_indicator\" [style.visibility]=\"'hidden'\"></igx-icon>\n </div>\n }\n\n @if (showRowSelectors) {\n <div class=\"igx-grid__cbx-selection igx-grid__tr-action\" (pointerdown)=\"$event.preventDefault()\"\n (click)=\"onGroupSelectorClick($event)\">\n <ng-template #groupByRowSelector *ngTemplateOutlet=\"\n this.grid.groupByRowSelectorTemplate ? this.grid.groupByRowSelectorTemplate : groupByRowSelectorBaseTemplate;\n context: { $implicit: {\n selectedCount: selectedRowsInTheGroup.length,\n totalCount: this.groupRow.records.length,\n groupRow: this.groupRow }}\">\n </ng-template>\n </div>\n }\n\n <div (click)=\"toggle()\" class=\"igx-grid__grouping-indicator\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: this }\">\n </ng-container>\n </div>\n\n <div class=\"igx-grid__group-content\" #groupContent>\n <ng-container\n *ngTemplateOutlet=\"grid.groupRowTemplate ? grid.groupRowTemplate : defaultGroupByTemplate; context: { $implicit: groupRow }\">\n </ng-container>\n </div>\n\n <ng-template #defaultGroupByExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n </ng-template>\n\n <ng-template #defaultGroupByCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n </ng-template>\n\n\n <ng-template #defaultGroupByTemplate>\n <div class=\"igx-group-label\">\n <igx-icon family=\"default\" name=\"group_work\" class=\"igx-group-label__icon\"></igx-icon>\n <span class=\"igx-group-label__column-name\">\n {{ groupRow.column && groupRow.column.header ?\n groupRow.column.header :\n (groupRow.expression ? groupRow.expression.fieldName : '') }}:\n </span>\n\n <span class=\"igx-group-label__text\">{{\n formatter\n ? (groupRow.value | columnFormatter:formatter:groupRow.records[0]:null)\n : dataType === \"number\"\n ? (groupRow.value | number:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : (dataType === 'date' || dataType === 'time' || dataType === 'dateTime')\n ? (groupRow.value | date:groupRow.column.pipeArgs.format:groupRow.column.pipeArgs.timezone:grid.locale)\n : dataType === 'currency'\n ? (groupRow.value | currency:currencyCode:groupRow.column.pipeArgs.display:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : dataType === 'percent'\n ? (groupRow.value | percent:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : groupRow.value\n }}</span>\n\n <igx-badge [value]=\"groupRow.records ? groupRow.records.length : 0\" class='igx-group-label__count-badge'>\n </igx-badge>\n </div>\n </ng-template>\n <ng-template #groupByRowSelectorBaseTemplate let-context>\n <div class=\"igx-grid__cbx-padding\">\n <igx-checkbox [tabindex]=\"-1\" [readonly]=\"true\" [checked]=\"areAllRowsInTheGroupSelected\"\n [disableRipple]=\"true\" [indeterminate]=\"groupByRowCheckboxIndeterminateState\"\n [disabled]=\"this.grid.rowSelection === 'single'\" [aria-label]=\"groupByRowSelectorBaseAriaLabel\"\n #groupByRowCheckbox>\n </igx-checkbox>\n </div>\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["ariaHidden", "family", "name", "active"] }, { kind: "component", type: IgxBadgeComponent, selector: "igx-badge", inputs: ["id", "type", "value", "icon", "iconSet", "shape", "outlined", "dot"] }, { kind: "component", type: IgxCheckboxComponent, selector: "igx-checkbox", inputs: ["indeterminate", "checked", "disabled", "invalid", "readonly", "disableTransitions"] }, { kind: "pipe", type:
|
|
358
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridGroupByRowComponent, isStandalone: true, selector: "igx-grid-groupby-row", inputs: { hideGroupRowSelectors: "hideGroupRowSelectors", rowDraggable: "rowDraggable", index: "index", gridID: "gridID", groupRow: "groupRow", isFocused: "isFocused" }, host: { listeners: { "pointerdown": "activate()", "click": "onClick($event)" }, properties: { "attr.aria-expanded": "this.expanded", "attr.aria-describedby": "this.describedBy", "attr.data-rowIndex": "this.dataRowIndex", "attr.id": "this.attrCellID", "class": "this.styleClasses" } }, viewQueries: [{ propertyName: "groupContent", first: true, predicate: ["groupContent"], descendants: true, static: true }, { propertyName: "defaultGroupByExpandedTemplate", first: true, predicate: ["defaultGroupByExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultGroupByCollapsedTemplate", first: true, predicate: ["defaultGroupByCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-container #defaultGroupRow>\n\n @if (rowDraggable) {\n <div class=\"igx-grid__drag-indicator igx-grid__tr-action\">\n <igx-icon family=\"default\" name=\"drag_indicator\" [style.visibility]=\"'hidden'\"></igx-icon>\n </div>\n }\n\n @if (showRowSelectors) {\n <div class=\"igx-grid__cbx-selection igx-grid__tr-action\" (pointerdown)=\"$event.preventDefault()\"\n (click)=\"onGroupSelectorClick($event)\">\n <ng-template #groupByRowSelector *ngTemplateOutlet=\"\n this.grid.groupByRowSelectorTemplate ? this.grid.groupByRowSelectorTemplate : groupByRowSelectorBaseTemplate;\n context: { $implicit: {\n selectedCount: selectedRowsInTheGroup.length,\n totalCount: this.groupRow.records.length,\n groupRow: this.groupRow }}\">\n </ng-template>\n </div>\n }\n\n <div (click)=\"toggle()\" class=\"igx-grid__grouping-indicator\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: this }\">\n </ng-container>\n </div>\n\n <div class=\"igx-grid__group-content\" #groupContent>\n <ng-container\n *ngTemplateOutlet=\"grid.groupRowTemplate ? grid.groupRowTemplate : defaultGroupByTemplate; context: { $implicit: groupRow }\">\n </ng-container>\n </div>\n\n <ng-template #defaultGroupByExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n </ng-template>\n\n <ng-template #defaultGroupByCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n </ng-template>\n\n\n <ng-template #defaultGroupByTemplate>\n <div class=\"igx-group-label\">\n <igx-icon family=\"default\" name=\"group_work\" class=\"igx-group-label__icon\"></igx-icon>\n <span class=\"igx-group-label__column-name\">\n {{ groupRow.column && groupRow.column.header ?\n groupRow.column.header :\n (groupRow.expression ? groupRow.expression.fieldName : '') }}:\n </span>\n\n <span class=\"igx-group-label__text\">{{\n formatter\n ? (groupRow.value | columnFormatter:formatter:groupRow.records[0]:null)\n : dataType === \"number\"\n ? (groupRow.value | number:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : (dataType === 'date' || dataType === 'time' || dataType === 'dateTime')\n ? (groupRow.value | date:groupRow.column.pipeArgs.format:groupRow.column.pipeArgs.timezone:grid.locale)\n : dataType === 'currency'\n ? (groupRow.value | currency:currencyCode:groupRow.column.pipeArgs.display:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : dataType === 'percent'\n ? (groupRow.value | percent:groupRow.column.pipeArgs.digitsInfo:grid.locale)\n : groupRow.value\n }}</span>\n\n <igx-badge [value]=\"groupRow.records ? groupRow.records.length : 0\" class='igx-group-label__count-badge'>\n </igx-badge>\n </div>\n </ng-template>\n <ng-template #groupByRowSelectorBaseTemplate let-context>\n <div class=\"igx-grid__cbx-padding\">\n <igx-checkbox [tabindex]=\"-1\" [readonly]=\"true\" [checked]=\"areAllRowsInTheGroupSelected\"\n [disableRipple]=\"true\" [indeterminate]=\"groupByRowCheckboxIndeterminateState\"\n [disabled]=\"this.grid.rowSelection === 'single'\" [aria-label]=\"groupByRowSelectorBaseAriaLabel\"\n #groupByRowCheckbox>\n </igx-checkbox>\n </div>\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["ariaHidden", "family", "name", "active"] }, { kind: "component", type: IgxBadgeComponent, selector: "igx-badge", inputs: ["id", "type", "value", "icon", "iconSet", "shape", "outlined", "dot"] }, { kind: "component", type: IgxCheckboxComponent, selector: "igx-checkbox", inputs: ["indeterminate", "checked", "disabled", "invalid", "readonly", "disableTransitions"] }, { kind: "pipe", type: IgxNumberFormatterPipe, name: "number" }, { kind: "pipe", type: IgxDateFormatterPipe, name: "date" }, { kind: "pipe", type: IgxPercentFormatterPipe, name: "percent" }, { kind: "pipe", type: IgxCurrencyFormatterPipe, name: "currency" }, { kind: "pipe", type: IgxColumnFormatterPipe, name: "columnFormatter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
359
359
|
}
|
|
360
360
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridGroupByRowComponent, decorators: [{
|
|
361
361
|
type: Component,
|
|
362
362
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-groupby-row', imports: [
|
|
363
363
|
NgTemplateOutlet,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
364
|
+
IgxNumberFormatterPipe,
|
|
365
|
+
IgxDateFormatterPipe,
|
|
366
|
+
IgxPercentFormatterPipe,
|
|
367
|
+
IgxCurrencyFormatterPipe,
|
|
368
368
|
IgxIconComponent,
|
|
369
369
|
IgxBadgeComponent,
|
|
370
370
|
IgxCheckboxComponent,
|
|
@@ -862,11 +862,15 @@ class IgxGridExpandableCellComponent extends IgxGridCellComponent {
|
|
|
862
862
|
return !this.editMode && (!this.intRow.pinned || isGhost);
|
|
863
863
|
}
|
|
864
864
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridExpandableCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
865
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridExpandableCellComponent, isStandalone: true, selector: "igx-expandable-grid-cell", inputs: { expanded: "expanded" }, providers: [HammerGesturesManager], viewQueries: [{ propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, read: ElementRef }, { propertyName: "indentationDiv", first: true, predicate: ["indentationDiv"], descendants: true, read: ElementRef }, { propertyName: "defaultExpandedTemplate", first: true, predicate: ["defaultExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCollapsedTemplate", first: true, predicate: ["defaultCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip class=\"igx-grid__td--pinned-chip\" [disabled]=\"true\" [style.--ig-size]=\"1\">{{ grid.resourceStrings.igx_grid_pinned_row_indicator }}</igx-chip>\n }\n</ng-template>\n<ng-template #defaultCell>\n @if (column.dataType !== 'boolean' && column.dataType !== 'image' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [class.igx-grid__td--number]=\"column.dataType === 'number' || column.dataType === 'percent' || column.dataType === 'currency'\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData)\n : column.dataType === 'number'\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\n : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\n : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\n : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === \"number\"\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value}}</div>\n }\n\n @if (column.dataType === 'boolean' && !this.formatter) {\n <div [class.igx-grid__td--bool]=\"column.dataType === 'boolean'\">\n <igx-icon\n family=\"default\"\n [name]=\"value ? 'confirm' : 'close'\"\n [ngClass]=\"{ 'igx-icon--success': value, 'igx-icon--error': !value }\">\n </igx-icon>\n </div>\n }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n<ng-template #addRowCell let-cell=\"cell\">\n @if (column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === 'number' ?\n (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime') ?\n (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'?\n (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent' ?\n (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ value ? value : (column.header || column.field) }}\n </div>\n }\n</ng-template>\n<ng-template #inlineEditor let-cell=\"cell\">\n @if (column.dataType === 'string' || column.dataType === 'image') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-input-group [style.--ig-size]=\"1\" >\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n (compositionstart)=\"grid.crudService.isInCompositionMode = true\"\n (compositionend)=\"grid.crudService.isInCompositionMode = false\"\n />\n </igx-input-group>\n </ng-container>\n }\n @if (column.dataType === 'number') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'boolean') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-checkbox\n [checked]=\"editValue\"\n [igxFocus]=\"true\"\n [disableRipple]=\"true\"\n [formControl]=\"formControl\"\n ></igx-checkbox>\n </ng-container>\n }\n @if (column.dataType === 'date') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-date-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [weekStart]=\"column.pipeArgs.weekStart\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n >\n </igx-date-picker>\n </ng-container>\n }\n @if (column.dataType === 'time') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-time-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n ></igx-time-picker>\n </ng-container>\n }\n @if (column.dataType === 'dateTime') {\n <igx-input-group [formGroup]=\"formGroup\">\n <input\n type=\"text\"\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [formControl]=\"formControl\"\n igxInput\n [locale]=\"grid.locale\"\n [igxDateTimeEditor]=\"column.editorOptions?.dateTimeFormat\"\n [defaultFormatType]=\"column.dataType\"\n [displayFormat]=\"column.pipeArgs.format\"\n [igxFocus]=\"true\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'currency') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n @if (grid.currencyPositionLeft) {\n <igx-prefix>{{ currencyCodeSymbol }}</igx-prefix>\n }\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n @if (!grid.currencyPositionLeft) {\n <igx-suffix>{{ currencyCodeSymbol }}</igx-suffix>\n }\n </igx-input-group>\n }\n @if (column.dataType === 'percent') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n <igx-suffix> {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} </igx-suffix>\n </igx-input-group>\n }\n</ng-template>\n@if (showExpanderIndicator) {\n <div #indicator\n class=\"igx-grid__tree-grouping-indicator\"\n (click)=\"toggle($event)\" (focus)=\"onIndicatorFocus()\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: row }\">\n </ng-container>\n </div>\n}\n<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\">\n</ng-container>\n@if (isInvalid) {\n <igx-icon\n family=\"default\"\n name=\"error\"\n #errorIcon\n [igxTooltipTarget]=\"tooltipRef\"\n [igxToggleOutlet]=\"grid.outlet\"\n (mouseover)='errorShowing = true'\n (mouseout)='errorShowing = false'>\n </igx-icon>\n <div [id]=\"ariaErrorMessage\"\n igxTooltip #error #tooltipRef=\"tooltip\">\n <div [style.width]=\"'max-content'\">\n <ng-container *ngTemplateOutlet=\"cellValidationErrorTemplate || defaultError; context: context\"></ng-container>\n </div>\n </div>\n}\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n</ng-template>\n<ng-template #defaultCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n</ng-template>\n\n<ng-template #defaultError>\n @if (formGroup?.get(column?.field).errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: IgxChipComponent, selector: "igx-chip", inputs: ["variant", "id", "tabIndex", "data", "draggable", "animateOnRelease", "hideBaseOnDrag", "removable", "removeIcon", "selectable", "selectIcon", "class", "disabled", "selected", "color", "resourceStrings"], outputs: ["selectedChange", "moveStart", "moveEnd", "remove", "chipClick", "selectedChanging", "selectedChanged", "keyDown", "dragEnter", "dragLeave", "dragOver", "dragDrop"] }, { kind: "directive", type: IgxTextHighlightDirective, selector: "[igxTextHighlight]", inputs: ["cssClass", "activeCssClass", "containerClass", "groupName", "value", "row", "column", "metadata"] }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["ariaHidden", "family", "name", "active"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: IgxInputGroupComponent, selector: "igx-input-group", inputs: ["resourceStrings", "suppressInputAutofocus", "type", "theme"] }, { kind: "directive", type: IgxInputDirective, selector: "[igxInput]", inputs: ["value", "disabled", "required"], exportAs: ["igxInput"] }, { kind: "directive", type: IgxFocusDirective, selector: "[igxFocus]", inputs: ["igxFocus"], exportAs: ["igxFocus"] }, { kind: "component", type: IgxCheckboxComponent, selector: "igx-checkbox", inputs: ["indeterminate", "checked", "disabled", "invalid", "readonly", "disableTransitions"] }, { kind: "component", type: IgxDatePickerComponent, selector: "igx-date-picker", inputs: ["hideOutsideDays", "displayMonthsCount", "orientation", "showWeekNumbers", "activeDate", "formatter", "todayButtonLabel", "cancelButtonLabel", "spinLoop", "spinDelta", "outlet", "id", "formatViews", "disabledDates", "specialDates", "calendarFormat", "value", "minValue", "maxValue", "resourceStrings", "readOnly"], outputs: ["valueChange", "validationFailed"] }, { kind: "component", type: IgxTimePickerComponent, selector: "igx-time-picker", inputs: ["id", "displayFormat", "inputFormat", "mode", "minValue", "maxValue", "spinLoop", "formatter", "readOnly", "value", "resourceStrings", "okButtonLabel", "cancelButtonLabel", "itemsDelta"], outputs: ["selected", "valueChange", "validationFailed"] }, { kind: "directive", type: IgxDateTimeEditorDirective, selector: "[igxDateTimeEditor]", inputs: ["locale", "minValue", "maxValue", "spinLoop", "displayFormat", "igxDateTimeEditor", "value", "defaultFormatType", "spinDelta"], outputs: ["valueChange", "validationFailed"], exportAs: ["igxDateTimeEditor"] }, { kind: "directive", type: IgxPrefixDirective, selector: "igx-prefix,[igxPrefix],[igxStart]" }, { kind: "directive", type: IgxSuffixDirective, selector: "igx-suffix,[igxSuffix],[igxEnd]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: IgxTooltipTargetDirective, selector: "[igxTooltipTarget]", inputs: ["showDelay", "hideDelay", "hasArrow", "sticky", "closeButtonTemplate", "positionSettings", "tooltipDisabled", "igxTooltipTarget", "tooltip"], outputs: ["tooltipShow", "tooltipHide"], exportAs: ["tooltipTarget"] }, { kind: "directive", type: IgxTooltipDirective, selector: "[igxTooltip]", inputs: ["context", "id", "role"], exportAs: ["tooltip"] }, { kind: "pipe", type: IgxGridCellImageAltPipe, name: "igxCellImageAlt" }, { kind: "pipe", type: IgxStringReplacePipe, name: "igxStringReplace" }, { kind: "pipe", type: IgxColumnFormatterPipe, name: "columnFormatter" }, { kind: "pipe", type: DecimalPipe, name: "number" }, { kind: "pipe", type: PercentPipe, name: "percent" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
865
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridExpandableCellComponent, isStandalone: true, selector: "igx-expandable-grid-cell", inputs: { expanded: "expanded" }, providers: [HammerGesturesManager], viewQueries: [{ propertyName: "indicator", first: true, predicate: ["indicator"], descendants: true, read: ElementRef }, { propertyName: "indentationDiv", first: true, predicate: ["indentationDiv"], descendants: true, read: ElementRef }, { propertyName: "defaultExpandedTemplate", first: true, predicate: ["defaultExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCollapsedTemplate", first: true, predicate: ["defaultCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip class=\"igx-grid__td--pinned-chip\" [disabled]=\"true\" [style.--ig-size]=\"1\">{{ grid.resourceStrings.igx_grid_pinned_row_indicator }}</igx-chip>\n }\n</ng-template>\n<ng-template #defaultCell>\n @if (column.dataType !== 'boolean' && column.dataType !== 'image' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [class.igx-grid__td--number]=\"column.dataType === 'number' || column.dataType === 'percent' || column.dataType === 'currency'\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData)\n : column.dataType === 'number'\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\n : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\n : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\n : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === \"number\"\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value}}</div>\n }\n\n @if (column.dataType === 'boolean' && !this.formatter) {\n <div [class.igx-grid__td--bool]=\"column.dataType === 'boolean'\">\n <igx-icon\n family=\"default\"\n [name]=\"value ? 'confirm' : 'close'\"\n [ngClass]=\"{ 'igx-icon--success': value, 'igx-icon--error': !value }\">\n </igx-icon>\n </div>\n }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n<ng-template #addRowCell let-cell=\"cell\">\n @if (column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === 'number' ?\n (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime') ?\n (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'?\n (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent' ?\n (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ value ? value : (column.header || column.field) }}\n </div>\n }\n</ng-template>\n<ng-template #inlineEditor let-cell=\"cell\">\n @if (column.dataType === 'string' || column.dataType === 'image') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-input-group [style.--ig-size]=\"1\" >\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n (compositionstart)=\"grid.crudService.isInCompositionMode = true\"\n (compositionend)=\"grid.crudService.isInCompositionMode = false\"\n />\n </igx-input-group>\n </ng-container>\n }\n @if (column.dataType === 'number') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'boolean') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-checkbox\n [checked]=\"editValue\"\n [igxFocus]=\"true\"\n [disableRipple]=\"true\"\n [formControl]=\"formControl\"\n ></igx-checkbox>\n </ng-container>\n }\n @if (column.dataType === 'date') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-date-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [weekStart]=\"column.pipeArgs.weekStart\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n >\n </igx-date-picker>\n </ng-container>\n }\n @if (column.dataType === 'time') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-time-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n ></igx-time-picker>\n </ng-container>\n }\n @if (column.dataType === 'dateTime') {\n <igx-input-group [formGroup]=\"formGroup\">\n <input\n type=\"text\"\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [formControl]=\"formControl\"\n igxInput\n [locale]=\"grid.locale\"\n [igxDateTimeEditor]=\"column.editorOptions?.dateTimeFormat\"\n [defaultFormatType]=\"column.dataType\"\n [displayFormat]=\"column.pipeArgs.format\"\n [igxFocus]=\"true\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'currency') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n @if (grid.currencyPositionLeft) {\n <igx-prefix>{{ currencyCodeSymbol }}</igx-prefix>\n }\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n @if (!grid.currencyPositionLeft) {\n <igx-suffix>{{ currencyCodeSymbol }}</igx-suffix>\n }\n </igx-input-group>\n }\n @if (column.dataType === 'percent') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n <igx-suffix> {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} </igx-suffix>\n </igx-input-group>\n }\n</ng-template>\n@if (showExpanderIndicator) {\n <div #indicator\n class=\"igx-grid__tree-grouping-indicator\"\n (click)=\"toggle($event)\" (focus)=\"onIndicatorFocus()\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: row }\">\n </ng-container>\n </div>\n}\n<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\">\n</ng-container>\n@if (isInvalid) {\n <igx-icon\n family=\"default\"\n name=\"error\"\n #errorIcon\n [igxTooltipTarget]=\"tooltipRef\"\n [igxToggleOutlet]=\"grid.outlet\"\n (mouseover)='errorShowing = true'\n (mouseout)='errorShowing = false'>\n </igx-icon>\n <div [id]=\"ariaErrorMessage\"\n igxTooltip #error #tooltipRef=\"tooltip\">\n <div [style.width]=\"'max-content'\">\n <ng-container *ngTemplateOutlet=\"cellValidationErrorTemplate || defaultError; context: context\"></ng-container>\n </div>\n </div>\n}\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n</ng-template>\n<ng-template #defaultCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n</ng-template>\n\n<ng-template #defaultError>\n @if (formGroup?.get(column?.field).errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "component", type: IgxChipComponent, selector: "igx-chip", inputs: ["variant", "id", "tabIndex", "data", "draggable", "animateOnRelease", "hideBaseOnDrag", "removable", "removeIcon", "selectable", "selectIcon", "class", "disabled", "selected", "color", "resourceStrings"], outputs: ["selectedChange", "moveStart", "moveEnd", "remove", "chipClick", "selectedChanging", "selectedChanged", "keyDown", "dragEnter", "dragLeave", "dragOver", "dragDrop"] }, { kind: "directive", type: IgxTextHighlightDirective, selector: "[igxTextHighlight]", inputs: ["cssClass", "activeCssClass", "containerClass", "groupName", "value", "row", "column", "metadata"] }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["ariaHidden", "family", "name", "active"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: IgxInputGroupComponent, selector: "igx-input-group", inputs: ["resourceStrings", "suppressInputAutofocus", "type", "theme"] }, { kind: "directive", type: IgxInputDirective, selector: "[igxInput]", inputs: ["value", "disabled", "required"], exportAs: ["igxInput"] }, { kind: "directive", type: IgxFocusDirective, selector: "[igxFocus]", inputs: ["igxFocus"], exportAs: ["igxFocus"] }, { kind: "component", type: IgxCheckboxComponent, selector: "igx-checkbox", inputs: ["indeterminate", "checked", "disabled", "invalid", "readonly", "disableTransitions"] }, { kind: "component", type: IgxDatePickerComponent, selector: "igx-date-picker", inputs: ["hideOutsideDays", "displayMonthsCount", "orientation", "showWeekNumbers", "activeDate", "formatter", "todayButtonLabel", "cancelButtonLabel", "spinLoop", "spinDelta", "outlet", "id", "formatViews", "disabledDates", "specialDates", "calendarFormat", "value", "minValue", "maxValue", "resourceStrings", "readOnly"], outputs: ["valueChange", "validationFailed"] }, { kind: "component", type: IgxTimePickerComponent, selector: "igx-time-picker", inputs: ["id", "displayFormat", "inputFormat", "mode", "minValue", "maxValue", "spinLoop", "formatter", "readOnly", "value", "resourceStrings", "okButtonLabel", "cancelButtonLabel", "itemsDelta"], outputs: ["selected", "valueChange", "validationFailed"] }, { kind: "directive", type: IgxDateTimeEditorDirective, selector: "[igxDateTimeEditor]", inputs: ["locale", "minValue", "maxValue", "spinLoop", "displayFormat", "igxDateTimeEditor", "value", "defaultFormatType", "spinDelta"], outputs: ["valueChange", "validationFailed"], exportAs: ["igxDateTimeEditor"] }, { kind: "directive", type: IgxPrefixDirective, selector: "igx-prefix,[igxPrefix],[igxStart]" }, { kind: "directive", type: IgxSuffixDirective, selector: "igx-suffix,[igxSuffix],[igxEnd]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: IgxTooltipTargetDirective, selector: "[igxTooltipTarget]", inputs: ["showDelay", "hideDelay", "hasArrow", "sticky", "closeButtonTemplate", "positionSettings", "tooltipDisabled", "igxTooltipTarget", "tooltip"], outputs: ["tooltipShow", "tooltipHide"], exportAs: ["tooltipTarget"] }, { kind: "directive", type: IgxTooltipDirective, selector: "[igxTooltip]", inputs: ["context", "id", "role"], exportAs: ["tooltip"] }, { kind: "pipe", type: IgxGridCellImageAltPipe, name: "igxCellImageAlt" }, { kind: "pipe", type: IgxStringReplacePipe, name: "igxStringReplace" }, { kind: "pipe", type: IgxColumnFormatterPipe, name: "columnFormatter" }, { kind: "pipe", type: IgxNumberFormatterPipe, name: "number" }, { kind: "pipe", type: IgxPercentFormatterPipe, name: "percent" }, { kind: "pipe", type: IgxCurrencyFormatterPipe, name: "currency" }, { kind: "pipe", type: IgxDateFormatterPipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
866
866
|
}
|
|
867
867
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridExpandableCellComponent, decorators: [{
|
|
868
868
|
type: Component,
|
|
869
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-expandable-grid-cell', providers: [HammerGesturesManager], imports: [IgxChipComponent, IgxTextHighlightDirective, IgxIconComponent, NgClass, FormsModule, ReactiveFormsModule, IgxInputGroupComponent, IgxInputDirective, IgxFocusDirective, IgxCheckboxComponent, IgxDatePickerComponent, IgxTimePickerComponent, IgxDateTimeEditorDirective, IgxPrefixDirective, IgxSuffixDirective, NgTemplateOutlet, IgxTooltipTargetDirective, IgxTooltipDirective, IgxGridCellImageAltPipe, IgxStringReplacePipe, IgxColumnFormatterPipe, DecimalPipe, PercentPipe, CurrencyPipe, DatePipe], template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip class=\"igx-grid__td--pinned-chip\" [disabled]=\"true\" [style.--ig-size]=\"1\">{{ grid.resourceStrings.igx_grid_pinned_row_indicator }}</igx-chip>\n }\n</ng-template>\n<ng-template #defaultCell>\n @if (column.dataType !== 'boolean' && column.dataType !== 'image' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [class.igx-grid__td--number]=\"column.dataType === 'number' || column.dataType === 'percent' || column.dataType === 'currency'\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData)\n : column.dataType === 'number'\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\n : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\n : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\n : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === \"number\"\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value}}</div>\n }\n\n @if (column.dataType === 'boolean' && !this.formatter) {\n <div [class.igx-grid__td--bool]=\"column.dataType === 'boolean'\">\n <igx-icon\n family=\"default\"\n [name]=\"value ? 'confirm' : 'close'\"\n [ngClass]=\"{ 'igx-icon--success': value, 'igx-icon--error': !value }\">\n </igx-icon>\n </div>\n }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n<ng-template #addRowCell let-cell=\"cell\">\n @if (column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === 'number' ?\n (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime') ?\n (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'?\n (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent' ?\n (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ value ? value : (column.header || column.field) }}\n </div>\n }\n</ng-template>\n<ng-template #inlineEditor let-cell=\"cell\">\n @if (column.dataType === 'string' || column.dataType === 'image') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-input-group [style.--ig-size]=\"1\" >\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n (compositionstart)=\"grid.crudService.isInCompositionMode = true\"\n (compositionend)=\"grid.crudService.isInCompositionMode = false\"\n />\n </igx-input-group>\n </ng-container>\n }\n @if (column.dataType === 'number') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'boolean') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-checkbox\n [checked]=\"editValue\"\n [igxFocus]=\"true\"\n [disableRipple]=\"true\"\n [formControl]=\"formControl\"\n ></igx-checkbox>\n </ng-container>\n }\n @if (column.dataType === 'date') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-date-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [weekStart]=\"column.pipeArgs.weekStart\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n >\n </igx-date-picker>\n </ng-container>\n }\n @if (column.dataType === 'time') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-time-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n ></igx-time-picker>\n </ng-container>\n }\n @if (column.dataType === 'dateTime') {\n <igx-input-group [formGroup]=\"formGroup\">\n <input\n type=\"text\"\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [formControl]=\"formControl\"\n igxInput\n [locale]=\"grid.locale\"\n [igxDateTimeEditor]=\"column.editorOptions?.dateTimeFormat\"\n [defaultFormatType]=\"column.dataType\"\n [displayFormat]=\"column.pipeArgs.format\"\n [igxFocus]=\"true\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'currency') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n @if (grid.currencyPositionLeft) {\n <igx-prefix>{{ currencyCodeSymbol }}</igx-prefix>\n }\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n @if (!grid.currencyPositionLeft) {\n <igx-suffix>{{ currencyCodeSymbol }}</igx-suffix>\n }\n </igx-input-group>\n }\n @if (column.dataType === 'percent') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n <igx-suffix> {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} </igx-suffix>\n </igx-input-group>\n }\n</ng-template>\n@if (showExpanderIndicator) {\n <div #indicator\n class=\"igx-grid__tree-grouping-indicator\"\n (click)=\"toggle($event)\" (focus)=\"onIndicatorFocus()\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: row }\">\n </ng-container>\n </div>\n}\n<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\">\n</ng-container>\n@if (isInvalid) {\n <igx-icon\n family=\"default\"\n name=\"error\"\n #errorIcon\n [igxTooltipTarget]=\"tooltipRef\"\n [igxToggleOutlet]=\"grid.outlet\"\n (mouseover)='errorShowing = true'\n (mouseout)='errorShowing = false'>\n </igx-icon>\n <div [id]=\"ariaErrorMessage\"\n igxTooltip #error #tooltipRef=\"tooltip\">\n <div [style.width]=\"'max-content'\">\n <ng-container *ngTemplateOutlet=\"cellValidationErrorTemplate || defaultError; context: context\"></ng-container>\n </div>\n </div>\n}\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n</ng-template>\n<ng-template #defaultCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n</ng-template>\n\n<ng-template #defaultError>\n @if (formGroup?.get(column?.field).errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n" }]
|
|
869
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-expandable-grid-cell', providers: [HammerGesturesManager], imports: [IgxChipComponent, IgxTextHighlightDirective, IgxIconComponent, NgClass, FormsModule, ReactiveFormsModule,
|
|
870
|
+
IgxInputGroupComponent, IgxInputDirective, IgxFocusDirective, IgxCheckboxComponent, IgxDatePickerComponent,
|
|
871
|
+
IgxTimePickerComponent, IgxDateTimeEditorDirective, IgxPrefixDirective, IgxSuffixDirective, NgTemplateOutlet,
|
|
872
|
+
IgxTooltipTargetDirective, IgxTooltipDirective, IgxGridCellImageAltPipe, IgxStringReplacePipe,
|
|
873
|
+
IgxColumnFormatterPipe, IgxNumberFormatterPipe, IgxPercentFormatterPipe, IgxCurrencyFormatterPipe, IgxDateFormatterPipe], template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip class=\"igx-grid__td--pinned-chip\" [disabled]=\"true\" [style.--ig-size]=\"1\">{{ grid.resourceStrings.igx_grid_pinned_row_indicator }}</igx-chip>\n }\n</ng-template>\n<ng-template #defaultCell>\n @if (column.dataType !== 'boolean' && column.dataType !== 'image' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [class.igx-grid__td--number]=\"column.dataType === 'number' || column.dataType === 'percent' || column.dataType === 'currency'\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData)\n : column.dataType === 'number'\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale)\n : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale)\n : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale)\n : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale)\n : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === \"number\"\n ? (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime')\n ? (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'\n ? (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent'\n ? (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value}}</div>\n }\n\n @if (column.dataType === 'boolean' && !this.formatter) {\n <div [class.igx-grid__td--bool]=\"column.dataType === 'boolean'\">\n <igx-icon\n family=\"default\"\n [name]=\"value ? 'confirm' : 'close'\"\n [ngClass]=\"{ 'igx-icon--success': value, 'igx-icon--error': !value }\">\n </igx-icon>\n </div>\n }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n<ng-template #addRowCell let-cell=\"cell\">\n @if (column.dataType !== 'boolean' || (column.dataType === 'boolean' && this.formatter)) {\n <div\n igxTextHighlight class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"formatter ? (value | columnFormatter:formatter:rowData) : column.dataType === 'number' ?\n (value | number:column.pipeArgs.digitsInfo:grid.locale) : (column.dataType === 'date' || column.dataType === 'time' || column.dataType === 'dateTime') ?\n (value | date:column.pipeArgs.format:column.pipeArgs.timezone:grid.locale) : column.dataType === 'currency'?\n (value | currency:currencyCode:column.pipeArgs.display:column.pipeArgs.digitsInfo:grid.locale) : column.dataType === 'percent' ?\n (value | percent:column.pipeArgs.digitsInfo:grid.locale) : value\"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\">\n {{ value ? value : (column.header || column.field) }}\n </div>\n }\n</ng-template>\n<ng-template #inlineEditor let-cell=\"cell\">\n @if (column.dataType === 'string' || column.dataType === 'image') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-input-group [style.--ig-size]=\"1\" >\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n (compositionstart)=\"grid.crudService.isInCompositionMode = true\"\n (compositionend)=\"grid.crudService.isInCompositionMode = false\"\n />\n </igx-input-group>\n </ng-container>\n }\n @if (column.dataType === 'number') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'boolean') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-checkbox\n [checked]=\"editValue\"\n [igxFocus]=\"true\"\n [disableRipple]=\"true\"\n [formControl]=\"formControl\"\n ></igx-checkbox>\n </ng-container>\n }\n @if (column.dataType === 'date') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-date-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [weekStart]=\"column.pipeArgs.weekStart\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n >\n </igx-date-picker>\n </ng-container>\n }\n @if (column.dataType === 'time') {\n <ng-container [formGroup]=\"formGroup\">\n <igx-time-picker\n [style.width.%]=\"100\"\n [outlet]=\"grid.outlet\"\n mode=\"dropdown\"\n [locale]=\"grid.locale\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n ></igx-time-picker>\n </ng-container>\n }\n @if (column.dataType === 'dateTime') {\n <igx-input-group [formGroup]=\"formGroup\">\n <input\n type=\"text\"\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [formControl]=\"formControl\"\n igxInput\n [locale]=\"grid.locale\"\n [igxDateTimeEditor]=\"column.editorOptions?.dateTimeFormat\"\n [defaultFormatType]=\"column.dataType\"\n [displayFormat]=\"column.pipeArgs.format\"\n [igxFocus]=\"true\"\n />\n </igx-input-group>\n }\n @if (column.dataType === 'currency') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n @if (grid.currencyPositionLeft) {\n <igx-prefix>{{ currencyCodeSymbol }}</igx-prefix>\n }\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n @if (!grid.currencyPositionLeft) {\n <igx-suffix>{{ currencyCodeSymbol }}</igx-suffix>\n }\n </igx-input-group>\n }\n @if (column.dataType === 'percent') {\n <igx-input-group [style.--ig-size]=\"1\" [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [step]=\"step\"\n type=\"number\"\n [formControl]=\"formControl\"\n />\n <igx-suffix> {{ editValue | percent:column.pipeArgs.digitsInfo:grid.locale }} </igx-suffix>\n </igx-input-group>\n }\n</ng-template>\n@if (showExpanderIndicator) {\n <div #indicator\n class=\"igx-grid__tree-grouping-indicator\"\n (click)=\"toggle($event)\" (focus)=\"onIndicatorFocus()\">\n <ng-container *ngTemplateOutlet=\"iconTemplate; context: { $implicit: row }\">\n </ng-container>\n </div>\n}\n<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\">\n</ng-container>\n@if (isInvalid) {\n <igx-icon\n family=\"default\"\n name=\"error\"\n #errorIcon\n [igxTooltipTarget]=\"tooltipRef\"\n [igxToggleOutlet]=\"grid.outlet\"\n (mouseover)='errorShowing = true'\n (mouseout)='errorShowing = false'>\n </igx-icon>\n <div [id]=\"ariaErrorMessage\"\n igxTooltip #error #tooltipRef=\"tooltip\">\n <div [style.width]=\"'max-content'\">\n <ng-container *ngTemplateOutlet=\"cellValidationErrorTemplate || defaultError; context: context\"></ng-container>\n </div>\n </div>\n}\n\n<ng-template #defaultExpandedTemplate>\n <igx-icon family=\"default\" name=\"tree_collapse\"></igx-icon>\n</ng-template>\n<ng-template #defaultCollapsedTemplate>\n <igx-icon family=\"default\" name=\"tree_expand\"></igx-icon>\n</ng-template>\n\n<ng-template #defaultError>\n @if (formGroup?.get(column?.field).errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.minlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.maxlength.requiredLength }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.min.min }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':formGroup.get(column.field).errors.max.max }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (formGroup?.get(column?.field).errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n" }]
|
|
870
874
|
}], propDecorators: { expanded: [{
|
|
871
875
|
type: Input
|
|
872
876
|
}], indicator: [{
|
|
@@ -1322,10 +1326,11 @@ class IgxGridBaseDirective {
|
|
|
1322
1326
|
* By default it uses EN resources.
|
|
1323
1327
|
*/
|
|
1324
1328
|
set resourceStrings(value) {
|
|
1325
|
-
this._resourceStrings = Object.assign({}, this.
|
|
1329
|
+
this._resourceStrings = Object.assign({}, this.resourceStrings, value);
|
|
1330
|
+
this.notifyChanges();
|
|
1326
1331
|
}
|
|
1327
1332
|
get resourceStrings() {
|
|
1328
|
-
return this._resourceStrings;
|
|
1333
|
+
return this._resourceStrings || this._defaultResourceStrings;
|
|
1329
1334
|
}
|
|
1330
1335
|
/**
|
|
1331
1336
|
* Gets/Sets the filtering logic of the `IgxGridComponent`.
|
|
@@ -1438,11 +1443,12 @@ class IgxGridBaseDirective {
|
|
|
1438
1443
|
* If not set, returns browser's language.
|
|
1439
1444
|
*/
|
|
1440
1445
|
get locale() {
|
|
1441
|
-
return this._locale;
|
|
1446
|
+
return this._locale || this._defaultLocale;
|
|
1442
1447
|
}
|
|
1443
1448
|
set locale(value) {
|
|
1444
1449
|
if (value !== this._locale) {
|
|
1445
|
-
this._locale = value;
|
|
1450
|
+
this._locale = this.i18nFormatter.verifyLocale(value);
|
|
1451
|
+
this._defaultResourceStrings = getCurrentResourceStrings(GridResourceStringsEN, false, this._locale);
|
|
1446
1452
|
this._currencyPositionLeft = undefined;
|
|
1447
1453
|
this.summaryService.clearSummaryCache();
|
|
1448
1454
|
this.pipeTrigger++;
|
|
@@ -2186,9 +2192,7 @@ class IgxGridBaseDirective {
|
|
|
2186
2192
|
if (this._currencyPositionLeft !== undefined) {
|
|
2187
2193
|
return this._currencyPositionLeft;
|
|
2188
2194
|
}
|
|
2189
|
-
const
|
|
2190
|
-
const formatParts = format.split(',');
|
|
2191
|
-
const i = formatParts.indexOf(formatParts.find(c => c.includes('¤')));
|
|
2195
|
+
const i = getNumberFormatter().getCurrencyPosition(this.locale);
|
|
2192
2196
|
return this._currencyPositionLeft = i < 1;
|
|
2193
2197
|
}
|
|
2194
2198
|
/**
|
|
@@ -2449,6 +2453,8 @@ class IgxGridBaseDirective {
|
|
|
2449
2453
|
this.localeId = inject(LOCALE_ID);
|
|
2450
2454
|
this.platform = inject(PlatformUtil);
|
|
2451
2455
|
this._diTransactions = inject(IgxGridTransaction, { optional: true });
|
|
2456
|
+
/** @hidden @internal */
|
|
2457
|
+
this.i18nFormatter = inject(I18N_FORMATTER);
|
|
2452
2458
|
/**
|
|
2453
2459
|
* Gets/Sets the display time for the row adding snackbar notification.
|
|
2454
2460
|
*
|
|
@@ -3312,13 +3318,14 @@ class IgxGridBaseDirective {
|
|
|
3312
3318
|
matchCount: 0,
|
|
3313
3319
|
content: ''
|
|
3314
3320
|
};
|
|
3321
|
+
this._resourceStrings = null;
|
|
3315
3322
|
this._rowEditable = false;
|
|
3316
3323
|
this._filteredSortedData = null;
|
|
3317
3324
|
this._filteredData = null;
|
|
3318
3325
|
this._mergedDataInView = null;
|
|
3319
3326
|
this._activeRowIndexes = null;
|
|
3320
3327
|
this._cdrRequests = false;
|
|
3321
|
-
this.
|
|
3328
|
+
this._defaultResourceStrings = getCurrentResourceStrings(GridResourceStringsEN);
|
|
3322
3329
|
this._emptyGridMessage = null;
|
|
3323
3330
|
this._emptyFilteredGridMessage = null;
|
|
3324
3331
|
this._isLoading = false;
|
|
@@ -3413,7 +3420,7 @@ class IgxGridBaseDirective {
|
|
|
3413
3420
|
this.verticalScrollContainer.scrollPrev();
|
|
3414
3421
|
}
|
|
3415
3422
|
};
|
|
3416
|
-
this.
|
|
3423
|
+
this.initLocale();
|
|
3417
3424
|
this._transactions = this.transactionFactory.create("None" /* TRANSACTION_TYPE.None */);
|
|
3418
3425
|
this._transactions.cloneStrategy = this.dataCloneStrategy;
|
|
3419
3426
|
this.cdr.detach();
|
|
@@ -5290,7 +5297,7 @@ class IgxGridBaseDirective {
|
|
|
5290
5297
|
/**
|
|
5291
5298
|
* @hidden @internal
|
|
5292
5299
|
*/
|
|
5293
|
-
getPossibleColumnWidth(baseWidth = null
|
|
5300
|
+
getPossibleColumnWidth(baseWidth = null) {
|
|
5294
5301
|
let computedWidth;
|
|
5295
5302
|
if (baseWidth !== null) {
|
|
5296
5303
|
computedWidth = baseWidth;
|
|
@@ -5333,10 +5340,9 @@ class IgxGridBaseDirective {
|
|
|
5333
5340
|
return '0px';
|
|
5334
5341
|
}
|
|
5335
5342
|
computedWidth -= this.featureColumnsWidth();
|
|
5336
|
-
const minColWidth = minColumnWidth || this.minColumnWidth;
|
|
5337
5343
|
const columnWidth = !Number.isFinite(sumExistingWidths) ?
|
|
5338
|
-
|
|
5339
|
-
|
|
5344
|
+
computedWidth / columnsToSize :
|
|
5345
|
+
(computedWidth - sumExistingWidths) / columnsToSize;
|
|
5340
5346
|
return columnWidth + 'px';
|
|
5341
5347
|
}
|
|
5342
5348
|
/**
|
|
@@ -6341,7 +6347,17 @@ class IgxGridBaseDirective {
|
|
|
6341
6347
|
*/
|
|
6342
6348
|
_derivePossibleWidth() {
|
|
6343
6349
|
if (!this.columnWidthSetByUser) {
|
|
6344
|
-
|
|
6350
|
+
const possibleWidth = this.getPossibleColumnWidth();
|
|
6351
|
+
if (possibleWidth === "0px") {
|
|
6352
|
+
// all columns - hidden
|
|
6353
|
+
this._columnWidth = possibleWidth;
|
|
6354
|
+
}
|
|
6355
|
+
else if (this.width !== null) {
|
|
6356
|
+
this._columnWidth = Math.max(parseFloat(possibleWidth), this.minColumnWidth) + 'px';
|
|
6357
|
+
}
|
|
6358
|
+
else {
|
|
6359
|
+
this._columnWidth = this.minColumnWidth + 'px';
|
|
6360
|
+
}
|
|
6345
6361
|
}
|
|
6346
6362
|
this._columns.forEach((column) => {
|
|
6347
6363
|
if (this.hasColumnLayouts && parseFloat(this._columnWidth)) {
|
|
@@ -6349,39 +6365,12 @@ class IgxGridBaseDirective {
|
|
|
6349
6365
|
column.defaultWidth = columnWidthCombined + 'px';
|
|
6350
6366
|
}
|
|
6351
6367
|
else {
|
|
6352
|
-
|
|
6353
|
-
column.defaultWidth = this.getExtremumBasedColWidth(column);
|
|
6368
|
+
column.defaultWidth = this._columnWidth;
|
|
6354
6369
|
column.resetCaches();
|
|
6355
6370
|
}
|
|
6356
6371
|
});
|
|
6357
6372
|
this.resetCachedWidths();
|
|
6358
6373
|
}
|
|
6359
|
-
/**
|
|
6360
|
-
* @hidden
|
|
6361
|
-
* @internal
|
|
6362
|
-
*/
|
|
6363
|
-
getExtremumBasedColWidth(column) {
|
|
6364
|
-
let width = this._columnWidth;
|
|
6365
|
-
if (width && typeof width !== 'string') {
|
|
6366
|
-
width = String(width);
|
|
6367
|
-
}
|
|
6368
|
-
const minWidth = width.indexOf('%') === -1 ? column.userSetMinWidthPx : column.minWidthPercent;
|
|
6369
|
-
const maxWidth = width.indexOf('%') === -1 ? column.maxWidthPx : column.maxWidthPercent;
|
|
6370
|
-
if (column.hidden) {
|
|
6371
|
-
return width;
|
|
6372
|
-
}
|
|
6373
|
-
if (minWidth > parseFloat(width)) {
|
|
6374
|
-
width = String(column.minWidth);
|
|
6375
|
-
}
|
|
6376
|
-
else if (maxWidth < parseFloat(width)) {
|
|
6377
|
-
width = String(column.maxWidth);
|
|
6378
|
-
}
|
|
6379
|
-
// if no px or % are defined in maxWidth/minWidth consider it px
|
|
6380
|
-
if (width.indexOf('%') === -1 && width.indexOf('px') === -1) {
|
|
6381
|
-
width += 'px';
|
|
6382
|
-
}
|
|
6383
|
-
return width;
|
|
6384
|
-
}
|
|
6385
6374
|
resetNotifyChanges() {
|
|
6386
6375
|
this._cdrRequestRepaint = false;
|
|
6387
6376
|
this._cdrRequests = false;
|
|
@@ -6647,13 +6636,6 @@ class IgxGridBaseDirective {
|
|
|
6647
6636
|
this.calculateGridWidth();
|
|
6648
6637
|
this.cdr.detectChanges();
|
|
6649
6638
|
}
|
|
6650
|
-
// in case horizontal scrollbar has appeared recalc to size correctly.
|
|
6651
|
-
if (hasHScroll !== this.hasHorizontalScroll()) {
|
|
6652
|
-
this.isHorizontalScrollHidden = !this.hasHorizontalScroll();
|
|
6653
|
-
this.cdr.detectChanges();
|
|
6654
|
-
this.calculateGridHeight();
|
|
6655
|
-
this.cdr.detectChanges();
|
|
6656
|
-
}
|
|
6657
6639
|
if (this.zone.isStable) {
|
|
6658
6640
|
this.zone.run(() => {
|
|
6659
6641
|
this._applyWidthHostBinding();
|
|
@@ -6674,6 +6656,16 @@ class IgxGridBaseDirective {
|
|
|
6674
6656
|
this._autoSizeColumnsNotify.next();
|
|
6675
6657
|
});
|
|
6676
6658
|
}
|
|
6659
|
+
// in case horizontal scrollbar has appeared recalc to size correctly.
|
|
6660
|
+
if (hasHScroll !== this.hasHorizontalScroll()) {
|
|
6661
|
+
this.isHorizontalScrollHidden = !this.hasHorizontalScroll();
|
|
6662
|
+
this.cdr.detectChanges();
|
|
6663
|
+
this.calculateGridHeight();
|
|
6664
|
+
this.cdr.detectChanges();
|
|
6665
|
+
}
|
|
6666
|
+
else {
|
|
6667
|
+
this.resetCaches(recalcFeatureWidth);
|
|
6668
|
+
}
|
|
6677
6669
|
}
|
|
6678
6670
|
/**
|
|
6679
6671
|
* @hidden
|
|
@@ -7508,9 +7500,9 @@ class IgxGridBaseDirective {
|
|
|
7508
7500
|
columnItems.forEach((c, cid) => {
|
|
7509
7501
|
const pipeArgs = this.getColumnByName(c.field).pipeArgs;
|
|
7510
7502
|
const value = c.formatter ? c.formatter(resolveNestedPath(currentRowData, columnsPathParts[cid]), currentRowData) :
|
|
7511
|
-
c.dataType === 'number' ? formatNumber(resolveNestedPath(currentRowData, columnsPathParts[cid]), this.locale, pipeArgs.digitsInfo) :
|
|
7503
|
+
c.dataType === 'number' ? this.i18nFormatter.formatNumber(resolveNestedPath(currentRowData, columnsPathParts[cid]), this.locale, pipeArgs.digitsInfo) :
|
|
7512
7504
|
c.dataType === 'date'
|
|
7513
|
-
? formatDate(resolveNestedPath(currentRowData, columnsPathParts[cid]), pipeArgs.format, this.locale, pipeArgs.timezone)
|
|
7505
|
+
? this.i18nFormatter.formatDate(resolveNestedPath(currentRowData, columnsPathParts[cid]), pipeArgs.format, this.locale, pipeArgs.timezone)
|
|
7514
7506
|
: resolveNestedPath(currentRowData, columnsPathParts[cid]);
|
|
7515
7507
|
if (value !== undefined && value !== null && c.searchable) {
|
|
7516
7508
|
let searchValue = caseSensitive ? String(value) : String(value).toLowerCase();
|
|
@@ -7669,6 +7661,23 @@ class IgxGridBaseDirective {
|
|
|
7669
7661
|
this.notifyChanges();
|
|
7670
7662
|
}
|
|
7671
7663
|
}
|
|
7664
|
+
initLocale() {
|
|
7665
|
+
this._defaultLocale = getCurrentI18n();
|
|
7666
|
+
this._locale = this.localeId !== DEFAULT_LOCALE ? this.localeId : this._locale;
|
|
7667
|
+
onResourceChangeHandle(this.destroy$, this.onResourceChange, this);
|
|
7668
|
+
}
|
|
7669
|
+
onResourceChange(args) {
|
|
7670
|
+
this._defaultLocale = args.detail.newLocale;
|
|
7671
|
+
if (!this._locale) {
|
|
7672
|
+
this._defaultResourceStrings = getCurrentResourceStrings(GridResourceStringsEN, false);
|
|
7673
|
+
}
|
|
7674
|
+
// Reset currency position because of new locale.
|
|
7675
|
+
this._currencyPositionLeft = undefined;
|
|
7676
|
+
if (!this._init) {
|
|
7677
|
+
this.pipeTrigger++;
|
|
7678
|
+
this.notifyChanges(true);
|
|
7679
|
+
}
|
|
7680
|
+
}
|
|
7672
7681
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridBaseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
7673
7682
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "21.0.2", type: IgxGridBaseDirective, isStandalone: true, inputs: { snackbarDisplayTime: "snackbarDisplayTime", autoGenerate: ["autoGenerate", "autoGenerate", booleanAttribute], autoGenerateExclude: "autoGenerateExclude", moving: ["moving", "moving", booleanAttribute], emptyGridTemplate: "emptyGridTemplate", addRowEmptyTemplate: "addRowEmptyTemplate", loadingGridTemplate: "loadingGridTemplate", summaryRowHeight: "summaryRowHeight", dataCloneStrategy: "dataCloneStrategy", clipboardOptions: "clipboardOptions", rowClasses: "rowClasses", rowStyles: "rowStyles", primaryKey: "primaryKey", uniqueColumnValuesStrategy: "uniqueColumnValuesStrategy", dragGhostCustomTemplate: "dragGhostCustomTemplate", rowEditTextTemplate: "rowEditTextTemplate", rowAddTextTemplate: "rowAddTextTemplate", rowEditActionsTemplate: "rowEditActionsTemplate", rowExpandedIndicatorTemplate: "rowExpandedIndicatorTemplate", rowCollapsedIndicatorTemplate: "rowCollapsedIndicatorTemplate", headerExpandedIndicatorTemplate: "headerExpandedIndicatorTemplate", headerCollapsedIndicatorTemplate: "headerCollapsedIndicatorTemplate", excelStyleHeaderIconTemplate: "excelStyleHeaderIconTemplate", sortAscendingHeaderIconTemplate: "sortAscendingHeaderIconTemplate", sortDescendingHeaderIconTemplate: "sortDescendingHeaderIconTemplate", sortHeaderIconTemplate: "sortHeaderIconTemplate", resourceStrings: "resourceStrings", filteringLogic: "filteringLogic", filteringExpressionsTree: "filteringExpressionsTree", advancedFilteringExpressionsTree: "advancedFilteringExpressionsTree", locale: "locale", pagingMode: "pagingMode", hideRowSelectors: ["hideRowSelectors", "hideRowSelectors", booleanAttribute], rowDraggable: ["rowDraggable", "rowDraggable", booleanAttribute], validationTrigger: "validationTrigger", rowEditable: ["rowEditable", "rowEditable", booleanAttribute], height: "height", width: "width", rowHeight: "rowHeight", columnWidth: "columnWidth", emptyGridMessage: "emptyGridMessage", isLoading: ["isLoading", "isLoading", booleanAttribute], emptyFilteredGridMessage: "emptyFilteredGridMessage", pinning: "pinning", allowFiltering: ["allowFiltering", "allowFiltering", booleanAttribute], allowAdvancedFiltering: ["allowAdvancedFiltering", "allowAdvancedFiltering", booleanAttribute], filterMode: "filterMode", summaryPosition: "summaryPosition", summaryCalculationMode: "summaryCalculationMode", showSummaryOnCollapse: ["showSummaryOnCollapse", "showSummaryOnCollapse", booleanAttribute], filterStrategy: "filterStrategy", sortStrategy: "sortStrategy", mergeStrategy: "mergeStrategy", sortingOptions: "sortingOptions", selectedRows: "selectedRows", headSelectorTemplate: "headSelectorTemplate", rowSelectorTemplate: "rowSelectorTemplate", dragIndicatorIconTemplate: "dragIndicatorIconTemplate", sortingExpressions: "sortingExpressions", batchEditing: ["batchEditing", "batchEditing", booleanAttribute], cellSelection: "cellSelection", cellMergeMode: "cellMergeMode", rowSelection: "rowSelection", columnSelection: "columnSelection", expansionStates: "expansionStates", outlet: "outlet", totalRecords: "totalRecords", selectRowOnClick: ["selectRowOnClick", "selectRowOnClick", booleanAttribute] }, outputs: { filteringExpressionsTreeChange: "filteringExpressionsTreeChange", advancedFilteringExpressionsTreeChange: "advancedFilteringExpressionsTreeChange", gridScroll: "gridScroll", cellClick: "cellClick", rowClick: "rowClick", formGroupCreated: "formGroupCreated", validationStatusChange: "validationStatusChange", selected: "selected", rowSelectionChanging: "rowSelectionChanging", columnSelectionChanging: "columnSelectionChanging", columnPin: "columnPin", columnPinned: "columnPinned", cellEditEnter: "cellEditEnter", cellEditExit: "cellEditExit", cellEdit: "cellEdit", cellEditDone: "cellEditDone", rowEditEnter: "rowEditEnter", rowEdit: "rowEdit", rowEditDone: "rowEditDone", rowEditExit: "rowEditExit", columnInit: "columnInit", columnsAutogenerated: "columnsAutogenerated", sorting: "sorting", sortingDone: "sortingDone", filtering: "filtering", filteringDone: "filteringDone", rowAdded: "rowAdded", rowDeleted: "rowDeleted", rowDelete: "rowDelete", rowAdd: "rowAdd", columnResized: "columnResized", contextMenu: "contextMenu", doubleClick: "doubleClick", columnVisibilityChanging: "columnVisibilityChanging", columnVisibilityChanged: "columnVisibilityChanged", columnMovingStart: "columnMovingStart", columnMoving: "columnMoving", columnMovingEnd: "columnMovingEnd", gridKeydown: "gridKeydown", rowDragStart: "rowDragStart", rowDragEnd: "rowDragEnd", gridCopy: "gridCopy", expansionStatesChange: "expansionStatesChange", selectedRowsChange: "selectedRowsChange", rowToggle: "rowToggle", rowPinning: "rowPinning", rowPinned: "rowPinned", activeNodeChange: "activeNodeChange", sortingExpressionsChange: "sortingExpressionsChange", toolbarExporting: "toolbarExporting", rangeSelected: "rangeSelected", rendered: "rendered", localeChange: "localeChange", dataChanging: "dataChanging", dataChanged: "dataChanged" }, host: { listeners: { "mouseleave": "hideActionStrip()" }, properties: { "attr.tabindex": "this.tabindex", "attr.role": "this.hostRole", "class.igx-grid": "this.baseClass", "attr.aria-colcount": "this.ariaColCount", "attr.aria-rowcount": "this.ariaRowCount", "style.height": "this.height", "style.width": "this.hostWidth", "style.display": "this.displayStyle", "style.grid-template-rows": "this.templateRows" } }, queries: [{ propertyName: "excelStyleLoadingValuesTemplateDirective", first: true, predicate: IgxExcelStyleLoadingValuesTemplateDirective, descendants: true, read: IgxExcelStyleLoadingValuesTemplateDirective, static: true }, { propertyName: "rowAddText", first: true, predicate: IgxRowAddTextDirective, descendants: true, read: TemplateRef }, { propertyName: "rowExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxRowExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "rowCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxRowCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleHeaderIconDirectiveTemplate", first: true, predicate: IgxExcelStyleHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortAscendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortAscendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortDescendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortDescendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortHeaderIconDirectiveTemplate", first: true, predicate: IgxSortHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "loadingDirectiveTemplate", first: true, predicate: IgxGridLoadingTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "emptyDirectiveTemplate", first: true, predicate: IgxGridEmptyTemplateDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleFilteringComponents", predicate: IgxGridExcelStyleFilteringComponent, read: IgxGridExcelStyleFilteringComponent }, { propertyName: "columnList", predicate: IgxColumnComponent, descendants: true, read: IgxColumnComponent }, { propertyName: "actionStripComponents", predicate: IgxActionStripToken }, { propertyName: "headSelectorsTemplates", predicate: IgxHeadSelectorDirective, read: TemplateRef }, { propertyName: "rowSelectorsTemplates", predicate: IgxRowSelectorDirective, read: TemplateRef }, { propertyName: "dragGhostCustomTemplates", predicate: IgxRowDragGhostDirective, read: TemplateRef }, { propertyName: "rowEditCustomDirectives", predicate: IgxRowEditTemplateDirective, read: TemplateRef }, { propertyName: "rowEditTextDirectives", predicate: IgxRowEditTextDirective, read: TemplateRef }, { propertyName: "rowEditActionsDirectives", predicate: IgxRowEditActionsDirective, read: TemplateRef }, { propertyName: "dragIndicatorIconTemplates", predicate: IgxDragIndicatorIconDirective, read: TemplateRef }, { propertyName: "rowEditTabsCUSTOM", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "toolbar", predicate: IgxToolbarToken }, { propertyName: "paginationComponents", predicate: IgxPaginatorToken }], viewQueries: [{ propertyName: "addRowSnackbar", first: true, predicate: IgxSnackbarComponent, descendants: true }, { propertyName: "resizeLine", first: true, predicate: IgxGridColumnResizerComponent, descendants: true }, { propertyName: "loadingOverlay", first: true, predicate: ["loadingOverlay"], descendants: true, read: IgxToggleDirective, static: true }, { propertyName: "loadingOutlet", first: true, predicate: ["igxLoadingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "emptyFilteredGridTemplate", first: true, predicate: ["emptyFilteredGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyGridDefaultTemplate", first: true, predicate: ["defaultEmptyGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "loadingGridDefaultTemplate", first: true, predicate: ["defaultLoadingGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "parentVirtDir", first: true, predicate: ["scrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScrollContainer", first: true, predicate: ["verticalScrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScroll", first: true, predicate: ["verticalScrollHolder"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "scr", first: true, predicate: ["scr"], descendants: true, read: ElementRef, static: true }, { propertyName: "headerSelectorBaseTemplate", first: true, predicate: ["headSelectorBaseTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true, read: ElementRef }, { propertyName: "theadRow", first: true, predicate: IgxGridHeaderRowComponent, descendants: true, static: true }, { propertyName: "groupArea", first: true, predicate: IgxGridGroupByAreaComponent, descendants: true }, { propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true, static: true }, { propertyName: "tbodyContainer", first: true, predicate: IgxGridBodyDirective, descendants: true, read: ElementRef, static: true }, { propertyName: "pinContainer", first: true, predicate: ["pinContainer"], descendants: true, read: ElementRef }, { propertyName: "tfoot", first: true, predicate: ["tfoot"], descendants: true, static: true }, { propertyName: "rowEditingOutletDirective", first: true, predicate: ["igxRowEditingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "dragIndicatorIconBase", first: true, predicate: ["dragIndicatorIconBase"], descendants: true, read: TemplateRef, static: true }, { propertyName: "rowEditingOverlay", first: true, predicate: ["rowEditingOverlay"], descendants: true, read: IgxToggleDirective }, { propertyName: "_outletDirective", first: true, predicate: ["igxFilteringOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "anchor", first: true, predicate: ["sink"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "defaultExpandedTemplate", first: true, predicate: ["defaultExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCollapsedTemplate", first: true, predicate: ["defaultCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultESFHeaderIconTemplate", first: true, predicate: ["defaultESFHeaderIcon"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultRowEditTemplate", first: true, predicate: ["defaultRowEditTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "tmpOutlets", predicate: IgxTemplateOutletDirective, descendants: true, read: IgxTemplateOutletDirective }, { propertyName: "rowEditTabsDEFAULT", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "_summaryRowList", predicate: ["summaryRow"], descendants: true, read: IgxSummaryRowComponent }, { propertyName: "_rowList", predicate: ["row"], descendants: true }, { propertyName: "_pinnedRowList", predicate: ["pinnedRow"], descendants: true }, { propertyName: "_dataRowList", predicate: IgxRowDirective, descendants: true, read: IgxRowDirective }], ngImport: i0 }); }
|
|
7674
7683
|
}
|