impact-nova 2.5.11 → 2.5.13

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 (111) 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 +55 -50
  3. package/dist/components/data/data-table/column-picker-authority.d.ts +34 -0
  4. package/dist/components/data/data-table/column-picker-authority.js +116 -0
  5. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
  6. package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
  7. package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
  8. package/dist/components/data/data-table/data-table-column-apply.js +84 -73
  9. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
  10. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
  11. package/dist/components/data/data-table/data-table-column-list.js +94 -64
  12. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
  13. package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
  14. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +26 -0
  15. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +195 -0
  16. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
  17. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
  18. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
  19. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -11
  20. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
  21. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
  22. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
  23. package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
  24. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
  25. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
  26. package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
  27. package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
  28. package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
  29. package/dist/components/data/nested-list/components/SortableItem.js +62 -60
  30. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
  31. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
  32. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
  33. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
  34. package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
  35. package/dist/components/data/nested-list/nested-list-constants.js +10 -4
  36. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
  37. package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
  38. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
  39. package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
  40. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
  41. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
  42. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
  43. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
  44. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
  45. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
  46. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
  47. package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
  48. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
  49. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
  50. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
  51. package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
  52. package/dist/components/data/nested-list/nested-list.js +322 -336
  53. package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
  54. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +0 -2
  55. package/dist/components/data-display/calendar/calendar-apply-validation.js +67 -64
  56. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -4
  57. package/dist/components/data-display/calendar/calendar-day-picker-components.js +152 -163
  58. package/dist/components/data-display/calendar/calendar-day-picker-view.js +76 -77
  59. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +0 -6
  60. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +18 -34
  61. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +0 -5
  62. package/dist/components/data-display/calendar/calendar-month-utils.js +64 -85
  63. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +0 -1
  64. package/dist/components/data-display/calendar/calendar-selection-appearance.js +30 -31
  65. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +1 -2
  66. package/dist/components/data-display/calendar/calendar-week-number-cell.js +41 -55
  67. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +0 -2
  68. package/dist/components/data-display/calendar/calendar-year-panes.js +1 -3
  69. package/dist/components/data-display/calendar/calendar.js +143 -146
  70. package/dist/components/data-display/calendar/calendar.types.d.ts +0 -5
  71. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +1 -2
  72. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +74 -79
  73. package/dist/components/data-display/calendar/use-calendar-state.d.ts +1 -3
  74. package/dist/components/data-display/calendar/use-calendar-state.js +325 -403
  75. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  76. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  77. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  78. package/dist/components/forms/date-picker/date-picker.js +58 -60
  79. package/dist/components/forms/date-picker/date-picker.types.d.ts +0 -5
  80. package/dist/components/forms/date-picker/date-range-picker.js +64 -66
  81. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +0 -1
  82. package/dist/components/forms/date-picker/fiscal-pass-through.js +2 -3
  83. package/dist/components/forms/date-picker/month-picker.js +59 -61
  84. package/dist/components/forms/date-picker/month-range-picker.js +61 -63
  85. package/dist/components/forms/date-picker/multi-date-picker.js +49 -51
  86. package/dist/components/forms/date-picker/multi-month-picker.js +47 -49
  87. package/dist/components/forms/date-picker/multi-quarter-picker.js +44 -46
  88. package/dist/components/forms/date-picker/multi-week-picker.js +51 -53
  89. package/dist/components/forms/date-picker/multi-year-picker.js +46 -48
  90. package/dist/components/forms/date-picker/quarter-picker.js +44 -46
  91. package/dist/components/forms/date-picker/quarter-range-picker.js +43 -45
  92. package/dist/components/forms/date-picker/week-picker.js +66 -68
  93. package/dist/components/forms/date-picker/week-range-picker.js +80 -82
  94. package/dist/components/forms/date-picker/year-picker.js +45 -47
  95. package/dist/components/forms/date-picker/year-range-picker.js +45 -47
  96. package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
  97. package/dist/components/forms/select/components/Submenu.js +2 -3
  98. package/dist/form-react/Fields/DateInputField.js +50 -51
  99. package/dist/form-react/Fields/DateRangeField.js +13 -14
  100. package/dist/form-react/Fields/MonthRangeField.js +28 -29
  101. package/dist/form-react/Fields/MultiMonthPickerField.js +12 -13
  102. package/dist/form-react/Fields/MultiWeekPickerField.js +17 -18
  103. package/dist/form-react/Fields/WeekRangePicker.js +21 -22
  104. package/dist/form-react/types/fields.types.d.ts +0 -12
  105. package/dist/impact-nova.css +1 -1
  106. package/dist/lib/hash/fnv1a128.d.ts +16 -0
  107. package/dist/lib/hash/fnv1a128.js +21 -0
  108. package/dist/llms/rules/ag-grid.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/components/data-display/calendar/calendar-available-view.d.ts +0 -27
  111. package/dist/components/data-display/calendar/calendar-available-view.js +0 -85
@@ -1,187 +1,306 @@
1
- import { buildColumnTreeFromGrid as w } from "./build-column-tree-from-grid.js";
2
- import { computeColumnListSyncFingerprints as M } from "./data-table-column-list-sync.js";
3
- import { fingerprintColumnTreeIndicators as _, normalizeColumnPinned as V } from "./data-table-column-apply.js";
4
- import { patchColumnTreeIndicatorsFromGrid as z } from "./patch-column-tree-indicators-from-grid.js";
5
- import { patchColumnTreeVisibilityFromGrid as C } from "./patch-column-tree-visibility-from-grid.js";
6
- function d(i) {
7
- return i.map((n) => {
8
- const e = V(n.pinned) ?? "0";
9
- return `${n.colId}:${e}`;
10
- }).join("|");
11
- }
12
- function m(i) {
13
- return i.map((n) => `${n.colId}:${n.hide ? "0" : "1"}`).join("|");
14
- }
15
- function H(i) {
16
- return d(i.getColumnState());
17
- }
18
- function O(i) {
19
- return m(i.getColumnState());
20
- }
21
- const p = /* @__PURE__ */ new WeakMap(), h = {
1
+ import { buildColumnTreeFromGrid as W } from "./build-column-tree-from-grid.js";
2
+ import { computeColumnListSyncFingerprints as U } from "./data-table-column-list-sync.js";
3
+ import { fingerprintGridColumnIndicators as g, normalizeColumnPinned as x } from "./data-table-column-apply.js";
4
+ import { isPickerEligibleColumnId as Z } from "./data-table-picker-column-eligibility.js";
5
+ import { patchColumnTreeIndicatorsFromGrid as w } from "./patch-column-tree-indicators-from-grid.js";
6
+ import { patchColumnTreeVisibilityFromGrid as G } from "./patch-column-tree-visibility-from-grid.js";
7
+ import { Fnv1a128Hasher as V } from "../../../lib/hash/fnv1a128.js";
8
+ import { buildAuthorityFromGrid as k, fingerprintAuthority as j } from "./column-picker-authority.js";
9
+ import { buildAuthorityFlatShellItems as y, isFlatLargeColumnPicker as D } from "./data-table-flat-column-virtual-rows.js";
10
+ import { NESTED_LIST_ROOT_FROZEN_ID as O, NESTED_LIST_ROOT_SCROLLABLE_ID as R } from "../nested-list/nested-list-constants.js";
11
+ function m(e) {
12
+ const i = new V();
13
+ for (const r of e) {
14
+ const n = x(r.pinned) ?? "0";
15
+ i.update(r.colId).update(":").update(n).update("|");
16
+ }
17
+ return i.digest();
18
+ }
19
+ function p(e) {
20
+ const i = new V();
21
+ for (const r of e)
22
+ i.update(r.colId).update(":").update(r.hide ? "0" : "1").update("|");
23
+ return i.digest();
24
+ }
25
+ function ut(e) {
26
+ return m(e.getColumnState());
27
+ }
28
+ function lt(e) {
29
+ return p(e.getColumnState());
30
+ }
31
+ const C = /* @__PURE__ */ new WeakMap(), S = {
22
32
  frozenColumns: "__prewarm_frozen__",
23
33
  scrollableColumns: "__prewarm_scrollable__"
24
- };
25
- function I(i) {
26
- return typeof i.isDestroyed == "function" && i.isDestroyed();
34
+ }, L = 5e3;
35
+ function B(e) {
36
+ return typeof e.isDestroyed == "function" && e.isDestroyed();
27
37
  }
28
- function F(i, n) {
29
- return i.map((e) => e.id === "root-frozen" ? { ...e, label: n.frozenColumns } : e.id === "root-scrollable" ? { ...e, label: n.scrollableColumns } : e);
38
+ function T(e, i) {
39
+ return e.map((r) => r.id === O ? { ...r, label: i.frozenColumns } : r.id === R ? { ...r, label: i.scrollableColumns } : r);
30
40
  }
31
- function P(i) {
32
- const n = /* @__PURE__ */ new Set(), e = (r) => {
33
- for (const t of r) {
34
- if (t.id === "root-frozen" || t.id === "root-scrollable") {
35
- t.children && e(t.children);
41
+ function J(e) {
42
+ const i = /* @__PURE__ */ new Set(), r = (n) => {
43
+ for (const t of n) {
44
+ if (t.id === O || t.id === R) {
45
+ t.children && r(t.children);
36
46
  continue;
37
47
  }
38
48
  if (t.children && t.children.length > 0) {
39
- e(t.children);
49
+ r(t.children);
40
50
  continue;
41
51
  }
42
- t.id && n.add(t.id);
52
+ t.id && i.add(t.id);
43
53
  }
44
54
  };
45
- return e(i), n;
46
- }
47
- function b(i, n) {
48
- const e = p.get(i);
49
- return e ? {
50
- fingerprints: e.fingerprints,
51
- items: F(e.items, n),
52
- gridLayoutFingerprint: e.gridLayoutFingerprint,
53
- gridVisibilityFingerprint: e.gridVisibilityFingerprint,
54
- leafColumnIds: e.leafColumnIds
55
- } : null;
56
- }
57
- function u(i, n) {
58
- const e = M(n), r = i.getColumnState();
59
- return p.set(i, {
60
- fingerprints: e,
61
- items: F(n, h),
62
- gridLayoutFingerprint: d(r),
63
- gridVisibilityFingerprint: m(r),
64
- leafColumnIds: P(n)
65
- }), e;
66
- }
67
- function v(i, n) {
68
- const e = w(i, n);
69
- return e ? (u(i, e), e) : null;
70
- }
71
- function D(i, n) {
72
- if (I(i))
55
+ return r(e), i;
56
+ }
57
+ function v(e, i) {
58
+ const r = C.get(e);
59
+ if (!r)
60
+ return null;
61
+ const n = r.pickerMode === "authority-flat" && r.authority ? y(r.authority, i) : T(r.items, i);
62
+ return {
63
+ fingerprints: r.fingerprints,
64
+ items: n,
65
+ pickerMode: r.pickerMode,
66
+ authority: r.authority,
67
+ gridLayoutFingerprint: r.gridLayoutFingerprint,
68
+ gridVisibilityFingerprint: r.gridVisibilityFingerprint,
69
+ leafColumnIds: r.leafColumnIds
70
+ };
71
+ }
72
+ function f(e, i) {
73
+ const r = U(i), n = {
74
+ layout: r.layout,
75
+ visibility: r.visibility,
76
+ indicators: g(e)
77
+ }, t = e.getColumnState(), o = J(i);
78
+ return C.set(e, {
79
+ fingerprints: n,
80
+ items: T(i, S),
81
+ pickerMode: "tree",
82
+ authority: null,
83
+ gridLayoutFingerprint: m(t),
84
+ gridVisibilityFingerprint: p(t),
85
+ leafColumnIds: o
86
+ }), n;
87
+ }
88
+ function M(e, i) {
89
+ const r = j(i), n = {
90
+ layout: r.layout,
91
+ visibility: r.visibility,
92
+ indicators: g(e)
93
+ }, t = e.getColumnState(), o = new Set(i.orderedColumnIds);
94
+ return C.set(e, {
95
+ fingerprints: n,
96
+ items: y(i, S),
97
+ pickerMode: "authority-flat",
98
+ authority: i,
99
+ gridLayoutFingerprint: m(t),
100
+ gridVisibilityFingerprint: p(t),
101
+ leafColumnIds: o
102
+ }), n;
103
+ }
104
+ function K(e) {
105
+ const i = k(e);
106
+ if (i) {
107
+ if (D(i, L)) {
108
+ M(e, i);
109
+ return;
110
+ }
111
+ z(e, S);
112
+ }
113
+ }
114
+ function z(e, i) {
115
+ const r = W(e, i);
116
+ return r ? (f(e, r), r) : null;
117
+ }
118
+ function A(e, i, r) {
119
+ if (B(e))
73
120
  return !1;
74
- const e = i.getColumnState();
75
- let r = 0;
76
- for (const t of e)
77
- if (!(!t.colId || t.colId === "ag-Grid-SelectionColumn") && (r += 1, !n.has(t.colId)))
121
+ const n = r ?? e.getColumnState();
122
+ let t = 0;
123
+ for (const o of n)
124
+ if (Z(o.colId) && (t += 1, !i.has(o.colId)))
78
125
  return !0;
79
- return r !== n.size;
80
- }
81
- function $(i) {
82
- const { gridApi: n, labels: e, previousFingerprints: r } = i, t = b(n, e), y = n.getColumnState(), S = d(y), T = m(y), k = r.layout === "" && r.visibility === "" && r.indicators === "";
83
- if (t != null && !D(n, t.leafColumnIds) && t) {
84
- const o = z(
85
- t.items,
86
- n
87
- ), L = _(o), c = S !== t.gridLayoutFingerprint, a = T !== t.gridVisibilityFingerprint, f = L !== t.fingerprints.indicators;
88
- if (!c && !a && !f) {
89
- if (k) {
90
- const s = u(n, o);
91
- return {
92
- rootItems: o,
126
+ return t !== i.size;
127
+ }
128
+ function at(e) {
129
+ const { gridApi: i, labels: r, previousFingerprints: n } = e, t = v(i, r), o = i.getColumnState(), b = m(o), I = p(o), F = n.layout === "" && n.visibility === "" && n.indicators === "";
130
+ if (t != null && !A(i, t.leafColumnIds, o) && t) {
131
+ const l = b !== t.gridLayoutFingerprint, c = I !== t.gridVisibilityFingerprint, d = g(i) !== t.fingerprints.indicators;
132
+ if (!l && !c && !d) {
133
+ if (t.pickerMode === "authority-flat" && t.authority)
134
+ return F ? {
135
+ rootItems: y(t.authority, r),
136
+ authority: t.authority,
137
+ pickerMode: "authority-flat",
93
138
  syncMode: "structural",
94
- fingerprints: s
139
+ fingerprints: t.fingerprints
140
+ } : n.layout !== t.fingerprints.layout || n.visibility !== t.fingerprints.visibility || n.indicators !== t.fingerprints.indicators ? {
141
+ rootItems: t.items,
142
+ authority: t.authority,
143
+ pickerMode: "authority-flat",
144
+ syncMode: "structural",
145
+ fingerprints: t.fingerprints
146
+ } : {
147
+ rootItems: null,
148
+ authority: t.authority,
149
+ pickerMode: "authority-flat",
150
+ syncMode: "skip",
151
+ fingerprints: t.fingerprints
95
152
  };
96
- }
97
- if (r.layout !== t.fingerprints.layout || r.visibility !== t.fingerprints.visibility || r.indicators !== t.fingerprints.indicators) {
98
- const s = u(n, o);
153
+ if (F) {
154
+ const u = T(t.items, r), E = w(
155
+ u,
156
+ i
157
+ ), N = f(i, E);
99
158
  return {
100
- rootItems: o,
101
- syncMode: "structural",
102
- fingerprints: s
159
+ rootItems: E,
160
+ authority: null,
161
+ pickerMode: "tree",
162
+ syncMode: "indicators-only",
163
+ fingerprints: N
103
164
  };
104
165
  }
105
- return {
166
+ return n.layout !== t.fingerprints.layout || n.visibility !== t.fingerprints.visibility || n.indicators !== t.fingerprints.indicators ? {
167
+ rootItems: t.items,
168
+ authority: null,
169
+ pickerMode: "tree",
170
+ syncMode: "structural",
171
+ fingerprints: t.fingerprints
172
+ } : {
106
173
  rootItems: null,
174
+ authority: null,
175
+ pickerMode: "tree",
107
176
  syncMode: "skip",
108
177
  fingerprints: t.fingerprints
109
178
  };
110
179
  }
111
- if (!c && a && !f) {
112
- const l = C(
113
- o,
114
- n
115
- ), s = u(n, l);
180
+ if (t.pickerMode === "authority-flat" && t.authority) {
181
+ const s = k(i);
182
+ if (s) {
183
+ const u = M(i, s);
184
+ return {
185
+ rootItems: y(s, r),
186
+ authority: s,
187
+ pickerMode: "authority-flat",
188
+ syncMode: l ? "structural" : c ? "visibility-only" : "indicators-only",
189
+ fingerprints: u
190
+ };
191
+ }
192
+ }
193
+ const h = d ? w(t.items, i) : t.items;
194
+ if (!l && c && !d) {
195
+ const s = G(
196
+ h,
197
+ i
198
+ ), u = f(i, s);
116
199
  return {
117
- rootItems: l,
200
+ rootItems: s,
201
+ authority: null,
202
+ pickerMode: "tree",
118
203
  syncMode: "visibility-only",
119
- fingerprints: s
204
+ fingerprints: u
120
205
  };
121
206
  }
122
- if (!c && !a && f) {
123
- const l = u(n, o);
207
+ if (!l && !c && d) {
208
+ const s = f(i, h);
124
209
  return {
125
- rootItems: o,
210
+ rootItems: h,
211
+ authority: null,
212
+ pickerMode: "tree",
126
213
  syncMode: "indicators-only",
127
- fingerprints: l
214
+ fingerprints: s
128
215
  };
129
216
  }
130
- if (!c && a && f) {
131
- const l = C(
132
- o,
133
- n
134
- ), s = u(n, l);
217
+ if (!l && c && d) {
218
+ const s = G(
219
+ h,
220
+ i
221
+ ), u = f(i, s);
135
222
  return {
136
- rootItems: l,
223
+ rootItems: s,
224
+ authority: null,
225
+ pickerMode: "tree",
137
226
  syncMode: "visibility-only",
138
- fingerprints: s
227
+ fingerprints: u
139
228
  };
140
229
  }
141
230
  }
142
- const g = v(n, e);
143
- if (!g)
231
+ const a = k(i);
232
+ if (a && D(a, L)) {
233
+ const l = M(i, a);
234
+ return {
235
+ rootItems: y(a, r),
236
+ authority: a,
237
+ pickerMode: "authority-flat",
238
+ syncMode: "structural",
239
+ fingerprints: l
240
+ };
241
+ }
242
+ const _ = z(i, r);
243
+ if (!_)
144
244
  return {
145
245
  rootItems: null,
246
+ authority: null,
247
+ pickerMode: "tree",
146
248
  syncMode: "skip",
147
- fingerprints: r
249
+ fingerprints: n
148
250
  };
149
- const G = b(n, e)?.fingerprints ?? {
251
+ const H = v(i, r)?.fingerprints ?? {
150
252
  layout: "",
151
253
  visibility: "",
152
254
  indicators: ""
153
255
  };
154
256
  return {
155
- rootItems: g,
257
+ rootItems: _,
258
+ authority: null,
259
+ pickerMode: "tree",
156
260
  syncMode: "structural",
157
- fingerprints: G
261
+ fingerprints: H
158
262
  };
159
263
  }
160
- function q(i) {
161
- return typeof i.getColumnState == "function" && (typeof i.getAllGridColumns == "function" || typeof i.getColumns == "function");
264
+ function P(e) {
265
+ return typeof e.getColumnState == "function" && (typeof e.getAllGridColumns == "function" || typeof e.getColumns == "function");
162
266
  }
163
- function J(i) {
164
- return $(i).syncMode === "skip";
267
+ function ct(e) {
268
+ const { gridApi: i, labels: r, previousFingerprints: n } = e, t = v(i, r);
269
+ if (!t)
270
+ return !1;
271
+ const o = i.getColumnState();
272
+ if (A(
273
+ i,
274
+ t.leafColumnIds,
275
+ o
276
+ ))
277
+ return !1;
278
+ const b = m(o), I = p(o);
279
+ return b !== t.gridLayoutFingerprint || I !== t.gridVisibilityFingerprint || g(i) !== t.fingerprints.indicators ? !1 : !(n.layout !== t.fingerprints.layout || n.visibility !== t.fingerprints.visibility || n.indicators !== t.fingerprints.indicators);
165
280
  }
166
- function K(i) {
167
- let n = !1, e = 0, r;
281
+ function dt(e) {
282
+ let i = !1, r = 0, n;
168
283
  const t = () => {
169
- n || I(i) || !q(i) || p.has(i) || v(i, h);
284
+ i || B(e) || !P(e) || C.has(e) || K(e);
170
285
  };
171
- return e = requestAnimationFrame(() => {
172
- n || (typeof requestIdleCallback < "u" ? r = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
286
+ return P(e) && e.getColumnState().length >= L ? (queueMicrotask(t), () => {
287
+ i = !0;
288
+ }) : (r = requestAnimationFrame(() => {
289
+ i || (typeof requestIdleCallback < "u" ? n = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
173
290
  }), () => {
174
- n = !0, e && cancelAnimationFrame(e), r !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(r);
175
- };
291
+ i = !0, r && cancelAnimationFrame(r), n !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(n);
292
+ });
176
293
  }
177
294
  export {
178
- v as buildColumnTreeWithCache,
179
- D as isGridColumnSetDifferentFromCachedLeaves,
180
- J as peekColumnListSyncWouldSkip,
181
- b as readColumnTreeCache,
182
- H as readGridLayoutFingerprint,
183
- O as readGridVisibilityFingerprint,
184
- $ as resolveColumnTreeFromCacheOrGrid,
185
- K as scheduleColumnTreePrewarm,
186
- u as writeColumnTreeCache
295
+ L as LARGE_COLUMN_PREWARM_THRESHOLD,
296
+ z as buildColumnTreeWithCache,
297
+ A as isGridColumnSetDifferentFromCachedLeaves,
298
+ ct as peekColumnListSyncWouldSkip,
299
+ v as readColumnTreeCache,
300
+ ut as readGridLayoutFingerprint,
301
+ lt as readGridVisibilityFingerprint,
302
+ at as resolveColumnTreeFromCacheOrGrid,
303
+ dt as scheduleColumnTreePrewarm,
304
+ M as writeColumnTreeAuthorityCache,
305
+ f as writeColumnTreeCache
187
306
  };
@@ -0,0 +1,26 @@
1
+ import { FlatNestedListRow } from '../nested-list/nested-list-virtual-drop';
2
+ import { NestedListItem } from '../nested-list/nested-list.types';
3
+ import { ColumnPickerAuthority } from './column-picker-authority';
4
+ import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
5
+ export interface FlatColumnVirtualRowModelOptions {
6
+ searchQuery?: string;
7
+ sortAppliedByColumnId?: ReadonlyMap<string, boolean>;
8
+ filterAppliedByColumnId?: ReadonlyMap<string, boolean>;
9
+ }
10
+ export interface FlatColumnVirtualRowModel {
11
+ rowCount: number;
12
+ frozenColumnIds: readonly string[];
13
+ scrollableColumnIds: readonly string[];
14
+ getRowAt: (index: number) => FlatNestedListRow;
15
+ getColumnIdAt: (index: number) => string | null;
16
+ findFlatIndexByColumnId: (columnId: string) => number;
17
+ }
18
+ export declare function buildFlatColumnVirtualRowModel(authority: ColumnPickerAuthority, labels: BuildColumnTreeLabels, options?: FlatColumnVirtualRowModelOptions): FlatColumnVirtualRowModel;
19
+ export declare function buildAuthorityFlatShellItems(authority: ColumnPickerAuthority, labels: BuildColumnTreeLabels): NestedListItem[];
20
+ export declare function isFlatLargeColumnPicker(authority: ColumnPickerAuthority, threshold: number): boolean;
21
+ export interface FlatVirtualDropToAuthorityOptions {
22
+ draggedColumnId: string;
23
+ overId: string;
24
+ insertAfter: boolean;
25
+ }
26
+ export declare function applyFlatVirtualDropToAuthority(authority: ColumnPickerAuthority, rowModel: FlatColumnVirtualRowModel, options: FlatVirtualDropToAuthorityOptions): ColumnPickerAuthority | null;
@@ -0,0 +1,195 @@
1
+ import { getSectionIdFromDroppable as S } from "../nested-list/nested-list-drop-engine.js";
2
+ import { NESTED_LIST_ROOT_FROZEN_ID as d, NESTED_LIST_ROOT_SCROLLABLE_ID as u } from "../nested-list/nested-list-constants.js";
3
+ import { updateColumnPin as h, reorderColumn as k } from "./column-picker-authority.js";
4
+ function g(e) {
5
+ const n = [], t = [];
6
+ for (const l of e.orderedColumnIds)
7
+ e.pinByColumnId.get(l) ? n.push(l) : t.push(l);
8
+ return { frozenColumnIds: n, scrollableColumnIds: t };
9
+ }
10
+ function b(e, n, t) {
11
+ const l = t.trim().toLowerCase();
12
+ return l === "" ? [...n] : n.filter((r) => (e.labelByColumnId.get(r) ?? r).toLowerCase().includes(l));
13
+ }
14
+ function C(e, n) {
15
+ if (e.length === 0)
16
+ return { checked: !1, indeterminate: !1 };
17
+ let t = 0;
18
+ for (const l of e)
19
+ (n.visibilityByColumnId.get(l) ?? !0) && (t += 1);
20
+ return {
21
+ checked: t === e.length,
22
+ indeterminate: t > 0 && t < e.length
23
+ };
24
+ }
25
+ function D(e, n, t) {
26
+ const l = t.searchQuery ?? "", { frozenColumnIds: r, scrollableColumnIds: c } = g(e), s = b(e, r, l), o = b(e, c, l), i = C(s, e), f = C(o, e), m = [
27
+ {
28
+ kind: "structure",
29
+ sectionId: d,
30
+ label: n.frozenColumns,
31
+ checked: i.checked,
32
+ indeterminate: i.indeterminate,
33
+ hasVirtualColumnChildren: s.length > 0
34
+ }
35
+ ];
36
+ for (const a of s)
37
+ m.push({ kind: "column", columnId: a, sectionId: d });
38
+ m.push({
39
+ kind: "structure",
40
+ sectionId: u,
41
+ label: n.scrollableColumns,
42
+ checked: f.checked,
43
+ indeterminate: f.indeterminate,
44
+ hasVirtualColumnChildren: o.length > 0
45
+ });
46
+ for (const a of o)
47
+ m.push({ kind: "column", columnId: a, sectionId: u });
48
+ return m;
49
+ }
50
+ function z(e, n, t) {
51
+ const l = e.pinByColumnId.get(n) ?? null, r = e.visibilityByColumnId.get(n) ?? !0, c = e.labelByColumnId.get(n) ?? n, s = t.sortAppliedByColumnId?.get(n) ?? !1, o = t.filterAppliedByColumnId?.get(n) ?? !1;
52
+ return {
53
+ item: {
54
+ id: n,
55
+ label: c,
56
+ checked: r,
57
+ data: {
58
+ hasSortApplied: s,
59
+ hasFilterApplied: o,
60
+ pinned: l
61
+ }
62
+ },
63
+ level: 1,
64
+ indentLevel: 1
65
+ };
66
+ }
67
+ function F(e) {
68
+ return {
69
+ item: {
70
+ id: e.sectionId,
71
+ label: e.label,
72
+ checked: e.checked,
73
+ indeterminate: e.indeterminate,
74
+ children: [],
75
+ category: "structure",
76
+ isDragDisabled: !0,
77
+ data: { hasVirtualColumnChildren: e.hasVirtualColumnChildren }
78
+ },
79
+ level: 0,
80
+ indentLevel: 0
81
+ };
82
+ }
83
+ function v(e, n, t = {}) {
84
+ const l = D(e, n, t), r = /* @__PURE__ */ new Map();
85
+ for (let o = 0; o < l.length; o += 1) {
86
+ const i = l[o];
87
+ i.kind === "column" && r.set(i.columnId, o);
88
+ }
89
+ const { frozenColumnIds: c, scrollableColumnIds: s } = g(e);
90
+ return {
91
+ rowCount: l.length,
92
+ frozenColumnIds: c,
93
+ scrollableColumnIds: s,
94
+ getRowAt: (o) => {
95
+ const i = l[o];
96
+ if (!i)
97
+ throw new RangeError(`Flat column virtual row index out of bounds: ${o}`);
98
+ return i.kind === "structure" ? F(i) : z(e, i.columnId, t);
99
+ },
100
+ getColumnIdAt: (o) => {
101
+ const i = l[o];
102
+ return i?.kind === "column" ? i.columnId : null;
103
+ },
104
+ findFlatIndexByColumnId: (o) => r.get(o) ?? -1
105
+ };
106
+ }
107
+ function P(e, n) {
108
+ const { frozenColumnIds: t, scrollableColumnIds: l } = g(e), r = C(t, e), c = C(l, e);
109
+ return [
110
+ {
111
+ id: d,
112
+ label: n.frozenColumns,
113
+ checked: r.checked,
114
+ indeterminate: r.indeterminate,
115
+ children: [],
116
+ category: "structure",
117
+ isDragDisabled: !0
118
+ },
119
+ {
120
+ id: u,
121
+ label: n.scrollableColumns,
122
+ checked: c.checked,
123
+ indeterminate: c.indeterminate,
124
+ children: [],
125
+ category: "structure",
126
+ isDragDisabled: !0
127
+ }
128
+ ];
129
+ }
130
+ function V(e, n) {
131
+ if (e.orderedColumnIds.length < n)
132
+ return !1;
133
+ for (const t of e.orderedColumnIds) {
134
+ const l = e.columnGroupChain.get(t);
135
+ if (l && l.length > 0)
136
+ return !1;
137
+ }
138
+ return !0;
139
+ }
140
+ function A(e, n) {
141
+ const t = e.pinByColumnId.get(n);
142
+ return t === "left" || t === "right";
143
+ }
144
+ function B(e, n) {
145
+ if (n === d)
146
+ return 0;
147
+ for (let t = 0; t < e.orderedColumnIds.length; t += 1) {
148
+ const l = e.orderedColumnIds[t];
149
+ if (!A(e, l))
150
+ return t;
151
+ }
152
+ return e.orderedColumnIds.length;
153
+ }
154
+ function R(e, n, t, l) {
155
+ const r = e.orderedColumnIds.indexOf(n), c = e.orderedColumnIds.indexOf(t);
156
+ if (r === -1 || c === -1)
157
+ return null;
158
+ const s = [...e.orderedColumnIds];
159
+ s.splice(r, 1);
160
+ const o = s.indexOf(t);
161
+ if (o === -1)
162
+ return null;
163
+ const i = l ? o + 1 : o;
164
+ return s.splice(i, 0, n), r === i ? e : k(e, r, i);
165
+ }
166
+ function O(e, n) {
167
+ const t = S(e);
168
+ return t === d || t === u ? t : e === d || e === u ? e : n.frozenColumnIds.includes(e) ? d : n.scrollableColumnIds.includes(e) ? u : null;
169
+ }
170
+ function _(e, n, t) {
171
+ const { draggedColumnId: l, overId: r, insertAfter: c } = t;
172
+ if (l === r || !e.orderedColumnIds.includes(l))
173
+ return null;
174
+ const s = O(r, n);
175
+ if (s) {
176
+ if (S(r) !== null || r === d || r === u) {
177
+ const I = h(e, l, s === d ? "left" : null), x = B(I, s), p = I.orderedColumnIds.indexOf(l);
178
+ return p === -1 ? null : k(I, p, x);
179
+ }
180
+ const i = n.frozenColumnIds.includes(l), f = s === d ? "left" : null, m = i === (f === "left") ? e : h(e, l, f);
181
+ return R(
182
+ m,
183
+ l,
184
+ r,
185
+ c
186
+ );
187
+ }
188
+ return null;
189
+ }
190
+ export {
191
+ _ as applyFlatVirtualDropToAuthority,
192
+ P as buildAuthorityFlatShellItems,
193
+ v as buildFlatColumnVirtualRowModel,
194
+ V as isFlatLargeColumnPicker
195
+ };
@@ -0,0 +1 @@
1
+ export declare function isPickerEligibleColumnId(columnId: string | null | undefined): boolean;
@@ -0,0 +1,7 @@
1
+ const i = /* @__PURE__ */ new Set(["ag-Grid-SelectionColumn"]);
2
+ function n(e) {
3
+ return e ? !i.has(e) : !1;
4
+ }
5
+ export {
6
+ n as isPickerEligibleColumnId
7
+ };