@polygrid/core 1.0.425 → 1.0.427

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 (76) hide show
  1. package/dist/api/set-column-visible.d.ts.map +1 -1
  2. package/dist/api/set-column-visible.js +9 -2
  3. package/dist/api/set-column-visible.js.map +1 -1
  4. package/dist/engine/const/pg-functions.d.ts +2 -0
  5. package/dist/engine/const/pg-functions.d.ts.map +1 -0
  6. package/dist/engine/const/pg-functions.js +8 -0
  7. package/dist/engine/const/pg-functions.js.map +1 -0
  8. package/dist/engine/core/methods/restore-functions.d.ts +2 -0
  9. package/dist/engine/core/methods/restore-functions.d.ts.map +1 -0
  10. package/dist/engine/core/methods/restore-functions.js +10 -0
  11. package/dist/engine/core/methods/restore-functions.js.map +1 -0
  12. package/dist/engine/core/methods/strip-functions.d.ts +5 -0
  13. package/dist/engine/core/methods/strip-functions.d.ts.map +1 -0
  14. package/dist/engine/core/methods/strip-functions.js +20 -0
  15. package/dist/engine/core/methods/strip-functions.js.map +1 -0
  16. package/dist/engine/services/column/column.d.ts +5 -1
  17. package/dist/engine/services/column/column.d.ts.map +1 -1
  18. package/dist/engine/services/column/column.js +5 -1
  19. package/dist/engine/services/column/column.js.map +1 -1
  20. package/dist/engine/services/column/interfaces/column.d.ts +6 -0
  21. package/dist/engine/services/column/interfaces/column.d.ts.map +1 -1
  22. package/dist/engine/services/column/methods/get-padding-border.d.ts +2 -0
  23. package/dist/engine/services/column/methods/get-padding-border.d.ts.map +1 -0
  24. package/dist/engine/services/column/methods/get-padding-border.js +8 -0
  25. package/dist/engine/services/column/methods/get-padding-border.js.map +1 -0
  26. package/dist/engine/services/column/methods/index.d.ts +5 -1
  27. package/dist/engine/services/column/methods/index.d.ts.map +1 -1
  28. package/dist/engine/services/column/methods/index.js +5 -1
  29. package/dist/engine/services/column/methods/index.js.map +1 -1
  30. package/dist/engine/services/column/methods/measure-body-cell.d.ts +2 -0
  31. package/dist/engine/services/column/methods/measure-body-cell.d.ts.map +1 -0
  32. package/dist/engine/services/column/methods/measure-body-cell.js +5 -0
  33. package/dist/engine/services/column/methods/measure-body-cell.js.map +1 -0
  34. package/dist/engine/services/column/methods/measure-cell-with-padding.d.ts +2 -0
  35. package/dist/engine/services/column/methods/measure-cell-with-padding.d.ts.map +1 -0
  36. package/dist/engine/services/column/methods/measure-cell-with-padding.js +11 -0
  37. package/dist/engine/services/column/methods/measure-cell-with-padding.js.map +1 -0
  38. package/dist/engine/services/column/methods/measure-column-content-width.d.ts.map +1 -1
  39. package/dist/engine/services/column/methods/measure-column-content-width.js +5 -4
  40. package/dist/engine/services/column/methods/measure-column-content-width.js.map +1 -1
  41. package/dist/engine/services/column/methods/measure-header-or-footer-cell.d.ts +2 -0
  42. package/dist/engine/services/column/methods/measure-header-or-footer-cell.d.ts.map +1 -0
  43. package/dist/engine/services/column/methods/measure-header-or-footer-cell.js +8 -0
  44. package/dist/engine/services/column/methods/measure-header-or-footer-cell.js.map +1 -0
  45. package/dist/engine/services/column/methods/measure-pure-content.d.ts +2 -0
  46. package/dist/engine/services/column/methods/measure-pure-content.d.ts.map +1 -0
  47. package/dist/engine/services/column/methods/measure-pure-content.js +32 -0
  48. package/dist/engine/services/column/methods/measure-pure-content.js.map +1 -0
  49. package/dist/engine/services/renderer/interfaces/cell-renderer-params.d.ts +10 -0
  50. package/dist/engine/services/renderer/interfaces/cell-renderer-params.d.ts.map +1 -0
  51. package/dist/engine/services/renderer/interfaces/cell-renderer-params.js +2 -0
  52. package/dist/engine/services/renderer/interfaces/cell-renderer-params.js.map +1 -0
  53. package/dist/engine/services/renderer/interfaces/footer-renderer-params.d.ts +10 -0
  54. package/dist/engine/services/renderer/interfaces/footer-renderer-params.d.ts.map +1 -0
  55. package/dist/engine/services/renderer/interfaces/footer-renderer-params.js +2 -0
  56. package/dist/engine/services/renderer/interfaces/footer-renderer-params.js.map +1 -0
  57. package/dist/engine/services/renderer/interfaces/header-renderer-params.d.ts +7 -0
  58. package/dist/engine/services/renderer/interfaces/header-renderer-params.d.ts.map +1 -0
  59. package/dist/engine/services/renderer/interfaces/header-renderer-params.js +2 -0
  60. package/dist/engine/services/renderer/interfaces/header-renderer-params.js.map +1 -0
  61. package/dist/engine/services/renderer/parts/body/cell.d.ts.map +1 -1
  62. package/dist/engine/services/renderer/parts/body/cell.js +21 -4
  63. package/dist/engine/services/renderer/parts/body/cell.js.map +1 -1
  64. package/dist/engine/services/renderer/parts/footer/footer-cells.d.ts.map +1 -1
  65. package/dist/engine/services/renderer/parts/footer/footer-cells.js +26 -6
  66. package/dist/engine/services/renderer/parts/footer/footer-cells.js.map +1 -1
  67. package/dist/engine/services/renderer/parts/header/header-cells.d.ts.map +1 -1
  68. package/dist/engine/services/renderer/parts/header/header-cells.js +24 -7
  69. package/dist/engine/services/renderer/parts/header/header-cells.js.map +1 -1
  70. package/dist/index.d.ts +3 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/engine/services/column/methods/measure-element.d.ts +0 -2
  74. package/dist/engine/services/column/methods/measure-element.d.ts.map +0 -1
  75. package/dist/engine/services/column/methods/measure-element.js +0 -12
  76. package/dist/engine/services/column/methods/measure-element.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"set-column-visible.d.ts","sourceRoot":"","sources":["../../src/api/set-column-visible.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,QAkBjB"}
1
+ {"version":3,"file":"set-column-visible.d.ts","sourceRoot":"","sources":["../../src/api/set-column-visible.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,QAAQ,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,QAqCjB"}
@@ -1,7 +1,14 @@
1
+ import { PG_FUNCTION_FIELDS } from "../engine/const/pg-functions";
2
+ import { restoreFunctions } from "../engine/core/methods/restore-functions";
3
+ import { stripFunctions } from "../engine/core/methods/strip-functions";
1
4
  export function setColumnVisible(grid, key, visible) {
2
5
  const state = grid._store.getState();
3
- const newInternalColumns = structuredClone(state.view.internalColumns);
4
- const newExternalColumns = structuredClone(state.view.columns);
6
+ const { serializable: internalNoFn, fnMap: internalFns } = stripFunctions(state.view.internalColumns, (col) => col.id, PG_FUNCTION_FIELDS);
7
+ const { serializable: externalNoFn, fnMap: externalFns } = stripFunctions(state.view.columns, (col) => `${col.field}::${col.header}`, PG_FUNCTION_FIELDS);
8
+ const newInternalColumns = structuredClone(internalNoFn);
9
+ const newExternalColumns = structuredClone(externalNoFn);
10
+ restoreFunctions(newInternalColumns, (col) => col.id, internalFns);
11
+ restoreFunctions(newExternalColumns, (col) => `${col.field}::${col.header}`, externalFns);
5
12
  const internal = newInternalColumns.find((c) => c.key === key);
6
13
  if (internal)
7
14
  internal.visible = visible;
@@ -1 +1 @@
1
- {"version":3,"file":"set-column-visible.js","sourceRoot":"","sources":["../../src/api/set-column-visible.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAC9B,IAAc,EACd,GAAW,EACX,OAAgB;IAEhB,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IACrC,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAE/D,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IAC/D,IAAI,QAAQ;QAAE,QAAQ,CAAC,OAAO,GA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AAkB,CACnB,CAAC;IAEF,MAAM,kBAAkB,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IACzD,MAAM,kBAAkB,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAEzD,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IACnE,gBAAgB,CACd,kBAAkB,EAClB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE,EACtC,WAAW,CACZ,CAAC;IAEF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IAC/D,IAAI,QAAQ;QAAE,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAEzC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CACtC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE,KAAK,GAAG,CAC/C,CAAC;IACF,IAAI,QAAQ;QAAE,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IAEzC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QAC3B,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,kBAAkB,CAAC;QAChD,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,kBAAkB,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const PG_FUNCTION_FIELDS: readonly ["cellRenderer", "headerRenderer", "footerRenderer", "valueFormatter", "cellClassFn"];
2
+ //# sourceMappingURL=pg-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-functions.d.ts","sourceRoot":"","sources":["../../../src/engine/const/pg-functions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,gGAMrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const PG_FUNCTION_FIELDS = [
2
+ "cellRenderer",
3
+ "headerRenderer",
4
+ "footerRenderer",
5
+ "valueFormatter",
6
+ "cellClassFn",
7
+ ];
8
+ //# sourceMappingURL=pg-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-functions.js","sourceRoot":"","sources":["../../../src/engine/const/pg-functions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc;IACd,gBAAgB;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;CACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function restoreFunctions<T extends Record<string, any>>(cloned: T[], idSelector: (item: T) => any, fnMap: Map<any, Partial<T>>): void;
2
+ //# sourceMappingURL=restore-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restore-functions.d.ts","sourceRoot":"","sources":["../../../../src/engine/core/methods/restore-functions.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5D,MAAM,EAAE,CAAC,EAAE,EACX,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,EAC5B,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,QAS5B"}
@@ -0,0 +1,10 @@
1
+ export function restoreFunctions(cloned, idSelector, fnMap) {
2
+ for (const item of cloned) {
3
+ const id = idSelector(item);
4
+ const entry = fnMap.get(id);
5
+ if (entry) {
6
+ Object.assign(item, entry);
7
+ }
8
+ }
9
+ }
10
+ //# sourceMappingURL=restore-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restore-functions.js","sourceRoot":"","sources":["../../../../src/engine/core/methods/restore-functions.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAC9B,MAAW,EACX,UAA4B,EAC5B,KAA2B;IAE3B,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE,CAAC;QAC1B,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function stripFunctions<T extends Record<string, any>>(items: T[], idSelector: (item: T) => any, functionFields: readonly string[]): {
2
+ serializable: T[];
3
+ fnMap: Map<any, Partial<T>>;
4
+ };
5
+ //# sourceMappingURL=strip-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strip-functions.d.ts","sourceRoot":"","sources":["../../../../src/engine/core/methods/strip-functions.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1D,KAAK,EAAE,CAAC,EAAE,EACV,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,EAC5B,cAAc,EAAE,SAAS,MAAM,EAAE;;;EAwBlC"}
@@ -0,0 +1,20 @@
1
+ export function stripFunctions(items, idSelector, functionFields) {
2
+ const fnMap = new Map();
3
+ const serializable = items.map((item) => {
4
+ const clone = { ...item };
5
+ const fnEntry = {};
6
+ for (const field of functionFields) {
7
+ if (typeof clone[field] === "function") {
8
+ fnEntry[field] = clone[field];
9
+ delete clone[field];
10
+ }
11
+ }
12
+ const id = idSelector(item);
13
+ if (Object.keys(fnEntry).length > 0) {
14
+ fnMap.set(id, fnEntry);
15
+ }
16
+ return clone;
17
+ });
18
+ return { serializable, fnMap };
19
+ }
20
+ //# sourceMappingURL=strip-functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"strip-functions.js","sourceRoot":"","sources":["../../../../src/engine/core/methods/strip-functions.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAC5B,KAAU,EACV,UAA4B,EAC5B,cAAiC;IAEjC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAmB,CAAC;IAEzC,MAAM,YAAY,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACtC,MAAM,KAAK,GAAQ,EAAE,GAAG,IAAI,EAAE,CAAC;QAC/B,MAAM,OAAO,GAAQ,EAAE,CAAC;QAExB,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;YACnC,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,UAAU,EAAE,CAAC;gBACvC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;gBAC9B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC;QAED,MAAM,EAAE,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC5B,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpC,KAAK,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACzB,CAAC;QAED,OAAO,KAAU,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC"}
@@ -25,9 +25,13 @@ export declare class ColumnService {
25
25
  normalizeColumns: typeof methods.normalizeColumns;
26
26
  autoFit: typeof methods.autofit;
27
27
  measureColumnContentWidth: typeof methods.measureColumnContentWidth;
28
- measureElement: typeof methods.measureElement;
29
28
  applyWidthConstraints: typeof methods.applyWidthConstraints;
30
29
  getEffectiveSpec: typeof methods.getEffectiveSpec;
30
+ getPaddingBorder: typeof methods.getPaddingBorder;
31
+ measureHeaderOrFooterCell: typeof methods.measureHeaderOrFooterCell;
32
+ measureBodyCell: typeof methods.measureBodyCell;
33
+ measurePureContent: typeof methods.measurePureContent;
34
+ measureCellWithPadding: typeof methods.measureCellWithPadding;
31
35
  initApiSubscriptions(): void;
32
36
  }
33
37
  //# sourceMappingURL=column.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../src/engine/services/column/column.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAE3C,qBAAa,aAAa;IACxB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,cAAc,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,QAAQ,CAAC;IAEf,QAAQ,EAAG,cAAc,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5C,oBAAoB,EAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/C,UAAU,EAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACrC,WAAW,EAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;gBAErC,IAAI,EAAE,QAAQ;IAO1B,mBAAmB,qCAA+B;IAClD,UAAU,4BAAsB;IAChC,WAAW,6BAAuB;IAClC,YAAY,8BAAwB;IACpC,WAAW,6BAAuB;IAClC,SAAS,2BAAqB;IAC9B,OAAO,yBAAmB;IAC1B,gBAAgB,kCAA4B;IAC5C,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ACtD,gBAAgB,kCAA4B;IAC5C,gBAAgB,kCAA4B;IAC5C,yBAAyB,2CAAqC;IAC9D,eAAe,iCAA2B;IAC1C,kBAAkB,oCAA8B;IAChD,sBAAsB,wCAAkC;IAExD,oBAAoB;CAuBrB"}
@@ -12,9 +12,13 @@ export class ColumnService {
12
12
  this.normalizeColumns = methods.normalizeColumns;
13
13
  this.autoFit = methods.autofit;
14
14
  this.measureColumnContentWidth = methods.measureColumnContentWidth;
15
- this.measureElement = methods.measureElement;
16
15
  this.applyWidthConstraints = methods.applyWidthConstraints;
17
16
  this.getEffectiveSpec = methods.getEffectiveSpec;
17
+ this.getPaddingBorder = methods.getPaddingBorder;
18
+ this.measureHeaderOrFooterCell = methods.measureHeaderOrFooterCell;
19
+ this.measureBodyCell = methods.measureBodyCell;
20
+ this.measurePureContent = methods.measurePureContent;
21
+ this.measureCellWithPadding = methods.measureCellWithPadding;
18
22
  this.store = grid._store;
19
23
  this.destroy$ = grid._destroy$;
20
24
  this.gridDom = grid._gridDom;
@@ -1 +1 @@
1
- {"version":3,"file":"column.js","sourceRoot":"","sources":["../../../../src/engine/services/column/column.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAKtF,OAAO,KAAK,OAAO,MAAM,iBAAiB,CAAC;AAE3C,MAAM,OAAO,aAAa;IAWxB,YAAY,IAAc;QAO1B,wBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;QAClD,eAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QAChC,gBAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAClC,iBAAY,GAAG,OAAO,CAAC,YAAY,CAAC;QACpC,gBAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAClC,cAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAC9B,YAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAC1B,qBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;QAC5C,YAAO,GA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C,CAAC;QAChC,OAAO,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -1,3 +1,6 @@
1
+ import { PolyGridCellRendererParams } from "../../renderer/interfaces/cell-renderer-params";
2
+ import { PolyGridFooterRendererParams } from "../../renderer/interfaces/footer-renderer-params";
3
+ import { PolyGridHeaderRendererParams } from "../../renderer/interfaces/header-renderer-params";
1
4
  export interface PolyGridColumn {
2
5
  header: string;
3
6
  field: string;
@@ -5,5 +8,8 @@ export interface PolyGridColumn {
5
8
  visible?: boolean;
6
9
  minWidth?: number;
7
10
  maxWidth?: number;
11
+ cellRenderer?: (params: PolyGridCellRendererParams) => HTMLElement | string;
12
+ headerRenderer?: (params: PolyGridHeaderRendererParams) => HTMLElement | string;
13
+ footerRenderer?: (params: PolyGridFooterRendererParams) => HTMLElement | string;
8
14
  }
9
15
  //# sourceMappingURL=column.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/interfaces/column.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
1
+ {"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/interfaces/column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,0BAA0B,KAAK,WAAW,GAAG,MAAM,CAAC;IAC5E,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,4BAA4B,KACjC,WAAW,GAAG,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,CACf,MAAM,EAAE,4BAA4B,KACjC,WAAW,GAAG,MAAM,CAAC;CAC3B"}
@@ -0,0 +1,2 @@
1
+ export declare function getPaddingBorder(el: HTMLElement): number;
2
+ //# sourceMappingURL=get-padding-border.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-padding-border.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/get-padding-border.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,UAQ/C"}
@@ -0,0 +1,8 @@
1
+ export function getPaddingBorder(el) {
2
+ const cs = getComputedStyle(el);
3
+ return (parseFloat(cs.paddingLeft) +
4
+ parseFloat(cs.paddingRight) +
5
+ parseFloat(cs.borderLeftWidth) +
6
+ parseFloat(cs.borderRightWidth));
7
+ }
8
+ //# sourceMappingURL=get-padding-border.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-padding-border.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/get-padding-border.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,EAAe;IAC9C,MAAM,EAAE,GAAG,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAChC,OAAO,CACL,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC;QAC1B,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC;QAC3B,UAAU,CAAC,EAAE,CAAC,eAAe,CAAC;QAC9B,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAChC,CAAC;AACJ,CAAC"}
@@ -10,7 +10,11 @@ export * from "./set-resize-mode";
10
10
  export * from "./normalize-columns";
11
11
  export * from "./autofit";
12
12
  export * from "./measure-column-content-width";
13
- export * from "./measure-element";
14
13
  export * from "./apply-width-constraints";
15
14
  export * from "./get-effective-spec";
15
+ export * from "./get-padding-border";
16
+ export * from "./measure-header-or-footer-cell";
17
+ export * from "./measure-body-cell";
18
+ export * from "./measure-pure-content";
19
+ export * from "./measure-cell-with-padding";
16
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
@@ -10,7 +10,11 @@ export * from "./set-resize-mode";
10
10
  export * from "./normalize-columns";
11
11
  export * from "./autofit";
12
12
  export * from "./measure-column-content-width";
13
- export * from "./measure-element";
14
13
  export * from "./apply-width-constraints";
15
14
  export * from "./get-effective-spec";
15
+ export * from "./get-padding-border";
16
+ export * from "./measure-header-or-footer-cell";
17
+ export * from "./measure-body-cell";
18
+ export * from "./measure-pure-content";
19
+ export * from "./measure-cell-with-padding";
16
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function measureBodyCell(cell: HTMLElement): number;
2
+ //# sourceMappingURL=measure-body-cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-body-cell.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-body-cell.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,UAEhD"}
@@ -0,0 +1,5 @@
1
+ import { measureCellWithPadding } from "./measure-cell-with-padding";
2
+ export function measureBodyCell(cell) {
3
+ return measureCellWithPadding(cell, cell);
4
+ }
5
+ //# sourceMappingURL=measure-body-cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-body-cell.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-body-cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,UAAU,eAAe,CAAC,IAAiB;IAC/C,OAAO,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function measureCellWithPadding(cell: HTMLElement, contentEl: HTMLElement): number;
2
+ //# sourceMappingURL=measure-cell-with-padding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-cell-with-padding.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-cell-with-padding.ts"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,WAAW,GACrB,MAAM,CAWR"}
@@ -0,0 +1,11 @@
1
+ import { measurePureContent } from "./measure-pure-content";
2
+ export function measureCellWithPadding(cell, contentEl) {
3
+ const contentWidth = measurePureContent(contentEl);
4
+ const cs = getComputedStyle(cell);
5
+ const paddingBorder = parseFloat(cs.paddingLeft) +
6
+ parseFloat(cs.paddingRight) +
7
+ parseFloat(cs.borderLeftWidth) +
8
+ parseFloat(cs.borderRightWidth);
9
+ return contentWidth + paddingBorder;
10
+ }
11
+ //# sourceMappingURL=measure-cell-with-padding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-cell-with-padding.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-cell-with-padding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,UAAU,sBAAsB,CACpC,IAAiB,EACjB,SAAsB;IAEtB,MAAM,YAAY,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAEnD,MAAM,EAAE,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,aAAa,GACjB,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC;QAC1B,UAAU,CAAC,EAAE,CAAC,YAAY,CAAC;QAC3B,UAAU,CAAC,EAAE,CAAC,eAAe,CAAC;QAC9B,UAAU,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;IAElC,OAAO,YAAY,GAAG,aAAa,CAAC;AACtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"measure-column-content-width.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-column-content-width.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGjD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,UAwBxE"}
1
+ {"version":3,"file":"measure-column-content-width.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-column-content-width.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAIjD,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,UAoCxE"}
@@ -1,21 +1,22 @@
1
1
  import { PG_CSS_CLASS } from "../../../const/pg-css-class";
2
- import { measureElement } from "./measure-element";
2
+ import { measureHeaderOrFooterCell } from "./measure-header-or-footer-cell";
3
+ import { measureBodyCell } from "./measure-body-cell";
3
4
  export function measureColumnContentWidth(colId, gridDom) {
4
5
  let max = 0;
5
6
  // 1. Header
6
7
  const headerCell = gridDom.header.querySelector(`[col-id="${colId}"].${PG_CSS_CLASS.headerCell}`);
7
8
  if (headerCell) {
8
- max = Math.max(max, measureElement(headerCell));
9
+ max = Math.max(max, measureHeaderOrFooterCell(headerCell, `.${PG_CSS_CLASS.headerCellContent}`));
9
10
  }
10
11
  // 2. Body cells
11
12
  const bodyCells = gridDom.body.querySelectorAll(`[col-id="${colId}"].${PG_CSS_CLASS.cell}`);
12
13
  for (const cell of bodyCells) {
13
- max = Math.max(max, measureElement(cell));
14
+ max = Math.max(max, measureBodyCell(cell));
14
15
  }
15
16
  // 3. Footer
16
17
  const footerCell = gridDom.footer.querySelector(`[col-id="${colId}"].${PG_CSS_CLASS.footerCell}`);
17
18
  if (footerCell) {
18
- max = Math.max(max, measureElement(footerCell));
19
+ max = Math.max(max, measureHeaderOrFooterCell(footerCell, `.${PG_CSS_CLASS.footerCellContent}`));
19
20
  }
20
21
  return max;
21
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"measure-column-content-width.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-column-content-width.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,UAAU,yBAAyB,CAAC,KAAa,EAAE,OAAgB;IACvE,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,YAAY;IACZ,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,UAAU,EAAE,CAClC,CAAC;IACjB,IAAI,UAAU,EAAE,CAAC;QACf,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,gBAAgB;IAChB,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,IAAI,EAAE,CAC3C,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,IAAmB,CAAC,CAAC,CAAC;IAC3D,CAAC;IACD,YAAY;IACZ,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,UAAU,EAAE,CAClC,CAAC;IACjB,IAAI,UAAU,EAAE,CAAC;QACf,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"measure-column-content-width.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-column-content-width.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,MAAM,UAAU,yBAAyB,CAAC,KAAa,EAAE,OAAgB;IACvE,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,YAAY;IACZ,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,UAAU,EAAE,CAClC,CAAC;IACjB,IAAI,UAAU,EAAE,CAAC;QACf,GAAG,GAAG,IAAI,CAAC,GAAG,CACZ,GAAG,EACH,yBAAyB,CACvB,UAAU,EACV,IAAI,YAAY,CAAC,iBAAiB,EAAE,CACrC,CACF,CAAC;IACJ,CAAC;IACD,gBAAgB;IAChB,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,IAAI,EAAE,CAC3C,CAAC;IACF,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,CAAC,IAAmB,CAAC,CAAC,CAAC;IAC5D,CAAC;IACD,YAAY;IACZ,MAAM,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAC7C,YAAY,KAAK,MAAM,YAAY,CAAC,UAAU,EAAE,CAClC,CAAC;IACjB,IAAI,UAAU,EAAE,CAAC;QACf,GAAG,GAAG,IAAI,CAAC,GAAG,CACZ,GAAG,EACH,yBAAyB,CACvB,UAAU,EACV,IAAI,YAAY,CAAC,iBAAiB,EAAE,CACrC,CACF,CAAC;IACJ,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function measureHeaderOrFooterCell(cell: HTMLElement, contentSelector: string): number;
2
+ //# sourceMappingURL=measure-header-or-footer-cell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-header-or-footer-cell.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-header-or-footer-cell.ts"],"names":[],"mappings":"AAEA,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,WAAW,EACjB,eAAe,EAAE,MAAM,UAMxB"}
@@ -0,0 +1,8 @@
1
+ import { measureCellWithPadding } from "./measure-cell-with-padding";
2
+ export function measureHeaderOrFooterCell(cell, contentSelector) {
3
+ const content = cell.querySelector(contentSelector);
4
+ if (!content)
5
+ return 0;
6
+ return measureCellWithPadding(cell, content);
7
+ }
8
+ //# sourceMappingURL=measure-header-or-footer-cell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-header-or-footer-cell.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-header-or-footer-cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,UAAU,yBAAyB,CACvC,IAAiB,EACjB,eAAuB;IAEvB,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,eAAe,CAAgB,CAAC;IACnE,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,CAAC;IAEvB,OAAO,sBAAsB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function measurePureContent(sourceEl: HTMLElement): number;
2
+ //# sourceMappingURL=measure-pure-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-pure-content.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-pure-content.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,MAAM,CAmChE"}
@@ -0,0 +1,32 @@
1
+ export function measurePureContent(sourceEl) {
2
+ const clone = sourceEl.cloneNode(true);
3
+ // Remove all classes so no layout CSS applies
4
+ clone.className = "";
5
+ clone.removeAttribute("class");
6
+ clone.querySelectorAll("*").forEach((child) => {
7
+ child.className = "";
8
+ child.removeAttribute("class");
9
+ });
10
+ // Copy font styles from the original element
11
+ const cs = getComputedStyle(sourceEl);
12
+ clone.style.fontFamily = cs.fontFamily;
13
+ clone.style.fontSize = cs.fontSize;
14
+ clone.style.fontWeight = cs.fontWeight;
15
+ clone.style.fontStyle = cs.fontStyle;
16
+ clone.style.letterSpacing = cs.letterSpacing;
17
+ clone.style.textTransform = cs.textTransform;
18
+ // Neutral layout
19
+ clone.style.position = "absolute";
20
+ clone.style.visibility = "hidden";
21
+ clone.style.whiteSpace = "nowrap";
22
+ clone.style.width = "auto";
23
+ clone.style.padding = "0";
24
+ clone.style.margin = "0";
25
+ clone.style.border = "none";
26
+ clone.style.display = "inline-block";
27
+ document.body.appendChild(clone);
28
+ const width = clone.getBoundingClientRect().width;
29
+ document.body.removeChild(clone);
30
+ return width;
31
+ }
32
+ //# sourceMappingURL=measure-pure-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-pure-content.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-pure-content.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,kBAAkB,CAAC,QAAqB;IACtD,MAAM,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAgB,CAAC;IAEtD,8CAA8C;IAC9C,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QAC5C,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC;QACrB,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,6CAA6C;IAC7C,MAAM,EAAE,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACtC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;IACvC,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;IACnC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAC;IACvC,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAC;IACrC,KAAK,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,aAAa,CAAC;IAC7C,KAAK,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,aAAa,CAAC;IAE7C,iBAAiB;IACjB,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;IAClC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;IAClC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;IAClC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IAC1B,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC;IACzB,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;IAC5B,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC;IAErC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAEjC,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { PolyGridColumn } from "../../column/interfaces/column";
2
+ import { PolyGridRow } from "../../row/interfaces/row";
3
+ export interface PolyGridCellRendererParams {
4
+ value: any;
5
+ row: PolyGridRow;
6
+ column: PolyGridColumn;
7
+ rowIndex: number;
8
+ colId: string;
9
+ }
10
+ //# sourceMappingURL=cell-renderer-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-renderer-params.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/cell-renderer-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,GAAG,CAAC;IACX,GAAG,EAAE,WAAW,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cell-renderer-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cell-renderer-params.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/cell-renderer-params.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ import { PolyGridRow } from "../../row/interfaces/row";
2
+ export interface PolyGridFooterRendererParams {
3
+ field: string;
4
+ header: string;
5
+ columnKey: string;
6
+ columnId: string;
7
+ values: any[];
8
+ rows: PolyGridRow[];
9
+ }
10
+ //# sourceMappingURL=footer-renderer-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-renderer-params.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/footer-renderer-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,IAAI,EAAE,WAAW,EAAE,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=footer-renderer-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer-renderer-params.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/footer-renderer-params.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export interface PolyGridHeaderRendererParams {
2
+ field: string;
3
+ header: string;
4
+ columnKey: string;
5
+ columnId: string;
6
+ }
7
+ //# sourceMappingURL=header-renderer-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-renderer-params.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/header-renderer-params.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=header-renderer-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-renderer-params.js","sourceRoot":"","sources":["../../../../../src/engine/services/renderer/interfaces/header-renderer-params.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,wBAAgB,UAAU,CACxB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,kBAmCrB"}
1
+ {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,wBAAgB,UAAU,CACxB,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,aAAa,kBAsDrB"}
@@ -10,6 +10,7 @@ export function renderCell(row, col, runtime, store) {
10
10
  prevHandle?.destroy();
11
11
  runtime.cellHandles.delete(key);
12
12
  const value = row.data[col.field];
13
+ // 1. dynamic template?
13
14
  const handle = state.view.rendererAdapter?.renderColumnCellTemplate?.({
14
15
  container: cell,
15
16
  context: {
@@ -22,12 +23,28 @@ export function renderCell(row, col, runtime, store) {
22
23
  rowIndex: row.index,
23
24
  },
24
25
  });
25
- if (!handle) {
26
- cell.textContent = value != null ? String(value) : "";
27
- }
28
- else {
26
+ if (handle) {
29
27
  runtime.cellHandles.set(key, handle);
28
+ return cell;
29
+ }
30
+ // 2. Functional renderer?
31
+ if (col.cellRenderer) {
32
+ const result = col.cellRenderer({
33
+ value,
34
+ row,
35
+ column: col,
36
+ rowIndex: row.index,
37
+ colId: col.id,
38
+ });
39
+ if (typeof result === "string") {
40
+ cell.textContent = result;
41
+ }
42
+ else if (result instanceof HTMLElement) {
43
+ cell.appendChild(result);
44
+ }
45
+ return cell;
30
46
  }
47
+ cell.textContent = value != null ? String(value) : "";
31
48
  return cell;
32
49
  }
33
50
  //# sourceMappingURL=cell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/body/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAM9D,MAAM,UAAU,UAAU,CACxB,GAAgB,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AAK,GAAG,CAAC,MAAM,EAAE;YACxC,QAAQ,EAAE,GAAG,CAAC,EAAE;YAChB,QAAQ,EAAE,GAAG,CAAC,KAAK;SACpB;KACF,CAAC,CAAC;IAEH,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,0BAA0B;IAC1B,IAAI,GAAG,CAAC,YAAY,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,CAAC;YAC9B,KAAK;YACL,GAAG;YACH,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,GAAG,CAAC,KAAK;YACnB,KAAK,EAAE,GAAG,CAAC,EAAE;SACd,CAAC,CAAC;QACH,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;YAC/B,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;QAC5B,CAAC;aAAM,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;YACzC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,WAAW,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEtD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -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,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,QA0Df"}
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,QAiFf"}
@@ -20,7 +20,8 @@ export function renderFooterCells(footer, store, grid) {
20
20
  runtime.footerHandles.delete(col.id);
21
21
  // Compute column values
22
22
  const values = rows.map((r) => r.data[col.field]);
23
- // Try dynamic template
23
+ let rendered = false;
24
+ // dynamic template
24
25
  const handle = state.view.rendererAdapter?.renderColumnFooterTemplate?.({
25
26
  container: content,
26
27
  context: {
@@ -32,12 +33,31 @@ export function renderFooterCells(footer, store, grid) {
32
33
  rows,
33
34
  },
34
35
  });
35
- if (!handle) {
36
- // Fallback static footer
37
- content.textContent = col.header;
38
- }
39
- else {
36
+ if (handle) {
40
37
  runtime.footerHandles.set(col.id, handle);
38
+ rendered = true;
39
+ }
40
+ // Functional footerRenderer (if no Angular template)
41
+ if (!rendered && col.footerRenderer) {
42
+ const result = col.footerRenderer({
43
+ field: col.field,
44
+ header: col.header,
45
+ columnKey: `${col.field}::${col.header}`,
46
+ columnId: col.id,
47
+ values,
48
+ rows,
49
+ });
50
+ if (typeof result === "string") {
51
+ content.textContent = result;
52
+ }
53
+ else if (result instanceof HTMLElement) {
54
+ content.appendChild(result);
55
+ }
56
+ rendered = true;
57
+ }
58
+ // Fallback static footer text
59
+ if (!rendered) {
60
+ content.textContent = col.header;
41
61
  }
42
62
  cell.appendChild(content);
43
63
  // Store container for future updates
@@ -1 +1 @@
1
- {"version":3,"file":"footer-cells.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/footer/footer-cells.ts"],"names":[],"mappings":"AAAA,OAAO,EA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,CAAC,KAAK,CAAC,CAAC,CAAC;QAElD,uBAAuB;QACvB,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,0BAA0B,EAAE,CAAC;YACtE,SAAS,EAAE,OAAO;YAClB,OAAO,EAAE;gBACP,KAAK,EAAE,GAAG,CAAC,KAAK;gBAChB,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,SAAS,EAAE,GAAG,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC,MAAM,EAAE;gBACxC,QAAQ,EAAE,GAAG,CAAC,EAAE;gBAChB,MAAM;gBACN,IAAI;aACL;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,yBAAyB;YACzB,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAE1B,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
+ {"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;AAI9D,MAAM,UAAU,iBAAiB,CAC/B,MAAmB,EACnB,KAAoB,EACpB,IAAc;IAEd,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,e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CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"header-cells.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/header/header-cells.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,QAAQ,QA6Df"}
1
+ {"version":3,"file":"header-cells.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/header/header-cells.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,aAAa,EACpB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,QAAQ,QAiFf"}
@@ -19,7 +19,8 @@ export function renderHeaderCells(header, store, gridDom, grid) {
19
19
  const prevHandle = runtime.headerHandles.get(col.id);
20
20
  prevHandle?.destroy();
21
21
  runtime.headerHandles.delete(col.id);
22
- // Try dynamic template
22
+ let rendered = false;
23
+ // dynamic template
23
24
  const handle = state.view.rendererAdapter?.renderColumnHeaderTemplate?.({
24
25
  container: content,
25
26
  context: {
@@ -29,13 +30,29 @@ export function renderHeaderCells(header, store, gridDom, grid) {
29
30
  columnId: col.id,
30
31
  },
31
32
  });
32
- if (!handle) {
33
- // Fallback static header
34
- content.textContent = col.header;
35
- }
36
- else {
37
- // Store handle for cleanup later
33
+ if (handle) {
38
34
  runtime.headerHandles.set(col.id, handle);
35
+ rendered = true;
36
+ }
37
+ // Functional headerRenderer (if no dynamic template)
38
+ if (!rendered && col.headerRenderer) {
39
+ const result = col.headerRenderer({
40
+ field: col.field,
41
+ header: col.header,
42
+ columnKey: `${col.field}::${col.header}`,
43
+ columnId: col.id,
44
+ });
45
+ if (typeof result === "string") {
46
+ content.textContent = result;
47
+ }
48
+ else if (result instanceof HTMLElement) {
49
+ content.appendChild(result);
50
+ }
51
+ rendered = true;
52
+ }
53
+ // Fallback static header text
54
+ if (!rendered) {
55
+ content.textContent = col.header;
39
56
  }
40
57
  cell.appendChild(content);
41
58
  // Resize handle logic
@@ -1 +1 @@
1
- {"version":3,"file":"header-cells.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/header/header-cells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,UAAU,iBAAiB,CAC/B,MAAmB,EACnB,KAAoB,EACpB,OAAgB,EAChB,IAAc;IAEd,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAC/C,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAC7B,CAAC;IACF,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;IAEpD,qBAAqB;IACrB,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAEtB,OAAO,CAAC,OAAO,CAAC,CAA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QACtB,MAAM,MAAM,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QACxC,MAAM,gBAAgB,GAAG,UAAU,KAAK,aAAa,IAAI,MAAM,CAAC;QAEhE,IAAI,CAAC,gBAAgB,IAAI,SAAS,EAAE,CAAC;YACnC,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACnD,CAAC;QAED,8DAA8D;QAC9D,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
+ {"version":3,"file":"header-cells.js","sourceRoot":"","sources":["../../../../../../src/engine/services/renderer/parts/header/header-cells.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAI9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,UAAU,iBAAiB,CAC/B,MAAmB,EACnB,KAAoB,EACpB,OAAgB,EAChB,IAAc;IAEd,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9B,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAC/C,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAC7B,CAAC;IACF,MAAM,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC;IAClD,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;IAEpD,qBAAqB;IACrB,MAAM,CAAC,SAAS,GAAG,EAAE,CAAC;IAEtB,OAAO,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
2
  export type { PolyGridRow } from "./engine/services/row/interfaces/row";
3
+ export type { PolyGridCellRendererParams } from "./engine/services/renderer/interfaces/cell-renderer-params";
4
+ export type { PolyGridHeaderRendererParams } from "./engine/services/renderer/interfaces/header-renderer-params";
5
+ export type { PolyGridFooterRendererParams } from "./engine/services/renderer/interfaces/footer-renderer-params";
3
6
  export type { PolyGridResizeMode } from "./engine/store/types/resize-mode";
4
7
  //# 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,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACxE,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,0BAA0B,EAAE,MAAM,4DAA4D,CAAC;AAC7G,YAAY,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AACjH,YAAY,EAAE,4BAA4B,EAAE,MAAM,8DAA8D,CAAC;AACjH,YAAY,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polygrid/core",
3
- "version": "1.0.425",
3
+ "version": "1.0.427",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,2 +0,0 @@
1
- export declare function measureElement(el: HTMLElement): number;
2
- //# sourceMappingURL=measure-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"measure-element.d.ts","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-element.ts"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,CAAC,EAAE,EAAE,WAAW,UAa7C"}
@@ -1,12 +0,0 @@
1
- export function measureElement(el) {
2
- const clone = el.cloneNode(true);
3
- clone.style.position = "absolute";
4
- clone.style.visibility = "hidden";
5
- clone.style.width = "auto";
6
- clone.style.whiteSpace = "nowrap";
7
- document.body.appendChild(clone);
8
- const width = clone.getBoundingClientRect().width;
9
- document.body.removeChild(clone);
10
- return width;
11
- }
12
- //# sourceMappingURL=measure-element.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"measure-element.js","sourceRoot":"","sources":["../../../../../src/engine/services/column/methods/measure-element.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,cAAc,CAAC,EAAe;IAC5C,MAAM,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAgB,CAAC;IAEhD,KAAK,CAAC,KAAK,CAAC,QAAQ,GAAG,UAAU,CAAC;IAClC,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;IAClC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;IAC3B,KAAK,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC;IAElC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC,KAAK,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAEjC,OAAO,KAAK,CAAC;AACf,CAAC"}