wcz-test 7.2.0 → 7.2.2

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.
@@ -3,7 +3,7 @@ import { c as V } from "./compiler-runtime-BNHg76kC.js";
3
3
  import { Typography as he, Stack as _e, Box as se, useTheme as di, Paper as mi, ListItemButton as nt, ListItemIcon as at, ListItemText as ot, List as Wt, Menu as ui, ImageListItemBar as fi, IconButton as mt, Tooltip as vi, ImageListItem as xi, Dialog as gi, Fab as hi, Chip as ht, Button as yi, Link as bi, Tab as wi, Divider as Yt } from "@mui/material";
4
4
  import we, { useRef as Te, useState as Oe, useEffectEvent as ji, useEffect as ge, useMemo as xe, useReducer as ki, useCallback as pe, forwardRef as Ei, useImperativeHandle as Ti, Fragment as ut, createContext as _i, useContext as Oi } from "react";
5
5
  import Di from "@mui/icons-material/CloudUpload";
6
- import { g as Bt, a as ce } from "./index-wOcJpekI.js";
6
+ import { g as Bt, a as ce } from "./index-CsRHHlp3.js";
7
7
  import { useMutation as ye, useQueryClient as Ht, useQuery as ft } from "@tanstack/react-query";
8
8
  import Nt from "@mui/icons-material/MoreVert";
9
9
  import { grey as Si } from "@mui/material/colors";
@@ -0,0 +1,75 @@
1
+ import { z as a } from "zod";
2
+ function E(e, r) {
3
+ if (e instanceof Promise) throw new Error(r);
4
+ }
5
+ function N(e, r) {
6
+ const o = {}, d = [];
7
+ for (const t in e) {
8
+ const s = e[t]["~standard"].validate(r[t]);
9
+ if (E(s, `Validation must be synchronous, but ${t} returned a Promise.`), s.issues) {
10
+ d.push(...s.issues.map((c) => ({
11
+ ...c,
12
+ message: c.message,
13
+ path: [t, ...c.path ?? []]
14
+ })));
15
+ continue;
16
+ }
17
+ o[t] = s.value;
18
+ }
19
+ return d.length ? { issues: d } : { value: o };
20
+ }
21
+ function l(e) {
22
+ const r = e.runtimeEnvStrict ?? e.runtimeEnv ?? process.env;
23
+ if (e.emptyStringAsUndefined ?? !1)
24
+ for (const [n, i] of Object.entries(r)) i === "" && delete r[n];
25
+ if (e.skipValidation) {
26
+ if (e.extends) for (const n of e.extends) n.skipValidation = !0;
27
+ return r;
28
+ }
29
+ const o = typeof e.client == "object" ? e.client : {}, d = typeof e.server == "object" ? e.server : {}, t = typeof e.shared == "object" ? e.shared : {}, s = e.isServer ?? (typeof window > "u" || "Deno" in window), c = s ? {
30
+ ...d,
31
+ ...t,
32
+ ...o
33
+ } : {
34
+ ...o,
35
+ ...t
36
+ }, u = e.createFinalSchema?.(c, s)?.["~standard"].validate(r) ?? N(c, r);
37
+ E(u, "Validation must be synchronous");
38
+ const _ = e.onValidationError ?? ((n) => {
39
+ throw console.error("❌ Invalid environment variables:", n), new Error("Invalid environment variables");
40
+ }), I = e.onInvalidAccess ?? (() => {
41
+ throw new Error("❌ Attempted to access a server-side environment variable on the client");
42
+ });
43
+ if (u.issues) return _(u.issues);
44
+ const T = (n) => e.clientPrefix ? !n.startsWith(e.clientPrefix) && !(n in t) : !0, v = (n) => s || !T(n), f = (n) => n === "__esModule" || n === "$$typeof", b = (e.extends ?? []).reduce((n, i) => Object.assign(n, i), {}), m = Object.assign(b, u.value);
45
+ return new Proxy(m, { get(n, i) {
46
+ if (typeof i == "string" && !f(i))
47
+ return v(i) ? Reflect.get(n, i) : I(i);
48
+ } });
49
+ }
50
+ const A = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1, VITE_API_URL: "http://localhost:3000", VITE_APP_TITLE: "WCZ Layout", VITE_DYNAMSOFT_LICENSE_KEY: "DLS2eyJoYW5kc2hha2VDb2RlIjoiMTAxMjU2MzQ5LTEwMTI4MDIzNyIsIm1haW5TZXJ2ZXJVUkwiOiJodHRwczovL21sdHMuZHluYW1zb2Z0LmNvbS8iLCJvcmdhbml6YXRpb25JRCI6IjEwMTI1NjM0OSIsInN0YW5kYnlTZXJ2ZXJVUkwiOiJodHRwczovL3NsdHMuZHluYW1zb2Z0LmNvbS8iLCJjaGVja0NvZGUiOi0yMjMwMzAzMjZ9", VITE_ENTRA_CLIENT_ID: "a238a215-52b6-442c-baec-5d8a109906ec", VITE_ENTRA_TENANT_ID: "de0795e0-d7c0-4eeb-b9bb-bc94d8980d3b", VITE_MUI_LICENSE_KEY: "d7aeb74913a4918a319bf4c253aa1a49Tz0xMjIzOTYsRT0xNzk1ODIzOTk5MDAwLFM9cHJlbWl1bSxMTT1zdWJzY3JpcHRpb24sUFY9aW5pdGlhbCxLVj0y" }, S = l({
51
+ clientPrefix: "VITE_",
52
+ client: {
53
+ VITE_ENTRA_CLIENT_ID: a.string(),
54
+ VITE_ENTRA_TENANT_ID: a.string(),
55
+ VITE_APP_TITLE: a.string(),
56
+ VITE_MUI_LICENSE_KEY: a.string(),
57
+ VITE_API_URL: a.url()
58
+ },
59
+ runtimeEnv: A,
60
+ emptyStringAsUndefined: !0
61
+ }), V = l({
62
+ server: {
63
+ ENTRA_CLIENT_ID: a.string(),
64
+ ENTRA_TENANT_ID: a.string(),
65
+ ENTRA_CLIENT_SECRET: a.string()
66
+ },
67
+ runtimeEnv: process.env,
68
+ emptyStringAsUndefined: !0
69
+ });
70
+ export {
71
+ S as a,
72
+ l as c,
73
+ V as s
74
+ };
75
+ //# sourceMappingURL=env-Dy8Ynqa-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env-Dy8Ynqa-.js","sources":["../node_modules/@t3-oss/env-core/dist/standard.js","../node_modules/@t3-oss/env-core/dist/index.js","../src/env.ts"],"sourcesContent":["//#region src/standard.ts\nfunction ensureSynchronous(value, message) {\n\tif (value instanceof Promise) throw new Error(message);\n}\nfunction parseWithDictionary(dictionary, value) {\n\tconst result = {};\n\tconst issues = [];\n\tfor (const key in dictionary) {\n\t\tconst propResult = dictionary[key][\"~standard\"].validate(value[key]);\n\t\tensureSynchronous(propResult, `Validation must be synchronous, but ${key} returned a Promise.`);\n\t\tif (propResult.issues) {\n\t\t\tissues.push(...propResult.issues.map((issue) => ({\n\t\t\t\t...issue,\n\t\t\t\tmessage: issue.message,\n\t\t\t\tpath: [key, ...issue.path ?? []]\n\t\t\t})));\n\t\t\tcontinue;\n\t\t}\n\t\tresult[key] = propResult.value;\n\t}\n\tif (issues.length) return { issues };\n\treturn { value: result };\n}\n\n//#endregion\nexport { ensureSynchronous, parseWithDictionary };\n//# sourceMappingURL=standard.js.map","import { ensureSynchronous, parseWithDictionary } from \"./standard.js\";\n\n//#region src/index.ts\n/**\n* Create a new environment variable schema.\n*/\nfunction createEnv(opts) {\n\tconst runtimeEnv = opts.runtimeEnvStrict ?? opts.runtimeEnv ?? process.env;\n\tif (opts.emptyStringAsUndefined ?? false) {\n\t\tfor (const [key, value] of Object.entries(runtimeEnv)) if (value === \"\") delete runtimeEnv[key];\n\t}\n\tif (!!opts.skipValidation) {\n\t\tif (opts.extends) for (const preset of opts.extends) preset.skipValidation = true;\n\t\treturn runtimeEnv;\n\t}\n\tconst _client = typeof opts.client === \"object\" ? opts.client : {};\n\tconst _server = typeof opts.server === \"object\" ? opts.server : {};\n\tconst _shared = typeof opts.shared === \"object\" ? opts.shared : {};\n\tconst isServer = opts.isServer ?? (typeof window === \"undefined\" || \"Deno\" in window);\n\tconst finalSchemaShape = isServer ? {\n\t\t..._server,\n\t\t..._shared,\n\t\t..._client\n\t} : {\n\t\t..._client,\n\t\t..._shared\n\t};\n\tconst parsed = (opts.createFinalSchema?.(finalSchemaShape, isServer))?.[\"~standard\"].validate(runtimeEnv) ?? parseWithDictionary(finalSchemaShape, runtimeEnv);\n\tensureSynchronous(parsed, \"Validation must be synchronous\");\n\tconst onValidationError = opts.onValidationError ?? ((issues) => {\n\t\tconsole.error(\"❌ Invalid environment variables:\", issues);\n\t\tthrow new Error(\"Invalid environment variables\");\n\t});\n\tconst onInvalidAccess = opts.onInvalidAccess ?? (() => {\n\t\tthrow new Error(\"❌ Attempted to access a server-side environment variable on the client\");\n\t});\n\tif (parsed.issues) return onValidationError(parsed.issues);\n\tconst isServerAccess = (prop) => {\n\t\tif (!opts.clientPrefix) return true;\n\t\treturn !prop.startsWith(opts.clientPrefix) && !(prop in _shared);\n\t};\n\tconst isValidServerAccess = (prop) => {\n\t\treturn isServer || !isServerAccess(prop);\n\t};\n\tconst ignoreProp = (prop) => {\n\t\treturn prop === \"__esModule\" || prop === \"$$typeof\";\n\t};\n\tconst extendedObj = (opts.extends ?? []).reduce((acc, curr) => {\n\t\treturn Object.assign(acc, curr);\n\t}, {});\n\tconst fullObj = Object.assign(extendedObj, parsed.value);\n\treturn new Proxy(fullObj, { get(target, prop) {\n\t\tif (typeof prop !== \"string\") return void 0;\n\t\tif (ignoreProp(prop)) return void 0;\n\t\tif (!isValidServerAccess(prop)) return onInvalidAccess(prop);\n\t\treturn Reflect.get(target, prop);\n\t} });\n}\n\n//#endregion\nexport { createEnv };\n//# sourceMappingURL=index.js.map","import { createEnv } from \"@t3-oss/env-core\";\r\nimport { z } from \"zod\";\r\n\r\nexport const clientEnv = createEnv({\r\n clientPrefix: \"VITE_\",\r\n client: {\r\n VITE_ENTRA_CLIENT_ID: z.string(),\r\n VITE_ENTRA_TENANT_ID: z.string(),\r\n VITE_APP_TITLE: z.string(),\r\n VITE_MUI_LICENSE_KEY: z.string(),\r\n VITE_API_URL: z.url(),\r\n },\r\n runtimeEnv: import.meta.env,\r\n emptyStringAsUndefined: true,\r\n});\r\n\r\nexport const serverEnv = createEnv({\r\n server: {\r\n ENTRA_CLIENT_ID: z.string(),\r\n ENTRA_TENANT_ID: z.string(),\r\n ENTRA_CLIENT_SECRET: z.string(),\r\n },\r\n runtimeEnv: process.env,\r\n emptyStringAsUndefined: true,\r\n});\r\n"],"names":["ensureSynchronous","value","message","parseWithDictionary","dictionary","result","issues","key","propResult","issue","createEnv","opts","runtimeEnv","preset","_client","_server","_shared","isServer","finalSchemaShape","parsed","onValidationError","onInvalidAccess","isServerAccess","prop","isValidServerAccess","ignoreProp","extendedObj","acc","curr","fullObj","target","clientEnv","clientPrefix","client","VITE_ENTRA_CLIENT_ID","z","string","VITE_ENTRA_TENANT_ID","VITE_APP_TITLE","VITE_MUI_LICENSE_KEY","VITE_API_URL","url","import","emptyStringAsUndefined","serverEnv","server","ENTRA_CLIENT_ID","ENTRA_TENANT_ID","ENTRA_CLIENT_SECRET","process","env"],"mappings":";AACA,SAASA,EAAkBC,GAAOC,GAAS;AAC1C,MAAID,aAAiB,QAAS,OAAM,IAAI,MAAMC,CAAO;AACtD;AACA,SAASC,EAAoBC,GAAYH,GAAO;AAC/C,QAAMI,IAAS,CAAA,GACTC,IAAS,CAAA;AACf,aAAWC,KAAOH,GAAY;AAC7B,UAAMI,IAAaJ,EAAWG,CAAG,EAAE,WAAW,EAAE,SAASN,EAAMM,CAAG,CAAC;AAEnE,QADAP,EAAkBQ,GAAY,uCAAuCD,CAAG,sBAAsB,GAC1FC,EAAW,QAAQ;AACtB,MAAAF,EAAO,KAAK,GAAGE,EAAW,OAAO,IAAI,CAACC,OAAW;AAAA,QAChD,GAAGA;AAAA,QACH,SAASA,EAAM;AAAA,QACf,MAAM,CAACF,GAAK,GAAGE,EAAM,QAAQ,CAAA,CAAE;AAAA,MACnC,EAAK,CAAC;AACH;AAAA,IACD;AACA,IAAAJ,EAAOE,CAAG,IAAIC,EAAW;AAAA,EAC1B;AACA,SAAIF,EAAO,SAAe,EAAE,QAAAA,EAAM,IAC3B,EAAE,OAAOD,EAAM;AACvB;AChBA,SAASK,EAAUC,GAAM;AACxB,QAAMC,IAAaD,EAAK,oBAAoBA,EAAK,cAAc,QAAQ;AACvE,MAAIA,EAAK,0BAA0B;AAClC,eAAW,CAACJ,GAAKN,CAAK,KAAK,OAAO,QAAQW,CAAU,EAAG,CAAIX,MAAU,MAAI,OAAOW,EAAWL,CAAG;AAE/F,MAAMI,EAAK,gBAAgB;AAC1B,QAAIA,EAAK,QAAS,YAAWE,KAAUF,EAAK,QAAS,CAAAE,EAAO,iBAAiB;AAC7E,WAAOD;AAAA,EACR;AACA,QAAME,IAAU,OAAOH,EAAK,UAAW,WAAWA,EAAK,SAAS,CAAA,G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IO,GAAQP,CAAI,IADQF,EAAgBE,CAAI;AAAA,EAE5D,GAAG;AACJ;4rBCtDaQ,IAAYrB,EAAU;AAAA,EAC/BsB,cAAc;AAAA,EACdC,QAAQ;AAAA,IACJC,sBAAsBC,EAAEC,OAAAA;AAAAA,IACxBC,sBAAsBF,EAAEC,OAAAA;AAAAA,IACxBE,gBAAgBH,EAAEC,OAAAA;AAAAA,IAClBG,sBAAsBJ,EAAEC,OAAAA;AAAAA,IACxBI,cAAcL,EAAEM,IAAAA;AAAAA,EAAI;AAAA,EAExB7B,YAAY8B;AAAAA,EACZC,wBAAwB;AAC5B,CAAC,GAEYC,IAAYlC,EAAU;AAAA,EAC/BmC,QAAQ;AAAA,IACJC,iBAAiBX,EAAEC,OAAAA;AAAAA,IACnBW,iBAAiBZ,EAAEC,OAAAA;AAAAA,IACnBY,qBAAqBb,EAAEC,OAAAA;AAAAA,EAAO;AAAA,EAElCxB,YAAYqC,QAAQC;AAAAA,EACpBP,wBAAwB;AAC5B,CAAC;","x_google_ignoreList":[0,1]}
@@ -0,0 +1 @@
1
+ export { getAppToken, getTokenOnBehalfOf } from '../lib/auth/msalServer';
@@ -2,5 +2,4 @@ export { createEnv } from '@t3-oss/env-core';
2
2
  export { t } from 'i18next';
3
3
  export { uuidv7 } from 'uuidv7';
4
4
  export { getAccessToken, getUser } from '../lib/auth/msalClient';
5
- export { getAppToken, getTokenOnBehalfOf } from '../lib/auth/msalServer';
6
5
  export { Platform } from '../lib/utils';
package/dist/hooks.js CHANGED
@@ -3,7 +3,7 @@ import { j as F } from "./DialogsContext-CGAKEKKW.js";
3
3
  import { u as or } from "./DialogsContext-CGAKEKKW.js";
4
4
  import { c as O } from "./compiler-runtime-BNHg76kC.js";
5
5
  import { Autocomplete as Ue, TextField as Se, Checkbox as We, FormControlLabel as be, FormHelperText as fe, FormControl as ce, RadioGroup as He, Radio as Ze, FormLabel as Pe, Slider as qe, Button as ze, Switch as Je } from "@mui/material";
6
- import { g as $ } from "./utils-BXxJ2sNo.js";
6
+ import { g as $ } from "./utils-BGMLqA26.js";
7
7
  import { DatePicker as Qe, DateRangePicker as Xe, TimePicker as Ye, TimeRangePicker as et, DateTimePicker as tt, DateTimeRangePicker as rt } from "@mui/x-date-pickers-pro";
8
8
  import re, { useRef as X, useState as pe, useEffect as ie, useLayoutEffect as at, useMemo as nt, useCallback as lt } from "react";
9
9
  import { u as sr, a as fr } from "./DialogsHooks-BZUdpDVJ.js";
@@ -1,8 +1,9 @@
1
1
  import { QueryClient as Nt, mutationOptions as Q, queryOptions as $ } from "@tanstack/react-query";
2
2
  import { a as De } from "./index-De6Lo0ff.js";
3
3
  import V from "zod";
4
- import { t as mt, c as vt } from "./utils-BXxJ2sNo.js";
5
- import { g as Ne } from "./msalClient-Cem8ZXIU.js";
4
+ import { a as mt } from "./env-Dy8Ynqa-.js";
5
+ import { g as Ne } from "./msalClient-l-DV8PoB.js";
6
+ import { t as vt } from "./utils-BGMLqA26.js";
6
7
  import { A as Bt, a as Ht, F as gt } from "./FileMeta-CDQ1BQUH.js";
7
8
  import "./compiler-runtime-BNHg76kC.js";
8
9
  import "react";
@@ -10,7 +11,7 @@ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
10
11
  function bt(e) {
11
12
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
12
13
  }
13
- const ee = new Nt(), G = "approval", _t = mt(vt.VITE_APP_TITLE), J = De.create({
14
+ const ee = new Nt(), G = "approval", _t = vt(mt.VITE_APP_TITLE), J = De.create({
14
15
  baseURL: "https://graph.microsoft.com/v1.0"
15
16
  });
16
17
  J.interceptors.request.use(async (e) => {
@@ -2434,7 +2435,7 @@ yt(yt({}, Ct.defaultOptions), {}, {
2434
2435
  urlStorage: _n ? new wn() : new ur(),
2435
2436
  fingerprint: an
2436
2437
  });
2437
- const K = "file", ie = 1e3 * 60 * 60, M = mt(vt.VITE_APP_TITLE), Z = De.create({
2438
+ const K = "file", ie = 1e3 * 60 * 60, M = vt(mt.VITE_APP_TITLE), Z = De.create({
2438
2439
  baseURL: "https://graph.microsoft.com/v1.0"
2439
2440
  });
2440
2441
  Z.interceptors.request.use(async (e) => {
@@ -2745,14 +2746,14 @@ const Pn = {
2745
2746
  gcTime: F,
2746
2747
  refetchOnWindowFocus: !1
2747
2748
  })
2748
- }, An = {
2749
+ }, $n = {
2749
2750
  peopleSoft: Pn,
2750
2751
  approval: zt,
2751
2752
  file: xn
2752
2753
  };
2753
2754
  export {
2754
- An as a,
2755
+ $n as a,
2755
2756
  bt as g,
2756
2757
  ee as q
2757
2758
  };
2758
- //# sourceMappingURL=index-wOcJpekI.js.map
2759
+ //# sourceMappingURL=index-CsRHHlp3.js.map