wcz-layout 8.3.1 → 8.3.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.
Files changed (73) hide show
  1. package/dist/{Approval-Cx-EUX2I.js → Approval-BTJTexDo.js} +1 -1
  2. package/dist/{Approval-Cx-EUX2I.js.map → Approval-BTJTexDo.js.map} +1 -1
  3. package/dist/{DialogsContext-DkePghS6.js → DialogsContext-DLqA8RJ_.js} +1 -1
  4. package/dist/{DialogsContext-DkePghS6.js.map → DialogsContext-DLqA8RJ_.js.map} +1 -1
  5. package/dist/{Email-CCL5C-C0.js → Email-C9qwj7GD.js} +1 -1
  6. package/dist/{Email-CCL5C-C0.js.map → Email-C9qwj7GD.js.map} +1 -1
  7. package/dist/{FileMeta-DCFvkQQC.js → FileMeta-DDqUju1Y.js} +1 -1
  8. package/dist/{FileMeta-DCFvkQQC.js.map → FileMeta-DDqUju1Y.js.map} +1 -1
  9. package/dist/{FileMeta-DrEMs4Gq.d.ts → FileMeta-ILLTOjaM.d.ts} +1 -1
  10. package/dist/{NotificationContext-FQRaNZRx.js → NotificationContext-CgwUOeW0.js} +1 -1
  11. package/dist/{NotificationContext-FQRaNZRx.js.map → NotificationContext-CgwUOeW0.js.map} +1 -1
  12. package/dist/{RouterListItemButton-p9U4Z0SW.js → RouterListItemButton-owZVvuC_.js} +1 -1
  13. package/dist/{RouterListItemButton-p9U4Z0SW.js.map → RouterListItemButton-owZVvuC_.js.map} +1 -1
  14. package/dist/{User-DVU1zqml.d.ts → User-CT_IDGuG.d.ts} +1 -1
  15. package/dist/{apiMiddleware-CwCEvg3r.js → apiMiddleware-CtY4rOFU.js} +2 -2
  16. package/dist/{apiMiddleware-CwCEvg3r.js.map → apiMiddleware-CtY4rOFU.js.map} +1 -1
  17. package/dist/components.d.ts +4 -5
  18. package/dist/components.js +3 -3
  19. package/dist/components.js.map +1 -1
  20. package/dist/data/client.d.ts +49 -51
  21. package/dist/data/client.js +3 -3
  22. package/dist/data/client.js.map +1 -1
  23. package/dist/data/server.d.ts +14 -18
  24. package/dist/data/server.js +4 -4
  25. package/dist/data/server.js.map +1 -1
  26. package/dist/data.js +1 -1
  27. package/dist/{env-Dgbk8SQN.js → env-ON-cyE3N.js} +1 -1
  28. package/dist/{env-Dgbk8SQN.js.map → env-ON-cyE3N.js.map} +1 -1
  29. package/dist/{file-Dv1BsCsM.js → file-BUdLb7H1.js} +5 -5
  30. package/dist/{file-Dv1BsCsM.js.map → file-BUdLb7H1.js.map} +1 -1
  31. package/dist/{file-DcIx8gtK.js → file-Dsht7yOP.js} +3 -3
  32. package/dist/{file-DcIx8gtK.js.map → file-Dsht7yOP.js.map} +1 -1
  33. package/dist/hooks.d.ts +48 -51
  34. package/dist/hooks.js +3 -3
  35. package/dist/hooks.js.map +1 -1
  36. package/dist/index.d.ts +4 -3
  37. package/dist/index.js +120 -97
  38. package/dist/index.js.map +1 -1
  39. package/dist/middleware.d.ts +9 -11
  40. package/dist/middleware.js +3 -3
  41. package/dist/middleware.js.map +1 -1
  42. package/dist/models.d.ts +2 -2
  43. package/dist/models.js +3 -3
  44. package/dist/models.js.map +1 -1
  45. package/dist/{msalClient-C2LlaBzj.d.ts → msalClient-CYiQAFnY.d.ts} +3 -4
  46. package/dist/{msalServer-B3AztUoH.js → msalServer-B9sVqpQ2.js} +2 -2
  47. package/dist/{msalServer-B3AztUoH.js.map → msalServer-B9sVqpQ2.js.map} +1 -1
  48. package/dist/{peoplesoft--FioEbzn.js → peoplesoft-BCjRje6b.js} +3 -3
  49. package/dist/{peoplesoft--FioEbzn.js.map → peoplesoft-BCjRje6b.js.map} +1 -1
  50. package/dist/{peoplesoft-BG_AV3zS.d.ts → peoplesoft-Cze2ngGd.d.ts} +58 -60
  51. package/dist/{queryClient-1OJ5Va3i.js → queryClient-D64McLhZ.js} +1 -1
  52. package/dist/{queryClient-1OJ5Va3i.js.map → queryClient-D64McLhZ.js.map} +1 -1
  53. package/dist/{useDialogs-imgl4bIl.js → useDialogs-BJVhBr8S.js} +2 -2
  54. package/dist/useDialogs-BJVhBr8S.js.map +1 -0
  55. package/dist/{utils-B7LPctqx.js → utils-BMUmv2ws.js} +3 -2
  56. package/dist/{utils-B7LPctqx.js.map → utils-BMUmv2ws.js.map} +1 -1
  57. package/dist/{utils-DgrP27XP.d.ts → utils-CvvyM8Xw.d.ts} +2 -2
  58. package/dist/utils.d.ts +2 -2
  59. package/dist/utils.js +2 -2
  60. package/dist/vite.js +1 -1
  61. package/dist/vite.js.map +1 -1
  62. package/package.json +5 -5
  63. package/skills/services/SKILL.md +2 -1
  64. package/skills/start/SKILL.md +12 -13
  65. package/dist/useDialogs-imgl4bIl.js.map +0 -1
  66. package/skills/start/steps/02-dependency-check.md +0 -11
  67. /package/skills/start/steps/{03-project-name-setup.md → 02-project-name-setup.md} +0 -0
  68. /package/skills/start/steps/{04-apm-setup.md → 03-apm-setup.md} +0 -0
  69. /package/skills/start/steps/{05-database-setup.md → 04-database-setup.md} +0 -0
  70. /package/skills/start/steps/{06-entra-setup.md → 05-entra-setup.md} +0 -0
  71. /package/skills/start/steps/{07-vault-setup.md → 06-vault-setup.md} +0 -0
  72. /package/skills/start/steps/{08-generate-favicon.md → 07-generate-favicon.md} +0 -0
  73. /package/skills/start/steps/{09-commit.md → 08-commit.md} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"queryClient-1OJ5Va3i.js","names":["QueryClient","queryClient"],"sources":["../src/lib/queryClient.ts"],"sourcesContent":["import { QueryClient } from \"@tanstack/react-query\";\n\nexport const queryClient = new QueryClient();\n"],"mappings":";;AAEA,MAAaC,cAAc,IAAID,aAAa"}
1
+ {"version":3,"file":"queryClient-D64McLhZ.js","names":["QueryClient","queryClient"],"sources":["../src/lib/queryClient.ts"],"sourcesContent":["import { QueryClient } from \"@tanstack/react-query\";\n\nexport const queryClient = new QueryClient();\n"],"mappings":";;AAEA,MAAaC,cAAc,IAAID,YAAY"}
@@ -1,4 +1,4 @@
1
- import { t as DialogsContext } from "./DialogsContext-DkePghS6.js";
1
+ import { t as DialogsContext } from "./DialogsContext-DLqA8RJ_.js";
2
2
  import { c } from "react/compiler-runtime";
3
3
  import { Button, Dialog, DialogActions, DialogContent, DialogTitle, useEventCallback } from "@mui/material";
4
4
  import { useContext } from "react";
@@ -245,4 +245,4 @@ function useDialogs() {
245
245
  //#endregion
246
246
  export { useDialogs as t };
247
247
 
248
- //# sourceMappingURL=useDialogs-imgl4bIl.js.map
248
+ //# sourceMappingURL=useDialogs-BJVhBr8S.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDialogs-BJVhBr8S.js","names":["Button","Dialog","DialogActions","DialogContent","DialogTitle","useEventCallback","useContext","useTranslation","DialogsContext","ReactNode","OpenDialogOptions","onClose","result","TResult","Promise","AlertOptions","title","ConfirmOptions","cancelText","DialogProps","payload","TPayload","open","OpenAlertDialog","message","options","OpenConfirmDialog","DialogComponent","React","ComponentType","OpenDialog","Component","CloseDialog","dialog","AlertDialogPayload","AlertDialogProps","AlertDialog","t0","$","_c","$i","Symbol","for","t","t1","t2","t3","t4","t5","t6","t7","t8","ConfirmDialogPayload","ConfirmDialogProps","ConfirmDialog","t9","t10","t11","t12","DialogHook","alert","confirm","close","useDialogs","undefined","message_0","options_0"],"sources":["../src/hooks/useDialogs.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n useEventCallback,\n} from \"@mui/material\";\nimport { useContext } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { DialogsContext } from \"../contexts/DialogsContext\";\nimport type { ReactNode } from \"react\";\n\nexport interface OpenDialogOptions<TResult> {\n onClose?: (result: TResult) => Promise<void>;\n}\n\nexport interface AlertOptions {\n title?: ReactNode;\n}\n\nexport interface ConfirmOptions {\n title?: ReactNode;\n cancelText?: ReactNode;\n}\n\nexport interface DialogProps<TPayload = undefined, TResult = void> {\n payload: TPayload;\n open: boolean;\n onClose: (result: TResult) => Promise<void>;\n}\n\nexport type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;\n\nexport type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;\n\nexport type DialogComponent<TPayload, TResult> = React.ComponentType<\n DialogProps<TPayload, TResult>\n>;\n\nexport interface OpenDialog {\n <TPayload extends undefined, TResult>(\n Component: DialogComponent<TPayload, TResult>,\n payload?: TPayload,\n options?: OpenDialogOptions<TResult>,\n ): Promise<TResult>;\n <TPayload, TResult>(\n Component: DialogComponent<TPayload, TResult>,\n payload: TPayload,\n options?: OpenDialogOptions<TResult>,\n ): Promise<TResult>;\n}\n\nexport type CloseDialog = <TResult>(dialog: Promise<TResult>, result: TResult) => Promise<TResult>;\n\nexport interface AlertDialogPayload extends AlertOptions {\n message: ReactNode;\n}\n\nexport type AlertDialogProps = DialogProps<AlertDialogPayload, void>;\n\nexport function AlertDialog({ open, payload, onClose }: Readonly<AlertDialogProps>) {\n const { t } = useTranslation();\n\n return (\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose()} disableRestoreFocus>\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Alert\")}</DialogTitle>\n <DialogContent>{payload.message}</DialogContent>\n <DialogActions>\n <Button onClick={() => onClose()} autoFocus>\n {t(\"Layout.Dialog.Confirm\")}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\nexport interface ConfirmDialogPayload extends ConfirmOptions {\n message: ReactNode;\n}\n\nexport type ConfirmDialogProps = DialogProps<ConfirmDialogPayload, boolean>;\n\nexport function ConfirmDialog({ open, payload, onClose }: Readonly<ConfirmDialogProps>) {\n const { t } = useTranslation();\n\n return (\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose(false)} disableRestoreFocus>\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Confirm\")}</DialogTitle>\n <DialogContent>{payload.message}</DialogContent>\n <DialogActions>\n <Button onClick={() => onClose(false)}>\n {payload.cancelText ?? t(\"Layout.Dialog.Cancel\")}\n </Button>\n <Button onClick={() => onClose(true)} autoFocus>\n {t(\"Layout.Dialog.Confirm\")}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\ninterface DialogHook {\n alert: OpenAlertDialog;\n confirm: OpenConfirmDialog;\n open: OpenDialog;\n close: CloseDialog;\n}\n\nexport function useDialogs(): DialogHook {\n const { open, close } = useContext(DialogsContext);\n\n const alert = useEventCallback<OpenAlertDialog>((message, { ...options } = {}) =>\n open(AlertDialog, { ...options, message }),\n );\n\n const confirm = useEventCallback<OpenConfirmDialog>((message, { ...options } = {}) =>\n open(ConfirmDialog, { ...options, message }),\n );\n\n return { alert, confirm, open, close };\n}\n"],"mappings":";;;;;;;AA6DA,SAAOoC,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAD,EAAA,OAAA,oEAAA;EAAA,KAAA,IAAAE,KAAA,GAAAA,KAAA,IAAAA,MAAA,GAAAF,EAAAE,MAAAC,OAAAC,IAAA,2BAAA;EAAAJ,EAAA,KAAA;CAAA;CAAqB,MAAA,EAAAhB,MAAAF,SAAAT,YAAA0B;CAC1B,MAAA,EAAAM,MAAcpC,eAAe;CAAE,IAAAqC;CAAA,IAAAN,EAAA,OAAA3B,SAAA;EAGwBiC,WAAMjC,QAAQ;EAAC2B,EAAA,KAAA3B;EAAA2B,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAlB,QAAAJ,SAAAsB,EAAA,OAAAK,GAAA;EACpDE,KAAAzB,QAAOJ,SAAU2B,EAAE,qBAAqB;EAACL,EAAA,KAAAlB,QAAAJ;EAAAsB,EAAA,KAAAK;EAAAL,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAO,IAAA;EAAvDC,KAAA,oBAAC,aAAD,EAAA,UAAcD,GAAF,CAAA;EAA0DP,EAAA,KAAAO;EAAAP,EAAA,KAAA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oCuC,EAEpD;CAAE,IAAAC;CAAA,IAAAP,EAAA,OAAAsB,SAAAtB,EAAA,OAAAwB,SAAAxB,EAAA,OAAAuB,WAAAvB,EAAA,OAAAhB,MAAA;EAEKuB,KAAA;GAAAe;GAAAC;GAAAvC;GAAAwC;EAA8B;EAACxB,EAAA,KAAAsB;EAAAtB,EAAA,KAAAwB;EAAAxB,EAAA,KAAAuB;EAAAvB,EAAA,KAAAhB;EAAAgB,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAA/BO;AAA+B"}
@@ -1,4 +1,4 @@
1
- import { t as clientEnv } from "./env-Dgbk8SQN.js";
1
+ import { t as clientEnv } from "./env-ON-cyE3N.js";
2
2
  import { permissions, scopes } from "virtual:wcz-layout";
3
3
  import { BrowserAuthError, EventType, InteractionRequiredAuthError, NavigationClient, PublicClientApplication } from "@azure/msal-browser";
4
4
  import { createClientOnlyFn, createIsomorphicFn } from "@tanstack/react-start";
@@ -32,6 +32,7 @@ const initializeMsal = async () => {
32
32
  const initializationPromise = initializeMsal();
33
33
  await initializationPromise;
34
34
  var TanStackNavigationClient = class extends NavigationClient {
35
+ navigate;
35
36
  constructor(navigate) {
36
37
  super();
37
38
  this.navigate = navigate;
@@ -187,4 +188,4 @@ const buildUser = (payload) => ({
187
188
  //#endregion
188
189
  export { getFieldStatus as a, TanStackNavigationClient as c, pca as d, buildUser as i, getAccessToken as l, WISTRON_PRIMARY_COLOR as n, requirePermission as o, WISTRON_SECONDARY_COLOR as r, rootRouteHead as s, Platform as t, getUser as u };
189
190
 
190
- //# sourceMappingURL=utils-B7LPctqx.js.map
191
+ //# sourceMappingURL=utils-BMUmv2ws.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils-B7LPctqx.js","names":["AuthenticationResult","BrowserAuthError","EventMessage","EventType","InteractionRequiredAuthError","NavigationClient","NavigationOptions","PublicClientApplication","useNavigate","createClientOnlyFn","createIsomorphicFn","scopes","definedScopes","clientEnv","buildUser","decodeJwt","User","pca","auth","clientId","VITE_ENTRA_CLIENT_ID","authority","VITE_ENTRA_TENANT_ID","redirectUri","restoreActiveAccount","getActiveAccount","firstAccount","getAllAccounts","setActiveAccount","initializeMsal","globalThis","window","undefined","initialize","addEventCallback","event","eventType","LOGIN_SUCCESS","payload","account","response","handleRedirectPromise","initializationPromise","msalReady","TanStackNavigationClient","constructor","navigate","ReturnType","navigateInternal","url","options","relative","replace","location","origin","to","noHistory","getUser","server","client","Promise","idToken","getAccessToken","scopeKey","Error","accessToken","acquireTokenSilent","error","acquireTokenRedirect","redirectError","errorCode","AnyFieldApi","permissions","clientEnv","TokenPayload","User","getUser","WISTRON_PRIMARY_COLOR","WISTRON_SECONDARY_COLOR","Platform","isAndroid","test","userAgent","isIOS","isWindows","isMacOS","navigator","RootRouteHeadOptions","manifest","rootRouteHead","options","meta","charSet","name","content","title","VITE_APP_TITLE","links","rel","sizes","href","type","requirePermission","permissionKey","user","hasPermission","Error","FormOmittedProps","getFieldStatus","field","state","isTouched","hasError","errors","length","helperText","message","toKebabCase","str","replaceAll","toLowerCase","decodeJwt","token","base64Payload","split","base64","replace","payload","decodeURIComponent","atob","map","c","charCodeAt","toString","slice","join","JSON","parse","buildUser","id","sub","email","preferred_username","department","toUpperCase","employeeId","companyName","key","allowedGroups","some","k","groups","includes"],"sources":["../src/lib/auth/msalClient.ts","../src/lib/utils.ts"],"sourcesContent":["import {\n AuthenticationResult,\n BrowserAuthError,\n EventMessage,\n EventType,\n InteractionRequiredAuthError,\n NavigationClient,\n NavigationOptions,\n PublicClientApplication,\n} from \"@azure/msal-browser\";\nimport { useNavigate } from \"@tanstack/react-router\";\nimport { createClientOnlyFn, createIsomorphicFn } from \"@tanstack/react-start\";\nimport { scopes as definedScopes } from \"virtual:wcz-layout\";\nimport { clientEnv } from \"~/env\";\nimport { buildUser, decodeJwt } from \"~/lib/utils\";\nimport type { User } from \"~/models/User\";\n\nexport const pca = new PublicClientApplication({\n auth: {\n clientId: clientEnv.VITE_ENTRA_CLIENT_ID,\n authority: `https://login.microsoftonline.com/${clientEnv.VITE_ENTRA_TENANT_ID}`,\n redirectUri: \"/\",\n },\n});\n\nconst restoreActiveAccount = () => {\n if (pca.getActiveAccount()) return;\n const [firstAccount] = pca.getAllAccounts();\n if (firstAccount) pca.setActiveAccount(firstAccount);\n};\n\nconst initializeMsal = async () => {\n if (globalThis.window === undefined) return;\n\n await pca.initialize();\n\n pca.addEventCallback((event: EventMessage) => {\n if (event.eventType === EventType.LOGIN_SUCCESS && event.payload) {\n const payload = event.payload as AuthenticationResult;\n pca.setActiveAccount(payload.account);\n }\n });\n\n const response = await pca.handleRedirectPromise();\n if (response?.account) {\n pca.setActiveAccount(response.account);\n return;\n }\n\n restoreActiveAccount();\n};\n\nconst initializationPromise = initializeMsal();\nawait initializationPromise;\n\nexport const msalReady = () => initializationPromise;\n\nexport class TanStackNavigationClient extends NavigationClient {\n constructor(private readonly navigate: ReturnType<typeof useNavigate>) {\n super();\n }\n async navigateInternal(url: string, options: NavigationOptions) {\n const relative = url.replace(location.origin, \"\");\n this.navigate({ to: relative, replace: options.noHistory });\n return false;\n }\n}\n\nexport const getUser = createIsomorphicFn()\n .server(() => null)\n .client(async (): Promise<User | null> => {\n await initializationPromise;\n restoreActiveAccount();\n\n const account = pca.getActiveAccount();\n if (!account?.idToken) return null;\n\n return buildUser(decodeJwt(account.idToken));\n });\n\n/**\n * Token Acquisition: Get authenticated access token.\n * Use when: Making API calls from the browser to secured endpoints.\n */\nexport const getAccessToken = createClientOnlyFn(async (scopeKey: keyof typeof definedScopes) => {\n await initializationPromise;\n restoreActiveAccount();\n\n const account = pca.getActiveAccount();\n if (!account) throw new Error(\"No active account. User not signed in.\");\n\n const scopes = [...definedScopes[scopeKey]];\n\n try {\n const { accessToken } = await pca.acquireTokenSilent({ scopes, account });\n return accessToken;\n } catch (error) {\n if (error instanceof InteractionRequiredAuthError) {\n try {\n await pca.acquireTokenRedirect({ scopes, account });\n } catch (redirectError) {\n // Another interaction is already in progress — MSAL will handle it.\n if (\n !(redirectError instanceof BrowserAuthError) ||\n redirectError.errorCode !== \"interaction_in_progress\"\n ) {\n throw redirectError;\n }\n }\n\n // Keep the caller suspended until the page navigates away so pending\n // server functions don't fire without an Authorization header.\n await new Promise<never>(() => {});\n }\n\n throw error;\n }\n});\n","import type { AnyFieldApi } from \"@tanstack/react-form\";\nimport { permissions } from \"virtual:wcz-layout\";\nimport { clientEnv } from \"~/env\";\nimport type { TokenPayload } from \"~/models/TokenPayload\";\nimport type { User } from \"~/models/User\";\nimport { getUser } from \"./auth/msalClient\";\n\nexport const WISTRON_PRIMARY_COLOR = \"#00506E\";\nexport const WISTRON_SECONDARY_COLOR = \"#64DC00\";\n\nexport class Platform {\n static get isAndroid() {\n return /android/i.test(this.userAgent);\n }\n static get isIOS() {\n return /iPad|iPhone|iPod/.test(this.userAgent);\n }\n static get isWindows() {\n return /windows/i.test(this.userAgent);\n }\n static get isMacOS() {\n return /Macintosh|MacIntel|MacPPC|Mac68K/.test(this.userAgent);\n }\n\n private static get userAgent() {\n return typeof navigator === \"undefined\" ? \"\" : navigator.userAgent;\n }\n}\n\ninterface RootRouteHeadOptions {\n manifest?: string;\n}\n\nexport const rootRouteHead = (options?: RootRouteHeadOptions) => ({\n meta: [\n { charSet: \"utf-8\" },\n { name: \"viewport\", content: \"width=device-width, initial-scale=1\" },\n { title: clientEnv.VITE_APP_TITLE },\n { name: \"og:type\", content: \"website\" },\n { name: \"og:title\", content: clientEnv.VITE_APP_TITLE },\n { name: \"og:image\", content: \"/favicon-32x32.png\" },\n ],\n links: [\n { rel: \"apple-touch-icon\", sizes: \"180x180\", href: \"/apple-touch-icon.png\" },\n { rel: \"icon\", type: \"image/png\", sizes: \"32x32\", href: \"/favicon-32x32.png\" },\n { rel: \"icon\", type: \"image/png\", sizes: \"16x16\", href: \"/favicon-16x16.png\" },\n { rel: \"manifest\", href: options?.manifest || \"/manifest.json\" },\n { rel: \"icon\", href: \"/favicon.ico\" },\n ],\n});\n\nexport const requirePermission = (permissionKey: keyof typeof permissions) => {\n return async () => {\n const user = await getUser();\n\n if (!user?.hasPermission(permissionKey))\n throw new Error(\"You do not have permission to access this page.\");\n\n return { user };\n };\n};\n\n/* Internal Utils */\nexport type FormOmittedProps =\n | \"name\"\n | \"value\"\n | \"onChange\"\n | \"onBlur\"\n | \"error\"\n | \"helperText\"\n | \"renderInput\"\n | \"type\"\n | \"aria-label\";\n\nexport const getFieldStatus = (field: AnyFieldApi) => {\n const { meta } = field.state;\n\n const isTouched = meta.isTouched;\n const hasError = !!meta.errors.length;\n const helperText = meta.errors[0]?.message;\n\n return { isTouched, hasError, helperText };\n};\n\nexport const toKebabCase = (str: string): string => {\n return str\n .replaceAll(/([a-z])([A-Z])/g, \"$1-$2\")\n .replaceAll(/[\\s_]+/g, \"-\")\n .replaceAll(/[^a-zA-Z0-9-]/g, \"\")\n .toLowerCase()\n .replaceAll(/-+/g, \"-\")\n .replaceAll(/(^-|-$)/g, \"\");\n};\n\nexport const decodeJwt = (token: string) => {\n const base64Payload = token.split(\".\")[1];\n const base64 = base64Payload.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const payload = decodeURIComponent(\n atob(base64)\n .split(\"\")\n .map((c) => \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2))\n .join(\"\"),\n );\n return JSON.parse(payload) as TokenPayload;\n};\n\nexport const buildUser = (payload: TokenPayload): User => ({\n id: payload.sub,\n name: payload.name?.split(\"/\")[0],\n email: payload.preferred_username?.toLowerCase(),\n department: payload.department?.toUpperCase() || \"\",\n employeeId: payload.employeeId?.toUpperCase() || \"\",\n companyName: payload.companyName || \"\",\n hasPermission: (key: keyof typeof permissions) => {\n const allowedGroups = permissions[key];\n return allowedGroups.some((k) => (payload.groups ?? []).includes(k));\n },\n});\n"],"mappings":";;;;;AAiBA,MAAaiB,MAAM,IAAIV,wBAAwB,EAC7CW,MAAM;CACJC,UAAUN,UAAUO;CACpBC,WAAW,qCAAqCR,UAAUS;C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ACpCzC,gBAAgB0C,QAAkC;EAEhD,OADsB3E,YAAY2E,KACbE,MAAMC,OAAOvB,QAAQwB,UAAU,EAAE,EAAEC,SAASF,EAAE,CAAC;;CAEvE"}
1
+ {"version":3,"file":"utils-BMUmv2ws.js","names":["AuthenticationResult","BrowserAuthError","EventMessage","EventType","InteractionRequiredAuthError","NavigationClient","NavigationOptions","PublicClientApplication","useNavigate","createClientOnlyFn","createIsomorphicFn","scopes","definedScopes","clientEnv","buildUser","decodeJwt","User","pca","auth","clientId","VITE_ENTRA_CLIENT_ID","authority","VITE_ENTRA_TENANT_ID","redirectUri","restoreActiveAccount","getActiveAccount","firstAccount","getAllAccounts","setActiveAccount","initializeMsal","globalThis","window","undefined","initialize","addEventCallback","event","eventType","LOGIN_SUCCESS","payload","account","response","handleRedirectPromise","initializationPromise","msalReady","TanStackNavigationClient","constructor","navigate","ReturnType","navigateInternal","url","options","relative","replace","location","origin","to","noHistory","getUser","server","client","Promise","idToken","getAccessToken","scopeKey","Error","accessToken","acquireTokenSilent","error","acquireTokenRedirect","redirectError","errorCode","AnyFieldApi","permissions","clientEnv","TokenPayload","User","getUser","WISTRON_PRIMARY_COLOR","WISTRON_SECONDARY_COLOR","Platform","isAndroid","test","userAgent","isIOS","isWindows","isMacOS","navigator","RootRouteHeadOptions","manifest","rootRouteHead","options","meta","charSet","name","content","title","VITE_APP_TITLE","links","rel","sizes","href","type","requirePermission","permissionKey","user","hasPermission","Error","FormOmittedProps","getFieldStatus","field","state","isTouched","hasError","errors","length","helperText","message","toKebabCase","str","replaceAll","toLowerCase","decodeJwt","token","base64Payload","split","base64","replace","payload","decodeURIComponent","atob","map","c","charCodeAt","toString","slice","join","JSON","parse","buildUser","id","sub","email","preferred_username","department","toUpperCase","employeeId","companyName","key","allowedGroups","some","k","groups","includes"],"sources":["../src/lib/auth/msalClient.ts","../src/lib/utils.ts"],"sourcesContent":["import {\n AuthenticationResult,\n BrowserAuthError,\n EventMessage,\n EventType,\n InteractionRequiredAuthError,\n NavigationClient,\n NavigationOptions,\n PublicClientApplication,\n} from \"@azure/msal-browser\";\nimport { useNavigate } from \"@tanstack/react-router\";\nimport { createClientOnlyFn, createIsomorphicFn } from \"@tanstack/react-start\";\nimport { scopes as definedScopes } from \"virtual:wcz-layout\";\nimport { clientEnv } from \"~/env\";\nimport { buildUser, decodeJwt } from \"~/lib/utils\";\nimport type { User } from \"~/models/User\";\n\nexport const pca = new PublicClientApplication({\n auth: {\n clientId: clientEnv.VITE_ENTRA_CLIENT_ID,\n authority: `https://login.microsoftonline.com/${clientEnv.VITE_ENTRA_TENANT_ID}`,\n redirectUri: \"/\",\n },\n});\n\nconst restoreActiveAccount = () => {\n if (pca.getActiveAccount()) return;\n const [firstAccount] = pca.getAllAccounts();\n if (firstAccount) pca.setActiveAccount(firstAccount);\n};\n\nconst initializeMsal = async () => {\n if (globalThis.window === undefined) return;\n\n await pca.initialize();\n\n pca.addEventCallback((event: EventMessage) => {\n if (event.eventType === EventType.LOGIN_SUCCESS && event.payload) {\n const payload = event.payload as AuthenticationResult;\n pca.setActiveAccount(payload.account);\n }\n });\n\n const response = await pca.handleRedirectPromise();\n if (response?.account) {\n pca.setActiveAccount(response.account);\n return;\n }\n\n restoreActiveAccount();\n};\n\nconst initializationPromise = initializeMsal();\nawait initializationPromise;\n\nexport const msalReady = () => initializationPromise;\n\nexport class TanStackNavigationClient extends NavigationClient {\n constructor(private readonly navigate: ReturnType<typeof useNavigate>) {\n super();\n }\n async navigateInternal(url: string, options: NavigationOptions) {\n const relative = url.replace(location.origin, \"\");\n this.navigate({ to: relative, replace: options.noHistory });\n return false;\n }\n}\n\nexport const getUser = createIsomorphicFn()\n .server(() => null)\n .client(async (): Promise<User | null> => {\n await initializationPromise;\n restoreActiveAccount();\n\n const account = pca.getActiveAccount();\n if (!account?.idToken) return null;\n\n return buildUser(decodeJwt(account.idToken));\n });\n\n/**\n * Token Acquisition: Get authenticated access token.\n * Use when: Making API calls from the browser to secured endpoints.\n */\nexport const getAccessToken = createClientOnlyFn(async (scopeKey: keyof typeof definedScopes) => {\n await initializationPromise;\n restoreActiveAccount();\n\n const account = pca.getActiveAccount();\n if (!account) throw new Error(\"No active account. User not signed in.\");\n\n const scopes = [...definedScopes[scopeKey]];\n\n try {\n const { accessToken } = await pca.acquireTokenSilent({ scopes, account });\n return accessToken;\n } catch (error) {\n if (error instanceof InteractionRequiredAuthError) {\n try {\n await pca.acquireTokenRedirect({ scopes, account });\n } catch (redirectError) {\n // Another interaction is already in progress — MSAL will handle it.\n if (\n !(redirectError instanceof BrowserAuthError) ||\n redirectError.errorCode !== \"interaction_in_progress\"\n ) {\n throw redirectError;\n }\n }\n\n // Keep the caller suspended until the page navigates away so pending\n // server functions don't fire without an Authorization header.\n await new Promise<never>(() => {});\n }\n\n throw error;\n }\n});\n","import type { AnyFieldApi } from \"@tanstack/react-form\";\nimport { permissions } from \"virtual:wcz-layout\";\nimport { clientEnv } from \"~/env\";\nimport type { TokenPayload } from \"~/models/TokenPayload\";\nimport type { User } from \"~/models/User\";\nimport { getUser } from \"./auth/msalClient\";\n\nexport const WISTRON_PRIMARY_COLOR = \"#00506E\";\nexport const WISTRON_SECONDARY_COLOR = \"#64DC00\";\n\nexport class Platform {\n static get isAndroid() {\n return /android/i.test(this.userAgent);\n }\n static get isIOS() {\n return /iPad|iPhone|iPod/.test(this.userAgent);\n }\n static get isWindows() {\n return /windows/i.test(this.userAgent);\n }\n static get isMacOS() {\n return /Macintosh|MacIntel|MacPPC|Mac68K/.test(this.userAgent);\n }\n\n private static get userAgent() {\n return typeof navigator === \"undefined\" ? \"\" : navigator.userAgent;\n }\n}\n\ninterface RootRouteHeadOptions {\n manifest?: string;\n}\n\nexport const rootRouteHead = (options?: RootRouteHeadOptions) => ({\n meta: [\n { charSet: \"utf-8\" },\n { name: \"viewport\", content: \"width=device-width, initial-scale=1\" },\n { title: clientEnv.VITE_APP_TITLE },\n { name: \"og:type\", content: \"website\" },\n { name: \"og:title\", content: clientEnv.VITE_APP_TITLE },\n { name: \"og:image\", content: \"/favicon-32x32.png\" },\n ],\n links: [\n { rel: \"apple-touch-icon\", sizes: \"180x180\", href: \"/apple-touch-icon.png\" },\n { rel: \"icon\", type: \"image/png\", sizes: \"32x32\", href: \"/favicon-32x32.png\" },\n { rel: \"icon\", type: \"image/png\", sizes: \"16x16\", href: \"/favicon-16x16.png\" },\n { rel: \"manifest\", href: options?.manifest || \"/manifest.json\" },\n { rel: \"icon\", href: \"/favicon.ico\" },\n ],\n});\n\nexport const requirePermission = (permissionKey: keyof typeof permissions) => {\n return async () => {\n const user = await getUser();\n\n if (!user?.hasPermission(permissionKey))\n throw new Error(\"You do not have permission to access this page.\");\n\n return { user };\n };\n};\n\n/* Internal Utils */\nexport type FormOmittedProps =\n | \"name\"\n | \"value\"\n | \"onChange\"\n | \"onBlur\"\n | \"error\"\n | \"helperText\"\n | \"renderInput\"\n | \"type\"\n | \"aria-label\";\n\nexport const getFieldStatus = (field: AnyFieldApi) => {\n const { meta } = field.state;\n\n const isTouched = meta.isTouched;\n const hasError = !!meta.errors.length;\n const helperText = meta.errors[0]?.message;\n\n return { isTouched, hasError, helperText };\n};\n\nexport const toKebabCase = (str: string): string => {\n return str\n .replaceAll(/([a-z])([A-Z])/g, \"$1-$2\")\n .replaceAll(/[\\s_]+/g, \"-\")\n .replaceAll(/[^a-zA-Z0-9-]/g, \"\")\n .toLowerCase()\n .replaceAll(/-+/g, \"-\")\n .replaceAll(/(^-|-$)/g, \"\");\n};\n\nexport const decodeJwt = (token: string) => {\n const base64Payload = token.split(\".\")[1];\n const base64 = base64Payload.replace(/-/g, \"+\").replace(/_/g, \"/\");\n const payload = decodeURIComponent(\n atob(base64)\n .split(\"\")\n .map((c) => \"%\" + (\"00\" + c.charCodeAt(0).toString(16)).slice(-2))\n .join(\"\"),\n );\n return JSON.parse(payload) as TokenPayload;\n};\n\nexport const buildUser = (payload: TokenPayload): User => ({\n id: payload.sub,\n name: payload.name?.split(\"/\")[0],\n email: payload.preferred_username?.toLowerCase(),\n department: payload.department?.toUpperCase() || \"\",\n employeeId: payload.employeeId?.toUpperCase() || \"\",\n companyName: payload.companyName || \"\",\n hasPermission: (key: keyof typeof permissions) => {\n const allowedGroups = permissions[key];\n return allowedGroups.some((k) => (payload.groups ?? []).includes(k));\n },\n});\n"],"mappings":";;;;;AAiBA,MAAaiB,MAAM,IAAIV,wBAAwB,EAC7CW,MAAM;CACJC,UAAUN,UAAUO;CACpBC,WAAW,qCAAqCR,UAAUS;CAC1DC,aAAa;AACf,EACF,CAAC;AAED,MAAMC,6BAA6B;CACjC,IAAIP,IAAIQ,iBAAiB,GAAG;CAC5B,MAAM,CAACC,gBAAgBT,IAAIU,eAAe;CAC1C,IAAID,cAAcT,IAAIW,iBAAiBF,YAAY;AACrD;AAEA,MAAMG,iBAAiB,YAAY;CACjC,IAAIC,WAAWC,WAAWC,KAAAA,GAAW;CAErC,MAAMf,IAAIgB,WAAW;CAErBhB,IAAIiB,kBAAkBC,UAAwB;EAC5C,IAAIA,MAAMC,cAAcjC,UAAUkC,iBAAiBF,MAAMG,SAAS;GAChE,MAAMA,UAAUH,MAAMG;GACtBrB,IAAIW,iBAAiBU,QAAQC,OAAO;EACtC;CACF,CAAC;CAED,MAAMC,WAAW,MAAMvB,IAAIwB,sBAAsB;CACjD,IAAID,UAAUD,SAAS;EACrBtB,IAAIW,iBAAiBY,SAASD,OAAO;EACrC;CACF;CAEAf,qBAAqB;AACvB;AAEA,MAAMkB,wBAAwBb,eAAe;AAC7C,MAAMa;AAIN,IAAaE,2BAAb,cAA8CvC,iBAAiB;CAChCyC;CAA7BD,YAAY,UAA2D;EACrE,MAAM;EADqBC,KAAAA,WAAAA;CAE7B;CACA,MAAME,iBAAiBC,KAAaC,SAA4B;EAC9D,MAAMC,WAAWF,IAAIG,QAAQC,SAASC,QAAQ,EAAE;EAChD,KAAKR,SAAS;GAAES,IAAIJ;GAAUC,SAASF,QAAQM;EAAU,CAAC;EAC1D,OAAO;CACT;AACF;A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AAKC,MAAM,OAAO,OAAOA,EAAEC,WAAW,CAAC,EAAEC,SAAS,EAAE,GAAGC,MAAM,EAAE,CAAC,EAChEC,KAAK,EAAE,CACZ;CACA,OAAOC,KAAKC,MAAMV,OAAO;AAC3B;AAEA,MAAaW,aAAaX,aAAiC;CACzDY,IAAIZ,QAAQa;CACZ/C,MAAMkC,QAAQlC,MAAM+B,MAAM,GAAG,EAAE;CAC/BiB,OAAOd,QAAQe,oBAAoBtB,YAAY;CAC/CuB,YAAYhB,QAAQgB,YAAYC,YAAY,KAAK;CACjDC,YAAYlB,QAAQkB,YAAYD,YAAY,KAAK;CACjDE,aAAanB,QAAQmB,eAAe;CACpCzC,gBAAgB0C,QAAkC;EAEhD,OADsB3E,YAAY2E,KACbE,MAAMC,OAAOvB,QAAQwB,UAAU,CAAA,GAAIC,SAASF,CAAC,CAAC;CACrE;AACF"}
@@ -1,4 +1,4 @@
1
- import { t as User } from "./User-DVU1zqml.js";
1
+ import { t as User } from "./User-CT_IDGuG.js";
2
2
  import { permissions } from "virtual:wcz-layout";
3
3
  //#region src/lib/utils.d.ts
4
4
  declare const WISTRON_PRIMARY_COLOR = "#00506E";
@@ -53,4 +53,4 @@ declare const requirePermission: (permissionKey: keyof typeof permissions) => ()
53
53
  type FormOmittedProps = "name" | "value" | "onChange" | "onBlur" | "error" | "helperText" | "renderInput" | "type" | "aria-label";
54
54
  //#endregion
55
55
  export { requirePermission as a, WISTRON_SECONDARY_COLOR as i, Platform as n, rootRouteHead as o, WISTRON_PRIMARY_COLOR as r, FormOmittedProps as t };
56
- //# sourceMappingURL=utils-DgrP27XP.d.ts.map
56
+ //# sourceMappingURL=utils-CvvyM8Xw.d.ts.map
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as requirePermission, n as Platform } from "./utils-DgrP27XP.js";
2
- import { t as getAccessToken } from "./msalClient-C2LlaBzj.js";
1
+ import { a as requirePermission, n as Platform } from "./utils-CvvyM8Xw.js";
2
+ import { t as getAccessToken } from "./msalClient-CYiQAFnY.js";
3
3
  import i18next, { t } from "i18next";
4
4
  import { scopes } from "virtual:wcz-layout";
5
5
  import { createEnv } from "@t3-oss/env-core";
package/dist/utils.js CHANGED
@@ -1,5 +1,5 @@
1
- import { l as getAccessToken, o as requirePermission, t as Platform } from "./utils-B7LPctqx.js";
2
- import { n as getTokenOnBehalfOf, t as getAppToken } from "./msalServer-B3AztUoH.js";
1
+ import { l as getAccessToken, o as requirePermission, t as Platform } from "./utils-BMUmv2ws.js";
2
+ import { n as getTokenOnBehalfOf, t as getAppToken } from "./msalServer-B9sVqpQ2.js";
3
3
  import i18next, { t } from "i18next";
4
4
  import { createEnv } from "@t3-oss/env-core";
5
5
  import { uuidv7 } from "uuidv7";
package/dist/vite.js CHANGED
@@ -71,7 +71,7 @@ function ensureScopesFile(scopesPath, addWatchFile) {
71
71
  }
72
72
  function viteWczLayout() {
73
73
  const virtualModuleId = "virtual:wcz-layout";
74
- const resolvedVirtualModuleId = "\0" + virtualModuleId;
74
+ const resolvedVirtualModuleId = "\0virtual:wcz-layout";
75
75
  let localesPath;
76
76
  let permissionsPath;
77
77
  let scopesPath;
package/dist/vite.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"vite.js","names":["z","VaultConfigSchema","object","VAULT_ADDRESS","url","VAULT_USERNAME","string","min","VAULT_PASSWORD","VAULT_SECRET_PATH","VAULT_MOUNT_POINT","default","VaultConfig","infer","fs","https","path","axios","loadEnv","VaultConfigSchema","Resource","Plugin","fetchVaultSecrets","env","Record","Promise","config","parse","VAULT_ADDRESS","VAULT_USERNAME","VAULT_PASSWORD","VAULT_SECRET_PATH","VAULT_MOUNT_POINT","client","create","baseURL","httpsAgent","Agent","rejectUnauthorized","data","loginData","post","password","secretData","get","headers","auth","client_token","secrets","Error","Object","fromEntries","entries","map","key","value","JSON","stringify","loadVaultSecrets","command","process","cwd","forEach","e","console","warn","message","loadLocaleResources","localesPath","addWatchFile","existsSync","mkdirSync","recursive","enPath","join","writeFileSync","files","readdirSync","resources","file","filter","f","endsWith","lang","basename","filePath","translation","readFileSync","ensurePermissionsFile","permissionsPath","dir","dirname","ensureScopesFile","scopesPath","viteWczLayout","virtualModuleId","resolvedVirtualModuleId","envPath","name","enforce","configResolved","resolvedConfig","resolve","root","_","optimizeDeps","exclude","include","configureServer","server","refresh","includes","module","moduleGraph","getModuleById","invalidateModule","ws","send","type","watcher","add","on","resolveId","id","load","bind","normalizedPermissionsPath","split","sep","posix","normalizedScopesPath","normalizedEnvPath"],"sources":["../src/models/VaultConfig.ts","../src/lib/vite-plugin.ts"],"sourcesContent":["import z from \"zod\";\n\nexport const VaultConfigSchema = z.object({\n VAULT_ADDRESS: z.url(),\n VAULT_USERNAME: z.string().min(1),\n VAULT_PASSWORD: z.string().min(1),\n VAULT_SECRET_PATH: z.string().min(1),\n VAULT_MOUNT_POINT: z.string().default(\"release\"),\n});\n\nexport type VaultConfig = z.infer<typeof VaultConfigSchema>;\n","import fs from \"node:fs\";\nimport https from \"node:https\";\nimport path from \"node:path\";\nimport axios from \"axios\";\nimport { loadEnv } from \"vite\";\nimport { VaultConfigSchema } from \"../models/VaultConfig\";\nimport type { Resource } from \"i18next\";\nimport type { Plugin } from \"vite\";\n\nasync function fetchVaultSecrets(env: Record<string, string>): Promise<Record<string, string>> {\n const config = VaultConfigSchema.parse(env);\n const { VAULT_ADDRESS, VAULT_USERNAME, VAULT_PASSWORD, VAULT_SECRET_PATH, VAULT_MOUNT_POINT } =\n config;\n\n const client = axios.create({\n baseURL: VAULT_ADDRESS,\n httpsAgent: new https.Agent({ rejectUnauthorized: false }),\n });\n\n const { data: loginData } = await client.post(`/v1/auth/userpass/login/${VAULT_USERNAME}`, {\n password: VAULT_PASSWORD,\n });\n\n const { data: secretData } = await client.get(\n `/v1/${VAULT_MOUNT_POINT}/data/${VAULT_SECRET_PATH}`,\n {\n headers: { \"X-Vault-Token\": loginData.auth.client_token },\n },\n );\n\n const secrets = secretData?.data?.data;\n if (!secrets) throw new Error(\"No secrets found\");\n\n return Object.fromEntries(\n Object.entries(secrets).map(([key, value]) => [\n key,\n typeof value === \"string\" ? value : JSON.stringify(value),\n ]),\n );\n}\n\nasync function loadVaultSecrets(command: string): Promise<void> {\n if (command !== \"serve\") return;\n\n const env = loadEnv(\"development\", process.cwd(), \"\");\n if (!env.VAULT_ADDRESS) return;\n\n try {\n const secrets = await fetchVaultSecrets(env);\n Object.entries(secrets).forEach(([key, value]) => {\n process.env[key] ??= value;\n });\n } catch (e) {\n console.warn(\"[vite:wcz-layout] Vault failed:\", e instanceof Error ? e.message : e);\n }\n}\n\nfunction loadLocaleResources(localesPath: string, addWatchFile: (path: string) => void): Resource {\n if (!fs.existsSync(localesPath)) fs.mkdirSync(localesPath, { recursive: true });\n\n const enPath = path.join(localesPath, \"en.json\");\n if (!fs.existsSync(enPath)) fs.writeFileSync(enPath, JSON.stringify({}));\n\n const files = fs.readdirSync(localesPath);\n const resources: Resource = {};\n\n for (const file of files.filter((f) => f.endsWith(\".json\"))) {\n const lang = path.basename(file, \".json\");\n const filePath = path.join(localesPath, file);\n try {\n resources[lang] = { translation: JSON.parse(fs.readFileSync(filePath, \"utf-8\")) };\n } catch {\n resources[lang] = { translation: {} };\n }\n addWatchFile(filePath);\n }\n\n return resources;\n}\n\nfunction ensurePermissionsFile(\n permissionsPath: string,\n addWatchFile: (path: string) => void,\n): void {\n const dir = path.dirname(permissionsPath);\n if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });\n if (!fs.existsSync(permissionsPath)) {\n fs.writeFileSync(\n permissionsPath,\n 'export const permissions = {\\n admin: [\"wcz-developers\"]\\n} as const;',\n );\n }\n addWatchFile(permissionsPath);\n}\n\nfunction ensureScopesFile(scopesPath: string, addWatchFile: (path: string) => void): void {\n const dir = path.dirname(scopesPath);\n if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });\n if (!fs.existsSync(scopesPath)) {\n fs.writeFileSync(scopesPath, \"export const scopes = {\\n} as const;\");\n }\n addWatchFile(scopesPath);\n}\n\nexport function viteWczLayout(): Plugin {\n const virtualModuleId = \"virtual:wcz-layout\";\n const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\n\n let localesPath: string;\n let permissionsPath: string;\n let scopesPath: string;\n let envPath: string;\n\n return {\n name: \"vite:wcz-layout\",\n enforce: \"pre\",\n configResolved(resolvedConfig) {\n localesPath = path.resolve(resolvedConfig.root, \"src/lib/locales\");\n permissionsPath = path.resolve(resolvedConfig.root, \"src/lib/auth/permissions.ts\");\n scopesPath = path.resolve(resolvedConfig.root, \"src/lib/auth/scopes.ts\");\n envPath = path.resolve(resolvedConfig.root, \"src/env.ts\");\n },\n async config(_, { command }) {\n await loadVaultSecrets(command);\n\n return {\n optimizeDeps: {\n exclude: [virtualModuleId],\n include: [\n \"prop-types\",\n \"react-is\",\n \"hoist-non-react-statics\",\n \"url-parse\",\n \"file-saver\",\n \"attr-accept\",\n ],\n },\n };\n },\n configureServer(server) {\n const refresh = (filePath: string) => {\n if (\n filePath.includes(localesPath) ||\n filePath === permissionsPath ||\n filePath === scopesPath ||\n filePath === envPath\n ) {\n const module = server.moduleGraph.getModuleById(resolvedVirtualModuleId);\n if (module) server.moduleGraph.invalidateModule(module);\n server.ws.send({ type: \"full-reload\", path: \"*\" });\n }\n };\n\n server.watcher.add([localesPath, permissionsPath, scopesPath, envPath]);\n server.watcher.on(\"add\", refresh);\n server.watcher.on(\"change\", refresh);\n server.watcher.on(\"unlink\", refresh);\n },\n resolveId(id) {\n if (id === virtualModuleId) return resolvedVirtualModuleId;\n return null;\n },\n load(id) {\n if (id !== resolvedVirtualModuleId) return null;\n\n const resources = loadLocaleResources(localesPath, this.addWatchFile.bind(this));\n ensurePermissionsFile(permissionsPath, this.addWatchFile.bind(this));\n ensureScopesFile(scopesPath, this.addWatchFile.bind(this));\n\n const normalizedPermissionsPath = permissionsPath.split(path.sep).join(path.posix.sep);\n const normalizedScopesPath = scopesPath.split(path.sep).join(path.posix.sep);\n const normalizedEnvPath = envPath.split(path.sep).join(path.posix.sep);\n return `\n export const resources = ${JSON.stringify(resources)};\n export { permissions } from \"${normalizedPermissionsPath}\";\n export { scopes } from \"${normalizedScopesPath}\";\n export { serverEnv } from \"${normalizedEnvPath}\";\n `;\n },\n };\n}\n"],"mappings":";;;;;;;AAEA,MAAaC,oBAAoBD,IAAEE,OAAO;CACxCC,eAAeH,IAAEI,KAAK;CACtBC,gBAAgBL,IAAEM,QAAQ,CAACC,IAAI,EAAE;CACjCC,gBAAgBR,IAAEM,QAAQ,CAACC,IAAI,EAAE;CACjCE,mBAAmBT,IAAEM,QAAQ,CAACC,IAAI,EAAE;CACpCG,mBAAmBV,IAAEM,QAAQ,CAACK,QAAQ,UAAS;CAChD,CAAC;;;ACCF,eAAeW,kBAAkBC,KAA8D;CAE7F,MAAM,EAAEK,eAAeC,gBAAgBC,gBAAgBC,mBAAmBC,sBAD3Db,kBAAkBQ,MAAMJ,IAE/B;CAER,MAAMU,SAAShB,MAAMiB,OAAO;EAC1BC,SAASP;EACTQ,YAAY,IAAIrB,MAAMsB,MAAM,EAAEC,oBAAoB,OAAO,CAAA;EAC1D,CAAC;CAEF,MAAM,EAAEC,MAAMC,cAAc,MAAMP,OAAOQ,KAAK,2BAA2BZ,kBAAkB,EACzFa,UAAUZ,gBACX,CAAC;CAEF,MAAM,EAAES,MAAMI,eAAe,MAAMV,OAAOW,IACxC,OAAOZ,kBAAiB,QAASD,qBACjC,EACEc,SAAS,EAAE,iBAAiBL,UAAUM,KAAKC,cAAa,EAE5D,CAAC;CAED,MAAMC,UAAUL,YAAYJ,MAAMA;CAClC,IAAI,CAACS,SAAS,MAAM,IAAIC,MAAM,mBAAmB;CAEjD,OAAOC,OAAOC,YACZD,OAAOE,QAAQJ,QAAQ,CAACK,KAAK,CAACC,KAAKC,WAAW,CAC5CD,KACA,OAAOC,UAAU,WAAWA,QAAQC,KAAKC,UAAUF,MAAM,CAC1D,CACH,CAAC;;AAGH,eAAeG,iBAA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AwB;KACxE,IAAIgB,QAAQH,OAAOI,YAAYE,iBAAiBH,OAAO;KACvDH,OAAOO,GAAGC,KAAK;MAAEC,MAAM;MAAetG,MAAM;MAAK,CAAC;;;GAItD6F,OAAOU,QAAQC,IAAI;IAACpD;IAAaqB;IAAiBI;IAAYI;IAAQ,CAAC;GACvEY,OAAOU,QAAQE,GAAG,OAAOX,QAAQ;GACjCD,OAAOU,QAAQE,GAAG,UAAUX,QAAQ;GACpCD,OAAOU,QAAQE,GAAG,UAAUX,QAAQ;;EAEtCY,UAAUC,IAAI;GACZ,IAAIA,OAAO5B,iBAAiB,OAAOC;GACnC,OAAO;;EAET4B,KAAKD,IAAI;GACP,IAAIA,OAAO3B,yBAAyB,OAAO;GAE3C,MAAMlB,YAAYX,oBAAoBC,aAAa,KAAKC,aAAawD,KAAK,KAAK,CAAC;GAChFrC,sBAAsBC,iBAAiB,KAAKpB,aAAawD,KAAK,KAAK,CAAC;GACpEjC,iBAAiBC,YAAY,KAAKxB,aAAawD,KAAK,KAAK,CAAC;GAE1D,MAAMC,4BAA4BrC,gBAAgBsC,MAAM/G,KAAKgH,IAAI,CAACtD,KAAK1D,KAAKiH,MAAMD,IAAI;GACtF,MAAME,uBAAuBrC,WAAWkC,MAAM/G,KAAKgH,IAAI,CAACtD,KAAK1D,KAAKiH,MAAMD,IAAI;GAC5E,MAAMG,oBAAoBlC,QAAQ8B,MAAM/G,KAAKgH,IAAI,CAACtD,KAAK1D,KAAKiH,MAAMD,IAAI;GACtE,OAAO;uCAC0BxE,KAAKC,UAAUqB,UAAU,CAAA;2CACrBgD,0BAAyB;sCAC9BI,qBAAoB;yCACjBC,kBAAiB;;;EAGvD"}
1
+ {"version":3,"file":"vite.js","names":["z","VaultConfigSchema","object","VAULT_ADDRESS","url","VAULT_USERNAME","string","min","VAULT_PASSWORD","VAULT_SECRET_PATH","VAULT_MOUNT_POINT","default","VaultConfig","infer","fs","https","path","axios","loadEnv","VaultConfigSchema","Resource","Plugin","fetchVaultSecrets","env","Record","Promise","config","parse","VAULT_ADDRESS","VAULT_USERNAME","VAULT_PASSWORD","VAULT_SECRET_PATH","VAULT_MOUNT_POINT","client","create","baseURL","httpsAgent","Agent","rejectUnauthorized","data","loginData","post","password","secretData","get","headers","auth","client_token","secrets","Error","Object","fromEntries","entries","map","key","value","JSON","stringify","loadVaultSecrets","command","process","cwd","forEach","e","console","warn","message","loadLocaleResources","localesPath","addWatchFile","existsSync","mkdirSync","recursive","enPath","join","writeFileSync","files","readdirSync","resources","file","filter","f","endsWith","lang","basename","filePath","translation","readFileSync","ensurePermissionsFile","permissionsPath","dir","dirname","ensureScopesFile","scopesPath","viteWczLayout","virtualModuleId","resolvedVirtualModuleId","envPath","name","enforce","configResolved","resolvedConfig","resolve","root","_","optimizeDeps","exclude","include","configureServer","server","refresh","includes","module","moduleGraph","getModuleById","invalidateModule","ws","send","type","watcher","add","on","resolveId","id","load","bind","normalizedPermissionsPath","split","sep","posix","normalizedScopesPath","normalizedEnvPath"],"sources":["../src/models/VaultConfig.ts","../src/lib/vite-plugin.ts"],"sourcesContent":["import z from \"zod\";\n\nexport const VaultConfigSchema = z.object({\n VAULT_ADDRESS: z.url(),\n VAULT_USERNAME: z.string().min(1),\n VAULT_PASSWORD: z.string().min(1),\n VAULT_SECRET_PATH: z.string().min(1),\n VAULT_MOUNT_POINT: z.string().default(\"release\"),\n});\n\nexport type VaultConfig = z.infer<typeof VaultConfigSchema>;\n","import fs from \"node:fs\";\nimport https from \"node:https\";\nimport path from \"node:path\";\nimport axios from \"axios\";\nimport { loadEnv } from \"vite\";\nimport { VaultConfigSchema } from \"../models/VaultConfig\";\nimport type { Resource } from \"i18next\";\nimport type { Plugin } from \"vite\";\n\nasync function fetchVaultSecrets(env: Record<string, string>): Promise<Record<string, string>> {\n const config = VaultConfigSchema.parse(env);\n const { VAULT_ADDRESS, VAULT_USERNAME, VAULT_PASSWORD, VAULT_SECRET_PATH, VAULT_MOUNT_POINT } =\n config;\n\n const client = axios.create({\n baseURL: VAULT_ADDRESS,\n httpsAgent: new https.Agent({ rejectUnauthorized: false }),\n });\n\n const { data: loginData } = await client.post(`/v1/auth/userpass/login/${VAULT_USERNAME}`, {\n password: VAULT_PASSWORD,\n });\n\n const { data: secretData } = await client.get(\n `/v1/${VAULT_MOUNT_POINT}/data/${VAULT_SECRET_PATH}`,\n {\n headers: { \"X-Vault-Token\": loginData.auth.client_token },\n },\n );\n\n const secrets = secretData?.data?.data;\n if (!secrets) throw new Error(\"No secrets found\");\n\n return Object.fromEntries(\n Object.entries(secrets).map(([key, value]) => [\n key,\n typeof value === \"string\" ? value : JSON.stringify(value),\n ]),\n );\n}\n\nasync function loadVaultSecrets(command: string): Promise<void> {\n if (command !== \"serve\") return;\n\n const env = loadEnv(\"development\", process.cwd(), \"\");\n if (!env.VAULT_ADDRESS) return;\n\n try {\n const secrets = await fetchVaultSecrets(env);\n Object.entries(secrets).forEach(([key, value]) => {\n process.env[key] ??= value;\n });\n } catch (e) {\n console.warn(\"[vite:wcz-layout] Vault failed:\", e instanceof Error ? e.message : e);\n }\n}\n\nfunction loadLocaleResources(localesPath: string, addWatchFile: (path: string) => void): Resource {\n if (!fs.existsSync(localesPath)) fs.mkdirSync(localesPath, { recursive: true });\n\n const enPath = path.join(localesPath, \"en.json\");\n if (!fs.existsSync(enPath)) fs.writeFileSync(enPath, JSON.stringify({}));\n\n const files = fs.readdirSync(localesPath);\n const resources: Resource = {};\n\n for (const file of files.filter((f) => f.endsWith(\".json\"))) {\n const lang = path.basename(file, \".json\");\n const filePath = path.join(localesPath, file);\n try {\n resources[lang] = { translation: JSON.parse(fs.readFileSync(filePath, \"utf-8\")) };\n } catch {\n resources[lang] = { translation: {} };\n }\n addWatchFile(filePath);\n }\n\n return resources;\n}\n\nfunction ensurePermissionsFile(\n permissionsPath: string,\n addWatchFile: (path: string) => void,\n): void {\n const dir = path.dirname(permissionsPath);\n if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });\n if (!fs.existsSync(permissionsPath)) {\n fs.writeFileSync(\n permissionsPath,\n 'export const permissions = {\\n admin: [\"wcz-developers\"]\\n} as const;',\n );\n }\n addWatchFile(permissionsPath);\n}\n\nfunction ensureScopesFile(scopesPath: string, addWatchFile: (path: string) => void): void {\n const dir = path.dirname(scopesPath);\n if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });\n if (!fs.existsSync(scopesPath)) {\n fs.writeFileSync(scopesPath, \"export const scopes = {\\n} as const;\");\n }\n addWatchFile(scopesPath);\n}\n\nexport function viteWczLayout(): Plugin {\n const virtualModuleId = \"virtual:wcz-layout\";\n const resolvedVirtualModuleId = \"\\0\" + virtualModuleId;\n\n let localesPath: string;\n let permissionsPath: string;\n let scopesPath: string;\n let envPath: string;\n\n return {\n name: \"vite:wcz-layout\",\n enforce: \"pre\",\n configResolved(resolvedConfig) {\n localesPath = path.resolve(resolvedConfig.root, \"src/lib/locales\");\n permissionsPath = path.resolve(resolvedConfig.root, \"src/lib/auth/permissions.ts\");\n scopesPath = path.resolve(resolvedConfig.root, \"src/lib/auth/scopes.ts\");\n envPath = path.resolve(resolvedConfig.root, \"src/env.ts\");\n },\n async config(_, { command }) {\n await loadVaultSecrets(command);\n\n return {\n optimizeDeps: {\n exclude: [virtualModuleId],\n include: [\n \"prop-types\",\n \"react-is\",\n \"hoist-non-react-statics\",\n \"url-parse\",\n \"file-saver\",\n \"attr-accept\",\n ],\n },\n };\n },\n configureServer(server) {\n const refresh = (filePath: string) => {\n if (\n filePath.includes(localesPath) ||\n filePath === permissionsPath ||\n filePath === scopesPath ||\n filePath === envPath\n ) {\n const module = server.moduleGraph.getModuleById(resolvedVirtualModuleId);\n if (module) server.moduleGraph.invalidateModule(module);\n server.ws.send({ type: \"full-reload\", path: \"*\" });\n }\n };\n\n server.watcher.add([localesPath, permissionsPath, scopesPath, envPath]);\n server.watcher.on(\"add\", refresh);\n server.watcher.on(\"change\", refresh);\n server.watcher.on(\"unlink\", refresh);\n },\n resolveId(id) {\n if (id === virtualModuleId) return resolvedVirtualModuleId;\n return null;\n },\n load(id) {\n if (id !== resolvedVirtualModuleId) return null;\n\n const resources = loadLocaleResources(localesPath, this.addWatchFile.bind(this));\n ensurePermissionsFile(permissionsPath, this.addWatchFile.bind(this));\n ensureScopesFile(scopesPath, this.addWatchFile.bind(this));\n\n const normalizedPermissionsPath = permissionsPath.split(path.sep).join(path.posix.sep);\n const normalizedScopesPath = scopesPath.split(path.sep).join(path.posix.sep);\n const normalizedEnvPath = envPath.split(path.sep).join(path.posix.sep);\n return `\n export const resources = ${JSON.stringify(resources)};\n export { permissions } from \"${normalizedPermissionsPath}\";\n export { scopes } from \"${normalizedScopesPath}\";\n export { serverEnv } from \"${normalizedEnvPath}\";\n `;\n },\n };\n}\n"],"mappings":";;;;;;;AAEA,MAAaC,oBAAoBD,IAAEE,OAAO;CACxCC,eAAeH,IAAEI,IAAI;CACrBC,gBAAgBL,IAAEM,OAAO,EAAEC,IAAI,CAAC;CAChCC,gBAAgBR,IAAEM,OAAO,EAAEC,IAAI,CAAC;CAChCE,mBAAmBT,IAAEM,OAAO,EAAEC,IAAI,CAAC;CACnCG,mBAAmBV,IAAEM,OAAO,EAAEK,QAAQ,SAAS;AACjD,CAAC;;;ACCD,eAAeW,kBAAkBC,KAA8D;CAE7F,MAAM,EAAEK,eAAeC,gBAAgBC,gBAAgBC,mBAAmBC,sBAD3Db,kBAAkBQ,MAAMJ,GAErCG;CAEF,MAAMO,SAAShB,MAAMiB,OAAO;EAC1BC,SAASP;EACTQ,YAAY,IAAIrB,MAAMsB,MAAM,EAAEC,oBAAoB,MAAM,CAAC;CAC3D,CAAC;CAED,MAAM,EAAEC,MAAMC,cAAc,MAAMP,OAAOQ,KAAK,2BAA2BZ,kBAAkB,EACzFa,UAAUZ,eACZ,CAAC;CAED,MAAM,EAAES,MAAMI,eAAe,MAAMV,OAAOW,IACxC,OAAOZ,kBAAiB,QAASD,qBACjC,EACEc,SAAS,EAAE,iBAAiBL,UAAUM,KAA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AAK1D,KAAKiH,MAAMD,GAAG;GACrE,OAAO;uCAC0BxE,KAAKC,UAAUqB,SAAS,EAAC;2CACrBgD,0BAAyB;sCAC9BI,qBAAoB;yCACjBC,kBAAiB;;EAEtD;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wcz-layout",
3
- "version": "8.3.1",
3
+ "version": "8.3.2",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "tanstack-intent"
@@ -105,7 +105,7 @@
105
105
  "@azure/msal-react": "^5.4.2",
106
106
  "@t3-oss/env-core": "^0.13.11",
107
107
  "file-saver": "^2.0.5",
108
- "i18next": "^26.2.0",
108
+ "i18next": "^26.3.0",
109
109
  "i18next-browser-languagedetector": "^8.2.1",
110
110
  "jose": "^6.2.3",
111
111
  "react-dropzone": "^15.0.0",
@@ -120,14 +120,14 @@
120
120
  "@tanstack/intent": "^0.0.41",
121
121
  "@types/file-saver": "^2.0.7",
122
122
  "@types/node": "^24.10.13",
123
- "@types/react": "^19.2.15",
123
+ "@types/react": "^19.2.16",
124
124
  "@types/react-dom": "^19.2.3",
125
125
  "@vitejs/plugin-react": "^6.0.2",
126
126
  "babel-plugin-react-compiler": "^1.0.0",
127
127
  "nitro": "npm:nitro-nightly@latest",
128
128
  "publint": "^0.3.21",
129
129
  "typescript": "^6.0.3",
130
- "vite-plugin-checker": "^0.13.0"
130
+ "vite-plugin-checker": "^0.14.1"
131
131
  },
132
132
  "peerDependencies": {
133
133
  "@emotion/react": "11.x",
@@ -154,5 +154,5 @@
154
154
  "overrides": {
155
155
  "vite": "npm:@voidzero-dev/vite-plus-core@latest"
156
156
  },
157
- "packageManager": "npm@11.15.0"
157
+ "packageManager": "npm@11.16.0"
158
158
  }
@@ -9,6 +9,7 @@ You can read about each service in the links below. Services are categorized as
9
9
 
10
10
  - **Client exports** — Contains `queryOptions` and `mutationOptions`; use for data fetching/mutations on the client with React Query.
11
11
  - **Server exports** — Server functions; prefer calling mutations inside other server functions or database transactions.
12
+ - To read a step, open the linked file in the **File** column directly.
12
13
 
13
14
  ## Import Paths
14
15
 
@@ -24,4 +25,4 @@ You can read about each service in the links below. Services are categorized as
24
25
  | approval | [approval.md](docs/approval.md) | Approval request lifecycle, approvers, flows, statuses, step results |
25
26
  | peoplesoft | [peoplesoft.md](docs/peoplesoft.md) | Employee, manager, department, and company general manager lookups |
26
27
  | email | [email.md](docs/email.md) | Server-only email sending with optional file attachment references |
27
- | attendance | docs/attendance.md | (Coming soon) |
28
+ | attendance | [attendance.md](docs/attendance.md) | (Coming soon) |
@@ -13,7 +13,7 @@ You are an AI assistant helping a developer bootstrap a new project from this te
13
13
 
14
14
  - Execute steps in order. Read **only** the current step file.
15
15
  - Pause whenever a step requires user input or a terminal command to finish.
16
- - Do not skip ahead or batch multiple steps unless a step explicitly allows it.
16
+ - Do not skip ahead or batch multiple steps.
17
17
  - When a step has branches (yes/no), follow only the matching branch.
18
18
  - To read a step, open the linked file in the **File** column directly.
19
19
 
@@ -30,18 +30,17 @@ Then list all steps by name so the user can pick.
30
30
 
31
31
  ## Steps
32
32
 
33
- | # | File | Summary |
34
- | --- | ----------------------------------------------------------- | ------------------------------- |
35
- | 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
36
- | 2 | [02-dependency-check.md](steps/02-dependency-check.md) | Install npm dependencies |
37
- | 3 | [03-project-name-setup.md](steps/03-project-name-setup.md) | Replace placeholder names |
38
- | 4 | [04-apm-setup.md](steps/04-apm-setup.md) | Register the app internally |
39
- | 5 | [05-database-setup.md](steps/05-database-setup.md) | Postgres via Docker or existing |
40
- | 6 | [06-entra-setup.md](steps/06-entra-setup.md) | Azure AD app registration |
41
- | 7 | [07-vault-setup.md](steps/07-vault-setup.md) | Vault secrets configuration |
42
- | 8 | [08-generate-favicon.md](steps/08-generate-favicon.md) | Generate and replace favicon |
43
- | 9 | [09-commit.md](steps/09-commit.md) | Commit and push to origin |
33
+ | # | File | Summary |
34
+ | --- | ---------------------------------------------------------- | ------------------------------- |
35
+ | 1 | [01-git-setup.md](steps/01-git-setup.md) | Configure remote and branch |
36
+ | 2 | [02-project-name-setup.md](steps/02-project-name-setup.md) | Replace placeholder names |
37
+ | 3 | [03-apm-setup.md](steps/03-apm-setup.md) | Register the app internally |
38
+ | 4 | [04-database-setup.md](steps/04-database-setup.md) | Postgres via Docker or existing |
39
+ | 5 | [05-entra-setup.md](steps/05-entra-setup.md) | Azure AD app registration |
40
+ | 6 | [06-vault-setup.md](steps/06-vault-setup.md) | Vault secrets configuration |
41
+ | 7 | [07-generate-favicon.md](steps/07-generate-favicon.md) | Generate and replace favicon |
42
+ | 8 | [08-commit.md](steps/08-commit.md) | Commit and push to origin |
44
43
 
45
44
  ## Completion
46
45
 
47
- After step 9 succeeds, the workflow ends — no further action needed.
46
+ After step 8 succeeds, the workflow ends — no further action needed.
@@ -1 +0,0 @@
1
- {"version":3,"file":"useDialogs-imgl4bIl.js","names":["Button","Dialog","DialogActions","DialogContent","DialogTitle","useEventCallback","useContext","useTranslation","DialogsContext","ReactNode","OpenDialogOptions","onClose","result","TResult","Promise","AlertOptions","title","ConfirmOptions","cancelText","DialogProps","payload","TPayload","open","OpenAlertDialog","message","options","OpenConfirmDialog","DialogComponent","React","ComponentType","OpenDialog","Component","CloseDialog","dialog","AlertDialogPayload","AlertDialogProps","AlertDialog","t0","$","_c","$i","Symbol","for","t","t1","t2","t3","t4","t5","t6","t7","t8","ConfirmDialogPayload","ConfirmDialogProps","ConfirmDialog","t9","t10","t11","t12","DialogHook","alert","confirm","close","useDialogs","undefined","message_0","options_0"],"sources":["../src/hooks/useDialogs.tsx"],"sourcesContent":["import {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n useEventCallback,\n} from \"@mui/material\";\nimport { useContext } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { DialogsContext } from \"../contexts/DialogsContext\";\nimport type { ReactNode } from \"react\";\n\nexport interface OpenDialogOptions<TResult> {\n onClose?: (result: TResult) => Promise<void>;\n}\n\nexport interface AlertOptions {\n title?: ReactNode;\n}\n\nexport interface ConfirmOptions {\n title?: ReactNode;\n cancelText?: ReactNode;\n}\n\nexport interface DialogProps<TPayload = undefined, TResult = void> {\n payload: TPayload;\n open: boolean;\n onClose: (result: TResult) => Promise<void>;\n}\n\nexport type OpenAlertDialog = (message: ReactNode, options?: AlertOptions) => Promise<void>;\n\nexport type OpenConfirmDialog = (message: ReactNode, options?: ConfirmOptions) => Promise<boolean>;\n\nexport type DialogComponent<TPayload, TResult> = React.ComponentType<\n DialogProps<TPayload, TResult>\n>;\n\nexport interface OpenDialog {\n <TPayload extends undefined, TResult>(\n Component: DialogComponent<TPayload, TResult>,\n payload?: TPayload,\n options?: OpenDialogOptions<TResult>,\n ): Promise<TResult>;\n <TPayload, TResult>(\n Component: DialogComponent<TPayload, TResult>,\n payload: TPayload,\n options?: OpenDialogOptions<TResult>,\n ): Promise<TResult>;\n}\n\nexport type CloseDialog = <TResult>(dialog: Promise<TResult>, result: TResult) => Promise<TResult>;\n\nexport interface AlertDialogPayload extends AlertOptions {\n message: ReactNode;\n}\n\nexport type AlertDialogProps = DialogProps<AlertDialogPayload, void>;\n\nexport function AlertDialog({ open, payload, onClose }: Readonly<AlertDialogProps>) {\n const { t } = useTranslation();\n\n return (\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose()} disableRestoreFocus>\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Alert\")}</DialogTitle>\n <DialogContent>{payload.message}</DialogContent>\n <DialogActions>\n <Button onClick={() => onClose()} autoFocus>\n {t(\"Layout.Dialog.Confirm\")}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\nexport interface ConfirmDialogPayload extends ConfirmOptions {\n message: ReactNode;\n}\n\nexport type ConfirmDialogProps = DialogProps<ConfirmDialogPayload, boolean>;\n\nexport function ConfirmDialog({ open, payload, onClose }: Readonly<ConfirmDialogProps>) {\n const { t } = useTranslation();\n\n return (\n <Dialog maxWidth=\"xs\" fullWidth open={open} onClose={() => onClose(false)} disableRestoreFocus>\n <DialogTitle>{payload.title ?? t(\"Layout.Dialog.Confirm\")}</DialogTitle>\n <DialogContent>{payload.message}</DialogContent>\n <DialogActions>\n <Button onClick={() => onClose(false)}>\n {payload.cancelText ?? t(\"Layout.Dialog.Cancel\")}\n </Button>\n <Button onClick={() => onClose(true)} autoFocus>\n {t(\"Layout.Dialog.Confirm\")}\n </Button>\n </DialogActions>\n </Dialog>\n );\n}\n\ninterface DialogHook {\n alert: OpenAlertDialog;\n confirm: OpenConfirmDialog;\n open: OpenDialog;\n close: CloseDialog;\n}\n\nexport function useDialogs(): DialogHook {\n const { open, close } = useContext(DialogsContext);\n\n const alert = useEventCallback<OpenAlertDialog>((message, { ...options } = {}) =>\n open(AlertDialog, { ...options, message }),\n );\n\n const confirm = useEventCallback<OpenConfirmDialog>((message, { ...options } = {}) =>\n open(ConfirmDialog, { ...options, message }),\n );\n\n return { alert, confirm, open, close };\n}\n"],"mappings":";;;;;;;AA6DA,SAAOoC,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,GAAA;CAAA,IAAAD,EAAA,OAAA,oEAAA;EAAA,KAAA,IAAAE,KAAA,GAAAA,KAAA,IAAAA,MAAA,GAAAF,EAAAE,MAAAC,OAAAC,IAAA,4BAAA;EAAAJ,EAAA,KAAA;;CAAqB,MAAA,EAAAhB,MAAAF,SAAAT,YAAA0B;CAC1B,MAAA,EAAAM,MAAcpC,gBAAgB;CAAC,IAAAqC;CAAA,IAAAN,EAAA,OAAA3B,SAAA;EAGwBiC,WAAMjC,SAAS;EAAA2B,EAAA,KAAA3B;EAAA2B,EAAA,KAAAM;QAAAA,KAAAN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAlB,QAAAJ,SAAAsB,EAAA,OAAAK,GAAA;EACpDE,KAAAzB,QAAOJ,SAAU2B,EAAE,sBAAsB;EAAAL,EAAA,KAAAlB,QAAAJ;EAAAsB,EAAA,K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;QAAAA,KAAAN,EAAA;CAD9C,MAAAuB,UAAgBxD,iBAAoCuC,GAEnD;CAAC,IAAAC;CAAA,IAAAP,EAAA,OAAAsB,SAAAtB,EAAA,OAAAwB,SAAAxB,EAAA,OAAAuB,WAAAvB,EAAA,OAAAhB,MAAA;EAEKuB,KAAA;GAAAe;GAAAC;GAAAvC;GAAAwC;GAA+B;EAAAxB,EAAA,KAAAsB;EAAAtB,EAAA,KAAAwB;EAAAxB,EAAA,KAAAuB;EAAAvB,EAAA,KAAAhB;EAAAgB,EAAA,KAAAO;QAAAA,KAAAP,EAAA;CAAA,OAA/BO"}
@@ -1,11 +0,0 @@
1
- # Dependency Check
2
-
3
- ## Actions
4
-
5
- 1. Check for a `node_modules` directory in the project root.
6
- - **Exists** → continue.
7
- - **Missing** → output exactly:
8
-
9
- > I see `node_modules` is missing. I am running your install script to get your dependencies set up. This might take a moment...
10
-
11
- Run `npm run vp:install` and **proceed immediately** without waiting for completion.