@polygrid/core 1.0.419 → 1.0.420

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.
Files changed (22) hide show
  1. package/dist/engine/services/renderer/interfaces/renderer-adapter.d.ts +3 -0
  2. package/dist/engine/services/renderer/interfaces/renderer-adapter.d.ts.map +1 -1
  3. package/dist/engine/services/renderer/interfaces/template-mounts/column-footer-mount.d.ts +13 -0
  4. package/dist/engine/services/renderer/interfaces/template-mounts/column-footer-mount.d.ts.map +1 -0
  5. package/dist/engine/services/renderer/interfaces/template-mounts/column-footer-mount.js +2 -0
  6. package/dist/engine/services/renderer/interfaces/template-mounts/column-footer-mount.js.map +1 -0
  7. package/dist/engine/services/renderer/methods/re-render-cells.js +1 -1
  8. package/dist/engine/services/renderer/methods/re-render-cells.js.map +1 -1
  9. package/dist/engine/services/renderer/parts/footer/footer-cells.d.ts +2 -1
  10. package/dist/engine/services/renderer/parts/footer/footer-cells.d.ts.map +1 -1
  11. package/dist/engine/services/renderer/parts/footer/footer-cells.js +34 -5
  12. package/dist/engine/services/renderer/parts/footer/footer-cells.js.map +1 -1
  13. package/dist/engine/services/renderer/parts/footer/footer.d.ts +2 -1
  14. package/dist/engine/services/renderer/parts/footer/footer.d.ts.map +1 -1
  15. package/dist/engine/services/renderer/parts/footer/footer.js +2 -2
  16. package/dist/engine/services/renderer/parts/footer/footer.js.map +1 -1
  17. package/dist/engine/services/renderer/parts/viewport/viewport.js +1 -1
  18. package/dist/engine/services/renderer/parts/viewport/viewport.js.map +1 -1
  19. package/dist/index.d.ts +1 -0
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/polygrid.css +10 -1
  22. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { RendererHandle } from "./renderer-handle";
2
+ import { ColumnFooterMount } from "./template-mounts/column-footer-mount";
2
3
  import { ColumnHeaderMount } from "./template-mounts/column-header-mount";
3
4
  import { ErrorMount } from "./template-mounts/error-mount";
4
5
  import { LoadingMount } from "./template-mounts/loading-mount";
@@ -9,5 +10,7 @@ export interface RendererAdapter {
9
10
  renderErrorTemplate?(req: ErrorMount): RendererHandle | null;
10
11
  renderColumnHeaderTemplate?(req: ColumnHeaderMount): RendererHandle | null;
11
12
  registerColumnHeaderTemplate?(key: string, tpl: unknown): void;
13
+ renderColumnFooterTemplate?(req: ColumnFooterMount): RendererHandle | null;
14
+ registerColumnFooterTemplate?(key: string, tpl: unknown): void;
12
15
  }
13
16
  //# sourceMappingURL=renderer-adapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderer-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/renderer-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAAC,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,GAAG,IAAI,CAAC;IAC/D,qBAAqB,CAAC,CAAC,GAAG,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAAC;IACjE,mBAAmB,CAAC,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAAC;IAC7D,0BAA0B,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,GAAG,IAAI,CAAC;IAC3E,4BAA4B,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CAChE"}
1
+ {"version":3,"file":"renderer-adapter.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/renderer-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,oBAAoB,CAAC,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,GAAG,IAAI,CAAC;IAC/D,qBAAqB,CAAC,CAAC,GAAG,EAAE,YAAY,GAAG,cAAc,GAAG,IAAI,CAAC;IACjE,mBAAmB,CAAC,CAAC,GAAG,EAAE,UAAU,GAAG,cAAc,GAAG,IAAI,CAAC;IAC7D,0BAA0B,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,GAAG,IAAI,CAAC;IAC3E,4BAA4B,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;IAC/D,0BAA0B,CAAC,CAAC,GAAG,EAAE,iBAAiB,GAAG,cAAc,GAAG,IAAI,CAAC;IAC3E,4BAA4B,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,GAAG,IAAI,CAAC;CAChE"}
@@ -0,0 +1,13 @@
1
+ import { PolyGridRow } from "../../../row/interfaces/row";
2
+ export interface ColumnFooterMount {
3
+ container: HTMLElement;
4
+ context: {
5
+ field: string;
6
+ header: string;
7
+ columnKey: string;
8
+ columnId: string;
9
+ values: any[];
10
+ rows: PolyGridRow[];
11
+ };
12
+ }
13
+ //# sourceMappingURL=column-footer-mount.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-footer-mount.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/interfaces/template-mounts/column-footer-mount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,IAAI,EAAE,WAAW,EAAE,CAAC;KACrB,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=column-footer-mount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-footer-mount.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/interfaces/template-mounts/column-footer-mount.ts"],"names":[],"mappings":""}
@@ -24,6 +24,6 @@ export function reRenderCells(gridDom, store, grid) {
24
24
  // footer
25
25
  const footer = gridDom.footer;
26
26
  footer.replaceChildren();
27
- renderFooterCells(footer, store);
27
+ renderFooterCells(footer, store, grid);
28
28
  }
29
29
  //# sourceMappingURL=re-render-cells.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"re-render-cells.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/methods/re-render-cells.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,UAAU,aAAa,CAC3B,OAAgB,EAChB,KAAoB,EACpB,IAAc;IAEd,sCAAsC;IACtC,SAAS;IACT,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC,eAAe,EAAE,CAAC;IACzB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE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CACxE,CAAC;IACF,SAAS;IACT,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,MAAM,CAAC,eAAe,EAAE,CAAC;IACzB,iBAAiB,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { PolyGrid } from "../../../../core/grid";
1
2
  import type { PolyGridStore } from "../../../../store/store";
2
- export declare function renderFooterCells(footer: HTMLElement, store: PolyGridStore): void;
3
+ export declare function renderFooterCells(footer: HTMLElement, store: PolyGridStore, grid: PolyGrid): void;
3
4
  //# sourceMappingURL=footer-cells.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer-cells.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer-cells.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,QAc1E"}
1
+ {"version":3,"file":"footer-cells.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer-cells.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,QAAQ,QAoDf"}
@@ -1,14 +1,43 @@
1
1
  import { PG_CSS_CLASS } from "../../../../const/pg-css-class";
2
- export function renderFooterCells(footer, store) {
3
- const columns = store
4
- .getState()
5
- .view.internalColumns.filter((col) => col.visible ?? true);
2
+ export function renderFooterCells(footer, store, grid) {
3
+ const runtime = grid._runtime;
4
+ const state = store.getState();
5
+ const columns = state.view.internalColumns.filter((col) => col.visible ?? true);
6
+ // Clear previous DOM
6
7
  footer.innerHTML = "";
8
+ // Visible rows (PolyGridRow[])
9
+ const rows = state.view.rows;
7
10
  columns.forEach((col, i) => {
8
11
  const cell = document.createElement("div");
9
12
  cell.setAttribute("col-id", col.id);
10
13
  cell.className = PG_CSS_CLASS.footerCell;
11
- cell.textContent = col.header;
14
+ // Destroy previous template handle for this column
15
+ const prevHandle = runtime.footerHandles.get(col.id);
16
+ prevHandle?.destroy();
17
+ runtime.footerHandles.delete(col.id);
18
+ // Compute column values
19
+ const values = rows.map((r) => r.data[col.field]);
20
+ // Try dynamic template
21
+ const handle = state.view.rendererAdapter?.renderColumnFooterTemplate?.({
22
+ container: cell,
23
+ context: {
24
+ field: col.field,
25
+ header: col.header,
26
+ columnKey: col.id,
27
+ columnId: col.id,
28
+ values,
29
+ rows,
30
+ },
31
+ });
32
+ if (!handle) {
33
+ // Fallback static footer
34
+ cell.textContent = col.header;
35
+ }
36
+ else {
37
+ runtime.footerHandles.set(col.id, handle);
38
+ }
39
+ // Store container for future updates
40
+ runtime.footerContainers.set(col.id, cell);
12
41
  footer.appendChild(cell);
13
42
  });
14
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"footer-cells.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer-cells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,MAAM,UAAU,iBAAiB,CAAC,MAAmB,EAAE,KAAoB;IACzE,MAAM,OAAO,GAAG,KAAK;SAClB,QAAQ,EAAE;SACV,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC;IAE7D,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAEtB,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACzB,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CA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EAAE,CAAC,CAAC;QACrD,UAAU,EAAE,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAErC,wBAAwB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAElD,uBAAuB;QACvB,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,0BAA0B,EAAE,CAAC;YACtE,SAAS,EAAE,IAAI;YACf,OAAO,EAAE;gBACP,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,SAAS,EAAE,GAAG,CAAC,EAAE;gBACjB,QAAQ,EAAE,GAAG,CAAC,EAAE;gBAChB,MAAM;gBACN,IAAI;aACL;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,yBAAyB;YACzB,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QAED,qCAAqC;QACrC,OAAO,CAAC,gBAAgB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;QAE3C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,4 +1,5 @@
1
+ import { PolyGrid } from "../../../../core/grid";
1
2
  import type { GridDOM } from "../../../../core/grid-dom";
2
3
  import type { PolyGridStore } from "../../../../store/store";
3
- export declare function renderFooter(store: PolyGridStore, gridDom: GridDOM): HTMLDivElement;
4
+ export declare function renderFooter(store: PolyGridStore, gridDom: GridDOM, grid: PolyGrid): HTMLDivElement;
4
5
  //# sourceMappingURL=footer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,GACf,cAAc,CAehB"}
1
+ {"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,YAAY,CAC1B,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,QAAQ,GACb,cAAc,CAehB"}
@@ -1,6 +1,6 @@
1
1
  import { PG_CSS_CLASS } from "../../../../const/pg-css-class";
2
2
  import { renderFooterCells } from "./footer-cells";
3
- export function renderFooter(store, gridDom) {
3
+ export function renderFooter(store, gridDom, grid) {
4
4
  // viewport
5
5
  const footerViewportEl = document.createElement("div");
6
6
  footerViewportEl.className = PG_CSS_CLASS.footerViewport;
@@ -8,7 +8,7 @@ export function renderFooter(store, gridDom) {
8
8
  const footerEl = document.createElement("div");
9
9
  footerEl.className = PG_CSS_CLASS.footer;
10
10
  // cells
11
- renderFooterCells(footerEl, store);
11
+ renderFooterCells(footerEl, store, grid);
12
12
  footerViewportEl.appendChild(footerEl);
13
13
  gridDom.footer = footerEl;
14
14
  return footerViewportEl;
@@ -1 +1 @@
1
- {"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,UAAU,YAAY,CAC1B,KAAoB,EACpB,OAAgB;IAEhB,WAAW;IACX,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvD,gBAAgB,CAAC,SAAS,GAAG,YAAY,CAAC,cAAc,CAAC;IACzD,iBAAiB;IACjB,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC;IACzC,QAAQ;IACR,iBAAiB,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAEnC,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEvC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC;IAE1B,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
1
+ {"version":3,"file":"footer.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,UAAU,YAAY,CAC1B,KAAoB,EACpB,OAAgB,EAChB,IAAc;IAEd,WAAW;IACX,MAAM,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACvD,gBAAgB,CAAC,SAAS,GAAG,YAAY,CAAC,cAAc,CAAC;IACzD,iBAAiB;IACjB,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC;IACzC,QAAQ;IACR,iBAAiB,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAEzC,gBAAgB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAEvC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC;IAE1B,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -8,7 +8,7 @@ export function renderViewport(store, gridDom, grid) {
8
8
  viewport.className = PG_CSS_CLASS.viewport;
9
9
  const headerVp = renderHeader(store, gridDom, grid);
10
10
  const bodyVp = renderBody(store, gridDom, grid);
11
- const footerVp = renderFooter(store, gridDom);
11
+ const footerVp = renderFooter(store, gridDom, grid);
12
12
  const hScrollbar = renderHScrollbar(gridDom);
13
13
  viewport.appendChild(headerVp);
14
14
  viewport.appendChild(bodyVp);
@@ -1 +1 @@
1
- {"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/viewport/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,UAAU,cAAc,CAC5B,KAAoB,EACpB,OAAgB,EAChB,IAAc;IAEd,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,QAAQ,CAAC,SAAS,GAAG,YAAY,CAAC,QAAQ,CAAC;IAE3C,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,MAAM,GAAG,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IAChD,MAAM,QAAQ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AM,QAAQ,GAAG,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAE7C,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAEjC,OAAO,CAAC,cAAc,GAAG,QAAQ,CAAC;IAClC,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC;IAC9B,OAAO,CAAC,cAAc,GAAG,QAAQ,CAAC;IAClC,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAEhC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export type { PolyGridColumn } from "./engine/services/column/interfaces/column";
2
+ export type { PolyGridRow } from "./engine/services/row/interfaces/row";
2
3
  export type { PolyGridResizeMode } from "./engine/store/types/resize-mode";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC"}
package/dist/polygrid.css CHANGED
@@ -30,10 +30,19 @@
30
30
  flex: 0 0 auto;
31
31
  min-width: 0;
32
32
  padding: 0 8px;
33
- line-height: 40px;
33
+ height: 40px;
34
34
  background: #e8e8e8;
35
35
  border-right: 1px solid #ccc;
36
36
  overflow: hidden;
37
+ align-items: center;
38
+ }
39
+
40
+ .pg-header-cell-content {
41
+ flex: 1 1 auto;
42
+ min-width: 0;
43
+ overflow: hidden;
44
+ text-overflow: ellipsis;
45
+ white-space: nowrap;
37
46
  }
38
47
 
39
48
  .pg-header-cell.last-cell {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygrid/core",
3
- "version": "1.0.419",
3
+ "version": "1.0.420",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",