@datatechsolutions/ui 3.11.2 → 3.12.1
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/astrlabe/index.js +108 -108
- package/dist/astrlabe/index.mjs +4 -4
- package/dist/astrlabe/workflow-canvas.js +4 -4
- package/dist/astrlabe/workflow-canvas.mjs +3 -3
- package/dist/{chunk-TZA5T4MJ.mjs → chunk-4D23CQZM.mjs} +80 -16
- package/dist/chunk-4D23CQZM.mjs.map +1 -0
- package/dist/{chunk-5Y67PZWC.js → chunk-5OZTI7TR.js} +4 -4
- package/dist/{chunk-5Y67PZWC.js.map → chunk-5OZTI7TR.js.map} +1 -1
- package/dist/{chunk-5TJR3VJ6.mjs → chunk-5TLKFOEL.mjs} +4 -4
- package/dist/{chunk-5TJR3VJ6.mjs.map → chunk-5TLKFOEL.mjs.map} +1 -1
- package/dist/{chunk-N7T4X6A7.mjs → chunk-BPMYNE7S.mjs} +3 -3
- package/dist/{chunk-N7T4X6A7.mjs.map → chunk-BPMYNE7S.mjs.map} +1 -1
- package/dist/{chunk-JBXNEOFB.mjs → chunk-EDI46QA7.mjs} +3 -3
- package/dist/{chunk-JBXNEOFB.mjs.map → chunk-EDI46QA7.mjs.map} +1 -1
- package/dist/{chunk-3BFQ3SVG.js → chunk-FKRIQYRG.js} +68 -68
- package/dist/{chunk-3BFQ3SVG.js.map → chunk-FKRIQYRG.js.map} +1 -1
- package/dist/{chunk-HLIMHIRH.js → chunk-HTODLUKG.js} +9 -9
- package/dist/{chunk-HLIMHIRH.js.map → chunk-HTODLUKG.js.map} +1 -1
- package/dist/{chunk-BGLYJ7GR.js → chunk-ID55ABBB.js} +35 -35
- package/dist/{chunk-BGLYJ7GR.js.map → chunk-ID55ABBB.js.map} +1 -1
- package/dist/{chunk-MCHTZ63Q.js → chunk-LRNVB7MO.js} +4 -4
- package/dist/{chunk-MCHTZ63Q.js.map → chunk-LRNVB7MO.js.map} +1 -1
- package/dist/{chunk-Y4YIGEX6.js → chunk-MFF37C24.js} +135 -135
- package/dist/{chunk-Y4YIGEX6.js.map → chunk-MFF37C24.js.map} +1 -1
- package/dist/{chunk-TXI3QDYE.js → chunk-MYHBXIO2.js} +34 -34
- package/dist/{chunk-TXI3QDYE.js.map → chunk-MYHBXIO2.js.map} +1 -1
- package/dist/{chunk-OZEOBZOW.mjs → chunk-N5GQIT7A.mjs} +7 -7
- package/dist/{chunk-OZEOBZOW.mjs.map → chunk-N5GQIT7A.mjs.map} +1 -1
- package/dist/{chunk-AVLOGVVA.mjs → chunk-NK4H3JWN.mjs} +3 -3
- package/dist/{chunk-AVLOGVVA.mjs.map → chunk-NK4H3JWN.mjs.map} +1 -1
- package/dist/{chunk-RUWUH7DW.mjs → chunk-NQGLSM46.mjs} +3 -3
- package/dist/{chunk-RUWUH7DW.mjs.map → chunk-NQGLSM46.mjs.map} +1 -1
- package/dist/{chunk-KGC5CRS7.mjs → chunk-OM5NNUD2.mjs} +3 -3
- package/dist/{chunk-KGC5CRS7.mjs.map → chunk-OM5NNUD2.mjs.map} +1 -1
- package/dist/{chunk-D5FL3ZHC.mjs → chunk-OW5LSEHU.mjs} +86 -43
- package/dist/chunk-OW5LSEHU.mjs.map +1 -0
- package/dist/{chunk-WSXP645I.mjs → chunk-PIIY2Z2O.mjs} +3 -3
- package/dist/{chunk-WSXP645I.mjs.map → chunk-PIIY2Z2O.mjs.map} +1 -1
- package/dist/{chunk-5JS3UFBF.js → chunk-PLEWG2L7.js} +13 -13
- package/dist/{chunk-5JS3UFBF.js.map → chunk-PLEWG2L7.js.map} +1 -1
- package/dist/{chunk-5NKGJV72.js → chunk-QSCWV47U.js} +25 -25
- package/dist/{chunk-5NKGJV72.js.map → chunk-QSCWV47U.js.map} +1 -1
- package/dist/{chunk-4PUVECVF.mjs → chunk-RBH723MG.mjs} +3 -3
- package/dist/{chunk-4PUVECVF.mjs.map → chunk-RBH723MG.mjs.map} +1 -1
- package/dist/{chunk-NDGYIHJ3.mjs → chunk-RT264BD4.mjs} +3 -3
- package/dist/{chunk-NDGYIHJ3.mjs.map → chunk-RT264BD4.mjs.map} +1 -1
- package/dist/{chunk-3J4E2THD.js → chunk-TDNBO3V7.js} +45 -45
- package/dist/{chunk-3J4E2THD.js.map → chunk-TDNBO3V7.js.map} +1 -1
- package/dist/{chunk-6R5Z2IQ5.js → chunk-ULKZGM2T.js} +86 -43
- package/dist/chunk-ULKZGM2T.js.map +1 -0
- package/dist/{chunk-JXROBMRU.mjs → chunk-UVFWKDRO.mjs} +3 -3
- package/dist/{chunk-JXROBMRU.mjs.map → chunk-UVFWKDRO.mjs.map} +1 -1
- package/dist/{chunk-GDVB7QDZ.js → chunk-V3UZCOZI.js} +102 -38
- package/dist/chunk-V3UZCOZI.js.map +1 -0
- package/dist/{chunk-V32NUE5U.js → chunk-VYU2FYDE.js} +55 -55
- package/dist/{chunk-V32NUE5U.js.map → chunk-VYU2FYDE.js.map} +1 -1
- package/dist/{chunk-M64U336M.mjs → chunk-WLNY3GVM.mjs} +6 -6
- package/dist/{chunk-M64U336M.mjs.map → chunk-WLNY3GVM.mjs.map} +1 -1
- package/dist/{chunk-LW2LFJZ7.js → chunk-XGAPZT4J.js} +36 -36
- package/dist/{chunk-LW2LFJZ7.js.map → chunk-XGAPZT4J.js.map} +1 -1
- package/dist/{chunk-LBCUQ4FY.mjs → chunk-YYNGXKUE.mjs} +3 -3
- package/dist/{chunk-LBCUQ4FY.mjs.map → chunk-YYNGXKUE.mjs.map} +1 -1
- package/dist/{chunk-N5FWIT7N.js → chunk-Z75CEP4V.js} +10 -10
- package/dist/{chunk-N5FWIT7N.js.map → chunk-Z75CEP4V.js.map} +1 -1
- package/dist/index.d.mts +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +663 -663
- package/dist/index.mjs +2 -2
- package/dist/platform/admin/index.js +10 -10
- package/dist/platform/admin/index.mjs +4 -4
- package/dist/platform/agents-workspace.js +7 -7
- package/dist/platform/agents-workspace.mjs +6 -6
- package/dist/platform/app-shell.js +4 -4
- package/dist/platform/app-shell.mjs +3 -3
- package/dist/platform/auth/index.js +22 -22
- package/dist/platform/auth/index.mjs +4 -4
- package/dist/platform/billing/index.js +4 -4
- package/dist/platform/billing/index.mjs +3 -3
- package/dist/platform/impersonation/index.js +4 -4
- package/dist/platform/impersonation/index.mjs +3 -3
- package/dist/platform/index.d.mts +1 -1
- package/dist/platform/index.d.ts +1 -1
- package/dist/platform/index.js +86 -86
- package/dist/platform/index.mjs +18 -18
- package/dist/platform/pages/index.d.mts +75 -16
- package/dist/platform/pages/index.d.ts +75 -16
- package/dist/platform/pages/index.js +1089 -505
- package/dist/platform/pages/index.js.map +1 -1
- package/dist/platform/pages/index.mjs +789 -205
- package/dist/platform/pages/index.mjs.map +1 -1
- package/dist/platform/settings/index.js +7 -7
- package/dist/platform/settings/index.mjs +6 -6
- package/dist/platform/workflow-canvas-shell.js +5 -5
- package/dist/platform/workflow-canvas-shell.mjs +4 -4
- package/package.json +1 -1
- package/dist/chunk-6R5Z2IQ5.js.map +0 -1
- package/dist/chunk-D5FL3ZHC.mjs.map +0 -1
- package/dist/chunk-GDVB7QDZ.js.map +0 -1
- package/dist/chunk-TZA5T4MJ.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkULKZGM2T_js = require('./chunk-ULKZGM2T.js');
|
|
5
5
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
6
6
|
var chunkS7KHTUHA_js = require('./chunk-S7KHTUHA.js');
|
|
7
7
|
var react = require('react');
|
|
@@ -11,7 +11,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
11
11
|
|
|
12
12
|
var PlatformStateContext = react.createContext(null);
|
|
13
13
|
function PlatformStateProvider({ children, normalizeRole }) {
|
|
14
|
-
const { user } =
|
|
14
|
+
const { user } = chunkULKZGM2T_js.useAuth();
|
|
15
15
|
const state = react.useMemo(() => {
|
|
16
16
|
const organizationId = user?.organizationId ?? "";
|
|
17
17
|
const actor = user ? {
|
|
@@ -33,7 +33,7 @@ function usePlatformState() {
|
|
|
33
33
|
}
|
|
34
34
|
function resolveFlag(locale) {
|
|
35
35
|
const code = locale === "pt-BR" ? "br" : locale;
|
|
36
|
-
return
|
|
36
|
+
return chunkULKZGM2T_js.LOCALE_FLAGS?.[code];
|
|
37
37
|
}
|
|
38
38
|
function PlatformAppShell({
|
|
39
39
|
appName,
|
|
@@ -50,12 +50,12 @@ function PlatformAppShell({
|
|
|
50
50
|
children
|
|
51
51
|
}) {
|
|
52
52
|
const tCommon = chunkYXN2K77G_js.useTranslations("common");
|
|
53
|
-
const { user, status, logout } =
|
|
53
|
+
const { user, status, logout } = chunkULKZGM2T_js.useAuth();
|
|
54
54
|
usePlatformState();
|
|
55
|
-
const { resolvedTheme, setTheme, dockPosition, dockAutoHide, dockEnabled } =
|
|
55
|
+
const { resolvedTheme, setTheme, dockPosition, dockAutoHide, dockEnabled } = chunkULKZGM2T_js.usePlatformPreferences();
|
|
56
56
|
const pathname = chunkS7KHTUHA_js.usePathname();
|
|
57
57
|
const router = chunkS7KHTUHA_js.useRouter();
|
|
58
|
-
const { history, openHistory } =
|
|
58
|
+
const { history, openHistory } = chunkULKZGM2T_js.useNotifications();
|
|
59
59
|
const currentLocale = chunkYXN2K77G_js.useLocale();
|
|
60
60
|
const localeMeta = i18n.LANGUAGE_META[currentLocale];
|
|
61
61
|
const items = react.useMemo(() => navigationItems.filter((item) => {
|
|
@@ -83,7 +83,7 @@ function PlatformAppShell({
|
|
|
83
83
|
organizationId: user.organizationId ?? null
|
|
84
84
|
} : null;
|
|
85
85
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
-
|
|
86
|
+
chunkULKZGM2T_js.PlatformShell,
|
|
87
87
|
{
|
|
88
88
|
items,
|
|
89
89
|
launchpadPageOrder: pageOrder,
|
|
@@ -129,5 +129,5 @@ function PlatformAppShell({
|
|
|
129
129
|
exports.PlatformAppShell = PlatformAppShell;
|
|
130
130
|
exports.PlatformStateProvider = PlatformStateProvider;
|
|
131
131
|
exports.usePlatformState = usePlatformState;
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-HTODLUKG.js.map
|
|
133
|
+
//# sourceMappingURL=chunk-HTODLUKG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/platform/platform-state-provider.tsx","../src/platform/app-shell.tsx"],"names":["createContext","useAuth","useMemo","useContext","LOCALE_FLAGS","useTranslations","usePlatformPreferences","usePathname","useRouter","useNotifications","useLocale","LANGUAGE_META","useCallback","jsx","PlatformShell","RectangleStackIcon","HomeIcon"],"mappings":";;;;;;;;;;AAQA,IAAM,oBAAA,GAAuBA,oBAAoC,IAAI,CAAA;AAa9D,SAAS,qBAAA,CAAsB,EAAE,QAAA,EAAU,aAAA,EAAc,EAA+B;AAC7F,EAAA,MAAM,EAAE,IAAA,EAAK,GAAIC,wBAAA,EAAQ;AAEzB,EAAA,MAAM,KAAA,GAAQC,cAAuB,MAAM;AACzC,IAAA,MAAM,cAAA,GAAiB,MAAM,cAAA,IAAkB,EAAA;AAE/C,IAAA,MAAM,QAAyB,IAAA,GAC3B;AAAA,MACA,GAAG,IAAA;AAAA,MACH,IAAA,EAAM,aAAA,CAAc,IAAA,CAAK,IAAI,CAAA;AAAA,MAC7B;AAAA,KACF,GACE,IAAA;AAEJ,IAAA,OAAO;AAAA,MACL,qBAAA,EAAuB,cAAA;AAAA,MACvB;AAAA,KACF;AAAA,EACF,CAAA,EAAG,CAAC,IAAA,EAAM,aAAa,CAAC,CAAA;AAExB,EAAA,sCACG,oBAAA,CAAqB,QAAA,EAArB,EAA8B,KAAA,EAAO,OACnC,QAAA,EACH,CAAA;AAEJ;AAEO,SAAS,gBAAA,GAAmB;AACjC,EAAA,MAAM,OAA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A;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,MACA,aAAA;AAAA,MACA,aAAA,EAAe,iBAAA;AAAA,MACf,QAAA;AAAA,MACA,UAAA,EAAY,cAAA;AAAA,MACZ,UAAA,EAAY,cAAA;AAAA,MACZ,OAAA;AAAA,MACA,SAAS,OAAA,oBAAWD,cAAAA,CAACE,0BAAA,EAAA,EAAmB,WAAU,eAAA,EAAgB,CAAA;AAAA,MAClE,UAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,eAAe,aAAA,IAAiBC,gBAAA;AAAA,MAChC,mBAAmB,OAAA,CAAQ,MAAA;AAAA,MAC3B,eAAA,EAAiB,WAAA;AAAA,MACjB,MAAA,EAAQ;AAAA,QACN,IAAA,EAAM,QAAQ,MAAM,CAAA;AAAA,QACpB,OAAA,EAAS,QAAQ,SAAS,CAAA;AAAA,QAC1B,OAAA,EAAS,QAAQ,SAAS,CAAA;AAAA,QAC1B,mBAAA,EAAqB,QAAQ,qBAAqB,CAAA;AAAA,QAClD,MAAA,EAAQ,QAAQ,QAAQ,CAAA;AAAA,QACxB,aAAA,EAAe,QAAQ,eAAe,CAAA;AAAA,QACtC,KAAA,EAAO,QAAQ,OAAO,CAAA;AAAA,QACtB,cAAc,aAAA,KAAkB,MAAA,GAAS,QAAQ,UAAU,CAAA,GAAI,QAAQ,WAAW,CAAA;AAAA,QAClF,QAAA,EAAU,QAAQ,UAAU,CAAA;AAAA,QAC5B,aAAA,EAAe,YAAY,UAAA,IAAc,aAAA;AAAA,QACzC,UAAA,EAAY,YAAY,aAAa,CAAA;AAAA,QACrC,OAAA,EAAS,QAAQ,SAAS;AAAA,OAC5B;AAAA,MACC,GAAI,aAAA,GAAgB,EAAE,aAAA,EAAe,aAAA,KAAkB,EAAC;AAAA,MAExD;AAAA;AAAA,GACH;AAEJ","file":"chunk-HLIMHIRH.js","sourcesContent":["import { createContext, useContext, useMemo, type ReactNode } from 'react'\nimport { useAuth, type AuthUser } from '../_auth'\n\ntype PlatformState = {\n currentOrganizationId: string\n actor: AuthUser | null\n}\n\nconst PlatformStateContext = createContext<PlatformState | null>(null)\n\nexport type PlatformStateProviderProps = {\n children: ReactNode\n /**\n * Function that converts a JWT role claim to the app's canonical role\n * union (the same `normalizePlatformRole` produced by\n * `createPlatformRbac()` in this app). Lifted out as a prop because\n * each consuming app uses its own role enum.\n */\n normalizeRole: (input: unknown) => string\n}\n\nexport function PlatformStateProvider({ children, normalizeRole }: PlatformStateProviderProps) {\n const { user } = useAuth()\n\n const state = useMemo<PlatformState>(() => {\n const organizationId = user?.organizationId ?? ''\n\n const actor: AuthUser | null = user\n ? {\n ...user,\n role: normalizeRole(user.role),\n organizationId,\n }\n : null\n\n return {\n currentOrganizationId: organizationId,\n actor,\n }\n }, [user, normalizeRole])\n\n return (\n <PlatformStateContext.Provider value={state}>\n {children}\n </PlatformStateContext.Provider>\n )\n}\n\nexport function usePlatformState() {\n const context = useContext(PlatformStateContext)\n if (!context) throw new Error('usePlatformState must be used inside PlatformStateProvider')\n return context\n}\n","import { useCallback, useMemo, type ComponentType, type ReactNode } from 'react'\nimport { RectangleStackIcon, HomeIcon } from '@heroicons/react/24/outline'\nimport { useAuth, usePlatformPreferences } from '../_auth'\nimport { LANGUAGE_META } from '@datatechsolutions/shared-domain/i18n'\nimport {\n PlatformShell,\n type NavigationItem,\n} from '@ui/index'\nimport { useNotifications } from '@ui/components/notifications'\nimport { useLocale, useTranslations } from '@ui/lib/i18n-context'\nimport { usePathname, useRouter } from '@ui/lib/router-context'\nimport { LOCALE_FLAGS } from '@ui/lib/locale-flags'\nimport { usePlatformState } from './platform-state-provider'\n\nfunction resolveFlag(locale: string): string | undefined {\n const code = locale === 'pt-BR' ? 'br' : locale\n return LOCALE_FLAGS?.[code as keyof typeof LOCALE_FLAGS]\n}\n\nexport type PlatformAppShellProps = {\n /** App display name (e.g. \"Astrlabe\"). */\n appName: string\n /** Tailwind gradient classes for the shell branding (e.g. \"from-sky-500 to-indigo-600\"). */\n appGradient: string\n /** Branded logo node rendered inside the flyout trigger. */\n appLogo: ReactNode\n /**\n * Optional app icon for the branded loader (defaults to the platform's\n * RectangleStackIcon if omitted).\n */\n appIcon?: ReactNode\n /**\n * When the appIcon is a brand SVG that has its own background\n * (gradient, fill, etc), set this to true so the BrandedLoader\n * doesn't wrap it in a second gradient container.\n */\n appIconRaw?: boolean\n /**\n * Optional override for the dock dashboard icon (defaults to HomeIcon).\n */\n dashboardIcon?: ComponentType<{ className?: string }>\n\n /** App-specific navigation items already pre-translated. */\n navigationItems: NavigationItem[]\n /** Custom ordering of launchpad page tiles. */\n pageOrder: string[]\n /**\n * Map of navigation/module ID → required permission name. The shell\n * filters `navigationItems` so that any item whose ID has an entry here\n * is hidden unless `hasPermission` returns true for the listed permission.\n */\n modulePermissions: Record<string, string>\n /**\n * Permission predicate, typically `(p) => can(actor, p)` from each app's\n * `createPlatformRbac()` factory.\n */\n hasPermission: (permission: string) => boolean\n\n /**\n * Optional settings/profile drawer content (e.g. an app-specific\n * `<SettingsModal>`). Receives the open state + close handler the shell\n * manages internally so the drawer renders inside the shell chrome.\n */\n settingsModal?: (props: { open: boolean; onClose: () => void }) => ReactNode\n\n children: ReactNode\n}\n\n/**\n * Cross-app platform shell — wires `<PlatformShell>` from ui to windsock's\n * auth + preferences hooks and to ui's i18n/router contexts. Each app\n * passes its own logo, gradient, navigation, and permission predicate; the\n * rest of the chrome (header, dock, flyout, sign-out confirm modal) is\n * shared.\n */\nexport function PlatformAppShell({\n appName,\n appGradient,\n appLogo,\n appIcon,\n appIconRaw,\n dashboardIcon,\n navigationItems,\n pageOrder,\n modulePermissions,\n hasPermission,\n settingsModal,\n children,\n}: PlatformAppShellProps) {\n const tCommon = useTranslations('common')\n const { user, status, logout } = useAuth()\n // Validate the platform-state provider is mounted above this shell;\n // the actor itself isn't read here, but the same provider feeds children.\n usePlatformState()\n const { resolvedTheme, setTheme, dockPosition, dockAutoHide, dockEnabled } = usePlatformPreferences()\n const pathname = usePathname()\n const router = useRouter()\n const { history, openHistory } = useNotifications()\n const currentLocale = useLocale()\n const localeMeta = LANGUAGE_META[currentLocale as keyof typeof LANGUAGE_META]\n\n const items = useMemo(() => navigationItems.filter((item) => {\n const permission = modulePermissions[item.id]\n if (!permission) return true\n return hasPermission(permission)\n }), [navigationItems, modulePermissions, hasPermission])\n\n const handleSignOut = useCallback(() => { void logout('/login') }, [logout])\n const handleToggleTheme = useCallback(\n () => { setTheme(resolvedTheme === 'dark' ? 'light' : 'dark') },\n [resolvedTheme, setTheme],\n )\n const handleNavigate = useCallback((href: string) => router.push(href), [router])\n const handlePrefetch = useCallback((href: string) => router.prefetch(href), [router])\n\n const shellUser = user\n ? {\n name: user.name ?? null,\n email: user.email ?? null,\n image: user.image ?? null,\n role: user.role ?? null,\n permissions: user.permissions as string[] | undefined,\n organizationId: user.organizationId ?? null,\n }\n : null\n\n return (\n <PlatformShell\n items={items}\n launchpadPageOrder={pageOrder}\n user={shellUser}\n authStatus={status}\n onSignOut={handleSignOut}\n dockPosition={dockPosition}\n dockAutoHide={dockAutoHide}\n dockEnabled={dockEnabled}\n resolvedTheme={resolvedTheme}\n onToggleTheme={handleToggleTheme}\n pathname={pathname}\n onNavigate={handleNavigate}\n onPrefetch={handlePrefetch}\n appName={appName}\n appIcon={appIcon ?? <RectangleStackIcon className=\"h-full w-full\" />}\n appIconRaw={appIconRaw}\n appLogo={appLogo}\n appGradient={appGradient}\n dashboardIcon={dashboardIcon ?? HomeIcon}\n notificationCount={history.length}\n onNotifications={openHistory}\n labels={{\n home: tCommon('home'),\n profile: tCommon('profile'),\n signOut: tCommon('signOut'),\n signOutConfirmTitle: tCommon('signOutConfirmTitle'),\n cancel: tCommon('cancel'),\n notifications: tCommon('notifications'),\n theme: tCommon('theme'),\n currentTheme: resolvedTheme === 'dark' ? tCommon('darkMode') : tCommon('lightMode'),\n language: tCommon('language'),\n currentLocale: localeMeta?.nativeName ?? currentLocale,\n localeFlag: resolveFlag(currentLocale),\n actions: tCommon('actions'),\n }}\n {...(settingsModal ? { profileDrawer: settingsModal } : {})}\n >\n {children}\n </PlatformShell>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/platform/platform-state-provider.tsx","../src/platform/app-shell.tsx"],"names":["createContext","useAuth","useMemo","useContext","LOCALE_FLAGS","useTranslations","usePlatformPreferences","usePathname","useRouter","useNotifications","useLocale","LANGUAGE_META","useCallback","jsx","PlatformShell","RectangleStackIcon","HomeIcon"],"mappings":";;;;;;;;;;AAQA,IAAM,oBAAA,GAAuBA,oBAAoC,IAAI,CAAA;AAa9D,SAAS,qBAAA,CAAsB,EAAE,QAAA,EAAU,aAAA,EAAc,EAA+B;AAC7F,EAAA,MAAM,EAAE,IAAA,EAAK,GAAIC,wBAAA,EAAQ;AAEzB,EAAA,MAAM,KAAA,GAAQC,cAAuB,MAAM;AACzC,IAAA,MAAM,cAAA,GAAiB,MAAM,cAAA,IAAkB,EAAA;AAE/C,IAAA,MAAM,QAAyB,IAAA,GAC3B;AAAA,MACA,GAAG,IAAA;AAAA,MACH,IAAA,EAAM,aAAA,CAAc,IAAA,CAAK,IAAI,CAAA;AAAA,MAC7B;AAAA,KACF,GACE,IAAA;AAEJ,IAAA,OAAO;AAAA,MACL,qBAAA,EAAuB,cAAA;AAAA,MACvB;AAAA,KACF;AAAA,EACF,CAAA,EAAG,CAAC,IAAA,EAAM,aAAa,CAAC,CAAA;AAExB,EAAA,sCACG,oBAAA,CAAqB,QAAA,EAArB,EAA8B,KAAA,EAAO,OACnC,QAAA,EACH,CAAA;AAEJ;AAEO,SAAS,gBAAA,GAAmB;AACjC,EAAA,MAAM,OAAA,GAAUC,iBAAW,oBAAoB,CAAA;AAC/C,EAAA,IAAI,CAAC,OAAA,EAAS,MAAM,IAAI,MAAM,4DAA4D,CAAA;AAC1F,EAAA,OAAO,OAAA;AACT;ACtCA,SAAS,YAAY,MAAA,EAAoC;AACvD,EAAA,MAAM,IAAA,GAAO,MAAA,KAAW,OAAA,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AA,CAACE,0BAAA,EAAA,EAAmB,WAAU,eAAA,EAAgB,CAAA;AAAA,MAClE,UAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,eAAe,aAAA,IAAiBC,gBAAA;AAAA,MAChC,mBAAmB,OAAA,CAAQ,MAAA;AAAA,MAC3B,eAAA,EAAiB,WAAA;AAAA,MACjB,MAAA,EAAQ;AAAA,QACN,IAAA,EAAM,QAAQ,MAAM,CAAA;AAAA,QACpB,OAAA,EAAS,QAAQ,SAAS,CAAA;AAAA,QAC1B,OAAA,EAAS,QAAQ,SAAS,CAAA;AAAA,QAC1B,mBAAA,EAAqB,QAAQ,qBAAqB,CAAA;AAAA,QAClD,MAAA,EAAQ,QAAQ,QAAQ,CAAA;AAAA,QACxB,aAAA,EAAe,QAAQ,eAAe,CAAA;AAAA,QACtC,KAAA,EAAO,QAAQ,OAAO,CAAA;AAAA,QACtB,cAAc,aAAA,KAAkB,MAAA,GAAS,QAAQ,UAAU,CAAA,GAAI,QAAQ,WAAW,CAAA;AAAA,QAClF,QAAA,EAAU,QAAQ,UAAU,CAAA;AAAA,QAC5B,aAAA,EAAe,YAAY,UAAA,IAAc,aAAA;AAAA,QACzC,UAAA,EAAY,YAAY,aAAa,CAAA;AAAA,QACrC,OAAA,EAAS,QAAQ,SAAS;AAAA,OAC5B;AAAA,MACC,GAAI,aAAA,GAAgB,EAAE,aAAA,EAAe,aAAA,KAAkB,EAAC;AAAA,MAExD;AAAA;AAAA,GACH;AAEJ","file":"chunk-HTODLUKG.js","sourcesContent":["import { createContext, useContext, useMemo, type ReactNode } from 'react'\nimport { useAuth, type AuthUser } from '../_auth'\n\ntype PlatformState = {\n currentOrganizationId: string\n actor: AuthUser | null\n}\n\nconst PlatformStateContext = createContext<PlatformState | null>(null)\n\nexport type PlatformStateProviderProps = {\n children: ReactNode\n /**\n * Function that converts a JWT role claim to the app's canonical role\n * union (the same `normalizePlatformRole` produced by\n * `createPlatformRbac()` in this app). Lifted out as a prop because\n * each consuming app uses its own role enum.\n */\n normalizeRole: (input: unknown) => string\n}\n\nexport function PlatformStateProvider({ children, normalizeRole }: PlatformStateProviderProps) {\n const { user } = useAuth()\n\n const state = useMemo<PlatformState>(() => {\n const organizationId = user?.organizationId ?? ''\n\n const actor: AuthUser | null = user\n ? {\n ...user,\n role: normalizeRole(user.role),\n organizationId,\n }\n : null\n\n return {\n currentOrganizationId: organizationId,\n actor,\n }\n }, [user, normalizeRole])\n\n return (\n <PlatformStateContext.Provider value={state}>\n {children}\n </PlatformStateContext.Provider>\n )\n}\n\nexport function usePlatformState() {\n const context = useContext(PlatformStateContext)\n if (!context) throw new Error('usePlatformState must be used inside PlatformStateProvider')\n return context\n}\n","import { useCallback, useMemo, type ComponentType, type ReactNode } from 'react'\nimport { RectangleStackIcon, HomeIcon } from '@heroicons/react/24/outline'\nimport { useAuth, usePlatformPreferences } from '../_auth'\nimport { LANGUAGE_META } from '@datatechsolutions/shared-domain/i18n'\nimport {\n PlatformShell,\n type NavigationItem,\n} from '@ui/index'\nimport { useNotifications } from '@ui/components/notifications'\nimport { useLocale, useTranslations } from '@ui/lib/i18n-context'\nimport { usePathname, useRouter } from '@ui/lib/router-context'\nimport { LOCALE_FLAGS } from '@ui/lib/locale-flags'\nimport { usePlatformState } from './platform-state-provider'\n\nfunction resolveFlag(locale: string): string | undefined {\n const code = locale === 'pt-BR' ? 'br' : locale\n return LOCALE_FLAGS?.[code as keyof typeof LOCALE_FLAGS]\n}\n\nexport type PlatformAppShellProps = {\n /** App display name (e.g. \"Astrlabe\"). */\n appName: string\n /** Tailwind gradient classes for the shell branding (e.g. \"from-sky-500 to-indigo-600\"). */\n appGradient: string\n /** Branded logo node rendered inside the flyout trigger. */\n appLogo: ReactNode\n /**\n * Optional app icon for the branded loader (defaults to the platform's\n * RectangleStackIcon if omitted).\n */\n appIcon?: ReactNode\n /**\n * When the appIcon is a brand SVG that has its own background\n * (gradient, fill, etc), set this to true so the BrandedLoader\n * doesn't wrap it in a second gradient container.\n */\n appIconRaw?: boolean\n /**\n * Optional override for the dock dashboard icon (defaults to HomeIcon).\n */\n dashboardIcon?: ComponentType<{ className?: string }>\n\n /** App-specific navigation items already pre-translated. */\n navigationItems: NavigationItem[]\n /** Custom ordering of launchpad page tiles. */\n pageOrder: string[]\n /**\n * Map of navigation/module ID → required permission name. The shell\n * filters `navigationItems` so that any item whose ID has an entry here\n * is hidden unless `hasPermission` returns true for the listed permission.\n */\n modulePermissions: Record<string, string>\n /**\n * Permission predicate, typically `(p) => can(actor, p)` from each app's\n * `createPlatformRbac()` factory.\n */\n hasPermission: (permission: string) => boolean\n\n /**\n * Optional settings/profile drawer content (e.g. an app-specific\n * `<SettingsModal>`). Receives the open state + close handler the shell\n * manages internally so the drawer renders inside the shell chrome.\n */\n settingsModal?: (props: { open: boolean; onClose: () => void }) => ReactNode\n\n children: ReactNode\n}\n\n/**\n * Cross-app platform shell — wires `<PlatformShell>` from ui to windsock's\n * auth + preferences hooks and to ui's i18n/router contexts. Each app\n * passes its own logo, gradient, navigation, and permission predicate; the\n * rest of the chrome (header, dock, flyout, sign-out confirm modal) is\n * shared.\n */\nexport function PlatformAppShell({\n appName,\n appGradient,\n appLogo,\n appIcon,\n appIconRaw,\n dashboardIcon,\n navigationItems,\n pageOrder,\n modulePermissions,\n hasPermission,\n settingsModal,\n children,\n}: PlatformAppShellProps) {\n const tCommon = useTranslations('common')\n const { user, status, logout } = useAuth()\n // Validate the platform-state provider is mounted above this shell;\n // the actor itself isn't read here, but the same provider feeds children.\n usePlatformState()\n const { resolvedTheme, setTheme, dockPosition, dockAutoHide, dockEnabled } = usePlatformPreferences()\n const pathname = usePathname()\n const router = useRouter()\n const { history, openHistory } = useNotifications()\n const currentLocale = useLocale()\n const localeMeta = LANGUAGE_META[currentLocale as keyof typeof LANGUAGE_META]\n\n const items = useMemo(() => navigationItems.filter((item) => {\n const permission = modulePermissions[item.id]\n if (!permission) return true\n return hasPermission(permission)\n }), [navigationItems, modulePermissions, hasPermission])\n\n const handleSignOut = useCallback(() => { void logout('/login') }, [logout])\n const handleToggleTheme = useCallback(\n () => { setTheme(resolvedTheme === 'dark' ? 'light' : 'dark') },\n [resolvedTheme, setTheme],\n )\n const handleNavigate = useCallback((href: string) => router.push(href), [router])\n const handlePrefetch = useCallback((href: string) => router.prefetch(href), [router])\n\n const shellUser = user\n ? {\n name: user.name ?? null,\n email: user.email ?? null,\n image: user.image ?? null,\n role: user.role ?? null,\n permissions: user.permissions as string[] | undefined,\n organizationId: user.organizationId ?? null,\n }\n : null\n\n return (\n <PlatformShell\n items={items}\n launchpadPageOrder={pageOrder}\n user={shellUser}\n authStatus={status}\n onSignOut={handleSignOut}\n dockPosition={dockPosition}\n dockAutoHide={dockAutoHide}\n dockEnabled={dockEnabled}\n resolvedTheme={resolvedTheme}\n onToggleTheme={handleToggleTheme}\n pathname={pathname}\n onNavigate={handleNavigate}\n onPrefetch={handlePrefetch}\n appName={appName}\n appIcon={appIcon ?? <RectangleStackIcon className=\"h-full w-full\" />}\n appIconRaw={appIconRaw}\n appLogo={appLogo}\n appGradient={appGradient}\n dashboardIcon={dashboardIcon ?? HomeIcon}\n notificationCount={history.length}\n onNotifications={openHistory}\n labels={{\n home: tCommon('home'),\n profile: tCommon('profile'),\n signOut: tCommon('signOut'),\n signOutConfirmTitle: tCommon('signOutConfirmTitle'),\n cancel: tCommon('cancel'),\n notifications: tCommon('notifications'),\n theme: tCommon('theme'),\n currentTheme: resolvedTheme === 'dark' ? tCommon('darkMode') : tCommon('lightMode'),\n language: tCommon('language'),\n currentLocale: localeMeta?.nativeName ?? currentLocale,\n localeFlag: resolveFlag(currentLocale),\n actions: tCommon('actions'),\n }}\n {...(settingsModal ? { profileDrawer: settingsModal } : {})}\n >\n {children}\n </PlatformShell>\n )\n}\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkQGLGQXJE_js = require('./chunk-QGLGQXJE.js');
|
|
5
|
-
var
|
|
5
|
+
var chunkULKZGM2T_js = require('./chunk-ULKZGM2T.js');
|
|
6
6
|
var chunkYXN2K77G_js = require('./chunk-YXN2K77G.js');
|
|
7
7
|
var chunkBHOT22QL_js = require('./chunk-BHOT22QL.js');
|
|
8
8
|
var chunkUZ3CMNUJ_js = require('./chunk-UZ3CMNUJ.js');
|
|
@@ -88,7 +88,7 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
88
88
|
};
|
|
89
89
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
90
90
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
91
|
-
|
|
91
|
+
chunkULKZGM2T_js.SectionCard,
|
|
92
92
|
{
|
|
93
93
|
header: {
|
|
94
94
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.UsersIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -99,7 +99,7 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
99
99
|
padded: false,
|
|
100
100
|
children: [
|
|
101
101
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200/60 p-4 dark:border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
102
|
-
|
|
102
|
+
chunkULKZGM2T_js.SearchInput,
|
|
103
103
|
{
|
|
104
104
|
value: search,
|
|
105
105
|
onChange: (event) => handleSearch(event.target.value),
|
|
@@ -107,10 +107,10 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
109
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 p-8 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkULKZGM2T_js.InlineSpinner, {}),
|
|
111
111
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("admin.users.loading") })
|
|
112
112
|
] }) : users.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
-
|
|
113
|
+
chunkULKZGM2T_js.EmptyState,
|
|
114
114
|
{
|
|
115
115
|
message: t("admin.users.emptyMessage"),
|
|
116
116
|
description: t("admin.users.emptyDescription"),
|
|
@@ -135,7 +135,7 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
135
135
|
children: [
|
|
136
136
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
137
137
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
138
|
-
|
|
138
|
+
chunkULKZGM2T_js.Avatar,
|
|
139
139
|
{
|
|
140
140
|
src: user.image ?? void 0,
|
|
141
141
|
initials: (user.name ?? user.email).slice(0, 2).toUpperCase(),
|
|
@@ -149,7 +149,7 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
149
149
|
] }) }),
|
|
150
150
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(chunkBHOT22QL_js.Badge, { color: roleBadgeColor(user.role), children: user.role }) }),
|
|
151
151
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
152
|
-
|
|
152
|
+
chunkULKZGM2T_js.StatusBadge,
|
|
153
153
|
{
|
|
154
154
|
status: user.status === "active" ? "active" : "inactive",
|
|
155
155
|
label: user.status,
|
|
@@ -208,7 +208,7 @@ function AdminUserList({ client, onUserSelect }) {
|
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
210
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
211
|
-
|
|
211
|
+
chunkULKZGM2T_js.DynamicIslandConfirm,
|
|
212
212
|
{
|
|
213
213
|
open: deleteTarget !== null,
|
|
214
214
|
onClose: handleDeleteCancel,
|
|
@@ -275,7 +275,7 @@ function AdminUserForm({
|
|
|
275
275
|
}
|
|
276
276
|
}, [email, name, password, selectedRole, onSubmit, onClose, resetForm, t]);
|
|
277
277
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
278
|
-
|
|
278
|
+
chunkULKZGM2T_js.GlassModal,
|
|
279
279
|
{
|
|
280
280
|
open,
|
|
281
281
|
onClose: handleClose,
|
|
@@ -293,7 +293,7 @@ function AdminUserForm({
|
|
|
293
293
|
className: "space-y-4 p-4 sm:p-6",
|
|
294
294
|
children: [
|
|
295
295
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
296
|
-
|
|
296
|
+
chunkULKZGM2T_js.Input,
|
|
297
297
|
{
|
|
298
298
|
label: t("admin.userForm.emailLabel"),
|
|
299
299
|
type: "email",
|
|
@@ -306,7 +306,7 @@ function AdminUserForm({
|
|
|
306
306
|
}
|
|
307
307
|
),
|
|
308
308
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
309
|
-
|
|
309
|
+
chunkULKZGM2T_js.Input,
|
|
310
310
|
{
|
|
311
311
|
label: t("admin.userForm.nameLabel"),
|
|
312
312
|
value: name,
|
|
@@ -317,7 +317,7 @@ function AdminUserForm({
|
|
|
317
317
|
}
|
|
318
318
|
),
|
|
319
319
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
320
|
-
|
|
320
|
+
chunkULKZGM2T_js.PasswordInput,
|
|
321
321
|
{
|
|
322
322
|
label: t("admin.userForm.passwordLabel"),
|
|
323
323
|
value: password,
|
|
@@ -438,7 +438,7 @@ function AdminOrganizationList({ client, onOrganizationSelect }) {
|
|
|
438
438
|
}, []);
|
|
439
439
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
440
440
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
441
|
-
|
|
441
|
+
chunkULKZGM2T_js.SectionCard,
|
|
442
442
|
{
|
|
443
443
|
header: {
|
|
444
444
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.BuildingOffice2Icon, { className: "h-5 w-5 text-white" }),
|
|
@@ -449,7 +449,7 @@ function AdminOrganizationList({ client, onOrganizationSelect }) {
|
|
|
449
449
|
padded: false,
|
|
450
450
|
children: [
|
|
451
451
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200/60 p-4 dark:border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
452
|
-
|
|
452
|
+
chunkULKZGM2T_js.SearchInput,
|
|
453
453
|
{
|
|
454
454
|
value: search,
|
|
455
455
|
onChange: (event) => setSearch(event.target.value),
|
|
@@ -457,10 +457,10 @@ function AdminOrganizationList({ client, onOrganizationSelect }) {
|
|
|
457
457
|
}
|
|
458
458
|
) }),
|
|
459
459
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 p-8 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
460
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkULKZGM2T_js.InlineSpinner, {}),
|
|
461
461
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("admin.organizations.loading") })
|
|
462
462
|
] }) : filteredOrganizations.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
463
|
-
|
|
463
|
+
chunkULKZGM2T_js.EmptyState,
|
|
464
464
|
{
|
|
465
465
|
message: t("admin.organizations.emptyMessage"),
|
|
466
466
|
description: t("admin.organizations.emptyDescription"),
|
|
@@ -487,7 +487,7 @@ function AdminOrganizationList({ client, onOrganizationSelect }) {
|
|
|
487
487
|
] }),
|
|
488
488
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "hidden px-4 py-3 text-gray-500 dark:text-gray-400 sm:table-cell", children: organization.displayName ?? "\u2014" }),
|
|
489
489
|
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
490
|
-
|
|
490
|
+
chunkULKZGM2T_js.StatusBadge,
|
|
491
491
|
{
|
|
492
492
|
status: organization.enabled ? "active" : "inactive",
|
|
493
493
|
label: organization.enabled ? t("admin.organizations.statusEnabled") : t("admin.organizations.statusDisabled"),
|
|
@@ -520,7 +520,7 @@ function AdminOrganizationList({ client, onOrganizationSelect }) {
|
|
|
520
520
|
}
|
|
521
521
|
),
|
|
522
522
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
523
|
-
|
|
523
|
+
chunkULKZGM2T_js.DynamicIslandConfirm,
|
|
524
524
|
{
|
|
525
525
|
open: deleteTarget !== null,
|
|
526
526
|
onClose: handleDeleteCancel,
|
|
@@ -600,7 +600,7 @@ function AdminOrganizationForm({
|
|
|
600
600
|
}
|
|
601
601
|
}, [name, displayName, description, isEditing, onSubmit, onClose, t]);
|
|
602
602
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
603
|
-
|
|
603
|
+
chunkULKZGM2T_js.GlassModal,
|
|
604
604
|
{
|
|
605
605
|
open,
|
|
606
606
|
onClose: handleClose,
|
|
@@ -618,7 +618,7 @@ function AdminOrganizationForm({
|
|
|
618
618
|
className: "space-y-4 p-4 sm:p-6",
|
|
619
619
|
children: [
|
|
620
620
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
621
|
-
|
|
621
|
+
chunkULKZGM2T_js.Input,
|
|
622
622
|
{
|
|
623
623
|
label: t("admin.organizationForm.nameLabel"),
|
|
624
624
|
value: name,
|
|
@@ -629,7 +629,7 @@ function AdminOrganizationForm({
|
|
|
629
629
|
}
|
|
630
630
|
),
|
|
631
631
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
632
|
-
|
|
632
|
+
chunkULKZGM2T_js.Input,
|
|
633
633
|
{
|
|
634
634
|
label: t("admin.organizationForm.displayNameLabel"),
|
|
635
635
|
value: displayName,
|
|
@@ -639,7 +639,7 @@ function AdminOrganizationForm({
|
|
|
639
639
|
}
|
|
640
640
|
),
|
|
641
641
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
642
|
-
|
|
642
|
+
chunkULKZGM2T_js.Input,
|
|
643
643
|
{
|
|
644
644
|
label: t("admin.organizationForm.descriptionLabel"),
|
|
645
645
|
value: description,
|
|
@@ -819,7 +819,7 @@ function AdminPermissionList({ client }) {
|
|
|
819
819
|
}, []);
|
|
820
820
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
821
821
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
822
|
-
|
|
822
|
+
chunkULKZGM2T_js.SectionCard,
|
|
823
823
|
{
|
|
824
824
|
header: {
|
|
825
825
|
icon: /* @__PURE__ */ jsxRuntime.jsx(outline.KeyIcon, { className: "h-5 w-5 text-white" }),
|
|
@@ -834,7 +834,7 @@ function AdminPermissionList({ client }) {
|
|
|
834
834
|
padded: false,
|
|
835
835
|
children: [
|
|
836
836
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-b border-gray-200/60 p-4 dark:border-white/10", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
837
|
-
|
|
837
|
+
chunkULKZGM2T_js.SearchInput,
|
|
838
838
|
{
|
|
839
839
|
value: search,
|
|
840
840
|
onChange: (event) => setSearch(event.target.value),
|
|
@@ -842,10 +842,10 @@ function AdminPermissionList({ client }) {
|
|
|
842
842
|
}
|
|
843
843
|
) }),
|
|
844
844
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center gap-2 p-8 text-sm text-gray-500 dark:text-gray-400", children: [
|
|
845
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
845
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkULKZGM2T_js.InlineSpinner, {}),
|
|
846
846
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t("admin.permissions.loading") })
|
|
847
847
|
] }) : filteredPermissions.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
848
|
-
|
|
848
|
+
chunkULKZGM2T_js.EmptyState,
|
|
849
849
|
{
|
|
850
850
|
message: t("admin.permissions.emptyMessage"),
|
|
851
851
|
description: t("admin.permissions.emptyDescription"),
|
|
@@ -902,7 +902,7 @@ function AdminPermissionList({ client }) {
|
|
|
902
902
|
}
|
|
903
903
|
),
|
|
904
904
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
905
|
-
|
|
905
|
+
chunkULKZGM2T_js.Sheet,
|
|
906
906
|
{
|
|
907
907
|
open: isFormOpen,
|
|
908
908
|
onClose: handleCloseForm,
|
|
@@ -911,7 +911,7 @@ function AdminPermissionList({ client }) {
|
|
|
911
911
|
size: "md",
|
|
912
912
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4 sm:p-6", children: [
|
|
913
913
|
!editingPermission && /* @__PURE__ */ jsxRuntime.jsx(
|
|
914
|
-
|
|
914
|
+
chunkULKZGM2T_js.Input,
|
|
915
915
|
{
|
|
916
916
|
label: t("admin.permissions.formIdLabel"),
|
|
917
917
|
value: formId,
|
|
@@ -922,7 +922,7 @@ function AdminPermissionList({ client }) {
|
|
|
922
922
|
}
|
|
923
923
|
),
|
|
924
924
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
925
|
-
|
|
925
|
+
chunkULKZGM2T_js.Input,
|
|
926
926
|
{
|
|
927
927
|
label: t("admin.permissions.formNameLabel"),
|
|
928
928
|
value: formName,
|
|
@@ -933,7 +933,7 @@ function AdminPermissionList({ client }) {
|
|
|
933
933
|
}
|
|
934
934
|
),
|
|
935
935
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
936
|
-
|
|
936
|
+
chunkULKZGM2T_js.Input,
|
|
937
937
|
{
|
|
938
938
|
label: t("admin.permissions.formDescriptionLabel"),
|
|
939
939
|
value: formDescription,
|
|
@@ -944,7 +944,7 @@ function AdminPermissionList({ client }) {
|
|
|
944
944
|
),
|
|
945
945
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
946
946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
947
|
-
|
|
947
|
+
chunkULKZGM2T_js.Input,
|
|
948
948
|
{
|
|
949
949
|
label: t("admin.permissions.formResourceLabel"),
|
|
950
950
|
value: formResource,
|
|
@@ -954,7 +954,7 @@ function AdminPermissionList({ client }) {
|
|
|
954
954
|
}
|
|
955
955
|
),
|
|
956
956
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
957
|
-
|
|
957
|
+
chunkULKZGM2T_js.Input,
|
|
958
958
|
{
|
|
959
959
|
label: t("admin.permissions.formActionLabel"),
|
|
960
960
|
value: formAction,
|
|
@@ -992,7 +992,7 @@ function AdminPermissionList({ client }) {
|
|
|
992
992
|
}
|
|
993
993
|
),
|
|
994
994
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
995
|
-
|
|
995
|
+
chunkULKZGM2T_js.DynamicIslandConfirm,
|
|
996
996
|
{
|
|
997
997
|
open: deleteTarget !== null,
|
|
998
998
|
onClose: handleDeleteCancel,
|
|
@@ -1012,5 +1012,5 @@ exports.AdminOrganizationList = AdminOrganizationList;
|
|
|
1012
1012
|
exports.AdminPermissionList = AdminPermissionList;
|
|
1013
1013
|
exports.AdminUserForm = AdminUserForm;
|
|
1014
1014
|
exports.AdminUserList = AdminUserList;
|
|
1015
|
-
//# sourceMappingURL=chunk-
|
|
1016
|
-
//# sourceMappingURL=chunk-
|
|
1015
|
+
//# sourceMappingURL=chunk-ID55ABBB.js.map
|
|
1016
|
+
//# sourceMappingURL=chunk-ID55ABBB.js.map
|