@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
|
@@ -12176,11 +12176,23 @@
|
|
|
12176
12176
|
* found in the LICENSE file at https://github.com/datorama/client-core/blob/master/LICENSE
|
|
12177
12177
|
*/
|
|
12178
12178
|
var DatoGridV2NoDataOverlayComponent = /** @class */ (function () {
|
|
12179
|
-
function DatoGridV2NoDataOverlayComponent(gridQuery, gridService) {
|
|
12179
|
+
function DatoGridV2NoDataOverlayComponent(gridQuery, gridService, element) {
|
|
12180
12180
|
this.gridQuery = gridQuery;
|
|
12181
12181
|
this.gridService = gridService;
|
|
12182
|
+
this.element = element;
|
|
12182
12183
|
this.config = {};
|
|
12183
12184
|
}
|
|
12185
|
+
Object.defineProperty(DatoGridV2NoDataOverlayComponent.prototype, "showImage", {
|
|
12186
|
+
get: function () {
|
|
12187
|
+
var elParent = this.element.nativeElement.parentElement;
|
|
12188
|
+
if (elParent.classList.contains('ag-overlay-wrapper')) {
|
|
12189
|
+
return elParent.offsetHeight >= 390;
|
|
12190
|
+
}
|
|
12191
|
+
return true;
|
|
12192
|
+
},
|
|
12193
|
+
enumerable: true,
|
|
12194
|
+
configurable: true
|
|
12195
|
+
});
|
|
12184
12196
|
DatoGridV2NoDataOverlayComponent.prototype.ngOnInit = function () {
|
|
12185
12197
|
this.filterActive$ = this.gridQuery.filterActive$;
|
|
12186
12198
|
this.hasError$ = this.gridQuery.isServerSide ? this.gridQuery.serverSideError$ : rxjs.of(false);
|
|
@@ -12212,7 +12224,8 @@
|
|
|
12212
12224
|
};
|
|
12213
12225
|
DatoGridV2NoDataOverlayComponent.ctorParameters = function () { return [
|
|
12214
12226
|
{ type: GridQuery },
|
|
12215
|
-
{ type: GridService }
|
|
12227
|
+
{ type: GridService },
|
|
12228
|
+
{ type: core.ElementRef }
|
|
12216
12229
|
]; };
|
|
12217
12230
|
__decorate([
|
|
12218
12231
|
core.Input(),
|
|
@@ -12221,11 +12234,11 @@
|
|
|
12221
12234
|
DatoGridV2NoDataOverlayComponent = __decorate([
|
|
12222
12235
|
core.Component({
|
|
12223
12236
|
selector: 'dato-grid-v2-no-data-overlay',
|
|
12224
|
-
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",
|
|
12237
|
+
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",
|
|
12225
12238
|
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
12226
12239
|
styles: [":host{pointer-events:all}"]
|
|
12227
12240
|
}),
|
|
12228
|
-
__metadata("design:paramtypes", [GridQuery, GridService])
|
|
12241
|
+
__metadata("design:paramtypes", [GridQuery, GridService, core.ElementRef])
|
|
12229
12242
|
], DatoGridV2NoDataOverlayComponent);
|
|
12230
12243
|
return DatoGridV2NoDataOverlayComponent;
|
|
12231
12244
|
}());
|
|
@@ -14453,15 +14466,30 @@
|
|
|
14453
14466
|
};
|
|
14454
14467
|
GridService.prototype.setGridSort = function (gridSort) {
|
|
14455
14468
|
if (this.api && gridSort) {
|
|
14456
|
-
var sort = gridSort.sort, sortIndex = gridSort.sortIndex;
|
|
14469
|
+
var sort = gridSort.sort, sortIndex = gridSort.sortIndex, colId_1 = gridSort.colId;
|
|
14457
14470
|
if (!isNil(sortIndex)) {
|
|
14458
|
-
var
|
|
14459
|
-
if (
|
|
14460
|
-
var
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14471
|
+
var gridColumns = this.api.columns.getAllGridColumns();
|
|
14472
|
+
if (gridColumns) {
|
|
14473
|
+
var primaryColumns = this.api.columns.getPrimaryColumns();
|
|
14474
|
+
var primaryColumn = primaryColumns.find(function (col) { return col.getColId() === colId_1; });
|
|
14475
|
+
if (primaryColumn) {
|
|
14476
|
+
/** Column is no pivot value column */
|
|
14477
|
+
var columnById = gridColumns.find(function (col) {
|
|
14478
|
+
return col.getColDef().showRowGroup || col.getColId() === colId_1;
|
|
14479
|
+
});
|
|
14480
|
+
if (columnById) {
|
|
14481
|
+
var sortToApply = { colId: columnById.getColId(), sort: sort };
|
|
14482
|
+
this.updateSettings({ sort: sortToApply });
|
|
14483
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
14484
|
+
}
|
|
14485
|
+
}
|
|
14486
|
+
else {
|
|
14487
|
+
var columnByIndex = gridColumns[sortIndex];
|
|
14488
|
+
if (columnByIndex) {
|
|
14489
|
+
var sortToApply = { colId: columnByIndex.getColId(), sort: sort };
|
|
14490
|
+
this.updateSettings({ sort: sortToApply });
|
|
14491
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
14492
|
+
}
|
|
14465
14493
|
}
|
|
14466
14494
|
}
|
|
14467
14495
|
}
|
|
@@ -25411,7 +25439,7 @@
|
|
|
25411
25439
|
};
|
|
25412
25440
|
}
|
|
25413
25441
|
|
|
25414
|
-
window.coreVersion = '22.
|
|
25442
|
+
window.coreVersion = '22.6.2';
|
|
25415
25443
|
|
|
25416
25444
|
exports.APP_TRANSLATE = APP_TRANSLATE;
|
|
25417
25445
|
exports.AceService = AceService;
|