@datorama/core 22.12.0 → 22.12.1-beta.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.
@@ -11945,6 +11945,9 @@ let DatoGridColumnHeaderComponent = class DatoGridColumnHeaderComponent {
11945
11945
  else {
11946
11946
  this.params.setSort(sort);
11947
11947
  }
11948
+ if (gridQuery.getGridOptions().pivotGridStyle) {
11949
+ this.params.api.redrawRows();
11950
+ }
11948
11951
  });
11949
11952
  this.sortingInfo$ = gridQuery
11950
11953
  .waitForGrid(() => gridQuery.gridRef.sortChanged)
@@ -12049,7 +12052,7 @@ const defaultGridOptions = Object.assign({
12049
12052
  type: DatoGridColumnTypes.String,
12050
12053
  menuTabs: ['filterMenuTab'],
12051
12054
  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 }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
12055
+ }, suppressCellSelection: true, suppressPropertyNamesCheck: true, rowHeight: 35, headerHeight: 30, rowSelection: GridRowSelectionType.MULTIPLE, rowDeselection: true, unSortIcon: true, animateRows: true, rememberGroupStateWhenNewData: true, groupMultiAutoColumn: true, groupDefaultExpanded: -1, pivotGridStyle: false }, (isTestEnv() ? { suppressColumnVirtualisation: true, rowBuffer: 99999 } : {}));
12053
12056
  const DEFAULT_GRID_SEARCH_DEBOUNCE_TIME = {
12054
12057
  CLIENT: 200,
12055
12058
  SERVER: 250
@@ -12625,9 +12628,18 @@ let GridService = class GridService {
12625
12628
  /** Add pivot specific required settings */
12626
12629
  if (params.gridOptions.pivotMode) {
12627
12630
  this.initPivotSecondaryColsProcess(params);
12628
- params.gridOptions.enableV2_1 = true;
12629
12631
  params.gridOptions.saveSettings = false;
12630
- params.gridOptions.defaultColDef = Object.assign(Object.assign({}, params.gridOptions.defaultColDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this) });
12632
+ }
12633
+ if (params.gridOptions.pivotGridStyle) {
12634
+ params.gridOptions.animateRows = false;
12635
+ params.gridOptions.rowHeight = 30;
12636
+ params.gridOptions.defaultColDef = Object.assign(Object.assign({}, params.gridOptions.defaultColDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this), cellStyle: params => {
12637
+ const style = { lineHeight: '30px' };
12638
+ if (params.colDef.type === DatoGridColumnTypes.Number) {
12639
+ style.textAlign = 'end';
12640
+ }
12641
+ return style;
12642
+ } });
12631
12643
  params.gridOptions.autoGroupColumnDef = Object.assign(Object.assign({}, params.gridOptions.autoGroupColumnDef), { cellClass: this.getPivotCellClass.bind(this), headerClass: this.getPivotHeaderClass.bind(this) });
12632
12644
  }
12633
12645
  return params.gridOptions;
@@ -12660,11 +12672,11 @@ let GridService = class GridService {
12660
12672
  if (leafGroup) {
12661
12673
  if (childIndex % 2 === 0) {
12662
12674
  /** If row is even */
12663
- cellClass += ' primary-0-background-color';
12675
+ cellClass += 'primary-0-background-color';
12664
12676
  }
12665
12677
  }
12666
12678
  else {
12667
- cellClass += 'bottom-border primary-100-background-color pointer dato-simple-bold';
12679
+ cellClass += 'primary-100-background-color pointer dato-simple-bold';
12668
12680
  }
12669
12681
  }
12670
12682
  }
@@ -14273,8 +14285,8 @@ let DatoGridV2Component = class DatoGridV2Component {
14273
14285
  get enableV2_1() {
14274
14286
  return this.gridOptions ? this.gridOptions.enableV2_1 : false;
14275
14287
  }
14276
- get isPivotMode() {
14277
- return this.gridOptions ? this.gridOptions.pivotMode : false;
14288
+ get isPivotStyle() {
14289
+ return this.gridOptions ? this.gridOptions.pivotGridStyle : false;
14278
14290
  }
14279
14291
  };
14280
14292
  DatoGridV2Component.ctorParameters = () => [
@@ -14289,7 +14301,7 @@ __decorate([
14289
14301
  DatoGridV2Component = __decorate([
14290
14302
  Component({
14291
14303
  selector: 'dato-grid-v2',
14292
- template: "<ag-grid-angular data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\" [class.pivot-mode]=\"isPivotMode\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
14304
+ template: "<ag-grid-angular data-auto-id=\"grid\" class=\"dato-grid ag-theme-material\" [class.has-background]=\"enableBackground\" [class.enable-v2_1]=\"enableV2_1\"\n [class.with-multi-selection-col]=\"gridOptions?.showMultiSelectionCheckboxes\" [class.pivot-style]=\"isPivotStyle\">\n</ag-grid-angular>\n<dato-grid-pagination-v2 [class.has-background]=\"enableBackground\"></dato-grid-pagination-v2>\n",
14293
14305
  changeDetection: ChangeDetectionStrategy.OnPush,
14294
14306
  encapsulation: ViewEncapsulation.None,
14295
14307
  styles: ["dato-grid-v2{flex-grow:1;display:flex;flex-direction:column;position:relative}dato-grid-v2 .dato-grid,dato-grid-v2 dato-grid-pagination-v2{position:absolute;left:0;right:0;bottom:0}dato-grid-v2 .dato-grid{top:0;bottom:50px}dato-grid-v2 .grid-hover-actions{position:absolute;z-index:2;transition:opacity .2s ease-in-out}dato-grid-v2 .ag-row-drag{width:initial!important}dato-grid-v2 .da-grid-icon{display:inline-block;line-height:31px;vertical-align:middle;width:initial;height:initial}dato-grid-v2 .da-grid-icon.drag{width:14px;height:14px;margin-right:6px;opacity:0;transition:opacity .3s;transform:translateY(-50%)}dato-grid-v2 .da-grid-icon.folder{width:18px;height:35px;margin:0 8px}dato-grid-v2 .ag-row.ag-row-hover .da-grid-icon.drag{opacity:1}dato-grid-v2 ag-grid-angular.tree .ag-group-contracted,dato-grid-v2 ag-grid-angular.tree .ag-group-expanded{display:inline-block;width:18px;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-group-checkbox{display:none}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-empty-folder .folder{margin-left:26px}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-1 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 1)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-1{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-2 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 2)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-2{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-3 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 3)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-3{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row.ag-row-level-4 .ag-cell-wrapper .ag-row-drag{padding-right:calc(55px * 4)}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-row-group-indent-4{margin-left:0!important;padding-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-row div[col-id=ag-Grid-AutoColumn]{padding-left:0}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell{display:flex;align-items:center}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .ag-group-value>span{display:inline-block;vertical-align:middle}dato-grid-v2 ag-grid-angular.tree .ag-row .ag-cell .initials{border-radius:50%;padding:4px;margin-right:8px;margin-left:20px;width:28px;height:28px;display:inline-block;text-align:center}dato-grid-v2 ag-grid-angular.tree .ag-row-group-leaf-indent{margin-left:0!important}dato-grid-v2 ag-grid-angular.tree .ag-selection-checkbox .ag-icon-checkbox-indeterminate:before{text-align:center;content:'-';display:inline-block;position:absolute;top:0;left:0;right:0;bottom:0;line-height:.5;color:#fff}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell{line-height:33px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.dato-editable-cell{line-height:29px}dato-grid-v2 ag-grid-angular.row-height-35 .ag-cell.ag-cell-inline-editing{height:35px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell{line-height:42px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.dato-editable-cell{line-height:38px}dato-grid-v2 ag-grid-angular.row-height-44 .ag-cell.ag-cell-inline-editing{height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell{line-height:48px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.dato-editable-cell{line-height:44px}dato-grid-v2 ag-grid-angular.row-height-50 .ag-cell.ag-cell-inline-editing{height:50px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell{line-height:57px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.dato-editable-cell{line-height:53px}dato-grid-v2 ag-grid-angular.row-height-59 .ag-cell.ag-cell-inline-editing{height:59px}dato-grid-v2 ag-grid-angular .ag-cell.checkbox-selection-cell{display:flex}dato-grid-v2 .ag-menu .da-grid-icon svg{vertical-align:middle}dato-grid-v2 .ag-header-cell-sortable .ag-sort-none-icon{opacity:0;transition:opacity .2s}dato-grid-v2 .ag-header-cell-sortable:hover .ag-sort-none-icon{opacity:1}dato-grid-v2 .group-contracted-icon,dato-grid-v2 .group-expanded-icon{width:7px}dato-grid-v2 .group-expanded-icon{transform:rotate(90deg)}dato-grid-v2 .dato-grid .ag-cell{border-top:0;border-bottom:0}dato-grid-v2 .ag-overlay-wrapper ng-component{display:flex}.ag-dnd-ghost{min-width:100px;border:none;display:flex;justify-content:flex-start;align-content:center;align-items:center;cursor:-webkit-grabbing;cursor:grabbing;z-index:10000000}.ag-dnd-ghost .da-grid-icon.column-move-hide svg{height:18px;width:18px}.ag-dnd-ghost .da-grid-icon.column-move svg,.ag-dnd-ghost .da-grid-icon.column-move-pin svg{height:16px;width:16px}"]