@datorama/core 22.8.1-rc.3 → 22.8.2-rc.1
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 +18 -19
- 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 +3 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +12 -14
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +6 -6
- 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 +3 -1
- package/esm5/lib/grid-v2/grid-store/grid.query.js +12 -14
- package/esm5/lib/grid-v2/grid-store/grid.service.js +6 -6
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +18 -19
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +18 -19
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +1 -0
- package/lib/grid-v2/grid-store/grid.query.d.ts +1 -1
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11382,7 +11382,7 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11382
11382
|
var storeSettings = this.getValue().settings;
|
|
11383
11383
|
var settings = {
|
|
11384
11384
|
gridAlignment: storeSettings.gridAlignment,
|
|
11385
|
-
sort: this.getSort(),
|
|
11385
|
+
sort: this.getGridOptions().sortByStore ? this.getSort() : this.getSortModel(),
|
|
11386
11386
|
hiddenColumns: hiddenColumns,
|
|
11387
11387
|
groupedColumns: groupedColumns.map(toColId),
|
|
11388
11388
|
filter: this.getFilter(),
|
|
@@ -11396,31 +11396,29 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11396
11396
|
}
|
|
11397
11397
|
return settings;
|
|
11398
11398
|
};
|
|
11399
|
-
GridQuery.prototype.
|
|
11399
|
+
GridQuery.prototype.getSortModel = function () {
|
|
11400
11400
|
return this.api.grid.getSortModel().pop();
|
|
11401
11401
|
};
|
|
11402
|
+
GridQuery.prototype.getSort = function () {
|
|
11403
|
+
return this.getValue().settings.sort || this.getSortModel();
|
|
11404
|
+
};
|
|
11402
11405
|
GridQuery.prototype.getExternalSort = function () {
|
|
11403
|
-
var _a = this.getSort() || {}, sort = _a.sort, colId = _a.colId;
|
|
11406
|
+
var _a = this.getSort() || {}, sort = _a.sort, colId = _a.colId, savedSortIndex = _a.sortIndex;
|
|
11404
11407
|
var column = this.api.columns.getColumn(colId);
|
|
11405
11408
|
var allColumns = this.api.columns.getAllGridColumns();
|
|
11406
11409
|
if (column) {
|
|
11407
|
-
|
|
11410
|
+
var field = getColField(column.getColDef());
|
|
11411
|
+
return { colId: colId, sort: sort, field: field };
|
|
11408
11412
|
}
|
|
11409
11413
|
else {
|
|
11410
11414
|
var secondaryColumn = this.getSecondaryColumn(colId);
|
|
11411
11415
|
if (secondaryColumn) {
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
field: getColField(secondaryColumn.getColDef()),
|
|
11416
|
-
sortIndex: allColumns.indexOf(secondaryColumn)
|
|
11417
|
-
};
|
|
11416
|
+
var sortIndex = savedSortIndex || allColumns.indexOf(secondaryColumn);
|
|
11417
|
+
var field = getColField(secondaryColumn.getColDef());
|
|
11418
|
+
return { colId: colId, sort: sort, field: field, sortIndex: sortIndex };
|
|
11418
11419
|
}
|
|
11419
11420
|
}
|
|
11420
11421
|
};
|
|
11421
|
-
GridQuery.prototype.selectSort = function () {
|
|
11422
|
-
return this.select(function (state) { return state.settings.sort; });
|
|
11423
|
-
};
|
|
11424
11422
|
/* @internal */
|
|
11425
11423
|
GridQuery.prototype._setApi = function (api, gridRef) {
|
|
11426
11424
|
this.api = api;
|
|
@@ -14273,11 +14271,11 @@ var GridService = /** @class */ (function () {
|
|
|
14273
14271
|
if (isPivotColId || valueColumn) {
|
|
14274
14272
|
/** Column is pivot value column, sort by index */
|
|
14275
14273
|
var columnByIndex = gridColumns[sortIndex];
|
|
14276
|
-
|
|
14277
|
-
|
|
14278
|
-
if (pivotValueColumnId ===
|
|
14279
|
-
|
|
14280
|
-
}
|
|
14274
|
+
// const pivotValueColumn = columnByIndex && columnByIndex.getColDef().pivotValueColumn;
|
|
14275
|
+
// const pivotValueColumnId = pivotValueColumn && pivotValueColumn.getColId();
|
|
14276
|
+
// if (pivotValueColumnId === colId) {
|
|
14277
|
+
sortToApply = { colId: columnByIndex.getColId(), sort: sort, sortIndex: sortIndex };
|
|
14278
|
+
// }
|
|
14281
14279
|
}
|
|
14282
14280
|
else {
|
|
14283
14281
|
/** Sort by column id */
|
|
@@ -15476,6 +15474,7 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15476
15474
|
type: type,
|
|
15477
15475
|
data: data
|
|
15478
15476
|
});
|
|
15477
|
+
triggerWindowResize();
|
|
15479
15478
|
});
|
|
15480
15479
|
};
|
|
15481
15480
|
DatoGridControllerComponent.prototype.listenToStoreSettingsChanges = function () {
|
|
@@ -25268,7 +25267,7 @@ function fixNgLeaks() {
|
|
|
25268
25267
|
};
|
|
25269
25268
|
}
|
|
25270
25269
|
|
|
25271
|
-
window.coreVersion = '22.8.
|
|
25270
|
+
window.coreVersion = '22.8.2-rc.';
|
|
25272
25271
|
|
|
25273
25272
|
/**
|
|
25274
25273
|
* @license
|