@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
|
@@ -11897,6 +11897,7 @@ let DatoGridColumnHeaderComponent = class DatoGridColumnHeaderComponent {
|
|
|
11897
11897
|
this.showFilter = colDef.filter !== DatoGridFilterTypes.None;
|
|
11898
11898
|
this.showMoreMenu = isNil(colDef.moreMenuActions) || colDef.moreMenuActions.length > 0;
|
|
11899
11899
|
this.field = getColField(colDef);
|
|
11900
|
+
this.headerTooltip = this.getHeaderTooltip(colDef);
|
|
11900
11901
|
this.context = {
|
|
11901
11902
|
api: {
|
|
11902
11903
|
grid: params.api,
|
|
@@ -11977,6 +11978,19 @@ let DatoGridColumnHeaderComponent = class DatoGridColumnHeaderComponent {
|
|
|
11977
11978
|
});
|
|
11978
11979
|
}
|
|
11979
11980
|
ngOnDestroy() { }
|
|
11981
|
+
getHeaderTooltip(initialColDef) {
|
|
11982
|
+
if (this.params) {
|
|
11983
|
+
let colDef = initialColDef;
|
|
11984
|
+
if (colDef.showRowGroup) {
|
|
11985
|
+
const rowGroupColumns = this.params.columnApi.getRowGroupColumns();
|
|
11986
|
+
const rowGroupColumn = rowGroupColumns && rowGroupColumns.find(col => col.getColId() === colDef.showRowGroup);
|
|
11987
|
+
const rowGroupColDef = rowGroupColumn && rowGroupColumn.getColDef();
|
|
11988
|
+
colDef = rowGroupColDef || colDef;
|
|
11989
|
+
}
|
|
11990
|
+
return colDef.customHeaderTooltip || colDef.headerName;
|
|
11991
|
+
}
|
|
11992
|
+
return '';
|
|
11993
|
+
}
|
|
11980
11994
|
};
|
|
11981
11995
|
DatoGridColumnHeaderComponent.ctorParameters = () => [
|
|
11982
11996
|
{ type: ViewContainerRef },
|
|
@@ -11987,7 +12001,7 @@ DatoGridColumnHeaderComponent.ctorParameters = () => [
|
|
|
11987
12001
|
DatoGridColumnHeaderComponent = __decorate([
|
|
11988
12002
|
Component({
|
|
11989
12003
|
selector: 'dato-grid-column-header',
|
|
11990
|
-
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]=\"
|
|
12004
|
+
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",
|
|
11991
12005
|
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}"]
|
|
11992
12006
|
}),
|
|
11993
12007
|
__metadata("design:paramtypes", [ViewContainerRef,
|
|
@@ -12049,7 +12063,7 @@ const defaultGridOptions = Object.assign({
|
|
|
12049
12063
|
type: DatoGridColumnTypes.String,
|
|
12050
12064
|
menuTabs: ['filterMenuTab'],
|
|
12051
12065
|
headerComponentFramework: DatoGridColumnHeaderComponent
|
|
12052
|
-
}, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1,
|
|
12066
|
+
}, 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 } : {}));
|
|
12053
12067
|
const DEFAULT_GRID_SEARCH_DEBOUNCE_TIME = {
|
|
12054
12068
|
CLIENT: 200,
|
|
12055
12069
|
SERVER: 250
|
|
@@ -12627,10 +12641,11 @@ let GridService = class GridService {
|
|
|
12627
12641
|
this.initPivotSecondaryColsProcess(params);
|
|
12628
12642
|
params.gridOptions.saveSettings = false;
|
|
12629
12643
|
}
|
|
12630
|
-
if (params.gridOptions.
|
|
12631
|
-
|
|
12644
|
+
if (params.gridOptions.usePivotGridStyle) {
|
|
12645
|
+
const rowHeight = 30;
|
|
12646
|
+
params.gridOptions.rowHeight = rowHeight;
|
|
12632
12647
|
params.gridOptions.defaultColDef = Object.assign(Object.assign({}, params.gridOptions.defaultColDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: params => {
|
|
12633
|
-
const style = { lineHeight:
|
|
12648
|
+
const style = { lineHeight: `${rowHeight}px` };
|
|
12634
12649
|
if (params.colDef.type === DatoGridColumnTypes.Number) {
|
|
12635
12650
|
style.textAlign = 'end';
|
|
12636
12651
|
}
|
|
@@ -12887,7 +12902,7 @@ let GridService = class GridService {
|
|
|
12887
12902
|
}
|
|
12888
12903
|
this.updateSettings({ sort: sortToApply });
|
|
12889
12904
|
this.api.grid.setSortModel([sortToApply]);
|
|
12890
|
-
if (this.gridRef.gridOptions.
|
|
12905
|
+
if (this.gridRef.gridOptions.usePivotGridStyle) {
|
|
12891
12906
|
this.api.grid.redrawRows();
|
|
12892
12907
|
}
|
|
12893
12908
|
}
|
|
@@ -14285,7 +14300,7 @@ let DatoGridV2Component = class DatoGridV2Component {
|
|
|
14285
14300
|
return this.gridOptions ? this.gridOptions.enableV2_1 : false;
|
|
14286
14301
|
}
|
|
14287
14302
|
get isPivotStyle() {
|
|
14288
|
-
return this.gridOptions
|
|
14303
|
+
return this.gridOptions && this.gridOptions.usePivotGridStyle;
|
|
14289
14304
|
}
|
|
14290
14305
|
};
|
|
14291
14306
|
DatoGridV2Component.ctorParameters = () => [
|
|
@@ -22862,7 +22877,7 @@ function fixNgLeaks() {
|
|
|
22862
22877
|
};
|
|
22863
22878
|
}
|
|
22864
22879
|
|
|
22865
|
-
window.coreVersion = '22.12.
|
|
22880
|
+
window.coreVersion = '22.12.2';
|
|
22866
22881
|
|
|
22867
22882
|
/**
|
|
22868
22883
|
* @license
|