impact-nova 2.2.2 → 2.2.4
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/ag-grid-react/headers/custom-header.js +133 -110
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +23 -23
- package/dist/components/data/ag-grid-react/index.js +202 -206
- package/dist/components/data/data-table/build-column-tree-from-grid.js +65 -67
- package/dist/components/data/data-table/data-table-column-list-sync.js +5 -10
- package/dist/components/data/data-table/data-table-column-list.js +64 -61
- package/dist/components/data/data-table/data-table-column-tree-cache.d.ts +29 -0
- package/dist/components/data/data-table/data-table-column-tree-cache.js +117 -0
- package/dist/components/data/data-table/data-table-constants.d.ts +2 -0
- package/dist/components/data/data-table/data-table-constants.js +3 -2
- package/dist/components/data/data-table/data-table-sheet.js +46 -49
- package/dist/components/data/data-table/data-table.js +137 -119
- package/dist/components/data/data-table/index.js +24 -23
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.d.ts +3 -0
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +24 -0
- package/dist/components/data/data-table/use-data-table-column-list-sync.d.ts +2 -1
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +249 -150
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +6 -7
- package/dist/components/data/nested-list/components/NestedListContent.js +158 -96
- package/dist/components/data/nested-list/nested-list-constants.d.ts +4 -0
- package/dist/components/data/nested-list/nested-list-constants.js +6 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.d.ts +3 -0
- package/dist/components/data/nested-list/nested-list-tree-utils.js +24 -0
- package/dist/components/data/nested-list/nested-list.js +214 -215
- package/dist/components/data-display/calendar/calendar-day-picker-view.d.ts +3 -2
- package/dist/components/data-display/calendar/calendar-day-picker-view.js +70 -68
- package/dist/components/data-display/calendar/calendar-week-number-cell.js +29 -29
- package/dist/components/data-display/calendar/calendar.js +96 -94
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/card/card.js +6 -5
- package/dist/components/feedback/dialog/dialog.js +7 -5
- package/dist/components/feedback/sheet/sheet.js +28 -27
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/filter-panel/filter-panel.js +61 -57
- package/dist/components/flows/filter-strip/filter-tag-list.js +33 -33
- package/dist/components/forms/combobox/combobox.js +110 -100
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +9 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +32 -19
- package/dist/components/forms/date-picker/date-picker.js +96 -90
- package/dist/components/forms/date-picker/date-range-picker.js +160 -152
- package/dist/components/forms/date-picker/month-picker.js +71 -65
- package/dist/components/forms/date-picker/month-range-picker.js +153 -145
- package/dist/components/forms/date-picker/multi-date-picker.js +127 -99
- package/dist/components/forms/date-picker/multi-month-picker.js +109 -97
- package/dist/components/forms/date-picker/multi-week-picker.js +98 -86
- package/dist/components/forms/date-picker/week-picker.js +82 -76
- package/dist/components/forms/date-picker/week-range-picker.js +127 -119
- package/dist/impact-nova-base.scss +10 -5
- package/dist/impact-nova-components.css +9 -5
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +189 -188
- package/dist/lib/overlay/overlay-portal-context.d.ts +11 -2
- package/dist/lib/overlay/overlay-portal-context.js +39 -28
- package/dist/lib/primitives/create-compound.d.ts +5 -0
- package/dist/lib/primitives/create-compound.js +17 -16
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +2 -1
|
@@ -1,95 +1,93 @@
|
|
|
1
|
-
import { resolveColumnPinnedFromGridState as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
let
|
|
5
|
-
for (;
|
|
6
|
-
const
|
|
7
|
-
|
|
1
|
+
import { resolveColumnPinnedFromGridState as T } from "./data-table-column-apply.js";
|
|
2
|
+
function B(l) {
|
|
3
|
+
const u = [];
|
|
4
|
+
let c = l.getOriginalParent();
|
|
5
|
+
for (; c; ) {
|
|
6
|
+
const a = c.getColGroupDef();
|
|
7
|
+
a?.headerName && a?.children && u.push(c), c = c.getOriginalParent();
|
|
8
8
|
}
|
|
9
|
-
return
|
|
9
|
+
return u.reverse(), u;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
),
|
|
15
|
-
|
|
16
|
-
let
|
|
17
|
-
const
|
|
18
|
-
let
|
|
19
|
-
return
|
|
20
|
-
},
|
|
21
|
-
const n =
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
id:
|
|
28
|
-
label:
|
|
11
|
+
function q(l, u) {
|
|
12
|
+
const c = l.getColumnState(), a = l.getGridOption("context"), z = typeof a?.activeSearchColumnId == "string" ? a.activeSearchColumnId : null, _ = l.getAllGridColumns?.() ?? l.getColumns() ?? [], F = new Map(
|
|
13
|
+
_.map((e) => [e.getColId(), e])
|
|
14
|
+
), f = [], h = [], D = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
15
|
+
m.set(f, "f"), m.set(h, "s");
|
|
16
|
+
let M = 0;
|
|
17
|
+
const x = (e) => {
|
|
18
|
+
let o = m.get(e);
|
|
19
|
+
return o === void 0 && (o = `n${M++}`, m.set(e, o)), o;
|
|
20
|
+
}, O = (e, o) => {
|
|
21
|
+
const n = e.getGroupId(), i = x(o), r = `${n}::${i}`, t = D.get(r);
|
|
22
|
+
if (t && t.list === o && o[o.length - 1] === t.node)
|
|
23
|
+
return t.node;
|
|
24
|
+
const s = G.get(r) || 0;
|
|
25
|
+
G.set(r, s + 1);
|
|
26
|
+
const I = e.getColGroupDef(), d = {
|
|
27
|
+
id: s === 0 ? `${n}__${i}` : `${n}__${i}__${s}`,
|
|
28
|
+
label: I?.headerName || n,
|
|
29
29
|
checked: !0,
|
|
30
30
|
children: [],
|
|
31
31
|
category: "group"
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return o.push(d), D.set(r, { list: o, node: d }), d;
|
|
34
34
|
};
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
46
|
-
if (!n || n.trim() === "")
|
|
35
|
+
let p = 0, S = 0, g = 0, v = 0;
|
|
36
|
+
c.forEach((e) => {
|
|
37
|
+
const o = F.get(e.colId) ?? l.getColumn(e.colId);
|
|
38
|
+
if (!o) return;
|
|
39
|
+
const n = o.getColDef(), i = n.headerName;
|
|
40
|
+
if (i != null && i.trim() === "" || e.colId === "ag-Grid-SelectionColumn")
|
|
41
|
+
return;
|
|
42
|
+
const r = n.headerName;
|
|
43
|
+
let t = typeof r == "string" && r.trim() !== "" ? r : l.getDisplayNameForColumn(o, "header");
|
|
44
|
+
if ((!t || t.trim() === "") && (t = n.field ?? e.colId), !t || t.trim() === "")
|
|
47
45
|
return;
|
|
48
|
-
const
|
|
49
|
-
id:
|
|
50
|
-
label:
|
|
51
|
-
checked:
|
|
46
|
+
const s = !e.hide, I = !!e.sort, y = o.isFilterActive() || z === e.colId, d = T(e, o), b = {
|
|
47
|
+
id: e.colId,
|
|
48
|
+
label: t,
|
|
49
|
+
checked: s,
|
|
52
50
|
data: {
|
|
53
|
-
hasSortApplied:
|
|
54
|
-
hasFilterApplied:
|
|
55
|
-
pinned:
|
|
51
|
+
hasSortApplied: I,
|
|
52
|
+
hasFilterApplied: y,
|
|
53
|
+
pinned: d
|
|
56
54
|
}
|
|
57
55
|
};
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
if (
|
|
61
|
-
let
|
|
62
|
-
for (const
|
|
63
|
-
|
|
64
|
-
|
|
56
|
+
d ? (p++, s && S++) : (g++, s && v++);
|
|
57
|
+
const N = d ? f : h, $ = B(o);
|
|
58
|
+
if ($.length > 0) {
|
|
59
|
+
let w = N, k = null;
|
|
60
|
+
for (const P of $)
|
|
61
|
+
k = O(P, w), w = k.children;
|
|
62
|
+
k.children.push(b);
|
|
65
63
|
} else
|
|
66
|
-
|
|
64
|
+
N.push(b);
|
|
67
65
|
});
|
|
68
|
-
const
|
|
69
|
-
let
|
|
70
|
-
for (const n of
|
|
71
|
-
n.children && (n.checked =
|
|
72
|
-
return
|
|
66
|
+
const C = (e) => {
|
|
67
|
+
let o = e.length > 0;
|
|
68
|
+
for (const n of e)
|
|
69
|
+
n.children && (n.checked = C(n.children)), n.checked || (o = !1);
|
|
70
|
+
return o;
|
|
73
71
|
};
|
|
74
|
-
return
|
|
72
|
+
return C(f), C(h), [
|
|
75
73
|
{
|
|
76
74
|
id: "root-frozen",
|
|
77
|
-
label:
|
|
78
|
-
checked:
|
|
79
|
-
children:
|
|
75
|
+
label: u.frozenColumns,
|
|
76
|
+
checked: p > 0 && S === p,
|
|
77
|
+
children: f,
|
|
80
78
|
category: "structure",
|
|
81
79
|
isDragDisabled: !0
|
|
82
80
|
},
|
|
83
81
|
{
|
|
84
82
|
id: "root-scrollable",
|
|
85
|
-
label:
|
|
86
|
-
checked:
|
|
87
|
-
children:
|
|
83
|
+
label: u.scrollableColumns,
|
|
84
|
+
checked: g > 0 && v === g,
|
|
85
|
+
children: h,
|
|
88
86
|
category: "structure",
|
|
89
87
|
isDragDisabled: !0
|
|
90
88
|
}
|
|
91
89
|
];
|
|
92
90
|
}
|
|
93
91
|
export {
|
|
94
|
-
|
|
92
|
+
q as buildColumnTreeFromGrid
|
|
95
93
|
};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import { fingerprintColumnTreeIndicators as
|
|
2
|
-
function
|
|
1
|
+
import { fingerprintColumnTreeIndicators as n, fingerprintColumnTreeItems as i } from "./data-table-column-apply.js";
|
|
2
|
+
function e(r) {
|
|
3
3
|
return {
|
|
4
|
-
structural:
|
|
5
|
-
indicators:
|
|
4
|
+
structural: i(r),
|
|
5
|
+
indicators: n(r)
|
|
6
6
|
};
|
|
7
7
|
}
|
|
8
|
-
function l(n, t, i) {
|
|
9
|
-
const r = c(n), e = r.structural !== t, o = r.indicators !== i;
|
|
10
|
-
return e ? "structural" : o ? "indicators-only" : "skip";
|
|
11
|
-
}
|
|
12
8
|
export {
|
|
13
|
-
|
|
14
|
-
l as resolveColumnListSyncMode
|
|
9
|
+
e as computeColumnListSyncFingerprints
|
|
15
10
|
};
|
|
@@ -1,85 +1,88 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { useDataTable as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as _, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as y, useState as F, useMemo as O, useCallback as i } from "react";
|
|
3
|
+
import { useDataTable as E } from "./data-table-context.js";
|
|
4
|
+
import { useDataTableSheet as z } from "./data-table-sheet-context.js";
|
|
5
|
+
import { NestedList as P } from "../nested-list/nested-list.js";
|
|
6
|
+
import { SelectionMode as R } from "../nested-list/nested-list.types.js";
|
|
7
|
+
import { useImpactNovaI18n as k } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { countNestedListLeaves as M, buildCollapsedStateForAllGroups as j } from "../nested-list/nested-list-tree-utils.js";
|
|
9
|
+
import { PinSwitch as G } from "./pin-switch.js";
|
|
10
|
+
import { ColumnIndicator as d } from "./column-indicator.js";
|
|
11
|
+
import { IndicatorLegend as H } from "./indicator-legend.js";
|
|
12
|
+
import { useDataTableColumnListSync as U } from "./use-data-table-column-list-sync.js";
|
|
13
|
+
const W = 100, le = ({
|
|
14
|
+
enableApplyDiscard: o = !1,
|
|
15
|
+
showSearch: m = !0,
|
|
16
|
+
showSelectAll: p = !0,
|
|
17
|
+
showCollapse: f = !0
|
|
16
18
|
}) => {
|
|
17
|
-
const { gridApi:
|
|
18
|
-
items:
|
|
19
|
-
isReady:
|
|
20
|
-
externalSyncKey:
|
|
21
|
-
listWrapperRef:
|
|
22
|
-
handleChange:
|
|
23
|
-
handleSubmit:
|
|
24
|
-
handlePinChange:
|
|
25
|
-
} =
|
|
26
|
-
gridApi:
|
|
27
|
-
frozenColumnsLabel:
|
|
28
|
-
scrollableColumnsLabel:
|
|
29
|
-
|
|
19
|
+
const { gridApi: h } = E(), { open: C } = z(), { t: r } = k(), b = y({}), [n, S] = F({}), {
|
|
20
|
+
items: a,
|
|
21
|
+
isReady: L,
|
|
22
|
+
externalSyncKey: g,
|
|
23
|
+
listWrapperRef: A,
|
|
24
|
+
handleChange: c,
|
|
25
|
+
handleSubmit: T,
|
|
26
|
+
handlePinChange: u
|
|
27
|
+
} = U({
|
|
28
|
+
gridApi: h,
|
|
29
|
+
frozenColumnsLabel: r("dataTable.frozenColumns"),
|
|
30
|
+
scrollableColumnsLabel: r("dataTable.scrollableColumns"),
|
|
31
|
+
isSyncActive: C
|
|
32
|
+
}), I = O(() => Object.keys(n).length > 0 || a.length === 0 || M(a) <= W ? n : j(a), [n, a]), x = i(
|
|
30
33
|
(e) => {
|
|
31
|
-
|
|
34
|
+
c(e, o);
|
|
32
35
|
},
|
|
33
|
-
[
|
|
34
|
-
), N =
|
|
35
|
-
(e,
|
|
36
|
-
if (!
|
|
37
|
-
const
|
|
38
|
-
return !
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
[o, c]
|
|
37
|
+
), N = i(
|
|
38
|
+
(e, s) => {
|
|
39
|
+
if (!s.isLeaf) return null;
|
|
40
|
+
const t = e.data;
|
|
41
|
+
return !t?.hasSortApplied && !t?.hasFilterApplied ? null : /* @__PURE__ */ _("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
|
|
42
|
+
t?.hasSortApplied && /* @__PURE__ */ l(d, { type: "sort" }),
|
|
43
|
+
t?.hasFilterApplied && /* @__PURE__ */ l(d, { type: "filter" })
|
|
41
44
|
] });
|
|
42
45
|
},
|
|
43
46
|
[]
|
|
44
|
-
), v =
|
|
45
|
-
(e,
|
|
46
|
-
const
|
|
47
|
-
return e.category === "structure" ? e.id !== "root-frozen" ? null : /* @__PURE__ */
|
|
48
|
-
|
|
47
|
+
), v = i(
|
|
48
|
+
(e, s) => {
|
|
49
|
+
const t = e.data;
|
|
50
|
+
return e.category === "structure" ? e.id !== "root-frozen" ? null : /* @__PURE__ */ l(H, {}) : !s.isLeaf || !(t?.pinned === "left" || t?.pinned === "right") ? null : /* @__PURE__ */ l(
|
|
51
|
+
G,
|
|
49
52
|
{
|
|
50
|
-
value:
|
|
51
|
-
onChange: (
|
|
53
|
+
value: t?.pinned ?? null,
|
|
54
|
+
onChange: (D) => u(e.id, D),
|
|
52
55
|
className: "shrink-0"
|
|
53
56
|
}
|
|
54
57
|
);
|
|
55
58
|
},
|
|
56
|
-
[
|
|
59
|
+
[u]
|
|
57
60
|
);
|
|
58
|
-
return
|
|
59
|
-
|
|
61
|
+
return L ? /* @__PURE__ */ l("div", { ref: A, className: "flex flex-col h-full bg-canvas-elevated", children: /* @__PURE__ */ l(
|
|
62
|
+
P,
|
|
60
63
|
{
|
|
61
|
-
items:
|
|
62
|
-
onChange:
|
|
63
|
-
onSubmit:
|
|
64
|
+
items: a,
|
|
65
|
+
onChange: x,
|
|
66
|
+
onSubmit: T,
|
|
64
67
|
renderLabelExtras: N,
|
|
65
68
|
renderActions: v,
|
|
66
|
-
enableApplyDiscard:
|
|
67
|
-
enableSearch:
|
|
68
|
-
enableSelectAll:
|
|
69
|
+
enableApplyDiscard: o,
|
|
70
|
+
enableSearch: m,
|
|
71
|
+
enableSelectAll: p,
|
|
69
72
|
enableDragDrop: !0,
|
|
70
73
|
enableCollapse: !0,
|
|
71
|
-
enableGlobalCollapse:
|
|
72
|
-
selectionMode:
|
|
73
|
-
searchPlaceholder:
|
|
74
|
+
enableGlobalCollapse: f,
|
|
75
|
+
selectionMode: R.CASCADE_DOWN,
|
|
76
|
+
searchPlaceholder: r("dataTable.searchColumnsPlaceholder"),
|
|
74
77
|
className: "h-full",
|
|
75
|
-
initialCollapsedItems:
|
|
78
|
+
initialCollapsedItems: I,
|
|
76
79
|
onCollapseChange: (e) => {
|
|
77
|
-
|
|
80
|
+
b.current = e, S(e);
|
|
78
81
|
}
|
|
79
82
|
},
|
|
80
|
-
|
|
81
|
-
) }) : /* @__PURE__ */
|
|
83
|
+
`data-table-column-list-${g}`
|
|
84
|
+
) }) : /* @__PURE__ */ l("div", { className: "p-4 text-[13px] text-content-placeholder", children: r("dataTable.loadingColumns") });
|
|
82
85
|
};
|
|
83
86
|
export {
|
|
84
|
-
|
|
87
|
+
le as DataTableColumnList
|
|
85
88
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { GridApi } from 'ag-grid-community';
|
|
2
|
+
import { NestedListItem } from '../nested-list/nested-list.types';
|
|
3
|
+
import { BuildColumnTreeLabels } from './build-column-tree-from-grid';
|
|
4
|
+
import { ColumnListSyncFingerprints } from './data-table-column-list-sync';
|
|
5
|
+
interface ColumnTreeCacheEntry {
|
|
6
|
+
fingerprints: ColumnListSyncFingerprints;
|
|
7
|
+
items: NestedListItem[];
|
|
8
|
+
gridColumnStateFingerprint: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function readGridColumnStateFingerprint(gridApi: GridApi): string;
|
|
11
|
+
export declare function readColumnTreeCache(gridApi: GridApi, labels: BuildColumnTreeLabels): ColumnTreeCacheEntry | null;
|
|
12
|
+
export declare function writeColumnTreeCache(gridApi: GridApi, rootItems: NestedListItem[]): ColumnListSyncFingerprints;
|
|
13
|
+
export declare function buildColumnTreeWithCache(gridApi: GridApi, labels: BuildColumnTreeLabels): NestedListItem[] | null;
|
|
14
|
+
export declare function resolveColumnTreeFromCacheOrGrid(options: {
|
|
15
|
+
gridApi: GridApi;
|
|
16
|
+
labels: BuildColumnTreeLabels;
|
|
17
|
+
previousFingerprints: ColumnListSyncFingerprints;
|
|
18
|
+
}): {
|
|
19
|
+
rootItems: NestedListItem[] | null;
|
|
20
|
+
syncMode: 'skip' | 'indicators-only' | 'structural';
|
|
21
|
+
fingerprints: ColumnListSyncFingerprints;
|
|
22
|
+
};
|
|
23
|
+
export declare function peekColumnListSyncWouldSkip(options: {
|
|
24
|
+
gridApi: GridApi;
|
|
25
|
+
labels: BuildColumnTreeLabels;
|
|
26
|
+
previousFingerprints: ColumnListSyncFingerprints;
|
|
27
|
+
}): boolean;
|
|
28
|
+
export declare function scheduleColumnTreePrewarm(gridApi: GridApi): () => void;
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { buildColumnTreeFromGrid as h } from "./build-column-tree-from-grid.js";
|
|
2
|
+
import { computeColumnListSyncFingerprints as S } from "./data-table-column-list-sync.js";
|
|
3
|
+
import { fingerprintColumnTreeIndicators as T, normalizeColumnPinned as k } from "./data-table-column-apply.js";
|
|
4
|
+
import { patchColumnTreeIndicatorsFromGrid as _ } from "./patch-column-tree-indicators-from-grid.js";
|
|
5
|
+
function w(n) {
|
|
6
|
+
return n.map((r) => {
|
|
7
|
+
const e = k(r.pinned) ?? "0";
|
|
8
|
+
return `${r.colId}:${e}:${r.hide ? "0" : "1"}`;
|
|
9
|
+
}).join("|");
|
|
10
|
+
}
|
|
11
|
+
function d(n) {
|
|
12
|
+
return w(n.getColumnState());
|
|
13
|
+
}
|
|
14
|
+
const s = /* @__PURE__ */ new WeakMap(), p = {
|
|
15
|
+
frozenColumns: "__prewarm_frozen__",
|
|
16
|
+
scrollableColumns: "__prewarm_scrollable__"
|
|
17
|
+
};
|
|
18
|
+
function G(n) {
|
|
19
|
+
return typeof n.isDestroyed == "function" && n.isDestroyed();
|
|
20
|
+
}
|
|
21
|
+
function C(n, r) {
|
|
22
|
+
return n.map((e) => e.id === "root-frozen" ? { ...e, label: r.frozenColumns } : e.id === "root-scrollable" ? { ...e, label: r.scrollableColumns } : e);
|
|
23
|
+
}
|
|
24
|
+
function f(n, r) {
|
|
25
|
+
const e = s.get(n);
|
|
26
|
+
return e ? {
|
|
27
|
+
fingerprints: e.fingerprints,
|
|
28
|
+
items: C(e.items, r),
|
|
29
|
+
gridColumnStateFingerprint: e.gridColumnStateFingerprint
|
|
30
|
+
} : null;
|
|
31
|
+
}
|
|
32
|
+
function u(n, r) {
|
|
33
|
+
const e = S(r);
|
|
34
|
+
return s.set(n, {
|
|
35
|
+
fingerprints: e,
|
|
36
|
+
items: C(r, p),
|
|
37
|
+
gridColumnStateFingerprint: d(n)
|
|
38
|
+
}), e;
|
|
39
|
+
}
|
|
40
|
+
function g(n, r) {
|
|
41
|
+
const e = h(n, r);
|
|
42
|
+
return e ? (u(n, e), e) : null;
|
|
43
|
+
}
|
|
44
|
+
function M(n) {
|
|
45
|
+
const { gridApi: r, labels: e, previousFingerprints: i } = n, t = f(r, e), y = d(r), F = i.structural === "" && i.indicators === "";
|
|
46
|
+
if (t) {
|
|
47
|
+
const o = _(
|
|
48
|
+
t.items,
|
|
49
|
+
r
|
|
50
|
+
), b = T(o), a = y !== t.gridColumnStateFingerprint, m = b !== t.fingerprints.indicators;
|
|
51
|
+
if (!a && !m) {
|
|
52
|
+
if (F) {
|
|
53
|
+
const l = u(r, o);
|
|
54
|
+
return {
|
|
55
|
+
rootItems: o,
|
|
56
|
+
syncMode: "structural",
|
|
57
|
+
fingerprints: l
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
rootItems: null,
|
|
62
|
+
syncMode: "skip",
|
|
63
|
+
fingerprints: t.fingerprints
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (!a && m) {
|
|
67
|
+
const l = u(r, o);
|
|
68
|
+
return {
|
|
69
|
+
rootItems: o,
|
|
70
|
+
syncMode: "indicators-only",
|
|
71
|
+
fingerprints: l
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const c = g(r, e);
|
|
76
|
+
if (!c)
|
|
77
|
+
return {
|
|
78
|
+
rootItems: null,
|
|
79
|
+
syncMode: "skip",
|
|
80
|
+
fingerprints: i
|
|
81
|
+
};
|
|
82
|
+
const I = f(r, e)?.fingerprints ?? {
|
|
83
|
+
structural: "",
|
|
84
|
+
indicators: ""
|
|
85
|
+
};
|
|
86
|
+
return {
|
|
87
|
+
rootItems: c,
|
|
88
|
+
syncMode: "structural",
|
|
89
|
+
fingerprints: I
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function v(n) {
|
|
93
|
+
return typeof n.getColumnState == "function" && (typeof n.getAllGridColumns == "function" || typeof n.getColumns == "function");
|
|
94
|
+
}
|
|
95
|
+
function D(n) {
|
|
96
|
+
return M(n).syncMode === "skip";
|
|
97
|
+
}
|
|
98
|
+
function W(n) {
|
|
99
|
+
let r = !1, e = 0, i;
|
|
100
|
+
const t = () => {
|
|
101
|
+
r || G(n) || !v(n) || s.has(n) || g(n, p);
|
|
102
|
+
};
|
|
103
|
+
return e = requestAnimationFrame(() => {
|
|
104
|
+
r || (typeof requestIdleCallback < "u" ? i = requestIdleCallback(t, { timeout: 3e3 }) : setTimeout(t, 0));
|
|
105
|
+
}), () => {
|
|
106
|
+
r = !0, e && cancelAnimationFrame(e), i !== void 0 && typeof cancelIdleCallback < "u" && cancelIdleCallback(i);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
export {
|
|
110
|
+
g as buildColumnTreeWithCache,
|
|
111
|
+
D as peekColumnListSyncWouldSkip,
|
|
112
|
+
f as readColumnTreeCache,
|
|
113
|
+
d as readGridColumnStateFingerprint,
|
|
114
|
+
M as resolveColumnTreeFromCacheOrGrid,
|
|
115
|
+
W as scheduleColumnTreePrewarm,
|
|
116
|
+
u as writeColumnTreeCache
|
|
117
|
+
};
|
|
@@ -4,5 +4,7 @@
|
|
|
4
4
|
* so short grids grow enough for a usable column list without re-rendering AG Grid.
|
|
5
5
|
*/
|
|
6
6
|
export declare const DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX = 400;
|
|
7
|
+
/** Matches `transition-transform duration-200` on `DataTableSheetContent`. */
|
|
8
|
+
export declare const DATA_TABLE_SHEET_SLIDE_TRANSITION_MS = 200;
|
|
7
9
|
/** DOM class toggled imperatively for viewport-fill table shell (styles in `src/index.scss`). */
|
|
8
10
|
export declare const TABLE_VIEWPORT_SHELL_EXPANDED_CLASS: "table-viewport-shell--expanded";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
const _ = 400, E = "table-viewport-shell--expanded";
|
|
1
|
+
const _ = 400, E = 200, T = "table-viewport-shell--expanded";
|
|
2
2
|
export {
|
|
3
3
|
_ as DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX,
|
|
4
|
-
E as
|
|
4
|
+
E as DATA_TABLE_SHEET_SLIDE_TRANSITION_MS,
|
|
5
|
+
T as TABLE_VIEWPORT_SHELL_EXPANDED_CLASS
|
|
5
6
|
};
|