impact-nova 2.5.13 → 2.5.14
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.
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +0 -1
- package/dist/components/data/data-table/build-column-tree-from-grid.js +50 -55
- package/dist/components/data/data-table/data-table-column-apply.d.ts +0 -2
- package/dist/components/data/data-table/data-table-column-apply.js +73 -84
- package/dist/components/data/data-table/data-table-column-list.js +64 -94
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +6 -12
- package/dist/components/data/data-table/data-table-column-tree-cache.js +131 -250
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +0 -5
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +11 -28
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +0 -10
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +196 -250
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +2 -10
- package/dist/components/data/nested-list/components/NestedListContent.js +138 -253
- package/dist/components/data/nested-list/components/SortableItem.d.ts +1 -2
- package/dist/components/data/nested-list/components/SortableItem.js +60 -62
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +20 -10
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +233 -44
- package/dist/components/data/nested-list/nested-list-constants.d.ts +1 -4
- package/dist/components/data/nested-list/nested-list-constants.js +4 -10
- package/dist/components/data/nested-list/nested-list.js +336 -322
- package/dist/components/data/nested-list/nested-list.types.d.ts +0 -17
- package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +2 -0
- package/dist/components/data-display/calendar/calendar-apply-validation.js +64 -67
- package/dist/components/data-display/calendar/calendar-available-view.d.ts +27 -0
- package/dist/components/data-display/calendar/calendar-available-view.js +85 -0
- package/dist/components/data-display/calendar/calendar-config.js +1 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +4 -2
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +234 -164
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +77 -76
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +9 -0
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +45 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +6 -0
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +34 -18
- package/dist/components/data-display/calendar/calendar-footer.js +21 -21
- package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-injected-week-row.js +92 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +16 -0
- package/dist/components/data-display/calendar/calendar-leading-week.utils.js +51 -0
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +50 -49
- package/dist/components/data-display/calendar/calendar-month-utils.d.ts +5 -0
- package/dist/components/data-display/calendar/calendar-month-utils.js +85 -64
- package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +23 -0
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +3 -1
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +7 -5
- package/dist/components/data-display/calendar/calendar-period-cell.js +45 -46
- package/dist/components/data-display/calendar/calendar-quarter-panes.js +33 -31
- package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +10 -0
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +53 -39
- package/dist/components/data-display/calendar/calendar-selection.d.ts +25 -0
- package/dist/components/data-display/calendar/calendar-selection.js +52 -23
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +2 -1
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +59 -45
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +15 -4
- package/dist/components/data-display/calendar/calendar-week-utils.js +59 -50
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +3 -0
- package/dist/components/data-display/calendar/calendar-year-panes.js +53 -49
- package/dist/components/data-display/calendar/calendar.js +146 -143
- package/dist/components/data-display/calendar/calendar.types.d.ts +5 -0
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +2 -1
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +79 -74
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -1
- package/dist/components/data-display/calendar/use-calendar-state.js +394 -314
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/forms/date-picker/date-picker.js +60 -58
- package/dist/components/forms/date-picker/date-picker.types.d.ts +5 -0
- package/dist/components/forms/date-picker/date-range-picker.js +66 -64
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +1 -0
- package/dist/components/forms/date-picker/fiscal-pass-through.js +3 -2
- package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +17 -0
- package/dist/components/forms/date-picker/month-picker.js +61 -59
- package/dist/components/forms/date-picker/month-range-picker.js +63 -61
- package/dist/components/forms/date-picker/multi-date-picker.js +51 -49
- package/dist/components/forms/date-picker/multi-month-picker.js +49 -47
- package/dist/components/forms/date-picker/multi-quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/multi-week-picker.js +53 -51
- package/dist/components/forms/date-picker/multi-year-picker.js +53 -49
- package/dist/components/forms/date-picker/quarter-picker.js +51 -47
- package/dist/components/forms/date-picker/quarter-range-picker.js +50 -46
- package/dist/components/forms/date-picker/week-picker.js +130 -126
- package/dist/components/forms/date-picker/week-range-picker.js +159 -155
- package/dist/components/forms/date-picker/year-picker.js +52 -48
- package/dist/components/forms/date-picker/year-range-picker.js +52 -48
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/form-react/Fields/DateInputField.js +51 -50
- package/dist/form-react/Fields/DateRangeField.js +14 -13
- package/dist/form-react/Fields/MonthRangeField.js +29 -28
- package/dist/form-react/Fields/MultiMonthPickerField.js +13 -12
- package/dist/form-react/Fields/MultiWeekPickerField.js +35 -27
- package/dist/form-react/Fields/MultiYearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/MultiYearPickerField.js +57 -0
- package/dist/form-react/Fields/WeekRangePicker.js +33 -32
- package/dist/form-react/Fields/YearPickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearPickerField.js +57 -0
- package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearRangePickerField.js +57 -0
- package/dist/form-react/registry/defaultFieldRegistrations.d.ts +1 -1
- package/dist/form-react/registry/defaultFieldRegistrations.js +16 -13
- package/dist/form-react/types/fields.types.d.ts +69 -1
- package/dist/form-react/types/fieldsOutput.types.d.ts +8 -2
- package/dist/form-react/utils/fieldDefaults.utils.js +1 -1
- package/dist/impact-nova-components.css +13 -6
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/index.d.ts +2 -2
- package/dist/lib/fiscal-calendar/index.js +26 -28
- package/dist/lib/fiscal-calendar/types.d.ts +0 -7
- package/dist/lib/fiscal-calendar/week-selection.d.ts +3 -4
- package/dist/lib/fiscal-calendar/week-selection.js +52 -79
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
- package/dist/components/data/data-table/column-picker-authority.d.ts +0 -34
- package/dist/components/data/data-table/column-picker-authority.js +0 -116
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +0 -7
- package/dist/components/data/data-table/column-picker-drop-validation.js +0 -37
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +0 -10
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +0 -79
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +0 -26
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +0 -195
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +0 -1
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +0 -7
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +0 -12
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +0 -12
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +0 -24
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +0 -128
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +0 -11
- package/dist/components/data/nested-list/nested-list-display-utils.js +0 -74
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +0 -31
- package/dist/components/data/nested-list/nested-list-drop-engine.js +0 -209
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +0 -26
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +0 -67
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +0 -4
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +0 -43
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +0 -3
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +0 -34
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +0 -9
- package/dist/components/data/nested-list/nested-list-row-estimates.js +0 -14
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +0 -36
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +0 -47
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +0 -59
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +0 -341
- package/dist/lib/hash/fnv1a128.d.ts +0 -16
- package/dist/lib/hash/fnv1a128.js +0 -21
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
import { arrayMove as C } from "@dnd-kit/sortable";
|
|
2
|
-
import { NESTED_LIST_SECTION_IDS as O } from "./nested-list-constants.js";
|
|
3
|
-
const N = "droppable-";
|
|
4
|
-
function A(n) {
|
|
5
|
-
if (n.startsWith(N)) {
|
|
6
|
-
const c = n.slice(N.length);
|
|
7
|
-
if (O.has(c)) return c;
|
|
8
|
-
}
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
function D(n, c) {
|
|
12
|
-
for (const e of n) {
|
|
13
|
-
if (e.id === c) return e;
|
|
14
|
-
if (e.children) {
|
|
15
|
-
const r = D(e.children, c);
|
|
16
|
-
if (r) return r;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function P(n, c, e = 0) {
|
|
21
|
-
for (const r of n) {
|
|
22
|
-
if (r.id === c) return e;
|
|
23
|
-
if (r.children) {
|
|
24
|
-
const t = P(r.children, c, e + 1);
|
|
25
|
-
if (t !== null) return t;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return null;
|
|
29
|
-
}
|
|
30
|
-
function I(n, c, e = null) {
|
|
31
|
-
for (const r of n) {
|
|
32
|
-
if (r.id === c) return e;
|
|
33
|
-
if (r.children) {
|
|
34
|
-
const t = I(r.children, c, r.id);
|
|
35
|
-
if (t !== null) return t;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
function R(n, c) {
|
|
41
|
-
for (const e of n) {
|
|
42
|
-
if (e.id === c) return null;
|
|
43
|
-
if (e.children && D(e.children, c))
|
|
44
|
-
return e.id;
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
function _(n, c, e) {
|
|
49
|
-
return n.map((r) => {
|
|
50
|
-
if (r.children && r.children.length > 0) {
|
|
51
|
-
const t = r.children.findIndex((i) => i.id === c), l = r.children.findIndex((i) => i.id === e);
|
|
52
|
-
return t !== -1 && l !== -1 ? {
|
|
53
|
-
...r,
|
|
54
|
-
children: C(r.children, t, l)
|
|
55
|
-
} : {
|
|
56
|
-
...r,
|
|
57
|
-
children: _(r.children, c, e)
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return r;
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
function v(n, c, e, r) {
|
|
64
|
-
return n.map((t) => {
|
|
65
|
-
if (t.children && t.children.length > 0) {
|
|
66
|
-
const l = t.children.findIndex((d) => d.id === c), i = t.children.findIndex((d) => d.id === e);
|
|
67
|
-
if (l !== -1 && i !== -1) {
|
|
68
|
-
let d = i;
|
|
69
|
-
return r ? d = l < i ? i : i + 1 : d = l < i ? i - 1 : i, d = Math.max(0, Math.min(d, t.children.length - 1)), {
|
|
70
|
-
...t,
|
|
71
|
-
children: C(t.children, l, d)
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
...t,
|
|
76
|
-
children: v(
|
|
77
|
-
t.children,
|
|
78
|
-
c,
|
|
79
|
-
e,
|
|
80
|
-
r
|
|
81
|
-
)
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
return t;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
function G(n, c, e) {
|
|
88
|
-
const r = I(n, e);
|
|
89
|
-
if (!r) return null;
|
|
90
|
-
const t = n.findIndex((i) => i.id === r), l = n.findIndex((i) => i.id === c);
|
|
91
|
-
return t !== -1 && l !== -1 ? C(n, l, t) : null;
|
|
92
|
-
}
|
|
93
|
-
function V(n, c, e) {
|
|
94
|
-
const r = n.findIndex((l) => l.id === c), t = n.findIndex((l) => l.id === e);
|
|
95
|
-
return r !== -1 && t !== -1 ? C(n, r, t) : null;
|
|
96
|
-
}
|
|
97
|
-
function y(n, c, e, r, t) {
|
|
98
|
-
const l = D(n, c);
|
|
99
|
-
if (!l) return null;
|
|
100
|
-
const i = (u) => u.filter((o) => o.id !== c).map(
|
|
101
|
-
(o) => o.children ? { ...o, children: i(o.children) } : o
|
|
102
|
-
).filter((o) => !(o.children && o.children.length === 0 && o.category === "group")), d = D(n, e), a = !l.children || l.children.length === 0, f = !!(d?.children && d.children.length > 0), h = t[e] === !0, g = a && f && !h && r, L = (u) => {
|
|
103
|
-
for (let o = 0; o < u.length; o += 1) {
|
|
104
|
-
if (u[o].id === e) {
|
|
105
|
-
if (g) {
|
|
106
|
-
const F = {
|
|
107
|
-
...u[o],
|
|
108
|
-
children: [l, ...u[o].children || []]
|
|
109
|
-
}, E = [...u];
|
|
110
|
-
return E[o] = F, { nodes: E, inserted: !0 };
|
|
111
|
-
}
|
|
112
|
-
const T = [...u], S = r ? o + 1 : o;
|
|
113
|
-
return T.splice(S, 0, l), { nodes: T, inserted: !0 };
|
|
114
|
-
}
|
|
115
|
-
if (u[o].children) {
|
|
116
|
-
const T = L(u[o].children);
|
|
117
|
-
if (T.inserted) {
|
|
118
|
-
const S = [...u];
|
|
119
|
-
return S[o] = { ...u[o], children: T.nodes }, { nodes: S, inserted: !0 };
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return { nodes: u, inserted: !1 };
|
|
124
|
-
}, s = i(n), { nodes: x, inserted: B } = L(s);
|
|
125
|
-
return B ? x : null;
|
|
126
|
-
}
|
|
127
|
-
function M(n, c, e) {
|
|
128
|
-
const r = D(n, c);
|
|
129
|
-
if (!r) return n;
|
|
130
|
-
const t = (l) => l.filter((i) => i.id !== c).map(
|
|
131
|
-
(i) => i.children ? { ...i, children: t(i.children) } : i
|
|
132
|
-
);
|
|
133
|
-
return n.map((l) => {
|
|
134
|
-
let i = l.children ? t(l.children) : [];
|
|
135
|
-
return l.id === e && (i = [r, ...i]), { ...l, children: i };
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
function W(n, c) {
|
|
139
|
-
const {
|
|
140
|
-
activeId: e,
|
|
141
|
-
overId: r,
|
|
142
|
-
insertAfter: t,
|
|
143
|
-
collapsedItems: l = {},
|
|
144
|
-
canDrag: i,
|
|
145
|
-
isValidDropTarget: d
|
|
146
|
-
} = c;
|
|
147
|
-
if (!r || e === r || d && !d({
|
|
148
|
-
activeItemId: e,
|
|
149
|
-
overItemId: r,
|
|
150
|
-
items: n,
|
|
151
|
-
insertAfter: t
|
|
152
|
-
}))
|
|
153
|
-
return n;
|
|
154
|
-
if (i) {
|
|
155
|
-
const s = D(n, e), x = P(n, e);
|
|
156
|
-
if (s && x !== null && !i(s, x))
|
|
157
|
-
return n;
|
|
158
|
-
}
|
|
159
|
-
const a = A(r);
|
|
160
|
-
if (a)
|
|
161
|
-
return M(n, e, a);
|
|
162
|
-
const f = P(n, e), h = P(n, r), g = I(n, e), L = I(n, r);
|
|
163
|
-
if (O.has(r) && f !== null && f > 0)
|
|
164
|
-
return M(n, e, r);
|
|
165
|
-
if (f === 0 && h !== null && h > 0)
|
|
166
|
-
return G(n, e, r) ?? n;
|
|
167
|
-
if (f === null || h === null)
|
|
168
|
-
return n;
|
|
169
|
-
if (f > 0 && h > 0 && g !== L) {
|
|
170
|
-
const s = R(n, e), x = R(n, r);
|
|
171
|
-
return y(
|
|
172
|
-
n,
|
|
173
|
-
e,
|
|
174
|
-
r,
|
|
175
|
-
t,
|
|
176
|
-
l
|
|
177
|
-
) ?? n;
|
|
178
|
-
}
|
|
179
|
-
return f === 0 ? V(n, e, r) ?? n : g === L ? v(n, e, r, t) : _(n, e, r);
|
|
180
|
-
}
|
|
181
|
-
function w(n, c, e = {}) {
|
|
182
|
-
const { active: r, over: t } = c;
|
|
183
|
-
if (!t || r.id === t.id)
|
|
184
|
-
return n;
|
|
185
|
-
const l = r.id, i = t.id, d = r.rect?.current?.translated, a = t.rect;
|
|
186
|
-
let f = !1;
|
|
187
|
-
if (d && a) {
|
|
188
|
-
const s = d.top + d.height / 2, x = a.top + a.height / 2;
|
|
189
|
-
f = s > x;
|
|
190
|
-
}
|
|
191
|
-
const h = P(n, l), g = P(n, i), L = h !== null && g !== null && h > 0 && g > 0 && !!(d && a);
|
|
192
|
-
return W(n, {
|
|
193
|
-
activeId: l,
|
|
194
|
-
overId: i,
|
|
195
|
-
insertAfter: L ? f : !1,
|
|
196
|
-
collapsedItems: e.collapsedItems,
|
|
197
|
-
canDrag: e.canDrag,
|
|
198
|
-
isValidDropTarget: e.isValidDropTarget
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
export {
|
|
202
|
-
O as NESTED_LIST_SECTION_IDS,
|
|
203
|
-
w as applyNestedListDragEndEvent,
|
|
204
|
-
W as applyNestedListDrop,
|
|
205
|
-
D as findNestedListItemById,
|
|
206
|
-
P as findNestedListItemLevel,
|
|
207
|
-
I as findNestedListParentId,
|
|
208
|
-
A as getSectionIdFromDroppable
|
|
209
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { FlatVirtualRowModel, NestedListItem } from './nested-list.types';
|
|
2
|
-
import { FlattenedNestedListRow } from './nested-list-display-utils';
|
|
3
|
-
export declare function computeFlatVirtualHeaderSelection(flatVirtualRowModel: FlatVirtualRowModel): {
|
|
4
|
-
allChecked: boolean;
|
|
5
|
-
someChecked: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare function findFlatVirtualRowIndexByItemId(flatVirtualRowModel: FlatVirtualRowModel, itemId: string): number;
|
|
8
|
-
export interface ResolveVirtualDropReorderOptions {
|
|
9
|
-
activeId: string;
|
|
10
|
-
overId: string;
|
|
11
|
-
insertAfter: boolean;
|
|
12
|
-
flatVirtualRowModel: FlatVirtualRowModel | null;
|
|
13
|
-
displayItems: FlattenedNestedListRow[];
|
|
14
|
-
onVirtualReorder?: (fromIndex: number, toIndex: number) => void;
|
|
15
|
-
}
|
|
16
|
-
export declare function resolveVirtualDropReorderIndices(options: ResolveVirtualDropReorderOptions): {
|
|
17
|
-
fromIndex: number;
|
|
18
|
-
toIndex: number;
|
|
19
|
-
} | null;
|
|
20
|
-
export interface FlatVirtualToggleChange {
|
|
21
|
-
itemId: string;
|
|
22
|
-
checked: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare function resolveFlatVirtualToggleChange(flatVirtualRowModel: FlatVirtualRowModel, sectionItems: NestedListItem[], itemId: string): FlatVirtualToggleChange | null;
|
|
25
|
-
export declare function triggerFlatVirtualSelectAll(flatVirtualRowModel: FlatVirtualRowModel | null, allChecked: boolean, onFlatVirtualSelectAll?: (shouldSelectAll: boolean) => void): boolean;
|
|
26
|
-
export declare function triggerFlatVirtualItemToggle(flatVirtualRowModel: FlatVirtualRowModel | null, sectionItems: NestedListItem[], itemId: string, onItemToggle?: (changes: FlatVirtualToggleChange[]) => void): boolean;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { NESTED_LIST_ROOT_FROZEN_ID as g, NESTED_LIST_ROOT_SCROLLABLE_ID as x } from "./nested-list-constants.js";
|
|
2
|
-
function h(r) {
|
|
3
|
-
let t = !0, e = !1;
|
|
4
|
-
for (let n = 0; n < r.rowCount; n += 1) {
|
|
5
|
-
const o = r.getRowAt(n);
|
|
6
|
-
if (o.item.category !== "structure" && (o.item.checked ? e = !0 : t = !1, e && !t))
|
|
7
|
-
break;
|
|
8
|
-
}
|
|
9
|
-
return { allChecked: t && e, someChecked: e };
|
|
10
|
-
}
|
|
11
|
-
function I(r, t) {
|
|
12
|
-
for (let e = 0; e < r.rowCount; e += 1)
|
|
13
|
-
if (r.getRowAt(e).item.id === t)
|
|
14
|
-
return e;
|
|
15
|
-
return -1;
|
|
16
|
-
}
|
|
17
|
-
function w(r) {
|
|
18
|
-
const {
|
|
19
|
-
activeId: t,
|
|
20
|
-
overId: e,
|
|
21
|
-
insertAfter: n,
|
|
22
|
-
flatVirtualRowModel: o,
|
|
23
|
-
displayItems: l,
|
|
24
|
-
onVirtualReorder: a
|
|
25
|
-
} = r;
|
|
26
|
-
if (!a)
|
|
27
|
-
return null;
|
|
28
|
-
if (o) {
|
|
29
|
-
const i = I(o, t), s = I(o, e), f = n ? s + 1 : s;
|
|
30
|
-
return i !== -1 && f !== -1 && i !== f ? { fromIndex: i, toIndex: f } : null;
|
|
31
|
-
}
|
|
32
|
-
const u = l.findIndex((i) => i.item.id === t), d = l.findIndex((i) => i.item.id === e), c = n ? d + 1 : d;
|
|
33
|
-
return u !== -1 && c !== -1 && u !== c ? { fromIndex: u, toIndex: c } : null;
|
|
34
|
-
}
|
|
35
|
-
function m(r, t, e) {
|
|
36
|
-
if (e === g || e === x) {
|
|
37
|
-
const n = t.find((o) => o.id === e);
|
|
38
|
-
return { itemId: e, checked: !(n?.checked ?? !1) };
|
|
39
|
-
}
|
|
40
|
-
for (let n = 0; n < r.rowCount; n += 1) {
|
|
41
|
-
const o = r.getRowAt(n);
|
|
42
|
-
if (o.item.id === e)
|
|
43
|
-
return { itemId: e, checked: !o.item.checked };
|
|
44
|
-
}
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
function k(r, t, e) {
|
|
48
|
-
return !r || !e ? !1 : (e(!t), !0);
|
|
49
|
-
}
|
|
50
|
-
function C(r, t, e, n) {
|
|
51
|
-
if (!r)
|
|
52
|
-
return !1;
|
|
53
|
-
const o = m(
|
|
54
|
-
r,
|
|
55
|
-
t,
|
|
56
|
-
e
|
|
57
|
-
);
|
|
58
|
-
return o ? (n?.([o]), !0) : !1;
|
|
59
|
-
}
|
|
60
|
-
export {
|
|
61
|
-
h as computeFlatVirtualHeaderSelection,
|
|
62
|
-
I as findFlatVirtualRowIndexByItemId,
|
|
63
|
-
m as resolveFlatVirtualToggleChange,
|
|
64
|
-
w as resolveVirtualDropReorderIndices,
|
|
65
|
-
C as triggerFlatVirtualItemToggle,
|
|
66
|
-
k as triggerFlatVirtualSelectAll
|
|
67
|
-
};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { NestedListItem, SelectionMode } from './nested-list.types';
|
|
2
|
-
export declare function findNestedListItemById(items: NestedListItem[], targetId: string): NestedListItem | null;
|
|
3
|
-
export declare function collectNestedListGroupItemIds(itemsToCollect: NestedListItem[]): string[];
|
|
4
|
-
export declare function updateNestedListParentsUpward(items: NestedListItem[], targetItemId: string, selectionMode: SelectionMode): NestedListItem[];
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { SelectionMode as h } from "./nested-list.types.js";
|
|
2
|
-
function o(c, n) {
|
|
3
|
-
for (const r of c) {
|
|
4
|
-
if (r.id === n)
|
|
5
|
-
return r;
|
|
6
|
-
if (r.children) {
|
|
7
|
-
const d = o(r.children, n);
|
|
8
|
-
if (d)
|
|
9
|
-
return d;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
return null;
|
|
13
|
-
}
|
|
14
|
-
function l(c) {
|
|
15
|
-
const n = [];
|
|
16
|
-
return c.forEach((r) => {
|
|
17
|
-
r.children && r.children.length > 0 && (n.push(r.id), n.push(...l(r.children)));
|
|
18
|
-
}), n;
|
|
19
|
-
}
|
|
20
|
-
function a(c, n, r) {
|
|
21
|
-
if (r === h.INDEPENDENT)
|
|
22
|
-
return c;
|
|
23
|
-
const d = (u, e) => u.id === e ? !0 : u.children ? u.children.some((t) => d(t, e)) : !1, f = (u) => u.map((e) => {
|
|
24
|
-
if (e.id === n)
|
|
25
|
-
return e;
|
|
26
|
-
if (e.children && d(e, n)) {
|
|
27
|
-
const t = f(e.children);
|
|
28
|
-
let i;
|
|
29
|
-
return r === h.CASCADE_UP_DOWN ? i = t.some((s) => s.checked) : i = t.every((s) => s.checked), {
|
|
30
|
-
...e,
|
|
31
|
-
checked: i,
|
|
32
|
-
children: t
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
return e;
|
|
36
|
-
});
|
|
37
|
-
return f(c);
|
|
38
|
-
}
|
|
39
|
-
export {
|
|
40
|
-
l as collectNestedListGroupItemIds,
|
|
41
|
-
o as findNestedListItemById,
|
|
42
|
-
a as updateNestedListParentsUpward
|
|
43
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
function u(e) {
|
|
2
|
-
const s = {
|
|
3
|
-
length: e.rowCount,
|
|
4
|
-
findIndex: (o) => {
|
|
5
|
-
for (let n = 0; n < e.rowCount; n += 1) {
|
|
6
|
-
const t = e.getRowAt(n);
|
|
7
|
-
if (o(t, n, s))
|
|
8
|
-
return n;
|
|
9
|
-
}
|
|
10
|
-
return -1;
|
|
11
|
-
},
|
|
12
|
-
slice: (o = 0, n = e.rowCount) => {
|
|
13
|
-
const t = [];
|
|
14
|
-
for (let r = o; r < n; r += 1)
|
|
15
|
-
t.push(e.getRowAt(r));
|
|
16
|
-
return t;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
return new Proxy(s, {
|
|
20
|
-
get(o, n) {
|
|
21
|
-
if (n === "length")
|
|
22
|
-
return e.rowCount;
|
|
23
|
-
if (n in o) {
|
|
24
|
-
const t = o[n];
|
|
25
|
-
return typeof t == "function" ? t.bind(o) : t;
|
|
26
|
-
}
|
|
27
|
-
if (typeof n == "string" && /^\d+$/.test(n))
|
|
28
|
-
return e.getRowAt(Number(n));
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
u as createLazyFlatRowList
|
|
34
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NestedListItem } from './nested-list.types';
|
|
2
|
-
/** Empty section header + dashed drop zone (measured in column picker). */
|
|
3
|
-
export declare const NESTED_LIST_EMPTY_SECTION_ROW_PX = 68;
|
|
4
|
-
/** root-scrollable header only when children render as separate flat rows. */
|
|
5
|
-
export declare const NESTED_LIST_SCROLLABLE_HEADER_ROW_PX = 37;
|
|
6
|
-
/** root-frozen header only when children render as separate flat rows. */
|
|
7
|
-
export declare const NESTED_LIST_FROZEN_HEADER_ROW_PX = 25;
|
|
8
|
-
export declare function estimateNestedListRowHeight(item: NestedListItem | undefined): number;
|
|
9
|
-
export declare function sumNestedListRowHeightsUpTo(items: NestedListItem[], endIndexExclusive: number): number;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NESTED_LIST_VIRTUAL_ROW_ESTIMATE_PX as t, NESTED_LIST_ROOT_SCROLLABLE_ID as _ } from "./nested-list-constants.js";
|
|
2
|
-
const E = 68, e = 37, n = 25;
|
|
3
|
-
function u(r) {
|
|
4
|
-
return r.category !== "structure" || r.data?.hasVirtualColumnChildren === !0 ? !1 : !r.children || r.children.length === 0;
|
|
5
|
-
}
|
|
6
|
-
function T(r) {
|
|
7
|
-
return r ? r.category === "structure" ? u(r) ? E : r.id === _ ? e : n : t : t;
|
|
8
|
-
}
|
|
9
|
-
export {
|
|
10
|
-
E as NESTED_LIST_EMPTY_SECTION_ROW_PX,
|
|
11
|
-
n as NESTED_LIST_FROZEN_HEADER_ROW_PX,
|
|
12
|
-
e as NESTED_LIST_SCROLLABLE_HEADER_ROW_PX,
|
|
13
|
-
T as estimateNestedListRowHeight
|
|
14
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { VirtualDropRowGeometry } from './nested-list-virtual-drop';
|
|
2
|
-
export interface NestedListScrollAnchorCapture {
|
|
3
|
-
anchorItemId: string;
|
|
4
|
-
anchorRowIndex: number;
|
|
5
|
-
anchorTopInViewport: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function findNestedListRowIndexByItemId(options: {
|
|
8
|
-
rowCount: number;
|
|
9
|
-
getRowAtIndex: (index: number) => {
|
|
10
|
-
item: {
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
} | undefined;
|
|
14
|
-
anchorItemId: string;
|
|
15
|
-
}): number;
|
|
16
|
-
export declare function resolveNestedListRowOffset(options: {
|
|
17
|
-
virtualizer: VirtualDropRowGeometry;
|
|
18
|
-
rowIndex: number;
|
|
19
|
-
estimateRowSize: (index: number) => number;
|
|
20
|
-
}): number;
|
|
21
|
-
export declare function captureNestedListScrollAnchor(options: {
|
|
22
|
-
scrollElement: HTMLElement;
|
|
23
|
-
anchorItemId: string;
|
|
24
|
-
anchorRowIndex: number;
|
|
25
|
-
rowOffset: number;
|
|
26
|
-
}): NestedListScrollAnchorCapture | null;
|
|
27
|
-
export declare function computeAnchoredScrollTop(options: {
|
|
28
|
-
newRowOffset: number;
|
|
29
|
-
anchorTopInViewport: number;
|
|
30
|
-
}): number;
|
|
31
|
-
export declare function restoreNestedListScrollAnchor(options: {
|
|
32
|
-
scrollElement: HTMLElement;
|
|
33
|
-
capture: NestedListScrollAnchorCapture;
|
|
34
|
-
virtualizer: VirtualDropRowGeometry;
|
|
35
|
-
estimateRowSize: (index: number) => number;
|
|
36
|
-
}): void;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
function u(e) {
|
|
2
|
-
for (let r = 0; r < e.rowCount; r += 1)
|
|
3
|
-
if (e.getRowAtIndex(r)?.item.id === e.anchorItemId)
|
|
4
|
-
return r;
|
|
5
|
-
return -1;
|
|
6
|
-
}
|
|
7
|
-
function c(e) {
|
|
8
|
-
if (e.rowIndex <= 0)
|
|
9
|
-
return 0;
|
|
10
|
-
const r = e.virtualizer.measurementsCache[e.rowIndex]?.start;
|
|
11
|
-
if (r !== void 0)
|
|
12
|
-
return r;
|
|
13
|
-
let n = 0;
|
|
14
|
-
for (let t = 0; t < e.rowIndex; t += 1) {
|
|
15
|
-
const o = e.virtualizer.measurementsCache[t]?.size;
|
|
16
|
-
n += o && o > 0 ? o : e.estimateRowSize(t);
|
|
17
|
-
}
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
function l(e) {
|
|
21
|
-
return e.anchorRowIndex < 0 ? null : {
|
|
22
|
-
anchorItemId: e.anchorItemId,
|
|
23
|
-
anchorRowIndex: e.anchorRowIndex,
|
|
24
|
-
anchorTopInViewport: e.rowOffset - e.scrollElement.scrollTop
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
function a(e) {
|
|
28
|
-
return Math.max(0, e.newRowOffset - e.anchorTopInViewport);
|
|
29
|
-
}
|
|
30
|
-
function w(e) {
|
|
31
|
-
const r = c({
|
|
32
|
-
virtualizer: e.virtualizer,
|
|
33
|
-
rowIndex: e.capture.anchorRowIndex,
|
|
34
|
-
estimateRowSize: e.estimateRowSize
|
|
35
|
-
});
|
|
36
|
-
e.scrollElement.scrollTop = a({
|
|
37
|
-
newRowOffset: r,
|
|
38
|
-
anchorTopInViewport: e.capture.anchorTopInViewport
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
export {
|
|
42
|
-
l as captureNestedListScrollAnchor,
|
|
43
|
-
a as computeAnchoredScrollTop,
|
|
44
|
-
u as findNestedListRowIndexByItemId,
|
|
45
|
-
c as resolveNestedListRowOffset,
|
|
46
|
-
w as restoreNestedListScrollAnchor
|
|
47
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { NestedListItem } from './nested-list.types';
|
|
2
|
-
export type FlatNestedListRow = {
|
|
3
|
-
item: NestedListItem;
|
|
4
|
-
level: number;
|
|
5
|
-
indentLevel: number;
|
|
6
|
-
};
|
|
7
|
-
export type VirtualDropTarget = {
|
|
8
|
-
overId: string;
|
|
9
|
-
insertAfter: boolean;
|
|
10
|
-
flatIndex: number;
|
|
11
|
-
};
|
|
12
|
-
export declare function resolveSectionHeaderDropTarget(items: FlatNestedListRow[], sectionId: string): {
|
|
13
|
-
overId: string;
|
|
14
|
-
insertAfter: boolean;
|
|
15
|
-
} | null;
|
|
16
|
-
/**
|
|
17
|
-
* Maps group-header pointer targets to commit-safe drop targets.
|
|
18
|
-
* insertAfter on a group header (gap before first child) must target the first
|
|
19
|
-
* child leaf so cross-group moves pass column-picker validation.
|
|
20
|
-
*/
|
|
21
|
-
export declare function resolveGroupHeaderDropTarget(items: FlatNestedListRow[], groupId: string, insertAfter: boolean, collapsedItems?: Record<string, boolean>): {
|
|
22
|
-
overId: string;
|
|
23
|
-
insertAfter: boolean;
|
|
24
|
-
};
|
|
25
|
-
export declare function resolveSectionDroppableFromDomHit(clientX: number, clientY: number, scrollElement: HTMLElement): string | null;
|
|
26
|
-
export interface VirtualDropRowGeometry {
|
|
27
|
-
measurementsCache: Array<{
|
|
28
|
-
start: number;
|
|
29
|
-
size: number;
|
|
30
|
-
}>;
|
|
31
|
-
getTotalSize: () => number;
|
|
32
|
-
}
|
|
33
|
-
export interface ResolveVirtualDropTargetOptions {
|
|
34
|
-
clientX: number;
|
|
35
|
-
clientY: number;
|
|
36
|
-
scrollElement: HTMLElement;
|
|
37
|
-
items: FlatNestedListRow[];
|
|
38
|
-
virtualizer: VirtualDropRowGeometry;
|
|
39
|
-
estimateRowSize: (index: number) => number;
|
|
40
|
-
offsetCacheHolder?: {
|
|
41
|
-
current: VirtualDropRowOffsetCache | null;
|
|
42
|
-
};
|
|
43
|
-
collapsedItems?: Record<string, boolean>;
|
|
44
|
-
}
|
|
45
|
-
export interface VirtualDropRowOffsetCache {
|
|
46
|
-
rowCount: number;
|
|
47
|
-
measurementFingerprint: number;
|
|
48
|
-
offsets: number[];
|
|
49
|
-
sizes: number[];
|
|
50
|
-
}
|
|
51
|
-
export declare function resolveVirtualDropTarget(options: ResolveVirtualDropTargetOptions): VirtualDropTarget | null;
|
|
52
|
-
export declare function insertGapIndexFromDropTarget(items: FlatNestedListRow[], target: Pick<VirtualDropTarget, 'overId' | 'insertAfter'>): number | null;
|
|
53
|
-
export declare function getInsertGapOffsetY(insertGapIndex: number, virtualizer: VirtualDropRowGeometry, estimateRowSize: (index: number) => number, rowCount: number): number;
|
|
54
|
-
export declare function isInsertGapVisibleOnMountedRows(insertGapIndex: number, mountedRowIndices: number[], rowCount: number): boolean;
|
|
55
|
-
export declare function clampPointerToScrollBounds(clientX: number, clientY: number, scrollRect: DOMRect): {
|
|
56
|
-
pointerX: number;
|
|
57
|
-
pointerY: number;
|
|
58
|
-
isInsideScrollContainer: boolean;
|
|
59
|
-
};
|