wcz-layout 10.1.10 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Approval-D1TfISUL.mjs.map +1 -1
- package/dist/{LayoutTable-CxQNMuwo.d.mts → ChatLayout-BmLySLXy.d.mts} +11 -2
- package/dist/ChatLayout-Tpuwo8-b.mjs +1622 -0
- package/dist/ChatLayout-Tpuwo8-b.mjs.map +1 -0
- package/dist/DialogsContext-D23fJjYR.mjs.map +1 -1
- package/dist/Email-rnz3H0x3.mjs.map +1 -1
- package/dist/FileMeta-CPBWI_jA.mjs.map +1 -1
- package/dist/RouterListItemButton-CF-8w-08.mjs +62 -0
- package/dist/RouterListItemButton-CF-8w-08.mjs.map +1 -0
- package/dist/{approval-ByDIMRhe.mjs → approval-HB2w5jzc.mjs} +2 -2
- package/dist/approval-HB2w5jzc.mjs.map +1 -0
- package/dist/auth.mjs +4 -4
- package/dist/auth.mjs.map +1 -1
- package/dist/components.d.mts +3 -2
- package/dist/components.mjs +522 -627
- package/dist/components.mjs.map +1 -1
- package/dist/{createApi-L3ypB1gH.mjs → createApi-CKgFi53y.mjs} +3 -4
- package/dist/createApi-CKgFi53y.mjs.map +1 -0
- package/dist/data/client.mjs +3 -4
- package/dist/data/client.mjs.map +1 -1
- package/dist/data/server.mjs +4 -4
- package/dist/data/server.mjs.map +1 -1
- package/dist/env-BwFl7nWc.mjs +48 -0
- package/dist/env-BwFl7nWc.mjs.map +1 -0
- package/dist/{file-CwumKq_P.mjs → file-X1sK4ok6.mjs} +5 -4
- package/dist/file-X1sK4ok6.mjs.map +1 -0
- package/dist/{file-B4Q_bGLN.mjs → file-tkfsnk5F.mjs} +6 -5
- package/dist/file-tkfsnk5F.mjs.map +1 -0
- package/dist/generatedChart-k7NEdi5Z.mjs +211 -0
- package/dist/generatedChart-k7NEdi5Z.mjs.map +1 -0
- package/dist/hooks.d.mts +30 -2
- package/dist/hooks.mjs +1750 -1227
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.d.mts +9 -2
- package/dist/index.mjs +1250 -1010
- package/dist/index.mjs.map +1 -1
- package/dist/middleware.mjs +2 -2
- package/dist/middleware.mjs.map +1 -1
- package/dist/models.d.mts +2 -2
- package/dist/models.mjs.map +1 -1
- package/dist/{peoplesoft-D1jPlXr9.mjs → peoplesoft-RnvfLbWH.mjs} +4 -23
- package/dist/peoplesoft-RnvfLbWH.mjs.map +1 -0
- package/dist/{providers-gKUqnVV5.mjs → providers-BfFg_3eo.mjs} +4 -20
- package/dist/providers-BfFg_3eo.mjs.map +1 -0
- package/dist/{tokens-DODxwvZ2.mjs → tokens-C4SErO-K.mjs} +10 -4
- package/dist/tokens-C4SErO-K.mjs.map +1 -0
- package/dist/{utils-obBGIuT3.mjs → utils-C2MZoH9U.mjs} +4 -31
- package/dist/utils-C2MZoH9U.mjs.map +1 -0
- package/dist/{utils-giYfiv39.d.mts → utils-CNYCSgip.d.mts} +2 -2
- package/dist/utils-DnMFybj3.mjs +27 -0
- package/dist/utils-DnMFybj3.mjs.map +1 -0
- package/dist/utils.d.mts +11 -2
- package/dist/utils.mjs +3 -5
- package/dist/vite.mjs.map +1 -1
- package/package.json +19 -21
- package/skills/ai/SKILL.md +156 -97
- package/skills/client-db/SKILL.md +104 -90
- package/skills/db-schema/SKILL.md +28 -20
- package/skills/dialogs/SKILL.md +26 -38
- package/skills/forms/SKILL.md +133 -73
- package/skills/general/SKILL.md +111 -126
- package/skills/general/references/auth.md +3 -7
- package/skills/routing/SKILL.md +60 -66
- package/skills/server-functions/SKILL.md +71 -26
- package/skills/services/SKILL.md +1 -1
- package/skills/services/docs/approval.md +4 -4
- package/skills/table/SKILL.md +113 -130
- package/dist/AggregatedCell-3CIdlmt6.mjs +0 -615
- package/dist/AggregatedCell-3CIdlmt6.mjs.map +0 -1
- package/dist/RouterListItemButton-B-cQ1XwU.mjs +0 -78
- package/dist/RouterListItemButton-B-cQ1XwU.mjs.map +0 -1
- package/dist/approval-ByDIMRhe.mjs.map +0 -1
- package/dist/createApi-L3ypB1gH.mjs.map +0 -1
- package/dist/file-B4Q_bGLN.mjs.map +0 -1
- package/dist/file-CwumKq_P.mjs.map +0 -1
- package/dist/peoplesoft-D1jPlXr9.mjs.map +0 -1
- package/dist/providers-gKUqnVV5.mjs.map +0 -1
- package/dist/tokens-DODxwvZ2.mjs.map +0 -1
- package/dist/utils-obBGIuT3.mjs.map +0 -1
- package/skills/general/references/exports.md +0 -117
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
import { t as DialogsContext } from "./DialogsContext-D23fJjYR.mjs";
|
|
2
|
-
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { Button, Dialog, DialogActions, DialogContent, DialogTitle, TablePagination, Typography, useEventCallback } from "@mui/material";
|
|
4
|
-
import dayjs from "dayjs";
|
|
5
|
-
import { useContext, useId } from "react";
|
|
6
|
-
import { useTranslation } from "react-i18next";
|
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { formatForDisplay } from "@tanstack/react-hotkeys";
|
|
9
|
-
import { defaultRangeExtractor } from "@tanstack/react-virtual";
|
|
10
|
-
import { aggregationFn_count, aggregationFn_extent, aggregationFn_first, aggregationFn_last, aggregationFn_max, aggregationFn_mean, aggregationFn_median, aggregationFn_min, aggregationFn_sum, aggregationFn_unique, aggregationFn_uniqueCount, createExpandedRowModel, createFacetedMinMaxValues, createFacetedRowModel, createFacetedUniqueValues, createFilteredRowModel, createGroupedRowModel, createPaginatedRowModel, createSortedRowModel, createTableHookContexts, filterFn_arrHas, filterFn_arrIncludes, filterFn_arrIncludesAll, filterFn_arrIncludesSome, filterFn_between, filterFn_betweenInclusive, filterFn_empty, filterFn_endsWith, filterFn_equals, filterFn_equalsString, filterFn_equalsStringSensitive, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inDateRange, filterFn_inNumberRange, filterFn_includesString, filterFn_includesStringSensitive, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_notEmpty, filterFn_startsWith, filterFn_weakEquals, metaHelper, sortFn_alphanumeric, sortFn_alphanumericCaseSensitive, sortFn_basic, sortFn_datetime, sortFn_text, sortFn_textCaseSensitive, stockFeatures, tableFeatures } from "@tanstack/react-table";
|
|
11
|
-
// src/hooks/useDialogs.tsx
|
|
12
|
-
function AlertDialog(t0) {
|
|
13
|
-
const $ = c(25);
|
|
14
|
-
if ($[0] !== "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a") {
|
|
15
|
-
for (let $i = 0; $i < 25; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
16
|
-
$[0] = "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a";
|
|
17
|
-
}
|
|
18
|
-
const { open, payload, onClose } = t0;
|
|
19
|
-
const { t } = useTranslation();
|
|
20
|
-
const messageId = useId();
|
|
21
|
-
let t1;
|
|
22
|
-
if ($[1] !== onClose) {
|
|
23
|
-
t1 = () => onClose();
|
|
24
|
-
$[1] = onClose;
|
|
25
|
-
$[2] = t1;
|
|
26
|
-
} else t1 = $[2];
|
|
27
|
-
let t2;
|
|
28
|
-
if ($[3] !== payload.title || $[4] !== t) {
|
|
29
|
-
t2 = payload.title ?? t("Layout.Dialog.Alert");
|
|
30
|
-
$[3] = payload.title;
|
|
31
|
-
$[4] = t;
|
|
32
|
-
$[5] = t2;
|
|
33
|
-
} else t2 = $[5];
|
|
34
|
-
let t3;
|
|
35
|
-
if ($[6] !== t2) {
|
|
36
|
-
t3 = /* @__PURE__ */ jsx(DialogTitle, { children: t2 });
|
|
37
|
-
$[6] = t2;
|
|
38
|
-
$[7] = t3;
|
|
39
|
-
} else t3 = $[7];
|
|
40
|
-
let t4;
|
|
41
|
-
if ($[8] !== messageId || $[9] !== payload.message) {
|
|
42
|
-
t4 = /* @__PURE__ */ jsx(DialogContent, {
|
|
43
|
-
id: messageId,
|
|
44
|
-
children: payload.message
|
|
45
|
-
});
|
|
46
|
-
$[8] = messageId;
|
|
47
|
-
$[9] = payload.message;
|
|
48
|
-
$[10] = t4;
|
|
49
|
-
} else t4 = $[10];
|
|
50
|
-
let t5;
|
|
51
|
-
if ($[11] !== onClose) {
|
|
52
|
-
t5 = () => onClose();
|
|
53
|
-
$[11] = onClose;
|
|
54
|
-
$[12] = t5;
|
|
55
|
-
} else t5 = $[12];
|
|
56
|
-
let t6;
|
|
57
|
-
if ($[13] !== t) {
|
|
58
|
-
t6 = t("Layout.Dialog.Confirm");
|
|
59
|
-
$[13] = t;
|
|
60
|
-
$[14] = t6;
|
|
61
|
-
} else t6 = $[14];
|
|
62
|
-
let t7;
|
|
63
|
-
if ($[15] !== t5 || $[16] !== t6) {
|
|
64
|
-
t7 = /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, {
|
|
65
|
-
onClick: t5,
|
|
66
|
-
autoFocus: true,
|
|
67
|
-
children: t6
|
|
68
|
-
}) });
|
|
69
|
-
$[15] = t5;
|
|
70
|
-
$[16] = t6;
|
|
71
|
-
$[17] = t7;
|
|
72
|
-
} else t7 = $[17];
|
|
73
|
-
let t8;
|
|
74
|
-
if ($[18] !== messageId || $[19] !== open || $[20] !== t1 || $[21] !== t3 || $[22] !== t4 || $[23] !== t7) {
|
|
75
|
-
t8 = /* @__PURE__ */ jsxs(Dialog, {
|
|
76
|
-
maxWidth: "xs",
|
|
77
|
-
fullWidth: true,
|
|
78
|
-
open,
|
|
79
|
-
onClose: t1,
|
|
80
|
-
role: "alertdialog",
|
|
81
|
-
"aria-describedby": messageId,
|
|
82
|
-
children: [
|
|
83
|
-
t3,
|
|
84
|
-
t4,
|
|
85
|
-
t7
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
$[18] = messageId;
|
|
89
|
-
$[19] = open;
|
|
90
|
-
$[20] = t1;
|
|
91
|
-
$[21] = t3;
|
|
92
|
-
$[22] = t4;
|
|
93
|
-
$[23] = t7;
|
|
94
|
-
$[24] = t8;
|
|
95
|
-
} else t8 = $[24];
|
|
96
|
-
return t8;
|
|
97
|
-
}
|
|
98
|
-
function ConfirmDialog(t0) {
|
|
99
|
-
const $ = c(37);
|
|
100
|
-
if ($[0] !== "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a") {
|
|
101
|
-
for (let $i = 0; $i < 37; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
102
|
-
$[0] = "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a";
|
|
103
|
-
}
|
|
104
|
-
const { open, payload, onClose } = t0;
|
|
105
|
-
const { t } = useTranslation();
|
|
106
|
-
const messageId = useId();
|
|
107
|
-
let t1;
|
|
108
|
-
if ($[1] !== onClose) {
|
|
109
|
-
t1 = () => onClose(false);
|
|
110
|
-
$[1] = onClose;
|
|
111
|
-
$[2] = t1;
|
|
112
|
-
} else t1 = $[2];
|
|
113
|
-
let t2;
|
|
114
|
-
if ($[3] !== payload.title || $[4] !== t) {
|
|
115
|
-
t2 = payload.title ?? t("Layout.Dialog.Confirm");
|
|
116
|
-
$[3] = payload.title;
|
|
117
|
-
$[4] = t;
|
|
118
|
-
$[5] = t2;
|
|
119
|
-
} else t2 = $[5];
|
|
120
|
-
let t3;
|
|
121
|
-
if ($[6] !== t2) {
|
|
122
|
-
t3 = /* @__PURE__ */ jsx(DialogTitle, { children: t2 });
|
|
123
|
-
$[6] = t2;
|
|
124
|
-
$[7] = t3;
|
|
125
|
-
} else t3 = $[7];
|
|
126
|
-
let t4;
|
|
127
|
-
if ($[8] !== messageId || $[9] !== payload.message) {
|
|
128
|
-
t4 = /* @__PURE__ */ jsx(DialogContent, {
|
|
129
|
-
id: messageId,
|
|
130
|
-
children: payload.message
|
|
131
|
-
});
|
|
132
|
-
$[8] = messageId;
|
|
133
|
-
$[9] = payload.message;
|
|
134
|
-
$[10] = t4;
|
|
135
|
-
} else t4 = $[10];
|
|
136
|
-
let t5;
|
|
137
|
-
if ($[11] !== onClose) {
|
|
138
|
-
t5 = () => onClose(false);
|
|
139
|
-
$[11] = onClose;
|
|
140
|
-
$[12] = t5;
|
|
141
|
-
} else t5 = $[12];
|
|
142
|
-
let t6;
|
|
143
|
-
if ($[13] !== payload.cancelText || $[14] !== t) {
|
|
144
|
-
t6 = payload.cancelText ?? t("Layout.Dialog.Cancel");
|
|
145
|
-
$[13] = payload.cancelText;
|
|
146
|
-
$[14] = t;
|
|
147
|
-
$[15] = t6;
|
|
148
|
-
} else t6 = $[15];
|
|
149
|
-
let t7;
|
|
150
|
-
if ($[16] !== t5 || $[17] !== t6) {
|
|
151
|
-
t7 = /* @__PURE__ */ jsx(Button, {
|
|
152
|
-
onClick: t5,
|
|
153
|
-
children: t6
|
|
154
|
-
});
|
|
155
|
-
$[16] = t5;
|
|
156
|
-
$[17] = t6;
|
|
157
|
-
$[18] = t7;
|
|
158
|
-
} else t7 = $[18];
|
|
159
|
-
let t8;
|
|
160
|
-
if ($[19] !== onClose) {
|
|
161
|
-
t8 = () => onClose(true);
|
|
162
|
-
$[19] = onClose;
|
|
163
|
-
$[20] = t8;
|
|
164
|
-
} else t8 = $[20];
|
|
165
|
-
let t9;
|
|
166
|
-
if ($[21] !== payload.confirmText || $[22] !== t) {
|
|
167
|
-
t9 = payload.confirmText ?? t("Layout.Dialog.Confirm");
|
|
168
|
-
$[21] = payload.confirmText;
|
|
169
|
-
$[22] = t;
|
|
170
|
-
$[23] = t9;
|
|
171
|
-
} else t9 = $[23];
|
|
172
|
-
let t10;
|
|
173
|
-
if ($[24] !== t8 || $[25] !== t9) {
|
|
174
|
-
t10 = /* @__PURE__ */ jsx(Button, {
|
|
175
|
-
onClick: t8,
|
|
176
|
-
autoFocus: true,
|
|
177
|
-
children: t9
|
|
178
|
-
});
|
|
179
|
-
$[24] = t8;
|
|
180
|
-
$[25] = t9;
|
|
181
|
-
$[26] = t10;
|
|
182
|
-
} else t10 = $[26];
|
|
183
|
-
let t11;
|
|
184
|
-
if ($[27] !== t10 || $[28] !== t7) {
|
|
185
|
-
t11 = /* @__PURE__ */ jsxs(DialogActions, { children: [t7, t10] });
|
|
186
|
-
$[27] = t10;
|
|
187
|
-
$[28] = t7;
|
|
188
|
-
$[29] = t11;
|
|
189
|
-
} else t11 = $[29];
|
|
190
|
-
let t12;
|
|
191
|
-
if ($[30] !== messageId || $[31] !== open || $[32] !== t1 || $[33] !== t11 || $[34] !== t3 || $[35] !== t4) {
|
|
192
|
-
t12 = /* @__PURE__ */ jsxs(Dialog, {
|
|
193
|
-
maxWidth: "xs",
|
|
194
|
-
fullWidth: true,
|
|
195
|
-
open,
|
|
196
|
-
onClose: t1,
|
|
197
|
-
role: "alertdialog",
|
|
198
|
-
"aria-describedby": messageId,
|
|
199
|
-
children: [
|
|
200
|
-
t3,
|
|
201
|
-
t4,
|
|
202
|
-
t11
|
|
203
|
-
]
|
|
204
|
-
});
|
|
205
|
-
$[30] = messageId;
|
|
206
|
-
$[31] = open;
|
|
207
|
-
$[32] = t1;
|
|
208
|
-
$[33] = t11;
|
|
209
|
-
$[34] = t3;
|
|
210
|
-
$[35] = t4;
|
|
211
|
-
$[36] = t12;
|
|
212
|
-
} else t12 = $[36];
|
|
213
|
-
return t12;
|
|
214
|
-
}
|
|
215
|
-
function useDialogs() {
|
|
216
|
-
const $ = c(10);
|
|
217
|
-
if ($[0] !== "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a") {
|
|
218
|
-
for (let $i = 0; $i < 10; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
219
|
-
$[0] = "7a014b93eed9d5ade3ed852cdf1c7223a07a23240031c4ed08b8e8cc21adc47a";
|
|
220
|
-
}
|
|
221
|
-
const { open, close } = useContext(DialogsContext);
|
|
222
|
-
let t0;
|
|
223
|
-
if ($[1] !== open) {
|
|
224
|
-
t0 = (message, t1) => {
|
|
225
|
-
const { ...options } = t1 === void 0 ? {} : t1;
|
|
226
|
-
return open(AlertDialog, {
|
|
227
|
-
...options,
|
|
228
|
-
message
|
|
229
|
-
});
|
|
230
|
-
};
|
|
231
|
-
$[1] = open;
|
|
232
|
-
$[2] = t0;
|
|
233
|
-
} else t0 = $[2];
|
|
234
|
-
const alert = useEventCallback(t0);
|
|
235
|
-
let t1;
|
|
236
|
-
if ($[3] !== open) {
|
|
237
|
-
t1 = (message_0, t2) => {
|
|
238
|
-
const { ...options_0 } = t2 === void 0 ? {} : t2;
|
|
239
|
-
return open(ConfirmDialog, {
|
|
240
|
-
...options_0,
|
|
241
|
-
message: message_0
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
$[3] = open;
|
|
245
|
-
$[4] = t1;
|
|
246
|
-
} else t1 = $[4];
|
|
247
|
-
const confirm = useEventCallback(t1);
|
|
248
|
-
let t2;
|
|
249
|
-
if ($[5] !== alert || $[6] !== close || $[7] !== confirm || $[8] !== open) {
|
|
250
|
-
t2 = {
|
|
251
|
-
alert,
|
|
252
|
-
confirm,
|
|
253
|
-
open,
|
|
254
|
-
close
|
|
255
|
-
};
|
|
256
|
-
$[5] = alert;
|
|
257
|
-
$[6] = close;
|
|
258
|
-
$[7] = confirm;
|
|
259
|
-
$[8] = open;
|
|
260
|
-
$[9] = t2;
|
|
261
|
-
} else t2 = $[9];
|
|
262
|
-
return t2;
|
|
263
|
-
}
|
|
264
|
-
// src/components/table/context.ts
|
|
265
|
-
const layoutTableFeatures = tableFeatures({
|
|
266
|
-
...stockFeatures,
|
|
267
|
-
columnMeta: metaHelper(),
|
|
268
|
-
filteredRowModel: createFilteredRowModel(),
|
|
269
|
-
sortedRowModel: createSortedRowModel(),
|
|
270
|
-
paginatedRowModel: createPaginatedRowModel(),
|
|
271
|
-
expandedRowModel: createExpandedRowModel(),
|
|
272
|
-
groupedRowModel: createGroupedRowModel(),
|
|
273
|
-
facetedRowModel: createFacetedRowModel(),
|
|
274
|
-
facetedUniqueValues: createFacetedUniqueValues(),
|
|
275
|
-
facetedMinMaxValues: createFacetedMinMaxValues(),
|
|
276
|
-
filterFns: {
|
|
277
|
-
arrHas: filterFn_arrHas,
|
|
278
|
-
arrIncludes: filterFn_arrIncludes,
|
|
279
|
-
arrIncludesAll: filterFn_arrIncludesAll,
|
|
280
|
-
arrIncludesSome: filterFn_arrIncludesSome,
|
|
281
|
-
between: filterFn_between,
|
|
282
|
-
betweenInclusive: filterFn_betweenInclusive,
|
|
283
|
-
empty: filterFn_empty,
|
|
284
|
-
endsWith: filterFn_endsWith,
|
|
285
|
-
equals: filterFn_equals,
|
|
286
|
-
equalsString: filterFn_equalsString,
|
|
287
|
-
equalsStringSensitive: filterFn_equalsStringSensitive,
|
|
288
|
-
greaterThan: filterFn_greaterThan,
|
|
289
|
-
greaterThanOrEqualTo: filterFn_greaterThanOrEqualTo,
|
|
290
|
-
inDateRange: filterFn_inDateRange,
|
|
291
|
-
inNumberRange: filterFn_inNumberRange,
|
|
292
|
-
includesString: filterFn_includesString,
|
|
293
|
-
includesStringSensitive: filterFn_includesStringSensitive,
|
|
294
|
-
lessThan: filterFn_lessThan,
|
|
295
|
-
lessThanOrEqualTo: filterFn_lessThanOrEqualTo,
|
|
296
|
-
notEmpty: filterFn_notEmpty,
|
|
297
|
-
startsWith: filterFn_startsWith,
|
|
298
|
-
weakEquals: filterFn_weakEquals
|
|
299
|
-
},
|
|
300
|
-
sortFns: {
|
|
301
|
-
alphanumeric: sortFn_alphanumeric,
|
|
302
|
-
alphanumericCaseSensitive: sortFn_alphanumericCaseSensitive,
|
|
303
|
-
basic: sortFn_basic,
|
|
304
|
-
datetime: sortFn_datetime,
|
|
305
|
-
text: sortFn_text,
|
|
306
|
-
textCaseSensitive: sortFn_textCaseSensitive
|
|
307
|
-
},
|
|
308
|
-
aggregationFns: {
|
|
309
|
-
sum: aggregationFn_sum,
|
|
310
|
-
min: aggregationFn_min,
|
|
311
|
-
max: aggregationFn_max,
|
|
312
|
-
extent: aggregationFn_extent,
|
|
313
|
-
mean: aggregationFn_mean,
|
|
314
|
-
median: aggregationFn_median,
|
|
315
|
-
unique: aggregationFn_unique,
|
|
316
|
-
uniqueCount: aggregationFn_uniqueCount,
|
|
317
|
-
count: aggregationFn_count,
|
|
318
|
-
first: aggregationFn_first,
|
|
319
|
-
last: aggregationFn_last
|
|
320
|
-
}
|
|
321
|
-
});
|
|
322
|
-
const { tableContext, cellContext, headerContext, useTableContext, useCellContext, useHeaderContext } = createTableHookContexts();
|
|
323
|
-
// src/components/table/table/Pagination.tsx
|
|
324
|
-
/** A pager is for large data sets, so it offers no "All". LayoutTable starts at the lowest. */
|
|
325
|
-
const DEFAULT_PAGE_SIZE_OPTIONS = [
|
|
326
|
-
25,
|
|
327
|
-
50,
|
|
328
|
-
100
|
|
329
|
-
];
|
|
330
|
-
const Pagination = ({ pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS, ...props }) => {
|
|
331
|
-
"use no memo";
|
|
332
|
-
const table = useTableContext();
|
|
333
|
-
const { pageIndex, pageSize } = table.state.pagination;
|
|
334
|
-
return /* @__PURE__ */ jsx(TablePagination, {
|
|
335
|
-
component: "div",
|
|
336
|
-
showFirstButton: true,
|
|
337
|
-
showLastButton: true,
|
|
338
|
-
...props,
|
|
339
|
-
sx: [{
|
|
340
|
-
flexShrink: 0,
|
|
341
|
-
minHeight: 52,
|
|
342
|
-
borderTop: 1,
|
|
343
|
-
borderColor: "divider"
|
|
344
|
-
}, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
|
|
345
|
-
rowsPerPageOptions: pageSizeOptions,
|
|
346
|
-
count: table.getPageCount() === -1 ? -1 : table.getRowCount(),
|
|
347
|
-
page: pageIndex,
|
|
348
|
-
rowsPerPage: pageSize,
|
|
349
|
-
onPageChange: (_, page) => table.setPageIndex(page),
|
|
350
|
-
onRowsPerPageChange: (event) => table.setPagination({
|
|
351
|
-
pageIndex: 0,
|
|
352
|
-
pageSize: Number(event.target.value)
|
|
353
|
-
})
|
|
354
|
-
});
|
|
355
|
-
};
|
|
356
|
-
// src/components/table/utils.ts
|
|
357
|
-
/** Stable class names on every table part, for `sx` selectors like `.MuiDataGrid-*`. */
|
|
358
|
-
const layoutTableClasses = {
|
|
359
|
-
root: "LayoutTable-root",
|
|
360
|
-
main: "LayoutTable-main",
|
|
361
|
-
table: "LayoutTable-table",
|
|
362
|
-
toolbar: "LayoutTable-toolbar",
|
|
363
|
-
toolbarLabel: "LayoutTable-toolbarLabel",
|
|
364
|
-
toolbarTitle: "LayoutTable-toolbarTitle",
|
|
365
|
-
toolbarSelectedCount: "LayoutTable-toolbarSelectedCount",
|
|
366
|
-
toolbarDivider: "LayoutTable-toolbarDivider",
|
|
367
|
-
toolbarQuickFilter: "LayoutTable-toolbarQuickFilter",
|
|
368
|
-
columnsButton: "LayoutTable-columnsButton",
|
|
369
|
-
columnsPanel: "LayoutTable-columnsPanel",
|
|
370
|
-
filtersButton: "LayoutTable-filtersButton",
|
|
371
|
-
filterPanel: "LayoutTable-filterPanel",
|
|
372
|
-
columnHeaders: "LayoutTable-columnHeaders",
|
|
373
|
-
columnHeaderRow: "LayoutTable-columnHeaderRow",
|
|
374
|
-
columnHeader: "LayoutTable-columnHeader",
|
|
375
|
-
"columnHeader--sortable": "LayoutTable-columnHeader--sortable",
|
|
376
|
-
"columnHeader--sorted": "LayoutTable-columnHeader--sorted",
|
|
377
|
-
"columnHeader--filtered": "LayoutTable-columnHeader--filtered",
|
|
378
|
-
"columnHeader--pinnedStart": "LayoutTable-columnHeader--pinnedStart",
|
|
379
|
-
"columnHeader--pinnedEnd": "LayoutTable-columnHeader--pinnedEnd",
|
|
380
|
-
columnHeaderContent: "LayoutTable-columnHeaderContent",
|
|
381
|
-
columnHeaderTitleContainer: "LayoutTable-columnHeaderTitleContainer",
|
|
382
|
-
sortLabel: "LayoutTable-sortLabel",
|
|
383
|
-
sortIndex: "LayoutTable-sortIndex",
|
|
384
|
-
menuIcon: "LayoutTable-menuIcon",
|
|
385
|
-
columnSeparator: "LayoutTable-columnSeparator",
|
|
386
|
-
"columnSeparator--resizable": "LayoutTable-columnSeparator--resizable",
|
|
387
|
-
"columnSeparator--resizing": "LayoutTable-columnSeparator--resizing",
|
|
388
|
-
body: "LayoutTable-body",
|
|
389
|
-
row: "LayoutTable-row",
|
|
390
|
-
"row--grouped": "LayoutTable-row--grouped",
|
|
391
|
-
"row--expanded": "LayoutTable-row--expanded",
|
|
392
|
-
"row--pinned": "LayoutTable-row--pinned",
|
|
393
|
-
cell: "LayoutTable-cell",
|
|
394
|
-
"cell--selected": "LayoutTable-cell--selected",
|
|
395
|
-
"cell--grouped": "LayoutTable-cell--grouped",
|
|
396
|
-
"cell--aggregated": "LayoutTable-cell--aggregated",
|
|
397
|
-
"cell--pinnedStart": "LayoutTable-cell--pinnedStart",
|
|
398
|
-
"cell--pinnedEnd": "LayoutTable-cell--pinnedEnd",
|
|
399
|
-
groupCell: "LayoutTable-groupCell",
|
|
400
|
-
expandButton: "LayoutTable-expandButton",
|
|
401
|
-
actionsCell: "LayoutTable-actionsCell",
|
|
402
|
-
cellOffset: "LayoutTable-cellOffset",
|
|
403
|
-
rowOffset: "LayoutTable-rowOffset",
|
|
404
|
-
filler: "LayoutTable-filler",
|
|
405
|
-
skeletonRow: "LayoutTable-skeletonRow",
|
|
406
|
-
skeletonCell: "LayoutTable-skeletonCell",
|
|
407
|
-
overlay: "LayoutTable-overlay",
|
|
408
|
-
footer: "LayoutTable-footer",
|
|
409
|
-
footerRow: "LayoutTable-footerRow",
|
|
410
|
-
footerCell: "LayoutTable-footerCell",
|
|
411
|
-
aggregationValue: "LayoutTable-aggregationValue",
|
|
412
|
-
pagination: "LayoutTable-pagination"
|
|
413
|
-
};
|
|
414
|
-
const classNames = (...names) => names.filter(Boolean).join(" ");
|
|
415
|
-
const pinnedClass = (column, part) => {
|
|
416
|
-
const pinned = column.getIsPinned();
|
|
417
|
-
return !!pinned && layoutTableClasses[`${part}--${pinned === "start" ? "pinnedStart" : "pinnedEnd"}`];
|
|
418
|
-
};
|
|
419
|
-
const shortcutLabel = (label, hotkey) => `${label} (${formatForDisplay(hotkey)})`;
|
|
420
|
-
const columnLabel = (column) => {
|
|
421
|
-
const meta = column.columnDef.meta;
|
|
422
|
-
if (meta?.label) return meta.label;
|
|
423
|
-
return typeof column.columnDef.header === "string" ? column.columnDef.header : column.id;
|
|
424
|
-
};
|
|
425
|
-
const hasColumnLabel = (column) => Boolean(column.columnDef.meta?.label) || typeof column.columnDef.header === "string";
|
|
426
|
-
const columnAlign = (column) => column.columnDef.meta?.align ?? (hasColumnLabel(column) ? "left" : "center");
|
|
427
|
-
/** The column's `meta.flex`, or 0 once the user has resized it to a fixed width. */
|
|
428
|
-
const columnFlex = (column) => Object.hasOwn(column.table.atoms.columnSizing.get(), column.id) ? 0 : column.columnDef.meta?.flex ?? 0;
|
|
429
|
-
const moveColumn = (column, delta) => {
|
|
430
|
-
const { table } = column;
|
|
431
|
-
const current = table.atoms.columnOrder.get();
|
|
432
|
-
const order = current.length ? [...current] : table.getAllLeafColumns().map(({ id }) => id);
|
|
433
|
-
const from = order.indexOf(column.id);
|
|
434
|
-
const to = from + delta;
|
|
435
|
-
if (from < 0 || to < 0 || to >= order.length) return;
|
|
436
|
-
order.splice(to, 0, ...order.splice(from, 1));
|
|
437
|
-
table.setColumnOrder(order);
|
|
438
|
-
};
|
|
439
|
-
const pinnedSx = (column, isHeader = false) => {
|
|
440
|
-
const pinned = column.getIsPinned();
|
|
441
|
-
if (!pinned) return {};
|
|
442
|
-
return {
|
|
443
|
-
position: "sticky",
|
|
444
|
-
zIndex: isHeader ? 4 : 2,
|
|
445
|
-
insetInlineStart: pinned === "start" ? column.getStart("start") : void 0,
|
|
446
|
-
insetInlineEnd: pinned === "end" ? column.getAfter("end") : void 0,
|
|
447
|
-
bgcolor: "background.paper",
|
|
448
|
-
...!isHeader && {
|
|
449
|
-
".MuiTableRow-root:hover > &": { backgroundImage: (theme) => `linear-gradient(${theme.palette.action.hover}, ${theme.palette.action.hover})` },
|
|
450
|
-
".MuiTableRow-root.Mui-selected > &": { backgroundImage: (theme) => `linear-gradient(${theme.palette.action.selected}, ${theme.palette.action.selected})` }
|
|
451
|
-
},
|
|
452
|
-
...pinned === "start" && column.getIsLastColumn("start") && {
|
|
453
|
-
borderInlineEnd: 1,
|
|
454
|
-
borderInlineEndStyle: "solid",
|
|
455
|
-
borderColor: "divider"
|
|
456
|
-
},
|
|
457
|
-
...pinned === "end" && column.getIsFirstColumn("end") && {
|
|
458
|
-
borderInlineStart: 1,
|
|
459
|
-
borderInlineStartStyle: "solid",
|
|
460
|
-
borderColor: "divider"
|
|
461
|
-
}
|
|
462
|
-
};
|
|
463
|
-
};
|
|
464
|
-
const cellSelectionSx = (cell) => {
|
|
465
|
-
if (!cell.getIsSelected()) return {};
|
|
466
|
-
const edges = cell.getSelectionEdges();
|
|
467
|
-
const outline = (theme) => [
|
|
468
|
-
edges.top && `inset 0 2px 0 0 ${theme.palette.primary.main}`,
|
|
469
|
-
edges.bottom && `inset 0 -2px 0 0 ${theme.palette.primary.main}`,
|
|
470
|
-
edges.left && `inset 2px 0 0 0 ${theme.palette.primary.main}`,
|
|
471
|
-
edges.right && `inset -2px 0 0 0 ${theme.palette.primary.main}`
|
|
472
|
-
].filter(Boolean).join(", ") || "none";
|
|
473
|
-
return {
|
|
474
|
-
backgroundImage: (theme) => `linear-gradient(${theme.palette.action.selected}, ${theme.palette.action.selected})`,
|
|
475
|
-
boxShadow: outline
|
|
476
|
-
};
|
|
477
|
-
};
|
|
478
|
-
/** Spreadsheet TSV quoting, so a cell holding a tab or a newline stays one cell. */
|
|
479
|
-
const quoteTsv = (text) => /["\t\n\r]/.test(text) ? `"${text.replaceAll("\"", "\"\"")}"` : text;
|
|
480
|
-
const toClipboardValue = (value) => {
|
|
481
|
-
if (value == null) return "";
|
|
482
|
-
if (typeof value === "string") return quoteTsv(value);
|
|
483
|
-
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return quoteTsv(String(value));
|
|
484
|
-
if (value instanceof Date) return quoteTsv(value.toISOString());
|
|
485
|
-
return quoteTsv(JSON.stringify(value) ?? "");
|
|
486
|
-
};
|
|
487
|
-
/**
|
|
488
|
-
* Serializes `table.getSelectedCellRangesData()` as TSV, which is what Excel,
|
|
489
|
-
* Google Sheets and LibreOffice all paste as a grid. Disjoint selection regions
|
|
490
|
-
* are separated by a blank line.
|
|
491
|
-
*/
|
|
492
|
-
const toClipboardText = (regions) => regions.map((rows) => rows.map((cells) => cells.map(toClipboardValue).join(" ")).join("\n")).join("\n\n");
|
|
493
|
-
const lookaheadRange = (range, direction, lookahead) => {
|
|
494
|
-
const behind = direction ? 0 : range.overscan;
|
|
495
|
-
const ahead = direction ? lookahead : range.overscan;
|
|
496
|
-
return defaultRangeExtractor({
|
|
497
|
-
...range,
|
|
498
|
-
startIndex: range.startIndex - (direction === "backward" ? ahead : behind),
|
|
499
|
-
endIndex: range.endIndex + (direction === "backward" ? behind : ahead),
|
|
500
|
-
overscan: 0
|
|
501
|
-
});
|
|
502
|
-
};
|
|
503
|
-
// src/components/table/formatValue.ts
|
|
504
|
-
const formatValue = (value, dateFormat = "L LT") => {
|
|
505
|
-
if (value === null || value === void 0) return "";
|
|
506
|
-
if (value instanceof Date) return dayjs(value).format(dateFormat);
|
|
507
|
-
if (typeof value === "string") return value;
|
|
508
|
-
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return value.toString();
|
|
509
|
-
return JSON.stringify(value) ?? "";
|
|
510
|
-
};
|
|
511
|
-
// src/components/table/cells/formatters/AggregatedCell.tsx
|
|
512
|
-
const AggregatedCell = (t0) => {
|
|
513
|
-
const $ = c(30);
|
|
514
|
-
if ($[0] !== "4277c795cc5aa79cb8c9da3c17c3eca0172b2cb25ae31116d08eb0a5b925c1d5") {
|
|
515
|
-
for (let $i = 0; $i < 30; $i += 1) $[$i] = Symbol.for("react.memo_cache_sentinel");
|
|
516
|
-
$[0] = "4277c795cc5aa79cb8c9da3c17c3eca0172b2cb25ae31116d08eb0a5b925c1d5";
|
|
517
|
-
}
|
|
518
|
-
let dateFormat;
|
|
519
|
-
let options;
|
|
520
|
-
let props;
|
|
521
|
-
let t1;
|
|
522
|
-
if ($[1] !== t0) {
|
|
523
|
-
({prefix: t1, options, dateFormat, ...props} = t0);
|
|
524
|
-
$[1] = t0;
|
|
525
|
-
$[2] = dateFormat;
|
|
526
|
-
$[3] = options;
|
|
527
|
-
$[4] = props;
|
|
528
|
-
$[5] = t1;
|
|
529
|
-
} else {
|
|
530
|
-
dateFormat = $[2];
|
|
531
|
-
options = $[3];
|
|
532
|
-
props = $[4];
|
|
533
|
-
t1 = $[5];
|
|
534
|
-
}
|
|
535
|
-
const prefix = t1 === void 0 ? "" : t1;
|
|
536
|
-
const cell = useCellContext();
|
|
537
|
-
let T0;
|
|
538
|
-
let t2;
|
|
539
|
-
let t3;
|
|
540
|
-
let t4;
|
|
541
|
-
let t5;
|
|
542
|
-
let t6;
|
|
543
|
-
let t7;
|
|
544
|
-
let t8;
|
|
545
|
-
if ($[6] !== cell || $[7] !== dateFormat || $[8] !== options || $[9] !== prefix || $[10] !== props) {
|
|
546
|
-
t8 = Symbol.for("react.early_return_sentinel");
|
|
547
|
-
bb0: {
|
|
548
|
-
const value = cell.getValue();
|
|
549
|
-
if (value === null || value === void 0 || value === "") {
|
|
550
|
-
t8 = null;
|
|
551
|
-
break bb0;
|
|
552
|
-
}
|
|
553
|
-
let t9;
|
|
554
|
-
if ($[19] !== dateFormat || $[20] !== options) {
|
|
555
|
-
t9 = (entry) => typeof entry === "number" ? entry.toLocaleString(void 0, options) : formatValue(entry, dateFormat);
|
|
556
|
-
$[19] = dateFormat;
|
|
557
|
-
$[20] = options;
|
|
558
|
-
$[21] = t9;
|
|
559
|
-
} else t9 = $[21];
|
|
560
|
-
const format = t9;
|
|
561
|
-
T0 = Typography;
|
|
562
|
-
t2 = "body2";
|
|
563
|
-
t3 = "text.secondary";
|
|
564
|
-
t4 = true;
|
|
565
|
-
t5 = props;
|
|
566
|
-
t6 = prefix;
|
|
567
|
-
t7 = Array.isArray(value) ? value.map(format).join(" – ") : format(value);
|
|
568
|
-
}
|
|
569
|
-
$[6] = cell;
|
|
570
|
-
$[7] = dateFormat;
|
|
571
|
-
$[8] = options;
|
|
572
|
-
$[9] = prefix;
|
|
573
|
-
$[10] = props;
|
|
574
|
-
$[11] = T0;
|
|
575
|
-
$[12] = t2;
|
|
576
|
-
$[13] = t3;
|
|
577
|
-
$[14] = t4;
|
|
578
|
-
$[15] = t5;
|
|
579
|
-
$[16] = t6;
|
|
580
|
-
$[17] = t7;
|
|
581
|
-
$[18] = t8;
|
|
582
|
-
} else {
|
|
583
|
-
T0 = $[11];
|
|
584
|
-
t2 = $[12];
|
|
585
|
-
t3 = $[13];
|
|
586
|
-
t4 = $[14];
|
|
587
|
-
t5 = $[15];
|
|
588
|
-
t6 = $[16];
|
|
589
|
-
t7 = $[17];
|
|
590
|
-
t8 = $[18];
|
|
591
|
-
}
|
|
592
|
-
if (t8 !== Symbol.for("react.early_return_sentinel")) return t8;
|
|
593
|
-
let t9;
|
|
594
|
-
if ($[22] !== T0 || $[23] !== t2 || $[24] !== t3 || $[25] !== t4 || $[26] !== t5 || $[27] !== t6 || $[28] !== t7) {
|
|
595
|
-
t9 = /* @__PURE__ */ jsxs(T0, {
|
|
596
|
-
variant: t2,
|
|
597
|
-
color: t3,
|
|
598
|
-
noWrap: t4,
|
|
599
|
-
...t5,
|
|
600
|
-
children: [t6, t7]
|
|
601
|
-
});
|
|
602
|
-
$[22] = T0;
|
|
603
|
-
$[23] = t2;
|
|
604
|
-
$[24] = t3;
|
|
605
|
-
$[25] = t4;
|
|
606
|
-
$[26] = t5;
|
|
607
|
-
$[27] = t6;
|
|
608
|
-
$[28] = t7;
|
|
609
|
-
$[29] = t9;
|
|
610
|
-
} else t9 = $[29];
|
|
611
|
-
return t9;
|
|
612
|
-
};
|
|
613
|
-
export { useHeaderContext as C, useCellContext as S, useDialogs as T, Pagination as _, columnAlign as a, layoutTableFeatures as b, hasColumnLabel as c, moveColumn as d, pinnedClass as f, DEFAULT_PAGE_SIZE_OPTIONS as g, toClipboardText as h, classNames as i, layoutTableClasses as l, shortcutLabel as m, formatValue as n, columnFlex as o, pinnedSx as p, cellSelectionSx as r, columnLabel as s, AggregatedCell as t, lookaheadRange as u, cellContext as v, useTableContext as w, tableContext as x, headerContext as y };
|
|
614
|
-
|
|
615
|
-
//# sourceMappingURL=AggregatedCell-3CIdlmt6.mjs.map
|