@datorama/core 22.2.2 → 22.2.4
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 +31 -36
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +23 -23
- 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 +5 -13
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +9 -3
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +18 -21
- 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 +5 -13
- package/esm5/lib/grid-v2/grid-store/grid.query.js +9 -3
- package/esm5/lib/grid-v2/grid-store/grid.service.js +19 -22
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +30 -35
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +31 -36
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +6 -1
- package/lib/grid-v2/grid-controller/grid-controller.component.d.ts +0 -2
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11384,13 +11384,19 @@ 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
|
+
var allColumns = this.api.columns.getAllGridColumns();
|
|
11387
11388
|
if (column) {
|
|
11388
|
-
return { colId: colId, sort: sort,
|
|
11389
|
+
return { colId: colId, sort: sort, field: getColField(column.getColDef()), sortIndex: allColumns.indexOf(column) };
|
|
11389
11390
|
}
|
|
11390
11391
|
else {
|
|
11391
11392
|
var secondaryColumn = this.getSecondaryColumn(colId);
|
|
11392
11393
|
if (secondaryColumn) {
|
|
11393
|
-
return {
|
|
11394
|
+
return {
|
|
11395
|
+
colId: colId,
|
|
11396
|
+
sort: sort,
|
|
11397
|
+
field: getColField(secondaryColumn.getColDef()),
|
|
11398
|
+
sortIndex: allColumns.indexOf(secondaryColumn)
|
|
11399
|
+
};
|
|
11394
11400
|
}
|
|
11395
11401
|
}
|
|
11396
11402
|
}
|
|
@@ -14199,21 +14205,13 @@ var GridService = /** @class */ (function () {
|
|
|
14199
14205
|
}
|
|
14200
14206
|
};
|
|
14201
14207
|
GridService.prototype.setGridFilters = function (filters) {
|
|
14202
|
-
var e_2, _a;
|
|
14208
|
+
var e_2, _a, _b;
|
|
14203
14209
|
if (this.api && filters) {
|
|
14210
|
+
var appliedFilter = {};
|
|
14204
14211
|
try {
|
|
14205
14212
|
for (var filters_1 = __values(filters), filters_1_1 = filters_1.next(); !filters_1_1.done; filters_1_1 = filters_1.next()) {
|
|
14206
|
-
var
|
|
14207
|
-
|
|
14208
|
-
if (column) {
|
|
14209
|
-
this.setColumnFilter(column, filter, false);
|
|
14210
|
-
}
|
|
14211
|
-
else {
|
|
14212
|
-
var secondaryColumn = this.gridQuery.getSecondaryColumn(filter.colId);
|
|
14213
|
-
if (secondaryColumn) {
|
|
14214
|
-
this.setColumnFilter(secondaryColumn, filter, false);
|
|
14215
|
-
}
|
|
14216
|
-
}
|
|
14213
|
+
var _c = filters_1_1.value, filter = _c.filter, field = _c.field;
|
|
14214
|
+
appliedFilter = __assign(__assign({}, appliedFilter), (_b = {}, _b[field] = filter, _b));
|
|
14217
14215
|
}
|
|
14218
14216
|
}
|
|
14219
14217
|
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
@@ -14223,23 +14221,28 @@ var GridService = /** @class */ (function () {
|
|
|
14223
14221
|
}
|
|
14224
14222
|
finally { if (e_2) throw e_2.error; }
|
|
14225
14223
|
}
|
|
14224
|
+
this.updateSettings({ filter: appliedFilter });
|
|
14226
14225
|
this.api.grid.onFilterChanged();
|
|
14227
14226
|
}
|
|
14228
14227
|
};
|
|
14229
14228
|
GridService.prototype.setGridSort = function (gridSort) {
|
|
14230
14229
|
if (this.api && gridSort) {
|
|
14231
|
-
var
|
|
14232
|
-
|
|
14233
|
-
|
|
14234
|
-
|
|
14230
|
+
var sort = gridSort.sort, sortIndex = gridSort.sortIndex;
|
|
14231
|
+
if (!isNil(sortIndex)) {
|
|
14232
|
+
var columns = this.api.columns.getAllGridColumns();
|
|
14233
|
+
if (columns) {
|
|
14234
|
+
var column = columns[sortIndex];
|
|
14235
|
+
if (column) {
|
|
14236
|
+
var sortToApply = { colId: column.getColId(), sort: sort };
|
|
14237
|
+
this.updateSettings({ sort: sortToApply });
|
|
14238
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
14239
|
+
}
|
|
14240
|
+
}
|
|
14235
14241
|
}
|
|
14236
14242
|
else {
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
secondaryColumn.setSort(sort);
|
|
14240
|
-
}
|
|
14243
|
+
this.updateSettings({ sort: gridSort });
|
|
14244
|
+
this.api.grid.setSortModel([gridSort]);
|
|
14241
14245
|
}
|
|
14242
|
-
this.api.grid.onSortChanged();
|
|
14243
14246
|
}
|
|
14244
14247
|
};
|
|
14245
14248
|
GridService.prototype.updateFilter = function (column, filter) {
|
|
@@ -15357,12 +15360,6 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15357
15360
|
DatoGridControllerComponent.prototype.setGridSort = function (sort) {
|
|
15358
15361
|
this.gridService.setGridSort(sort);
|
|
15359
15362
|
};
|
|
15360
|
-
DatoGridControllerComponent.prototype.onFilterChanged = function () {
|
|
15361
|
-
return this.gridQuery.filterChanged();
|
|
15362
|
-
};
|
|
15363
|
-
DatoGridControllerComponent.prototype.onSortChanged = function () {
|
|
15364
|
-
return this.gridQuery.selectSort();
|
|
15365
|
-
};
|
|
15366
15363
|
DatoGridControllerComponent.prototype.getGridIcons = function () {
|
|
15367
15364
|
var moveColumnIcon = "<span class=\"da-grid-icon pointer d-flex column-move\">" + this.iconRegistry.getSvg('move-column') + "</span>";
|
|
15368
15365
|
return {
|
|
@@ -15410,8 +15407,8 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15410
15407
|
};
|
|
15411
15408
|
DatoGridControllerComponent.prototype.listenToGridEvents = function (agGrid) {
|
|
15412
15409
|
var _this = this;
|
|
15413
|
-
var columnVisible = agGrid.columnVisible, sortChanged = agGrid.sortChanged, columnRowGroupChanged = agGrid.columnRowGroupChanged, columnPinned = agGrid.columnPinned, dragStopped = agGrid.dragStopped;
|
|
15414
|
-
merge$1(columnVisible, sortChanged, columnRowGroupChanged, columnPinned, dragStopped)
|
|
15410
|
+
var columnVisible = agGrid.columnVisible, sortChanged = agGrid.sortChanged, columnRowGroupChanged = agGrid.columnRowGroupChanged, columnPinned = agGrid.columnPinned, dragStopped = agGrid.dragStopped, filterChanged = agGrid.filterChanged;
|
|
15411
|
+
merge$1(columnVisible, sortChanged, columnRowGroupChanged, columnPinned, dragStopped, filterChanged)
|
|
15415
15412
|
.pipe(
|
|
15416
15413
|
/* Skip the initial sorting event fired by the grid when adding rows */
|
|
15417
15414
|
skip(1), untilDestroyed(this))
|
|
@@ -15420,10 +15417,8 @@ var DatoGridControllerComponent = /** @class */ (function () {
|
|
|
15420
15417
|
var settingsDiff = _this.gridService.getSettingsDiff();
|
|
15421
15418
|
_this.gridService.updateSettings(settingsDiff);
|
|
15422
15419
|
var data = _this.getGridData();
|
|
15423
|
-
_this.onGridChange.emit({
|
|
15424
|
-
|
|
15425
|
-
data: data
|
|
15426
|
-
});
|
|
15420
|
+
_this.onGridChange.emit(__assign(__assign({}, settingsDiff), { type: type,
|
|
15421
|
+
data: data }));
|
|
15427
15422
|
});
|
|
15428
15423
|
};
|
|
15429
15424
|
DatoGridControllerComponent.prototype.listenToStoreSettingsChanges = function () {
|
|
@@ -25186,7 +25181,7 @@ function fixNgLeaks() {
|
|
|
25186
25181
|
};
|
|
25187
25182
|
}
|
|
25188
25183
|
|
|
25189
|
-
window.coreVersion = '22.2.
|
|
25184
|
+
window.coreVersion = '22.2.4';
|
|
25190
25185
|
|
|
25191
25186
|
/**
|
|
25192
25187
|
* @license
|