@toolbox-web/grid-react 2.0.0-rc.0 → 2.0.0
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/chunks/feature-registry-8K2rOVnC.js +2 -0
- package/chunks/grid-detail-panel-CLdX0T_A.js +44 -0
- package/chunks/grid-element-context-DpuQsoie.js +5 -0
- package/chunks/grid-responsive-card-Dx5U6Prm.js +41 -0
- package/chunks/portal-bridge-zxgm_jwK.js +60 -0
- package/chunks/post-mount-refresh-hooks-D7BDK4Kl.js +10 -0
- package/chunks/react-column-config-Cto2WHGC.js +126 -0
- package/chunks/react-grid-adapter-CZfpPJvo.js +308 -0
- package/features/editing.js +6 -4
- package/features/export.js +44 -59
- package/features/filtering.js +82 -132
- package/features/grouping-columns.js +24 -24
- package/features/grouping-rows.js +14 -17
- package/features/index.js +18 -20
- package/features/master-detail.js +48 -63
- package/features/pinned-rows.js +58 -51
- package/features/print.js +18 -23
- package/features/responsive.js +51 -63
- package/features/selection.js +47 -45
- package/features/undo-redo.js +53 -86
- package/index.js +591 -654
- package/lib/event-props.d.ts +14 -1
- package/lib/event-props.d.ts.map +1 -1
- package/package.json +2 -2
- package/chunks/grid-detail-panel-BZFcujsZ.js +0 -52
- package/chunks/grid-element-context-BU3WvNtM.js +0 -5
- package/chunks/grid-responsive-card-CSZhDCoN.js +0 -45
- package/chunks/portal-bridge-CvxNt40O.js +0 -68
- package/chunks/post-mount-refresh-hooks-Dt7mPoZC.js +0 -12
- package/chunks/react-column-config-BOe_PgL1.js +0 -125
- package/chunks/react-grid-adapter-BhC9x425.js +0 -518
package/features/export.js
CHANGED
|
@@ -1,61 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../chunks/grid-element-context-DpuQsoie.js";
|
|
2
|
+
import { useCallback as t, useContext as n } from "react";
|
|
3
3
|
import "@toolbox-web/grid/features/export";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
e.exportJson({ ...o, fileName: r ?? o?.fileName ?? "export.json" });
|
|
48
|
-
},
|
|
49
|
-
[t]
|
|
50
|
-
), s = n(() => t()?.isExporting() ?? !1, [t]), g = n(() => t()?.getLastExport() ?? null, [t]);
|
|
51
|
-
return {
|
|
52
|
-
exportToCsv: p,
|
|
53
|
-
exportToExcel: l,
|
|
54
|
-
exportToJson: u,
|
|
55
|
-
isExporting: s,
|
|
56
|
-
getLastExport: g
|
|
57
|
-
};
|
|
4
|
+
//#region libs/grid-react/src/features/export.ts
|
|
5
|
+
function r(r) {
|
|
6
|
+
let i = n(e), a = t(() => (r ? document.querySelector(r) : i?.current)?.getPluginByName("export"), [i, r]);
|
|
7
|
+
return {
|
|
8
|
+
exportToCsv: t((e, t) => {
|
|
9
|
+
let n = a();
|
|
10
|
+
if (!n) {
|
|
11
|
+
console.warn("[tbw-grid:export] ExportPlugin not found.\n\n → Enable export on the grid:\n <DataGrid export />");
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
n.exportCsv({
|
|
15
|
+
...t,
|
|
16
|
+
fileName: e ?? t?.fileName ?? "export.csv"
|
|
17
|
+
});
|
|
18
|
+
}, [a]),
|
|
19
|
+
exportToExcel: t((e, t) => {
|
|
20
|
+
let n = a();
|
|
21
|
+
if (!n) {
|
|
22
|
+
console.warn("[tbw-grid:export] ExportPlugin not found.\n\n → Enable export on the grid:\n <DataGrid export />");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
n.exportExcel({
|
|
26
|
+
...t,
|
|
27
|
+
fileName: e ?? t?.fileName ?? "export.xlsx"
|
|
28
|
+
});
|
|
29
|
+
}, [a]),
|
|
30
|
+
exportToJson: t((e, t) => {
|
|
31
|
+
let n = a();
|
|
32
|
+
if (!n) {
|
|
33
|
+
console.warn("[tbw-grid:export] ExportPlugin not found.\n\n → Enable export on the grid:\n <DataGrid export />");
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
n.exportJson({
|
|
37
|
+
...t,
|
|
38
|
+
fileName: e ?? t?.fileName ?? "export.json"
|
|
39
|
+
});
|
|
40
|
+
}, [a]),
|
|
41
|
+
isExporting: t(() => a()?.isExporting() ?? !1, [a]),
|
|
42
|
+
getLastExport: t(() => a()?.getLastExport() ?? null, [a])
|
|
43
|
+
};
|
|
58
44
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
45
|
+
//#endregion
|
|
46
|
+
export { r as useGridExport };
|
package/features/filtering.js
CHANGED
|
@@ -1,134 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return (s, a) => {
|
|
31
|
-
const g = document.createElement("div");
|
|
32
|
-
g.style.display = "contents";
|
|
33
|
-
const c = s.closest("tbw-grid, [data-tbw-grid]") ?? o, d = m(g, f(a), void 0, c);
|
|
34
|
-
e(d, g, !1), s.appendChild(g);
|
|
35
|
-
};
|
|
1
|
+
import { a as e } from "../chunks/react-grid-adapter-CZfpPJvo.js";
|
|
2
|
+
import { a as t, i as n } from "../chunks/portal-bridge-zxgm_jwK.js";
|
|
3
|
+
import { t as r } from "../chunks/feature-registry-8K2rOVnC.js";
|
|
4
|
+
import { t as i } from "../chunks/grid-element-context-DpuQsoie.js";
|
|
5
|
+
import { useCallback as a, useContext as o } from "react";
|
|
6
|
+
import { FilteringPlugin as s } from "@toolbox-web/grid/plugins/filtering";
|
|
7
|
+
r("filtering", (e) => {
|
|
8
|
+
if (typeof e == "boolean" || !e) return new s();
|
|
9
|
+
let r = e, i = { ...r };
|
|
10
|
+
if (typeof r.filterPanelRenderer == "function" && r.filterPanelRenderer.length <= 1) {
|
|
11
|
+
let e = r.filterPanelRenderer, a = /* @__PURE__ */ new WeakMap();
|
|
12
|
+
i.filterPanelRenderer = (r, i) => {
|
|
13
|
+
let o = a.get(r);
|
|
14
|
+
o && n(o);
|
|
15
|
+
let s = document.createElement("div");
|
|
16
|
+
s.style.display = "contents";
|
|
17
|
+
let c = t(s, e(i));
|
|
18
|
+
a.set(r, c), r.appendChild(s);
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return new s(i);
|
|
22
|
+
}, { override: !0 }), e((e, n, { trackPortal: r }) => {
|
|
23
|
+
let i = e;
|
|
24
|
+
return (e, a) => {
|
|
25
|
+
let o = document.createElement("div");
|
|
26
|
+
o.style.display = "contents";
|
|
27
|
+
let s = e.closest("tbw-grid, [data-tbw-grid]") ?? n;
|
|
28
|
+
r(t(o, i(a), void 0, s), o, !1), e.appendChild(o);
|
|
29
|
+
};
|
|
36
30
|
});
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<DataGrid filtering
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
89
|
-
|
|
90
|
-
→ Enable filtering on the grid:
|
|
91
|
-
<DataGrid filtering />`
|
|
92
|
-
);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
i.clearFieldFilter(t, r);
|
|
96
|
-
},
|
|
97
|
-
[e]
|
|
98
|
-
), u = n((t) => e()?.isFieldFiltered(t) ?? !1, [e]), w = n(() => e()?.getFilteredRowCount() ?? 0, [e]), b = n((t) => e()?.getUniqueValues(t) ?? [], [e]), y = n(() => e()?.getStaleFilters() ?? [], [e]), P = n(
|
|
99
|
-
(t) => e()?.getBlankMode(t) ?? "all",
|
|
100
|
-
[e]
|
|
101
|
-
), G = n(
|
|
102
|
-
(t, r) => {
|
|
103
|
-
const i = e();
|
|
104
|
-
if (!i) {
|
|
105
|
-
console.warn(
|
|
106
|
-
`[tbw-grid:filtering] FilteringPlugin not found.
|
|
107
|
-
|
|
108
|
-
→ Enable filtering on the grid:
|
|
109
|
-
<DataGrid filtering />`
|
|
110
|
-
);
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
i.toggleBlankFilter(t, r);
|
|
114
|
-
},
|
|
115
|
-
[e]
|
|
116
|
-
);
|
|
117
|
-
return {
|
|
118
|
-
setFilter: f,
|
|
119
|
-
getFilter: s,
|
|
120
|
-
getFilters: a,
|
|
121
|
-
setFilterModel: g,
|
|
122
|
-
clearAllFilters: c,
|
|
123
|
-
clearFieldFilter: d,
|
|
124
|
-
isFieldFiltered: u,
|
|
125
|
-
getFilteredRowCount: w,
|
|
126
|
-
getUniqueValues: b,
|
|
127
|
-
getStaleFilters: y,
|
|
128
|
-
getBlankMode: P,
|
|
129
|
-
toggleBlankFilter: G
|
|
130
|
-
};
|
|
31
|
+
function c(e) {
|
|
32
|
+
let t = o(i), n = a(() => (e ? document.querySelector(e) : t?.current)?.getPluginByName("filtering"), [t, e]);
|
|
33
|
+
return {
|
|
34
|
+
setFilter: a((e, t, r) => {
|
|
35
|
+
let i = n();
|
|
36
|
+
if (!i) {
|
|
37
|
+
console.warn("[tbw-grid:filtering] FilteringPlugin not found.\n\n → Enable filtering on the grid:\n <DataGrid filtering />");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
i.setFilter(e, t, r);
|
|
41
|
+
}, [n]),
|
|
42
|
+
getFilter: a((e) => n()?.getFilter(e), [n]),
|
|
43
|
+
getFilters: a(() => n()?.getFilters() ?? [], [n]),
|
|
44
|
+
setFilterModel: a((e, t) => {
|
|
45
|
+
let r = n();
|
|
46
|
+
if (!r) {
|
|
47
|
+
console.warn("[tbw-grid:filtering] FilteringPlugin not found.\n\n → Enable filtering on the grid:\n <DataGrid filtering />");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
r.setFilterModel(e, t);
|
|
51
|
+
}, [n]),
|
|
52
|
+
clearAllFilters: a((e) => {
|
|
53
|
+
let t = n();
|
|
54
|
+
if (!t) {
|
|
55
|
+
console.warn("[tbw-grid:filtering] FilteringPlugin not found.\n\n → Enable filtering on the grid:\n <DataGrid filtering />");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
t.clearAllFilters(e);
|
|
59
|
+
}, [n]),
|
|
60
|
+
clearFieldFilter: a((e, t) => {
|
|
61
|
+
let r = n();
|
|
62
|
+
if (!r) {
|
|
63
|
+
console.warn("[tbw-grid:filtering] FilteringPlugin not found.\n\n → Enable filtering on the grid:\n <DataGrid filtering />");
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
r.clearFieldFilter(e, t);
|
|
67
|
+
}, [n]),
|
|
68
|
+
isFieldFiltered: a((e) => n()?.isFieldFiltered(e) ?? !1, [n]),
|
|
69
|
+
getFilteredRowCount: a(() => n()?.getFilteredRowCount() ?? 0, [n]),
|
|
70
|
+
getUniqueValues: a((e) => n()?.getUniqueValues(e) ?? [], [n]),
|
|
71
|
+
getStaleFilters: a(() => n()?.getStaleFilters() ?? [], [n]),
|
|
72
|
+
getBlankMode: a((e) => n()?.getBlankMode(e) ?? "all", [n]),
|
|
73
|
+
toggleBlankFilter: a((e, t) => {
|
|
74
|
+
let r = n();
|
|
75
|
+
if (!r) {
|
|
76
|
+
console.warn("[tbw-grid:filtering] FilteringPlugin not found.\n\n → Enable filtering on the grid:\n <DataGrid filtering />");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
r.toggleBlankFilter(e, t);
|
|
80
|
+
}, [n])
|
|
81
|
+
};
|
|
131
82
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { c as useGridFiltering };
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { n as e } from "../chunks/portal-bridge-zxgm_jwK.js";
|
|
2
|
+
import { t } from "../chunks/feature-registry-8K2rOVnC.js";
|
|
3
|
+
import { GroupingColumnsPlugin as n } from "@toolbox-web/grid/plugins/grouping-columns";
|
|
4
|
+
//#region libs/grid-react/src/features/grouping-columns.ts
|
|
5
|
+
function r(t) {
|
|
6
|
+
let n = e(t);
|
|
7
|
+
return (e) => n(e) ?? document.createElement("div");
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
);
|
|
9
|
+
t("groupingColumns", (e) => {
|
|
10
|
+
if (typeof e == "boolean" || !e) return new n();
|
|
11
|
+
let t = e, i = { ...t };
|
|
12
|
+
if (typeof t.groupHeaderRenderer == "function") {
|
|
13
|
+
let e = t.groupHeaderRenderer;
|
|
14
|
+
i.groupHeaderRenderer = r(e);
|
|
15
|
+
}
|
|
16
|
+
return Array.isArray(t.columnGroups) && (i.columnGroups = t.columnGroups.map((e) => {
|
|
17
|
+
if (typeof e.renderer != "function") return e;
|
|
18
|
+
let t = e.renderer;
|
|
19
|
+
return {
|
|
20
|
+
...e,
|
|
21
|
+
renderer: r(t)
|
|
22
|
+
};
|
|
23
|
+
})), new n(i);
|
|
24
|
+
}, { override: !0 });
|
|
25
|
+
//#endregion
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
{ override: !0 }
|
|
17
|
-
);
|
|
1
|
+
import { n as e } from "../chunks/portal-bridge-zxgm_jwK.js";
|
|
2
|
+
import { t } from "../chunks/feature-registry-8K2rOVnC.js";
|
|
3
|
+
import { GroupingRowsPlugin as n } from "@toolbox-web/grid/plugins/grouping-rows";
|
|
4
|
+
//#region libs/grid-react/src/features/grouping-rows.ts
|
|
5
|
+
t("groupingRows", (t) => {
|
|
6
|
+
if (typeof t == "boolean" || !t) return new n();
|
|
7
|
+
let r = t, i = { ...r };
|
|
8
|
+
if (typeof r.groupRowRenderer == "function") {
|
|
9
|
+
let t = r.groupRowRenderer, n = e(t);
|
|
10
|
+
i.groupRowRenderer = (e) => n(e) ?? document.createElement("div");
|
|
11
|
+
}
|
|
12
|
+
return new n(i);
|
|
13
|
+
}, { override: !0 });
|
|
14
|
+
//#endregion
|
package/features/index.js
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
1
|
+
import "./clipboard.js";
|
|
2
|
+
import "./column-virtualization.js";
|
|
3
|
+
import "./context-menu.js";
|
|
4
4
|
import "./editing.js";
|
|
5
|
-
import "
|
|
6
|
-
import "../chunks/grid-element-context-BU3WvNtM.js";
|
|
7
|
-
import "@toolbox-web/grid/features/export";
|
|
5
|
+
import "./export.js";
|
|
8
6
|
import "./filtering.js";
|
|
9
7
|
import "./grouping-columns.js";
|
|
10
8
|
import "./grouping-rows.js";
|
|
11
9
|
import "./master-detail.js";
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
10
|
+
import "./multi-sort.js";
|
|
11
|
+
import "./pinned-columns.js";
|
|
14
12
|
import "./pinned-rows.js";
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
13
|
+
import "./pivot.js";
|
|
14
|
+
import "./print.js";
|
|
15
|
+
import "./reorder-columns.js";
|
|
18
16
|
import "./responsive.js";
|
|
19
|
-
import "
|
|
20
|
-
import "
|
|
21
|
-
import "
|
|
22
|
-
import "
|
|
23
|
-
import "
|
|
24
|
-
import "
|
|
25
|
-
import "
|
|
26
|
-
import "
|
|
27
|
-
import "
|
|
17
|
+
import "./row-drag-drop.js";
|
|
18
|
+
import "./selection.js";
|
|
19
|
+
import "./server-side.js";
|
|
20
|
+
import "./shell.js";
|
|
21
|
+
import "./sticky-rows.js";
|
|
22
|
+
import "./tooltip.js";
|
|
23
|
+
import "./tree.js";
|
|
24
|
+
import "./undo-redo.js";
|
|
25
|
+
import "./visibility.js";
|
|
@@ -1,65 +1,50 @@
|
|
|
1
|
+
import { i as e } from "../chunks/react-grid-adapter-CZfpPJvo.js";
|
|
2
|
+
import { a as t, i as n } from "../chunks/portal-bridge-zxgm_jwK.js";
|
|
3
|
+
import { n as r } from "../chunks/post-mount-refresh-hooks-D7BDK4Kl.js";
|
|
4
|
+
import { t as i } from "../chunks/feature-registry-8K2rOVnC.js";
|
|
5
|
+
import { n as a } from "../chunks/grid-detail-panel-CLdX0T_A.js";
|
|
1
6
|
import "@toolbox-web/grid/features/master-detail";
|
|
2
|
-
import { MasterDetailPlugin as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const r = d(
|
|
15
|
-
o,
|
|
16
|
-
n({ row: s, rowIndex: a }),
|
|
17
|
-
void 0,
|
|
18
|
-
t
|
|
19
|
-
);
|
|
20
|
-
return e(r, o, !1), o;
|
|
21
|
-
};
|
|
7
|
+
import { MasterDetailPlugin as o } from "@toolbox-web/grid/plugins/master-detail";
|
|
8
|
+
e((e, { trackPortal: n }) => {
|
|
9
|
+
let r = a(e);
|
|
10
|
+
if (r) return (i, a) => {
|
|
11
|
+
let o = document.createElement("div");
|
|
12
|
+
return o.className = "react-detail-panel", n(t(o, r({
|
|
13
|
+
row: i,
|
|
14
|
+
rowIndex: a
|
|
15
|
+
}), void 0, e), o, !1), o;
|
|
16
|
+
};
|
|
17
|
+
}), r("masterDetail", ({ gridEl: e }) => {
|
|
18
|
+
e.getPluginByName("masterDetail")?.refreshDetailRenderer?.();
|
|
22
19
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const i = document.createElement("div");
|
|
55
|
-
i.className = "react-detail-panel";
|
|
56
|
-
const u = d(i, r);
|
|
57
|
-
return s.add(u), i;
|
|
58
|
-
};
|
|
59
|
-
return new h(
|
|
60
|
-
{ ...e, detailRenderer: a },
|
|
61
|
-
s
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
{ override: !0 }
|
|
65
|
-
);
|
|
20
|
+
var s = class extends o {
|
|
21
|
+
#e;
|
|
22
|
+
constructor(e, t) {
|
|
23
|
+
super(e), this.#e = t;
|
|
24
|
+
}
|
|
25
|
+
detach() {
|
|
26
|
+
super.detach();
|
|
27
|
+
for (let e of this.#e) try {
|
|
28
|
+
n(e, { sync: !1 });
|
|
29
|
+
} catch {}
|
|
30
|
+
this.#e.clear();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
i("masterDetail", (e) => {
|
|
34
|
+
let n = e == null || typeof e == "boolean" ? {} : e, r = n.detailRenderer;
|
|
35
|
+
if (typeof r != "function") return new o(n);
|
|
36
|
+
let i = /* @__PURE__ */ new Set(), a = (e, n) => {
|
|
37
|
+
let a = r(e, n);
|
|
38
|
+
if (a == null || a === !1) return document.createElement("div");
|
|
39
|
+
if (typeof a == "string" || a instanceof HTMLElement) return a;
|
|
40
|
+
let o = document.createElement("div");
|
|
41
|
+
o.className = "react-detail-panel";
|
|
42
|
+
let s = t(o, a);
|
|
43
|
+
return i.add(s), o;
|
|
44
|
+
};
|
|
45
|
+
return new s({
|
|
46
|
+
...n,
|
|
47
|
+
detailRenderer: a
|
|
48
|
+
}, i);
|
|
49
|
+
}, { override: !0 });
|
|
50
|
+
//#endregion
|