@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
package/fesm5/datorama-core.js
CHANGED
|
@@ -11384,20 +11384,17 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11384
11384
|
if (this.gridRef.gridOptions.pivotMode) {
|
|
11385
11385
|
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId = _a.colId;
|
|
11386
11386
|
var column = this.api.columns.getColumn(colId);
|
|
11387
|
-
|
|
11388
|
-
if (pivotedColumn) {
|
|
11389
|
-
var uniquePivotParents = uniq(this.api.columns.getSecondaryColumns().map(function (column) { return column.getParent(); }));
|
|
11390
|
-
var secondaryColumn = this.getSecondaryColumn(pivotedColumn.getColId());
|
|
11391
|
-
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11392
|
-
return { colId: colId, sort: sort, pivotColIndex: pivotColIndex, colField: getColField(pivotedColumn.getColDef()) };
|
|
11393
|
-
}
|
|
11394
|
-
else if (column) {
|
|
11387
|
+
if (column) {
|
|
11395
11388
|
return { colId: colId, sort: sort, colField: getColField(column.getColDef()) };
|
|
11396
11389
|
}
|
|
11390
|
+
else {
|
|
11391
|
+
var secondaryColumn = this.getSecondaryColumn(colId);
|
|
11392
|
+
if (secondaryColumn) {
|
|
11393
|
+
return { colId: colId, sort: sort, colField: getColField(secondaryColumn.getColDef()) };
|
|
11394
|
+
}
|
|
11395
|
+
}
|
|
11397
11396
|
}
|
|
11398
|
-
|
|
11399
|
-
return this.api.grid.getSortModel().pop();
|
|
11400
|
-
}
|
|
11397
|
+
return this.api.grid.getSortModel().pop();
|
|
11401
11398
|
};
|
|
11402
11399
|
GridQuery.prototype.selectSort = function () {
|
|
11403
11400
|
return this.select(function (state) { return state.settings.sort; });
|
|
@@ -11494,7 +11491,10 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11494
11491
|
};
|
|
11495
11492
|
GridQuery.prototype.getSecondaryColumn = function (colId) {
|
|
11496
11493
|
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11497
|
-
|
|
11494
|
+
if (secondaryColumns) {
|
|
11495
|
+
return secondaryColumns.find(function (col) { return col.getColId() === colId; });
|
|
11496
|
+
}
|
|
11497
|
+
return null;
|
|
11498
11498
|
};
|
|
11499
11499
|
GridQuery.prototype.filterCheckboxSelectionColumn = function (columns) {
|
|
11500
11500
|
return columns.filter(function (column) { return !column.getUserProvidedColDef() || !column.getUserProvidedColDef().checkboxSelection; });
|
|
@@ -14206,11 +14206,13 @@ var GridService = /** @class */ (function () {
|
|
|
14206
14206
|
var filter = filters_1_1.value.filter;
|
|
14207
14207
|
var column = this.api.columns.getColumn(filter.colId);
|
|
14208
14208
|
if (column) {
|
|
14209
|
-
this.setColumnFilter(column, filter);
|
|
14209
|
+
this.setColumnFilter(column, filter, false);
|
|
14210
14210
|
}
|
|
14211
14211
|
else {
|
|
14212
|
-
var
|
|
14213
|
-
|
|
14212
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14213
|
+
if (secondaryColumn) {
|
|
14214
|
+
this.setColumnFilter(secondaryColumn, filter, false);
|
|
14215
|
+
}
|
|
14214
14216
|
}
|
|
14215
14217
|
}
|
|
14216
14218
|
}
|
|
@@ -14221,7 +14223,23 @@ var GridService = /** @class */ (function () {
|
|
|
14221
14223
|
}
|
|
14222
14224
|
finally { if (e_2) throw e_2.error; }
|
|
14223
14225
|
}
|
|
14224
|
-
this.
|
|
14226
|
+
this.api.grid.onFilterChanged();
|
|
14227
|
+
}
|
|
14228
|
+
};
|
|
14229
|
+
GridService.prototype.setGridSort = function (_a) {
|
|
14230
|
+
var colId = _a.colId, sort = _a.sort;
|
|
14231
|
+
if (this.api) {
|
|
14232
|
+
var column = this.api.columns.getColumn(colId);
|
|
14233
|
+
if (column) {
|
|
14234
|
+
column.setSort(sort);
|
|
14235
|
+
}
|
|
14236
|
+
else {
|
|
14237
|
+
var secondaryColumn = this.gridQuery.getSecondaryColumn(colId);
|
|
14238
|
+
if (secondaryColumn) {
|
|
14239
|
+
secondaryColumn.setSort(sort);
|
|
14240
|
+
}
|
|
14241
|
+
}
|
|
14242
|
+
this.api.grid.onSortChanged();
|
|
14225
14243
|
}
|
|
14226
14244
|
};
|
|
14227
14245
|
GridService.prototype.updateFilter = function (column, filter) {
|
|
@@ -15336,6 +15354,9 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15336
15354
|
DatoGridControllerComponent.prototype.setGridFilters = function (filters) {
|
|
15337
15355
|
this.gridService.setGridFilters(filters);
|
|
15338
15356
|
};
|
|
15357
|
+
DatoGridControllerComponent.prototype.setGridSort = function (sort) {
|
|
15358
|
+
this.gridService.setGridSort(sort);
|
|
15359
|
+
};
|
|
15339
15360
|
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15340
15361
|
return this.gridQuery.filterChanged();
|
|
15341
15362
|
};
|
|
@@ -25162,7 +25183,7 @@ function fixNgLeaks() {
|
|
|
25162
25183
|
};
|
|
25163
25184
|
}
|
|
25164
25185
|
|
|
25165
|
-
window.coreVersion = '22.0
|
|
25186
|
+
window.coreVersion = '22.2.0';
|
|
25166
25187
|
|
|
25167
25188
|
/**
|
|
25168
25189
|
* @license
|