@gears-frontx/ui-kit 0.4.5 → 0.4.6

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 (146) hide show
  1. package/dist/chunks/actions.iasfkjWq.css +1 -0
  2. package/dist/chunks/create-column-auto-size.js +62 -0
  3. package/dist/chunks/create-column-auto-size.js.map +1 -0
  4. package/dist/chunks/data-grid-record-context.js +13 -0
  5. package/dist/chunks/data-grid-record-context.js.map +1 -0
  6. package/dist/chunks/data-grid.-6P4UQGJ.css +1 -0
  7. package/dist/chunks/hooked.js +27 -35
  8. package/dist/chunks/hooked.js.map +1 -1
  9. package/dist/chunks/ignore-row-click.js +5 -0
  10. package/dist/chunks/ignore-row-click.js.map +1 -0
  11. package/dist/chunks/messages.js +19 -3
  12. package/dist/chunks/messages.js.map +1 -1
  13. package/dist/chunks/resolve-body-cell-props.DGczzk1U.css +1 -0
  14. package/dist/chunks/resolve-body-cell-props.js +140 -0
  15. package/dist/chunks/resolve-body-cell-props.js.map +1 -0
  16. package/dist/chunks/row-actions.BprAXgu2.css +1 -0
  17. package/dist/chunks/row-click.DAYTmSBO.css +1 -0
  18. package/dist/chunks/row-number.C7fNu9Bw.css +1 -0
  19. package/dist/chunks/row-select.BjKdiMf5.css +1 -0
  20. package/dist/chunks/table-configuration.a6C_fp7B.css +1 -0
  21. package/dist/chunks/table-context.js +8 -0
  22. package/dist/chunks/table-context.js.map +1 -0
  23. package/dist/chunks/table-types.js +11 -0
  24. package/dist/chunks/table-types.js.map +1 -0
  25. package/dist/chunks/table.Dmz7LEk7.css +1 -0
  26. package/dist/components/data-grid/messages.d.ts +16 -0
  27. package/dist/components/data-grid/messages.d.ts.map +1 -1
  28. package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts +4 -0
  29. package/dist/components/data-grid/plugins/actions/actions-plugin.d.ts.map +1 -0
  30. package/dist/components/data-grid/plugins/actions/actions-types.d.ts +11 -0
  31. package/dist/components/data-grid/plugins/actions/actions-types.d.ts.map +1 -0
  32. package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts +3 -0
  33. package/dist/components/data-grid/plugins/actions/components/data-grid-actions-wrapper.d.ts.map +1 -0
  34. package/dist/components/data-grid/plugins/actions/public.d.ts +3 -0
  35. package/dist/components/data-grid/plugins/actions/public.d.ts.map +1 -0
  36. package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts +3 -0
  37. package/dist/components/data-grid/plugins/actions-menu/actions-menu-plugin.d.ts.map +1 -0
  38. package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts +25 -0
  39. package/dist/components/data-grid/plugins/actions-menu/actions-menu-types.d.ts.map +1 -0
  40. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts +3 -0
  41. package/dist/components/data-grid/plugins/actions-menu/components/data-grid-actions-menu.d.ts.map +1 -0
  42. package/dist/components/data-grid/plugins/actions-menu/public.d.ts +3 -0
  43. package/dist/components/data-grid/plugins/actions-menu/public.d.ts.map +1 -0
  44. package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts +3 -0
  45. package/dist/components/data-grid/plugins/row-actions/components/data-grid-row-actions-cell.d.ts.map +1 -0
  46. package/dist/components/data-grid/plugins/row-actions/public.d.ts +3 -0
  47. package/dist/components/data-grid/plugins/row-actions/public.d.ts.map +1 -0
  48. package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts +6 -0
  49. package/dist/components/data-grid/plugins/row-actions/row-actions-plugin.d.ts.map +1 -0
  50. package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts +24 -0
  51. package/dist/components/data-grid/plugins/row-actions/row-actions-types.d.ts.map +1 -0
  52. package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts +8 -0
  53. package/dist/components/data-grid/plugins/row-click/components/data-grid-row-click.d.ts.map +1 -0
  54. package/dist/components/data-grid/plugins/row-click/public.d.ts +3 -0
  55. package/dist/components/data-grid/plugins/row-click/public.d.ts.map +1 -0
  56. package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts +14 -0
  57. package/dist/components/data-grid/plugins/row-click/row-click-plugin.d.ts.map +1 -0
  58. package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts +9 -0
  59. package/dist/components/data-grid/plugins/row-click/row-click-utils.d.ts.map +1 -0
  60. package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts +3 -0
  61. package/dist/components/data-grid/plugins/row-number/components/data-grid-row-number-cell.d.ts.map +1 -0
  62. package/dist/components/data-grid/plugins/row-number/public.d.ts +3 -0
  63. package/dist/components/data-grid/plugins/row-number/public.d.ts.map +1 -0
  64. package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts +4 -0
  65. package/dist/components/data-grid/plugins/row-number/row-number-plugin.d.ts.map +1 -0
  66. package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts +6 -0
  67. package/dist/components/data-grid/plugins/row-number/row-number-types.d.ts.map +1 -0
  68. package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts +2 -0
  69. package/dist/components/data-grid/plugins/row-number/services/row-number-formula.d.ts.map +1 -0
  70. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts +3 -0
  71. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-banner.d.ts.map +1 -0
  72. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts +3 -0
  73. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-body.d.ts.map +1 -0
  74. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts +3 -0
  75. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-header.d.ts.map +1 -0
  76. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts +3 -0
  77. package/dist/components/data-grid/plugins/row-select/components/data-grid-row-select-top.d.ts.map +1 -0
  78. package/dist/components/data-grid/plugins/row-select/public.d.ts +3 -0
  79. package/dist/components/data-grid/plugins/row-select/public.d.ts.map +1 -0
  80. package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts +5 -0
  81. package/dist/components/data-grid/plugins/row-select/row-select-plugin.d.ts.map +1 -0
  82. package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts +113 -0
  83. package/dist/components/data-grid/plugins/row-select/row-select-types.d.ts.map +1 -0
  84. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts +10 -0
  85. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-group-item.d.ts.map +1 -0
  86. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts +10 -0
  87. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-item.d.ts.map +1 -0
  88. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts +8 -0
  89. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-pin-button.d.ts.map +1 -0
  90. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts +3 -0
  91. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration-trigger.d.ts.map +1 -0
  92. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts +3 -0
  93. package/dist/components/data-grid/plugins/table-configuration/components/data-grid-table-configuration.d.ts.map +1 -0
  94. package/dist/components/data-grid/plugins/table-configuration/public.d.ts +3 -0
  95. package/dist/components/data-grid/plugins/table-configuration/public.d.ts.map +1 -0
  96. package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts +5 -0
  97. package/dist/components/data-grid/plugins/table-configuration/table-configuration-plugin.d.ts.map +1 -0
  98. package/dist/components/data-grid/services/layout/components/data-grid-layout-top.d.ts.map +1 -1
  99. package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts +2 -0
  100. package/dist/components/data-grid/services/layout/components/toolbar-lines.d.ts.map +1 -0
  101. package/dist/components/data-grid/services/table/components/data-grid-cell.d.ts.map +1 -1
  102. package/dist/components/data-grid/services/table/components/data-grid-extra-header-cell.d.ts.map +1 -1
  103. package/dist/components/data-grid/services/table/components/data-grid-header-cell.d.ts.map +1 -1
  104. package/dist/components/data-grid/services/table/components/data-grid-header-group.d.ts.map +1 -1
  105. package/dist/components/data-grid/services/table/table-service.d.ts.map +1 -1
  106. package/dist/components/data-grid/services/table/table-sticky.d.ts +16 -0
  107. package/dist/components/data-grid/services/table/table-sticky.d.ts.map +1 -1
  108. package/dist/components/table/table.d.ts +20 -3
  109. package/dist/components/table/table.d.ts.map +1 -1
  110. package/dist/data-grid/actions-menu.d.ts +1 -0
  111. package/dist/data-grid/actions-menu.js +57 -0
  112. package/dist/data-grid/actions-menu.js.map +1 -0
  113. package/dist/data-grid/actions.d.ts +1 -0
  114. package/dist/data-grid/actions.js +36 -0
  115. package/dist/data-grid/actions.js.map +1 -0
  116. package/dist/data-grid/filters.js +24 -23
  117. package/dist/data-grid/filters.js.map +1 -1
  118. package/dist/data-grid/row-actions.d.ts +1 -0
  119. package/dist/data-grid/row-actions.js +52 -0
  120. package/dist/data-grid/row-actions.js.map +1 -0
  121. package/dist/data-grid/row-click.d.ts +1 -0
  122. package/dist/data-grid/row-click.js +69 -0
  123. package/dist/data-grid/row-click.js.map +1 -0
  124. package/dist/data-grid/row-number.d.ts +1 -0
  125. package/dist/data-grid/row-number.js +38 -0
  126. package/dist/data-grid/row-number.js.map +1 -0
  127. package/dist/data-grid/row-select.d.ts +1 -0
  128. package/dist/data-grid/row-select.js +293 -0
  129. package/dist/data-grid/row-select.js.map +1 -0
  130. package/dist/data-grid/table-configuration.d.ts +1 -0
  131. package/dist/data-grid/table-configuration.js +165 -0
  132. package/dist/data-grid/table-configuration.js.map +1 -0
  133. package/dist/data-grid.js +853 -921
  134. package/dist/data-grid.js.map +1 -1
  135. package/dist/docs/data-grid.md +336 -9
  136. package/dist/docs/table.md +57 -2
  137. package/dist/index.d.ts +7 -0
  138. package/dist/index.d.ts.map +1 -1
  139. package/dist/index.js +397 -382
  140. package/dist/index.js.map +1 -1
  141. package/dist/table.js +114 -112
  142. package/dist/table.js.map +1 -1
  143. package/llms.txt +9 -7
  144. package/package.json +1 -1
  145. package/dist/chunks/data-grid.DYrZEU-F.css +0 -1
  146. package/dist/chunks/table.CMm41tvy.css +0 -1
@@ -0,0 +1 @@
1
+ ._wrapper_18zhb_1{display:flex;align-items:center;gap:var(--space-1)}
@@ -0,0 +1,62 @@
1
+ function S(u) {
2
+ const o = /* @__PURE__ */ new Map();
3
+ let r = 0, c = null;
4
+ return {
5
+ measureRef: h,
6
+ destroy: d
7
+ };
8
+ function d() {
9
+ c == null || c.disconnect(), c = null, o.clear(), r = 0;
10
+ }
11
+ function l() {
12
+ return c ?? (c = new ResizeObserver((n) => {
13
+ let e = !1, t = null;
14
+ for (const s of n) {
15
+ const i = s.target;
16
+ t = i;
17
+ const f = p(i);
18
+ o.get(i) !== f && (o.set(i, f), e = !0);
19
+ }
20
+ e && a(t);
21
+ })), c;
22
+ }
23
+ function p(n) {
24
+ const e = n.style.inlineSize;
25
+ n.style.inlineSize = "max-content";
26
+ const t = n.offsetWidth;
27
+ return n.style.inlineSize = e, t;
28
+ }
29
+ function a(n = null) {
30
+ let e = 0;
31
+ for (const i of o.values())
32
+ i > e && (e = i);
33
+ const t = g(n), s = Math.ceil(e + t);
34
+ s !== r && (r = s, u(`${s}px`));
35
+ }
36
+ function g(n) {
37
+ const e = [];
38
+ n && e.push(n);
39
+ for (const t of o.keys()) e.push(t);
40
+ for (const t of e) {
41
+ if (!t.isConnected) continue;
42
+ const s = t.closest("td, th");
43
+ if (!s) continue;
44
+ const i = getComputedStyle(s);
45
+ return parseFloat(i.paddingInlineStart || "0") + parseFloat(i.paddingInlineEnd || "0");
46
+ }
47
+ return 0;
48
+ }
49
+ function h(n) {
50
+ if (n)
51
+ o.set(n, 0), l().observe(n);
52
+ else {
53
+ for (const e of o.keys())
54
+ e.isConnected || (l().unobserve(e), o.delete(e));
55
+ a();
56
+ }
57
+ }
58
+ }
59
+ export {
60
+ S as c
61
+ };
62
+ //# sourceMappingURL=create-column-auto-size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-column-auto-size.js","sources":["../../src/components/data-grid/services/columns/create-column-auto-size.ts"],"sourcesContent":["interface ColumnAutoSize {\n measureRef: (element: HTMLElement | null) => void;\n destroy: () => void;\n}\n\nexport function createColumnAutoSize(onWidthChange: (width: string) => void): ColumnAutoSize {\n const widthMap = new Map<HTMLElement, number>();\n let currentMax = 0;\n let observer: ResizeObserver | null = null;\n\n return {\n measureRef,\n destroy,\n };\n\n function destroy() {\n observer?.disconnect();\n observer = null;\n widthMap.clear();\n currentMax = 0;\n }\n\n function getObserver(): ResizeObserver {\n observer ??= new ResizeObserver((entries) => {\n let changed = false;\n let referenceEl: HTMLElement | null = null;\n\n for (const entry of entries) {\n const el = entry.target as HTMLElement;\n referenceEl = el;\n const width = measureIntrinsicInlineSize(el);\n const prev = widthMap.get(el);\n\n if (prev !== width) {\n widthMap.set(el, width);\n changed = true;\n }\n }\n\n if (changed) {\n updateMax(referenceEl);\n }\n });\n return observer;\n }\n\n // Read the element's intrinsic max-content inline-size rather than the\n // rendered borderBox value. ResizeObserver entries report the rendered\n // size, which collapses below the element's natural content width when\n // the parent (a `<td>` under `table-layout: fixed`) is allocated less\n // space than the content needs. Using the rendered value back as the\n // column's \"natural\" width locks the column below its content.\n //\n // Temporarily setting `inline-size: max-content` forces the browser to\n // resolve the intrinsic size regardless of parent constraint; the\n // restoration in the same task leaves the element's final rendered size\n // unchanged so the browser does not re-fire the ResizeObserver.\n function measureIntrinsicInlineSize(el: HTMLElement): number {\n const prevInlineSize = el.style.inlineSize;\n el.style.inlineSize = 'max-content';\n const intrinsic = el.offsetWidth;\n el.style.inlineSize = prevInlineSize;\n return intrinsic;\n }\n\n function updateMax(referenceEl: HTMLElement | null = null) {\n let max = 0;\n for (const width of widthMap.values()) {\n if (width > max) max = width;\n }\n\n const parentPadding = getParentPadding(referenceEl);\n const total = Math.ceil(max + parentPadding);\n\n if (total !== currentMax) {\n currentMax = total;\n onWidthChange(`${total}px`);\n }\n }\n\n // Reads padding-inline on the first connected observed element's parent TD/TH.\n // Prefer the just-fired observer entry's target (passed via referenceEl) because\n // widthMap.keys() can have a stale `firstEl` that React has unmounted — its\n // `closest('td, th')` would return null and we'd silently fall back to padding=0,\n // producing column widths that don't account for cell padding.\n function getParentPadding(referenceEl: HTMLElement | null): number {\n const candidates: HTMLElement[] = [];\n if (referenceEl) candidates.push(referenceEl);\n for (const el of widthMap.keys()) candidates.push(el);\n\n for (const el of candidates) {\n if (!el.isConnected) continue;\n const td = el.closest('td, th');\n if (!td) continue;\n const style = getComputedStyle(td);\n return (\n parseFloat(style.paddingInlineStart || '0') + parseFloat(style.paddingInlineEnd || '0')\n );\n }\n return 0;\n }\n\n function measureRef(element: HTMLElement | null) {\n if (element) {\n widthMap.set(element, 0);\n getObserver().observe(element);\n } else {\n // Deferred cleanup: React calls ref(null) before removing the DOM node,\n // so the element being unmounted is still connected at this point.\n // Previously disconnected elements (from earlier unmounts) are cleaned up here.\n // This means stale entries lag by one unmount cycle — at most ~1 viewport worth.\n // Deleting from a Map during keys() iteration is safe per the JS spec.\n for (const el of widthMap.keys()) {\n if (!el.isConnected) {\n getObserver().unobserve(el);\n widthMap.delete(el);\n }\n }\n updateMax();\n }\n }\n}\n"],"names":["createColumnAutoSize","onWidthChange","widthMap","currentMax","observer","measureRef","destroy","getObserver","entries","changed","referenceEl","entry","el","width","measureIntrinsicInlineSize","updateMax","prevInlineSize","intrinsic","max","parentPadding","getParentPadding","total","candidates","td","style","element"],"mappings":"AAKO,SAASA,EAAqBC,GAAwD;AAC3F,QAAMC,wBAAe,IAAA;AACrB,MAAIC,IAAa,GACbC,IAAkC;AAEtC,SAAO;AAAA,IACL,YAAAC;AAAA,IACA,SAAAC;AAAA,EAAA;AAGF,WAASA,IAAU;AACjB,IAAAF,KAAA,QAAA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AAsB,GAAG,IAAI,WAAWA,EAAM,oBAAoB,GAAG;AAAA,IAE1F;AACA,WAAO;AAAA,EACT;AAEA,WAASnB,EAAWoB,GAA6B;AAC/C,QAAIA;AACF,MAAAvB,EAAS,IAAIuB,GAAS,CAAC,GACvBlB,EAAA,EAAc,QAAQkB,CAAO;AAAA,SACxB;AAML,iBAAWb,KAAMV,EAAS;AACxB,QAAKU,EAAG,gBACNL,EAAA,EAAc,UAAUK,CAAE,GAC1BV,EAAS,OAAOU,CAAE;AAGtB,MAAAG,EAAA;AAAA,IACF;AAAA,EACF;AACF;"}
@@ -0,0 +1,13 @@
1
+ import { useContext as e, createContext as o } from "react";
2
+ const t = o(null), d = t.Provider;
3
+ function i() {
4
+ const r = e(t);
5
+ if (!r)
6
+ throw new Error("useDataGridRecord must be used within a DataGridRow");
7
+ return r;
8
+ }
9
+ export {
10
+ d as D,
11
+ i as u
12
+ };
13
+ //# sourceMappingURL=data-grid-record-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-grid-record-context.js","sources":["../../src/components/data-grid/services/table/data-grid-record-context.ts"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { DataGridItem } from '../../data-grid-types';\nimport type { DataGridRecord } from '../storage/storage-types';\n\nconst DataGridRecordContext = createContext<DataGridRecord | null>(null);\n\nexport const DataGridRecordProvider = DataGridRecordContext.Provider;\n\nexport function useDataGridRecord<\n TItem extends DataGridItem = DataGridItem,\n>(): DataGridRecord<TItem> {\n const record = useContext(DataGridRecordContext);\n if (!record) {\n throw new Error('useDataGridRecord must be used within a DataGridRow');\n }\n return record as DataGridRecord<TItem>;\n}\n"],"names":["DataGridRecordContext","createContext","DataGridRecordProvider","useDataGridRecord","record","useContext"],"mappings":";AAIA,MAAMA,IAAwBC,EAAqC,IAAI,GAE1DC,IAAyBF,EAAsB;AAErD,SAASG,IAEW;AACzB,QAAMC,IAASC,EAAWL,CAAqB;AAC/C,MAAI,CAACI;AACH,UAAM,IAAI,MAAM,qDAAqD;AAEvE,SAAOA;AACT;"}
@@ -0,0 +1 @@
1
+ ._delayed_1ys81_5{display:inline-flex;animation:_appear_1ys81_1 .5s forwards;animation-delay:.4s;opacity:0}@keyframes _appear_1ys81_1{to{opacity:1}}._root_9f4nk_13{position:relative;box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;min-block-size:0}._loaderOverlay_15xmu_29{position:absolute;z-index:4;display:flex;align-items:center;justify-content:center;animation:_appear_15xmu_1 .5s forwards;animation-delay:.4s;background-color:color-mix(in srgb,var(--surface) 75%,transparent);cursor:default;top:0;right:0;bottom:0;left:0;opacity:0;pointer-events:none}@keyframes _appear_15xmu_1{to{opacity:1;pointer-events:auto}}._emptyState_1tt1k_3{flex:none;margin:auto}._dataGridLayoutMain_ta8be_5{display:flex;overflow:auto;flex-direction:column;flex-grow:1;align-self:stretch;contain:inline-size}._dataGridTopDefault_5t4tt_1{display:flex;flex-wrap:wrap;align-items:center;row-gap:var(--space-2);margin-block-end:var(--space-2);min-inline-size:0}._topStartSlots_5t4tt_16{display:flex;flex:1 1 auto;flex-wrap:wrap;align-items:center;gap:var(--space-2);min-inline-size:0}._topStartSlot_5t4tt_16,._topEndSlot_5t4tt_32{display:contents}._topEndSlots_5t4tt_36{display:flex;flex-shrink:0;align-items:center;gap:var(--space-2);margin-inline-start:auto}._wrapper_1h8lw_7{display:flow-root}._replacement_1h8lw_18{display:flex;flex-direction:column;justify-content:center}._center_s4klt_3{flex:none;margin:auto}._headerCell_18ulc_1{box-sizing:border-box;border-inline-start:var(--_data-grid-table-group-border, 0 solid transparent);border-block-start:var(--_data-grid-header-border-block-start, 0);white-space:nowrap}._headerCellContent_18ulc_13{display:flex;align-items:center;inline-size:min-content;min-block-size:var(--space-6);white-space:nowrap}._extraHeaderCell_18ulc_21{box-sizing:border-box;border-inline-start:var(--_data-grid-table-group-border, 0 solid transparent);border-block-start:var(--_data-grid-header-border-block-start, 0);white-space:nowrap}._tableWrapper_6b0cm_6{contain:inline-size}._table_6b0cm_6{--table-header-fill: var(--data-grid-header-background, var(--card));--table-pinned-fill: var(--data-grid-pinned-background, var(--card));min-inline-size:var(--data-grid-table-min-inline-size, max-content)}._table_6b0cm_6._layoutFixed_6b0cm_39{border-collapse:separate;border-spacing:0;inline-size:100%;table-layout:fixed}._table_6b0cm_6._layoutAuto_6b0cm_46{border-collapse:separate;border-spacing:0;inline-size:100%;table-layout:auto}._tableBordered_6b0cm_53{--_data-grid-table-group-border: var(--border-width) solid var(--border);--_data-grid-header-border-block-start: var(--border-width) solid var(--border)}._theadSticky_167rm_11{position:sticky;z-index:2;inset-block-start:0}
@@ -1,52 +1,44 @@
1
1
  import { useRef as p, useEffect as d } from "react";
2
- function h(r) {
3
- return "columns" in r && Array.isArray(r.columns);
4
- }
5
- function m(r) {
6
- return "columns" in r && Array.isArray(r.columns);
7
- }
8
- function k(r) {
9
- const u = p(r);
2
+ function g(e) {
3
+ const c = p(e);
10
4
  return d(() => {
11
- u.current = r;
12
- }, [r]), u;
5
+ c.current = e;
6
+ }, [e]), c;
13
7
  }
14
- function y() {
15
- const r = /* @__PURE__ */ new Map();
16
- return { hook: u, callHook: l, callHookParallel: f, callHookSync: a };
17
- function u(n, t) {
18
- if (!n || typeof t != "function")
8
+ function k() {
9
+ const e = /* @__PURE__ */ new Map();
10
+ return { hook: c, callHook: l, callHookParallel: f, callHookSync: a };
11
+ function c(t, n) {
12
+ if (!t || typeof n != "function")
19
13
  return () => {
20
14
  };
21
- const o = t, e = r.get(n) ?? [];
22
- return e.push(o), r.set(n, e), () => {
23
- const s = r.get(n);
15
+ const r = n, o = e.get(t) ?? [];
16
+ return o.push(r), e.set(t, o), () => {
17
+ const s = e.get(t);
24
18
  if (!s) return;
25
- const c = s.indexOf(o);
26
- c !== -1 && s.splice(c, 1), s.length === 0 && r.delete(n);
19
+ const u = s.indexOf(r);
20
+ u !== -1 && s.splice(u, 1), s.length === 0 && e.delete(t);
27
21
  };
28
22
  }
29
- function i(n) {
30
- return [...r.get(n) ?? []];
23
+ function i(t) {
24
+ return [...e.get(t) ?? []];
31
25
  }
32
- function l(n, ...t) {
33
- const o = i(n).reduce((e, s) => {
34
- const c = e[e.length - 1] ?? Promise.resolve();
35
- return [...e, c.then(() => s(...t))];
26
+ function l(t, ...n) {
27
+ const r = i(t).reduce((o, s) => {
28
+ const u = o[o.length - 1] ?? Promise.resolve();
29
+ return [...o, u.then(() => s(...n))];
36
30
  }, []);
37
- return Promise.all(o);
31
+ return Promise.all(r);
38
32
  }
39
- function f(n, ...t) {
40
- return Promise.all(i(n).map((o) => o(...t)));
33
+ function f(t, ...n) {
34
+ return Promise.all(i(t).map((r) => r(...n)));
41
35
  }
42
- function a(n, ...t) {
43
- return i(n).map((o) => o(...t));
36
+ function a(t, ...n) {
37
+ return i(t).map((r) => r(...n));
44
38
  }
45
39
  }
46
40
  export {
47
- m as a,
48
- y as c,
49
- h as i,
50
- k as u
41
+ k as c,
42
+ g as u
51
43
  };
52
44
  //# sourceMappingURL=hooked.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooked.js","sources":["../../src/components/data-grid/services/table/table-types.ts","../../src/components/data-grid/utils/use-latest.ts","../../src/components/data-grid/utils/hooked.ts"],"sourcesContent":["import type { ComponentType, ReactNode } from 'react';\nimport type { DataGridItem } from '../../data-grid-types';\n\nexport const TableLayouts = ['fixed', 'auto'] as const;\nexport type DataGridTableLayout = (typeof TableLayouts)[number];\n\nexport const TableColumnOverflows = ['wrap', 'nowrap'] as const;\nexport type DataGridTableColumnOverflow = (typeof TableColumnOverflows)[number];\n\nexport interface DataGridTableColumn<TItem extends DataGridItem = DataGridItem> {\n id: string;\n key?: string;\n label: string | (() => string);\n type?: 'string' | 'number' | 'date';\n /**\n * Column width. Under `tableLayout=\"fixed\"` (default) this is the column's shared track — a\n * proportional weight when every column has a `width`, an exact size when some columns are\n * widthless. Under `tableLayout=\"auto\"` it is a preferred size that also acts as a floor unless\n * `minWidth` is set. A `%` string maps to `inline-size`; any other value maps to `width` +\n * `min-inline-size`.\n *\n * `'min-content'` is a first-class value: it sizes the column to its own header content, in\n * both layout modes -- the literal CSS keyword isn't honored by either table-layout algorithm\n * as a sizing hint on its own, so `DataGridHeaderCell` measures the header cell's content and\n * applies the result as a pixel width instead (the column's size under `auto`, its shared track\n * under `fixed`). See `resolveColumnStyle`. For choosing a width strategy per column, see the\n * decision guide in `data-grid.md` (\"Choosing column widths\").\n */\n width?: number | 'min-content' | (string & {});\n /**\n * Minimum column width in px. Under `tableLayout=\"auto\"` this is an independent floor. Under\n * `tableLayout=\"fixed\"` the three width props collapse to a single track: a lone `minWidth`\n * (no `width`, no `maxWidth`) aliases to the track, while combining it with `width` triggers a\n * DEV-only console warning and `width` wins, since fixed layout cannot honor both.\n */\n minWidth?: number;\n /**\n * Maximum column width in px, enforced via a content-cap wrapper. Under `tableLayout=\"auto\"`\n * this is a real, independent cap. Under `tableLayout=\"fixed\"` the three width props collapse\n * to a single track: a lone `maxWidth` (no `width`, no `minWidth`) aliases to the track, while\n * combining it with `width` triggers a DEV-only console warning and `width` wins, since fixed\n * layout cannot honor both.\n */\n maxWidth?: number;\n visible?: boolean;\n sticky?: boolean;\n visibleToggleDisabled?: boolean;\n formatter?: (value: unknown) => string;\n /**\n * Header-only overflow handling. Default `'nowrap'` — the label stays on one line and clips\n * with an ellipsis (\"…\") on overflow, auto-setting `title` with the full label for the default\n * label renderer; when `headerComponent` is set the kit cannot supply that fallback and the\n * consumer is responsible for it. `'wrap'` lets the label wrap across lines instead.\n */\n headerOverflow?: DataGridTableColumnOverflow;\n /**\n * Body-cell overflow handling. Default `'wrap'`: the value wraps across lines. `'nowrap'` keeps the value on one line and clips it with an ellipsis (\"…\") on\n * overflow, auto-setting `title` with the formatted value for the default value renderer; when\n * `component` or `render` is set the kit cannot supply that fallback and the consumer is\n * responsible for it.\n */\n cellOverflow?: DataGridTableColumnOverflow;\n /**\n * @deprecated Use `headerOverflow: 'nowrap'` instead. Normalized to `headerOverflow` at\n * column ingestion and kept working for one release with a dev-only deprecation warning.\n */\n headerTruncate?: boolean;\n component?: ComponentType<{ item: TItem; column: DataGridTableColumn<TItem>; value: unknown }>;\n headerComponent?: ComponentType<{ column: DataGridTableColumn<TItem> }>;\n render?: ((item: TItem) => ReactNode) | ReactNode;\n getClassName?: (item: TItem) => string | undefined;\n groupId?: string;\n}\n\nexport interface DataGridTableGroup<TItem extends DataGridItem = DataGridItem> {\n id: string;\n label: string | (() => string);\n columns: DataGridTableColumn<TItem>[];\n component?: ComponentType<{ group: DataGridTableGroup<TItem> }>;\n visible?: boolean;\n sticky?: boolean;\n}\n\nexport function isTableGroup<TItem extends DataGridItem>(\n item: DataGridTableColumn<TItem> | DataGridTableGroup<TItem>,\n): item is DataGridTableGroup<TItem> {\n return 'columns' in item && Array.isArray(item.columns);\n}\n\nexport type TableSlotName = 'subheader' | 'footer' | 'header-cell-end';\n\nexport interface TableSlot {\n id: string;\n name: TableSlotName;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- what `registerTableSlot` takes: a `header-cell-end` slot gets the column, the others nothing\n component: ComponentType<any>;\n order: number;\n}\n\nexport interface TableSlotOption {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the option `registerTableSlot` takes\n component: ComponentType<any>;\n order?: number;\n}\n\nexport interface TableSlotOptions {\n subheader: TableSlotOption;\n footer: TableSlotOption;\n 'header-cell-end': TableSlotOption;\n}\n\nexport type ExtraColumnPosition = 'start' | 'end';\n\nexport interface ExtraColumn {\n id: string;\n header?: ComponentType;\n body?: ComponentType;\n position: ExtraColumnPosition;\n order: number;\n /**\n * Any CSS length, applied as the column's width. A pinned `end` column's contribution to the\n * offsets of the columns pinned inside it is read from this only while the header has not been\n * measured yet, and only when the value is a plain px length -- anything else contributes `0`\n * until the measurement lands.\n */\n width?: string;\n /**\n * Pins the column to the table's inline-end edge, so it stays reachable while the rows scroll\n * sideways. Read only for `end` columns; a `start` extra column is not pinned by it, and is not\n * pinned by the table's own sticky columns either -- it only offsets them. Setting it on a\n * `start` column logs a DEV-only warning. Defaults to unpinned.\n */\n sticky?: boolean;\n /**\n * When `true`, the rendered header and body cells for this column carry\n * `data-grid-row-ignore-click`, so a plugin that reacts to row clicks can skip clicks\n * anywhere in the cell (including its padding, not just the inner content).\n */\n ignoreRowClick?: boolean;\n}\n\nexport type ExtraColumnOption = Partial<ExtraColumn>;\n\nexport type TableComponentName =\n | 'row'\n | 'header-cell'\n | 'header-cell-label'\n | 'header-group'\n | 'body-cell-content'\n | 'content';\n\n/**\n * How the registry stores a component registered under a `TableComponentName`. Each name takes its\n * own props, so the registry holds them as taking none it could name: every function component\n * (a `memo`, `forwardRef` or `lazy` one too) is assignable to `ComponentType<never>`, and\n * `useComponent` hands one back as the props its caller renders. A class component is not: its\n * instance carries its props (`this.props`), which `never` cannot hold. So this is the stored\n * form only; the public `registerComponent` still takes `ComponentType<any>` and asserts a class\n * component into it.\n */\nexport type RegisteredTableComponent = ComponentType<never>;\n\nexport interface TableHeaderCell<TItem extends DataGridItem = DataGridItem> {\n type: 'group' | 'column';\n item: DataGridTableGroup<TItem> | DataGridTableColumn<TItem>;\n component: RegisteredTableComponent;\n colspan?: number;\n rowspan?: number;\n}\n\nexport interface TableStore<TItem extends DataGridItem = DataGridItem> {\n columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];\n flatColumns: DataGridTableColumn<TItem>[];\n columnVisibility: Map<string, boolean>;\n columnSticky: Map<string, boolean>;\n groupSticky: Map<string, boolean>;\n columnWidths: Map<string, number>;\n /**\n * Measured pixel width of `tableLayout=\"auto\"` columns with `width: 'min-content'` -- see\n * `table-min-content-width.ts`. Kept separate from `columnWidths` above: that one is read-only\n * telemetry off a cell's already-rendered width (for sticky-offset math) and never feeds back\n * into that cell's own size, so it never needs a dedup guard. This one directly drives the\n * column's own CSS width, so it must dedupe writes to avoid a measure -> apply -> relayout ->\n * re-measure loop.\n */\n minContentWidths: Map<string, number>;\n extraColumnsStart: ExtraColumn[];\n extraColumnsEnd: ExtraColumn[];\n slots: Map<TableSlotName, TableSlot[]>;\n components: Map<TableComponentName, RegisteredTableComponent>;\n tableLayout: DataGridTableLayout;\n /** Mirrors `DataGrid`'s `stickyHeader` prop; read by the header renderers. */\n stickyHeader: boolean;\n}\n\nexport interface ConfigurationColumn {\n id: string;\n label: string;\n visible: boolean;\n sticky: boolean;\n visibleToggleDisabled: boolean;\n}\n\nexport interface ConfigurationGroup {\n id: string;\n label: string;\n visible: boolean;\n sticky: boolean;\n columns: ConfigurationColumn[];\n}\n\nexport type ConfigurationEntry = ConfigurationColumn | ConfigurationGroup;\n\nexport function isConfigurationGroup(entry: ConfigurationEntry): entry is ConfigurationGroup {\n return 'columns' in entry && Array.isArray(entry.columns);\n}\n\nexport interface TablePublicApi<TItem extends DataGridItem = DataGridItem> {\n registerTableSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;\n registerExtraColumn: (options: ExtraColumnOption) => void;\n updateExtraColumnWidth: (columnId: string, width: string) => void;\n updateExtraColumnOrder: (columnId: string, order: number) => void;\n updateExtraColumnSticky: (columnId: string, sticky: boolean) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- `ComponentType<never>` would refuse a class component\n registerComponent: (name: TableComponentName, component: ComponentType<any>) => void;\n updateColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => void;\n updateColumnVisibility: (columnId: string, visible: boolean) => void;\n updateColumnSticky: (id: string, sticky: boolean) => void;\n updateTableLayout: (tableLayout: DataGridTableLayout) => void;\n updateStickyHeader: (stickyHeader: boolean) => void;\n}\n\nexport interface TableService<\n TItem extends DataGridItem = DataGridItem,\n> extends TablePublicApi<TItem> {\n registerSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;\n useSlots: <T extends TableSlotName>(name: T) => TableSlot[];\n\n useComponent: <TProps = unknown>(name: TableComponentName) => ComponentType<TProps>;\n\n useExtraColumns: (position: ExtraColumnPosition) => ExtraColumn[];\n\n initializeColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {\n columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];\n flatColumns: DataGridTableColumn<TItem>[];\n columnVisibility: Map<string, boolean>;\n };\n useVisibleColumns: () => DataGridTableColumn<TItem>[];\n\n initializeStickyState: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {\n columnSticky: Map<string, boolean>;\n groupSticky: Map<string, boolean>;\n };\n getOrderedColumnsWithSticky: (\n visibleColumns: DataGridTableColumn<TItem>[],\n columnSticky: Map<string, boolean>,\n ) => DataGridTableColumn<TItem>[];\n onResizeColumn: (columnId: string, width: number) => void;\n isColumnSticky: (columnId: string) => boolean;\n isGroupSticky: (groupId: string) => boolean;\n useColumnStickyOffset: (columnId: string) => number | undefined;\n useColumnEndStickyOffset: (columnId: string) => number | undefined;\n useGroupStickyOffset: (groupId: string) => number | undefined;\n\n useHasGroups: () => boolean;\n useFirstRowHeaderCells: () => TableHeaderCell<TItem>[];\n useSecondRowHeaderColumns: () => DataGridTableColumn<TItem>[];\n\n useConfigurationColumns: () => ConfigurationEntry[];\n useTableLayout: () => DataGridTableLayout;\n useStickyHeader: () => boolean;\n\n /**\n * Measured pixel width for a `tableLayout=\"auto\"` column with `width: 'min-content'` -- see\n * `table-min-content-width.ts` and `DataGridHeaderCell`'s measurement effect.\n */\n useMinContentWidth: (columnId: string) => number | undefined;\n setMinContentWidth: (columnId: string, width: number) => void;\n}\n","import { useEffect, useRef } from 'react';\n\n/** A ref that always holds the value of the latest committed render. */\nexport function useLatest<T>(value: T) {\n const ref = useRef<T>(value);\n\n // Written in an effect, not during render: React does not recommend mutating a ref while\n // rendering. https://react.dev/reference/react/useRef#caveats\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref;\n}\n","/*\n * The grid's hook bus: sync, serial and parallel calls. Plugins depend on these semantics:\n *\n * - a handler list is copied when a hook is called, so a handler may unsubscribe itself (or\n * register another) while the hook runs without changing this run;\n * - `callHook` starts handlers one after another, each only after the previous one settled;\n * - `callHookParallel` starts them all in one synchronous pass, so a handler that throws\n * synchronously throws out of the call instead of rejecting its promise;\n * - every call resolves to the array of the handlers' return values, in registration order.\n */\n\ntype HookName<THooks> = keyof THooks & string;\n\ntype HookArgs<THooks, Name extends keyof THooks> = THooks[Name] extends (\n ...args: infer Args\n) => unknown\n ? Args\n : never;\n\ntype HookReturn<THooks, Name extends keyof THooks> = THooks[Name] extends (\n ...args: never[]\n) => infer Return\n ? Return\n : never;\n\nexport type HookFn<THooks, Name extends keyof THooks> = (\n ...args: HookArgs<THooks, Name>\n) => HookReturn<THooks, Name> | Promise<HookReturn<THooks, Name>>;\n\nexport interface Hooked<THooks> {\n /** Registers a handler. Returns the function that removes it again. */\n hook: <Name extends HookName<THooks>>(name: Name, fn: HookFn<THooks, Name>) => () => void;\n /** Runs the handlers one after another, each after the previous one settled. */\n callHook: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => Promise<HookReturn<THooks, Name>[]>;\n /** Runs all the handlers at once. */\n callHookParallel: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => Promise<HookReturn<THooks, Name>[]>;\n /** Runs the handlers synchronously and returns their results. */\n callHookSync: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => HookReturn<THooks, Name>[];\n}\n\ntype Handler = (...args: unknown[]) => unknown;\n\nexport function createHooked<THooks>(): Hooked<THooks> {\n const handlers = new Map<string, Handler[]>();\n\n return { hook, callHook, callHookParallel, callHookSync };\n\n function hook<Name extends HookName<THooks>>(name: Name, fn: HookFn<THooks, Name>) {\n if (!name || typeof fn !== 'function') {\n return () => {};\n }\n\n // The one cast of this module: the map has to hold handlers of every hook name, so their\n // parameter lists cannot stay typed. The public signatures above are what callers see.\n const handler = fn as Handler;\n const list = handlers.get(name) ?? [];\n list.push(handler);\n handlers.set(name, list);\n\n return () => {\n const current = handlers.get(name);\n if (!current) return;\n\n const index = current.indexOf(handler);\n if (index !== -1) current.splice(index, 1);\n if (current.length === 0) handlers.delete(name);\n };\n }\n\n function snapshot(name: string): Handler[] {\n return [...(handlers.get(name) ?? [])];\n }\n\n function callHook<Name extends HookName<THooks>>(name: Name, ...args: HookArgs<THooks, Name>) {\n const started = snapshot(name).reduce<Promise<unknown>[]>((chain, fn) => {\n const previous = chain[chain.length - 1] ?? Promise.resolve();\n return [...chain, previous.then(() => fn(...args))];\n }, []);\n\n return Promise.all(started) as Promise<HookReturn<THooks, Name>[]>;\n }\n\n function callHookParallel<Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) {\n return Promise.all(snapshot(name).map((fn) => fn(...args))) as Promise<\n HookReturn<THooks, Name>[]\n >;\n }\n\n function callHookSync<Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) {\n return snapshot(name).map((fn) => fn(...args)) as HookReturn<THooks, Name>[];\n }\n}\n"],"names":["isTableGroup","item","isConfigurationGroup","entry","useLatest","value","ref","useRef","useEffect","createHooked","handlers","hook","callHook","callHookParallel","callHookSync","name","fn","handler","list","current","index","snapshot","args","started","chain","previous"],"mappings":";AAmFO,SAASA,EACdC,GACmC;AACnC,SAAO,aAAaA,KAAQ,MAAM,QAAQA,EAAK,OAAO;AACxD;AA8HO,SAASC,EAAqBC,GAAwD;AAC3F,SAAO,aAAaA,KAAS,MAAM,QAAQA,EAAM,OAAO;AAC1D;ACpNO,SAASC,EAAaC,GAAU;AACrC,QAAMC,IAAMC,EAAUF,CAAK;AAI3B,SAAAG,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC,GAEHC;AACT;ACsCO,SAASG,IAAuC;AACrD,QAAMC,wBAAe,IAAA;AAErB,SAAO,EAAE,MAAAC,GAAM,UAAAC,GAAU,kBAAAC,GAAkB,cAAAC,EAAA;AAE3C,WAASH,EAAoCI,GAAYC,GAA0B;AACjF,QAAI,CAACD,KAAQ,OAAOC,KAAO;AACzB,aAAO,MAAM;AAAA,MAAC;AAKhB,UAAMC,IAAUD,GACVE,IAAOR,EAAS,IAAIK,CAAI,KAAK,CAAA;AACnC,WAAAG,EAAK,KAAKD,CAAO,GACjBP,EAAS,IAAIK,GAAMG,CAAI,GAEhB,MAAM;AACX,YAAMC,IAAUT,EAAS,IAAIK,CAAI;AACjC,UAAI,CAACI,EAAS;AAEd,YAAMC,IAAQD,EAAQ,QAAQF,CAAO;AACrC,MAAIG,MAAU,MAAID,EAAQ,OAAOC,GAAO,CAAC,GACrCD,EAAQ,WAAW,KAAGT,EAAS,OAAOK,CAAI;AAAA,IAChD;AAAA,EACF;AAEA,WAASM,EAASN,GAAyB;AACzC,WAAO,CAAC,GAAIL,EAAS,IAAIK,CAAI,KAAK,CAAA,CAAG;AAAA,EACvC;AAEA,WAASH,EAAwCG,MAAeO,GAA8B;AAC5F,UAAMC,IAAUF,EAASN,CAAI,EAAE,OAA2B,CAACS,GAAOR,MAAO;AACvE,YAAMS,IAAWD,EAAMA,EAAM,SAAS,CAAC,KAAK,QAAQ,QAAA;AACpD,aAAO,CAAC,GAAGA,GAAOC,EAAS,KAAK,MAAMT,EAAG,GAAGM,CAAI,CAAC,CAAC;AAAA,IACpD,GAAG,CAAA,CAAE;AAEL,WAAO,QAAQ,IAAIC,CAAO;AAAA,EAC5B;AAEA,WAASV,EACPE,MACGO,GACH;AACA,WAAO,QAAQ,IAAID,EAASN,CAAI,EAAE,IAAI,CAACC,MAAOA,EAAG,GAAGM,CAAI,CAAC,CAAC;AAAA,EAG5D;AAEA,WAASR,EACPC,MACGO,GACH;AACA,WAAOD,EAASN,CAAI,EAAE,IAAI,CAACC,MAAOA,EAAG,GAAGM,CAAI,CAAC;AAAA,EAC/C;AACF;"}
1
+ {"version":3,"file":"hooked.js","sources":["../../src/components/data-grid/utils/use-latest.ts","../../src/components/data-grid/utils/hooked.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\n/** A ref that always holds the value of the latest committed render. */\nexport function useLatest<T>(value: T) {\n const ref = useRef<T>(value);\n\n // Written in an effect, not during render: React does not recommend mutating a ref while\n // rendering. https://react.dev/reference/react/useRef#caveats\n useEffect(() => {\n ref.current = value;\n }, [value]);\n\n return ref;\n}\n","/*\n * The grid's hook bus: sync, serial and parallel calls. Plugins depend on these semantics:\n *\n * - a handler list is copied when a hook is called, so a handler may unsubscribe itself (or\n * register another) while the hook runs without changing this run;\n * - `callHook` starts handlers one after another, each only after the previous one settled;\n * - `callHookParallel` starts them all in one synchronous pass, so a handler that throws\n * synchronously throws out of the call instead of rejecting its promise;\n * - every call resolves to the array of the handlers' return values, in registration order.\n */\n\ntype HookName<THooks> = keyof THooks & string;\n\ntype HookArgs<THooks, Name extends keyof THooks> = THooks[Name] extends (\n ...args: infer Args\n) => unknown\n ? Args\n : never;\n\ntype HookReturn<THooks, Name extends keyof THooks> = THooks[Name] extends (\n ...args: never[]\n) => infer Return\n ? Return\n : never;\n\nexport type HookFn<THooks, Name extends keyof THooks> = (\n ...args: HookArgs<THooks, Name>\n) => HookReturn<THooks, Name> | Promise<HookReturn<THooks, Name>>;\n\nexport interface Hooked<THooks> {\n /** Registers a handler. Returns the function that removes it again. */\n hook: <Name extends HookName<THooks>>(name: Name, fn: HookFn<THooks, Name>) => () => void;\n /** Runs the handlers one after another, each after the previous one settled. */\n callHook: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => Promise<HookReturn<THooks, Name>[]>;\n /** Runs all the handlers at once. */\n callHookParallel: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => Promise<HookReturn<THooks, Name>[]>;\n /** Runs the handlers synchronously and returns their results. */\n callHookSync: <Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) => HookReturn<THooks, Name>[];\n}\n\ntype Handler = (...args: unknown[]) => unknown;\n\nexport function createHooked<THooks>(): Hooked<THooks> {\n const handlers = new Map<string, Handler[]>();\n\n return { hook, callHook, callHookParallel, callHookSync };\n\n function hook<Name extends HookName<THooks>>(name: Name, fn: HookFn<THooks, Name>) {\n if (!name || typeof fn !== 'function') {\n return () => {};\n }\n\n // The one cast of this module: the map has to hold handlers of every hook name, so their\n // parameter lists cannot stay typed. The public signatures above are what callers see.\n const handler = fn as Handler;\n const list = handlers.get(name) ?? [];\n list.push(handler);\n handlers.set(name, list);\n\n return () => {\n const current = handlers.get(name);\n if (!current) return;\n\n const index = current.indexOf(handler);\n if (index !== -1) current.splice(index, 1);\n if (current.length === 0) handlers.delete(name);\n };\n }\n\n function snapshot(name: string): Handler[] {\n return [...(handlers.get(name) ?? [])];\n }\n\n function callHook<Name extends HookName<THooks>>(name: Name, ...args: HookArgs<THooks, Name>) {\n const started = snapshot(name).reduce<Promise<unknown>[]>((chain, fn) => {\n const previous = chain[chain.length - 1] ?? Promise.resolve();\n return [...chain, previous.then(() => fn(...args))];\n }, []);\n\n return Promise.all(started) as Promise<HookReturn<THooks, Name>[]>;\n }\n\n function callHookParallel<Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) {\n return Promise.all(snapshot(name).map((fn) => fn(...args))) as Promise<\n HookReturn<THooks, Name>[]\n >;\n }\n\n function callHookSync<Name extends HookName<THooks>>(\n name: Name,\n ...args: HookArgs<THooks, Name>\n ) {\n return snapshot(name).map((fn) => fn(...args)) as HookReturn<THooks, Name>[];\n }\n}\n"],"names":["useLatest","value","ref","useRef","useEffect","createHooked","handlers","hook","callHook","callHookParallel","callHookSync","name","fn","handler","list","current","index","snapshot","args","started","chain","previous"],"mappings":";AAGO,SAASA,EAAaC,GAAU;AACrC,QAAMC,IAAMC,EAAUF,CAAK;AAI3B,SAAAG,EAAU,MAAM;AACd,IAAAF,EAAI,UAAUD;AAAA,EAChB,GAAG,CAACA,CAAK,CAAC,GAEHC;AACT;ACsCO,SAASG,IAAuC;AACrD,QAAMC,wBAAe,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ACF;"}
@@ -0,0 +1,5 @@
1
+ const o = "data-grid-row-ignore-click";
2
+ export {
3
+ o as I
4
+ };
5
+ //# sourceMappingURL=ignore-row-click.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignore-row-click.js","sources":["../../src/components/data-grid/services/table/ignore-row-click.ts"],"sourcesContent":["/*\n * Marks a cell that a plugin reacting to row clicks must not treat as a row click. It lives in the\n * core because the cell renderer stamps it, and the core's entry must not import a plugin to do\n * that (see `services/layout/layout-slot-ids.ts` for the same split).\n */\nexport const IGNORE_CLICK_ATTRIBUTE = 'data-grid-row-ignore-click';\n"],"names":["IGNORE_CLICK_ATTRIBUTE"],"mappings":"AAKO,MAAMA,IAAyB;"}
@@ -1,4 +1,4 @@
1
- const a = {
1
+ const o = {
2
2
  emptyState: {
3
3
  noResultsFound: "No results found",
4
4
  noResultsFoundDescription: "Try adjusting your search or filters"
@@ -27,13 +27,29 @@ const a = {
27
27
  ascDate: "Oldest first",
28
28
  descDate: "Newest first"
29
29
  },
30
+ actionsMenu: {
31
+ actions: "Actions"
32
+ },
33
+ tableConfiguration: {
34
+ header: "Table configuration",
35
+ configureColumns: "Configure columns",
36
+ pinColumn: "Pin column",
37
+ unpinColumn: "Unpin column"
38
+ },
39
+ rowSelect: {
40
+ itemsSelected: (e) => e === 1 ? "1 item selected" : `${e} items selected`,
41
+ pageSelected: (e) => e === 1 ? "1 item on this page is selected." : `All ${e} items on this page are selected.`,
42
+ selectAll: (e) => `Select all ${e}`,
43
+ allSelected: (e) => e === 1 ? "1 item is selected." : `All ${e} items are selected.`,
44
+ clearSelection: "Clear selection"
45
+ },
30
46
  pagination: {
31
47
  ariaLabel: "Pagination",
32
48
  limitSelectorAriaLabel: "Items per page",
33
49
  previousPage: "Previous page",
34
50
  nextPage: "Next page",
35
51
  goToPage: (e) => `Go to page ${e}`,
36
- pageInfo: (e, o, r) => `Page ${e} of ${o} (${r} items)`
52
+ pageInfo: (e, l, t) => `Page ${e} of ${l} (${t} items)`
37
53
  },
38
54
  filters: {
39
55
  allFilters: "All filters",
@@ -52,6 +68,6 @@ const a = {
52
68
  }
53
69
  };
54
70
  export {
55
- a as m
71
+ o as m
56
72
  };
57
73
  //# sourceMappingURL=messages.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sources":["../../src/components/data-grid/messages.ts"],"sourcesContent":["/*\n * Every user-facing string the grid renders, in one place. The kit has no i18n layer, so these are\n * English literals; one module keeps them findable and lets the tests assert against `messages.*`\n * instead of repeating the text. A string that embeds a count or a name is a function of it.\n */\nexport const messages = {\n emptyState: {\n noResultsFound: 'No results found',\n noResultsFoundDescription: 'Try adjusting your search or filters',\n },\n loadError: {\n headerDefault: 'Something went wrong',\n bodyDefault: 'An error occurred while loading',\n },\n layoutMainSlotSelector: {\n table: 'Table view',\n cards: 'Cards view',\n },\n textSearch: {\n placeholder: 'Search...',\n clear: 'Clear input',\n },\n order: {\n sort: 'Sort',\n sortBy: 'Sort by',\n order: 'Order',\n changeSorting: (columnLabel: string) => `Change sorting of '${columnLabel}' column`,\n ascString: 'A-Z',\n descString: 'Z-A',\n ascNumber: '0-9',\n descNumber: '9-0',\n ascDate: 'Oldest first',\n descDate: 'Newest first',\n },\n pagination: {\n ariaLabel: 'Pagination',\n limitSelectorAriaLabel: 'Items per page',\n previousPage: 'Previous page',\n nextPage: 'Next page',\n goToPage: (page: number) => `Go to page ${page}`,\n pageInfo: (page: number, totalPages: number, total: number) =>\n `Page ${page} of ${totalPages} (${total} items)`,\n },\n filters: {\n allFilters: 'All filters',\n allFiltersTitle: 'All filters',\n apply: 'Apply',\n reset: 'Reset',\n searchPlaceholder: 'Search...',\n noOptionsFound: 'No options found',\n close: 'Close',\n closeDialog: 'Close dialog',\n },\n tree: {\n noItems: 'No items',\n collapse: 'Collapse',\n expand: 'Expand',\n },\n};\n"],"names":["messages","columnLabel","page","totalPages","total"],"mappings":"AAKO,MAAMA,IAAW;AAAA,EACtB,YAAY;AAAA,IACV,gBAAgB;AAAA,IAChB,2BAA2B;AAAA,EAAA;AAAA,EAE7B,WAAW;AAAA,IACT,eAAe;AAAA,IACf,aAAa;AAAA,EAAA;AAAA,EAEf,wBAAwB;AAAA,IACtB,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,YAAY;AAAA,IACV,aAAa;AAAA,IACb,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,eAAe,CAACC,MAAwB,sBAAsBA,CAAW;AAAA,IACzE,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,SAAS;AAAA,IACT,UAAU;AAAA,EAAA;AAAA,EAEZ,YAAY;AAAA,IACV,WAAW;AAAA,IACX,wBAAwB;AAAA,IACxB,cAAc;AAAA,IACd,UAAU;AAAA,IACV,UAAU,CAACC,MAAiB,cAAcA,CAAI;AAAA,IAC9C,UAAU,CAACA,GAAcC,GAAoBC,MAC3C,QAAQF,CAAI,OAAOC,CAAU,KAAKC,CAAK;AAAA,EAAA;AAAA,EAE3C,SAAS;AAAA,IACP,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,OAAO;AAAA,IACP,aAAa;AAAA,EAAA;AAAA,EAEf,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,EAAA;AAEZ;"}
1
+ {"version":3,"file":"messages.js","sources":["../../src/components/data-grid/messages.ts"],"sourcesContent":["/*\n * Every user-facing string the grid renders, in one place. The kit has no i18n layer, so these are\n * English literals; one module keeps them findable and lets the tests assert against `messages.*`\n * instead of repeating the text. A string that embeds a count or a name is a function of it.\n */\nexport const messages = {\n emptyState: {\n noResultsFound: 'No results found',\n noResultsFoundDescription: 'Try adjusting your search or filters',\n },\n loadError: {\n headerDefault: 'Something went wrong',\n bodyDefault: 'An error occurred while loading',\n },\n layoutMainSlotSelector: {\n table: 'Table view',\n cards: 'Cards view',\n },\n textSearch: {\n placeholder: 'Search...',\n clear: 'Clear input',\n },\n order: {\n sort: 'Sort',\n sortBy: 'Sort by',\n order: 'Order',\n changeSorting: (columnLabel: string) => `Change sorting of '${columnLabel}' column`,\n ascString: 'A-Z',\n descString: 'Z-A',\n ascNumber: '0-9',\n descNumber: '9-0',\n ascDate: 'Oldest first',\n descDate: 'Newest first',\n },\n actionsMenu: {\n actions: 'Actions',\n },\n tableConfiguration: {\n header: 'Table configuration',\n configureColumns: 'Configure columns',\n pinColumn: 'Pin column',\n unpinColumn: 'Unpin column',\n },\n rowSelect: {\n itemsSelected: (count: number) => (count === 1 ? '1 item selected' : `${count} items selected`),\n pageSelected: (count: number) =>\n count === 1 ? '1 item on this page is selected.' : `All ${count} items on this page are selected.`,\n selectAll: (count: number) => `Select all ${count}`,\n allSelected: (count: number) =>\n count === 1 ? '1 item is selected.' : `All ${count} items are selected.`,\n clearSelection: 'Clear selection',\n },\n pagination: {\n ariaLabel: 'Pagination',\n limitSelectorAriaLabel: 'Items per page',\n previousPage: 'Previous page',\n nextPage: 'Next page',\n goToPage: (page: number) => `Go to page ${page}`,\n pageInfo: (page: number, totalPages: number, total: number) =>\n `Page ${page} of ${totalPages} (${total} items)`,\n },\n filters: {\n allFilters: 'All filters',\n allFiltersTitle: 'All filters',\n apply: 'Apply',\n reset: 'Reset',\n searchPlaceholder: 'Search...',\n noOptionsFound: 'No options found',\n close: 'Close',\n closeDialog: 'Close dialog',\n },\n tree: {\n noItems: 'No items',\n collapse: 'Collapse',\n expand: 'Expand',\n },\n};\n"],"names":["messages","columnLabel","count","page","totalPages","total"],"mappings":"AAKO,MAAMA,IAAW;AAAA,EACtB,YAAY;AAAA,IACV,gBAAgB;AAAA,IAChB,2BAA2B;AAAA,EAAA;AAAA,EAE7B,WAAW;AAAA,IACT,eAAe;AAAA,IACf,aAAa;AAAA,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MAAM;AAAA,IACJ,SAAS;AAAA,IACT,UAAU;AAAA,IACV,QAAQ;AAAA,EAAA;AAEZ;"}
@@ -0,0 +1 @@
1
+ ._cell_r09j0_2:first-child{border-inline-start:var(--_data-grid-table-group-border, 0 solid transparent)}._cell_r09j0_2:last-child{border-inline-end:var(--_data-grid-table-group-border, 0 solid transparent)}._contentRow_r09j0_11{display:flex;align-items:center;inline-size:min-content;min-block-size:var(--space-6)}[data-overflow=nowrap] ._contentRow_r09j0_11,[data-capped] ._contentRow_r09j0_11{max-inline-size:100%}[data-overflow=wrap] ._contentRow_r09j0_11,[data-header-fill] ._contentRow_r09j0_11{inline-size:100%}[data-header-fill] ._content_r09j0_10{flex:1 1 auto}._content_r09j0_10{display:block;min-inline-size:0;white-space:normal}[data-overflow=nowrap] ._content_r09j0_10{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-inline-size:var(--_data-grid-col-max, none)}[data-capped][data-overflow=wrap] ._content_r09j0_10{max-inline-size:var(--_data-grid-col-max, none);overflow-wrap:anywhere}._endSlot_r09j0_10{display:flex;flex-shrink:0;align-items:center;gap:var(--space-1)}._endSlot_r09j0_10:not(:empty){margin-inline-start:var(--space-1)}
@@ -0,0 +1,140 @@
1
+ import { jsx as l, jsxs as $, Fragment as N } from "react/jsx-runtime";
2
+ import { u as v } from "./table-context.js";
3
+ import { cx as R } from "class-variance-authority";
4
+ import { I as V } from "./ignore-row-click.js";
5
+ import { TableHead as z, TableCell as T } from "../table.js";
6
+ import './resolve-body-cell-props.DGczzk1U.css';const j = "_cell_r09j0_2", D = "_contentRow_r09j0_11", E = "_content_r09j0_10", O = "_endSlot_r09j0_10", a = {
7
+ cell: j,
8
+ contentRow: D,
9
+ content: E,
10
+ endSlot: O
11
+ };
12
+ function W(e) {
13
+ if (e != null)
14
+ return typeof e == "number" ? `${e}px` : isNaN(Number(e)) ? e : `${e}px`;
15
+ }
16
+ function A({
17
+ columnId: e,
18
+ rowspan: i,
19
+ className: n,
20
+ style: t,
21
+ width: o,
22
+ children: r,
23
+ header: s,
24
+ endSlot: c,
25
+ overflow: d,
26
+ capped: C,
27
+ title: x,
28
+ contentRowRef: b,
29
+ fillContent: g,
30
+ ignoreRowClick: k
31
+ }) {
32
+ const f = v(), p = f.useColumnStickyOffset(e), u = f.useColumnEndStickyOffset(e), m = p !== void 0, y = u !== void 0, S = /* @__PURE__ */ l("span", { className: a.content, children: r }), I = s ? z : T, h = W(o);
33
+ return /* @__PURE__ */ l(
34
+ I,
35
+ {
36
+ "data-column-id": e,
37
+ "data-overflow": d,
38
+ "data-capped": C || void 0,
39
+ "data-header-fill": g || void 0,
40
+ ...k && { [V]: "" },
41
+ title: x,
42
+ className: R(a.cell, n),
43
+ pinned: m || y,
44
+ style: {
45
+ ...t,
46
+ ...h ? { width: h } : {},
47
+ ...m ? { insetInlineStart: `${p}px` } : {},
48
+ ...y ? { insetInlineEnd: `${u}px` } : {}
49
+ },
50
+ scope: s ? "col" : void 0,
51
+ rowSpan: i,
52
+ children: c ? /* @__PURE__ */ $("span", { className: a.contentRow, ref: b, children: [
53
+ S,
54
+ /* @__PURE__ */ l("span", { className: a.endSlot, children: c })
55
+ ] }) : S
56
+ }
57
+ );
58
+ }
59
+ function J({
60
+ position: e
61
+ }) {
62
+ const n = v().useExtraColumns(e);
63
+ return /* @__PURE__ */ l(N, { children: n.map((t) => /* @__PURE__ */ l(
64
+ A,
65
+ {
66
+ columnId: t.id,
67
+ width: t.width,
68
+ ignoreRowClick: t.ignoreRowClick,
69
+ children: t.body ? /* @__PURE__ */ l(t.body, {}) : null
70
+ },
71
+ t.id
72
+ )) });
73
+ }
74
+ const G = "--_data-grid-col-max";
75
+ function w(e) {
76
+ return typeof e == "string" && e.trim().endsWith("%");
77
+ }
78
+ function _(e) {
79
+ return typeof e == "number" ? `${e}px` : /^-?\d+(\.\d+)?$/.test(e.trim()) ? `${e}px` : e;
80
+ }
81
+ function L(e, i, n) {
82
+ return i === "auto" ? M(e, n) : B(e, n);
83
+ }
84
+ function B(e, i) {
85
+ const t = (e.width === "min-content" ? i : e.width) ?? e.minWidth ?? e.maxWidth;
86
+ if (t === void 0) return { headerStyle: {}, contentVars: {}, isCapped: !1 };
87
+ if (w(t))
88
+ return { headerStyle: { inlineSize: t }, contentVars: {}, isCapped: !1 };
89
+ const o = _(t);
90
+ return {
91
+ headerStyle: { width: o, minInlineSize: o },
92
+ contentVars: {},
93
+ isCapped: !1
94
+ };
95
+ }
96
+ function M(e, i) {
97
+ const { width: n, minWidth: t, maxWidth: o } = e, r = {};
98
+ if (n !== void 0)
99
+ if (n === "min-content" && i !== void 0) {
100
+ const d = `${o !== void 0 ? Math.min(i, o) : i}px`;
101
+ r.width = d, r.minInlineSize = d;
102
+ } else if (w(n))
103
+ r.inlineSize = n;
104
+ else {
105
+ const c = _(n);
106
+ r.width = c, r.minInlineSize = c;
107
+ }
108
+ t !== void 0 && (r.minInlineSize = `${t}px`);
109
+ const s = {};
110
+ return o !== void 0 && (n === void 0 && (r.width = `${o}px`), s[G] = `${o}px`), { headerStyle: r, contentVars: s, isCapped: o !== void 0 };
111
+ }
112
+ function Q(e) {
113
+ return typeof e == "function" ? e() : e;
114
+ }
115
+ function F(e, i) {
116
+ return i.split(".").reduce((n, t) => {
117
+ if (n != null && typeof n == "object")
118
+ return n[t];
119
+ }, e);
120
+ }
121
+ function H(e, i) {
122
+ if (e.render || e.component) return;
123
+ const n = e.key ?? e.id, t = n.includes(".") ? F(i, n) : i[n];
124
+ return e.formatter ? e.formatter(t) : t != null ? String(t) : "";
125
+ }
126
+ function Y(e, i, n) {
127
+ const t = e.cellOverflow ?? "wrap", { contentVars: o, isCapped: r } = L(e, n), s = t === "nowrap" ? H(e, i) : void 0;
128
+ return { style: o, overflow: t, capped: r, title: s || void 0 };
129
+ }
130
+ export {
131
+ J as D,
132
+ Q as a,
133
+ Y as b,
134
+ A as c,
135
+ L as d,
136
+ F as g,
137
+ H as r,
138
+ a as s
139
+ };
140
+ //# sourceMappingURL=resolve-body-cell-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-body-cell-props.js","sources":["../../src/components/data-grid/services/table/components/data-grid-cell.tsx","../../src/components/data-grid/services/table/components/data-grid-extra-body-columns.tsx","../../src/components/data-grid/services/table/resolve-column-style.ts","../../src/components/data-grid/services/table/table-helpers.ts","../../src/components/data-grid/services/table/resolve-body-cell-props.ts"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from 'react';\nimport { cx } from 'class-variance-authority';\nimport { TableCell, TableHead } from '../../../../table/public.js';\nimport type { DataGridItem } from '../../../data-grid-types';\nimport { IGNORE_CLICK_ATTRIBUTE } from '../ignore-row-click';\nimport { useTableService } from '../table-context';\nimport type { DataGridTableColumnOverflow } from '../table-types';\nimport styles from './data-grid-cell.module.css';\n\ninterface DataGridCellProps {\n columnId: string;\n rowspan?: number;\n className?: string;\n style?: CSSProperties;\n width?: string | number;\n children?: ReactNode;\n /** Renders a column header (`<th>`) instead of a body cell (`<td>`). */\n header?: boolean;\n /**\n * Rendered after the overflow-controlled content, outside its clipping contract — used by\n * header cells for the sort-icon / header-cell-end slot, which must stay visible even when the\n * label ellipsizes. Body cells don't pass this.\n */\n endSlot?: ReactNode;\n /** Drives the shared `data-overflow` attribute that both header and body overflow CSS key off. */\n overflow?: DataGridTableColumnOverflow;\n /**\n * Whether `resolveColumnStyle` resolved a real, active `maxWidth` cap for this column (only\n * possible under `tableLayout=\"auto\"`). Drives `data-capped`, which the overflow CSS uses to\n * enforce the cap for `wrap` too -- `nowrap` already reads the cap var directly (mode-agnostic)\n * -- so the column never grows past `maxWidth` regardless of how it wraps.\n */\n capped?: boolean;\n title?: string;\n /**\n * Ref onto the `.contentRow` wrapper -- used by `DataGridHeaderCell` to measure a\n * `width: 'min-content'` column's natural content width, under either `tableLayout` (its own\n * `inline-size: min-content` CSS below makes it shrink-wrap regardless of whatever width the\n * `<th>` itself ends up with, so it's a safe, unstretched measurement target -- see\n * `DataGridHeaderCell` for the ResizeObserver that reads it). Only rendered when `endSlot` is\n * passed, which header cells always do; body cells never pass this ref.\n */\n contentRowRef?: Ref<HTMLSpanElement>;\n /**\n * Whether this header cell's content should fill `.contentRow` instead of shrink-wrapping it,\n * via `data-header-fill` (see data-grid-cell.module.css). Set by `DataGridHeaderCell` only for a\n * custom `headerComponent` (e.g. a select-all checkbox) on a non-min-content column -- that kind\n * of header needs to fill/center like a body cell rather than hug its own min-content width the\n * way a default text label does. Body cells and min-content columns never set this (a min-content\n * column's `.contentRow` doubles as its ResizeObserver measurement target and must keep\n * shrink-wrapping).\n */\n fillContent?: boolean;\n /**\n * When `true`, stamps `data-grid-row-ignore-click` onto the cell element so a plugin that reacts\n * to row clicks can skip clicks anywhere in the cell. Set by extra columns that opt out of row\n * clicks (e.g. a column holding a checkbox).\n */\n ignoreRowClick?: boolean;\n}\n\n// A bare number, or a string holding one, is a pixel width; anything else (`%`, `rem`) is already\n// a CSS length.\nfunction normalizeWidth(width: string | number | undefined): string | undefined {\n if (width == null) return undefined;\n if (typeof width === 'number') return `${width}px`;\n return !isNaN(Number(width)) ? `${width}px` : width;\n}\n\nexport function DataGridCell<TItem extends DataGridItem = DataGridItem>({\n columnId,\n rowspan,\n className,\n style,\n width,\n children,\n header,\n endSlot,\n overflow,\n capped,\n title,\n contentRowRef,\n fillContent,\n ignoreRowClick,\n}: DataGridCellProps) {\n const tableService = useTableService<TItem>();\n\n const stickyOffset = tableService.useColumnStickyOffset(columnId);\n const endStickyOffset = tableService.useColumnEndStickyOffset(columnId);\n\n const isSticky = stickyOffset !== undefined;\n // Extra columns are never in the table's own sticky map, so a pinned `end` column can only ever\n // be one of these two, never both -- it pins to the opposite edge and stays out of the\n // start-side run rather than being parked against it.\n const isStickyEnd = endStickyOffset !== undefined;\n\n const content = <span className={styles.content}>{children}</span>;\n const Cell = header ? TableHead : TableCell;\n const normalizedWidth = normalizeWidth(width);\n\n return (\n <Cell\n data-column-id={columnId}\n data-overflow={overflow}\n data-capped={capped || undefined}\n data-header-fill={fillContent || undefined}\n {...(ignoreRowClick && { [IGNORE_CLICK_ATTRIBUTE]: '' })}\n title={title}\n className={cx(styles.cell, className)}\n pinned={isSticky || isStickyEnd}\n style={{\n ...style,\n ...(normalizedWidth ? { width: normalizedWidth } : {}),\n ...(isSticky ? { insetInlineStart: `${stickyOffset}px` } : {}),\n ...(isStickyEnd ? { insetInlineEnd: `${endStickyOffset}px` } : {}),\n }}\n scope={header ? 'col' : undefined}\n rowSpan={rowspan}\n >\n {endSlot ? (\n <span className={styles.contentRow} ref={contentRowRef}>\n {content}\n <span className={styles.endSlot}>{endSlot}</span>\n </span>\n ) : (\n content\n )}\n </Cell>\n );\n}\n","import type { DataGridItem } from '../../../data-grid-types';\nimport { useTableService } from '../table-context';\nimport type { ExtraColumnPosition } from '../table-types';\nimport { DataGridCell } from './data-grid-cell';\n\ninterface DataGridExtraBodyColumnsProps {\n position: ExtraColumnPosition;\n}\n\nexport function DataGridExtraBodyColumns<TItem extends DataGridItem = DataGridItem>({\n position,\n}: DataGridExtraBodyColumnsProps) {\n const tableService = useTableService<TItem>();\n const extraColumns = tableService.useExtraColumns(position);\n\n return (\n <>\n {extraColumns.map((extra) => (\n <DataGridCell\n key={extra.id}\n columnId={extra.id}\n width={extra.width}\n ignoreRowClick={extra.ignoreRowClick}\n >\n {extra.body ? <extra.body /> : null}\n </DataGridCell>\n ))}\n </>\n );\n}\n","import type { CSSProperties } from 'react';\nimport type { DataGridItem } from '../../data-grid-types';\nimport type { DataGridTableColumn, DataGridTableLayout } from './table-types';\n\n/**\n * Internal CSS var carrying the `tableLayout=\"auto\"` `maxWidth` cap into the per-row content-cap\n * wrapper (`DataGridCell`'s `.content` span). Not documented as public API.\n */\nexport const DATA_GRID_COLUMN_MAX_WIDTH_VAR = '--_data-grid-col-max';\n\nexport interface ResolvedColumnStyle {\n /**\n * `width`/`minWidth`/`maxWidth` mapped to CSS for the header `<th>`. Body cells intentionally\n * receive no box sizing from this — width lives on the header only, since the table already\n * shares one track per column.\n */\n headerStyle: CSSProperties;\n /**\n * Content-cap CSS var(s) needed by the per-row overflow wrapper. Applied on both header and\n * body cells: a CSS custom property set via inline style on one row's `<td>` does not reach a\n * sibling row's `<td>` for the same column, so each row needs its own copy.\n */\n contentVars: CSSProperties;\n /**\n * Whether `maxWidth` is a real, active cap (`tableLayout=\"auto\"` with `maxWidth` set) that the\n * content wrapper's CSS must enforce regardless of overflow mode — `nowrap` reads the cap var\n * directly (mode-agnostic), `wrap` needs this flag to also force word-breaking, so the column\n * never grows past the cap. Always `false` under `tableLayout=\"fixed\"`, where `maxWidth`\n * aliases into the shared track instead.\n */\n isCapped: boolean;\n}\n\ntype ColumnWidthProps<TItem extends DataGridItem> = Pick<\n DataGridTableColumn<TItem>,\n 'width' | 'minWidth' | 'maxWidth'\n>;\n\nfunction isPercent(value: number | string): value is string {\n return typeof value === 'string' && value.trim().endsWith('%');\n}\n\nfunction toLength(value: number | string): string {\n if (typeof value === 'number') return `${value}px`;\n return /^-?\\d+(\\.\\d+)?$/.test(value.trim()) ? `${value}px` : value;\n}\n\n/**\n * Single source of CSS for column `width`/`minWidth`/`maxWidth`, branching on `tableLayout`.\n *\n * - `fixed`: the three props collapse to one shared track. `width` wins when present; a lone\n * `minWidth`/`maxWidth` aliases to the track. (Detecting the contradictory combination — width\n * set alongside `minWidth`/`maxWidth` — is a DEV-only warning emitted separately at column\n * ingestion; this function stays pure and has no side effects.) `width: 'min-content'` opts the\n * column into the same measurement pipeline as under `auto` (see below) -- once\n * `DataGridHeaderCell`'s ResizeObserver has measured it, the pixel value becomes this column's\n * track, same as a literal numeric `width`.\n * - `auto`: the three are independent constraints — `width` sets a preferred size and, absent an\n * explicit `minWidth`, an implicit floor at that same size; `minWidth` is the floor; `maxWidth`\n * is a real cap. A `maxWidth`-without-`width` column also gets its header `width` set to the\n * cap so it stops absorbing container slack under `inline-size: 100%` fill, and `maxWidth`\n * always drives the content-cap CSS var read by the per-row wrapper. `width: 'min-content'` is\n * special-cased: the literal CSS keyword isn't honored by the browser's auto table-layout\n * algorithm as a hint to hold this column narrow against a widthless sibling, so\n * `minContentWidth` (a measured pixel value from `DataGridHeaderCell`'s ResizeObserver, via\n * `table-min-content-width.ts`) stands in for it once measurement has landed.\n *\n * Before the first measurement lands: under `auto`, the raw `'min-content'` keyword still flows\n * through as an inert one-frame fallback (harmless -- the browser ignores it as a `width`/\n * `min-inline-size` value and the column renders under ordinary layout sizing until the\n * ResizeObserver's first callback fires); under `fixed`, the width is simply unset instead\n * (falls to a lone `minWidth`/`maxWidth` alias, or no track at all).\n *\n * `%` strings map to `inline-size`; any other value maps to `width` + `min-inline-size`.\n */\nexport function resolveColumnStyle<TItem extends DataGridItem>(\n column: ColumnWidthProps<TItem>,\n tableLayout: DataGridTableLayout,\n minContentWidth?: number,\n): ResolvedColumnStyle {\n return tableLayout === 'auto'\n ? resolveAutoStyle(column, minContentWidth)\n : resolveFixedStyle(column, minContentWidth);\n}\n\nfunction resolveFixedStyle<TItem extends DataGridItem>(\n column: ColumnWidthProps<TItem>,\n minContentWidth?: number,\n): ResolvedColumnStyle {\n // `'min-content'` resolves from the measured pixel value once it lands (see the function-level\n // doc above) -- exactly like a literal numeric `width` from here on, including winning over\n // `minWidth`/`maxWidth` in the single-track collapse below. Before measurement, it falls back\n // to the `minWidth`/`maxWidth` alias (or no track at all).\n const width: number | string | undefined =\n column.width === 'min-content' ? minContentWidth : column.width;\n const track = width ?? column.minWidth ?? column.maxWidth;\n if (track === undefined) return { headerStyle: {}, contentVars: {}, isCapped: false };\n\n if (isPercent(track)) {\n return { headerStyle: { inlineSize: track }, contentVars: {}, isCapped: false };\n }\n\n const length = toLength(track);\n return {\n headerStyle: { width: length, minInlineSize: length },\n contentVars: {},\n isCapped: false,\n };\n}\n\nfunction resolveAutoStyle<TItem extends DataGridItem>(\n column: ColumnWidthProps<TItem>,\n minContentWidth?: number,\n): ResolvedColumnStyle {\n const { width, minWidth, maxWidth } = column;\n const headerStyle: CSSProperties = {};\n\n if (width !== undefined) {\n // The literal CSS `min-content` keyword isn't honored by the browser's auto table-layout\n // algorithm as a hint to hold this column narrow against a widthless sibling -- once\n // `DataGridHeaderCell`'s ResizeObserver has measured the header content's natural width, that\n // pixel value stands in for the keyword here, exactly like an ordinary numeric `width` (same\n // width + floor pattern below). Checked ahead of `isPercent` purely so its `value is string`\n // guard doesn't narrow `width` to `number`-only in the `else` branch below (a `'min-content'`\n // check there wouldn't type-check). Before the first measurement lands, the raw keyword still\n // flows through via `toLength` as an inert fallback (harmless -- the browser ignores it and\n // the column renders under ordinary auto-layout sizing for one frame).\n if (width === 'min-content' && minContentWidth !== undefined) {\n // A `maxWidth` cap still applies to a measured min-content column -- without this, the\n // header track could exceed its own cap (the measured value is a natural content size, not\n // itself capped) while the per-row content wrapper below enforces the cap independently,\n // leaving the two out of sync.\n const cappedWidth =\n maxWidth !== undefined ? Math.min(minContentWidth, maxWidth) : minContentWidth;\n const length = `${cappedWidth}px`;\n headerStyle.width = length;\n headerStyle.minInlineSize = length;\n } else if (isPercent(width)) {\n headerStyle.inlineSize = width;\n } else {\n const length = toLength(width);\n headerStyle.width = length;\n headerStyle.minInlineSize = length; // preferred size doubles as the floor by default\n }\n }\n\n if (minWidth !== undefined) {\n headerStyle.minInlineSize = `${minWidth}px`; // explicit floor overrides width's implicit one\n }\n\n const contentVars: CSSProperties = {};\n if (maxWidth !== undefined) {\n if (width === undefined) {\n // A widthless-but-capped column still absorbs container slack under `inline-size: 100%`\n // fill — give the header a width so the cap actually holds instead of leaving dead space.\n headerStyle.width = `${maxWidth}px`;\n }\n (contentVars as Record<string, string>)[DATA_GRID_COLUMN_MAX_WIDTH_VAR] = `${maxWidth}px`;\n }\n\n return { headerStyle, contentVars, isCapped: maxWidth !== undefined };\n}\n","import type { DataGridItem } from '../../data-grid-types';\nimport type { DataGridTableColumn } from './table-types';\n\nexport function resolveLabel(label: string | (() => string)): string {\n return typeof label === 'function' ? label() : label;\n}\n\nexport function getNestedValue(obj: Record<string, unknown>, path: string): unknown {\n return path.split('.').reduce<unknown>((acc, key) => {\n if (acc != null && typeof acc === 'object') {\n return (acc as Record<string, unknown>)[key];\n }\n return undefined;\n }, obj);\n}\n\n/**\n * Resolves a body cell's plain-string display value — the same value the default cell renderer\n * shows — or `undefined` when the column uses `component`/`render` (output the kit cannot safely\n * stringify, e.g. for an auto-set `title` fallback). Shared by `DataGridBodyCellContent` (the\n * renderer) and `resolveBodyCellProps` (the `title` fallback for `cellOverflow: 'nowrap'`) so the\n * two never drift on what counts as \"plain string\" content.\n */\nexport function resolveCellDisplayValue<TItem extends DataGridItem>(\n column: DataGridTableColumn<TItem>,\n item: TItem,\n): string | undefined {\n if (column.render || column.component) return undefined;\n\n const key = column.key ?? column.id;\n const rawValue = key.includes('.') ? getNestedValue(item, key) : item[key];\n\n if (column.formatter) return column.formatter(rawValue);\n\n return rawValue != null ? String(rawValue) : '';\n}\n","import type { CSSProperties } from 'react';\nimport type { DataGridItem } from '../../data-grid-types';\nimport { resolveColumnStyle } from './resolve-column-style';\nimport { resolveCellDisplayValue } from './table-helpers';\nimport type { DataGridTableColumn, DataGridTableColumnOverflow, DataGridTableLayout } from './table-types';\n\nexport interface ResolvedBodyCellProps {\n /** Content-cap CSS var(s) forwarded to `DataGridCell`'s `style` prop -- see `resolveColumnStyle`. */\n style: CSSProperties;\n /** Drives `DataGridCell`'s `data-overflow` attribute; defaults to `'wrap'` when unset on the column. */\n overflow: DataGridTableColumnOverflow;\n /** Whether a real, active `maxWidth` cap applies -- forwarded to `DataGridCell`'s `capped` prop. */\n capped: boolean;\n /** Stringified cell value for the native `title` tooltip, or `undefined` when there's none to show. */\n title: string | undefined;\n}\n\n/**\n * Single source of the per-cell overflow/width props a body row forwards to `DataGridCell`, kept\n * apart from `DataGridRow` so the derivation is pure and can be tested without rendering a row.\n *\n * Pure: `useTableLayout()` stays a hook call at each call site, its result passed in here.\n */\nexport function resolveBodyCellProps<TItem extends DataGridItem>(\n column: DataGridTableColumn<TItem>,\n item: TItem,\n tableLayout: DataGridTableLayout,\n): ResolvedBodyCellProps {\n const overflow = column.cellOverflow ?? 'wrap';\n // Width lives on the header only -- the column already shares one track from there. Body cells\n // only need the content-cap var (auto mode + maxWidth) for their own per-row overflow wrapper.\n const { contentVars, isCapped } = resolveColumnStyle(column, tableLayout);\n // Custom `component`/`render` output can't be safely stringified -- the kit can't supply a\n // title fallback for it, so resolveCellDisplayValue returns undefined there. `nowrap` is the\n // clipping mode (single line, ellipsis on overflow) -- `wrap` never clips.\n const displayValue = overflow === 'nowrap' ? resolveCellDisplayValue(column, item) : undefined;\n // An empty stringified value (e.g. `null`) must not become an empty `title=\"\"` attribute --\n // only set `title` when there's real content to show.\n const title = displayValue ? displayValue : undefined;\n\n return { style: contentVars, overflow, capped: isCapped, title };\n}\n"],"names":["normalizeWidth","width","DataGridCell","columnId","rowspan","className","style","children","header","endSlot","overflow","capped","title","contentRowRef","fillContent","ignoreRowClick","tableService","useTableService","stickyOffset","endStickyOffset","isSticky","isStickyEnd","content","jsx","styles","Cell","TableHead","TableCell","normalizedWidth","IGNORE_CLICK_ATTRIBUTE","cx","jsxs","DataGridExtraBodyColumns","position","extraColumns","Fragment","extra","DATA_GRID_COLUMN_MAX_WIDTH_VAR","isPercent","value","toLength","resolveColumnStyle","column","tableLayout","minContentWidth","resolveAutoStyle","resolveFixedStyle","track","length","minWidth","maxWidth","headerStyle","contentVars","resolveLabel","label","getNestedValue","obj","path","acc","key","resolveCellDisplayValue","item","rawValue","resolveBodyCellProps","isCapped","displayValue"],"mappings":";;;;;;;;;;;AA+DA,SAASA,EAAeC,GAAwD;AAC9E,MAAIA,KAAS;AACb,WAAI,OAAOA,KAAU,WAAiB,GAAGA,CAAK,OACtC,MAAM,OAAOA,CAAK,CAAC,IAAmBA,IAAf,GAAGA,CAAK;AACzC;AAEO,SAASC,EAAwD;AAAA,EACtE,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAL;AAA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,IAAWH,EAAI,SAAS,GAAG,IAAIJ,EAAeM,GAAMF,CAAG,IAAIE,EAAKF,CAAG;AAEzE,SAAIjB,EAAO,YAAkBA,EAAO,UAAUoB,CAAQ,IAE/CA,KAAY,OAAO,OAAOA,CAAQ,IAAI;AAC/C;ACZO,SAASC,EACdrB,GACAmB,GACAlB,GACuB;AACvB,QAAMjC,IAAWgC,EAAO,gBAAgB,QAGlC,EAAE,aAAAU,GAAa,UAAAY,EAAA,IAAavB,EAAmBC,GAAQC,CAAW,GAIlEsB,IAAevD,MAAa,WAAWkD,EAAwBlB,GAAQmB,CAAI,IAAI;AAKrF,SAAO,EAAE,OAAOT,GAAa,UAAA1C,GAAU,QAAQsD,GAAU,OAF3CC,KAA8B,OAEa;AAC3D;"}
@@ -0,0 +1 @@
1
+ ._rowActions_dnqrf_1{display:flex;align-items:center;justify-content:center;gap:var(--space-1);inline-size:min-content}
@@ -0,0 +1 @@
1
+ ._clickableRow_1u01l_2{cursor:pointer}._clickableRow_1u01l_2:focus-visible{outline:none}:where(._clickableRow_1u01l_2:focus-visible)>td{position:relative}._clickableRow_1u01l_2:focus-visible>*:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-block:var(--border-width-focus) solid var(--ring);pointer-events:none}._clickableRow_1u01l_2:focus-visible>:first-child:after{border-inline-start:var(--border-width-focus) solid var(--ring)}._clickableRow_1u01l_2:focus-visible>:last-child:after{border-inline-end:var(--border-width-focus) solid var(--ring)}@media(forced-colors:active){._clickableRow_1u01l_2:focus-visible>*:after{border-color:Highlight}}
@@ -0,0 +1 @@
1
+ ._rowNumber_1sdux_1{font-family:var(--font-mono);white-space:nowrap}
@@ -0,0 +1 @@
1
+ ._cell_11t3n_1{display:flex;align-items:center;block-size:var(--text-meta-line-height)}@keyframes _banner-appear_18hmm_1{0%{opacity:0}to{opacity:1}}._banner_18hmm_11{animation:_banner-appear_18hmm_1 var(--duration-micro) var(--ease-standard)}._action_18hmm_16{padding:0;border:0;background:none;cursor:pointer}._container_1r0z6_8{display:flex;flex-direction:column}._rowSelectTop_1r0z6_6{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--space-2);min-block-size:var(--control-height-sm);padding-block-end:var(--space-2)}@keyframes _appear_1r0z6_1{0%{opacity:0}to{opacity:1}}._actions_1r0z6_34{display:flex;flex-wrap:wrap;align-items:center;animation:_appear_1r0z6_1 var(--duration-micro) var(--ease-standard);gap:var(--space-2)}._selectedCount_1r0z6_42{font-size:var(--text-body-size);font-weight:var(--text-label-weight);line-height:var(--text-body-line-height);white-space:nowrap}
@@ -0,0 +1 @@
1
+ ._popup_i679w_8._popup_i679w_8{width:auto;max-inline-size:var(--available-width);max-block-size:var(--available-height)}._tableConfiguration_i679w_23{display:flex;flex-direction:column;min-block-size:0;min-inline-size:min(var(--data-grid-table-configuration-min-inline-size, 304px),calc(var(--available-width, 100vw) - var(--space-6)))}._header_i679w_33{flex:none;padding-block:var(--space-3);padding-inline:var(--space-4);border-block-end:var(--border-width) solid var(--border);color:var(--foreground);font-size:var(--text-body-size);font-weight:var(--text-heading-2-weight);line-height:var(--text-body-line-height)}._content_i679w_48{flex:1 1 auto;overflow:hidden auto;padding-block:var(--space-2);min-block-size:0;max-block-size:var(--data-grid-table-configuration-content-max-block-size, 500px)}._configurationItem_i679w_61._configurationItem_i679w_61{padding-block:var(--space-1)}._configurationItem_i679w_61{--_data-grid-table-configuration-pin-button-opacity: 0}._configurationItem_i679w_61:hover{--_data-grid-table-configuration-pin-button-opacity: 1;background-color:var(--accent);color:var(--accent-foreground)}._configurationItem_i679w_61:has(:focus-visible){--_data-grid-table-configuration-pin-button-opacity: 1}@supports not selector(:has(*)){._configurationItem_i679w_61:focus-within{--_data-grid-table-configuration-pin-button-opacity: 1}}._pinButton_i679w_92{display:flex;opacity:var(--_data-grid-table-configuration-pin-button-opacity, 0)}._pinButtonVisible_i679w_97{--_data-grid-table-configuration-pin-button-opacity: 1}._configurationItem_i679w_61:is(:hover,:focus) [role=switch][data-checked]{box-shadow:0 0 0 var(--border-width) var(--accent-foreground)}._configurationItem_i679w_61:is(:hover,:focus) ._pin_i679w_92:not(:hover):not([data-pressed]){color:inherit}._label_i679w_116{flex:1 1 auto;min-inline-size:0}._configurationItem_i679w_61._configurationItemNoSticky_i679w_122{padding-inline-start:calc(var(--space-2) + var(--control-height-sm) + var(--space-2))}._groupContent_i679w_126{padding-inline-start:var(--space-4)}
@@ -0,0 +1,8 @@
1
+ import { b as e } from "./plugins-helpers.js";
2
+ function r() {
3
+ return e().table;
4
+ }
5
+ export {
6
+ r as u
7
+ };
8
+ //# sourceMappingURL=table-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-context.js","sources":["../../src/components/data-grid/services/table/table-context.ts"],"sourcesContent":["import type { DataGridItem } from '../../data-grid-types';\nimport { useDataGridContext } from '../core/data-grid-context';\nimport type { TableService } from './table-types';\n\nexport function useTableService<\n TItem extends DataGridItem = DataGridItem,\n>(): TableService<TItem> {\n return useDataGridContext<TItem>().table;\n}\n"],"names":["useTableService","useDataGridContext"],"mappings":";AAIO,SAASA,IAES;AACvB,SAAOC,IAA4B;AACrC;"}
@@ -0,0 +1,11 @@
1
+ function n(r) {
2
+ return "columns" in r && Array.isArray(r.columns);
3
+ }
4
+ function o(r) {
5
+ return "columns" in r && Array.isArray(r.columns);
6
+ }
7
+ export {
8
+ o as a,
9
+ n as i
10
+ };
11
+ //# sourceMappingURL=table-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-types.js","sources":["../../src/components/data-grid/services/table/table-types.ts"],"sourcesContent":["import type { ComponentType, ReactNode } from 'react';\nimport type { DataGridItem } from '../../data-grid-types';\n\nexport const TableLayouts = ['fixed', 'auto'] as const;\nexport type DataGridTableLayout = (typeof TableLayouts)[number];\n\nexport const TableColumnOverflows = ['wrap', 'nowrap'] as const;\nexport type DataGridTableColumnOverflow = (typeof TableColumnOverflows)[number];\n\nexport interface DataGridTableColumn<TItem extends DataGridItem = DataGridItem> {\n id: string;\n key?: string;\n label: string | (() => string);\n type?: 'string' | 'number' | 'date';\n /**\n * Column width. Under `tableLayout=\"fixed\"` (default) this is the column's shared track — a\n * proportional weight when every column has a `width`, an exact size when some columns are\n * widthless. Under `tableLayout=\"auto\"` it is a preferred size that also acts as a floor unless\n * `minWidth` is set. A `%` string maps to `inline-size`; any other value maps to `width` +\n * `min-inline-size`.\n *\n * `'min-content'` is a first-class value: it sizes the column to its own header content, in\n * both layout modes -- the literal CSS keyword isn't honored by either table-layout algorithm\n * as a sizing hint on its own, so `DataGridHeaderCell` measures the header cell's content and\n * applies the result as a pixel width instead (the column's size under `auto`, its shared track\n * under `fixed`). See `resolveColumnStyle`. For choosing a width strategy per column, see the\n * decision guide in `data-grid.md` (\"Choosing column widths\").\n */\n width?: number | 'min-content' | (string & {});\n /**\n * Minimum column width in px. Under `tableLayout=\"auto\"` this is an independent floor. Under\n * `tableLayout=\"fixed\"` the three width props collapse to a single track: a lone `minWidth`\n * (no `width`, no `maxWidth`) aliases to the track, while combining it with `width` triggers a\n * DEV-only console warning and `width` wins, since fixed layout cannot honor both.\n */\n minWidth?: number;\n /**\n * Maximum column width in px, enforced via a content-cap wrapper. Under `tableLayout=\"auto\"`\n * this is a real, independent cap. Under `tableLayout=\"fixed\"` the three width props collapse\n * to a single track: a lone `maxWidth` (no `width`, no `minWidth`) aliases to the track, while\n * combining it with `width` triggers a DEV-only console warning and `width` wins, since fixed\n * layout cannot honor both.\n */\n maxWidth?: number;\n visible?: boolean;\n sticky?: boolean;\n visibleToggleDisabled?: boolean;\n formatter?: (value: unknown) => string;\n /**\n * Header-only overflow handling. Default `'nowrap'` — the label stays on one line and clips\n * with an ellipsis (\"…\") on overflow, auto-setting `title` with the full label for the default\n * label renderer; when `headerComponent` is set the kit cannot supply that fallback and the\n * consumer is responsible for it. `'wrap'` lets the label wrap across lines instead.\n */\n headerOverflow?: DataGridTableColumnOverflow;\n /**\n * Body-cell overflow handling. Default `'wrap'`: the value wraps across lines. `'nowrap'` keeps the value on one line and clips it with an ellipsis (\"…\") on\n * overflow, auto-setting `title` with the formatted value for the default value renderer; when\n * `component` or `render` is set the kit cannot supply that fallback and the consumer is\n * responsible for it.\n */\n cellOverflow?: DataGridTableColumnOverflow;\n /**\n * @deprecated Use `headerOverflow: 'nowrap'` instead. Normalized to `headerOverflow` at\n * column ingestion and kept working for one release with a dev-only deprecation warning.\n */\n headerTruncate?: boolean;\n component?: ComponentType<{ item: TItem; column: DataGridTableColumn<TItem>; value: unknown }>;\n headerComponent?: ComponentType<{ column: DataGridTableColumn<TItem> }>;\n render?: ((item: TItem) => ReactNode) | ReactNode;\n getClassName?: (item: TItem) => string | undefined;\n groupId?: string;\n}\n\nexport interface DataGridTableGroup<TItem extends DataGridItem = DataGridItem> {\n id: string;\n label: string | (() => string);\n columns: DataGridTableColumn<TItem>[];\n component?: ComponentType<{ group: DataGridTableGroup<TItem> }>;\n visible?: boolean;\n sticky?: boolean;\n}\n\nexport function isTableGroup<TItem extends DataGridItem>(\n item: DataGridTableColumn<TItem> | DataGridTableGroup<TItem>,\n): item is DataGridTableGroup<TItem> {\n return 'columns' in item && Array.isArray(item.columns);\n}\n\nexport type TableSlotName = 'subheader' | 'footer' | 'header-cell-end';\n\nexport interface TableSlot {\n id: string;\n name: TableSlotName;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- what `registerTableSlot` takes: a `header-cell-end` slot gets the column, the others nothing\n component: ComponentType<any>;\n order: number;\n}\n\nexport interface TableSlotOption {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- the option `registerTableSlot` takes\n component: ComponentType<any>;\n order?: number;\n}\n\nexport interface TableSlotOptions {\n subheader: TableSlotOption;\n footer: TableSlotOption;\n 'header-cell-end': TableSlotOption;\n}\n\nexport type ExtraColumnPosition = 'start' | 'end';\n\nexport interface ExtraColumn {\n id: string;\n header?: ComponentType;\n body?: ComponentType;\n position: ExtraColumnPosition;\n order: number;\n /**\n * Any CSS length, applied as the column's width. A pinned `end` column's contribution to the\n * offsets of the columns pinned inside it is read from this only while the header has not been\n * measured yet, and only when the value is a plain px length -- anything else contributes `0`\n * until the measurement lands.\n */\n width?: string;\n /**\n * Pins the column to the table's inline-end edge, so it stays reachable while the rows scroll\n * sideways. Read only for `end` columns; a `start` extra column is not pinned by it, and is not\n * pinned by the table's own sticky columns either -- it only offsets them. Setting it on a\n * `start` column logs a DEV-only warning. Defaults to unpinned.\n */\n sticky?: boolean;\n /**\n * When `true`, the rendered header and body cells for this column carry\n * `data-grid-row-ignore-click`, so a plugin that reacts to row clicks can skip clicks\n * anywhere in the cell (including its padding, not just the inner content).\n */\n ignoreRowClick?: boolean;\n}\n\nexport type ExtraColumnOption = Partial<ExtraColumn>;\n\nexport type TableComponentName =\n | 'row'\n | 'header-cell'\n | 'header-cell-label'\n | 'header-group'\n | 'body-cell-content'\n | 'content';\n\n/**\n * How the registry stores a component registered under a `TableComponentName`. Each name takes its\n * own props, so the registry holds them as taking none it could name: every function component\n * (a `memo`, `forwardRef` or `lazy` one too) is assignable to `ComponentType<never>`, and\n * `useComponent` hands one back as the props its caller renders. A class component is not: its\n * instance carries its props (`this.props`), which `never` cannot hold. So this is the stored\n * form only; the public `registerComponent` still takes `ComponentType<any>` and asserts a class\n * component into it.\n */\nexport type RegisteredTableComponent = ComponentType<never>;\n\nexport interface TableHeaderCell<TItem extends DataGridItem = DataGridItem> {\n type: 'group' | 'column';\n item: DataGridTableGroup<TItem> | DataGridTableColumn<TItem>;\n component: RegisteredTableComponent;\n colspan?: number;\n rowspan?: number;\n}\n\nexport interface TableStore<TItem extends DataGridItem = DataGridItem> {\n columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];\n flatColumns: DataGridTableColumn<TItem>[];\n columnVisibility: Map<string, boolean>;\n columnSticky: Map<string, boolean>;\n groupSticky: Map<string, boolean>;\n columnWidths: Map<string, number>;\n /**\n * Measured pixel width of `tableLayout=\"auto\"` columns with `width: 'min-content'` -- see\n * `table-min-content-width.ts`. Kept separate from `columnWidths` above: that one is read-only\n * telemetry off a cell's already-rendered width (for sticky-offset math) and never feeds back\n * into that cell's own size, so it never needs a dedup guard. This one directly drives the\n * column's own CSS width, so it must dedupe writes to avoid a measure -> apply -> relayout ->\n * re-measure loop.\n */\n minContentWidths: Map<string, number>;\n extraColumnsStart: ExtraColumn[];\n extraColumnsEnd: ExtraColumn[];\n slots: Map<TableSlotName, TableSlot[]>;\n components: Map<TableComponentName, RegisteredTableComponent>;\n tableLayout: DataGridTableLayout;\n /** Mirrors `DataGrid`'s `stickyHeader` prop; read by the header renderers. */\n stickyHeader: boolean;\n}\n\nexport interface ConfigurationColumn {\n id: string;\n label: string;\n visible: boolean;\n sticky: boolean;\n visibleToggleDisabled: boolean;\n}\n\nexport interface ConfigurationGroup {\n id: string;\n label: string;\n visible: boolean;\n sticky: boolean;\n columns: ConfigurationColumn[];\n}\n\nexport type ConfigurationEntry = ConfigurationColumn | ConfigurationGroup;\n\nexport function isConfigurationGroup(entry: ConfigurationEntry): entry is ConfigurationGroup {\n return 'columns' in entry && Array.isArray(entry.columns);\n}\n\nexport interface TablePublicApi<TItem extends DataGridItem = DataGridItem> {\n registerTableSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;\n registerExtraColumn: (options: ExtraColumnOption) => void;\n updateExtraColumnWidth: (columnId: string, width: string) => void;\n updateExtraColumnOrder: (columnId: string, order: number) => void;\n updateExtraColumnSticky: (columnId: string, sticky: boolean) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- `ComponentType<never>` would refuse a class component\n registerComponent: (name: TableComponentName, component: ComponentType<any>) => void;\n updateColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => void;\n updateColumnVisibility: (columnId: string, visible: boolean) => void;\n updateColumnSticky: (id: string, sticky: boolean) => void;\n updateTableLayout: (tableLayout: DataGridTableLayout) => void;\n updateStickyHeader: (stickyHeader: boolean) => void;\n}\n\nexport interface TableService<\n TItem extends DataGridItem = DataGridItem,\n> extends TablePublicApi<TItem> {\n registerSlot: <T extends TableSlotName>(name: T, options: TableSlotOptions[T]) => void;\n useSlots: <T extends TableSlotName>(name: T) => TableSlot[];\n\n useComponent: <TProps = unknown>(name: TableComponentName) => ComponentType<TProps>;\n\n useExtraColumns: (position: ExtraColumnPosition) => ExtraColumn[];\n\n initializeColumns: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {\n columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[];\n flatColumns: DataGridTableColumn<TItem>[];\n columnVisibility: Map<string, boolean>;\n };\n useVisibleColumns: () => DataGridTableColumn<TItem>[];\n\n initializeStickyState: (columns: (DataGridTableColumn<TItem> | DataGridTableGroup<TItem>)[]) => {\n columnSticky: Map<string, boolean>;\n groupSticky: Map<string, boolean>;\n };\n getOrderedColumnsWithSticky: (\n visibleColumns: DataGridTableColumn<TItem>[],\n columnSticky: Map<string, boolean>,\n ) => DataGridTableColumn<TItem>[];\n onResizeColumn: (columnId: string, width: number) => void;\n isColumnSticky: (columnId: string) => boolean;\n isGroupSticky: (groupId: string) => boolean;\n useColumnStickyOffset: (columnId: string) => number | undefined;\n useColumnEndStickyOffset: (columnId: string) => number | undefined;\n useGroupStickyOffset: (groupId: string) => number | undefined;\n\n useHasGroups: () => boolean;\n useFirstRowHeaderCells: () => TableHeaderCell<TItem>[];\n useSecondRowHeaderColumns: () => DataGridTableColumn<TItem>[];\n\n useConfigurationColumns: () => ConfigurationEntry[];\n useTableLayout: () => DataGridTableLayout;\n useStickyHeader: () => boolean;\n\n /**\n * Measured pixel width for a `tableLayout=\"auto\"` column with `width: 'min-content'` -- see\n * `table-min-content-width.ts` and `DataGridHeaderCell`'s measurement effect.\n */\n useMinContentWidth: (columnId: string) => number | undefined;\n setMinContentWidth: (columnId: string, width: number) => void;\n}\n"],"names":["isTableGroup","item","isConfigurationGroup","entry"],"mappings":"AAmFO,SAASA,EACdC,GACmC;AACnC,SAAO,aAAaA,KAAQ,MAAM,QAAQA,EAAK,OAAO;AACxD;AA8HO,SAASC,EAAqBC,GAAwD;AAC3F,SAAO,aAAaA,KAAS,MAAM,QAAQA,EAAM,OAAO;AAC1D;"}