impact-nova 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/ui/accordion.d.ts +5 -0
  2. package/dist/components/ui/accordion.js +51 -39
  3. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +207 -209
  4. package/dist/components/ui/ag-grid-react/index.js +86 -84
  5. package/dist/components/ui/ag-grid-react/theme.js +3 -0
  6. package/dist/components/ui/data-table/data-table-column-list.js +84 -78
  7. package/dist/components/ui/expandable-sku/expandable-sku.d.ts +38 -0
  8. package/dist/components/ui/expandable-sku/expandable-sku.js +244 -0
  9. package/dist/components/ui/expandable-sku/expandable-sku.types.d.ts +35 -0
  10. package/dist/components/ui/expandable-sku/index.d.ts +2 -0
  11. package/dist/components/ui/expandable-sku/index.js +4 -0
  12. package/dist/components/ui/filter-strip/filter-tag-list.d.ts +8 -1
  13. package/dist/components/ui/filter-strip/filter-tag-list.js +1 -0
  14. package/dist/components/ui/select/select.js +221 -210
  15. package/dist/impact-nova.css +1 -1
  16. package/dist/index.d.ts +57 -0
  17. package/dist/index.js +318 -300
  18. package/dist/lib/virtualized/index.d.ts +9 -0
  19. package/dist/lib/virtualized/sectioned.d.ts +37 -0
  20. package/dist/lib/virtualized/sectioned.js +38 -0
  21. package/dist/lib/virtualized/selection-counts.d.ts +14 -0
  22. package/dist/lib/virtualized/selection-counts.js +12 -0
  23. package/dist/lib/virtualized/types.d.ts +131 -0
  24. package/dist/lib/virtualized/useDataGrid.d.ts +15 -0
  25. package/dist/lib/virtualized/useDataGrid.js +12 -0
  26. package/dist/lib/virtualized/useDataSource.d.ts +8 -0
  27. package/dist/lib/virtualized/useDataSource.js +34 -0
  28. package/dist/lib/virtualized/useDebouncedValue.d.ts +4 -0
  29. package/dist/lib/virtualized/useDebouncedValue.js +11 -0
  30. package/dist/lib/virtualized/useRowState.d.ts +15 -0
  31. package/dist/lib/virtualized/useRowState.js +127 -0
  32. package/dist/lib/virtualized/useVirtualizedList.d.ts +72 -0
  33. package/dist/lib/virtualized/useVirtualizedList.js +155 -0
  34. package/dist/lib/virtualized/useVirtualizedRows.d.ts +22 -0
  35. package/dist/lib/virtualized/useVirtualizedRows.js +27 -0
  36. package/package.json +23 -1
  37. package/tailwind.config.js +2 -0
@@ -1,32 +1,32 @@
1
- import { jsxs as P, jsx as a } from "react/jsx-runtime";
2
- import { lazy as V, useRef as E, useState as p, useCallback as v, useMemo as F, useEffect as W, Suspense as _ } from "react";
1
+ import { jsxs as U, jsx as a } from "react/jsx-runtime";
2
+ import { lazy as V, useRef as D, useState as f, useCallback as F, useMemo as y, useEffect as W, Suspense as _ } from "react";
3
3
  import { ModuleRegistry as $, AllCommunityModule as q, ValidationModule as K } from "ag-grid-community";
4
- import { AllEnterpriseModule as U } from "ag-grid-enterprise";
5
- import { AgGridReact as z } from "ag-grid-react";
6
- import { customAgGridTheme as J } from "./theme.js";
4
+ import { AllEnterpriseModule as z } from "ag-grid-enterprise";
5
+ import { AgGridReact as J } from "ag-grid-react";
6
+ import { customAgGridTheme as X } from "./theme.js";
7
7
  import { CustomHeader as B } from "./headers/custom-header.js";
8
8
  import { CustomHeaderGroup as Q } from "./headers/custom-header-group.js";
9
- import { GridHeaderContext as X } from "./headers/context/grid-header-context.js";
10
- import { convertToAgGridFilterModel as Y, getMultiFilterIndices as Z, convertFromAgGridFilterModel as ee } from "./headers/utils/filter-utils.js";
11
- import { ColumnSettingsMenu as te } from "./headers/column-menu/column-settings-menu.js";
12
- import { AG_GRID_VALUE_FORMATTERS as re } from "./value-formatters.js";
9
+ import { GridHeaderContext as Y } from "./headers/context/grid-header-context.js";
10
+ import { convertToAgGridFilterModel as Z, getMultiFilterIndices as ee, convertFromAgGridFilterModel as te } from "./headers/utils/filter-utils.js";
11
+ import { ColumnSettingsMenu as re } from "./headers/column-menu/column-settings-menu.js";
12
+ import { AG_GRID_VALUE_FORMATTERS as ne } from "./value-formatters.js";
13
13
  /* empty css */
14
- const ne = V(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
15
- $.registerModules([q, U, K]);
16
- function Fe({
14
+ const oe = V(() => import("./headers/advanced-filter/advanced-filter-dialog.js"));
15
+ $.registerModules([q, z, K]);
16
+ function ye({
17
17
  children: c,
18
- defaultColDef: l,
18
+ defaultColDef: o,
19
19
  defaultColGroupDef: i,
20
- columnDefs: f,
20
+ columnDefs: g,
21
21
  valueFormatters: d,
22
22
  onGridReady: m,
23
23
  ...u
24
24
  }) {
25
- const r = E(null), s = E(null), [g, M] = p(null), [G, h] = p(!1), [y, x] = p(null), [R, S] = p(!1), [b, k] = p(null), [I, O] = p(null), D = v((e) => {
25
+ const r = D(null), s = D(null), [h, M] = f(null), [G, C] = f(!1), [b, x] = f(null), [R, S] = f(!1), [A, k] = f(null), [N, E] = f(null), O = F((e) => {
26
26
  if (!r.current) return;
27
- const t = Y(e);
27
+ const t = Z(e);
28
28
  r.current.setFilterModel(t), r.current.onFilterChanged();
29
- }, []), C = F(() => ({
29
+ }, []), v = y(() => ({
30
30
  openSearch: (e) => {
31
31
  if (!r.current) return;
32
32
  const t = r.current.getGridOption("context") || {};
@@ -38,76 +38,78 @@ function Fe({
38
38
  r.current.setGridOption("context", { ...e, activeSearchColumnId: null }), r.current.refreshHeader();
39
39
  },
40
40
  openAdvancedFilter: (e) => {
41
- x(e || null), h(!0);
41
+ x(e || null), C(!0);
42
42
  },
43
43
  closeAdvancedFilter: () => {
44
- h(!1), x(null);
44
+ C(!1), x(null);
45
45
  },
46
46
  applyAdvancedFilter: (e) => {
47
- D(e);
47
+ O(e);
48
48
  },
49
49
  openMenu: (e, t) => {
50
- k(e), O(t), S(!0);
50
+ k(e), E(t), S(!0);
51
51
  },
52
52
  closeMenu: () => {
53
- S(!1), k(null), O(null);
53
+ S(!1), k(null), E(null);
54
54
  },
55
- activeMenuColumnId: b
56
- }), [D, b]), H = v((e) => {
55
+ activeMenuColumnId: A
56
+ }), [O, A]), T = F((e) => {
57
57
  r.current = e.api, M(e.api), e.api.setGridOption("context", { activeSearchColumnId: null }), m && m(e);
58
58
  }, [m]);
59
59
  W(() => {
60
60
  const e = s.current;
61
61
  if (!e) return;
62
- const t = (o) => {
63
- if (o.key !== "Enter" && o.key !== " ") return;
64
- const n = o.target;
65
- if (!n.classList.contains("ag-cell") && !n.classList.contains("ag-header-cell")) return;
66
- const A = n.querySelector(
62
+ const t = (n) => {
63
+ if (n.key !== "Enter" && n.key !== " ") return;
64
+ const l = n.target;
65
+ if (!l.classList.contains("ag-cell") && !l.classList.contains("ag-header-cell")) return;
66
+ const p = l.querySelector(
67
67
  'button, [role="checkbox"], [role="switch"], [role="combobox"], [role="button"], [role="link"], a, input, select, textarea, .cursor-pointer'
68
68
  );
69
- A && (o.preventDefault(), o.stopPropagation(), A.click(), A.focus());
69
+ p && (n.preventDefault(), n.stopPropagation(), p.click(), p.focus());
70
70
  };
71
71
  return e.addEventListener("keydown", t, !0), () => e.removeEventListener("keydown", t, !0);
72
72
  }, []);
73
- const N = F(() => ({
73
+ const H = y(() => ({
74
74
  headerComponent: B,
75
- ...l,
75
+ ...o,
76
76
  suppressHeaderKeyboardEvent: (e) => {
77
- const { event: t } = e;
77
+ const { event: t } = e, n = t.target;
78
+ if (n.tagName === "INPUT" || n.tagName === "TEXTAREA")
79
+ return !(t.key === "Enter" || t.key === "Escape" || t.key === "Tab");
78
80
  if (t.key === "Enter" || t.key === " ") {
79
- const o = t.target.closest(".ag-header-cell");
80
- if (o) {
81
- const n = o.querySelector('[role="checkbox"], button, [role="switch"], input');
82
- if (n)
83
- return t.preventDefault(), n.click(), !0;
81
+ const p = n.closest(".ag-header-cell");
82
+ if (p) {
83
+ const I = p.querySelector('[role="checkbox"], button, [role="switch"], input');
84
+ if (I)
85
+ return t.preventDefault(), I.click(), !0;
84
86
  }
85
87
  }
86
- return l?.suppressHeaderKeyboardEvent?.(e) ?? !1;
88
+ return o?.suppressHeaderKeyboardEvent?.(e) ?? !1;
87
89
  },
88
90
  headerComponentParams: {
89
- ...l?.headerComponentParams
91
+ ...o?.headerComponentParams
90
92
  }
91
- }), [l]), j = F(() => ({
93
+ }), [o]), j = y(() => ({
92
94
  headerGroupComponent: Q,
93
95
  ...i,
94
96
  headerGroupComponentParams: {
95
97
  ...i?.headerGroupComponentParams
96
98
  }
97
- }), [i]), L = F(() => ({
98
- ...re,
99
+ }), [i]), L = y(() => ({
100
+ ...ne,
99
101
  // Always available - value formatters
100
102
  ...u.components,
101
103
  // User components override
102
104
  ...d
103
105
  // Optional custom formatters override defaults
104
- }), [d, u.components]), T = v((e) => {
106
+ }), [d, u.components]), P = F((e) => {
105
107
  if (e.value !== null && e.value !== void 0 && typeof e.value == "object") {
106
- const t = Object.entries(e.value).map(([o, n]) => n && typeof n == "object" && "value" in n ? n.value : typeof n != "object" && typeof n < "u" ? n : null).filter((o) => o != null);
108
+ const t = Object.entries(e.value).map(([n, l]) => l && typeof l == "object" && "value" in l ? l.value : typeof l != "object" && typeof l < "u" ? l : null).filter((n) => n != null);
107
109
  return t.length > 0 ? t.join(" ") : "";
108
110
  }
109
111
  return e.value;
110
- }, []), w = v((e) => {
112
+ }, []), w = F((e) => {
111
113
  if (typeof e.value == "string") {
112
114
  const t = e.value.trim();
113
115
  if (t.startsWith("{") || t.startsWith("["))
@@ -119,18 +121,18 @@ function Fe({
119
121
  }
120
122
  return e.value;
121
123
  }, []);
122
- return /* @__PURE__ */ P(X.Provider, { value: C, children: [
124
+ return /* @__PURE__ */ U(Y.Provider, { value: v, children: [
123
125
  /* @__PURE__ */ a("div", { ref: s, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ a(
124
- z,
126
+ J,
125
127
  {
126
- theme: J,
127
- defaultColDef: N,
128
- columnDefs: f,
128
+ theme: X,
129
+ defaultColDef: H,
130
+ columnDefs: g,
129
131
  cellSelection: !0,
130
132
  defaultColGroupDef: j,
131
- onGridReady: H,
133
+ onGridReady: T,
132
134
  components: L,
133
- processCellForClipboard: T,
135
+ processCellForClipboard: P,
134
136
  processCellFromClipboard: w,
135
137
  ensureDomOrder: !0,
136
138
  suppressHeaderFocus: !1,
@@ -163,73 +165,73 @@ function Fe({
163
165
  ) }),
164
166
  c,
165
167
  /* @__PURE__ */ a(
166
- oe,
168
+ le,
167
169
  {
168
170
  isOpen: G,
169
- columnId: y,
170
- gridApi: g,
171
- onClose: C.closeAdvancedFilter,
172
- onApply: C.applyAdvancedFilter
171
+ columnId: b,
172
+ gridApi: h,
173
+ onClose: v.closeAdvancedFilter,
174
+ onApply: v.applyAdvancedFilter
173
175
  }
174
176
  ),
175
177
  /* @__PURE__ */ a(
176
- le,
178
+ ie,
177
179
  {
178
180
  isOpen: R,
179
- columnId: b,
180
- gridApi: g,
181
- anchor: I,
182
- onClose: C.closeMenu
181
+ columnId: A,
182
+ gridApi: h,
183
+ anchor: N,
184
+ onClose: v.closeMenu
183
185
  }
184
186
  )
185
187
  ] });
186
188
  }
187
- function oe({
189
+ function le({
188
190
  isOpen: c,
189
- columnId: l,
191
+ columnId: o,
190
192
  gridApi: i,
191
- onClose: f,
193
+ onClose: g,
192
194
  onApply: d
193
195
  }) {
194
- if (!c || !l || !i) return null;
195
- const m = i.getColumn(l);
196
+ if (!c || !o || !i) return null;
197
+ const m = i.getColumn(o);
196
198
  if (!m) return null;
197
- const u = m.getColDef(), r = u.headerComponentParams, s = Z(u), g = s.text !== -1 || s.number !== -1 || s.date !== -1, M = s.set !== -1, h = u.filter === "agMultiColumnFilter" && (g || M) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || r?.selectOptions ? "select" : "text", y = ee(i.getFilterModel());
199
+ const u = m.getColDef(), r = u.headerComponentParams, s = ee(u), h = s.text !== -1 || s.number !== -1 || s.date !== -1, M = s.set !== -1, C = u.filter === "agMultiColumnFilter" && (h || M) ? "multi" : u.filter === "agNumberColumnFilter" ? "number" : u.filter === "agDateColumnFilter" ? "date" : u.filter === "agSetColumnFilter" || r?.selectOptions ? "select" : "text", b = te(i.getFilterModel());
198
200
  return /* @__PURE__ */ a(_, { fallback: null, children: /* @__PURE__ */ a(
199
- ne,
201
+ oe,
200
202
  {
201
203
  isOpen: c,
202
- onClose: f,
204
+ onClose: g,
203
205
  onApply: d,
204
- columnId: l,
205
- columnLabel: u.headerName || l,
206
- columnType: h,
206
+ columnId: o,
207
+ columnLabel: u.headerName || o,
208
+ columnType: C,
207
209
  selectOptions: r?.selectOptions,
208
210
  isMultiSelect: r?.isMultiSelect,
209
- initialModel: y,
211
+ initialModel: b,
210
212
  api: i
211
213
  }
212
214
  ) });
213
215
  }
214
- function le({
216
+ function ie({
215
217
  isOpen: c,
216
- columnId: l,
218
+ columnId: o,
217
219
  gridApi: i,
218
- anchor: f,
220
+ anchor: g,
219
221
  onClose: d
220
222
  }) {
221
- return !c || !l || !i ? null : /* @__PURE__ */ a(
222
- te,
223
+ return !c || !o || !i ? null : /* @__PURE__ */ a(
224
+ re,
223
225
  {
224
226
  isOpen: c,
225
- columnId: l,
227
+ columnId: o,
226
228
  gridApi: i,
227
- anchor: f,
229
+ anchor: g,
228
230
  onClose: d
229
231
  }
230
232
  );
231
233
  }
232
234
  export {
233
- Fe as AgGridWrapper,
234
- Fe as default
235
+ ye as AgGridWrapper,
236
+ ye as default
235
237
  };
@@ -9,6 +9,9 @@ const d = e.withPart(r).withParams({
9
9
  checkboxCheckedBackgroundColor: "#ECEEFD",
10
10
  checkboxCheckedBorderColor: "#4259EE",
11
11
  checkboxCheckedShapeColor: "#4259EE",
12
+ checkboxIndeterminateBackgroundColor: "transparent",
13
+ checkboxIndeterminateBorderColor: "#4259EE",
14
+ checkboxIndeterminateShapeColor: "#4259EE",
12
15
  columnBorder: !0,
13
16
  columnDropCellBorder: !0,
14
17
  fontFamily: "inherit",
@@ -1,82 +1,82 @@
1
1
  import { jsx as M } from "react/jsx-runtime";
2
- import { useState as z, useRef as P, useCallback as h, useEffect as _ } from "react";
3
- import { useDataTable as q } from "./data-table-context.js";
4
- import { NestedList as B } from "../nested-list/nested-list.js";
5
- import { SelectionMode as H } from "../types/nested-list.types.js";
6
- import { mergePartialOrderedColumnState as J } from "./data-table-column-state.js";
7
- import { useImpactNovaI18n as K } from "../../../i18n/ImpactNovaI18nContext.js";
8
- const le = ({
2
+ import { useState as E, useRef as P, useCallback as m, useEffect as q } from "react";
3
+ import { useDataTable as B } from "./data-table-context.js";
4
+ import { NestedList as H } from "../nested-list/nested-list.js";
5
+ import { SelectionMode as J } from "../types/nested-list.types.js";
6
+ import { mergePartialOrderedColumnState as Q } from "./data-table-column-state.js";
7
+ import { useImpactNovaI18n as X } from "../../../i18n/ImpactNovaI18nContext.js";
8
+ const ne = ({
9
9
  enableApplyDiscard: b = !1,
10
10
  showSearch: R = !0,
11
11
  showSelectAll: w = !0,
12
12
  showCollapse: L = !0
13
13
  }) => {
14
- const { gridApi: l } = q(), { t: d } = K(), [j, N] = z([]), [A, F] = z(!1), m = P(!1), U = P(/* @__PURE__ */ new Map()), D = h(() => {
15
- if (!l || m.current) return;
16
- const n = l.getColumnState(), a = new Map(n.map((t) => [t.colId, t]));
17
- U.current = a;
18
- const o = l.getColumns() || [], u = new Map(o.map((t) => [t.getColId(), t])), c = [], e = [], S = /* @__PURE__ */ new Map(), T = (t, i) => {
14
+ const { gridApi: l } = B(), { t: f } = X(), [j, x] = E([]), [A, F] = E(!1), d = P(!1), [K, V] = E(!1), U = P(/* @__PURE__ */ new Map()), y = m(() => {
15
+ if (!l || d.current) return;
16
+ const o = l.getColumnState(), c = new Map(o.map((t) => [t.colId, t]));
17
+ U.current = c;
18
+ const n = l.getColumns() || [], u = new Map(n.map((t) => [t.getColId(), t])), a = [], e = [], S = /* @__PURE__ */ new Map(), D = (t, s) => {
19
19
  const r = t.getGroupId();
20
- let s = S.get(r);
21
- if (s) return s;
22
- const f = t.getOriginalParent(), g = f ? T(f, i).children : i, C = t.getColGroupDef();
23
- return s = {
20
+ let i = S.get(r);
21
+ if (i) return i;
22
+ const h = t.getOriginalParent(), g = h ? D(h, s).children : s, C = t.getColGroupDef();
23
+ return i = {
24
24
  id: r,
25
25
  label: C?.headerName || r,
26
26
  checked: !0,
27
27
  children: [],
28
28
  category: "group"
29
- }, S.set(r, s), g.push(s), s;
29
+ }, S.set(r, i), g.push(i), i;
30
30
  };
31
- let v = 0, O = 0, I = 0, x = 0;
32
- n.forEach((t) => {
33
- const i = u.get(t.colId);
34
- if (!i) return;
35
- let r = l.getDisplayNameForColumn(i, "header");
31
+ let T = 0, O = 0, v = 0, z = 0;
32
+ o.forEach((t) => {
33
+ const s = u.get(t.colId);
34
+ if (!s) return;
35
+ let r = l.getDisplayNameForColumn(s, "header");
36
36
  if (r === "") return;
37
37
  if (r == null) {
38
- const G = i.getColDef();
38
+ const G = s.getColDef();
39
39
  if (G.headerName === "") return;
40
40
  r = G.headerName || G.field || t.colId;
41
41
  }
42
42
  if (!r || r.trim() === "")
43
43
  return;
44
- const s = !t.hide, f = {
44
+ const i = !t.hide, h = {
45
45
  id: t.colId,
46
46
  label: r,
47
- checked: s
47
+ checked: i
48
48
  };
49
- t.pinned ? (v++, s && O++) : (I++, s && x++);
50
- const g = t.pinned ? c : e, C = i.getOriginalParent();
51
- C?.getColGroupDef().children ? T(C, g).children.push(f) : g.push(f);
49
+ t.pinned ? (T++, i && O++) : (v++, i && z++);
50
+ const g = t.pinned ? a : e, C = s.getOriginalParent();
51
+ C?.getColGroupDef().children ? D(C, g).children.push(h) : g.push(h);
52
52
  });
53
- const k = (t) => {
54
- let i = t.length > 0;
53
+ const I = (t) => {
54
+ let s = t.length > 0;
55
55
  for (const r of t)
56
- r.children && (r.checked = k(r.children)), r.checked || (i = !1);
57
- return i;
56
+ r.children && (r.checked = I(r.children)), r.checked || (s = !1);
57
+ return s;
58
58
  };
59
- k(c), k(e);
60
- const y = [];
61
- c.length > 0 && y.push({
59
+ I(a), I(e);
60
+ const k = [];
61
+ a.length > 0 && k.push({
62
62
  id: "root-frozen",
63
- label: d("dataTable.frozenColumns"),
64
- checked: v > 0 && O === v,
65
- children: c,
63
+ label: f("dataTable.frozenColumns"),
64
+ checked: T > 0 && O === T,
65
+ children: a,
66
66
  category: "structure",
67
67
  isDragDisabled: !0
68
- }), e.length > 0 && y.push({
68
+ }), e.length > 0 && k.push({
69
69
  id: "root-scrollable",
70
- label: d("dataTable.scrollableColumns"),
71
- checked: I > 0 && x === I,
70
+ label: f("dataTable.scrollableColumns"),
71
+ checked: v > 0 && z === v,
72
72
  children: e,
73
73
  category: "structure",
74
74
  isDragDisabled: !0
75
- }), N(y), F(!0);
76
- }, [l, d]);
77
- _(() => {
75
+ }), x(k), F(!0);
76
+ }, [l, f]);
77
+ q(() => {
78
78
  if (!l) return;
79
- const n = setTimeout(() => D(), 0), a = [
79
+ const o = setTimeout(() => y(), 0), c = [
80
80
  "columnVisible",
81
81
  "columnPinned",
82
82
  "columnMoved",
@@ -85,77 +85,83 @@ const le = ({
85
85
  "columnGroupOpened",
86
86
  "columnRowGroupChanged",
87
87
  "columnPivotModeChanged",
88
- "columnEverythingChanged"
88
+ "columnEverythingChanged",
89
+ "dragStopped",
90
+ "columnValueChanged",
91
+ "displayedColumnsChanged"
89
92
  ];
90
- let o = null;
93
+ let n = null;
91
94
  const u = () => {
92
- o && clearTimeout(o), o = setTimeout(() => {
93
- o = null, D();
95
+ n && clearTimeout(n), n = setTimeout(() => {
96
+ n = null;
97
+ const a = !d.current;
98
+ d.current = !1, y(), a && V((e) => !e);
94
99
  }, 150);
95
100
  };
96
- return l.isDestroyed() || a.forEach((c) => l.addEventListener(c, u)), () => {
97
- clearTimeout(n), o && clearTimeout(o), l.isDestroyed() || a.forEach((c) => l.removeEventListener(c, u));
101
+ return l.isDestroyed() || c.forEach((a) => l.addEventListener(a, u)), () => {
102
+ clearTimeout(o), n && clearTimeout(n), l.isDestroyed() || c.forEach((a) => l.removeEventListener(a, u));
98
103
  };
99
- }, [l, D]);
100
- const E = h((n) => {
101
- const a = [], o = (u, c) => {
104
+ }, [l, y]);
105
+ const N = m((o) => {
106
+ const c = [], n = (u, a) => {
102
107
  u.forEach((e) => {
103
108
  if (e.id === "root-frozen") {
104
- e.children && o(e.children, "left");
109
+ e.children && n(e.children, "left");
105
110
  return;
106
111
  }
107
112
  if (e.id === "root-scrollable") {
108
- e.children && o(e.children, null);
113
+ e.children && n(e.children, null);
109
114
  return;
110
115
  }
111
- e.category === "group" || e.children && e.children.length > 0 ? e.children && o(e.children, c) : l?.getColumn(e.id) && a.push({
116
+ e.category === "group" || e.children && e.children.length > 0 ? e.children && n(e.children, a) : l?.getColumn(e.id) && c.push({
112
117
  colId: e.id,
113
- pinned: c,
118
+ pinned: a,
114
119
  hide: !e.checked
115
120
  });
116
121
  });
117
122
  };
118
- return o(n, null), a;
119
- }, [l]), p = h((n) => {
123
+ return n(o, null), c;
124
+ }, [l]), p = m((o) => {
120
125
  if (!l) return;
121
- m.current = !0;
122
- const a = E(n);
123
- if (a.length === 0) {
126
+ d.current = !0;
127
+ const c = N(o);
128
+ if (c.length === 0) {
124
129
  setTimeout(() => {
125
- m.current = !1;
130
+ d.current = !1;
126
131
  }, 300);
127
132
  return;
128
133
  }
129
- const o = l.getColumnState(), u = J(o, a);
134
+ const n = l.getColumnState(), u = Q(n, c);
130
135
  l.applyColumnState({
131
136
  state: u,
132
137
  applyOrder: !0
133
138
  }), setTimeout(() => {
134
- m.current = !1;
139
+ d.current = !1;
135
140
  }, 300);
136
- }, [l, E]), V = h((n) => {
137
- p(n);
138
- }, [p]), W = h((n) => {
139
- b || p(n), N(n);
141
+ }, [l, N]), W = m((o) => {
142
+ p(o);
143
+ }, [p]), _ = m((o) => {
144
+ b || p(o), x(o);
140
145
  }, [b, p]);
141
146
  return A ? /* @__PURE__ */ M("div", { className: "flex flex-col h-full bg-canvas-elevated", children: /* @__PURE__ */ M(
142
- B,
147
+ H,
143
148
  {
144
149
  items: j,
145
- onChange: W,
146
- onSubmit: V,
150
+ onChange: _,
151
+ onSubmit: W,
147
152
  enableApplyDiscard: b,
148
153
  enableSearch: R,
149
154
  enableSelectAll: w,
150
155
  enableDragDrop: !0,
151
156
  enableCollapse: !0,
152
157
  enableGlobalCollapse: L,
153
- selectionMode: H.CASCADE_DOWN,
154
- searchPlaceholder: d("dataTable.searchColumnsPlaceholder"),
158
+ selectionMode: J.CASCADE_DOWN,
159
+ searchPlaceholder: f("dataTable.searchColumnsPlaceholder"),
155
160
  className: "h-full"
156
- }
157
- ) }) : /* @__PURE__ */ M("div", { className: "p-4 text-[13px] text-content-placeholder", children: d("dataTable.loadingColumns") });
161
+ },
162
+ K ? "sync-a" : "sync-b"
163
+ ) }) : /* @__PURE__ */ M("div", { className: "p-4 text-[13px] text-content-placeholder", children: f("dataTable.loadingColumns") });
158
164
  };
159
165
  export {
160
- le as DataTableColumnList
166
+ ne as DataTableColumnList
161
167
  };
@@ -0,0 +1,38 @@
1
+ import { SkuRowSelection, SkuRowSection } from './expandable-sku.types';
2
+ import * as React from "react";
3
+ export type { SkuRowAttributesSection, SkuRowCustomSection, SkuRowMetricColumn, SkuRowMetricsSection, SkuRowSelection, SkuRowSection, } from './expandable-sku.types';
4
+ export interface ExpandableSkuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> {
5
+ /** Primary line (e.g. SKU code). */
6
+ sku: string;
7
+ /** Secondary line (e.g. product title). */
8
+ subtitle?: React.ReactNode;
9
+ /** Optional slot next to the SKU (e.g. Mapped badge). */
10
+ badge?: React.ReactNode;
11
+ /**
12
+ * When set, a checkbox is shown. Omit entirely to hide selection (read-only / detail rows).
13
+ */
14
+ selection?: SkuRowSelection;
15
+ /**
16
+ * Row highlight (lavender shell + white detail card). Also applied when `selection.checked` is true
17
+ * so checkbox-only usage picks up the same UI without passing `selected`.
18
+ */
19
+ selected?: boolean;
20
+ /** Controlled expanded state. */
21
+ expanded?: boolean;
22
+ /** Uncontrolled default. Ignored when `expanded` is passed. */
23
+ defaultExpanded?: boolean;
24
+ onExpandedChange?: (open: boolean) => void;
25
+ /** Disable expand/collapse interaction. */
26
+ disabled?: boolean;
27
+ /** Ordered blocks inside the expanded panel. */
28
+ sections?: ReadonlyArray<SkuRowSection>;
29
+ /** Extra content after preset `sections` (inside the panel card). */
30
+ panelFooter?: React.ReactNode;
31
+ expandAriaLabel?: string;
32
+ collapseAriaLabel?: string;
33
+ }
34
+ /**
35
+ * Expandable SKU : optional checkbox, title stack, chevron when there is panel content,
36
+ * and a collapsible body with metrics, attribute pills, or custom sections.
37
+ */
38
+ export declare const ExpandableSku: React.ForwardRefExoticComponent<ExpandableSkuProps & React.RefAttributes<HTMLDivElement>>;