@datorama/core 22.11.0 → 22.11.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 +8 -1
- package/bundles/datorama-core.umd.js +52 -19
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +4 -4
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +26 -12
- package/esm2015/lib/grid-v2/grid-filter/grid-filter.component.js +2 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +4 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +23 -5
- package/esm2015/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +25 -14
- package/esm5/lib/grid-v2/grid-filter/grid-filter.component.js +2 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +4 -1
- package/esm5/lib/grid-v2/grid-store/grid.service.js +23 -5
- package/esm5/lib/grid-v2/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +53 -17
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +52 -19
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
- package/lib/grid-v2/grid-store/grid.query.d.ts +2 -0
- package/lib/grid-v2/grid-store/grid.service.d.ts +2 -0
- package/package.json +1 -1
package/bundle.scss
CHANGED
|
@@ -14319,6 +14319,10 @@ dato-input input:disabled:hover {
|
|
|
14319
14319
|
*/
|
|
14320
14320
|
}
|
|
14321
14321
|
|
|
14322
|
+
.dato-grid.pivot-mode .ag-row.ag-row-group .bottom-border {
|
|
14323
|
+
border-bottom: 1px solid themify(primary-200);
|
|
14324
|
+
}
|
|
14325
|
+
|
|
14322
14326
|
.dato-grid.pivot-mode .ag-row.ag-row-group:not(.ag-row-hover) {
|
|
14323
14327
|
background-color: themify(primary-50);
|
|
14324
14328
|
}
|
|
@@ -14333,7 +14337,6 @@ dato-input input:disabled:hover {
|
|
|
14333
14337
|
|
|
14334
14338
|
.dato-grid.pivot-mode .ag-header .ag-header-row .ag-header-cell {
|
|
14335
14339
|
border: none;
|
|
14336
|
-
border-top: 1px solid themify(primary-200);
|
|
14337
14340
|
}
|
|
14338
14341
|
|
|
14339
14342
|
.dato-grid.pivot-mode .ag-header .ag-header-row .ag-header-cell dato-grid-column-header {
|
|
@@ -14349,6 +14352,10 @@ dato-input input:disabled:hover {
|
|
|
14349
14352
|
color: themify(primary-500);
|
|
14350
14353
|
}
|
|
14351
14354
|
|
|
14355
|
+
.dato-grid.pivot-mode .ag-header .ag-header-row .ag-header-cell.top-border {
|
|
14356
|
+
border-top: 1px solid themify(primary-200);
|
|
14357
|
+
}
|
|
14358
|
+
|
|
14352
14359
|
.dato-grid.pivot-mode .ag-header .ag-header-row .ag-header-cell-resize {
|
|
14353
14360
|
height: 100%;
|
|
14354
14361
|
margin: 0;
|
|
@@ -11516,6 +11516,8 @@
|
|
|
11516
11516
|
//@internal
|
|
11517
11517
|
_this._serverDataLoaded = new rxjs.Subject();
|
|
11518
11518
|
_this.serverDataLoaded$ = _this._serverDataLoaded.asObservable();
|
|
11519
|
+
_this._rowActionVisibilityChanged = new rxjs.Subject();
|
|
11520
|
+
_this.rowActionVisibilityChanged$ = _this._rowActionVisibilityChanged.asObservable();
|
|
11519
11521
|
_this.rowDataChanged$ = _this.waitForGrid(function () {
|
|
11520
11522
|
return rxjs.merge(_this.gridRef.rowDataChanged, _this.gridRef.rowDataUpdated, _this.gridRef.filterChanged, _this.serverDataLoaded$);
|
|
11521
11523
|
});
|
|
@@ -11722,6 +11724,7 @@
|
|
|
11722
11724
|
return this.select(function (state) { return state.serverSidePagination.selectAllRowsEnabled; });
|
|
11723
11725
|
};
|
|
11724
11726
|
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11727
|
+
/** Use getPivotResultColumns from ver 28 */
|
|
11725
11728
|
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11726
11729
|
if (secondaryColumns) {
|
|
11727
11730
|
return secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
@@ -12965,6 +12968,7 @@
|
|
|
12965
12968
|
var filtersConfig = colDef.filtersConfig || this.colDef.filtersConfig || {};
|
|
12966
12969
|
var colFilter = filter || colDef.filter;
|
|
12967
12970
|
var filterOptions = DatoGridFilterOptionsMap[colFilter];
|
|
12971
|
+
/** Use getPivotResultColumn from ver 28 */
|
|
12968
12972
|
this.pivotColumn = gridQuery.api.columns.getSecondaryPivotColumn(pivotKeys, pivotValueColumn);
|
|
12969
12973
|
this.inputConditionsOperator = filtersConfig.inputConditionsOperator;
|
|
12970
12974
|
if (!isNil(filtersConfig.showClearFiltersButton)) {
|
|
@@ -14341,11 +14345,24 @@
|
|
|
14341
14345
|
this.initPivotSecondaryColsProcess(params);
|
|
14342
14346
|
params.gridOptions.enableV2_1 = true;
|
|
14343
14347
|
params.gridOptions.saveSettings = false;
|
|
14344
|
-
params.gridOptions.defaultColDef.cellClass
|
|
14345
|
-
params.gridOptions.autoGroupColumnDef.cellClass
|
|
14348
|
+
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14349
|
+
params.gridOptions.autoGroupColumnDef = __assign(__assign({}, params.gridOptions.autoGroupColumnDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this) });
|
|
14346
14350
|
}
|
|
14347
14351
|
return params.gridOptions;
|
|
14348
14352
|
};
|
|
14353
|
+
GridService.prototype.getPivotHeaderClass = function (params) {
|
|
14354
|
+
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
14355
|
+
var cellClass = '';
|
|
14356
|
+
if (gridQuery && gridQuery.api) {
|
|
14357
|
+
var columns = gridQuery.api.columns;
|
|
14358
|
+
/** Use getPivotResultColumns from ver 28 */
|
|
14359
|
+
var pivotColumns = columns.getSecondaryColumns();
|
|
14360
|
+
if (pivotColumns && pivotColumns.length > 0) {
|
|
14361
|
+
cellClass += 'top-border';
|
|
14362
|
+
}
|
|
14363
|
+
}
|
|
14364
|
+
return cellClass;
|
|
14365
|
+
};
|
|
14349
14366
|
GridService.prototype.getPivotCellClass = function (params) {
|
|
14350
14367
|
var _a = params.node, leafGroup = _a.leafGroup, childIndex = _a.childIndex, rowGroupIndex = _a.rowGroupIndex;
|
|
14351
14368
|
var gridQuery = params.colDef.headerComponentParams.gridQuery;
|
|
@@ -14361,11 +14378,11 @@
|
|
|
14361
14378
|
if (leafGroup) {
|
|
14362
14379
|
if (childIndex % 2 === 0) {
|
|
14363
14380
|
/** If row is even */
|
|
14364
|
-
cellClass += ' primary-
|
|
14381
|
+
cellClass += ' primary-0-background-color';
|
|
14365
14382
|
}
|
|
14366
14383
|
}
|
|
14367
14384
|
else {
|
|
14368
|
-
cellClass += 'primary-
|
|
14385
|
+
cellClass += 'bottom-border primary-100-background-color pointer dato-simple-bold';
|
|
14369
14386
|
}
|
|
14370
14387
|
}
|
|
14371
14388
|
}
|
|
@@ -15139,6 +15156,9 @@
|
|
|
15139
15156
|
this.setServerSidePagination({ selectAllRowsEnabled: false, excludedFromSelectAll: [] });
|
|
15140
15157
|
}
|
|
15141
15158
|
};
|
|
15159
|
+
GridService.prototype.resolveRowActionsVisibility = function () {
|
|
15160
|
+
this.gridQuery._rowActionVisibilityChanged.next();
|
|
15161
|
+
};
|
|
15142
15162
|
/**
|
|
15143
15163
|
* When pivoting,
|
|
15144
15164
|
* we add the field name to the column header class in order to access it through the auto generated pivot column.
|
|
@@ -15146,6 +15166,7 @@
|
|
|
15146
15166
|
GridService.prototype.initPivotSecondaryColsProcess = function (_a) {
|
|
15147
15167
|
var _this = this;
|
|
15148
15168
|
var gridOptions = _a.gridOptions;
|
|
15169
|
+
/** Use processPivotResultColDef from ver 28 */
|
|
15149
15170
|
gridOptions.processSecondaryColDef = function (colDef) {
|
|
15150
15171
|
var userProvidedColDef = colDef.pivotValueColumn && colDef.pivotValueColumn.getUserProvidedColDef();
|
|
15151
15172
|
if (userProvidedColDef) {
|
|
@@ -15158,6 +15179,7 @@
|
|
|
15158
15179
|
});
|
|
15159
15180
|
}
|
|
15160
15181
|
};
|
|
15182
|
+
/** Use processPivotResultColGroupDe from ver 28 */
|
|
15161
15183
|
gridOptions.processSecondaryColGroupDef = function (colGroupDef) {
|
|
15162
15184
|
if (colGroupDef.headerName) {
|
|
15163
15185
|
var parsedValue = tryParsePivotValue(colGroupDef.headerName);
|
|
@@ -15662,7 +15684,7 @@
|
|
|
15662
15684
|
});
|
|
15663
15685
|
DatoGridControllerComponent.prototype.ngOnDestroy = function () {
|
|
15664
15686
|
this.contentInit.complete();
|
|
15665
|
-
this.
|
|
15687
|
+
this.clearTooltip();
|
|
15666
15688
|
this.rowHoverComponent && this.rowHoverComponent.destroy();
|
|
15667
15689
|
this.rowHoverComponent = null;
|
|
15668
15690
|
};
|
|
@@ -15889,40 +15911,51 @@
|
|
|
15889
15911
|
});
|
|
15890
15912
|
this.addOnHoverElement();
|
|
15891
15913
|
}
|
|
15892
|
-
agGrid.cellMouseOver
|
|
15893
|
-
.
|
|
15894
|
-
|
|
15895
|
-
|
|
15896
|
-
|
|
15897
|
-
|
|
15898
|
-
lastHoveredCell =
|
|
15914
|
+
agGrid.cellMouseOver.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function (event) {
|
|
15915
|
+
var node = event.node, column = event.column;
|
|
15916
|
+
if (lastHoveredCell === node.id + "-" + column.getColId()) {
|
|
15917
|
+
clearTimeout(_this.cellMouseOutTimer);
|
|
15918
|
+
return;
|
|
15919
|
+
}
|
|
15920
|
+
lastHoveredCell = node.id + "-" + column.getColId();
|
|
15899
15921
|
_this.showTooltip(event);
|
|
15900
15922
|
var row = event.event.target.parentElement;
|
|
15901
|
-
if (onHoverEnabled && (
|
|
15923
|
+
if (onHoverEnabled && (node.group === false || isNil(node.group)) && _this.lastHoveredRow !== row) {
|
|
15902
15924
|
var previousNode = _this.lastHoveredRow;
|
|
15903
15925
|
_this.lastHoveredRow = row;
|
|
15904
15926
|
_this.toggleRowHoverClass([previousNode, _this.lastHoveredRow]);
|
|
15905
15927
|
_this.setOnHoverState(true, event);
|
|
15906
15928
|
}
|
|
15907
15929
|
});
|
|
15908
|
-
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave')
|
|
15909
|
-
onTooltipOut
|
|
15930
|
+
var onTooltipOut = rxjs.merge(rxjs.fromEvent(bodyViewport, 'scroll'), rxjs.fromEvent(this.agGridEl, 'mouseleave'));
|
|
15931
|
+
onTooltipOut.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function () {
|
|
15932
|
+
lastHoveredCell = null;
|
|
15933
|
+
_this.clearTooltip();
|
|
15934
|
+
});
|
|
15935
|
+
agGrid.cellMouseOut
|
|
15910
15936
|
.pipe(operators.filter(function () { return !isNil(_this.tooltip); }), ngxTakeUntilDestroy.untilDestroyed(this))
|
|
15911
15937
|
.subscribe(function () {
|
|
15912
|
-
_this.clearTooltip();
|
|
15938
|
+
_this.cellMouseOutTimer = window.setTimeout(function () { return _this.clearTooltip(); });
|
|
15913
15939
|
});
|
|
15914
15940
|
};
|
|
15915
15941
|
/**
|
|
15916
15942
|
* Dispose the tooltip
|
|
15917
15943
|
*/
|
|
15918
15944
|
DatoGridControllerComponent.prototype.clearTooltip = function () {
|
|
15919
|
-
this.tooltip.dispose();
|
|
15945
|
+
this.tooltip && this.tooltip.dispose();
|
|
15920
15946
|
this.tooltip = null;
|
|
15921
15947
|
};
|
|
15922
15948
|
DatoGridControllerComponent.prototype.showTooltip = function (event) {
|
|
15923
15949
|
var cell = event.event.target;
|
|
15950
|
+
if (cell.tagName === 'SPAN' && cell.scrollWidth === 0) {
|
|
15951
|
+
cell = cell.parentElement;
|
|
15952
|
+
}
|
|
15953
|
+
if (event.colDef.editable) {
|
|
15954
|
+
cell = cell.querySelector('.value-wrapper') || cell;
|
|
15955
|
+
}
|
|
15924
15956
|
var textOverflow = cell.offsetWidth < cell.scrollWidth;
|
|
15925
15957
|
if (textOverflow) {
|
|
15958
|
+
clearTimeout(this.cellMouseOutTimer);
|
|
15926
15959
|
var params = { cell: cell, value: cell.innerText };
|
|
15927
15960
|
isNil(this.tooltip) ? this.createAndShowTooltip(params) : this.updateTooltip(params);
|
|
15928
15961
|
}
|
|
@@ -16945,7 +16978,7 @@
|
|
|
16945
16978
|
DatoGridV2ToolbarComponent.prototype.ngOnInit = function () {
|
|
16946
16979
|
var _this = this;
|
|
16947
16980
|
var dataChanges = this.gridController.gridQuery.waitForGrid(function () {
|
|
16948
|
-
return rxjs.merge(_this.gridQuery.gridRef.cellValueChanged, _this.gridQuery.gridRef.rowDataUpdated).pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16981
|
+
return rxjs.merge(_this.gridQuery.gridRef.cellValueChanged, _this.gridQuery.gridRef.rowDataUpdated, _this.gridQuery.rowActionVisibilityChanged$).pipe(operators.debounceTime(100), ngxTakeUntilDestroy.untilDestroyed(_this));
|
|
16949
16982
|
});
|
|
16950
16983
|
var gridInit = this.gridQuery.gridReady$.pipe(operators.take(1));
|
|
16951
16984
|
gridInit.pipe(ngxTakeUntilDestroy.untilDestroyed(this)).subscribe(function () {
|
|
@@ -25573,7 +25606,7 @@
|
|
|
25573
25606
|
};
|
|
25574
25607
|
}
|
|
25575
25608
|
|
|
25576
|
-
window.coreVersion = '22.11.
|
|
25609
|
+
window.coreVersion = '22.11.2';
|
|
25577
25610
|
|
|
25578
25611
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25579
25612
|
exports.AceService = AceService;
|