@judo/app-shell 0.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/LICENSE +277 -0
- package/README.md +186 -0
- package/dist/AppShell.d.ts +15 -0
- package/dist/AppShell.d.ts.map +1 -0
- package/dist/actors/ActorSelector.d.ts +8 -0
- package/dist/actors/ActorSelector.d.ts.map +1 -0
- package/dist/errors/AppErrorBoundary.d.ts +20 -0
- package/dist/errors/AppErrorBoundary.d.ts.map +1 -0
- package/dist/hooks/use-navigation-badge.d.ts +8 -0
- package/dist/hooks/use-navigation-badge.d.ts.map +1 -0
- package/dist/hooks/use-theme.d.ts +33 -0
- package/dist/hooks/use-theme.d.ts.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2068 -0
- package/dist/index.js.map +1 -0
- package/dist/layout/AppBar.d.ts +19 -0
- package/dist/layout/AppBar.d.ts.map +1 -0
- package/dist/layout/AppShellLayout.d.ts +14 -0
- package/dist/layout/AppShellLayout.d.ts.map +1 -0
- package/dist/layout/Breadcrumbs.d.ts +8 -0
- package/dist/layout/Breadcrumbs.d.ts.map +1 -0
- package/dist/layout/Footer.d.ts +9 -0
- package/dist/layout/Footer.d.ts.map +1 -0
- package/dist/layout/PageDialogHost.d.ts +9 -0
- package/dist/layout/PageDialogHost.d.ts.map +1 -0
- package/dist/layout/layout-constants.d.ts +8 -0
- package/dist/layout/layout-constants.d.ts.map +1 -0
- package/dist/locale/LocaleSwitcher.d.ts +16 -0
- package/dist/locale/LocaleSwitcher.d.ts.map +1 -0
- package/dist/navigation/HorizontalNavigation.d.ts +14 -0
- package/dist/navigation/HorizontalNavigation.d.ts.map +1 -0
- package/dist/navigation/HorizontalNavigationItem.d.ts +20 -0
- package/dist/navigation/HorizontalNavigationItem.d.ts.map +1 -0
- package/dist/navigation/NavigationDrawer.d.ts +13 -0
- package/dist/navigation/NavigationDrawer.d.ts.map +1 -0
- package/dist/navigation/NavigationItemRenderer.d.ts +19 -0
- package/dist/navigation/NavigationItemRenderer.d.ts.map +1 -0
- package/dist/navigation/dashboard-utils.d.ts +8 -0
- package/dist/navigation/dashboard-utils.d.ts.map +1 -0
- package/dist/navigation/navigation-utils.d.ts +41 -0
- package/dist/navigation/navigation-utils.d.ts.map +1 -0
- package/dist/navigation/use-menu-operation-dispatch.d.ts +26 -0
- package/dist/navigation/use-menu-operation-dispatch.d.ts.map +1 -0
- package/dist/routes/DefaultGuestPage.d.ts +10 -0
- package/dist/routes/DefaultGuestPage.d.ts.map +1 -0
- package/dist/routes/DefaultSettingsPage.d.ts +9 -0
- package/dist/routes/DefaultSettingsPage.d.ts.map +1 -0
- package/dist/routes/PageRoute.d.ts +13 -0
- package/dist/routes/PageRoute.d.ts.map +1 -0
- package/dist/routes/RedirectPage.d.ts +12 -0
- package/dist/routes/RedirectPage.d.ts.map +1 -0
- package/dist/routes/generate-routes.d.ts +24 -0
- package/dist/routes/generate-routes.d.ts.map +1 -0
- package/dist/runtime/DefaultErrorScreen.d.ts +11 -0
- package/dist/runtime/DefaultErrorScreen.d.ts.map +1 -0
- package/dist/runtime/DefaultLoadingScreen.d.ts +5 -0
- package/dist/runtime/DefaultLoadingScreen.d.ts.map +1 -0
- package/dist/runtime/JudoRuntime.d.ts +27 -0
- package/dist/runtime/JudoRuntime.d.ts.map +1 -0
- package/dist/runtime/PrincipalBridge.d.ts +14 -0
- package/dist/runtime/PrincipalBridge.d.ts.map +1 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/types.d.ts +308 -0
- package/dist/runtime/types.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +21 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeToggle.d.ts +11 -0
- package/dist/theme/ThemeToggle.d.ts.map +1 -0
- package/dist/theme/density.d.ts +19 -0
- package/dist/theme/density.d.ts.map +1 -0
- package/dist/theme/judo-theme-factory.d.ts +29 -0
- package/dist/theme/judo-theme-factory.d.ts.map +1 -0
- package/dist/theme/presets.d.ts +51 -0
- package/dist/theme/presets.d.ts.map +1 -0
- package/dist/user/DefaultHeroComponent.d.ts +11 -0
- package/dist/user/DefaultHeroComponent.d.ts.map +1 -0
- package/dist/user/UserMenu.d.ts +8 -0
- package/dist/user/UserMenu.d.ts.map +1 -0
- package/package.json +99 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-constants.d.ts","sourceRoot":"","sources":["../../src/layout/layout-constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LocaleSwitcher — optional AppBar dropdown for changing the active locale.
|
|
3
|
+
*
|
|
4
|
+
* Only renders when more than one locale is configured. Uses the locale context
|
|
5
|
+
* from `@judo/i18n` to get/set the active locale.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Locale switcher dropdown for the application bar.
|
|
9
|
+
*
|
|
10
|
+
* Renders a globe icon button that opens a dropdown of available locales.
|
|
11
|
+
* Only renders if there are 2+ locales configured in the I18nProvider.
|
|
12
|
+
* If used outside I18nProvider, renders nothing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function LocaleSwitcher(): import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export type LocaleSwitcherProps = Record<string, never>;
|
|
16
|
+
//# sourceMappingURL=LocaleSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LocaleSwitcher.d.ts","sourceRoot":"","sources":["../../src/locale/LocaleSwitcher.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;;;;;GAMG;AACH,wBAAgB,cAAc,mDAkD7B;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NavigationController } from '@judo/model-api';
|
|
2
|
+
export interface HorizontalNavigationProps {
|
|
3
|
+
/** The navigation controller from the application model */
|
|
4
|
+
navigationController?: NavigationController;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Horizontal navigation bar rendering menu items as a row of buttons
|
|
8
|
+
* in the application toolbar.
|
|
9
|
+
*
|
|
10
|
+
* Supports N-deep menus via cascading dropdown sub-menus.
|
|
11
|
+
* Does not include search functionality (search is only for vertical/drawer mode).
|
|
12
|
+
*/
|
|
13
|
+
export declare function HorizontalNavigation({ navigationController }: HorizontalNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=HorizontalNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalNavigation.d.ts","sourceRoot":"","sources":["../../src/navigation/HorizontalNavigation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAM5D,MAAM,WAAW,yBAAyB;IACzC,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC5C;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,oBAAoB,EAAE,EAAE,yBAAyB,2CAiCvF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Action, NavigationItem } from '@judo/model-api';
|
|
2
|
+
export interface HorizontalNavigationItemProps {
|
|
3
|
+
/** The navigation item model object */
|
|
4
|
+
item: NavigationItem;
|
|
5
|
+
/** Depth of this item in the menu tree (0 = top-level) */
|
|
6
|
+
depth: number;
|
|
7
|
+
/** Actions from NavigationController for resolving menu operations */
|
|
8
|
+
navigationActions?: Action[];
|
|
9
|
+
/** Callback to dispatch a menu operation action */
|
|
10
|
+
onMenuAction?: (action: Action) => Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders a single item in the horizontal navigation bar.
|
|
14
|
+
*
|
|
15
|
+
* Top-level items (depth 0) render as buttons in the toolbar.
|
|
16
|
+
* Nested items render as menu items in dropdown menus.
|
|
17
|
+
* Supports N-deep nesting via cascading sub-menus.
|
|
18
|
+
*/
|
|
19
|
+
export declare function HorizontalNavigationItem({ item, depth, navigationActions, onMenuAction, }: HorizontalNavigationItemProps): import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
//# sourceMappingURL=HorizontalNavigationItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HorizontalNavigationItem.d.ts","sourceRoot":"","sources":["../../src/navigation/HorizontalNavigationItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAU9D,MAAM,WAAW,6BAA6B;IAC7C,uCAAuC;IACvC,IAAI,EAAE,cAAc,CAAC;IACrB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,mDAAmD;IACnD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,iBAAiB,EACjB,YAAY,GACZ,EAAE,6BAA6B,kDA8G/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { NavigationController } from '@judo/model-api';
|
|
2
|
+
export interface NavigationDrawerProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
onCollapse: () => void;
|
|
6
|
+
width: number;
|
|
7
|
+
navigationController?: NavigationController;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Navigation drawer with search and multi-level menu support.
|
|
11
|
+
*/
|
|
12
|
+
export declare function NavigationDrawer({ open, collapsed, onCollapse, width, navigationController }: NavigationDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=NavigationDrawer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationDrawer.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationDrawer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAU5D,MAAM,WAAW,qBAAqB;IACrC,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC5C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,qBAAqB,2CAqHnH"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Action, NavigationItem } from '@judo/model-api';
|
|
2
|
+
export interface NavigationItemRendererProps {
|
|
3
|
+
item: NavigationItem;
|
|
4
|
+
collapsed: boolean;
|
|
5
|
+
expanded: boolean;
|
|
6
|
+
onToggleExpanded: () => void;
|
|
7
|
+
depth: number;
|
|
8
|
+
expandedItems: Set<string>;
|
|
9
|
+
onItemExpand: (itemId: string) => void;
|
|
10
|
+
/** Actions from NavigationController for resolving menu operations */
|
|
11
|
+
navigationActions?: Action[];
|
|
12
|
+
/** Callback to dispatch a menu operation action */
|
|
13
|
+
onMenuAction?: (action: Action) => Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders a navigation menu item with support for nested items.
|
|
17
|
+
*/
|
|
18
|
+
export declare function NavigationItemRenderer({ item, collapsed, expanded, onToggleExpanded, depth, expandedItems, onItemExpand, navigationActions, onMenuAction, }: NavigationItemRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=NavigationItemRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationItemRenderer.d.ts","sourceRoot":"","sources":["../../src/navigation/NavigationItemRenderer.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAU9D,MAAM,WAAW,2BAA2B;IAC3C,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,mDAAmD;IACnD,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,gBAAgB,EAChB,KAAK,EACL,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,YAAY,GACZ,EAAE,2BAA2B,2CAkH7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Application } from '@judo/model-api';
|
|
2
|
+
/**
|
|
3
|
+
* Get the dashboard route for an application.
|
|
4
|
+
* Returns the route for the first page marked as dashboard that is also in the navigation tree,
|
|
5
|
+
* or "/" if none found.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getDashboardRoute(application: Application): string;
|
|
8
|
+
//# sourceMappingURL=dashboard-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-utils.d.ts","sourceRoot":"","sources":["../../src/navigation/dashboard-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAsBnE;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAYlE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Action, NavigationController, NavigationItem, PageDefinition } from '@judo/model-api';
|
|
2
|
+
/**
|
|
3
|
+
* Filter navigation items by search query (recursive).
|
|
4
|
+
*/
|
|
5
|
+
export declare function filterNavigationItems(items: NavigationItem[], query: string): NavigationItem[];
|
|
6
|
+
/**
|
|
7
|
+
* Get route path for a page definition.
|
|
8
|
+
* Uses the resolved container to determine the page type suffix.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getRouteForPage(pageRef: unknown): string;
|
|
11
|
+
/**
|
|
12
|
+
* Get route pattern for React Router (includes parameter placeholders).
|
|
13
|
+
* VIEW pages and RelationTablePages get an optional :signedIdentifier parameter
|
|
14
|
+
* for bookmarkability and parent transfer context.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getRoutePattern(page: PageDefinition): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get expanded state storage key.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getNavExpandedStorageKey(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Load expanded navigation items from localStorage.
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadExpandedItems(): Set<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Save expanded navigation items to localStorage.
|
|
27
|
+
*/
|
|
28
|
+
export declare function saveExpandedItems(items: Set<string>): void;
|
|
29
|
+
/**
|
|
30
|
+
* Find the Action in NavigationController.actions that matches a NavigationItem's actionDefinition.
|
|
31
|
+
*
|
|
32
|
+
* Menu operation items (MenuItemOperation) have an embedded actionDefinition, and the
|
|
33
|
+
* NavigationController.actions array has corresponding Action entries with runtime metadata
|
|
34
|
+
* (targetPageDefinition, targetDataElement, ownerDataElement, isMenuAction).
|
|
35
|
+
*
|
|
36
|
+
* @param controller - The NavigationController containing the actions array
|
|
37
|
+
* @param item - The NavigationItem with an actionDefinition to match
|
|
38
|
+
* @returns The matching Action, or undefined if no match is found
|
|
39
|
+
*/
|
|
40
|
+
export declare function findActionForNavigationItem(controller: NavigationController, item: NavigationItem): Action | undefined;
|
|
41
|
+
//# sourceMappingURL=navigation-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-utils.d.ts","sourceRoot":"","sources":["../../src/navigation/navigation-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,cAAc,EAAiB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGnH;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAU9F;AA0CD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAiCxD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAe5D;AA0CD;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAEjD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,MAAM,CAAC,CAU/C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAM1D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAC1C,UAAU,EAAE,oBAAoB,EAChC,IAAI,EAAE,cAAc,GAClB,MAAM,GAAG,SAAS,CAsBpB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Action } from '@judo/model-api';
|
|
2
|
+
/**
|
|
3
|
+
* Result of useMenuOperationDispatch hook.
|
|
4
|
+
*/
|
|
5
|
+
export interface UseMenuOperationDispatchResult {
|
|
6
|
+
/**
|
|
7
|
+
* Dispatch an Action resolved from a menu operation item.
|
|
8
|
+
* Called by the NavigationItemRenderer after it looks up the matching
|
|
9
|
+
* Action from the NavigationController.actions array.
|
|
10
|
+
*/
|
|
11
|
+
dispatchMenuAction: (action: Action) => Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Hook providing dispatch capability for menu operation items.
|
|
15
|
+
*
|
|
16
|
+
* Menu operation items (MenuItemOperation) are NavigationItems that have an
|
|
17
|
+
* actionDefinition instead of a target page. They trigger custom operations
|
|
18
|
+
* such as parameterless API calls or opening operation input forms/selectors.
|
|
19
|
+
*
|
|
20
|
+
* This hook wires up the action dispatching infrastructure
|
|
21
|
+
* to enable these operations from the navigation menu.
|
|
22
|
+
*
|
|
23
|
+
* @returns Object with dispatchMenuAction function
|
|
24
|
+
*/
|
|
25
|
+
export declare function useMenuOperationDispatch(): UseMenuOperationDispatchResult;
|
|
26
|
+
//# sourceMappingURL=use-menu-operation-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-menu-operation-dispatch.d.ts","sourceRoot":"","sources":["../../src/navigation/use-menu-operation-dispatch.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C;;;;OAIG;IACH,kBAAkB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,IAAI,8BAA8B,CAkBzE"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GuestPageProps } from '@judo/model-api';
|
|
2
|
+
/**
|
|
3
|
+
* Default guest page displayed when `Application.supportGuestAccess` is true
|
|
4
|
+
* and the user is not authenticated.
|
|
5
|
+
*
|
|
6
|
+
* Shows the application title and a "Sign In" button that triggers OIDC login.
|
|
7
|
+
* Can be replaced via `CustomizationsConfig.guestComponent`.
|
|
8
|
+
*/
|
|
9
|
+
export declare function DefaultGuestPage({ application, signIn }: GuestPageProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=DefaultGuestPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultGuestPage.d.ts","sourceRoot":"","sources":["../../src/routes/DefaultGuestPage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,cAAc,2CAwBvE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in placeholder settings page rendered at `/settings`
|
|
3
|
+
* when no custom `CustomizationsConfig.settingsPage` is provided.
|
|
4
|
+
*
|
|
5
|
+
* Displays a minimal informational message indicating that the
|
|
6
|
+
* settings page can be implemented by the application.
|
|
7
|
+
*/
|
|
8
|
+
export declare function DefaultSettingsPage(): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=DefaultSettingsPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultSettingsPage.d.ts","sourceRoot":"","sources":["../../src/routes/DefaultSettingsPage.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,mBAAmB,4CAqBlC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PageDefinition } from '@judo/model-api';
|
|
2
|
+
export interface PageRouteProps {
|
|
3
|
+
page: PageDefinition;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Route component that renders a page from its definition.
|
|
7
|
+
* Wraps the page in PageProvider to provide page context to all child components.
|
|
8
|
+
*
|
|
9
|
+
* For TABLE type pages, a stable transfer ID is generated to store list data.
|
|
10
|
+
* For VIEW type pages, the signedIdentifier from the URL is used as the transfer ID.
|
|
11
|
+
*/
|
|
12
|
+
export declare function PageRoute({ page }: PageRouteProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=PageRoute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageRoute.d.ts","sourceRoot":"","sources":["../../src/routes/PageRoute.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIrE,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,cAAc,CAAC;CACrB;AAmBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,cAAc,2CA0CjD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page rendered at the `/_redirect` route.
|
|
3
|
+
*
|
|
4
|
+
* Looks up the `redirectHandler` from customizations and renders it.
|
|
5
|
+
* Because the handler is a React component (not a plain function),
|
|
6
|
+
* it has full access to React hooks including react-router hooks
|
|
7
|
+
* like `useSearchParams()`, `useNavigate()`, etc.
|
|
8
|
+
*
|
|
9
|
+
* If no redirect handler is registered, renders a simple fallback message.
|
|
10
|
+
*/
|
|
11
|
+
export declare function RedirectPage(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=RedirectPage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RedirectPage.d.ts","sourceRoot":"","sources":["../../src/routes/RedirectPage.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,4CAa3B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Application } from '@judo/model-api';
|
|
2
|
+
import { ComponentType, ReactElement } from 'react';
|
|
3
|
+
export interface GenerateRoutesProps {
|
|
4
|
+
application: Application;
|
|
5
|
+
DashboardPage?: React.ComponentType<{
|
|
6
|
+
application: Application;
|
|
7
|
+
}>;
|
|
8
|
+
NotFoundPage?: React.ComponentType;
|
|
9
|
+
/** Additional custom routes injected after model-derived routes and before the 404 catch-all. */
|
|
10
|
+
customRoutes?: Array<{
|
|
11
|
+
path: string;
|
|
12
|
+
element: ReactElement;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Custom settings page component rendered at the `/settings` route.
|
|
16
|
+
* When not provided, the built-in `DefaultSettingsPage` placeholder is used.
|
|
17
|
+
*/
|
|
18
|
+
SettingsPage?: ComponentType;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generate React Router routes from PageDefinitions.
|
|
22
|
+
*/
|
|
23
|
+
export declare function generateRoutes({ application, DashboardPage, NotFoundPage, customRoutes, SettingsPage, }: GenerateRoutesProps): ReactElement;
|
|
24
|
+
//# sourceMappingURL=generate-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-routes.d.ts","sourceRoot":"","sources":["../../src/routes/generate-routes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAOzD,MAAM,WAAW,mBAAmB;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,WAAW,EAAE,WAAW,CAAA;KAAE,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,iGAAiG;IACjG,YAAY,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC;IAC9D;;;OAGG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC9B,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,EAAE,mBAAmB,GAAG,YAAY,CA0CpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface DefaultErrorScreenProps {
|
|
2
|
+
/** The error that occurred */
|
|
3
|
+
error: Error;
|
|
4
|
+
/** Callback to retry initialization */
|
|
5
|
+
onRetry?: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Default error screen shown when model loading fails.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DefaultErrorScreen({ error, onRetry }: DefaultErrorScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=DefaultErrorScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultErrorScreen.d.ts","sourceRoot":"","sources":["../../src/runtime/DefaultErrorScreen.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,uBAAuB;IACvC,8BAA8B;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,uBAAuB,2CA2D7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DefaultLoadingScreen.d.ts","sourceRoot":"","sources":["../../src/runtime/DefaultLoadingScreen.tsx"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAgB,oBAAoB,4CAmBnC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { JudoRuntimeProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* JudoRuntime - Unified runtime layer for JUDO UI applications.
|
|
4
|
+
*
|
|
5
|
+
* Provides zero-boilerplate application setup:
|
|
6
|
+
* - Model loading and parsing
|
|
7
|
+
* - Provider tree (theme, notifications, dialogs, etc.)
|
|
8
|
+
* - App shell layout with navigation
|
|
9
|
+
* - Route generation from model
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // Minimal usage
|
|
14
|
+
* <JudoRuntime modelSource="/models/my-app.model" />
|
|
15
|
+
*
|
|
16
|
+
* // With configuration
|
|
17
|
+
* <JudoRuntime
|
|
18
|
+
* config={{
|
|
19
|
+
* model: { source: '/models/my-app.model' },
|
|
20
|
+
* auth: { skip: true },
|
|
21
|
+
* features: { devTools: true },
|
|
22
|
+
* }}
|
|
23
|
+
* />
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function JudoRuntime({ config, modelSource, logo, appBarExtra, loadingComponent, errorComponent, children, customizations, }: JudoRuntimeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
//# sourceMappingURL=JudoRuntime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JudoRuntime.d.ts","sourceRoot":"","sources":["../../src/runtime/JudoRuntime.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAAqB,gBAAgB,EAAoB,MAAM,SAAS,CAAC;AAarF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,WAAW,CAAC,EAC3B,MAAW,EACX,WAAW,EACX,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,cAAc,GACd,EAAE,gBAAgB,kDA6QlB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Bridge that wires PrincipalProvider with the API client.
|
|
4
|
+
* Rendered inside ActorAuthBoundary + ApiProvider so useApi() is available.
|
|
5
|
+
*
|
|
6
|
+
* The `~principal` endpoint is only available for authenticated actors
|
|
7
|
+
* (those whose Application model defines an `authentication` block).
|
|
8
|
+
* When authentication is absent, the provider is still rendered (so
|
|
9
|
+
* `usePrincipalOptional()` returns a context) but no fetch is performed.
|
|
10
|
+
*/
|
|
11
|
+
export declare function PrincipalBridge({ children }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=PrincipalBridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrincipalBridge.d.ts","sourceRoot":"","sources":["../../src/runtime/PrincipalBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,OAAO,CAAC;AAMpD;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAapE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { JudoRuntime } from './JudoRuntime';
|
|
2
|
+
export { DefaultLoadingScreen } from './DefaultLoadingScreen';
|
|
3
|
+
export { DefaultErrorScreen } from './DefaultErrorScreen';
|
|
4
|
+
export type { JudoRuntimeConfig, JudoRuntimeProps, JudoRuntimeState, ModelConfig, AuthConfig, ApiConfig, ThemeConfig, RouterConfig, FeaturesConfig, I18nConfig, } from './types';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/runtime/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,cAAc,EACd,UAAU,GACV,MAAM,SAAS,CAAC"}
|