igniteui-angular 16.1.16 → 16.1.18
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/esm2022/lib/buttonGroup/buttonGroup.component.mjs +60 -24
- package/esm2022/lib/calendar/calendar-base.mjs +6 -4
- package/esm2022/lib/directives/button/button.directive.mjs +10 -5
- package/esm2022/lib/grids/columns/column-group.component.mjs +15 -2
- package/esm2022/lib/grids/grid-base.directive.mjs +43 -35
- package/esm2022/lib/grids/hierarchical-grid/hierarchical-grid.component.mjs +25 -18
- package/esm2022/lib/services/excel/excel-files.mjs +5 -4
- package/esm2022/lib/services/exporter-common/base-export-service.mjs +2 -2
- package/fesm2022/igniteui-angular.mjs +157 -85
- package/fesm2022/igniteui-angular.mjs.map +1 -1
- package/lib/buttonGroup/buttonGroup.component.d.ts +5 -1
- package/lib/directives/button/button.directive.d.ts +3 -2
- package/lib/grids/grid-base.directive.d.ts +1 -0
- package/lib/grids/hierarchical-grid/hierarchical-grid.component.d.ts +4 -0
- package/package.json +1 -1
|
@@ -4050,7 +4050,7 @@ class IgxBaseExporter {
|
|
|
4050
4050
|
let currKey = '';
|
|
4051
4051
|
let summaryKey = '';
|
|
4052
4052
|
if (this._setChildSummaries) {
|
|
4053
|
-
currKey = `'${
|
|
4053
|
+
currKey = `'${record.expression.fieldName}': '${recordVal}'`;
|
|
4054
4054
|
summaryKeysArr = summaryKeysArr.filter(a => a !== previousKey);
|
|
4055
4055
|
previousKey = currKey;
|
|
4056
4056
|
summaryKeysArr.push(currKey);
|
|
@@ -5193,7 +5193,7 @@ class WorksheetFile {
|
|
|
5193
5193
|
if (worksheetData.hasSummaries && (isValidRecordType || (worksheetData.isGroupedGrid && isSummaryRecord))) {
|
|
5194
5194
|
this.setSummaryCoordinates(columnName, key, fullRow.hierarchicalOwner, worksheetData.isGroupedGrid && isSummaryRecord);
|
|
5195
5195
|
}
|
|
5196
|
-
if (fullRow.summaryKey && fullRow.summaryKey === GRID_ROOT_SUMMARY && key !== GRID_LEVEL_COL &&
|
|
5196
|
+
if (fullRow.summaryKey && fullRow.summaryKey === GRID_ROOT_SUMMARY && key !== GRID_LEVEL_COL && worksheetData.isGroupedGrid) {
|
|
5197
5197
|
this.setRootSummaryStartCoordinate(column, key);
|
|
5198
5198
|
if (this.firstColumn > column) {
|
|
5199
5199
|
this.setRootSummaryStartCoordinate(worksheetData.columnCount + 1, GRID_LEVEL_COL);
|
|
@@ -5337,8 +5337,9 @@ class WorksheetFile {
|
|
|
5337
5337
|
}
|
|
5338
5338
|
setRootSummaryStartCoordinate(column, key) {
|
|
5339
5339
|
const firstDataRecordColName = ExcelStrings.getExcelColumn(column) + (this.firstDataRow);
|
|
5340
|
-
|
|
5341
|
-
|
|
5340
|
+
const targetMap = this.hierarchicalDimensionMap.get(GRID_PARENT);
|
|
5341
|
+
if (targetMap.get(key).startCoordinate !== firstDataRecordColName) {
|
|
5342
|
+
targetMap.get(key).startCoordinate = firstDataRecordColName;
|
|
5342
5343
|
}
|
|
5343
5344
|
}
|
|
5344
5345
|
printHeaders(worksheetData, headersForLevel, i, isVertical) {
|
|
@@ -10135,9 +10136,7 @@ class IgxButtonDirective extends DisplayDensityBase {
|
|
|
10135
10136
|
set selected(value) {
|
|
10136
10137
|
if (this._selected !== value) {
|
|
10137
10138
|
this._selected = value;
|
|
10138
|
-
this.
|
|
10139
|
-
button: this
|
|
10140
|
-
});
|
|
10139
|
+
this._renderer.setAttribute(this.nativeElement, 'data-selected', value.toString());
|
|
10141
10140
|
}
|
|
10142
10141
|
}
|
|
10143
10142
|
get selected() {
|
|
@@ -10182,6 +10181,13 @@ class IgxButtonDirective extends DisplayDensityBase {
|
|
|
10182
10181
|
*/
|
|
10183
10182
|
this._selected = false;
|
|
10184
10183
|
}
|
|
10184
|
+
ngAfterContentInit() {
|
|
10185
|
+
this.nativeElement.addEventListener('click', () => {
|
|
10186
|
+
this.buttonSelected.emit({
|
|
10187
|
+
button: this
|
|
10188
|
+
});
|
|
10189
|
+
});
|
|
10190
|
+
}
|
|
10185
10191
|
/**
|
|
10186
10192
|
* @hidden
|
|
10187
10193
|
* @internal
|
|
@@ -10328,7 +10334,7 @@ class IgxButtonDirective extends DisplayDensityBase {
|
|
|
10328
10334
|
* @internal
|
|
10329
10335
|
*/
|
|
10330
10336
|
deselect() {
|
|
10331
|
-
this.
|
|
10337
|
+
this.selected = false;
|
|
10332
10338
|
}
|
|
10333
10339
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: IgxButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
10334
10340
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.8", type: IgxButtonDirective, isStandalone: true, selector: "[igxButton]", inputs: { selected: "selected", type: ["igxButton", "type"], color: ["igxButtonColor", "color"], background: ["igxButtonBackground", "background"], label: ["igxLabel", "label"], disabled: "disabled" }, outputs: { buttonClick: "buttonClick", buttonSelected: "buttonSelected" }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.role": "this.role", "class.igx-button": "this._cssClass", "class.igx-button--disabled": "this.disabled", "class.igx-button--flat": "this.flat", "class.igx-button--raised": "this.raised", "class.igx-button--outlined": "this.outlined", "class.igx-button--icon": "this.icon", "class.igx-button--fab": "this.fab", "style.--component-size": "this.componentSize", "attr.disabled": "this.disabledAttribute" } }, usesInheritance: true, ngImport: i0 }); }
|
|
@@ -29633,10 +29639,14 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29633
29639
|
*/
|
|
29634
29640
|
this.selectedIndexes = [];
|
|
29635
29641
|
this.buttonClickNotifier$ = new Subject();
|
|
29636
|
-
this.buttonSelectedNotifier$ = new Subject();
|
|
29637
29642
|
this.queryListNotifier$ = new Subject();
|
|
29638
29643
|
this._disabled = false;
|
|
29639
29644
|
this._selectionMode = 'single';
|
|
29645
|
+
this.observerConfig = {
|
|
29646
|
+
attributeFilter: ["data-selected"],
|
|
29647
|
+
childList: true,
|
|
29648
|
+
subtree: true,
|
|
29649
|
+
};
|
|
29640
29650
|
}
|
|
29641
29651
|
/**
|
|
29642
29652
|
* Gets the selected button/buttons.
|
|
@@ -29668,6 +29678,7 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29668
29678
|
if (index >= this.buttons.length || index < 0) {
|
|
29669
29679
|
return;
|
|
29670
29680
|
}
|
|
29681
|
+
this.updateSelected(index);
|
|
29671
29682
|
const button = this.buttons[index];
|
|
29672
29683
|
button.select();
|
|
29673
29684
|
}
|
|
@@ -29680,24 +29691,19 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29680
29691
|
if (this.selectedIndexes.indexOf(index) === -1) {
|
|
29681
29692
|
this.selectedIndexes.push(index);
|
|
29682
29693
|
}
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
|
|
29688
|
-
this.values[indexInViewButtons].selected = true;
|
|
29689
|
-
}
|
|
29690
|
-
// deselect other buttons if selectionMode is not multi
|
|
29691
|
-
if (this.selectionMode !== 'multi' && this.selectedIndexes.length > 1) {
|
|
29692
|
-
this.buttons.forEach((_, i) => {
|
|
29693
|
-
if (i !== index && this.selectedIndexes.indexOf(i) !== -1) {
|
|
29694
|
-
this.deselectButton(i);
|
|
29695
|
-
}
|
|
29696
|
-
});
|
|
29697
|
-
}
|
|
29694
|
+
this._renderer.setAttribute(button.nativeElement, 'aria-pressed', 'true');
|
|
29695
|
+
this._renderer.addClass(button.nativeElement, 'igx-button-group__item--selected');
|
|
29696
|
+
const indexInViewButtons = this.viewButtons.toArray().indexOf(button);
|
|
29697
|
+
if (indexInViewButtons !== -1) {
|
|
29698
|
+
this.values[indexInViewButtons].selected = true;
|
|
29698
29699
|
}
|
|
29699
|
-
|
|
29700
|
-
|
|
29700
|
+
// deselect other buttons if selectionMode is not multi
|
|
29701
|
+
if (this.selectionMode !== 'multi' && this.selectedIndexes.length > 1) {
|
|
29702
|
+
this.buttons.forEach((_, i) => {
|
|
29703
|
+
if (i !== index && this.selectedIndexes.indexOf(i) !== -1) {
|
|
29704
|
+
this.deselectButton(i);
|
|
29705
|
+
}
|
|
29706
|
+
});
|
|
29701
29707
|
}
|
|
29702
29708
|
}
|
|
29703
29709
|
/**
|
|
@@ -29756,15 +29762,14 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29756
29762
|
this.updateSelected(index);
|
|
29757
29763
|
}
|
|
29758
29764
|
button.buttonClick.pipe(takeUntil(this.buttonClickNotifier$)).subscribe((_) => this._clickHandler(index));
|
|
29759
|
-
button.buttonSelected
|
|
29760
|
-
.pipe(takeUntil(this.buttonSelectedNotifier$))
|
|
29761
|
-
.subscribe((_) => this.updateSelected(index));
|
|
29762
29765
|
});
|
|
29763
29766
|
};
|
|
29764
29767
|
this.viewButtons.changes.pipe(takeUntil(this.queryListNotifier$)).subscribe(() => initButtons());
|
|
29765
29768
|
this.templateButtons.changes.pipe(takeUntil(this.queryListNotifier$)).subscribe(() => initButtons());
|
|
29766
29769
|
initButtons();
|
|
29767
29770
|
this._cdr.detectChanges();
|
|
29771
|
+
this.mutationObserver = this.setMutationsObserver();
|
|
29772
|
+
this.mutationObserver.observe(this._el.nativeElement, this.observerConfig);
|
|
29768
29773
|
}
|
|
29769
29774
|
/**
|
|
29770
29775
|
* @hidden
|
|
@@ -29772,15 +29777,15 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29772
29777
|
ngOnDestroy() {
|
|
29773
29778
|
this.buttonClickNotifier$.next();
|
|
29774
29779
|
this.buttonClickNotifier$.complete();
|
|
29775
|
-
this.buttonSelectedNotifier$.next();
|
|
29776
|
-
this.buttonSelectedNotifier$.complete();
|
|
29777
29780
|
this.queryListNotifier$.next();
|
|
29778
29781
|
this.queryListNotifier$.complete();
|
|
29782
|
+
this.mutationObserver.disconnect();
|
|
29779
29783
|
}
|
|
29780
29784
|
/**
|
|
29781
29785
|
* @hidden
|
|
29782
29786
|
*/
|
|
29783
29787
|
_clickHandler(index) {
|
|
29788
|
+
this.mutationObserver.disconnect();
|
|
29784
29789
|
const button = this.buttons[index];
|
|
29785
29790
|
const args = { owner: this, button, index };
|
|
29786
29791
|
if (this.selectionMode !== 'multi') {
|
|
@@ -29800,6 +29805,43 @@ class IgxButtonGroupComponent extends DisplayDensityBase {
|
|
|
29800
29805
|
this.deselected.emit(args);
|
|
29801
29806
|
}
|
|
29802
29807
|
}
|
|
29808
|
+
this.mutationObserver.observe(this._el.nativeElement, this.observerConfig);
|
|
29809
|
+
}
|
|
29810
|
+
setMutationsObserver() {
|
|
29811
|
+
return new MutationObserver((records, observer) => {
|
|
29812
|
+
// Stop observing while handling changes
|
|
29813
|
+
observer.disconnect();
|
|
29814
|
+
const updatedButtons = this.getUpdatedButtons(records);
|
|
29815
|
+
if (updatedButtons.length > 0) {
|
|
29816
|
+
updatedButtons.forEach((button) => {
|
|
29817
|
+
const index = this.buttons.map((b) => b.nativeElement).indexOf(button);
|
|
29818
|
+
const args = { owner: this, button: this.buttons[index], index };
|
|
29819
|
+
this.updateButtonSelectionState(index, args);
|
|
29820
|
+
});
|
|
29821
|
+
}
|
|
29822
|
+
// Watch for changes again
|
|
29823
|
+
observer.observe(this._el.nativeElement, this.observerConfig);
|
|
29824
|
+
});
|
|
29825
|
+
}
|
|
29826
|
+
getUpdatedButtons(records) {
|
|
29827
|
+
const updated = [];
|
|
29828
|
+
records
|
|
29829
|
+
.filter((x) => x.type === 'attributes')
|
|
29830
|
+
.reduce((prev, curr) => {
|
|
29831
|
+
prev.push(curr.target);
|
|
29832
|
+
return prev;
|
|
29833
|
+
}, updated);
|
|
29834
|
+
return updated;
|
|
29835
|
+
}
|
|
29836
|
+
updateButtonSelectionState(index, args) {
|
|
29837
|
+
if (this.selectedIndexes.indexOf(index) === -1) {
|
|
29838
|
+
this.selectButton(index);
|
|
29839
|
+
this.selected.emit(args);
|
|
29840
|
+
}
|
|
29841
|
+
else {
|
|
29842
|
+
this.deselectButton(index);
|
|
29843
|
+
this.deselected.emit(args);
|
|
29844
|
+
}
|
|
29803
29845
|
}
|
|
29804
29846
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: IgxButtonGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: DisplayDensityToken, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
29805
29847
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.8", type: IgxButtonGroupComponent, isStandalone: true, selector: "igx-buttongroup", inputs: { id: "id", itemContentCssClass: "itemContentCssClass", multiSelection: "multiSelection", selectionMode: "selectionMode", values: "values", disabled: "disabled", alignment: "alignment" }, outputs: { selected: "selected", deselected: "deselected" }, host: { properties: { "attr.id": "this.id", "style.zIndex": "this.zIndex" } }, queries: [{ propertyName: "templateButtons", predicate: IgxButtonDirective }], viewQueries: [{ propertyName: "viewButtons", predicate: IgxButtonDirective, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"igx-button-group\" role=\"group\" [class.igx-button-group--vertical]=\"isVertical\">\n <button *ngFor=\"let button of values; let i = 'index'\"\n type=\"button\"\n igxButton=\"flat\"\n [displayDensity]=\"displayDensity\"\n [selected]=\"button.selected\"\n [attr.data-togglable]=\"button.togglable\"\n [disabled]=\"disabled || button.disabled\"\n [igxButtonColor]=\"button.color\"\n [igxButtonBackground]=\"button.bgcolor\"\n [igxLabel]=\"button.label\"\n [igxRipple]=\"button.ripple\"\n >\n <span class=\"igx-button-group__item-content {{ itemContentCssClass }}\">\n <igx-icon *ngIf=\"button.icon\">{{button.icon}}</igx-icon>\n <span class=\"igx-button-group__button-text\" *ngIf=\"button.label\">{{button.label}}</span>\n </span>\n </button>\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: IgxButtonDirective, selector: "[igxButton]", inputs: ["selected", "igxButton", "igxButtonColor", "igxButtonBackground", "igxLabel", "disabled"], outputs: ["buttonClick", "buttonSelected"] }, { kind: "directive", type: IgxRippleDirective, selector: "[igxRipple]", inputs: ["igxRippleTarget", "igxRipple", "igxRippleDuration", "igxRippleCentered", "igxRippleDisabled"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IgxIconComponent, selector: "igx-icon", inputs: ["family", "active", "name"] }] }); }
|
|
@@ -30918,8 +30960,10 @@ class IgxCalendarBaseDirective {
|
|
|
30918
30960
|
* @hidden
|
|
30919
30961
|
*/
|
|
30920
30962
|
selectSingle(value) {
|
|
30921
|
-
this.selectedDates
|
|
30922
|
-
|
|
30963
|
+
if (!isEqual(this.selectedDates, value)) {
|
|
30964
|
+
this.selectedDates = this.getDateOnly(value);
|
|
30965
|
+
this._onChangeCallback(this.selectedDates);
|
|
30966
|
+
}
|
|
30923
30967
|
}
|
|
30924
30968
|
/**
|
|
30925
30969
|
* Performs a multiple selection
|
|
@@ -45108,6 +45152,9 @@ class IgxColumnGroupComponent extends IgxColumnComponent {
|
|
|
45108
45152
|
}
|
|
45109
45153
|
this.children.forEach(child => {
|
|
45110
45154
|
child.parent = this;
|
|
45155
|
+
if (this.pinned) {
|
|
45156
|
+
child.pinned = this.pinned;
|
|
45157
|
+
}
|
|
45111
45158
|
});
|
|
45112
45159
|
if (this.collapsible) {
|
|
45113
45160
|
this.setExpandCollapseState();
|
|
@@ -45115,10 +45162,20 @@ class IgxColumnGroupComponent extends IgxColumnComponent {
|
|
|
45115
45162
|
this.children.changes
|
|
45116
45163
|
.pipe(takeUntil(this.destroy$))
|
|
45117
45164
|
.subscribe((change) => {
|
|
45118
|
-
|
|
45165
|
+
let shouldReinitPinning = false;
|
|
45166
|
+
change.forEach(x => {
|
|
45167
|
+
x.parent = this;
|
|
45168
|
+
if (this.pinned && x.pinned !== this.pinned) {
|
|
45169
|
+
shouldReinitPinning = true;
|
|
45170
|
+
x.pinned = this.pinned;
|
|
45171
|
+
}
|
|
45172
|
+
});
|
|
45119
45173
|
if (this.collapsible) {
|
|
45120
45174
|
this.setExpandCollapseState();
|
|
45121
45175
|
}
|
|
45176
|
+
if (shouldReinitPinning) {
|
|
45177
|
+
this.grid.initPinning();
|
|
45178
|
+
}
|
|
45122
45179
|
});
|
|
45123
45180
|
}
|
|
45124
45181
|
/** @hidden @internal **/
|
|
@@ -67415,16 +67472,21 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
67415
67472
|
if (diff) {
|
|
67416
67473
|
let added = false;
|
|
67417
67474
|
let removed = false;
|
|
67475
|
+
let pinning = false;
|
|
67418
67476
|
diff.forEachAddedItem((record) => {
|
|
67419
67477
|
added = true;
|
|
67420
67478
|
if (record.item.pinned) {
|
|
67421
67479
|
this._pinnedColumns.push(record.item);
|
|
67480
|
+
pinning = true;
|
|
67422
67481
|
}
|
|
67423
67482
|
else {
|
|
67424
67483
|
this._unpinnedColumns.push(record.item);
|
|
67425
67484
|
}
|
|
67426
67485
|
});
|
|
67427
67486
|
this.initColumns(this.columnList.toArray(), (col) => this.columnInit.emit(col));
|
|
67487
|
+
if (pinning) {
|
|
67488
|
+
this.initPinning();
|
|
67489
|
+
}
|
|
67428
67490
|
diff.forEachRemovedItem((record) => {
|
|
67429
67491
|
const isColumnGroup = record.item instanceof IgxColumnGroupComponent;
|
|
67430
67492
|
if (!isColumnGroup) {
|
|
@@ -67990,42 +68052,9 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
67990
68052
|
* @hidden
|
|
67991
68053
|
*/
|
|
67992
68054
|
initPinning() {
|
|
67993
|
-
const pinnedColumns = [];
|
|
67994
|
-
const unpinnedColumns = [];
|
|
67995
68055
|
this.calculateGridWidth();
|
|
67996
68056
|
this.resetCaches();
|
|
67997
|
-
|
|
67998
|
-
this._pinnedColumns.forEach(col => {
|
|
67999
|
-
if (col.parent) {
|
|
68000
|
-
col.parent.pinned = true;
|
|
68001
|
-
}
|
|
68002
|
-
if (col.columnGroup) {
|
|
68003
|
-
col.children.forEach(child => child.pinned = true);
|
|
68004
|
-
}
|
|
68005
|
-
});
|
|
68006
|
-
// Make sure we don't exceed unpinned area min width and get pinned and unpinned col collections.
|
|
68007
|
-
// We take into account top level columns (top level groups and non groups).
|
|
68008
|
-
// If top level is unpinned the pinning handles all children to be unpinned as well.
|
|
68009
|
-
for (const column of this._columns) {
|
|
68010
|
-
if (column.pinned && !column.parent) {
|
|
68011
|
-
pinnedColumns.push(column);
|
|
68012
|
-
}
|
|
68013
|
-
else if (column.pinned && column.parent) {
|
|
68014
|
-
if (column.topLevelParent.pinned) {
|
|
68015
|
-
pinnedColumns.push(column);
|
|
68016
|
-
}
|
|
68017
|
-
else {
|
|
68018
|
-
column.pinned = false;
|
|
68019
|
-
unpinnedColumns.push(column);
|
|
68020
|
-
}
|
|
68021
|
-
}
|
|
68022
|
-
else {
|
|
68023
|
-
unpinnedColumns.push(column);
|
|
68024
|
-
}
|
|
68025
|
-
}
|
|
68026
|
-
// Assign the applicable collections.
|
|
68027
|
-
this._pinnedColumns = pinnedColumns;
|
|
68028
|
-
this._unpinnedColumns = unpinnedColumns;
|
|
68057
|
+
this.handleColumnPinningForGroups();
|
|
68029
68058
|
this.notifyChanges();
|
|
68030
68059
|
}
|
|
68031
68060
|
/**
|
|
@@ -68411,6 +68440,42 @@ class IgxGridBaseDirective extends DisplayDensityBase {
|
|
|
68411
68440
|
settings.target = targetRow.element.nativeElement;
|
|
68412
68441
|
this.toggleRowEditingOverlay(true);
|
|
68413
68442
|
}
|
|
68443
|
+
handleColumnPinningForGroups() {
|
|
68444
|
+
// When a column is a group or is inside a group, pin all related.
|
|
68445
|
+
const pinnedColumns = [];
|
|
68446
|
+
const unpinnedColumns = [];
|
|
68447
|
+
this._pinnedColumns.forEach(col => {
|
|
68448
|
+
if (col.parent) {
|
|
68449
|
+
col.parent.pinned = true;
|
|
68450
|
+
}
|
|
68451
|
+
if (col.columnGroup) {
|
|
68452
|
+
col.children.forEach(child => child.pinned = true);
|
|
68453
|
+
}
|
|
68454
|
+
});
|
|
68455
|
+
// Make sure we don't exceed unpinned area min width and get pinned and unpinned col collections.
|
|
68456
|
+
// We take into account top level columns (top level groups and non groups).
|
|
68457
|
+
// If top level is unpinned the pinning handles all children to be unpinned as well.
|
|
68458
|
+
for (const column of this._columns) {
|
|
68459
|
+
if (column.pinned && !column.parent) {
|
|
68460
|
+
pinnedColumns.push(column);
|
|
68461
|
+
}
|
|
68462
|
+
else if (column.pinned && column.parent) {
|
|
68463
|
+
if (column.topLevelParent.pinned) {
|
|
68464
|
+
pinnedColumns.push(column);
|
|
68465
|
+
}
|
|
68466
|
+
else {
|
|
68467
|
+
column.pinned = false;
|
|
68468
|
+
unpinnedColumns.push(column);
|
|
68469
|
+
}
|
|
68470
|
+
}
|
|
68471
|
+
else {
|
|
68472
|
+
unpinnedColumns.push(column);
|
|
68473
|
+
}
|
|
68474
|
+
}
|
|
68475
|
+
// Assign the applicable collections.
|
|
68476
|
+
this._pinnedColumns = pinnedColumns;
|
|
68477
|
+
this._unpinnedColumns = unpinnedColumns;
|
|
68478
|
+
}
|
|
68414
68479
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.8", ngImport: i0, type: IgxGridBaseDirective, deps: [{ token: IgxGridValidationService }, { token: IgxGridSelectionService }, { token: IgxColumnResizingService }, { token: IGX_GRID_SERVICE_BASE }, { token: IgxFlatTransactionFactory }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: DOCUMENT }, { token: i0.ChangeDetectorRef }, { token: i0.IterableDiffers }, { token: i0.ViewContainerRef }, { token: i0.Injector }, { token: i0.EnvironmentInjector }, { token: IgxGridNavigationService }, { token: IgxFilteringService }, { token: IgxOverlayService }, { token: IgxGridSummaryService }, { token: DisplayDensityToken, optional: true }, { token: LOCALE_ID }, { token: PlatformUtil }, { token: IgxGridTransaction, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
68415
68480
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.8", type: IgxGridBaseDirective, inputs: { snackbarDisplayTime: "snackbarDisplayTime", autoGenerate: "autoGenerate", autoGenerateExclude: "autoGenerateExclude", moving: "moving", emptyGridTemplate: "emptyGridTemplate", addRowEmptyTemplate: "addRowEmptyTemplate", loadingGridTemplate: "loadingGridTemplate", summaryRowHeight: "summaryRowHeight", dataCloneStrategy: "dataCloneStrategy", clipboardOptions: "clipboardOptions", rowClasses: "rowClasses", rowStyles: "rowStyles", primaryKey: "primaryKey", uniqueColumnValuesStrategy: "uniqueColumnValuesStrategy", dragGhostCustomTemplate: "dragGhostCustomTemplate", rowEditTextTemplate: "rowEditTextTemplate", rowAddTextTemplate: "rowAddTextTemplate", rowEditActionsTemplate: "rowEditActionsTemplate", rowExpandedIndicatorTemplate: "rowExpandedIndicatorTemplate", rowCollapsedIndicatorTemplate: "rowCollapsedIndicatorTemplate", headerExpandedIndicatorTemplate: "headerExpandedIndicatorTemplate", headerCollapsedIndicatorTemplate: "headerCollapsedIndicatorTemplate", excelStyleHeaderIconTemplate: "excelStyleHeaderIconTemplate", sortAscendingHeaderIconTemplate: "sortAscendingHeaderIconTemplate", sortDescendingHeaderIconTemplate: "sortDescendingHeaderIconTemplate", sortHeaderIconTemplate: "sortHeaderIconTemplate", resourceStrings: "resourceStrings", filteringLogic: "filteringLogic", filteringExpressionsTree: "filteringExpressionsTree", advancedFilteringExpressionsTree: "advancedFilteringExpressionsTree", locale: "locale", pagingMode: "pagingMode", hideRowSelectors: "hideRowSelectors", rowDraggable: "rowDraggable", validationTrigger: "validationTrigger", rowEditable: "rowEditable", height: "height", width: "width", rowHeight: "rowHeight", columnWidth: "columnWidth", emptyGridMessage: "emptyGridMessage", isLoading: "isLoading", emptyFilteredGridMessage: "emptyFilteredGridMessage", pinning: "pinning", allowFiltering: "allowFiltering", allowAdvancedFiltering: "allowAdvancedFiltering", filterMode: "filterMode", summaryPosition: "summaryPosition", summaryCalculationMode: "summaryCalculationMode", showSummaryOnCollapse: "showSummaryOnCollapse", filterStrategy: "filterStrategy", sortStrategy: "sortStrategy", sortingOptions: "sortingOptions", selectedRows: "selectedRows", headSelectorTemplate: "headSelectorTemplate", rowSelectorTemplate: "rowSelectorTemplate", dragIndicatorIconTemplate: "dragIndicatorIconTemplate", sortingExpressions: "sortingExpressions", batchEditing: "batchEditing", cellSelection: "cellSelection", rowSelection: "rowSelection", columnSelection: "columnSelection", expansionStates: "expansionStates", outlet: "outlet", totalRecords: "totalRecords", selectRowOnClick: "selectRowOnClick" }, outputs: { filteringExpressionsTreeChange: "filteringExpressionsTreeChange", advancedFilteringExpressionsTreeChange: "advancedFilteringExpressionsTreeChange", gridScroll: "gridScroll", cellClick: "cellClick", formGroupCreated: "formGroupCreated", validationStatusChange: "validationStatusChange", selected: "selected", rowSelectionChanging: "rowSelectionChanging", columnSelectionChanging: "columnSelectionChanging", columnPin: "columnPin", columnPinned: "columnPinned", cellEditEnter: "cellEditEnter", cellEditExit: "cellEditExit", cellEdit: "cellEdit", cellEditDone: "cellEditDone", rowEditEnter: "rowEditEnter", rowEdit: "rowEdit", rowEditDone: "rowEditDone", rowEditExit: "rowEditExit", columnInit: "columnInit", sorting: "sorting", sortingDone: "sortingDone", filtering: "filtering", filteringDone: "filteringDone", rowAdded: "rowAdded", rowDeleted: "rowDeleted", rowDelete: "rowDelete", rowAdd: "rowAdd", columnResized: "columnResized", contextMenu: "contextMenu", doubleClick: "doubleClick", columnVisibilityChanging: "columnVisibilityChanging", columnVisibilityChanged: "columnVisibilityChanged", columnMovingStart: "columnMovingStart", columnMoving: "columnMoving", columnMovingEnd: "columnMovingEnd", gridKeydown: "gridKeydown", rowDragStart: "rowDragStart", rowDragEnd: "rowDragEnd", gridCopy: "gridCopy", expansionStatesChange: "expansionStatesChange", rowToggle: "rowToggle", rowPinning: "rowPinning", rowPinned: "rowPinned", activeNodeChange: "activeNodeChange", sortingExpressionsChange: "sortingExpressionsChange", toolbarExporting: "toolbarExporting", rangeSelected: "rangeSelected", rendered: "rendered", localeChange: "localeChange", dataChanging: "dataChanging", dataChanged: "dataChanged" }, host: { listeners: { "mouseleave": "hideActionStrip()" }, properties: { "attr.tabindex": "this.tabindex", "attr.role": "this.hostRole", "class.igx-grid": "this.baseClass", "style.--component-size": "this.hostStyles", "style.height": "this.height", "style.width": "this.hostWidth" } }, queries: [{ propertyName: "actionStrip", first: true, predicate: IgxActionStripComponent, descendants: true }, { propertyName: "excelStyleLoadingValuesTemplateDirective", first: true, predicate: IgxExcelStyleLoadingValuesTemplateDirective, descendants: true, read: IgxExcelStyleLoadingValuesTemplateDirective, static: true }, { propertyName: "rowAddText", first: true, predicate: IgxRowAddTextDirective, descendants: true, read: TemplateRef }, { propertyName: "rowExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxRowExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "rowCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxRowCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerExpandedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderExpandedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "headerCollapsedIndicatorDirectiveTemplate", first: true, predicate: IgxHeaderCollapsedIndicatorDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleHeaderIconDirectiveTemplate", first: true, predicate: IgxExcelStyleHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortAscendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortAscendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortDescendingHeaderIconDirectiveTemplate", first: true, predicate: IgxSortDescendingHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "sortHeaderIconDirectiveTemplate", first: true, predicate: IgxSortHeaderIconDirective, descendants: true, read: TemplateRef }, { propertyName: "excelStyleFilteringComponents", predicate: IgxGridExcelStyleFilteringComponent, read: IgxGridExcelStyleFilteringComponent }, { propertyName: "columnList", predicate: IgxColumnComponent, descendants: true, read: IgxColumnComponent }, { propertyName: "headSelectorsTemplates", predicate: IgxHeadSelectorDirective, read: TemplateRef }, { propertyName: "rowSelectorsTemplates", predicate: IgxRowSelectorDirective, read: TemplateRef }, { propertyName: "dragGhostCustomTemplates", predicate: IgxRowDragGhostDirective, read: TemplateRef }, { propertyName: "rowEditCustomDirectives", predicate: IgxRowEditTemplateDirective, read: TemplateRef }, { propertyName: "rowEditTextDirectives", predicate: IgxRowEditTextDirective, read: TemplateRef }, { propertyName: "rowEditActionsDirectives", predicate: IgxRowEditActionsDirective, read: TemplateRef }, { propertyName: "dragIndicatorIconTemplates", predicate: IgxDragIndicatorIconDirective, read: TemplateRef }, { propertyName: "rowEditTabsCUSTOM", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "toolbar", predicate: IgxGridToolbarComponent }, { propertyName: "paginationComponents", predicate: IgxPaginatorComponent }], viewQueries: [{ propertyName: "addRowSnackbar", first: true, predicate: IgxSnackbarComponent, descendants: true }, { propertyName: "resizeLine", first: true, predicate: IgxGridColumnResizerComponent, descendants: true }, { propertyName: "loadingOverlay", first: true, predicate: ["loadingOverlay"], descendants: true, read: IgxToggleDirective, static: true }, { propertyName: "loadingOutlet", first: true, predicate: ["igxLoadingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "emptyFilteredGridTemplate", first: true, predicate: ["emptyFilteredGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "emptyGridDefaultTemplate", first: true, predicate: ["defaultEmptyGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "loadingGridDefaultTemplate", first: true, predicate: ["defaultLoadingGrid"], descendants: true, read: TemplateRef, static: true }, { propertyName: "parentVirtDir", first: true, predicate: ["scrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScrollContainer", first: true, predicate: ["verticalScrollContainer"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "verticalScroll", first: true, predicate: ["verticalScrollHolder"], descendants: true, read: IgxGridForOfDirective, static: true }, { propertyName: "scr", first: true, predicate: ["scr"], descendants: true, read: ElementRef, static: true }, { propertyName: "headerSelectorBaseTemplate", first: true, predicate: ["headSelectorBaseTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "footer", first: true, predicate: ["footer"], descendants: true, read: ElementRef }, { propertyName: "theadRow", first: true, predicate: IgxGridHeaderRowComponent, descendants: true, static: true }, { propertyName: "groupArea", first: true, predicate: IgxGridGroupByAreaComponent, descendants: true }, { propertyName: "tbody", first: true, predicate: ["tbody"], descendants: true, static: true }, { propertyName: "pinContainer", first: true, predicate: ["pinContainer"], descendants: true, read: ElementRef }, { propertyName: "tfoot", first: true, predicate: ["tfoot"], descendants: true, static: true }, { propertyName: "rowEditingOutletDirective", first: true, predicate: ["igxRowEditingOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "dragIndicatorIconBase", first: true, predicate: ["dragIndicatorIconBase"], descendants: true, read: TemplateRef, static: true }, { propertyName: "rowEditingOverlay", first: true, predicate: ["rowEditingOverlay"], descendants: true, read: IgxToggleDirective }, { propertyName: "_outletDirective", first: true, predicate: ["igxFilteringOverlayOutlet"], descendants: true, read: IgxOverlayOutletDirective, static: true }, { propertyName: "defaultExpandedTemplate", first: true, predicate: ["defaultExpandedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultCollapsedTemplate", first: true, predicate: ["defaultCollapsedTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultESFHeaderIconTemplate", first: true, predicate: ["defaultESFHeaderIcon"], descendants: true, read: TemplateRef, static: true }, { propertyName: "defaultRowEditTemplate", first: true, predicate: ["defaultRowEditTemplate"], descendants: true, read: TemplateRef, static: true }, { propertyName: "tmpOutlets", predicate: IgxTemplateOutletDirective, descendants: true, read: IgxTemplateOutletDirective }, { propertyName: "rowEditTabsDEFAULT", predicate: IgxRowEditTabStopDirective, descendants: true }, { propertyName: "_summaryRowList", predicate: ["summaryRow"], descendants: true, read: IgxSummaryRowComponent }, { propertyName: "_rowList", predicate: ["row"], descendants: true }, { propertyName: "_pinnedRowList", predicate: ["pinnedRow"], descendants: true }, { propertyName: "_dataRowList", predicate: IgxRowDirective, descendants: true, read: IgxRowDirective }], usesInheritance: true, ngImport: i0 }); }
|
|
68416
68481
|
}
|
|
@@ -82122,8 +82187,8 @@ class IgxChildGridRowComponent {
|
|
|
82122
82187
|
}
|
|
82123
82188
|
set data(value) {
|
|
82124
82189
|
this._data = value;
|
|
82125
|
-
if (this.hGrid) {
|
|
82126
|
-
this.hGrid.
|
|
82190
|
+
if (this.hGrid && !this.hGrid.dataSetByUser) {
|
|
82191
|
+
this.hGrid.setDataInternal(this._data.childGridsData[this.layout.key]);
|
|
82127
82192
|
}
|
|
82128
82193
|
}
|
|
82129
82194
|
/**
|
|
@@ -82179,7 +82244,7 @@ class IgxChildGridRowComponent {
|
|
|
82179
82244
|
ngOnInit() {
|
|
82180
82245
|
const ref = this.container.createComponent(IgxHierarchicalGridComponent, { injector: this.container.injector });
|
|
82181
82246
|
this.hGrid = ref.instance;
|
|
82182
|
-
this.hGrid.
|
|
82247
|
+
this.hGrid.setDataInternal(this.data.childGridsData[this.layout.key]);
|
|
82183
82248
|
this.layout.layoutChange.subscribe((ch) => {
|
|
82184
82249
|
this._handleLayoutChanges(ch);
|
|
82185
82250
|
});
|
|
@@ -82278,6 +82343,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
82278
82343
|
* @hidden
|
|
82279
82344
|
*/
|
|
82280
82345
|
this.childLayoutKeys = [];
|
|
82346
|
+
/** @hidden @internal */
|
|
82347
|
+
this.dataSetByUser = false;
|
|
82281
82348
|
/**
|
|
82282
82349
|
* @hidden
|
|
82283
82350
|
*/
|
|
@@ -82322,20 +82389,8 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
82322
82389
|
* @memberof IgxHierarchicalGridComponent
|
|
82323
82390
|
*/
|
|
82324
82391
|
set data(value) {
|
|
82325
|
-
this.
|
|
82326
|
-
this.
|
|
82327
|
-
if (!this._init) {
|
|
82328
|
-
this.validation.updateAll(this._data);
|
|
82329
|
-
}
|
|
82330
|
-
if (this.shouldGenerate) {
|
|
82331
|
-
this.setupColumns();
|
|
82332
|
-
this.reflow();
|
|
82333
|
-
}
|
|
82334
|
-
this.cdr.markForCheck();
|
|
82335
|
-
if (this.parent && (this.height === null || this.height.indexOf('%') !== -1)) {
|
|
82336
|
-
// If the height will change based on how much data there is, recalculate sizes in igxForOf.
|
|
82337
|
-
this.notifyChanges(true);
|
|
82338
|
-
}
|
|
82392
|
+
this.setDataInternal(value);
|
|
82393
|
+
this.dataSetByUser = true;
|
|
82339
82394
|
}
|
|
82340
82395
|
/**
|
|
82341
82396
|
* Returns an array of data set to the `IgxHierarchicalGridComponent`.
|
|
@@ -82640,6 +82695,23 @@ class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirective {
|
|
|
82640
82695
|
const row = this.getRowByKey(rowID);
|
|
82641
82696
|
return super.pinRow(rowID, index, row);
|
|
82642
82697
|
}
|
|
82698
|
+
/** @hidden @internal */
|
|
82699
|
+
setDataInternal(value) {
|
|
82700
|
+
this._data = value || [];
|
|
82701
|
+
this.summaryService.clearSummaryCache();
|
|
82702
|
+
if (!this._init) {
|
|
82703
|
+
this.validation.updateAll(this._data);
|
|
82704
|
+
}
|
|
82705
|
+
if (this.shouldGenerate) {
|
|
82706
|
+
this.setupColumns();
|
|
82707
|
+
this.reflow();
|
|
82708
|
+
}
|
|
82709
|
+
this.cdr.markForCheck();
|
|
82710
|
+
if (this.parent && (this.height === null || this.height.indexOf('%') !== -1)) {
|
|
82711
|
+
// If the height will change based on how much data there is, recalculate sizes in igxForOf.
|
|
82712
|
+
this.notifyChanges(true);
|
|
82713
|
+
}
|
|
82714
|
+
}
|
|
82643
82715
|
unpinRow(rowID) {
|
|
82644
82716
|
const row = this.getRowByKey(rowID);
|
|
82645
82717
|
return super.unpinRow(rowID, row);
|