@datorama/core 22.5.5 → 22.6.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/bundles/datorama-core.umd.js +41 -13
- 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-no-data-overlay/grid-v2-no-data-overlay.component.js +15 -6
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +24 -9
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-no-data-overlay/grid-v2-no-data-overlay.component.js +19 -6
- package/esm5/lib/grid-v2/grid-store/grid.service.js +24 -9
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +37 -13
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +41 -13
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid-no-data-overlay/grid-v2-no-data-overlay.component.d.ts +4 -1
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11977,11 +11977,23 @@ function deepmerge(target, source, optionsArgument) {
|
|
|
11977
11977
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
11978
11978
|
*/
|
|
11979
11979
|
var DatoGridV2NoDataOverlayComponent = /** @class */ (function () {
|
|
11980
|
-
function DatoGridV2NoDataOverlayComponent(gridQuery, gridService) {
|
|
11980
|
+
function DatoGridV2NoDataOverlayComponent(gridQuery, gridService, element) {
|
|
11981
11981
|
this.gridQuery = gridQuery;
|
|
11982
11982
|
this.gridService = gridService;
|
|
11983
|
+
this.element = element;
|
|
11983
11984
|
this.config = {};
|
|
11984
11985
|
}
|
|
11986
|
+
Object.defineProperty(DatoGridV2NoDataOverlayComponent.prototype, "showImage", {
|
|
11987
|
+
get: function () {
|
|
11988
|
+
var elParent = this.element.nativeElement.parentElement;
|
|
11989
|
+
if (elParent.classList.contains('ag-overlay-wrapper')) {
|
|
11990
|
+
return elParent.offsetHeight >= 390;
|
|
11991
|
+
}
|
|
11992
|
+
return true;
|
|
11993
|
+
},
|
|
11994
|
+
enumerable: true,
|
|
11995
|
+
configurable: true
|
|
11996
|
+
});
|
|
11985
11997
|
DatoGridV2NoDataOverlayComponent.prototype.ngOnInit = function () {
|
|
11986
11998
|
this.filterActive$ = this.gridQuery.filterActive$;
|
|
11987
11999
|
this.hasError$ = this.gridQuery.isServerSide ? this.gridQuery.serverSideError$ : of(false);
|
|
@@ -12013,7 +12025,8 @@ var DatoGridV2NoDataOverlayComponent = /** @class */ (function () {
|
|
|
12013
12025
|
};
|
|
12014
12026
|
DatoGridV2NoDataOverlayComponent.ctorParameters = function () { return [
|
|
12015
12027
|
{ type: GridQuery },
|
|
12016
|
-
{ type: GridService }
|
|
12028
|
+
{ type: GridService },
|
|
12029
|
+
{ type: ElementRef }
|
|
12017
12030
|
]; };
|
|
12018
12031
|
__decorate([
|
|
12019
12032
|
Input(),
|
|
@@ -12022,11 +12035,11 @@ var DatoGridV2NoDataOverlayComponent = /** @class */ (function () {
|
|
|
12022
12035
|
DatoGridV2NoDataOverlayComponent = __decorate([
|
|
12023
12036
|
Component({
|
|
12024
12037
|
selector: 'dato-grid-v2-no-data-overlay',
|
|
12025
|
-
template: "<div class=\"container d-flex-column align-center\">\n <ng-container *ngIf=\"(hasError$ | async) === false; else error\">\n <ng-container *ngIf=\"(filterActive$ | async) === true; else noData\">\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.noResult }\"></ng-container>\n <div class=\"d-flex items-center\">\n <div class=\"dato-simple primary-400-color\">{{'core.try-to-adjust-or' | translate}} </div>\n <dato-link (click)=\"clearFilters()\">{{ 'core.clear-filters' | translate }}</dato-link>\n </div>\n </ng-container>\n <ng-template #noData>\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.noData}\"></ng-container>\n <ng-content select=\"[no-data-content]\"></ng-content>\n </ng-template>\n\n </ng-container>\n <ng-template #error>\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.serverSideError}\"></ng-container>\n <div #errorContent><ng-content select=\"[server-error-content]\"></ng-content></div>\n <div class=\"dato-simple primary-400-color\" *ngIf=\"errorContent.children.length === 0\">{{'core.try-to-refresh-or-contact' | translate}} </div>\n </ng-template>\n</div>\n\n<ng-template #imgNText let-view>\n <img class=\"mb-30\" [datoStaticSrc]=\"view.icon\">\n <div class=\"dato-simple-bold primary-500-color mb-3\">{{ view.text | translate }}</div>\n</ng-template>\n",
|
|
12038
|
+
template: "<div class=\"container d-flex-column align-center\">\n <ng-container *ngIf=\"(hasError$ | async) === false; else error\">\n <ng-container *ngIf=\"(filterActive$ | async) === true; else noData\">\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.noResult }\"></ng-container>\n <div class=\"d-flex items-center\">\n <div class=\"dato-simple primary-400-color\">{{'core.try-to-adjust-or' | translate}} </div>\n <dato-link (click)=\"clearFilters()\">{{ 'core.clear-filters' | translate }}</dato-link>\n </div>\n </ng-container>\n <ng-template #noData>\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.noData}\"></ng-container>\n <ng-content select=\"[no-data-content]\"></ng-content>\n </ng-template>\n\n </ng-container>\n <ng-template #error>\n <ng-container *ngTemplateOutlet=\"imgNText; context: {$implicit: mergedConfig.serverSideError}\"></ng-container>\n <div #errorContent><ng-content select=\"[server-error-content]\"></ng-content></div>\n <div class=\"dato-simple primary-400-color\" *ngIf=\"errorContent.children.length === 0\">{{'core.try-to-refresh-or-contact' | translate}} </div>\n </ng-template>\n</div>\n\n<ng-template #imgNText let-view>\n <img class=\"mb-30\" [datoStaticSrc]=\"view.icon\" *ngIf=\"showImage && view.icon\">\n <div class=\"dato-simple-bold primary-500-color mb-3\">{{ view.text | translate }}</div>\n</ng-template>\n",
|
|
12026
12039
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
12027
12040
|
styles: [":host{pointer-events:all}"]
|
|
12028
12041
|
}),
|
|
12029
|
-
__metadata("design:paramtypes", [GridQuery, GridService])
|
|
12042
|
+
__metadata("design:paramtypes", [GridQuery, GridService, ElementRef])
|
|
12030
12043
|
], DatoGridV2NoDataOverlayComponent);
|
|
12031
12044
|
return DatoGridV2NoDataOverlayComponent;
|
|
12032
12045
|
}());
|
|
@@ -14254,15 +14267,30 @@ var GridService = /** @class */ (function () {
|
|
|
14254
14267
|
};
|
|
14255
14268
|
GridService.prototype.setGridSort = function (gridSort) {
|
|
14256
14269
|
if (this.api && gridSort) {
|
|
14257
|
-
var sort = gridSort.sort, sortIndex = gridSort.sortIndex;
|
|
14270
|
+
var sort = gridSort.sort, sortIndex = gridSort.sortIndex, colId_1 = gridSort.colId;
|
|
14258
14271
|
if (!isNil(sortIndex)) {
|
|
14259
|
-
var
|
|
14260
|
-
if (
|
|
14261
|
-
var
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14272
|
+
var gridColumns = this.api.columns.getAllGridColumns();
|
|
14273
|
+
if (gridColumns) {
|
|
14274
|
+
var primaryColumns = this.api.columns.getPrimaryColumns();
|
|
14275
|
+
var primaryColumn = primaryColumns.find(function (col) { return col.getColId() === colId_1; });
|
|
14276
|
+
if (primaryColumn) {
|
|
14277
|
+
/** Column is no pivot value column */
|
|
14278
|
+
var columnById = gridColumns.find(function (col) {
|
|
14279
|
+
return col.getColDef().showRowGroup || col.getColId() === colId_1;
|
|
14280
|
+
});
|
|
14281
|
+
if (columnById) {
|
|
14282
|
+
var sortToApply = { colId: columnById.getColId(), sort: sort };
|
|
14283
|
+
this.updateSettings({ sort: sortToApply });
|
|
14284
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
14285
|
+
}
|
|
14286
|
+
}
|
|
14287
|
+
else {
|
|
14288
|
+
var columnByIndex = gridColumns[sortIndex];
|
|
14289
|
+
if (columnByIndex) {
|
|
14290
|
+
var sortToApply = { colId: columnByIndex.getColId(), sort: sort };
|
|
14291
|
+
this.updateSettings({ sort: sortToApply });
|
|
14292
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
14293
|
+
}
|
|
14266
14294
|
}
|
|
14267
14295
|
}
|
|
14268
14296
|
}
|
|
@@ -25212,7 +25240,7 @@ function fixNgLeaks() {
|
|
|
25212
25240
|
};
|
|
25213
25241
|
}
|
|
25214
25242
|
|
|
25215
|
-
window.coreVersion = '22.
|
|
25243
|
+
window.coreVersion = '22.6.2';
|
|
25216
25244
|
|
|
25217
25245
|
/**
|
|
25218
25246
|
* @license
|