impact-nova 2.5.20 → 2.5.22

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 (33) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +52 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +1 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +61 -59
  5. package/dist/components/data/data-table/column-savability.d.ts +3 -0
  6. package/dist/components/data/data-table/column-savability.js +10 -0
  7. package/dist/components/data/data-table/data-table-column-list.js +117 -89
  8. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +1 -0
  9. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +23 -22
  10. package/dist/components/data/data-table/index.d.ts +2 -0
  11. package/dist/components/data/data-table/index.js +32 -28
  12. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +14 -13
  13. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
  14. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
  15. package/dist/components/data-display/calendar/calendar-available-view.d.ts +6 -2
  16. package/dist/components/data-display/calendar/calendar-available-view.js +18 -19
  17. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +6 -0
  18. package/dist/components/data-display/calendar/calendar-week-utils.js +33 -33
  19. package/dist/components/data-display/calendar/calendar-year-panes.js +68 -58
  20. package/dist/components/data-display/calendar/calendar-year-utils.d.ts +13 -0
  21. package/dist/components/data-display/calendar/calendar-year-utils.js +60 -51
  22. package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
  23. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  24. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  25. package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
  26. package/dist/components/forms/select/components/Submenu.js +3 -2
  27. package/dist/form-react/Fields/TextFieldWithBackendValidation.js +27 -26
  28. package/dist/form-react/types/fields.types.d.ts +5 -0
  29. package/dist/index.js +273 -269
  30. package/dist/llms/rules/ag-grid.js +1 -1
  31. package/dist/llms/rules/installation.js +1 -1
  32. package/dist/llms/rules/requirements.js +1 -1
  33. package/package.json +1 -1
@@ -3,6 +3,7 @@ import { NestedListItem } from '../nested-list/nested-list.types';
3
3
  export interface ColumnItemData extends Record<string, unknown> {
4
4
  hasSortApplied?: boolean;
5
5
  hasFilterApplied?: boolean;
6
+ isNonSavable?: boolean;
6
7
  pinned?: 'left' | 'right' | null;
7
8
  columnGroupChain?: readonly string[];
8
9
  }
@@ -1,6 +1,7 @@
1
- import { resolveColumnPinnedFromGridState as B } from "./data-table-column-apply.js";
2
- import { isPickerEligibleColumnId as E } from "./data-table-picker-column-eligibility.js";
3
- function H(l) {
1
+ import { resolveColumnPinnedFromGridState as E } from "./data-table-column-apply.js";
2
+ import { isPickerEligibleColumnId as H } from "./data-table-picker-column-eligibility.js";
3
+ import { resolveColumnSavability as q } from "./column-savability.js";
4
+ function K(l) {
4
5
  const a = [];
5
6
  let c = l.getOriginalParent();
6
7
  for (; c; ) {
@@ -9,90 +10,91 @@ function H(l) {
9
10
  }
10
11
  return a.reverse(), a;
11
12
  }
12
- function L(l, a) {
13
- const c = l.getColumnState(), u = l.getGridOption("context"), z = typeof u?.activeSearchColumnId == "string" ? u.activeSearchColumnId : null, _ = l.getAllGridColumns?.() ?? l.getColumns() ?? [], F = new Map(
14
- _.map((e) => [e.getColId(), e])
15
- ), h = [], m = [], v = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
16
- p.set(h, "f"), p.set(m, "s");
17
- let M = 0;
18
- const x = (e) => {
19
- let o = p.get(e);
20
- return o === void 0 && (o = `n${M++}`, p.set(e, o)), o;
21
- }, O = (e, o) => {
22
- const t = e.getGroupId(), i = x(o), r = `${t}::${i}`, n = v.get(r);
23
- if (n && n.list === o && o[o.length - 1] === n.node)
13
+ function A(l, a) {
14
+ const c = l.getColumnState(), u = l.getGridOption("context"), _ = typeof u?.activeSearchColumnId == "string" ? u.activeSearchColumnId : null, F = l.getAllGridColumns?.() ?? l.getColumns() ?? [], M = new Map(
15
+ F.map((o) => [o.getColId(), o])
16
+ ), f = [], h = [], v = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
17
+ m.set(f, "f"), m.set(h, "s");
18
+ let x = 0;
19
+ const O = (o) => {
20
+ let e = m.get(o);
21
+ return e === void 0 && (e = `n${x++}`, m.set(o, e)), e;
22
+ }, P = (o, e) => {
23
+ const t = o.getGroupId(), i = O(e), r = `${t}::${i}`, n = v.get(r);
24
+ if (n && n.list === e && e[e.length - 1] === n.node)
24
25
  return n.node;
25
- const s = y.get(r) || 0;
26
- y.set(r, s + 1);
27
- const k = e.getColGroupDef(), d = {
26
+ const s = S.get(r) || 0;
27
+ S.set(r, s + 1);
28
+ const k = o.getColGroupDef(), d = {
28
29
  id: s === 0 ? `${t}__${i}` : `${t}__${i}__${s}`,
29
30
  label: k?.headerName || t,
30
31
  checked: !0,
31
32
  children: [],
32
33
  category: "group"
33
34
  };
34
- return o.push(d), v.set(r, { list: o, node: d }), d;
35
+ return e.push(d), v.set(r, { list: e, node: d }), d;
35
36
  };
36
- let C = 0, N = 0, I = 0, S = 0;
37
- c.forEach((e) => {
38
- const o = F.get(e.colId) ?? l.getColumn(e.colId);
39
- if (!o) return;
40
- const t = o.getColDef(), i = t.headerName;
41
- if (i != null && i.trim() === "" || !E(e.colId))
37
+ let g = 0, y = 0, I = 0, N = 0;
38
+ c.forEach((o) => {
39
+ const e = M.get(o.colId) ?? l.getColumn(o.colId);
40
+ if (!e) return;
41
+ const t = e.getColDef(), i = t.headerName;
42
+ if (i != null && i.trim() === "" || !H(o.colId))
42
43
  return;
43
44
  const r = t.headerName;
44
- let n = typeof r == "string" && r.trim() !== "" ? r : l.getDisplayNameForColumn(o, "header");
45
- if ((!n || n.trim() === "") && (n = t.field ?? e.colId), !n || n.trim() === "")
45
+ let n = typeof r == "string" && r.trim() !== "" ? r : l.getDisplayNameForColumn(e, "header");
46
+ if ((!n || n.trim() === "") && (n = t.field ?? o.colId), !n || n.trim() === "")
46
47
  return;
47
- const s = !e.hide, k = !!e.sort, $ = o.isFilterActive() || z === e.colId, d = B(e, o), f = {
48
- id: e.colId,
48
+ const s = !o.hide, k = !!o.sort, $ = e.isFilterActive() || _ === o.colId, d = E(o, e), w = !q(e), p = {
49
+ id: o.colId,
49
50
  label: n,
50
51
  checked: s,
51
52
  data: {
52
53
  hasSortApplied: k,
53
54
  hasFilterApplied: $,
55
+ isNonSavable: w,
54
56
  pinned: d
55
57
  }
56
58
  };
57
- d ? (C++, s && N++) : (I++, s && S++);
58
- const w = d ? h : m, G = H(o), P = G.map((g) => g.getGroupId());
59
+ d ? (g++, s && y++) : (I++, s && N++);
60
+ const z = d ? f : h, G = K(e), T = G.map((C) => C.getGroupId());
59
61
  if (G.length > 0) {
60
- f.data = {
61
- ...f.data,
62
- columnGroupChain: P
62
+ p.data = {
63
+ ...p.data,
64
+ columnGroupChain: T
63
65
  };
64
- let g = w, D = null;
65
- for (const T of G)
66
- D = O(T, g), g = D.children;
67
- D.children.push(f);
66
+ let C = z, D = null;
67
+ for (const B of G)
68
+ D = P(B, C), C = D.children;
69
+ D.children.push(p);
68
70
  } else
69
- w.push(f);
71
+ z.push(p);
70
72
  });
71
- const b = (e) => {
72
- let o = e.length > 0;
73
- for (const t of e)
74
- t.children && (t.checked = b(t.children)), t.checked || (o = !1);
75
- return o;
73
+ const b = (o) => {
74
+ let e = o.length > 0;
75
+ for (const t of o)
76
+ t.children && (t.checked = b(t.children)), t.checked || (e = !1);
77
+ return e;
76
78
  };
77
- return b(h), b(m), [
79
+ return b(f), b(h), [
78
80
  {
79
81
  id: "root-frozen",
80
82
  label: a.frozenColumns,
81
- checked: C > 0 && N === C,
82
- children: h,
83
+ checked: g > 0 && y === g,
84
+ children: f,
83
85
  category: "structure",
84
86
  isDragDisabled: !0
85
87
  },
86
88
  {
87
89
  id: "root-scrollable",
88
90
  label: a.scrollableColumns,
89
- checked: I > 0 && S === I,
90
- children: m,
91
+ checked: I > 0 && N === I,
92
+ children: h,
91
93
  category: "structure",
92
94
  isDragDisabled: !0
93
95
  }
94
96
  ];
95
97
  }
96
98
  export {
97
- L as buildColumnTreeFromGrid
99
+ A as buildColumnTreeFromGrid
98
100
  };
@@ -19,6 +19,7 @@ export interface ColumnPickerAuthority {
19
19
  readonly columnGroupChain: ReadonlyMap<string, string[]>;
20
20
  readonly sortAppliedByColumnId: ReadonlyMap<string, boolean>;
21
21
  readonly filterAppliedByColumnId: ReadonlyMap<string, boolean>;
22
+ readonly nonSavableByColumnId: ReadonlyMap<string, boolean>;
22
23
  readonly revision: number;
23
24
  }
24
25
  export declare function buildAuthorityFromGrid(gridApi: GridApi): ColumnPickerAuthority | null;
@@ -1,100 +1,102 @@
1
- import { resolveColumnPinnedFromGridState as D } from "./data-table-column-apply.js";
2
- import { isPickerEligibleColumnId as P } from "./data-table-picker-column-eligibility.js";
3
- import { buildColumnIndicatorMapsFromGrid as F } from "./patch-column-tree-indicators-from-grid.js";
4
- import { Fnv1a128Hasher as G } from "../../../lib/hash/fnv1a128.js";
5
- let u = 0;
6
- function O(n) {
1
+ import { resolveColumnPinnedFromGridState as P } from "./data-table-column-apply.js";
2
+ import { isPickerEligibleColumnId as F } from "./data-table-picker-column-eligibility.js";
3
+ import { buildColumnIndicatorMapsFromGrid as S } from "./patch-column-tree-indicators-from-grid.js";
4
+ import { resolveColumnSavability as V } from "./column-savability.js";
5
+ import { Fnv1a128Hasher as N } from "../../../lib/hash/fnv1a128.js";
6
+ let d = 0;
7
+ function E(n) {
7
8
  const o = n.getColumnState(), i = n.getAllGridColumns?.() ?? n.getColumns?.() ?? [], e = new Map(
8
9
  i.map((t) => [t.getColId(), t])
9
- ), l = [], g = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map();
10
+ ), l = [], y = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
10
11
  for (const t of o) {
11
- const d = e.get(t.colId) ?? n.getColumn(t.colId);
12
- if (!d) continue;
13
- const a = d.getColDef(), p = a.headerName;
14
- if (p != null && p.trim() === "" || !P(t.colId))
12
+ const r = e.get(t.colId) ?? n.getColumn(t.colId);
13
+ if (!r) continue;
14
+ const a = r.getColDef(), p = a.headerName;
15
+ if (p != null && p.trim() === "" || !F(t.colId))
15
16
  continue;
16
17
  const C = a.headerName;
17
- let r = typeof C == "string" && C.trim() !== "" ? C : n.getDisplayNameForColumn(d, "header");
18
- if ((!r || r.trim() === "") && (r = a.field ?? t.colId), !r || r.trim() === "")
18
+ let s = typeof C == "string" && C.trim() !== "" ? C : n.getDisplayNameForColumn(r, "header");
19
+ if ((!s || s.trim() === "") && (s = a.field ?? t.colId), !s || s.trim() === "")
19
20
  continue;
20
- const N = D(t, d);
21
- l.push(t.colId), g.set(t.colId, !t.hide), y.set(t.colId, N), b.set(t.colId, r);
22
- const w = [];
23
- let s = d.getOriginalParent();
24
- for (; s; ) {
25
- const f = s.getColGroupDef();
26
- if (f?.headerName && f?.children) {
27
- const m = s.getGroupId();
28
- if (w.unshift(m), !c.has(m)) {
29
- const I = s.getOriginalParent();
30
- let h = null;
31
- for (; I; ) {
32
- const M = I.getColGroupDef();
33
- if (M?.headerName && M?.children) {
34
- h = I.getGroupId();
21
+ const D = P(t, r);
22
+ l.push(t.colId), y.set(t.colId, !t.hide), g.set(t.colId, D), b.set(t.colId, s), B.set(t.colId, !V(r));
23
+ const h = [];
24
+ let u = r.getOriginalParent();
25
+ for (; u; ) {
26
+ const I = u.getColGroupDef();
27
+ if (I?.headerName && I?.children) {
28
+ const m = u.getGroupId();
29
+ if (h.unshift(m), !c.has(m)) {
30
+ const f = u.getOriginalParent();
31
+ let M = null;
32
+ for (; f; ) {
33
+ const G = f.getColGroupDef();
34
+ if (G?.headerName && G?.children) {
35
+ M = f.getGroupId();
35
36
  break;
36
37
  }
37
38
  }
38
39
  c.set(m, {
39
40
  groupId: m,
40
- label: f.headerName,
41
- parentGroupId: h
41
+ label: I.headerName,
42
+ parentGroupId: M
42
43
  });
43
44
  }
44
45
  }
45
- s = s.getOriginalParent();
46
+ u = u.getOriginalParent();
46
47
  }
47
- v.set(t.colId, w);
48
+ v.set(t.colId, h);
48
49
  }
49
50
  if (l.length === 0)
50
51
  return null;
51
- const B = F(n);
52
+ const w = S(n);
52
53
  return {
53
54
  orderedColumnIds: l,
54
- visibilityByColumnId: g,
55
- pinByColumnId: y,
55
+ visibilityByColumnId: y,
56
+ pinByColumnId: g,
56
57
  labelByColumnId: b,
57
58
  groupMetadata: c,
58
59
  columnGroupChain: v,
59
- sortAppliedByColumnId: B.sortAppliedByColumnId,
60
- filterAppliedByColumnId: B.filterAppliedByColumnId,
61
- revision: ++u
60
+ sortAppliedByColumnId: w.sortAppliedByColumnId,
61
+ filterAppliedByColumnId: w.filterAppliedByColumnId,
62
+ nonSavableByColumnId: B,
63
+ revision: ++d
62
64
  };
63
65
  }
64
- function S(n, o, i) {
66
+ function j(n, o, i) {
65
67
  const e = new Map(n.visibilityByColumnId);
66
- return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++u };
68
+ return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++d };
67
69
  }
68
- function k(n, o) {
70
+ function q(n, o) {
69
71
  const i = /* @__PURE__ */ new Map();
70
72
  for (const e of n.orderedColumnIds)
71
73
  i.set(e, o);
72
- return { ...n, visibilityByColumnId: i, revision: ++u };
74
+ return { ...n, visibilityByColumnId: i, revision: ++d };
73
75
  }
74
- function E(n, o, i) {
76
+ function z(n, o, i) {
75
77
  const e = new Map(n.visibilityByColumnId);
76
78
  for (const l of o)
77
79
  e.set(l, i);
78
- return { ...n, visibilityByColumnId: e, revision: ++u };
80
+ return { ...n, visibilityByColumnId: e, revision: ++d };
79
81
  }
80
- function j(n, o, i) {
82
+ function J(n, o, i) {
81
83
  if (o === i) return n;
82
84
  const e = [...n.orderedColumnIds], [l] = e.splice(o, 1);
83
- return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++u };
85
+ return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++d };
84
86
  }
85
- function q(n, o, i) {
87
+ function K(n, o, i) {
86
88
  const e = new Map(n.pinByColumnId);
87
- return e.set(o, i), { ...n, pinByColumnId: e, revision: ++u };
89
+ return e.set(o, i), { ...n, pinByColumnId: e, revision: ++d };
88
90
  }
89
- function z(n) {
91
+ function L(n) {
90
92
  return n.orderedColumnIds.map((o) => ({
91
93
  colId: o,
92
94
  hide: !n.visibilityByColumnId.get(o),
93
95
  pinned: n.pinByColumnId.get(o) ?? null
94
96
  }));
95
97
  }
96
- function J(n) {
97
- const o = new G(), i = new G();
98
+ function Q(n) {
99
+ const o = new N(), i = new N();
98
100
  for (const e of n.orderedColumnIds) {
99
101
  const l = n.pinByColumnId.get(e) ?? "0";
100
102
  o.update(e).update(":").update(l === null ? "0" : l).update("|"), i.update(e).update(":").update(n.visibilityByColumnId.get(e) ? "1" : "0").update("|");
@@ -105,12 +107,12 @@ function J(n) {
105
107
  };
106
108
  }
107
109
  export {
108
- O as buildAuthorityFromGrid,
109
- z as buildColumnStateFromAuthority,
110
- J as fingerprintAuthority,
111
- j as reorderColumn,
112
- k as toggleAllColumnsVisibility,
113
- S as toggleColumnVisibility,
114
- E as toggleColumnsVisibility,
115
- q as updateColumnPin
110
+ E as buildAuthorityFromGrid,
111
+ L as buildColumnStateFromAuthority,
112
+ Q as fingerprintAuthority,
113
+ J as reorderColumn,
114
+ q as toggleAllColumnsVisibility,
115
+ j as toggleColumnVisibility,
116
+ z as toggleColumnsVisibility,
117
+ K as updateColumnPin
116
118
  };
@@ -0,0 +1,3 @@
1
+ import { Column } from 'ag-grid-community';
2
+ /** Returns `true` when the column may be stored in saved views (default). */
3
+ export declare function resolveColumnSavability(column: Column): boolean;
@@ -0,0 +1,10 @@
1
+ function t(e) {
2
+ if (e && typeof e == "object")
3
+ return e;
4
+ }
5
+ function n(e) {
6
+ return t(e.getColDef().context)?.isSavable !== !1;
7
+ }
8
+ export {
9
+ n as resolveColumnSavability
10
+ };
@@ -1,116 +1,144 @@
1
- import { jsxs as z, jsx as n } from "react/jsx-runtime";
2
- import { useRef as B, useState as H, useMemo as m, useCallback as s } from "react";
3
- import { useDataTable as j } from "./data-table-context.js";
4
- import { useDataTableSheet as G } from "./data-table-sheet-context.js";
5
- import { NestedList as U } from "../nested-list/nested-list.js";
6
- import { SelectionMode as W } from "../nested-list/nested-list.types.js";
7
- import { useImpactNovaI18n as Z } from "../../../i18n/use-impact-nova-i18n.js";
8
- import { countNestedListLeaves as q, buildCollapsedStateForAllGroups as J } from "../nested-list/nested-list-tree-utils.js";
9
- import { NESTED_LIST_VIRTUALIZATION_THRESHOLD as K, NESTED_LIST_ROOT_FROZEN_ID as Q } from "../nested-list/nested-list-constants.js";
10
- import { PinSwitch as X } from "./pin-switch.js";
11
- import { ColumnIndicator as C } from "./column-indicator.js";
12
- import { IndicatorLegend as Y } from "./indicator-legend.js";
13
- import { useDataTableColumnListSync as $ } from "./use-data-table-column-list-sync.js";
14
- import { buildFlatColumnVirtualRowModel as ee } from "./data-table-flat-column-virtual-rows.js";
15
- import { isValidColumnPickerGroupDrop as te } from "./column-picker-drop-validation.js";
16
- const le = 100, Le = ({
17
- enableApplyDiscard: c = !1,
18
- showSearch: A = !0,
19
- showSelectAll: b = !0,
20
- showCollapse: L = !0
1
+ import { jsxs as H, jsx as a } from "react/jsx-runtime";
2
+ import { useRef as j, useState as G, useMemo as s, useCallback as d } from "react";
3
+ import { useDataTable as U } from "./data-table-context.js";
4
+ import { useDataTableSheet as W } from "./data-table-sheet-context.js";
5
+ import { NestedList as Z } from "../nested-list/nested-list.js";
6
+ import { SelectionMode as q } from "../nested-list/nested-list.types.js";
7
+ import { useImpactNovaI18n as J } from "../../../i18n/use-impact-nova-i18n.js";
8
+ import { countNestedListLeaves as K, buildCollapsedStateForAllGroups as Q } from "../nested-list/nested-list-tree-utils.js";
9
+ import { NESTED_LIST_VIRTUALIZATION_THRESHOLD as X, NESTED_LIST_ROOT_FROZEN_ID as Y } from "../nested-list/nested-list-constants.js";
10
+ import { PinSwitch as $ } from "./pin-switch.js";
11
+ import { ColumnIndicator as f } from "./column-indicator.js";
12
+ import { IndicatorLegend as ee } from "./indicator-legend.js";
13
+ import { useDataTableColumnListSync as te } from "./use-data-table-column-list-sync.js";
14
+ import { buildFlatColumnVirtualRowModel as ne } from "./data-table-flat-column-virtual-rows.js";
15
+ import { isValidColumnPickerGroupDrop as oe } from "./column-picker-drop-validation.js";
16
+ const le = 100, Ae = ({
17
+ enableApplyDiscard: p = !1,
18
+ showSearch: v = !0,
19
+ showSelectAll: g = !0,
20
+ showCollapse: A = !0
21
21
  }) => {
22
- const { gridApi: S } = j(), { open: g } = G(), { t: i } = Z(), T = B({}), [a, I] = H({}), u = m(
22
+ const { gridApi: L } = U(), { open: I } = W(), { t: u } = J(), T = j({}), [i, y] = G({}), c = s(
23
23
  () => ({
24
- frozenColumns: i("dataTable.frozenColumns"),
25
- scrollableColumns: i("dataTable.scrollableColumns")
24
+ frozenColumns: u("dataTable.frozenColumns"),
25
+ scrollableColumns: u("dataTable.scrollableColumns")
26
26
  }),
27
- [i]
27
+ [u]
28
28
  ), {
29
- items: o,
30
- columnPickerAuthority: l,
31
- pickerMode: v,
32
- isReady: D,
33
- listWrapperRef: y,
34
- handleChange: f,
35
- handleSubmit: R,
36
- handlePinChange: h,
37
- handleAuthorityItemToggle: _,
38
- handleAuthorityVirtualDrop: N,
39
- handleAuthoritySelectAll: x
40
- } = $({
41
- gridApi: S,
42
- frozenColumnsLabel: u.frozenColumns,
43
- scrollableColumnsLabel: u.scrollableColumns,
44
- isSyncActive: g
45
- }), t = v === "authority-flat" && l != null, d = m(() => t && l ? l.orderedColumnIds.length : q(o), [t, l, o]), E = m(() => t || Object.keys(a).length > 0 || o.length === 0 || d <= le ? a : J(o), [a, d, t, o]), O = m(() => d >= K ? "virtual-index" : "sortable", [d]), F = s(
46
- (e) => l ? ee(l, u, {
29
+ items: l,
30
+ columnPickerAuthority: t,
31
+ pickerMode: D,
32
+ isReady: N,
33
+ listWrapperRef: R,
34
+ handleChange: h,
35
+ handleSubmit: _,
36
+ handlePinChange: C,
37
+ handleAuthorityItemToggle: E,
38
+ handleAuthorityVirtualDrop: x,
39
+ handleAuthoritySelectAll: O
40
+ } = te({
41
+ gridApi: L,
42
+ frozenColumnsLabel: c.frozenColumns,
43
+ scrollableColumnsLabel: c.scrollableColumns,
44
+ isSyncActive: I
45
+ }), n = D === "authority-flat" && t != null, m = s(() => n && t ? t.orderedColumnIds.length : K(l), [n, t, l]), F = s(() => n || Object.keys(i).length > 0 || l.length === 0 || m <= le ? i : Q(l), [i, m, n, l]), V = s(() => m >= X ? "virtual-index" : "sortable", [m]), b = s(() => {
46
+ if (n && t) {
47
+ for (const r of t.nonSavableByColumnId.values())
48
+ if (r)
49
+ return !0;
50
+ return !1;
51
+ }
52
+ const e = [...l];
53
+ for (; e.length > 0; ) {
54
+ const r = e.pop();
55
+ if (!r)
56
+ continue;
57
+ if (r.children) {
58
+ e.push(...r.children);
59
+ continue;
60
+ }
61
+ if (r.data?.isNonSavable)
62
+ return !0;
63
+ }
64
+ return !1;
65
+ }, [t, n, l]), S = s(() => {
66
+ const e = [
67
+ { type: "sort" },
68
+ { type: "filter" }
69
+ ];
70
+ return b && e.push({ type: "nonSavable" }), e;
71
+ }, [b]), M = d(
72
+ (e) => t ? ne(t, c, {
47
73
  searchQuery: e,
48
- sortAppliedByColumnId: l.sortAppliedByColumnId,
49
- filterAppliedByColumnId: l.filterAppliedByColumnId
50
- }) : { rowCount: 0, getRowAt: () => ({ item: o[0], level: 0, indentLevel: 0 }) },
51
- [l, u, o]
52
- ), V = s(
74
+ sortAppliedByColumnId: t.sortAppliedByColumnId,
75
+ filterAppliedByColumnId: t.filterAppliedByColumnId,
76
+ nonSavableByColumnId: t.nonSavableByColumnId
77
+ }) : { rowCount: 0, getRowAt: () => ({ item: l[0], level: 0, indentLevel: 0 }) },
78
+ [t, c, l]
79
+ ), B = d(
53
80
  (e) => {
54
- f(e, c);
81
+ h(e, p);
55
82
  },
56
- [c, f]
57
- ), M = s(
58
- (e) => t ? !0 : te(e),
59
- [t]
60
- ), k = s(
61
- (e, p) => {
62
- if (!p.isLeaf) return null;
63
- const r = e.data;
64
- return !r?.hasSortApplied && !r?.hasFilterApplied ? null : /* @__PURE__ */ z("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
65
- r?.hasSortApplied && /* @__PURE__ */ n(C, { type: "sort" }),
66
- r?.hasFilterApplied && /* @__PURE__ */ n(C, { type: "filter" })
83
+ [p, h]
84
+ ), k = d(
85
+ (e) => n ? !0 : oe(e),
86
+ [n]
87
+ ), w = d(
88
+ (e, r) => {
89
+ if (!r.isLeaf) return null;
90
+ const o = e.data;
91
+ return !o?.hasSortApplied && !o?.hasFilterApplied && !o?.isNonSavable ? null : /* @__PURE__ */ H("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
92
+ o?.hasSortApplied && /* @__PURE__ */ a(f, { type: "sort" }),
93
+ o?.hasFilterApplied && /* @__PURE__ */ a(f, { type: "filter" }),
94
+ o?.isNonSavable && /* @__PURE__ */ a(f, { type: "nonSavable" })
67
95
  ] });
68
96
  },
69
97
  []
70
- ), P = s(
71
- (e, p) => {
72
- const r = e.data;
73
- return e.category === "structure" ? e.id !== Q ? null : /* @__PURE__ */ n(Y, {}) : !p.isLeaf || !(r?.pinned === "left" || r?.pinned === "right") ? null : /* @__PURE__ */ n(
74
- X,
98
+ ), P = d(
99
+ (e, r) => {
100
+ const o = e.data;
101
+ return e.category === "structure" ? e.id !== Y ? null : /* @__PURE__ */ a(ee, { entries: S }) : !r.isLeaf || !(o?.pinned === "left" || o?.pinned === "right") ? null : /* @__PURE__ */ a(
102
+ $,
75
103
  {
76
- value: r?.pinned ?? null,
77
- onChange: (w) => h(e.id, w),
104
+ value: o?.pinned ?? null,
105
+ onChange: (z) => C(e.id, z),
78
106
  className: "shrink-0"
79
107
  }
80
108
  );
81
109
  },
82
- [h]
110
+ [C, S]
83
111
  );
84
- return D ? /* @__PURE__ */ n("div", { ref: y, className: "flex flex-col flex-1 min-h-0 bg-canvas-elevated", children: /* @__PURE__ */ n(
85
- U,
112
+ return N ? /* @__PURE__ */ a("div", { ref: R, className: "flex flex-col flex-1 min-h-0 bg-canvas-elevated", children: /* @__PURE__ */ a(
113
+ Z,
86
114
  {
87
- items: o,
88
- onChange: V,
89
- onSubmit: R,
90
- onItemToggle: t ? _ : void 0,
91
- onVirtualDrop: t ? N : void 0,
92
- flatVirtualRowResolver: t ? F : void 0,
93
- onFlatVirtualSelectAll: t ? x : void 0,
94
- isValidDropTarget: t ? void 0 : M,
95
- renderLabelExtras: k,
115
+ items: l,
116
+ onChange: B,
117
+ onSubmit: _,
118
+ onItemToggle: n ? E : void 0,
119
+ onVirtualDrop: n ? x : void 0,
120
+ flatVirtualRowResolver: n ? M : void 0,
121
+ onFlatVirtualSelectAll: n ? O : void 0,
122
+ isValidDropTarget: n ? void 0 : k,
123
+ renderLabelExtras: w,
96
124
  renderActions: P,
97
- enableApplyDiscard: c,
98
- enableSearch: A,
99
- enableSelectAll: b,
125
+ enableApplyDiscard: p,
126
+ enableSearch: v,
127
+ enableSelectAll: g,
100
128
  enableDragDrop: !0,
101
- dragMode: O,
129
+ dragMode: V,
102
130
  enableCollapse: !0,
103
- enableGlobalCollapse: L,
104
- selectionMode: W.CASCADE_DOWN,
105
- searchPlaceholder: i("dataTable.searchColumnsPlaceholder"),
131
+ enableGlobalCollapse: A,
132
+ selectionMode: q.CASCADE_DOWN,
133
+ searchPlaceholder: u("dataTable.searchColumnsPlaceholder"),
106
134
  className: "flex-1 min-h-0",
107
- initialCollapsedItems: E,
135
+ initialCollapsedItems: F,
108
136
  onCollapseChange: (e) => {
109
- T.current = e, I(e);
137
+ T.current = e, y(e);
110
138
  }
111
139
  }
112
- ) }) : /* @__PURE__ */ n("div", { className: "p-4 text-[13px] text-content-placeholder", children: i("dataTable.loadingColumns") });
140
+ ) }) : /* @__PURE__ */ a("div", { className: "p-4 text-[13px] text-content-placeholder", children: u("dataTable.loadingColumns") });
113
141
  };
114
142
  export {
115
- Le as DataTableColumnList
143
+ Ae as DataTableColumnList
116
144
  };
@@ -6,6 +6,7 @@ export interface FlatColumnVirtualRowModelOptions {
6
6
  searchQuery?: string;
7
7
  sortAppliedByColumnId?: ReadonlyMap<string, boolean>;
8
8
  filterAppliedByColumnId?: ReadonlyMap<string, boolean>;
9
+ nonSavableByColumnId?: ReadonlyMap<string, boolean>;
9
10
  }
10
11
  export interface FlatColumnVirtualRowModel {
11
12
  rowCount: number;