@reforgium/data-grid 2.5.2 → 2.5.3

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.
@@ -1,4 +1,4 @@
1
- import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-BkUQEsdU.mjs';
1
+ import { c as computeScrollbarState, a as clampThumbTop, m as mapThumbTopToScrollTop } from './reforgium-data-grid-reforgium-data-grid-BOyAs6Bw.mjs';
2
2
 
3
3
  function createGridOverlayScrollFeature(ctx) {
4
4
  const showScrollbar = () => {
@@ -76,4 +76,4 @@ function createGridOverlayScrollFeature(ctx) {
76
76
  }
77
77
 
78
78
  export { createGridOverlayScrollFeature };
79
- //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-HnvU7zek.mjs.map
79
+ //# sourceMappingURL=reforgium-data-grid-grid-overlay-scroll.feature-Dvwc2nsE.mjs.map
@@ -762,18 +762,16 @@ function computeHeaderGroups(headers = [], columns = []) {
762
762
  return normalized;
763
763
  }
764
764
  function normalizeRange(range, prefix, columns) {
765
+ const { align, title, titleTemplate } = range.header;
765
766
  const base = {
766
767
  key: range.header.key,
768
+ title,
769
+ titleTemplate,
770
+ align,
767
771
  widthPx: sumByRange(prefix, range.start, range.end),
768
772
  startKey: columns[range.start]?.key,
769
773
  endKey: columns[range.end]?.key,
770
774
  };
771
- if ('titleTemplate' in range.header) {
772
- base.titleTemplate = range.header.titleTemplate;
773
- return base;
774
- }
775
- base.title = range.header.title;
776
- base.align = range.header.align;
777
775
  return base;
778
776
  }
779
777
  function resolveColumnWidth(column) {
@@ -3394,7 +3392,7 @@ class DataGrid {
3394
3392
  if (this.overlayScrollFeaturePromise) {
3395
3393
  return this.overlayScrollFeaturePromise;
3396
3394
  }
3397
- this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-HnvU7zek.mjs').then(({ createGridOverlayScrollFeature }) => {
3395
+ this.overlayScrollFeaturePromise = import('./reforgium-data-grid-grid-overlay-scroll.feature-Dvwc2nsE.mjs').then(({ createGridOverlayScrollFeature }) => {
3398
3396
  const feature = createGridOverlayScrollFeature({
3399
3397
  getScrollElement: () => this.scrollEl()?.nativeElement ?? null,
3400
3398
  getThumbTop: () => this.vm.thumbTopPx(),
@@ -3519,4 +3517,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
3519
3517
  */
3520
3518
 
3521
3519
  export { DataGridTypeCellTemplateDirective as D, clampThumbTop as a, DataGridCellTemplateDirective as b, computeScrollbarState as c, DataGridHeaderTemplateDirective as d, DataGridRowDirective as e, DataGridDeclarativeColumn as f, DataGridDeclarativeHeaderDirective as g, DataGridDeclarativeCellDirective as h, DataGridCellEmptyDirective as i, DataGridCellLoadingDirective as j, DataGridStickyRowDirective as k, DataGridSortIconDirective as l, mapThumbTopToScrollTop as m, DataGridExpanderIconDirective as n, DATA_GRID_CONFIG as o, DATA_GRID_TYPE_RENDERERS as p, DATA_GRID_TYPE_TRANSFORMERS as q, DEFAULT_DATA_GRID_DEFAULTS as r, provideDataGridDefaults as s, provideDataGridTypeRenderers as t, provideDataGridTypeTransformers as u, DataGrid as v };
3522
- //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-BkUQEsdU.mjs.map
3520
+ //# sourceMappingURL=reforgium-data-grid-reforgium-data-grid-BOyAs6Bw.mjs.map
@@ -1,2 +1,2 @@
1
- export { o as DATA_GRID_CONFIG, p as DATA_GRID_TYPE_RENDERERS, q as DATA_GRID_TYPE_TRANSFORMERS, r as DEFAULT_DATA_GRID_DEFAULTS, v as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, s as provideDataGridDefaults, t as provideDataGridTypeRenderers, u as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-BkUQEsdU.mjs';
1
+ export { o as DATA_GRID_CONFIG, p as DATA_GRID_TYPE_RENDERERS, q as DATA_GRID_TYPE_TRANSFORMERS, r as DEFAULT_DATA_GRID_DEFAULTS, v as DataGrid, i as DataGridCellEmptyDirective, j as DataGridCellLoadingDirective, b as DataGridCellTemplateDirective, h as DataGridDeclarativeCellDirective, f as DataGridDeclarativeColumn, g as DataGridDeclarativeHeaderDirective, n as DataGridExpanderIconDirective, d as DataGridHeaderTemplateDirective, e as DataGridRowDirective, l as DataGridSortIconDirective, k as DataGridStickyRowDirective, D as DataGridTypeCellTemplateDirective, s as provideDataGridDefaults, t as provideDataGridTypeRenderers, u as provideDataGridTypeTransformers } from './reforgium-data-grid-reforgium-data-grid-BOyAs6Bw.mjs';
2
2
  //# sourceMappingURL=reforgium-data-grid.mjs.map
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.5.2",
2
+ "version": "2.5.3",
3
3
  "name": "@reforgium/data-grid",
4
4
  "description": "reforgium DataGrid component",
5
5
  "author": "rtommievich",
@@ -885,11 +885,14 @@ type GridCellDoubleClickEvent<Data extends AnyDict = AnyDict> = {
885
885
  event: MouseEvent;
886
886
  };
887
887
 
888
- type TemplatedHeader = {
888
+ type HeaderTitleContent = {
889
+ title: string;
890
+ titleTemplate?: TemplateRef<HeaderTemplateData>;
891
+ } | {
892
+ title?: string;
889
893
  titleTemplate: TemplateRef<HeaderTemplateData>;
890
894
  };
891
- type PlainHeader = {
892
- title: string;
895
+ type HeaderPresentation = {
893
896
  align?: GridCellAlign;
894
897
  };
895
898
  /**
@@ -910,7 +913,7 @@ type GridHeaderGroup<Data extends AnyDict = AnyDict> = {
910
913
  key: string;
911
914
  from: DataKey<Data>;
912
915
  to?: DataKey<Data>;
913
- } & (TemplatedHeader | PlainHeader);
916
+ } & HeaderTitleContent & HeaderPresentation;
914
917
  /**
915
918
  * Internal normalized representation of a header group after processing.
916
919
  * Used by the grid component to render header groups with calculated dimensions.