impact-nova 2.5.12 → 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.
- package/dist/components/data/data-table/build-column-tree-from-grid.d.ts +1 -0
- package/dist/components/data/data-table/build-column-tree-from-grid.js +55 -50
- package/dist/components/data/data-table/column-picker-authority.d.ts +34 -0
- package/dist/components/data/data-table/column-picker-authority.js +116 -0
- package/dist/components/data/data-table/column-picker-drop-validation.d.ts +7 -0
- package/dist/components/data/data-table/column-picker-drop-validation.js +37 -0
- package/dist/components/data/data-table/data-table-column-apply.d.ts +2 -0
- package/dist/components/data/data-table/data-table-column-apply.js +84 -73
- package/dist/components/data/data-table/data-table-column-list-tree-apply.d.ts +10 -0
- package/dist/components/data/data-table/data-table-column-list-tree-apply.js +79 -0
- package/dist/components/data/data-table/data-table-column-list.js +94 -64
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +12 -6
- package/dist/components/data/data-table/data-table-column-tree-cache.js +250 -131
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +26 -0
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +195 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.d.ts +1 -0
- package/dist/components/data/data-table/data-table-picker-column-eligibility.js +7 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +5 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +28 -11
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.d.ts +12 -0
- package/dist/components/data/data-table/reconcile-column-tree-from-grid.js +12 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +10 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +250 -196
- package/dist/components/data/nested-list/components/NestedListContent.d.ts +10 -2
- package/dist/components/data/nested-list/components/NestedListContent.js +253 -138
- package/dist/components/data/nested-list/components/SortableItem.d.ts +2 -1
- package/dist/components/data/nested-list/components/SortableItem.js +62 -60
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.d.ts +10 -20
- package/dist/components/data/nested-list/hooks/useNestedListDragDrop.js +44 -233
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.d.ts +24 -0
- package/dist/components/data/nested-list/hooks/useVirtualNestedListDrag.js +128 -0
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -1
- package/dist/components/data/nested-list/nested-list-constants.js +10 -4
- package/dist/components/data/nested-list/nested-list-display-utils.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-display-utils.js +74 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.d.ts +31 -0
- package/dist/components/data/nested-list/nested-list-drop-engine.js +209 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.d.ts +26 -0
- package/dist/components/data/nested-list/nested-list-flat-virtual-handlers.js +67 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-item-tree-mutations.js +43 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-lazy-flat-rows.js +34 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.d.ts +9 -0
- package/dist/components/data/nested-list/nested-list-row-estimates.js +14 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.d.ts +36 -0
- package/dist/components/data/nested-list/nested-list-scroll-anchor.js +47 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.d.ts +59 -0
- package/dist/components/data/nested-list/nested-list-virtual-drop.js +341 -0
- package/dist/components/data/nested-list/nested-list.js +322 -336
- package/dist/components/data/nested-list/nested-list.types.d.ts +17 -0
- package/dist/components/data-display/calendar/calendar-apply-validation.d.ts +0 -2
- package/dist/components/data-display/calendar/calendar-apply-validation.js +67 -64
- package/dist/components/data-display/calendar/calendar-config.js +1 -1
- package/dist/components/data-display/calendar/calendar-day-picker-components.d.ts +2 -4
- package/dist/components/data-display/calendar/calendar-day-picker-components.js +164 -234
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +76 -77
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.d.ts +0 -6
- package/dist/components/data-display/calendar/calendar-fiscal-period-nav.js +18 -34
- package/dist/components/data-display/calendar/calendar-footer.js +21 -21
- package/dist/components/data-display/calendar/calendar-month-picker-panel.js +49 -50
- package/dist/components/data-display/calendar/calendar-month-utils.d.ts +0 -5
- package/dist/components/data-display/calendar/calendar-month-utils.js +64 -85
- package/dist/components/data-display/calendar/calendar-padding-week.utils.d.ts +1 -3
- package/dist/components/data-display/calendar/calendar-padding-week.utils.js +5 -7
- package/dist/components/data-display/calendar/calendar-period-cell.js +46 -45
- package/dist/components/data-display/calendar/calendar-quarter-panes.js +31 -33
- package/dist/components/data-display/calendar/calendar-selection-appearance.d.ts +0 -10
- package/dist/components/data-display/calendar/calendar-selection-appearance.js +39 -53
- package/dist/components/data-display/calendar/calendar-selection.d.ts +0 -25
- package/dist/components/data-display/calendar/calendar-selection.js +23 -52
- package/dist/components/data-display/calendar/calendar-week-number-cell.d.ts +1 -2
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +45 -59
- package/dist/components/data-display/calendar/calendar-week-utils.d.ts +3 -13
- package/dist/components/data-display/calendar/calendar-week-utils.js +50 -59
- package/dist/components/data-display/calendar/calendar-year-panes.d.ts +0 -3
- package/dist/components/data-display/calendar/calendar-year-panes.js +49 -53
- package/dist/components/data-display/calendar/calendar.js +143 -146
- package/dist/components/data-display/calendar/calendar.types.d.ts +0 -5
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.d.ts +1 -2
- package/dist/components/data-display/calendar/use-calendar-day-picker-config.js +74 -79
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +1 -3
- package/dist/components/data-display/calendar/use-calendar-state.js +325 -403
- package/dist/components/forms/date-picker/date-picker.js +58 -60
- package/dist/components/forms/date-picker/date-picker.types.d.ts +0 -5
- package/dist/components/forms/date-picker/date-range-picker.js +64 -66
- package/dist/components/forms/date-picker/fiscal-pass-through.d.ts +0 -1
- package/dist/components/forms/date-picker/fiscal-pass-through.js +2 -3
- package/dist/components/forms/date-picker/month-picker.js +59 -61
- package/dist/components/forms/date-picker/month-range-picker.js +61 -63
- package/dist/components/forms/date-picker/multi-date-picker.js +49 -51
- package/dist/components/forms/date-picker/multi-month-picker.js +47 -49
- package/dist/components/forms/date-picker/multi-quarter-picker.js +47 -51
- package/dist/components/forms/date-picker/multi-week-picker.js +51 -53
- package/dist/components/forms/date-picker/multi-year-picker.js +49 -53
- package/dist/components/forms/date-picker/quarter-picker.js +47 -51
- package/dist/components/forms/date-picker/quarter-range-picker.js +46 -50
- package/dist/components/forms/date-picker/week-picker.js +66 -68
- package/dist/components/forms/date-picker/week-range-picker.js +80 -82
- package/dist/components/forms/date-picker/year-picker.js +48 -52
- package/dist/components/forms/date-picker/year-range-picker.js +48 -52
- package/dist/form-react/Fields/DateInputField.js +50 -51
- package/dist/form-react/Fields/DateRangeField.js +13 -14
- package/dist/form-react/Fields/MonthRangeField.js +28 -29
- package/dist/form-react/Fields/MultiMonthPickerField.js +12 -13
- package/dist/form-react/Fields/MultiWeekPickerField.js +27 -35
- package/dist/form-react/Fields/WeekRangePicker.js +32 -33
- package/dist/form-react/types/fields.types.d.ts +0 -14
- package/dist/impact-nova-components.css +6 -13
- package/dist/impact-nova.css +1 -1
- package/dist/lib/fiscal-calendar/week-selection.js +2 -2
- package/dist/lib/hash/fnv1a128.d.ts +16 -0
- package/dist/lib/hash/fnv1a128.js +21 -0
- 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-display/calendar/calendar-available-view.d.ts +0 -27
- package/dist/components/data-display/calendar/calendar-available-view.js +0 -85
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.d.ts +0 -9
- package/dist/components/data-display/calendar/calendar-fiscal-day-cell.js +0 -45
- package/dist/components/data-display/calendar/calendar-injected-week-row.d.ts +0 -5
- package/dist/components/data-display/calendar/calendar-injected-week-row.js +0 -92
- package/dist/components/data-display/calendar/calendar-leading-week.utils.d.ts +0 -16
- package/dist/components/data-display/calendar/calendar-leading-week.utils.js +0 -51
- package/dist/components/data-display/calendar/calendar-orphan-week.d.ts +0 -23
- package/dist/components/forms/date-picker/fiscal-picker-fixtures.d.ts +0 -17
|
@@ -1,86 +1,116 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import { useDataTableSheet as
|
|
5
|
-
import { NestedList as
|
|
6
|
-
import { SelectionMode as
|
|
7
|
-
import { useImpactNovaI18n as
|
|
8
|
-
import { countNestedListLeaves as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as z, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as B, useState as H, useMemo as m, useCallback as s } from "react";
|
|
3
|
+
import { useDataTable as j } from "./data-table-context.js";
|
|
4
|
+
import { useDataTableSheet as G } from "./data-table-sheet-context.js";
|
|
5
|
+
import { NestedList as U } from "../nested-list/nested-list.js";
|
|
6
|
+
import { SelectionMode as W } from "../nested-list/nested-list.types.js";
|
|
7
|
+
import { useImpactNovaI18n as Z } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { countNestedListLeaves as q, buildCollapsedStateForAllGroups as J } from "../nested-list/nested-list-tree-utils.js";
|
|
9
|
+
import { NESTED_LIST_VIRTUALIZATION_THRESHOLD as K, NESTED_LIST_ROOT_FROZEN_ID as Q } from "../nested-list/nested-list-constants.js";
|
|
10
|
+
import { PinSwitch as X } from "./pin-switch.js";
|
|
11
|
+
import { ColumnIndicator as C } from "./column-indicator.js";
|
|
12
|
+
import { IndicatorLegend as Y } from "./indicator-legend.js";
|
|
13
|
+
import { useDataTableColumnListSync as $ } from "./use-data-table-column-list-sync.js";
|
|
14
|
+
import { buildFlatColumnVirtualRowModel as ee } from "./data-table-flat-column-virtual-rows.js";
|
|
15
|
+
import { isValidColumnPickerGroupDrop as te } from "./column-picker-drop-validation.js";
|
|
16
|
+
const le = 100, Le = ({
|
|
17
|
+
enableApplyDiscard: c = !1,
|
|
18
|
+
showSearch: A = !0,
|
|
19
|
+
showSelectAll: b = !0,
|
|
20
|
+
showCollapse: L = !0
|
|
18
21
|
}) => {
|
|
19
|
-
const { gridApi:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
22
|
+
const { gridApi: S } = j(), { open: g } = G(), { t: i } = Z(), T = B({}), [a, I] = H({}), u = m(
|
|
23
|
+
() => ({
|
|
24
|
+
frozenColumns: i("dataTable.frozenColumns"),
|
|
25
|
+
scrollableColumns: i("dataTable.scrollableColumns")
|
|
26
|
+
}),
|
|
27
|
+
[i]
|
|
28
|
+
), {
|
|
29
|
+
items: o,
|
|
30
|
+
columnPickerAuthority: l,
|
|
31
|
+
pickerMode: v,
|
|
32
|
+
isReady: D,
|
|
33
|
+
listWrapperRef: y,
|
|
34
|
+
handleChange: f,
|
|
35
|
+
handleSubmit: R,
|
|
36
|
+
handlePinChange: h,
|
|
37
|
+
handleAuthorityItemToggle: _,
|
|
38
|
+
handleAuthorityVirtualDrop: N,
|
|
39
|
+
handleAuthoritySelectAll: x
|
|
40
|
+
} = $({
|
|
41
|
+
gridApi: S,
|
|
42
|
+
frozenColumnsLabel: u.frozenColumns,
|
|
43
|
+
scrollableColumnsLabel: u.scrollableColumns,
|
|
44
|
+
isSyncActive: g
|
|
45
|
+
}), t = v === "authority-flat" && l != null, d = m(() => t && l ? l.orderedColumnIds.length : q(o), [t, l, o]), E = m(() => t || Object.keys(a).length > 0 || o.length === 0 || d <= le ? a : J(o), [a, d, t, o]), O = m(() => d >= K ? "virtual-index" : "sortable", [d]), F = s(
|
|
46
|
+
(e) => l ? ee(l, u, {
|
|
47
|
+
searchQuery: e,
|
|
48
|
+
sortAppliedByColumnId: l.sortAppliedByColumnId,
|
|
49
|
+
filterAppliedByColumnId: l.filterAppliedByColumnId
|
|
50
|
+
}) : { rowCount: 0, getRowAt: () => ({ item: o[0], level: 0, indentLevel: 0 }) },
|
|
51
|
+
[l, u, o]
|
|
52
|
+
), V = s(
|
|
32
53
|
(e) => {
|
|
33
|
-
|
|
54
|
+
f(e, c);
|
|
34
55
|
},
|
|
35
|
-
[
|
|
36
|
-
),
|
|
37
|
-
(e
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
[c, f]
|
|
57
|
+
), M = s(
|
|
58
|
+
(e) => t ? !0 : te(e),
|
|
59
|
+
[t]
|
|
60
|
+
), k = s(
|
|
61
|
+
(e, p) => {
|
|
62
|
+
if (!p.isLeaf) return null;
|
|
63
|
+
const r = e.data;
|
|
64
|
+
return !r?.hasSortApplied && !r?.hasFilterApplied ? null : /* @__PURE__ */ z("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
|
|
65
|
+
r?.hasSortApplied && /* @__PURE__ */ n(C, { type: "sort" }),
|
|
66
|
+
r?.hasFilterApplied && /* @__PURE__ */ n(C, { type: "filter" })
|
|
43
67
|
] });
|
|
44
68
|
},
|
|
45
69
|
[]
|
|
46
|
-
),
|
|
47
|
-
(e,
|
|
48
|
-
const
|
|
49
|
-
return e.category === "structure" ? e.id !==
|
|
50
|
-
|
|
70
|
+
), P = s(
|
|
71
|
+
(e, p) => {
|
|
72
|
+
const r = e.data;
|
|
73
|
+
return e.category === "structure" ? e.id !== Q ? null : /* @__PURE__ */ n(Y, {}) : !p.isLeaf || !(r?.pinned === "left" || r?.pinned === "right") ? null : /* @__PURE__ */ n(
|
|
74
|
+
X,
|
|
51
75
|
{
|
|
52
|
-
value:
|
|
53
|
-
onChange: (
|
|
76
|
+
value: r?.pinned ?? null,
|
|
77
|
+
onChange: (w) => h(e.id, w),
|
|
54
78
|
className: "shrink-0"
|
|
55
79
|
}
|
|
56
80
|
);
|
|
57
81
|
},
|
|
58
|
-
[
|
|
82
|
+
[h]
|
|
59
83
|
);
|
|
60
|
-
return
|
|
61
|
-
|
|
84
|
+
return D ? /* @__PURE__ */ n("div", { ref: y, className: "flex flex-col flex-1 min-h-0 bg-canvas-elevated", children: /* @__PURE__ */ n(
|
|
85
|
+
U,
|
|
62
86
|
{
|
|
63
|
-
items:
|
|
64
|
-
onChange:
|
|
65
|
-
onSubmit:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
items: o,
|
|
88
|
+
onChange: V,
|
|
89
|
+
onSubmit: R,
|
|
90
|
+
onItemToggle: t ? _ : void 0,
|
|
91
|
+
onVirtualDrop: t ? N : void 0,
|
|
92
|
+
flatVirtualRowResolver: t ? F : void 0,
|
|
93
|
+
onFlatVirtualSelectAll: t ? x : void 0,
|
|
94
|
+
isValidDropTarget: t ? void 0 : M,
|
|
95
|
+
renderLabelExtras: k,
|
|
96
|
+
renderActions: P,
|
|
97
|
+
enableApplyDiscard: c,
|
|
98
|
+
enableSearch: A,
|
|
99
|
+
enableSelectAll: b,
|
|
71
100
|
enableDragDrop: !0,
|
|
101
|
+
dragMode: O,
|
|
72
102
|
enableCollapse: !0,
|
|
73
|
-
enableGlobalCollapse:
|
|
74
|
-
selectionMode:
|
|
75
|
-
searchPlaceholder:
|
|
103
|
+
enableGlobalCollapse: L,
|
|
104
|
+
selectionMode: W.CASCADE_DOWN,
|
|
105
|
+
searchPlaceholder: i("dataTable.searchColumnsPlaceholder"),
|
|
76
106
|
className: "flex-1 min-h-0",
|
|
77
|
-
initialCollapsedItems:
|
|
107
|
+
initialCollapsedItems: E,
|
|
78
108
|
onCollapseChange: (e) => {
|
|
79
|
-
|
|
109
|
+
T.current = e, I(e);
|
|
80
110
|
}
|
|
81
111
|
}
|
|
82
|
-
) }) : /* @__PURE__ */ n("div", { className: "p-4 text-[13px] text-content-placeholder", children:
|
|
112
|
+
) }) : /* @__PURE__ */ n("div", { className: "p-4 text-[13px] text-content-placeholder", children: i("dataTable.loadingColumns") });
|
|
83
113
|
};
|
|
84
114
|
export {
|
|
85
|
-
|
|
115
|
+
Le as DataTableColumnList
|
|
86
116
|
};
|
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
import { GridApi } from 'ag-grid-community';
|
|
1
|
+
import { ColumnState, GridApi } from 'ag-grid-community';
|
|
2
2
|
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
3
|
import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
|
|
4
4
|
import { ColumnListSyncFingerprints, ColumnListSyncMode } from './data-table-column-list-sync';
|
|
5
|
+
import { ColumnPickerAuthority } from './column-picker-authority';
|
|
6
|
+
export type ColumnPickerMode = 'tree' | 'authority-flat';
|
|
5
7
|
interface ColumnTreeCacheEntry {
|
|
6
8
|
fingerprints: ColumnListSyncFingerprints;
|
|
7
9
|
items: NestedListItem[];
|
|
10
|
+
pickerMode: ColumnPickerMode;
|
|
11
|
+
authority: ColumnPickerAuthority | null;
|
|
8
12
|
gridLayoutFingerprint: string;
|
|
9
13
|
gridVisibilityFingerprint: string;
|
|
10
|
-
/**
|
|
11
|
-
* Leaf column ids captured at write time (single tree walk here) so the
|
|
12
|
-
* structural stale-check at read time needs no tree traversal.
|
|
13
|
-
*/
|
|
14
14
|
leafColumnIds: ReadonlySet<string>;
|
|
15
15
|
}
|
|
16
16
|
export declare function readGridLayoutFingerprint(gridApi: GridApi): string;
|
|
17
17
|
export declare function readGridVisibilityFingerprint(gridApi: GridApi): string;
|
|
18
|
+
export declare function hasColumnTreeCache(gridApi: GridApi): boolean;
|
|
19
|
+
/** Column counts at or above this threshold prewarm immediately instead of on idle. */
|
|
20
|
+
export declare const LARGE_COLUMN_PREWARM_THRESHOLD = 5000;
|
|
18
21
|
export declare function readColumnTreeCache(gridApi: GridApi, labels: BuildColumnTreeLabels): ColumnTreeCacheEntry | null;
|
|
19
22
|
export declare function writeColumnTreeCache(gridApi: GridApi, rootItems: NestedListItem[]): ColumnListSyncFingerprints;
|
|
23
|
+
export declare function writeColumnTreeAuthorityCache(gridApi: GridApi, authority: ColumnPickerAuthority): ColumnListSyncFingerprints;
|
|
20
24
|
export declare function buildColumnTreeWithCache(gridApi: GridApi, labels: BuildColumnTreeLabels): NestedListItem[] | null;
|
|
21
25
|
/**
|
|
22
26
|
* True when the live grid's column-id set differs from the cached tree's leaf ids.
|
|
@@ -27,13 +31,15 @@ export declare function buildColumnTreeWithCache(gridApi: GridApi, labels: Build
|
|
|
27
31
|
* ({@link writeColumnTreeCache}), so this does no tree traversal at read time;
|
|
28
32
|
* it only scans `getColumnState()`, which callers already fetch for fingerprints.
|
|
29
33
|
*/
|
|
30
|
-
export declare function isGridColumnSetDifferentFromCachedLeaves(gridApi: GridApi, cachedLeafColumnIds: ReadonlySet<string
|
|
34
|
+
export declare function isGridColumnSetDifferentFromCachedLeaves(gridApi: GridApi, cachedLeafColumnIds: ReadonlySet<string>, precomputedColumnState?: ColumnState[]): boolean;
|
|
31
35
|
export declare function resolveColumnTreeFromCacheOrGrid(options: {
|
|
32
36
|
gridApi: GridApi;
|
|
33
37
|
labels: BuildColumnTreeLabels;
|
|
34
38
|
previousFingerprints: ColumnListSyncFingerprints;
|
|
35
39
|
}): {
|
|
36
40
|
rootItems: NestedListItem[] | null;
|
|
41
|
+
authority: ColumnPickerAuthority | null;
|
|
42
|
+
pickerMode: ColumnPickerMode;
|
|
37
43
|
syncMode: ColumnListSyncMode;
|
|
38
44
|
fingerprints: ColumnListSyncFingerprints;
|
|
39
45
|
};
|