impact-nova 2.5.21 → 2.5.22
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 +52 -50
- package/dist/components/data/data-table/column-picker-authority.d.ts +1 -0
- package/dist/components/data/data-table/column-picker-authority.js +61 -59
- package/dist/components/data/data-table/column-savability.d.ts +3 -0
- package/dist/components/data/data-table/column-savability.js +10 -0
- package/dist/components/data/data-table/data-table-column-list.js +117 -89
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.d.ts +1 -0
- package/dist/components/data/data-table/data-table-flat-column-virtual-rows.js +23 -22
- package/dist/components/data/data-table/index.d.ts +2 -0
- package/dist/components/data/data-table/index.js +32 -28
- package/dist/components/data/data-table/patch-column-tree-indicators-from-grid.js +14 -13
- 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-display/calendar/calendar-year-panes.js +68 -58
- package/dist/components/data-display/calendar/calendar-year-utils.d.ts +13 -0
- package/dist/components/data-display/calendar/calendar-year-utils.js +60 -51
- 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/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/index.js +273 -269
- 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
|
@@ -3,6 +3,7 @@ import { NestedListItem } from '../nested-list/nested-list.types';
|
|
|
3
3
|
export interface ColumnItemData extends Record<string, unknown> {
|
|
4
4
|
hasSortApplied?: boolean;
|
|
5
5
|
hasFilterApplied?: boolean;
|
|
6
|
+
isNonSavable?: boolean;
|
|
6
7
|
pinned?: 'left' | 'right' | null;
|
|
7
8
|
columnGroupChain?: readonly string[];
|
|
8
9
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { resolveColumnPinnedFromGridState as
|
|
2
|
-
import { isPickerEligibleColumnId as
|
|
3
|
-
|
|
1
|
+
import { resolveColumnPinnedFromGridState as E } from "./data-table-column-apply.js";
|
|
2
|
+
import { isPickerEligibleColumnId as H } from "./data-table-picker-column-eligibility.js";
|
|
3
|
+
import { resolveColumnSavability as q } from "./column-savability.js";
|
|
4
|
+
function K(l) {
|
|
4
5
|
const a = [];
|
|
5
6
|
let c = l.getOriginalParent();
|
|
6
7
|
for (; c; ) {
|
|
@@ -9,90 +10,91 @@ function H(l) {
|
|
|
9
10
|
}
|
|
10
11
|
return a.reverse(), a;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
const c = l.getColumnState(), u = l.getGridOption("context"),
|
|
14
|
-
|
|
15
|
-
),
|
|
16
|
-
|
|
17
|
-
let
|
|
18
|
-
const
|
|
19
|
-
let
|
|
20
|
-
return
|
|
21
|
-
},
|
|
22
|
-
const t =
|
|
23
|
-
if (n && n.list ===
|
|
13
|
+
function A(l, a) {
|
|
14
|
+
const c = l.getColumnState(), u = l.getGridOption("context"), _ = typeof u?.activeSearchColumnId == "string" ? u.activeSearchColumnId : null, F = l.getAllGridColumns?.() ?? l.getColumns() ?? [], M = new Map(
|
|
15
|
+
F.map((o) => [o.getColId(), o])
|
|
16
|
+
), f = [], h = [], v = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map();
|
|
17
|
+
m.set(f, "f"), m.set(h, "s");
|
|
18
|
+
let x = 0;
|
|
19
|
+
const O = (o) => {
|
|
20
|
+
let e = m.get(o);
|
|
21
|
+
return e === void 0 && (e = `n${x++}`, m.set(o, e)), e;
|
|
22
|
+
}, P = (o, e) => {
|
|
23
|
+
const t = o.getGroupId(), i = O(e), r = `${t}::${i}`, n = v.get(r);
|
|
24
|
+
if (n && n.list === e && e[e.length - 1] === n.node)
|
|
24
25
|
return n.node;
|
|
25
|
-
const s =
|
|
26
|
-
|
|
27
|
-
const k =
|
|
26
|
+
const s = S.get(r) || 0;
|
|
27
|
+
S.set(r, s + 1);
|
|
28
|
+
const k = o.getColGroupDef(), d = {
|
|
28
29
|
id: s === 0 ? `${t}__${i}` : `${t}__${i}__${s}`,
|
|
29
30
|
label: k?.headerName || t,
|
|
30
31
|
checked: !0,
|
|
31
32
|
children: [],
|
|
32
33
|
category: "group"
|
|
33
34
|
};
|
|
34
|
-
return
|
|
35
|
+
return e.push(d), v.set(r, { list: e, node: d }), d;
|
|
35
36
|
};
|
|
36
|
-
let
|
|
37
|
-
c.forEach((
|
|
38
|
-
const
|
|
39
|
-
if (!
|
|
40
|
-
const t =
|
|
41
|
-
if (i != null && i.trim() === "" || !
|
|
37
|
+
let g = 0, y = 0, I = 0, N = 0;
|
|
38
|
+
c.forEach((o) => {
|
|
39
|
+
const e = M.get(o.colId) ?? l.getColumn(o.colId);
|
|
40
|
+
if (!e) return;
|
|
41
|
+
const t = e.getColDef(), i = t.headerName;
|
|
42
|
+
if (i != null && i.trim() === "" || !H(o.colId))
|
|
42
43
|
return;
|
|
43
44
|
const r = t.headerName;
|
|
44
|
-
let n = typeof r == "string" && r.trim() !== "" ? r : l.getDisplayNameForColumn(
|
|
45
|
-
if ((!n || n.trim() === "") && (n = t.field ??
|
|
45
|
+
let n = typeof r == "string" && r.trim() !== "" ? r : l.getDisplayNameForColumn(e, "header");
|
|
46
|
+
if ((!n || n.trim() === "") && (n = t.field ?? o.colId), !n || n.trim() === "")
|
|
46
47
|
return;
|
|
47
|
-
const s = !
|
|
48
|
-
id:
|
|
48
|
+
const s = !o.hide, k = !!o.sort, $ = e.isFilterActive() || _ === o.colId, d = E(o, e), w = !q(e), p = {
|
|
49
|
+
id: o.colId,
|
|
49
50
|
label: n,
|
|
50
51
|
checked: s,
|
|
51
52
|
data: {
|
|
52
53
|
hasSortApplied: k,
|
|
53
54
|
hasFilterApplied: $,
|
|
55
|
+
isNonSavable: w,
|
|
54
56
|
pinned: d
|
|
55
57
|
}
|
|
56
58
|
};
|
|
57
|
-
d ? (
|
|
58
|
-
const
|
|
59
|
+
d ? (g++, s && y++) : (I++, s && N++);
|
|
60
|
+
const z = d ? f : h, G = K(e), T = G.map((C) => C.getGroupId());
|
|
59
61
|
if (G.length > 0) {
|
|
60
|
-
|
|
61
|
-
...
|
|
62
|
-
columnGroupChain:
|
|
62
|
+
p.data = {
|
|
63
|
+
...p.data,
|
|
64
|
+
columnGroupChain: T
|
|
63
65
|
};
|
|
64
|
-
let
|
|
65
|
-
for (const
|
|
66
|
-
D =
|
|
67
|
-
D.children.push(
|
|
66
|
+
let C = z, D = null;
|
|
67
|
+
for (const B of G)
|
|
68
|
+
D = P(B, C), C = D.children;
|
|
69
|
+
D.children.push(p);
|
|
68
70
|
} else
|
|
69
|
-
|
|
71
|
+
z.push(p);
|
|
70
72
|
});
|
|
71
|
-
const b = (
|
|
72
|
-
let
|
|
73
|
-
for (const t of
|
|
74
|
-
t.children && (t.checked = b(t.children)), t.checked || (
|
|
75
|
-
return
|
|
73
|
+
const b = (o) => {
|
|
74
|
+
let e = o.length > 0;
|
|
75
|
+
for (const t of o)
|
|
76
|
+
t.children && (t.checked = b(t.children)), t.checked || (e = !1);
|
|
77
|
+
return e;
|
|
76
78
|
};
|
|
77
|
-
return b(
|
|
79
|
+
return b(f), b(h), [
|
|
78
80
|
{
|
|
79
81
|
id: "root-frozen",
|
|
80
82
|
label: a.frozenColumns,
|
|
81
|
-
checked:
|
|
82
|
-
children:
|
|
83
|
+
checked: g > 0 && y === g,
|
|
84
|
+
children: f,
|
|
83
85
|
category: "structure",
|
|
84
86
|
isDragDisabled: !0
|
|
85
87
|
},
|
|
86
88
|
{
|
|
87
89
|
id: "root-scrollable",
|
|
88
90
|
label: a.scrollableColumns,
|
|
89
|
-
checked: I > 0 &&
|
|
90
|
-
children:
|
|
91
|
+
checked: I > 0 && N === I,
|
|
92
|
+
children: h,
|
|
91
93
|
category: "structure",
|
|
92
94
|
isDragDisabled: !0
|
|
93
95
|
}
|
|
94
96
|
];
|
|
95
97
|
}
|
|
96
98
|
export {
|
|
97
|
-
|
|
99
|
+
A as buildColumnTreeFromGrid
|
|
98
100
|
};
|
|
@@ -19,6 +19,7 @@ export interface ColumnPickerAuthority {
|
|
|
19
19
|
readonly columnGroupChain: ReadonlyMap<string, string[]>;
|
|
20
20
|
readonly sortAppliedByColumnId: ReadonlyMap<string, boolean>;
|
|
21
21
|
readonly filterAppliedByColumnId: ReadonlyMap<string, boolean>;
|
|
22
|
+
readonly nonSavableByColumnId: ReadonlyMap<string, boolean>;
|
|
22
23
|
readonly revision: number;
|
|
23
24
|
}
|
|
24
25
|
export declare function buildAuthorityFromGrid(gridApi: GridApi): ColumnPickerAuthority | null;
|
|
@@ -1,100 +1,102 @@
|
|
|
1
|
-
import { resolveColumnPinnedFromGridState as
|
|
2
|
-
import { isPickerEligibleColumnId as
|
|
3
|
-
import { buildColumnIndicatorMapsFromGrid as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { resolveColumnPinnedFromGridState as P } from "./data-table-column-apply.js";
|
|
2
|
+
import { isPickerEligibleColumnId as F } from "./data-table-picker-column-eligibility.js";
|
|
3
|
+
import { buildColumnIndicatorMapsFromGrid as S } from "./patch-column-tree-indicators-from-grid.js";
|
|
4
|
+
import { resolveColumnSavability as V } from "./column-savability.js";
|
|
5
|
+
import { Fnv1a128Hasher as N } from "../../../lib/hash/fnv1a128.js";
|
|
6
|
+
let d = 0;
|
|
7
|
+
function E(n) {
|
|
7
8
|
const o = n.getColumnState(), i = n.getAllGridColumns?.() ?? n.getColumns?.() ?? [], e = new Map(
|
|
8
9
|
i.map((t) => [t.getColId(), t])
|
|
9
|
-
), l = [],
|
|
10
|
+
), l = [], y = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), v = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
|
10
11
|
for (const t of o) {
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
const a =
|
|
14
|
-
if (p != null && p.trim() === "" || !
|
|
12
|
+
const r = e.get(t.colId) ?? n.getColumn(t.colId);
|
|
13
|
+
if (!r) continue;
|
|
14
|
+
const a = r.getColDef(), p = a.headerName;
|
|
15
|
+
if (p != null && p.trim() === "" || !F(t.colId))
|
|
15
16
|
continue;
|
|
16
17
|
const C = a.headerName;
|
|
17
|
-
let
|
|
18
|
-
if ((!
|
|
18
|
+
let s = typeof C == "string" && C.trim() !== "" ? C : n.getDisplayNameForColumn(r, "header");
|
|
19
|
+
if ((!s || s.trim() === "") && (s = a.field ?? t.colId), !s || s.trim() === "")
|
|
19
20
|
continue;
|
|
20
|
-
const
|
|
21
|
-
l.push(t.colId),
|
|
22
|
-
const
|
|
23
|
-
let
|
|
24
|
-
for (;
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
27
|
-
const m =
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
let
|
|
31
|
-
for (;
|
|
32
|
-
const
|
|
33
|
-
if (
|
|
34
|
-
|
|
21
|
+
const D = P(t, r);
|
|
22
|
+
l.push(t.colId), y.set(t.colId, !t.hide), g.set(t.colId, D), b.set(t.colId, s), B.set(t.colId, !V(r));
|
|
23
|
+
const h = [];
|
|
24
|
+
let u = r.getOriginalParent();
|
|
25
|
+
for (; u; ) {
|
|
26
|
+
const I = u.getColGroupDef();
|
|
27
|
+
if (I?.headerName && I?.children) {
|
|
28
|
+
const m = u.getGroupId();
|
|
29
|
+
if (h.unshift(m), !c.has(m)) {
|
|
30
|
+
const f = u.getOriginalParent();
|
|
31
|
+
let M = null;
|
|
32
|
+
for (; f; ) {
|
|
33
|
+
const G = f.getColGroupDef();
|
|
34
|
+
if (G?.headerName && G?.children) {
|
|
35
|
+
M = f.getGroupId();
|
|
35
36
|
break;
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
c.set(m, {
|
|
39
40
|
groupId: m,
|
|
40
|
-
label:
|
|
41
|
-
parentGroupId:
|
|
41
|
+
label: I.headerName,
|
|
42
|
+
parentGroupId: M
|
|
42
43
|
});
|
|
43
44
|
}
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
u = u.getOriginalParent();
|
|
46
47
|
}
|
|
47
|
-
v.set(t.colId,
|
|
48
|
+
v.set(t.colId, h);
|
|
48
49
|
}
|
|
49
50
|
if (l.length === 0)
|
|
50
51
|
return null;
|
|
51
|
-
const
|
|
52
|
+
const w = S(n);
|
|
52
53
|
return {
|
|
53
54
|
orderedColumnIds: l,
|
|
54
|
-
visibilityByColumnId:
|
|
55
|
-
pinByColumnId:
|
|
55
|
+
visibilityByColumnId: y,
|
|
56
|
+
pinByColumnId: g,
|
|
56
57
|
labelByColumnId: b,
|
|
57
58
|
groupMetadata: c,
|
|
58
59
|
columnGroupChain: v,
|
|
59
|
-
sortAppliedByColumnId:
|
|
60
|
-
filterAppliedByColumnId:
|
|
61
|
-
|
|
60
|
+
sortAppliedByColumnId: w.sortAppliedByColumnId,
|
|
61
|
+
filterAppliedByColumnId: w.filterAppliedByColumnId,
|
|
62
|
+
nonSavableByColumnId: B,
|
|
63
|
+
revision: ++d
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
|
-
function
|
|
66
|
+
function j(n, o, i) {
|
|
65
67
|
const e = new Map(n.visibilityByColumnId);
|
|
66
|
-
return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++
|
|
68
|
+
return e.set(o, i), { ...n, visibilityByColumnId: e, revision: ++d };
|
|
67
69
|
}
|
|
68
|
-
function
|
|
70
|
+
function q(n, o) {
|
|
69
71
|
const i = /* @__PURE__ */ new Map();
|
|
70
72
|
for (const e of n.orderedColumnIds)
|
|
71
73
|
i.set(e, o);
|
|
72
|
-
return { ...n, visibilityByColumnId: i, revision: ++
|
|
74
|
+
return { ...n, visibilityByColumnId: i, revision: ++d };
|
|
73
75
|
}
|
|
74
|
-
function
|
|
76
|
+
function z(n, o, i) {
|
|
75
77
|
const e = new Map(n.visibilityByColumnId);
|
|
76
78
|
for (const l of o)
|
|
77
79
|
e.set(l, i);
|
|
78
|
-
return { ...n, visibilityByColumnId: e, revision: ++
|
|
80
|
+
return { ...n, visibilityByColumnId: e, revision: ++d };
|
|
79
81
|
}
|
|
80
|
-
function
|
|
82
|
+
function J(n, o, i) {
|
|
81
83
|
if (o === i) return n;
|
|
82
84
|
const e = [...n.orderedColumnIds], [l] = e.splice(o, 1);
|
|
83
|
-
return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++
|
|
85
|
+
return e.splice(i, 0, l), { ...n, orderedColumnIds: e, revision: ++d };
|
|
84
86
|
}
|
|
85
|
-
function
|
|
87
|
+
function K(n, o, i) {
|
|
86
88
|
const e = new Map(n.pinByColumnId);
|
|
87
|
-
return e.set(o, i), { ...n, pinByColumnId: e, revision: ++
|
|
89
|
+
return e.set(o, i), { ...n, pinByColumnId: e, revision: ++d };
|
|
88
90
|
}
|
|
89
|
-
function
|
|
91
|
+
function L(n) {
|
|
90
92
|
return n.orderedColumnIds.map((o) => ({
|
|
91
93
|
colId: o,
|
|
92
94
|
hide: !n.visibilityByColumnId.get(o),
|
|
93
95
|
pinned: n.pinByColumnId.get(o) ?? null
|
|
94
96
|
}));
|
|
95
97
|
}
|
|
96
|
-
function
|
|
97
|
-
const o = new
|
|
98
|
+
function Q(n) {
|
|
99
|
+
const o = new N(), i = new N();
|
|
98
100
|
for (const e of n.orderedColumnIds) {
|
|
99
101
|
const l = n.pinByColumnId.get(e) ?? "0";
|
|
100
102
|
o.update(e).update(":").update(l === null ? "0" : l).update("|"), i.update(e).update(":").update(n.visibilityByColumnId.get(e) ? "1" : "0").update("|");
|
|
@@ -105,12 +107,12 @@ function J(n) {
|
|
|
105
107
|
};
|
|
106
108
|
}
|
|
107
109
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
E as buildAuthorityFromGrid,
|
|
111
|
+
L as buildColumnStateFromAuthority,
|
|
112
|
+
Q as fingerprintAuthority,
|
|
113
|
+
J as reorderColumn,
|
|
114
|
+
q as toggleAllColumnsVisibility,
|
|
115
|
+
j as toggleColumnVisibility,
|
|
116
|
+
z as toggleColumnsVisibility,
|
|
117
|
+
K as updateColumnPin
|
|
116
118
|
};
|
|
@@ -1,116 +1,144 @@
|
|
|
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 { NESTED_LIST_VIRTUALIZATION_THRESHOLD as
|
|
10
|
-
import { PinSwitch as
|
|
11
|
-
import { ColumnIndicator as
|
|
12
|
-
import { IndicatorLegend as
|
|
13
|
-
import { useDataTableColumnListSync as
|
|
14
|
-
import { buildFlatColumnVirtualRowModel as
|
|
15
|
-
import { isValidColumnPickerGroupDrop as
|
|
16
|
-
const le = 100,
|
|
17
|
-
enableApplyDiscard:
|
|
18
|
-
showSearch:
|
|
19
|
-
showSelectAll:
|
|
20
|
-
showCollapse:
|
|
1
|
+
import { jsxs as H, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j, useState as G, useMemo as s, useCallback as d } from "react";
|
|
3
|
+
import { useDataTable as U } from "./data-table-context.js";
|
|
4
|
+
import { useDataTableSheet as W } from "./data-table-sheet-context.js";
|
|
5
|
+
import { NestedList as Z } from "../nested-list/nested-list.js";
|
|
6
|
+
import { SelectionMode as q } from "../nested-list/nested-list.types.js";
|
|
7
|
+
import { useImpactNovaI18n as J } from "../../../i18n/use-impact-nova-i18n.js";
|
|
8
|
+
import { countNestedListLeaves as K, buildCollapsedStateForAllGroups as Q } from "../nested-list/nested-list-tree-utils.js";
|
|
9
|
+
import { NESTED_LIST_VIRTUALIZATION_THRESHOLD as X, NESTED_LIST_ROOT_FROZEN_ID as Y } from "../nested-list/nested-list-constants.js";
|
|
10
|
+
import { PinSwitch as $ } from "./pin-switch.js";
|
|
11
|
+
import { ColumnIndicator as f } from "./column-indicator.js";
|
|
12
|
+
import { IndicatorLegend as ee } from "./indicator-legend.js";
|
|
13
|
+
import { useDataTableColumnListSync as te } from "./use-data-table-column-list-sync.js";
|
|
14
|
+
import { buildFlatColumnVirtualRowModel as ne } from "./data-table-flat-column-virtual-rows.js";
|
|
15
|
+
import { isValidColumnPickerGroupDrop as oe } from "./column-picker-drop-validation.js";
|
|
16
|
+
const le = 100, Ae = ({
|
|
17
|
+
enableApplyDiscard: p = !1,
|
|
18
|
+
showSearch: v = !0,
|
|
19
|
+
showSelectAll: g = !0,
|
|
20
|
+
showCollapse: A = !0
|
|
21
21
|
}) => {
|
|
22
|
-
const { gridApi:
|
|
22
|
+
const { gridApi: L } = U(), { open: I } = W(), { t: u } = J(), T = j({}), [i, y] = G({}), c = s(
|
|
23
23
|
() => ({
|
|
24
|
-
frozenColumns:
|
|
25
|
-
scrollableColumns:
|
|
24
|
+
frozenColumns: u("dataTable.frozenColumns"),
|
|
25
|
+
scrollableColumns: u("dataTable.scrollableColumns")
|
|
26
26
|
}),
|
|
27
|
-
[
|
|
27
|
+
[u]
|
|
28
28
|
), {
|
|
29
|
-
items:
|
|
30
|
-
columnPickerAuthority:
|
|
31
|
-
pickerMode:
|
|
32
|
-
isReady:
|
|
33
|
-
listWrapperRef:
|
|
34
|
-
handleChange:
|
|
35
|
-
handleSubmit:
|
|
36
|
-
handlePinChange:
|
|
37
|
-
handleAuthorityItemToggle:
|
|
38
|
-
handleAuthorityVirtualDrop:
|
|
39
|
-
handleAuthoritySelectAll:
|
|
40
|
-
} =
|
|
41
|
-
gridApi:
|
|
42
|
-
frozenColumnsLabel:
|
|
43
|
-
scrollableColumnsLabel:
|
|
44
|
-
isSyncActive:
|
|
45
|
-
}),
|
|
46
|
-
(
|
|
29
|
+
items: l,
|
|
30
|
+
columnPickerAuthority: t,
|
|
31
|
+
pickerMode: D,
|
|
32
|
+
isReady: N,
|
|
33
|
+
listWrapperRef: R,
|
|
34
|
+
handleChange: h,
|
|
35
|
+
handleSubmit: _,
|
|
36
|
+
handlePinChange: C,
|
|
37
|
+
handleAuthorityItemToggle: E,
|
|
38
|
+
handleAuthorityVirtualDrop: x,
|
|
39
|
+
handleAuthoritySelectAll: O
|
|
40
|
+
} = te({
|
|
41
|
+
gridApi: L,
|
|
42
|
+
frozenColumnsLabel: c.frozenColumns,
|
|
43
|
+
scrollableColumnsLabel: c.scrollableColumns,
|
|
44
|
+
isSyncActive: I
|
|
45
|
+
}), n = D === "authority-flat" && t != null, m = s(() => n && t ? t.orderedColumnIds.length : K(l), [n, t, l]), F = s(() => n || Object.keys(i).length > 0 || l.length === 0 || m <= le ? i : Q(l), [i, m, n, l]), V = s(() => m >= X ? "virtual-index" : "sortable", [m]), b = s(() => {
|
|
46
|
+
if (n && t) {
|
|
47
|
+
for (const r of t.nonSavableByColumnId.values())
|
|
48
|
+
if (r)
|
|
49
|
+
return !0;
|
|
50
|
+
return !1;
|
|
51
|
+
}
|
|
52
|
+
const e = [...l];
|
|
53
|
+
for (; e.length > 0; ) {
|
|
54
|
+
const r = e.pop();
|
|
55
|
+
if (!r)
|
|
56
|
+
continue;
|
|
57
|
+
if (r.children) {
|
|
58
|
+
e.push(...r.children);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
if (r.data?.isNonSavable)
|
|
62
|
+
return !0;
|
|
63
|
+
}
|
|
64
|
+
return !1;
|
|
65
|
+
}, [t, n, l]), S = s(() => {
|
|
66
|
+
const e = [
|
|
67
|
+
{ type: "sort" },
|
|
68
|
+
{ type: "filter" }
|
|
69
|
+
];
|
|
70
|
+
return b && e.push({ type: "nonSavable" }), e;
|
|
71
|
+
}, [b]), M = d(
|
|
72
|
+
(e) => t ? ne(t, c, {
|
|
47
73
|
searchQuery: e,
|
|
48
|
-
sortAppliedByColumnId:
|
|
49
|
-
filterAppliedByColumnId:
|
|
50
|
-
|
|
51
|
-
[
|
|
52
|
-
|
|
74
|
+
sortAppliedByColumnId: t.sortAppliedByColumnId,
|
|
75
|
+
filterAppliedByColumnId: t.filterAppliedByColumnId,
|
|
76
|
+
nonSavableByColumnId: t.nonSavableByColumnId
|
|
77
|
+
}) : { rowCount: 0, getRowAt: () => ({ item: l[0], level: 0, indentLevel: 0 }) },
|
|
78
|
+
[t, c, l]
|
|
79
|
+
), B = d(
|
|
53
80
|
(e) => {
|
|
54
|
-
|
|
81
|
+
h(e, p);
|
|
55
82
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
58
|
-
(e) =>
|
|
59
|
-
[
|
|
60
|
-
),
|
|
61
|
-
(e,
|
|
62
|
-
if (!
|
|
63
|
-
const
|
|
64
|
-
return !
|
|
65
|
-
|
|
66
|
-
|
|
83
|
+
[p, h]
|
|
84
|
+
), k = d(
|
|
85
|
+
(e) => n ? !0 : oe(e),
|
|
86
|
+
[n]
|
|
87
|
+
), w = d(
|
|
88
|
+
(e, r) => {
|
|
89
|
+
if (!r.isLeaf) return null;
|
|
90
|
+
const o = e.data;
|
|
91
|
+
return !o?.hasSortApplied && !o?.hasFilterApplied && !o?.isNonSavable ? null : /* @__PURE__ */ H("span", { className: "inline-flex items-center gap-1 shrink-0", children: [
|
|
92
|
+
o?.hasSortApplied && /* @__PURE__ */ a(f, { type: "sort" }),
|
|
93
|
+
o?.hasFilterApplied && /* @__PURE__ */ a(f, { type: "filter" }),
|
|
94
|
+
o?.isNonSavable && /* @__PURE__ */ a(f, { type: "nonSavable" })
|
|
67
95
|
] });
|
|
68
96
|
},
|
|
69
97
|
[]
|
|
70
|
-
), P =
|
|
71
|
-
(e,
|
|
72
|
-
const
|
|
73
|
-
return e.category === "structure" ? e.id !==
|
|
74
|
-
|
|
98
|
+
), P = d(
|
|
99
|
+
(e, r) => {
|
|
100
|
+
const o = e.data;
|
|
101
|
+
return e.category === "structure" ? e.id !== Y ? null : /* @__PURE__ */ a(ee, { entries: S }) : !r.isLeaf || !(o?.pinned === "left" || o?.pinned === "right") ? null : /* @__PURE__ */ a(
|
|
102
|
+
$,
|
|
75
103
|
{
|
|
76
|
-
value:
|
|
77
|
-
onChange: (
|
|
104
|
+
value: o?.pinned ?? null,
|
|
105
|
+
onChange: (z) => C(e.id, z),
|
|
78
106
|
className: "shrink-0"
|
|
79
107
|
}
|
|
80
108
|
);
|
|
81
109
|
},
|
|
82
|
-
[
|
|
110
|
+
[C, S]
|
|
83
111
|
);
|
|
84
|
-
return
|
|
85
|
-
|
|
112
|
+
return N ? /* @__PURE__ */ a("div", { ref: R, className: "flex flex-col flex-1 min-h-0 bg-canvas-elevated", children: /* @__PURE__ */ a(
|
|
113
|
+
Z,
|
|
86
114
|
{
|
|
87
|
-
items:
|
|
88
|
-
onChange:
|
|
89
|
-
onSubmit:
|
|
90
|
-
onItemToggle:
|
|
91
|
-
onVirtualDrop:
|
|
92
|
-
flatVirtualRowResolver:
|
|
93
|
-
onFlatVirtualSelectAll:
|
|
94
|
-
isValidDropTarget:
|
|
95
|
-
renderLabelExtras:
|
|
115
|
+
items: l,
|
|
116
|
+
onChange: B,
|
|
117
|
+
onSubmit: _,
|
|
118
|
+
onItemToggle: n ? E : void 0,
|
|
119
|
+
onVirtualDrop: n ? x : void 0,
|
|
120
|
+
flatVirtualRowResolver: n ? M : void 0,
|
|
121
|
+
onFlatVirtualSelectAll: n ? O : void 0,
|
|
122
|
+
isValidDropTarget: n ? void 0 : k,
|
|
123
|
+
renderLabelExtras: w,
|
|
96
124
|
renderActions: P,
|
|
97
|
-
enableApplyDiscard:
|
|
98
|
-
enableSearch:
|
|
99
|
-
enableSelectAll:
|
|
125
|
+
enableApplyDiscard: p,
|
|
126
|
+
enableSearch: v,
|
|
127
|
+
enableSelectAll: g,
|
|
100
128
|
enableDragDrop: !0,
|
|
101
|
-
dragMode:
|
|
129
|
+
dragMode: V,
|
|
102
130
|
enableCollapse: !0,
|
|
103
|
-
enableGlobalCollapse:
|
|
104
|
-
selectionMode:
|
|
105
|
-
searchPlaceholder:
|
|
131
|
+
enableGlobalCollapse: A,
|
|
132
|
+
selectionMode: q.CASCADE_DOWN,
|
|
133
|
+
searchPlaceholder: u("dataTable.searchColumnsPlaceholder"),
|
|
106
134
|
className: "flex-1 min-h-0",
|
|
107
|
-
initialCollapsedItems:
|
|
135
|
+
initialCollapsedItems: F,
|
|
108
136
|
onCollapseChange: (e) => {
|
|
109
|
-
T.current = e,
|
|
137
|
+
T.current = e, y(e);
|
|
110
138
|
}
|
|
111
139
|
}
|
|
112
|
-
) }) : /* @__PURE__ */
|
|
140
|
+
) }) : /* @__PURE__ */ a("div", { className: "p-4 text-[13px] text-content-placeholder", children: u("dataTable.loadingColumns") });
|
|
113
141
|
};
|
|
114
142
|
export {
|
|
115
|
-
|
|
143
|
+
Ae as DataTableColumnList
|
|
116
144
|
};
|
|
@@ -6,6 +6,7 @@ export interface FlatColumnVirtualRowModelOptions {
|
|
|
6
6
|
searchQuery?: string;
|
|
7
7
|
sortAppliedByColumnId?: ReadonlyMap<string, boolean>;
|
|
8
8
|
filterAppliedByColumnId?: ReadonlyMap<string, boolean>;
|
|
9
|
+
nonSavableByColumnId?: ReadonlyMap<string, boolean>;
|
|
9
10
|
}
|
|
10
11
|
export interface FlatColumnVirtualRowModel {
|
|
11
12
|
rowCount: number;
|