igniteui-angular 21.0.3 → 21.1.0-alpha.1
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
|
@@ -8,9 +8,9 @@ import { IgxButtonDirective, IgxRippleDirective, IgxGridForOfDirective, IgxDragD
|
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
9
9
|
import { Subject, fromEvent, interval, animationFrameScheduler } from 'rxjs';
|
|
10
10
|
import { mergeWith, isEqual as isEqual$1 } from 'lodash-es';
|
|
11
|
-
import { IgxSorting, DataUtil, FilteringExpressionsTree, FilteringLogic, GridColumnDataType, PlatformUtil, isDate, isEqual, DateTimeUtil, copyDescriptors, trackByIdentity, TransactionType, resolveNestedPath, columnFieldPath, DefaultSortingStrategy, isConstructor, ɵSize as _Size, ColumnPinningPosition, ExpressionsTreeUtil, IgxStringFilteringOperand, IgxDateTimeFilteringOperand, IgxTimeFilteringOperand, IgxDateFilteringOperand, IgxNumberFilteringOperand, IgxBooleanFilteringOperand, flatten, GridResourceStringsEN, getCurrentResourceStrings, QueryBuilderResourceStringsEN, AbsoluteScrollStrategy, ConnectedPositioningStrategy, IgxOverlayOutletDirective, IgxPickerToggleComponent, IgxPickerClearComponent, isTree, IgxOverlayService, VerticalAlignment, HorizontalAlignment, AutoPositionStrategy, cloneHierarchicalArray, SortingDirection, showMessage, IgxActionStripActionsToken,
|
|
11
|
+
import { IgxSorting, DataUtil, FilteringExpressionsTree, FilteringLogic, GridColumnDataType, PlatformUtil, isDate, isEqual, DateTimeUtil, copyDescriptors, trackByIdentity, TransactionType, resolveNestedPath, columnFieldPath, DefaultSortingStrategy, isConstructor, ɵSize as _Size, ColumnPinningPosition, ExpressionsTreeUtil, IgxStringFilteringOperand, IgxDateTimeFilteringOperand, IgxTimeFilteringOperand, IgxDateFilteringOperand, IgxNumberFilteringOperand, IgxBooleanFilteringOperand, flatten, onResourceChangeHandle, GridResourceStringsEN, getCurrentResourceStrings, QueryBuilderResourceStringsEN, AbsoluteScrollStrategy, ConnectedPositioningStrategy, IgxOverlayOutletDirective, I18N_FORMATTER, IgxPickerToggleComponent, IgxPickerClearComponent, isTree, IgxOverlayService, VerticalAlignment, HorizontalAlignment, AutoPositionStrategy, cloneHierarchicalArray, SortingDirection, showMessage, IgxActionStripActionsToken, GridSummaryCalculationMode, cloneArray, cloneValue, recreateTreeFromFields, yieldingLoop, FilterUtil, TreeGridFilteringStrategy, getHierarchy, isHierarchyMatch, FilteringStrategy, NAVIGATION_KEYS, SUPPORTED_KEYS, HEADER_KEYS, HORIZONTAL_NAV_KEYS, ROW_EXPAND_KEYS, ROW_COLLAPSE_KEYS, ROW_ADD_KEYS, HammerGesturesManager, IgxNumberFormatterPipe, IgxPercentFormatterPipe, IgxCurrencyFormatterPipe, IgxDateFormatterPipe, reverseMapper, mergeObjects } from 'igniteui-angular/core';
|
|
12
12
|
import { first as first$1, takeUntil, map, debounceTime, filter, switchMap, throttle, throttleTime, takeWhile } from 'rxjs/operators';
|
|
13
|
-
import { NgClass,
|
|
13
|
+
import { NgClass, NgTemplateOutlet, NgStyle, getLocaleDateFormat, FormatWidth, getLocaleDateTimeFormat, AsyncPipe } from '@angular/common';
|
|
14
14
|
import { IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent } from 'igniteui-angular/query-builder';
|
|
15
15
|
import { IgxIconComponent, IgxIconService } from 'igniteui-angular/icon';
|
|
16
16
|
import { IgxSelectComponent, IgxSelectItemComponent } from 'igniteui-angular/select';
|
|
@@ -26,6 +26,7 @@ import { IgxChipComponent, IgxChipsAreaComponent } from 'igniteui-angular/chips'
|
|
|
26
26
|
import { useAnimation } from '@angular/animations';
|
|
27
27
|
import { fadeIn, scaleInVerBottom, scaleInVerTop, fadeOut, scaleInCenter } from 'igniteui-angular/animations';
|
|
28
28
|
import { IgxBadgeComponent } from 'igniteui-angular/badge';
|
|
29
|
+
import { getDateFormatter } from 'igniteui-i18n-core';
|
|
29
30
|
import { strToU8, zip } from 'fflate';
|
|
30
31
|
|
|
31
32
|
/**
|
|
@@ -6458,14 +6459,17 @@ class IgxColumnComponent {
|
|
|
6458
6459
|
* @internal
|
|
6459
6460
|
*/
|
|
6460
6461
|
getConstrainedSizePx(newSize) {
|
|
6461
|
-
if (this.maxWidth && newSize
|
|
6462
|
+
if (this.maxWidth && newSize >= this.maxWidthPx) {
|
|
6462
6463
|
this.widthConstrained = true;
|
|
6463
6464
|
return this.maxWidthPx;
|
|
6464
6465
|
}
|
|
6465
|
-
else if (this.minWidth && newSize
|
|
6466
|
+
else if (this.minWidth && newSize <= this.userSetMinWidthPx) {
|
|
6466
6467
|
this.widthConstrained = true;
|
|
6467
6468
|
return this.userSetMinWidthPx;
|
|
6468
6469
|
}
|
|
6470
|
+
else if (!this.minWidth && (!this.widthSetByUser || this.width === 'fit-content') && !this.grid.columnWidthSetByUser && (!newSize || newSize <= this.grid.minColumnWidth)) {
|
|
6471
|
+
return this.grid.minColumnWidth;
|
|
6472
|
+
}
|
|
6469
6473
|
else {
|
|
6470
6474
|
this.widthConstrained = false;
|
|
6471
6475
|
return newSize;
|
|
@@ -6489,12 +6493,12 @@ class IgxColumnComponent {
|
|
|
6489
6493
|
else if (!colWidth || isAutoWidth && !this.autoSize) {
|
|
6490
6494
|
// no width
|
|
6491
6495
|
const currentCalcWidth = this.defaultWidth || this.grid.getPossibleColumnWidth();
|
|
6492
|
-
this._calcWidth = this.getConstrainedSizePx(currentCalcWidth);
|
|
6496
|
+
this._calcWidth = this.getConstrainedSizePx(parseFloat(currentCalcWidth));
|
|
6493
6497
|
}
|
|
6494
6498
|
else {
|
|
6495
6499
|
let possibleColumnWidth = '';
|
|
6496
6500
|
if (!this.widthSetByUser && this.userSetMinWidthPx && this.userSetMinWidthPx < this.grid.minColumnWidth) {
|
|
6497
|
-
possibleColumnWidth = this.defaultWidth = this.grid.getPossibleColumnWidth(
|
|
6501
|
+
possibleColumnWidth = this.defaultWidth = this.grid.getPossibleColumnWidth();
|
|
6498
6502
|
}
|
|
6499
6503
|
else {
|
|
6500
6504
|
possibleColumnWidth = this.width;
|
|
@@ -7487,6 +7491,9 @@ class IgxAdvancedFilteringDialogComponent {
|
|
|
7487
7491
|
*/
|
|
7488
7492
|
this.lastActiveNode = {};
|
|
7489
7493
|
this.destroy$ = new Subject();
|
|
7494
|
+
onResourceChangeHandle(this.destroy$, () => {
|
|
7495
|
+
this.assignResourceStrings(false);
|
|
7496
|
+
}, this);
|
|
7490
7497
|
}
|
|
7491
7498
|
/**
|
|
7492
7499
|
* @hidden @internal
|
|
@@ -7630,12 +7637,12 @@ class IgxAdvancedFilteringDialogComponent {
|
|
|
7630
7637
|
return entities;
|
|
7631
7638
|
}
|
|
7632
7639
|
}
|
|
7633
|
-
assignResourceStrings() {
|
|
7640
|
+
assignResourceStrings(init = true) {
|
|
7634
7641
|
// If grid has custom resource strings set for the advanced filtering,
|
|
7635
7642
|
// they are passed to the query builder resource strings.
|
|
7636
7643
|
const gridRS = this.grid.resourceStrings;
|
|
7637
7644
|
if (gridRS !== GridResourceStringsEN) {
|
|
7638
|
-
const queryBuilderRS = getCurrentResourceStrings(QueryBuilderResourceStringsEN);
|
|
7645
|
+
const queryBuilderRS = getCurrentResourceStrings(QueryBuilderResourceStringsEN, init);
|
|
7639
7646
|
Object.keys(gridRS).forEach((prop) => {
|
|
7640
7647
|
const reg = /^igx_grid_(advanced_)?filter_(row_)?/;
|
|
7641
7648
|
if (!reg.test(prop)) {
|
|
@@ -7651,15 +7658,16 @@ class IgxAdvancedFilteringDialogComponent {
|
|
|
7651
7658
|
queryBuilderRS[generalProp] = gridRS[prop];
|
|
7652
7659
|
}
|
|
7653
7660
|
});
|
|
7661
|
+
this.queryBuilderResourceStrings = queryBuilderRS;
|
|
7654
7662
|
}
|
|
7655
7663
|
}
|
|
7656
7664
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxAdvancedFilteringDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7657
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxAdvancedFilteringDialogComponent, isStandalone: true, selector: "igx-advanced-filtering-dialog", inputs: { grid: "grid" }, host: { properties: { "style.display": "this.display" } }, viewQueries: [{ propertyName: "queryBuilder", first: true, predicate: ["queryBuilder"], descendants: true, read: IgxQueryBuilderComponent }], ngImport: i0, template: "@if (grid) {\n <article class=\"igx-advanced-filter\" igxDrag [ghost]=\"false\" [dragTolerance]=\"0\"\n (dragStart)=\"dragStart($event)\" (dragMove)=\"onDragMove($event)\" (keydown)=\"onKeyDown($event)\"\n [ngClass]=\"{\n 'igx-advanced-filter': true,\n 'igx-advanced-filter--inline': inline\n }\">\n <igx-query-builder #queryBuilder\n [locale]=\"grid.locale\"\n [entities]=\"generateEntity()\"\n [expressionTree]=\"this.grid.advancedFilteringExpressionsTree\">\n <igx-query-builder-header\n [title]=\"grid.resourceStrings.igx_grid_advanced_filter_title\"\n igxDragHandle>\n </igx-query-builder-header>\n </igx-query-builder>\n\n <footer class=\"igx-excel-filter__secondary-footer\">\n <div class=\"igx-excel-filter__clear\">\n <button igxButton=\"flat\" type=\"button\"\n (click)=\"onClearButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\n </button>\n </div>\n <div class=\"igx-excel-filter__cancel\">\n <button igxButton=\"outlined\" type=\"button\" (click)=\"cancelChanges()\">\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\n </button>\n </div>\n <div class=\"igx-excel-filter__apply\">\n <button igxButton=\"contained\" type=\"button\"\n (click)=\"onApplyButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_apply }}\n </button>\n </div>\n </footer>\n </article>\n}\n", dependencies: [{ kind: "directive", type: IgxDragDirective, selector: "[igxDrag]", inputs: ["igxDrag", "dragTolerance", "dragDirection", "dragChannel", "ghost", "ghostClass", "ghostStyle", "ghostTemplate", "ghostHost", "scrollContainer", "ghostOffsetX", "ghostOffsetY"], outputs: ["dragStart", "dragMove", "dragEnd", "dragClick", "ghostCreate", "ghostDestroy", "transitioned"], exportAs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IgxQueryBuilderComponent, selector: "igx-query-builder", inputs: ["showEntityChangeDialog", "entities", "fields", "expressionTree", "locale", "resourceStrings", "disableEntityChange", "disableReturnFieldsChange"], outputs: ["expressionTreeChange"] }, { kind: "component", type: IgxQueryBuilderHeaderComponent, selector: "igx-query-builder-header", inputs: ["title", "showLegend", "resourceStrings"] }, { kind: "directive", type: IgxDragHandleDirective, selector: "[igxDragHandle]" }, { kind: "directive", type: IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxLabel"], outputs: ["buttonSelected"] }] }); }
|
|
7665
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxAdvancedFilteringDialogComponent, isStandalone: true, selector: "igx-advanced-filtering-dialog", inputs: { grid: "grid" }, host: { properties: { "style.display": "this.display" } }, viewQueries: [{ propertyName: "queryBuilder", first: true, predicate: ["queryBuilder"], descendants: true, read: IgxQueryBuilderComponent }], ngImport: i0, template: "@if (grid) {\n <article class=\"igx-advanced-filter\" igxDrag [ghost]=\"false\" [dragTolerance]=\"0\"\n (dragStart)=\"dragStart($event)\" (dragMove)=\"onDragMove($event)\" (keydown)=\"onKeyDown($event)\"\n [ngClass]=\"{\n 'igx-advanced-filter': true,\n 'igx-advanced-filter--inline': inline\n }\">\n <igx-query-builder #queryBuilder\n [locale]=\"grid.locale\"\n [entities]=\"generateEntity()\"\n [resourceStrings]=\"queryBuilderResourceStrings\"\n [expressionTree]=\"this.grid.advancedFilteringExpressionsTree\">\n <igx-query-builder-header\n [title]=\"grid.resourceStrings.igx_grid_advanced_filter_title\"\n igxDragHandle>\n </igx-query-builder-header>\n </igx-query-builder>\n\n <footer class=\"igx-excel-filter__secondary-footer\">\n <div class=\"igx-excel-filter__clear\">\n <button igxButton=\"flat\" type=\"button\"\n (click)=\"onClearButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\n </button>\n </div>\n <div class=\"igx-excel-filter__cancel\">\n <button igxButton=\"outlined\" type=\"button\" (click)=\"cancelChanges()\">\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\n </button>\n </div>\n <div class=\"igx-excel-filter__apply\">\n <button igxButton=\"contained\" type=\"button\"\n (click)=\"onApplyButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_apply }}\n </button>\n </div>\n </footer>\n </article>\n}\n", dependencies: [{ kind: "directive", type: IgxDragDirective, selector: "[igxDrag]", inputs: ["igxDrag", "dragTolerance", "dragDirection", "dragChannel", "ghost", "ghostClass", "ghostStyle", "ghostTemplate", "ghostHost", "scrollContainer", "ghostOffsetX", "ghostOffsetY"], outputs: ["dragStart", "dragMove", "dragEnd", "dragClick", "ghostCreate", "ghostDestroy", "transitioned"], exportAs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: IgxQueryBuilderComponent, selector: "igx-query-builder", inputs: ["showEntityChangeDialog", "entities", "fields", "expressionTree", "locale", "resourceStrings", "disableEntityChange", "disableReturnFieldsChange"], outputs: ["expressionTreeChange"] }, { kind: "component", type: IgxQueryBuilderHeaderComponent, selector: "igx-query-builder-header", inputs: ["title", "showLegend", "resourceStrings"] }, { kind: "directive", type: IgxDragHandleDirective, selector: "[igxDragHandle]" }, { kind: "directive", type: IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxLabel"], outputs: ["buttonSelected"] }] }); }
|
|
7658
7666
|
}
|
|
7659
7667
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxAdvancedFilteringDialogComponent, decorators: [{
|
|
7660
7668
|
type: Component,
|
|
7661
|
-
args: [{ selector: 'igx-advanced-filtering-dialog', imports: [IgxDragDirective, NgClass, IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent, IgxDragHandleDirective, IgxButtonDirective], template: "@if (grid) {\n <article class=\"igx-advanced-filter\" igxDrag [ghost]=\"false\" [dragTolerance]=\"0\"\n (dragStart)=\"dragStart($event)\" (dragMove)=\"onDragMove($event)\" (keydown)=\"onKeyDown($event)\"\n [ngClass]=\"{\n 'igx-advanced-filter': true,\n 'igx-advanced-filter--inline': inline\n }\">\n <igx-query-builder #queryBuilder\n [locale]=\"grid.locale\"\n [entities]=\"generateEntity()\"\n [expressionTree]=\"this.grid.advancedFilteringExpressionsTree\">\n <igx-query-builder-header\n [title]=\"grid.resourceStrings.igx_grid_advanced_filter_title\"\n igxDragHandle>\n </igx-query-builder-header>\n </igx-query-builder>\n\n <footer class=\"igx-excel-filter__secondary-footer\">\n <div class=\"igx-excel-filter__clear\">\n <button igxButton=\"flat\" type=\"button\"\n (click)=\"onClearButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\n </button>\n </div>\n <div class=\"igx-excel-filter__cancel\">\n <button igxButton=\"outlined\" type=\"button\" (click)=\"cancelChanges()\">\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\n </button>\n </div>\n <div class=\"igx-excel-filter__apply\">\n <button igxButton=\"contained\" type=\"button\"\n (click)=\"onApplyButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_apply }}\n </button>\n </div>\n </footer>\n </article>\n}\n" }]
|
|
7662
|
-
}], propDecorators: { queryBuilder: [{
|
|
7669
|
+
args: [{ selector: 'igx-advanced-filtering-dialog', imports: [IgxDragDirective, NgClass, IgxQueryBuilderComponent, IgxQueryBuilderHeaderComponent, IgxDragHandleDirective, IgxButtonDirective], template: "@if (grid) {\n <article class=\"igx-advanced-filter\" igxDrag [ghost]=\"false\" [dragTolerance]=\"0\"\n (dragStart)=\"dragStart($event)\" (dragMove)=\"onDragMove($event)\" (keydown)=\"onKeyDown($event)\"\n [ngClass]=\"{\n 'igx-advanced-filter': true,\n 'igx-advanced-filter--inline': inline\n }\">\n <igx-query-builder #queryBuilder\n [locale]=\"grid.locale\"\n [entities]=\"generateEntity()\"\n [resourceStrings]=\"queryBuilderResourceStrings\"\n [expressionTree]=\"this.grid.advancedFilteringExpressionsTree\">\n <igx-query-builder-header\n [title]=\"grid.resourceStrings.igx_grid_advanced_filter_title\"\n igxDragHandle>\n </igx-query-builder-header>\n </igx-query-builder>\n\n <footer class=\"igx-excel-filter__secondary-footer\">\n <div class=\"igx-excel-filter__clear\">\n <button igxButton=\"flat\" type=\"button\"\n (click)=\"onClearButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_custom_dialog_clear }}\n </button>\n </div>\n <div class=\"igx-excel-filter__cancel\">\n <button igxButton=\"outlined\" type=\"button\" (click)=\"cancelChanges()\">\n {{ grid.resourceStrings.igx_grid_excel_cancel }}\n </button>\n </div>\n <div class=\"igx-excel-filter__apply\">\n <button igxButton=\"contained\" type=\"button\"\n (click)=\"onApplyButtonClick($event)\">\n {{ grid.resourceStrings.igx_grid_excel_apply }}\n </button>\n </div>\n </footer>\n </article>\n}\n" }]
|
|
7670
|
+
}], ctorParameters: () => [], propDecorators: { queryBuilder: [{
|
|
7663
7671
|
type: ViewChild,
|
|
7664
7672
|
args: ['queryBuilder', { read: IgxQueryBuilderComponent }]
|
|
7665
7673
|
}], display: [{
|
|
@@ -7878,6 +7886,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
7878
7886
|
* @hidden
|
|
7879
7887
|
*/
|
|
7880
7888
|
class IgxExcelStyleDateExpressionComponent extends IgxExcelStyleDefaultExpressionComponent {
|
|
7889
|
+
constructor() {
|
|
7890
|
+
super(...arguments);
|
|
7891
|
+
this.i18nFormatter = inject(I18N_FORMATTER);
|
|
7892
|
+
}
|
|
7881
7893
|
get searchVal() {
|
|
7882
7894
|
return this.expressionUI.expression.searchVal;
|
|
7883
7895
|
}
|
|
@@ -7894,7 +7906,7 @@ class IgxExcelStyleDateExpressionComponent extends IgxExcelStyleDefaultExpressio
|
|
|
7894
7906
|
return this.grid.resourceStrings['igx_grid_filter_row_time_placeholder'];
|
|
7895
7907
|
}
|
|
7896
7908
|
get weekStart() {
|
|
7897
|
-
return getLocaleFirstDayOfWeek(this.grid.locale);
|
|
7909
|
+
return this.i18nFormatter.getLocaleFirstDayOfWeek(this.grid.locale);
|
|
7898
7910
|
}
|
|
7899
7911
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxExcelStyleDateExpressionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
7900
7912
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxExcelStyleDateExpressionComponent, isStandalone: true, selector: "igx-excel-style-date-expression", inputs: { searchVal: "searchVal" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, read: IgxInputDirective }, { propertyName: "picker", first: true, predicate: ["picker"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<igx-select #dropdownConditions\n type=\"box\"\n [placeholder]=\"conditionsPlaceholder\"\n (selectionChanging)=\"onConditionsChanged($event)\"\n [overlaySettings]=\"dropDownOverlaySettings\">\n <igx-prefix>\n @if (expressionUI.expression.condition) {\n <igx-icon family=\"default\" [name]=\"getIconName()\"></igx-icon>\n }\n @if (!expressionUI.expression.condition) {\n <igx-icon family=\"default\" name=\"filter_list\"></igx-icon>\n }\n </igx-prefix>\n @for (condition of conditions; track condition) {\n <igx-select-item [value]=\"condition\" [text]=\"getConditionFriendlyName(condition)\" [selected]=\"isConditionSelected(condition)\">\n <igx-icon family=\"default\" [name]=\"getCondition(condition).iconName\"></igx-icon>\n <span>{{translateCondition(condition)}}</span>\n </igx-select-item>\n }\n</igx-select>\n\n@if (column.dataType === 'date') {\n <igx-date-picker #picker\n [weekStart]=\"column.pipeArgs.weekStart ?? weekStart\"\n [(value)]=\"searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n (click)=\"picker.open()\"\n [placeholder]=\"inputDatePlaceholder\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\"\n >\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n </igx-date-picker>\n}\n\n@if (column.dataType === 'time') {\n <igx-time-picker #picker\n [(ngModel)]=\"searchVal\"\n [locale]=\"grid.locale\"\n [outlet]=\"grid.outlet\"\n (click)=\"picker.open()\"\n [placeholder]=\"inputTimePlaceholder\"\n [displayFormat]=\"column.pipeArgs.format\"\n [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [formatter]=\"column.formatter\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"\n type=\"box\"\n >\n <!-- disable default icons -->\n <igx-picker-toggle></igx-picker-toggle>\n <igx-picker-clear></igx-picker-clear>\n </igx-time-picker>\n}\n\n@if (column.dataType === 'dateTime') {\n <igx-input-group #dropDownTarget #inputGroup type=\"box\">\n <input #input igxInput tabindex=\"0\"\n [placeholder]=\"inputDatePlaceholder\"\n [locale]=\"column.grid.locale\"\n [igxDateTimeEditor]=\"column.editorOptions?.dateTimeFormat\"\n [defaultFormatType]=\"column.dataType\"\n [displayFormat]=\"column.pipeArgs.format\"\n [(ngModel)]=\"searchVal\"\n [disabled]=\"expressionUI.expression.condition && expressionUI.expression.condition.isUnary\"/>\n </igx-input-group>\n}\n\n@if (!isSingle) {\n <button type=\"button\" (click)=\"onRemoveButtonClick()\" igxIconButton=\"flat\" >\n <igx-icon family=\"default\" name=\"remove\"></igx-icon>\n </button>\n}\n\n@if (!isLast) {\n <igx-buttongroup #logicOperatorButtonGroup>\n <span igxButton\n #andButton\n (keydown)=\"onLogicOperatorKeyDown($event, 0)\"\n tabindex=\"0\"\n [selected]=\"expressionUI.afterOperator === 0\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 0)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_and }}\n </span>\n <span igxButton\n #orButton\n tabindex=\"0\"\n (keydown)=\"onLogicOperatorKeyDown($event, 1)\"\n [selected]=\"expressionUI.afterOperator === 1\"\n type=\"button\"\n (click)=\"onLogicOperatorButtonClicked($event, 1)\">\n {{ grid.resourceStrings.igx_grid_filter_operator_or }}\n </span>\n </igx-buttongroup>\n}\n\n<div #overlayOutlet\n igxOverlayOutlet\n (pointerdown)=\"onOutletPointerDown($event)\">\n</div>\n", dependencies: [{ kind: "component", type: IgxSelectComponent, selector: "igx-select", inputs: ["placeholder", "disabled", "overlaySettings", "value", "type"], outputs: ["opening", "opened", "closing", "closed"] }, { kind: "directive", type: IgxPrefixDirective, selector: "igx-prefix,[igxPrefix],[igxStart]" }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["ariaHidden", "family", "name", "active"] }, { kind: "component", type: IgxSelectItemComponent, selector: "igx-select-item", inputs: ["text"] }, { 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: IgxPickerToggleComponent, selector: "igx-picker-toggle", outputs: ["clicked"] }, { kind: "component", type: IgxPickerClearComponent, selector: "igx-picker-clear" }, { 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: "component", type: IgxInputGroupComponent, selector: "igx-input-group", inputs: ["resourceStrings", "suppressInputAutofocus", "type", "theme"] }, { 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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: IgxInputDirective, selector: "[igxInput]", inputs: ["value", "disabled", "required"], exportAs: ["igxInput"] }, { kind: "directive", type: IgxDateTimeEditorDirective, selector: "[igxDateTimeEditor]", inputs: ["locale", "minValue", "maxValue", "spinLoop", "displayFormat", "igxDateTimeEditor", "value", "defaultFormatType", "spinDelta"], outputs: ["valueChange", "validationFailed"], exportAs: ["igxDateTimeEditor"] }, { kind: "directive", type: IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxLabel"], outputs: ["buttonSelected"] }, { kind: "component", type: IgxButtonGroupComponent, selector: "igx-buttongroup", inputs: ["id", "itemContentCssClass", "multiSelection", "selectionMode", "values", "disabled", "alignment"], outputs: ["selected", "deselected"] }, { kind: "directive", type: IgxOverlayOutletDirective, selector: "[igxOverlayOutlet]", exportAs: ["overlay-outlet"] }, { kind: "directive", type: IgxIconButtonDirective, selector: "[igxIconButton]", inputs: ["igxIconButton"] }] }); }
|
|
@@ -9917,17 +9929,20 @@ class IgxGridExcelStyleFilteringComponent extends BaseFilteringComponent {
|
|
|
9917
9929
|
}
|
|
9918
9930
|
const { display, format, digitsInfo, currencyCode, timezone } = this.column.pipeArgs;
|
|
9919
9931
|
const locale = this.grid.locale;
|
|
9932
|
+
const i18nFormatter = this.grid.i18nFormatter;
|
|
9920
9933
|
switch (this.column.dataType) {
|
|
9921
9934
|
case GridColumnDataType.Date:
|
|
9922
9935
|
case GridColumnDataType.DateTime:
|
|
9923
9936
|
case GridColumnDataType.Time:
|
|
9924
|
-
return formatDate(value, format, locale, timezone);
|
|
9925
|
-
case GridColumnDataType.Currency:
|
|
9926
|
-
|
|
9937
|
+
return i18nFormatter.formatDate(value, format, locale, timezone);
|
|
9938
|
+
case GridColumnDataType.Currency: {
|
|
9939
|
+
const currencyCodeFinal = i18nFormatter.getCurrencyCode(locale, currencyCode);
|
|
9940
|
+
return i18nFormatter.formatCurrency(value, locale, display, currencyCodeFinal, digitsInfo);
|
|
9941
|
+
}
|
|
9927
9942
|
case GridColumnDataType.Number:
|
|
9928
|
-
return formatNumber(value, locale, digitsInfo);
|
|
9943
|
+
return i18nFormatter.formatNumber(value, locale, digitsInfo);
|
|
9929
9944
|
case GridColumnDataType.Percent:
|
|
9930
|
-
return formatPercent(value, locale, digitsInfo);
|
|
9945
|
+
return i18nFormatter.formatPercent(value, locale, digitsInfo);
|
|
9931
9946
|
default:
|
|
9932
9947
|
return value;
|
|
9933
9948
|
}
|
|
@@ -11981,7 +11996,7 @@ class IgxFilteringService {
|
|
|
11981
11996
|
return formatter(expression.searchVal, undefined);
|
|
11982
11997
|
}
|
|
11983
11998
|
const pipeArgs = column.pipeArgs;
|
|
11984
|
-
return formatDate
|
|
11999
|
+
return this.grid.i18nFormatter.formatDate(expression.searchVal, pipeArgs.format, this.grid.locale);
|
|
11985
12000
|
}
|
|
11986
12001
|
else {
|
|
11987
12002
|
return expression.searchVal;
|
|
@@ -15374,7 +15389,7 @@ class IgxPivotDateDimension {
|
|
|
15374
15389
|
this._resourceStrings = Object.assign({}, this._resourceStrings, value);
|
|
15375
15390
|
}
|
|
15376
15391
|
get resourceStrings() {
|
|
15377
|
-
return this._resourceStrings;
|
|
15392
|
+
return this._resourceStrings || getCurrentResourceStrings(GridResourceStringsEN, false);
|
|
15378
15393
|
}
|
|
15379
15394
|
/**
|
|
15380
15395
|
* Gets/Sets the base dimension that is used by this class to determine the other dimensions and their values.
|
|
@@ -15423,9 +15438,8 @@ class IgxPivotDateDimension {
|
|
|
15423
15438
|
};
|
|
15424
15439
|
/** @hidden @internal */
|
|
15425
15440
|
this.memberName = 'AllPeriods';
|
|
15426
|
-
this._resourceStrings =
|
|
15441
|
+
this._resourceStrings = null;
|
|
15427
15442
|
this._options = {};
|
|
15428
|
-
this._monthIntl = new Intl.DateTimeFormat('default', { month: 'long' });
|
|
15429
15443
|
/** @hidden @internal */
|
|
15430
15444
|
this.memberFunction = (_data) => this.resourceStrings.igx_grid_pivot_date_dimension_total;
|
|
15431
15445
|
this._baseDimension = inBaseDimension;
|
|
@@ -15445,7 +15459,8 @@ class IgxPivotDateDimension {
|
|
|
15445
15459
|
memberName: 'Months',
|
|
15446
15460
|
memberFunction: (rec) => {
|
|
15447
15461
|
const recordValue = PivotUtil.extractValueFromDimension(inBaseDimension, rec);
|
|
15448
|
-
|
|
15462
|
+
const dateValue = recordValue ? getDateFormatter().createDateFromValue(recordValue) : null;
|
|
15463
|
+
return recordValue ? getDateFormatter().formatDateTime(dateValue, undefined, { month: 'long' }) : rec['Months'];
|
|
15449
15464
|
},
|
|
15450
15465
|
enabled: true,
|
|
15451
15466
|
childLevel: baseDimension
|
|
@@ -15455,7 +15470,8 @@ class IgxPivotDateDimension {
|
|
|
15455
15470
|
memberName: 'Quarters',
|
|
15456
15471
|
memberFunction: (rec) => {
|
|
15457
15472
|
const recordValue = PivotUtil.extractValueFromDimension(inBaseDimension, rec);
|
|
15458
|
-
|
|
15473
|
+
const dateValue = recordValue ? getDateFormatter().createDateFromValue(recordValue) : null;
|
|
15474
|
+
return recordValue ? `Q` + Math.ceil((dateValue.getMonth() + 1) / 3) : rec['Quarters'];
|
|
15459
15475
|
},
|
|
15460
15476
|
enabled: true,
|
|
15461
15477
|
childLevel: monthDimension
|
|
@@ -15465,7 +15481,8 @@ class IgxPivotDateDimension {
|
|
|
15465
15481
|
memberName: 'Years',
|
|
15466
15482
|
memberFunction: (rec) => {
|
|
15467
15483
|
const recordValue = PivotUtil.extractValueFromDimension(inBaseDimension, rec);
|
|
15468
|
-
|
|
15484
|
+
const dateValue = recordValue ? getDateFormatter().createDateFromValue(recordValue) : null;
|
|
15485
|
+
return recordValue ? dateValue.getFullYear().toString() : rec['Years'];
|
|
15469
15486
|
},
|
|
15470
15487
|
enabled: true,
|
|
15471
15488
|
childLevel: quarterDimension
|
|
@@ -17279,6 +17296,7 @@ class IgxBaseExporter {
|
|
|
17279
17296
|
this.options = options;
|
|
17280
17297
|
this.locale = grid.locale;
|
|
17281
17298
|
this.ownerGrid = grid;
|
|
17299
|
+
this.i18nFormatter = grid.i18nFormatter;
|
|
17282
17300
|
let columns = grid.columns;
|
|
17283
17301
|
if (this.options.ignoreMultiColumnHeaders) {
|
|
17284
17302
|
columns = columns.filter(col => col.children === undefined);
|
|
@@ -17949,8 +17967,7 @@ class IgxBaseExporter {
|
|
|
17949
17967
|
if (isDate) {
|
|
17950
17968
|
const timeZoneOffset = recordVal.getTimezoneOffset() * 60000;
|
|
17951
17969
|
const isoString = (new Date(recordVal - timeZoneOffset)).toISOString();
|
|
17952
|
-
|
|
17953
|
-
recordVal = pipe.transform(isoString);
|
|
17970
|
+
recordVal = this.i18nFormatter.formatDate(isoString, 'mediumDate', grid.locale);
|
|
17954
17971
|
}
|
|
17955
17972
|
const groupExpressionName = record.column && record.column.header ?
|
|
17956
17973
|
record.column.header :
|
|
@@ -18038,9 +18055,8 @@ class IgxBaseExporter {
|
|
|
18038
18055
|
columnGroup: isMultiColHeader ? column : null
|
|
18039
18056
|
};
|
|
18040
18057
|
if (column.dataType === 'currency') {
|
|
18041
|
-
columnInfo.currencyCode = column.pipeArgs.currencyCode
|
|
18042
|
-
|
|
18043
|
-
: getLocaleCurrencyCode(this.locale);
|
|
18058
|
+
columnInfo.currencyCode = this.i18nFormatter.getCurrencyCode(this.locale, column.pipeArgs.currencyCode);
|
|
18059
|
+
;
|
|
18044
18060
|
columnInfo.displayFormat = column.pipeArgs.display
|
|
18045
18061
|
? column.pipeArgs.display
|
|
18046
18062
|
: 'symbol';
|
|
@@ -21259,21 +21275,19 @@ class IgxSummaryCellComponent {
|
|
|
21259
21275
|
return this.column.grid;
|
|
21260
21276
|
}
|
|
21261
21277
|
/**
|
|
21262
|
-
* @hidden
|
|
21278
|
+
* @hidden
|
|
21263
21279
|
*/
|
|
21264
|
-
get
|
|
21265
|
-
return this.
|
|
21266
|
-
this.column.pipeArgs.currencyCode : getLocaleCurrencyCode(this.grid.locale);
|
|
21280
|
+
get i18nFormatter() {
|
|
21281
|
+
return this.grid.i18nFormatter;
|
|
21267
21282
|
}
|
|
21268
21283
|
/**
|
|
21269
21284
|
* @hidden @internal
|
|
21270
21285
|
*/
|
|
21271
|
-
get
|
|
21272
|
-
return this.column.pipeArgs.
|
|
21273
|
-
this.column.pipeArgs.display : getLocaleCurrencySymbol(this.grid.locale);
|
|
21286
|
+
get currencyCode() {
|
|
21287
|
+
return this.i18nFormatter.getCurrencyCode(this.locale, this.column.pipeArgs.currencyCode);
|
|
21274
21288
|
}
|
|
21275
21289
|
translateSummary(summary) {
|
|
21276
|
-
return this.
|
|
21290
|
+
return this.gridResourceStrings[`igx_grid_summary_${summary.key}`] || summary.label;
|
|
21277
21291
|
}
|
|
21278
21292
|
/**
|
|
21279
21293
|
* @hidden @internal
|
|
@@ -21286,28 +21300,28 @@ class IgxSummaryCellComponent {
|
|
|
21286
21300
|
return this.summaryFormatter(summary, this.column.summaries);
|
|
21287
21301
|
}
|
|
21288
21302
|
const args = this.column.pipeArgs;
|
|
21289
|
-
const locale = this.
|
|
21303
|
+
const locale = this.locale;
|
|
21290
21304
|
if (summary.key === 'count') {
|
|
21291
|
-
return formatNumber(summary.summaryResult, locale);
|
|
21305
|
+
return this.i18nFormatter.formatNumber(summary.summaryResult, locale);
|
|
21292
21306
|
}
|
|
21293
21307
|
if (summary.defaultFormatting) {
|
|
21294
21308
|
switch (this.column.dataType) {
|
|
21295
21309
|
case GridColumnDataType.Number:
|
|
21296
|
-
return formatNumber(summary.summaryResult, locale, args.digitsInfo);
|
|
21310
|
+
return this.i18nFormatter.formatNumber(summary.summaryResult, locale, args.digitsInfo);
|
|
21297
21311
|
case GridColumnDataType.Date:
|
|
21298
21312
|
case GridColumnDataType.DateTime:
|
|
21299
21313
|
case GridColumnDataType.Time:
|
|
21300
|
-
return formatDate(summary.summaryResult, args.format, locale, args.timezone);
|
|
21314
|
+
return this.i18nFormatter.formatDate(summary.summaryResult, args.format, locale, args.timezone);
|
|
21301
21315
|
case GridColumnDataType.Currency:
|
|
21302
|
-
return formatCurrency(summary.summaryResult, locale,
|
|
21316
|
+
return this.i18nFormatter.formatCurrency(summary.summaryResult, locale, args.display, this.currencyCode, args.digitsInfo);
|
|
21303
21317
|
case GridColumnDataType.Percent:
|
|
21304
|
-
return formatPercent(summary.summaryResult, locale, args.digitsInfo);
|
|
21318
|
+
return this.i18nFormatter.formatPercent(summary.summaryResult, locale, args.digitsInfo);
|
|
21305
21319
|
}
|
|
21306
21320
|
}
|
|
21307
21321
|
return summary.summaryResult;
|
|
21308
21322
|
}
|
|
21309
21323
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxSummaryCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21310
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxSummaryCellComponent, isStandalone: true, selector: "igx-grid-summary-cell", inputs: { summaryResults: "summaryResults", column: "column", firstCellIndentation: "firstCellIndentation", hasSummary: ["hasSummary", "hasSummary", booleanAttribute], summaryFormatter: "summaryFormatter", summaryTemplate: "summaryTemplate", active: "active", rowIndex: "rowIndex" }, host: { listeners: { "pointerdown": "activate()" }, properties: { "class.igx-grid-summary--active": "this.active", "attr.data-rowIndex": "this.rowIndex", "attr.data-visibleIndex": "this.visibleColumnIndex", "attr.id": "this.attrCellID" } }, ngImport: i0, template: "@if (hasSummary) {\n <ng-container *ngTemplateOutlet=\"summaryTemplate ? summaryTemplate : defaultSummary; context: { $implicit: summaryResults }\">\n </ng-container>\n}\n<ng-template #defaultSummary>\n @for (summary of summaryResults; track trackSummaryResult(summary)) {\n <div class=\"igx-grid-summary__item\" [style.height.px]=\"itemHeight\">\n <span class=\"igx-grid-summary__label\" [title]=\"summary.label\">{{ translateSummary(summary) }}</span>\n <span class=\"igx-grid-summary__result\" [title]=\"formatSummaryResult(summary)\">\n {{ formatSummaryResult(summary) }}\n </span>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxSummaryCellComponent, isStandalone: true, selector: "igx-grid-summary-cell", inputs: { summaryResults: "summaryResults", column: "column", firstCellIndentation: "firstCellIndentation", hasSummary: ["hasSummary", "hasSummary", booleanAttribute], summaryFormatter: "summaryFormatter", summaryTemplate: "summaryTemplate", locale: "locale", gridResourceStrings: "gridResourceStrings", active: "active", rowIndex: "rowIndex" }, host: { listeners: { "pointerdown": "activate()" }, properties: { "class.igx-grid-summary--active": "this.active", "attr.data-rowIndex": "this.rowIndex", "attr.data-visibleIndex": "this.visibleColumnIndex", "attr.id": "this.attrCellID" } }, ngImport: i0, template: "@if (hasSummary) {\n <ng-container *ngTemplateOutlet=\"summaryTemplate ? summaryTemplate : defaultSummary; context: { $implicit: summaryResults }\">\n </ng-container>\n}\n<ng-template #defaultSummary>\n @for (summary of summaryResults; track trackSummaryResult(summary)) {\n <div class=\"igx-grid-summary__item\" [style.height.px]=\"itemHeight\">\n <span class=\"igx-grid-summary__label\" [title]=\"summary.label\">{{ translateSummary(summary) }}</span>\n <span class=\"igx-grid-summary__result\" [title]=\"formatSummaryResult(summary)\">\n {{ formatSummaryResult(summary) }}\n </span>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21311
21325
|
}
|
|
21312
21326
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxSummaryCellComponent, decorators: [{
|
|
21313
21327
|
type: Component,
|
|
@@ -21325,6 +21339,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImpor
|
|
|
21325
21339
|
type: Input
|
|
21326
21340
|
}], summaryTemplate: [{
|
|
21327
21341
|
type: Input
|
|
21342
|
+
}], locale: [{
|
|
21343
|
+
type: Input
|
|
21344
|
+
}], gridResourceStrings: [{
|
|
21345
|
+
type: Input
|
|
21328
21346
|
}], active: [{
|
|
21329
21347
|
type: Input
|
|
21330
21348
|
}, {
|
|
@@ -21422,11 +21440,11 @@ class IgxSummaryRowComponent {
|
|
|
21422
21440
|
};
|
|
21423
21441
|
}
|
|
21424
21442
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxSummaryRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
21425
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxSummaryRowComponent, isStandalone: true, selector: "igx-grid-summary-row", inputs: { summaries: "summaries", gridID: "gridID", index: "index", firstCellIndentation: "firstCellIndentation" }, host: { properties: { "attr.data-rowIndex": "this.dataRowIndex" } }, providers: [IgxForOfSyncService], viewQueries: [{ propertyName: "virtDirRow", first: true, predicate: ["igxDirRef"], descendants: true, read: IgxGridForOfDirective }, { propertyName: "_summaryCells", predicate: IgxSummaryCellComponent, descendants: true, read: IgxSummaryCellComponent }], ngImport: i0, template: "@if (summaries.size) {\n @if (grid.summariesMargin) {\n <div\n class=\"igx-grid__summaries-patch\"\n [style.min-width.px]=\"grid.summariesMargin\"\n [style.flex-basis.px]=\"grid.summariesMargin\"\n (pointerdown)=\"$event.preventDefault()\"\n ></div>\n }\n @if (pinnedStartColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedStartColumns)\"></ng-container>\n }\n <ng-template igxGridFor let-col [igxGridForOf]=\"unpinnedColumns | igxNotGrouped\" [igxForScrollContainer]=\"grid.parentVirtDir\" let-colIndex=\"index\" [igxForScrollOrientation]=\"'horizontal'\" [igxForContainerSize]=\"grid.unpinnedWidth\" [igxForTrackBy]=\"grid.trackColumnChanges\" [igxForSizePropName]='\"calcPixelWidth\"' #igxDirRef>\n <igx-grid-summary-cell\n class=\"igx-grid-summary igx-grid-summary--fw\"\n role=\"cell\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [rowIndex]=\"index\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [summaryFormatter]=\"col.summaryFormatter\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n </ng-template>\n @if (pinnedEndColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedEndColumns)\"></ng-container>\n }\n}\n\n<ng-template #summaryCellTemplate let-col let-columns=\"columns\">\n @for (col of columns | igxNotGrouped; track trackPinnedColumn(col)) {\n <igx-grid-summary-cell\n role=\"cell\"\n class=\"igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-first]=\"col.isFirstPinned\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [rowIndex]=\"index\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: IgxGridForOfDirective, selector: "[igxGridFor][igxGridForOf]", inputs: ["igxGridForOf", "igxGridForOfUniqueSizeCache", "igxGridForOfVariableSizes"], outputs: ["dataChanging"] }, { kind: "component", type: IgxSummaryCellComponent, selector: "igx-grid-summary-cell", inputs: ["summaryResults", "column", "firstCellIndentation", "hasSummary", "summaryFormatter", "summaryTemplate", "active", "rowIndex"] }, { kind: "pipe", type: IgxGridNotGroupedPipe, name: "igxNotGrouped" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21443
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxSummaryRowComponent, isStandalone: true, selector: "igx-grid-summary-row", inputs: { summaries: "summaries", gridID: "gridID", index: "index", firstCellIndentation: "firstCellIndentation" }, host: { properties: { "attr.data-rowIndex": "this.dataRowIndex" } }, providers: [IgxForOfSyncService], viewQueries: [{ propertyName: "virtDirRow", first: true, predicate: ["igxDirRef"], descendants: true, read: IgxGridForOfDirective }, { propertyName: "_summaryCells", predicate: IgxSummaryCellComponent, descendants: true, read: IgxSummaryCellComponent }], ngImport: i0, template: "@if (summaries.size) {\n @if (grid.summariesMargin) {\n <div\n class=\"igx-grid__summaries-patch\"\n [style.min-width.px]=\"grid.summariesMargin\"\n [style.flex-basis.px]=\"grid.summariesMargin\"\n (pointerdown)=\"$event.preventDefault()\"\n ></div>\n }\n @if (pinnedStartColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedStartColumns)\"></ng-container>\n }\n <ng-template igxGridFor let-col [igxGridForOf]=\"unpinnedColumns | igxNotGrouped\" [igxForScrollContainer]=\"grid.parentVirtDir\" let-colIndex=\"index\" [igxForScrollOrientation]=\"'horizontal'\" [igxForContainerSize]=\"grid.unpinnedWidth\" [igxForTrackBy]=\"grid.trackColumnChanges\" [igxForSizePropName]='\"calcPixelWidth\"' #igxDirRef>\n <igx-grid-summary-cell\n class=\"igx-grid-summary igx-grid-summary--fw\"\n role=\"cell\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [locale]=\"grid.locale\"\n [gridResourceStrings]=\"grid.resourceStrings\"\n [rowIndex]=\"index\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [summaryFormatter]=\"col.summaryFormatter\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n </ng-template>\n @if (pinnedEndColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedEndColumns)\"></ng-container>\n }\n}\n\n<ng-template #summaryCellTemplate let-col let-columns=\"columns\">\n @for (col of columns | igxNotGrouped; track trackPinnedColumn(col)) {\n <igx-grid-summary-cell\n role=\"cell\"\n class=\"igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-first]=\"col.isFirstPinned\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [locale]=\"grid.locale\"\n [gridResourceStrings]=\"grid.resourceStrings\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [rowIndex]=\"index\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: IgxGridForOfDirective, selector: "[igxGridFor][igxGridForOf]", inputs: ["igxGridForOf", "igxGridForOfUniqueSizeCache", "igxGridForOfVariableSizes"], outputs: ["dataChanging"] }, { kind: "component", type: IgxSummaryCellComponent, selector: "igx-grid-summary-cell", inputs: ["summaryResults", "column", "firstCellIndentation", "hasSummary", "summaryFormatter", "summaryTemplate", "locale", "gridResourceStrings", "active", "rowIndex"] }, { kind: "pipe", type: IgxGridNotGroupedPipe, name: "igxNotGrouped" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
21426
21444
|
}
|
|
21427
21445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxSummaryRowComponent, decorators: [{
|
|
21428
21446
|
type: Component,
|
|
21429
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-summary-row', providers: [IgxForOfSyncService], imports: [NgTemplateOutlet, IgxGridForOfDirective, IgxSummaryCellComponent, IgxGridNotGroupedPipe], template: "@if (summaries.size) {\n @if (grid.summariesMargin) {\n <div\n class=\"igx-grid__summaries-patch\"\n [style.min-width.px]=\"grid.summariesMargin\"\n [style.flex-basis.px]=\"grid.summariesMargin\"\n (pointerdown)=\"$event.preventDefault()\"\n ></div>\n }\n @if (pinnedStartColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedStartColumns)\"></ng-container>\n }\n <ng-template igxGridFor let-col [igxGridForOf]=\"unpinnedColumns | igxNotGrouped\" [igxForScrollContainer]=\"grid.parentVirtDir\" let-colIndex=\"index\" [igxForScrollOrientation]=\"'horizontal'\" [igxForContainerSize]=\"grid.unpinnedWidth\" [igxForTrackBy]=\"grid.trackColumnChanges\" [igxForSizePropName]='\"calcPixelWidth\"' #igxDirRef>\n <igx-grid-summary-cell\n class=\"igx-grid-summary igx-grid-summary--fw\"\n role=\"cell\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [rowIndex]=\"index\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [summaryFormatter]=\"col.summaryFormatter\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n </ng-template>\n @if (pinnedEndColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedEndColumns)\"></ng-container>\n }\n}\n\n<ng-template #summaryCellTemplate let-col let-columns=\"columns\">\n @for (col of columns | igxNotGrouped; track trackPinnedColumn(col)) {\n <igx-grid-summary-cell\n role=\"cell\"\n class=\"igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-first]=\"col.isFirstPinned\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [rowIndex]=\"index\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n }\n</ng-template>\n" }]
|
|
21447
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-summary-row', providers: [IgxForOfSyncService], imports: [NgTemplateOutlet, IgxGridForOfDirective, IgxSummaryCellComponent, IgxGridNotGroupedPipe], template: "@if (summaries.size) {\n @if (grid.summariesMargin) {\n <div\n class=\"igx-grid__summaries-patch\"\n [style.min-width.px]=\"grid.summariesMargin\"\n [style.flex-basis.px]=\"grid.summariesMargin\"\n (pointerdown)=\"$event.preventDefault()\"\n ></div>\n }\n @if (pinnedStartColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedStartColumns)\"></ng-container>\n }\n <ng-template igxGridFor let-col [igxGridForOf]=\"unpinnedColumns | igxNotGrouped\" [igxForScrollContainer]=\"grid.parentVirtDir\" let-colIndex=\"index\" [igxForScrollOrientation]=\"'horizontal'\" [igxForContainerSize]=\"grid.unpinnedWidth\" [igxForTrackBy]=\"grid.trackColumnChanges\" [igxForSizePropName]='\"calcPixelWidth\"' #igxDirRef>\n <igx-grid-summary-cell\n class=\"igx-grid-summary igx-grid-summary--fw\"\n role=\"cell\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [locale]=\"grid.locale\"\n [gridResourceStrings]=\"grid.resourceStrings\"\n [rowIndex]=\"index\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [summaryFormatter]=\"col.summaryFormatter\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n </ng-template>\n @if (pinnedEndColumns.length > 0) {\n <ng-container *ngTemplateOutlet=\"summaryCellTemplate; context: getContext(this, pinnedEndColumns)\"></ng-container>\n }\n}\n\n<ng-template #summaryCellTemplate let-col let-columns=\"columns\">\n @for (col of columns | igxNotGrouped; track trackPinnedColumn(col)) {\n <igx-grid-summary-cell\n role=\"cell\"\n class=\"igx-grid-summary igx-grid-summary--fw igx-grid-summary--pinned\"\n [class.igx-grid-summary--empty]=\"!col.hasSummary\"\n [class.igx-grid-summary--pinned-first]=\"col.isFirstPinned\"\n [class.igx-grid-summary--pinned-last]=\"col.isLastPinned\"\n [column]=\"col\"\n [locale]=\"grid.locale\"\n [gridResourceStrings]=\"grid.resourceStrings\"\n [firstCellIndentation]=\"firstCellIndentation\"\n [rowIndex]=\"index\"\n [summaryResults]=\"getColumnSummaries(col.field)\"\n [summaryTemplate]=\"col.summaryTemplate\"\n [hasSummary]=\"col.hasSummary\"\n [active]=\"isCellActive(col.visibleIndex)\"\n [style.max-height.px]=\"minHeight\"\n [style.min-height.px]=\"minHeight\"\n [style.min-width]=\"col.resolvedWidth\"\n [style.max-width]=\"col.resolvedWidth\"\n [style.flex-basis]=\"col.resolvedWidth\">\n </igx-grid-summary-cell>\n }\n</ng-template>\n" }]
|
|
21430
21448
|
}], propDecorators: { summaries: [{
|
|
21431
21449
|
type: Input
|
|
21432
21450
|
}], gridID: [{
|
|
@@ -23042,15 +23060,16 @@ class IgxGridCellComponent {
|
|
|
23042
23060
|
}
|
|
23043
23061
|
const args = this.column.pipeArgs;
|
|
23044
23062
|
const locale = this.grid.locale;
|
|
23063
|
+
const i18nFormatter = this.grid.i18nFormatter;
|
|
23045
23064
|
switch (this.column.dataType) {
|
|
23046
23065
|
case GridColumnDataType.Percent:
|
|
23047
|
-
return formatPercent(this.value, locale, args.digitsInfo);
|
|
23066
|
+
return i18nFormatter.formatPercent(this.value, locale, args.digitsInfo);
|
|
23048
23067
|
case GridColumnDataType.Currency:
|
|
23049
|
-
return formatCurrency
|
|
23068
|
+
return i18nFormatter.formatCurrency(this.value, locale, args.display, this.currencyCode, args.digitsInfo);
|
|
23050
23069
|
case GridColumnDataType.Date:
|
|
23051
23070
|
case GridColumnDataType.DateTime:
|
|
23052
23071
|
case GridColumnDataType.Time:
|
|
23053
|
-
return formatDate
|
|
23072
|
+
return i18nFormatter.formatDate(this.value, args.format, locale, args.timezone);
|
|
23054
23073
|
}
|
|
23055
23074
|
return this.value;
|
|
23056
23075
|
}
|
|
@@ -23285,12 +23304,11 @@ class IgxGridCellComponent {
|
|
|
23285
23304
|
}
|
|
23286
23305
|
/** @hidden @internal */
|
|
23287
23306
|
get currencyCode() {
|
|
23288
|
-
return this.column.pipeArgs.currencyCode
|
|
23289
|
-
this.column.pipeArgs.currencyCode : getLocaleCurrencyCode(this.grid.locale);
|
|
23307
|
+
return this.grid.i18nFormatter.getCurrencyCode(this.grid.locale, this.column.pipeArgs.currencyCode);
|
|
23290
23308
|
}
|
|
23291
23309
|
/** @hidden @internal */
|
|
23292
23310
|
get currencyCodeSymbol() {
|
|
23293
|
-
return getCurrencySymbol(this.currencyCode,
|
|
23311
|
+
return this.grid.i18nFormatter.getCurrencySymbol(this.currencyCode, this.grid.locale);
|
|
23294
23312
|
}
|
|
23295
23313
|
/**
|
|
23296
23314
|
* @hidden
|
|
@@ -23607,17 +23625,17 @@ class IgxGridCellComponent {
|
|
|
23607
23625
|
return new IgxGridCell(this.grid, rowID, this.column);
|
|
23608
23626
|
}
|
|
23609
23627
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23610
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridCellComponent, isStandalone: true, selector: "igx-grid-cell", inputs: { column: "column", isPlaceholder: "isPlaceholder", isMerged: "isMerged", intRow: "intRow", row: "row", rowData: "rowData", columnData: "columnData", cellTemplate: "cellTemplate", cellValidationErrorTemplate: "cellValidationErrorTemplate", pinnedIndicator: "pinnedIndicator", value: "value", formatter: "formatter", visibleColumnIndex: "visibleColumnIndex", cellSelectionMode: "cellSelectionMode", lastSearchInfo: "lastSearchInfo", lastPinned: "lastPinned", firstPinned: "firstPinned", editMode: ["editMode", "editMode", booleanAttribute], width: "width", active: "active", displayPinnedChip: "displayPinnedChip" }, host: { listeners: { "dblclick": "onDoubleClick($event)", "click": "onClick($event)" }, properties: { "class.igx-grid__td--new": "this.isEmptyAddRowCell", "attr.data-rowIndex": "this.rowIndex", "attr.data-visibleIndex": "this.visibleColumnIndex", "attr.id": "this.attrCellID", "attr.title": "this.title", "class.igx-grid__td--bool-true": "this.booleanClass", "class.igx-grid__td--pinned-last": "this.lastPinned", "class.igx-grid__td--pinned-first": "this.firstPinned", "class.igx-grid__td--editing": "this.editMode", "attr.role": "this.role", "attr.aria-readonly": "this.readonly", "attr.aria-describedby": "this.ariaDescribeBy", "class.igx-grid__td--invalid": "this.isInvalid", "attr.aria-invalid": "this.isInvalid", "class.igx-grid__td--valid": "this.isValidAfterEdit", "class.igx-grid__td--active": "this.active", "attr.aria-selected": "this.ariaSelected", "class.igx-grid__td--selected": "this.selected", "class.igx-grid__td--column-selected": "this.columnSelected", "class.igx-grid__td--row-pinned-first": "this.displayPinnedChip", "style.min-height.px": "this.minHeight", "attr.aria-rowindex": "this.ariaRowIndex", "attr.aria-colindex": "this.ariaColIndex" } }, providers: [HammerGesturesManager], viewQueries: [{ propertyName: "errorIcon", first: true, predicate: ["errorIcon"], descendants: true, read: IgxIconComponent }, { propertyName: "defaultErrorTemplate", first: true, predicate: ["defaultError"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCellTemplate", first: true, predicate: ["defaultCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyCellTemplate", first: true, predicate: ["emptyCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultPinnedIndicator", first: true, predicate: ["defaultPinnedIndicator"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inlineEditorTemplate", first: true, predicate: ["inlineEditor"], descendants: true, read: TemplateRef, static: true }, { propertyName: "addRowCellTemplate", first: true, predicate: ["addRowCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "highlight", first: true, predicate: IgxTextHighlightDirective, descendants: true, read: IgxTextHighlightDirective }, { propertyName: "errorTooltip", predicate: ["error"], descendants: true, read: IgxTooltipDirective }], usesOnChanges: true, ngImport: i0, template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip\n class=\"igx-grid__td--pinned-chip\"\n [disabled]=\"true\"\n [style.--ig-size]=\"1\"\n >{{ 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\n class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"\n formatter\n ? (value | columnFormatter:formatter:rowData:columnData)\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 \"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\"\n >{{\n formatter\n ? (value | columnFormatter:formatter:rowData:columnData)\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 }}</div>\n }\n @if (column.dataType === 'boolean' && !this.formatter) {\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 }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n\n<ng-template #emptyCell></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 >{{\n !isEmptyAddRowCell ? 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>\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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 [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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 [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\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 [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 [igxTextSelection]=\"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 [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\"></ng-container>\n\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 #defaultError>\n @let errors = formControl.errors;\n @if (errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':errors.minlength.requiredLength }}\n </div>\n }\n @if (errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':errors.maxlength.requiredLength }}\n </div>\n }\n @if (errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':errors.min.min }}\n </div>\n }\n @if (errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':errors.max.max }}\n </div>\n }\n @if (errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "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: 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: "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: "directive", type: IgxTextSelectionDirective, selector: "[igxTextSelection]", inputs: ["igxTextSelection"], exportAs: ["igxTextSelection"] }, { 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: 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: DecimalPipe, name: "number" }, { kind: "pipe", type: PercentPipe, name: "percent" }, { kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: IgxGridCellImageAltPipe, name: "igxCellImageAlt" }, { kind: "pipe", type: IgxStringReplacePipe, name: "igxStringReplace" }, { kind: "pipe", type: IgxColumnFormatterPipe, name: "columnFormatter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23628
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.2", type: IgxGridCellComponent, isStandalone: true, selector: "igx-grid-cell", inputs: { column: "column", isPlaceholder: "isPlaceholder", isMerged: "isMerged", intRow: "intRow", row: "row", rowData: "rowData", columnData: "columnData", cellTemplate: "cellTemplate", cellValidationErrorTemplate: "cellValidationErrorTemplate", pinnedIndicator: "pinnedIndicator", value: "value", formatter: "formatter", visibleColumnIndex: "visibleColumnIndex", cellSelectionMode: "cellSelectionMode", lastSearchInfo: "lastSearchInfo", lastPinned: "lastPinned", firstPinned: "firstPinned", editMode: ["editMode", "editMode", booleanAttribute], width: "width", active: "active", displayPinnedChip: "displayPinnedChip" }, host: { listeners: { "dblclick": "onDoubleClick($event)", "click": "onClick($event)" }, properties: { "class.igx-grid__td--new": "this.isEmptyAddRowCell", "attr.data-rowIndex": "this.rowIndex", "attr.data-visibleIndex": "this.visibleColumnIndex", "attr.id": "this.attrCellID", "attr.title": "this.title", "class.igx-grid__td--bool-true": "this.booleanClass", "class.igx-grid__td--pinned-last": "this.lastPinned", "class.igx-grid__td--pinned-first": "this.firstPinned", "class.igx-grid__td--editing": "this.editMode", "attr.role": "this.role", "attr.aria-readonly": "this.readonly", "attr.aria-describedby": "this.ariaDescribeBy", "class.igx-grid__td--invalid": "this.isInvalid", "attr.aria-invalid": "this.isInvalid", "class.igx-grid__td--valid": "this.isValidAfterEdit", "class.igx-grid__td--active": "this.active", "attr.aria-selected": "this.ariaSelected", "class.igx-grid__td--selected": "this.selected", "class.igx-grid__td--column-selected": "this.columnSelected", "class.igx-grid__td--row-pinned-first": "this.displayPinnedChip", "style.min-height.px": "this.minHeight", "attr.aria-rowindex": "this.ariaRowIndex", "attr.aria-colindex": "this.ariaColIndex" } }, providers: [HammerGesturesManager], viewQueries: [{ propertyName: "errorIcon", first: true, predicate: ["errorIcon"], descendants: true, read: IgxIconComponent }, { propertyName: "defaultErrorTemplate", first: true, predicate: ["defaultError"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCellTemplate", first: true, predicate: ["defaultCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyCellTemplate", first: true, predicate: ["emptyCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultPinnedIndicator", first: true, predicate: ["defaultPinnedIndicator"], descendants: true, read: TemplateRef, static: true }, { propertyName: "inlineEditorTemplate", first: true, predicate: ["inlineEditor"], descendants: true, read: TemplateRef, static: true }, { propertyName: "addRowCellTemplate", first: true, predicate: ["addRowCell"], descendants: true, read: TemplateRef, static: true }, { propertyName: "highlight", first: true, predicate: IgxTextHighlightDirective, descendants: true, read: IgxTextHighlightDirective }, { propertyName: "errorTooltip", predicate: ["error"], descendants: true, read: IgxTooltipDirective }], usesOnChanges: true, ngImport: i0, template: "<ng-template #defaultPinnedIndicator>\n @if (displayPinnedChip) {\n <igx-chip\n class=\"igx-grid__td--pinned-chip\"\n [disabled]=\"true\"\n [style.--ig-size]=\"1\"\n >{{ 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\n class=\"igx-grid__td-text\"\n [cssClass]=\"highlightClass\"\n [activeCssClass]=\"activeHighlightClass\"\n [groupName]=\"gridID\"\n [value]=\"\n formatter\n ? (value | columnFormatter:formatter:rowData:columnData)\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 \"\n [row]=\"rowData\"\n [column]=\"this.column.field\"\n [containerClass]=\"'igx-grid__td-text'\"\n [metadata]=\"searchMetadata\"\n >{{\n formatter\n ? (value | columnFormatter:formatter:rowData:columnData)\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 }}</div>\n }\n @if (column.dataType === 'boolean' && !this.formatter) {\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 }\n @if (column.dataType === 'image') {\n <img [src]=\"value\" [alt]=\"value | igxCellImageAlt\" />\n }\n</ng-template>\n\n<ng-template #emptyCell></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 >{{\n !isEmptyAddRowCell ? 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>\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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 [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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 [inputFormat]=\"column.editorOptions?.dateTimeFormat\"\n [displayFormat]=\"column.pipeArgs.format\"\n [(value)]=\"editValue\"\n [igxFocus]=\"true\"\n [formControl]=\"formControl\"\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 [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 [igxTextSelection]=\"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 [formGroup]=\"formGroup\">\n <input\n igxInput\n [attr.aria-describedby]=\"ariaDescribeBy\"\n [attr.aria-invalid]=\"isInvalid\"\n [igxFocus]=\"true\"\n [igxTextSelection]=\"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<ng-container *ngTemplateOutlet=\"pinnedIndicatorTemplate; context: context\">\n</ng-container>\n<ng-container *ngTemplateOutlet=\"template; context: context\"></ng-container>\n\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 #defaultError>\n @let errors = formControl.errors;\n @if (errors?.['required']) {\n <div>\n {{grid.resourceStrings.igx_grid_required_validation_error}}\n </div>\n }\n @if (errors?.['minlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_length_validation_error | igxStringReplace:'{0}':errors.minlength.requiredLength }}\n </div>\n }\n @if (errors?.['maxlength']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_length_validation_error | igxStringReplace:'{0}':errors.maxlength.requiredLength }}\n </div>\n }\n @if (errors?.['min']) {\n <div>\n {{grid.resourceStrings.igx_grid_min_validation_error | igxStringReplace:'{0}':errors.min.min }}\n </div>\n }\n @if (errors?.['max']) {\n <div>\n {{grid.resourceStrings.igx_grid_max_validation_error | igxStringReplace:'{0}':errors.max.max }}\n </div>\n }\n @if (errors?.['email']) {\n <div>\n {{grid.resourceStrings.igx_grid_email_validation_error }}\n </div>\n }\n @if (errors?.['pattern']) {\n <div>\n {{grid.resourceStrings.igx_grid_pattern_validation_error}}\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { 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: "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: 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: "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: "directive", type: IgxTextSelectionDirective, selector: "[igxTextSelection]", inputs: ["igxTextSelection"], exportAs: ["igxTextSelection"] }, { 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: 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: IgxNumberFormatterPipe, name: "number" }, { kind: "pipe", type: IgxPercentFormatterPipe, name: "percent" }, { kind: "pipe", type: IgxCurrencyFormatterPipe, name: "currency" }, { kind: "pipe", type: IgxDateFormatterPipe, name: "date" }, { kind: "pipe", type: IgxGridCellImageAltPipe, name: "igxCellImageAlt" }, { kind: "pipe", type: IgxStringReplacePipe, name: "igxStringReplace" }, { kind: "pipe", type: IgxColumnFormatterPipe, name: "columnFormatter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23611
23629
|
}
|
|
23612
23630
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.2", ngImport: i0, type: IgxGridCellComponent, decorators: [{
|
|
23613
23631
|
type: Component,
|
|
23614
23632
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'igx-grid-cell', providers: [HammerGesturesManager], imports: [
|
|
23615
23633
|
NgClass,
|
|
23616
23634
|
NgTemplateOutlet,
|
|
23617
|
-
|
|
23618
|
-
|
|
23619
|
-
|
|
23620
|
-
|
|
23635
|
+
IgxNumberFormatterPipe,
|
|
23636
|
+
IgxPercentFormatterPipe,
|
|
23637
|
+
IgxCurrencyFormatterPipe,
|
|
23638
|
+
IgxDateFormatterPipe,
|
|
23621
23639
|
ReactiveFormsModule,
|
|
23622
23640
|
IgxChipComponent,
|
|
23623
23641
|
IgxTextHighlightDirective,
|