wcz-layout 10.0.0 → 10.1.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/{AggregatedCell-BtKC5-m6.mjs → AggregatedCell-C7nAQyMO.mjs} +15 -2
- package/dist/AggregatedCell-C7nAQyMO.mjs.map +1 -0
- package/dist/{LayoutTable-4DLs-NI-.d.mts → LayoutTable-BkrjgpW_.d.mts} +10 -4
- package/dist/{approval-DFExxyAJ.mjs → approval-BYryxFOW.mjs} +2 -2
- package/dist/{approval-DFExxyAJ.mjs.map → approval-BYryxFOW.mjs.map} +1 -1
- package/dist/auth.mjs +4 -4
- package/dist/components.d.mts +1 -1
- package/dist/components.mjs +47 -21
- package/dist/components.mjs.map +1 -1
- package/dist/{createApi-CLYWCzR2.mjs → createApi-DGJJ4I_R.mjs} +3 -3
- package/dist/{createApi-CLYWCzR2.mjs.map → createApi-DGJJ4I_R.mjs.map} +1 -1
- package/dist/data/client.d.mts +0 -36
- package/dist/data/client.mjs +4 -4
- package/dist/data/client.mjs.map +1 -1
- package/dist/data/server.mjs +4 -4
- package/dist/{file-aSQto2rw.mjs → file-C14fhUeg.mjs} +4 -4
- package/dist/{file-aSQto2rw.mjs.map → file-C14fhUeg.mjs.map} +1 -1
- package/dist/{file-CZwQfvTU.mjs → file-C5BOj1q8.mjs} +4 -4
- package/dist/{file-CZwQfvTU.mjs.map → file-C5BOj1q8.mjs.map} +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.mjs +456 -447
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/middleware.mjs +2 -2
- package/dist/{peoplesoft-CQnc01Hc.mjs → peoplesoft-BkJMCcHb.mjs} +3 -3
- package/dist/{peoplesoft-CQnc01Hc.mjs.map → peoplesoft-BkJMCcHb.mjs.map} +1 -1
- package/dist/{providers-Dbl95AxR.mjs → providers-DrairEO2.mjs} +2 -2
- package/dist/{providers-Dbl95AxR.mjs.map → providers-DrairEO2.mjs.map} +1 -1
- package/dist/{tokens-D8CVIFTb.mjs → tokens-BLRreL1j.mjs} +3 -3
- package/dist/{tokens-D8CVIFTb.mjs.map → tokens-BLRreL1j.mjs.map} +1 -1
- package/dist/{utils-KaM5VMTJ.mjs → utils-BUpDoqme.mjs} +13 -13
- package/dist/utils-BUpDoqme.mjs.map +1 -0
- package/dist/utils.mjs +1 -1
- package/package.json +130 -128
- package/skills/general/SKILL.md +122 -125
- package/skills/migrations/versions/migrate-v9-to-v10.md +3 -2
- package/skills/services/docs/peoplesoft.md +114 -110
- package/skills/table/SKILL.md +18 -30
- package/dist/AggregatedCell-BtKC5-m6.mjs.map +0 -1
- package/dist/utils-KaM5VMTJ.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AggregatedCell-BtKC5-m6.mjs","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","Theme","formatForDisplay","Cell","CellData","Column","RowData","LayoutTableFeatures","LayoutColumnMeta","shortcutLabel","label","hotkey","AnyColumn","TData","TValue","columnLabel","column","meta","columnDef","header","id","hasColumnLabel","Boolean","columnAlign","align","moveColumn","delta","table","current","atoms","columnOrder","get","order","length","getAllLeafColumns","map","from","indexOf","to","splice","setColumnOrder","pinnedSx","isHeader","pinned","getIsPinned","position","zIndex","insetInlineStart","getStart","undefined","insetInlineEnd","getAfter","bgcolor","backgroundImage","theme","palette","action","hover","selected","getIsLastColumn","borderInlineEnd","borderInlineEndStyle","borderColor","getIsFirstColumn","borderInlineStart","borderInlineStartStyle","cellSelectionSx","cell","getIsSelected","edges","getSelectionEdges","outline","top","primary","main","bottom","left","right","filter","join","boxShadow","quoteTsv","text","test","replaceAll","toClipboardValue","value","String","Date","toISOString","JSON","stringify","toClipboardText","regions","Array","rows","cells","dayjs","formatValue","value","dateFormat","undefined","Date","format","toString","JSON","stringify","aggregationFn_count","aggregationFn_extent","aggregationFn_first","aggregationFn_last","aggregationFn_max","aggregationFn_mean","aggregationFn_median","aggregationFn_min","aggregationFn_sum","aggregationFn_unique","aggregationFn_uniqueCount","createExpandedRowModel","createFacetedMinMaxValues","createFacetedRowModel","createFacetedUniqueValues","createFilteredRowModel","createGroupedRowModel","createPaginatedRowModel","createSortedRowModel","createTableHookContexts","filterFn_arrHas","filterFn_arrIncludes","filterFn_arrIncludesAll","filterFn_arrIncludesSome","filterFn_between","filterFn_betweenInclusive","filterFn_empty","filterFn_endsWith","filterFn_equals","filterFn_equalsString","filterFn_equalsStringSensitive","filterFn_greaterThan","filterFn_greaterThanOrEqualTo","filterFn_inDateRange","filterFn_inNumberRange","filterFn_includesString","filterFn_includesStringSensitive","filterFn_lessThan","filterFn_lessThanOrEqualTo","filterFn_notEmpty","filterFn_startsWith","filterFn_weakEquals","metaHelper","sortFn_alphanumeric","sortFn_alphanumericCaseSensitive","sortFn_basic","sortFn_datetime","sortFn_text","sortFn_textCaseSensitive","stockFeatures","tableFeatures","LayoutColumnMeta","layoutTableFeatures","columnMeta","filteredRowModel","sortedRowModel","paginatedRowModel","expandedRowModel","groupedRowModel","facetedRowModel","facetedUniqueValues","facetedMinMaxValues","filterFns","arrHas","arrIncludes","arrIncludesAll","arrIncludesSome","between","betweenInclusive","empty","endsWith","equals","equalsString","equalsStringSensitive","greaterThan","greaterThanOrEqualTo","inDateRange","inNumberRange","includesString","includesStringSensitive","lessThan","lessThanOrEqualTo","notEmpty","startsWith","weakEquals","sortFns","alphanumeric","alphanumericCaseSensitive","basic","datetime","text","textCaseSensitive","aggregationFns","sum","min","max","extent","mean","median","unique","uniqueCount","count","first","last","LayoutTableFeatures","tableContext","cellContext","headerContext","useTableContext","useCellContext","useHeaderContext","TypographyProps","Typography","FC","formatValue","useCellContext","AggregatedCell","prefix","options","Intl","NumberFormatOptions","dateFormat","t0","$","_c","$i","Symbol","for","props","t1","undefined","cell","T0","t2","t3","t4","t5","t6","t7","t8","bb0","value","getValue","t9","entry","toLocaleString","format","Array","isArray","map","join"],"sources":["../src/hooks/useDialogs.tsx","../src/components/table/utils.ts","../src/components/table/formatValue.ts","../src/components/table/context.ts","../src/components/table/cells/formatters/AggregatedCell.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","import type { Theme } from \"@mui/material\";\nimport { formatForDisplay } from \"@tanstack/react-hotkeys\";\nimport type { Cell, CellData, Column, RowData } from \"@tanstack/react-table\";\nimport type { LayoutTableFeatures } from \"~/components/table/context\";\nimport type { LayoutColumnMeta } from \"./types\";\n\nexport const shortcutLabel = (label: string, hotkey: string): string =>\n `${label} (${formatForDisplay(hotkey)})`;\n\ntype AnyColumn<TData extends RowData, TValue extends CellData> = Column<\n LayoutTableFeatures,\n TData,\n TValue\n>;\n\nexport const columnLabel = <TData extends RowData, TValue extends CellData>(\n column: AnyColumn<TData, TValue>,\n): string => {\n const meta = column.columnDef.meta as LayoutColumnMeta | undefined;\n if (meta?.label) return meta.label;\n\n return typeof column.columnDef.header === \"string\" ? column.columnDef.header : column.id;\n};\n\nexport const hasColumnLabel = <TData extends RowData, TValue extends CellData>(\n column: AnyColumn<TData, TValue>,\n): boolean =>\n Boolean((column.columnDef.meta as LayoutColumnMeta | undefined)?.label) ||\n typeof column.columnDef.header === \"string\";\n\nexport const columnAlign = <TData extends RowData, TValue extends CellData>(\n column: AnyColumn<TData, TValue>,\n): \"left\" | \"center\" | \"right\" =>\n (column.columnDef.meta as LayoutColumnMeta | undefined)?.align ??\n (hasColumnLabel(column) ? \"left\" : \"center\");\n\nexport const moveColumn = <TData extends RowData, TValue extends CellData>(\n column: AnyColumn<TData, TValue>,\n delta: number,\n): void => {\n const { table } = column;\n const current = table.atoms.columnOrder.get();\n const order = current.length ? [...current] : table.getAllLeafColumns().map(({ id }) => id);\n const from = order.indexOf(column.id);\n const to = from + delta;\n if (from < 0 || to < 0 || to >= order.length) return;\n\n order.splice(to, 0, ...order.splice(from, 1));\n table.setColumnOrder(order);\n};\n\nexport const pinnedSx = <TData extends RowData, TValue extends CellData>(\n column: AnyColumn<TData, TValue>,\n isHeader = false,\n) => {\n const pinned = column.getIsPinned();\n if (!pinned) return {};\n\n return {\n position: \"sticky\",\n zIndex: isHeader ? 4 : 2,\n insetInlineStart: pinned === \"start\" ? column.getStart(\"start\") : undefined,\n insetInlineEnd: pinned === \"end\" ? column.getAfter(\"end\") : undefined,\n bgcolor: \"background.paper\",\n ...(!isHeader && {\n \".MuiTableRow-root:hover > &\": {\n backgroundImage: (theme: Theme) =>\n `linear-gradient(${theme.palette.action.hover}, ${theme.palette.action.hover})`,\n },\n \".MuiTableRow-root.Mui-selected > &\": {\n backgroundImage: (theme: Theme) =>\n `linear-gradient(${theme.palette.action.selected}, ${theme.palette.action.selected})`,\n },\n }),\n ...(pinned === \"start\" &&\n column.getIsLastColumn(\"start\") && {\n borderInlineEnd: 1,\n borderInlineEndStyle: \"solid\",\n borderColor: \"divider\",\n }),\n ...(pinned === \"end\" &&\n column.getIsFirstColumn(\"end\") && {\n borderInlineStart: 1,\n borderInlineStartStyle: \"solid\",\n borderColor: \"divider\",\n }),\n };\n};\n\nexport const cellSelectionSx = <TData extends RowData, TValue extends CellData>(\n cell: Cell<LayoutTableFeatures, TData, TValue>,\n) => {\n if (!cell.getIsSelected()) return {};\n\n const edges = cell.getSelectionEdges();\n const outline = (theme: Theme) =>\n [\n edges.top && `inset 0 2px 0 0 ${theme.palette.primary.main}`,\n edges.bottom && `inset 0 -2px 0 0 ${theme.palette.primary.main}`,\n edges.left && `inset 2px 0 0 0 ${theme.palette.primary.main}`,\n edges.right && `inset -2px 0 0 0 ${theme.palette.primary.main}`,\n ]\n .filter(Boolean)\n .join(\", \") || \"none\";\n\n return {\n backgroundImage: (theme: Theme) =>\n `linear-gradient(${theme.palette.action.selected}, ${theme.palette.action.selected})`,\n boxShadow: outline,\n };\n};\n\n/** Spreadsheet TSV quoting, so a cell holding a tab or a newline stays one cell. */\nconst quoteTsv = (text: string): string =>\n /[\"\\t\\n\\r]/.test(text) ? `\"${text.replaceAll('\"', '\"\"')}\"` : text;\n\nconst toClipboardValue = (value: unknown): string => {\n if (value == null) return \"\";\n if (typeof value === \"string\") return quoteTsv(value);\n if (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\")\n return quoteTsv(String(value));\n if (value instanceof Date) return quoteTsv(value.toISOString());\n\n // Everything else — objects, and the odd symbol or function — as JSON or blank.\n return quoteTsv(JSON.stringify(value) ?? \"\");\n};\n\n/**\n * Serializes `table.getSelectedCellRangesData()` as TSV, which is what Excel,\n * Google Sheets and LibreOffice all paste as a grid. Disjoint selection regions\n * are separated by a blank line.\n */\nexport const toClipboardText = (regions: Array<Array<Array<unknown>>>): string =>\n regions\n .map((rows) => rows.map((cells) => cells.map(toClipboardValue).join(\"\\t\")).join(\"\\n\"))\n .join(\"\\n\\n\");\n","import dayjs from \"dayjs\";\n\nexport const formatValue = (value: unknown, dateFormat = \"L LT\"): string => {\n if (value === null || value === undefined) return \"\";\n if (value instanceof Date) return dayjs(value).format(dateFormat);\n if (typeof value === \"string\") return value;\n if (typeof value === \"number\" || typeof value === \"boolean\" || typeof value === \"bigint\") {\n return value.toString();\n }\n\n return JSON.stringify(value) ?? \"\";\n};\n","import {\n aggregationFn_count,\n aggregationFn_extent,\n aggregationFn_first,\n aggregationFn_last,\n aggregationFn_max,\n aggregationFn_mean,\n aggregationFn_median,\n aggregationFn_min,\n aggregationFn_sum,\n aggregationFn_unique,\n aggregationFn_uniqueCount,\n createExpandedRowModel,\n createFacetedMinMaxValues,\n createFacetedRowModel,\n createFacetedUniqueValues,\n createFilteredRowModel,\n createGroupedRowModel,\n createPaginatedRowModel,\n createSortedRowModel,\n createTableHookContexts,\n filterFn_arrHas,\n filterFn_arrIncludes,\n filterFn_arrIncludesAll,\n filterFn_arrIncludesSome,\n filterFn_between,\n filterFn_betweenInclusive,\n filterFn_empty,\n filterFn_endsWith,\n filterFn_equals,\n filterFn_equalsString,\n filterFn_equalsStringSensitive,\n filterFn_greaterThan,\n filterFn_greaterThanOrEqualTo,\n filterFn_inDateRange,\n filterFn_inNumberRange,\n filterFn_includesString,\n filterFn_includesStringSensitive,\n filterFn_lessThan,\n filterFn_lessThanOrEqualTo,\n filterFn_notEmpty,\n filterFn_startsWith,\n filterFn_weakEquals,\n metaHelper,\n sortFn_alphanumeric,\n sortFn_alphanumericCaseSensitive,\n sortFn_basic,\n sortFn_datetime,\n sortFn_text,\n sortFn_textCaseSensitive,\n stockFeatures,\n tableFeatures,\n} from \"@tanstack/react-table\";\nimport type { LayoutColumnMeta } from \"~/components/table/types\";\n\nexport const layoutTableFeatures = tableFeatures({\n ...stockFeatures,\n columnMeta: metaHelper<LayoutColumnMeta>(),\n filteredRowModel: createFilteredRowModel(),\n sortedRowModel: createSortedRowModel(),\n paginatedRowModel: createPaginatedRowModel(),\n expandedRowModel: createExpandedRowModel(),\n groupedRowModel: createGroupedRowModel(),\n facetedRowModel: createFacetedRowModel(),\n facetedUniqueValues: createFacetedUniqueValues(),\n facetedMinMaxValues: createFacetedMinMaxValues(),\n filterFns: {\n arrHas: filterFn_arrHas,\n arrIncludes: filterFn_arrIncludes,\n arrIncludesAll: filterFn_arrIncludesAll,\n arrIncludesSome: filterFn_arrIncludesSome,\n between: filterFn_between,\n betweenInclusive: filterFn_betweenInclusive,\n empty: filterFn_empty,\n endsWith: filterFn_endsWith,\n equals: filterFn_equals,\n equalsString: filterFn_equalsString,\n equalsStringSensitive: filterFn_equalsStringSensitive,\n greaterThan: filterFn_greaterThan,\n greaterThanOrEqualTo: filterFn_greaterThanOrEqualTo,\n inDateRange: filterFn_inDateRange,\n inNumberRange: filterFn_inNumberRange,\n includesString: filterFn_includesString,\n includesStringSensitive: filterFn_includesStringSensitive,\n lessThan: filterFn_lessThan,\n lessThanOrEqualTo: filterFn_lessThanOrEqualTo,\n notEmpty: filterFn_notEmpty,\n startsWith: filterFn_startsWith,\n weakEquals: filterFn_weakEquals,\n },\n sortFns: {\n alphanumeric: sortFn_alphanumeric,\n alphanumericCaseSensitive: sortFn_alphanumericCaseSensitive,\n basic: sortFn_basic,\n datetime: sortFn_datetime,\n text: sortFn_text,\n textCaseSensitive: sortFn_textCaseSensitive,\n },\n aggregationFns: {\n sum: aggregationFn_sum,\n min: aggregationFn_min,\n max: aggregationFn_max,\n extent: aggregationFn_extent,\n mean: aggregationFn_mean,\n median: aggregationFn_median,\n unique: aggregationFn_unique,\n uniqueCount: aggregationFn_uniqueCount,\n count: aggregationFn_count,\n first: aggregationFn_first,\n last: aggregationFn_last,\n },\n});\n\nexport type LayoutTableFeatures = typeof layoutTableFeatures;\n\nexport const {\n tableContext,\n cellContext,\n headerContext,\n useTableContext,\n useCellContext,\n useHeaderContext,\n} = createTableHookContexts<LayoutTableFeatures>();\n","import type { TypographyProps } from \"@mui/material\";\nimport { Typography } from \"@mui/material\";\nimport type { FC } from \"react\";\nimport { formatValue } from \"~/components/table/formatValue\";\nimport { useCellContext } from \"~/components/table/context\";\n\nexport const AggregatedCell: FC<\n TypographyProps & {\n prefix?: string;\n options?: Intl.NumberFormatOptions;\n dateFormat?: string;\n }\n> = ({ prefix = \"\", options, dateFormat, ...props }) => {\n const cell = useCellContext();\n const value = cell.getValue();\n if (value === null || value === undefined || value === \"\") return null;\n\n const format = (entry: unknown) =>\n typeof entry === \"number\"\n ? entry.toLocaleString(undefined, options)\n : formatValue(entry, dateFormat);\n\n return (\n <Typography variant=\"body2\" color=\"text.secondary\" noWrap {...props}>\n {prefix}\n {/* `extent` — the default aggregate for anything non-numeric — is a [min, max] pair. */}\n {Array.isArray(value) ? value.map(format).join(\" – \") : format(value)}\n </Typography>\n );\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,IAAA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EAAA,QAAAe,IAAA;EAHvEK,KAAA,qBAAC,IAAD;GAAoB,SAAAV;GAAc,OAAAC;GAAiB,QAAAC;GAAM,GAAKP;GAA9D,UAAA,CACGX,IAEAqB,EAHQ;;EAIEf,EAAA,MAAAS;EAAAT,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAa;EAAAb,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAoB;CAAA,OAAAA,KAAApB,EAAA;CAAA,OAJboB;AAIa"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-KaM5VMTJ.mjs","names":["OFFLINE_USER_KEY","OFFLINE_PHOTO_KEY","GRACE_PERIOD","Cached","value","T","savedAt","recall","key","localStorage","raw","getItem","JSON","parse","Date","now","removeItem","remember","undefined","setItem","stringify","isOfflineFailure","error","navigator","onLine","TypeError","withOfflineFallback","fetchFresh","Promise","fresh","clearSessionSnapshot","String","window","addEventListener","event","location","href","createEnv","z","clientEnv","clientPrefix","client","runtimeEnv","import","meta","env","emptyStringAsUndefined","serverEnv","server","ENTRA_CLIENT_ID","string","min","ENTRA_TENANT_ID","ENTRA_CLIENT_SECRET","AWS_ISSUER","url","optional","AWS_DOMAIN","AWS_CLIENT_ID","AWS_CLIENT_SECRET","SESSION_SECRET","FILE_BASE_URL","APPROVAL_BASE_URL","PEOPLESOFT_BASE_URL","EMAIL_BASE_URL","AI_BASE_URL","AI_SUBSCRIPTION_KEY","process","useSession","serverEnv","ProviderId","User","AppSessionData","provider","refreshToken","user","pkceVerifier","state","returnTo","AppSession","Awaited","ReturnType","getAppSession","Promise","getSession","name","password","SESSION_SECRET","queryOptions","createServerFn","QueryClientParam","ProviderId","User","OFFLINE_USER_KEY","withOfflineFallback","getAppSession","getSessionUser","method","handler","Promise","session","data","user","getLoginProviders","Array","id","label","providers","map","loginProvidersQueryOptions","queryKey","queryFn","staleTime","userQueryOptions","Infinity","networkMode","refetchOnReconnect","getUser","queryClient","import","meta","env","SSR","ensureQueryData","AnyFieldApi","redirect","ParsedLocation","manifest","permissions","QueryClientParam","TokenPayload","ProviderId","User","getUser","WISTRON_PRIMARY_COLOR","WISTRON_SECONDARY_COLOR","Platform","isAndroid","test","userAgent","isIOS","isWindows","isMacOS","navigator","RootRouteHeadOptions","rootRouteHead","options","meta","charSet","name","content","title","links","rel","sizes","href","type","GuardArgs","location","context","requireAuth","permissionKey","user","queryClient","encodeURIComponent","reloadDocument","hasPermission","Error","NON_PRODUCTION","isTestEnv","origin","split","slice","join","FormOmittedProps","getFieldStatus","field","state","isTouched","hasError","errors","length","helperText","message","sanitizeReturnTo","value","toKebabCase","str","replaceAll","toLowerCase","foldForSearch","String","normalize","permissionGroups","Set","Object","values","flat","buildUser","payload","provider","email","preferred_username","department","toUpperCase","employeeId","companyName","groups","filter","group","has","key","some","includes"],"sources":["../src/lib/auth/offline.ts","../src/env.ts","../src/lib/auth/session.ts","../src/lib/auth/user.ts","../src/lib/utils.ts"],"sourcesContent":["/**\n * Offline fallback for identity. The refresh token never leaves the sealed\n * httpOnly cookie — what is cached here is only the display snapshot (user\n * claims and avatar) so the UI and offline route permissions can still work\n * while the server is unreachable. Server requests remain independently\n * authorized. At-rest protection is the device's OS login and disk encryption.\n */\n\nexport const OFFLINE_USER_KEY = \"auth-user\";\nexport const OFFLINE_PHOTO_KEY = \"auth-photo\";\n\n/** One shift — matches Intune's default offline grace period. */\nconst GRACE_PERIOD = 12 * 60 * 60 * 1000;\n\ntype Cached<T> = { value: T; savedAt: number };\n\nconst recall = <T>(key: string): T | null => {\n if (typeof localStorage === \"undefined\") return null;\n try {\n const raw = localStorage.getItem(key);\n if (!raw) return null;\n const { value, savedAt } = JSON.parse(raw) as Cached<T>;\n if (Date.now() - savedAt > GRACE_PERIOD) {\n localStorage.removeItem(key);\n return null;\n }\n return value;\n } catch {\n localStorage.removeItem(key);\n return null;\n }\n};\n\nconst remember = (key: string, value: unknown): void => {\n if (typeof localStorage === \"undefined\") return;\n try {\n if (value === null || value === undefined) localStorage.removeItem(key);\n else localStorage.setItem(key, JSON.stringify({ value, savedAt: Date.now() }));\n } catch {\n // Storage full or blocked — the offline fallback is best-effort.\n }\n};\n\nconst isOfflineFailure = (error: unknown): boolean =>\n (typeof navigator !== \"undefined\" && !navigator.onLine) || error instanceof TypeError;\n\n/**\n * Answers from the server when reachable, remembering the result; when the call\n * has a transport failure, replays the last result instead, for up to\n * {@link GRACE_PERIOD} since it was last confirmed.\n *\n * Cached values are untrusted client state. Server authorization must never\n * depend on them.\n */\nexport const withOfflineFallback = async <T>(\n key: string,\n fetchFresh: () => Promise<T>,\n): Promise<T | null> => {\n try {\n const fresh = await fetchFresh();\n remember(key, fresh);\n return fresh;\n } catch (error) {\n if (!isOfflineFailure(error)) throw error;\n return recall<T>(key);\n }\n};\n\n/** Drops the cached identity. Call on logout, before leaving the page. */\nexport const clearSessionSnapshot = (): void => {\n if (typeof localStorage === \"undefined\") return;\n localStorage.removeItem(OFFLINE_USER_KEY);\n localStorage.removeItem(OFFLINE_PHOTO_KEY);\n localStorage.setItem(\"auth-logout\", String(Date.now()));\n};\n\nif (typeof window !== \"undefined\")\n window.addEventListener(\"storage\", (event) => {\n if (event.key === \"auth-logout\") location.href = \"/auth/logout\";\n });\n","import { createEnv } from \"@t3-oss/env-core\";\nimport { z } from \"zod\";\n\nexport const clientEnv = createEnv({\n clientPrefix: \"VITE_\",\n client: {},\n runtimeEnv: import.meta.env,\n emptyStringAsUndefined: true,\n});\n\nexport const serverEnv = createEnv({\n server: {\n ENTRA_CLIENT_ID: z.string().min(1),\n ENTRA_TENANT_ID: z.string().min(1),\n ENTRA_CLIENT_SECRET: z.string().min(1),\n AWS_ISSUER: z.url().optional(),\n AWS_DOMAIN: z.url().optional(),\n AWS_CLIENT_ID: z.string().min(1).optional(),\n AWS_CLIENT_SECRET: z.string().min(1).optional(),\n SESSION_SECRET: z.string().min(32),\n FILE_BASE_URL: z.string().min(1).optional(),\n APPROVAL_BASE_URL: z.string().min(1).optional(),\n PEOPLESOFT_BASE_URL: z.string().min(1).optional(),\n EMAIL_BASE_URL: z.string().min(1).optional(),\n AI_BASE_URL: z.string().min(1).optional(),\n AI_SUBSCRIPTION_KEY: z.string().min(1).optional(),\n },\n runtimeEnv: process.env,\n emptyStringAsUndefined: true,\n});\n","import type { useSession } from \"@tanstack/react-start/server\";\r\nimport { serverEnv } from \"~/env\";\r\nimport type { ProviderId, User } from \"~/models/User\";\r\n\r\nexport interface AppSessionData {\r\n /** Which identity provider signed this user in. */\r\n provider?: ProviderId;\r\n /** The only token persisted; delegated access tokens are minted from it. */\r\n refreshToken?: string;\r\n user?: User;\r\n /** Transient, only between /auth/login and /auth/callback. */\r\n pkceVerifier?: string;\r\n state?: string;\r\n returnTo?: string;\r\n}\r\n\r\n/** `SessionManager` is not re-exported upstream, so name it through `useSession`. */\r\nexport type AppSession = Awaited<ReturnType<typeof useSession<AppSessionData>>>;\r\n\r\nexport const getAppSession = async (): Promise<AppSession> => {\r\n // Dynamic import: `@tanstack/react-start/server` is the server entry and drags\r\n // in the SSR renderer (`react-dom/server`). Keep it out of the client graph —\r\n // this helper is only ever called server-side, and all callers already await it.\r\n // Aliased off the `use*` name so it isn't mistaken for a React hook (it's a\r\n // server session helper, not a hook).\r\n const { useSession: getSession } = await import(\"@tanstack/react-start/server\");\r\n\r\n return getSession<AppSessionData>({\r\n name: \"session\",\r\n password: serverEnv.SESSION_SECRET,\r\n });\r\n};\r\n","import { queryOptions } from \"@tanstack/react-query\";\nimport { createServerFn } from \"@tanstack/react-start\";\nimport type { QueryClientParam } from \"~/models/QueryClientParam\";\nimport type { ProviderId, User } from \"~/models/User\";\nimport { OFFLINE_USER_KEY, withOfflineFallback } from \"./offline\";\nimport { getAppSession } from \"./session\";\n\n/**\n * Reads the signed-in user from the session cookie, or null. As a server function\n * it runs in-process when called on the server (SSR, middleware) and as an RPC\n * when called from the client — so it doubles as the client `queryFn`.\n */\nexport const getSessionUser = createServerFn({ method: \"GET\" }).handler(\n async (): Promise<User | null> => {\n const session = await getAppSession();\n return session.data.user ?? null;\n },\n);\n\n/** The identity providers the server offers, for the login page. */\nexport const getLoginProviders = createServerFn({ method: \"GET\" }).handler(\n async (): Promise<Array<{ id: ProviderId; label: string }>> => {\n // Dynamic import: `providers` reads `serverEnv` and must not reach the client.\n const { providers } = await import(\"./providers\");\n return providers.map(({ id, label }) => ({ id, label }));\n },\n);\n\n/**\n * Feeds `LoginForm`. Server config, not per-user, so it is safe to prime on the\n * server — the `/login` route's loader does that to avoid a flash of empty card.\n */\nexport const loginProvidersQueryOptions = queryOptions({\n queryKey: [\"auth\", \"providers\"],\n queryFn: () => getLoginProviders(),\n staleTime: \"static\",\n});\n\n/**\n * Client-side query for the signed-in user. Shared between `getUser` (route\n * `beforeLoad`) and the always-mounted observer in `LayoutProvider` — the\n * observer is what seeds the offline snapshot on the very first page load\n * (`beforeLoad` does not re-run after SSR hydration) and what makes\n * `refetchOnReconnect` fire once connectivity returns.\n */\nexport const userQueryOptions = queryOptions({\n queryKey: [\"auth\", \"user\"],\n queryFn: () => withOfflineFallback(OFFLINE_USER_KEY, () => getSessionUser()),\n staleTime: Infinity,\n // Default \"online\" pauses the query (never calling queryFn) once the browser\n // reports no connection — which is exactly when the fallback is needed.\n networkMode: \"offlineFirst\",\n // Back online: re-confirm the session and re-stamp the snapshot's grace period.\n refetchOnReconnect: \"always\",\n});\n\nexport const getUser = ({ queryClient }: QueryClientParam): Promise<User | null> => {\n if (import.meta.env.SSR) return getSessionUser();\n\n return queryClient.ensureQueryData(userQueryOptions);\n};\n","import type { AnyFieldApi } from \"@tanstack/react-form\";\nimport { redirect } from \"@tanstack/react-router\";\nimport type { ParsedLocation } from \"@tanstack/react-router\";\nimport { manifest, permissions } from \"virtual:wcz-layout\";\nimport type { QueryClientParam } from \"~/models/QueryClientParam\";\nimport type { TokenPayload } from \"~/models/TokenPayload\";\nimport type { ProviderId, User } from \"~/models/User\";\nimport { getUser } from \"./auth/user\";\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: manifest.name },\n { name: \"og:type\", content: \"website\" },\n { name: \"og:title\", content: manifest.name },\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\ntype GuardArgs = { location: ParsedLocation; context: QueryClientParam };\n\n/**\n * Route guard for `beforeLoad`. Routes are public by default; add this to close one.\n *\n * - `requireAuth()` — signed in with any provider. The only gate a population\n * without permission groups (e.g. AWS users) can pass.\n * - `requireAuth(\"admin\")` — signed in *and* in a group listed under that key.\n *\n * `reloadDocument` is required: `/auth/login` is a component-less server route and\n * must be reached with a full-document navigation. It starts the login directly when\n * only one provider is registered, otherwise it forwards to the `/login` chooser.\n */\nexport const requireAuth = (permissionKey?: keyof typeof permissions) => {\n return async ({ location, context }: GuardArgs) => {\n const user = await getUser({ queryClient: context.queryClient });\n\n if (!user)\n throw redirect({\n href: `/auth/login?returnTo=${encodeURIComponent(location.href)}`,\n reloadDocument: true,\n });\n\n if (permissionKey && !hasPermission(user, permissionKey))\n throw new Error(\"You do not have permission to access this page.\");\n\n return { user };\n };\n};\n\n/* Internal Utils */\nconst NON_PRODUCTION = /(?:^|[.-])(?:dev|qas|uat|test)(?:[.-]|$)/i;\n\n/** True only for a dev/qas/uat/test domain — localhost and production are not. */\nexport const isTestEnv = (origin: string | undefined) =>\n NON_PRODUCTION.test((origin ?? \"\").split(\".\").slice(1).join(\".\"));\n\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\n/**\n * Only same-origin paths are allowed, so `returnTo` cannot become an open\n * redirect. Backslash counts as a separator too: browsers normalize `/\\evil`\n * to the protocol-relative `//evil`.\n */\nexport const sanitizeReturnTo = (value: string | null | undefined): string =>\n value && /^\\/(?![/\\\\])/.test(value) ? value : \"/\";\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 foldForSearch = (value: unknown): string =>\n String(value ?? \"\")\n .toLowerCase()\n .normalize(\"NFD\")\n .replaceAll(/[\\u{300}-\\u{36F}]/gu, \"\")\n .normalize(\"NFC\");\n\nconst permissionGroups = new Set<string>(Object.values(permissions).flat());\n\n/**\n * Maps id/access-token claims to the serializable `User`. Groups are trimmed to\n * those named in `permissions.ts` — an unfiltered group list would blow the\n * cookie. Cognito's claim names differ, so both are read.\n */\nexport const buildUser = (payload: TokenPayload, provider: ProviderId): User => ({\n provider,\n name: (payload.name ?? payload[\"cognito:username\"] ?? \"\").split(\"/\")[0],\n email: (payload.preferred_username ?? payload.email ?? \"\").toLowerCase(),\n department: payload.department?.toUpperCase() || \"\",\n employeeId: (payload.employeeId ?? payload[\"cognito:username\"] ?? \"\").toUpperCase(),\n companyName: payload.companyName || \"\",\n groups:\n (payload.groups ?? payload[\"cognito:groups\"])?.filter((group) => permissionGroups.has(group)) ??\n [],\n});\n\nexport const hasPermission = (user: User | null, key: keyof typeof permissions): boolean =>\n user ? permissions[key].some((group) => user.groups.includes(group)) : false;\n"],"mappings":";;;;;;;;;;;;;;AAQA,MAAaA,mBAAmB;AAChC,MAAaC,oBAAoB;;AAGjC,MAAMC,eAAe;AAIrB,MAAMK,UAAaC,QAA0B;CAC3C,IAAI,OAAOC,iBAAiB,aAAa,OAAO;CAChD,IAAI;EACF,MAAMC,MAAMD,aAAaE,QAAQH,GAAG;EACpC,IAAI,CAACE,KAAK,OAAO;EACjB,MAAM,EAAEN,OAAOE,YAAYM,KAAKC,MAAMH,GAAG;EACzC,IAAII,KAAKC,IAAI,IAAIT,UAAUJ,cAAc;GACvCO,aAAaO,WAAWR,GAAG;GAC3B,OAAO;EACT;EACA,OAAOJ;CACT,QAAQ;EACNK,aAAaO,WAAWR,GAAG;EAC3B,OAAO;CACT;AACF;AAEA,MAAMS,YAAYT,KAAaJ,UAAyB;CACtD,IAAI,OAAOK,iBAAiB,aAAa;CACzC,IAAI;EACF,IAAIL,UAAU,QAAQA,UAAUc,KAAAA,GAAWT,aAAaO,WAAWR,GAAG;OACjEC,aAAaU,QAAQX,KAAKI,KAAKQ,UAAU;GAAEhB;GAAOE,SAASQ,KAAKC,IAAI;EAAE,CAAC,CAAC;CAC/E,QAAQ,CACN;AAEJ;AAEA,MAAMM,oBAAoBC,UACvB,OAAOC,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