@datorama/core 22.12.1-beta.4 → 22.12.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/bundle.scss +0 -4
- package/bundles/datorama-core.umd.js +23 -8
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +2 -2
- 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.component.js +2 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.config.js +2 -2
- package/esm2015/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm2015/lib/grid-v2/grid-column-header/grid-column-header.component.js +16 -2
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +6 -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.component.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.config.js +2 -2
- package/esm5/lib/grid-v2/grid/grid-v2.types.js +1 -1
- package/esm5/lib/grid-v2/grid-column-header/grid-column-header.component.js +16 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +6 -5
- package/esm5/lib/icon/icon.types.js +1 -1
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +23 -8
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +23 -8
- package/fesm5/datorama-core.js.map +1 -1
- package/lib/grid-v2/grid/grid-v2.types.d.ts +2 -1
- package/lib/grid-v2/grid-column-header/grid-column-header.component.d.ts +2 -0
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -13381,6 +13381,7 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13381
13381
|
this.showFilter = colDef.filter !== DatoGridFilterTypes.None;
|
|
13382
13382
|
this.showMoreMenu = isNil(colDef.moreMenuActions) || colDef.moreMenuActions.length > 0;
|
|
13383
13383
|
this.field = getColField(colDef);
|
|
13384
|
+
this.headerTooltip = this.getHeaderTooltip(colDef);
|
|
13384
13385
|
this.context = {
|
|
13385
13386
|
api: {
|
|
13386
13387
|
grid: params.api,
|
|
@@ -13463,6 +13464,19 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13463
13464
|
});
|
|
13464
13465
|
};
|
|
13465
13466
|
DatoGridColumnHeaderComponent.prototype.ngOnDestroy = function () { };
|
|
13467
|
+
DatoGridColumnHeaderComponent.prototype.getHeaderTooltip = function (initialColDef) {
|
|
13468
|
+
if (this.params) {
|
|
13469
|
+
var colDef_1 = initialColDef;
|
|
13470
|
+
if (colDef_1.showRowGroup) {
|
|
13471
|
+
var rowGroupColumns = this.params.columnApi.getRowGroupColumns();
|
|
13472
|
+
var rowGroupColumn = rowGroupColumns && rowGroupColumns.find(function (col) { return col.getColId() === colDef_1.showRowGroup; });
|
|
13473
|
+
var rowGroupColDef = rowGroupColumn && rowGroupColumn.getColDef();
|
|
13474
|
+
colDef_1 = rowGroupColDef || colDef_1;
|
|
13475
|
+
}
|
|
13476
|
+
return colDef_1.customHeaderTooltip || colDef_1.headerName;
|
|
13477
|
+
}
|
|
13478
|
+
return '';
|
|
13479
|
+
};
|
|
13466
13480
|
DatoGridColumnHeaderComponent.ctorParameters = function () { return [
|
|
13467
13481
|
{ type: ViewContainerRef },
|
|
13468
13482
|
{ type: CustomHeaderControllerService },
|
|
@@ -13472,7 +13486,7 @@ var DatoGridColumnHeaderComponent = /** @class */ (function () {
|
|
|
13472
13486
|
DatoGridColumnHeaderComponent = __decorate([
|
|
13473
13487
|
Component({
|
|
13474
13488
|
selector: 'dato-grid-column-header',
|
|
13475
|
-
template: "<div class=\"d-flex align-start-center\" [attr.data-auto-id]=\"field + '-column-header'\" [attr.data-field]=\"field\">\n <ng-container *ngIf=\"customTemplates && customTemplates.customHeader as customHeader\">\n <div class=\"mr-5\" [attr.data-auto-id]=\"field + '-dynamic-section'\">\n <ng-container *ngTemplateOutlet=\"customHeader; context: context\"></ng-container>\n </div>\n </ng-container>\n <div class=\"d-flex d-flex-grow align-start-center min-width-0 items-center\">\n <span class=\"dato-simple-bold primary-400-color ellipsis min-width-0 mr-5\" [datoTooltip]=\"
|
|
13489
|
+
template: "<div class=\"d-flex align-start-center\" [attr.data-auto-id]=\"field + '-column-header'\" [attr.data-field]=\"field\">\n <ng-container *ngIf=\"customTemplates && customTemplates.customHeader as customHeader\">\n <div class=\"mr-5\" [attr.data-auto-id]=\"field + '-dynamic-section'\">\n <ng-container *ngTemplateOutlet=\"customHeader; context: context\"></ng-container>\n </div>\n </ng-container>\n <div class=\"d-flex d-flex-grow align-start-center min-width-0 items-center\">\n <span class=\"dato-simple-bold primary-400-color ellipsis min-width-0 mr-5\" [datoTooltip]=\"headerTooltip\"\n datoTooltipPosition=\"bottom\">{{headerName}}</span>\n <div>\n <dato-icon class=\"primary-300-color\" *ngIf=\"headerInfo\" [datoTooltip]=\"headerInfo\" datoTooltipPosition=\"bottom\" datoIcon=\"question\"></dato-icon>\n </div>\n </div>\n <div class=\"sort-icon opacity-0\" *ngIf=\"params.enableSorting && (sortingInfo$ | async) as sortingInfo\"\n [class.active]=\"sortingInfo.active\">\n <dato-icon width=\"24px\" height=\"16px\" class=\"primary-300-color\"\n [attr.data-auto-id]=\"field + '-sort'\"\n [icon]=\"sortingInfo.icon\"></dato-icon>\n </div>\n <ng-container *ngIf=\"showFilter\">\n <div class=\"filter relative\" *datoSubscribe=\"filterActive$ as filterActive\">\n <dato-icon-button (click.stop)=\"openFilters(filters)\" datoTooltip=\"core.filters\" datoTooltipPosition=\"bottom\"\n datoType=\"none\" [attr.data-auto-id]=\"field + '-filter'\" class=\"filter-icon opacity-0\"\n [class.active]=\"filtersMenuOpen || filterActive\"\n datoSize=\"md\" icon=\"filter\"\n #filters></dato-icon-button>\n <div [class.opacity-100]=\"filterActive\"\n class=\"opacity-0 filter-active-circle accent-400-background-color absolute\"></div>\n </div>\n </ng-container>\n <dato-icon-button *ngIf=\"showMoreMenu\" (click.stop)=\"openMoreMenu(moreMenu)\" datoTooltip=\"core.more-options\" datoTooltipPosition=\"bottom\"\n datoType=\"none\" [attr.data-auto-id]=\"field + '-more-menu'\" [class.active]=\"moreMenuOpen\"\n datoSize=\"md\" icon=\"more-vertical\" #moreMenu></dato-icon-button>\n</div>\n",
|
|
13476
13490
|
styles: [":host .filter-icon,:host .sort-icon{transition:opacity .25s linear,width .25s ease-in-out;width:0}:host .sort-icon{height:16px}:host .filter-icon.active,:host .sort-icon.active{opacity:1;width:24px}:host:hover .filter-icon,:host:hover .sort-icon{opacity:1;width:24px}:host .filter-active-circle{pointer-events:none;transition:opacity .2s ease-in-out;position:absolute;height:8px;width:8px;top:2px;right:2px;border-radius:4px;border:1px solid #fff}:host ::ng-deep .filter dato-icon-button dato-icon{transition:color .2s ease-in-out}"]
|
|
13477
13491
|
}),
|
|
13478
13492
|
__metadata("design:paramtypes", [ViewContainerRef,
|
|
@@ -13537,7 +13551,7 @@ var defaultGridOptions = __assign({
|
|
|
13537
13551
|
type: DatoGridColumnTypes.String,
|
|
13538
13552
|
menuTabs: ['filterMenuTab'],
|
|
13539
13553
|
headerComponentFramework: DatoGridColumnHeaderComponent
|
|
13540
|
-
}, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1,
|
|
13554
|
+
}, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1, usePivotGridStyle: false }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
|
|
13541
13555
|
var DEFAULT_GRID_SEARCH_DEBOUNCE_TIME = {
|
|
13542
13556
|
CLIENT: 200,
|
|
13543
13557
|
SERVER: 250
|
|
@@ -14156,10 +14170,11 @@ var GridService = /** @class */ (function () {
|
|
|
14156
14170
|
this.initPivotSecondaryColsProcess(params);
|
|
14157
14171
|
params.gridOptions.saveSettings = false;
|
|
14158
14172
|
}
|
|
14159
|
-
if (params.gridOptions.
|
|
14160
|
-
|
|
14173
|
+
if (params.gridOptions.usePivotGridStyle) {
|
|
14174
|
+
var rowHeight_1 = 30;
|
|
14175
|
+
params.gridOptions.rowHeight = rowHeight_1;
|
|
14161
14176
|
params.gridOptions.defaultColDef = __assign(__assign({}, params.gridOptions.defaultColDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: function (params) {
|
|
14162
|
-
var style = { lineHeight:
|
|
14177
|
+
var style = { lineHeight: rowHeight_1 + "px" };
|
|
14163
14178
|
if (params.colDef.type === DatoGridColumnTypes.Number) {
|
|
14164
14179
|
style.textAlign = 'end';
|
|
14165
14180
|
}
|
|
@@ -14452,7 +14467,7 @@ var GridService = /** @class */ (function () {
|
|
|
14452
14467
|
}
|
|
14453
14468
|
this.updateSettings({ sort: sortToApply });
|
|
14454
14469
|
this.api.grid.setSortModel([sortToApply]);
|
|
14455
|
-
if (this.gridRef.gridOptions.
|
|
14470
|
+
if (this.gridRef.gridOptions.usePivotGridStyle) {
|
|
14456
14471
|
this.api.grid.redrawRows();
|
|
14457
14472
|
}
|
|
14458
14473
|
}
|
|
@@ -16002,7 +16017,7 @@ var DatoGridV2Component = /** @class */ (function () {
|
|
|
16002
16017
|
});
|
|
16003
16018
|
Object.defineProperty(DatoGridV2Component.prototype, "isPivotStyle", {
|
|
16004
16019
|
get: function () {
|
|
16005
|
-
return this.gridOptions
|
|
16020
|
+
return this.gridOptions && this.gridOptions.usePivotGridStyle;
|
|
16006
16021
|
},
|
|
16007
16022
|
enumerable: true,
|
|
16008
16023
|
configurable: true
|
|
@@ -25428,7 +25443,7 @@ function fixNgLeaks() {
|
|
|
25428
25443
|
};
|
|
25429
25444
|
}
|
|
25430
25445
|
|
|
25431
|
-
window.coreVersion = '22.12.
|
|
25446
|
+
window.coreVersion = '22.12.2';
|
|
25432
25447
|
|
|
25433
25448
|
/**
|
|
25434
25449
|
* @license
|