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.
- 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/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/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/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 +58 -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 +58 -0
- package/dist/form-react/Fields/YearRangePickerField.d.ts +8 -0
- package/dist/form-react/Fields/YearRangePickerField.js +58 -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 +72 -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,306 +1,187 @@
|
|
|
1
|
-
import { buildColumnTreeFromGrid as
|
|
2
|
-
import { computeColumnListSyncFingerprints as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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 = {
|
|
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 = {
|
|
32
22
|
frozenColumns: "__prewarm_frozen__",
|
|
33
23
|
scrollableColumns: "__prewarm_scrollable__"
|
|
34
|
-
}
|
|
35
|
-
function
|
|
36
|
-
return typeof
|
|
24
|
+
};
|
|
25
|
+
function I(i) {
|
|
26
|
+
return typeof i.isDestroyed == "function" && i.isDestroyed();
|
|
37
27
|
}
|
|
38
|
-
function
|
|
39
|
-
return
|
|
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);
|
|
40
30
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
for (const t of
|
|
44
|
-
if (t.id ===
|
|
45
|
-
t.children &&
|
|
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);
|
|
46
36
|
continue;
|
|
47
37
|
}
|
|
48
38
|
if (t.children && t.children.length > 0) {
|
|
49
|
-
|
|
39
|
+
e(t.children);
|
|
50
40
|
continue;
|
|
51
41
|
}
|
|
52
|
-
t.id &&
|
|
42
|
+
t.id && n.add(t.id);
|
|
53
43
|
}
|
|
54
44
|
};
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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))
|
|
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))
|
|
120
73
|
return !1;
|
|
121
|
-
const
|
|
122
|
-
let
|
|
123
|
-
for (const
|
|
124
|
-
if (
|
|
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)))
|
|
125
78
|
return !0;
|
|
126
|
-
return
|
|
127
|
-
}
|
|
128
|
-
function
|
|
129
|
-
const { gridApi:
|
|
130
|
-
if (t != null && !
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
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",
|
|
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,
|
|
144
93
|
syncMode: "structural",
|
|
145
|
-
fingerprints:
|
|
146
|
-
} : {
|
|
147
|
-
rootItems: null,
|
|
148
|
-
authority: t.authority,
|
|
149
|
-
pickerMode: "authority-flat",
|
|
150
|
-
syncMode: "skip",
|
|
151
|
-
fingerprints: t.fingerprints
|
|
94
|
+
fingerprints: s
|
|
152
95
|
};
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
i
|
|
157
|
-
), N = f(i, E);
|
|
96
|
+
}
|
|
97
|
+
if (r.layout !== t.fingerprints.layout || r.visibility !== t.fingerprints.visibility || r.indicators !== t.fingerprints.indicators) {
|
|
98
|
+
const s = u(n, o);
|
|
158
99
|
return {
|
|
159
|
-
rootItems:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
syncMode: "indicators-only",
|
|
163
|
-
fingerprints: N
|
|
100
|
+
rootItems: o,
|
|
101
|
+
syncMode: "structural",
|
|
102
|
+
fingerprints: s
|
|
164
103
|
};
|
|
165
104
|
}
|
|
166
|
-
return
|
|
167
|
-
rootItems: t.items,
|
|
168
|
-
authority: null,
|
|
169
|
-
pickerMode: "tree",
|
|
170
|
-
syncMode: "structural",
|
|
171
|
-
fingerprints: t.fingerprints
|
|
172
|
-
} : {
|
|
105
|
+
return {
|
|
173
106
|
rootItems: null,
|
|
174
|
-
authority: null,
|
|
175
|
-
pickerMode: "tree",
|
|
176
107
|
syncMode: "skip",
|
|
177
108
|
fingerprints: t.fingerprints
|
|
178
109
|
};
|
|
179
110
|
}
|
|
180
|
-
if (
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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);
|
|
111
|
+
if (!c && a && !f) {
|
|
112
|
+
const l = C(
|
|
113
|
+
o,
|
|
114
|
+
n
|
|
115
|
+
), s = u(n, l);
|
|
199
116
|
return {
|
|
200
|
-
rootItems:
|
|
201
|
-
authority: null,
|
|
202
|
-
pickerMode: "tree",
|
|
117
|
+
rootItems: l,
|
|
203
118
|
syncMode: "visibility-only",
|
|
204
|
-
fingerprints:
|
|
119
|
+
fingerprints: s
|
|
205
120
|
};
|
|
206
121
|
}
|
|
207
|
-
if (!
|
|
208
|
-
const
|
|
122
|
+
if (!c && !a && f) {
|
|
123
|
+
const l = u(n, o);
|
|
209
124
|
return {
|
|
210
|
-
rootItems:
|
|
211
|
-
authority: null,
|
|
212
|
-
pickerMode: "tree",
|
|
125
|
+
rootItems: o,
|
|
213
126
|
syncMode: "indicators-only",
|
|
214
|
-
fingerprints:
|
|
127
|
+
fingerprints: l
|
|
215
128
|
};
|
|
216
129
|
}
|
|
217
|
-
if (!
|
|
218
|
-
const
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
),
|
|
130
|
+
if (!c && a && f) {
|
|
131
|
+
const l = C(
|
|
132
|
+
o,
|
|
133
|
+
n
|
|
134
|
+
), s = u(n, l);
|
|
222
135
|
return {
|
|
223
|
-
rootItems:
|
|
224
|
-
authority: null,
|
|
225
|
-
pickerMode: "tree",
|
|
136
|
+
rootItems: l,
|
|
226
137
|
syncMode: "visibility-only",
|
|
227
|
-
fingerprints:
|
|
138
|
+
fingerprints: s
|
|
228
139
|
};
|
|
229
140
|
}
|
|
230
141
|
}
|
|
231
|
-
const
|
|
232
|
-
if (
|
|
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 (!_)
|
|
142
|
+
const g = v(n, e);
|
|
143
|
+
if (!g)
|
|
244
144
|
return {
|
|
245
145
|
rootItems: null,
|
|
246
|
-
authority: null,
|
|
247
|
-
pickerMode: "tree",
|
|
248
146
|
syncMode: "skip",
|
|
249
|
-
fingerprints:
|
|
147
|
+
fingerprints: r
|
|
250
148
|
};
|
|
251
|
-
const
|
|
149
|
+
const G = b(n, e)?.fingerprints ?? {
|
|
252
150
|
layout: "",
|
|
253
151
|
visibility: "",
|
|
254
152
|
indicators: ""
|
|
255
153
|
};
|
|
256
154
|
return {
|
|
257
|
-
rootItems:
|
|
258
|
-
authority: null,
|
|
259
|
-
pickerMode: "tree",
|
|
155
|
+
rootItems: g,
|
|
260
156
|
syncMode: "structural",
|
|
261
|
-
fingerprints:
|
|
157
|
+
fingerprints: G
|
|
262
158
|
};
|
|
263
159
|
}
|
|
264
|
-
function
|
|
265
|
-
return typeof
|
|
160
|
+
function q(i) {
|
|
161
|
+
return typeof i.getColumnState == "function" && (typeof i.getAllGridColumns == "function" || typeof i.getColumns == "function");
|
|
266
162
|
}
|
|
267
|
-
function
|
|
268
|
-
|
|
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);
|
|
163
|
+
function J(i) {
|
|
164
|
+
return $(i).syncMode === "skip";
|
|
280
165
|
}
|
|
281
|
-
function
|
|
282
|
-
let
|
|
166
|
+
function K(i) {
|
|
167
|
+
let n = !1, e = 0, r;
|
|
283
168
|
const t = () => {
|
|
284
|
-
|
|
169
|
+
n || I(i) || !q(i) || p.has(i) || v(i, h);
|
|
285
170
|
};
|
|
286
|
-
return
|
|
287
|
-
|
|
288
|
-
}) : (r = requestAnimationFrame(() => {
|
|
289
|
-
i || (typeof requestIdleCallback < "u" ? n = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
|
|
171
|
+
return e = requestAnimationFrame(() => {
|
|
172
|
+
n || (typeof requestIdleCallback < "u" ? r = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
|
|
290
173
|
}), () => {
|
|
291
|
-
|
|
292
|
-
}
|
|
174
|
+
n = !0, e && cancelAnimationFrame(e), r !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(r);
|
|
175
|
+
};
|
|
293
176
|
}
|
|
294
177
|
export {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
M as writeColumnTreeAuthorityCache,
|
|
305
|
-
f as writeColumnTreeCache
|
|
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
|
|
306
187
|
};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
1
|
import { GridApi } from 'ag-grid-community';
|
|
2
2
|
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
|
-
export interface ColumnIndicatorMaps {
|
|
4
|
-
sortAppliedByColumnId: Map<string, boolean>;
|
|
5
|
-
filterAppliedByColumnId: Map<string, boolean>;
|
|
6
|
-
}
|
|
7
|
-
export declare function buildColumnIndicatorMapsFromGrid(gridApi: GridApi): ColumnIndicatorMaps;
|
|
8
3
|
export declare function patchColumnTreeIndicatorsFromGrid(rootItems: NestedListItem[], gridApi: GridApi): NestedListItem[];
|
|
@@ -1,41 +1,24 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const a = /* @__PURE__ */ new Map(), u = l.getAllGridColumns?.() ?? l.getColumns?.() ?? [];
|
|
6
|
-
for (const n of u) {
|
|
7
|
-
const c = n.getColId();
|
|
8
|
-
a.set(
|
|
9
|
-
c,
|
|
10
|
-
n.isFilterActive() === !0 || r === c
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
return { sortAppliedByColumnId: s, filterAppliedByColumnId: a };
|
|
14
|
-
}
|
|
15
|
-
function I(l, o) {
|
|
16
|
-
const r = o.getGridOption("context"), s = typeof r?.activeSearchColumnId == "string" ? r.activeSearchColumnId : null, a = new Map(
|
|
17
|
-
o.getColumnState().map((e) => [e.colId, e])
|
|
18
|
-
), u = o.getAllGridColumns?.() ?? o.getColumns?.() ?? [], n = new Map(
|
|
19
|
-
u.map((e) => [e.getColId(), e])
|
|
20
|
-
), c = (e) => e.map((t) => {
|
|
1
|
+
function h(n, c) {
|
|
2
|
+
const e = c.getGridOption("context"), a = typeof e?.activeSearchColumnId == "string" ? e.activeSearchColumnId : null, o = new Map(
|
|
3
|
+
c.getColumnState().map((r) => [r.colId, r])
|
|
4
|
+
), i = (r) => r.map((t) => {
|
|
21
5
|
if ((t.category === "group" || t.children && t.children.length > 0) && t.children)
|
|
22
6
|
return {
|
|
23
7
|
...t,
|
|
24
|
-
children:
|
|
8
|
+
children: i(t.children)
|
|
25
9
|
};
|
|
26
|
-
const
|
|
10
|
+
const l = c.getColumn(t.id), s = o.get(t.id), u = t.data;
|
|
27
11
|
return {
|
|
28
12
|
...t,
|
|
29
13
|
data: {
|
|
30
|
-
...
|
|
31
|
-
hasSortApplied: !!
|
|
32
|
-
hasFilterApplied:
|
|
14
|
+
...u,
|
|
15
|
+
hasSortApplied: !!s?.sort,
|
|
16
|
+
hasFilterApplied: l?.isFilterActive() === !0 || a === t.id
|
|
33
17
|
}
|
|
34
18
|
};
|
|
35
19
|
});
|
|
36
|
-
return
|
|
20
|
+
return i(n);
|
|
37
21
|
}
|
|
38
22
|
export {
|
|
39
|
-
|
|
40
|
-
I as patchColumnTreeIndicatorsFromGrid
|
|
23
|
+
h as patchColumnTreeIndicatorsFromGrid
|
|
41
24
|
};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { GridApi } from 'ag-grid-community';
|
|
2
2
|
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
|
-
import { ColumnPickerMode } from './data-table-column-tree-cache';
|
|
4
|
-
import { ColumnPickerAuthority } from './column-picker-authority';
|
|
5
3
|
export interface UseDataTableColumnListSyncOptions {
|
|
6
4
|
gridApi: GridApi | null;
|
|
7
5
|
frozenColumnsLabel: string;
|
|
@@ -10,17 +8,9 @@ export interface UseDataTableColumnListSyncOptions {
|
|
|
10
8
|
}
|
|
11
9
|
export declare function useDataTableColumnListSync({ gridApi, frozenColumnsLabel, scrollableColumnsLabel, isSyncActive, }: UseDataTableColumnListSyncOptions): {
|
|
12
10
|
items: NestedListItem[];
|
|
13
|
-
columnPickerAuthority: ColumnPickerAuthority | null;
|
|
14
|
-
pickerMode: ColumnPickerMode;
|
|
15
11
|
isReady: boolean;
|
|
16
12
|
listWrapperRef: import('react').RefObject<HTMLDivElement | null>;
|
|
17
13
|
handleChange: (currentItems: NestedListItem[], enableApplyDiscard: boolean) => void;
|
|
18
14
|
handleSubmit: (finalItems: NestedListItem[]) => void;
|
|
19
15
|
handlePinChange: (itemId: string, newPinned: "left" | "right" | null) => void;
|
|
20
|
-
handleAuthorityItemToggle: (toggleChanges: Array<{
|
|
21
|
-
itemId: string;
|
|
22
|
-
checked: boolean;
|
|
23
|
-
}>) => void;
|
|
24
|
-
handleAuthorityVirtualDrop: (activeId: string, overId: string, insertAfter: boolean) => void;
|
|
25
|
-
handleAuthoritySelectAll: (shouldSelectAll: boolean) => void;
|
|
26
16
|
};
|