wcz-test 4.9.0 → 5.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.
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ var require_react_is_production_min = __commonJS({
47
47
  var w = b ? Symbol.for("react.fundamental") : 60117;
48
48
  var x = b ? Symbol.for("react.responder") : 60118;
49
49
  var y = b ? Symbol.for("react.scope") : 60119;
50
- function z2(a) {
50
+ function z19(a) {
51
51
  if ("object" === typeof a && null !== a) {
52
52
  var u = a.$$typeof;
53
53
  switch (u) {
@@ -78,7 +78,7 @@ var require_react_is_production_min = __commonJS({
78
78
  }
79
79
  }
80
80
  function A(a) {
81
- return z2(a) === m;
81
+ return z19(a) === m;
82
82
  }
83
83
  exports.AsyncMode = l;
84
84
  exports.ConcurrentMode = m;
@@ -94,46 +94,46 @@ var require_react_is_production_min = __commonJS({
94
94
  exports.StrictMode = f;
95
95
  exports.Suspense = p;
96
96
  exports.isAsyncMode = function(a) {
97
- return A(a) || z2(a) === l;
97
+ return A(a) || z19(a) === l;
98
98
  };
99
99
  exports.isConcurrentMode = A;
100
100
  exports.isContextConsumer = function(a) {
101
- return z2(a) === k;
101
+ return z19(a) === k;
102
102
  };
103
103
  exports.isContextProvider = function(a) {
104
- return z2(a) === h;
104
+ return z19(a) === h;
105
105
  };
106
106
  exports.isElement = function(a) {
107
107
  return "object" === typeof a && null !== a && a.$$typeof === c;
108
108
  };
109
109
  exports.isForwardRef = function(a) {
110
- return z2(a) === n;
110
+ return z19(a) === n;
111
111
  };
112
112
  exports.isFragment = function(a) {
113
- return z2(a) === e;
113
+ return z19(a) === e;
114
114
  };
115
115
  exports.isLazy = function(a) {
116
- return z2(a) === t2;
116
+ return z19(a) === t2;
117
117
  };
118
118
  exports.isMemo = function(a) {
119
- return z2(a) === r;
119
+ return z19(a) === r;
120
120
  };
121
121
  exports.isPortal = function(a) {
122
- return z2(a) === d;
122
+ return z19(a) === d;
123
123
  };
124
124
  exports.isProfiler = function(a) {
125
- return z2(a) === g;
125
+ return z19(a) === g;
126
126
  };
127
127
  exports.isStrictMode = function(a) {
128
- return z2(a) === f;
128
+ return z19(a) === f;
129
129
  };
130
130
  exports.isSuspense = function(a) {
131
- return z2(a) === p;
131
+ return z19(a) === p;
132
132
  };
133
133
  exports.isValidElementType = function(a) {
134
134
  return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t2 || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
135
135
  };
136
- exports.typeOf = z2;
136
+ exports.typeOf = z19;
137
137
  }
138
138
  });
139
139
 
@@ -167,12 +167,12 @@ var require_react_is_development = __commonJS({
167
167
  return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
168
168
  type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
169
169
  }
170
- function typeOf(object) {
171
- if (typeof object === "object" && object !== null) {
172
- var $$typeof = object.$$typeof;
170
+ function typeOf(object2) {
171
+ if (typeof object2 === "object" && object2 !== null) {
172
+ var $$typeof = object2.$$typeof;
173
173
  switch ($$typeof) {
174
174
  case REACT_ELEMENT_TYPE:
175
- var type = object.type;
175
+ var type = object2.type;
176
176
  switch (type) {
177
177
  case REACT_ASYNC_MODE_TYPE:
178
178
  case REACT_CONCURRENT_MODE_TYPE:
@@ -214,50 +214,50 @@ var require_react_is_development = __commonJS({
214
214
  var StrictMode = REACT_STRICT_MODE_TYPE;
215
215
  var Suspense = REACT_SUSPENSE_TYPE;
216
216
  var hasWarnedAboutDeprecatedIsAsyncMode = false;
217
- function isAsyncMode(object) {
217
+ function isAsyncMode(object2) {
218
218
  {
219
219
  if (!hasWarnedAboutDeprecatedIsAsyncMode) {
220
220
  hasWarnedAboutDeprecatedIsAsyncMode = true;
221
221
  console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
222
222
  }
223
223
  }
224
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
224
+ return isConcurrentMode(object2) || typeOf(object2) === REACT_ASYNC_MODE_TYPE;
225
225
  }
226
- function isConcurrentMode(object) {
227
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
226
+ function isConcurrentMode(object2) {
227
+ return typeOf(object2) === REACT_CONCURRENT_MODE_TYPE;
228
228
  }
229
- function isContextConsumer(object) {
230
- return typeOf(object) === REACT_CONTEXT_TYPE;
229
+ function isContextConsumer(object2) {
230
+ return typeOf(object2) === REACT_CONTEXT_TYPE;
231
231
  }
232
- function isContextProvider(object) {
233
- return typeOf(object) === REACT_PROVIDER_TYPE;
232
+ function isContextProvider(object2) {
233
+ return typeOf(object2) === REACT_PROVIDER_TYPE;
234
234
  }
235
- function isElement(object) {
236
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
235
+ function isElement(object2) {
236
+ return typeof object2 === "object" && object2 !== null && object2.$$typeof === REACT_ELEMENT_TYPE;
237
237
  }
238
- function isForwardRef(object) {
239
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
238
+ function isForwardRef(object2) {
239
+ return typeOf(object2) === REACT_FORWARD_REF_TYPE;
240
240
  }
241
- function isFragment(object) {
242
- return typeOf(object) === REACT_FRAGMENT_TYPE;
241
+ function isFragment(object2) {
242
+ return typeOf(object2) === REACT_FRAGMENT_TYPE;
243
243
  }
244
- function isLazy(object) {
245
- return typeOf(object) === REACT_LAZY_TYPE;
244
+ function isLazy(object2) {
245
+ return typeOf(object2) === REACT_LAZY_TYPE;
246
246
  }
247
- function isMemo(object) {
248
- return typeOf(object) === REACT_MEMO_TYPE;
247
+ function isMemo(object2) {
248
+ return typeOf(object2) === REACT_MEMO_TYPE;
249
249
  }
250
- function isPortal(object) {
251
- return typeOf(object) === REACT_PORTAL_TYPE;
250
+ function isPortal(object2) {
251
+ return typeOf(object2) === REACT_PORTAL_TYPE;
252
252
  }
253
- function isProfiler(object) {
254
- return typeOf(object) === REACT_PROFILER_TYPE;
253
+ function isProfiler(object2) {
254
+ return typeOf(object2) === REACT_PROFILER_TYPE;
255
255
  }
256
- function isStrictMode(object) {
257
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
256
+ function isStrictMode(object2) {
257
+ return typeOf(object2) === REACT_STRICT_MODE_TYPE;
258
258
  }
259
- function isSuspense(object) {
260
- return typeOf(object) === REACT_SUSPENSE_TYPE;
259
+ function isSuspense(object2) {
260
+ return typeOf(object2) === REACT_SUSPENSE_TYPE;
261
261
  }
262
262
  exports.AsyncMode = AsyncMode;
263
263
  exports.ConcurrentMode = ConcurrentMode;
@@ -1009,20 +1009,20 @@ var TypographyWithIcon = ({ startIcon, endIcon, children, sx, ...props }) => {
1009
1009
 
1010
1010
  // src/components/core/Fullscreen.tsx
1011
1011
  import { Box } from "@mui/material";
1012
- import { useEffect, useRef, useState } from "react";
1012
+ import { useEffect, useEffectEvent, useRef, useState } from "react";
1013
1013
  import { jsx as jsx2 } from "react/jsx-runtime";
1014
1014
  var Fullscreen = ({ children, sx, ...props }) => {
1015
1015
  const reference = useRef(null);
1016
1016
  const [height, setHeight] = useState();
1017
+ const recompute = useEffectEvent(() => {
1018
+ if (!reference.current) return;
1019
+ const top = Math.ceil(reference.current.getBoundingClientRect().top);
1020
+ const avail = Math.max(0, window.innerHeight - top);
1021
+ setHeight(avail);
1022
+ });
1017
1023
  useEffect(() => {
1018
1024
  const element = reference.current;
1019
1025
  if (!element) return;
1020
- const recompute = () => {
1021
- if (!reference.current) return;
1022
- const top = Math.ceil(reference.current.getBoundingClientRect().top);
1023
- const avail = Math.max(0, window.innerHeight - top);
1024
- setHeight(avail);
1025
- };
1026
1026
  recompute();
1027
1027
  window.addEventListener("resize", recompute);
1028
1028
  const ro = new ResizeObserver(recompute);
@@ -1048,11 +1048,7 @@ var Fullscreen = ({ children, sx, ...props }) => {
1048
1048
  },
1049
1049
  height,
1050
1050
  ...props,
1051
- children: /* @__PURE__ */ jsx2(Box, { sx: {
1052
- flex: 1,
1053
- minHeight: 0,
1054
- height: "100%"
1055
- }, children })
1051
+ children
1056
1052
  }
1057
1053
  );
1058
1054
  };
@@ -1184,7 +1180,22 @@ var useAppTitle = () => {
1184
1180
  return rootRouterState.meta?.find((meta) => meta?.title)?.title;
1185
1181
  };
1186
1182
 
1187
- // src/utils/ClientUtils.ts
1183
+ // src/env.ts
1184
+ import { createEnv } from "@t3-oss/env-core";
1185
+ import { z } from "zod";
1186
+ var clientEnv = createEnv({
1187
+ clientPrefix: "VITE_",
1188
+ client: {
1189
+ VITE_MUI_LICENSE_KEY: z.string(),
1190
+ VITE_DYNAMSOFT_LICENSE_KEY: z.string().optional(),
1191
+ VITE_FILE_API_BASE_URL: z.url().optional(),
1192
+ VITE_PEOPLESOFT_API_BASE_URL: z.url().optional(),
1193
+ VITE_APPROVAL_API_BASE_URL: z.url().optional()
1194
+ },
1195
+ runtimeEnv: import.meta.env
1196
+ });
1197
+
1198
+ // src/lib/utils.ts
1188
1199
  import axios from "axios";
1189
1200
  var Platform = class {
1190
1201
  static get isAndroid() {
@@ -1221,10 +1232,17 @@ var rootRouteHead = ({ title }) => () => ({
1221
1232
  ]
1222
1233
  });
1223
1234
  var wczApiClient = axios.create();
1235
+ var getFieldStatus = (field) => {
1236
+ const { meta } = field.state;
1237
+ const isTouched = meta.isTouched;
1238
+ const hasError = !!meta.errors.length;
1239
+ const helperText = meta.errors[0]?.message;
1240
+ return { isTouched, hasError, helperText };
1241
+ };
1224
1242
 
1225
1243
  // src/hooks/FileHooks.ts
1226
- var BASE_URL = import.meta.env.VITE_FILE_API_BASE_URL;
1227
- var QUERY_KEY = "Files";
1244
+ var BASE_URL = clientEnv.VITE_FILE_API_BASE_URL;
1245
+ var QUERY_KEY = "File";
1228
1246
  var HOUR = 1e3 * 60 * 60;
1229
1247
  var useGetFileMetas = (subId, options) => {
1230
1248
  const appTitle = useAppTitle();
@@ -1768,9 +1786,6 @@ var RouterError = ({ error }) => {
1768
1786
  ] }) });
1769
1787
  };
1770
1788
 
1771
- // src/providers/LayoutProvider.tsx
1772
- import { ThemeProvider } from "@mui/material";
1773
-
1774
1789
  // node_modules/@babel/runtime/helpers/esm/extends.js
1775
1790
  function _extends() {
1776
1791
  return _extends = Object.assign ? Object.assign.bind() : function(n) {
@@ -2211,18 +2226,18 @@ var AdapterDayjs = class {
2211
2226
  }
2212
2227
  };
2213
2228
  createSystemDate = (value) => {
2214
- let date;
2229
+ let date2;
2215
2230
  if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
2216
2231
  const timezone = dayjs.tz.guess();
2217
2232
  if (timezone === "UTC") {
2218
- date = dayjs(value);
2233
+ date2 = dayjs(value);
2219
2234
  } else {
2220
- date = dayjs.tz(value, timezone);
2235
+ date2 = dayjs.tz(value, timezone);
2221
2236
  }
2222
2237
  } else {
2223
- date = dayjs(value);
2238
+ date2 = dayjs(value);
2224
2239
  }
2225
- return this.setLocaleToValue(date);
2240
+ return this.setLocaleToValue(date2);
2226
2241
  };
2227
2242
  createUTCDate = (value) => {
2228
2243
  if (!this.hasUTCPlugin()) {
@@ -2482,8 +2497,8 @@ var AdapterDayjs = class {
2482
2497
  setMonth = (value, month) => {
2483
2498
  return this.adjustOffset(value.set("month", month));
2484
2499
  };
2485
- setDate = (value, date) => {
2486
- return this.adjustOffset(value.set("date", date));
2500
+ setDate = (value, date2) => {
2501
+ return this.adjustOffset(value.set("date", date2));
2487
2502
  };
2488
2503
  setHours = (value, hours) => {
2489
2504
  return this.adjustOffset(value.set("hour", hours));
@@ -2535,14 +2550,14 @@ var AdapterDayjs = class {
2535
2550
  };
2536
2551
 
2537
2552
  // src/providers/LayoutProvider.tsx
2538
- import { useEffect as useEffect6, useEffectEvent } from "react";
2553
+ import { useEffect as useEffect7, useEffectEvent as useEffectEvent2 } from "react";
2539
2554
  import { useTranslation as useTranslation7 } from "react-i18next";
2540
- import * as z from "zod";
2555
+ import * as z3 from "zod";
2541
2556
 
2542
2557
  // src/components/core/Layout.tsx
2543
2558
  import Menu3 from "@mui/icons-material/Menu";
2544
2559
  import MenuOpen from "@mui/icons-material/MenuOpen";
2545
- import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, InitColorSchemeScript, LinearProgress, Toolbar } from "@mui/material";
2560
+ import { AppBar, Box as Box9, CssBaseline, IconButton as IconButton5, LinearProgress, Toolbar } from "@mui/material";
2546
2561
  import { styled as styled2 } from "@mui/material/styles";
2547
2562
  import { useIsFetching, useIsMutating } from "@tanstack/react-query";
2548
2563
  import { Fragment as Fragment7 } from "react";
@@ -2902,15 +2917,22 @@ import ArrowBack from "@mui/icons-material/ArrowBack";
2902
2917
  import Brightness4 from "@mui/icons-material/Brightness4";
2903
2918
  import ChevronRight from "@mui/icons-material/ChevronRight";
2904
2919
  import DarkMode from "@mui/icons-material/DarkMode";
2920
+ import Done from "@mui/icons-material/Done";
2905
2921
  import LightMode from "@mui/icons-material/LightMode";
2906
2922
  import Login from "@mui/icons-material/Login";
2907
2923
  import Logout from "@mui/icons-material/Logout";
2908
2924
  import SettingsBrightness from "@mui/icons-material/SettingsBrightness";
2909
2925
  import Translate from "@mui/icons-material/Translate";
2910
- import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as ListItemButton5, ListItemIcon as ListItemIcon4, ListItemText as ListItemText4, ListSubheader as ListSubheader2, Menu as Menu2, Typography as Typography7, useColorScheme } from "@mui/material";
2926
+ import { Avatar as Avatar2, Box as Box8, IconButton as IconButton4, List as List4, ListItem as ListItem2, ListItemButton as ListItemButton5, ListItemIcon as ListItemIcon4, ListItemText as ListItemText4, ListSubheader as ListSubheader2, Menu as Menu2, Typography as Typography7 } from "@mui/material";
2911
2927
  import { Fragment as Fragment6, useState as useState8 } from "react";
2912
2928
  import { useTranslation as useTranslation5 } from "react-i18next";
2913
- import Done from "@mui/icons-material/Done";
2929
+
2930
+ // src/contexts/ThemeContext.ts
2931
+ import { createContext as createContext4, useContext as useContext4 } from "react";
2932
+ var ThemeContext = createContext4({});
2933
+ var useTheme3 = () => useContext4(ThemeContext);
2934
+
2935
+ // src/components/core/ToolbarAccount.tsx
2914
2936
  import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
2915
2937
  var capitalize = (value) => value && value.charAt(0).toUpperCase() + value.slice(1);
2916
2938
  var ToolbarAccount = () => {
@@ -2918,7 +2940,7 @@ var ToolbarAccount = () => {
2918
2940
  const [tab, setTab] = useState8("settings");
2919
2941
  const open = Boolean(anchorElement);
2920
2942
  const { t: t2, i18n } = useTranslation5();
2921
- const { mode, setMode } = useColorScheme();
2943
+ const { mode, setMode } = useTheme3();
2922
2944
  const supportedLanguages = (Array.isArray(i18n.options.supportedLngs) ? i18n.options.supportedLngs : []).filter((lng) => lng !== "cimode");
2923
2945
  const languageDisplayNames = new Intl.DisplayNames([i18n.language], { type: "language" });
2924
2946
  const colorModes = [
@@ -3029,7 +3051,6 @@ var Layout = (props) => {
3029
3051
  const isFetching = !!useIsFetching();
3030
3052
  const isMutating = !!useIsMutating();
3031
3053
  return /* @__PURE__ */ jsxs14(Fragment7, { children: [
3032
- /* @__PURE__ */ jsx25(InitColorSchemeScript, {}),
3033
3054
  /* @__PURE__ */ jsx25(CssBaseline, {}),
3034
3055
  /* @__PURE__ */ jsxs14(Box9, { sx: { display: "flex", height: "100dvh", maxHeight: "100dvh", overflow: "hidden", width: "100%" }, children: [
3035
3056
  /* @__PURE__ */ jsx25(
@@ -3066,8 +3087,78 @@ var Layout = (props) => {
3066
3087
  ] });
3067
3088
  };
3068
3089
 
3069
- // src/hooks/ThemeHook.ts
3070
- import { createTheme, darken, lighten } from "@mui/material";
3090
+ // src/providers/DialogsProvider.tsx
3091
+ import { useCallback, useId, useMemo as useMemo4, useRef as useRef3, useState as useState9 } from "react";
3092
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3093
+ function DialogsProvider({ children, unmountAfter = 1e3 }) {
3094
+ const [stack, setStack] = useState9([]);
3095
+ const keyPrefix = useId();
3096
+ const nextId = useRef3(0);
3097
+ const dialogMetadata = useRef3(/* @__PURE__ */ new WeakMap());
3098
+ const requestDialog = useEventCallback_default(function open(Component7, payload, options = {}) {
3099
+ const { onClose = async () => {
3100
+ } } = options;
3101
+ let resolve;
3102
+ const promise = new Promise((resolveImpl) => {
3103
+ resolve = resolveImpl;
3104
+ });
3105
+ const key = `${keyPrefix}-${nextId.current}`;
3106
+ nextId.current += 1;
3107
+ const newEntry = {
3108
+ key,
3109
+ open: true,
3110
+ promise,
3111
+ Component: Component7,
3112
+ payload,
3113
+ onClose,
3114
+ resolve
3115
+ };
3116
+ dialogMetadata.current.set(promise, newEntry);
3117
+ setStack((previousStack) => [...previousStack, newEntry]);
3118
+ return promise;
3119
+ });
3120
+ const removeDialogFromStack = useCallback((dialog) => {
3121
+ setStack((previousStack) => previousStack.filter((entry) => entry.promise !== dialog));
3122
+ dialogMetadata.current.delete(dialog);
3123
+ }, []);
3124
+ const closeDialogUi = useEventCallback_default(function closeDialogUi2(dialog) {
3125
+ setStack(
3126
+ (previousStack) => previousStack.map((entry) => entry.promise === dialog ? { ...entry, open: false } : entry)
3127
+ );
3128
+ setTimeout(() => removeDialogFromStack(dialog), unmountAfter);
3129
+ });
3130
+ const closeDialog = useEventCallback_default(async function closeDialog2(dialog, result) {
3131
+ const entryToClose = dialogMetadata.current.get(dialog);
3132
+ if (!entryToClose) {
3133
+ throw new Error("Dialog not found in stack");
3134
+ }
3135
+ try {
3136
+ await entryToClose.onClose(result);
3137
+ } finally {
3138
+ entryToClose.resolve(result);
3139
+ closeDialogUi(dialog);
3140
+ }
3141
+ return dialog;
3142
+ });
3143
+ const contextValue = useMemo4(() => ({ open: requestDialog, close: closeDialog }), [requestDialog, closeDialog]);
3144
+ return /* @__PURE__ */ jsxs15(DialogsContext.Provider, { value: contextValue, children: [
3145
+ children,
3146
+ stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */ jsx26(
3147
+ Component7,
3148
+ {
3149
+ payload,
3150
+ open,
3151
+ onClose: async (result) => {
3152
+ await closeDialog(promise, result);
3153
+ }
3154
+ },
3155
+ key
3156
+ ))
3157
+ ] });
3158
+ }
3159
+
3160
+ // src/providers/ThemeProvider.tsx
3161
+ import { ThemeProvider as MuiThemeProvider, createTheme, darken, lighten, useMediaQuery as useMediaQuery2 } from "@mui/material";
3071
3162
  import { grey as grey2 } from "@mui/material/colors";
3072
3163
  import { csCZ as csCZ3, enUS as enUS3 } from "@mui/material/locale";
3073
3164
 
@@ -3398,6 +3489,7 @@ var csCZGrid = {
3398
3489
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
3399
3490
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
3400
3491
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
3492
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
3401
3493
  };
3402
3494
  var csCZ = getGridLocalization(csCZGrid);
3403
3495
 
@@ -3687,7 +3779,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3687
3779
  promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ""}`,
3688
3780
  promptChangePivotRowsLabel: (count) => `Rows (${count})`,
3689
3781
  promptChangePivotValuesLabel: (count) => `Values (${count})`,
3690
- promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
3782
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
3783
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
3691
3784
  };
3692
3785
 
3693
3786
  // node_modules/@mui/x-data-grid/esm/locales/enUS.js
@@ -3770,31 +3863,39 @@ var csCZPickers = {
3770
3863
  };
3771
3864
  var csCZ2 = getPickersLocalization(csCZPickers);
3772
3865
 
3773
- // src/hooks/ThemeHook.ts
3866
+ // src/providers/ThemeProvider.tsx
3867
+ import { useRouterState as useRouterState3 } from "@tanstack/react-router";
3868
+ import { createServerFn } from "@tanstack/react-start";
3869
+ import { getCookie } from "@tanstack/react-start/server";
3870
+ import { useEffect as useEffect6, useState as useState10 } from "react";
3774
3871
  import { useTranslation as useTranslation6 } from "react-i18next";
3872
+ import { z as z2 } from "zod";
3873
+ import { jsx as jsx27 } from "react/jsx-runtime";
3775
3874
  var WISTRON_PRIMARY_COLOR = "#00506E";
3776
3875
  var WISTRON_SECONDARY_COLOR = "#64DC00";
3777
- var useGetTheme = (theme) => {
3876
+ var THEME_COOKIE_NAME = "theme";
3877
+ var TEN_YEARS_IN_SECONDS = 60 * 60 * 24 * 365 * 10;
3878
+ var LOCALE_MAP = {
3879
+ cs: [csCZ, csCZ2, csCZ3],
3880
+ en: [enUS2, enUS, enUS3]
3881
+ };
3882
+ var ThemeSchema = z2.enum(["light", "dark"]).or(z2.literal("system"));
3883
+ function ThemeProvider({ children, theme }) {
3778
3884
  const { i18n } = useTranslation6();
3779
- return createTheme(
3885
+ const rootRouterState = useRouterState3({ select: (s) => s.matches[0] });
3886
+ const prefersDarkMode = useMediaQuery2("(prefers-color-scheme: dark)");
3887
+ const [mode, setMode] = useState10(rootRouterState.context.themeMode);
3888
+ const resolvedMode = mode === "system" ? prefersDarkMode ? "dark" : "light" : mode;
3889
+ useEffect6(() => {
3890
+ document.cookie = `${THEME_COOKIE_NAME}=${mode}; path=/; max-age=${TEN_YEARS_IN_SECONDS}`;
3891
+ }, [mode]);
3892
+ const createdTheme = createTheme(
3780
3893
  {
3781
- cssVariables: {
3782
- colorSchemeSelector: "data-mui-color-scheme"
3783
- },
3784
- colorSchemes: {
3785
- light: {
3786
- palette: {
3787
- primary: { main: WISTRON_PRIMARY_COLOR },
3788
- secondary: { main: WISTRON_SECONDARY_COLOR }
3789
- }
3790
- },
3791
- dark: {
3792
- palette: {
3793
- primary: { main: lighten(WISTRON_PRIMARY_COLOR, 0.5) },
3794
- secondary: { main: darken(WISTRON_SECONDARY_COLOR, 0.5) }
3795
- }
3796
- },
3797
- ...theme?.colorSchemes
3894
+ palette: {
3895
+ mode: resolvedMode,
3896
+ primary: { main: resolvedMode === "dark" ? lighten(WISTRON_PRIMARY_COLOR, 0.5) : WISTRON_PRIMARY_COLOR },
3897
+ secondary: { main: resolvedMode === "dark" ? darken(WISTRON_SECONDARY_COLOR, 0.5) : WISTRON_SECONDARY_COLOR },
3898
+ ...theme?.palette
3798
3899
  },
3799
3900
  components: {
3800
3901
  MuiCssBaseline: {
@@ -3823,151 +3924,49 @@ var useGetTheme = (theme) => {
3823
3924
  };
3824
3925
  }
3825
3926
  },
3826
- MuiDataGrid: {
3827
- styleOverrides: {
3828
- root: ({ theme: muiTheme }) => ({
3829
- "& .MuiDataGrid-cell--editing": {
3830
- "& .MuiInputBase-root": {
3831
- height: "100%"
3832
- }
3833
- },
3834
- "& .MuiDataGrid-columnHeaderTitle": {
3835
- fontWeight: 600
3836
- },
3837
- "& .Mui-error": {
3838
- backgroundColor: muiTheme.palette.error.main,
3839
- color: muiTheme.palette.error.contrastText
3840
- },
3841
- "& .MuiDataGrid-booleanCell[data-value='true']": {
3842
- color: `${muiTheme.palette.success.main} !important`
3843
- },
3844
- "& .MuiDataGrid-booleanCell[data-value='false']": {
3845
- color: `${muiTheme.palette.error.main} !important`
3846
- }
3847
- })
3848
- }
3849
- },
3850
3927
  ...theme?.components
3851
3928
  }
3852
3929
  },
3853
- i18n.resolvedLanguage === "cs" ? csCZ : enUS2,
3854
- i18n.resolvedLanguage === "cs" ? csCZ2 : enUS,
3855
- i18n.resolvedLanguage === "cs" ? csCZ3 : enUS3
3930
+ ...LOCALE_MAP[i18n.language]
3856
3931
  );
3857
- };
3858
-
3859
- // src/providers/DialogsProvider.tsx
3860
- import { useCallback, useId, useMemo as useMemo4, useRef as useRef3, useState as useState9 } from "react";
3861
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3862
- function DialogsProvider({ children, unmountAfter = 1e3 }) {
3863
- const [stack, setStack] = useState9([]);
3864
- const keyPrefix = useId();
3865
- const nextId = useRef3(0);
3866
- const dialogMetadata = useRef3(/* @__PURE__ */ new WeakMap());
3867
- const requestDialog = useEventCallback_default(function open(Component7, payload, options = {}) {
3868
- const { onClose = async () => {
3869
- } } = options;
3870
- let resolve;
3871
- const promise = new Promise((resolveImpl) => {
3872
- resolve = resolveImpl;
3873
- });
3874
- const key = `${keyPrefix}-${nextId.current}`;
3875
- nextId.current += 1;
3876
- const newEntry = {
3877
- key,
3878
- open: true,
3879
- promise,
3880
- Component: Component7,
3881
- payload,
3882
- onClose,
3883
- resolve
3884
- };
3885
- dialogMetadata.current.set(promise, newEntry);
3886
- setStack((previousStack) => [...previousStack, newEntry]);
3887
- return promise;
3888
- });
3889
- const removeDialogFromStack = useCallback((dialog) => {
3890
- setStack((previousStack) => previousStack.filter((entry) => entry.promise !== dialog));
3891
- dialogMetadata.current.delete(dialog);
3892
- }, []);
3893
- const closeDialogUi = useEventCallback_default(function closeDialogUi2(dialog) {
3894
- setStack(
3895
- (previousStack) => previousStack.map((entry) => entry.promise === dialog ? { ...entry, open: false } : entry)
3896
- );
3897
- setTimeout(() => removeDialogFromStack(dialog), unmountAfter);
3898
- });
3899
- const closeDialog = useEventCallback_default(async function closeDialog2(dialog, result) {
3900
- const entryToClose = dialogMetadata.current.get(dialog);
3901
- if (!entryToClose) {
3902
- throw new Error("Dialog not found in stack");
3903
- }
3904
- try {
3905
- await entryToClose.onClose(result);
3906
- } finally {
3907
- entryToClose.resolve(result);
3908
- closeDialogUi(dialog);
3909
- }
3910
- return dialog;
3911
- });
3912
- const contextValue = useMemo4(() => ({ open: requestDialog, close: closeDialog }), [requestDialog, closeDialog]);
3913
- return /* @__PURE__ */ jsxs15(DialogsContext.Provider, { value: contextValue, children: [
3914
- children,
3915
- stack.map(({ key, open, Component: Component7, payload, promise }) => /* @__PURE__ */ jsx26(
3916
- Component7,
3917
- {
3918
- payload,
3919
- open,
3920
- onClose: async (result) => {
3921
- await closeDialog(promise, result);
3922
- }
3923
- },
3924
- key
3925
- ))
3926
- ] });
3932
+ return /* @__PURE__ */ jsx27(ThemeContext.Provider, { value: { mode, setMode }, children: /* @__PURE__ */ jsx27(MuiThemeProvider, { theme: createdTheme, children }) });
3927
3933
  }
3934
+ var getThemeMode = createServerFn().handler(() => {
3935
+ const themeCookie = getCookie(THEME_COOKIE_NAME);
3936
+ const parsed = ThemeSchema.safeParse(themeCookie);
3937
+ return parsed.success ? parsed.data : "system";
3938
+ });
3928
3939
 
3929
3940
  // src/providers/LayoutProvider.tsx
3930
- import { jsx as jsx27 } from "react/jsx-runtime";
3941
+ import { jsx as jsx28 } from "react/jsx-runtime";
3931
3942
  var LayoutProvider = ({ navigation, theme, children }) => {
3932
3943
  const { i18n } = useTranslation7();
3933
- const createdTheme = useGetTheme(theme);
3934
- const languageChangedHandler = useEffectEvent(() => {
3935
- z.config(z.core.locales[i18n.resolvedLanguage]());
3944
+ const languageChangedHandler = useEffectEvent2(() => {
3945
+ z3.config(z3.core.locales[i18n.language]());
3936
3946
  });
3937
- useEffect6(() => {
3947
+ useEffect7(() => {
3938
3948
  languageChangedHandler();
3939
3949
  i18n.on("languageChanged", languageChangedHandler);
3940
3950
  return () => {
3941
3951
  i18n.off("languageChanged", languageChangedHandler);
3942
3952
  };
3943
3953
  }, []);
3944
- return /* @__PURE__ */ jsx27(ThemeProvider, { theme: createdTheme, children: /* @__PURE__ */ jsx27(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: /* @__PURE__ */ jsx27(DialogsProvider, { children: /* @__PURE__ */ jsx27(Layout, { navigation, children }) }) }) });
3954
+ return /* @__PURE__ */ jsx28(ThemeProvider, { theme, children: /* @__PURE__ */ jsx28(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: i18n.resolvedLanguage, children: /* @__PURE__ */ jsx28(DialogsProvider, { children: /* @__PURE__ */ jsx28(Layout, { navigation, children }) }) }) });
3945
3955
  };
3946
3956
 
3947
3957
  // src/index.ts
3948
- import { uuidv7 as uuidv72 } from "uuidv7";
3958
+ import { uuidv7 as uuidv76 } from "uuidv7";
3949
3959
 
3950
3960
  // src/hooks/FormHooks.ts
3951
3961
  import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
3952
3962
 
3953
3963
  // src/components/form/FormAutocomplete.tsx
3954
3964
  import { Autocomplete, TextField } from "@mui/material";
3955
-
3956
- // src/utils/FormUtils.ts
3957
- var getFieldStatus = (field) => {
3958
- const { meta } = field.state;
3959
- const isTouched = meta.isTouched;
3960
- const hasError = !!meta.errors.length;
3961
- const helperText = meta.errors[0]?.message;
3962
- return { isTouched, hasError, helperText };
3963
- };
3964
-
3965
- // src/components/form/FormAutocomplete.tsx
3966
- import { jsx as jsx28 } from "react/jsx-runtime";
3965
+ import { jsx as jsx29 } from "react/jsx-runtime";
3967
3966
  var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
3968
3967
  const field = useFieldContext();
3969
3968
  const { isTouched, hasError, helperText } = getFieldStatus(field);
3970
- return /* @__PURE__ */ jsx28(
3969
+ return /* @__PURE__ */ jsx29(
3971
3970
  Autocomplete,
3972
3971
  {
3973
3972
  value: field.state.value,
@@ -3976,7 +3975,7 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
3976
3975
  onBlur: field.handleBlur,
3977
3976
  "aria-label": field.name,
3978
3977
  ...autocompleteProps,
3979
- renderInput: (parameters) => /* @__PURE__ */ jsx28(
3978
+ renderInput: (parameters) => /* @__PURE__ */ jsx29(
3980
3979
  TextField,
3981
3980
  {
3982
3981
  ...parameters,
@@ -3992,15 +3991,15 @@ var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
3992
3991
 
3993
3992
  // src/components/form/FormCheckbox.tsx
3994
3993
  import { Checkbox, FormControl, FormControlLabel, FormHelperText } from "@mui/material";
3995
- import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
3994
+ import { jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
3996
3995
  var FormCheckbox = (props) => {
3997
3996
  const field = useFieldContext();
3998
3997
  const { isTouched, hasError, helperText } = getFieldStatus(field);
3999
3998
  return /* @__PURE__ */ jsxs16(FormControl, { component: "fieldset", children: [
4000
- /* @__PURE__ */ jsx29(
3999
+ /* @__PURE__ */ jsx30(
4001
4000
  FormControlLabel,
4002
4001
  {
4003
- control: /* @__PURE__ */ jsx29(
4002
+ control: /* @__PURE__ */ jsx30(
4004
4003
  Checkbox,
4005
4004
  {
4006
4005
  name: field.name,
@@ -4014,18 +4013,18 @@ var FormCheckbox = (props) => {
4014
4013
  label: props.label ?? ""
4015
4014
  }
4016
4015
  ),
4017
- isTouched && hasError && /* @__PURE__ */ jsx29(FormHelperText, { error: hasError, children: helperText })
4016
+ isTouched && hasError && /* @__PURE__ */ jsx30(FormHelperText, { error: hasError, children: helperText })
4018
4017
  ] });
4019
4018
  };
4020
4019
 
4021
4020
  // src/components/form/FormDatePicker.tsx
4022
4021
  import { DatePicker } from "@mui/x-date-pickers-pro";
4023
4022
  import dayjs2 from "dayjs";
4024
- import { jsx as jsx30 } from "react/jsx-runtime";
4023
+ import { jsx as jsx31 } from "react/jsx-runtime";
4025
4024
  var FormDatePicker = (props) => {
4026
4025
  const field = useFieldContext();
4027
4026
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4028
- return /* @__PURE__ */ jsx30(
4027
+ return /* @__PURE__ */ jsx31(
4029
4028
  DatePicker,
4030
4029
  {
4031
4030
  name: field.name,
@@ -4049,11 +4048,11 @@ var FormDatePicker = (props) => {
4049
4048
  // src/components/form/FormDateTimePicker.tsx
4050
4049
  import { DateTimePicker } from "@mui/x-date-pickers-pro";
4051
4050
  import dayjs3 from "dayjs";
4052
- import { jsx as jsx31 } from "react/jsx-runtime";
4051
+ import { jsx as jsx32 } from "react/jsx-runtime";
4053
4052
  var FormDateTimePicker = (props) => {
4054
4053
  const field = useFieldContext();
4055
4054
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4056
- return /* @__PURE__ */ jsx31(
4055
+ return /* @__PURE__ */ jsx32(
4057
4056
  DateTimePicker,
4058
4057
  {
4059
4058
  name: field.name,
@@ -4077,11 +4076,11 @@ var FormDateTimePicker = (props) => {
4077
4076
  // src/components/form/FormNumberField.tsx
4078
4077
  import { TextField as TextField2 } from "@mui/material";
4079
4078
  import { NumericFormat } from "react-number-format";
4080
- import { jsx as jsx32 } from "react/jsx-runtime";
4079
+ import { jsx as jsx33 } from "react/jsx-runtime";
4081
4080
  var FormNumberField = ({ options, ...props }) => {
4082
4081
  const field = useFieldContext();
4083
4082
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4084
- return /* @__PURE__ */ jsx32(
4083
+ return /* @__PURE__ */ jsx33(
4085
4084
  NumericFormat,
4086
4085
  {
4087
4086
  customInput: TextField2,
@@ -4100,13 +4099,13 @@ var FormNumberField = ({ options, ...props }) => {
4100
4099
 
4101
4100
  // src/components/form/FormRadioGroup.tsx
4102
4101
  import { FormControl as FormControl2, FormControlLabel as FormControlLabel2, FormHelperText as FormHelperText2, FormLabel, Radio, RadioGroup } from "@mui/material";
4103
- import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
4102
+ import { jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
4104
4103
  var FormRadioGroup = ({ label, options, ...props }) => {
4105
4104
  const field = useFieldContext();
4106
4105
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4107
4106
  return /* @__PURE__ */ jsxs17(FormControl2, { component: "fieldset", children: [
4108
- label && /* @__PURE__ */ jsx33(FormLabel, { component: "legend", children: label }),
4109
- /* @__PURE__ */ jsx33(
4107
+ label && /* @__PURE__ */ jsx34(FormLabel, { component: "legend", children: label }),
4108
+ /* @__PURE__ */ jsx34(
4110
4109
  RadioGroup,
4111
4110
  {
4112
4111
  name: field.name,
@@ -4115,30 +4114,30 @@ var FormRadioGroup = ({ label, options, ...props }) => {
4115
4114
  onBlur: field.handleBlur,
4116
4115
  "aria-label": field.name,
4117
4116
  ...props,
4118
- children: options.map((option) => /* @__PURE__ */ jsx33(
4117
+ children: options.map((option) => /* @__PURE__ */ jsx34(
4119
4118
  FormControlLabel2,
4120
4119
  {
4121
4120
  value: option.value,
4122
- control: /* @__PURE__ */ jsx33(Radio, {}),
4121
+ control: /* @__PURE__ */ jsx34(Radio, {}),
4123
4122
  label: option.label
4124
4123
  },
4125
4124
  option.value
4126
4125
  ))
4127
4126
  }
4128
4127
  ),
4129
- isTouched && hasError && /* @__PURE__ */ jsx33(FormHelperText2, { error: hasError, children: helperText })
4128
+ isTouched && hasError && /* @__PURE__ */ jsx34(FormHelperText2, { error: hasError, children: helperText })
4130
4129
  ] });
4131
4130
  };
4132
4131
 
4133
4132
  // src/components/form/FormSlider.tsx
4134
4133
  import { FormControl as FormControl3, FormHelperText as FormHelperText3, FormLabel as FormLabel2, Slider } from "@mui/material";
4135
- import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
4134
+ import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
4136
4135
  var FormSlider = ({ label, ...props }) => {
4137
4136
  const field = useFieldContext();
4138
4137
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4139
4138
  return /* @__PURE__ */ jsxs18(FormControl3, { component: "fieldset", children: [
4140
- label && /* @__PURE__ */ jsx34(FormLabel2, { children: label }),
4141
- /* @__PURE__ */ jsx34(
4139
+ label && /* @__PURE__ */ jsx35(FormLabel2, { children: label }),
4140
+ /* @__PURE__ */ jsx35(
4142
4141
  Slider,
4143
4142
  {
4144
4143
  name: field.name,
@@ -4149,13 +4148,13 @@ var FormSlider = ({ label, ...props }) => {
4149
4148
  ...props
4150
4149
  }
4151
4150
  ),
4152
- isTouched && hasError && /* @__PURE__ */ jsx34(FormHelperText3, { error: hasError, children: helperText })
4151
+ isTouched && hasError && /* @__PURE__ */ jsx35(FormHelperText3, { error: hasError, children: helperText })
4153
4152
  ] });
4154
4153
  };
4155
4154
 
4156
4155
  // src/components/form/FormSubmitButton.tsx
4157
4156
  import { Button as Button3 } from "@mui/material";
4158
- import { jsx as jsx35 } from "react/jsx-runtime";
4157
+ import { jsx as jsx36 } from "react/jsx-runtime";
4159
4158
  var FormSubmitButton = (props) => {
4160
4159
  const form = useFormContext();
4161
4160
  const handleClick = (event) => {
@@ -4163,7 +4162,7 @@ var FormSubmitButton = (props) => {
4163
4162
  event.stopPropagation();
4164
4163
  form.handleSubmit();
4165
4164
  };
4166
- return /* @__PURE__ */ jsx35(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx35(
4165
+ return /* @__PURE__ */ jsx36(form.Subscribe, { selector: (state) => [state.canSubmit, state.isSubmitting], children: ([canSubmit, isSubmitting]) => /* @__PURE__ */ jsx36(
4167
4166
  Button3,
4168
4167
  {
4169
4168
  loading: isSubmitting,
@@ -4178,15 +4177,15 @@ var FormSubmitButton = (props) => {
4178
4177
 
4179
4178
  // src/components/form/FormSwitch.tsx
4180
4179
  import { FormControl as FormControl4, FormControlLabel as FormControlLabel3, FormHelperText as FormHelperText4, Switch } from "@mui/material";
4181
- import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
4180
+ import { jsx as jsx37, jsxs as jsxs19 } from "react/jsx-runtime";
4182
4181
  var FormSwitch = (props) => {
4183
4182
  const field = useFieldContext();
4184
4183
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4185
4184
  return /* @__PURE__ */ jsxs19(FormControl4, { component: "fieldset", children: [
4186
- /* @__PURE__ */ jsx36(
4185
+ /* @__PURE__ */ jsx37(
4187
4186
  FormControlLabel3,
4188
4187
  {
4189
- control: /* @__PURE__ */ jsx36(
4188
+ control: /* @__PURE__ */ jsx37(
4190
4189
  Switch,
4191
4190
  {
4192
4191
  name: field.name,
@@ -4200,17 +4199,17 @@ var FormSwitch = (props) => {
4200
4199
  label: props.label ?? ""
4201
4200
  }
4202
4201
  ),
4203
- isTouched && hasError && /* @__PURE__ */ jsx36(FormHelperText4, { error: hasError, children: helperText })
4202
+ isTouched && hasError && /* @__PURE__ */ jsx37(FormHelperText4, { error: hasError, children: helperText })
4204
4203
  ] });
4205
4204
  };
4206
4205
 
4207
4206
  // src/components/form/FormTextField.tsx
4208
4207
  import { TextField as TextField3 } from "@mui/material";
4209
- import { jsx as jsx37 } from "react/jsx-runtime";
4208
+ import { jsx as jsx38 } from "react/jsx-runtime";
4210
4209
  var FormTextField = (props) => {
4211
4210
  const field = useFieldContext();
4212
4211
  const { isTouched, hasError, helperText } = getFieldStatus(field);
4213
- return /* @__PURE__ */ jsx37(
4212
+ return /* @__PURE__ */ jsx38(
4214
4213
  TextField3,
4215
4214
  {
4216
4215
  name: field.name,
@@ -4250,14 +4249,497 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
4250
4249
  import { default as default2 } from "use-local-storage-state";
4251
4250
  import { useTranslation as useTranslation8 } from "react-i18next";
4252
4251
  import { t } from "i18next";
4252
+
4253
+ // src/hooks/PeopleSoftHooks.ts
4254
+ import { useQuery as useQuery2 } from "@tanstack/react-query";
4255
+ var BASE_URL2 = clientEnv.VITE_PEOPLESOFT_API_BASE_URL;
4256
+ var QUERY_KEY2 = "PeopleSoft";
4257
+ var DAY = 1e3 * 60 * 60 * 24;
4258
+ var useGetPeopleSoftEmployeesSearch = (searchTerm, options) => {
4259
+ return useQuery2({
4260
+ ...options,
4261
+ queryKey: [QUERY_KEY2, "employee", "search", searchTerm],
4262
+ queryFn: ({ signal }) => wczApiClient.request({
4263
+ url: `${BASE_URL2}/v1/employee?search=${searchTerm}`,
4264
+ method: "GET",
4265
+ signal
4266
+ }),
4267
+ staleTime: DAY,
4268
+ gcTime: DAY,
4269
+ refetchOnWindowFocus: false
4270
+ });
4271
+ };
4272
+ var useGetPeopleSoftEmployees = (options) => {
4273
+ return useQuery2({
4274
+ ...options,
4275
+ queryKey: [QUERY_KEY2, "employee"],
4276
+ queryFn: ({ signal }) => wczApiClient.request({
4277
+ url: `${BASE_URL2}/v1/employee/all`,
4278
+ method: "GET",
4279
+ signal
4280
+ }),
4281
+ staleTime: DAY,
4282
+ gcTime: DAY,
4283
+ refetchOnWindowFocus: false
4284
+ });
4285
+ };
4286
+ var useGetPeopleSoftActiveEmployees = (options) => {
4287
+ return useQuery2({
4288
+ ...options,
4289
+ queryKey: [QUERY_KEY2, "employee", "active"],
4290
+ queryFn: ({ signal }) => wczApiClient.request({
4291
+ url: `${BASE_URL2}/v1/employee/active`,
4292
+ method: "GET",
4293
+ signal
4294
+ }),
4295
+ staleTime: DAY,
4296
+ gcTime: DAY,
4297
+ refetchOnWindowFocus: false
4298
+ });
4299
+ };
4300
+ var useGetPeopleSoftEmployeeById = (employeeId, options) => {
4301
+ return useQuery2({
4302
+ ...options,
4303
+ queryKey: [QUERY_KEY2, "employee", employeeId],
4304
+ queryFn: ({ signal }) => wczApiClient.request({
4305
+ url: `${BASE_URL2}/v1/employee/${employeeId}`,
4306
+ method: "GET",
4307
+ signal
4308
+ }),
4309
+ staleTime: DAY,
4310
+ gcTime: DAY,
4311
+ refetchOnWindowFocus: false
4312
+ });
4313
+ };
4314
+ var useGetPeopleSoftPreviousEmployeeIds = (options) => {
4315
+ return useQuery2({
4316
+ ...options,
4317
+ queryKey: [QUERY_KEY2, "employee", "previousIds"],
4318
+ queryFn: ({ signal }) => wczApiClient.request({
4319
+ url: `${BASE_URL2}/v1/employee/previousIds`,
4320
+ method: "GET",
4321
+ signal
4322
+ }),
4323
+ staleTime: DAY,
4324
+ gcTime: DAY,
4325
+ refetchOnWindowFocus: false
4326
+ });
4327
+ };
4328
+ var useGetPeopleSoftEmployeeSupervisor = (employeeId, options) => {
4329
+ return useQuery2({
4330
+ ...options,
4331
+ queryKey: [QUERY_KEY2, "employee", employeeId, "supervisor"],
4332
+ queryFn: ({ signal }) => wczApiClient.request({
4333
+ url: `${BASE_URL2}/v1/employee/${employeeId}/supervisor`,
4334
+ method: "GET",
4335
+ signal
4336
+ }),
4337
+ staleTime: DAY,
4338
+ gcTime: DAY,
4339
+ refetchOnWindowFocus: false
4340
+ });
4341
+ };
4342
+ var useGetPeopleSoftEmployeeSubordinates = (employeeId, options) => {
4343
+ return useQuery2({
4344
+ ...options,
4345
+ queryKey: [QUERY_KEY2, "employee", employeeId, "subordinates"],
4346
+ queryFn: ({ signal }) => wczApiClient.request({
4347
+ url: `${BASE_URL2}/v1/employee/${employeeId}/subordinates`,
4348
+ method: "GET",
4349
+ signal
4350
+ }),
4351
+ staleTime: DAY,
4352
+ gcTime: DAY,
4353
+ refetchOnWindowFocus: false
4354
+ });
4355
+ };
4356
+ var useGetPeopleSoftEmployeeManager = (employeeId, options) => {
4357
+ return useQuery2({
4358
+ ...options,
4359
+ queryKey: [QUERY_KEY2, "employee", employeeId, "manager"],
4360
+ queryFn: ({ signal }) => wczApiClient.request({
4361
+ url: `${BASE_URL2}/v1/employee/${employeeId}/manager`,
4362
+ method: "GET",
4363
+ signal
4364
+ }),
4365
+ staleTime: DAY,
4366
+ gcTime: DAY,
4367
+ refetchOnWindowFocus: false
4368
+ });
4369
+ };
4370
+ var useGetPeopleSoftEmployeeGeneralManager = (employeeId, options) => {
4371
+ return useQuery2({
4372
+ ...options,
4373
+ queryKey: [QUERY_KEY2, "employee", employeeId, "generalManager"],
4374
+ queryFn: ({ signal }) => wczApiClient.request({
4375
+ url: `${BASE_URL2}/v1/employee/${employeeId}/generalManager`,
4376
+ method: "GET",
4377
+ signal
4378
+ }),
4379
+ staleTime: DAY,
4380
+ gcTime: DAY,
4381
+ refetchOnWindowFocus: false
4382
+ });
4383
+ };
4384
+ var useGetPeopleSoftDepartments = (options) => {
4385
+ return useQuery2({
4386
+ ...options,
4387
+ queryKey: [QUERY_KEY2, "department"],
4388
+ queryFn: ({ signal }) => wczApiClient.request({
4389
+ url: `${BASE_URL2}/v1/department/all`,
4390
+ method: "GET",
4391
+ signal
4392
+ }),
4393
+ staleTime: DAY,
4394
+ gcTime: DAY,
4395
+ refetchOnWindowFocus: false
4396
+ });
4397
+ };
4398
+ var useGetPeopleSoftDepartmentById = (departmentId, options) => {
4399
+ return useQuery2({
4400
+ ...options,
4401
+ queryKey: [QUERY_KEY2, "department", departmentId],
4402
+ queryFn: ({ signal }) => wczApiClient.request({
4403
+ url: `${BASE_URL2}/v1/department/${departmentId}`,
4404
+ method: "GET",
4405
+ signal
4406
+ }),
4407
+ staleTime: DAY,
4408
+ gcTime: DAY,
4409
+ refetchOnWindowFocus: false
4410
+ });
4411
+ };
4412
+ var useGetPeopleSoftDepartmentManager = (departmentId, options) => {
4413
+ return useQuery2({
4414
+ ...options,
4415
+ queryKey: [QUERY_KEY2, "department", departmentId, "manager"],
4416
+ queryFn: ({ signal }) => wczApiClient.request({
4417
+ url: `${BASE_URL2}/v1/department/${departmentId}/manager`,
4418
+ method: "GET",
4419
+ signal
4420
+ }),
4421
+ staleTime: DAY,
4422
+ gcTime: DAY,
4423
+ refetchOnWindowFocus: false
4424
+ });
4425
+ };
4426
+ var useGetPeopleSoftDepartmentEmployees = (departmentId, options) => {
4427
+ return useQuery2({
4428
+ ...options,
4429
+ queryKey: [QUERY_KEY2, "department", departmentId, "employees"],
4430
+ queryFn: ({ signal }) => wczApiClient.request({
4431
+ url: `${BASE_URL2}/v1/department/${departmentId}/employees`,
4432
+ method: "GET",
4433
+ signal
4434
+ }),
4435
+ staleTime: DAY,
4436
+ gcTime: DAY,
4437
+ refetchOnWindowFocus: false
4438
+ });
4439
+ };
4440
+ var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
4441
+ return useQuery2({
4442
+ ...options,
4443
+ queryKey: [QUERY_KEY2, "company", companyCode, "generalManager"],
4444
+ queryFn: ({ signal }) => wczApiClient.request({
4445
+ url: `${BASE_URL2}/v1/company/${companyCode}/generalManager`,
4446
+ method: "GET",
4447
+ signal
4448
+ }),
4449
+ staleTime: DAY,
4450
+ gcTime: DAY,
4451
+ refetchOnWindowFocus: false
4452
+ });
4453
+ };
4454
+
4455
+ // src/models/file/FileMeta.ts
4456
+ import { uuidv7 as uuidv72 } from "uuidv7";
4457
+ import * as z4 from "zod";
4458
+ var FileMetaSchema = z4.object({
4459
+ id: z4.uuid().default(uuidv72),
4460
+ subId: z4.uuid().default(uuidv72),
4461
+ appName: z4.string().min(1).max(255),
4462
+ fileName: z4.string().min(1).max(255),
4463
+ fileExtension: z4.string().min(1).max(255),
4464
+ fileSize: z4.number().min(0),
4465
+ mediaSubType: z4.string().min(1).max(255),
4466
+ mediaType: z4.string().min(1).max(255),
4467
+ mimeType: z4.string().min(1).max(255),
4468
+ createdBy: z4.string().min(1).max(255),
4469
+ createdDate: z4.date()
4470
+ });
4471
+
4472
+ // src/models/email/Email.ts
4473
+ import z6 from "zod";
4474
+
4475
+ // src/models/email/EmailAttachment.ts
4476
+ import z5 from "zod";
4477
+ var EmailAttachmentSchema = z5.object({
4478
+ appName: z5.string().min(1).max(100),
4479
+ subId: z5.uuid()
4480
+ });
4481
+
4482
+ // src/models/email/Email.ts
4483
+ var EmailSchema = z6.object({
4484
+ subject: z6.string().min(1).max(60),
4485
+ body: z6.string().min(1),
4486
+ to: z6.array(z6.email()).min(1),
4487
+ bcc: z6.array(z6.email()).optional(),
4488
+ cc: z6.array(z6.email()).optional(),
4489
+ attachments: z6.array(EmailAttachmentSchema).optional()
4490
+ });
4491
+
4492
+ // src/models/peoplesoft/Employee.ts
4493
+ import z9 from "zod";
4494
+
4495
+ // src/models/peoplesoft/EmployeeCategoryGroup.ts
4496
+ import z7 from "zod";
4497
+ var EmployeeCategoryGroup = z7.enum([
4498
+ "IDL",
4499
+ "FD",
4500
+ "FI"
4501
+ ]);
4502
+
4503
+ // src/models/peoplesoft/EmployeeStatus.ts
4504
+ import z8 from "zod";
4505
+ var EmployeeStatus = z8.enum([
4506
+ "Active",
4507
+ "Terminated",
4508
+ "Leave of Absence"
4509
+ ]);
4510
+
4511
+ // src/models/peoplesoft/Employee.ts
4512
+ var EmployeeSchema = z9.object({
4513
+ badgeId: z9.string(),
4514
+ category: z9.string(),
4515
+ categoryGroup: EmployeeCategoryGroup,
4516
+ companyCode: z9.string(),
4517
+ contactPhone: z9.string(),
4518
+ departmentId: z9.string(),
4519
+ departmentDescription: z9.string(),
4520
+ emailString: z9.string(),
4521
+ employeeId: z9.string(),
4522
+ extensionNumber: z9.string(),
4523
+ firstName: z9.string(),
4524
+ gender: z9.string(),
4525
+ hiredDate: z9.date(),
4526
+ lastName: z9.string(),
4527
+ managerId: z9.string(),
4528
+ middleName: z9.string(),
4529
+ name: z9.string(),
4530
+ nameTitleCase: z9.string(),
4531
+ nfcSn: z9.string(),
4532
+ plantId: z9.string(),
4533
+ position: z9.string(),
4534
+ previousEmployeeIds: z9.string().nullable(),
4535
+ reHiredDate: z9.date().nullable(),
4536
+ recordNumber: z9.number(),
4537
+ status: EmployeeStatus,
4538
+ supervisorId: z9.string(),
4539
+ terminationDate: z9.date().nullable(),
4540
+ terminationFutureDate: z9.date().nullable(),
4541
+ type: z9.string(),
4542
+ upperDepartmentId: z9.string(),
4543
+ jobCode: z9.string(),
4544
+ jobDescription: z9.string(),
4545
+ terminationReason: z9.string().nullable(),
4546
+ supervisorRecordNumber: z9.number()
4547
+ });
4548
+
4549
+ // src/models/peoplesoft/Department.ts
4550
+ import z10 from "zod";
4551
+ var DepartmentSchema = z10.object({
4552
+ departmentId: z10.string(),
4553
+ description: z10.string(),
4554
+ managerId: z10.string(),
4555
+ managerRecordNumber: z10.string(),
4556
+ treeLevel: z10.number(),
4557
+ upperDepartmentId: z10.string(),
4558
+ companyCode: z10.string(),
4559
+ location: z10.string(),
4560
+ salLocation: z10.string(),
4561
+ plantId: z10.string(),
4562
+ manager: EmployeeSchema
4563
+ });
4564
+
4565
+ // src/models/approval/Approval.ts
4566
+ import { uuidv7 as uuidv75 } from "uuidv7";
4567
+ import z18 from "zod";
4568
+
4569
+ // src/models/approval/ApprovalFlow.ts
4570
+ import { uuidv7 as uuidv73 } from "uuidv7";
4571
+ import { z as z12 } from "zod";
4572
+
4573
+ // src/models/approval/StepApprovalOrder.ts
4574
+ import z11 from "zod";
4575
+ var StepApprovalOrder = z11.enum([
4576
+ "Serial",
4577
+ "Parallel",
4578
+ "OneOfThem"
4579
+ ]);
4580
+
4581
+ // src/models/approval/ApprovalFlow.ts
4582
+ var ApprovalFlowSchema = z12.object({
4583
+ id: z12.uuid().default(uuidv73),
4584
+ approvalStage: z12.number(),
4585
+ batchSequence: z12.number().optional(),
4586
+ approvalSequence: z12.number(),
4587
+ stepApprovalOrder: StepApprovalOrder,
4588
+ steps: z12.array(z12.custom()),
4589
+ isActive: z12.boolean().default(false)
4590
+ });
4591
+
4592
+ // src/models/approval/ApprovalFlowStep.ts
4593
+ import { uuidv7 as uuidv74 } from "uuidv7";
4594
+ import { z as z15 } from "zod";
4595
+
4596
+ // src/models/approval/ApprovalEmployee.ts
4597
+ import { z as z13 } from "zod";
4598
+ var ApprovalEmployeeSchema = z13.object({
4599
+ employeeId: z13.string().min(1).max(20),
4600
+ name: z13.string().min(1).max(50),
4601
+ email: z13.email().min(1).max(100)
4602
+ });
4603
+
4604
+ // src/models/approval/ApprovalStepResult.ts
4605
+ import z14 from "zod";
4606
+ var ApprovalStepResult = z14.enum([
4607
+ "NotAvailable",
4608
+ "FutureApproval",
4609
+ "WaitingForApproval",
4610
+ "Approved",
4611
+ "Rejected",
4612
+ "Skipped",
4613
+ "Withdrawn",
4614
+ "Cancelled"
4615
+ ]);
4616
+
4617
+ // src/models/approval/ApprovalFlowStep.ts
4618
+ var ApprovalFlowStepSchema = z15.object({
4619
+ id: z15.uuid().default(uuidv74),
4620
+ order: z15.number(),
4621
+ approverRole: z15.string().min(1).max(100).default("Approver"),
4622
+ approver: ApprovalEmployeeSchema,
4623
+ actualApprover: ApprovalEmployeeSchema.optional(),
4624
+ result: ApprovalStepResult.default("NotAvailable"),
4625
+ resultDate: z15.date().optional(),
4626
+ resultComment: z15.string().max(2e3).optional()
4627
+ });
4628
+
4629
+ // src/models/approval/ApprovalRequestType.ts
4630
+ import z16 from "zod";
4631
+ var ApprovalRequestType = z16.enum([
4632
+ "Single",
4633
+ "Batch"
4634
+ ]);
4635
+
4636
+ // src/models/approval/ApprovalStatus.ts
4637
+ import z17 from "zod";
4638
+ var ApprovalStatus = z17.enum([
4639
+ "WaitingForApproval",
4640
+ "Approved",
4641
+ "PartiallyApproved",
4642
+ "Rejected",
4643
+ "Withdrawn",
4644
+ "Cancelled"
4645
+ ]);
4646
+
4647
+ // src/models/approval/Approval.ts
4648
+ var ApprovalSchema = z18.object({
4649
+ id: z18.uuid().default(uuidv75),
4650
+ number: z18.string().max(30).optional(),
4651
+ applicationName: z18.string().min(1).max(50),
4652
+ type: ApprovalRequestType.default("Single"),
4653
+ status: ApprovalStatus,
4654
+ emailBody: z18.string().min(1),
4655
+ created: z18.date(),
4656
+ createdBy: z18.custom(),
4657
+ updated: z18.date(),
4658
+ updatedBy: z18.custom(),
4659
+ approvalFlows: z18.array(z18.custom()).min(1),
4660
+ currentApprovers: z18.array(z18.custom())
4661
+ });
4662
+ var CreateApprovalSchema = ApprovalSchema.pick({
4663
+ id: true,
4664
+ number: true,
4665
+ applicationName: true,
4666
+ type: true,
4667
+ emailBody: true,
4668
+ approvalFlows: true
4669
+ }).extend({
4670
+ approvalFlows: z18.array(
4671
+ ApprovalFlowSchema.pick({
4672
+ approvalStage: true,
4673
+ batchSequence: true,
4674
+ stepApprovalOrder: true,
4675
+ steps: true
4676
+ }).extend({
4677
+ steps: z18.array(
4678
+ ApprovalFlowStepSchema.pick({
4679
+ approverRole: true,
4680
+ approver: true
4681
+ })
4682
+ )
4683
+ })
4684
+ ).min(1)
4685
+ });
4686
+ var ApproveApprovalSchema = z18.object({
4687
+ id: z18.uuid(),
4688
+ result: ApprovalStepResult,
4689
+ resultComment: z18.string().max(2e3).optional(),
4690
+ emailBody: z18.string().min(1)
4691
+ });
4692
+ var ResubmitApprovalSchema = ApprovalSchema.pick({
4693
+ id: true,
4694
+ approvalFlows: true
4695
+ }).extend({
4696
+ approvalFlows: z18.array(
4697
+ ApprovalFlowSchema.pick({
4698
+ approvalStage: true,
4699
+ batchSequence: true,
4700
+ stepApprovalOrder: true,
4701
+ steps: true
4702
+ }).extend({
4703
+ steps: z18.array(
4704
+ ApprovalFlowStepSchema.pick({
4705
+ approverRole: true,
4706
+ approver: true
4707
+ })
4708
+ )
4709
+ })
4710
+ ).min(1)
4711
+ });
4712
+ var CancelApprovalSchema = z18.object({
4713
+ id: z18.uuid(),
4714
+ comment: z18.string().min(1).max(2e3),
4715
+ emailBody: z18.string().min(1)
4716
+ });
4717
+ var WithdrawApprovalSchema = z18.object({
4718
+ id: z18.uuid(),
4719
+ comment: z18.string().min(1).max(2e3),
4720
+ emailBody: z18.string().min(1)
4721
+ });
4253
4722
  export {
4723
+ ApprovalEmployeeSchema,
4724
+ ApprovalFlowSchema,
4725
+ ApprovalFlowStepSchema,
4726
+ ApprovalSchema,
4727
+ ApproveApprovalSchema,
4728
+ CancelApprovalSchema,
4254
4729
  ChipInputCell,
4730
+ CreateApprovalSchema,
4731
+ DepartmentSchema,
4255
4732
  Dropzone,
4256
4733
  EditableColumnHeader,
4734
+ EmailAttachmentSchema,
4735
+ EmailSchema,
4736
+ EmployeeSchema,
4737
+ FileMetaSchema,
4257
4738
  FileViewer,
4258
4739
  Fullscreen,
4259
4740
  LayoutProvider,
4260
4741
  Platform,
4742
+ ResubmitApprovalSchema,
4261
4743
  RouterButton,
4262
4744
  RouterError,
4263
4745
  RouterGridActionsCellItem,
@@ -4267,6 +4749,8 @@ export {
4267
4749
  RouterNotFound,
4268
4750
  RouterTab,
4269
4751
  TypographyWithIcon,
4752
+ WithdrawApprovalSchema,
4753
+ getThemeMode,
4270
4754
  rootRouteHead,
4271
4755
  t,
4272
4756
  useDeleteFile,
@@ -4278,13 +4762,27 @@ export {
4278
4762
  useGetFile,
4279
4763
  useGetFileMetas,
4280
4764
  useGetFileThumbnail,
4765
+ useGetPeopleSoftActiveEmployees,
4766
+ useGetPeopleSoftCompanyGeneralManager,
4767
+ useGetPeopleSoftDepartmentById,
4768
+ useGetPeopleSoftDepartmentEmployees,
4769
+ useGetPeopleSoftDepartmentManager,
4770
+ useGetPeopleSoftDepartments,
4771
+ useGetPeopleSoftEmployeeById,
4772
+ useGetPeopleSoftEmployeeGeneralManager,
4773
+ useGetPeopleSoftEmployeeManager,
4774
+ useGetPeopleSoftEmployeeSubordinates,
4775
+ useGetPeopleSoftEmployeeSupervisor,
4776
+ useGetPeopleSoftEmployees,
4777
+ useGetPeopleSoftEmployeesSearch,
4778
+ useGetPeopleSoftPreviousEmployeeIds,
4281
4779
  useLayoutForm,
4282
4780
  default2 as useLocalStorageState,
4283
4781
  useOpenFile,
4284
4782
  useTranslation8 as useTranslation,
4285
4783
  useUpdateFileMeta,
4286
4784
  useUploadFile,
4287
- uuidv72 as uuidv7,
4785
+ uuidv76 as uuidv7,
4288
4786
  wczApiClient,
4289
4787
  withLayoutForm
4290
4788
  };