@datorama/core 22.15.0 → 22.15.2
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/bundle.scss +122 -50
- package/bundles/datorama-core.umd.js +140 -47
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +27 -27
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid/grid/grid.component.js +4 -4
- package/esm2015/lib/grid/grid-sort.utils.js +7 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.component.js +10 -3
- package/esm2015/lib/grid-v2/grid/grid-v2.config.js +30 -4
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +58 -24
- package/esm2015/lib/grid-v2/grid-header/grid-header.component.js +3 -2
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +9 -5
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +22 -16
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid/grid/grid.component.js +4 -4
- package/esm5/lib/grid/grid-sort.utils.js +7 -2
- package/esm5/lib/grid-v2/grid/grid-v2.component.js +14 -3
- package/esm5/lib/grid-v2/grid/grid-v2.config.js +30 -4
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +62 -24
- package/esm5/lib/grid-v2/grid-header/grid-header.component.js +3 -2
- package/esm5/lib/grid-v2/grid-store/grid.query.js +9 -5
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +22 -16
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +133 -48
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +141 -48
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.component.d.ts +4 -0
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +15 -0
- package/lib/grid-v2/grid-toolbar/grid-toolbar.component.d.ts +1 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __extends, __assign, __decorate, __metadata, __values, __param, __spread, __read, __rest } from 'tslib';
|
|
2
2
|
import { forwardRef, NgZone, Renderer2, Input, ViewChild, ElementRef, Component, ChangeDetectionStrategy, NgModule, Attribute, HostBinding, ɵɵdefineInjectable, Injectable, isDevMode, InjectionToken, Inject, ChangeDetectorRef, HostListener, Directive, EventEmitter, Output, ɵɵinject, ApplicationRef, Injector, INJECTOR, TemplateRef, ViewContainerRef, Pipe, ViewEncapsulation, ComponentFactoryResolver, ContentChildren, QueryList, ViewChildren, Optional, ContentChild, SkipSelf, Self, SecurityContext } from '@angular/core';
|
|
3
|
-
import { fromEvent, merge as merge$1, Subject, combineLatest, Observable, forkJoin, of, Subscription, BehaviorSubject, EMPTY, defer, interval,
|
|
3
|
+
import { fromEvent, merge as merge$1, Subject, combineLatest, Observable, forkJoin, of, Subscription, BehaviorSubject, ReplaySubject, EMPTY, defer, interval, throwError, isObservable, timer, pipe } from 'rxjs';
|
|
4
4
|
import { NG_VALUE_ACCESSOR, NgControl, FormControl, ReactiveFormsModule, Validators, FormBuilder, ControlContainer, FormGroup, FormControlDirective, FormControlName } from '@angular/forms';
|
|
5
5
|
import { untilDestroyed } from 'ngx-take-until-destroy';
|
|
6
6
|
import { debounceTime, filter as filter$1, map as map$1, pluck, tap, switchMap, takeUntil, take, auditTime, distinctUntilChanged, throttleTime, first, mapTo, startWith, pairwise, skip, shareReplay, delay as delay$1, switchMapTo, repeat, concatMap, concatMapTo } from 'rxjs/operators';
|
|
@@ -5695,10 +5695,10 @@ var DatoGridComponent = /** @class */ (function (_super) {
|
|
|
5695
5695
|
_this.onChange(selectedRows);
|
|
5696
5696
|
},
|
|
5697
5697
|
rowSelection: 'multiple',
|
|
5698
|
-
rowDeselection: true
|
|
5698
|
+
// rowDeselection removed: true by default in AG Grid 27 (suppress with suppressRowDeselection).
|
|
5699
5699
|
unSortIcon: true,
|
|
5700
|
-
animateRows: true
|
|
5701
|
-
rememberGroupStateWhenNewData:
|
|
5700
|
+
animateRows: true
|
|
5701
|
+
// rememberGroupStateWhenNewData removed: no-op since AG Grid 24 (transaction updates keep group state).
|
|
5702
5702
|
};
|
|
5703
5703
|
_this.infinitePagination = false;
|
|
5704
5704
|
_this.isRowsCollapsed = true;
|
|
@@ -11157,7 +11157,12 @@ function getGridModel(gridName) {
|
|
|
11157
11157
|
*/
|
|
11158
11158
|
function getSortModel(columnApi) {
|
|
11159
11159
|
var sortIndexes = {};
|
|
11160
|
-
|
|
11160
|
+
// AG Grid 27: getColumnState() returns undefined before the grid's columns are initialized.
|
|
11161
|
+
// getSortModel() is reached via getCurrentGridSettings()/onFilterSortChanged() on resize/data
|
|
11162
|
+
// events that can fire before that point, so guard against undefined to avoid
|
|
11163
|
+
// "Cannot read properties of undefined (reading 'filter')".
|
|
11164
|
+
var columnState = columnApi.getColumnState() || [];
|
|
11165
|
+
var sortedColumns = columnState.filter(function (state) { return state.sort != null; });
|
|
11161
11166
|
sortedColumns.forEach(function (columnState) {
|
|
11162
11167
|
sortIndexes[columnState.colId] = columnState.sortIndex;
|
|
11163
11168
|
});
|
|
@@ -11452,9 +11457,13 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11452
11457
|
GridQuery.prototype.getCurrentGridSettings = function () {
|
|
11453
11458
|
var toColId = function (column) { return column.getColId(); };
|
|
11454
11459
|
var columns = this.api.columns;
|
|
11455
|
-
|
|
11456
|
-
|
|
11457
|
-
|
|
11460
|
+
// AG Grid 27: getAllColumns() returns Column[] | null (and the grouped/grid column getters can
|
|
11461
|
+
// likewise be empty) before the grid's columns are initialized. getCurrentGridSettings() is
|
|
11462
|
+
// reached via fitGrid -> updateSettings on window resize, which can fire before that point, so
|
|
11463
|
+
// guard against null to avoid "Cannot read properties of undefined (reading 'filter')".
|
|
11464
|
+
var groupedColumns = columns.getRowGroupColumns() || [];
|
|
11465
|
+
var columnsOrder = columns.getAllColumns() || [];
|
|
11466
|
+
var allGridColumns = columns.getAllGridColumns() || [];
|
|
11458
11467
|
var hiddenColumns = columnsOrder
|
|
11459
11468
|
.filter(function (column) { return !column.isVisible() && !groupedColumns.includes(column); })
|
|
11460
11469
|
.map(toColId);
|
|
@@ -11465,7 +11474,7 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11465
11474
|
hiddenColumns: hiddenColumns,
|
|
11466
11475
|
groupedColumns: groupedColumns.map(toColId),
|
|
11467
11476
|
filter: this.getFilter(),
|
|
11468
|
-
pinnedColumns: columns.getDisplayedLeftColumns().map(toColId),
|
|
11477
|
+
pinnedColumns: (columns.getDisplayedLeftColumns() || []).map(toColId),
|
|
11469
11478
|
columnsOrder: allGridColumns.map(toColId),
|
|
11470
11479
|
columnsSizes: null,
|
|
11471
11480
|
searchTerm: null
|
|
@@ -13611,7 +13620,27 @@ var defaultGridOptions = __assign({
|
|
|
13611
13620
|
comparator: function (a, b) { return getTime$1(a) - getTime$1(b); }
|
|
13612
13621
|
},
|
|
13613
13622
|
_a$3[DatoGridColumnTypes.Number] = {
|
|
13614
|
-
filter: DatoGridFilterTypes.Number
|
|
13623
|
+
filter: DatoGridFilterTypes.Number,
|
|
13624
|
+
// AG Grid resolves a column's sort comparator only from its merged colDef.comparator.
|
|
13625
|
+
// Number columns had none, so they fell back to AG Grid's default comparator, which sorts
|
|
13626
|
+
// string-typed values lexicographically ("10" before "2"). Provide an explicit numeric
|
|
13627
|
+
// comparator. Map null/empty/non-numeric to -Infinity so we never return NaN (AG Grid's
|
|
13628
|
+
// sorter skips a NaN result). Ascending-sense only — AG Grid flips the sign for descending.
|
|
13629
|
+
comparator: function (a, b) {
|
|
13630
|
+
var toNum = function (v) {
|
|
13631
|
+
var n = v == null || v === '' ? NaN : Number(v);
|
|
13632
|
+
return isNaN(n) ? -Infinity : n;
|
|
13633
|
+
};
|
|
13634
|
+
var na = toNum(a);
|
|
13635
|
+
var nb = toNum(b);
|
|
13636
|
+
// Compare relationally (not by subtraction): two missing/non-numeric values both map to
|
|
13637
|
+
// -Infinity, and -Infinity - (-Infinity) === NaN, which AG Grid's sorter skips. Returning
|
|
13638
|
+
// 0 / -1 / 1 avoids NaN entirely. Ascending sense — AG Grid flips the sign for descending.
|
|
13639
|
+
if (na === nb) {
|
|
13640
|
+
return 0;
|
|
13641
|
+
}
|
|
13642
|
+
return na < nb ? -1 : 1;
|
|
13643
|
+
}
|
|
13615
13644
|
},
|
|
13616
13645
|
_a$3[DatoGridColumnTypes.String] = stringColDef,
|
|
13617
13646
|
_a$3[DatoGridColumnTypes.Status] = __assign(__assign({}, stringColDef), { cellRenderer: 'DatoGridStatusCellComponent' }),
|
|
@@ -13619,14 +13648,20 @@ var defaultGridOptions = __assign({
|
|
|
13619
13648
|
_a$3[DatoGridColumnTypes.ItemsCount] = __assign(__assign({}, stringColDef), { cellRenderer: 'DatoGridItemsCountCellComponent' }),
|
|
13620
13649
|
_a$3[DatoGridColumnTypes.Initials] = __assign(__assign({}, stringColDef), { cellRenderer: 'DatoGridInitialsCellComponent' }),
|
|
13621
13650
|
_a$3[DatoGridColumnTypes.Avatar] = __assign(__assign({}, stringColDef), { cellRenderer: 'DatoGridAvatarCellComponent' }),
|
|
13622
|
-
_a$3), multiSortKey: 'ctrl', suppressPaginationPanel: true, pagination: true, paginateChildRows: true,
|
|
13651
|
+
_a$3), multiSortKey: 'ctrl', suppressPaginationPanel: true, pagination: true, paginateChildRows: true,
|
|
13652
|
+
// deltaColumnMode removed: deprecated in AG Grid 27, delta column updates are the default now.
|
|
13653
|
+
loadingOverlayComponentFramework: DatoGridV2LoaderComponent, noRowsOverlayComponentFramework: DatoGridV2NoDataOverlayComponent, defaultColDef: {
|
|
13623
13654
|
minWidth: GridMinWidths.Default,
|
|
13624
13655
|
sortable: true,
|
|
13625
13656
|
resizable: true,
|
|
13626
13657
|
type: DatoGridColumnTypes.String,
|
|
13627
13658
|
menuTabs: ['filterMenuTab'],
|
|
13628
13659
|
headerComponentFramework: DatoGridColumnHeaderComponent
|
|
13629
|
-
},
|
|
13660
|
+
}, suppressCellFocus: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: GridRowSelectionType.MULTIPLE,
|
|
13661
|
+
// rowDeselection removed: true by default in AG Grid 27 (suppress with suppressRowDeselection).
|
|
13662
|
+
unSortIcon: true, animateRows: true,
|
|
13663
|
+
// rememberGroupStateWhenNewData removed: no-op since AG Grid 24 (transaction updates keep group state).
|
|
13664
|
+
groupDisplayType: 'multipleColumns', groupDefaultExpanded: -1, usePivotGridStyle: false, disabledHTMLRenderingFields: [] }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
|
|
13630
13665
|
var DEFAULT_GRID_SEARCH_DEBOUNCE_TIME = {
|
|
13631
13666
|
CLIENT: 200,
|
|
13632
13667
|
SERVER: 250
|
|
@@ -15596,18 +15631,30 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15596
15631
|
this.gridActions = [];
|
|
15597
15632
|
this.gridReady$ = this.gridQuery.gridReady$;
|
|
15598
15633
|
this.contentInit = new Subject();
|
|
15634
|
+
// ngx-take-until-destroy patches ngOnDestroy on the instance, which Ivy never calls (it uses the
|
|
15635
|
+
// prototype hook), so listeners outlived the grid and hit the destroyed AG Grid API.
|
|
15636
|
+
this.destroy$ = new Subject();
|
|
15637
|
+
this.hasGridOptions = new BehaviorSubject(false);
|
|
15638
|
+
this.agGridReady = new ReplaySubject(1);
|
|
15599
15639
|
this.gridElements = {
|
|
15600
15640
|
centerViewport: null,
|
|
15601
15641
|
centerContainer: null,
|
|
15602
15642
|
bodyViewport: null
|
|
15603
15643
|
};
|
|
15604
15644
|
this.treeGridClass = 'tree';
|
|
15645
|
+
this.hasGridOptions$ = this.hasGridOptions.asObservable();
|
|
15605
15646
|
}
|
|
15606
15647
|
Object.defineProperty(DatoGridControllerComponent.prototype, "gridOptions", {
|
|
15607
15648
|
get: function () {
|
|
15608
15649
|
return this._gridOptions;
|
|
15609
15650
|
},
|
|
15610
15651
|
set: function (gridOptions) {
|
|
15652
|
+
// The [gridOptions] binding can resolve to undefined during the host's initial change-detection
|
|
15653
|
+
// pass (before the consumer computes its options). Ignore it instead of throwing
|
|
15654
|
+
// "Cannot read properties of undefined" from initGridOptions() and aborting the view render.
|
|
15655
|
+
if (!gridOptions) {
|
|
15656
|
+
return;
|
|
15657
|
+
}
|
|
15611
15658
|
this._gridOptions = this.gridService.initGridOptions(gridOptions);
|
|
15612
15659
|
this.gridService.treeData = gridOptions.treeData;
|
|
15613
15660
|
this.gridService.isPivotMode = gridOptions.pivotMode;
|
|
@@ -15619,16 +15666,37 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15619
15666
|
this.agGridEl.classList.add(this.treeGridClass);
|
|
15620
15667
|
}
|
|
15621
15668
|
}
|
|
15669
|
+
!this.hasGridOptions.value && this.hasGridOptions.next(true);
|
|
15670
|
+
},
|
|
15671
|
+
enumerable: true,
|
|
15672
|
+
configurable: true
|
|
15673
|
+
});
|
|
15674
|
+
Object.defineProperty(DatoGridControllerComponent.prototype, "agGridOptions", {
|
|
15675
|
+
/* @internal */
|
|
15676
|
+
get: function () {
|
|
15677
|
+
if (!this._agGridOptions && this._gridOptions) {
|
|
15678
|
+
this.gridOptions = this.normalizeOptions();
|
|
15679
|
+
this._agGridOptions = this.gridOptions;
|
|
15680
|
+
}
|
|
15681
|
+
return this._agGridOptions;
|
|
15622
15682
|
},
|
|
15623
15683
|
enumerable: true,
|
|
15624
15684
|
configurable: true
|
|
15625
15685
|
});
|
|
15626
15686
|
DatoGridControllerComponent.prototype.ngOnDestroy = function () {
|
|
15687
|
+
this.destroy$.next();
|
|
15688
|
+
this.destroy$.complete();
|
|
15627
15689
|
this.contentInit.complete();
|
|
15690
|
+
this.hasGridOptions.complete();
|
|
15691
|
+
this.agGridReady.complete();
|
|
15628
15692
|
this.clearTooltip();
|
|
15629
15693
|
this.rowHoverComponent && this.rowHoverComponent.destroy();
|
|
15630
15694
|
this.rowHoverComponent = null;
|
|
15631
15695
|
};
|
|
15696
|
+
/* @internal */
|
|
15697
|
+
DatoGridControllerComponent.prototype.onAgGridReady = function (event) {
|
|
15698
|
+
this.agGridReady.next(event);
|
|
15699
|
+
};
|
|
15632
15700
|
DatoGridControllerComponent.prototype.initializeGrid = function (agGrid, agGridEl) {
|
|
15633
15701
|
if (!this.contentInit.isStopped) {
|
|
15634
15702
|
this._initializeGrid(agGrid, agGridEl);
|
|
@@ -15643,11 +15711,13 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15643
15711
|
this.contentInit
|
|
15644
15712
|
.asObservable()
|
|
15645
15713
|
.pipe(switchMap(function () {
|
|
15646
|
-
|
|
15647
|
-
|
|
15714
|
+
// Already normalized when dato-grid-v2 bound them to <ag-grid-angular [gridOptions]>.
|
|
15715
|
+
if (!_this.agGridOptions) {
|
|
15716
|
+
return EMPTY;
|
|
15717
|
+
}
|
|
15648
15718
|
var settingsLoader = _this.gridOptions.saveSettings === false ? of(null) : _this.storageAPI.get(_this.gridOptions.gridName);
|
|
15649
|
-
return combineLatest([
|
|
15650
|
-
}),
|
|
15719
|
+
return combineLatest([_this.agGridReady, settingsLoader]);
|
|
15720
|
+
}), takeUntil(this.destroy$))
|
|
15651
15721
|
.subscribe(function (_a) {
|
|
15652
15722
|
var _b = __read(_a, 2), _c = _b[0], api = _c.api, columnApi = _c.columnApi, _d = _b[1], savedSettings = _d === void 0 ? {} : _d;
|
|
15653
15723
|
if (!_this.gridOptions.rowData) {
|
|
@@ -15726,7 +15796,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15726
15796
|
.pipe(auditTime(100), filter$1(function (_a) {
|
|
15727
15797
|
var finished = _a.finished, source = _a.source;
|
|
15728
15798
|
return finished && source === 'uiColumnDragged';
|
|
15729
|
-
}),
|
|
15799
|
+
}), takeUntil(this.destroy$))
|
|
15730
15800
|
.subscribe(function (e) {
|
|
15731
15801
|
var _a = __read(e.columns, 1), column = _a[0];
|
|
15732
15802
|
var columnsSizes = __assign({}, _this.gridQuery.getColumnSizes());
|
|
@@ -15745,7 +15815,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15745
15815
|
merge$1(columnVisible, sortChanged, columnRowGroupChanged, columnPinned, dragStopped, filterChanged)
|
|
15746
15816
|
.pipe(
|
|
15747
15817
|
/* Skip the initial sorting event fired by the grid when adding rows */
|
|
15748
|
-
skip(1),
|
|
15818
|
+
skip(1), takeUntil(this.destroy$))
|
|
15749
15819
|
.subscribe(function (_a) {
|
|
15750
15820
|
var type = _a.type;
|
|
15751
15821
|
var settingsDiff = _this.gridService.getSettingsDiff();
|
|
@@ -15763,7 +15833,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15763
15833
|
var _this = this;
|
|
15764
15834
|
this.gridQuery
|
|
15765
15835
|
.select(function (state) { return state.settings; })
|
|
15766
|
-
.pipe(skip(1), debounceTime(1000),
|
|
15836
|
+
.pipe(skip(1), debounceTime(1000), takeUntil(this.destroy$))
|
|
15767
15837
|
.subscribe(function () {
|
|
15768
15838
|
var settingsDiff = _this.gridService.getSettingsDiff();
|
|
15769
15839
|
_this.gridService.saveSettingsToServer(settingsDiff);
|
|
@@ -15793,7 +15863,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15793
15863
|
var value = _a.value, node = _a.node;
|
|
15794
15864
|
return value !== undefined && node.group === true;
|
|
15795
15865
|
}));
|
|
15796
|
-
}),
|
|
15866
|
+
}), takeUntil(this.destroy$))
|
|
15797
15867
|
.subscribe(function (_a) {
|
|
15798
15868
|
var node = _a.node;
|
|
15799
15869
|
node.setExpanded(!node.expanded);
|
|
@@ -15804,7 +15874,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15804
15874
|
.pipe(filter$1(function (_a) {
|
|
15805
15875
|
var node = _a.node;
|
|
15806
15876
|
return node.expanded === false;
|
|
15807
|
-
}),
|
|
15877
|
+
}), takeUntil(this.destroy$))
|
|
15808
15878
|
.subscribe(function () {
|
|
15809
15879
|
_this.lastHoveredRow = null;
|
|
15810
15880
|
_this.setOnHoverState(false);
|
|
@@ -15819,7 +15889,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15819
15889
|
fromEvent(bodyViewport, 'click')
|
|
15820
15890
|
.pipe(filter$1(function (event) {
|
|
15821
15891
|
return (event.target === bodyViewport || event.target === centerViewport) && api.getSelectedRows().length > 0;
|
|
15822
|
-
}),
|
|
15892
|
+
}), takeUntil(this.destroy$))
|
|
15823
15893
|
.subscribe(function () { return api.deselectAll(); });
|
|
15824
15894
|
};
|
|
15825
15895
|
DatoGridControllerComponent.prototype.onHoverEnabled = function () {
|
|
@@ -15832,7 +15902,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15832
15902
|
var onHoverEnabled = this.onHoverEnabled();
|
|
15833
15903
|
if (onHoverEnabled) {
|
|
15834
15904
|
fromEvent(centerContainer, 'mouseleave')
|
|
15835
|
-
.pipe(
|
|
15905
|
+
.pipe(takeUntil(this.destroy$))
|
|
15836
15906
|
.subscribe(function () {
|
|
15837
15907
|
_this.toggleRowHoverClass(_this.lastHoveredRow);
|
|
15838
15908
|
_this.lastHoveredRow = null;
|
|
@@ -15843,13 +15913,13 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15843
15913
|
var direction = _a.direction;
|
|
15844
15914
|
return direction === 'horizontal';
|
|
15845
15915
|
})), agGrid.rowDataChanged)
|
|
15846
|
-
.pipe(
|
|
15916
|
+
.pipe(takeUntil(this.destroy$))
|
|
15847
15917
|
.subscribe(function () {
|
|
15848
15918
|
_this.updateOnHoverPos();
|
|
15849
15919
|
});
|
|
15850
15920
|
this.addOnHoverElement();
|
|
15851
15921
|
}
|
|
15852
|
-
agGrid.cellMouseOver.pipe(
|
|
15922
|
+
agGrid.cellMouseOver.pipe(takeUntil(this.destroy$)).subscribe(function (event) {
|
|
15853
15923
|
var node = event.node, column = event.column;
|
|
15854
15924
|
if (lastHoveredCell === node.id + "-" + column.getColId()) {
|
|
15855
15925
|
clearTimeout(_this.cellMouseOutTimer);
|
|
@@ -15866,12 +15936,12 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15866
15936
|
}
|
|
15867
15937
|
});
|
|
15868
15938
|
var onTooltipOut = merge$1(fromEvent(bodyViewport, 'scroll'), fromEvent(this.agGridEl, 'mouseleave'));
|
|
15869
|
-
onTooltipOut.pipe(
|
|
15939
|
+
onTooltipOut.pipe(takeUntil(this.destroy$)).subscribe(function () {
|
|
15870
15940
|
lastHoveredCell = null;
|
|
15871
15941
|
_this.clearTooltip();
|
|
15872
15942
|
});
|
|
15873
15943
|
agGrid.cellMouseOut
|
|
15874
|
-
.pipe(filter$1(function () { return !isNil(_this.tooltip); }),
|
|
15944
|
+
.pipe(filter$1(function () { return !isNil(_this.tooltip); }), takeUntil(this.destroy$))
|
|
15875
15945
|
.subscribe(function () {
|
|
15876
15946
|
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15877
15947
|
});
|
|
@@ -15888,9 +15958,13 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15888
15958
|
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15889
15959
|
cell = cell.parentElement;
|
|
15890
15960
|
}
|
|
15891
|
-
if (event.colDef.editable) {
|
|
15961
|
+
if (event.colDef.editable && cell) {
|
|
15892
15962
|
cell = cell.querySelector('.value-wrapper') || cell;
|
|
15893
15963
|
}
|
|
15964
|
+
// AG Grid 27 can fire cellMouseOver for an element that was already detached by a re-render.
|
|
15965
|
+
if (!cell) {
|
|
15966
|
+
return;
|
|
15967
|
+
}
|
|
15894
15968
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15895
15969
|
if (textOverflow) {
|
|
15896
15970
|
clearTimeout(this.cellMouseOutTimer);
|
|
@@ -15974,7 +16048,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15974
16048
|
keys: 'meta.a',
|
|
15975
16049
|
ignoreInEditable: true
|
|
15976
16050
|
})
|
|
15977
|
-
.pipe(
|
|
16051
|
+
.pipe(takeUntil(this.destroy$))
|
|
15978
16052
|
.subscribe(function () {
|
|
15979
16053
|
_this.gridService.selectAllCurrentPageRows();
|
|
15980
16054
|
});
|
|
@@ -15982,7 +16056,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15982
16056
|
DatoGridControllerComponent.prototype.registerWindowResizeListener = function () {
|
|
15983
16057
|
var _this = this;
|
|
15984
16058
|
fromEvent(window, 'resize')
|
|
15985
|
-
.pipe(debounceTime(100), filter$1(function () { return _this.gridQuery.gridAlignment !== 2 /* CUSTOM */; }),
|
|
16059
|
+
.pipe(debounceTime(100), filter$1(function () { return _this.gridQuery.gridAlignment !== 2 /* CUSTOM */; }), takeUntil(this.destroy$))
|
|
15986
16060
|
.subscribe(function () {
|
|
15987
16061
|
var fitTo = _this.gridQuery.gridAlignment === 0 /* FIT_TO_CONTAINER */ ? 'container' : 'content';
|
|
15988
16062
|
_this.gridService.fitGrid(fitTo);
|
|
@@ -16006,7 +16080,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
16006
16080
|
var events$ = this.gridQuery.isServerSide
|
|
16007
16081
|
? merge$1(agGrid.sortChanged, agGrid.filterChanged)
|
|
16008
16082
|
: agGrid.filterChanged;
|
|
16009
|
-
events$.pipe(
|
|
16083
|
+
events$.pipe(takeUntil(this.destroy$)).subscribe(function () {
|
|
16010
16084
|
_this.gridService.deselectAllRows();
|
|
16011
16085
|
});
|
|
16012
16086
|
};
|
|
@@ -16015,7 +16089,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
16015
16089
|
if (!this.gridQuery.isServerSide) {
|
|
16016
16090
|
return;
|
|
16017
16091
|
}
|
|
16018
|
-
agGrid.paginationChanged.pipe(
|
|
16092
|
+
agGrid.paginationChanged.pipe(takeUntil(this.destroy$)).subscribe(function () {
|
|
16019
16093
|
if (_this.gridQuery.isServerSelectAllRowsEnabled) {
|
|
16020
16094
|
_this.gridService.selectAllCurrentPageRows(true, true);
|
|
16021
16095
|
}
|
|
@@ -16087,6 +16161,7 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
16087
16161
|
function DatoGridV2Component(controller, host) {
|
|
16088
16162
|
this.controller = controller;
|
|
16089
16163
|
this.host = host;
|
|
16164
|
+
this.hasGridOptions$ = this.controller.hasGridOptions$;
|
|
16090
16165
|
}
|
|
16091
16166
|
Object.defineProperty(DatoGridV2Component.prototype, "grid", {
|
|
16092
16167
|
set: function (agGrid) {
|
|
@@ -16098,6 +16173,13 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
16098
16173
|
enumerable: true,
|
|
16099
16174
|
configurable: true
|
|
16100
16175
|
});
|
|
16176
|
+
Object.defineProperty(DatoGridV2Component.prototype, "agGridOptions", {
|
|
16177
|
+
get: function () {
|
|
16178
|
+
return this.controller.agGridOptions;
|
|
16179
|
+
},
|
|
16180
|
+
enumerable: true,
|
|
16181
|
+
configurable: true
|
|
16182
|
+
});
|
|
16101
16183
|
Object.defineProperty(DatoGridV2Component.prototype, "gridOptions", {
|
|
16102
16184
|
get: function () {
|
|
16103
16185
|
return this.controller ? this.controller.gridOptions : null;
|
|
@@ -16126,6 +16208,9 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
16126
16208
|
enumerable: true,
|
|
16127
16209
|
configurable: true
|
|
16128
16210
|
});
|
|
16211
|
+
DatoGridV2Component.prototype.onGridReady = function (event) {
|
|
16212
|
+
this.controller.onAgGridReady(event);
|
|
16213
|
+
};
|
|
16129
16214
|
DatoGridV2Component.ctorParameters = function () { return [
|
|
16130
16215
|
{ type: DatoGridControllerComponent },
|
|
16131
16216
|
{ type: ElementRef }
|
|
@@ -16138,10 +16223,10 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
16138
16223
|
DatoGridV2Component = __decorate([
|
|
16139
16224
|
Component({
|
|
16140
16225
|
selector: 'dato-grid-v2',
|
|
16141
|
-
template: "<ag-grid-angular data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\" [class.pivot-style]=\"isPivotStyle\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
|
|
16226
|
+
template: "<ag-grid-angular *ngIf=\"hasGridOptions$ | async\" [gridOptions]=\"agGridOptions\" (gridReady)=\"onGridReady($event)\"\n data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\" [class.pivot-style]=\"isPivotStyle\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
|
|
16142
16227
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
16143
16228
|
encapsulation: ViewEncapsulation.None,
|
|
16144
|
-
styles: ["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important;min-width:auto!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-
|
|
16229
|
+
styles: ["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important;min-width:auto!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-checkbox-input-wrapper.ag-indeterminate:before{text-align:center;content:\"-\";display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex;padding-right:0}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]
|
|
16145
16230
|
}),
|
|
16146
16231
|
__metadata("design:paramtypes", [DatoGridControllerComponent, ElementRef])
|
|
16147
16232
|
], DatoGridV2Component);
|
|
@@ -16340,7 +16425,8 @@ var DatoGridHeaderV2Component = /** @class */ (function () {
|
|
|
16340
16425
|
}
|
|
16341
16426
|
Object.defineProperty(DatoGridHeaderV2Component.prototype, "enableBackground", {
|
|
16342
16427
|
get: function () {
|
|
16343
|
-
|
|
16428
|
+
var gridOptions = this.controller.gridOptions;
|
|
16429
|
+
return gridOptions ? gridOptions.enableBackground : false;
|
|
16344
16430
|
},
|
|
16345
16431
|
enumerable: true,
|
|
16346
16432
|
configurable: true
|
|
@@ -16822,6 +16908,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
16822
16908
|
this.gridService = gridService;
|
|
16823
16909
|
this.MAX_VISIBLE_ROW_ACTIONS = 5;
|
|
16824
16910
|
this.MAX_VISIBLE_GRID_ACTIONS = 2;
|
|
16911
|
+
this.destroy$ = new Subject();
|
|
16825
16912
|
this._maxRowActions = this.MAX_VISIBLE_ROW_ACTIONS;
|
|
16826
16913
|
this.displayExport = true;
|
|
16827
16914
|
this.rowActions = { mainList: [], moreMenu: [] };
|
|
@@ -16859,21 +16946,24 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
16859
16946
|
});
|
|
16860
16947
|
Object.defineProperty(DatoGridV2ToolbarComponent.prototype, "enableV2_1", {
|
|
16861
16948
|
get: function () {
|
|
16862
|
-
|
|
16949
|
+
var gridOptions = this.gridController.gridOptions;
|
|
16950
|
+
return gridOptions ? gridOptions.enableV2_1 : false;
|
|
16863
16951
|
},
|
|
16864
16952
|
enumerable: true,
|
|
16865
16953
|
configurable: true
|
|
16866
16954
|
});
|
|
16867
16955
|
Object.defineProperty(DatoGridV2ToolbarComponent.prototype, "enableSearch", {
|
|
16868
16956
|
get: function () {
|
|
16869
|
-
|
|
16957
|
+
var gridOptions = this.gridController.gridOptions;
|
|
16958
|
+
return gridOptions ? gridOptions.enableSearch : false;
|
|
16870
16959
|
},
|
|
16871
16960
|
enumerable: true,
|
|
16872
16961
|
configurable: true
|
|
16873
16962
|
});
|
|
16874
16963
|
Object.defineProperty(DatoGridV2ToolbarComponent.prototype, "enableBackground", {
|
|
16875
16964
|
get: function () {
|
|
16876
|
-
|
|
16965
|
+
var gridOptions = this.gridController.gridOptions;
|
|
16966
|
+
return gridOptions ? gridOptions.enableBackground : false;
|
|
16877
16967
|
},
|
|
16878
16968
|
enumerable: true,
|
|
16879
16969
|
configurable: true
|
|
@@ -16919,17 +17009,17 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
16919
17009
|
DatoGridV2ToolbarComponent.prototype.ngOnInit = function () {
|
|
16920
17010
|
var _this = this;
|
|
16921
17011
|
var dataChanges = this.gridController.gridQuery.waitForGrid(function () {
|
|
16922
|
-
return merge$1(_this.gridQuery.gridRef.cellValueChanged, _this.gridQuery.gridRef.rowDataUpdated, _this.gridQuery.rowActionVisibilityChanged$).pipe(debounceTime(100),
|
|
17012
|
+
return merge$1(_this.gridQuery.gridRef.cellValueChanged, _this.gridQuery.gridRef.rowDataUpdated, _this.gridQuery.rowActionVisibilityChanged$).pipe(debounceTime(100), takeUntil(_this.destroy$));
|
|
16923
17013
|
});
|
|
16924
17014
|
var gridInit = this.gridQuery.gridReady$.pipe(take(1));
|
|
16925
|
-
gridInit.pipe(
|
|
17015
|
+
gridInit.pipe(takeUntil(this.destroy$)).subscribe(function () {
|
|
16926
17016
|
_this.groupsAllowed = !_this.hideGrouping && !_this.gridQuery.getValue().serverSidePagination.enabled;
|
|
16927
17017
|
});
|
|
16928
17018
|
this.initGridActions();
|
|
16929
17019
|
var selectedRowsChanged$ = this.gridQuery.selectedRowsChange$;
|
|
16930
17020
|
var isSelectAllRowsChanged$ = this.gridQuery.selectIsSelectAllRowsEnabled();
|
|
16931
17021
|
merge$1(dataChanges, gridInit, selectedRowsChanged$, isSelectAllRowsChanged$)
|
|
16932
|
-
.pipe(filter$1(function () { return !!_this.api; }),
|
|
17022
|
+
.pipe(filter$1(function () { return !!_this.api; }), takeUntil(this.destroy$))
|
|
16933
17023
|
.subscribe(function () {
|
|
16934
17024
|
_this.resolveVisibleActions();
|
|
16935
17025
|
_this.cdr.detectChanges();
|
|
@@ -17105,7 +17195,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17105
17195
|
var waitForAnimation = this.hasGroups ? 0 : 200;
|
|
17106
17196
|
/** When changing the tables grouping all the rows are automatically expanded, we need to update the icon state */
|
|
17107
17197
|
var expandSubscription = this.gridQuery.gridRef.columnRowGroupChanged
|
|
17108
|
-
.pipe(take(1),
|
|
17198
|
+
.pipe(take(1), takeUntil(this.destroy$))
|
|
17109
17199
|
.subscribe(function () {
|
|
17110
17200
|
_this.rowGroupsCollapsed = false;
|
|
17111
17201
|
_this.cdr.detectChanges();
|
|
@@ -17122,7 +17212,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17122
17212
|
gridService: _this.gridService
|
|
17123
17213
|
}
|
|
17124
17214
|
})
|
|
17125
|
-
.pipe(
|
|
17215
|
+
.pipe(takeUntil(_this.destroy$))
|
|
17126
17216
|
.subscribe(function () {
|
|
17127
17217
|
expandSubscription.unsubscribe();
|
|
17128
17218
|
_this.openMenus.group = false;
|
|
@@ -17139,7 +17229,10 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17139
17229
|
DatoGridV2ToolbarComponent.prototype.clearSelectedRows = function () {
|
|
17140
17230
|
this.gridService.deselectAllRows();
|
|
17141
17231
|
};
|
|
17142
|
-
DatoGridV2ToolbarComponent.prototype.ngOnDestroy = function () {
|
|
17232
|
+
DatoGridV2ToolbarComponent.prototype.ngOnDestroy = function () {
|
|
17233
|
+
this.destroy$.next();
|
|
17234
|
+
this.destroy$.complete();
|
|
17235
|
+
};
|
|
17143
17236
|
DatoGridV2ToolbarComponent.prototype.getCollapseState = function (_a) {
|
|
17144
17237
|
var node = _a.node, api = _a.api;
|
|
17145
17238
|
var collapsed = true;
|
|
@@ -17158,7 +17251,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17158
17251
|
/** Listen to adding or removing row groups from the columns and not the groups menu */
|
|
17159
17252
|
this.gridQuery
|
|
17160
17253
|
.waitForGrid(function () { return _this.gridQuery.gridRef.columnRowGroupChanged; })
|
|
17161
|
-
.pipe(filter$1(function () { return !_this.openMenus.group; }),
|
|
17254
|
+
.pipe(filter$1(function () { return !_this.openMenus.group; }), takeUntil(this.destroy$))
|
|
17162
17255
|
.subscribe(function () {
|
|
17163
17256
|
_this.rowGroupsCollapsed = false;
|
|
17164
17257
|
_this.cdr.detectChanges();
|
|
@@ -17166,7 +17259,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17166
17259
|
/** Listen to row collapse state to update the icon */
|
|
17167
17260
|
this.gridQuery
|
|
17168
17261
|
.waitForGrid(function () { return _this.gridQuery.gridRef.rowGroupOpened; })
|
|
17169
|
-
.pipe(
|
|
17262
|
+
.pipe(takeUntil(this.destroy$))
|
|
17170
17263
|
.subscribe(function (event) {
|
|
17171
17264
|
var collapsed = _this.getCollapseState(event);
|
|
17172
17265
|
if (collapsed !== _this.rowGroupsCollapsed) {
|
|
@@ -17178,7 +17271,7 @@ var DatoGridV2ToolbarComponent = /** @class */ (function () {
|
|
|
17178
17271
|
DatoGridV2ToolbarComponent.prototype.subscribeRowsSelectionData = function () {
|
|
17179
17272
|
var _this = this;
|
|
17180
17273
|
this.gridQuery.rowsSelectionData$
|
|
17181
|
-
.pipe(
|
|
17274
|
+
.pipe(takeUntil(this.destroy$))
|
|
17182
17275
|
.subscribe(function (_a) {
|
|
17183
17276
|
var totalRowsCount = _a.totalRowsCount, selectedRowsCount = _a.selectedRowsCount, selectedPageRowsCount = _a.selectedPageRowsCount, isAllPageRowsSelected = _a.isAllPageRowsSelected;
|
|
17184
17277
|
_this.totalRowsCount = totalRowsCount;
|
|
@@ -25554,7 +25647,7 @@ function fixNgLeaks() {
|
|
|
25554
25647
|
};
|
|
25555
25648
|
}
|
|
25556
25649
|
|
|
25557
|
-
window.coreVersion = '22.15.
|
|
25650
|
+
window.coreVersion = '22.15.2';
|
|
25558
25651
|
|
|
25559
25652
|
/**
|
|
25560
25653
|
* @license
|