@datorama/core 22.0.6 → 22.2.0
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/bundles/datorama-core.umd.js +38 -17
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +3 -3
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-controller/grid-controller.component.js +4 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +13 -14
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +22 -5
- package/esm2015/lib/icon/icon.types.js +1 -1
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-controller/grid-controller.component.js +4 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +13 -14
- package/esm5/lib/grid-v2/grid-store/grid.service.js +23 -5
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +37 -17
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +38 -17
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +0 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +1 -0
- package/lib/grid-v2/grid-store/grid.service.d.ts +2 -1
- package/package.json +1 -1
|
@@ -11583,20 +11583,17 @@
|
|
|
11583
11583
|
if (this.gridRef.gridOptions.pivotMode) {
|
|
11584
11584
|
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11585
11585
|
var column = this.api.columns.getColumn(colId);
|
|
11586
|
-
|
|
11587
|
-
if (pivotedColumn) {
|
|
11588
|
-
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11589
|
-
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11590
|
-
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11591
|
-
return { colId: colId, sort: sort, pivotColIndex: pivotColIndex, colField: getColField(pivotedColumn.getColDef()) };
|
|
11592
|
-
}
|
|
11593
|
-
else if (column) {
|
|
11586
|
+
if (column) {
|
|
11594
11587
|
return { colId: colId, sort: sort, colField: getColField(column.getColDef()) };
|
|
11595
11588
|
}
|
|
11589
|
+
else {
|
|
11590
|
+
var secondaryColumn = this.getSecondaryColumn(colId);
|
|
11591
|
+
if (secondaryColumn) {
|
|
11592
|
+
return { colId: colId, sort: sort, colField: getColField(secondaryColumn.getColDef()) };
|
|
11593
|
+
}
|
|
11594
|
+
}
|
|
11596
11595
|
}
|
|
11597
|
-
|
|
11598
|
-
return this.api.grid.getSortModel().pop();
|
|
11599
|
-
}
|
|
11596
|
+
return this.api.grid.getSortModel().pop();
|
|
11600
11597
|
};
|
|
11601
11598
|
GridQuery.prototype.selectSort = function () {
|
|
11602
11599
|
return this.select(function (state) { return state.settings.sort; });
|
|
@@ -11693,7 +11690,10 @@
|
|
|
11693
11690
|
};
|
|
11694
11691
|
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11695
11692
|
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11696
|
-
|
|
11693
|
+
if (secondaryColumns) {
|
|
11694
|
+
return secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11695
|
+
}
|
|
11696
|
+
return null;
|
|
11697
11697
|
};
|
|
11698
11698
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11699
11699
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
@@ -14405,11 +14405,13 @@
|
|
|
14405
14405
|
var filter = filters_1_1.value.filter;
|
|
14406
14406
|
var column = this.api.columns.getColumn(filter.colId);
|
|
14407
14407
|
if (column) {
|
|
14408
|
-
this.setColumnFilter(column, filter);
|
|
14408
|
+
this.setColumnFilter(column, filter, false);
|
|
14409
14409
|
}
|
|
14410
14410
|
else {
|
|
14411
|
-
var
|
|
14412
|
-
|
|
14411
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14412
|
+
if (secondaryColumn) {
|
|
14413
|
+
this.setColumnFilter(secondaryColumn, filter, false);
|
|
14414
|
+
}
|
|
14413
14415
|
}
|
|
14414
14416
|
}
|
|
14415
14417
|
}
|
|
@@ -14420,7 +14422,23 @@
|
|
|
14420
14422
|
}
|
|
14421
14423
|
finally { if (e_2) throw e_2.error; }
|
|
14422
14424
|
}
|
|
14423
|
-
this.
|
|
14425
|
+
this.api.grid.onFilterChanged();
|
|
14426
|
+
}
|
|
14427
|
+
};
|
|
14428
|
+
GridService.prototype.setGridSort = function (_a) {
|
|
14429
|
+
var colId = _a.colId, sort = _a.sort;
|
|
14430
|
+
if (this.api) {
|
|
14431
|
+
var column = this.api.columns.getColumn(colId);
|
|
14432
|
+
if (column) {
|
|
14433
|
+
column.setSort(sort);
|
|
14434
|
+
}
|
|
14435
|
+
else {
|
|
14436
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14437
|
+
if (secondaryColumn) {
|
|
14438
|
+
secondaryColumn.setSort(sort);
|
|
14439
|
+
}
|
|
14440
|
+
}
|
|
14441
|
+
this.api.grid.onSortChanged();
|
|
14424
14442
|
}
|
|
14425
14443
|
};
|
|
14426
14444
|
GridService.prototype.updateFilter = function (column, filter) {
|
|
@@ -15535,6 +15553,9 @@
|
|
|
15535
15553
|
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15536
15554
|
this.gridService.setGridFilters(filters);
|
|
15537
15555
|
};
|
|
15556
|
+
DatoGridControllerComponent.prototype.setGridSort = function (sort) {
|
|
15557
|
+
this.gridService.setGridSort(sort);
|
|
15558
|
+
};
|
|
15538
15559
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15539
15560
|
return this.gridQuery.filterChanged();
|
|
15540
15561
|
};
|
|
@@ -25361,7 +25382,7 @@
|
|
|
25361
25382
|
};
|
|
25362
25383
|
}
|
|
25363
25384
|
|
|
25364
|
-
window.coreVersion = '22.0
|
|
25385
|
+
window.coreVersion = '22.2.0';
|
|
25365
25386
|
|
|
25366
25387
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25367
25388
|
exports.AceService = AceService;
|