wcz-layout 10.2.2 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{ChatLayout-CkS9oyPp.mjs → ChatLayout-B0MBrI-Y.mjs} +839 -371
  2. package/dist/ChatLayout-B0MBrI-Y.mjs.map +1 -0
  3. package/dist/{ExtractFile-ClTc-e1H.d.mts → ExtractFile-BQUXpuBS.d.mts} +27 -3
  4. package/dist/FileMeta-B5VU-eCi.d.mts +55 -0
  5. package/dist/FileMeta-BexXC_45.mjs +35 -0
  6. package/dist/FileMeta-BexXC_45.mjs.map +1 -0
  7. package/dist/QueryClientParam-BG9Q_9XU.d.mts +6 -0
  8. package/dist/{Translate-BiCjnlyx.mjs → Translate-C43AmXYW.mjs} +25 -37
  9. package/dist/Translate-C43AmXYW.mjs.map +1 -0
  10. package/dist/User-CvLutatT.d.mts +10 -0
  11. package/dist/ai.d.mts +1 -1
  12. package/dist/ai.mjs +2 -2
  13. package/dist/ai.mjs.map +1 -1
  14. package/dist/auth.d.mts +6 -14
  15. package/dist/auth.mjs +15 -38
  16. package/dist/auth.mjs.map +1 -1
  17. package/dist/{authMiddleware-D4GSt7m9.mjs → authMiddleware-ANa9Tlmp.mjs} +10 -15
  18. package/dist/authMiddleware-ANa9Tlmp.mjs.map +1 -0
  19. package/dist/{ChatLayout-BmLySLXy.d.mts → components-2HKj8GpC.d.mts} +219 -255
  20. package/dist/components.d.mts +2 -126
  21. package/dist/components.mjs +871 -919
  22. package/dist/components.mjs.map +1 -1
  23. package/dist/data/client.d.mts +299 -57
  24. package/dist/data/client.mjs +5 -6
  25. package/dist/data/client.mjs.map +1 -1
  26. package/dist/data/server.d.mts +6 -5
  27. package/dist/data/server.mjs +3 -5
  28. package/dist/data/server.mjs.map +1 -1
  29. package/dist/env-C4WLVJMm.mjs +32 -0
  30. package/dist/env-C4WLVJMm.mjs.map +1 -0
  31. package/dist/file-DBqTibcr.mjs +176 -0
  32. package/dist/file-DBqTibcr.mjs.map +1 -0
  33. package/dist/file-hecCQszp.mjs +114 -0
  34. package/dist/file-hecCQszp.mjs.map +1 -0
  35. package/dist/hooks.d.mts +11 -91
  36. package/dist/hooks.mjs +152 -960
  37. package/dist/hooks.mjs.map +1 -1
  38. package/dist/i18n-ZRiIIdpb.mjs +563 -0
  39. package/dist/i18n-ZRiIIdpb.mjs.map +1 -0
  40. package/dist/index.d.mts +3 -35
  41. package/dist/index.mjs +409 -510
  42. package/dist/index.mjs.map +1 -1
  43. package/dist/layout-DeTB6Ai1.mjs +224 -0
  44. package/dist/layout-DeTB6Ai1.mjs.map +1 -0
  45. package/dist/middleware.d.mts +1 -1
  46. package/dist/middleware.mjs +2 -2
  47. package/dist/models.d.mts +34 -42
  48. package/dist/models.mjs +4 -6
  49. package/dist/models.mjs.map +1 -1
  50. package/dist/oidc--D2ox365.mjs +97 -0
  51. package/dist/oidc--D2ox365.mjs.map +1 -0
  52. package/dist/peoplesoft-DhwB8jrM.d.mts +204 -0
  53. package/dist/tokens-C4djIAhl.mjs +97 -0
  54. package/dist/tokens-C4djIAhl.mjs.map +1 -0
  55. package/dist/useDialogs-QER-2rVG.mjs +297 -0
  56. package/dist/useDialogs-QER-2rVG.mjs.map +1 -0
  57. package/dist/{user-Bc2nLjAG.mjs → user-DQx1BanQ.mjs} +4 -20
  58. package/dist/user-DQx1BanQ.mjs.map +1 -0
  59. package/dist/{utils-CNYCSgip.d.mts → utils-BnyAEKW7.d.mts} +7 -9
  60. package/dist/{utils-CgabUlDD.mjs → utils-H4BskGF8.mjs} +21 -20
  61. package/dist/utils-H4BskGF8.mjs.map +1 -0
  62. package/dist/utils.d.mts +21 -4
  63. package/dist/utils.mjs +5 -4
  64. package/dist/vite.mjs +98 -32
  65. package/dist/vite.mjs.map +1 -1
  66. package/package.json +16 -43
  67. package/skills/ai/SKILL.md +1 -4
  68. package/skills/general/SKILL.md +15 -8
  69. package/skills/general/references/auth.md +10 -16
  70. package/skills/general/references/languages.md +56 -0
  71. package/skills/migrations/versions/migrate-v10-to-v11.md +98 -22
  72. package/skills/migrations/versions/migrate-v9-to-v10.md +22 -22
  73. package/skills/services/SKILL.md +1 -1
  74. package/skills/services/docs/email.md +2 -2
  75. package/skills/services/docs/file.md +100 -85
  76. package/skills/services/docs/layout.md +2 -3
  77. package/skills/start/steps/02-project-name-setup.md +1 -1
  78. package/skills/start/steps/06-entra-setup.md +1 -1
  79. package/skills/start/steps/08-generate-favicon.md +1 -1
  80. package/skills/table/SKILL.md +18 -5
  81. package/src/lib/locales/cs.json +120 -0
  82. package/src/lib/locales/en.json +119 -0
  83. package/src/lib/locales/uk.json +121 -0
  84. package/src/lib/locales/zh-TW.json +118 -0
  85. package/dist/ChatLayout-CkS9oyPp.mjs.map +0 -1
  86. package/dist/DialogsContext-D23fJjYR.mjs +0 -6
  87. package/dist/DialogsContext-D23fJjYR.mjs.map +0 -1
  88. package/dist/FileMeta-B39e2FLC.d.mts +0 -17
  89. package/dist/FileMeta-CPBWI_jA.mjs +0 -18
  90. package/dist/FileMeta-CPBWI_jA.mjs.map +0 -1
  91. package/dist/QueryClientParam-CTV1vj76.d.mts +0 -8
  92. package/dist/RouterListItemButton-CF-8w-08.mjs +0 -62
  93. package/dist/RouterListItemButton-CF-8w-08.mjs.map +0 -1
  94. package/dist/Translate-BiCjnlyx.mjs.map +0 -1
  95. package/dist/User-aJksXItw.d.mts +0 -12
  96. package/dist/authMiddleware-D4GSt7m9.mjs.map +0 -1
  97. package/dist/createApi-CF4ZL82B.mjs +0 -24
  98. package/dist/createApi-CF4ZL82B.mjs.map +0 -1
  99. package/dist/env-Cddts_dn.mjs +0 -49
  100. package/dist/env-Cddts_dn.mjs.map +0 -1
  101. package/dist/file-D4kSR_lC.mjs +0 -149
  102. package/dist/file-D4kSR_lC.mjs.map +0 -1
  103. package/dist/file-DcwYjofa.mjs +0 -150
  104. package/dist/file-DcwYjofa.mjs.map +0 -1
  105. package/dist/layout-6We_KFgN.mjs +0 -107
  106. package/dist/layout-6We_KFgN.mjs.map +0 -1
  107. package/dist/peoplesoft-DH31FCMC.mjs +0 -125
  108. package/dist/peoplesoft-DH31FCMC.mjs.map +0 -1
  109. package/dist/peoplesoft-DXukeeFr.d.mts +0 -161
  110. package/dist/providers-DOFje2P6.mjs +0 -56
  111. package/dist/providers-DOFje2P6.mjs.map +0 -1
  112. package/dist/tokens-DNe_Qifk.mjs +0 -204
  113. package/dist/tokens-DNe_Qifk.mjs.map +0 -1
  114. package/dist/user-Bc2nLjAG.mjs.map +0 -1
  115. package/dist/utils-CgabUlDD.mjs.map +0 -1
package/dist/hooks.mjs CHANGED
@@ -1,27 +1,25 @@
1
- import { a as foldForSearch, o as getFieldStatus } from "./utils-CgabUlDD.mjs";
2
- import { C as tableContext, E as useTableContext, O as useDialogs, S as layoutTableFeatures, T as useHeaderContext, b as cellContext, c as columnFlex, d as layoutTableClasses, g as shortcutLabel, i as formatValue, l as columnLabel, n as createUiTools, o as classNames, p as moveColumn, r as AggregatedCell, t as ChatLayout, u as hasColumnLabel, w as useCellContext, x as headerContext, y as Pagination } from "./ChatLayout-CkS9oyPp.mjs";
1
+ import { C as shortcutLabel, D as useLayoutForm, E as useFormContext, O as withLayoutForm, T as useFieldContext, _ as hasColumnLabel, a as headerContext, b as moveColumn, c as useCellContext, d as formatValue, g as columnLabel, h as columnFlex, i as cellContext, l as useHeaderContext, n as createUiTools, o as layoutTableFeatures, p as classNames, r as AggregatedCell, s as tableContext, t as ChatLayout, u as useTableContext, v as layoutTableClasses } from "./ChatLayout-B0MBrI-Y.mjs";
2
+ import { n as useDialogs, r as useTranslation } from "./useDialogs-QER-2rVG.mjs";
3
+ import { a as foldForSearch } from "./utils-H4BskGF8.mjs";
3
4
  import { c } from "react/compiler-runtime";
4
- import { Autocomplete, Badge, Box, Button, Checkbox, Divider, FormControl, FormControlLabel, FormHelperText, FormLabel, IconButton, InputAdornment, InputLabel, ListItemIcon, ListItemText, Menu, MenuItem, Popover, Radio, RadioGroup, Select, Skeleton, Slider, Stack, Switch, TableCell, TableRow, TableSortLabel, TextField, Tooltip, Typography, useColorScheme, useTheme } from "@mui/material";
5
+ import { Autocomplete, Badge, Box, Button, Checkbox, Divider, FormControl, FormControlLabel, IconButton, InputAdornment, InputLabel, ListItemIcon, ListItemText, Menu, MenuItem, Popover, Select, Skeleton, Stack, TableCell, TablePagination, TableRow, TableSortLabel, TextField, Tooltip, Typography, useColorScheme, useTheme } from "@mui/material";
5
6
  import { useQueryClient } from "@tanstack/react-query";
6
- import { DatePicker, DateTimePicker, TimePicker } from "@mui/x-date-pickers";
7
- import dayjs from "dayjs";
8
- import { useEffect, useId, useRef, useState } from "react";
9
- import { useTranslation, useTranslation as useTranslation$1 } from "react-i18next";
10
- import { z as z$1 } from "zod";
7
+ import { useEffect, useRef, useState } from "react";
8
+ import { useTranslation as useTranslation$1 } from "react-i18next";
11
9
  import { rootRouteId, useMatch, useRouter } from "@tanstack/react-router";
12
10
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
+ import { z as z$1 } from "zod";
13
12
  import ArrowBack from "@mui/icons-material/ArrowBack";
14
13
  import Close from "@mui/icons-material/Close";
14
+ import dayjs from "dayjs";
15
15
  import MoreVert from "@mui/icons-material/MoreVert";
16
- import { useInView } from "react-intersection-observer";
17
16
  import { useHotkey } from "@tanstack/react-hotkeys";
18
17
  import { FlexRender, Subscribe, constructFilterFn, createTableHook, filterFn_arrHas, filterFn_empty, filterFn_endsWith, filterFn_equals, filterFn_equalsString, filterFn_greaterThan, filterFn_greaterThanOrEqualTo, filterFn_inDateRange, filterFn_inNumberRange, filterFn_includesString, filterFn_lessThan, filterFn_lessThanOrEqualTo, filterFn_notEmpty, filterFn_startsWith } from "@tanstack/react-table";
19
18
  import Add from "@mui/icons-material/Add";
20
19
  import ArrowUpward from "@mui/icons-material/ArrowUpward";
21
20
  import { sessionStoragePersistence, useChat } from "@tanstack/ai-react";
22
21
  import { convertSchemaToJsonSchema, toolDefinition, uiMessagesToWire } from "@tanstack/ai/client";
23
- import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
24
- import { NumericFormat } from "react-number-format";
22
+ import { useInView } from "react-intersection-observer";
25
23
  import KeyboardArrowDown from "@mui/icons-material/KeyboardArrowDown";
26
24
  import KeyboardArrowRight from "@mui/icons-material/KeyboardArrowRight";
27
25
  import PushPin from "@mui/icons-material/PushPin";
@@ -38,838 +36,6 @@ import FilterList from "@mui/icons-material/FilterList";
38
36
  import { useDebouncedCallback } from "@tanstack/react-pacer/debouncer";
39
37
  import Search from "@mui/icons-material/Search";
40
38
  import { flushSync } from "react-dom";
41
- // src/components/form/FormAutocomplete.tsx
42
- const FormAutocomplete = (t0) => {
43
- const $ = c(22);
44
- let autocompleteProps;
45
- let textFieldProps;
46
- if ($[0] !== t0) {
47
- ({textFieldProps, ...autocompleteProps} = t0);
48
- $[0] = t0;
49
- $[1] = autocompleteProps;
50
- $[2] = textFieldProps;
51
- } else {
52
- autocompleteProps = $[1];
53
- textFieldProps = $[2];
54
- }
55
- const field = useFieldContext();
56
- let t1;
57
- if ($[3] !== field) {
58
- t1 = getFieldStatus(field);
59
- $[3] = field;
60
- $[4] = t1;
61
- } else t1 = $[4];
62
- const { isTouched, hasError, helperText } = t1;
63
- let t2;
64
- let t3;
65
- if ($[5] !== autocompleteProps.freeSolo || $[6] !== field) {
66
- t2 = (_, value) => !autocompleteProps.freeSolo && field.handleChange(value);
67
- t3 = (__0, value_0, reason) => reason !== "reset" && autocompleteProps.freeSolo && field.handleChange(value_0);
68
- $[5] = autocompleteProps.freeSolo;
69
- $[6] = field;
70
- $[7] = t2;
71
- $[8] = t3;
72
- } else {
73
- t2 = $[7];
74
- t3 = $[8];
75
- }
76
- let t4;
77
- if ($[9] !== field.name || $[10] !== hasError || $[11] !== helperText || $[12] !== isTouched || $[13] !== textFieldProps) {
78
- t4 = (parameters) => /* @__PURE__ */ jsx(TextField, {
79
- ...parameters,
80
- name: field.name,
81
- error: isTouched && hasError,
82
- helperText: isTouched && helperText,
83
- ...textFieldProps
84
- });
85
- $[9] = field.name;
86
- $[10] = hasError;
87
- $[11] = helperText;
88
- $[12] = isTouched;
89
- $[13] = textFieldProps;
90
- $[14] = t4;
91
- } else t4 = $[14];
92
- let t5;
93
- if ($[15] !== autocompleteProps || $[16] !== field.handleBlur || $[17] !== field.state.value || $[18] !== t2 || $[19] !== t3 || $[20] !== t4) {
94
- t5 = /* @__PURE__ */ jsx(Autocomplete, {
95
- value: field.state.value,
96
- onChange: t2,
97
- onInputChange: t3,
98
- onBlur: field.handleBlur,
99
- ...autocompleteProps,
100
- renderInput: t4
101
- });
102
- $[15] = autocompleteProps;
103
- $[16] = field.handleBlur;
104
- $[17] = field.state.value;
105
- $[18] = t2;
106
- $[19] = t3;
107
- $[20] = t4;
108
- $[21] = t5;
109
- } else t5 = $[21];
110
- return t5;
111
- };
112
- // src/components/form/FormCheckbox.tsx
113
- const FormCheckbox = (t0) => {
114
- const $ = c(28);
115
- let label;
116
- let props;
117
- if ($[0] !== t0) {
118
- ({label, ...props} = t0);
119
- $[0] = t0;
120
- $[1] = label;
121
- $[2] = props;
122
- } else {
123
- label = $[1];
124
- props = $[2];
125
- }
126
- const field = useFieldContext();
127
- let t1;
128
- if ($[3] !== field) {
129
- t1 = getFieldStatus(field);
130
- $[3] = field;
131
- $[4] = t1;
132
- } else t1 = $[4];
133
- const { isTouched, hasError, helperText } = t1;
134
- const showError = isTouched && hasError;
135
- const helperId = useId();
136
- const t2 = field.name;
137
- const t3 = Boolean(field.state.value);
138
- let t4;
139
- if ($[5] !== field) {
140
- t4 = (event) => field.handleChange(event.target.checked);
141
- $[5] = field;
142
- $[6] = t4;
143
- } else t4 = $[6];
144
- const t5 = showError || void 0;
145
- const t6 = showError ? helperId : void 0;
146
- let t7;
147
- if ($[7] !== t5 || $[8] !== t6) {
148
- t7 = { input: {
149
- "aria-invalid": t5,
150
- "aria-describedby": t6
151
- } };
152
- $[7] = t5;
153
- $[8] = t6;
154
- $[9] = t7;
155
- } else t7 = $[9];
156
- let t8;
157
- if ($[10] !== field.handleBlur || $[11] !== field.name || $[12] !== props || $[13] !== t3 || $[14] !== t4 || $[15] !== t7) {
158
- t8 = /* @__PURE__ */ jsx(Checkbox, {
159
- name: t2,
160
- checked: t3,
161
- onChange: t4,
162
- onBlur: field.handleBlur,
163
- slotProps: t7,
164
- ...props
165
- });
166
- $[10] = field.handleBlur;
167
- $[11] = field.name;
168
- $[12] = props;
169
- $[13] = t3;
170
- $[14] = t4;
171
- $[15] = t7;
172
- $[16] = t8;
173
- } else t8 = $[16];
174
- const t9 = label ?? "";
175
- let t10;
176
- if ($[17] !== t8 || $[18] !== t9) {
177
- t10 = /* @__PURE__ */ jsx(FormControlLabel, {
178
- control: t8,
179
- label: t9
180
- });
181
- $[17] = t8;
182
- $[18] = t9;
183
- $[19] = t10;
184
- } else t10 = $[19];
185
- let t11;
186
- if ($[20] !== helperId || $[21] !== helperText || $[22] !== showError) {
187
- t11 = showError && /* @__PURE__ */ jsx(FormHelperText, {
188
- id: helperId,
189
- children: helperText
190
- });
191
- $[20] = helperId;
192
- $[21] = helperText;
193
- $[22] = showError;
194
- $[23] = t11;
195
- } else t11 = $[23];
196
- let t12;
197
- if ($[24] !== showError || $[25] !== t10 || $[26] !== t11) {
198
- t12 = /* @__PURE__ */ jsxs(FormControl, {
199
- error: showError,
200
- children: [t10, t11]
201
- });
202
- $[24] = showError;
203
- $[25] = t10;
204
- $[26] = t11;
205
- $[27] = t12;
206
- } else t12 = $[27];
207
- return t12;
208
- };
209
- // src/components/form/FormDatePicker.tsx
210
- const FormDatePicker = (props) => {
211
- const $ = c(18);
212
- const field = useFieldContext();
213
- let t0;
214
- if ($[0] !== field) {
215
- t0 = getFieldStatus(field);
216
- $[0] = field;
217
- $[1] = t0;
218
- } else t0 = $[1];
219
- const { isTouched, hasError, helperText } = t0;
220
- let t1;
221
- if ($[2] !== field) {
222
- t1 = (value) => field.handleChange(value);
223
- $[2] = field;
224
- $[3] = t1;
225
- } else t1 = $[3];
226
- const t2 = isTouched && hasError;
227
- const t3 = isTouched && helperText;
228
- let t4;
229
- if ($[4] !== field.handleBlur || $[5] !== props.textFieldProps || $[6] !== t2 || $[7] !== t3) {
230
- t4 = {
231
- onBlur: field.handleBlur,
232
- error: t2,
233
- helperText: t3,
234
- ...props.textFieldProps
235
- };
236
- $[4] = field.handleBlur;
237
- $[5] = props.textFieldProps;
238
- $[6] = t2;
239
- $[7] = t3;
240
- $[8] = t4;
241
- } else t4 = $[8];
242
- let t5;
243
- if ($[9] !== props.slotProps || $[10] !== t4) {
244
- t5 = {
245
- textField: t4,
246
- ...props.slotProps
247
- };
248
- $[9] = props.slotProps;
249
- $[10] = t4;
250
- $[11] = t5;
251
- } else t5 = $[11];
252
- let t6;
253
- if ($[12] !== field.name || $[13] !== field.state.value || $[14] !== props || $[15] !== t1 || $[16] !== t5) {
254
- t6 = /* @__PURE__ */ jsx(DatePicker, {
255
- name: field.name,
256
- value: field.state.value,
257
- onChange: t1,
258
- slotProps: t5,
259
- ...props
260
- });
261
- $[12] = field.name;
262
- $[13] = field.state.value;
263
- $[14] = props;
264
- $[15] = t1;
265
- $[16] = t5;
266
- $[17] = t6;
267
- } else t6 = $[17];
268
- return t6;
269
- };
270
- // src/components/form/FormTimePicker.tsx
271
- const FormTimePicker = (props) => {
272
- const $ = c(18);
273
- const field = useFieldContext();
274
- let t0;
275
- if ($[0] !== field) {
276
- t0 = getFieldStatus(field);
277
- $[0] = field;
278
- $[1] = t0;
279
- } else t0 = $[1];
280
- const { isTouched, hasError, helperText } = t0;
281
- let t1;
282
- if ($[2] !== field) {
283
- t1 = (value) => field.handleChange(value);
284
- $[2] = field;
285
- $[3] = t1;
286
- } else t1 = $[3];
287
- const t2 = isTouched && hasError;
288
- const t3 = isTouched && helperText;
289
- let t4;
290
- if ($[4] !== field.handleBlur || $[5] !== props.textFieldProps || $[6] !== t2 || $[7] !== t3) {
291
- t4 = {
292
- onBlur: field.handleBlur,
293
- error: t2,
294
- helperText: t3,
295
- ...props.textFieldProps
296
- };
297
- $[4] = field.handleBlur;
298
- $[5] = props.textFieldProps;
299
- $[6] = t2;
300
- $[7] = t3;
301
- $[8] = t4;
302
- } else t4 = $[8];
303
- let t5;
304
- if ($[9] !== props.slotProps || $[10] !== t4) {
305
- t5 = {
306
- textField: t4,
307
- ...props.slotProps
308
- };
309
- $[9] = props.slotProps;
310
- $[10] = t4;
311
- $[11] = t5;
312
- } else t5 = $[11];
313
- let t6;
314
- if ($[12] !== field.name || $[13] !== field.state.value || $[14] !== props || $[15] !== t1 || $[16] !== t5) {
315
- t6 = /* @__PURE__ */ jsx(TimePicker, {
316
- name: field.name,
317
- value: field.state.value,
318
- onChange: t1,
319
- slotProps: t5,
320
- ...props
321
- });
322
- $[12] = field.name;
323
- $[13] = field.state.value;
324
- $[14] = props;
325
- $[15] = t1;
326
- $[16] = t5;
327
- $[17] = t6;
328
- } else t6 = $[17];
329
- return t6;
330
- };
331
- // src/components/form/FormDateTimePicker.tsx
332
- const FormDateTimePicker = (props) => {
333
- const $ = c(18);
334
- const field = useFieldContext();
335
- let t0;
336
- if ($[0] !== field) {
337
- t0 = getFieldStatus(field);
338
- $[0] = field;
339
- $[1] = t0;
340
- } else t0 = $[1];
341
- const { isTouched, hasError, helperText } = t0;
342
- let t1;
343
- if ($[2] !== field) {
344
- t1 = (value) => field.handleChange(value);
345
- $[2] = field;
346
- $[3] = t1;
347
- } else t1 = $[3];
348
- const t2 = isTouched && hasError;
349
- const t3 = isTouched && helperText;
350
- let t4;
351
- if ($[4] !== field.handleBlur || $[5] !== props.textFieldProps || $[6] !== t2 || $[7] !== t3) {
352
- t4 = {
353
- onBlur: field.handleBlur,
354
- error: t2,
355
- helperText: t3,
356
- ...props.textFieldProps
357
- };
358
- $[4] = field.handleBlur;
359
- $[5] = props.textFieldProps;
360
- $[6] = t2;
361
- $[7] = t3;
362
- $[8] = t4;
363
- } else t4 = $[8];
364
- let t5;
365
- if ($[9] !== props.slotProps || $[10] !== t4) {
366
- t5 = {
367
- textField: t4,
368
- ...props.slotProps
369
- };
370
- $[9] = props.slotProps;
371
- $[10] = t4;
372
- $[11] = t5;
373
- } else t5 = $[11];
374
- let t6;
375
- if ($[12] !== field.name || $[13] !== field.state.value || $[14] !== props || $[15] !== t1 || $[16] !== t5) {
376
- t6 = /* @__PURE__ */ jsx(DateTimePicker, {
377
- name: field.name,
378
- value: field.state.value,
379
- onChange: t1,
380
- slotProps: t5,
381
- ...props
382
- });
383
- $[12] = field.name;
384
- $[13] = field.state.value;
385
- $[14] = props;
386
- $[15] = t1;
387
- $[16] = t5;
388
- $[17] = t6;
389
- } else t6 = $[17];
390
- return t6;
391
- };
392
- // src/components/form/FormNumberField.tsx
393
- const FormNumberField = (t0) => {
394
- const $ = c(16);
395
- let options;
396
- let props;
397
- if ($[0] !== t0) {
398
- ({options, ...props} = t0);
399
- $[0] = t0;
400
- $[1] = options;
401
- $[2] = props;
402
- } else {
403
- options = $[1];
404
- props = $[2];
405
- }
406
- const field = useFieldContext();
407
- let t1;
408
- if ($[3] !== field) {
409
- t1 = getFieldStatus(field);
410
- $[3] = field;
411
- $[4] = t1;
412
- } else t1 = $[4];
413
- const { isTouched, hasError, helperText } = t1;
414
- const t2 = field.state.value ?? "";
415
- let t3;
416
- if ($[5] !== field) {
417
- t3 = (t4) => {
418
- const { floatValue } = t4;
419
- return field.handleChange(floatValue);
420
- };
421
- $[5] = field;
422
- $[6] = t3;
423
- } else t3 = $[6];
424
- const t4 = isTouched && hasError;
425
- const t5 = isTouched && helperText;
426
- let t6;
427
- if ($[7] !== field.handleBlur || $[8] !== field.name || $[9] !== options || $[10] !== props || $[11] !== t2 || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) {
428
- t6 = /* @__PURE__ */ jsx(NumericFormat, {
429
- customInput: TextField,
430
- name: field.name,
431
- value: t2,
432
- onValueChange: t3,
433
- onBlur: field.handleBlur,
434
- error: t4,
435
- helperText: t5,
436
- ...props,
437
- ...options
438
- });
439
- $[7] = field.handleBlur;
440
- $[8] = field.name;
441
- $[9] = options;
442
- $[10] = props;
443
- $[11] = t2;
444
- $[12] = t3;
445
- $[13] = t4;
446
- $[14] = t5;
447
- $[15] = t6;
448
- } else t6 = $[15];
449
- return t6;
450
- };
451
- // src/components/form/FormRadioGroup.tsx
452
- const FormRadioGroup = (t0) => {
453
- const $ = c(30);
454
- let label;
455
- let options;
456
- let props;
457
- if ($[0] !== t0) {
458
- ({label, options, ...props} = t0);
459
- $[0] = t0;
460
- $[1] = label;
461
- $[2] = options;
462
- $[3] = props;
463
- } else {
464
- label = $[1];
465
- options = $[2];
466
- props = $[3];
467
- }
468
- const field = useFieldContext();
469
- let t1;
470
- if ($[4] !== field) {
471
- t1 = getFieldStatus(field);
472
- $[4] = field;
473
- $[5] = t1;
474
- } else t1 = $[5];
475
- const { isTouched, hasError, helperText } = t1;
476
- const showError = isTouched && hasError;
477
- const helperId = useId();
478
- let t2;
479
- if ($[6] !== label) {
480
- t2 = label && /* @__PURE__ */ jsx(FormLabel, {
481
- component: "legend",
482
- children: label
483
- });
484
- $[6] = label;
485
- $[7] = t2;
486
- } else t2 = $[7];
487
- const t3 = field.name;
488
- const t4 = field.state.value ?? "";
489
- let t5;
490
- if ($[8] !== field) {
491
- t5 = (event) => field.handleChange(event.target.value);
492
- $[8] = field;
493
- $[9] = t5;
494
- } else t5 = $[9];
495
- const t6 = field.handleBlur;
496
- const t7 = showError || void 0;
497
- const t8 = showError ? helperId : void 0;
498
- let t9;
499
- if ($[10] !== options) {
500
- t9 = options.map(_temp$9);
501
- $[10] = options;
502
- $[11] = t9;
503
- } else t9 = $[11];
504
- let t10;
505
- if ($[12] !== field.handleBlur || $[13] !== field.name || $[14] !== props || $[15] !== t4 || $[16] !== t5 || $[17] !== t7 || $[18] !== t8 || $[19] !== t9) {
506
- t10 = /* @__PURE__ */ jsx(RadioGroup, {
507
- name: t3,
508
- value: t4,
509
- onChange: t5,
510
- onBlur: t6,
511
- "aria-invalid": t7,
512
- "aria-describedby": t8,
513
- ...props,
514
- children: t9
515
- });
516
- $[12] = field.handleBlur;
517
- $[13] = field.name;
518
- $[14] = props;
519
- $[15] = t4;
520
- $[16] = t5;
521
- $[17] = t7;
522
- $[18] = t8;
523
- $[19] = t9;
524
- $[20] = t10;
525
- } else t10 = $[20];
526
- let t11;
527
- if ($[21] !== helperId || $[22] !== helperText || $[23] !== showError) {
528
- t11 = showError && /* @__PURE__ */ jsx(FormHelperText, {
529
- id: helperId,
530
- children: helperText
531
- });
532
- $[21] = helperId;
533
- $[22] = helperText;
534
- $[23] = showError;
535
- $[24] = t11;
536
- } else t11 = $[24];
537
- let t12;
538
- if ($[25] !== showError || $[26] !== t10 || $[27] !== t11 || $[28] !== t2) {
539
- t12 = /* @__PURE__ */ jsxs(FormControl, {
540
- component: "fieldset",
541
- error: showError,
542
- children: [
543
- t2,
544
- t10,
545
- t11
546
- ]
547
- });
548
- $[25] = showError;
549
- $[26] = t10;
550
- $[27] = t11;
551
- $[28] = t2;
552
- $[29] = t12;
553
- } else t12 = $[29];
554
- return t12;
555
- };
556
- function _temp$9(option) {
557
- return /* @__PURE__ */ jsx(FormControlLabel, {
558
- value: option.value,
559
- control: /* @__PURE__ */ jsx(Radio, {}),
560
- label: option.label
561
- }, option.value);
562
- }
563
- // src/components/form/FormSlider.tsx
564
- const FormSlider = (t0) => {
565
- const $ = c(30);
566
- let label;
567
- let props;
568
- if ($[0] !== t0) {
569
- ({label, ...props} = t0);
570
- $[0] = t0;
571
- $[1] = label;
572
- $[2] = props;
573
- } else {
574
- label = $[1];
575
- props = $[2];
576
- }
577
- const field = useFieldContext();
578
- let t1;
579
- if ($[3] !== field) {
580
- t1 = getFieldStatus(field);
581
- $[3] = field;
582
- $[4] = t1;
583
- } else t1 = $[4];
584
- const { isTouched, hasError, helperText } = t1;
585
- const showError = isTouched && hasError;
586
- const labelId = useId();
587
- const helperId = useId();
588
- let t2;
589
- if ($[5] !== label || $[6] !== labelId) {
590
- t2 = label && /* @__PURE__ */ jsx(FormLabel, {
591
- id: labelId,
592
- children: label
593
- });
594
- $[5] = label;
595
- $[6] = labelId;
596
- $[7] = t2;
597
- } else t2 = $[7];
598
- const t3 = field.state.value ?? 0;
599
- let t4;
600
- if ($[8] !== field) {
601
- t4 = (_, value) => field.handleChange(Array.isArray(value) ? value[0] : value);
602
- $[8] = field;
603
- $[9] = t4;
604
- } else t4 = $[9];
605
- const t5 = label ? labelId : void 0;
606
- const t6 = showError || void 0;
607
- const t7 = showError ? helperId : void 0;
608
- let t8;
609
- if ($[10] !== t6 || $[11] !== t7) {
610
- t8 = { input: {
611
- "aria-invalid": t6,
612
- "aria-describedby": t7
613
- } };
614
- $[10] = t6;
615
- $[11] = t7;
616
- $[12] = t8;
617
- } else t8 = $[12];
618
- let t9;
619
- if ($[13] !== field.handleBlur || $[14] !== field.name || $[15] !== props || $[16] !== t3 || $[17] !== t4 || $[18] !== t5 || $[19] !== t8) {
620
- t9 = /* @__PURE__ */ jsx(Slider, {
621
- name: field.name,
622
- value: t3,
623
- onChange: t4,
624
- onBlur: field.handleBlur,
625
- "aria-labelledby": t5,
626
- slotProps: t8,
627
- ...props
628
- });
629
- $[13] = field.handleBlur;
630
- $[14] = field.name;
631
- $[15] = props;
632
- $[16] = t3;
633
- $[17] = t4;
634
- $[18] = t5;
635
- $[19] = t8;
636
- $[20] = t9;
637
- } else t9 = $[20];
638
- let t10;
639
- if ($[21] !== helperId || $[22] !== helperText || $[23] !== showError) {
640
- t10 = showError && /* @__PURE__ */ jsx(FormHelperText, {
641
- id: helperId,
642
- children: helperText
643
- });
644
- $[21] = helperId;
645
- $[22] = helperText;
646
- $[23] = showError;
647
- $[24] = t10;
648
- } else t10 = $[24];
649
- let t11;
650
- if ($[25] !== showError || $[26] !== t10 || $[27] !== t2 || $[28] !== t9) {
651
- t11 = /* @__PURE__ */ jsxs(FormControl, {
652
- error: showError,
653
- children: [
654
- t2,
655
- t9,
656
- t10
657
- ]
658
- });
659
- $[25] = showError;
660
- $[26] = t10;
661
- $[27] = t2;
662
- $[28] = t9;
663
- $[29] = t11;
664
- } else t11 = $[29];
665
- return t11;
666
- };
667
- // src/components/form/FormSubmitButton.tsx
668
- const FormSubmitButton = (props) => {
669
- const $ = c(8);
670
- const form = useFormContext();
671
- let t0;
672
- if ($[0] !== form) {
673
- t0 = async (event) => {
674
- event.preventDefault();
675
- event.stopPropagation();
676
- const scope = event.currentTarget.form ?? document;
677
- await form.handleSubmit();
678
- const fieldMeta = form.state.fieldMeta;
679
- requestAnimationFrame(() => {
680
- const invalid = Array.from(scope.querySelectorAll("input[name], textarea[name], select[name]")).find((element) => fieldMeta[element.getAttribute("name") ?? ""]?.errors.length);
681
- (invalid?.getAttribute("aria-hidden") === "true" ? invalid.parentElement?.querySelector("[tabindex=\"0\"]") ?? invalid : invalid)?.focus();
682
- });
683
- };
684
- $[0] = form;
685
- $[1] = t0;
686
- } else t0 = $[1];
687
- const handleClick = t0;
688
- let t1;
689
- if ($[2] !== handleClick || $[3] !== props) {
690
- t1 = (isSubmitting) => /* @__PURE__ */ jsx(Button, {
691
- loading: isSubmitting,
692
- onClick: handleClick,
693
- type: "submit",
694
- ...props
695
- });
696
- $[2] = handleClick;
697
- $[3] = props;
698
- $[4] = t1;
699
- } else t1 = $[4];
700
- let t2;
701
- if ($[5] !== form.Subscribe || $[6] !== t1) {
702
- t2 = /* @__PURE__ */ jsx(form.Subscribe, {
703
- selector: _temp$8,
704
- children: t1
705
- });
706
- $[5] = form.Subscribe;
707
- $[6] = t1;
708
- $[7] = t2;
709
- } else t2 = $[7];
710
- return t2;
711
- };
712
- function _temp$8(state) {
713
- return state.isSubmitting;
714
- }
715
- // src/components/form/FormSwitch.tsx
716
- const FormSwitch = (t0) => {
717
- const $ = c(28);
718
- let label;
719
- let props;
720
- if ($[0] !== t0) {
721
- ({label, ...props} = t0);
722
- $[0] = t0;
723
- $[1] = label;
724
- $[2] = props;
725
- } else {
726
- label = $[1];
727
- props = $[2];
728
- }
729
- const field = useFieldContext();
730
- let t1;
731
- if ($[3] !== field) {
732
- t1 = getFieldStatus(field);
733
- $[3] = field;
734
- $[4] = t1;
735
- } else t1 = $[4];
736
- const { isTouched, hasError, helperText } = t1;
737
- const showError = isTouched && hasError;
738
- const helperId = useId();
739
- const t2 = field.name;
740
- const t3 = Boolean(field.state.value);
741
- let t4;
742
- if ($[5] !== field) {
743
- t4 = (event) => field.handleChange(event.target.checked);
744
- $[5] = field;
745
- $[6] = t4;
746
- } else t4 = $[6];
747
- const t5 = showError || void 0;
748
- const t6 = showError ? helperId : void 0;
749
- let t7;
750
- if ($[7] !== t5 || $[8] !== t6) {
751
- t7 = { input: {
752
- "aria-invalid": t5,
753
- "aria-describedby": t6
754
- } };
755
- $[7] = t5;
756
- $[8] = t6;
757
- $[9] = t7;
758
- } else t7 = $[9];
759
- let t8;
760
- if ($[10] !== field.handleBlur || $[11] !== field.name || $[12] !== props || $[13] !== t3 || $[14] !== t4 || $[15] !== t7) {
761
- t8 = /* @__PURE__ */ jsx(Switch, {
762
- name: t2,
763
- checked: t3,
764
- onChange: t4,
765
- onBlur: field.handleBlur,
766
- slotProps: t7,
767
- ...props
768
- });
769
- $[10] = field.handleBlur;
770
- $[11] = field.name;
771
- $[12] = props;
772
- $[13] = t3;
773
- $[14] = t4;
774
- $[15] = t7;
775
- $[16] = t8;
776
- } else t8 = $[16];
777
- const t9 = label ?? "";
778
- let t10;
779
- if ($[17] !== t8 || $[18] !== t9) {
780
- t10 = /* @__PURE__ */ jsx(FormControlLabel, {
781
- control: t8,
782
- label: t9
783
- });
784
- $[17] = t8;
785
- $[18] = t9;
786
- $[19] = t10;
787
- } else t10 = $[19];
788
- let t11;
789
- if ($[20] !== helperId || $[21] !== helperText || $[22] !== showError) {
790
- t11 = showError && /* @__PURE__ */ jsx(FormHelperText, {
791
- id: helperId,
792
- children: helperText
793
- });
794
- $[20] = helperId;
795
- $[21] = helperText;
796
- $[22] = showError;
797
- $[23] = t11;
798
- } else t11 = $[23];
799
- let t12;
800
- if ($[24] !== showError || $[25] !== t10 || $[26] !== t11) {
801
- t12 = /* @__PURE__ */ jsxs(FormControl, {
802
- error: showError,
803
- children: [t10, t11]
804
- });
805
- $[24] = showError;
806
- $[25] = t10;
807
- $[26] = t11;
808
- $[27] = t12;
809
- } else t12 = $[27];
810
- return t12;
811
- };
812
- // src/components/form/FormTextField.tsx
813
- const FormTextField = (props) => {
814
- const $ = c(12);
815
- const field = useFieldContext();
816
- let t0;
817
- if ($[0] !== field) {
818
- t0 = getFieldStatus(field);
819
- $[0] = field;
820
- $[1] = t0;
821
- } else t0 = $[1];
822
- const { isTouched, hasError, helperText } = t0;
823
- const t1 = field.state.value ?? "";
824
- let t2;
825
- if ($[2] !== field) {
826
- t2 = (event) => field.handleChange(event.target.value);
827
- $[2] = field;
828
- $[3] = t2;
829
- } else t2 = $[3];
830
- const t3 = isTouched && hasError;
831
- const t4 = isTouched && helperText;
832
- let t5;
833
- if ($[4] !== field.handleBlur || $[5] !== field.name || $[6] !== props || $[7] !== t1 || $[8] !== t2 || $[9] !== t3 || $[10] !== t4) {
834
- t5 = /* @__PURE__ */ jsx(TextField, {
835
- name: field.name,
836
- value: t1,
837
- onChange: t2,
838
- onBlur: field.handleBlur,
839
- error: t3,
840
- helperText: t4,
841
- ...props
842
- });
843
- $[4] = field.handleBlur;
844
- $[5] = field.name;
845
- $[6] = props;
846
- $[7] = t1;
847
- $[8] = t2;
848
- $[9] = t3;
849
- $[10] = t4;
850
- $[11] = t5;
851
- } else t5 = $[11];
852
- return t5;
853
- };
854
- // src/hooks/useForm.ts
855
- const { fieldContext, useFieldContext, formContext, useFormContext } = createFormHookContexts();
856
- const { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
857
- fieldComponents: {
858
- TextField: FormTextField,
859
- NumberField: FormNumberField,
860
- Autocomplete: FormAutocomplete,
861
- Checkbox: FormCheckbox,
862
- Switch: FormSwitch,
863
- RadioGroup: FormRadioGroup,
864
- Slider: FormSlider,
865
- DatePicker: FormDatePicker,
866
- TimePicker: FormTimePicker,
867
- DateTimePicker: FormDateTimePicker
868
- },
869
- formComponents: { SubmitButton: FormSubmitButton },
870
- fieldContext,
871
- formContext
872
- });
873
39
  // src/hooks/useScanDetection.ts
874
40
  const useScanDetection = ({ timeToEvaluate = 100, averageWaitTime = 50, startCharacter = [], endCharacter = ["Enter", "Escape"], onComplete, onError, minLength = 1, ignoreIfFocusOn, stopPropagation = false, preventDefault = false, container, enabled = true }) => {
875
41
  const buffer = useRef([]);
@@ -887,7 +53,7 @@ const useScanDetection = ({ timeToEvaluate = 100, averageWaitTime = 50, startCha
887
53
  };
888
54
  const onKeyDown = (event) => {
889
55
  if (!enabled) return;
890
- if (event.currentTarget !== ignoreIfFocusOn) {
56
+ if (!ignoreIfFocusOn?.contains(event.target)) {
891
57
  if (endCharacter.includes(event.key)) evaluateBuffer();
892
58
  if (buffer.current.length > 0 || startCharacter.includes(event.key) || startCharacter.length === 0) {
893
59
  clearTimeout(timeout.current);
@@ -903,17 +69,13 @@ const useScanDetection = ({ timeToEvaluate = 100, averageWaitTime = 50, startCha
903
69
  };
904
70
  const onKeyDownRef = useRef(onKeyDown);
905
71
  onKeyDownRef.current = onKeyDown;
906
- useEffect(() => {
907
- return () => {
908
- clearTimeout(timeout.current);
909
- };
910
- }, []);
911
72
  useEffect(() => {
912
73
  const target = container ?? document;
913
74
  const listener = (event) => onKeyDownRef.current(event);
914
75
  target.addEventListener("keydown", listener);
915
76
  return () => {
916
77
  target.removeEventListener("keydown", listener);
78
+ clearTimeout(timeout.current);
917
79
  };
918
80
  }, [container]);
919
81
  };
@@ -999,45 +161,67 @@ function _temp4(event_0) {
999
161
  return event_0.stopPropagation();
1000
162
  }
1001
163
  // src/components/table/cells/features/ExpandCell.tsx
164
+ /** The chevron that expands or collapses a row, following the table's expanded state. */
165
+ const ExpandButton = (t0) => {
166
+ const $ = c(9);
167
+ let props;
168
+ let row;
169
+ if ($[0] !== t0) {
170
+ ({row, ...props} = t0);
171
+ $[0] = t0;
172
+ $[1] = props;
173
+ $[2] = row;
174
+ } else {
175
+ props = $[1];
176
+ row = $[2];
177
+ }
178
+ let t1;
179
+ if ($[3] !== props || $[4] !== row) {
180
+ t1 = () => /* @__PURE__ */ jsx(IconButton, {
181
+ size: "small",
182
+ "aria-expanded": row.getIsExpanded(),
183
+ onClick: (event) => {
184
+ event.stopPropagation();
185
+ row.toggleExpanded();
186
+ },
187
+ ...props,
188
+ children: row.getIsExpanded() ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
189
+ });
190
+ $[3] = props;
191
+ $[4] = row;
192
+ $[5] = t1;
193
+ } else t1 = $[5];
194
+ let t2;
195
+ if ($[6] !== row.table.atoms.expanded || $[7] !== t1) {
196
+ t2 = /* @__PURE__ */ jsx(Subscribe, {
197
+ source: row.table.atoms.expanded,
198
+ children: t1
199
+ });
200
+ $[6] = row.table.atoms.expanded;
201
+ $[7] = t1;
202
+ $[8] = t2;
203
+ } else t2 = $[8];
204
+ return t2;
205
+ };
1002
206
  const ExpandCell = () => {
1003
- const $ = c(5);
207
+ const $ = c(2);
1004
208
  const { row } = useCellContext();
1005
209
  let t0;
1006
210
  if ($[0] !== row) {
1007
- t0 = () => {
1008
- if (!row.getCanExpand()) return null;
1009
- const expanded = row.getIsExpanded();
1010
- return /* @__PURE__ */ jsx(IconButton, {
1011
- className: layoutTableClasses.expandButton,
1012
- size: "small",
1013
- onClick: (event) => {
1014
- event.stopPropagation();
1015
- row.toggleExpanded();
1016
- },
1017
- "aria-label": "Expand row",
1018
- "aria-expanded": expanded,
1019
- sx: { ml: row.depth * 2 },
1020
- children: expanded ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
1021
- });
1022
- };
211
+ t0 = row.getCanExpand() ? /* @__PURE__ */ jsx(ExpandButton, {
212
+ row,
213
+ className: layoutTableClasses.expandButton,
214
+ "aria-label": "Expand row",
215
+ sx: { ml: row.depth * 2 }
216
+ }) : null;
1023
217
  $[0] = row;
1024
218
  $[1] = t0;
1025
219
  } else t0 = $[1];
1026
- let t1;
1027
- if ($[2] !== row.table.atoms.expanded || $[3] !== t0) {
1028
- t1 = /* @__PURE__ */ jsx(Subscribe, {
1029
- source: row.table.atoms.expanded,
1030
- children: t0
1031
- });
1032
- $[2] = row.table.atoms.expanded;
1033
- $[3] = t0;
1034
- $[4] = t1;
1035
- } else t1 = $[4];
1036
- return t1;
220
+ return t0;
1037
221
  };
1038
222
  // src/components/table/cells/features/GroupCell.tsx
1039
223
  const GroupCell = () => {
1040
- const $ = c(16);
224
+ const $ = c(13);
1041
225
  const cell = useCellContext();
1042
226
  const { row } = cell;
1043
227
  const t0 = row.depth * 2;
@@ -1052,41 +236,22 @@ const GroupCell = () => {
1052
236
  } else t1 = $[1];
1053
237
  let t2;
1054
238
  if ($[2] !== row) {
1055
- t2 = () => {
1056
- const expanded = row.getIsExpanded();
1057
- return /* @__PURE__ */ jsx(IconButton, {
1058
- size: "small",
1059
- onClick: (event) => {
1060
- event.stopPropagation();
1061
- row.toggleExpanded();
1062
- },
1063
- "aria-label": "Expand group",
1064
- "aria-expanded": expanded,
1065
- children: expanded ? /* @__PURE__ */ jsx(KeyboardArrowDown, { fontSize: "small" }) : /* @__PURE__ */ jsx(KeyboardArrowRight, { fontSize: "small" })
1066
- });
1067
- };
239
+ t2 = /* @__PURE__ */ jsx(ExpandButton, {
240
+ row,
241
+ "aria-label": "Expand group"
242
+ });
1068
243
  $[2] = row;
1069
244
  $[3] = t2;
1070
245
  } else t2 = $[3];
1071
246
  let t3;
1072
- if ($[4] !== row.table.atoms.expanded || $[5] !== t2) {
1073
- t3 = /* @__PURE__ */ jsx(Subscribe, {
1074
- source: row.table.atoms.expanded,
1075
- children: t2
1076
- });
1077
- $[4] = row.table.atoms.expanded;
1078
- $[5] = t2;
1079
- $[6] = t3;
1080
- } else t3 = $[6];
247
+ if ($[4] !== cell) {
248
+ t3 = /* @__PURE__ */ jsx(FlexRender, { cell });
249
+ $[4] = cell;
250
+ $[5] = t3;
251
+ } else t3 = $[5];
1081
252
  let t4;
1082
- if ($[7] !== cell) {
1083
- t4 = /* @__PURE__ */ jsx(FlexRender, { cell });
1084
- $[7] = cell;
1085
- $[8] = t4;
1086
- } else t4 = $[8];
1087
- let t5;
1088
- if ($[9] !== row.subRows.length) {
1089
- t5 = /* @__PURE__ */ jsxs(Typography, {
253
+ if ($[6] !== row.subRows.length) {
254
+ t4 = /* @__PURE__ */ jsxs(Typography, {
1090
255
  variant: "caption",
1091
256
  color: "text.secondary",
1092
257
  children: [
@@ -1095,29 +260,29 @@ const GroupCell = () => {
1095
260
  ")"
1096
261
  ]
1097
262
  });
1098
- $[9] = row.subRows.length;
1099
- $[10] = t5;
1100
- } else t5 = $[10];
1101
- let t6;
1102
- if ($[11] !== t1 || $[12] !== t3 || $[13] !== t4 || $[14] !== t5) {
1103
- t6 = /* @__PURE__ */ jsxs(Stack, {
263
+ $[6] = row.subRows.length;
264
+ $[7] = t4;
265
+ } else t4 = $[7];
266
+ let t5;
267
+ if ($[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4) {
268
+ t5 = /* @__PURE__ */ jsxs(Stack, {
1104
269
  className: layoutTableClasses.groupCell,
1105
270
  direction: "row",
1106
271
  spacing: .5,
1107
272
  sx: t1,
1108
273
  children: [
274
+ t2,
1109
275
  t3,
1110
- t4,
1111
- t5
276
+ t4
1112
277
  ]
1113
278
  });
1114
- $[11] = t1;
1115
- $[12] = t3;
1116
- $[13] = t4;
1117
- $[14] = t5;
1118
- $[15] = t6;
1119
- } else t6 = $[15];
1120
- return t6;
279
+ $[8] = t1;
280
+ $[9] = t2;
281
+ $[10] = t3;
282
+ $[11] = t4;
283
+ $[12] = t5;
284
+ } else t5 = $[12];
285
+ return t5;
1121
286
  };
1122
287
  // src/components/table/cells/features/PinRowCell.tsx
1123
288
  const PinRowCell = () => {
@@ -1217,7 +382,7 @@ const BooleanCell = () => {
1217
382
  // src/components/table/cells/formatters/DateCell.tsx
1218
383
  dayjs.extend(localizedFormat);
1219
384
  const DateCell = (t0) => {
1220
- const $ = c(18);
385
+ const $ = c(19);
1221
386
  let props;
1222
387
  let t1;
1223
388
  if ($[0] !== t0) {
@@ -1231,13 +396,14 @@ const DateCell = (t0) => {
1231
396
  }
1232
397
  const format = t1 === void 0 ? "L" : t1;
1233
398
  const cell = useCellContext();
399
+ const { i18n } = useTranslation();
1234
400
  let T0;
1235
401
  let t2;
1236
402
  let t3;
1237
403
  let t4;
1238
404
  let t5;
1239
405
  let t6;
1240
- if ($[3] !== cell || $[4] !== format || $[5] !== props) {
406
+ if ($[3] !== cell || $[4] !== format || $[5] !== i18n || $[6] !== props) {
1241
407
  t6 = Symbol.for("react.early_return_sentinel");
1242
408
  bb0: {
1243
409
  const value = cell.getValue();
@@ -1249,41 +415,42 @@ const DateCell = (t0) => {
1249
415
  t2 = "body2";
1250
416
  t3 = true;
1251
417
  t4 = props;
1252
- t5 = dayjs(value).format(format);
418
+ t5 = dayjs(value).locale(i18n.language).format(format);
1253
419
  }
1254
420
  $[3] = cell;
1255
421
  $[4] = format;
1256
- $[5] = props;
1257
- $[6] = T0;
1258
- $[7] = t2;
1259
- $[8] = t3;
1260
- $[9] = t4;
1261
- $[10] = t5;
1262
- $[11] = t6;
422
+ $[5] = i18n;
423
+ $[6] = props;
424
+ $[7] = T0;
425
+ $[8] = t2;
426
+ $[9] = t3;
427
+ $[10] = t4;
428
+ $[11] = t5;
429
+ $[12] = t6;
1263
430
  } else {
1264
- T0 = $[6];
1265
- t2 = $[7];
1266
- t3 = $[8];
1267
- t4 = $[9];
1268
- t5 = $[10];
1269
- t6 = $[11];
431
+ T0 = $[7];
432
+ t2 = $[8];
433
+ t3 = $[9];
434
+ t4 = $[10];
435
+ t5 = $[11];
436
+ t6 = $[12];
1270
437
  }
1271
438
  if (t6 !== Symbol.for("react.early_return_sentinel")) return t6;
1272
439
  let t7;
1273
- if ($[12] !== T0 || $[13] !== t2 || $[14] !== t3 || $[15] !== t4 || $[16] !== t5) {
440
+ if ($[13] !== T0 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5) {
1274
441
  t7 = /* @__PURE__ */ jsx(T0, {
1275
442
  variant: t2,
1276
443
  noWrap: t3,
1277
444
  ...t4,
1278
445
  children: t5
1279
446
  });
1280
- $[12] = T0;
1281
- $[13] = t2;
1282
- $[14] = t3;
1283
- $[15] = t4;
1284
- $[16] = t5;
1285
- $[17] = t7;
1286
- } else t7 = $[17];
447
+ $[13] = T0;
448
+ $[14] = t2;
449
+ $[15] = t3;
450
+ $[16] = t4;
451
+ $[17] = t5;
452
+ $[18] = t7;
453
+ } else t7 = $[18];
1287
454
  return t7;
1288
455
  };
1289
456
  // src/components/table/cells/formatters/DateTimeCell.tsx
@@ -1534,14 +701,15 @@ const getFilterOperators = (variant) => {
1534
701
  };
1535
702
  // src/components/table/headers/AggregationFooter.tsx
1536
703
  const AggregationFooter = (t0) => {
1537
- const $ = c(7);
704
+ const $ = c(8);
1538
705
  const { prefix: t1, options } = t0;
1539
706
  const prefix = t1 === void 0 ? "" : t1;
1540
707
  const { column } = useHeaderContext();
708
+ const { i18n } = useTranslation();
1541
709
  let t2;
1542
- if ($[0] !== column || $[1] !== options || $[2] !== prefix) {
710
+ if ($[0] !== column || $[1] !== i18n.language || $[2] !== options || $[3] !== prefix) {
1543
711
  t2 = () => {
1544
- const value = formatValue(column.getAggregationValue({ rows: column.table.getFilteredRowModel().rows }));
712
+ const value = formatValue(column.getAggregationValue({ rows: column.table.getFilteredRowModel().rows }), void 0, i18n.language);
1545
713
  if (!value) return null;
1546
714
  const numeric = Number(value);
1547
715
  return /* @__PURE__ */ jsxs(Typography, {
@@ -1553,20 +721,21 @@ const AggregationFooter = (t0) => {
1553
721
  });
1554
722
  };
1555
723
  $[0] = column;
1556
- $[1] = options;
1557
- $[2] = prefix;
1558
- $[3] = t2;
1559
- } else t2 = $[3];
724
+ $[1] = i18n.language;
725
+ $[2] = options;
726
+ $[3] = prefix;
727
+ $[4] = t2;
728
+ } else t2 = $[4];
1560
729
  let t3;
1561
- if ($[4] !== column.table.atoms.columnFilters || $[5] !== t2) {
730
+ if ($[5] !== column.table.atoms.columnFilters || $[6] !== t2) {
1562
731
  t3 = /* @__PURE__ */ jsx(Subscribe, {
1563
732
  source: column.table.atoms.columnFilters,
1564
733
  children: t2
1565
734
  });
1566
- $[4] = column.table.atoms.columnFilters;
1567
- $[5] = t2;
1568
- $[6] = t3;
1569
- } else t3 = $[6];
735
+ $[5] = column.table.atoms.columnFilters;
736
+ $[6] = t2;
737
+ $[7] = t3;
738
+ } else t3 = $[7];
1570
739
  return t3;
1571
740
  };
1572
741
  // src/components/table/headers/ExpandAllCell.tsx
@@ -3072,6 +2241,29 @@ const GlobalFilter = (t0) => {
3072
2241
  } else t28 = $[48];
3073
2242
  return t28;
3074
2243
  };
2244
+ // src/components/table/table/Pagination.tsx
2245
+ const Pagination = (props) => {
2246
+ "use no memo";
2247
+ const table = useTableContext();
2248
+ const { pageIndex, pageSize } = table.state.pagination;
2249
+ return /* @__PURE__ */ jsx(TablePagination, {
2250
+ component: "div",
2251
+ showFirstButton: true,
2252
+ showLastButton: true,
2253
+ ...props,
2254
+ sx: [{
2255
+ flexShrink: 0,
2256
+ minHeight: 52,
2257
+ borderTop: 1,
2258
+ borderColor: "divider"
2259
+ }, ...Array.isArray(props.sx) ? props.sx : [props.sx]],
2260
+ rowsPerPageOptions: [],
2261
+ count: table.getPageCount() === -1 ? -1 : table.getRowCount(),
2262
+ page: pageIndex,
2263
+ rowsPerPage: pageSize,
2264
+ onPageChange: (_, page) => table.setPageIndex(page)
2265
+ });
2266
+ };
3075
2267
  // src/components/table/table/Skeleton.tsx
3076
2268
  const Skeleton$1 = (t0) => {
3077
2269
  const $ = c(9);
@@ -3302,7 +2494,7 @@ const Toolbar$1 = (t0) => {
3302
2494
  return t11;
3303
2495
  };
3304
2496
  // src/hooks/useLayoutTable.tsx
3305
- const { appFeatures, createAppColumnHelper: createLayoutColumnHelper, useAppTable: useLayoutTable } = createTableHook({
2497
+ const { createAppColumnHelper: createLayoutColumnHelper, useAppTable: useLayoutTable } = createTableHook({
3306
2498
  features: layoutTableFeatures,
3307
2499
  tableContext,
3308
2500
  cellContext,