wcz-test 4.9.0 → 4.10.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 z18(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 z18(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) || z18(a) === l;
98
98
  };
99
99
  exports.isConcurrentMode = A;
100
100
  exports.isContextConsumer = function(a) {
101
- return z2(a) === k;
101
+ return z18(a) === k;
102
102
  };
103
103
  exports.isContextProvider = function(a) {
104
- return z2(a) === h;
104
+ return z18(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 z18(a) === n;
111
111
  };
112
112
  exports.isFragment = function(a) {
113
- return z2(a) === e;
113
+ return z18(a) === e;
114
114
  };
115
115
  exports.isLazy = function(a) {
116
- return z2(a) === t2;
116
+ return z18(a) === t2;
117
117
  };
118
118
  exports.isMemo = function(a) {
119
- return z2(a) === r;
119
+ return z18(a) === r;
120
120
  };
121
121
  exports.isPortal = function(a) {
122
- return z2(a) === d;
122
+ return z18(a) === d;
123
123
  };
124
124
  exports.isProfiler = function(a) {
125
- return z2(a) === g;
125
+ return z18(a) === g;
126
126
  };
127
127
  exports.isStrictMode = function(a) {
128
- return z2(a) === f;
128
+ return z18(a) === f;
129
129
  };
130
130
  exports.isSuspense = function(a) {
131
- return z2(a) === p;
131
+ return z18(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 = z18;
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();
@@ -2211,18 +2229,18 @@ var AdapterDayjs = class {
2211
2229
  }
2212
2230
  };
2213
2231
  createSystemDate = (value) => {
2214
- let date;
2232
+ let date2;
2215
2233
  if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
2216
2234
  const timezone = dayjs.tz.guess();
2217
2235
  if (timezone === "UTC") {
2218
- date = dayjs(value);
2236
+ date2 = dayjs(value);
2219
2237
  } else {
2220
- date = dayjs.tz(value, timezone);
2238
+ date2 = dayjs.tz(value, timezone);
2221
2239
  }
2222
2240
  } else {
2223
- date = dayjs(value);
2241
+ date2 = dayjs(value);
2224
2242
  }
2225
- return this.setLocaleToValue(date);
2243
+ return this.setLocaleToValue(date2);
2226
2244
  };
2227
2245
  createUTCDate = (value) => {
2228
2246
  if (!this.hasUTCPlugin()) {
@@ -2482,8 +2500,8 @@ var AdapterDayjs = class {
2482
2500
  setMonth = (value, month) => {
2483
2501
  return this.adjustOffset(value.set("month", month));
2484
2502
  };
2485
- setDate = (value, date) => {
2486
- return this.adjustOffset(value.set("date", date));
2503
+ setDate = (value, date2) => {
2504
+ return this.adjustOffset(value.set("date", date2));
2487
2505
  };
2488
2506
  setHours = (value, hours) => {
2489
2507
  return this.adjustOffset(value.set("hour", hours));
@@ -2535,9 +2553,9 @@ var AdapterDayjs = class {
2535
2553
  };
2536
2554
 
2537
2555
  // src/providers/LayoutProvider.tsx
2538
- import { useEffect as useEffect6, useEffectEvent } from "react";
2556
+ import { useEffect as useEffect6, useEffectEvent as useEffectEvent2 } from "react";
2539
2557
  import { useTranslation as useTranslation7 } from "react-i18next";
2540
- import * as z from "zod";
2558
+ import * as z2 from "zod";
2541
2559
 
2542
2560
  // src/components/core/Layout.tsx
2543
2561
  import Menu3 from "@mui/icons-material/Menu";
@@ -3398,6 +3416,7 @@ var csCZGrid = {
3398
3416
  // promptChangePivotRowsLabel: (count: number) => `Rows (${count})`,
3399
3417
  // promptChangePivotValuesLabel: (count: number) => `Values (${count})`,
3400
3418
  // promptChangePivotValuesDescription: (column: string, aggregation: string) => `${column} (${aggregation})`,
3419
+ // promptChangeChartsLabel: (dimensionsCount: number, valuesCount: number) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`,
3401
3420
  };
3402
3421
  var csCZ = getGridLocalization(csCZGrid);
3403
3422
 
@@ -3687,7 +3706,8 @@ var GRID_DEFAULT_LOCALE_TEXT = {
3687
3706
  promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ""}`,
3688
3707
  promptChangePivotRowsLabel: (count) => `Rows (${count})`,
3689
3708
  promptChangePivotValuesLabel: (count) => `Values (${count})`,
3690
- promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
3709
+ promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`,
3710
+ promptChangeChartsLabel: (dimensionsCount, valuesCount) => `Dimensions (${dimensionsCount}), Values (${valuesCount})`
3691
3711
  };
3692
3712
 
3693
3713
  // node_modules/@mui/x-data-grid/esm/locales/enUS.js
@@ -3774,6 +3794,10 @@ var csCZ2 = getPickersLocalization(csCZPickers);
3774
3794
  import { useTranslation as useTranslation6 } from "react-i18next";
3775
3795
  var WISTRON_PRIMARY_COLOR = "#00506E";
3776
3796
  var WISTRON_SECONDARY_COLOR = "#64DC00";
3797
+ var LOCALE_MAP = {
3798
+ cs: [csCZ, csCZ2, csCZ3],
3799
+ en: [enUS2, enUS, enUS3]
3800
+ };
3777
3801
  var useGetTheme = (theme) => {
3778
3802
  const { i18n } = useTranslation6();
3779
3803
  return createTheme(
@@ -3823,36 +3847,10 @@ var useGetTheme = (theme) => {
3823
3847
  };
3824
3848
  }
3825
3849
  },
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
3850
  ...theme?.components
3851
3851
  }
3852
3852
  },
3853
- i18n.resolvedLanguage === "cs" ? csCZ : enUS2,
3854
- i18n.resolvedLanguage === "cs" ? csCZ2 : enUS,
3855
- i18n.resolvedLanguage === "cs" ? csCZ3 : enUS3
3853
+ ...LOCALE_MAP[i18n.language]
3856
3854
  );
3857
3855
  };
3858
3856
 
@@ -3931,8 +3929,8 @@ import { jsx as jsx27 } from "react/jsx-runtime";
3931
3929
  var LayoutProvider = ({ navigation, theme, children }) => {
3932
3930
  const { i18n } = useTranslation7();
3933
3931
  const createdTheme = useGetTheme(theme);
3934
- const languageChangedHandler = useEffectEvent(() => {
3935
- z.config(z.core.locales[i18n.resolvedLanguage]());
3932
+ const languageChangedHandler = useEffectEvent2(() => {
3933
+ z2.config(z2.core.locales[i18n.language]());
3936
3934
  });
3937
3935
  useEffect6(() => {
3938
3936
  languageChangedHandler();
@@ -3945,24 +3943,13 @@ var LayoutProvider = ({ navigation, theme, children }) => {
3945
3943
  };
3946
3944
 
3947
3945
  // src/index.ts
3948
- import { uuidv7 as uuidv72 } from "uuidv7";
3946
+ import { uuidv7 as uuidv76 } from "uuidv7";
3949
3947
 
3950
3948
  // src/hooks/FormHooks.ts
3951
3949
  import { createFormHook, createFormHookContexts } from "@tanstack/react-form";
3952
3950
 
3953
3951
  // src/components/form/FormAutocomplete.tsx
3954
3952
  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
3953
  import { jsx as jsx28 } from "react/jsx-runtime";
3967
3954
  var FormAutocomplete = ({ textFieldProps, ...autocompleteProps }) => {
3968
3955
  const field = useFieldContext();
@@ -4250,10 +4237,468 @@ var { useAppForm: useLayoutForm, withForm: withLayoutForm } = createFormHook({
4250
4237
  import { default as default2 } from "use-local-storage-state";
4251
4238
  import { useTranslation as useTranslation8 } from "react-i18next";
4252
4239
  import { t } from "i18next";
4240
+
4241
+ // src/hooks/PeopleSoftHooks.ts
4242
+ import { useQuery as useQuery2 } from "@tanstack/react-query";
4243
+ var BASE_URL2 = clientEnv.VITE_PEOPLESOFT_API_BASE_URL;
4244
+ var QUERY_KEY2 = "PeopleSoft";
4245
+ var DAY = 1e3 * 60 * 60 * 24;
4246
+ var useGetPeopleSoftEmployeesSearch = (searchTerm, options) => {
4247
+ return useQuery2({
4248
+ ...options,
4249
+ queryKey: [QUERY_KEY2, "employee", "search", searchTerm],
4250
+ queryFn: ({ signal }) => wczApiClient.request({
4251
+ url: `${BASE_URL2}/v1/employee?search=${searchTerm}`,
4252
+ method: "GET",
4253
+ signal
4254
+ }),
4255
+ staleTime: DAY,
4256
+ gcTime: DAY,
4257
+ refetchOnWindowFocus: false
4258
+ });
4259
+ };
4260
+ var useGetPeopleSoftEmployees = (options) => {
4261
+ return useQuery2({
4262
+ ...options,
4263
+ queryKey: [QUERY_KEY2, "employee"],
4264
+ queryFn: ({ signal }) => wczApiClient.request({
4265
+ url: `${BASE_URL2}/v1/employee/all`,
4266
+ method: "GET",
4267
+ signal
4268
+ }),
4269
+ staleTime: DAY,
4270
+ gcTime: DAY,
4271
+ refetchOnWindowFocus: false
4272
+ });
4273
+ };
4274
+ var useGetPeopleSoftActiveEmployees = (options) => {
4275
+ return useQuery2({
4276
+ ...options,
4277
+ queryKey: [QUERY_KEY2, "employee", "active"],
4278
+ queryFn: ({ signal }) => wczApiClient.request({
4279
+ url: `${BASE_URL2}/v1/employee/active`,
4280
+ method: "GET",
4281
+ signal
4282
+ }),
4283
+ staleTime: DAY,
4284
+ gcTime: DAY,
4285
+ refetchOnWindowFocus: false
4286
+ });
4287
+ };
4288
+ var useGetPeopleSoftEmployeeById = (employeeId, options) => {
4289
+ return useQuery2({
4290
+ ...options,
4291
+ queryKey: [QUERY_KEY2, "employee", employeeId],
4292
+ queryFn: ({ signal }) => wczApiClient.request({
4293
+ url: `${BASE_URL2}/v1/employee/${employeeId}`,
4294
+ method: "GET",
4295
+ signal
4296
+ }),
4297
+ staleTime: DAY,
4298
+ gcTime: DAY,
4299
+ refetchOnWindowFocus: false
4300
+ });
4301
+ };
4302
+ var useGetPeopleSoftPreviousEmployeeIds = (options) => {
4303
+ return useQuery2({
4304
+ ...options,
4305
+ queryKey: [QUERY_KEY2, "employee", "previousIds"],
4306
+ queryFn: ({ signal }) => wczApiClient.request({
4307
+ url: `${BASE_URL2}/v1/employee/previousIds`,
4308
+ method: "GET",
4309
+ signal
4310
+ }),
4311
+ staleTime: DAY,
4312
+ gcTime: DAY,
4313
+ refetchOnWindowFocus: false
4314
+ });
4315
+ };
4316
+ var useGetPeopleSoftEmployeeSupervisor = (employeeId, options) => {
4317
+ return useQuery2({
4318
+ ...options,
4319
+ queryKey: [QUERY_KEY2, "employee", employeeId, "supervisor"],
4320
+ queryFn: ({ signal }) => wczApiClient.request({
4321
+ url: `${BASE_URL2}/v1/employee/${employeeId}/supervisor`,
4322
+ method: "GET",
4323
+ signal
4324
+ }),
4325
+ staleTime: DAY,
4326
+ gcTime: DAY,
4327
+ refetchOnWindowFocus: false
4328
+ });
4329
+ };
4330
+ var useGetPeopleSoftEmployeeSubordinates = (employeeId, options) => {
4331
+ return useQuery2({
4332
+ ...options,
4333
+ queryKey: [QUERY_KEY2, "employee", employeeId, "subordinates"],
4334
+ queryFn: ({ signal }) => wczApiClient.request({
4335
+ url: `${BASE_URL2}/v1/employee/${employeeId}/subordinates`,
4336
+ method: "GET",
4337
+ signal
4338
+ }),
4339
+ staleTime: DAY,
4340
+ gcTime: DAY,
4341
+ refetchOnWindowFocus: false
4342
+ });
4343
+ };
4344
+ var useGetPeopleSoftEmployeeManager = (employeeId, options) => {
4345
+ return useQuery2({
4346
+ ...options,
4347
+ queryKey: [QUERY_KEY2, "employee", employeeId, "manager"],
4348
+ queryFn: ({ signal }) => wczApiClient.request({
4349
+ url: `${BASE_URL2}/v1/employee/${employeeId}/manager`,
4350
+ method: "GET",
4351
+ signal
4352
+ }),
4353
+ staleTime: DAY,
4354
+ gcTime: DAY,
4355
+ refetchOnWindowFocus: false
4356
+ });
4357
+ };
4358
+ var useGetPeopleSoftEmployeeGeneralManager = (employeeId, options) => {
4359
+ return useQuery2({
4360
+ ...options,
4361
+ queryKey: [QUERY_KEY2, "employee", employeeId, "generalManager"],
4362
+ queryFn: ({ signal }) => wczApiClient.request({
4363
+ url: `${BASE_URL2}/v1/employee/${employeeId}/generalManager`,
4364
+ method: "GET",
4365
+ signal
4366
+ }),
4367
+ staleTime: DAY,
4368
+ gcTime: DAY,
4369
+ refetchOnWindowFocus: false
4370
+ });
4371
+ };
4372
+ var useGetPeopleSoftDepartments = (options) => {
4373
+ return useQuery2({
4374
+ ...options,
4375
+ queryKey: [QUERY_KEY2, "department"],
4376
+ queryFn: ({ signal }) => wczApiClient.request({
4377
+ url: `${BASE_URL2}/v1/department/all`,
4378
+ method: "GET",
4379
+ signal
4380
+ }),
4381
+ staleTime: DAY,
4382
+ gcTime: DAY,
4383
+ refetchOnWindowFocus: false
4384
+ });
4385
+ };
4386
+ var useGetPeopleSoftDepartmentById = (departmentId, options) => {
4387
+ return useQuery2({
4388
+ ...options,
4389
+ queryKey: [QUERY_KEY2, "department", departmentId],
4390
+ queryFn: ({ signal }) => wczApiClient.request({
4391
+ url: `${BASE_URL2}/v1/department/${departmentId}`,
4392
+ method: "GET",
4393
+ signal
4394
+ }),
4395
+ staleTime: DAY,
4396
+ gcTime: DAY,
4397
+ refetchOnWindowFocus: false
4398
+ });
4399
+ };
4400
+ var useGetPeopleSoftDepartmentManager = (departmentId, options) => {
4401
+ return useQuery2({
4402
+ ...options,
4403
+ queryKey: [QUERY_KEY2, "department", departmentId, "manager"],
4404
+ queryFn: ({ signal }) => wczApiClient.request({
4405
+ url: `${BASE_URL2}/v1/department/${departmentId}/manager`,
4406
+ method: "GET",
4407
+ signal
4408
+ }),
4409
+ staleTime: DAY,
4410
+ gcTime: DAY,
4411
+ refetchOnWindowFocus: false
4412
+ });
4413
+ };
4414
+ var useGetPeopleSoftDepartmentEmployees = (departmentId, options) => {
4415
+ return useQuery2({
4416
+ ...options,
4417
+ queryKey: [QUERY_KEY2, "department", departmentId, "employees"],
4418
+ queryFn: ({ signal }) => wczApiClient.request({
4419
+ url: `${BASE_URL2}/v1/department/${departmentId}/employees`,
4420
+ method: "GET",
4421
+ signal
4422
+ }),
4423
+ staleTime: DAY,
4424
+ gcTime: DAY,
4425
+ refetchOnWindowFocus: false
4426
+ });
4427
+ };
4428
+ var useGetPeopleSoftCompanyGeneralManager = (companyCode, options) => {
4429
+ return useQuery2({
4430
+ ...options,
4431
+ queryKey: [QUERY_KEY2, "company", companyCode, "generalManager"],
4432
+ queryFn: ({ signal }) => wczApiClient.request({
4433
+ url: `${BASE_URL2}/v1/company/${companyCode}/generalManager`,
4434
+ method: "GET",
4435
+ signal
4436
+ }),
4437
+ staleTime: DAY,
4438
+ gcTime: DAY,
4439
+ refetchOnWindowFocus: false
4440
+ });
4441
+ };
4442
+
4443
+ // src/models/file/FileMeta.ts
4444
+ import { uuidv7 as uuidv72 } from "uuidv7";
4445
+ import * as z3 from "zod";
4446
+ var FileMetaSchema = z3.object({
4447
+ id: z3.uuid().default(uuidv72),
4448
+ subId: z3.uuid().default(uuidv72),
4449
+ appName: z3.string().min(1).max(255),
4450
+ fileName: z3.string().min(1).max(255),
4451
+ fileExtension: z3.string().min(1).max(255),
4452
+ fileSize: z3.number().min(0),
4453
+ mediaSubType: z3.string().min(1).max(255),
4454
+ mediaType: z3.string().min(1).max(255),
4455
+ mimeType: z3.string().min(1).max(255),
4456
+ createdBy: z3.string().min(1).max(255),
4457
+ createdDate: z3.date()
4458
+ });
4459
+
4460
+ // src/models/email/Email.ts
4461
+ import z5 from "zod";
4462
+
4463
+ // src/models/email/EmailAttachment.ts
4464
+ import z4 from "zod";
4465
+ var EmailAttachmentSchema = z4.object({
4466
+ appName: z4.string().min(1).max(100),
4467
+ subId: z4.uuid()
4468
+ });
4469
+
4470
+ // src/models/email/Email.ts
4471
+ var EmailSchema = z5.object({
4472
+ subject: z5.string().min(1).max(60),
4473
+ body: z5.string().min(1),
4474
+ to: z5.array(z5.email()).min(1),
4475
+ bcc: z5.array(z5.email()).optional(),
4476
+ cc: z5.array(z5.email()).optional(),
4477
+ attachments: z5.array(EmailAttachmentSchema).optional()
4478
+ });
4479
+
4480
+ // src/models/peoplesoft/Employee.ts
4481
+ import z8 from "zod";
4482
+
4483
+ // src/models/peoplesoft/EmployeeCategoryGroup.ts
4484
+ import z6 from "zod";
4485
+ var EmployeeCategoryGroup = z6.enum([
4486
+ "IDL",
4487
+ "FD",
4488
+ "FI"
4489
+ ]);
4490
+
4491
+ // src/models/peoplesoft/EmployeeStatus.ts
4492
+ import z7 from "zod";
4493
+ var EmployeeStatus = z7.enum([
4494
+ "Active",
4495
+ "Terminated",
4496
+ "Leave of Absence"
4497
+ ]);
4498
+
4499
+ // src/models/peoplesoft/Employee.ts
4500
+ var EmployeeSchema = z8.object({
4501
+ badgeId: z8.string(),
4502
+ category: z8.string(),
4503
+ categoryGroup: EmployeeCategoryGroup,
4504
+ companyCode: z8.string(),
4505
+ contactPhone: z8.string(),
4506
+ departmentId: z8.string(),
4507
+ departmentDescription: z8.string(),
4508
+ emailString: z8.string(),
4509
+ employeeId: z8.string(),
4510
+ extensionNumber: z8.string(),
4511
+ firstName: z8.string(),
4512
+ gender: z8.string(),
4513
+ hiredDate: z8.date(),
4514
+ lastName: z8.string(),
4515
+ managerId: z8.string(),
4516
+ middleName: z8.string(),
4517
+ name: z8.string(),
4518
+ nameTitleCase: z8.string(),
4519
+ nfcSn: z8.string(),
4520
+ plantId: z8.string(),
4521
+ position: z8.string(),
4522
+ previousEmployeeIds: z8.string().nullable(),
4523
+ reHiredDate: z8.date().nullable(),
4524
+ recordNumber: z8.number(),
4525
+ status: EmployeeStatus,
4526
+ supervisorId: z8.string(),
4527
+ terminationDate: z8.date().nullable(),
4528
+ terminationFutureDate: z8.date().nullable(),
4529
+ type: z8.string(),
4530
+ upperDepartmentId: z8.string(),
4531
+ jobCode: z8.string(),
4532
+ jobDescription: z8.string(),
4533
+ terminationReason: z8.string().nullable(),
4534
+ supervisorRecordNumber: z8.number()
4535
+ });
4536
+
4537
+ // src/models/peoplesoft/Department.ts
4538
+ import z9 from "zod";
4539
+ var DepartmentSchema = z9.object({
4540
+ departmentId: z9.string(),
4541
+ description: z9.string(),
4542
+ managerId: z9.string(),
4543
+ managerRecordNumber: z9.string(),
4544
+ treeLevel: z9.number(),
4545
+ upperDepartmentId: z9.string(),
4546
+ companyCode: z9.string(),
4547
+ location: z9.string(),
4548
+ salLocation: z9.string(),
4549
+ plantId: z9.string(),
4550
+ manager: EmployeeSchema
4551
+ });
4552
+
4553
+ // src/models/approval/Approval.ts
4554
+ import { uuidv7 as uuidv75 } from "uuidv7";
4555
+ import z17 from "zod";
4556
+
4557
+ // src/models/approval/ApprovalFlow.ts
4558
+ import { uuidv7 as uuidv73 } from "uuidv7";
4559
+ import { z as z11 } from "zod";
4560
+
4561
+ // src/models/approval/StepApprovalOrder.ts
4562
+ import z10 from "zod";
4563
+ var StepApprovalOrder = z10.enum([
4564
+ "Serial",
4565
+ "Parallel",
4566
+ "OneOfThem"
4567
+ ]);
4568
+
4569
+ // src/models/approval/ApprovalFlow.ts
4570
+ var ApprovalFlowSchema = z11.object({
4571
+ id: z11.uuid().default(uuidv73),
4572
+ approvalStage: z11.number(),
4573
+ batchSequence: z11.number().optional(),
4574
+ approvalSequence: z11.number(),
4575
+ stepApprovalOrder: StepApprovalOrder,
4576
+ steps: z11.array(z11.custom()),
4577
+ isActive: z11.boolean().default(false)
4578
+ });
4579
+
4580
+ // src/models/approval/ApprovalFlowStep.ts
4581
+ import { uuidv7 as uuidv74 } from "uuidv7";
4582
+ import { z as z14 } from "zod";
4583
+
4584
+ // src/models/approval/ApprovalEmployee.ts
4585
+ import { z as z12 } from "zod";
4586
+ var ApprovalEmployeeSchema = z12.object({
4587
+ employeeId: z12.string().min(1).max(20),
4588
+ name: z12.string().min(1).max(50),
4589
+ email: z12.email().min(1).max(100)
4590
+ });
4591
+
4592
+ // src/models/approval/ApprovalStepResult.ts
4593
+ import z13 from "zod";
4594
+ var ApprovalStepResult = z13.enum([
4595
+ "NotAvailable",
4596
+ "FutureApproval",
4597
+ "WaitingForApproval",
4598
+ "Approved",
4599
+ "Rejected",
4600
+ "Skipped",
4601
+ "Withdrawn",
4602
+ "Cancelled"
4603
+ ]);
4604
+
4605
+ // src/models/approval/ApprovalFlowStep.ts
4606
+ var ApprovalFlowStepSchema = z14.object({
4607
+ id: z14.uuid().default(uuidv74),
4608
+ order: z14.number(),
4609
+ approverRole: z14.string().min(1).max(100).default("Approver"),
4610
+ approver: ApprovalEmployeeSchema,
4611
+ actualApprover: ApprovalEmployeeSchema.optional(),
4612
+ result: ApprovalStepResult.default("NotAvailable"),
4613
+ resultDate: z14.date().optional(),
4614
+ resultComment: z14.string().max(2e3).optional()
4615
+ });
4616
+
4617
+ // src/models/approval/ApprovalRequestType.ts
4618
+ import z15 from "zod";
4619
+ var ApprovalRequestType = z15.enum([
4620
+ "Single",
4621
+ "Batch"
4622
+ ]);
4623
+
4624
+ // src/models/approval/ApprovalStatus.ts
4625
+ import z16 from "zod";
4626
+ var ApprovalStatus = z16.enum([
4627
+ "WaitingForApproval",
4628
+ "Approved",
4629
+ "PartiallyApproved",
4630
+ "Rejected",
4631
+ "Withdrawn",
4632
+ "Cancelled"
4633
+ ]);
4634
+
4635
+ // src/models/approval/Approval.ts
4636
+ var ApprovalSchema = z17.object({
4637
+ id: z17.uuid().default(uuidv75),
4638
+ number: z17.string().max(30).optional(),
4639
+ applicationName: z17.string().min(1).max(50),
4640
+ type: ApprovalRequestType.default("Single"),
4641
+ status: ApprovalStatus,
4642
+ emailBody: z17.string().min(1),
4643
+ created: z17.date(),
4644
+ createdBy: z17.custom(),
4645
+ updated: z17.date(),
4646
+ updatedBy: z17.custom(),
4647
+ approvalFlows: z17.array(z17.custom()).min(1),
4648
+ currentApprovers: z17.array(z17.custom())
4649
+ });
4650
+ var ApprovalCreateSchema = ApprovalSchema.pick({
4651
+ id: true,
4652
+ number: true,
4653
+ applicationName: true,
4654
+ type: true,
4655
+ emailBody: true,
4656
+ approvalFlows: true
4657
+ }).extend({
4658
+ approvalFlows: z17.array(
4659
+ ApprovalFlowSchema.pick({
4660
+ approvalStage: true,
4661
+ batchSequence: true,
4662
+ stepApprovalOrder: true,
4663
+ steps: true
4664
+ }).extend({
4665
+ steps: z17.array(
4666
+ ApprovalFlowStepSchema.pick({
4667
+ approverRole: true,
4668
+ approver: true
4669
+ })
4670
+ )
4671
+ })
4672
+ ).min(1)
4673
+ });
4674
+ var SingleApprovalSchema = z17.object({
4675
+ result: ApprovalStepResult,
4676
+ resultComment: z17.string().max(2e3).optional(),
4677
+ emailBody: z17.string().min(1)
4678
+ });
4679
+ var CancelApprovalSchema = z17.object({
4680
+ comment: z17.string().min(1).max(2e3),
4681
+ emailBody: z17.string().min(1)
4682
+ });
4683
+ var WithdrawApprovalSchema = z17.object({
4684
+ comment: z17.string().min(1).max(2e3),
4685
+ emailBody: z17.string().min(1)
4686
+ });
4253
4687
  export {
4688
+ ApprovalCreateSchema,
4689
+ ApprovalEmployeeSchema,
4690
+ ApprovalFlowSchema,
4691
+ ApprovalFlowStepSchema,
4692
+ ApprovalSchema,
4693
+ CancelApprovalSchema,
4254
4694
  ChipInputCell,
4695
+ DepartmentSchema,
4255
4696
  Dropzone,
4256
4697
  EditableColumnHeader,
4698
+ EmailAttachmentSchema,
4699
+ EmailSchema,
4700
+ EmployeeSchema,
4701
+ FileMetaSchema,
4257
4702
  FileViewer,
4258
4703
  Fullscreen,
4259
4704
  LayoutProvider,
@@ -4266,7 +4711,9 @@ export {
4266
4711
  RouterListItemButton,
4267
4712
  RouterNotFound,
4268
4713
  RouterTab,
4714
+ SingleApprovalSchema,
4269
4715
  TypographyWithIcon,
4716
+ WithdrawApprovalSchema,
4270
4717
  rootRouteHead,
4271
4718
  t,
4272
4719
  useDeleteFile,
@@ -4278,13 +4725,27 @@ export {
4278
4725
  useGetFile,
4279
4726
  useGetFileMetas,
4280
4727
  useGetFileThumbnail,
4728
+ useGetPeopleSoftActiveEmployees,
4729
+ useGetPeopleSoftCompanyGeneralManager,
4730
+ useGetPeopleSoftDepartmentById,
4731
+ useGetPeopleSoftDepartmentEmployees,
4732
+ useGetPeopleSoftDepartmentManager,
4733
+ useGetPeopleSoftDepartments,
4734
+ useGetPeopleSoftEmployeeById,
4735
+ useGetPeopleSoftEmployeeGeneralManager,
4736
+ useGetPeopleSoftEmployeeManager,
4737
+ useGetPeopleSoftEmployeeSubordinates,
4738
+ useGetPeopleSoftEmployeeSupervisor,
4739
+ useGetPeopleSoftEmployees,
4740
+ useGetPeopleSoftEmployeesSearch,
4741
+ useGetPeopleSoftPreviousEmployeeIds,
4281
4742
  useLayoutForm,
4282
4743
  default2 as useLocalStorageState,
4283
4744
  useOpenFile,
4284
4745
  useTranslation8 as useTranslation,
4285
4746
  useUpdateFileMeta,
4286
4747
  useUploadFile,
4287
- uuidv72 as uuidv7,
4748
+ uuidv76 as uuidv7,
4288
4749
  wczApiClient,
4289
4750
  withLayoutForm
4290
4751
  };