@judo/model-api 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 +210 -0
- package/dist/data/elements.d.ts +194 -0
- package/dist/data/elements.d.ts.map +1 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/data/index.d.ts.map +1 -0
- package/dist/data/types.d.ts +84 -0
- package/dist/data/types.d.ts.map +1 -0
- package/dist/enums.d.ts +203 -0
- package/dist/enums.d.ts.map +1 -0
- package/dist/extensibility.d.ts +663 -0
- package/dist/extensibility.d.ts.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +150 -0
- package/dist/index.js.map +1 -0
- package/dist/services.d.ts +244 -0
- package/dist/services.d.ts.map +1 -0
- package/dist/structural/actions.d.ts +173 -0
- package/dist/structural/actions.d.ts.map +1 -0
- package/dist/structural/application.d.ts +137 -0
- package/dist/structural/application.d.ts.map +1 -0
- package/dist/structural/index.d.ts +3 -0
- package/dist/structural/index.d.ts.map +1 -0
- package/dist/visual/base.d.ts +32 -0
- package/dist/visual/base.d.ts.map +1 -0
- package/dist/visual/buttons.d.ts +32 -0
- package/dist/visual/buttons.d.ts.map +1 -0
- package/dist/visual/display.d.ts +36 -0
- package/dist/visual/display.d.ts.map +1 -0
- package/dist/visual/index.d.ts +9 -0
- package/dist/visual/index.d.ts.map +1 -0
- package/dist/visual/inputs.d.ts +196 -0
- package/dist/visual/inputs.d.ts.map +1 -0
- package/dist/visual/layout.d.ts +185 -0
- package/dist/visual/layout.d.ts.map +1 -0
- package/dist/visual/link.d.ts +32 -0
- package/dist/visual/link.d.ts.map +1 -0
- package/dist/visual/table.d.ts +103 -0
- package/dist/visual/table.d.ts.map +1 -0
- package/dist/visual/tabs.d.ts +26 -0
- package/dist/visual/tabs.d.ts.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { ComponentType, ReactElement } from 'react';
|
|
2
|
+
import { ActionDefinition } from './structural/actions';
|
|
3
|
+
import { Action, Application, NavigationItem, PageDefinition } from './structural/application';
|
|
4
|
+
import { Button, ButtonGroup } from './visual/buttons';
|
|
5
|
+
import { Formatted, IconImage, Label, Text } from './visual/display';
|
|
6
|
+
import { BinaryTypeInput, Checkbox, DateInput, DateTimeInput, EnumerationCombo, EnumerationRadio, EnumerationToggleButtonbar, NumericInput, PasswordInput, Switch, TextArea, TextInput, TimeInput, TrinaryLogicCombo } from './visual/inputs';
|
|
7
|
+
import { Divider, Flex, PageContainer, Spacer, VisualElement } from './visual/layout';
|
|
8
|
+
import { Link } from './visual/link';
|
|
9
|
+
import { Column, Filter, Table } from './visual/table';
|
|
10
|
+
import { TabController } from './visual/tabs';
|
|
11
|
+
/**
|
|
12
|
+
* Props passed to every custom component implementation.
|
|
13
|
+
* The element prop is typed to the specific VisualElement subtype.
|
|
14
|
+
*/
|
|
15
|
+
export interface CustomComponentProps<T extends VisualElement = VisualElement> {
|
|
16
|
+
/** The VisualElement model object */
|
|
17
|
+
element: T;
|
|
18
|
+
/** The page definition this element belongs to */
|
|
19
|
+
page: PageDefinition;
|
|
20
|
+
/** Action dispatch function */
|
|
21
|
+
onDispatch?: (action: Action, additionalContext?: Record<string, unknown>) => Promise<unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A custom component implementation.
|
|
25
|
+
* Can use any runtime hooks (useVisualBinding, useDataStore, useNavigation, etc.)
|
|
26
|
+
*/
|
|
27
|
+
export type CustomComponent<T extends VisualElement = VisualElement> = ComponentType<CustomComponentProps<T>>;
|
|
28
|
+
/**
|
|
29
|
+
* Maps each concrete VisualElement @type discriminator string
|
|
30
|
+
* to its corresponding TypeScript interface.
|
|
31
|
+
*
|
|
32
|
+
* Used by ComponentInterceptor for type-safe interceptor registration.
|
|
33
|
+
*/
|
|
34
|
+
export interface ElementTypeMap {
|
|
35
|
+
Flex: Flex;
|
|
36
|
+
PageContainer: PageContainer;
|
|
37
|
+
Spacer: Spacer;
|
|
38
|
+
Divider: Divider;
|
|
39
|
+
Text: Text;
|
|
40
|
+
Label: Label;
|
|
41
|
+
Formatted: Formatted;
|
|
42
|
+
IconImage: IconImage;
|
|
43
|
+
TabController: TabController;
|
|
44
|
+
Table: Table;
|
|
45
|
+
Column: Column;
|
|
46
|
+
Filter: Filter;
|
|
47
|
+
Link: Link;
|
|
48
|
+
ButtonGroup: ButtonGroup;
|
|
49
|
+
Button: Button;
|
|
50
|
+
TextInput: TextInput;
|
|
51
|
+
TextArea: TextArea;
|
|
52
|
+
NumericInput: NumericInput;
|
|
53
|
+
DateInput: DateInput;
|
|
54
|
+
DateTimeInput: DateTimeInput;
|
|
55
|
+
TimeInput: TimeInput;
|
|
56
|
+
Checkbox: Checkbox;
|
|
57
|
+
Switch: Switch;
|
|
58
|
+
EnumerationCombo: EnumerationCombo;
|
|
59
|
+
EnumerationRadio: EnumerationRadio;
|
|
60
|
+
EnumerationToggleButtonbar: EnumerationToggleButtonbar;
|
|
61
|
+
TrinaryLogicCombo: TrinaryLogicCombo;
|
|
62
|
+
BinaryTypeInput: BinaryTypeInput;
|
|
63
|
+
PasswordInput: PasswordInput;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Union of all valid VisualElement @type discriminator strings.
|
|
67
|
+
*/
|
|
68
|
+
export type ElementTypeName = keyof ElementTypeMap;
|
|
69
|
+
/**
|
|
70
|
+
* Interceptor function for a visual element type.
|
|
71
|
+
* Called for EVERY element of the matching @type before default rendering.
|
|
72
|
+
*
|
|
73
|
+
* Return a React component to replace the default rendering for this element,
|
|
74
|
+
* or null/undefined to fall through to default rendering.
|
|
75
|
+
*
|
|
76
|
+
* @param element - The VisualElement model instance (typed to the specific subtype)
|
|
77
|
+
* @param page - The PageDefinition this element belongs to
|
|
78
|
+
* @returns A CustomComponent to render, or null/undefined for default rendering
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const interceptor: ComponentInterceptor<'TextInput'> = (element, page) => {
|
|
83
|
+
* if (element.attributeType?.name?.endsWith('Email')) {
|
|
84
|
+
* return EmailInputComponent;
|
|
85
|
+
* }
|
|
86
|
+
* return null; // default rendering
|
|
87
|
+
* };
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
export type ComponentInterceptor<K extends ElementTypeName = ElementTypeName> = (element: ElementTypeMap[K], page: PageDefinition) => CustomComponent<ElementTypeMap[K]> | null | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Loose interceptor signature for runtime use.
|
|
93
|
+
* At runtime the concrete element type is not statically known,
|
|
94
|
+
* so we widen to VisualElement / CustomComponent.
|
|
95
|
+
*/
|
|
96
|
+
export type AnyComponentInterceptor = (element: VisualElement, page: PageDefinition) => CustomComponent | null | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* Type-safe map of element type interceptors.
|
|
99
|
+
* Each key is a VisualElement @type discriminator, and the interceptor
|
|
100
|
+
* function receives the correctly-typed element instance.
|
|
101
|
+
*/
|
|
102
|
+
export type ComponentInterceptors = {
|
|
103
|
+
[K in ElementTypeName]?: ComponentInterceptor<K>;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Context available to all action lifecycle methods.
|
|
107
|
+
* Extends the runtime action handler context with metadata and callDefault.
|
|
108
|
+
*/
|
|
109
|
+
export interface ActionLifecycleContext {
|
|
110
|
+
/** The Action model object being executed */
|
|
111
|
+
action: Action;
|
|
112
|
+
/** The ActionDefinition (action.actionDefinition) */
|
|
113
|
+
actionDefinition: ActionDefinition;
|
|
114
|
+
/** The page this action belongs to */
|
|
115
|
+
page: PageDefinition;
|
|
116
|
+
/** The transfer being acted upon */
|
|
117
|
+
transfer?: unknown;
|
|
118
|
+
/** Selected rows for bulk operations */
|
|
119
|
+
selectedRows?: unknown[];
|
|
120
|
+
/** Dialog closer if action is in a dialog */
|
|
121
|
+
closeDialog?: (result?: unknown) => void;
|
|
122
|
+
/** Navigation context */
|
|
123
|
+
navigation?: unknown;
|
|
124
|
+
/** Data store */
|
|
125
|
+
data?: unknown;
|
|
126
|
+
/** Model registry */
|
|
127
|
+
registry?: unknown;
|
|
128
|
+
/** Validation context */
|
|
129
|
+
validation?: unknown;
|
|
130
|
+
/** Notification service */
|
|
131
|
+
notifications?: unknown;
|
|
132
|
+
/** Whether the component is eager (aggregated) */
|
|
133
|
+
isEager?: boolean;
|
|
134
|
+
/** Current page container type */
|
|
135
|
+
pageType?: "TABLE" | "FORM" | "VIEW";
|
|
136
|
+
/** Whether the page is in edit mode */
|
|
137
|
+
isEditMode?: boolean;
|
|
138
|
+
/** Whether this is a page-level action */
|
|
139
|
+
isPageAction?: boolean;
|
|
140
|
+
/** Call the built-in default implementation for this lifecycle phase */
|
|
141
|
+
callDefault: () => Promise<unknown>;
|
|
142
|
+
/** Additional arbitrary context properties */
|
|
143
|
+
[key: string]: unknown;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Standard lifecycle methods available on every action.
|
|
147
|
+
* All methods are optional — unoverridden methods use built-in defaults.
|
|
148
|
+
*/
|
|
149
|
+
export interface ActionLifecycle {
|
|
150
|
+
/**
|
|
151
|
+
* Called before the action executes.
|
|
152
|
+
* Return `false` to cancel execution. Return `void` or `true` to proceed.
|
|
153
|
+
* Use for: custom validation, confirmation dialogs, pre-fetch.
|
|
154
|
+
*/
|
|
155
|
+
before?(context: ActionLifecycleContext): Promise<boolean | undefined>;
|
|
156
|
+
/**
|
|
157
|
+
* The core action execution.
|
|
158
|
+
* If provided, REPLACES the built-in execution entirely.
|
|
159
|
+
* The built-in handler does NOT run when this is overridden
|
|
160
|
+
* (unless callDefault() is called explicitly).
|
|
161
|
+
*/
|
|
162
|
+
execute?(context: ActionLifecycleContext): Promise<unknown>;
|
|
163
|
+
/**
|
|
164
|
+
* Called after successful execution.
|
|
165
|
+
* Receives the result of execute().
|
|
166
|
+
* Use for: notifications, navigation, data refresh, side effects.
|
|
167
|
+
*/
|
|
168
|
+
after?(context: ActionLifecycleContext, result: unknown): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Called when execution throws.
|
|
171
|
+
* Return `true` to suppress built-in error handling.
|
|
172
|
+
* Return `false`/`void` to let default error handling proceed.
|
|
173
|
+
*/
|
|
174
|
+
onError?(context: ActionLifecycleContext, error: unknown): Promise<boolean | undefined>;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Set of visual properties that can be overridden per element.
|
|
178
|
+
*/
|
|
179
|
+
export interface VisualPropertySet {
|
|
180
|
+
/** Override element visibility */
|
|
181
|
+
hidden?: boolean;
|
|
182
|
+
/** Override element disabled state */
|
|
183
|
+
disabled?: boolean;
|
|
184
|
+
/** Override element required state */
|
|
185
|
+
required?: boolean;
|
|
186
|
+
/** Override element label text */
|
|
187
|
+
label?: string;
|
|
188
|
+
/** Override element read-only state */
|
|
189
|
+
readOnly?: boolean;
|
|
190
|
+
/** Additional CSS class names */
|
|
191
|
+
className?: string;
|
|
192
|
+
/** Arbitrary custom data passed to the element's component */
|
|
193
|
+
custom?: Record<string, unknown>;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @internal Runtime format for visual property overrides.
|
|
197
|
+
*
|
|
198
|
+
* Keys are element sourceIds resolved internally by the generated `createCustomizations()` factory.
|
|
199
|
+
* **Developers never construct this type directly.** Use the typed factory
|
|
200
|
+
* where keys are human-readable element names.
|
|
201
|
+
*/
|
|
202
|
+
export type VisualPropertyOverrides = Record<string, Partial<VisualPropertySet>>;
|
|
203
|
+
/**
|
|
204
|
+
* Hook type for providing visual property overrides.
|
|
205
|
+
* Called within the page's React tree — can use any hooks.
|
|
206
|
+
*/
|
|
207
|
+
export type VisualPropertiesHook = () => VisualPropertyOverrides;
|
|
208
|
+
/**
|
|
209
|
+
* Hook function that produces scoped MUI ThemeOptions for a named sub-theme.
|
|
210
|
+
*
|
|
211
|
+
* Receives the current (parent) MUI Theme and optional transfer data.
|
|
212
|
+
* Returns partial ThemeOptions that are deep-merged onto the parent theme
|
|
213
|
+
* via `createTheme(parentTheme, subThemeHook(parentTheme, data))`.
|
|
214
|
+
*
|
|
215
|
+
* Sub-themes nest naturally: a child element's sub-theme is merged on top
|
|
216
|
+
* of its parent's sub-theme, giving inner themes higher precedence.
|
|
217
|
+
*
|
|
218
|
+
* @param parentTheme - The current MUI Theme (may already be a sub-theme)
|
|
219
|
+
* @param data - Optional transfer data available in the current binding scope
|
|
220
|
+
* @returns Partial ThemeOptions to merge onto the parent theme
|
|
221
|
+
*
|
|
222
|
+
* @example
|
|
223
|
+
* ```typescript
|
|
224
|
+
* import type { Theme, ThemeOptions } from "@mui/material/styles";
|
|
225
|
+
* import { alpha } from "@mui/material/styles";
|
|
226
|
+
*
|
|
227
|
+
* const cardSubTheme: SubThemeHook = (parentTheme: Theme) => ({
|
|
228
|
+
* components: {
|
|
229
|
+
* MuiPaper: {
|
|
230
|
+
* styleOverrides: {
|
|
231
|
+
* root: { background: alpha(parentTheme.palette.secondary.main, 0.97) },
|
|
232
|
+
* },
|
|
233
|
+
* },
|
|
234
|
+
* },
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
export type SubThemeHook = (parentTheme: any, data?: Record<string, unknown>) => Record<string, unknown>;
|
|
239
|
+
/**
|
|
240
|
+
* @internal Runtime format for action overrides on a page.
|
|
241
|
+
*
|
|
242
|
+
* Keys are sourceIds resolved internally by the generated `createCustomizations()` factory.
|
|
243
|
+
* **Developers never construct this type directly.** Use the typed factory with
|
|
244
|
+
* human-readable action names instead.
|
|
245
|
+
*
|
|
246
|
+
* @see The generated `createCustomizations()` factory for the developer-facing API.
|
|
247
|
+
*/
|
|
248
|
+
export type PageActionOverrides = Record<string, Partial<ActionLifecycle>>;
|
|
249
|
+
/**
|
|
250
|
+
* Page-scoped customization bundle.
|
|
251
|
+
*
|
|
252
|
+
* Groups all customizations for a single page/dialog together:
|
|
253
|
+
* action overrides, visual property overrides, and element-level behaviors.
|
|
254
|
+
*
|
|
255
|
+
* @internal This is the runtime format consumed by `CustomizationsProvider`.
|
|
256
|
+
* **Developers should not construct `PageCustomization` objects directly.**
|
|
257
|
+
* Instead, use the generated `createCustomizations()` factory which provides
|
|
258
|
+
* type-safe, human-readable page and element names.
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* // Correct: use the generated type-safe factory
|
|
263
|
+
* import { createCustomizations } from './generated';
|
|
264
|
+
*
|
|
265
|
+
* const customizations = createCustomizations({
|
|
266
|
+
* pages: {
|
|
267
|
+
* UserListPage: {
|
|
268
|
+
* actions: useUserListPageActions,
|
|
269
|
+
* visualProperties: () => ({ nameField: { hidden: true } }),
|
|
270
|
+
* typeaheadProviders: {
|
|
271
|
+
* cityField: async (text) => fetchCitySuggestions(text),
|
|
272
|
+
* },
|
|
273
|
+
* },
|
|
274
|
+
* },
|
|
275
|
+
* });
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
export interface PageCustomization {
|
|
279
|
+
/**
|
|
280
|
+
* @internal Hook returning action lifecycle overrides for this page.
|
|
281
|
+
* Keys in the returned map are sourceIds (resolved by factory).
|
|
282
|
+
*/
|
|
283
|
+
actions?: () => PageActionOverrides;
|
|
284
|
+
/**
|
|
285
|
+
* @internal Hook returning visual property overrides for this page.
|
|
286
|
+
* Keys in the returned map are sourceIds (resolved by factory).
|
|
287
|
+
*/
|
|
288
|
+
visualProperties?: VisualPropertiesHook;
|
|
289
|
+
/**
|
|
290
|
+
* @internal Typeahead / autocomplete providers for text inputs on this page.
|
|
291
|
+
*
|
|
292
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
293
|
+
* generated `createCustomizations()` factory).
|
|
294
|
+
*/
|
|
295
|
+
typeaheadProviders?: Record<string, (text: string) => Promise<string[]>>;
|
|
296
|
+
/**
|
|
297
|
+
* @internal Row highlighting configuration for tables on this page.
|
|
298
|
+
*
|
|
299
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
300
|
+
* generated `createCustomizations()` factory).
|
|
301
|
+
*/
|
|
302
|
+
tableRowHighlighting?: Record<string, TableRowHighlightConfig[]>;
|
|
303
|
+
/**
|
|
304
|
+
* @internal Enumeration option filter functions for enum inputs on this page.
|
|
305
|
+
*
|
|
306
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
307
|
+
* generated `createCustomizations()` factory).
|
|
308
|
+
*/
|
|
309
|
+
enumOptionFilter?: Record<string, EnumOptionFilterFn>;
|
|
310
|
+
/**
|
|
311
|
+
* @internal Date/DateTime validation prop providers for date inputs on this page.
|
|
312
|
+
*
|
|
313
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
314
|
+
* generated `createCustomizations()` factory).
|
|
315
|
+
*/
|
|
316
|
+
dateValidationProps?: Record<string, DateValidationFn>;
|
|
317
|
+
/**
|
|
318
|
+
* @internal Column customizer functions for table columns on this page.
|
|
319
|
+
*
|
|
320
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
321
|
+
* generated `createCustomizations()` factory).
|
|
322
|
+
*/
|
|
323
|
+
columnCustomizers?: Record<string, ColumnCustomizerFn>;
|
|
324
|
+
/**
|
|
325
|
+
* @internal Item container configuration for tables with `representationComponent: 'CARD'` or `'TAG'`.
|
|
326
|
+
*
|
|
327
|
+
* Keys are element sourceIds (resolved from human-readable names by the
|
|
328
|
+
* generated `createCustomizations()` factory).
|
|
329
|
+
*/
|
|
330
|
+
itemContainerConfigs?: Record<string, ItemContainerConfig>;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Configuration for a single table row highlighting rule.
|
|
334
|
+
*
|
|
335
|
+
* Each rule defines a visual style (background color, optional text color)
|
|
336
|
+
* and a condition function evaluated per row. Rules are evaluated in order —
|
|
337
|
+
* the first matching rule determines the row's styling.
|
|
338
|
+
*/
|
|
339
|
+
export interface TableRowHighlightConfig {
|
|
340
|
+
/** Unique CSS-safe name for this rule (used as CSS class name suffix) */
|
|
341
|
+
name: string;
|
|
342
|
+
/** Human-readable label displayed in the highlight legend */
|
|
343
|
+
label: string;
|
|
344
|
+
/** Background color applied to matching rows (CSS color value) */
|
|
345
|
+
backgroundColor: string;
|
|
346
|
+
/** Optional text color applied to matching rows (CSS color value) */
|
|
347
|
+
color?: string;
|
|
348
|
+
/** Condition function — return true to apply this highlight to the row */
|
|
349
|
+
condition: (params: {
|
|
350
|
+
row: Record<string, unknown>;
|
|
351
|
+
}) => boolean;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Filter function for enumeration option lists.
|
|
355
|
+
*
|
|
356
|
+
* Receives the current transfer data (from the data store) and the default
|
|
357
|
+
* option array produced by `convertEnumOptions()`. Returns the options that
|
|
358
|
+
* should actually be rendered — may filter, reorder, or replace entries.
|
|
359
|
+
*
|
|
360
|
+
* @param data - Current transfer data (may be `undefined` before data is loaded)
|
|
361
|
+
* @param options - Default `{ value, label }` options from the model
|
|
362
|
+
* @returns The filtered/reordered options to render
|
|
363
|
+
*/
|
|
364
|
+
export type EnumOptionFilterFn = (data: Record<string, unknown> | undefined, options: Array<{
|
|
365
|
+
value: string;
|
|
366
|
+
label: string;
|
|
367
|
+
}>) => Array<{
|
|
368
|
+
value: string;
|
|
369
|
+
label: string;
|
|
370
|
+
}>;
|
|
371
|
+
/**
|
|
372
|
+
* Dynamic validation constraints for date/datetime inputs.
|
|
373
|
+
*
|
|
374
|
+
* All properties are optional — only specified constraints are applied.
|
|
375
|
+
* `disableFuture` and `disablePast` are resolved to `maxDate = today` and
|
|
376
|
+
* `minDate = today` respectively at render time.
|
|
377
|
+
*/
|
|
378
|
+
export interface DateValidationProps {
|
|
379
|
+
/** Earliest selectable date */
|
|
380
|
+
minDate?: Date;
|
|
381
|
+
/** Latest selectable date */
|
|
382
|
+
maxDate?: Date;
|
|
383
|
+
/** When true, dates after today are not selectable */
|
|
384
|
+
disableFuture?: boolean;
|
|
385
|
+
/** When true, dates before today are not selectable */
|
|
386
|
+
disablePast?: boolean;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Function returning dynamic date validation constraints.
|
|
390
|
+
*
|
|
391
|
+
* Receives the current transfer data (from the data store) and returns
|
|
392
|
+
* `DateValidationProps` that constrain the date picker.
|
|
393
|
+
*
|
|
394
|
+
* @param data - Current transfer data (may be `undefined` before data is loaded)
|
|
395
|
+
* @returns Validation constraints to apply to the date input
|
|
396
|
+
*/
|
|
397
|
+
export type DateValidationFn = (data: Record<string, unknown> | undefined) => DateValidationProps;
|
|
398
|
+
/**
|
|
399
|
+
* Column customizer function for overriding MUI DataGrid column definitions.
|
|
400
|
+
*
|
|
401
|
+
* Receives the original `GridColDef` built by the framework from the Column
|
|
402
|
+
* model element, and returns a (possibly modified) `GridColDef`.
|
|
403
|
+
*
|
|
404
|
+
* The `column` parameter provides the Column model element for inspection
|
|
405
|
+
* (e.g., to read `attributeType`, `label`, etc.).
|
|
406
|
+
*
|
|
407
|
+
* @param colDef - The default GridColDef built by TableRenderer
|
|
408
|
+
* @param column - The Column model element
|
|
409
|
+
* @returns The customized GridColDef (may be the same object or a new one)
|
|
410
|
+
*
|
|
411
|
+
* @example
|
|
412
|
+
* ```typescript
|
|
413
|
+
* const currencyColumnCustomizer: ColumnCustomizerFn = (colDef, column) => ({
|
|
414
|
+
* ...colDef,
|
|
415
|
+
* renderCell: (params) => `$${Number(params.value).toFixed(2)}`,
|
|
416
|
+
* });
|
|
417
|
+
* ```
|
|
418
|
+
*/
|
|
419
|
+
export type ColumnCustomizerFn = (colDef: Record<string, unknown>, column: Column) => Record<string, unknown>;
|
|
420
|
+
/**
|
|
421
|
+
* Props passed to custom item components in card/tag container rendering.
|
|
422
|
+
*/
|
|
423
|
+
export interface ItemComponentProps {
|
|
424
|
+
/** The row transfer data */
|
|
425
|
+
row: Record<string, unknown>;
|
|
426
|
+
/** Column definitions from the table model */
|
|
427
|
+
columns: Column[];
|
|
428
|
+
/** Callback to dispatch a row-level action */
|
|
429
|
+
onRowClick?: () => void;
|
|
430
|
+
/** Callback to remove this item (present when RemoveActionDefinition exists) */
|
|
431
|
+
onDelete?: () => void;
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Props passed to custom toolbar components in card/tag container rendering.
|
|
435
|
+
*/
|
|
436
|
+
export interface ItemToolbarProps {
|
|
437
|
+
/** The table model element */
|
|
438
|
+
element: Table;
|
|
439
|
+
/** Total number of items */
|
|
440
|
+
totalCount?: number;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Configuration for item container rendering of tables.
|
|
444
|
+
*
|
|
445
|
+
* When `representationComponent` is `CARD` or `TAG`, the `TableRenderer`
|
|
446
|
+
* renders table data as a grid of cards or tags instead of a DataGrid.
|
|
447
|
+
* This config allows overriding the item component, toolbar, and layout.
|
|
448
|
+
*/
|
|
449
|
+
export interface ItemContainerConfig {
|
|
450
|
+
/** Layout direction for items. @default 'vertical' */
|
|
451
|
+
layout?: "horizontal" | "vertical";
|
|
452
|
+
/** Custom item component replacing the default card/tag renderer */
|
|
453
|
+
ItemElement?: ComponentType<ItemComponentProps>;
|
|
454
|
+
/** Custom toolbar component replacing the default toolbar */
|
|
455
|
+
ToolbarElement?: ComponentType<ItemToolbarProps>;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* @internal Runtime format for the complete customizations configuration.
|
|
459
|
+
*
|
|
460
|
+
* This is the **internal** type consumed by `CustomizationsProvider`.
|
|
461
|
+
* **Developers should never construct `CustomizationsConfig` directly.**
|
|
462
|
+
*
|
|
463
|
+
* Instead, use the generated `createCustomizations()` factory which provides:
|
|
464
|
+
* - Type-safe, human-readable page and element names
|
|
465
|
+
* - Compile-time validation of action names, component names, and element names
|
|
466
|
+
* - Automatic name→sourceId resolution (sourceIds are never visible to developers)
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* ```typescript
|
|
470
|
+
* // Correct: use the generated type-safe factory
|
|
471
|
+
* import { createCustomizations } from './generated';
|
|
472
|
+
*
|
|
473
|
+
* const customizations = createCustomizations({
|
|
474
|
+
* pages: {
|
|
475
|
+
* UserListPage: {
|
|
476
|
+
* actions: useUserListPageActions,
|
|
477
|
+
* visualProperties: () => ({ searchBox: { hidden: true } }),
|
|
478
|
+
* },
|
|
479
|
+
* },
|
|
480
|
+
* components: {
|
|
481
|
+
* OrderSummaryWidget: OrderSummaryComponent,
|
|
482
|
+
* },
|
|
483
|
+
* componentInterceptors: {
|
|
484
|
+
* TextInput: (element, page) =>
|
|
485
|
+
* element.attributeType?.name?.endsWith('Email') ? EmailInput : null,
|
|
486
|
+
* },
|
|
487
|
+
* footerText: '© 2026 Acme Corp',
|
|
488
|
+
* });
|
|
489
|
+
* ```
|
|
490
|
+
*/
|
|
491
|
+
export interface CustomizationsConfig {
|
|
492
|
+
/**
|
|
493
|
+
* @internal Page-scoped customization bundles.
|
|
494
|
+
* Keys are PageDefinition sourceIds (resolved by the factory from names).
|
|
495
|
+
*/
|
|
496
|
+
pages?: Record<string, PageCustomization>;
|
|
497
|
+
/**
|
|
498
|
+
* @internal Custom component implementations (keyed by sourceId).
|
|
499
|
+
* Resolved by the factory from human-readable component names.
|
|
500
|
+
*
|
|
501
|
+
* Highest priority — wins over type interceptors and default rendering.
|
|
502
|
+
*/
|
|
503
|
+
components?: Record<string, CustomComponent>;
|
|
504
|
+
/**
|
|
505
|
+
* Component interceptors by element @type.
|
|
506
|
+
* Called for every element of the matching type.
|
|
507
|
+
* Return a component to override rendering, or null for default.
|
|
508
|
+
*
|
|
509
|
+
* Priority: sourceId (components) > type interceptor > default rendering.
|
|
510
|
+
*
|
|
511
|
+
* @example
|
|
512
|
+
* ```typescript
|
|
513
|
+
* {
|
|
514
|
+
* componentInterceptors: {
|
|
515
|
+
* TextInput: (element, page) => {
|
|
516
|
+
* if (element.attributeType?.name?.endsWith('Email')) {
|
|
517
|
+
* return EmailInputComponent;
|
|
518
|
+
* }
|
|
519
|
+
* return null;
|
|
520
|
+
* },
|
|
521
|
+
* Table: (element, page) => MyCustomTableComponent,
|
|
522
|
+
* }
|
|
523
|
+
* }
|
|
524
|
+
* ```
|
|
525
|
+
*/
|
|
526
|
+
componentInterceptors?: ComponentInterceptors;
|
|
527
|
+
/**
|
|
528
|
+
* Sub-theme providers keyed by sub-theme name.
|
|
529
|
+
*
|
|
530
|
+
* When a VisualElement has `subTheme` set, the runtime looks up the matching
|
|
531
|
+
* provider here and wraps the element tree in a scoped MUI `ThemeProvider`.
|
|
532
|
+
* Sub-themes nest with increasing precedence (inner overrides outer).
|
|
533
|
+
*/
|
|
534
|
+
subThemeProviders?: Record<string, SubThemeHook>;
|
|
535
|
+
/**
|
|
536
|
+
* Redirect handler component rendered at the `/_redirect` route.
|
|
537
|
+
*
|
|
538
|
+
* Renders inside the Router with full access to React hooks including
|
|
539
|
+
* `useSearchParams()`, `useNavigate()`, `useLocation()`, etc.
|
|
540
|
+
*
|
|
541
|
+
* Use cases: OAuth callbacks, deep-linking from emails, external redirects.
|
|
542
|
+
*/
|
|
543
|
+
redirectHandler?: ComponentType;
|
|
544
|
+
/**
|
|
545
|
+
* Additional custom routes injected into the application router.
|
|
546
|
+
*
|
|
547
|
+
* Inserted after model-derived page routes and before the 404 catch-all.
|
|
548
|
+
* Route elements render inside the Router with full hook access.
|
|
549
|
+
*/
|
|
550
|
+
customRoutes?: Array<{
|
|
551
|
+
path: string;
|
|
552
|
+
element: ReactElement;
|
|
553
|
+
}>;
|
|
554
|
+
/**
|
|
555
|
+
* Menu customization function.
|
|
556
|
+
*
|
|
557
|
+
* Called with navigation items from the model's `NavigationController.items`.
|
|
558
|
+
* The returned array replaces the original items — add, remove, reorder freely.
|
|
559
|
+
* Applied in both vertical and horizontal navigation layouts.
|
|
560
|
+
*/
|
|
561
|
+
menuCustomizer?: (items: NavigationItem[]) => NavigationItem[];
|
|
562
|
+
/**
|
|
563
|
+
* Footer text displayed at the bottom of the application shell.
|
|
564
|
+
* Accepts a static string or a function returning a string.
|
|
565
|
+
*/
|
|
566
|
+
footerText?: string | (() => string);
|
|
567
|
+
/**
|
|
568
|
+
* Custom hero component rendered in the AppBar for authenticated actors.
|
|
569
|
+
*
|
|
570
|
+
* When set, replaces the built-in `DefaultHeroComponent` on the right-hand
|
|
571
|
+
* side of the top AppBar. The default hero ships out of the box and shows
|
|
572
|
+
* an actor chip, avatar, and a dropdown with profile info and sign-out.
|
|
573
|
+
*
|
|
574
|
+
* Only rendered when the actor requires authentication
|
|
575
|
+
* (`requiresAuth === true`); anonymous actors never display a hero.
|
|
576
|
+
*
|
|
577
|
+
* The component receives the authenticated principal data and the
|
|
578
|
+
* current actor name so it can render personalised content (avatar,
|
|
579
|
+
* greeting, role badge, etc.) while still providing access to
|
|
580
|
+
* sign-out and profile actions.
|
|
581
|
+
*/
|
|
582
|
+
heroComponent?: ComponentType<HeroComponentProps>;
|
|
583
|
+
/**
|
|
584
|
+
* Custom settings page component rendered at the `/settings` route.
|
|
585
|
+
*
|
|
586
|
+
* The `/settings` route is always registered — when this property is
|
|
587
|
+
* not provided, a built-in placeholder page is rendered instead.
|
|
588
|
+
* The DefaultHeroComponent always shows a "Settings" menu item.
|
|
589
|
+
* The component is fully owned by the application — the framework
|
|
590
|
+
* provides only the route and navigation wiring.
|
|
591
|
+
*/
|
|
592
|
+
settingsPage?: ComponentType;
|
|
593
|
+
/**
|
|
594
|
+
* Custom guest page component rendered when `Application.supportGuestAccess`
|
|
595
|
+
* is `true` and the user is not authenticated.
|
|
596
|
+
*
|
|
597
|
+
* When set, replaces the built-in `DefaultGuestPage`. The component receives
|
|
598
|
+
* the `Application` model and a `signIn` callback to trigger OIDC login.
|
|
599
|
+
*
|
|
600
|
+
* When not set and guest access is enabled, the framework renders
|
|
601
|
+
* `DefaultGuestPage` which shows the application title and a "Sign In" button.
|
|
602
|
+
*
|
|
603
|
+
* When guest access is disabled (`supportGuestAccess` is `false` or absent),
|
|
604
|
+
* unauthenticated users are redirected to OIDC automatically (existing behavior).
|
|
605
|
+
*/
|
|
606
|
+
guestComponent?: ComponentType<GuestPageProps>;
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Props passed to a custom guest page component.
|
|
610
|
+
*
|
|
611
|
+
* Provided when `Application.supportGuestAccess` is `true` and the user
|
|
612
|
+
* is not yet authenticated. The component should offer a way to trigger
|
|
613
|
+
* sign-in (e.g., a "Sign In" button calling `signIn()`).
|
|
614
|
+
*
|
|
615
|
+
* @see {@link CustomizationsConfig.guestComponent}
|
|
616
|
+
*/
|
|
617
|
+
export interface GuestPageProps {
|
|
618
|
+
/** The active Application model (for branding: title, logo, etc.). */
|
|
619
|
+
application: Application;
|
|
620
|
+
/** Trigger the OIDC sign-in redirect flow. */
|
|
621
|
+
signIn: () => void;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Props passed to a custom hero component in the AppBar.
|
|
625
|
+
*
|
|
626
|
+
* @see {@link CustomizationsConfig.heroComponent}
|
|
627
|
+
*/
|
|
628
|
+
export interface HeroComponentProps {
|
|
629
|
+
/** Authenticated principal data (name, email, username, …). */
|
|
630
|
+
principal: {
|
|
631
|
+
email?: string;
|
|
632
|
+
name?: string;
|
|
633
|
+
preferredUsername?: string;
|
|
634
|
+
givenName?: string;
|
|
635
|
+
familyName?: string;
|
|
636
|
+
[key: string]: unknown;
|
|
637
|
+
} | null;
|
|
638
|
+
/** The current actor / role name from the application model. */
|
|
639
|
+
actorName: string;
|
|
640
|
+
/** Triggers the sign-out / redirect flow. */
|
|
641
|
+
signOut: () => void;
|
|
642
|
+
/**
|
|
643
|
+
* Navigate to the actor's profile page.
|
|
644
|
+
* Defined when `Application.profilePage` is set in the model.
|
|
645
|
+
* When undefined the hero should hide the Profile action.
|
|
646
|
+
*/
|
|
647
|
+
onNavigateToProfile?: () => void;
|
|
648
|
+
/**
|
|
649
|
+
* Navigate to the settings page.
|
|
650
|
+
* Always provided — the framework registers a `/settings` route
|
|
651
|
+
* with either the custom `CustomizationsConfig.settingsPage` or
|
|
652
|
+
* a built-in placeholder.
|
|
653
|
+
*/
|
|
654
|
+
onNavigateToSettings: () => void;
|
|
655
|
+
/**
|
|
656
|
+
* URL of the principal's profile picture.
|
|
657
|
+
* Resolved from the `isProfilePicture` attribute on the principal's
|
|
658
|
+
* ClassType when the matching value is present in the principal data.
|
|
659
|
+
* When defined the hero avatar should display this image.
|
|
660
|
+
*/
|
|
661
|
+
profilePictureUrl?: string;
|
|
662
|
+
}
|
|
663
|
+
//# sourceMappingURL=extensibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensibility.d.ts","sourceRoot":"","sources":["../src/extensibility.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AACpG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EACX,eAAe,EACf,QAAQ,EACR,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,YAAY,EACZ,aAAa,EACb,MAAM,EACN,QAAQ,EACR,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3F,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,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