@box-kite/react 2.2.5 → 2.2.7
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/.claude/rules/box-kite-rules.md +5 -1
- package/.claude/skills/box-kite/SKILL.md +5 -1
- package/.claude/skills/box-kite/references/components.md +34 -0
- package/.claude/skills/box-kite/references/extending.md +10 -0
- package/.claude/skills/box-kite/references/styling.md +3 -2
- package/.cursor/rules/box-kite.mdc +5 -1
- package/AGENTS.md +5 -1
- package/BOX_AI_CONTEXT.md +147 -7
- package/BOX_KITE_AI_CONTEXT.md +147 -7
- package/box.cjs +1 -1
- package/box.d.ts +5 -0
- package/box.mjs +7 -7
- package/catalog.cjs +1 -1
- package/catalog.mjs +521 -0
- package/client.cjs +1 -1
- package/client.mjs +136 -117
- package/components/calendar.cjs +1 -0
- package/components/calendar.d.ts +77 -0
- package/components/calendar.mjs +483 -0
- package/components/dataGrid/components/dataGridBooleanValue.d.ts +11 -0
- package/components/dataGrid/components/dataGridDateParts.d.ts +40 -0
- package/components/dataGrid/components/dataGridDateValue.d.ts +14 -0
- package/components/dataGrid/contracts/dataGridContract.d.ts +38 -11
- package/components/dataGrid/models/columnModel.d.ts +3 -1
- package/components/dataGrid/models/editModel.d.ts +3 -1
- package/components/dataGrid/models/headerCellModel.d.ts +1 -0
- package/components/dataGrid/models/localeText.d.ts +4 -0
- package/components/dataGrid/useDateParts.d.ts +17 -0
- package/components/dataGrid.cjs +3 -3
- package/components/dataGrid.mjs +824 -690
- package/components/dateField.cjs +1 -0
- package/components/dateField.d.ts +78 -0
- package/components/dateField.mjs +313 -0
- package/components/datePicker.cjs +1 -0
- package/components/datePicker.d.ts +120 -0
- package/components/datePicker.mjs +529 -0
- package/components/dateTime.cjs +1 -0
- package/components/dateTime.d.ts +23 -0
- package/components/dateTime.mjs +34 -0
- package/components/dialog.cjs +1 -1
- package/components/dialog.mjs +87 -75
- package/components/overlay.cjs +1 -1
- package/components/overlay.mjs +1 -1
- package/components/semantics.d.ts +29 -29
- package/components/timeZoneSelect.cjs +1 -0
- package/components/timeZoneSelect.d.ts +52 -0
- package/components/timeZoneSelect.mjs +74 -0
- package/components/toaster.cjs +1 -1
- package/components/toaster.mjs +1 -1
- package/create/src/index.d.ts +1 -0
- package/create/src/options.d.ts +27 -0
- package/create/src/options.test.d.ts +1 -0
- package/create/src/packageManager.d.ts +5 -0
- package/create/src/project.d.ts +25 -0
- package/create/src/project.test.d.ts +1 -0
- package/create/templates/ts/designs/azure.d.ts +5 -0
- package/create/templates/ts/designs/ember.d.ts +5 -0
- package/create/templates/ts/designs/mono.d.ts +5 -0
- package/create/templates/ts/src/App.d.ts +2 -0
- package/create/templates/ts/src/design.d.ts +5 -0
- package/create/templates/ts/src/main.d.ts +0 -0
- package/dataGridDateParts.cjs +1 -0
- package/dataGridDateParts.mjs +223 -0
- package/dataGridList.cjs +1 -1
- package/dataGridList.mjs +335 -372
- package/dataGridListLayout.cjs +1 -0
- package/dataGridListLayout.mjs +49 -0
- package/date-environment.cjs +1 -0
- package/date-environment.mjs +29 -0
- package/date-input.cjs +1 -0
- package/date-input.mjs +346 -0
- package/date-math.cjs +1 -0
- package/date-math.mjs +317 -0
- package/date.cjs +1 -0
- package/date.d.ts +40 -0
- package/date.mjs +4 -0
- package/dates.cjs +1 -0
- package/dates.mjs +689 -0
- package/docs/components.md +6 -1
- package/docs/props.md +19 -19
- package/package.json +124 -27
- package/react/boxComponent.d.ts +1 -1
- package/react/date/dateChange.d.ts +18 -0
- package/react/date/dateEnvironment.d.ts +34 -0
- package/react/theme/theme.d.ts +9 -0
- package/react/theme/themeContext.d.ts +2 -0
- package/react-shared.cjs +1 -1
- package/react-shared.mjs +1 -1
- package/rsc.cjs +1 -1
- package/rsc.d.ts +3 -0
- package/rsc.mjs +1 -1
- package/ssg.cjs +1 -1
- package/ssg.mjs +1 -1
- package/utils/date/calendar.d.ts +44 -0
- package/utils/date/calendarModel.d.ts +46 -0
- package/utils/date/dateTime.d.ts +144 -0
- package/utils/date/fieldModel.d.ts +74 -0
- package/utils/date/format.d.ts +39 -0
- package/utils/date/iso.d.ts +40 -0
- package/utils/date/locale.d.ts +17 -0
- package/utils/date/parse.d.ts +20 -0
- package/utils/date/settings.d.ts +26 -0
- package/utils/date/value.d.ts +43 -0
- package/utils/date/zoneOptions.d.ts +19 -0
- package/utils/date/zones.d.ts +32 -0
package/components/dataGrid.mjs
CHANGED
|
@@ -6,11 +6,11 @@ import { a, n as o, o as s, r as c, t as l } from "../behavior.mjs";
|
|
|
6
6
|
import { t as u } from "../identity.mjs";
|
|
7
7
|
import { Path as d, Svg as f } from "./svg.mjs";
|
|
8
8
|
import p from "./button.mjs";
|
|
9
|
-
import m from "./
|
|
10
|
-
import h from "./
|
|
11
|
-
import g from "./
|
|
12
|
-
import _ from "./
|
|
13
|
-
import v from "./
|
|
9
|
+
import m from "./visuallyHidden.mjs";
|
|
10
|
+
import h from "./flex.mjs";
|
|
11
|
+
import g from "./checkbox.mjs";
|
|
12
|
+
import _ from "./overlay.mjs";
|
|
13
|
+
import v from "./presence.mjs";
|
|
14
14
|
import y from "./textbox.mjs";
|
|
15
15
|
import { n as b } from "../scrolling.mjs";
|
|
16
16
|
import x from "./grid.mjs";
|
|
@@ -19,19 +19,19 @@ import { Span as C } from "./semantics.mjs";
|
|
|
19
19
|
import w from "./popover.mjs";
|
|
20
20
|
import T from "./switch.mjs";
|
|
21
21
|
import ee, { Fragment as te, createContext as ne, forwardRef as E, memo as D, useCallback as O, useContext as k, useEffect as A, useImperativeHandle as j, useLayoutEffect as re, useMemo as M, useRef as N, useState as P, useSyncExternalStore as ie } from "react";
|
|
22
|
-
import { Fragment as
|
|
23
|
-
import { useSyncExternalStore as
|
|
22
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
23
|
+
import { useSyncExternalStore as ae } from "use-sync-external-store/shim";
|
|
24
24
|
//#region src/components/dataGrid/components/dataGridBottomBarSelection.tsx
|
|
25
|
-
function
|
|
25
|
+
function oe(e) {
|
|
26
26
|
let { grid: t } = e, n = t.selectedRows.size, r = t.isSelectionView;
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ L(h, {
|
|
28
28
|
component: `${t.componentName}.bottomBar.selection`,
|
|
29
29
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ I(i, {
|
|
31
31
|
component: `${t.componentName}.bottomBar.info`,
|
|
32
32
|
children: t.localeText.selectedCount(n, t.hiddenSelectedCount)
|
|
33
33
|
}),
|
|
34
|
-
t.canShowSelection && (n > 0 || r) && /* @__PURE__ */
|
|
34
|
+
t.canShowSelection && (n > 0 || r) && /* @__PURE__ */ I(p, {
|
|
35
35
|
type: "button",
|
|
36
36
|
component: `${t.componentName}.bottomBar.action`,
|
|
37
37
|
variant: { pressed: r },
|
|
@@ -39,11 +39,11 @@ function se(e) {
|
|
|
39
39
|
onClick: t.toggleSelectionView,
|
|
40
40
|
children: t.localeText.showSelected
|
|
41
41
|
}),
|
|
42
|
-
n > 0 && /* @__PURE__ */
|
|
42
|
+
n > 0 && /* @__PURE__ */ L(p, {
|
|
43
43
|
type: "button",
|
|
44
44
|
component: `${t.componentName}.bottomBar.action`,
|
|
45
45
|
onClick: t.clearSelection,
|
|
46
|
-
children: [/* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ I(i, {
|
|
47
47
|
tag: "span",
|
|
48
48
|
props: { "aria-hidden": !0 },
|
|
49
49
|
children: "✕"
|
|
@@ -54,74 +54,74 @@ function se(e) {
|
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
56
|
//#region src/components/dataGrid/components/dataGridPagination.tsx
|
|
57
|
-
function
|
|
57
|
+
function se(e) {
|
|
58
58
|
let { grid: t } = e, { pagination: n } = t, r = n.state, a = O(() => n.firstPage(), [n]), o = O(() => n.prevPage(), [n]), s = O(() => n.nextPage(), [n]), c = O(() => n.lastPage(), [n]);
|
|
59
59
|
if (!r) return null;
|
|
60
60
|
let { canGoPrev: l, canGoNext: u, totalPages: d } = n;
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ L(h, {
|
|
62
62
|
component: `${t.componentName}.bottomBar.pagination`,
|
|
63
63
|
gap: .5,
|
|
64
64
|
ai: "center",
|
|
65
65
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ I(ce, {
|
|
67
67
|
grid: t,
|
|
68
68
|
pageSize: r.pageSize
|
|
69
69
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ I(R, {
|
|
71
71
|
componentName: t.componentName,
|
|
72
72
|
label: t.localeText.firstPage,
|
|
73
73
|
onClick: a,
|
|
74
74
|
disabled: !l,
|
|
75
|
-
children: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ I(pe, {})
|
|
76
76
|
}),
|
|
77
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ I(R, {
|
|
78
78
|
componentName: t.componentName,
|
|
79
79
|
label: t.localeText.previousPage,
|
|
80
80
|
onClick: o,
|
|
81
81
|
disabled: !l,
|
|
82
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ I(de, {})
|
|
83
83
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ L(h, {
|
|
85
85
|
ai: "center",
|
|
86
86
|
gap: 1.5,
|
|
87
87
|
px: 2,
|
|
88
88
|
userSelect: "none",
|
|
89
|
-
children: [/* @__PURE__ */
|
|
89
|
+
children: [/* @__PURE__ */ I(le, {
|
|
90
90
|
grid: t,
|
|
91
91
|
page: r.page,
|
|
92
92
|
totalPages: d
|
|
93
|
-
}), /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ I(i, {
|
|
94
94
|
component: `${t.componentName}.bottomBar.pagination.info`,
|
|
95
95
|
fontSize: 12,
|
|
96
96
|
opacity: .7,
|
|
97
97
|
children: t.localeText.pageCount(d)
|
|
98
98
|
})]
|
|
99
99
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ I(R, {
|
|
101
101
|
componentName: t.componentName,
|
|
102
102
|
label: t.localeText.nextPage,
|
|
103
103
|
onClick: s,
|
|
104
104
|
disabled: !u,
|
|
105
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ I(fe, {})
|
|
106
106
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
107
|
+
/* @__PURE__ */ I(R, {
|
|
108
108
|
componentName: t.componentName,
|
|
109
109
|
label: t.localeText.lastPage,
|
|
110
110
|
onClick: c,
|
|
111
111
|
disabled: !u,
|
|
112
|
-
children: /* @__PURE__ */
|
|
112
|
+
children: /* @__PURE__ */ I(me, {})
|
|
113
113
|
})
|
|
114
114
|
]
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
function
|
|
117
|
+
se.displayName = "DataGridPagination";
|
|
118
|
+
function ce({ grid: e, pageSize: t }) {
|
|
119
119
|
let n = e.pagination.pageSizeOptions;
|
|
120
|
-
return !n || n.length === 0 ? null : /* @__PURE__ */
|
|
120
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ I(h, {
|
|
121
121
|
ai: "center",
|
|
122
122
|
gap: 1,
|
|
123
123
|
me: 1,
|
|
124
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ I(i, {
|
|
125
125
|
component: `${e.componentName}.bottomBar.pagination.pageSize`,
|
|
126
126
|
tag: "select",
|
|
127
127
|
fontSize: 12,
|
|
@@ -132,14 +132,14 @@ function le({ grid: e, pageSize: t }) {
|
|
|
132
132
|
value: t,
|
|
133
133
|
onChange: (t) => e.pagination.changePageSize(Number(t.target.value))
|
|
134
134
|
},
|
|
135
|
-
children: n.map((t) => /* @__PURE__ */
|
|
135
|
+
children: n.map((t) => /* @__PURE__ */ I("option", {
|
|
136
136
|
value: t,
|
|
137
137
|
children: e.localeText.pageSizeOption(t)
|
|
138
138
|
}, t))
|
|
139
139
|
})
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function le({ grid: e, page: t, totalPages: n }) {
|
|
143
143
|
let [r, i] = P(String(t)), [a, o] = P(t);
|
|
144
144
|
t !== a && (o(t), i(String(t)));
|
|
145
145
|
let s = O(() => {
|
|
@@ -147,7 +147,7 @@ function ue({ grid: e, page: t, totalPages: n }) {
|
|
|
147
147
|
}, [e, r]), c = O((e) => {
|
|
148
148
|
e.key === "Enter" ? s() : e.key === "Escape" && i(String(t));
|
|
149
149
|
}, [s, t]);
|
|
150
|
-
return /* @__PURE__ */
|
|
150
|
+
return /* @__PURE__ */ I(y, {
|
|
151
151
|
type: "number",
|
|
152
152
|
variant: "compact",
|
|
153
153
|
value: r,
|
|
@@ -163,9 +163,9 @@ function ue({ grid: e, page: t, totalPages: n }) {
|
|
|
163
163
|
}
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function R(e) {
|
|
167
167
|
let { componentName: t, label: n, onClick: r, disabled: i, children: a } = e;
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ I(p, {
|
|
169
169
|
component: `${t}.bottomBar.pagination.button`,
|
|
170
170
|
props: {
|
|
171
171
|
"aria-label": n,
|
|
@@ -178,15 +178,15 @@ function de(e) {
|
|
|
178
178
|
opacity: i ? .3 : .7,
|
|
179
179
|
hover: i ? void 0 : {
|
|
180
180
|
opacity: 1,
|
|
181
|
-
bgColor: "
|
|
181
|
+
bgColor: "base-100"
|
|
182
182
|
},
|
|
183
|
-
theme: { dark: { hover: i ? void 0 : { bgColor: "
|
|
183
|
+
theme: { dark: { hover: i ? void 0 : { bgColor: "base-700" } } },
|
|
184
184
|
transitionDuration: 150,
|
|
185
185
|
children: a
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
return /* @__PURE__ */
|
|
188
|
+
function ue(e) {
|
|
189
|
+
return /* @__PURE__ */ I(f, {
|
|
190
190
|
viewBox: "0 0 24 24",
|
|
191
191
|
width: "14",
|
|
192
192
|
height: "14",
|
|
@@ -195,70 +195,70 @@ function fe(e) {
|
|
|
195
195
|
strokeWidth: 2,
|
|
196
196
|
strokeLinecap: "round",
|
|
197
197
|
strokeLinejoin: "round",
|
|
198
|
-
children: /* @__PURE__ */
|
|
198
|
+
children: /* @__PURE__ */ I(d, { d: e.d })
|
|
199
199
|
});
|
|
200
200
|
}
|
|
201
|
-
function
|
|
202
|
-
return /* @__PURE__ */
|
|
201
|
+
function de() {
|
|
202
|
+
return /* @__PURE__ */ I(ue, { d: "M15 18l-6-6 6-6" });
|
|
203
203
|
}
|
|
204
|
-
function
|
|
205
|
-
return /* @__PURE__ */
|
|
204
|
+
function fe() {
|
|
205
|
+
return /* @__PURE__ */ I(ue, { d: "M9 18l6-6-6-6" });
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
return /* @__PURE__ */
|
|
207
|
+
function pe() {
|
|
208
|
+
return /* @__PURE__ */ I(ue, { d: "M18 18l-6-6 6-6M11 18l-6-6 6-6" });
|
|
209
209
|
}
|
|
210
|
-
function
|
|
211
|
-
return /* @__PURE__ */
|
|
210
|
+
function me() {
|
|
211
|
+
return /* @__PURE__ */ I(ue, { d: "M6 18l6-6-6-6M13 18l6-6-6-6" });
|
|
212
212
|
}
|
|
213
213
|
//#endregion
|
|
214
214
|
//#region src/components/dataGrid/components/dataGridBottomBar.tsx
|
|
215
|
-
function
|
|
215
|
+
function he(e) {
|
|
216
216
|
let { grid: t } = e, { pagination: n, filter: r } = t;
|
|
217
217
|
if (n.state) {
|
|
218
218
|
let { totalItems: e, startItem: r, endItem: a } = n;
|
|
219
|
-
return /* @__PURE__ */
|
|
219
|
+
return /* @__PURE__ */ L(h, {
|
|
220
220
|
component: `${t.componentName}.bottomBar`,
|
|
221
221
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ I(i, {
|
|
223
223
|
component: `${t.componentName}.bottomBar.info`,
|
|
224
224
|
children: t.localeText.pageRowRange(r, a, e)
|
|
225
225
|
}),
|
|
226
|
-
t.props.def.rowSelection && /* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
226
|
+
t.props.def.rowSelection && /* @__PURE__ */ I(oe, { grid: t }),
|
|
227
|
+
/* @__PURE__ */ I(se, { grid: t })
|
|
228
228
|
]
|
|
229
229
|
});
|
|
230
230
|
}
|
|
231
231
|
let { filtered: a, total: o } = r.filterStats;
|
|
232
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ L(h, {
|
|
233
233
|
component: `${t.componentName}.bottomBar`,
|
|
234
234
|
children: [
|
|
235
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ I(i, {
|
|
236
236
|
component: `${t.componentName}.bottomBar.info`,
|
|
237
237
|
children: t.localeText.rowCount(a, o)
|
|
238
238
|
}),
|
|
239
|
-
r.hasActiveFilters && /* @__PURE__ */
|
|
239
|
+
r.hasActiveFilters && /* @__PURE__ */ L(p, {
|
|
240
240
|
type: "button",
|
|
241
241
|
component: `${t.componentName}.bottomBar.clearFilters`,
|
|
242
242
|
onClick: r.clearAllFilters,
|
|
243
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ I(i, {
|
|
244
244
|
tag: "span",
|
|
245
245
|
props: { "aria-hidden": !0 },
|
|
246
246
|
children: "✕"
|
|
247
247
|
}), t.localeText.clearFilters]
|
|
248
248
|
}),
|
|
249
|
-
t.props.def.rowSelection && /* @__PURE__ */
|
|
249
|
+
t.props.def.rowSelection && /* @__PURE__ */ I(oe, { grid: t })
|
|
250
250
|
]
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/components/dataGrid/gridNavigationContext.ts
|
|
255
|
-
var
|
|
256
|
-
function
|
|
257
|
-
return k(
|
|
255
|
+
var ge = ne(null);
|
|
256
|
+
function z() {
|
|
257
|
+
return k(ge);
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
let r = ie(e?.activeCell.subscribe ??
|
|
259
|
+
var _e = () => () => {};
|
|
260
|
+
function ve(e, t, n) {
|
|
261
|
+
let r = ie(e?.activeCell.subscribe ?? _e, () => !!e?.activeCell.isActive(t, n), () => !!e?.activeCell.isActive(t, n));
|
|
262
262
|
return e ? {
|
|
263
263
|
...e.cellProps(t, n),
|
|
264
264
|
tabIndex: r ? 0 : -1
|
|
@@ -266,7 +266,7 @@ function R(e, t, n) {
|
|
|
266
266
|
}
|
|
267
267
|
//#endregion
|
|
268
268
|
//#region src/components/dataGrid/models/viewportModel.ts
|
|
269
|
-
var
|
|
269
|
+
var ye = class e {
|
|
270
270
|
grid;
|
|
271
271
|
static DEFAULT_VISIBLE_ROWS_COUNT = 10;
|
|
272
272
|
static ROWS_AHEAD = 12;
|
|
@@ -328,7 +328,7 @@ var be = class e {
|
|
|
328
328
|
viewHeight: this.viewHeight
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
|
-
},
|
|
331
|
+
}, be = class {
|
|
332
332
|
row;
|
|
333
333
|
column;
|
|
334
334
|
listeners = /* @__PURE__ */ new Set();
|
|
@@ -342,33 +342,61 @@ var be = class e {
|
|
|
342
342
|
set(e, t) {
|
|
343
343
|
(e !== this.row || t !== this.column) && (this.row = e, this.column = t, this.listeners.forEach((e) => e()));
|
|
344
344
|
}
|
|
345
|
-
};
|
|
345
|
+
}, xe, Se;
|
|
346
|
+
function Ce() {
|
|
347
|
+
return Se ??= import("../dataGridDateParts.mjs").then((e) => xe = e.default), Se;
|
|
348
|
+
}
|
|
349
|
+
function we() {
|
|
350
|
+
return xe;
|
|
351
|
+
}
|
|
352
|
+
function Te(e) {
|
|
353
|
+
let [t, n] = P(void 0);
|
|
354
|
+
return r(() => {
|
|
355
|
+
if (!e || t) return;
|
|
356
|
+
if (xe) {
|
|
357
|
+
n(() => xe);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
let r = !0;
|
|
361
|
+
return Ce().then((e) => r && n(() => e)), () => {
|
|
362
|
+
r = !1;
|
|
363
|
+
};
|
|
364
|
+
}, [e, t]), t;
|
|
365
|
+
}
|
|
346
366
|
//#endregion
|
|
347
367
|
//#region src/components/dataGrid/models/editModel.ts
|
|
348
|
-
function
|
|
368
|
+
function B(e, t) {
|
|
349
369
|
return JSON.stringify([e, t]);
|
|
350
370
|
}
|
|
351
|
-
var
|
|
352
|
-
function
|
|
353
|
-
return typeof e == "number" ? "number" : typeof e == "boolean" ? "checkbox" : "text";
|
|
371
|
+
var Ee = 1e3;
|
|
372
|
+
function De(e) {
|
|
373
|
+
return typeof e == "number" ? "number" : typeof e == "boolean" ? "checkbox" : e instanceof Date ? "datetime" : typeof e == "string" ? ke.test(e) ? "date" : Ae.test(e) ? "time" : je.test(e) ? "datetime" : "text" : "text";
|
|
374
|
+
}
|
|
375
|
+
var Oe = /* @__PURE__ */ new Set([
|
|
376
|
+
"date",
|
|
377
|
+
"time",
|
|
378
|
+
"datetime"
|
|
379
|
+
]), ke = /^\d{4}-\d{2}-\d{2}$/, Ae = /^\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/, je = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}/;
|
|
380
|
+
function Me(e) {
|
|
381
|
+
return Oe.has(e);
|
|
354
382
|
}
|
|
355
|
-
function
|
|
383
|
+
function Ne(e, t) {
|
|
356
384
|
if (e === "text") return t;
|
|
357
385
|
if (e !== "number" || t.trim() === "") return;
|
|
358
386
|
let n = Number(t);
|
|
359
387
|
return Number.isFinite(n) ? n : void 0;
|
|
360
388
|
}
|
|
361
|
-
var
|
|
389
|
+
var Pe = /* @__PURE__ */ new Set([
|
|
362
390
|
"true",
|
|
363
391
|
"1",
|
|
364
392
|
"yes"
|
|
365
|
-
]),
|
|
393
|
+
]), Fe = /* @__PURE__ */ new Set([
|
|
366
394
|
"false",
|
|
367
395
|
"0",
|
|
368
396
|
"no",
|
|
369
397
|
""
|
|
370
398
|
]);
|
|
371
|
-
function
|
|
399
|
+
function Ie(e, t, n) {
|
|
372
400
|
if (e.type === "number") {
|
|
373
401
|
if (n.trim() === "") return { value: null };
|
|
374
402
|
let e = Number(n);
|
|
@@ -376,7 +404,17 @@ function De(e, t, n) {
|
|
|
376
404
|
}
|
|
377
405
|
if (e.type === "checkbox") {
|
|
378
406
|
let e = n.trim().toLowerCase();
|
|
379
|
-
return
|
|
407
|
+
return Pe.has(e) ? { value: !0 } : Fe.has(e) ? { value: !1 } : void 0;
|
|
408
|
+
}
|
|
409
|
+
if (Me(e.type)) {
|
|
410
|
+
if (n.trim() === "") return { value: null };
|
|
411
|
+
let t = we();
|
|
412
|
+
if (t) {
|
|
413
|
+
let r = t.parsePasted(e, n);
|
|
414
|
+
return r ? { value: r } : void 0;
|
|
415
|
+
}
|
|
416
|
+
let r = n.trim();
|
|
417
|
+
return (e.type === "date" ? ke : e.type === "time" ? Ae : je).test(r) ? { value: r } : void 0;
|
|
380
418
|
}
|
|
381
419
|
if (e.type === "select") {
|
|
382
420
|
let e = t.find((e) => String(e.value) === n);
|
|
@@ -384,10 +422,10 @@ function De(e, t, n) {
|
|
|
384
422
|
}
|
|
385
423
|
return { value: n };
|
|
386
424
|
}
|
|
387
|
-
function
|
|
425
|
+
function Le(e) {
|
|
388
426
|
return e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
389
427
|
}
|
|
390
|
-
var
|
|
428
|
+
var Re = class {
|
|
391
429
|
grid;
|
|
392
430
|
constructor(e) {
|
|
393
431
|
this.grid = e;
|
|
@@ -412,7 +450,7 @@ var ke = class {
|
|
|
412
450
|
}
|
|
413
451
|
editorFor(e, t) {
|
|
414
452
|
let { editor: n } = e.def;
|
|
415
|
-
return typeof n == "object" ? n : n ? { type: n } : { type:
|
|
453
|
+
return typeof n == "object" ? n : n ? { type: n } : { type: De(t) };
|
|
416
454
|
}
|
|
417
455
|
isEditing(e, t) {
|
|
418
456
|
return this._active?.rowKey === e && this._active.columnKey === t;
|
|
@@ -425,7 +463,7 @@ var ke = class {
|
|
|
425
463
|
return !!this._active;
|
|
426
464
|
}
|
|
427
465
|
isRejected(e, t) {
|
|
428
|
-
return this.rejected.size > 0 && this.rejected.has(
|
|
466
|
+
return this.rejected.size > 0 && this.rejected.has(B(e, t));
|
|
429
467
|
}
|
|
430
468
|
get draft() {
|
|
431
469
|
return this._active?.draft;
|
|
@@ -437,8 +475,8 @@ var ke = class {
|
|
|
437
475
|
return !!this._active?.pending;
|
|
438
476
|
}
|
|
439
477
|
begin(e, t, n, r) {
|
|
440
|
-
let i = r === void 0 ? void 0 :
|
|
441
|
-
this.rejected.delete(
|
|
478
|
+
let i = r === void 0 ? void 0 : Ne(this.editorFor(t, n).type, r);
|
|
479
|
+
this.rejected.delete(B(e.key, t.key)), this._active = {
|
|
442
480
|
row: e,
|
|
443
481
|
rowKey: e.key,
|
|
444
482
|
columnKey: t.key,
|
|
@@ -499,12 +537,12 @@ var ke = class {
|
|
|
499
537
|
}, this.grid.notify();
|
|
500
538
|
return;
|
|
501
539
|
}
|
|
502
|
-
this.values.set(
|
|
540
|
+
this.values.set(B(t.rowKey, t.columnKey), t.value), this._edits = [...this._edits, t], this._active = void 0, this.grid.notify(), this.grid.props.onCellEditsChange?.(this._edits, { reason: "edit" });
|
|
503
541
|
}
|
|
504
542
|
}
|
|
505
543
|
valueOf(e, t, n) {
|
|
506
544
|
if (this.values.size === 0) return n;
|
|
507
|
-
let r =
|
|
545
|
+
let r = B(e, t);
|
|
508
546
|
return this.values.has(r) ? this.values.get(r) : n;
|
|
509
547
|
}
|
|
510
548
|
get edits() {
|
|
@@ -523,7 +561,7 @@ var ke = class {
|
|
|
523
561
|
c++;
|
|
524
562
|
continue;
|
|
525
563
|
}
|
|
526
|
-
let f = this.valueOf(l.key, u.key, l.data[u.key]), p =
|
|
564
|
+
let f = this.valueOf(l.key, u.key, l.data[u.key]), p = Ie(this.editorFor(u, f), this.optionsFor(u, l), d), m = {
|
|
527
565
|
rowKey: l.key,
|
|
528
566
|
columnKey: u.key,
|
|
529
567
|
row: l.data,
|
|
@@ -549,13 +587,13 @@ var ke = class {
|
|
|
549
587
|
this.rejected.clear(), n.forEach((e, t) => {
|
|
550
588
|
let n = r[t];
|
|
551
589
|
if (typeof n == "string" || n === !1) {
|
|
552
|
-
this.rejected.add(
|
|
590
|
+
this.rejected.add(B(e.rowKey, e.columnKey)), o.push({
|
|
553
591
|
...e,
|
|
554
592
|
error: typeof n == "string" ? n : this.invalidValue
|
|
555
593
|
});
|
|
556
594
|
return;
|
|
557
595
|
}
|
|
558
|
-
Object.is(e.value, e.oldValue) || (this.values.set(
|
|
596
|
+
Object.is(e.value, e.oldValue) || (this.values.set(B(e.rowKey, e.columnKey), e.value), a.push(e));
|
|
559
597
|
}), a.length > 0 && (this._edits = [...this._edits, ...a]), this.grid.notify(), a.length > 0 && this.grid.props.onCellEditsChange?.(this._edits, { reason: "paste" }), this.grid.props.onPaste?.({
|
|
560
598
|
range: this.grid.range.rangeOf(t),
|
|
561
599
|
applied: a,
|
|
@@ -564,8 +602,8 @@ var ke = class {
|
|
|
564
602
|
});
|
|
565
603
|
}
|
|
566
604
|
nextEditable(e, t, n = !1) {
|
|
567
|
-
let r = this.grid.flatRows.value, i = this.grid.columns.value.visibleLeafs, a = n ? -1 : 1, o = e * i.length + t + a, s = Math.min(r.length * i.length - 1, o +
|
|
568
|
-
for (let e = o; e >= Math.max(0, o -
|
|
605
|
+
let r = this.grid.flatRows.value, i = this.grid.columns.value.visibleLeafs, a = n ? -1 : 1, o = e * i.length + t + a, s = Math.min(r.length * i.length - 1, o + Ee);
|
|
606
|
+
for (let e = o; e >= Math.max(0, o - Ee) && e <= s; e += a) {
|
|
569
607
|
let t = Math.floor(e / i.length), n = e % i.length, a = r[t], o = i[n];
|
|
570
608
|
if (!(!o || a?.kind !== "row" || !this.isEditable(a, o))) return {
|
|
571
609
|
row: t,
|
|
@@ -573,7 +611,7 @@ var ke = class {
|
|
|
573
611
|
};
|
|
574
612
|
}
|
|
575
613
|
}
|
|
576
|
-
},
|
|
614
|
+
}, V = class {
|
|
577
615
|
grid;
|
|
578
616
|
row;
|
|
579
617
|
column;
|
|
@@ -640,7 +678,7 @@ var ke = class {
|
|
|
640
678
|
cancelEdit = () => {
|
|
641
679
|
this.grid.edits.cancel();
|
|
642
680
|
};
|
|
643
|
-
},
|
|
681
|
+
}, H = class e {
|
|
644
682
|
grid;
|
|
645
683
|
parentRow;
|
|
646
684
|
constructor(e, t) {
|
|
@@ -673,7 +711,7 @@ var ke = class {
|
|
|
673
711
|
get allRows() {
|
|
674
712
|
return [];
|
|
675
713
|
}
|
|
676
|
-
},
|
|
714
|
+
}, U = class {
|
|
677
715
|
grid;
|
|
678
716
|
rowIndex;
|
|
679
717
|
constructor(e, t, n) {
|
|
@@ -704,7 +742,7 @@ var ke = class {
|
|
|
704
742
|
let e = this.grid.columns.value.visibleLeafs;
|
|
705
743
|
return this._cells?.leafs !== e && (this._cells = {
|
|
706
744
|
leafs: e,
|
|
707
|
-
cells: e.map((e) => new
|
|
745
|
+
cells: e.map((e) => new V(this.grid, this, e))
|
|
708
746
|
}), this._cells.cells;
|
|
709
747
|
}
|
|
710
748
|
get cellCount() {
|
|
@@ -726,7 +764,7 @@ var ke = class {
|
|
|
726
764
|
return this.grid.expandedDetailRows.has(this.key);
|
|
727
765
|
}
|
|
728
766
|
get flatRows() {
|
|
729
|
-
return this.grid.props.def.rowDetail && this.expanded ? [this, new
|
|
767
|
+
return this.grid.props.def.rowDetail && this.expanded ? [this, new H(this.grid, this)] : [this];
|
|
730
768
|
}
|
|
731
769
|
get allRows() {
|
|
732
770
|
return this;
|
|
@@ -734,14 +772,14 @@ var ke = class {
|
|
|
734
772
|
};
|
|
735
773
|
//#endregion
|
|
736
774
|
//#region src/components/dataGrid/models/treeRow.ts
|
|
737
|
-
function
|
|
775
|
+
function W(e) {
|
|
738
776
|
return !!e && e.isTreeRow === !0;
|
|
739
777
|
}
|
|
740
778
|
//#endregion
|
|
741
779
|
//#region src/components/dataGrid/useGridNavigation.ts
|
|
742
|
-
var
|
|
743
|
-
function
|
|
744
|
-
let { grid: t, scrollerRef: n, scroll: i, onScrollTo: a } = e, o = t.headerRows.value, c = t.filter.hasFilterableColumns, u = o.length + +!!c, d = t.viewport.isEmpty ?
|
|
780
|
+
var ze = "[role=\"gridcell\"],[role=\"columnheader\"]", Be = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]", Ve = 2, He = [];
|
|
781
|
+
function Ue(e) {
|
|
782
|
+
let { grid: t, scrollerRef: n, scroll: i, onScrollTo: a } = e, o = t.headerRows.value, c = t.filter.hasFilterableColumns, u = o.length + +!!c, d = t.viewport.isEmpty ? He : t.flatRows.value, f = t.columns.value.visibleLeafs.length, p = t.aggregation.hasFooter && !t.viewport.isEmpty ? 1 : 0, m = u + d.length + p, h = O((e) => {
|
|
745
783
|
if (e < o.length) return o[e]?.length ?? 0;
|
|
746
784
|
if (e < u || e >= u + d.length) return f;
|
|
747
785
|
let t = d[e - u];
|
|
@@ -763,7 +801,7 @@ function Pe(e) {
|
|
|
763
801
|
return;
|
|
764
802
|
}
|
|
765
803
|
let { startIndex: l, take: f } = o.window(i.top, i.direction);
|
|
766
|
-
if (s >= l +
|
|
804
|
+
if (s >= l + Ve && s < l + f - Ve) return;
|
|
767
805
|
let p = o.rowTop(s);
|
|
768
806
|
c.scrollTop = p, a(p);
|
|
769
807
|
}, [
|
|
@@ -805,12 +843,12 @@ function Pe(e) {
|
|
|
805
843
|
let C = O((e, n, r) => {
|
|
806
844
|
if (!t.tree.enabled || e.key !== "ArrowRight" && e.key !== "ArrowLeft") return !1;
|
|
807
845
|
let i = d[n - u];
|
|
808
|
-
if (!
|
|
846
|
+
if (!W(i) || t.columns.value.visibleLeafs[r]?.key !== t.tree.columnKey) return !1;
|
|
809
847
|
if (e.key === (t.isRtl ? "ArrowLeft" : "ArrowRight")) return !i.hasChildren || i.treeExpanded ? !1 : (i.toggleTree(), !0);
|
|
810
848
|
if (i.hasChildren && i.treeExpanded) return i.toggleTree(), !0;
|
|
811
849
|
for (let e = n - 1; e >= u; e--) {
|
|
812
850
|
let t = d[e - u];
|
|
813
|
-
if (!(!
|
|
851
|
+
if (!(!W(t) || t.level >= i.level)) return x.setActiveCell(e, r, { reason: "keyboard" }), !0;
|
|
814
852
|
}
|
|
815
853
|
return !1;
|
|
816
854
|
}, [
|
|
@@ -831,18 +869,18 @@ function Pe(e) {
|
|
|
831
869
|
if (!t.props.def.rowSelection) return !1;
|
|
832
870
|
if (e < u) return e >= o.length || !t.columns.value.visibleLeafs[n]?.isRowSelection ? !1 : (t.toggleSelectAllRows(), !0);
|
|
833
871
|
let r = t.flatRows.value[e - u];
|
|
834
|
-
return r instanceof
|
|
872
|
+
return r instanceof U && (r.toggleSelection(), !0);
|
|
835
873
|
}, [
|
|
836
874
|
t,
|
|
837
875
|
u,
|
|
838
876
|
o.length
|
|
839
877
|
]), ee = O((e, t, n) => {
|
|
840
|
-
let r = Array.from(e.querySelectorAll(
|
|
878
|
+
let r = Array.from(e.querySelectorAll(Be));
|
|
841
879
|
if (r.length < 2) return !1;
|
|
842
880
|
let i = r.indexOf(t);
|
|
843
881
|
return i !== -1 && (r[(i + (n ? -1 : 1) + r.length) % r.length].focus(), !0);
|
|
844
882
|
}, []), te = x.onKeyDown, ne = O((e) => {
|
|
845
|
-
let n = e.target, r = n.closest?.(
|
|
883
|
+
let n = e.target, r = n.closest?.(ze);
|
|
846
884
|
if (r) {
|
|
847
885
|
if (n !== r) {
|
|
848
886
|
if (e.key === "Escape" && !r.querySelector("[aria-expanded=\"true\"]")) {
|
|
@@ -870,13 +908,13 @@ function Pe(e) {
|
|
|
870
908
|
e.preventDefault();
|
|
871
909
|
return;
|
|
872
910
|
}
|
|
873
|
-
let i = r.querySelector(
|
|
911
|
+
let i = r.querySelector(Be);
|
|
874
912
|
if (i) {
|
|
875
913
|
e.preventDefault(), i.focus();
|
|
876
914
|
return;
|
|
877
915
|
}
|
|
878
916
|
}
|
|
879
|
-
if (t.edits.enabled &&
|
|
917
|
+
if (t.edits.enabled && Le(e) && t.edits.beginAt(x.activeIndex - u, x.activeColumn, e.key)) {
|
|
880
918
|
e.preventDefault();
|
|
881
919
|
return;
|
|
882
920
|
}
|
|
@@ -897,7 +935,7 @@ function Pe(e) {
|
|
|
897
935
|
ee,
|
|
898
936
|
T,
|
|
899
937
|
C
|
|
900
|
-
]), { setActiveCell: E, activeIndex: D, activeColumn: k } = x, A = s(x.cellProps), [j] = P(() => new
|
|
938
|
+
]), { setActiveCell: E, activeIndex: D, activeColumn: k } = x, A = s(x.cellProps), [j] = P(() => new be(D, k));
|
|
901
939
|
r(() => j.set(D, k), [
|
|
902
940
|
j,
|
|
903
941
|
k,
|
|
@@ -931,7 +969,7 @@ function Pe(e) {
|
|
|
931
969
|
}
|
|
932
970
|
//#endregion
|
|
933
971
|
//#region src/utils/array/arrayUtils.ts
|
|
934
|
-
var
|
|
972
|
+
var We;
|
|
935
973
|
(function(e) {
|
|
936
974
|
function t(e, t, n = 0) {
|
|
937
975
|
return e.slice(n, n + t);
|
|
@@ -978,11 +1016,11 @@ var Fe;
|
|
|
978
1016
|
}));
|
|
979
1017
|
}
|
|
980
1018
|
e.groupBy = s;
|
|
981
|
-
})(
|
|
982
|
-
var
|
|
1019
|
+
})(We ||= {});
|
|
1020
|
+
var G = We, Ge = "row-number-cell", Ke = "row-selection-cell", K = "grouping-cell", qe = "row-detail-cell", Je = Symbol("memo.unset"), Ye = class {
|
|
983
1021
|
action;
|
|
984
1022
|
deps;
|
|
985
|
-
cache =
|
|
1023
|
+
cache = Je;
|
|
986
1024
|
dependents = /* @__PURE__ */ new Set();
|
|
987
1025
|
wired = !1;
|
|
988
1026
|
constructor(e, t) {
|
|
@@ -995,46 +1033,46 @@ var W = Fe, Ie = "row-number-cell", Le = "row-selection-cell", G = "grouping-cel
|
|
|
995
1033
|
}
|
|
996
1034
|
}
|
|
997
1035
|
get value() {
|
|
998
|
-
return this.wire(), this.cache ===
|
|
1036
|
+
return this.wire(), this.cache === Je && (this.cache = this.action()), this.cache;
|
|
999
1037
|
}
|
|
1000
1038
|
clear() {
|
|
1001
|
-
if (this.wire(), this.cache !==
|
|
1002
|
-
this.cache =
|
|
1039
|
+
if (this.wire(), this.cache !== Je) {
|
|
1040
|
+
this.cache = Je;
|
|
1003
1041
|
for (let e of this.dependents) e.clear();
|
|
1004
1042
|
}
|
|
1005
1043
|
}
|
|
1006
1044
|
};
|
|
1007
1045
|
function q(e, t = () => []) {
|
|
1008
|
-
return new
|
|
1046
|
+
return new Ye(e, t);
|
|
1009
1047
|
}
|
|
1010
1048
|
//#endregion
|
|
1011
1049
|
//#region src/components/dataGrid/models/aggregationModel.ts
|
|
1012
|
-
function
|
|
1050
|
+
function Xe(e) {
|
|
1013
1051
|
return e.filter((e) => typeof e == "number" && !Number.isNaN(e));
|
|
1014
1052
|
}
|
|
1015
|
-
var
|
|
1053
|
+
var Ze = (e) => e.reduce((e, t) => e + t, 0), Qe = (e, t) => e.reduce((e, n) => (t ? n < e : n > e) ? n : e), $e = {
|
|
1016
1054
|
sum: (e) => {
|
|
1017
|
-
let t =
|
|
1018
|
-
return t.length ?
|
|
1055
|
+
let t = Xe(e);
|
|
1056
|
+
return t.length ? Ze(t) : null;
|
|
1019
1057
|
},
|
|
1020
1058
|
avg: (e) => {
|
|
1021
|
-
let t =
|
|
1022
|
-
return t.length ? Math.round(
|
|
1059
|
+
let t = Xe(e);
|
|
1060
|
+
return t.length ? Math.round(Ze(t) / t.length * 100) / 100 : null;
|
|
1023
1061
|
},
|
|
1024
1062
|
min: (e) => {
|
|
1025
|
-
let t =
|
|
1026
|
-
return t.length ?
|
|
1063
|
+
let t = Xe(e);
|
|
1064
|
+
return t.length ? Qe(t, !0) : null;
|
|
1027
1065
|
},
|
|
1028
1066
|
max: (e) => {
|
|
1029
|
-
let t =
|
|
1030
|
-
return t.length ?
|
|
1067
|
+
let t = Xe(e);
|
|
1068
|
+
return t.length ? Qe(t, !1) : null;
|
|
1031
1069
|
},
|
|
1032
1070
|
count: (e, t) => t.length
|
|
1033
1071
|
};
|
|
1034
|
-
function
|
|
1035
|
-
return typeof e == "function" ? e(t, n) :
|
|
1072
|
+
function et(e, t, n) {
|
|
1073
|
+
return typeof e == "function" ? e(t, n) : $e[e]?.(t, n) ?? null;
|
|
1036
1074
|
}
|
|
1037
|
-
var
|
|
1075
|
+
var tt = class {
|
|
1038
1076
|
grid;
|
|
1039
1077
|
constructor(e) {
|
|
1040
1078
|
this.grid = e;
|
|
@@ -1055,8 +1093,8 @@ var Ge = class {
|
|
|
1055
1093
|
get footerLabelColumn() {
|
|
1056
1094
|
return this.grid.columns.value.visibleLeafs.find((e) => (e.isData || e.isGrouping) && !e.aggregate);
|
|
1057
1095
|
}
|
|
1058
|
-
footerCells = q(() => this.grid.columns.value.visibleLeafs.map((e) => new
|
|
1059
|
-
},
|
|
1096
|
+
footerCells = q(() => this.grid.columns.value.visibleLeafs.map((e) => new nt(this.grid, e, this.grid.filteredData, "footer")), () => [this.grid.rows]);
|
|
1097
|
+
}, nt = class {
|
|
1060
1098
|
grid;
|
|
1061
1099
|
column;
|
|
1062
1100
|
rows;
|
|
@@ -1071,7 +1109,7 @@ var Ge = class {
|
|
|
1071
1109
|
}
|
|
1072
1110
|
_value = q(() => {
|
|
1073
1111
|
let e = this.column.aggregate;
|
|
1074
|
-
return e ?
|
|
1112
|
+
return e ? et(e, this.values, this.rows) : null;
|
|
1075
1113
|
});
|
|
1076
1114
|
get value() {
|
|
1077
1115
|
let e = this.given?.();
|
|
@@ -1086,7 +1124,7 @@ var Ge = class {
|
|
|
1086
1124
|
get isLast() {
|
|
1087
1125
|
return !1;
|
|
1088
1126
|
}
|
|
1089
|
-
},
|
|
1127
|
+
}, rt = class {
|
|
1090
1128
|
grid;
|
|
1091
1129
|
row;
|
|
1092
1130
|
column;
|
|
@@ -1108,7 +1146,7 @@ var Ge = class {
|
|
|
1108
1146
|
get cellKind() {
|
|
1109
1147
|
return this.column.isGrouping ? "grouping" : this.column.isRowSelection ? this.row.selectable ? "selection" : "spacer" : this.row.spans(this.column) ? "hidden" : this.column.aggregate ? "aggregate" : "spacer";
|
|
1110
1148
|
}
|
|
1111
|
-
_aggregate = q(() => this.column.aggregate ? new
|
|
1149
|
+
_aggregate = q(() => this.column.aggregate ? new nt(this.grid, this.column, this.row.allRows.map((e) => e.data), "group", () => this.row.aggregateValue(this.column)) : null);
|
|
1112
1150
|
get aggregate() {
|
|
1113
1151
|
return this._aggregate.value;
|
|
1114
1152
|
}
|
|
@@ -1127,7 +1165,7 @@ var Ge = class {
|
|
|
1127
1165
|
get hasGroupingBorder() {
|
|
1128
1166
|
return this.row.groupingColumn.pin === "START";
|
|
1129
1167
|
}
|
|
1130
|
-
},
|
|
1168
|
+
}, it = class {
|
|
1131
1169
|
grid;
|
|
1132
1170
|
groupColumn;
|
|
1133
1171
|
rows;
|
|
@@ -1161,7 +1199,7 @@ var Ge = class {
|
|
|
1161
1199
|
let e = this.grid.columns.value.visibleLeafs;
|
|
1162
1200
|
return this._cells?.leafs !== e && (this._cells = {
|
|
1163
1201
|
leafs: e,
|
|
1164
|
-
cells: e.map((e) => new
|
|
1202
|
+
cells: e.map((e) => new rt(this.grid, this, e))
|
|
1165
1203
|
}), this._cells;
|
|
1166
1204
|
}
|
|
1167
1205
|
get renderedCells() {
|
|
@@ -1192,7 +1230,7 @@ var Ge = class {
|
|
|
1192
1230
|
return this.parentRow ? this.parentRow.depth + 1 : 0;
|
|
1193
1231
|
}
|
|
1194
1232
|
get count() {
|
|
1195
|
-
return
|
|
1233
|
+
return G.sumBy(this.rows, (e) => e.count, 0);
|
|
1196
1234
|
}
|
|
1197
1235
|
get flatRows() {
|
|
1198
1236
|
return this.expanded ? [this, ...this.rows.flatMap((e) => e.flatRows)] : [this];
|
|
@@ -1201,7 +1239,7 @@ var Ge = class {
|
|
|
1201
1239
|
return this.rows.flatMap((e) => e.allRows);
|
|
1202
1240
|
}
|
|
1203
1241
|
get groupingColumn() {
|
|
1204
|
-
return
|
|
1242
|
+
return G.findOrThrow(this.grid.columns.value.leafs, (e) => e.key === K);
|
|
1205
1243
|
}
|
|
1206
1244
|
get groupingColumnGridColumn() {
|
|
1207
1245
|
return this.grid.groupingSpan.value.length;
|
|
@@ -1219,12 +1257,12 @@ var Ge = class {
|
|
|
1219
1257
|
};
|
|
1220
1258
|
//#endregion
|
|
1221
1259
|
//#region src/components/dataGrid/components/dataGridDetailRow.tsx
|
|
1222
|
-
function
|
|
1223
|
-
let { row: t, index: n } = e, { grid: a, parentRow: o } = t, s = a.props.def.rowDetail, c =
|
|
1260
|
+
function at(e) {
|
|
1261
|
+
let { row: t, index: n } = e, { grid: a, parentRow: o } = t, s = a.props.def.rowDetail, c = z(), l = (c?.headerRowCount ?? 0) + n, { ref: u, tabIndex: d, onFocus: f } = ve(c, l, 0), p = t.isAutoHeight, m = N(null);
|
|
1224
1262
|
return r(() => {
|
|
1225
|
-
a.takeDetailReveal(o.key) &&
|
|
1226
|
-
}), /* @__PURE__ */
|
|
1227
|
-
ref:
|
|
1263
|
+
a.takeDetailReveal(o.key) && m.current?.scrollIntoView?.({ block: "nearest" });
|
|
1264
|
+
}), /* @__PURE__ */ I(h, {
|
|
1265
|
+
ref: m,
|
|
1228
1266
|
component: `${a.componentName}.body.detailRow`,
|
|
1229
1267
|
transition: "none",
|
|
1230
1268
|
props: {
|
|
@@ -1235,7 +1273,7 @@ function Ye(e) {
|
|
|
1235
1273
|
gridColumn: "1 / -1",
|
|
1236
1274
|
height: p ? "auto" : `${t.height}px`
|
|
1237
1275
|
},
|
|
1238
|
-
children: /* @__PURE__ */
|
|
1276
|
+
children: /* @__PURE__ */ I(i, {
|
|
1239
1277
|
ref: u,
|
|
1240
1278
|
component: `${a.componentName}.body.detailRow.content`,
|
|
1241
1279
|
position: "sticky",
|
|
@@ -1255,15 +1293,15 @@ function Ye(e) {
|
|
|
1255
1293
|
})
|
|
1256
1294
|
});
|
|
1257
1295
|
}
|
|
1258
|
-
|
|
1259
|
-
var
|
|
1296
|
+
at.displayName = "DataGridDetailRow";
|
|
1297
|
+
var ot = D(at);
|
|
1260
1298
|
//#endregion
|
|
1261
1299
|
//#region src/components/dataGrid/components/dataGridAggregateValue.tsx
|
|
1262
|
-
function
|
|
1300
|
+
function st(e) {
|
|
1263
1301
|
let { cell: t } = e, { column: n } = t;
|
|
1264
|
-
if (n.AggregateCell) return /* @__PURE__ */
|
|
1302
|
+
if (n.AggregateCell) return /* @__PURE__ */ I(n.AggregateCell, { cell: t });
|
|
1265
1303
|
let r = t.scope === "footer" ? "footer.cell" : "body.groupRow.aggregate";
|
|
1266
|
-
return /* @__PURE__ */
|
|
1304
|
+
return /* @__PURE__ */ I(i, {
|
|
1267
1305
|
component: `${n.grid.componentName}.${r}`,
|
|
1268
1306
|
px: 3,
|
|
1269
1307
|
textOverflow: "ellipsis",
|
|
@@ -1272,12 +1310,12 @@ function Ze(e) {
|
|
|
1272
1310
|
children: t.value
|
|
1273
1311
|
});
|
|
1274
1312
|
}
|
|
1275
|
-
|
|
1313
|
+
st.displayName = "DataGridAggregateValue";
|
|
1276
1314
|
//#endregion
|
|
1277
1315
|
//#region src/components/dataGrid/components/dataGridCell.tsx
|
|
1278
|
-
var
|
|
1316
|
+
var ct = "button,a[href],input,select,textarea";
|
|
1279
1317
|
function J(e) {
|
|
1280
|
-
let { children: t, cell: r, row: i, columnIndex: a, ariaColIndex: o, ariaColSpan: s, style: c, ...l } = e, { column: u } = r, d =
|
|
1318
|
+
let { children: t, cell: r, row: i, columnIndex: a, ariaColIndex: o, ariaColSpan: s, style: c, ...l } = e, { column: u } = r, d = z(), { ref: f, tabIndex: p, onFocus: m } = ve(d, i, a), { range: g } = u.grid, _ = r instanceof V ? i - (d?.headerRowCount ?? 0) : -1, v = _ >= 0 && g.isCurrent(_, a), y = _ >= 0 && g.isSelected(_, a);
|
|
1281
1319
|
u.hasAlign && (l.jc = u.align);
|
|
1282
1320
|
let b = r.isExpanded ? {
|
|
1283
1321
|
...u.cellVariant.value,
|
|
@@ -1290,8 +1328,8 @@ function J(e) {
|
|
|
1290
1328
|
isInRange: y && !v,
|
|
1291
1329
|
isCurrentCell: v
|
|
1292
1330
|
});
|
|
1293
|
-
let x = r instanceof
|
|
1294
|
-
r instanceof
|
|
1331
|
+
let x = r instanceof V && !r.editing && r.rejected;
|
|
1332
|
+
r instanceof V && r.editing ? b = {
|
|
1295
1333
|
...b,
|
|
1296
1334
|
isEditing: !0,
|
|
1297
1335
|
isInvalid: !!r.error
|
|
@@ -1299,14 +1337,14 @@ function J(e) {
|
|
|
1299
1337
|
...b,
|
|
1300
1338
|
isInvalid: !0
|
|
1301
1339
|
});
|
|
1302
|
-
let S = r instanceof
|
|
1303
|
-
e.target.closest(
|
|
1340
|
+
let S = r instanceof V ? (e) => {
|
|
1341
|
+
e.target.closest(ct) || (n(e.currentTarget), r.beginEdit());
|
|
1304
1342
|
} : void 0, C = g.enabled && _ >= 0, w = C ? (e) => {
|
|
1305
|
-
e.button === 0 && e.pointerType !== "touch" && (e.target.closest(
|
|
1343
|
+
e.button === 0 && e.pointerType !== "touch" && (e.target.closest(ct) || g.press(_, a, e.shiftKey));
|
|
1306
1344
|
} : void 0, T = C && g.isDragging ? (e) => {
|
|
1307
1345
|
g.dragTo(_, a), e.currentTarget.focus();
|
|
1308
1346
|
} : void 0;
|
|
1309
|
-
return /* @__PURE__ */
|
|
1347
|
+
return /* @__PURE__ */ I(h, {
|
|
1310
1348
|
ref: f,
|
|
1311
1349
|
component: `${u.grid.componentName}.body.cell`,
|
|
1312
1350
|
props: {
|
|
@@ -1316,7 +1354,7 @@ function J(e) {
|
|
|
1316
1354
|
"aria-selected": y || void 0,
|
|
1317
1355
|
"aria-invalid": x || void 0,
|
|
1318
1356
|
tabIndex: p,
|
|
1319
|
-
onFocus:
|
|
1357
|
+
onFocus: m,
|
|
1320
1358
|
onDoubleClick: S,
|
|
1321
1359
|
onPointerDown: w,
|
|
1322
1360
|
onPointerEnter: T
|
|
@@ -1333,25 +1371,25 @@ function J(e) {
|
|
|
1333
1371
|
J.displayName = "DataGridCell";
|
|
1334
1372
|
//#endregion
|
|
1335
1373
|
//#region src/components/dataGrid/components/dataGridFooter.tsx
|
|
1336
|
-
function
|
|
1337
|
-
let { grid: t } = e, { aggregation: n } = t, r =
|
|
1374
|
+
function lt(e) {
|
|
1375
|
+
let { grid: t } = e, { aggregation: n } = t, r = z();
|
|
1338
1376
|
if (!n.hasFooter) return null;
|
|
1339
1377
|
let a = (r?.rowCount ?? 1) - 1, { footerLabelColumn: o, footerLabel: s } = n;
|
|
1340
|
-
return /* @__PURE__ */
|
|
1378
|
+
return /* @__PURE__ */ I(x, {
|
|
1341
1379
|
component: `${t.componentName}.footer`,
|
|
1342
1380
|
props: { role: "rowgroup" },
|
|
1343
1381
|
style: { gridTemplateColumns: t.gridTemplateColumns.value },
|
|
1344
|
-
children: /* @__PURE__ */
|
|
1382
|
+
children: /* @__PURE__ */ I(i, {
|
|
1345
1383
|
display: "contents",
|
|
1346
1384
|
props: {
|
|
1347
1385
|
role: "row",
|
|
1348
1386
|
"aria-rowindex": a + 1
|
|
1349
1387
|
},
|
|
1350
|
-
children: n.footerCells.value.map((e, n) => /* @__PURE__ */
|
|
1388
|
+
children: n.footerCells.value.map((e, n) => /* @__PURE__ */ I(J, {
|
|
1351
1389
|
cell: e,
|
|
1352
1390
|
row: a,
|
|
1353
1391
|
columnIndex: n,
|
|
1354
|
-
children: e.column.aggregate ? /* @__PURE__ */
|
|
1392
|
+
children: e.column.aggregate ? /* @__PURE__ */ I(st, { cell: e }) : e.column === o ? /* @__PURE__ */ I(i, {
|
|
1355
1393
|
component: `${t.componentName}.footer.label`,
|
|
1356
1394
|
px: 3,
|
|
1357
1395
|
textWrap: "nowrap",
|
|
@@ -1361,16 +1399,16 @@ function $e(e) {
|
|
|
1361
1399
|
})
|
|
1362
1400
|
});
|
|
1363
1401
|
}
|
|
1364
|
-
|
|
1402
|
+
lt.displayName = "DataGridFooter";
|
|
1365
1403
|
//#endregion
|
|
1366
1404
|
//#region src/icons/expandIcon.tsx
|
|
1367
1405
|
function Y(e) {
|
|
1368
|
-
return /* @__PURE__ */
|
|
1406
|
+
return /* @__PURE__ */ I(f, {
|
|
1369
1407
|
viewBox: "4 2 16 18",
|
|
1370
1408
|
width: "1rem",
|
|
1371
1409
|
fill: "currentColor",
|
|
1372
1410
|
...e,
|
|
1373
|
-
children: /* @__PURE__ */
|
|
1411
|
+
children: /* @__PURE__ */ I(d, {
|
|
1374
1412
|
fillRule: "evenodd",
|
|
1375
1413
|
d: "M12.707 14.707a1 1 0 0 1-1.414 0l-5-5a1 1 0 0 1 1.414-1.414L12 12.586l4.293-4.293a1 1 0 1 1 1.414 1.414l-5 5Z",
|
|
1376
1414
|
props: { clipRule: "evenodd" }
|
|
@@ -1379,32 +1417,32 @@ function Y(e) {
|
|
|
1379
1417
|
}
|
|
1380
1418
|
//#endregion
|
|
1381
1419
|
//#region src/components/dataGrid/components/dataGridCellPlaceholder.tsx
|
|
1382
|
-
var
|
|
1420
|
+
var ut = [
|
|
1383
1421
|
"3/5",
|
|
1384
1422
|
"2/5",
|
|
1385
1423
|
"4/5",
|
|
1386
1424
|
"1/2",
|
|
1387
1425
|
"7/12"
|
|
1388
1426
|
];
|
|
1389
|
-
function
|
|
1390
|
-
let { cell: t, columnIndex: n } = e, r =
|
|
1391
|
-
return /* @__PURE__ */
|
|
1427
|
+
function dt(e) {
|
|
1428
|
+
let { cell: t, columnIndex: n } = e, r = ut[(t.row.rowIndex + n) % ut.length];
|
|
1429
|
+
return /* @__PURE__ */ I(h, {
|
|
1392
1430
|
component: `${t.grid.componentName}.body.cell.placeholder`,
|
|
1393
1431
|
ai: "center",
|
|
1394
1432
|
px: 3,
|
|
1395
1433
|
props: { "aria-hidden": !0 },
|
|
1396
|
-
children: /* @__PURE__ */
|
|
1434
|
+
children: /* @__PURE__ */ I(i, {
|
|
1397
1435
|
component: `${t.grid.componentName}.body.cell.placeholder.bar`,
|
|
1398
1436
|
width: r
|
|
1399
1437
|
})
|
|
1400
1438
|
});
|
|
1401
1439
|
}
|
|
1402
|
-
|
|
1440
|
+
dt.displayName = "DataGridCellPlaceholder";
|
|
1403
1441
|
//#endregion
|
|
1404
1442
|
//#region src/components/dataGrid/components/dataGridGroupRow.tsx
|
|
1405
|
-
function
|
|
1406
|
-
let { row: t, index: n } = e, { selected: r, indeterminate: a, expanded: o, placeholder: s } = t, c = (
|
|
1407
|
-
return /* @__PURE__ */
|
|
1443
|
+
function ft(e) {
|
|
1444
|
+
let { row: t, index: n } = e, { selected: r, indeterminate: a, expanded: o, placeholder: s } = t, c = (z()?.headerRowCount ?? 0) + n, l = O(() => t.toggleSelectAll(), [t]);
|
|
1445
|
+
return /* @__PURE__ */ I(h, {
|
|
1408
1446
|
component: `${t.grid.componentName}.body.groupRow`,
|
|
1409
1447
|
className: "grid-row",
|
|
1410
1448
|
selected: t.grid.props.def.rowSelection ? r : void 0,
|
|
@@ -1417,7 +1455,7 @@ function nt(e) {
|
|
|
1417
1455
|
},
|
|
1418
1456
|
children: t.renderedCells.map(({ cell: e, columnIndex: n }, u) => {
|
|
1419
1457
|
switch (e.cellKind) {
|
|
1420
|
-
case "grouping": return /* @__PURE__ */
|
|
1458
|
+
case "grouping": return /* @__PURE__ */ I(J, {
|
|
1421
1459
|
cell: e,
|
|
1422
1460
|
row: c,
|
|
1423
1461
|
columnIndex: u,
|
|
@@ -1431,13 +1469,13 @@ function nt(e) {
|
|
|
1431
1469
|
gridColumn: e.gridColumnSpan,
|
|
1432
1470
|
ps: e.depthPadding,
|
|
1433
1471
|
overflow: "auto",
|
|
1434
|
-
children: s ? /* @__PURE__ */
|
|
1472
|
+
children: s ? /* @__PURE__ */ I(dt, {
|
|
1435
1473
|
cell: e,
|
|
1436
1474
|
columnIndex: u
|
|
1437
|
-
}) : /* @__PURE__ */
|
|
1475
|
+
}) : /* @__PURE__ */ I(i, {
|
|
1438
1476
|
textWrap: "nowrap",
|
|
1439
1477
|
px: 3,
|
|
1440
|
-
children: /* @__PURE__ */
|
|
1478
|
+
children: /* @__PURE__ */ L(p, {
|
|
1441
1479
|
component: `${t.grid.componentName}.body.groupRow.expandButton`,
|
|
1442
1480
|
onClick: () => t.toggleRow(),
|
|
1443
1481
|
cursor: "pointer",
|
|
@@ -1448,7 +1486,7 @@ function nt(e) {
|
|
|
1448
1486
|
tabIndex: -1,
|
|
1449
1487
|
"aria-expanded": o
|
|
1450
1488
|
},
|
|
1451
|
-
children: [/* @__PURE__ */
|
|
1489
|
+
children: [/* @__PURE__ */ I(Y, {
|
|
1452
1490
|
fill: "currentColor",
|
|
1453
1491
|
width: "14px",
|
|
1454
1492
|
height: "14px",
|
|
@@ -1457,12 +1495,12 @@ function nt(e) {
|
|
|
1457
1495
|
})
|
|
1458
1496
|
})
|
|
1459
1497
|
}, e.column.key);
|
|
1460
|
-
case "selection": return /* @__PURE__ */
|
|
1498
|
+
case "selection": return /* @__PURE__ */ I(J, {
|
|
1461
1499
|
cell: e,
|
|
1462
1500
|
row: c,
|
|
1463
1501
|
columnIndex: u,
|
|
1464
1502
|
ariaColIndex: n + 1,
|
|
1465
|
-
children: /* @__PURE__ */
|
|
1503
|
+
children: /* @__PURE__ */ I(g, {
|
|
1466
1504
|
variant: "datagrid",
|
|
1467
1505
|
m: 1,
|
|
1468
1506
|
checked: r,
|
|
@@ -1474,14 +1512,14 @@ function nt(e) {
|
|
|
1474
1512
|
}
|
|
1475
1513
|
})
|
|
1476
1514
|
}, e.column.key);
|
|
1477
|
-
case "aggregate": return /* @__PURE__ */
|
|
1515
|
+
case "aggregate": return /* @__PURE__ */ I(J, {
|
|
1478
1516
|
cell: e,
|
|
1479
1517
|
row: c,
|
|
1480
1518
|
columnIndex: u,
|
|
1481
1519
|
ariaColIndex: n + 1,
|
|
1482
|
-
children: e.aggregate && /* @__PURE__ */
|
|
1520
|
+
children: e.aggregate && /* @__PURE__ */ I(st, { cell: e.aggregate })
|
|
1483
1521
|
}, e.column.key);
|
|
1484
|
-
case "spacer": return /* @__PURE__ */
|
|
1522
|
+
case "spacer": return /* @__PURE__ */ I(J, {
|
|
1485
1523
|
cell: e,
|
|
1486
1524
|
row: c,
|
|
1487
1525
|
columnIndex: u,
|
|
@@ -1494,16 +1532,16 @@ function nt(e) {
|
|
|
1494
1532
|
})
|
|
1495
1533
|
});
|
|
1496
1534
|
}
|
|
1497
|
-
|
|
1498
|
-
var
|
|
1499
|
-
function
|
|
1535
|
+
ft.displayName = "DataGridGroupRow";
|
|
1536
|
+
var pt = D(ft), mt = "input:not([type=\"hidden\"]),select,textarea,button,[role=\"spinbutton\"]";
|
|
1537
|
+
function ht(e) {
|
|
1500
1538
|
let { options: t } = e.editor;
|
|
1501
1539
|
return typeof t == "function" ? t(e.row.data) : t ?? [];
|
|
1502
1540
|
}
|
|
1503
|
-
function
|
|
1504
|
-
let { cell: t, row: n, columnIndex: i } = e, { grid: a } = t, o =
|
|
1541
|
+
function gt(e) {
|
|
1542
|
+
let { cell: t, row: n, columnIndex: i } = e, { grid: a } = t, o = z(), s = N(null), c = u("datagrid-cell-error"), { error: l, pending: d } = t;
|
|
1505
1543
|
r(() => {
|
|
1506
|
-
let e = s.current?.querySelector(
|
|
1544
|
+
let e = s.current?.querySelector(mt);
|
|
1507
1545
|
e?.focus(), e instanceof HTMLInputElement && e.type !== "checkbox" && e.select();
|
|
1508
1546
|
}, []);
|
|
1509
1547
|
let f = O(() => {
|
|
@@ -1517,7 +1555,7 @@ function ot(e) {
|
|
|
1517
1555
|
a,
|
|
1518
1556
|
o,
|
|
1519
1557
|
n
|
|
1520
|
-
]),
|
|
1558
|
+
]), m = O((e) => {
|
|
1521
1559
|
if (e.key === "Escape") {
|
|
1522
1560
|
if (s.current?.querySelector("[aria-expanded=\"true\"]")) return;
|
|
1523
1561
|
e.preventDefault(), e.stopPropagation(), t.cancelEdit(), f();
|
|
@@ -1538,23 +1576,23 @@ function ot(e) {
|
|
|
1538
1576
|
t,
|
|
1539
1577
|
f,
|
|
1540
1578
|
p
|
|
1541
|
-
]),
|
|
1579
|
+
]), g = O(() => {
|
|
1542
1580
|
!t.editing || t.pending || t.commitEdit();
|
|
1543
1581
|
}, [t]);
|
|
1544
|
-
return /* @__PURE__ */
|
|
1582
|
+
return /* @__PURE__ */ L(h, {
|
|
1545
1583
|
ref: s,
|
|
1546
1584
|
component: `${a.componentName}.body.cell.editor`,
|
|
1547
1585
|
variant: { isPending: d },
|
|
1548
|
-
props: { onKeyDown:
|
|
1586
|
+
props: { onKeyDown: m },
|
|
1549
1587
|
width: "fit",
|
|
1550
1588
|
height: "fit",
|
|
1551
1589
|
ai: "center",
|
|
1552
|
-
children: [/* @__PURE__ */
|
|
1590
|
+
children: [/* @__PURE__ */ I(_t, {
|
|
1553
1591
|
cell: t,
|
|
1554
1592
|
errorId: l ? c : void 0,
|
|
1555
|
-
onBlur:
|
|
1593
|
+
onBlur: g,
|
|
1556
1594
|
onCommitted: f
|
|
1557
|
-
}), l && /* @__PURE__ */
|
|
1595
|
+
}), l && /* @__PURE__ */ I(_, {
|
|
1558
1596
|
anchor: s,
|
|
1559
1597
|
side: "bottom",
|
|
1560
1598
|
align: "start",
|
|
@@ -1567,14 +1605,14 @@ function ot(e) {
|
|
|
1567
1605
|
})]
|
|
1568
1606
|
});
|
|
1569
1607
|
}
|
|
1570
|
-
function
|
|
1608
|
+
function _t(e) {
|
|
1571
1609
|
let { cell: t, errorId: n, onBlur: r, onCommitted: i } = e, { EditCell: a } = t.column.def, { type: o, placeholder: s, step: c, min: l, max: u } = t.editor, d = t.column.header ?? t.column.key, f = {
|
|
1572
1610
|
"aria-label": t.grid.localeText.editCell(String(d)),
|
|
1573
1611
|
"aria-invalid": n ? !0 : void 0,
|
|
1574
1612
|
"aria-describedby": n
|
|
1575
|
-
};
|
|
1576
|
-
if (a) return /* @__PURE__ */
|
|
1577
|
-
if (o === "checkbox") return /* @__PURE__ */
|
|
1613
|
+
}, p = Te(Me(o));
|
|
1614
|
+
if (a) return /* @__PURE__ */ I(a, { cell: t });
|
|
1615
|
+
if (o === "checkbox") return /* @__PURE__ */ I(g, {
|
|
1578
1616
|
checked: !!t.draft,
|
|
1579
1617
|
onChange: (e) => {
|
|
1580
1618
|
t.setDraft(e.target.checked), t.commitEdit(), i();
|
|
@@ -1584,7 +1622,7 @@ function st(e) {
|
|
|
1584
1622
|
onBlur: r
|
|
1585
1623
|
}
|
|
1586
1624
|
});
|
|
1587
|
-
if (o === "select") return /* @__PURE__ */
|
|
1625
|
+
if (o === "select") return /* @__PURE__ */ I(S, {
|
|
1588
1626
|
value: t.draft,
|
|
1589
1627
|
defaultOpen: !0,
|
|
1590
1628
|
width: "fit",
|
|
@@ -1596,14 +1634,20 @@ function st(e) {
|
|
|
1596
1634
|
t.setDraft(e ?? null), t.commitEdit(), i();
|
|
1597
1635
|
},
|
|
1598
1636
|
props: f,
|
|
1599
|
-
children:
|
|
1637
|
+
children: ht(t).map((e) => /* @__PURE__ */ I(S.Item, {
|
|
1600
1638
|
value: e.value,
|
|
1601
1639
|
children: e.label ?? String(e.value)
|
|
1602
1640
|
}, String(e.value)))
|
|
1603
1641
|
});
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1642
|
+
if (Me(o)) return p ? /* @__PURE__ */ I(p.DateEditor, {
|
|
1643
|
+
cell: t,
|
|
1644
|
+
label: f["aria-label"],
|
|
1645
|
+
errorId: n,
|
|
1646
|
+
onBlur: r
|
|
1647
|
+
}) : null;
|
|
1648
|
+
let m = o === "number";
|
|
1649
|
+
return /* @__PURE__ */ I(y, {
|
|
1650
|
+
type: m ? "number" : "text",
|
|
1607
1651
|
value: t.draft === null || t.draft === void 0 ? "" : String(t.draft),
|
|
1608
1652
|
placeholder: s,
|
|
1609
1653
|
step: c,
|
|
@@ -1614,7 +1658,7 @@ function st(e) {
|
|
|
1614
1658
|
focus: { outline: 0 },
|
|
1615
1659
|
onChange: (e) => {
|
|
1616
1660
|
let n = e.target.value;
|
|
1617
|
-
t.setDraft(
|
|
1661
|
+
t.setDraft(m ? n === "" ? null : Number(n) : n);
|
|
1618
1662
|
},
|
|
1619
1663
|
props: {
|
|
1620
1664
|
...f,
|
|
@@ -1624,39 +1668,84 @@ function st(e) {
|
|
|
1624
1668
|
}
|
|
1625
1669
|
});
|
|
1626
1670
|
}
|
|
1627
|
-
|
|
1671
|
+
gt.displayName = "DataGridCellEditor";
|
|
1672
|
+
//#endregion
|
|
1673
|
+
//#region src/components/dataGrid/components/dataGridBooleanValue.tsx
|
|
1674
|
+
function vt(e) {
|
|
1675
|
+
let { value: t, text: n } = e;
|
|
1676
|
+
return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(f, {
|
|
1677
|
+
viewBox: "0 0 16 16",
|
|
1678
|
+
width: "1rem",
|
|
1679
|
+
height: "1rem",
|
|
1680
|
+
css: { verticalAlign: "middle" },
|
|
1681
|
+
color: t ? void 0 : "base-400",
|
|
1682
|
+
props: { fill: "none" },
|
|
1683
|
+
children: /* @__PURE__ */ I(d, {
|
|
1684
|
+
d: t ? "m3.5 8.5 3 3 6-7" : "m5 5 6 6m0-6-6 6",
|
|
1685
|
+
stroke: "currentColor",
|
|
1686
|
+
strokeWidth: 1.75,
|
|
1687
|
+
strokeLinecap: "round",
|
|
1688
|
+
strokeLinejoin: "round"
|
|
1689
|
+
})
|
|
1690
|
+
}), /* @__PURE__ */ I(m, {
|
|
1691
|
+
tag: "span",
|
|
1692
|
+
children: t ? n.booleanTrue : n.booleanFalse
|
|
1693
|
+
})] });
|
|
1694
|
+
}
|
|
1695
|
+
vt.displayName = "DataGridBooleanValue";
|
|
1696
|
+
//#endregion
|
|
1697
|
+
//#region src/components/dataGrid/components/dataGridDateValue.tsx
|
|
1698
|
+
function yt(e, t) {
|
|
1699
|
+
if (e.def.dateFormat) return e.def.dateFormat;
|
|
1700
|
+
let { editor: n } = e.def, r = typeof n == "object" ? n.type : n;
|
|
1701
|
+
return r && Me(r) ? r : t instanceof Date ? "datetime" : null;
|
|
1702
|
+
}
|
|
1703
|
+
function bt(e) {
|
|
1704
|
+
let { value: t, format: n } = e, r = Te(!0);
|
|
1705
|
+
return r ? /* @__PURE__ */ I(r.DateValue, {
|
|
1706
|
+
value: t,
|
|
1707
|
+
format: n
|
|
1708
|
+
}) : /* @__PURE__ */ I(F, { children: t instanceof Date ? t.toISOString() : t == null ? "" : String(t) });
|
|
1709
|
+
}
|
|
1710
|
+
bt.displayName = "DataGridDateValue";
|
|
1628
1711
|
//#endregion
|
|
1629
1712
|
//#region src/components/dataGrid/components/dataGridCellText.tsx
|
|
1630
|
-
function
|
|
1631
|
-
let { cell: t } = e;
|
|
1632
|
-
return /* @__PURE__ */
|
|
1713
|
+
function xt(e) {
|
|
1714
|
+
let { cell: t } = e, { value: n } = t, r = yt(t.column, n);
|
|
1715
|
+
return /* @__PURE__ */ I(h, {
|
|
1633
1716
|
component: `${t.grid.componentName}.body.cell.text`,
|
|
1634
1717
|
height: "fit",
|
|
1635
1718
|
width: "fit",
|
|
1636
1719
|
overflow: "auto",
|
|
1637
1720
|
ai: "center",
|
|
1638
1721
|
jc: t.column.align,
|
|
1639
|
-
children: /* @__PURE__ */
|
|
1722
|
+
children: /* @__PURE__ */ I(i, {
|
|
1640
1723
|
px: 3,
|
|
1641
1724
|
textOverflow: "ellipsis",
|
|
1642
1725
|
overflow: "hidden",
|
|
1643
1726
|
textWrap: "nowrap",
|
|
1644
|
-
children:
|
|
1727
|
+
children: typeof n == "boolean" ? /* @__PURE__ */ I(vt, {
|
|
1728
|
+
value: n,
|
|
1729
|
+
text: t.grid.localeText
|
|
1730
|
+
}) : r ? /* @__PURE__ */ I(bt, {
|
|
1731
|
+
value: n,
|
|
1732
|
+
format: r
|
|
1733
|
+
}) : n
|
|
1645
1734
|
})
|
|
1646
1735
|
});
|
|
1647
1736
|
}
|
|
1648
|
-
|
|
1737
|
+
xt.displayName = "DataGridCellText";
|
|
1649
1738
|
//#endregion
|
|
1650
1739
|
//#region src/components/dataGrid/components/dataGridCellTree.tsx
|
|
1651
|
-
function
|
|
1740
|
+
function St(e) {
|
|
1652
1741
|
let { cell: t, row: n, children: r } = e, { hasChildren: a, treeExpanded: o, level: s } = n, c = n.grid.componentName, l = O((e) => {
|
|
1653
1742
|
e.stopPropagation(), n.toggleTree();
|
|
1654
1743
|
}, [n]), u = t.value == null || t.value === "" ? t.grid.localeText.unnamedRow(n.rowIndex + 1) : String(t.value);
|
|
1655
|
-
return /* @__PURE__ */
|
|
1744
|
+
return /* @__PURE__ */ L(h, {
|
|
1656
1745
|
component: `${c}.body.cell.tree`,
|
|
1657
1746
|
ai: "center",
|
|
1658
1747
|
ps: s * n.grid.tree.indent,
|
|
1659
|
-
children: [a ? /* @__PURE__ */
|
|
1748
|
+
children: [a ? /* @__PURE__ */ I(p, {
|
|
1660
1749
|
component: `${c}.body.cell.tree.toggle`,
|
|
1661
1750
|
variant: { isExpanded: o },
|
|
1662
1751
|
type: "button",
|
|
@@ -1669,13 +1758,13 @@ function lt(e) {
|
|
|
1669
1758
|
tabIndex: -1,
|
|
1670
1759
|
"aria-label": (o ? t.grid.localeText.collapseTreeRow : t.grid.localeText.expandTreeRow)(u)
|
|
1671
1760
|
},
|
|
1672
|
-
children: /* @__PURE__ */
|
|
1761
|
+
children: /* @__PURE__ */ I(Y, {
|
|
1673
1762
|
fill: "currentColor",
|
|
1674
1763
|
width: "14px",
|
|
1675
1764
|
height: "14px",
|
|
1676
1765
|
rotate: o ? 0 : -90
|
|
1677
1766
|
})
|
|
1678
|
-
}) : /* @__PURE__ */
|
|
1767
|
+
}) : /* @__PURE__ */ I(i, { component: `${c}.body.cell.tree.spacer` }), /* @__PURE__ */ I(i, {
|
|
1679
1768
|
textOverflow: "ellipsis",
|
|
1680
1769
|
overflow: "hidden",
|
|
1681
1770
|
textWrap: "nowrap",
|
|
@@ -1684,29 +1773,29 @@ function lt(e) {
|
|
|
1684
1773
|
})]
|
|
1685
1774
|
});
|
|
1686
1775
|
}
|
|
1687
|
-
|
|
1776
|
+
St.displayName = "DataGridCellTree";
|
|
1688
1777
|
//#endregion
|
|
1689
1778
|
//#region src/components/dataGrid/components/dataGridRow.tsx
|
|
1690
|
-
function
|
|
1691
|
-
let { row: t, index: n } = e, { selected: r, expandOnRowClick: i } = t, a = (
|
|
1779
|
+
function Ct(e) {
|
|
1780
|
+
let { row: t, index: n } = e, { selected: r, expandOnRowClick: i } = t, a = (z()?.headerRowCount ?? 0) + n, o = W(t) ? t : void 0, s = o && t.grid.tree.columnKey, c = O(() => {
|
|
1692
1781
|
t.toggleDetail();
|
|
1693
1782
|
}, [t]), l = (e, n) => {
|
|
1694
|
-
if (e.editing) return /* @__PURE__ */
|
|
1783
|
+
if (e.editing) return /* @__PURE__ */ I(gt, {
|
|
1695
1784
|
cell: e,
|
|
1696
1785
|
row: a,
|
|
1697
1786
|
columnIndex: n
|
|
1698
1787
|
});
|
|
1699
|
-
let r = t.placeholder && !e.column.isRowNumber ? /* @__PURE__ */
|
|
1788
|
+
let r = t.placeholder && !e.column.isRowNumber ? /* @__PURE__ */ I(dt, {
|
|
1700
1789
|
cell: e,
|
|
1701
1790
|
columnIndex: n
|
|
1702
|
-
}) : e.column.Cell ? /* @__PURE__ */
|
|
1703
|
-
return !o || e.column.key !== s ? r : /* @__PURE__ */
|
|
1791
|
+
}) : e.column.Cell ? /* @__PURE__ */ I(e.column.Cell, { cell: e }) : /* @__PURE__ */ I(xt, { cell: e });
|
|
1792
|
+
return !o || e.column.key !== s ? r : /* @__PURE__ */ I(St, {
|
|
1704
1793
|
cell: e,
|
|
1705
1794
|
row: o,
|
|
1706
1795
|
children: r
|
|
1707
1796
|
});
|
|
1708
1797
|
};
|
|
1709
|
-
return /* @__PURE__ */
|
|
1798
|
+
return /* @__PURE__ */ I(h, {
|
|
1710
1799
|
component: `${t.grid.componentName}.body.row`,
|
|
1711
1800
|
className: "grid-row",
|
|
1712
1801
|
selected: t.grid.props.def.rowSelection ? r : void 0,
|
|
@@ -1722,7 +1811,7 @@ function ut(e) {
|
|
|
1722
1811
|
onClick: i ? c : void 0
|
|
1723
1812
|
},
|
|
1724
1813
|
cursor: i ? "pointer" : void 0,
|
|
1725
|
-
children: t.cells.map((e, t) => /* @__PURE__ */
|
|
1814
|
+
children: t.cells.map((e, t) => /* @__PURE__ */ I(J, {
|
|
1726
1815
|
cell: e,
|
|
1727
1816
|
row: a,
|
|
1728
1817
|
columnIndex: t,
|
|
@@ -1730,27 +1819,27 @@ function ut(e) {
|
|
|
1730
1819
|
}, e.column.key))
|
|
1731
1820
|
});
|
|
1732
1821
|
}
|
|
1733
|
-
|
|
1734
|
-
var
|
|
1822
|
+
Ct.displayName = "DataGridRow";
|
|
1823
|
+
var wt = D(Ct);
|
|
1735
1824
|
//#endregion
|
|
1736
1825
|
//#region src/components/dataGrid/components/dataGridBody.tsx
|
|
1737
|
-
function
|
|
1738
|
-
return e instanceof
|
|
1826
|
+
function Tt(e, t, n) {
|
|
1827
|
+
return e instanceof H ? /* @__PURE__ */ I(ot, {
|
|
1739
1828
|
row: e,
|
|
1740
1829
|
index: t,
|
|
1741
1830
|
version: n
|
|
1742
|
-
}, e.key) : e instanceof
|
|
1831
|
+
}, e.key) : e instanceof it ? /* @__PURE__ */ I(pt, {
|
|
1743
1832
|
row: e,
|
|
1744
1833
|
index: t,
|
|
1745
1834
|
version: n
|
|
1746
|
-
}, e.key) : /* @__PURE__ */
|
|
1835
|
+
}, e.key) : /* @__PURE__ */ I(wt, {
|
|
1747
1836
|
row: e,
|
|
1748
1837
|
index: t,
|
|
1749
1838
|
version: n
|
|
1750
1839
|
}, e.key);
|
|
1751
1840
|
}
|
|
1752
|
-
function
|
|
1753
|
-
let { grid: t, scroll: n } = e, { viewport: r } = t, { startIndex: a, take: o, translateY: s, totalHeight: c, viewHeight: l } = r.window(n.top, n.direction), u = r.showAll, d = r.isEmpty, f = t.flatRows.value, p = t.getSnapshot(),
|
|
1841
|
+
function Et(e) {
|
|
1842
|
+
let { grid: t, scroll: n } = e, { viewport: r } = t, { startIndex: a, take: o, translateY: s, totalHeight: c, viewHeight: l } = r.window(n.top, n.direction), u = r.showAll, d = r.isEmpty, f = t.flatRows.value, p = t.getSnapshot(), m = M(() => d ? null : G.take(f, o, a).map((e, n) => Tt(e, a + n, t.rowVersion(e, a + n))), [
|
|
1754
1843
|
f,
|
|
1755
1844
|
t,
|
|
1756
1845
|
d,
|
|
@@ -1760,7 +1849,7 @@ function pt(e) {
|
|
|
1760
1849
|
]);
|
|
1761
1850
|
if (d) {
|
|
1762
1851
|
let { noDataComponent: e } = t.props.def, n = t.props.loading ? t.localeText.loadingRows : t.localeText.noRows;
|
|
1763
|
-
return /* @__PURE__ */
|
|
1852
|
+
return /* @__PURE__ */ I(h, {
|
|
1764
1853
|
component: `${t.componentName}.body.empty`,
|
|
1765
1854
|
jc: "center",
|
|
1766
1855
|
ai: "center",
|
|
@@ -1769,14 +1858,14 @@ function pt(e) {
|
|
|
1769
1858
|
insetStart: 0,
|
|
1770
1859
|
props: { role: "row" },
|
|
1771
1860
|
style: { height: r.emptyHeight },
|
|
1772
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ I(i, {
|
|
1773
1862
|
display: "contents",
|
|
1774
1863
|
props: { role: "gridcell" },
|
|
1775
1864
|
children: e ?? n
|
|
1776
1865
|
})
|
|
1777
1866
|
});
|
|
1778
1867
|
}
|
|
1779
|
-
return u ? /* @__PURE__ */
|
|
1868
|
+
return u ? /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(x, {
|
|
1780
1869
|
component: `${t.componentName}.body`,
|
|
1781
1870
|
width: "max-content",
|
|
1782
1871
|
minWidth: "fit",
|
|
@@ -1784,14 +1873,14 @@ function pt(e) {
|
|
|
1784
1873
|
userSelect: t.range.enabled ? "none" : void 0,
|
|
1785
1874
|
props: { role: "rowgroup" },
|
|
1786
1875
|
style: { gridTemplateColumns: t.gridTemplateColumns.value },
|
|
1787
|
-
children:
|
|
1788
|
-
}), /* @__PURE__ */
|
|
1876
|
+
children: m
|
|
1877
|
+
}), /* @__PURE__ */ I(lt, { grid: t })] }) : /* @__PURE__ */ L(i, {
|
|
1789
1878
|
props: { role: "presentation" },
|
|
1790
1879
|
style: { height: l },
|
|
1791
|
-
children: [/* @__PURE__ */
|
|
1880
|
+
children: [/* @__PURE__ */ I(i, {
|
|
1792
1881
|
props: { role: "presentation" },
|
|
1793
1882
|
style: { height: `${c}px` },
|
|
1794
|
-
children: /* @__PURE__ */
|
|
1883
|
+
children: /* @__PURE__ */ I(x, {
|
|
1795
1884
|
component: `${t.componentName}.body`,
|
|
1796
1885
|
width: "max-content",
|
|
1797
1886
|
minWidth: "fit",
|
|
@@ -1803,17 +1892,17 @@ function pt(e) {
|
|
|
1803
1892
|
willChange: "transform",
|
|
1804
1893
|
gridTemplateColumns: t.gridTemplateColumns.value
|
|
1805
1894
|
},
|
|
1806
|
-
children:
|
|
1895
|
+
children: m
|
|
1807
1896
|
})
|
|
1808
|
-
}), /* @__PURE__ */
|
|
1897
|
+
}), /* @__PURE__ */ I(lt, { grid: t })]
|
|
1809
1898
|
});
|
|
1810
1899
|
}
|
|
1811
|
-
|
|
1900
|
+
Et.displayName = "DataGridBody";
|
|
1812
1901
|
//#endregion
|
|
1813
1902
|
//#region src/components/dataGrid/components/dataGridEmptyColumns.tsx
|
|
1814
|
-
function
|
|
1903
|
+
function Dt(e) {
|
|
1815
1904
|
let { grid: t } = e;
|
|
1816
|
-
return /* @__PURE__ */
|
|
1905
|
+
return /* @__PURE__ */ I(h, {
|
|
1817
1906
|
component: `${t.componentName}.emptyColumns`,
|
|
1818
1907
|
d: "column",
|
|
1819
1908
|
ai: "center",
|
|
@@ -1821,49 +1910,49 @@ function mt(e) {
|
|
|
1821
1910
|
gap: 4,
|
|
1822
1911
|
py: 16,
|
|
1823
1912
|
px: 6,
|
|
1824
|
-
bgColor: "
|
|
1913
|
+
bgColor: "base-50",
|
|
1825
1914
|
borderRadius: 4,
|
|
1826
|
-
theme: { dark: { bgColor: "
|
|
1827
|
-
children: /* @__PURE__ */
|
|
1915
|
+
theme: { dark: { bgColor: "base-900" } },
|
|
1916
|
+
children: /* @__PURE__ */ L(h, {
|
|
1828
1917
|
d: "column",
|
|
1829
1918
|
ai: "center",
|
|
1830
1919
|
gap: 3,
|
|
1831
|
-
children: [/* @__PURE__ */
|
|
1920
|
+
children: [/* @__PURE__ */ I(i, {
|
|
1832
1921
|
width: 16,
|
|
1833
1922
|
height: 16,
|
|
1834
1923
|
borderRadius: 999,
|
|
1835
|
-
bgColor: "
|
|
1836
|
-
theme: { dark: { bgColor: "
|
|
1924
|
+
bgColor: "base-200",
|
|
1925
|
+
theme: { dark: { bgColor: "base-700" } },
|
|
1837
1926
|
display: "flex",
|
|
1838
1927
|
ai: "center",
|
|
1839
1928
|
jc: "center",
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1929
|
+
children: /* @__PURE__ */ I(f, {
|
|
1841
1930
|
viewBox: "0 0 24 24",
|
|
1842
1931
|
width: "40",
|
|
1843
1932
|
fill: "currentColor",
|
|
1844
|
-
color: "
|
|
1845
|
-
theme: { dark: { color: "
|
|
1846
|
-
children: /* @__PURE__ */
|
|
1933
|
+
color: "base-400",
|
|
1934
|
+
theme: { dark: { color: "base-500" } },
|
|
1935
|
+
children: /* @__PURE__ */ I(d, {
|
|
1847
1936
|
fillRule: "evenodd",
|
|
1848
1937
|
props: { clipRule: "evenodd" },
|
|
1849
1938
|
d: "M3 6a3 3 0 013-3h12a3 3 0 013 3v12a3 3 0 01-3 3H6a3 3 0 01-3-3V6zm3-1a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1V6a1 1 0 00-1-1H6zm2 3a1 1 0 011-1h6a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h6a1 1 0 110 2H9a1 1 0 01-1-1zm0 4a1 1 0 011-1h4a1 1 0 110 2H9a1 1 0 01-1-1z"
|
|
1850
1939
|
})
|
|
1851
1940
|
})
|
|
1852
|
-
}), /* @__PURE__ */
|
|
1941
|
+
}), /* @__PURE__ */ L(h, {
|
|
1853
1942
|
d: "column",
|
|
1854
1943
|
ai: "center",
|
|
1855
1944
|
gap: 1,
|
|
1856
|
-
children: [/* @__PURE__ */
|
|
1945
|
+
children: [/* @__PURE__ */ I(i, {
|
|
1857
1946
|
fontSize: 18,
|
|
1858
1947
|
fontWeight: 600,
|
|
1859
|
-
color: "
|
|
1860
|
-
theme: { dark: { color: "
|
|
1948
|
+
color: "base-900",
|
|
1949
|
+
theme: { dark: { color: "base-50" } },
|
|
1861
1950
|
children: t.localeText.noColumnsTitle
|
|
1862
|
-
}), /* @__PURE__ */
|
|
1951
|
+
}), /* @__PURE__ */ I(i, {
|
|
1863
1952
|
fontSize: 14,
|
|
1864
|
-
color: "
|
|
1953
|
+
color: "base-500",
|
|
1865
1954
|
textAlign: "center",
|
|
1866
|
-
theme: { dark: { color: "
|
|
1955
|
+
theme: { dark: { color: "base-400" } },
|
|
1867
1956
|
children: t.localeText.noColumnsDescription
|
|
1868
1957
|
})]
|
|
1869
1958
|
})]
|
|
@@ -1872,7 +1961,7 @@ function mt(e) {
|
|
|
1872
1961
|
}
|
|
1873
1962
|
//#endregion
|
|
1874
1963
|
//#region src/utils/dataGrid/headerCellUtils.ts
|
|
1875
|
-
var
|
|
1964
|
+
var Ot;
|
|
1876
1965
|
(function(e) {
|
|
1877
1966
|
let t = e.CELL_SELECTOR = "[role=\"columnheader\"][aria-sort]", n = ".resizer", r = `button, input, a, [role="menu"], [role="separator"], ${n}`;
|
|
1878
1967
|
function i(e, t) {
|
|
@@ -1947,8 +2036,8 @@ var ht;
|
|
|
1947
2036
|
} : e;
|
|
1948
2037
|
}
|
|
1949
2038
|
e.pause = u;
|
|
1950
|
-
})(
|
|
1951
|
-
var X =
|
|
2039
|
+
})(Ot ||= {});
|
|
2040
|
+
var X = Ot, kt;
|
|
1952
2041
|
(function(e) {
|
|
1953
2042
|
function t(e, t) {
|
|
1954
2043
|
return (t?.type === "text" ? t.value : "") === (e.trim() ? e : "");
|
|
@@ -1975,16 +2064,16 @@ var X = ht, gt;
|
|
|
1975
2064
|
return t.valueTo === void 0 ? isNaN(r) : t.valueTo === r;
|
|
1976
2065
|
}
|
|
1977
2066
|
e.numberMatches = r;
|
|
1978
|
-
})(
|
|
1979
|
-
var Z =
|
|
1980
|
-
function
|
|
2067
|
+
})(kt ||= {});
|
|
2068
|
+
var Z = kt, At = 300;
|
|
2069
|
+
function jt(e, t, n) {
|
|
1981
2070
|
let i = N(/* @__PURE__ */ new Map()), o = O(() => {
|
|
1982
2071
|
for (let e of i.current.values()) clearTimeout(e);
|
|
1983
2072
|
i.current.clear();
|
|
1984
2073
|
}, []), s = O((e, t) => {
|
|
1985
2074
|
clearTimeout(i.current.get(e)), i.current.set(e, setTimeout(() => {
|
|
1986
2075
|
i.current.delete(e), t();
|
|
1987
|
-
},
|
|
2076
|
+
}, At));
|
|
1988
2077
|
}, []);
|
|
1989
2078
|
A(() => o, [o]);
|
|
1990
2079
|
let c = a(() => {
|
|
@@ -1997,9 +2086,9 @@ function vt(e, t, n) {
|
|
|
1997
2086
|
}
|
|
1998
2087
|
//#endregion
|
|
1999
2088
|
//#region src/components/dataGrid/components/dataGridColumnFilter.tsx
|
|
2000
|
-
function
|
|
2089
|
+
function Mt(e) {
|
|
2001
2090
|
let { label: t, onClear: n } = e;
|
|
2002
|
-
return /* @__PURE__ */
|
|
2091
|
+
return /* @__PURE__ */ I(p, {
|
|
2003
2092
|
clean: !0,
|
|
2004
2093
|
type: "button",
|
|
2005
2094
|
position: "absolute",
|
|
@@ -2014,24 +2103,24 @@ function yt(e) {
|
|
|
2014
2103
|
tabIndex: -1,
|
|
2015
2104
|
"aria-label": t
|
|
2016
2105
|
},
|
|
2017
|
-
children: /* @__PURE__ */
|
|
2106
|
+
children: /* @__PURE__ */ I(i, {
|
|
2018
2107
|
fontSize: 10,
|
|
2019
|
-
color: "
|
|
2020
|
-
hover: { color: "
|
|
2108
|
+
color: "base-400",
|
|
2109
|
+
hover: { color: "base-600" },
|
|
2021
2110
|
children: "✕"
|
|
2022
2111
|
})
|
|
2023
2112
|
});
|
|
2024
2113
|
}
|
|
2025
|
-
function
|
|
2026
|
-
let { currentFilter: t } = e, { componentName: n } = e.grid, r = String(e.header ?? e.key), i = e.grid.localeText, [a, o] = P(t?.type === "text" ? t.value : ""), { debounce: s, cancel: c } =
|
|
2114
|
+
function Nt({ column: e }) {
|
|
2115
|
+
let { currentFilter: t } = e, { componentName: n } = e.grid, r = String(e.header ?? e.key), i = e.grid.localeText, [a, o] = P(t?.type === "text" ? t.value : ""), { debounce: s, cancel: c } = jt(t, (e) => Z.textMatches(a, e), (e) => o(e?.type === "text" ? e.value : "")), l = O((t) => {
|
|
2027
2116
|
let n = t.target.value;
|
|
2028
2117
|
o(n), s("value", () => e.setTextFilter(n));
|
|
2029
2118
|
}, [e, s]), u = O(() => {
|
|
2030
2119
|
c(), o(""), e.clearFilter();
|
|
2031
2120
|
}, [e, c]);
|
|
2032
|
-
return /* @__PURE__ */
|
|
2121
|
+
return /* @__PURE__ */ L(h, {
|
|
2033
2122
|
component: `${n}.filter.cell.input`,
|
|
2034
|
-
children: [/* @__PURE__ */
|
|
2123
|
+
children: [/* @__PURE__ */ I(y, {
|
|
2035
2124
|
width: "fit",
|
|
2036
2125
|
variant: "compact",
|
|
2037
2126
|
placeholder: e.filterConfig?.placeholder ?? i.filterPlaceholder,
|
|
@@ -2044,16 +2133,16 @@ function bt({ column: e }) {
|
|
|
2044
2133
|
tabIndex: -1,
|
|
2045
2134
|
"aria-label": i.filterColumn(r)
|
|
2046
2135
|
}
|
|
2047
|
-
}), a && /* @__PURE__ */
|
|
2136
|
+
}), a && /* @__PURE__ */ I(Mt, {
|
|
2048
2137
|
label: i.clearFilter(r),
|
|
2049
2138
|
onClear: u
|
|
2050
2139
|
})]
|
|
2051
2140
|
});
|
|
2052
2141
|
}
|
|
2053
|
-
function
|
|
2142
|
+
function Pt({ column: e }) {
|
|
2054
2143
|
let { currentFilter: t } = e, { componentName: n } = e.grid, r = String(e.header ?? e.key), i = e.grid.localeText, [a, o] = P(() => Z.numberDraft(t)), s = N(a), c = O((e) => {
|
|
2055
2144
|
s.current = e, o(e);
|
|
2056
|
-
}, []), { debounce: l, cancel: u } =
|
|
2145
|
+
}, []), { debounce: l, cancel: u } = jt(t, (e) => Z.numberMatches(a, e), (e) => c(Z.numberDraft(e))), { operator: d, value: f, valueTo: p } = a, m = e.filterConfig, g = O(() => {
|
|
2057
2146
|
let { operator: t, value: n, valueTo: r } = s.current;
|
|
2058
2147
|
e.setNumberFilter(t, n, r);
|
|
2059
2148
|
}, [e]), _ = O((e, t) => {
|
|
@@ -2073,11 +2162,11 @@ function xt({ column: e }) {
|
|
|
2073
2162
|
u,
|
|
2074
2163
|
c
|
|
2075
2164
|
]);
|
|
2076
|
-
return /* @__PURE__ */
|
|
2165
|
+
return /* @__PURE__ */ L(h, {
|
|
2077
2166
|
component: `${n}.filter.cell.input`,
|
|
2078
2167
|
ai: d === "between" ? "start" : "center",
|
|
2079
2168
|
gap: 1,
|
|
2080
|
-
children: [/* @__PURE__ */
|
|
2169
|
+
children: [/* @__PURE__ */ L(S, {
|
|
2081
2170
|
value: d,
|
|
2082
2171
|
variant: "compact",
|
|
2083
2172
|
onChange: (e) => e && x(e),
|
|
@@ -2091,51 +2180,51 @@ function xt({ column: e }) {
|
|
|
2091
2180
|
"aria-label": i.filterComparison(r)
|
|
2092
2181
|
},
|
|
2093
2182
|
children: [
|
|
2094
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2095
2184
|
value: "eq",
|
|
2096
2185
|
children: "="
|
|
2097
2186
|
}),
|
|
2098
|
-
/* @__PURE__ */
|
|
2187
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2099
2188
|
value: "ne",
|
|
2100
2189
|
children: "≠"
|
|
2101
2190
|
}),
|
|
2102
|
-
/* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2103
2192
|
value: "gt",
|
|
2104
2193
|
children: ">"
|
|
2105
2194
|
}),
|
|
2106
|
-
/* @__PURE__ */
|
|
2195
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2107
2196
|
value: "gte",
|
|
2108
2197
|
children: "≥"
|
|
2109
2198
|
}),
|
|
2110
|
-
/* @__PURE__ */
|
|
2199
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2111
2200
|
value: "lt",
|
|
2112
2201
|
children: "<"
|
|
2113
2202
|
}),
|
|
2114
|
-
/* @__PURE__ */
|
|
2203
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2115
2204
|
value: "lte",
|
|
2116
2205
|
children: "≤"
|
|
2117
2206
|
}),
|
|
2118
|
-
/* @__PURE__ */
|
|
2207
|
+
/* @__PURE__ */ I(S.Item, {
|
|
2119
2208
|
value: "between",
|
|
2120
2209
|
children: "↔"
|
|
2121
2210
|
})
|
|
2122
2211
|
]
|
|
2123
|
-
}), d === "between" ? /* @__PURE__ */
|
|
2212
|
+
}), d === "between" ? /* @__PURE__ */ L(h, {
|
|
2124
2213
|
d: "column",
|
|
2125
2214
|
gap: 1,
|
|
2126
2215
|
flex1: !0,
|
|
2127
|
-
children: [/* @__PURE__ */
|
|
2216
|
+
children: [/* @__PURE__ */ L(h, {
|
|
2128
2217
|
ai: "center",
|
|
2129
2218
|
position: "relative",
|
|
2130
2219
|
flex1: !0,
|
|
2131
|
-
children: [/* @__PURE__ */
|
|
2220
|
+
children: [/* @__PURE__ */ I(y, {
|
|
2132
2221
|
type: "number",
|
|
2133
2222
|
variant: "compact",
|
|
2134
|
-
placeholder:
|
|
2223
|
+
placeholder: m?.placeholder ?? i.filterFromPlaceholder,
|
|
2135
2224
|
value: f,
|
|
2136
2225
|
onChange: v,
|
|
2137
2226
|
width: "fit",
|
|
2138
|
-
step:
|
|
2227
|
+
step: m?.step,
|
|
2139
2228
|
b: 0,
|
|
2140
2229
|
bgColor: "transparent",
|
|
2141
2230
|
focus: { outline: 0 },
|
|
@@ -2143,21 +2232,21 @@ function xt({ column: e }) {
|
|
|
2143
2232
|
tabIndex: -1,
|
|
2144
2233
|
"aria-label": i.filterFrom(r)
|
|
2145
2234
|
}
|
|
2146
|
-
}), (f !== "" || p !== "") && /* @__PURE__ */
|
|
2235
|
+
}), (f !== "" || p !== "") && /* @__PURE__ */ I(Mt, {
|
|
2147
2236
|
label: i.clearFilter(r),
|
|
2148
2237
|
onClear: C
|
|
2149
2238
|
})]
|
|
2150
|
-
}), /* @__PURE__ */
|
|
2239
|
+
}), /* @__PURE__ */ I(h, {
|
|
2151
2240
|
ai: "center",
|
|
2152
2241
|
flex1: !0,
|
|
2153
|
-
children: /* @__PURE__ */
|
|
2242
|
+
children: /* @__PURE__ */ I(y, {
|
|
2154
2243
|
type: "number",
|
|
2155
2244
|
variant: "compact",
|
|
2156
2245
|
placeholder: i.filterToPlaceholder,
|
|
2157
2246
|
value: p,
|
|
2158
2247
|
onChange: b,
|
|
2159
2248
|
width: "fit",
|
|
2160
|
-
step:
|
|
2249
|
+
step: m?.step,
|
|
2161
2250
|
b: 0,
|
|
2162
2251
|
bgColor: "transparent",
|
|
2163
2252
|
focus: { outline: 0 },
|
|
@@ -2167,18 +2256,18 @@ function xt({ column: e }) {
|
|
|
2167
2256
|
}
|
|
2168
2257
|
})
|
|
2169
2258
|
})]
|
|
2170
|
-
}) : /* @__PURE__ */
|
|
2259
|
+
}) : /* @__PURE__ */ L(h, {
|
|
2171
2260
|
ai: "center",
|
|
2172
2261
|
position: "relative",
|
|
2173
2262
|
flex1: !0,
|
|
2174
|
-
children: [/* @__PURE__ */
|
|
2263
|
+
children: [/* @__PURE__ */ I(y, {
|
|
2175
2264
|
type: "number",
|
|
2176
2265
|
variant: "compact",
|
|
2177
|
-
placeholder:
|
|
2266
|
+
placeholder: m?.placeholder ?? i.filterValuePlaceholder,
|
|
2178
2267
|
value: f,
|
|
2179
2268
|
onChange: v,
|
|
2180
2269
|
width: "fit",
|
|
2181
|
-
step:
|
|
2270
|
+
step: m?.step,
|
|
2182
2271
|
b: 0,
|
|
2183
2272
|
bgColor: "transparent",
|
|
2184
2273
|
focus: { outline: 0 },
|
|
@@ -2186,20 +2275,24 @@ function xt({ column: e }) {
|
|
|
2186
2275
|
tabIndex: -1,
|
|
2187
2276
|
"aria-label": i.filterColumn(r)
|
|
2188
2277
|
}
|
|
2189
|
-
}), f !== "" && /* @__PURE__ */
|
|
2278
|
+
}), f !== "" && /* @__PURE__ */ I(Mt, {
|
|
2190
2279
|
label: i.clearFilter(r),
|
|
2191
2280
|
onClear: C
|
|
2192
2281
|
})]
|
|
2193
2282
|
})]
|
|
2194
2283
|
});
|
|
2195
2284
|
}
|
|
2196
|
-
function
|
|
2285
|
+
function Ft({ column: e }) {
|
|
2286
|
+
let t = Te(!0);
|
|
2287
|
+
return t ? /* @__PURE__ */ I(t.DateFilter, { column: e }) : null;
|
|
2288
|
+
}
|
|
2289
|
+
function It({ column: e }) {
|
|
2197
2290
|
let { currentFilter: t } = e, { componentName: n } = e.grid, r = String(e.header ?? e.key), a = e.grid.localeText, o = t?.type === "multiselect" ? t.values : [], s = e.filterOptions, c = O((t, n) => {
|
|
2198
2291
|
e.setMultiselectFilter(n);
|
|
2199
2292
|
}, [e]);
|
|
2200
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ I(h, {
|
|
2201
2294
|
component: `${n}.filter.cell.input`,
|
|
2202
|
-
children: /* @__PURE__ */
|
|
2295
|
+
children: /* @__PURE__ */ L(S, {
|
|
2203
2296
|
multiple: !0,
|
|
2204
2297
|
showCheckbox: !0,
|
|
2205
2298
|
isSearchable: !0,
|
|
@@ -2217,14 +2310,14 @@ function St({ column: e }) {
|
|
|
2217
2310
|
"aria-label": a.filterColumn(r)
|
|
2218
2311
|
},
|
|
2219
2312
|
children: [
|
|
2220
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ I(S.Display, { children: (t) => t.length === 0 ? /* @__PURE__ */ I(i, {
|
|
2221
2314
|
tag: "span",
|
|
2222
|
-
color: "
|
|
2315
|
+
color: "base-400",
|
|
2223
2316
|
children: e.filterConfig?.placeholder ?? a.filterSelectPlaceholder
|
|
2224
2317
|
}) : t.length === 1 ? s.find((e) => e.value === t[0])?.label ?? String(t[0]) : `${t.length} selected` }),
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
s.map((e) => /* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ I(S.Unselect, { children: a.filterSelectClear }),
|
|
2319
|
+
/* @__PURE__ */ I(S.SelectAll, { children: a.filterSelectAll }),
|
|
2320
|
+
s.map((e) => /* @__PURE__ */ I(S.Item, {
|
|
2228
2321
|
value: e.value,
|
|
2229
2322
|
ai: "center",
|
|
2230
2323
|
gap: 2,
|
|
@@ -2234,21 +2327,22 @@ function St({ column: e }) {
|
|
|
2234
2327
|
})
|
|
2235
2328
|
});
|
|
2236
2329
|
}
|
|
2237
|
-
function
|
|
2330
|
+
function Lt(e) {
|
|
2238
2331
|
let { column: t } = e, n = t.filterConfig;
|
|
2239
2332
|
if (!n) return null;
|
|
2240
2333
|
switch (n.type) {
|
|
2241
|
-
case "number": return /* @__PURE__ */
|
|
2242
|
-
case "multiselect": return /* @__PURE__ */
|
|
2243
|
-
|
|
2334
|
+
case "number": return /* @__PURE__ */ I(Pt, { column: t });
|
|
2335
|
+
case "multiselect": return /* @__PURE__ */ I(It, { column: t });
|
|
2336
|
+
case "date": return /* @__PURE__ */ I(Ft, { column: t });
|
|
2337
|
+
default: return /* @__PURE__ */ I(Nt, { column: t });
|
|
2244
2338
|
}
|
|
2245
2339
|
}
|
|
2246
|
-
|
|
2340
|
+
Lt.displayName = "DataGridColumnFilter";
|
|
2247
2341
|
//#endregion
|
|
2248
2342
|
//#region src/components/dataGrid/components/dataGridFilterCell.tsx
|
|
2249
|
-
function
|
|
2250
|
-
let { column: t, grid: n, row: r, columnIndex: i } = e, { widthVarName: a, inlineStartVarName: o, inlineEndVarName: s, filterable: c } = t, { isStartPinned: l, isEndPinned: u, isPinned: d, isFirstStartPinned: f, isLastStartPinned: p, isFirstEndPinned:
|
|
2251
|
-
return /* @__PURE__ */
|
|
2343
|
+
function Rt(e) {
|
|
2344
|
+
let { column: t, grid: n, row: r, columnIndex: i } = e, { widthVarName: a, inlineStartVarName: o, inlineEndVarName: s, filterable: c } = t, { isStartPinned: l, isEndPinned: u, isPinned: d, isFirstStartPinned: f, isLastStartPinned: p, isFirstEndPinned: m, isLastEndPinned: g } = t.pinFlags.value, { ref: _, tabIndex: v, onFocus: y } = ve(z(), r, i), b = t.isGrouping || t.isRowNumber || t.isRowSelection;
|
|
2345
|
+
return /* @__PURE__ */ I(h, {
|
|
2252
2346
|
ref: _,
|
|
2253
2347
|
component: `${n.componentName}.filter.cell`,
|
|
2254
2348
|
props: {
|
|
@@ -2261,7 +2355,7 @@ function wt(e) {
|
|
|
2261
2355
|
isPinned: d,
|
|
2262
2356
|
isFirstStartPinned: f,
|
|
2263
2357
|
isLastStartPinned: p,
|
|
2264
|
-
isFirstEndPinned:
|
|
2358
|
+
isFirstEndPinned: m,
|
|
2265
2359
|
isLastEndPinned: g
|
|
2266
2360
|
},
|
|
2267
2361
|
px: 2,
|
|
@@ -2270,23 +2364,23 @@ function wt(e) {
|
|
|
2270
2364
|
insetInlineStart: l ? `var(${o})` : void 0,
|
|
2271
2365
|
insetInlineEnd: u ? `var(${s})` : void 0
|
|
2272
2366
|
},
|
|
2273
|
-
children: !b && c && /* @__PURE__ */
|
|
2367
|
+
children: !b && c && /* @__PURE__ */ I(Lt, { column: t })
|
|
2274
2368
|
});
|
|
2275
2369
|
}
|
|
2276
|
-
|
|
2370
|
+
Rt.displayName = "DataGridFilterCell";
|
|
2277
2371
|
//#endregion
|
|
2278
2372
|
//#region src/components/dataGrid/components/dataGridFilterRow.tsx
|
|
2279
|
-
function
|
|
2373
|
+
function zt(e) {
|
|
2280
2374
|
let { grid: t } = e;
|
|
2281
2375
|
if (!t.filter.hasFilterableColumns) return null;
|
|
2282
2376
|
let n = t.headerRows.value.length;
|
|
2283
|
-
return /* @__PURE__ */
|
|
2377
|
+
return /* @__PURE__ */ I(i, {
|
|
2284
2378
|
display: "contents",
|
|
2285
2379
|
props: {
|
|
2286
2380
|
role: "row",
|
|
2287
2381
|
"aria-rowindex": n + 1
|
|
2288
2382
|
},
|
|
2289
|
-
children: t.columns.value.visibleLeafs.map((e, r) => /* @__PURE__ */
|
|
2383
|
+
children: t.columns.value.visibleLeafs.map((e, r) => /* @__PURE__ */ I(Rt, {
|
|
2290
2384
|
column: e,
|
|
2291
2385
|
grid: t,
|
|
2292
2386
|
row: n,
|
|
@@ -2294,25 +2388,25 @@ function Tt(e) {
|
|
|
2294
2388
|
}, e.uniqueKey))
|
|
2295
2389
|
});
|
|
2296
2390
|
}
|
|
2297
|
-
|
|
2391
|
+
zt.displayName = "DataGridFilterRow";
|
|
2298
2392
|
//#endregion
|
|
2299
2393
|
//#region src/icons/sortIcon.tsx
|
|
2300
|
-
function
|
|
2301
|
-
return /* @__PURE__ */
|
|
2394
|
+
function Bt(e) {
|
|
2395
|
+
return /* @__PURE__ */ I(f, {
|
|
2302
2396
|
viewBox: "0 0 24 24",
|
|
2303
2397
|
width: "1.5rem",
|
|
2304
2398
|
...e,
|
|
2305
|
-
children: /* @__PURE__ */
|
|
2399
|
+
children: /* @__PURE__ */ I(d, { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" })
|
|
2306
2400
|
});
|
|
2307
2401
|
}
|
|
2308
2402
|
//#endregion
|
|
2309
2403
|
//#region src/icons/dotsIcon.tsx
|
|
2310
|
-
function
|
|
2311
|
-
return /* @__PURE__ */
|
|
2404
|
+
function Vt(e) {
|
|
2405
|
+
return /* @__PURE__ */ I(f, {
|
|
2312
2406
|
viewBox: "0 0 16 16",
|
|
2313
2407
|
width: "18",
|
|
2314
2408
|
...e,
|
|
2315
|
-
children: /* @__PURE__ */
|
|
2409
|
+
children: /* @__PURE__ */ I(d, {
|
|
2316
2410
|
strokeWidth: 4,
|
|
2317
2411
|
d: "M7.936 12.128a.936.936 0 1 1 0 1.872.936.936 0 0 1 0-1.872ZM7.936 7.052a.936.936 0 1 1 0 1.873.936.936 0 0 1 0-1.873ZM7.936 1.977a.936.936 0 1 1 0 1.872.936.936 0 0 1 0-1.872Z"
|
|
2318
2412
|
})
|
|
@@ -2320,75 +2414,75 @@ function Dt(e) {
|
|
|
2320
2414
|
}
|
|
2321
2415
|
//#endregion
|
|
2322
2416
|
//#region src/icons/groupingIcon.tsx
|
|
2323
|
-
function
|
|
2324
|
-
return /* @__PURE__ */
|
|
2417
|
+
function Ht(e) {
|
|
2418
|
+
return /* @__PURE__ */ I(f, {
|
|
2325
2419
|
viewBox: "0 0 24 24",
|
|
2326
2420
|
width: "1.5rem",
|
|
2327
2421
|
...e,
|
|
2328
|
-
children: /* @__PURE__ */
|
|
2422
|
+
children: /* @__PURE__ */ I(d, { d: "M3 5h8v2H3V5zm0 6h8v2H3v-2zm0 6h8v2H3v-2zm12-12h6v6h-6V5zm1 1v4h4V6h-4zm-1 7h6v6h-6v-6zm1 1v4h4v-4h-4z" })
|
|
2329
2423
|
});
|
|
2330
2424
|
}
|
|
2331
2425
|
//#endregion
|
|
2332
2426
|
//#region src/icons/pinIcon.tsx
|
|
2333
|
-
function
|
|
2334
|
-
return /* @__PURE__ */
|
|
2427
|
+
function Ut(e) {
|
|
2428
|
+
return /* @__PURE__ */ I(f, {
|
|
2335
2429
|
viewBox: "0 0 1024 1024",
|
|
2336
2430
|
width: "1.5rem",
|
|
2337
2431
|
...e,
|
|
2338
|
-
children: /* @__PURE__ */
|
|
2432
|
+
children: /* @__PURE__ */ I(d, { d: "M31.997 1023.957a31.699 31.699 0 0 1-22.611-9.386C3.328 1008.556 0 1000.493 0 991.96s3.328-16.596 9.386-22.611L328.25 650.484l-152.52-152.52a95.907 95.907 0 0 1-25.087-92.152 95.31 95.31 0 0 1 44.327-58.62l.896-.512a353.464 353.464 0 0 1 176.156-47.398c20.137 0 40.36 1.749 60.283 5.205L597.71 44.54A95.224 95.224 0 0 1 678.685.085c25.64 0 49.745 9.983 67.877 28.073l249.195 249.195a95.224 95.224 0 0 1 25.897 88.74 95.139 95.139 0 0 1-42.152 60.154L719.513 591.695a352.227 352.227 0 0 1-42.663 237.292A95.395 95.395 0 0 1 594 876.514a95.523 95.523 0 0 1-67.963-28.2L373.43 695.706 54.61 1014.614a31.912 31.912 0 0 1-22.612 9.343zm340.025-660.68c-50.64 0-100.685 13.566-144.798 39.207a31.57 31.57 0 0 0-14.676 19.497 31.699 31.699 0 0 0 8.362 30.675L571.344 803.09c6.059 6.059 14.122 9.386 22.697 9.386a31.699 31.699 0 0 0 27.56-15.785 287.421 287.421 0 0 0 31.06-212.676 31.997 31.997 0 0 1 13.907-34.471l278.59-177.266a31.57 31.57 0 0 0 14.037-20.051 31.699 31.699 0 0 0-8.618-29.566l-249.28-249.28a31.912 31.912 0 0 0-49.618 5.418l-177.308 278.59a31.827 31.827 0 0 1-34.472 13.908 293.778 293.778 0 0 0-67.877-8.02z" })
|
|
2339
2433
|
});
|
|
2340
2434
|
}
|
|
2341
2435
|
//#endregion
|
|
2342
2436
|
//#region src/components/dataGrid/components/dataGridHeaderCellContextMenu.tsx
|
|
2343
|
-
function
|
|
2437
|
+
function Wt(e) {
|
|
2344
2438
|
let { side: t, left: n, right: r } = e;
|
|
2345
|
-
return /* @__PURE__ */
|
|
2439
|
+
return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(C, {
|
|
2346
2440
|
rtl: { display: "none" },
|
|
2347
2441
|
children: t === "start" ? n : r
|
|
2348
|
-
}), /* @__PURE__ */
|
|
2442
|
+
}), /* @__PURE__ */ I(C, {
|
|
2349
2443
|
ltr: { display: "none" },
|
|
2350
2444
|
children: t === "start" ? r : n
|
|
2351
2445
|
})] });
|
|
2352
2446
|
}
|
|
2353
|
-
function
|
|
2354
|
-
let { column: t } = e, { grid: n, isEndAligned: a, header: s, key: d } = t, f = t.headerCell,
|
|
2355
|
-
let e = (e) => /* @__PURE__ */
|
|
2447
|
+
function Gt(e) {
|
|
2448
|
+
let { column: t } = e, { grid: n, isEndAligned: a, header: s, key: d } = t, f = t.headerCell, m = String(s ?? d), g = n.localeText, y = u("datagrid-column-menu"), [b, x] = P(!1), S = N(null), w = N(null), T = N(!1), ee = a ? 3 : void 0, ne = a ? void 0 : 3, E = M(() => {
|
|
2449
|
+
let e = (e) => /* @__PURE__ */ I(C, {
|
|
2356
2450
|
component: `${n.componentName}.header.cell.contextMenu.tooltip.item.icon`,
|
|
2357
2451
|
children: e
|
|
2358
|
-
}), r = (t) => e(/* @__PURE__ */
|
|
2452
|
+
}), r = (t) => e(/* @__PURE__ */ I(Bt, {
|
|
2359
2453
|
width: "100%",
|
|
2360
2454
|
fill: "currentColor",
|
|
2361
2455
|
rotate: t
|
|
2362
|
-
})), a = (t, n) => e(/* @__PURE__ */
|
|
2456
|
+
})), a = (t, n) => e(/* @__PURE__ */ I(Ut, {
|
|
2363
2457
|
width: "100%",
|
|
2364
2458
|
fill: "currentColor",
|
|
2365
2459
|
rotate: t,
|
|
2366
2460
|
rtl: { rotate: n }
|
|
2367
|
-
})), o = e(/* @__PURE__ */
|
|
2461
|
+
})), o = e(/* @__PURE__ */ I(Ht, {
|
|
2368
2462
|
width: "100%",
|
|
2369
2463
|
fill: "currentColor"
|
|
2370
|
-
})), s = /* @__PURE__ */
|
|
2464
|
+
})), s = /* @__PURE__ */ I(i, { width: 4 });
|
|
2371
2465
|
return [
|
|
2372
2466
|
[
|
|
2373
2467
|
f.canSortAsc && {
|
|
2374
2468
|
key: "sort-asc",
|
|
2375
2469
|
icon: r(),
|
|
2376
|
-
label:
|
|
2377
|
-
text:
|
|
2470
|
+
label: g.sortAscending,
|
|
2471
|
+
text: g.sortAscending,
|
|
2378
2472
|
run: () => t.sortColumn("ASC")
|
|
2379
2473
|
},
|
|
2380
2474
|
f.canSortDesc && {
|
|
2381
2475
|
key: "sort-desc",
|
|
2382
2476
|
icon: r(180),
|
|
2383
|
-
label:
|
|
2384
|
-
text:
|
|
2477
|
+
label: g.sortDescending,
|
|
2478
|
+
text: g.sortDescending,
|
|
2385
2479
|
run: () => t.sortColumn("DESC")
|
|
2386
2480
|
},
|
|
2387
2481
|
f.canClearSort && {
|
|
2388
2482
|
key: "sort-clear",
|
|
2389
2483
|
icon: s,
|
|
2390
|
-
label:
|
|
2391
|
-
text:
|
|
2484
|
+
label: g.clearSort,
|
|
2485
|
+
text: g.clearSort,
|
|
2392
2486
|
run: () => t.sortColumn(void 0)
|
|
2393
2487
|
}
|
|
2394
2488
|
],
|
|
@@ -2396,50 +2490,50 @@ function jt(e) {
|
|
|
2396
2490
|
f.canPinStart && {
|
|
2397
2491
|
key: "pin-start",
|
|
2398
2492
|
icon: a(0, -90),
|
|
2399
|
-
label: /* @__PURE__ */
|
|
2493
|
+
label: /* @__PURE__ */ I(Wt, {
|
|
2400
2494
|
side: "start",
|
|
2401
|
-
left:
|
|
2402
|
-
right:
|
|
2495
|
+
left: g.pinLeft,
|
|
2496
|
+
right: g.pinRight
|
|
2403
2497
|
}),
|
|
2404
|
-
text:
|
|
2498
|
+
text: g.pinLeft,
|
|
2405
2499
|
run: () => t.pinColumn("START")
|
|
2406
2500
|
},
|
|
2407
2501
|
f.canPinEnd && {
|
|
2408
2502
|
key: "pin-end",
|
|
2409
2503
|
icon: a(-90, 0),
|
|
2410
|
-
label: /* @__PURE__ */
|
|
2504
|
+
label: /* @__PURE__ */ I(Wt, {
|
|
2411
2505
|
side: "end",
|
|
2412
|
-
left:
|
|
2413
|
-
right:
|
|
2506
|
+
left: g.pinLeft,
|
|
2507
|
+
right: g.pinRight
|
|
2414
2508
|
}),
|
|
2415
|
-
text:
|
|
2509
|
+
text: g.pinRight,
|
|
2416
2510
|
run: () => t.pinColumn("END")
|
|
2417
2511
|
},
|
|
2418
2512
|
f.canUnpin && {
|
|
2419
2513
|
key: "unpin",
|
|
2420
2514
|
icon: s,
|
|
2421
|
-
label:
|
|
2422
|
-
text:
|
|
2515
|
+
label: g.unpin,
|
|
2516
|
+
text: g.unpin,
|
|
2423
2517
|
run: () => t.pinColumn()
|
|
2424
2518
|
}
|
|
2425
2519
|
],
|
|
2426
2520
|
[f.canGroupBy && {
|
|
2427
2521
|
key: "group",
|
|
2428
2522
|
icon: o,
|
|
2429
|
-
label: /* @__PURE__ */
|
|
2523
|
+
label: /* @__PURE__ */ I(i, {
|
|
2430
2524
|
textWrap: "nowrap",
|
|
2431
|
-
children:
|
|
2525
|
+
children: g.groupBy(m)
|
|
2432
2526
|
}),
|
|
2433
|
-
text:
|
|
2527
|
+
text: g.groupBy(m),
|
|
2434
2528
|
run: t.toggleGrouping
|
|
2435
2529
|
}, f.canUnGroupAll && {
|
|
2436
2530
|
key: "ungroup",
|
|
2437
2531
|
icon: o,
|
|
2438
|
-
label: /* @__PURE__ */
|
|
2532
|
+
label: /* @__PURE__ */ I(i, {
|
|
2439
2533
|
textWrap: "nowrap",
|
|
2440
|
-
children:
|
|
2534
|
+
children: g.ungroupAll
|
|
2441
2535
|
}),
|
|
2442
|
-
text:
|
|
2536
|
+
text: g.ungroupAll,
|
|
2443
2537
|
run: n.unGroupAll
|
|
2444
2538
|
}]
|
|
2445
2539
|
].map((e) => e.filter((e) => e !== !1)).filter((e) => e.length > 0).flatMap((e, t) => e.map((e, n) => ({
|
|
@@ -2448,10 +2542,10 @@ function jt(e) {
|
|
|
2448
2542
|
})));
|
|
2449
2543
|
}, [
|
|
2450
2544
|
t,
|
|
2451
|
-
|
|
2545
|
+
m,
|
|
2452
2546
|
n,
|
|
2453
2547
|
f,
|
|
2454
|
-
|
|
2548
|
+
g
|
|
2455
2549
|
]), D = O((e = !0) => {
|
|
2456
2550
|
T.current = !1, x(!1), e && S.current?.focus();
|
|
2457
2551
|
}, []), k = l({
|
|
@@ -2476,14 +2570,14 @@ function jt(e) {
|
|
|
2476
2570
|
if (!T.current) return;
|
|
2477
2571
|
let e = j();
|
|
2478
2572
|
e && (T.current = !1, e.focus());
|
|
2479
|
-
}), /* @__PURE__ */
|
|
2573
|
+
}), /* @__PURE__ */ L(h, {
|
|
2480
2574
|
position: "absolute",
|
|
2481
2575
|
insetStart: ee,
|
|
2482
2576
|
insetEnd: ne,
|
|
2483
2577
|
top: "1/2",
|
|
2484
2578
|
translateY: -3,
|
|
2485
2579
|
ai: "center",
|
|
2486
|
-
children: [/* @__PURE__ */
|
|
2580
|
+
children: [/* @__PURE__ */ I(p, {
|
|
2487
2581
|
ref: S,
|
|
2488
2582
|
component: `${n.componentName}.header.cell.contextMenu`,
|
|
2489
2583
|
onClick: () => b ? D(!1) : re(),
|
|
@@ -2491,18 +2585,18 @@ function jt(e) {
|
|
|
2491
2585
|
type: "button",
|
|
2492
2586
|
props: {
|
|
2493
2587
|
tabIndex: -1,
|
|
2494
|
-
"aria-label":
|
|
2588
|
+
"aria-label": g.columnOptions(m),
|
|
2495
2589
|
"aria-haspopup": "menu",
|
|
2496
2590
|
"aria-expanded": b,
|
|
2497
2591
|
"aria-controls": b ? y : void 0
|
|
2498
2592
|
},
|
|
2499
|
-
children: /* @__PURE__ */
|
|
2593
|
+
children: /* @__PURE__ */ I(C, {
|
|
2500
2594
|
component: `${n.componentName}.header.cell.contextMenu.icon`,
|
|
2501
|
-
children: /* @__PURE__ */
|
|
2595
|
+
children: /* @__PURE__ */ I(Vt, { fill: "currentColor" })
|
|
2502
2596
|
})
|
|
2503
|
-
}), /* @__PURE__ */
|
|
2597
|
+
}), /* @__PURE__ */ I(v, {
|
|
2504
2598
|
present: b,
|
|
2505
|
-
children: (e) => /* @__PURE__ */
|
|
2599
|
+
children: (e) => /* @__PURE__ */ I(_, {
|
|
2506
2600
|
component: `${n.componentName}.header.cell.contextMenu.tooltip`,
|
|
2507
2601
|
variant: { closed: !e.present },
|
|
2508
2602
|
ref: w,
|
|
@@ -2514,18 +2608,18 @@ function jt(e) {
|
|
|
2514
2608
|
id: y,
|
|
2515
2609
|
props: {
|
|
2516
2610
|
role: "menu",
|
|
2517
|
-
"aria-label":
|
|
2611
|
+
"aria-label": g.columnOptions(m),
|
|
2518
2612
|
onKeyDown: k.onKeyDown,
|
|
2519
2613
|
...e.props
|
|
2520
2614
|
},
|
|
2521
2615
|
children: E.map((e, t) => {
|
|
2522
2616
|
let { ref: r, tabIndex: a, onFocus: o } = k.itemProps(t);
|
|
2523
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ L(te, { children: [e.startsSection && /* @__PURE__ */ I(i, {
|
|
2524
2618
|
bb: 1,
|
|
2525
2619
|
my: 2,
|
|
2526
|
-
borderColor: "
|
|
2620
|
+
borderColor: "base-300",
|
|
2527
2621
|
component: `${n.componentName}.header.cell.contextMenu.tooltip.item.separator`
|
|
2528
|
-
}), /* @__PURE__ */
|
|
2622
|
+
}), /* @__PURE__ */ L(p, {
|
|
2529
2623
|
component: `${n.componentName}.header.cell.contextMenu.tooltip.item`,
|
|
2530
2624
|
ref: r,
|
|
2531
2625
|
type: "button",
|
|
@@ -2544,20 +2638,20 @@ function jt(e) {
|
|
|
2544
2638
|
})]
|
|
2545
2639
|
});
|
|
2546
2640
|
}
|
|
2547
|
-
|
|
2641
|
+
Gt.displayName = "DataGridHeaderCellContextMenu";
|
|
2548
2642
|
//#endregion
|
|
2549
2643
|
//#region src/components/dataGrid/components/dataGridHeaderCellResizer.tsx
|
|
2550
|
-
var
|
|
2551
|
-
function
|
|
2644
|
+
var Kt = (e) => "touches" in e ? e.touches[0]?.pageX ?? 0 : e.pageX, qt = 16, Jt = 150;
|
|
2645
|
+
function Yt(e) {
|
|
2552
2646
|
let { column: t, controls: n } = e, r = t.grid.resizerStyle, a = t.headerCell, o = O((e) => {
|
|
2553
2647
|
let { grid: n } = t;
|
|
2554
|
-
e.type === "mousedown" && e.preventDefault(), t.beginResize(
|
|
2555
|
-
let r = new AbortController(), { signal: i } = r, a = 0, o =
|
|
2648
|
+
e.type === "mousedown" && e.preventDefault(), t.beginResize(Kt(e.nativeEvent));
|
|
2649
|
+
let r = new AbortController(), { signal: i } = r, a = 0, o = Kt(e.nativeEvent), s = () => {
|
|
2556
2650
|
t.applyResize(o), n.paintSizes();
|
|
2557
2651
|
}, c = n.resizeMode === "instant" ? (e) => {
|
|
2558
|
-
o =
|
|
2652
|
+
o = Kt(e), s();
|
|
2559
2653
|
} : (e) => {
|
|
2560
|
-
o =
|
|
2654
|
+
o = Kt(e), a ||= requestAnimationFrame(() => {
|
|
2561
2655
|
a = 0, s();
|
|
2562
2656
|
});
|
|
2563
2657
|
}, l = () => {
|
|
@@ -2582,7 +2676,7 @@ function Ft(e) {
|
|
|
2582
2676
|
let d = O((e) => {
|
|
2583
2677
|
switch (e.key) {
|
|
2584
2678
|
case "ArrowRight":
|
|
2585
|
-
t.moveResizer(
|
|
2679
|
+
t.moveResizer(qt);
|
|
2586
2680
|
break;
|
|
2587
2681
|
case "ArrowLeft":
|
|
2588
2682
|
t.moveResizer(-16);
|
|
@@ -2595,14 +2689,14 @@ function Ft(e) {
|
|
|
2595
2689
|
break;
|
|
2596
2690
|
default: return;
|
|
2597
2691
|
}
|
|
2598
|
-
e.preventDefault(), l(), clearTimeout(s.current), s.current = setTimeout(u,
|
|
2692
|
+
e.preventDefault(), l(), clearTimeout(s.current), s.current = setTimeout(u, Jt);
|
|
2599
2693
|
}, [
|
|
2600
2694
|
t,
|
|
2601
2695
|
u,
|
|
2602
2696
|
a,
|
|
2603
2697
|
l
|
|
2604
2698
|
]), { isAtGridEnd: f } = a;
|
|
2605
|
-
return /* @__PURE__ */
|
|
2699
|
+
return /* @__PURE__ */ I(h, {
|
|
2606
2700
|
height: "fit",
|
|
2607
2701
|
ai: "center",
|
|
2608
2702
|
position: "absolute",
|
|
@@ -2610,7 +2704,7 @@ function Ft(e) {
|
|
|
2610
2704
|
insetStart: t.pin === "END" ? -.75 : void 0,
|
|
2611
2705
|
zIndex: 1,
|
|
2612
2706
|
py: 3,
|
|
2613
|
-
children: /* @__PURE__ */
|
|
2707
|
+
children: /* @__PURE__ */ I(i, {
|
|
2614
2708
|
cursor: "col-resize",
|
|
2615
2709
|
px: f ? void 0 : .75,
|
|
2616
2710
|
ps: f ? 1.5 : void 0,
|
|
@@ -2621,7 +2715,7 @@ function Ft(e) {
|
|
|
2621
2715
|
onMouseDown: o,
|
|
2622
2716
|
onTouchStart: o
|
|
2623
2717
|
},
|
|
2624
|
-
children: /* @__PURE__ */
|
|
2718
|
+
children: /* @__PURE__ */ I(i, {
|
|
2625
2719
|
component: `${t.grid.componentName}.header.cell.resizer`,
|
|
2626
2720
|
opacity: r === "visible" ? void 0 : 0,
|
|
2627
2721
|
group: r === "hover" ? { "header-cell/hover": { opacity: 1 } } : void 0,
|
|
@@ -2642,13 +2736,13 @@ function Ft(e) {
|
|
|
2642
2736
|
})
|
|
2643
2737
|
});
|
|
2644
2738
|
}
|
|
2645
|
-
|
|
2739
|
+
Yt.displayName = "DataGridHeaderCellResizer";
|
|
2646
2740
|
//#endregion
|
|
2647
2741
|
//#region src/components/dataGrid/components/dataGridHeaderCell.tsx
|
|
2648
|
-
function
|
|
2649
|
-
let { column: t, row: n, columnIndex: r } = e, { grid: a } = t, { isStartPinned: o, isEndPinned: s } = t.pinFlags.value, c = t.headerCell, { isSortable: l, showResizer: d, showContextMenu: f, paddingStart: p, paddingEnd:
|
|
2742
|
+
function Xt(e) {
|
|
2743
|
+
let { column: t, row: n, columnIndex: r } = e, { grid: a } = t, { isStartPinned: o, isEndPinned: s } = t.pinFlags.value, c = t.headerCell, { isSortable: l, showResizer: d, showContextMenu: f, paddingStart: p, paddingEnd: _ } = c, { ref: v, tabIndex: y, onFocus: b } = ve(z(), n, r), x = u("datagrid-columnheader"), S = N(null), C = O(() => {
|
|
2650
2744
|
a.toggleSelectAllRows();
|
|
2651
|
-
}, [a]), w = t.isRowSelection ? /* @__PURE__ */
|
|
2745
|
+
}, [a]), w = t.isRowSelection ? /* @__PURE__ */ I(g, {
|
|
2652
2746
|
variant: "datagrid",
|
|
2653
2747
|
m: 1,
|
|
2654
2748
|
indeterminate: a.someRowsSelected && !a.allRowsSelected,
|
|
@@ -2658,12 +2752,12 @@ function It(e) {
|
|
|
2658
2752
|
tabIndex: -1,
|
|
2659
2753
|
"aria-label": a.localeText.selectAllRows
|
|
2660
2754
|
}
|
|
2661
|
-
}) : c.hiddenLabel ? /* @__PURE__ */
|
|
2755
|
+
}) : c.hiddenLabel ? /* @__PURE__ */ I(m, {
|
|
2662
2756
|
tag: "span",
|
|
2663
2757
|
children: c.hiddenLabel
|
|
2664
2758
|
}) : c.label;
|
|
2665
|
-
return /* @__PURE__ */
|
|
2666
|
-
ref:
|
|
2759
|
+
return /* @__PURE__ */ I(h, {
|
|
2760
|
+
ref: v,
|
|
2667
2761
|
id: x,
|
|
2668
2762
|
props: {
|
|
2669
2763
|
role: "columnheader",
|
|
@@ -2688,29 +2782,29 @@ function It(e) {
|
|
|
2688
2782
|
insetInlineStart: o ? `var(${t.inlineStartVarName})` : void 0,
|
|
2689
2783
|
insetInlineEnd: s ? `var(${t.inlineEndVarName})` : void 0
|
|
2690
2784
|
},
|
|
2691
|
-
children: /* @__PURE__ */
|
|
2692
|
-
/* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ L(F, { children: [
|
|
2786
|
+
/* @__PURE__ */ I(h, {
|
|
2693
2787
|
width: "fit",
|
|
2694
2788
|
height: "fit",
|
|
2695
2789
|
jc: t.align,
|
|
2696
|
-
children: /* @__PURE__ */
|
|
2790
|
+
children: /* @__PURE__ */ L(h, {
|
|
2697
2791
|
overflow: "hidden",
|
|
2698
2792
|
position: t.isLeaf ? void 0 : "sticky",
|
|
2699
2793
|
ai: "center",
|
|
2700
2794
|
transition: "none",
|
|
2701
2795
|
ps: p,
|
|
2702
|
-
pe:
|
|
2796
|
+
pe: _,
|
|
2703
2797
|
style: { insetInlineStart: t.pin ? void 0 : `var(${a.inlineStartEdgeVarName})` },
|
|
2704
2798
|
children: [
|
|
2705
|
-
/* @__PURE__ */
|
|
2799
|
+
/* @__PURE__ */ I(i, {
|
|
2706
2800
|
overflow: "hidden",
|
|
2707
2801
|
textOverflow: "ellipsis",
|
|
2708
2802
|
textWrap: "nowrap",
|
|
2709
2803
|
children: w
|
|
2710
2804
|
}),
|
|
2711
|
-
c.isSorted && /* @__PURE__ */
|
|
2805
|
+
c.isSorted && /* @__PURE__ */ I(i, {
|
|
2712
2806
|
ps: (t.inlineWidth ?? 0) < 58 ? 0 : 2,
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2807
|
+
children: /* @__PURE__ */ I(Bt, {
|
|
2714
2808
|
width: "16px",
|
|
2715
2809
|
rotate: c.sortDirection === "ASC" ? 0 : 180,
|
|
2716
2810
|
transition: "transform",
|
|
@@ -2720,22 +2814,22 @@ function It(e) {
|
|
|
2720
2814
|
fill: "currentColor"
|
|
2721
2815
|
})
|
|
2722
2816
|
}),
|
|
2723
|
-
f && /* @__PURE__ */
|
|
2817
|
+
f && /* @__PURE__ */ I(i, { minWidth: t.isEndAligned ? 4 : 10 })
|
|
2724
2818
|
]
|
|
2725
2819
|
})
|
|
2726
2820
|
}),
|
|
2727
|
-
d && /* @__PURE__ */
|
|
2821
|
+
d && /* @__PURE__ */ I(Yt, {
|
|
2728
2822
|
column: t,
|
|
2729
2823
|
controls: x
|
|
2730
2824
|
}),
|
|
2731
|
-
f && /* @__PURE__ */
|
|
2825
|
+
f && /* @__PURE__ */ I(Gt, { column: t })
|
|
2732
2826
|
] })
|
|
2733
2827
|
});
|
|
2734
2828
|
}
|
|
2735
|
-
|
|
2829
|
+
Xt.displayName = "DataGridHeaderCell";
|
|
2736
2830
|
//#endregion
|
|
2737
2831
|
//#region src/components/dataGrid/components/dataGridHeader.tsx
|
|
2738
|
-
function
|
|
2832
|
+
function Zt(e) {
|
|
2739
2833
|
let { grid: t } = e, n = N(null), [r, a] = P(X.INITIAL), o = t.headerHover === "sliding", s = (e) => {
|
|
2740
2834
|
let t = n.current;
|
|
2741
2835
|
if (!o || !t || e.pointerType === "touch") return;
|
|
@@ -2750,7 +2844,7 @@ function Lt(e) {
|
|
|
2750
2844
|
}), () => document.removeEventListener("scroll", c, { capture: !0 });
|
|
2751
2845
|
}, [l]);
|
|
2752
2846
|
let { bounds: u } = r;
|
|
2753
|
-
return /* @__PURE__ */
|
|
2847
|
+
return /* @__PURE__ */ L(x, {
|
|
2754
2848
|
ref: n,
|
|
2755
2849
|
component: `${t.componentName}.header`,
|
|
2756
2850
|
props: {
|
|
@@ -2760,20 +2854,20 @@ function Lt(e) {
|
|
|
2760
2854
|
},
|
|
2761
2855
|
style: { gridTemplateColumns: t.gridTemplateColumns.value },
|
|
2762
2856
|
children: [
|
|
2763
|
-
t.headerRows.value.map((e, t) => /* @__PURE__ */
|
|
2857
|
+
t.headerRows.value.map((e, t) => /* @__PURE__ */ I(i, {
|
|
2764
2858
|
display: "contents",
|
|
2765
2859
|
props: {
|
|
2766
2860
|
role: "row",
|
|
2767
2861
|
"aria-rowindex": t + 1
|
|
2768
2862
|
},
|
|
2769
|
-
children: e.map((e, n) => /* @__PURE__ */
|
|
2863
|
+
children: e.map((e, n) => /* @__PURE__ */ I(Xt, {
|
|
2770
2864
|
column: e,
|
|
2771
2865
|
row: t,
|
|
2772
2866
|
columnIndex: n
|
|
2773
2867
|
}, e.uniqueKey))
|
|
2774
2868
|
}, t)),
|
|
2775
|
-
/* @__PURE__ */
|
|
2776
|
-
o && u && /* @__PURE__ */
|
|
2869
|
+
/* @__PURE__ */ I(zt, { grid: t }),
|
|
2870
|
+
o && u && /* @__PURE__ */ I(i, {
|
|
2777
2871
|
tag: "span",
|
|
2778
2872
|
component: `${t.componentName}.header.hover`,
|
|
2779
2873
|
variant: {
|
|
@@ -2792,42 +2886,42 @@ function Lt(e) {
|
|
|
2792
2886
|
]
|
|
2793
2887
|
});
|
|
2794
2888
|
}
|
|
2795
|
-
|
|
2796
|
-
var
|
|
2889
|
+
Zt.displayName = "DataGridHeader";
|
|
2890
|
+
var Qt = D(Zt);
|
|
2797
2891
|
//#endregion
|
|
2798
2892
|
//#region src/components/dataGrid/components/dataGridLoader.tsx
|
|
2799
|
-
function
|
|
2893
|
+
function $t(e) {
|
|
2800
2894
|
let { grid: t } = e;
|
|
2801
|
-
return /* @__PURE__ */
|
|
2895
|
+
return /* @__PURE__ */ I(i, {
|
|
2802
2896
|
component: `${t.componentName}.loader`,
|
|
2803
2897
|
props: { "aria-hidden": !0 },
|
|
2804
|
-
children: /* @__PURE__ */
|
|
2898
|
+
children: /* @__PURE__ */ I(i, {
|
|
2805
2899
|
component: `${t.componentName}.loader.track`,
|
|
2806
2900
|
style: { height: 3 },
|
|
2807
|
-
children: /* @__PURE__ */
|
|
2901
|
+
children: /* @__PURE__ */ I(i, {
|
|
2808
2902
|
component: `${t.componentName}.loader.track.bar`,
|
|
2809
2903
|
width: "2/5"
|
|
2810
2904
|
})
|
|
2811
2905
|
})
|
|
2812
2906
|
});
|
|
2813
2907
|
}
|
|
2814
|
-
|
|
2908
|
+
$t.displayName = "DataGridLoader";
|
|
2815
2909
|
//#endregion
|
|
2816
2910
|
//#region src/components/dataGrid/components/dataGridContent.tsx
|
|
2817
|
-
function
|
|
2911
|
+
function en(e) {
|
|
2818
2912
|
let { grid: t } = e, n = N(null), [a, o] = P({
|
|
2819
2913
|
top: 0,
|
|
2820
2914
|
direction: "down"
|
|
2821
2915
|
}), s = N(null), c = O((e) => {
|
|
2822
2916
|
o((t) => e === t.top ? t : {
|
|
2823
2917
|
top: e,
|
|
2824
|
-
direction:
|
|
2918
|
+
direction: ye.directionOf(t.top, e, t.direction)
|
|
2825
2919
|
});
|
|
2826
2920
|
}, []), l = O((e) => {
|
|
2827
2921
|
s.current !== null && cancelAnimationFrame(s.current), s.current = requestAnimationFrame(() => {
|
|
2828
2922
|
c(e.target.scrollTop), s.current = null;
|
|
2829
2923
|
});
|
|
2830
|
-
}, [c]), { navigation: u, onKeyDown: d } =
|
|
2924
|
+
}, [c]), { navigation: u, onKeyDown: d } = Ue({
|
|
2831
2925
|
grid: t,
|
|
2832
2926
|
scrollerRef: n,
|
|
2833
2927
|
scroll: a,
|
|
@@ -2861,9 +2955,9 @@ function Bt(e) {
|
|
|
2861
2955
|
t.setContainerWidth(e.clientWidth), t.paintSizes();
|
|
2862
2956
|
});
|
|
2863
2957
|
return r.observe(e), () => r.disconnect();
|
|
2864
|
-
}, [t]), t.hasVisibleColumns ? /* @__PURE__ */
|
|
2958
|
+
}, [t]), t.hasVisibleColumns ? /* @__PURE__ */ I(ge.Provider, {
|
|
2865
2959
|
value: u,
|
|
2866
|
-
children: /* @__PURE__ */
|
|
2960
|
+
children: /* @__PURE__ */ L(i, {
|
|
2867
2961
|
ref: n,
|
|
2868
2962
|
component: `${t.componentName}.content`,
|
|
2869
2963
|
overflowX: "auto",
|
|
@@ -2881,33 +2975,33 @@ function Bt(e) {
|
|
|
2881
2975
|
onPaste: m.onPaste
|
|
2882
2976
|
},
|
|
2883
2977
|
children: [
|
|
2884
|
-
/* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ I(Qt, {
|
|
2885
2979
|
grid: t,
|
|
2886
2980
|
version: t.headerVersion
|
|
2887
2981
|
}),
|
|
2888
|
-
(t.props.loading || f.isLoading) && /* @__PURE__ */
|
|
2889
|
-
/* @__PURE__ */
|
|
2982
|
+
(t.props.loading || f.isLoading) && /* @__PURE__ */ I($t, { grid: t }),
|
|
2983
|
+
/* @__PURE__ */ I(Et, {
|
|
2890
2984
|
grid: t,
|
|
2891
2985
|
scroll: a
|
|
2892
2986
|
})
|
|
2893
2987
|
]
|
|
2894
2988
|
})
|
|
2895
|
-
}) : /* @__PURE__ */
|
|
2989
|
+
}) : /* @__PURE__ */ I(Dt, { grid: t });
|
|
2896
2990
|
}
|
|
2897
|
-
|
|
2991
|
+
en.displayName = "DataGridContent";
|
|
2898
2992
|
//#endregion
|
|
2899
2993
|
//#region src/components/dataGrid/components/dataGridDataSourceError.tsx
|
|
2900
|
-
function
|
|
2994
|
+
function tn(e) {
|
|
2901
2995
|
let { grid: t } = e, { error: n } = t.source;
|
|
2902
2996
|
if (n === void 0) return null;
|
|
2903
2997
|
let r = n instanceof Error && n.message ? n.message : t.localeText.loadError;
|
|
2904
|
-
return /* @__PURE__ */
|
|
2998
|
+
return /* @__PURE__ */ L(h, {
|
|
2905
2999
|
component: `${t.componentName}.error`,
|
|
2906
3000
|
props: { role: "alert" },
|
|
2907
|
-
children: [/* @__PURE__ */
|
|
3001
|
+
children: [/* @__PURE__ */ I(i, {
|
|
2908
3002
|
component: `${t.componentName}.error.message`,
|
|
2909
3003
|
children: r
|
|
2910
|
-
}), /* @__PURE__ */
|
|
3004
|
+
}), /* @__PURE__ */ I(p, {
|
|
2911
3005
|
component: `${t.componentName}.error.retry`,
|
|
2912
3006
|
type: "button",
|
|
2913
3007
|
onClick: t.source.retry,
|
|
@@ -2915,59 +3009,59 @@ function Vt(e) {
|
|
|
2915
3009
|
})]
|
|
2916
3010
|
});
|
|
2917
3011
|
}
|
|
2918
|
-
|
|
3012
|
+
tn.displayName = "DataGridDataSourceError";
|
|
2919
3013
|
//#endregion
|
|
2920
3014
|
//#region src/components/dataGrid/components/dataGridColumnGroups.tsx
|
|
2921
|
-
function
|
|
3015
|
+
function nn(e) {
|
|
2922
3016
|
let { grid: t } = e;
|
|
2923
|
-
return t.groupColumns.size === 0 ? null : /* @__PURE__ */
|
|
3017
|
+
return t.groupColumns.size === 0 ? null : /* @__PURE__ */ L(h, {
|
|
2924
3018
|
component: `${t.componentName}.topBar.columnGroups`,
|
|
2925
|
-
children: [/* @__PURE__ */
|
|
3019
|
+
children: [/* @__PURE__ */ I(C, {
|
|
2926
3020
|
component: `${t.componentName}.topBar.columnGroups.icon`,
|
|
2927
|
-
children: /* @__PURE__ */
|
|
3021
|
+
children: /* @__PURE__ */ I(Ht, {
|
|
2928
3022
|
width: "100%",
|
|
2929
3023
|
fill: "currentColor"
|
|
2930
3024
|
})
|
|
2931
|
-
}), t.groupedColumns.map((e) => /* @__PURE__ */
|
|
3025
|
+
}), t.groupedColumns.map((e) => /* @__PURE__ */ L(ee.Fragment, { children: [/* @__PURE__ */ I(Y, {
|
|
2932
3026
|
fill: "currentColor",
|
|
2933
3027
|
width: "14px",
|
|
2934
3028
|
height: "14px",
|
|
2935
3029
|
rotate: -90
|
|
2936
|
-
}), /* @__PURE__ */
|
|
3030
|
+
}), /* @__PURE__ */ L(h, {
|
|
2937
3031
|
component: `${t.componentName}.topBar.columnGroups.item`,
|
|
2938
|
-
children: [e.header ?? e.key, /* @__PURE__ */
|
|
3032
|
+
children: [e.header ?? e.key, /* @__PURE__ */ I(p, {
|
|
2939
3033
|
component: `${t.componentName}.topBar.columnGroups.item.icon`,
|
|
2940
3034
|
onClick: () => t.toggleGrouping(e.key),
|
|
2941
3035
|
props: { "aria-label": t.localeText.stopGrouping(String(e.header ?? e.key)) },
|
|
2942
|
-
children: /* @__PURE__ */
|
|
3036
|
+
children: /* @__PURE__ */ I(i, {
|
|
2943
3037
|
fontSize: 10,
|
|
2944
|
-
color: "
|
|
2945
|
-
hover: { color: "
|
|
3038
|
+
color: "base-400",
|
|
3039
|
+
hover: { color: "base-600" },
|
|
2946
3040
|
children: "✕"
|
|
2947
3041
|
})
|
|
2948
3042
|
})]
|
|
2949
3043
|
})] }, e.key))]
|
|
2950
3044
|
});
|
|
2951
3045
|
}
|
|
2952
|
-
|
|
3046
|
+
nn.displayName = "DataGridColumnGroups";
|
|
2953
3047
|
//#endregion
|
|
2954
3048
|
//#region src/icons/searchIcon.tsx
|
|
2955
|
-
function
|
|
2956
|
-
return /* @__PURE__ */
|
|
3049
|
+
function rn(e) {
|
|
3050
|
+
return /* @__PURE__ */ I(f, {
|
|
2957
3051
|
viewBox: "0 0 488.4 488.4",
|
|
2958
3052
|
width: "1.5rem",
|
|
2959
3053
|
...e,
|
|
2960
|
-
children: /* @__PURE__ */
|
|
3054
|
+
children: /* @__PURE__ */ I(d, { d: "M0 203.25c0 112.1 91.2 203.2 203.2 203.2 51.6 0 98.8-19.4 134.7-51.2l129.5 129.5c2.4 2.4 5.5 3.6 8.7 3.6s6.3-1.2 8.7-3.6c4.8-4.8 4.8-12.5 0-17.3l-129.6-129.5c31.8-35.9 51.2-83 51.2-134.7C406.4 91.15 315.2.05 203.2.05S0 91.15 0 203.25zm381.9 0c0 98.5-80.2 178.7-178.7 178.7s-178.7-80.2-178.7-178.7 80.2-178.7 178.7-178.7 178.7 80.1 178.7 178.7z" })
|
|
2961
3055
|
});
|
|
2962
3056
|
}
|
|
2963
3057
|
//#endregion
|
|
2964
3058
|
//#region src/components/dataGrid/components/dataGridColumnsPanel.tsx
|
|
2965
|
-
var
|
|
2966
|
-
function
|
|
3059
|
+
var an = 6;
|
|
3060
|
+
function on(e) {
|
|
2967
3061
|
let { grid: t } = e, { columnVisibility: n, localeText: r, componentName: a } = t, { visibleCount: o, total: s, hasHidden: c } = n, [l, u] = P(!1), [m, h] = P(""), g = O((e) => {
|
|
2968
3062
|
u(e), e || h("");
|
|
2969
3063
|
}, []);
|
|
2970
|
-
return /* @__PURE__ */
|
|
3064
|
+
return /* @__PURE__ */ I(w, {
|
|
2971
3065
|
label: r.columnsMenu,
|
|
2972
3066
|
side: "bottom",
|
|
2973
3067
|
align: "end",
|
|
@@ -2976,7 +3070,7 @@ function Gt(e) {
|
|
|
2976
3070
|
autoFocus: !1,
|
|
2977
3071
|
p: 0,
|
|
2978
3072
|
overflow: "visible",
|
|
2979
|
-
trigger: (e) => /* @__PURE__ */
|
|
3073
|
+
trigger: (e) => /* @__PURE__ */ L(p, {
|
|
2980
3074
|
...e,
|
|
2981
3075
|
component: `${a}.topBar.columnVisibility`,
|
|
2982
3076
|
props: {
|
|
@@ -2984,17 +3078,17 @@ function Gt(e) {
|
|
|
2984
3078
|
"aria-label": c ? r.columnsMenuLabel(o, s) : void 0
|
|
2985
3079
|
},
|
|
2986
3080
|
children: [
|
|
2987
|
-
/* @__PURE__ */
|
|
3081
|
+
/* @__PURE__ */ I(f, {
|
|
2988
3082
|
viewBox: "0 0 20 20",
|
|
2989
3083
|
width: 16,
|
|
2990
3084
|
height: 16,
|
|
2991
3085
|
fill: "none",
|
|
2992
3086
|
stroke: "currentColor",
|
|
2993
3087
|
strokeWidth: 1.6,
|
|
2994
|
-
children: /* @__PURE__ */
|
|
3088
|
+
children: /* @__PURE__ */ I(d, { d: "M4.5 3.5h11a1 1 0 0 1 1 1v11a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-11a1 1 0 0 1 1-1ZM8 3.5v13M12 3.5v13" })
|
|
2995
3089
|
}),
|
|
2996
3090
|
r.columnsMenu,
|
|
2997
|
-
c && /* @__PURE__ */
|
|
3091
|
+
c && /* @__PURE__ */ L(i, {
|
|
2998
3092
|
component: `${a}.topBar.columnVisibility.badge`,
|
|
2999
3093
|
tag: "span",
|
|
3000
3094
|
variant: { empty: o === 0 },
|
|
@@ -3007,7 +3101,7 @@ function Gt(e) {
|
|
|
3007
3101
|
})
|
|
3008
3102
|
]
|
|
3009
3103
|
}),
|
|
3010
|
-
children: /* @__PURE__ */
|
|
3104
|
+
children: /* @__PURE__ */ I(sn, {
|
|
3011
3105
|
grid: t,
|
|
3012
3106
|
open: l,
|
|
3013
3107
|
query: m,
|
|
@@ -3015,9 +3109,9 @@ function Gt(e) {
|
|
|
3015
3109
|
})
|
|
3016
3110
|
});
|
|
3017
3111
|
}
|
|
3018
|
-
|
|
3019
|
-
function
|
|
3020
|
-
let { columnVisibility: a, localeText: o, componentName: s } = e, c = `${s}.topBar.columnVisibility`, l = N(null), u = N(null), d = a.total >
|
|
3112
|
+
on.displayName = "DataGridColumnsPanel";
|
|
3113
|
+
function sn({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
3114
|
+
let { columnVisibility: a, localeText: o, componentName: s } = e, c = `${s}.topBar.columnVisibility`, l = N(null), u = N(null), d = a.total > an, f = a.search(n), m = a.sections(f), g = f.every((e) => e.visible), _ = f.every((e) => !e.visible);
|
|
3021
3115
|
A(() => {
|
|
3022
3116
|
t && (u.current ?? l.current?.querySelector("input"))?.focus();
|
|
3023
3117
|
}, [t]);
|
|
@@ -3038,20 +3132,20 @@ function Kt({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
|
3038
3132
|
}[e.key];
|
|
3039
3133
|
e.preventDefault(), i?.focus();
|
|
3040
3134
|
}, []);
|
|
3041
|
-
return /* @__PURE__ */
|
|
3135
|
+
return /* @__PURE__ */ L(h, {
|
|
3042
3136
|
ref: l,
|
|
3043
3137
|
component: `${c}.panel`,
|
|
3044
3138
|
props: { onKeyDown: v },
|
|
3045
3139
|
children: [
|
|
3046
|
-
d && /* @__PURE__ */
|
|
3140
|
+
d && /* @__PURE__ */ L(h, {
|
|
3047
3141
|
component: `${c}.search`,
|
|
3048
|
-
children: [/* @__PURE__ */
|
|
3142
|
+
children: [/* @__PURE__ */ I(h, {
|
|
3049
3143
|
component: `${c}.searchIcon`,
|
|
3050
|
-
children: /* @__PURE__ */
|
|
3144
|
+
children: /* @__PURE__ */ I(rn, {
|
|
3051
3145
|
fill: "currentColor",
|
|
3052
3146
|
width: "14px"
|
|
3053
3147
|
})
|
|
3054
|
-
}), /* @__PURE__ */
|
|
3148
|
+
}), /* @__PURE__ */ I(y, {
|
|
3055
3149
|
ref: u,
|
|
3056
3150
|
component: `${c}.searchInput`,
|
|
3057
3151
|
value: n,
|
|
@@ -3064,19 +3158,19 @@ function Kt({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
|
3064
3158
|
}
|
|
3065
3159
|
})]
|
|
3066
3160
|
}),
|
|
3067
|
-
/* @__PURE__ */
|
|
3161
|
+
/* @__PURE__ */ L(h, {
|
|
3068
3162
|
component: `${c}.toolbar`,
|
|
3069
|
-
children: [/* @__PURE__ */
|
|
3163
|
+
children: [/* @__PURE__ */ I(i, {
|
|
3070
3164
|
component: `${c}.count`,
|
|
3071
3165
|
children: o.columnsMenuShown(a.visibleCount, a.total)
|
|
3072
|
-
}), /* @__PURE__ */
|
|
3166
|
+
}), /* @__PURE__ */ L(h, {
|
|
3073
3167
|
gap: 1,
|
|
3074
|
-
children: [/* @__PURE__ */
|
|
3168
|
+
children: [/* @__PURE__ */ I(p, {
|
|
3075
3169
|
component: `${c}.action`,
|
|
3076
3170
|
disabled: g,
|
|
3077
3171
|
onClick: () => a.setAll(!0, f),
|
|
3078
3172
|
children: o.columnsMenuShowAll
|
|
3079
|
-
}), /* @__PURE__ */
|
|
3173
|
+
}), /* @__PURE__ */ I(p, {
|
|
3080
3174
|
component: `${c}.action`,
|
|
3081
3175
|
disabled: _,
|
|
3082
3176
|
onClick: () => a.setAll(!1, f),
|
|
@@ -3084,20 +3178,20 @@ function Kt({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
|
3084
3178
|
})]
|
|
3085
3179
|
})]
|
|
3086
3180
|
}),
|
|
3087
|
-
/* @__PURE__ */
|
|
3181
|
+
/* @__PURE__ */ L(h, {
|
|
3088
3182
|
component: `${c}.list`,
|
|
3089
|
-
children: [
|
|
3183
|
+
children: [m.map((e, t) => /* @__PURE__ */ L(h, {
|
|
3090
3184
|
component: `${c}.section`,
|
|
3091
3185
|
variant: { divided: t > 0 && !e.group },
|
|
3092
3186
|
props: e.group ? {
|
|
3093
3187
|
role: "group",
|
|
3094
3188
|
"aria-label": e.group
|
|
3095
3189
|
} : void 0,
|
|
3096
|
-
children: [e.group && /* @__PURE__ */
|
|
3190
|
+
children: [e.group && /* @__PURE__ */ I(i, {
|
|
3097
3191
|
component: `${c}.group`,
|
|
3098
3192
|
props: { "aria-hidden": !0 },
|
|
3099
3193
|
children: e.group
|
|
3100
|
-
}), e.entries.map((e) => /* @__PURE__ */
|
|
3194
|
+
}), e.entries.map((e) => /* @__PURE__ */ I(T, {
|
|
3101
3195
|
checked: e.visible,
|
|
3102
3196
|
onChange: () => e.column.toggleVisibility(),
|
|
3103
3197
|
label: e.label,
|
|
@@ -3106,7 +3200,7 @@ function Kt({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
|
3106
3200
|
display: "flex"
|
|
3107
3201
|
}
|
|
3108
3202
|
}, e.id))]
|
|
3109
|
-
}, `${e.group ?? ""}-${t}`)), f.length === 0 && /* @__PURE__ */
|
|
3203
|
+
}, `${e.group ?? ""}-${t}`)), f.length === 0 && /* @__PURE__ */ I(i, {
|
|
3110
3204
|
component: `${c}.empty`,
|
|
3111
3205
|
props: { role: "status" },
|
|
3112
3206
|
children: o.columnsMenuNoMatch(n.trim())
|
|
@@ -3117,18 +3211,18 @@ function Kt({ grid: e, open: t, query: n, onQueryChange: r }) {
|
|
|
3117
3211
|
}
|
|
3118
3212
|
//#endregion
|
|
3119
3213
|
//#region src/components/dataGrid/components/dataGridExport.tsx
|
|
3120
|
-
function
|
|
3214
|
+
function cn(e) {
|
|
3121
3215
|
let { grid: t } = e, n = t.exportConfig, r = O(() => void t.exportCsv(n).catch(() => void 0), [t, n]), i = O(() => void t.exportXlsx(n).catch(() => void 0), [t, n]);
|
|
3122
|
-
return n ? /* @__PURE__ */
|
|
3216
|
+
return n ? /* @__PURE__ */ L(h, {
|
|
3123
3217
|
component: `${t.componentName}.topBar.export`,
|
|
3124
3218
|
ai: "center",
|
|
3125
3219
|
gap: 2,
|
|
3126
|
-
children: [n.csv !== !1 && /* @__PURE__ */
|
|
3220
|
+
children: [n.csv !== !1 && /* @__PURE__ */ I(ln, {
|
|
3127
3221
|
componentName: t.componentName,
|
|
3128
3222
|
onClick: r,
|
|
3129
3223
|
label: t.localeText.exportCsvLabel,
|
|
3130
3224
|
children: t.localeText.exportCsv
|
|
3131
|
-
}), n.xlsx !== !1 && /* @__PURE__ */
|
|
3225
|
+
}), n.xlsx !== !1 && /* @__PURE__ */ I(ln, {
|
|
3132
3226
|
componentName: t.componentName,
|
|
3133
3227
|
onClick: i,
|
|
3134
3228
|
label: t.localeText.exportExcelLabel,
|
|
@@ -3136,25 +3230,25 @@ function qt(e) {
|
|
|
3136
3230
|
})]
|
|
3137
3231
|
}) : null;
|
|
3138
3232
|
}
|
|
3139
|
-
|
|
3140
|
-
function
|
|
3233
|
+
cn.displayName = "DataGridExport";
|
|
3234
|
+
function ln(e) {
|
|
3141
3235
|
let { componentName: t, onClick: n, label: r, children: i } = e;
|
|
3142
|
-
return /* @__PURE__ */
|
|
3236
|
+
return /* @__PURE__ */ L(p, {
|
|
3143
3237
|
component: `${t}.topBar.export.button`,
|
|
3144
3238
|
onClick: n,
|
|
3145
3239
|
props: { "aria-label": r },
|
|
3146
|
-
children: [/* @__PURE__ */
|
|
3240
|
+
children: [/* @__PURE__ */ L(f, {
|
|
3147
3241
|
viewBox: "0 0 20 20",
|
|
3148
3242
|
width: 16,
|
|
3149
3243
|
height: 16,
|
|
3150
3244
|
fill: "none",
|
|
3151
3245
|
stroke: "currentColor",
|
|
3152
3246
|
strokeWidth: 1.6,
|
|
3153
|
-
children: [/* @__PURE__ */
|
|
3247
|
+
children: [/* @__PURE__ */ I(d, {
|
|
3154
3248
|
d: "M10 3v9m0 0 3.5-3.5M10 12 6.5 8.5",
|
|
3155
3249
|
strokeLinecap: "round",
|
|
3156
3250
|
strokeLinejoin: "round"
|
|
3157
|
-
}), /* @__PURE__ */
|
|
3251
|
+
}), /* @__PURE__ */ I(d, {
|
|
3158
3252
|
d: "M3.5 13.5v2a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-2",
|
|
3159
3253
|
strokeLinecap: "round"
|
|
3160
3254
|
})]
|
|
@@ -3163,38 +3257,38 @@ function Jt(e) {
|
|
|
3163
3257
|
}
|
|
3164
3258
|
//#endregion
|
|
3165
3259
|
//#region src/components/dataGrid/components/dataGridGlobalFilter.tsx
|
|
3166
|
-
function
|
|
3167
|
-
let { grid: t } = e, [n, r] = P(t.globalFilterValue), { debounce: a, cancel: o } =
|
|
3260
|
+
function un(e) {
|
|
3261
|
+
let { grid: t } = e, [n, r] = P(t.globalFilterValue), { debounce: a, cancel: o } = jt(t.globalFilterValue, (e) => e === n, r), s = O((e) => {
|
|
3168
3262
|
let n = e.target.value;
|
|
3169
3263
|
r(n), a("value", () => t.filter.setGlobalFilter(n));
|
|
3170
3264
|
}, [t, a]), c = O(() => {
|
|
3171
3265
|
o(), r(""), t.filter.setGlobalFilter("");
|
|
3172
3266
|
}, [t, o]), { filtered: l, total: u } = t.filter.filterStats, d = !t.props.def.bottomBar && t.filter.hasActiveFilters && l !== u;
|
|
3173
|
-
return /* @__PURE__ */
|
|
3267
|
+
return /* @__PURE__ */ L(h, {
|
|
3174
3268
|
component: `${t.componentName}.topBar.globalFilter`,
|
|
3175
|
-
children: [d && /* @__PURE__ */
|
|
3269
|
+
children: [d && /* @__PURE__ */ L(i, {
|
|
3176
3270
|
component: `${t.componentName}.topBar.globalFilter.stats`,
|
|
3177
3271
|
children: [
|
|
3178
3272
|
l,
|
|
3179
3273
|
"/",
|
|
3180
3274
|
u
|
|
3181
3275
|
]
|
|
3182
|
-
}), /* @__PURE__ */
|
|
3276
|
+
}), /* @__PURE__ */ L(h, {
|
|
3183
3277
|
position: "relative",
|
|
3184
3278
|
ai: "center",
|
|
3185
3279
|
children: [
|
|
3186
|
-
/* @__PURE__ */
|
|
3280
|
+
/* @__PURE__ */ I(h, {
|
|
3187
3281
|
position: "absolute",
|
|
3188
3282
|
insetStart: 3,
|
|
3189
3283
|
pointerEvents: "none",
|
|
3190
|
-
color: "
|
|
3191
|
-
theme: { dark: { color: "
|
|
3192
|
-
children: /* @__PURE__ */
|
|
3284
|
+
color: "base-400",
|
|
3285
|
+
theme: { dark: { color: "base-500" } },
|
|
3286
|
+
children: /* @__PURE__ */ I(rn, {
|
|
3193
3287
|
fill: "currentColor",
|
|
3194
3288
|
width: "14px"
|
|
3195
3289
|
})
|
|
3196
3290
|
}),
|
|
3197
|
-
/* @__PURE__ */
|
|
3291
|
+
/* @__PURE__ */ I(y, {
|
|
3198
3292
|
placeholder: t.localeText.searchPlaceholder,
|
|
3199
3293
|
variant: "compact",
|
|
3200
3294
|
value: n,
|
|
@@ -3202,19 +3296,19 @@ function Yt(e) {
|
|
|
3202
3296
|
ps: 8,
|
|
3203
3297
|
pe: n ? 8 : 3
|
|
3204
3298
|
}),
|
|
3205
|
-
n && /* @__PURE__ */
|
|
3299
|
+
n && /* @__PURE__ */ I(i, {
|
|
3206
3300
|
position: "absolute",
|
|
3207
3301
|
insetEnd: 2,
|
|
3208
3302
|
cursor: "pointer",
|
|
3209
3303
|
p: 1,
|
|
3210
|
-
color: "
|
|
3211
|
-
hover: { color: "
|
|
3304
|
+
color: "base-400",
|
|
3305
|
+
hover: { color: "base-600" },
|
|
3212
3306
|
theme: { dark: {
|
|
3213
|
-
color: "
|
|
3214
|
-
hover: { color: "
|
|
3307
|
+
color: "base-500",
|
|
3308
|
+
hover: { color: "base-300" }
|
|
3215
3309
|
} },
|
|
3216
3310
|
props: { onClick: c },
|
|
3217
|
-
children: /* @__PURE__ */
|
|
3311
|
+
children: /* @__PURE__ */ I(i, {
|
|
3218
3312
|
fontSize: 12,
|
|
3219
3313
|
fontWeight: 600,
|
|
3220
3314
|
children: "✕"
|
|
@@ -3226,52 +3320,52 @@ function Yt(e) {
|
|
|
3226
3320
|
}
|
|
3227
3321
|
//#endregion
|
|
3228
3322
|
//#region src/components/dataGrid/components/dataGridTopBar.tsx
|
|
3229
|
-
function
|
|
3323
|
+
function dn(e) {
|
|
3230
3324
|
let { grid: t } = e, { title: n, topBarContent: r, globalFilter: a } = t.props.def;
|
|
3231
|
-
return /* @__PURE__ */
|
|
3325
|
+
return /* @__PURE__ */ L(h, {
|
|
3232
3326
|
component: `${t.componentName}.topBar`,
|
|
3233
3327
|
position: "relative",
|
|
3234
3328
|
d: "column",
|
|
3235
3329
|
gap: 3,
|
|
3236
|
-
children: [/* @__PURE__ */
|
|
3330
|
+
children: [/* @__PURE__ */ L(h, {
|
|
3237
3331
|
ai: "center",
|
|
3238
3332
|
jc: "space-between",
|
|
3239
3333
|
gap: 4,
|
|
3240
3334
|
flexWrap: "wrap",
|
|
3241
3335
|
width: "fit",
|
|
3242
|
-
children: [/* @__PURE__ */
|
|
3336
|
+
children: [/* @__PURE__ */ L(h, {
|
|
3243
3337
|
ai: "center",
|
|
3244
3338
|
gap: 3,
|
|
3245
3339
|
flexWrap: "wrap",
|
|
3246
3340
|
minWidth: 0,
|
|
3247
|
-
children: [n && /* @__PURE__ */
|
|
3341
|
+
children: [n && /* @__PURE__ */ I(i, {
|
|
3248
3342
|
id: t.titleId,
|
|
3249
3343
|
fontWeight: 600,
|
|
3250
3344
|
fontSize: 16,
|
|
3251
|
-
color: "
|
|
3252
|
-
theme: { dark: { color: "
|
|
3345
|
+
color: "base-800",
|
|
3346
|
+
theme: { dark: { color: "base-100" } },
|
|
3253
3347
|
children: n
|
|
3254
|
-
}), /* @__PURE__ */
|
|
3255
|
-
}), /* @__PURE__ */
|
|
3348
|
+
}), /* @__PURE__ */ I(nn, { grid: t })]
|
|
3349
|
+
}), /* @__PURE__ */ L(h, {
|
|
3256
3350
|
ai: "center",
|
|
3257
3351
|
gap: 3,
|
|
3258
3352
|
flexWrap: "wrap",
|
|
3259
3353
|
children: [
|
|
3260
|
-
a && /* @__PURE__ */
|
|
3261
|
-
/* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3354
|
+
a && /* @__PURE__ */ I(un, { grid: t }),
|
|
3355
|
+
/* @__PURE__ */ I(on, { grid: t }),
|
|
3356
|
+
/* @__PURE__ */ I(cn, { grid: t })
|
|
3263
3357
|
]
|
|
3264
3358
|
})]
|
|
3265
|
-
}), r && /* @__PURE__ */
|
|
3359
|
+
}), r && /* @__PURE__ */ I(i, {
|
|
3266
3360
|
width: "fit",
|
|
3267
3361
|
children: r
|
|
3268
3362
|
})]
|
|
3269
3363
|
});
|
|
3270
3364
|
}
|
|
3271
|
-
|
|
3365
|
+
dn.displayName = "DataGridTopBar";
|
|
3272
3366
|
//#endregion
|
|
3273
3367
|
//#region src/utils/string/fuzzySearch.ts
|
|
3274
|
-
function
|
|
3368
|
+
function fn(e, t) {
|
|
3275
3369
|
if (!e) return {
|
|
3276
3370
|
score: 1,
|
|
3277
3371
|
matches: []
|
|
@@ -3284,16 +3378,16 @@ function Zt(e, t) {
|
|
|
3284
3378
|
matches: o
|
|
3285
3379
|
});
|
|
3286
3380
|
}
|
|
3287
|
-
function
|
|
3288
|
-
return
|
|
3381
|
+
function pn(e, t) {
|
|
3382
|
+
return fn(e, t) !== null;
|
|
3289
3383
|
}
|
|
3290
3384
|
//#endregion
|
|
3291
3385
|
//#region src/components/dataGrid/components/dataGridCellRowDetail.tsx
|
|
3292
|
-
function
|
|
3386
|
+
function mn(e) {
|
|
3293
3387
|
let { cell: t } = e, n = t.isExpanded, r = O((e) => {
|
|
3294
3388
|
e.stopPropagation(), t.toggleDetail();
|
|
3295
3389
|
}, [t]);
|
|
3296
|
-
return /* @__PURE__ */
|
|
3390
|
+
return /* @__PURE__ */ I(p, {
|
|
3297
3391
|
component: `${t.grid.componentName}.body.cell.rowDetail`,
|
|
3298
3392
|
variant: { isExpanded: n },
|
|
3299
3393
|
type: "button",
|
|
@@ -3309,7 +3403,7 @@ function $t(e) {
|
|
|
3309
3403
|
"aria-label": (n ? t.grid.localeText.collapseRowDetail : t.grid.localeText.expandRowDetail)(t.row.rowIndex + 1),
|
|
3310
3404
|
"aria-expanded": n
|
|
3311
3405
|
},
|
|
3312
|
-
children: /* @__PURE__ */
|
|
3406
|
+
children: /* @__PURE__ */ I(Y, {
|
|
3313
3407
|
fill: "currentColor",
|
|
3314
3408
|
width: "14px",
|
|
3315
3409
|
height: "14px",
|
|
@@ -3317,14 +3411,14 @@ function $t(e) {
|
|
|
3317
3411
|
})
|
|
3318
3412
|
});
|
|
3319
3413
|
}
|
|
3320
|
-
|
|
3414
|
+
mn.displayName = "DataGridCellRowDetail";
|
|
3321
3415
|
//#endregion
|
|
3322
3416
|
//#region src/components/dataGrid/components/dataGridCellRowSelection.tsx
|
|
3323
|
-
function
|
|
3417
|
+
function hn(e) {
|
|
3324
3418
|
let { cell: t } = e, n = O(() => {
|
|
3325
3419
|
t.toggleSelection();
|
|
3326
3420
|
}, [t]);
|
|
3327
|
-
return /* @__PURE__ */
|
|
3421
|
+
return /* @__PURE__ */ I(g, {
|
|
3328
3422
|
variant: "datagrid",
|
|
3329
3423
|
checked: t.selected,
|
|
3330
3424
|
indeterminate: t.indeterminate,
|
|
@@ -3335,15 +3429,15 @@ function en(e) {
|
|
|
3335
3429
|
}
|
|
3336
3430
|
});
|
|
3337
3431
|
}
|
|
3338
|
-
|
|
3432
|
+
hn.displayName = "DataGridCellRowSelection";
|
|
3339
3433
|
//#endregion
|
|
3340
3434
|
//#region src/components/dataGrid/contracts/dataGridContract.ts
|
|
3341
|
-
function
|
|
3435
|
+
function gn(e) {
|
|
3342
3436
|
if (e) return e === "LEFT" ? "START" : e === "RIGHT" ? "END" : e;
|
|
3343
3437
|
}
|
|
3344
3438
|
//#endregion
|
|
3345
3439
|
//#region src/components/dataGrid/models/headerCellModel.ts
|
|
3346
|
-
var
|
|
3440
|
+
var _n = 1e3, vn = class {
|
|
3347
3441
|
column;
|
|
3348
3442
|
constructor(e) {
|
|
3349
3443
|
this.column = e;
|
|
@@ -3356,7 +3450,7 @@ var nn = 1e3, rn = class {
|
|
|
3356
3450
|
if (e.isRowNumber || e.isRowSelection) return null;
|
|
3357
3451
|
if (e.isGrouping) {
|
|
3358
3452
|
if (this.grid.groupColumns.size === 1) {
|
|
3359
|
-
let e = this.grid.groupColumns.values().next().value, t =
|
|
3453
|
+
let e = this.grid.groupColumns.values().next().value, t = G.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === e);
|
|
3360
3454
|
return t.header ?? t.key;
|
|
3361
3455
|
}
|
|
3362
3456
|
return this.grid.localeText.groupHeader;
|
|
@@ -3420,7 +3514,7 @@ var nn = 1e3, rn = class {
|
|
|
3420
3514
|
return Math.max(1, this.column.leafs.length) * this.grid.MIN_COLUMN_WIDTH_PX;
|
|
3421
3515
|
}
|
|
3422
3516
|
get maxWidth() {
|
|
3423
|
-
return Math.max(this.grid.containerWidth ||
|
|
3517
|
+
return Math.max(this.grid.containerWidth || _n, this.width, this.minWidth);
|
|
3424
3518
|
}
|
|
3425
3519
|
get paddingStart() {
|
|
3426
3520
|
if (!this.column.isRowSelection) return this.column.isEndAligned ? 10 : 3;
|
|
@@ -3441,6 +3535,7 @@ var nn = 1e3, rn = class {
|
|
|
3441
3535
|
isPillBeforeResizer: this.hasHoverPill && this.showResizer && this.column.pin !== "END",
|
|
3442
3536
|
isPillAfterResizer: this.hasHoverPill && this.showResizer && this.column.pin === "END",
|
|
3443
3537
|
isRowNumber: this.column.isRowNumber,
|
|
3538
|
+
isGroup: !this.column.isLeaf,
|
|
3444
3539
|
isFirstLeaf: this.column.isFirstLeaf,
|
|
3445
3540
|
isLastLeaf: this.column.isLastLeaf
|
|
3446
3541
|
};
|
|
@@ -3505,16 +3600,16 @@ var nn = 1e3, rn = class {
|
|
|
3505
3600
|
pin: t.pin
|
|
3506
3601
|
} : r, n, this)) ?? [], this.isLeaf) {
|
|
3507
3602
|
let e = this.grid.columnWidths.get(this.key);
|
|
3508
|
-
this._inlineWidth = e ?? this.def.width ?? this.grid.DEFAULT_COLUMN_WIDTH_PX, this._pin =
|
|
3603
|
+
this._inlineWidth = e ?? this.def.width ?? this.grid.DEFAULT_COLUMN_WIDTH_PX, this._pin = gn(t.pin);
|
|
3509
3604
|
}
|
|
3510
3605
|
}
|
|
3511
3606
|
columns = [];
|
|
3512
3607
|
get kind() {
|
|
3513
3608
|
switch (this.key) {
|
|
3514
|
-
case
|
|
3515
|
-
case
|
|
3516
|
-
case
|
|
3517
|
-
case
|
|
3609
|
+
case Ge: return "rowNumber";
|
|
3610
|
+
case Ke: return "rowSelection";
|
|
3611
|
+
case qe: return "rowDetail";
|
|
3612
|
+
case K: return "grouping";
|
|
3518
3613
|
default: return "data";
|
|
3519
3614
|
}
|
|
3520
3615
|
}
|
|
@@ -3569,7 +3664,7 @@ var nn = 1e3, rn = class {
|
|
|
3569
3664
|
insetInlineEnd: t ? `var(${this.inlineEndVarName})` : void 0
|
|
3570
3665
|
};
|
|
3571
3666
|
}, () => [this.pinFlags]);
|
|
3572
|
-
_headerCell = q(() => new
|
|
3667
|
+
_headerCell = q(() => new vn(this));
|
|
3573
3668
|
get headerCell() {
|
|
3574
3669
|
return this._headerCell.value;
|
|
3575
3670
|
}
|
|
@@ -3654,6 +3749,18 @@ var nn = 1e3, rn = class {
|
|
|
3654
3749
|
}
|
|
3655
3750
|
this.grid.setColumnFilter(this.key, i);
|
|
3656
3751
|
}
|
|
3752
|
+
setDateFilter(e, t, n) {
|
|
3753
|
+
if (!t) {
|
|
3754
|
+
this.grid.setColumnFilter(this.key, void 0);
|
|
3755
|
+
return;
|
|
3756
|
+
}
|
|
3757
|
+
let r = {
|
|
3758
|
+
type: "date",
|
|
3759
|
+
operator: e,
|
|
3760
|
+
value: t
|
|
3761
|
+
};
|
|
3762
|
+
e === "between" && n && (r.valueTo = n), this.grid.setColumnFilter(this.key, r);
|
|
3763
|
+
}
|
|
3657
3764
|
setMultiselectFilter(e) {
|
|
3658
3765
|
this.grid.setColumnFilter(this.key, e.length === 0 ? void 0 : {
|
|
3659
3766
|
type: "multiselect",
|
|
@@ -3733,16 +3840,16 @@ var nn = 1e3, rn = class {
|
|
|
3733
3840
|
get inlineWidth() {
|
|
3734
3841
|
if (this.isLeaf) return this.grid.getFlexWidth(this.key) ?? this._inlineWidth;
|
|
3735
3842
|
let e = this.visibleColumns.map((e) => e.inlineWidth).filter((e) => typeof e == "number");
|
|
3736
|
-
if (e.length !== 0) return
|
|
3843
|
+
if (e.length !== 0) return G.sumBy(e, (e) => e);
|
|
3737
3844
|
}
|
|
3738
3845
|
get startOffset() {
|
|
3739
3846
|
let e = 0;
|
|
3740
3847
|
if (this.parent) {
|
|
3741
3848
|
let { visibleColumns: t, startOffset: n } = this.parent, r = t.findIndex((e) => e === this);
|
|
3742
|
-
e +=
|
|
3849
|
+
e += G.sumBy(t, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += n;
|
|
3743
3850
|
} else {
|
|
3744
3851
|
let t = this.grid.columns.value.start.filter((e) => e.isVisible), n = t.findIndex((e) => e === this);
|
|
3745
|
-
e +=
|
|
3852
|
+
e += G.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
|
|
3746
3853
|
}
|
|
3747
3854
|
return e;
|
|
3748
3855
|
}
|
|
@@ -3750,10 +3857,10 @@ var nn = 1e3, rn = class {
|
|
|
3750
3857
|
let e = 0;
|
|
3751
3858
|
if (this.parent) {
|
|
3752
3859
|
let { visibleColumns: t } = this.parent, n = t.reverse(), r = n.findIndex((e) => e === this);
|
|
3753
|
-
e +=
|
|
3860
|
+
e += G.sumBy(n, (e, t) => t < r ? e.inlineWidth ?? 0 : 0), e += this.parent.endOffset;
|
|
3754
3861
|
} else {
|
|
3755
3862
|
let t = this.grid.columns.value.end.filter((e) => e.isVisible).reverse(), n = t.findIndex((e) => e === this);
|
|
3756
|
-
e +=
|
|
3863
|
+
e += G.sumBy(t, (e, t) => t < n ? e.inlineWidth ?? 0 : 0);
|
|
3757
3864
|
}
|
|
3758
3865
|
return e;
|
|
3759
3866
|
}
|
|
@@ -3791,7 +3898,7 @@ var nn = 1e3, rn = class {
|
|
|
3791
3898
|
_resizeTotalWidth = 0;
|
|
3792
3899
|
beginResize = (e) => {
|
|
3793
3900
|
let { MIN_COLUMN_WIDTH_PX: t } = this.grid;
|
|
3794
|
-
this._resizeStartX = e, this._resizeSizes =
|
|
3901
|
+
this._resizeStartX = e, this._resizeSizes = G.toRecord(this.leafs, (e) => [e.key, e.inlineWidth ?? e.baseWidth]), this._resizeTotalWidth = G.sumBy(this.leafs, (e) => this._resizeSizes[e.key]) - this.leafs.length * t;
|
|
3795
3902
|
};
|
|
3796
3903
|
get resizeSign() {
|
|
3797
3904
|
return this.pin === "END" === this.grid.isRtl ? 1 : -1;
|
|
@@ -3817,7 +3924,7 @@ var nn = 1e3, rn = class {
|
|
|
3817
3924
|
this.moveResizer((e - t) * this.resizeSign);
|
|
3818
3925
|
};
|
|
3819
3926
|
pinColumn = (e) => {
|
|
3820
|
-
this.isLeaf ? this._pin =
|
|
3927
|
+
this.isLeaf ? this._pin = gn(e) : this.columns.forEach((t) => t.pinColumn(e)), this.grid.pinColumn(this.uniqueKey, e);
|
|
3821
3928
|
};
|
|
3822
3929
|
toggleGrouping = () => {
|
|
3823
3930
|
this.grid.toggleGrouping(this.key);
|
|
@@ -3832,7 +3939,7 @@ var nn = 1e3, rn = class {
|
|
|
3832
3939
|
toggleVisibility = () => {
|
|
3833
3940
|
this.grid.toggleColumnVisibility(this.key);
|
|
3834
3941
|
};
|
|
3835
|
-
},
|
|
3942
|
+
}, yn = class {
|
|
3836
3943
|
grid;
|
|
3837
3944
|
constructor(e) {
|
|
3838
3945
|
this.grid = e;
|
|
@@ -3892,19 +3999,19 @@ var nn = 1e3, rn = class {
|
|
|
3892
3999
|
};
|
|
3893
4000
|
//#endregion
|
|
3894
4001
|
//#region src/utils/array/lazyList.ts
|
|
3895
|
-
function
|
|
4002
|
+
function bn(e, t) {
|
|
3896
4003
|
return new Proxy([], {
|
|
3897
4004
|
get(n, r, i) {
|
|
3898
4005
|
if (r === "length") return e;
|
|
3899
|
-
let a =
|
|
4006
|
+
let a = xn(r, e);
|
|
3900
4007
|
return a === void 0 ? Reflect.get(n, r, i) : t(a);
|
|
3901
4008
|
},
|
|
3902
4009
|
has(t, n) {
|
|
3903
|
-
return
|
|
4010
|
+
return xn(n, e) !== void 0 || Reflect.has(t, n);
|
|
3904
4011
|
},
|
|
3905
4012
|
getOwnPropertyDescriptor(n, r) {
|
|
3906
|
-
return
|
|
3907
|
-
value: t(
|
|
4013
|
+
return xn(r, e) === void 0 ? Reflect.getOwnPropertyDescriptor(n, r) : {
|
|
4014
|
+
value: t(xn(r, e)),
|
|
3908
4015
|
writable: !0,
|
|
3909
4016
|
enumerable: !0,
|
|
3910
4017
|
configurable: !0
|
|
@@ -3912,7 +4019,7 @@ function on(e, t) {
|
|
|
3912
4019
|
}
|
|
3913
4020
|
});
|
|
3914
4021
|
}
|
|
3915
|
-
function
|
|
4022
|
+
function xn(e, t) {
|
|
3916
4023
|
if (typeof e != "string") return;
|
|
3917
4024
|
let n = Number(e);
|
|
3918
4025
|
return Number.isInteger(n) && n >= 0 && n < t ? n : void 0;
|
|
@@ -4043,7 +4150,7 @@ var $ = class e {
|
|
|
4043
4150
|
}), this.source.changed());
|
|
4044
4151
|
});
|
|
4045
4152
|
}
|
|
4046
|
-
},
|
|
4153
|
+
}, Sn = class extends it {
|
|
4047
4154
|
level;
|
|
4048
4155
|
constructor(e, t, n, r) {
|
|
4049
4156
|
super(e, n, [], r, ""), this.level = t;
|
|
@@ -4065,7 +4172,7 @@ var $ = class e {
|
|
|
4065
4172
|
return [...this.level.groupKeys, this.groupValue];
|
|
4066
4173
|
}
|
|
4067
4174
|
get key() {
|
|
4068
|
-
return this.placeholder ? `${this.level.placeholderKey}-group-${this.rowIndex}` :
|
|
4175
|
+
return this.placeholder ? `${this.level.placeholderKey}-group-${this.rowIndex}` : Cn(this.groupKeys);
|
|
4069
4176
|
}
|
|
4070
4177
|
get depth() {
|
|
4071
4178
|
return this.level.depth;
|
|
@@ -4101,21 +4208,21 @@ var $ = class e {
|
|
|
4101
4208
|
this.placeholder || this.grid.toggleGroupRow(this.key);
|
|
4102
4209
|
}
|
|
4103
4210
|
};
|
|
4104
|
-
function
|
|
4211
|
+
function Cn(e) {
|
|
4105
4212
|
return `rb-group:${$.keyOf(e)}`;
|
|
4106
4213
|
}
|
|
4107
4214
|
//#endregion
|
|
4108
4215
|
//#region src/components/dataGrid/models/sourceRowModel.ts
|
|
4109
|
-
var
|
|
4216
|
+
var wn = {}, Tn = class extends U {
|
|
4110
4217
|
sourceLevel;
|
|
4111
4218
|
constructor(e, t, n) {
|
|
4112
|
-
super(e,
|
|
4219
|
+
super(e, wn, n), this.sourceLevel = t;
|
|
4113
4220
|
}
|
|
4114
4221
|
get row() {
|
|
4115
4222
|
return this.sourceLevel.rowAt(this.rowIndex);
|
|
4116
4223
|
}
|
|
4117
4224
|
get data() {
|
|
4118
|
-
return this.row ??
|
|
4225
|
+
return this.row ?? wn;
|
|
4119
4226
|
}
|
|
4120
4227
|
get placeholder() {
|
|
4121
4228
|
return this.row === void 0;
|
|
@@ -4133,7 +4240,7 @@ var un = {}, dn = class extends H {
|
|
|
4133
4240
|
get selected() {
|
|
4134
4241
|
return !this.placeholder && super.selected;
|
|
4135
4242
|
}
|
|
4136
|
-
},
|
|
4243
|
+
}, En = class extends Tn {
|
|
4137
4244
|
isTreeRow = !0;
|
|
4138
4245
|
get level() {
|
|
4139
4246
|
return this.sourceLevel.depth;
|
|
@@ -4153,7 +4260,7 @@ var un = {}, dn = class extends H {
|
|
|
4153
4260
|
toggleTree = () => {
|
|
4154
4261
|
this.hasChildren && this.grid.tree.toggle(this.key, this.level);
|
|
4155
4262
|
};
|
|
4156
|
-
},
|
|
4263
|
+
}, Dn = 100, On = 40, kn = class {
|
|
4157
4264
|
grid;
|
|
4158
4265
|
constructor(e) {
|
|
4159
4266
|
this.grid = e;
|
|
@@ -4179,11 +4286,11 @@ var un = {}, dn = class extends H {
|
|
|
4179
4286
|
}
|
|
4180
4287
|
get blockSize() {
|
|
4181
4288
|
let e = this.config?.blockSize;
|
|
4182
|
-
return e && e > 0 ? Math.floor(e) : this.grid.isPaginated ? this.grid.pageSize :
|
|
4289
|
+
return e && e > 0 ? Math.floor(e) : this.grid.isPaginated ? this.grid.pageSize : Dn;
|
|
4183
4290
|
}
|
|
4184
4291
|
get maxBlocks() {
|
|
4185
4292
|
let e = this.config?.maxBlocks;
|
|
4186
|
-
return e && e > 0 ? Math.floor(e) :
|
|
4293
|
+
return e && e > 0 ? Math.floor(e) : On;
|
|
4187
4294
|
}
|
|
4188
4295
|
get queryVersion() {
|
|
4189
4296
|
return this._query;
|
|
@@ -4238,7 +4345,7 @@ var un = {}, dn = class extends H {
|
|
|
4238
4345
|
return e.loadedBlocks().forEach(({ index: a, rows: o }) => {
|
|
4239
4346
|
o.forEach((o, s) => {
|
|
4240
4347
|
let c = [...e.path, o[r]];
|
|
4241
|
-
if (!t.has(
|
|
4348
|
+
if (!t.has(Cn(c))) return;
|
|
4242
4349
|
let l = a * n + s;
|
|
4243
4350
|
i.push({
|
|
4244
4351
|
rowIndex: l,
|
|
@@ -4292,20 +4399,20 @@ var un = {}, dn = class extends H {
|
|
|
4292
4399
|
listLength = -1;
|
|
4293
4400
|
rowList() {
|
|
4294
4401
|
let { start: e } = this.visibleRange();
|
|
4295
|
-
return this.listLength = this.visibleLength(),
|
|
4402
|
+
return this.listLength = this.visibleLength(), bn(this.listLength, (t) => this.rowModelAt(e + t));
|
|
4296
4403
|
}
|
|
4297
4404
|
flatRowList(e) {
|
|
4298
4405
|
let t = this.detailPositions();
|
|
4299
|
-
return t.length === 0 ? e :
|
|
4300
|
-
let r =
|
|
4301
|
-
return t[r] === n ? new
|
|
4406
|
+
return t.length === 0 ? e : bn(e.length + t.length, (n) => {
|
|
4407
|
+
let r = jn(t, n);
|
|
4408
|
+
return t[r] === n ? new H(this.grid, e[n - r - 1]) : e[n - r];
|
|
4302
4409
|
});
|
|
4303
4410
|
}
|
|
4304
4411
|
rowOffsets(e) {
|
|
4305
4412
|
let { rowHeight: t } = this.grid, n = this.detailPositions(), r = [0];
|
|
4306
4413
|
return n.forEach((t, n) => r.push(r[n] + e[t].heightForOffset)), {
|
|
4307
|
-
offsets:
|
|
4308
|
-
let i =
|
|
4414
|
+
offsets: bn(e.length, (e) => {
|
|
4415
|
+
let i = jn(n, e);
|
|
4309
4416
|
return (e - i) * t + r[i];
|
|
4310
4417
|
}),
|
|
4311
4418
|
totalHeight: (e.length - n.length) * t + r[n.length]
|
|
@@ -4334,7 +4441,7 @@ var un = {}, dn = class extends H {
|
|
|
4334
4441
|
let i = this.levels.get(r);
|
|
4335
4442
|
!i || i.isGroupLevel || i.loadedBlocks().forEach(({ index: r, rows: i }) => {
|
|
4336
4443
|
i.forEach((i, a) => {
|
|
4337
|
-
let o =
|
|
4444
|
+
let o = An(n, r * t + a);
|
|
4338
4445
|
o !== void 0 && e(o, i);
|
|
4339
4446
|
});
|
|
4340
4447
|
});
|
|
@@ -4342,14 +4449,14 @@ var un = {}, dn = class extends H {
|
|
|
4342
4449
|
}
|
|
4343
4450
|
rowModelAt(e) {
|
|
4344
4451
|
let t = this.segmentAt(e);
|
|
4345
|
-
if (!t) return new
|
|
4452
|
+
if (!t) return new Tn(this.grid, this.root, e);
|
|
4346
4453
|
let { level: n } = t, r = t.levelStart + (e - t.start), i = this.models.get(n.key);
|
|
4347
4454
|
i || this.models.set(n.key, i = /* @__PURE__ */ new Map());
|
|
4348
4455
|
let a = i.get(r);
|
|
4349
|
-
return a || (a = n.isGroupLevel ? new
|
|
4456
|
+
return a || (a = n.isGroupLevel ? new Sn(this.grid, n, this.groupColumnAt(n.depth), r) : this.isTree ? new En(this.grid, n, r) : new Tn(this.grid, n, r), i.set(r, a)), a;
|
|
4350
4457
|
}
|
|
4351
4458
|
groupColumnAt(e) {
|
|
4352
|
-
return
|
|
4459
|
+
return G.findOrThrow(this.grid.columns.value.leafs, (t) => t.key === this.groupBy[e]);
|
|
4353
4460
|
}
|
|
4354
4461
|
visibleLength() {
|
|
4355
4462
|
let { start: e, end: t } = this.visibleRange();
|
|
@@ -4435,10 +4542,10 @@ var un = {}, dn = class extends H {
|
|
|
4435
4542
|
this._segments = void 0, this._byLevel = void 0, this.listLength !== this.visibleLength() && this.grid.rows.clear(), this.grid.flatRows.clear(), this.grid.notify();
|
|
4436
4543
|
}
|
|
4437
4544
|
};
|
|
4438
|
-
function
|
|
4545
|
+
function An(e, t) {
|
|
4439
4546
|
for (let n of e) if (t >= n.levelStart && t < n.levelStart + n.length) return n.start + (t - n.levelStart);
|
|
4440
4547
|
}
|
|
4441
|
-
function
|
|
4548
|
+
function jn(e, t) {
|
|
4442
4549
|
let n = 0, r = e.length;
|
|
4443
4550
|
for (; n < r;) {
|
|
4444
4551
|
let i = n + r >>> 1;
|
|
@@ -4448,7 +4555,7 @@ function _n(e, t) {
|
|
|
4448
4555
|
}
|
|
4449
4556
|
//#endregion
|
|
4450
4557
|
//#region src/components/dataGrid/models/exportModel.ts
|
|
4451
|
-
var
|
|
4558
|
+
var Mn = 7, Nn = class {
|
|
4452
4559
|
grid;
|
|
4453
4560
|
constructor(e) {
|
|
4454
4561
|
this.grid = e;
|
|
@@ -4462,7 +4569,7 @@ var vn = 7, yn = class {
|
|
|
4462
4569
|
}
|
|
4463
4570
|
width(e) {
|
|
4464
4571
|
let t = e.inlineWidth ?? this.grid.DEFAULT_COLUMN_WIDTH_PX;
|
|
4465
|
-
return Math.min(80, Math.max(6, Math.round(t /
|
|
4572
|
+
return Math.min(80, Math.max(6, Math.round(t / Mn * 10) / 10));
|
|
4466
4573
|
}
|
|
4467
4574
|
value(e, t) {
|
|
4468
4575
|
let { exportValue: n } = e.def, r = n ? n(t) : t[e.key];
|
|
@@ -4470,7 +4577,7 @@ var vn = 7, yn = class {
|
|
|
4470
4577
|
}
|
|
4471
4578
|
aggregateOf(e, t) {
|
|
4472
4579
|
let n = e.aggregate;
|
|
4473
|
-
return n ?
|
|
4580
|
+
return n ? et(n, t.map((t) => this.value(e, t)), t) : null;
|
|
4474
4581
|
}
|
|
4475
4582
|
table(e = {}) {
|
|
4476
4583
|
let t = this.columns(e.columns), n = e.groups ?? !0, r = [], i = (e, a, o) => {
|
|
@@ -4485,7 +4592,7 @@ var vn = 7, yn = class {
|
|
|
4485
4592
|
}), i(s.rows, n ? a + 1 : a, o || n && e);
|
|
4486
4593
|
} else {
|
|
4487
4594
|
if (s.placeholder) continue;
|
|
4488
|
-
let e =
|
|
4595
|
+
let e = W(s) ? s.level : a;
|
|
4489
4596
|
r.push({
|
|
4490
4597
|
kind: "data",
|
|
4491
4598
|
level: e,
|
|
@@ -4534,7 +4641,7 @@ var vn = 7, yn = class {
|
|
|
4534
4641
|
let { title: t } = this.grid.props.def, n = typeof t == "string" && t.trim() ? t.trim() : this.grid.localeText.exportFileName;
|
|
4535
4642
|
return e.fileName?.trim() || n;
|
|
4536
4643
|
}
|
|
4537
|
-
},
|
|
4644
|
+
}, Pn = class {
|
|
4538
4645
|
grid;
|
|
4539
4646
|
constructor(e) {
|
|
4540
4647
|
this.grid = e;
|
|
@@ -4556,7 +4663,7 @@ var vn = 7, yn = class {
|
|
|
4556
4663
|
}
|
|
4557
4664
|
setGlobalFilter = (e) => this.grid.setGlobalFilter(e);
|
|
4558
4665
|
clearAllFilters = () => this.grid.clearAllFilters();
|
|
4559
|
-
},
|
|
4666
|
+
}, Fn = class {
|
|
4560
4667
|
grid;
|
|
4561
4668
|
constructor(e) {
|
|
4562
4669
|
this.grid = e;
|
|
@@ -4695,22 +4802,23 @@ var vn = 7, yn = class {
|
|
|
4695
4802
|
describe(e, t) {
|
|
4696
4803
|
switch (t.type) {
|
|
4697
4804
|
case "text": return `“${t.value}”`;
|
|
4698
|
-
case "number": return t.operator === "between" ? `${t.value}–${t.valueTo ?? ""}` : `${
|
|
4805
|
+
case "number": return t.operator === "between" ? `${t.value}–${t.valueTo ?? ""}` : `${Ln[t.operator]} ${t.value}`;
|
|
4699
4806
|
case "multiselect": {
|
|
4700
4807
|
let n = e.filterOptions, r = t.values.map((e) => e === null ? this.grid.localeText.filterEmptyValue : n.find((t) => t.value === e)?.label ?? String(e)), i = r.slice(0, 2).join(", ");
|
|
4701
4808
|
return r.length > 2 ? `${i} +${r.length - 2}` : i;
|
|
4702
4809
|
}
|
|
4810
|
+
case "date": return t.operator === "between" ? we()?.describeDay(t.value, t.valueTo ?? t.value) ?? `${t.value}–${t.valueTo ?? ""}` : `${Rn[t.operator]} ${we()?.describeDay(t.value) ?? t.value}`;
|
|
4703
4811
|
}
|
|
4704
4812
|
}
|
|
4705
4813
|
_record = null;
|
|
4706
4814
|
get record() {
|
|
4707
4815
|
if (!this._record) return;
|
|
4708
4816
|
let e = this.grid.flatRows.value, { index: t, key: n } = this._record;
|
|
4709
|
-
if (
|
|
4817
|
+
if (zn(e[t]) && e[t].key === n) return e[t];
|
|
4710
4818
|
let r = -1;
|
|
4711
|
-
for (let t = 0; t < Math.min(e.length,
|
|
4819
|
+
for (let t = 0; t < Math.min(e.length, In) && r === -1; t++) {
|
|
4712
4820
|
let i = e[t];
|
|
4713
|
-
|
|
4821
|
+
zn(i) && i.key === n && (r = t);
|
|
4714
4822
|
}
|
|
4715
4823
|
if (r !== -1) return this._record = {
|
|
4716
4824
|
index: r,
|
|
@@ -4734,7 +4842,7 @@ var vn = 7, yn = class {
|
|
|
4734
4842
|
let t = this.grid.flatRows.value;
|
|
4735
4843
|
for (let n = this._record.index + e; n >= 0 && n < t.length; n += e) {
|
|
4736
4844
|
let e = t[n];
|
|
4737
|
-
if (
|
|
4845
|
+
if (zn(e) && !e.placeholder) return n;
|
|
4738
4846
|
}
|
|
4739
4847
|
return -1;
|
|
4740
4848
|
}
|
|
@@ -4761,26 +4869,30 @@ var vn = 7, yn = class {
|
|
|
4761
4869
|
total: this.grid.totalRowCount
|
|
4762
4870
|
};
|
|
4763
4871
|
let e = this.grid.flatRows.value, t = 0, n = 0;
|
|
4764
|
-
for (let r = 0; r < e.length; r++)
|
|
4872
|
+
for (let r = 0; r < e.length; r++) zn(e[r]) && (n++, r <= this._record.index && t++);
|
|
4765
4873
|
return {
|
|
4766
4874
|
position: t,
|
|
4767
4875
|
total: n
|
|
4768
4876
|
};
|
|
4769
4877
|
}
|
|
4770
|
-
},
|
|
4878
|
+
}, In = 1e4, Ln = {
|
|
4771
4879
|
eq: "=",
|
|
4772
4880
|
ne: "≠",
|
|
4773
4881
|
gt: ">",
|
|
4774
4882
|
gte: "≥",
|
|
4775
4883
|
lt: "<",
|
|
4776
4884
|
lte: "≤"
|
|
4885
|
+
}, Rn = {
|
|
4886
|
+
on: "=",
|
|
4887
|
+
before: "<",
|
|
4888
|
+
after: ">"
|
|
4777
4889
|
};
|
|
4778
|
-
function
|
|
4890
|
+
function zn(e) {
|
|
4779
4891
|
return !!e && e.kind === "row";
|
|
4780
4892
|
}
|
|
4781
4893
|
//#endregion
|
|
4782
4894
|
//#region src/components/dataGrid/models/localeText.ts
|
|
4783
|
-
var
|
|
4895
|
+
var Bn = {
|
|
4784
4896
|
searchPlaceholder: "Search...",
|
|
4785
4897
|
columnsMenu: "Columns",
|
|
4786
4898
|
columnsMenuLabel: (e, t) => `Columns, ${e} of ${t} shown`,
|
|
@@ -4824,6 +4936,8 @@ var Tn = {
|
|
|
4824
4936
|
filterSelectClear: "Clear",
|
|
4825
4937
|
filterSelectAll: "Select All",
|
|
4826
4938
|
filterEmptyValue: "(empty)",
|
|
4939
|
+
booleanTrue: "Yes",
|
|
4940
|
+
booleanFalse: "No",
|
|
4827
4941
|
noRows: "empty",
|
|
4828
4942
|
loadingRows: "loading...",
|
|
4829
4943
|
selectRow: (e) => `Select row ${e}`,
|
|
@@ -4875,7 +4989,7 @@ var Tn = {
|
|
|
4875
4989
|
selectedRows: (e) => `${e} selected`,
|
|
4876
4990
|
selectAll: "Select all",
|
|
4877
4991
|
selectionAnnouncement: (e, t) => e === 0 ? "No rows selected" : `${e} of ${t} rows selected`
|
|
4878
|
-
},
|
|
4992
|
+
}, Vn = class {
|
|
4879
4993
|
grid;
|
|
4880
4994
|
constructor(e) {
|
|
4881
4995
|
this.grid = e;
|
|
@@ -4931,16 +5045,16 @@ var Tn = {
|
|
|
4931
5045
|
let t = parseInt(e, 10);
|
|
4932
5046
|
isNaN(t) || this.grid.changePage(Math.max(1, Math.min(t, this.totalPages)));
|
|
4933
5047
|
};
|
|
4934
|
-
},
|
|
4935
|
-
function
|
|
5048
|
+
}, Hn = /["\t\r\n]/;
|
|
5049
|
+
function Un(e) {
|
|
4936
5050
|
if (e == null) return "";
|
|
4937
5051
|
let t = e instanceof Date ? e.toISOString() : String(e);
|
|
4938
|
-
return
|
|
5052
|
+
return Hn.test(t) ? `"${t.split("\"").join("\"\"")}"` : t;
|
|
4939
5053
|
}
|
|
4940
|
-
function
|
|
4941
|
-
return e.map((e) => e.map(
|
|
5054
|
+
function Wn(e) {
|
|
5055
|
+
return e.map((e) => e.map(Un).join(" ")).join("\r\n");
|
|
4942
5056
|
}
|
|
4943
|
-
function
|
|
5057
|
+
function Gn(e) {
|
|
4944
5058
|
let t = [], n = [], r = "", i = !1;
|
|
4945
5059
|
for (let a = 0; a < e.length; a++) {
|
|
4946
5060
|
let o = e[a];
|
|
@@ -4948,10 +5062,10 @@ function An(e) {
|
|
|
4948
5062
|
}
|
|
4949
5063
|
return (r !== "" || n.length > 0) && (n.push(r), t.push(n)), t;
|
|
4950
5064
|
}
|
|
4951
|
-
function
|
|
5065
|
+
function Kn(e, t) {
|
|
4952
5066
|
return e?.row === t?.row && e?.column === t?.column;
|
|
4953
5067
|
}
|
|
4954
|
-
var
|
|
5068
|
+
var qn = class {
|
|
4955
5069
|
grid;
|
|
4956
5070
|
constructor(e) {
|
|
4957
5071
|
this.grid = e;
|
|
@@ -4997,7 +5111,7 @@ var Mn = class {
|
|
|
4997
5111
|
row: e,
|
|
4998
5112
|
column: t
|
|
4999
5113
|
}, i = n && this._anchor ? this._anchor : r;
|
|
5000
|
-
|
|
5114
|
+
Kn(this._focus, r) && Kn(this._anchor, i) || (this._anchor = i, this._focus = r, this.grid.notifyRows(), this.emit(n ? "extend" : "select"));
|
|
5001
5115
|
}
|
|
5002
5116
|
syncCurrent(e, t) {
|
|
5003
5117
|
this.isCurrent(e, t) || this.setCurrent(e, t);
|
|
@@ -5048,7 +5162,7 @@ var Mn = class {
|
|
|
5048
5162
|
onCopy = (e) => {
|
|
5049
5163
|
if (!this._focus || !e.clipboardData) return;
|
|
5050
5164
|
let t = e.currentTarget.ownerDocument.defaultView?.getSelection();
|
|
5051
|
-
t && !t.isCollapsed || (e.clipboardData.setData("text/plain",
|
|
5165
|
+
t && !t.isCollapsed || (e.clipboardData.setData("text/plain", Wn(this.values())), e.preventDefault());
|
|
5052
5166
|
};
|
|
5053
5167
|
pasteBounds(e, t) {
|
|
5054
5168
|
let n = this.bounds;
|
|
@@ -5065,10 +5179,10 @@ var Mn = class {
|
|
|
5065
5179
|
if (!this._focus || !e.clipboardData || this.grid.edits.isOpen || !this.grid.edits.enabled) return;
|
|
5066
5180
|
let t = e.clipboardData.getData("text/plain");
|
|
5067
5181
|
if (!t) return;
|
|
5068
|
-
let n =
|
|
5182
|
+
let n = Gn(t), r = n.reduce((e, t) => Math.max(e, t.length), 0), i = this.pasteBounds(n.length, r);
|
|
5069
5183
|
i && (e.preventDefault(), this.grid.edits.paste(i, (e, t) => n[e % n.length][t % r] ?? ""));
|
|
5070
5184
|
};
|
|
5071
|
-
},
|
|
5185
|
+
}, Jn = class extends U {
|
|
5072
5186
|
node;
|
|
5073
5187
|
level;
|
|
5074
5188
|
position;
|
|
@@ -5119,10 +5233,10 @@ var Mn = class {
|
|
|
5119
5233
|
};
|
|
5120
5234
|
//#endregion
|
|
5121
5235
|
//#region src/components/dataGrid/models/treeModel.ts
|
|
5122
|
-
function
|
|
5236
|
+
function Yn(e) {
|
|
5123
5237
|
return JSON.stringify(e);
|
|
5124
5238
|
}
|
|
5125
|
-
var
|
|
5239
|
+
var Xn = class {
|
|
5126
5240
|
grid;
|
|
5127
5241
|
constructor(e) {
|
|
5128
5242
|
this.grid = e;
|
|
@@ -5176,9 +5290,9 @@ var Fn = class {
|
|
|
5176
5290
|
data: e,
|
|
5177
5291
|
children: []
|
|
5178
5292
|
};
|
|
5179
|
-
n.set(
|
|
5293
|
+
n.set(Yn(r), i);
|
|
5180
5294
|
let a;
|
|
5181
|
-
for (let e = r.length - 1; e > 0 && !a; e--) a = n.get(
|
|
5295
|
+
for (let e = r.length - 1; e > 0 && !a; e--) a = n.get(Yn(r.slice(0, e)));
|
|
5182
5296
|
(a ? a.children : t).push(i);
|
|
5183
5297
|
}), t;
|
|
5184
5298
|
}
|
|
@@ -5194,7 +5308,7 @@ var Fn = class {
|
|
|
5194
5308
|
}
|
|
5195
5309
|
sortNodes(e) {
|
|
5196
5310
|
let { sortColumn: t, sortDirection: n } = this.grid;
|
|
5197
|
-
return t === void 0 ? e :
|
|
5311
|
+
return t === void 0 ? e : G.sortBy(e, (e) => e.data[t], n).map((e) => ({
|
|
5198
5312
|
data: e.data,
|
|
5199
5313
|
children: this.sortNodes(e.children)
|
|
5200
5314
|
}));
|
|
@@ -5224,7 +5338,7 @@ var Fn = class {
|
|
|
5224
5338
|
}
|
|
5225
5339
|
rowList() {
|
|
5226
5340
|
let e = 0, t = (n, r, i) => n.map((a, o) => {
|
|
5227
|
-
let s = new
|
|
5341
|
+
let s = new Jn(this.grid, a, e++, r, o, n.length, i);
|
|
5228
5342
|
return s.treeExpanded && (s.children = t(a.children, r + 1, s)), s;
|
|
5229
5343
|
});
|
|
5230
5344
|
return t(this.nodes.value, 0);
|
|
@@ -5266,7 +5380,16 @@ var Fn = class {
|
|
|
5266
5380
|
let n = !this.isExpanded(e, t);
|
|
5267
5381
|
n ? (this._opened.add(e), this._closed.delete(e)) : (this._closed.add(e), this._opened.delete(e)), this.grid.treeExpansionChanged(), this.grid.props.onExpandedTreeKeysChange?.(this.expandedKeys(), { reason: n ? "expand" : "collapse" }), this.grid.notify();
|
|
5268
5382
|
};
|
|
5269
|
-
},
|
|
5383
|
+
}, Zn = {};
|
|
5384
|
+
function Qn(e) {
|
|
5385
|
+
if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) return e;
|
|
5386
|
+
if (!(e instanceof Date) && typeof e != "string" && typeof e != "number") return null;
|
|
5387
|
+
let t = e instanceof Date ? e : new Date(e);
|
|
5388
|
+
if (Number.isNaN(t.getTime())) return null;
|
|
5389
|
+
let n = (e) => String(e).padStart(2, "0");
|
|
5390
|
+
return `${String(t.getFullYear()).padStart(4, "0")}-${n(t.getMonth() + 1)}-${n(t.getDate())}`;
|
|
5391
|
+
}
|
|
5392
|
+
var $n = class t {
|
|
5270
5393
|
props;
|
|
5271
5394
|
constructor(e, t) {
|
|
5272
5395
|
this.props = e, t && this.listeners.add(t);
|
|
@@ -5334,7 +5457,7 @@ var Fn = class {
|
|
|
5334
5457
|
let e = this.props.def.localeText, t = this._localeText;
|
|
5335
5458
|
if (t && t.from === e) return t.text;
|
|
5336
5459
|
let n = {
|
|
5337
|
-
...
|
|
5460
|
+
...Bn,
|
|
5338
5461
|
...e
|
|
5339
5462
|
};
|
|
5340
5463
|
return this._localeText = {
|
|
@@ -5344,20 +5467,20 @@ var Fn = class {
|
|
|
5344
5467
|
}
|
|
5345
5468
|
sourceColumns = q(() => {
|
|
5346
5469
|
let { def: e } = this.props, t = [];
|
|
5347
|
-
if (this.groupColumns.size > 0 && t.push(new Q({ key:
|
|
5470
|
+
if (this.groupColumns.size > 0 && t.push(new Q({ key: K }, this)), t.push(...e.columns.map((e) => new Q(e, this))), e.rowSelection) {
|
|
5348
5471
|
let n = typeof e.rowSelection == "object" && e.rowSelection.pinned ? "START" : void 0;
|
|
5349
5472
|
t.unshift(new Q({
|
|
5350
|
-
key:
|
|
5473
|
+
key: Ke,
|
|
5351
5474
|
pin: n,
|
|
5352
5475
|
width: 50,
|
|
5353
5476
|
align: "center",
|
|
5354
|
-
Cell:
|
|
5477
|
+
Cell: hn
|
|
5355
5478
|
}, this));
|
|
5356
5479
|
}
|
|
5357
5480
|
if (e.showRowNumber) {
|
|
5358
5481
|
let n, r = 70;
|
|
5359
5482
|
typeof e.showRowNumber == "object" && (e.showRowNumber.pinned && (n = "START"), r = e.showRowNumber.width ?? 70), t.unshift(new Q({
|
|
5360
|
-
key:
|
|
5483
|
+
key: Ge,
|
|
5361
5484
|
pin: n,
|
|
5362
5485
|
width: r,
|
|
5363
5486
|
align: "end"
|
|
@@ -5366,12 +5489,12 @@ var Fn = class {
|
|
|
5366
5489
|
if (e.rowDetail) {
|
|
5367
5490
|
let n = e.rowDetail.pinned ? "START" : void 0, r = e.rowDetail.expandColumnWidth ?? 50, i = e.rowDetail.expandColumnHeader ?? "";
|
|
5368
5491
|
t.unshift(new Q({
|
|
5369
|
-
key:
|
|
5492
|
+
key: qe,
|
|
5370
5493
|
header: i,
|
|
5371
5494
|
pin: n,
|
|
5372
5495
|
width: r,
|
|
5373
5496
|
align: "center",
|
|
5374
|
-
Cell:
|
|
5497
|
+
Cell: mn
|
|
5375
5498
|
}, this));
|
|
5376
5499
|
}
|
|
5377
5500
|
return t;
|
|
@@ -5390,16 +5513,16 @@ var Fn = class {
|
|
|
5390
5513
|
leafs: i,
|
|
5391
5514
|
visibleLeafs: a,
|
|
5392
5515
|
userVisibleLeafs: a.filter((e) => ![
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5516
|
+
Ge,
|
|
5517
|
+
Ke,
|
|
5518
|
+
K,
|
|
5519
|
+
qe
|
|
5397
5520
|
].includes(e.key)),
|
|
5398
|
-
maxDeath:
|
|
5521
|
+
maxDeath: G.maxBy(r, (e) => e.death) + 1
|
|
5399
5522
|
};
|
|
5400
5523
|
}, () => [this.sourceColumns]);
|
|
5401
|
-
headerRows = q(() =>
|
|
5402
|
-
let t =
|
|
5524
|
+
headerRows = q(() => G.sortBy(G.groupBy(this.columns.value.flat, (e) => e.death), (e) => e.key).map((e) => {
|
|
5525
|
+
let t = G.toRecord(G.groupBy(e.values, (e) => e.pin ?? "NO_PIN"), (e) => [e.key, e.values]);
|
|
5403
5526
|
return [
|
|
5404
5527
|
...t.START?.filter((e) => e.isVisible) ?? [],
|
|
5405
5528
|
...t.NO_PIN?.filter((e) => e.isVisible) ?? [],
|
|
@@ -5407,7 +5530,7 @@ var Fn = class {
|
|
|
5407
5530
|
];
|
|
5408
5531
|
}), () => [this.columns]);
|
|
5409
5532
|
gridTemplateColumns = q(() => {
|
|
5410
|
-
let { visibleLeafs: e } = this.columns.value, t =
|
|
5533
|
+
let { visibleLeafs: e } = this.columns.value, t = G.sumBy(e, (e) => +(e.pin === "END")), n = e.length - t;
|
|
5411
5534
|
return `${n > 0 ? `repeat(${n}, max-content)` : ""} ${t > 0 ? `repeat(${t}, max-content)` : ""}`.trim();
|
|
5412
5535
|
}, () => [this.columns]);
|
|
5413
5536
|
_globalFilterValue = "";
|
|
@@ -5430,7 +5553,7 @@ var Fn = class {
|
|
|
5430
5553
|
let t = this.globalFilterValue.trim();
|
|
5431
5554
|
return !t || this.globalFilterColumns.value.some((n) => {
|
|
5432
5555
|
let r = e[n];
|
|
5433
|
-
return r != null &&
|
|
5556
|
+
return r != null && pn(t, String(r));
|
|
5434
5557
|
});
|
|
5435
5558
|
}
|
|
5436
5559
|
matchesColumnFilters(e) {
|
|
@@ -5442,7 +5565,7 @@ var Fn = class {
|
|
|
5442
5565
|
}
|
|
5443
5566
|
matchesFilter(e, t) {
|
|
5444
5567
|
switch (t.type) {
|
|
5445
|
-
case "text": return !t.value.trim() || e != null &&
|
|
5568
|
+
case "text": return !t.value.trim() || e != null && pn(t.value, String(e));
|
|
5446
5569
|
case "number": {
|
|
5447
5570
|
if (e == null) return !1;
|
|
5448
5571
|
let n = typeof e == "number" ? e : parseFloat(String(e));
|
|
@@ -5458,6 +5581,17 @@ var Fn = class {
|
|
|
5458
5581
|
default: return !0;
|
|
5459
5582
|
}
|
|
5460
5583
|
}
|
|
5584
|
+
case "date": {
|
|
5585
|
+
if (!t.value) return !0;
|
|
5586
|
+
let n = Qn(e);
|
|
5587
|
+
if (!n) return !1;
|
|
5588
|
+
switch (t.operator) {
|
|
5589
|
+
case "on": return n === t.value;
|
|
5590
|
+
case "before": return n < t.value;
|
|
5591
|
+
case "after": return n > t.value;
|
|
5592
|
+
default: return n >= t.value && (!t.valueTo || n <= t.valueTo);
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5461
5595
|
case "multiselect": return t.values.length === 0 || t.values.includes(e);
|
|
5462
5596
|
default: return !0;
|
|
5463
5597
|
}
|
|
@@ -5544,21 +5678,21 @@ var Fn = class {
|
|
|
5544
5678
|
if (this.source.enabled) return this.source.rowList();
|
|
5545
5679
|
if (this.tree.isEager) return this.tree.rowList();
|
|
5546
5680
|
let e = this.filteredData;
|
|
5547
|
-
if (this._sortColumn && !this.isPaginated && (e =
|
|
5681
|
+
if (this._sortColumn && !this.isPaginated && (e = G.sortBy(e, (e) => e[this._sortColumn], this._sortDirection)), this.groupColumns.size > 0) {
|
|
5548
5682
|
let t = (e, n, r) => {
|
|
5549
5683
|
let i = n.values().next().value;
|
|
5550
5684
|
n.delete(i);
|
|
5551
|
-
let a =
|
|
5552
|
-
return this._sortColumn === "grouping-cell" && (e =
|
|
5685
|
+
let a = G.findOrThrow(this.columns.value.leafs, (e) => e.key === i);
|
|
5686
|
+
return this._sortColumn === "grouping-cell" && (e = G.sortBy(e, (e) => e[i], this._sortDirection)), G.groupBy(e, (e) => e[i]).map((e) => {
|
|
5553
5687
|
let i;
|
|
5554
|
-
i = n.size > 0 ? t(e.values, new Set(n), r + 1) : e.values.map((e, t) => new
|
|
5555
|
-
let o = new
|
|
5688
|
+
i = n.size > 0 ? t(e.values, new Set(n), r + 1) : e.values.map((e, t) => new U(this, e, r + 1 + t));
|
|
5689
|
+
let o = new it(this, a, i, r, e.key);
|
|
5556
5690
|
return r += 1, o.expanded && (r += i.length), o;
|
|
5557
5691
|
});
|
|
5558
5692
|
};
|
|
5559
5693
|
return t(e, new Set(this.groupColumns), 0);
|
|
5560
5694
|
}
|
|
5561
|
-
return e.map((e, t) => new
|
|
5695
|
+
return e.map((e, t) => new U(this, e, t));
|
|
5562
5696
|
}, () => [this.columns]);
|
|
5563
5697
|
groupingSpan = q(() => {
|
|
5564
5698
|
let { visibleLeafs: e } = this.columns.value, t = e.findIndex((e) => e.isGrouping);
|
|
@@ -5576,14 +5710,14 @@ var Fn = class {
|
|
|
5576
5710
|
return typeof n == "number" && (e[t.widthVarName] = `${t.inlineWidth}px`), t.pin === "START" && (e[t.inlineStartVarName] = `${t.startOffset}px`), t.pin === "END" && (e[t.inlineEndVarName] = `${t.endOffset}px`), e;
|
|
5577
5711
|
}, {});
|
|
5578
5712
|
e[this.rowHeightVarName] = `${this.rowHeight}px`, e[this.inlineStartEdgeVarName] = `${this.inlineStartEdge}px`, this._containerWidth > 0 && (e[this.viewportWidthVarName] = `${this._containerWidth}px`);
|
|
5579
|
-
let { visibleLeafs: t } = this.columns.value, n = t.find((e) => e.key ===
|
|
5713
|
+
let { visibleLeafs: t } = this.columns.value, n = t.find((e) => e.key === K);
|
|
5580
5714
|
if (n) {
|
|
5581
|
-
let t =
|
|
5715
|
+
let t = G.sumBy(this.groupingSpan.value, (e) => e.inlineWidth ?? 0);
|
|
5582
5716
|
e[n.groupColumnWidthVarName] = `${t}px`;
|
|
5583
5717
|
}
|
|
5584
5718
|
return this.groupColumns.forEach((n) => {
|
|
5585
|
-
let r =
|
|
5586
|
-
e[r.groupColumnWidthVarName] = `${
|
|
5719
|
+
let r = G.findOrThrow(this.columns.value.leafs, (e) => e.key === n);
|
|
5720
|
+
e[r.groupColumnWidthVarName] = `${G.sumBy(t, (e) => e.pin === r.pin ? e.inlineWidth ?? 0 : 0)}px`;
|
|
5587
5721
|
}), e;
|
|
5588
5722
|
}, () => [this.columns, this.flexWidths]);
|
|
5589
5723
|
_containerWidth = 0;
|
|
@@ -5610,8 +5744,8 @@ var Fn = class {
|
|
|
5610
5744
|
flexWidths = q(() => {
|
|
5611
5745
|
let e = this._containerWidth;
|
|
5612
5746
|
if (e <= 0) return {};
|
|
5613
|
-
let t = this.columns.value.visibleLeafs, n = (e) => !e.isFlexible || this.columnWidths.has(e.key), r =
|
|
5614
|
-
if (o <= a) return
|
|
5747
|
+
let t = this.columns.value.visibleLeafs, n = (e) => !e.isFlexible || this.columnWidths.has(e.key), r = G.sumBy(t.filter(n), (e) => e.baseWidth), i = t.filter((e) => !n(e)), a = G.sumBy(i, (e) => e.baseWidth), o = e - r;
|
|
5748
|
+
if (o <= a) return G.toRecord(i, (e) => [e.key, e.baseWidth]);
|
|
5615
5749
|
let s = {}, c = 0;
|
|
5616
5750
|
return i.forEach((e, t) => {
|
|
5617
5751
|
if (t === i.length - 1) s[e.key] = o - c;
|
|
@@ -5687,29 +5821,29 @@ var Fn = class {
|
|
|
5687
5821
|
rowOffsets = q(() => {
|
|
5688
5822
|
if (this.source.enabled) return this.source.rowOffsets(this.flatRows.value);
|
|
5689
5823
|
let e = [], t = 0;
|
|
5690
|
-
for (let n of this.flatRows.value) e.push(t), t += n instanceof
|
|
5824
|
+
for (let n of this.flatRows.value) e.push(t), t += n instanceof H ? n.heightForOffset : this.rowHeight;
|
|
5691
5825
|
return {
|
|
5692
5826
|
offsets: e,
|
|
5693
5827
|
totalHeight: t
|
|
5694
5828
|
};
|
|
5695
5829
|
}, () => [this.flatRows]);
|
|
5696
|
-
viewport = new
|
|
5697
|
-
columnVisibility = new
|
|
5698
|
-
filter = new
|
|
5699
|
-
pagination = new
|
|
5700
|
-
aggregation = new
|
|
5701
|
-
exporter = new
|
|
5702
|
-
source = new
|
|
5703
|
-
tree = new
|
|
5704
|
-
edits = new
|
|
5705
|
-
range = new
|
|
5706
|
-
list = new
|
|
5830
|
+
viewport = new ye(this);
|
|
5831
|
+
columnVisibility = new yn(this);
|
|
5832
|
+
filter = new Pn(this);
|
|
5833
|
+
pagination = new Vn(this);
|
|
5834
|
+
aggregation = new tt(this);
|
|
5835
|
+
exporter = new Nn(this);
|
|
5836
|
+
source = new kn(this);
|
|
5837
|
+
tree = new Xn(this);
|
|
5838
|
+
edits = new Re(this);
|
|
5839
|
+
range = new qn(this);
|
|
5840
|
+
list = new Fn(this);
|
|
5707
5841
|
refresh = () => {
|
|
5708
5842
|
this.edits.clearEdits(), this.source.invalidate();
|
|
5709
5843
|
};
|
|
5710
5844
|
get exportConfig() {
|
|
5711
5845
|
let e = this.props.def.export;
|
|
5712
|
-
if (e) return typeof e == "object" ? e :
|
|
5846
|
+
if (e) return typeof e == "object" ? e : Zn;
|
|
5713
5847
|
}
|
|
5714
5848
|
exportCsv = async (e = {}) => {
|
|
5715
5849
|
let { downloadCsv: t } = await import("../gridExport.mjs");
|
|
@@ -5774,14 +5908,14 @@ var Fn = class {
|
|
|
5774
5908
|
return this.localeText.selectionAnnouncement(e, this.totalRowCount);
|
|
5775
5909
|
}
|
|
5776
5910
|
get groupedColumns() {
|
|
5777
|
-
return Array.from(this.groupColumns, (e) =>
|
|
5911
|
+
return Array.from(this.groupColumns, (e) => G.findOrThrow(this.columns.value.leafs, (t) => t.key === e));
|
|
5778
5912
|
}
|
|
5779
5913
|
selectedRows = /* @__PURE__ */ new Set();
|
|
5780
5914
|
get inlineStartEdge() {
|
|
5781
|
-
return
|
|
5915
|
+
return G.sumBy(this.columns.value.start, (e) => e.inlineWidth ?? 0);
|
|
5782
5916
|
}
|
|
5783
5917
|
get inlineEndEdge() {
|
|
5784
|
-
return
|
|
5918
|
+
return G.sumBy(this.columns.value.end, (e) => e.inlineWidth ?? 0);
|
|
5785
5919
|
}
|
|
5786
5920
|
inlineStartEdgeVarName = "--inline-start-edge";
|
|
5787
5921
|
rowHeightVarName = "--row-height";
|
|
@@ -5812,7 +5946,7 @@ var Fn = class {
|
|
|
5812
5946
|
}), this.source.invalidate(), this.tree.nodes.clear(), this.rows.clear(), this.notify();
|
|
5813
5947
|
};
|
|
5814
5948
|
pinColumn = (e, t) => {
|
|
5815
|
-
let n =
|
|
5949
|
+
let n = gn(t), r = G.findOrThrow(this.columns.value.flat, (t) => t.uniqueKey === e);
|
|
5816
5950
|
r.pin !== n && r.pinColumn(n), this.columns.clear(), this.notify();
|
|
5817
5951
|
};
|
|
5818
5952
|
toggleGrouping = (e) => {
|
|
@@ -5901,31 +6035,31 @@ var Fn = class {
|
|
|
5901
6035
|
};
|
|
5902
6036
|
//#endregion
|
|
5903
6037
|
//#region src/components/dataGrid/useGrid.ts
|
|
5904
|
-
function
|
|
5905
|
-
let [t] = P(() => new
|
|
5906
|
-
return t.setProps(e), t.setIdentifier(n),
|
|
6038
|
+
function er(e) {
|
|
6039
|
+
let [t] = P(() => new $n(e)), n = u("datagrid");
|
|
6040
|
+
return t.setProps(e), t.setIdentifier(n), ae(t.subscribe, t.getSnapshot, t.getSnapshot), t;
|
|
5907
6041
|
}
|
|
5908
6042
|
//#endregion
|
|
5909
6043
|
//#region src/components/dataGrid/useListLayout.ts
|
|
5910
|
-
var
|
|
5911
|
-
function
|
|
5912
|
-
return
|
|
6044
|
+
var tr, nr;
|
|
6045
|
+
function rr() {
|
|
6046
|
+
return nr ??= import("../dataGridList.mjs").then((e) => tr = e.default), nr;
|
|
5913
6047
|
}
|
|
5914
|
-
t("(max-width: 36rem)")?.matches &&
|
|
5915
|
-
function
|
|
5916
|
-
let [t, n] = P(() =>
|
|
6048
|
+
t("(max-width: 36rem)")?.matches && rr();
|
|
6049
|
+
function ir(e) {
|
|
6050
|
+
let [t, n] = P(() => tr);
|
|
5917
6051
|
return A(() => {
|
|
5918
6052
|
if (!e || t) return;
|
|
5919
6053
|
let r = !0;
|
|
5920
|
-
return
|
|
6054
|
+
return rr().then((e) => r && n(() => e)), () => {
|
|
5921
6055
|
r = !1;
|
|
5922
6056
|
};
|
|
5923
6057
|
}, [e, t]), t;
|
|
5924
6058
|
}
|
|
5925
6059
|
//#endregion
|
|
5926
6060
|
//#region src/components/dataGrid.tsx
|
|
5927
|
-
function
|
|
5928
|
-
let n =
|
|
6061
|
+
function ar(e, t) {
|
|
6062
|
+
let n = er(e), a = N(null);
|
|
5929
6063
|
j(t, () => ({
|
|
5930
6064
|
get element() {
|
|
5931
6065
|
return a.current;
|
|
@@ -5935,7 +6069,7 @@ function Un(e, t) {
|
|
|
5935
6069
|
refresh: n.refresh,
|
|
5936
6070
|
clearEdits: n.edits.clearEdits
|
|
5937
6071
|
}), [n]);
|
|
5938
|
-
let { component: o, data: s, def: c, loading: l, filters: u, globalFilterValue: d, columnFilters: f, expandedRowKeys: p, expandedTreeKeys:
|
|
6072
|
+
let { component: o, data: s, def: c, loading: l, filters: u, globalFilterValue: d, columnFilters: f, expandedRowKeys: p, expandedTreeKeys: h, page: g, pageSize: _, onSelectedRowKeysChange: v, onSelectionChange: y, onGlobalFilterChange: b, onColumnFiltersChange: x, onExpandedRowKeysChange: S, onExpandedTreeKeysChange: C, onCellEditsChange: w, onPaginationChange: T, onPageChange: ee, onPageSizeChange: te, onSortingChange: ne, onSortChange: E, onServerStateChange: D, style: O, ...k } = e;
|
|
5939
6073
|
re(() => {
|
|
5940
6074
|
let e = a.current;
|
|
5941
6075
|
if (e) return n.setSizingElement(e), () => n.setSizingElement(null);
|
|
@@ -5946,8 +6080,8 @@ function Un(e, t) {
|
|
|
5946
6080
|
let t = new ResizeObserver(() => n.list.setWidth(e.clientWidth));
|
|
5947
6081
|
return t.observe(e), () => t.disconnect();
|
|
5948
6082
|
}, [n]);
|
|
5949
|
-
let A = n.list.active, M =
|
|
5950
|
-
return /* @__PURE__ */
|
|
6083
|
+
let A = n.list.active, M = ir(A);
|
|
6084
|
+
return /* @__PURE__ */ L(i, {
|
|
5951
6085
|
ref: a,
|
|
5952
6086
|
component: n.componentName,
|
|
5953
6087
|
variant: { list: !!M && A },
|
|
@@ -5956,18 +6090,18 @@ function Un(e, t) {
|
|
|
5956
6090
|
...n.sizes.value,
|
|
5957
6091
|
...O
|
|
5958
6092
|
},
|
|
5959
|
-
children: [M && A ? /* @__PURE__ */
|
|
5960
|
-
n.props.def.topBar && /* @__PURE__ */
|
|
5961
|
-
/* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
5963
|
-
n.props.def.bottomBar && /* @__PURE__ */
|
|
5964
|
-
] }), /* @__PURE__ */
|
|
6093
|
+
children: [M && A ? /* @__PURE__ */ I(M, { grid: n }) : /* @__PURE__ */ L(F, { children: [
|
|
6094
|
+
n.props.def.topBar && /* @__PURE__ */ I(dn, { grid: n }),
|
|
6095
|
+
/* @__PURE__ */ I(tn, { grid: n }),
|
|
6096
|
+
/* @__PURE__ */ I(en, { grid: n }),
|
|
6097
|
+
n.props.def.bottomBar && /* @__PURE__ */ I(he, { grid: n })
|
|
6098
|
+
] }), /* @__PURE__ */ I(m, {
|
|
5965
6099
|
props: { role: "status" },
|
|
5966
6100
|
children: n.selectionAnnouncement
|
|
5967
6101
|
})]
|
|
5968
6102
|
});
|
|
5969
6103
|
}
|
|
5970
|
-
var
|
|
5971
|
-
|
|
6104
|
+
var or = E(ar);
|
|
6105
|
+
ar.displayName = "DataGrid";
|
|
5972
6106
|
//#endregion
|
|
5973
|
-
export {
|
|
6107
|
+
export { Bn as DATA_GRID_LOCALE_TEXT, $t as a, Z as c, gt as d, or as default, Y as f, tn as i, bt as l, Te as m, on as n, Bt as o, W as p, rn as r, jt as s, cn as t, yt as u };
|