impact-nova 2.5.13 → 2.5.15

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 (141) hide show
  1. package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
  2. package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
  3. package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
  4. package/dist/components/data/data-table/data-table-column-apply.js +73 -84
  5. package/dist/components/data/data-table/data-table-column-list.js +64 -94
  6. package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
  7. package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
  8. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
  9. package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
  10. package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
  11. package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
  12. package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
  13. package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
  14. package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
  15. package/dist/components/data/nested-list/components/SortableItem.js +60 -62
  16. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
  17. package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
  18. package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
  19. package/dist/components/data/nested-list/nested-list-constants.js +4 -10
  20. package/dist/components/data/nested-list/nested-list.js +336 -322
  21. package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
  22. package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
  23. package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
  24. package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
  25. package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
  26. package/dist/components/data-display/calendar/calendar-config.js +1 -1
  27. package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
  28. package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
  29. package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
  30. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
  31. package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
  32. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
  33. package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
  34. package/dist/components/data-display/calendar/calendar-footer.js +21 -21
  35. package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
  36. package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
  37. package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
  38. package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
  39. package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
  40. package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
  41. package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
  42. package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
  43. package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
  44. package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
  45. package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
  46. package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
  47. package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
  48. package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
  49. package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
  50. package/dist/components/data-display/calendar/calendar-selection.js +52 -23
  51. package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
  52. package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
  53. package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
  54. package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
  55. package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
  56. package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
  57. package/dist/components/data-display/calendar/calendar.js +146 -143
  58. package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
  59. package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
  60. package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
  61. package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
  62. package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
  63. package/dist/components/forms/date-picker/date-picker.js +60 -58
  64. package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
  65. package/dist/components/forms/date-picker/date-range-picker.js +66 -64
  66. package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
  67. package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
  68. package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
  69. package/dist/components/forms/date-picker/month-picker.js +61 -59
  70. package/dist/components/forms/date-picker/month-range-picker.js +63 -61
  71. package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
  72. package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
  73. package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
  74. package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
  75. package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
  76. package/dist/components/forms/date-picker/quarter-picker.js +51 -47
  77. package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
  78. package/dist/components/forms/date-picker/week-picker.js +130 -126
  79. package/dist/components/forms/date-picker/week-range-picker.js +159 -155
  80. package/dist/components/forms/date-picker/year-picker.js +52 -48
  81. package/dist/components/forms/date-picker/year-range-picker.js +52 -48
  82. package/dist/form-react/Fields/DateInputField.js +51 -50
  83. package/dist/form-react/Fields/DateRangeField.js +14 -13
  84. package/dist/form-react/Fields/MonthRangeField.js +29 -28
  85. package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
  86. package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
  87. package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
  88. package/dist/form-react/Fields/MultiYearPickerField.js +58 -0
  89. package/dist/form-react/Fields/WeekRangePicker.js +33 -32
  90. package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
  91. package/dist/form-react/Fields/YearPickerField.js +58 -0
  92. package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
  93. package/dist/form-react/Fields/YearRangePickerField.js +58 -0
  94. package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
  95. package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
  96. package/dist/form-react/types/fields.types.d.ts +72 -1
  97. package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
  98. package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
  99. package/dist/impact-nova-components.css +13 -6
  100. package/dist/impact-nova.css +1 -1
  101. package/dist/lib/fiscal-calendar/index.d.ts +2 -2
  102. package/dist/lib/fiscal-calendar/index.js +26 -28
  103. package/dist/lib/fiscal-calendar/types.d.ts +0 -7
  104. package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
  105. package/dist/lib/fiscal-calendar/week-selection.js +52 -79
  106. package/dist/llms/rules/ag-grid.js +1 -1
  107. package/dist/llms/rules/installation.js +1 -1
  108. package/dist/llms/rules/requirements.js +1 -1
  109. package/package.json +1 -1
  110. package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
  111. package/dist/components/data/data-table/column-picker-authority.js +0 -116
  112. package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
  113. package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
  114. package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
  115. package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
  116. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
  117. package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
  118. package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
  119. package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
  120. package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
  121. package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
  122. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
  123. package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
  124. package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
  125. package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
  126. package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
  127. package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
  128. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
  129. package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
  130. package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
  131. package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
  132. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
  133. package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
  134. package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
  135. package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
  136. package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
  137. package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
  138. package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
  139. package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
  140. package/dist/lib/hash/fnv1a128.d.ts +0 -16
  141. package/dist/lib/hash/fnv1a128.js +0 -21
@@ -1,128 +1,129 @@
1
- import { useState as M, useRef as h, useEffect as v, useCallback as c, useLayoutEffect as A } from "react";
2
- import { mergePartialOrderedColumnState as B } from "./data-table-column-state.js";
3
- import { afterSynchronousColumnApply as U, alignColumnTreePinMetadata as w, readGridColumnPinned as W, EXTERNAL_SYNC_DEBOUNCE_MS as tt } from "./data-table-column-apply.js";
4
- import { isColumnRuntimeStateGuardUpdating as D } from "./column-runtime-state-guard.js";
5
- import { resolveColumnTreeFromCacheOrGrid as et, peekColumnListSyncWouldSkip as rt, writeColumnTreeAuthorityCache as nt } from "./data-table-column-tree-cache.js";
6
- import { buildColumnStateFromAuthority as ot, toggleColumnsVisibility as ut, toggleColumnVisibility as lt, updateColumnPin as ct, toggleAllColumnsVisibility as st } from "./column-picker-authority.js";
7
- import { NESTED_LIST_ROOT_FROZEN_ID as q, NESTED_LIST_ROOT_SCROLLABLE_ID as at } from "../nested-list/nested-list-constants.js";
8
- import { buildAuthorityFlatShellItems as V, buildFlatColumnVirtualRowModel as it, applyFlatVirtualDropToAuthority as mt } from "./data-table-flat-column-virtual-rows.js";
9
- import { subscribeGridApiEvent as ft } from "../ag-grid-react/grid-api-event-subscription.js";
10
- import { subscribeColumnIndicatorSync as dt } from "../ag-grid-react/column-indicator-sync-bus.js";
11
- import { commitRebuiltColumnTreeFromGrid as ht } from "./reconcile-column-tree-from-grid.js";
12
- import { applyTreeColumnChanges as yt } from "./data-table-column-list-tree-apply.js";
13
- function z(e, p, b) {
1
+ import { useState as W, useRef as p, useEffect as j, useCallback as f, useLayoutEffect as $ } from "react";
2
+ import { mergePartialOrderedColumnState as q } from "./data-table-column-state.js";
3
+ import { afterSynchronousColumnApply as k, normalizeColumnPinned as z, GRID_AUTO_UNPIN_WAIT_MS as A, alignColumnTreePinMetadata as V, EXTERNAL_SYNC_DEBOUNCE_MS as ee, readGridColumnPinned as ne } from "./data-table-column-apply.js";
4
+ import { buildColumnStateFromTree as te } from "./build-column-state-from-tree.js";
5
+ import { isColumnRuntimeStateGuardUpdating as g } from "./column-runtime-state-guard.js";
6
+ import { computeColumnListSyncFingerprints as re } from "./data-table-column-list-sync.js";
7
+ import { writeColumnTreeCache as B, resolveColumnTreeFromCacheOrGrid as oe, peekColumnListSyncWouldSkip as ue, readColumnTreeCache as se, isGridColumnSetDifferentFromCachedLeaves as ce } from "./data-table-column-tree-cache.js";
8
+ import { patchColumnTreeIndicatorsFromGrid as le } from "./patch-column-tree-indicators-from-grid.js";
9
+ import { subscribeGridApiEvent as X } from "../ag-grid-react/grid-api-event-subscription.js";
10
+ import { subscribeColumnIndicatorSync as ae } from "../ag-grid-react/column-indicator-sync-bus.js";
11
+ function Y(e, C, h) {
14
12
  return {
15
13
  layout: e.current,
16
- visibility: p.current,
17
- indicators: b.current
14
+ visibility: C.current,
15
+ indicators: h.current
18
16
  };
19
17
  }
20
- function Ct(e, p, b, a) {
21
- p.current = e.layout, b.current = e.visibility, a.current = e.indicators;
18
+ function w(e, C, h, c) {
19
+ C.current = e.layout, h.current = e.visibility, c.current = e.indicators;
22
20
  }
23
- function Gt({
21
+ function Re({
24
22
  gridApi: e,
25
- frozenColumnsLabel: p,
26
- scrollableColumnsLabel: b,
27
- isSyncActive: a = !0
23
+ frozenColumnsLabel: C,
24
+ scrollableColumnsLabel: h,
25
+ isSyncActive: c = !0
28
26
  }) {
29
- const [T, y] = M([]), [I, E] = M(null), [O, X] = M("tree"), [Y, F] = M(!1), o = h(!1), Z = h(null), x = h(T), S = h(I), G = h(""), _ = h(""), L = h(""), P = h(a);
30
- v(() => {
31
- x.current = T;
32
- }, [T]), v(() => {
33
- S.current = I;
34
- }, [I]);
35
- const l = c(
27
+ const [R, F] = W([]), [H, M] = W(!1), l = p(!1), J = p(null), x = p(R), S = p(""), I = p(""), b = p(""), N = p(c);
28
+ j(() => {
29
+ x.current = R;
30
+ }, [R]);
31
+ const E = f(
36
32
  () => ({
37
- frozenColumns: p,
38
- scrollableColumns: b
33
+ frozenColumns: C,
34
+ scrollableColumns: h
39
35
  }),
40
- [p, b]
41
- ), f = c((t) => {
42
- Ct(
43
- t,
44
- G,
45
- _,
46
- L
47
- );
48
- }, []), d = c(
49
- (t, r) => {
36
+ [C, h]
37
+ ), y = f(
38
+ (n) => {
39
+ w(
40
+ re(n),
41
+ S,
42
+ I,
43
+ b
44
+ );
45
+ },
46
+ []
47
+ ), T = f(
48
+ (n) => {
50
49
  if (!e) {
51
- r?.();
50
+ l.current = !1;
52
51
  return;
53
52
  }
54
- const n = ot(t), u = B(
55
- e.getColumnState(),
56
- n
57
- );
58
- e.applyColumnState({ state: u, applyOrder: !0 }), U(() => {
59
- const m = nt(e, t);
60
- f(m), E(t), y(V(t, l())), r?.();
61
- });
53
+ l.current = !1, B(e, n), y(n);
62
54
  },
63
- [e, l, f]
64
- ), k = c(() => {
65
- if (!e) {
66
- o.current = !1;
67
- return;
68
- }
69
- o.current = !1;
70
- const t = ht({
71
- gridApi: e,
72
- labels: l()
73
- });
74
- t && (y(t.tree), f(t.fingerprints));
75
- }, [e, l, f]), i = c(() => {
76
- if (!e || o.current || D(e))
55
+ [e, y]
56
+ ), a = f(() => {
57
+ if (!e || l.current || g(e))
77
58
  return;
78
- const t = et({
59
+ const n = oe({
79
60
  gridApi: e,
80
- labels: l(),
81
- previousFingerprints: z(
82
- G,
83
- _,
84
- L
61
+ labels: E(),
62
+ previousFingerprints: Y(
63
+ S,
64
+ I,
65
+ b
85
66
  )
86
67
  });
87
- if (X(t.pickerMode), t.syncMode === "skip") {
88
- f(t.fingerprints), t.pickerMode === "authority-flat" && t.authority && (E(t.authority), y(V(t.authority, l()))), F(!0);
68
+ if (n.syncMode === "skip" || !n.rootItems) {
69
+ n.syncMode !== "skip" && M(!0);
89
70
  return;
90
71
  }
91
- if (t.pickerMode === "authority-flat" && t.authority) {
92
- f(t.fingerprints), E(t.authority), y(
93
- t.rootItems ?? V(t.authority, l())
94
- ), F(!0);
95
- return;
96
- }
97
- if (E(null), !t.rootItems) {
98
- F(!0);
99
- return;
100
- }
101
- f(t.fingerprints), y(t.rootItems), F(!0);
102
- }, [e, l, f]);
103
- A(() => {
104
- const t = a && !P.current;
105
- if (P.current = a, !e || !a) return;
106
- const r = l(), n = z(
107
- G,
108
- _,
109
- L
72
+ w(
73
+ n.fingerprints,
74
+ S,
75
+ I,
76
+ b
77
+ ), F(n.rootItems), M(!0);
78
+ }, [e, E]);
79
+ $(() => {
80
+ const n = c && !N.current;
81
+ if (N.current = c, !e || !c) return;
82
+ const t = E(), r = Y(
83
+ S,
84
+ I,
85
+ b
110
86
  );
111
- !t && n.layout !== "" && rt({
87
+ if (!(!n && r.layout !== "" && ue({
112
88
  gridApi: e,
113
- labels: r,
114
- previousFingerprints: n
115
- }) || queueMicrotask(() => {
116
- i();
117
- });
89
+ labels: t,
90
+ previousFingerprints: r
91
+ }))) {
92
+ if (n) {
93
+ queueMicrotask(() => {
94
+ const o = se(e, t);
95
+ if (o && !ce(
96
+ e,
97
+ o.leafColumnIds
98
+ )) {
99
+ const i = le(
100
+ o.items,
101
+ e
102
+ );
103
+ w(
104
+ B(e, i),
105
+ S,
106
+ I,
107
+ b
108
+ ), F(i), M(!0);
109
+ return;
110
+ }
111
+ a();
112
+ });
113
+ return;
114
+ }
115
+ queueMicrotask(() => {
116
+ a();
117
+ });
118
+ }
118
119
  }, [
119
120
  e,
120
- a,
121
- l,
122
- i
123
- ]), v(() => {
124
- if (!e || !a) return;
125
- const t = [
121
+ c,
122
+ E,
123
+ a
124
+ ]), j(() => {
125
+ if (!e || !c) return;
126
+ const n = [
126
127
  "columnVisible",
127
128
  "columnPinned",
128
129
  "columnMoved",
@@ -138,175 +139,120 @@ function Gt({
138
139
  "filterChanged",
139
140
  "newColumnsLoaded"
140
141
  ];
141
- let r = null;
142
- const n = () => {
143
- o.current || D(e) || (r && clearTimeout(r), r = setTimeout(() => {
144
- r = null, !(o.current || D(e) || e.isDestroyed()) && i();
145
- }, tt));
146
- }, u = t.map(
147
- (s) => ft(e, s, () => {
148
- n();
142
+ let t = null;
143
+ const r = () => {
144
+ l.current || g(e) || (t && clearTimeout(t), t = setTimeout(() => {
145
+ t = null, !(l.current || g(e) || e.isDestroyed()) && a();
146
+ }, ee));
147
+ }, o = n.map(
148
+ (m) => X(e, m, () => {
149
+ r();
149
150
  })
150
- ), m = dt(() => {
151
- n();
151
+ ), i = ae(() => {
152
+ r();
152
153
  });
153
154
  return () => {
154
- r && clearTimeout(r), u.forEach((s) => s()), m();
155
+ t && clearTimeout(t), o.forEach((m) => m()), i();
155
156
  };
156
- }, [e, a, i]);
157
- const j = c(
158
- (t) => {
159
- const r = S.current;
160
- if (!e || !r || t.length === 0)
157
+ }, [e, c, a]);
158
+ const v = f(
159
+ (n) => {
160
+ if (!e) return;
161
+ l.current = !0;
162
+ const t = te(n);
163
+ if (t.length === 0) {
164
+ k(() => {
165
+ T(n);
166
+ });
161
167
  return;
162
- o.current = !0;
163
- let n = r;
164
- for (const u of t) {
165
- if (u.itemId === q || u.itemId === at) {
166
- const m = n.orderedColumnIds.filter((s) => {
167
- const R = !!n.pinByColumnId.get(s);
168
- return u.itemId === q ? R : !R;
169
- });
170
- n = ut(
171
- n,
172
- m,
173
- u.checked
174
- );
175
- continue;
176
- }
177
- n = lt(
178
- n,
179
- u.itemId,
180
- u.checked
181
- );
182
168
  }
183
- d(n, () => {
184
- o.current = !1;
185
- });
186
- },
187
- [e, d]
188
- ), H = c(
189
- (t, r, n) => {
190
- const u = S.current;
191
- if (!e || !u)
169
+ const r = e.getColumnState(), o = q(r, t), i = new Set(
170
+ r.filter((s) => z(s.pinned)).map((s) => s.colId)
171
+ ), m = o.filter(
172
+ (s) => z(s.pinned) && !i.has(s.colId)
173
+ ), P = new Set(m.map((s) => s.colId));
174
+ e.applyColumnState({ state: o, applyOrder: !0 });
175
+ const u = () => {
176
+ T(n);
177
+ };
178
+ if (P.size === 0) {
179
+ k(u);
192
180
  return;
193
- const m = it(
194
- u,
195
- l()
196
- ), s = mt(
197
- u,
198
- m,
199
- {
200
- draggedColumnId: t,
201
- overId: r,
202
- insertAfter: n
203
- }
204
- );
205
- s && (o.current = !0, d(s, () => {
206
- o.current = !1;
207
- }));
208
- },
209
- [e, l, d]
210
- ), g = c(
211
- (t) => {
212
- e && yt({
213
- gridApi: e,
214
- newItems: t,
215
- releaseLockAndRebuildTreeFromGrid: k,
216
- applyExternalGridSync: i,
217
- setIsUpdating: (r) => {
218
- o.current = r;
181
+ }
182
+ let O = !1, U = null, L = null;
183
+ L = X(e, "columnPinned", () => {
184
+ if (O || e.isDestroyed()) return;
185
+ const s = e.getColumnState();
186
+ if (m.filter((G) => {
187
+ const d = s.find((_) => _.colId === G.colId);
188
+ return d && !d.pinned;
189
+ }).length > 0) {
190
+ O = !0, U && clearTimeout(U), L?.();
191
+ const G = o.filter(
192
+ (d) => d.pinned && !P.has(d.colId)
193
+ );
194
+ if (G.length > 0) {
195
+ const d = G[0], _ = o.map(
196
+ (D) => D.colId === d.colId ? { ...D, pinned: null } : D
197
+ );
198
+ e.applyColumnState({ state: _, applyOrder: !0 });
199
+ }
200
+ k(() => {
201
+ l.current = !1, a();
202
+ });
219
203
  }
220
- });
204
+ }), U = setTimeout(() => {
205
+ L?.(), O || u();
206
+ }, A);
221
207
  },
222
- [e, k, i]
223
- ), J = c(
224
- (t) => {
225
- g(w(t));
208
+ [e, T, a]
209
+ ), K = f(
210
+ (n) => {
211
+ v(V(n));
226
212
  },
227
- [g]
228
- ), K = c(
229
- (t, r) => {
230
- const n = w(t);
231
- if (!r) {
232
- g(n);
233
- return;
234
- }
235
- y(n);
213
+ [v]
214
+ ), Q = f(
215
+ (n, t) => {
216
+ const r = V(n);
217
+ t || v(r), F(r), y(r);
236
218
  },
237
- [g]
238
- ), Q = c(
239
- (t, r) => {
240
- const n = S.current;
241
- if (O === "authority-flat" && n && e) {
242
- o.current = !0;
243
- const R = ct(n, t, r);
244
- d(R, () => {
245
- if (W(e, t) !== r) {
246
- o.current = !1, i();
247
- return;
248
- }
249
- o.current = !1;
250
- });
251
- return;
252
- }
253
- const u = (R) => R.map((C) => C.id === t ? {
254
- ...C,
219
+ [v, y]
220
+ ), Z = f(
221
+ (n, t) => {
222
+ const r = (P) => P.map((u) => u.id === n ? {
223
+ ...u,
255
224
  data: {
256
- ...C.data,
257
- pinned: r
225
+ ...u.data,
226
+ pinned: t
258
227
  }
259
- } : C.children ? {
260
- ...C,
261
- children: u(C.children)
262
- } : C), m = u(x.current);
263
- if (y(m), !e) return;
264
- o.current = !0;
265
- const s = e.getColumnState(), N = B(s, [
266
- { colId: t, pinned: r }
228
+ } : u.children ? {
229
+ ...u,
230
+ children: r(u.children)
231
+ } : u), o = r(x.current);
232
+ if (F(o), y(o), !e) return;
233
+ l.current = !0;
234
+ const i = e.getColumnState(), m = q(i, [
235
+ { colId: n, pinned: t }
267
236
  ]);
268
- e.applyColumnState({ state: N, applyOrder: !0 }), U(() => {
269
- if (W(e, t) !== r) {
270
- o.current = !1, i();
237
+ e.applyColumnState({ state: m, applyOrder: !0 }), k(() => {
238
+ if (ne(e, n) !== t) {
239
+ l.current = !1, a();
271
240
  return;
272
241
  }
273
- k();
274
- });
275
- },
276
- [
277
- e,
278
- O,
279
- d,
280
- k,
281
- i
282
- ]
283
- ), $ = c(
284
- (t) => {
285
- const r = S.current;
286
- if (!e || !r)
287
- return;
288
- o.current = !0;
289
- const n = st(r, t);
290
- d(n, () => {
291
- o.current = !1;
242
+ T(o);
292
243
  });
293
244
  },
294
- [e, d]
245
+ [e, y, T, a]
295
246
  );
296
247
  return {
297
- items: T,
298
- columnPickerAuthority: I,
299
- pickerMode: O,
300
- isReady: Y,
301
- listWrapperRef: Z,
302
- handleChange: K,
303
- handleSubmit: J,
304
- handlePinChange: Q,
305
- handleAuthorityItemToggle: j,
306
- handleAuthorityVirtualDrop: H,
307
- handleAuthoritySelectAll: $
248
+ items: R,
249
+ isReady: H,
250
+ listWrapperRef: J,
251
+ handleChange: Q,
252
+ handleSubmit: K,
253
+ handlePinChange: Z
308
254
  };
309
255
  }
310
256
  export {
311
- Gt as useDataTableColumnListSync
257
+ Re as useDataTableColumnListSync
312
258
  };
@@ -1,29 +1,21 @@
1
1
  import { default as React } from 'react';
2
2
  import { useSensors, DragStartEvent, DragOverEvent, DragEndEvent } from '@dnd-kit/core';
3
- import { NestedListItem, NestedListDragMode, FlatVirtualRowModel } from '../nested-list.types';
3
+ import { NestedListItem } from '../nested-list.types';
4
4
  interface NestedListContentProps {
5
5
  isListCollapsed: boolean;
6
6
  enableDragDrop: boolean;
7
- dragMode?: NestedListDragMode;
8
7
  sensors: ReturnType<typeof useSensors>;
9
8
  items: {
10
9
  item: NestedListItem;
11
10
  level: number;
12
11
  indentLevel: number;
13
12
  }[];
14
- flatVirtualRowModel?: FlatVirtualRowModel | null;
15
- renderItem: (item: NestedListItem, level: number, indentLevel: number, context?: {
16
- isAnyDragging?: boolean;
17
- }) => React.ReactNode;
13
+ renderItem: (item: NestedListItem, level: number, indentLevel: number) => React.ReactNode;
18
14
  onDragStart: (event: DragStartEvent) => void;
19
15
  onDragOver: (event: DragOverEvent) => void;
20
16
  onDragEnd: (event: DragEndEvent) => void;
21
17
  onDragCancel: () => void;
22
18
  activeId: string | null;
23
- onToggleCollapse: (itemId: string) => void;
24
- toggleCollapseHandlerRef: React.MutableRefObject<(itemId: string) => void>;
25
- collapsedItems?: Record<string, boolean>;
26
- onVirtualDrop?: (activeId: string, overId: string, insertAfter: boolean) => void;
27
19
  }
28
20
  export declare const NestedListContent: React.FC<NestedListContentProps>;
29
21
  export {};