wcz-test 2.11.0 → 2.13.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 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
  ] }) });
@@ -1838,6 +1838,7 @@ var AdapterDayjs = class {
1838
1838
  import { useIsFetching, useIsMutating } from "@tanstack/react-query";
1839
1839
  import { useRouterState } from "@tanstack/react-router";
1840
1840
  import { DashboardLayout } from "@toolpad/core/DashboardLayout";
1841
+ import { TanStackRouterAppProvider } from "@toolpad/core/tanstack-router";
1841
1842
  import { NotificationsProvider } from "@toolpad/core/useNotifications";
1842
1843
  import i18n from "i18next";
1843
1844
  import LanguageDetector from "i18next-browser-languagedetector";
@@ -2158,31 +2159,8 @@ var useGetTheme = (theme) => {
2158
2159
  );
2159
2160
  };
2160
2161
 
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
2162
  // src/providers/LayoutProvider.tsx
2185
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
2163
+ import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
2186
2164
  i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
2187
2165
  fallbackLng: "en",
2188
2166
  interpolation: {
@@ -2204,11 +2182,11 @@ var LayoutProvider = (props) => {
2204
2182
  const appTitle = rootRouterState.meta?.find((meta) => meta?.title)?.title;
2205
2183
  if (!appTitle)
2206
2184
  throw new Error("Title is not defined in the RootRoute head.");
2207
- return /* @__PURE__ */ jsx16(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n2.resolvedLanguage, children: /* @__PURE__ */ jsx16(TanstackRouterAppProvider, { navigation, theme, localeText: {
2185
+ return /* @__PURE__ */ jsx15(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n2.resolvedLanguage, children: /* @__PURE__ */ jsx15(TanStackRouterAppProvider, { navigation, theme, localeText: {
2208
2186
  confirm: t("Layout.Confirm"),
2209
2187
  cancel: t("Layout.Cancel"),
2210
2188
  alert: t("Layout.Alert")
2211
- }, children: /* @__PURE__ */ jsx16(NotificationsProvider, { slotProps: { snackbar: { anchorOrigin: { vertical: isLargeScreen ? "top" : "bottom", horizontal: "center" } } }, children: /* @__PURE__ */ jsx16(LayoutContext.Provider, { value: { appTitle }, children: /* @__PURE__ */ jsxs7(
2189
+ }, children: /* @__PURE__ */ jsx15(NotificationsProvider, { slotProps: { snackbar: { anchorOrigin: { vertical: isLargeScreen ? "top" : "bottom", horizontal: "center" } } }, children: /* @__PURE__ */ jsx15(LayoutContext.Provider, { value: { appTitle }, children: /* @__PURE__ */ jsxs7(
2212
2190
  DashboardLayout,
2213
2191
  {
2214
2192
  defaultSidebarCollapsed: true,
@@ -2220,8 +2198,8 @@ var LayoutProvider = (props) => {
2220
2198
  },
2221
2199
  children: [
2222
2200
  props.children,
2223
- /* @__PURE__ */ jsx16(DevelopmentBanner, { hasNavigationRoutes: navigation.length > 0 }),
2224
- (isFetching || isMutating) && /* @__PURE__ */ jsx16(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
2201
+ /* @__PURE__ */ jsx15(DevelopmentBanner, { hasNavigationRoutes: navigation.length > 0 }),
2202
+ (isFetching || isMutating) && /* @__PURE__ */ jsx15(LinearProgress, { sx: { position: "fixed", top: { xs: 56, sm: 64 }, left: 0, right: 0 } })
2225
2203
  ]
2226
2204
  }
2227
2205
  ) }) }) }) });
@@ -2246,11 +2224,11 @@ var getFieldStatus = (field) => {
2246
2224
  };
2247
2225
 
2248
2226
  // src/components/form/FormAutocomplete.tsx
2249
- import { jsx as jsx17 } from "react/jsx-runtime";
2227
+ import { jsx as jsx16 } from "react/jsx-runtime";
2250
2228
  var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
2251
2229
  const field = useFieldContext();
2252
2230
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2253
- return /* @__PURE__ */ jsx17(
2231
+ return /* @__PURE__ */ jsx16(
2254
2232
  Autocomplete,
2255
2233
  {
2256
2234
  value: field.state.value,
@@ -2259,7 +2237,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
2259
2237
  onBlur: field.handleBlur,
2260
2238
  "aria-label": field.name,
2261
2239
  ...autocompleteProps,
2262
- renderInput: (parameters) => /* @__PURE__ */ jsx17(
2240
+ renderInput: (parameters) => /* @__PURE__ */ jsx16(
2263
2241
  TextField,
2264
2242
  {
2265
2243
  ...parameters,
@@ -2275,15 +2253,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
2275
2253
 
2276
2254
  // src/components/form/FormCheckbox.tsx
2277
2255
  import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
2278
- import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
2256
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
2279
2257
  var FormCheckbox = (props) => {
2280
2258
  const field = useFieldContext();
2281
2259
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2282
2260
  return /* @__PURE__ */ jsxs8(FormControl, { component: "fieldset", children: [
2283
- /* @__PURE__ */ jsx18(
2261
+ /* @__PURE__ */ jsx17(
2284
2262
  FormControlLabel,
2285
2263
  {
2286
- control: /* @__PURE__ */ jsx18(
2264
+ control: /* @__PURE__ */ jsx17(
2287
2265
  Checkbox,
2288
2266
  {
2289
2267
  name: field.name,
@@ -2297,18 +2275,18 @@ var FormCheckbox = (props) => {
2297
2275
  label: props.label ?? ""
2298
2276
  }
2299
2277
  ),
2300
- isTouched && hasError && /* @__PURE__ */ jsx18(FormHelperText, { error: hasError, children: helperText })
2278
+ isTouched && hasError && /* @__PURE__ */ jsx17(FormHelperText, { error: hasError, children: helperText })
2301
2279
  ] });
2302
2280
  };
2303
2281
 
2304
2282
  // src/components/form/FormDatePicker.tsx
2305
2283
  import { DatePicker } from "@mui/x-date-pickers-pro";
2306
2284
  import dayjs from "dayjs";
2307
- import { jsx as jsx19 } from "react/jsx-runtime";
2285
+ import { jsx as jsx18 } from "react/jsx-runtime";
2308
2286
  var FormDatePicker = (props) => {
2309
2287
  const field = useFieldContext();
2310
2288
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2311
- return /* @__PURE__ */ jsx19(
2289
+ return /* @__PURE__ */ jsx18(
2312
2290
  DatePicker,
2313
2291
  {
2314
2292
  name: field.name,
@@ -2332,11 +2310,11 @@ var FormDatePicker = (props) => {
2332
2310
  // src/components/form/FormDateTimePicker.tsx
2333
2311
  import { DateTimePicker } from "@mui/x-date-pickers-pro";
2334
2312
  import dayjs2 from "dayjs";
2335
- import { jsx as jsx20 } from "react/jsx-runtime";
2313
+ import { jsx as jsx19 } from "react/jsx-runtime";
2336
2314
  var FormDateTimePicker = (props) => {
2337
2315
  const field = useFieldContext();
2338
2316
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2339
- return /* @__PURE__ */ jsx20(
2317
+ return /* @__PURE__ */ jsx19(
2340
2318
  DateTimePicker,
2341
2319
  {
2342
2320
  name: field.name,
@@ -2360,11 +2338,11 @@ var FormDateTimePicker = (props) => {
2360
2338
  // src/components/form/FormNumberField.tsx
2361
2339
  import { TextField as TextField2 } from "@mui/material";
2362
2340
  import { NumericFormat } from "react-number-format";
2363
- import { jsx as jsx21 } from "react/jsx-runtime";
2341
+ import { jsx as jsx20 } from "react/jsx-runtime";
2364
2342
  var FormNumberField = ({ options, ...props }) => {
2365
2343
  const field = useFieldContext();
2366
2344
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2367
- return /* @__PURE__ */ jsx21(
2345
+ return /* @__PURE__ */ jsx20(
2368
2346
  NumericFormat,
2369
2347
  {
2370
2348
  customInput: TextField2,
@@ -2383,13 +2361,13 @@ var FormNumberField = ({ options, ...props }) => {
2383
2361
 
2384
2362
  // src/components/form/FormRadioGroup.tsx
2385
2363
  import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
2386
- import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
2364
+ import { jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
2387
2365
  var FormRadioGroup = ({ label, options, ...props }) => {
2388
2366
  const field = useFieldContext();
2389
2367
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2390
2368
  return /* @__PURE__ */ jsxs9(FormControl2, { component: "fieldset", children: [
2391
- label && /* @__PURE__ */ jsx22(FormLabel, { component: "legend", children: label }),
2392
- /* @__PURE__ */ jsx22(
2369
+ label && /* @__PURE__ */ jsx21(FormLabel, { component: "legend", children: label }),
2370
+ /* @__PURE__ */ jsx21(
2393
2371
  RadioGroup,
2394
2372
  {
2395
2373
  name: field.name,
@@ -2398,30 +2376,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
2398
2376
  onBlur: field.handleBlur,
2399
2377
  "aria-label": field.name,
2400
2378
  ...props,
2401
- children: options.map((option) => /* @__PURE__ */ jsx22(
2379
+ children: options.map((option) => /* @__PURE__ */ jsx21(
2402
2380
  FormControlLabel2,
2403
2381
  {
2404
2382
  value: option.value,
2405
- control: /* @__PURE__ */ jsx22(Radio, {}),
2383
+ control: /* @__PURE__ */ jsx21(Radio, {}),
2406
2384
  label: option.label
2407
2385
  },
2408
2386
  option.value
2409
2387
  ))
2410
2388
  }
2411
2389
  ),
2412
- isTouched && hasError && /* @__PURE__ */ jsx22(FormHelperText2, { error: hasError, children: helperText })
2390
+ isTouched && hasError && /* @__PURE__ */ jsx21(FormHelperText2, { error: hasError, children: helperText })
2413
2391
  ] });
2414
2392
  };
2415
2393
 
2416
2394
  // src/components/form/FormSlider.tsx
2417
2395
  import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
2418
- import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
2396
+ import { jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
2419
2397
  var FormSlider = ({ label, ...props }) => {
2420
2398
  const field = useFieldContext();
2421
2399
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2422
2400
  return /* @__PURE__ */ jsxs10(FormControl3, { component: "fieldset", children: [
2423
- label && /* @__PURE__ */ jsx23(FormLabel2, { children: label }),
2424
- /* @__PURE__ */ jsx23(
2401
+ label && /* @__PURE__ */ jsx22(FormLabel2, { children: label }),
2402
+ /* @__PURE__ */ jsx22(
2425
2403
  Slider,
2426
2404
  {
2427
2405
  name: field.name,
@@ -2432,13 +2410,13 @@ var FormSlider = ({ label, ...props }) => {
2432
2410
  ...props
2433
2411
  }
2434
2412
  ),
2435
- isTouched && hasError && /* @__PURE__ */ jsx23(FormHelperText3, { error: hasError, children: helperText })
2413
+ isTouched && hasError && /* @__PURE__ */ jsx22(FormHelperText3, { error: hasError, children: helperText })
2436
2414
  ] });
2437
2415
  };
2438
2416
 
2439
2417
  // src/components/form/FormSubmitButton.tsx
2440
2418
  import { Button as Button2 } from "@mui/material";
2441
- import { jsx as jsx24 } from "react/jsx-runtime";
2419
+ import { jsx as jsx23 } from "react/jsx-runtime";
2442
2420
  var FormSubmitButton = (props) => {
2443
2421
  const form = useFormContext();
2444
2422
  const handleClick = (event) => {
@@ -2446,7 +2424,7 @@ var FormSubmitButton = (props) => {
2446
2424
  event.stopPropagation();
2447
2425
  form.handleSubmit();
2448
2426
  };
2449
- return /* @__PURE__ */ jsx24(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx24(
2427
+ return /* @__PURE__ */ jsx23(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx23(
2450
2428
  Button2,
2451
2429
  {
2452
2430
  loading: isSubmitting,
@@ -2461,15 +2439,15 @@ var FormSubmitButton = (props) => {
2461
2439
 
2462
2440
  // src/components/form/FormSwitch.tsx
2463
2441
  import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
2464
- import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
2442
+ import { jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2465
2443
  var FormSwitch = (props) => {
2466
2444
  const field = useFieldContext();
2467
2445
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2468
2446
  return /* @__PURE__ */ jsxs11(FormControl4, { component: "fieldset", children: [
2469
- /* @__PURE__ */ jsx25(
2447
+ /* @__PURE__ */ jsx24(
2470
2448
  FormControlLabel3,
2471
2449
  {
2472
- control: /* @__PURE__ */ jsx25(
2450
+ control: /* @__PURE__ */ jsx24(
2473
2451
  Switch,
2474
2452
  {
2475
2453
  name: field.name,
@@ -2483,17 +2461,17 @@ var FormSwitch = (props) => {
2483
2461
  label: props.label ?? ""
2484
2462
  }
2485
2463
  ),
2486
- isTouched && hasError && /* @__PURE__ */ jsx25(FormHelperText4, { error: hasError, children: helperText })
2464
+ isTouched && hasError && /* @__PURE__ */ jsx24(FormHelperText4, { error: hasError, children: helperText })
2487
2465
  ] });
2488
2466
  };
2489
2467
 
2490
2468
  // src/components/form/FormTextField.tsx
2491
2469
  import { TextField as TextField3 } from "@mui/material";
2492
- import { jsx as jsx26 } from "react/jsx-runtime";
2470
+ import { jsx as jsx25 } from "react/jsx-runtime";
2493
2471
  var FormTextField = (props) => {
2494
2472
  const field = useFieldContext();
2495
2473
  const { isTouched, hasError, helperText } = getFieldStatus(field);
2496
- return /* @__PURE__ */ jsx26(
2474
+ return /* @__PURE__ */ jsx25(
2497
2475
  TextField3,
2498
2476
  {
2499
2477
  name: field.name,