wcz-test 2.11.0 → 2.12.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/index.js +37 -60
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/index.d.ts +0 -345
package/dist/index.js
CHANGED
|
@@ -1172,7 +1172,7 @@ import { Box as Box2, Divider as Divider2, Typography as Typography3 } from "@mu
|
|
|
1172
1172
|
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1173
1173
|
var RouterError = ({ error }) => {
|
|
1174
1174
|
return /* @__PURE__ */ jsx11(Box2, { height: "100vh", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", textAlign: "center", px: 2, children: /* @__PURE__ */ jsxs3(Box2, { display: "flex", alignItems: "center", mb: 4, children: [
|
|
1175
|
-
/* @__PURE__ */ jsx11(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: "500" }),
|
|
1175
|
+
/* @__PURE__ */ jsx11(Typography3, { variant: "h3", component: "span", fontWeight: 500, sx: { lineHeight: 1 }, children: error.name || "500" }),
|
|
1176
1176
|
/* @__PURE__ */ jsx11(Divider2, { orientation: "vertical", flexItem: true, sx: { mx: 3 } }),
|
|
1177
1177
|
/* @__PURE__ */ jsx11(Typography3, { variant: "h5", component: "span", children: error.message })
|
|
1178
1178
|
] }) });
|
|
@@ -2158,31 +2158,8 @@ var useGetTheme = (theme) => {
|
|
|
2158
2158
|
);
|
|
2159
2159
|
};
|
|
2160
2160
|
|
|
2161
|
-
// src/providers/TanstackRouterAppProvider.tsx
|
|
2162
|
-
import { useLocation, useNavigate, useSearch, Link as TanstackRouterLink } from "@tanstack/react-router";
|
|
2163
|
-
import { AppProvider } from "@toolpad/core/AppProvider";
|
|
2164
|
-
import { useCallback, useMemo as useMemo2, forwardRef } from "react";
|
|
2165
|
-
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2166
|
-
var Link2 = forwardRef(function Link3(props, reference) {
|
|
2167
|
-
const { href, history, ...rest } = props;
|
|
2168
|
-
return /* @__PURE__ */ jsx15(TanstackRouterLink, { ref: reference, to: href, replace: history === "replace", ...rest });
|
|
2169
|
-
});
|
|
2170
|
-
var TanstackRouterAppProvider = (props) => {
|
|
2171
|
-
const { pathname } = useLocation();
|
|
2172
|
-
const searchParameters = useSearch({ strict: false });
|
|
2173
|
-
const _navigate = useNavigate();
|
|
2174
|
-
const navigate = useCallback(
|
|
2175
|
-
(url, { history = "auto" } = {}) => {
|
|
2176
|
-
_navigate({ to: url.toString(), replace: history === "replace" }).catch(console.error);
|
|
2177
|
-
},
|
|
2178
|
-
[_navigate]
|
|
2179
|
-
);
|
|
2180
|
-
const router = useMemo2(() => ({ pathname, searchParams: new URLSearchParams(searchParameters), navigate, Link: Link2 }), [pathname, searchParameters, navigate]);
|
|
2181
|
-
return /* @__PURE__ */ jsx15(AppProvider, { router, ...props });
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
2161
|
// src/providers/LayoutProvider.tsx
|
|
2185
|
-
import { jsx as
|
|
2162
|
+
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2186
2163
|
i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
2187
2164
|
fallbackLng: "en",
|
|
2188
2165
|
interpolation: {
|
|
@@ -2204,11 +2181,11 @@ var LayoutProvider = (props) => {
|
|
|
2204
2181
|
const appTitle = rootRouterState.meta?.find((meta) => meta?.title)?.title;
|
|
2205
2182
|
if (!appTitle)
|
|
2206
2183
|
throw new Error("Title is not defined in the RootRoute head.");
|
|
2207
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ jsx15(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n2.resolvedLanguage, children: /* @__PURE__ */ jsx15(TanStackRouterAppProvider, { navigation, theme, localeText: {
|
|
2208
2185
|
confirm: t("Layout.Confirm"),
|
|
2209
2186
|
cancel: t("Layout.Cancel"),
|
|
2210
2187
|
alert: t("Layout.Alert")
|
|
2211
|
-
}, children: /* @__PURE__ */
|
|
2188
|
+
}, children: /* @__PURE__ */ jsx15(NotificationsProvider, { slotProps: { snackbar: { anchorOrigin: { vertical: isLargeScreen ? "top" : "bottom", horizontal: "center" } } }, children: /* @__PURE__ */ jsx15(LayoutContext.Provider, { value: { appTitle }, children: /* @__PURE__ */ jsxs7(
|
|
2212
2189
|
DashboardLayout,
|
|
2213
2190
|
{
|
|
2214
2191
|
defaultSidebarCollapsed: true,
|
|
@@ -2220,8 +2197,8 @@ var LayoutProvider = (props) => {
|
|
|
2220
2197
|
},
|
|
2221
2198
|
children: [
|
|
2222
2199
|
props.children,
|
|
2223
|
-
/* @__PURE__ */
|
|
2224
|
-
(isFetching || isMutating) && /* @__PURE__ */
|
|
2200
|
+
/* @__PURE__ */ jsx15(DevelopmentBanner, { hasNavigationRoutes: navigation.length > 0 }),
|
|
2201
|
+
(isFetching || isMutating) && /* @__PURE__ */ jsx15(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
|
|
2225
2202
|
]
|
|
2226
2203
|
}
|
|
2227
2204
|
) }) }) }) });
|
|
@@ -2246,11 +2223,11 @@ var getFieldStatus = (field) => {
|
|
|
2246
2223
|
};
|
|
2247
2224
|
|
|
2248
2225
|
// src/components/form/FormAutocomplete.tsx
|
|
2249
|
-
import { jsx as
|
|
2226
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2250
2227
|
var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
2251
2228
|
const field = useFieldContext();
|
|
2252
2229
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2253
|
-
return /* @__PURE__ */
|
|
2230
|
+
return /* @__PURE__ */ jsx16(
|
|
2254
2231
|
Autocomplete,
|
|
2255
2232
|
{
|
|
2256
2233
|
value: field.state.value,
|
|
@@ -2259,7 +2236,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2259
2236
|
onBlur: field.handleBlur,
|
|
2260
2237
|
"aria-label": field.name,
|
|
2261
2238
|
...autocompleteProps,
|
|
2262
|
-
renderInput: (parameters) => /* @__PURE__ */
|
|
2239
|
+
renderInput: (parameters) => /* @__PURE__ */ jsx16(
|
|
2263
2240
|
TextField,
|
|
2264
2241
|
{
|
|
2265
2242
|
...parameters,
|
|
@@ -2275,15 +2252,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
|
|
|
2275
2252
|
|
|
2276
2253
|
// src/components/form/FormCheckbox.tsx
|
|
2277
2254
|
import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
|
|
2278
|
-
import { jsx as
|
|
2255
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2279
2256
|
var FormCheckbox = (props) => {
|
|
2280
2257
|
const field = useFieldContext();
|
|
2281
2258
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2282
2259
|
return /* @__PURE__ */ jsxs8(FormControl, { component: "fieldset", children: [
|
|
2283
|
-
/* @__PURE__ */
|
|
2260
|
+
/* @__PURE__ */ jsx17(
|
|
2284
2261
|
FormControlLabel,
|
|
2285
2262
|
{
|
|
2286
|
-
control: /* @__PURE__ */
|
|
2263
|
+
control: /* @__PURE__ */ jsx17(
|
|
2287
2264
|
Checkbox,
|
|
2288
2265
|
{
|
|
2289
2266
|
name: field.name,
|
|
@@ -2297,18 +2274,18 @@ var FormCheckbox = (props) => {
|
|
|
2297
2274
|
label: props.label ?? ""
|
|
2298
2275
|
}
|
|
2299
2276
|
),
|
|
2300
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2277
|
+
isTouched && hasError && /* @__PURE__ */ jsx17(FormHelperText, { error: hasError, children: helperText })
|
|
2301
2278
|
] });
|
|
2302
2279
|
};
|
|
2303
2280
|
|
|
2304
2281
|
// src/components/form/FormDatePicker.tsx
|
|
2305
2282
|
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
2306
2283
|
import dayjs from "dayjs";
|
|
2307
|
-
import { jsx as
|
|
2284
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2308
2285
|
var FormDatePicker = (props) => {
|
|
2309
2286
|
const field = useFieldContext();
|
|
2310
2287
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2311
|
-
return /* @__PURE__ */
|
|
2288
|
+
return /* @__PURE__ */ jsx18(
|
|
2312
2289
|
DatePicker,
|
|
2313
2290
|
{
|
|
2314
2291
|
name: field.name,
|
|
@@ -2332,11 +2309,11 @@ var FormDatePicker = (props) => {
|
|
|
2332
2309
|
// src/components/form/FormDateTimePicker.tsx
|
|
2333
2310
|
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
2334
2311
|
import dayjs2 from "dayjs";
|
|
2335
|
-
import { jsx as
|
|
2312
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2336
2313
|
var FormDateTimePicker = (props) => {
|
|
2337
2314
|
const field = useFieldContext();
|
|
2338
2315
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2339
|
-
return /* @__PURE__ */
|
|
2316
|
+
return /* @__PURE__ */ jsx19(
|
|
2340
2317
|
DateTimePicker,
|
|
2341
2318
|
{
|
|
2342
2319
|
name: field.name,
|
|
@@ -2360,11 +2337,11 @@ var FormDateTimePicker = (props) => {
|
|
|
2360
2337
|
// src/components/form/FormNumberField.tsx
|
|
2361
2338
|
import { TextField as TextField2 } from "@mui/material";
|
|
2362
2339
|
import { NumericFormat } from "react-number-format";
|
|
2363
|
-
import { jsx as
|
|
2340
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
2364
2341
|
var FormNumberField = ({ options, ...props }) => {
|
|
2365
2342
|
const field = useFieldContext();
|
|
2366
2343
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2367
|
-
return /* @__PURE__ */
|
|
2344
|
+
return /* @__PURE__ */ jsx20(
|
|
2368
2345
|
NumericFormat,
|
|
2369
2346
|
{
|
|
2370
2347
|
customInput: TextField2,
|
|
@@ -2383,13 +2360,13 @@ var FormNumberField = ({ options, ...props }) => {
|
|
|
2383
2360
|
|
|
2384
2361
|
// src/components/form/FormRadioGroup.tsx
|
|
2385
2362
|
import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
|
|
2386
|
-
import { jsx as
|
|
2363
|
+
import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
2387
2364
|
var FormRadioGroup = ({ label, options, ...props }) => {
|
|
2388
2365
|
const field = useFieldContext();
|
|
2389
2366
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2390
2367
|
return /* @__PURE__ */ jsxs9(FormControl2, { component: "fieldset", children: [
|
|
2391
|
-
label && /* @__PURE__ */
|
|
2392
|
-
/* @__PURE__ */
|
|
2368
|
+
label && /* @__PURE__ */ jsx21(FormLabel, { component: "legend", children: label }),
|
|
2369
|
+
/* @__PURE__ */ jsx21(
|
|
2393
2370
|
RadioGroup,
|
|
2394
2371
|
{
|
|
2395
2372
|
name: field.name,
|
|
@@ -2398,30 +2375,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
|
|
|
2398
2375
|
onBlur: field.handleBlur,
|
|
2399
2376
|
"aria-label": field.name,
|
|
2400
2377
|
...props,
|
|
2401
|
-
children: options.map((option) => /* @__PURE__ */
|
|
2378
|
+
children: options.map((option) => /* @__PURE__ */ jsx21(
|
|
2402
2379
|
FormControlLabel2,
|
|
2403
2380
|
{
|
|
2404
2381
|
value: option.value,
|
|
2405
|
-
control: /* @__PURE__ */
|
|
2382
|
+
control: /* @__PURE__ */ jsx21(Radio, {}),
|
|
2406
2383
|
label: option.label
|
|
2407
2384
|
},
|
|
2408
2385
|
option.value
|
|
2409
2386
|
))
|
|
2410
2387
|
}
|
|
2411
2388
|
),
|
|
2412
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2389
|
+
isTouched && hasError && /* @__PURE__ */ jsx21(FormHelperText2, { error: hasError, children: helperText })
|
|
2413
2390
|
] });
|
|
2414
2391
|
};
|
|
2415
2392
|
|
|
2416
2393
|
// src/components/form/FormSlider.tsx
|
|
2417
2394
|
import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
|
|
2418
|
-
import { jsx as
|
|
2395
|
+
import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2419
2396
|
var FormSlider = ({ label, ...props }) => {
|
|
2420
2397
|
const field = useFieldContext();
|
|
2421
2398
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2422
2399
|
return /* @__PURE__ */ jsxs10(FormControl3, { component: "fieldset", children: [
|
|
2423
|
-
label && /* @__PURE__ */
|
|
2424
|
-
/* @__PURE__ */
|
|
2400
|
+
label && /* @__PURE__ */ jsx22(FormLabel2, { children: label }),
|
|
2401
|
+
/* @__PURE__ */ jsx22(
|
|
2425
2402
|
Slider,
|
|
2426
2403
|
{
|
|
2427
2404
|
name: field.name,
|
|
@@ -2432,13 +2409,13 @@ var FormSlider = ({ label, ...props }) => {
|
|
|
2432
2409
|
...props
|
|
2433
2410
|
}
|
|
2434
2411
|
),
|
|
2435
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2412
|
+
isTouched && hasError && /* @__PURE__ */ jsx22(FormHelperText3, { error: hasError, children: helperText })
|
|
2436
2413
|
] });
|
|
2437
2414
|
};
|
|
2438
2415
|
|
|
2439
2416
|
// src/components/form/FormSubmitButton.tsx
|
|
2440
2417
|
import { Button as Button2 } from "@mui/material";
|
|
2441
|
-
import { jsx as
|
|
2418
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2442
2419
|
var FormSubmitButton = (props) => {
|
|
2443
2420
|
const form = useFormContext();
|
|
2444
2421
|
const handleClick = (event) => {
|
|
@@ -2446,7 +2423,7 @@ var FormSubmitButton = (props) => {
|
|
|
2446
2423
|
event.stopPropagation();
|
|
2447
2424
|
form.handleSubmit();
|
|
2448
2425
|
};
|
|
2449
|
-
return /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ jsx23(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx23(
|
|
2450
2427
|
Button2,
|
|
2451
2428
|
{
|
|
2452
2429
|
loading: isSubmitting,
|
|
@@ -2461,15 +2438,15 @@ var FormSubmitButton = (props) => {
|
|
|
2461
2438
|
|
|
2462
2439
|
// src/components/form/FormSwitch.tsx
|
|
2463
2440
|
import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
|
|
2464
|
-
import { jsx as
|
|
2441
|
+
import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2465
2442
|
var FormSwitch = (props) => {
|
|
2466
2443
|
const field = useFieldContext();
|
|
2467
2444
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2468
2445
|
return /* @__PURE__ */ jsxs11(FormControl4, { component: "fieldset", children: [
|
|
2469
|
-
/* @__PURE__ */
|
|
2446
|
+
/* @__PURE__ */ jsx24(
|
|
2470
2447
|
FormControlLabel3,
|
|
2471
2448
|
{
|
|
2472
|
-
control: /* @__PURE__ */
|
|
2449
|
+
control: /* @__PURE__ */ jsx24(
|
|
2473
2450
|
Switch,
|
|
2474
2451
|
{
|
|
2475
2452
|
name: field.name,
|
|
@@ -2483,17 +2460,17 @@ var FormSwitch = (props) => {
|
|
|
2483
2460
|
label: props.label ?? ""
|
|
2484
2461
|
}
|
|
2485
2462
|
),
|
|
2486
|
-
isTouched && hasError && /* @__PURE__ */
|
|
2463
|
+
isTouched && hasError && /* @__PURE__ */ jsx24(FormHelperText4, { error: hasError, children: helperText })
|
|
2487
2464
|
] });
|
|
2488
2465
|
};
|
|
2489
2466
|
|
|
2490
2467
|
// src/components/form/FormTextField.tsx
|
|
2491
2468
|
import { TextField as TextField3 } from "@mui/material";
|
|
2492
|
-
import { jsx as
|
|
2469
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2493
2470
|
var FormTextField = (props) => {
|
|
2494
2471
|
const field = useFieldContext();
|
|
2495
2472
|
const { isTouched, hasError, helperText } = getFieldStatus(field);
|
|
2496
|
-
return /* @__PURE__ */
|
|
2473
|
+
return /* @__PURE__ */ jsx25(
|
|
2497
2474
|
TextField3,
|
|
2498
2475
|
{
|
|
2499
2476
|
name: field.name,
|