igniteui-angular 19.2.8 → 19.2.9
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/fesm2022/igniteui-angular.mjs +71 -82
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/core/utils.d.ts +4 -4
- package/lib/data-operations/filtering-strategy.d.ts +4 -5
- package/lib/grids/common/pipes.d.ts +1 -1
- package/lib/grids/common/strategy.d.ts +1 -1
- package/lib/grids/grid/grid-validation.service.d.ts +1 -1
- package/lib/grids/grid-public-cell.d.ts +2 -2
- package/lib/grids/summaries/grid-summary.service.d.ts +1 -1
- package/lib/grids/tree-grid/tree-grid.filtering.strategy.d.ts +4 -4
- package/package.json +1 -1
|
@@ -238,17 +238,9 @@ const getResizeObserver = () => globalThis.window?.ResizeObserver;
|
|
|
238
238
|
/**
|
|
239
239
|
* @hidden
|
|
240
240
|
*/
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
return arr;
|
|
245
|
-
}
|
|
246
|
-
let i = array.length;
|
|
247
|
-
while (i--) {
|
|
248
|
-
arr[i] = deep ? cloneValue(array[i]) : array[i];
|
|
249
|
-
}
|
|
250
|
-
return arr;
|
|
251
|
-
};
|
|
241
|
+
function cloneArray(array, deep = false) {
|
|
242
|
+
return deep ? (array ?? []).map(cloneValue) : (array ?? []).slice();
|
|
243
|
+
}
|
|
252
244
|
/**
|
|
253
245
|
* Doesn't clone leaf items
|
|
254
246
|
*
|
|
@@ -306,7 +298,7 @@ const cloneValue = (value) => {
|
|
|
306
298
|
return new Date(value.getTime());
|
|
307
299
|
}
|
|
308
300
|
if (Array.isArray(value)) {
|
|
309
|
-
return
|
|
301
|
+
return value.slice();
|
|
310
302
|
}
|
|
311
303
|
if (value instanceof Map || value instanceof Set) {
|
|
312
304
|
return value;
|
|
@@ -613,10 +605,8 @@ const resizeObservable = (target) => {
|
|
|
613
605
|
return unsubscribe;
|
|
614
606
|
});
|
|
615
607
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
return NEVER;
|
|
619
|
-
}
|
|
608
|
+
// if on a server env return a empty observable that does not complete immediately
|
|
609
|
+
return NEVER;
|
|
620
610
|
};
|
|
621
611
|
/**
|
|
622
612
|
* @hidden
|
|
@@ -626,7 +616,7 @@ const resizeObservable = (target) => {
|
|
|
626
616
|
*/
|
|
627
617
|
const compareMaps = (map1, map2) => {
|
|
628
618
|
if (!map2) {
|
|
629
|
-
return !map1
|
|
619
|
+
return !map1;
|
|
630
620
|
}
|
|
631
621
|
if (map1.size !== map2.size) {
|
|
632
622
|
return false;
|
|
@@ -646,24 +636,34 @@ const compareMaps = (map1, map2) => {
|
|
|
646
636
|
}
|
|
647
637
|
return match;
|
|
648
638
|
};
|
|
639
|
+
function _isObject(entity) {
|
|
640
|
+
return entity != null && typeof entity === 'object';
|
|
641
|
+
}
|
|
642
|
+
function columnFieldPath(path) {
|
|
643
|
+
return path?.split('.') ?? [];
|
|
644
|
+
}
|
|
649
645
|
/**
|
|
650
|
-
*
|
|
651
646
|
* Given a property access path in the format `x.y.z` resolves and returns
|
|
652
647
|
* the value of the `z` property in the passed object.
|
|
653
648
|
*
|
|
654
649
|
* @hidden
|
|
655
650
|
* @internal
|
|
656
651
|
*/
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
652
|
+
function resolveNestedPath(obj, pathParts, defaultValue) {
|
|
653
|
+
if (!_isObject(obj) || pathParts.length < 1) {
|
|
654
|
+
return defaultValue;
|
|
655
|
+
}
|
|
656
|
+
let current = obj;
|
|
657
|
+
for (const key of pathParts) {
|
|
658
|
+
if (_isObject(current) && key in current) {
|
|
659
|
+
current = current[key];
|
|
663
660
|
}
|
|
664
|
-
|
|
661
|
+
else {
|
|
662
|
+
return defaultValue;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
665
|
return current;
|
|
666
|
-
}
|
|
666
|
+
}
|
|
667
667
|
/**
|
|
668
668
|
*
|
|
669
669
|
* Given a property access path in the format `x.y.z` and a value
|
|
@@ -779,7 +779,6 @@ function getComponentCssSizeVar(size) {
|
|
|
779
779
|
return 'var(--ig-size, var(--ig-size-small))';
|
|
780
780
|
case "2":
|
|
781
781
|
return 'var(--ig-size, var(--ig-size-medium))';
|
|
782
|
-
case "3":
|
|
783
782
|
default:
|
|
784
783
|
return 'var(--ig-size, var(--ig-size-large))';
|
|
785
784
|
}
|
|
@@ -1050,7 +1049,7 @@ class IgxSorting {
|
|
|
1050
1049
|
* @internal
|
|
1051
1050
|
*/
|
|
1052
1051
|
getFieldValue(obj, key, isDate = false, isTime = false) {
|
|
1053
|
-
let resolvedValue = resolveNestedPath(obj, key);
|
|
1052
|
+
let resolvedValue = resolveNestedPath(obj, columnFieldPath(key));
|
|
1054
1053
|
const date = parseDate(resolvedValue);
|
|
1055
1054
|
if (date && isDate && isTime) {
|
|
1056
1055
|
resolvedValue = date;
|
|
@@ -3349,9 +3348,6 @@ class BaseFilteringStrategy {
|
|
|
3349
3348
|
if (!records) { // child grid is not yet created
|
|
3350
3349
|
return true;
|
|
3351
3350
|
}
|
|
3352
|
-
else if (records.length === 0) { // child grid is empty
|
|
3353
|
-
return false;
|
|
3354
|
-
}
|
|
3355
3351
|
for (let index = 0; index < records.length; index++) {
|
|
3356
3352
|
const record = records[index];
|
|
3357
3353
|
if ((shouldMatchRecords && this.matchRecord(record, expr.searchTree, grid, expr.searchTree.entity)) ||
|
|
@@ -3373,7 +3369,7 @@ class BaseFilteringStrategy {
|
|
|
3373
3369
|
const expressionsTree = expressions;
|
|
3374
3370
|
const operator = expressionsTree.operator;
|
|
3375
3371
|
let matchOperand;
|
|
3376
|
-
if (expressionsTree.filteringOperands
|
|
3372
|
+
if (expressionsTree.filteringOperands?.length) {
|
|
3377
3373
|
for (const operand of expressionsTree.filteringOperands) {
|
|
3378
3374
|
matchOperand = this.matchRecord(rec, operand, grid, entity);
|
|
3379
3375
|
// Return false if at least one operand does not match and the filtering logic is And
|
|
@@ -3423,15 +3419,14 @@ class BaseFilteringStrategy {
|
|
|
3423
3419
|
return null;
|
|
3424
3420
|
}
|
|
3425
3421
|
getFilterItems(column, tree) {
|
|
3422
|
+
const applyFormatter = column.formatter && this.shouldFormatFilterValues(column);
|
|
3426
3423
|
let data = column.grid.gridAPI.filterDataByExpressions(tree);
|
|
3427
3424
|
data = column.grid.gridAPI.sortDataByExpressions(data, [{ fieldName: column.field, dir: SortingDirection.Asc, ignoreCase: column.sortingIgnoreCase }]);
|
|
3428
|
-
const
|
|
3425
|
+
const pathParts = columnFieldPath(column.field);
|
|
3429
3426
|
let filterItems = data.map(record => {
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
column.formatter(value, record) :
|
|
3434
|
-
value;
|
|
3427
|
+
const value = applyFormatter ?
|
|
3428
|
+
column.formatter(resolveNestedPath(record, pathParts), record) :
|
|
3429
|
+
resolveNestedPath(record, pathParts);
|
|
3435
3430
|
return {
|
|
3436
3431
|
value,
|
|
3437
3432
|
label: this.getFilterItemLabel(column, value, !applyFormatter, record)
|
|
@@ -3508,31 +3503,18 @@ class NoopFilteringStrategy extends BaseFilteringStrategy {
|
|
|
3508
3503
|
}
|
|
3509
3504
|
class FilteringStrategy extends BaseFilteringStrategy {
|
|
3510
3505
|
static { this._instance = null; }
|
|
3511
|
-
constructor() {
|
|
3512
|
-
super();
|
|
3513
|
-
}
|
|
3514
3506
|
static instance() {
|
|
3515
3507
|
return this._instance || (this._instance = new this());
|
|
3516
3508
|
}
|
|
3517
3509
|
filter(data, expressionsTree, advancedExpressionsTree, grid) {
|
|
3518
|
-
|
|
3519
|
-
let rec;
|
|
3520
|
-
const len = data.length;
|
|
3521
|
-
const res = [];
|
|
3522
|
-
if ((FilteringExpressionsTree.empty(expressionsTree) && FilteringExpressionsTree.empty(advancedExpressionsTree)) || !len) {
|
|
3510
|
+
if ((FilteringExpressionsTree.empty(expressionsTree) && FilteringExpressionsTree.empty(advancedExpressionsTree))) {
|
|
3523
3511
|
return data;
|
|
3524
3512
|
}
|
|
3525
|
-
|
|
3526
|
-
rec = data[i];
|
|
3527
|
-
if (this.matchRecord(rec, expressionsTree, grid) && this.matchRecord(rec, advancedExpressionsTree, grid)) {
|
|
3528
|
-
res.push(rec);
|
|
3529
|
-
}
|
|
3530
|
-
}
|
|
3531
|
-
return res;
|
|
3513
|
+
return data.filter(record => this.matchRecord(record, expressionsTree, grid) && this.matchRecord(record, advancedExpressionsTree, grid));
|
|
3532
3514
|
}
|
|
3533
3515
|
getFieldValue(rec, fieldName, isDate = false, isTime = false, grid) {
|
|
3534
3516
|
const column = grid?.getColumnByName(fieldName);
|
|
3535
|
-
let value = resolveNestedPath(rec, fieldName);
|
|
3517
|
+
let value = resolveNestedPath(rec, columnFieldPath(fieldName));
|
|
3536
3518
|
value = column?.formatter && this.shouldFormatFilterValues(column) ?
|
|
3537
3519
|
column.formatter(value, rec) :
|
|
3538
3520
|
value && (isDate || isTime) ? parseDate(value) : value;
|
|
@@ -3568,14 +3550,14 @@ class TreeGridFilteringStrategy extends BaseFilteringStrategy {
|
|
|
3568
3550
|
const hierarchicalRecord = rec;
|
|
3569
3551
|
let value = this.isHierarchicalFilterField(fieldName) ?
|
|
3570
3552
|
this.getHierarchicalFieldValue(hierarchicalRecord, fieldName) :
|
|
3571
|
-
resolveNestedPath(hierarchicalRecord.data, fieldName);
|
|
3553
|
+
resolveNestedPath(hierarchicalRecord.data, columnFieldPath(fieldName));
|
|
3572
3554
|
value = column?.formatter && this.shouldFormatFilterValues(column) ?
|
|
3573
3555
|
column.formatter(value, rec.data) :
|
|
3574
3556
|
value && (isDate || isTime) ? parseDate(value) : value;
|
|
3575
3557
|
return value;
|
|
3576
3558
|
}
|
|
3577
3559
|
getHierarchicalFieldValue(record, field) {
|
|
3578
|
-
const value = resolveNestedPath(record.data, field);
|
|
3560
|
+
const value = resolveNestedPath(record.data, columnFieldPath(field));
|
|
3579
3561
|
return record.parent ?
|
|
3580
3562
|
`${this.getHierarchicalFieldValue(record.parent, field)}${value ? `.[${value}]` : ''}` :
|
|
3581
3563
|
`[${value}]`;
|
|
@@ -3618,8 +3600,9 @@ class TreeGridFilteringStrategy extends BaseFilteringStrategy {
|
|
|
3618
3600
|
return Promise.resolve(items);
|
|
3619
3601
|
}
|
|
3620
3602
|
getHierarchicalFilterItems(records, column, parent) {
|
|
3603
|
+
const pathParts = columnFieldPath(column.field);
|
|
3621
3604
|
return records?.map(record => {
|
|
3622
|
-
let value = resolveNestedPath(record.data,
|
|
3605
|
+
let value = resolveNestedPath(record.data, pathParts);
|
|
3623
3606
|
const applyFormatter = column.formatter && this.shouldFormatFilterValues(column);
|
|
3624
3607
|
value = applyFormatter ?
|
|
3625
3608
|
column.formatter(value, record.data) :
|
|
@@ -4061,7 +4044,7 @@ class IgxBaseExporter {
|
|
|
4061
4044
|
}
|
|
4062
4045
|
record.data = columns.reduce((a, e) => {
|
|
4063
4046
|
if (!e.skip) {
|
|
4064
|
-
let rawValue = resolveNestedPath(record.data, e.field);
|
|
4047
|
+
let rawValue = resolveNestedPath(record.data, columnFieldPath(e.field));
|
|
4065
4048
|
const shouldApplyFormatter = e.formatter && !e.skipFormatter && record.type !== ExportRecordType.GroupedRecord;
|
|
4066
4049
|
const isOfDateType = e.dataType === 'date' || e.dataType === 'dateTime' || e.dataType === 'time';
|
|
4067
4050
|
if (isOfDateType &&
|
|
@@ -31701,7 +31684,7 @@ class IgxCalendarBaseDirective {
|
|
|
31701
31684
|
case 'month':
|
|
31702
31685
|
return `${this.resourceStrings.igx_calendar_previous_month}, ${detail}`;
|
|
31703
31686
|
case 'year':
|
|
31704
|
-
return this.resourceStrings.igx_calendar_previous_year
|
|
31687
|
+
return this.resourceStrings.igx_calendar_previous_year;
|
|
31705
31688
|
case 'decade':
|
|
31706
31689
|
return this.resourceStrings.igx_calendar_previous_years.replace('{0}', '15');
|
|
31707
31690
|
}
|
|
@@ -31711,7 +31694,7 @@ class IgxCalendarBaseDirective {
|
|
|
31711
31694
|
case 'month':
|
|
31712
31695
|
return `${this.resourceStrings.igx_calendar_next_month}, ${detail}`;
|
|
31713
31696
|
case 'year':
|
|
31714
|
-
return this.resourceStrings.igx_calendar_next_year
|
|
31697
|
+
return this.resourceStrings.igx_calendar_next_year;
|
|
31715
31698
|
case 'decade':
|
|
31716
31699
|
return this.resourceStrings.igx_calendar_next_years.replace('{0}', '15');
|
|
31717
31700
|
}
|
|
@@ -34141,7 +34124,7 @@ class IgxMonthPickerComponent extends IgxCalendarBaseDirective {
|
|
|
34141
34124
|
multi: false,
|
|
34142
34125
|
provide: KeyboardNavigationService
|
|
34143
34126
|
},
|
|
34144
|
-
], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "monthsView", first: true, predicate: ["months"], descendants: true, read: IgxMonthsViewComponent }, { propertyName: "dacadeView", first: true, predicate: ["decade"], descendants: true, read: IgxYearsViewComponent }, { propertyName: "daysView", first: true, predicate: ["days"], descendants: true, read: IgxDaysViewComponent }, { propertyName: "yearsBtn", first: true, predicate: ["yearsBtn"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Previous arrow icon -->\n<ng-template #prevArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_prev\"></igx-icon>\n</ng-template>\n\n<!-- Next arrow icon -->\n<ng-template #nextArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_next\"></igx-icon>\n</ng-template>\n\n<!-- Previous picker button -->\n<ng-template #prevPageButton let-obj>\n <div\n #prevPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__prev\"\n role=\"button\"\n [attr.aria-label]=\"prevNavLabel((getPrevYearDate(viewDate) | date: '
|
|
34127
|
+
], viewQueries: [{ propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true }, { propertyName: "monthsView", first: true, predicate: ["months"], descendants: true, read: IgxMonthsViewComponent }, { propertyName: "dacadeView", first: true, predicate: ["decade"], descendants: true, read: IgxYearsViewComponent }, { propertyName: "daysView", first: true, predicate: ["days"], descendants: true, read: IgxDaysViewComponent }, { propertyName: "yearsBtn", first: true, predicate: ["yearsBtn"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- Previous arrow icon -->\n<ng-template #prevArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_prev\"></igx-icon>\n</ng-template>\n\n<!-- Next arrow icon -->\n<ng-template #nextArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_next\"></igx-icon>\n</ng-template>\n\n<!-- Previous picker button -->\n<ng-template #prevPageButton let-obj>\n <div\n #prevPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__prev\"\n role=\"button\"\n [attr.aria-label]=\"prevNavLabel((getPrevYearDate(viewDate) | date: 'yyyy'))\"\n data-action=\"prev\"\n igxCalendarScrollPage\n (mousedown)=\"previousPage()\"\n (keydown)=\"changePageKB($event, false)\"\n >\n <ng-container *ngTemplateOutlet=\"prevArrow\"></ng-container>\n </div>\n</ng-template>\n\n<!-- Next picker button -->\n<ng-template #nextPageButton let-obj>\n <div\n #nextPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__next\"\n role=\"button\"\n [attr.aria-label]=\"nextNavLabel((getNextYearDate(viewDate) | date: 'yyyy'))\"\n data-action=\"next\"\n igxCalendarScrollPage\n (mousedown)=\"nextPage()\"\n (keydown)=\"changePageKB($event)\"\n >\n <ng-container *ngTemplateOutlet=\"nextArrow\"></ng-container>\n </div>\n</ng-template>\n\n<!-- Year -->\n<ng-template #defaultYear let-obj>\n @if (activeView === 'year') {\n <span class=\"igx-calendar__aria-off-screen\" aria-live=\"polite\">{{ formattedYear(obj.date) }}</span>\n }\n <span\n #yearsBtn\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"(obj.date | date: 'yyyy') + ', ' + resourceStrings.igx_calendar_select_year\"\n (keydown)=\"onActiveViewDecadeKB(obj.date, $event, obj.index)\"\n (mousedown)=\"onActiveViewDecade($event, obj.date, obj.index)\"\n class=\"igx-calendar-picker__date\">\n {{ formattedYear(obj.date) }}\n </span>\n</ng-template>\n\n<!-- Decade -->\n<ng-template #defaultDecade>\n <span>{{ getDecadeRange().start }} - {{ getDecadeRange().end }}</span>\n</ng-template>\n\n<!-- PICKER IN MONTHS -->\n<ng-template #calendarYearPicker>\n <section class=\"igx-calendar-picker\">\n <div class=\"igx-calendar-picker__dates\">\n <ng-container\n *ngTemplateOutlet=\"defaultYear; context: getContext(0)\">\n </ng-container>\n </div>\n <div class=\"igx-calendar-picker__nav\">\n <ng-container *ngTemplateOutlet=\"prevPageButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"nextPageButton\"></ng-container>\n </div>\n </section>\n</ng-template>\n\n<!-- PICKER IN YEARS -->\n<ng-template #calendarDecadePicker>\n <section class=\"igx-calendar-picker\">\n <div class=\"igx-calendar-picker__dates\" aria-live=\"polite\">\n <ng-container\n *ngTemplateOutlet=\"defaultDecade;\">\n </ng-container>\n </div>\n <div class=\"igx-calendar-picker__nav\">\n <ng-container *ngTemplateOutlet=\"prevPageButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"nextPageButton\"></ng-container>\n </div>\n </section>\n</ng-template>\n\n<div\n #wrapper\n [tabIndex]=\"0\"\n class=\"igx-calendar__wrapper\"\n [attr.aria-activedescendant]=\"activeDescendant\"\n [attr.aria-multiselectable]=\"selection !== 'single'\"\n aria-labelledby=\"calendar-desc\"\n role=\"grid\"\n (focus)=\"this.onWrapperFocus($event)\"\n (blur)=\"this.onWrapperBlur($event)\"\n >\n <caption id=\"calendar-desc\" tabindex=\"-1\" class=\"igx-calendar__aria-off-screen\">\n {{ resourceStrings.igx_calendar_singular_single_selection}}\n </caption>\n\n <section class=\"igx-calendar__pickers\">\n @if (isDefaultView) {\n <ng-container *ngTemplateOutlet=\"calendarYearPicker\"></ng-container>\n }\n\n @if (isDecadeView) {\n <ng-container *ngTemplateOutlet=\"calendarDecadePicker\"></ng-container>\n }\n </section>\n\n <section class=\"igx-calendar__body\">\n @if (isDefaultView) {\n <igx-months-view\n #months\n role=\"rowgroup\"\n [tabIndex]=\"-1\"\n [date]=\"viewDate\"\n [locale]=\"locale\"\n [formatView]=\"formatViews.month\"\n [monthFormat]=\"formatOptions.month\"\n [showActive]=\"showActiveDay\"\n [standalone]=\"false\"\n (swiperight)=\"previousPage()\"\n (swipeleft)=\"nextPage()\"\n (selected)=\"selectMonth($event)\"\n (pageChanged)=\"updateDate($event)\"\n (mousedown)=\"$event.preventDefault()\">\n >\n </igx-months-view>\n }\n\n @if (isDecadeView) {\n <igx-years-view\n #decade\n role=\"rowgroup\"\n [tabIndex]=\"-1\"\n [date]=\"viewDate\"\n [locale]=\"locale\"\n [formatView]=\"formatViews.year\"\n [yearFormat]=\"formatOptions.year\"\n [showActive]=\"showActiveDay\"\n [standalone]=\"false\"\n (swiperight)=\"previousPage()\"\n (swipeleft)=\"nextPage()\"\n (selected)=\"selectYear($event)\"\n (pageChanged)=\"updateDate($event)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n </igx-years-view>\n }\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["family", "name", "active"] }, { kind: "component", type: IgxMonthsViewComponent, selector: "igx-months-view", inputs: ["id", "standalone", "monthFormat", "formatView"] }, { kind: "component", type: IgxYearsViewComponent, selector: "igx-years-view", inputs: ["standalone", "yearFormat"] }] }); }
|
|
34145
34128
|
}
|
|
34146
34129
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgxMonthPickerComponent, decorators: [{
|
|
34147
34130
|
type: Component,
|
|
@@ -34161,7 +34144,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
34161
34144
|
IgxIconComponent,
|
|
34162
34145
|
IgxMonthsViewComponent,
|
|
34163
34146
|
IgxYearsViewComponent,
|
|
34164
|
-
], template: "<!-- Previous arrow icon -->\n<ng-template #prevArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_prev\"></igx-icon>\n</ng-template>\n\n<!-- Next arrow icon -->\n<ng-template #nextArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_next\"></igx-icon>\n</ng-template>\n\n<!-- Previous picker button -->\n<ng-template #prevPageButton let-obj>\n <div\n #prevPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__prev\"\n role=\"button\"\n [attr.aria-label]=\"prevNavLabel((getPrevYearDate(viewDate) | date: '
|
|
34147
|
+
], template: "<!-- Previous arrow icon -->\n<ng-template #prevArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_prev\"></igx-icon>\n</ng-template>\n\n<!-- Next arrow icon -->\n<ng-template #nextArrow let-obj>\n <igx-icon aria-hidden=\"true\" family=\"default\" name=\"arrow_next\"></igx-icon>\n</ng-template>\n\n<!-- Previous picker button -->\n<ng-template #prevPageButton let-obj>\n <div\n #prevPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__prev\"\n role=\"button\"\n [attr.aria-label]=\"prevNavLabel((getPrevYearDate(viewDate) | date: 'yyyy'))\"\n data-action=\"prev\"\n igxCalendarScrollPage\n (mousedown)=\"previousPage()\"\n (keydown)=\"changePageKB($event, false)\"\n >\n <ng-container *ngTemplateOutlet=\"prevArrow\"></ng-container>\n </div>\n</ng-template>\n\n<!-- Next picker button -->\n<ng-template #nextPageButton let-obj>\n <div\n #nextPageBtn\n tabindex=\"0\"\n class=\"igx-calendar-picker__next\"\n role=\"button\"\n [attr.aria-label]=\"nextNavLabel((getNextYearDate(viewDate) | date: 'yyyy'))\"\n data-action=\"next\"\n igxCalendarScrollPage\n (mousedown)=\"nextPage()\"\n (keydown)=\"changePageKB($event)\"\n >\n <ng-container *ngTemplateOutlet=\"nextArrow\"></ng-container>\n </div>\n</ng-template>\n\n<!-- Year -->\n<ng-template #defaultYear let-obj>\n @if (activeView === 'year') {\n <span class=\"igx-calendar__aria-off-screen\" aria-live=\"polite\">{{ formattedYear(obj.date) }}</span>\n }\n <span\n #yearsBtn\n tabindex=\"0\"\n role=\"button\"\n [attr.aria-label]=\"(obj.date | date: 'yyyy') + ', ' + resourceStrings.igx_calendar_select_year\"\n (keydown)=\"onActiveViewDecadeKB(obj.date, $event, obj.index)\"\n (mousedown)=\"onActiveViewDecade($event, obj.date, obj.index)\"\n class=\"igx-calendar-picker__date\">\n {{ formattedYear(obj.date) }}\n </span>\n</ng-template>\n\n<!-- Decade -->\n<ng-template #defaultDecade>\n <span>{{ getDecadeRange().start }} - {{ getDecadeRange().end }}</span>\n</ng-template>\n\n<!-- PICKER IN MONTHS -->\n<ng-template #calendarYearPicker>\n <section class=\"igx-calendar-picker\">\n <div class=\"igx-calendar-picker__dates\">\n <ng-container\n *ngTemplateOutlet=\"defaultYear; context: getContext(0)\">\n </ng-container>\n </div>\n <div class=\"igx-calendar-picker__nav\">\n <ng-container *ngTemplateOutlet=\"prevPageButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"nextPageButton\"></ng-container>\n </div>\n </section>\n</ng-template>\n\n<!-- PICKER IN YEARS -->\n<ng-template #calendarDecadePicker>\n <section class=\"igx-calendar-picker\">\n <div class=\"igx-calendar-picker__dates\" aria-live=\"polite\">\n <ng-container\n *ngTemplateOutlet=\"defaultDecade;\">\n </ng-container>\n </div>\n <div class=\"igx-calendar-picker__nav\">\n <ng-container *ngTemplateOutlet=\"prevPageButton\"></ng-container>\n <ng-container *ngTemplateOutlet=\"nextPageButton\"></ng-container>\n </div>\n </section>\n</ng-template>\n\n<div\n #wrapper\n [tabIndex]=\"0\"\n class=\"igx-calendar__wrapper\"\n [attr.aria-activedescendant]=\"activeDescendant\"\n [attr.aria-multiselectable]=\"selection !== 'single'\"\n aria-labelledby=\"calendar-desc\"\n role=\"grid\"\n (focus)=\"this.onWrapperFocus($event)\"\n (blur)=\"this.onWrapperBlur($event)\"\n >\n <caption id=\"calendar-desc\" tabindex=\"-1\" class=\"igx-calendar__aria-off-screen\">\n {{ resourceStrings.igx_calendar_singular_single_selection}}\n </caption>\n\n <section class=\"igx-calendar__pickers\">\n @if (isDefaultView) {\n <ng-container *ngTemplateOutlet=\"calendarYearPicker\"></ng-container>\n }\n\n @if (isDecadeView) {\n <ng-container *ngTemplateOutlet=\"calendarDecadePicker\"></ng-container>\n }\n </section>\n\n <section class=\"igx-calendar__body\">\n @if (isDefaultView) {\n <igx-months-view\n #months\n role=\"rowgroup\"\n [tabIndex]=\"-1\"\n [date]=\"viewDate\"\n [locale]=\"locale\"\n [formatView]=\"formatViews.month\"\n [monthFormat]=\"formatOptions.month\"\n [showActive]=\"showActiveDay\"\n [standalone]=\"false\"\n (swiperight)=\"previousPage()\"\n (swipeleft)=\"nextPage()\"\n (selected)=\"selectMonth($event)\"\n (pageChanged)=\"updateDate($event)\"\n (mousedown)=\"$event.preventDefault()\">\n >\n </igx-months-view>\n }\n\n @if (isDecadeView) {\n <igx-years-view\n #decade\n role=\"rowgroup\"\n [tabIndex]=\"-1\"\n [date]=\"viewDate\"\n [locale]=\"locale\"\n [formatView]=\"formatViews.year\"\n [yearFormat]=\"formatOptions.year\"\n [showActive]=\"showActiveDay\"\n [standalone]=\"false\"\n (swiperight)=\"previousPage()\"\n (swipeleft)=\"nextPage()\"\n (selected)=\"selectYear($event)\"\n (pageChanged)=\"updateDate($event)\"\n (mousedown)=\"$event.preventDefault()\"\n >\n </igx-years-view>\n }\n </section>\n</div>\n" }]
|
|
34165
34148
|
}], propDecorators: { id: [{
|
|
34166
34149
|
type: HostBinding,
|
|
34167
34150
|
args: ["attr.id"]
|
|
@@ -43041,7 +43024,7 @@ class IgxGridCell {
|
|
|
43041
43024
|
// will return undefined for a column layout, because getCellByColumnVisibleIndex may return the column layout at that index.
|
|
43042
43025
|
// getCellByColumnVisibleIndex is deprecated and will be removed in future version
|
|
43043
43026
|
return this.column.field ?
|
|
43044
|
-
this.column.hasNestedPath ? resolveNestedPath(this.row?.data, this.column.field) : this.row?.data[this.column.field]
|
|
43027
|
+
this.column.hasNestedPath ? resolveNestedPath(this.row?.data, columnFieldPath(this.column.field)) : this.row?.data[this.column.field]
|
|
43045
43028
|
: undefined;
|
|
43046
43029
|
}
|
|
43047
43030
|
/**
|
|
@@ -61048,10 +61031,11 @@ class IgxGridCellStyleClassesPipe {
|
|
|
61048
61031
|
return '';
|
|
61049
61032
|
}
|
|
61050
61033
|
const result = [];
|
|
61034
|
+
const pathParts = columnFieldPath(field);
|
|
61051
61035
|
for (const cssClass of Object.keys(cssClasses)) {
|
|
61052
61036
|
const callbackOrValue = cssClasses[cssClass];
|
|
61053
61037
|
const apply = typeof callbackOrValue === 'function' ?
|
|
61054
|
-
callbackOrValue(data, field, resolveNestedPath(data,
|
|
61038
|
+
callbackOrValue(data, field, resolveNestedPath(data, pathParts), index) : callbackOrValue;
|
|
61055
61039
|
if (apply) {
|
|
61056
61040
|
result.push(cssClass);
|
|
61057
61041
|
}
|
|
@@ -61078,9 +61062,10 @@ class IgxGridCellStylesPipe {
|
|
|
61078
61062
|
if (!styles) {
|
|
61079
61063
|
return css;
|
|
61080
61064
|
}
|
|
61065
|
+
const pathParts = columnFieldPath(field);
|
|
61081
61066
|
for (const prop of Object.keys(styles)) {
|
|
61082
61067
|
const res = styles[prop];
|
|
61083
|
-
css[prop] = typeof res === 'function' ? res(data, field, resolveNestedPath(data,
|
|
61068
|
+
css[prop] = typeof res === 'function' ? res(data, field, resolveNestedPath(data, pathParts), index) : res;
|
|
61084
61069
|
}
|
|
61085
61070
|
return css;
|
|
61086
61071
|
}
|
|
@@ -61374,7 +61359,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
|
|
|
61374
61359
|
}] }], propDecorators: { transform: [] } });
|
|
61375
61360
|
class IgxGridDataMapperPipe {
|
|
61376
61361
|
transform(data, field, _, val, isNestedPath) {
|
|
61377
|
-
return isNestedPath ? resolveNestedPath(data, field) : val;
|
|
61362
|
+
return isNestedPath ? resolveNestedPath(data, columnFieldPath(field)) : val;
|
|
61378
61363
|
}
|
|
61379
61364
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgxGridDataMapperPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
61380
61365
|
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: IgxGridDataMapperPipe, isStandalone: true, name: "dataMapper" }); }
|
|
@@ -61405,14 +61390,14 @@ class IgxGridTransactionStatePipe {
|
|
|
61405
61390
|
if (rowEditable) {
|
|
61406
61391
|
const rowCurrentState = transactions.getAggregatedValue(row_id, false);
|
|
61407
61392
|
if (rowCurrentState) {
|
|
61408
|
-
const value = resolveNestedPath(rowCurrentState, field);
|
|
61393
|
+
const value = resolveNestedPath(rowCurrentState, columnFieldPath(field));
|
|
61409
61394
|
return value !== undefined && value !== null;
|
|
61410
61395
|
}
|
|
61411
61396
|
}
|
|
61412
61397
|
else {
|
|
61413
61398
|
const transaction = transactions.getState(row_id);
|
|
61414
|
-
const value = resolveNestedPath(transaction?.value ?? {}, field);
|
|
61415
|
-
return transaction
|
|
61399
|
+
const value = resolveNestedPath(transaction?.value ?? {}, columnFieldPath(field));
|
|
61400
|
+
return transaction?.value && (value || value === 0 || value === false);
|
|
61416
61401
|
}
|
|
61417
61402
|
}
|
|
61418
61403
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: IgxGridTransactionStatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
@@ -62773,7 +62758,7 @@ class IgxGridValidationService {
|
|
|
62773
62758
|
* @internal
|
|
62774
62759
|
*/
|
|
62775
62760
|
addFormControl(formGroup, data, column) {
|
|
62776
|
-
const value = resolveNestedPath(data || {}, column.field);
|
|
62761
|
+
const value = resolveNestedPath(data || {}, columnFieldPath(column.field));
|
|
62777
62762
|
const field = this.getFieldKey(column.field);
|
|
62778
62763
|
const control = new FormControl(value, { updateOn: this.grid.validationTrigger });
|
|
62779
62764
|
control.addValidators(column.validators);
|
|
@@ -63690,7 +63675,7 @@ class IgxGridSummaryService {
|
|
|
63690
63675
|
}
|
|
63691
63676
|
if (!args) {
|
|
63692
63677
|
this.summaryCacheMap.clear();
|
|
63693
|
-
if (this.grid
|
|
63678
|
+
if (this.grid?.rootSummariesEnabled) {
|
|
63694
63679
|
this.retriggerRootPipe++;
|
|
63695
63680
|
}
|
|
63696
63681
|
return;
|
|
@@ -63779,15 +63764,17 @@ class IgxGridSummaryService {
|
|
|
63779
63764
|
if (!this.hasSummarizedColumns || !data) {
|
|
63780
63765
|
return rowSummaries;
|
|
63781
63766
|
}
|
|
63782
|
-
this.grid.columns.filter(col => col.hasSummary)
|
|
63767
|
+
const columns = this.grid.columns.filter(col => col.hasSummary);
|
|
63768
|
+
const columnPathParts = columns.map(col => columnFieldPath(col.field));
|
|
63769
|
+
for (const [idx, column] of columns.entries()) {
|
|
63783
63770
|
if (!rowSummaries.get(column.field)) {
|
|
63784
|
-
let summaryResult = column.summaries.operate(data.map(r => resolveNestedPath(r,
|
|
63771
|
+
let summaryResult = column.summaries.operate(data.map(r => resolveNestedPath(r, columnPathParts[idx])), data, column.field, groupRecord, this.grid.locale, column.pipeArgs);
|
|
63785
63772
|
summaryResult = column.disabledSummaries.length > 0
|
|
63786
63773
|
? summaryResult.filter(s => !column.disabledSummaries.includes(s.key))
|
|
63787
63774
|
: summaryResult;
|
|
63788
63775
|
rowSummaries.set(column.field, summaryResult);
|
|
63789
63776
|
}
|
|
63790
|
-
}
|
|
63777
|
+
}
|
|
63791
63778
|
return rowSummaries;
|
|
63792
63779
|
}
|
|
63793
63780
|
resetSummaryHeight() {
|
|
@@ -69798,7 +69785,7 @@ class IgxGridBaseDirective {
|
|
|
69798
69785
|
const key = this.type !== 'pivot' && headers ? col.header || col.field : col.field;
|
|
69799
69786
|
const rowData = source[row].ghostRecord ? source[row].recordRef : source[row];
|
|
69800
69787
|
const value = this.type === 'pivot' ? rowData.aggregationValues.get(col.field)
|
|
69801
|
-
: resolveNestedPath(rowData, col.field);
|
|
69788
|
+
: resolveNestedPath(rowData, columnFieldPath(col.field));
|
|
69802
69789
|
record[key] = formatters && col.formatter ? col.formatter(value, rowData) : value;
|
|
69803
69790
|
if (columnData) {
|
|
69804
69791
|
if (!record[key]) {
|
|
@@ -70267,14 +70254,15 @@ class IgxGridBaseDirective {
|
|
|
70267
70254
|
const searchText = caseSensitive ? this._lastSearchInfo.searchText : this._lastSearchInfo.searchText.toLowerCase();
|
|
70268
70255
|
const data = this.filteredSortedData;
|
|
70269
70256
|
const columnItems = this.visibleColumns.filter((c) => !c.columnGroup).sort((c1, c2) => c1.visibleIndex - c2.visibleIndex);
|
|
70257
|
+
const columnsPathParts = columnItems.map(col => columnFieldPath(col.field));
|
|
70270
70258
|
data.forEach((dataRow, rowIndex) => {
|
|
70271
|
-
columnItems.forEach((c) => {
|
|
70259
|
+
columnItems.forEach((c, cid) => {
|
|
70272
70260
|
const pipeArgs = this.getColumnByName(c.field).pipeArgs;
|
|
70273
|
-
const value = c.formatter ? c.formatter(resolveNestedPath(dataRow,
|
|
70274
|
-
c.dataType === 'number' ? formatNumber(resolveNestedPath(dataRow,
|
|
70261
|
+
const value = c.formatter ? c.formatter(resolveNestedPath(dataRow, columnsPathParts[cid]), dataRow) :
|
|
70262
|
+
c.dataType === 'number' ? formatNumber(resolveNestedPath(dataRow, columnsPathParts[cid]), this.locale, pipeArgs.digitsInfo) :
|
|
70275
70263
|
c.dataType === 'date'
|
|
70276
|
-
? formatDate(resolveNestedPath(dataRow,
|
|
70277
|
-
: resolveNestedPath(dataRow,
|
|
70264
|
+
? formatDate(resolveNestedPath(dataRow, columnsPathParts[cid]), pipeArgs.format, this.locale, pipeArgs.timezone)
|
|
70265
|
+
: resolveNestedPath(dataRow, columnsPathParts[cid]);
|
|
70278
70266
|
if (value !== undefined && value !== null && c.searchable) {
|
|
70279
70267
|
let searchValue = caseSensitive ? String(value) : String(value).toLowerCase();
|
|
70280
70268
|
if (exactMatch) {
|
|
@@ -77299,10 +77287,11 @@ class IgxPivotGridCellStyleClassesPipe {
|
|
|
77299
77287
|
return '';
|
|
77300
77288
|
}
|
|
77301
77289
|
const result = [];
|
|
77290
|
+
const pathParts = columnFieldPath(columnData.field);
|
|
77302
77291
|
for (const cssClass of Object.keys(cssClasses)) {
|
|
77303
77292
|
const callbackOrValue = cssClasses[cssClass];
|
|
77304
77293
|
const apply = typeof callbackOrValue === 'function' ?
|
|
77305
|
-
callbackOrValue(rowData, columnData, resolveNestedPath(rowData,
|
|
77294
|
+
callbackOrValue(rowData, columnData, resolveNestedPath(rowData, pathParts), index) : callbackOrValue;
|
|
77306
77295
|
if (apply) {
|
|
77307
77296
|
result.push(cssClass);
|
|
77308
77297
|
}
|
|
@@ -86194,7 +86183,7 @@ class IgxGridHierarchicalPipe {
|
|
|
86194
86183
|
v[childKey] = [];
|
|
86195
86184
|
}
|
|
86196
86185
|
const hasNestedPath = childKey?.includes('.');
|
|
86197
|
-
const childData = !hasNestedPath ? v[childKey] : resolveNestedPath(v, childKey);
|
|
86186
|
+
const childData = !hasNestedPath ? v[childKey] : resolveNestedPath(v, columnFieldPath(childKey));
|
|
86198
86187
|
childGridsData[childKey] = childData;
|
|
86199
86188
|
});
|
|
86200
86189
|
if (grid.gridAPI.get_row_expansion_state(v)) {
|