@object-ui/types 3.0.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +217 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +85 -1
- package/dist/complex.d.ts +118 -0
- package/dist/complex.d.ts.map +1 -1
- package/dist/data-display.d.ts +105 -1
- package/dist/data-display.d.ts.map +1 -1
- package/dist/data.d.ts +45 -0
- package/dist/data.d.ts.map +1 -1
- package/dist/designer.d.ts +197 -35
- package/dist/designer.d.ts.map +1 -1
- package/dist/designer.js +11 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/layout.d.ts +39 -2
- package/dist/layout.d.ts.map +1 -1
- package/dist/navigation.d.ts +27 -0
- package/dist/navigation.d.ts.map +1 -1
- package/dist/objectql.d.ts +641 -7
- package/dist/objectql.d.ts.map +1 -1
- package/dist/record-components.d.ts +160 -0
- package/dist/record-components.d.ts.map +1 -0
- package/dist/record-components.js +8 -0
- package/dist/reports.d.ts +37 -0
- package/dist/reports.d.ts.map +1 -1
- package/dist/theme.d.ts +5 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/views.d.ts +257 -3
- package/dist/views.d.ts.map +1 -1
- package/dist/workflow.d.ts +198 -0
- package/dist/workflow.d.ts.map +1 -1
- package/dist/zod/app.zod.d.ts +42 -2
- package/dist/zod/app.zod.d.ts.map +1 -1
- package/dist/zod/app.zod.js +61 -1
- package/dist/zod/complex.zod.d.ts +122 -0
- package/dist/zod/complex.zod.d.ts.map +1 -1
- package/dist/zod/complex.zod.js +57 -0
- package/dist/zod/data-display.zod.d.ts +4 -0
- package/dist/zod/data-display.zod.d.ts.map +1 -1
- package/dist/zod/data-display.zod.js +2 -0
- package/dist/zod/form.zod.d.ts +6 -6
- package/dist/zod/index.zod.d.ts +364 -41
- package/dist/zod/index.zod.d.ts.map +1 -1
- package/dist/zod/index.zod.js +2 -2
- package/dist/zod/layout.zod.d.ts +6 -6
- package/dist/zod/navigation.zod.d.ts +58 -12
- package/dist/zod/navigation.zod.d.ts.map +1 -1
- package/dist/zod/navigation.zod.js +21 -9
- package/dist/zod/objectql.zod.d.ts +515 -27
- package/dist/zod/objectql.zod.d.ts.map +1 -1
- package/dist/zod/objectql.zod.js +162 -0
- package/dist/zod/reports.zod.d.ts +38 -38
- package/dist/zod/views.zod.d.ts +161 -7
- package/dist/zod/views.zod.d.ts.map +1 -1
- package/dist/zod/views.zod.js +21 -2
- package/package.json +2 -2
- package/src/__tests__/app-creation-types.test.ts +177 -0
- package/src/__tests__/dashboard-config.test.ts +208 -0
- package/src/__tests__/examples-metadata-compliance.test.ts +264 -0
- package/src/__tests__/navigation-model.test.ts +406 -0
- package/src/__tests__/p1-spec-alignment.test.ts +660 -0
- package/src/__tests__/p2-spec-exports.test.ts +312 -0
- package/src/__tests__/phase2-schemas.test.ts +108 -0
- package/src/app.ts +377 -0
- package/src/complex.ts +120 -0
- package/src/data-display.ts +107 -0
- package/src/data.ts +49 -0
- package/src/designer.ts +219 -30
- package/src/index.ts +192 -3
- package/src/layout.ts +55 -2
- package/src/navigation.ts +20 -0
- package/src/objectql.ts +757 -8
- package/src/record-components.ts +188 -0
- package/src/reports.ts +43 -0
- package/src/theme.ts +6 -0
- package/src/views.ts +275 -3
- package/src/workflow.ts +226 -0
- package/src/zod/app.zod.ts +74 -1
- package/src/zod/complex.zod.ts +59 -0
- package/src/zod/data-display.zod.ts +2 -0
- package/src/zod/index.zod.ts +5 -0
- package/src/zod/navigation.zod.ts +22 -10
- package/src/zod/objectql.zod.ts +167 -0
- package/src/zod/views.zod.ts +21 -2
package/dist/app.d.ts
CHANGED
|
@@ -10,8 +10,100 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Defines the metadata structure for a complete application, including
|
|
12
12
|
* global layout, navigation menus, and routing configuration.
|
|
13
|
+
*
|
|
14
|
+
* ## Navigation Model
|
|
15
|
+
*
|
|
16
|
+
* ObjectUI uses a unified `NavigationItem` model aligned with @objectstack/spec.
|
|
17
|
+
* The legacy `MenuItem` type is retained for backward compatibility but new
|
|
18
|
+
* configurations should use `NavigationItem` and the `navigation` / `areas` fields.
|
|
13
19
|
*/
|
|
14
20
|
import type { BaseSchema } from './base';
|
|
21
|
+
/**
|
|
22
|
+
* Navigation item type — determines the target and required fields.
|
|
23
|
+
*/
|
|
24
|
+
export type NavigationItemType = 'object' | 'dashboard' | 'page' | 'report' | 'url' | 'group' | 'separator' | 'action';
|
|
25
|
+
/**
|
|
26
|
+
* Unified Navigation Item
|
|
27
|
+
*
|
|
28
|
+
* The single navigation primitive used across ObjectUI and @objectstack/spec.
|
|
29
|
+
* Replaces the legacy `MenuItem` for application navigation trees.
|
|
30
|
+
*
|
|
31
|
+
* Supports typed navigation targets (object, dashboard, page, report, url),
|
|
32
|
+
* nested groups, visibility expressions, RBAC permissions, and UX enhancements
|
|
33
|
+
* like badges, pinning, and sort ordering.
|
|
34
|
+
*/
|
|
35
|
+
export interface NavigationItem {
|
|
36
|
+
/** Unique identifier */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Navigation item type */
|
|
39
|
+
type: NavigationItemType;
|
|
40
|
+
/** Display label (plain string or I18nLabel object for internationalization) */
|
|
41
|
+
label: string | {
|
|
42
|
+
key: string;
|
|
43
|
+
defaultValue?: string;
|
|
44
|
+
params?: Record<string, any>;
|
|
45
|
+
};
|
|
46
|
+
/** Icon name (Lucide) */
|
|
47
|
+
icon?: string;
|
|
48
|
+
/** Target object name (for type: 'object') */
|
|
49
|
+
objectName?: string;
|
|
50
|
+
/** Target view name (for type: 'object') — opens a specific named list view e.g. 'calendar', 'pipeline' */
|
|
51
|
+
viewName?: string;
|
|
52
|
+
/** Target dashboard name (for type: 'dashboard') */
|
|
53
|
+
dashboardName?: string;
|
|
54
|
+
/** Target page name (for type: 'page') */
|
|
55
|
+
pageName?: string;
|
|
56
|
+
/** Target report name (for type: 'report') */
|
|
57
|
+
reportName?: string;
|
|
58
|
+
/** Target URL (for type: 'url') */
|
|
59
|
+
url?: string;
|
|
60
|
+
/** Link target (for type: 'url') */
|
|
61
|
+
target?: '_blank' | '_self';
|
|
62
|
+
/** Child navigation items (for type: 'group') */
|
|
63
|
+
children?: NavigationItem[];
|
|
64
|
+
/** Visibility expression — boolean or expression string e.g. "${user.role === 'admin'}" */
|
|
65
|
+
visible?: boolean | string;
|
|
66
|
+
/** Required permissions to see/access this item */
|
|
67
|
+
requiredPermissions?: string[];
|
|
68
|
+
/** Badge text or count */
|
|
69
|
+
badge?: string | number;
|
|
70
|
+
/** Badge visual variant */
|
|
71
|
+
badgeVariant?: 'default' | 'destructive' | 'outline';
|
|
72
|
+
/** Whether group is expanded by default (for type: 'group') */
|
|
73
|
+
defaultOpen?: boolean;
|
|
74
|
+
/** Whether this item is pinned */
|
|
75
|
+
pinned?: boolean;
|
|
76
|
+
/** Sort order weight (lower = higher) */
|
|
77
|
+
order?: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Navigation Area — a business-domain partition of navigation items.
|
|
81
|
+
*
|
|
82
|
+
* Inspired by Salesforce Lightning App → Area → Tab model and
|
|
83
|
+
* Microsoft Power Apps Area → Group → Subarea pattern.
|
|
84
|
+
*
|
|
85
|
+
* Each area contains an independent navigation tree, allowing large
|
|
86
|
+
* enterprise applications to organise navigation by domain (e.g.
|
|
87
|
+
* Sales, Service, Marketing).
|
|
88
|
+
*/
|
|
89
|
+
export interface NavigationArea {
|
|
90
|
+
/** Unique identifier */
|
|
91
|
+
id: string;
|
|
92
|
+
/** Display label (plain string or I18nLabel object for internationalization) */
|
|
93
|
+
label: string | {
|
|
94
|
+
key: string;
|
|
95
|
+
defaultValue?: string;
|
|
96
|
+
params?: Record<string, any>;
|
|
97
|
+
};
|
|
98
|
+
/** Icon name (Lucide) */
|
|
99
|
+
icon?: string;
|
|
100
|
+
/** Navigation items within this area */
|
|
101
|
+
navigation: NavigationItem[];
|
|
102
|
+
/** Visibility expression */
|
|
103
|
+
visible?: boolean | string;
|
|
104
|
+
/** Required permissions to see this area */
|
|
105
|
+
requiredPermissions?: string[];
|
|
106
|
+
}
|
|
15
107
|
/**
|
|
16
108
|
* Top-level Application Configuration (app.json)
|
|
17
109
|
*/
|
|
@@ -25,10 +117,18 @@ export interface AppSchema extends BaseSchema {
|
|
|
25
117
|
* Display Title
|
|
26
118
|
*/
|
|
27
119
|
title?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Display Label (used in navigation and app switcher)
|
|
122
|
+
*/
|
|
123
|
+
label?: string;
|
|
28
124
|
/**
|
|
29
125
|
* Application Description
|
|
30
126
|
*/
|
|
31
127
|
description?: string;
|
|
128
|
+
/**
|
|
129
|
+
* Icon name (Lucide) for app switcher and navigation
|
|
130
|
+
*/
|
|
131
|
+
icon?: string;
|
|
32
132
|
/**
|
|
33
133
|
* Logo URL or Icon name
|
|
34
134
|
*/
|
|
@@ -37,6 +137,15 @@ export interface AppSchema extends BaseSchema {
|
|
|
37
137
|
* Favicon URL
|
|
38
138
|
*/
|
|
39
139
|
favicon?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Branding configuration
|
|
142
|
+
*/
|
|
143
|
+
branding?: BrandingConfig;
|
|
144
|
+
/**
|
|
145
|
+
* Whether the application is active (visible in app switcher)
|
|
146
|
+
* @default true
|
|
147
|
+
*/
|
|
148
|
+
active?: boolean;
|
|
40
149
|
/**
|
|
41
150
|
* Global Layout Strategy
|
|
42
151
|
* - sidebar: Standard admin layout with left sidebar
|
|
@@ -47,8 +156,20 @@ export interface AppSchema extends BaseSchema {
|
|
|
47
156
|
layout?: 'sidebar' | 'header' | 'empty';
|
|
48
157
|
/**
|
|
49
158
|
* Global Navigation Menu
|
|
159
|
+
* @deprecated Use `navigation` instead. Retained for backward compatibility.
|
|
50
160
|
*/
|
|
51
161
|
menu?: MenuItem[];
|
|
162
|
+
/**
|
|
163
|
+
* Unified navigation tree (aligned with @objectstack/spec NavigationItem model).
|
|
164
|
+
* Takes precedence over `menu` when both are present.
|
|
165
|
+
*/
|
|
166
|
+
navigation?: NavigationItem[];
|
|
167
|
+
/**
|
|
168
|
+
* Navigation areas / business-domain partitions.
|
|
169
|
+
* When provided, the sidebar displays an area switcher and renders
|
|
170
|
+
* the selected area's navigation tree.
|
|
171
|
+
*/
|
|
172
|
+
areas?: NavigationArea[];
|
|
52
173
|
/**
|
|
53
174
|
* Global Actions (User Profile, Settings, etc)
|
|
54
175
|
*/
|
|
@@ -66,6 +187,7 @@ export interface AppSchema extends BaseSchema {
|
|
|
66
187
|
}
|
|
67
188
|
/**
|
|
68
189
|
* Navigation Menu Item
|
|
190
|
+
* @deprecated Use `NavigationItem` instead.
|
|
69
191
|
*/
|
|
70
192
|
export interface MenuItem {
|
|
71
193
|
/**
|
|
@@ -101,6 +223,101 @@ export interface MenuItem {
|
|
|
101
223
|
*/
|
|
102
224
|
hidden?: boolean | string;
|
|
103
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Convert a legacy `MenuItem` to a `NavigationItem`.
|
|
228
|
+
*
|
|
229
|
+
* Mapping rules:
|
|
230
|
+
* - `type: 'item'` → inferred from `href` (url) or `path` (page)
|
|
231
|
+
* - `type: 'group'` → `type: 'group'`
|
|
232
|
+
* - `type: 'separator'` → `type: 'separator'`
|
|
233
|
+
* - `hidden` → `visible` (inverted)
|
|
234
|
+
* - `path` → `pageName` (last segment) or kept as-is for url
|
|
235
|
+
* - `href` → `url` with `target: '_blank'`
|
|
236
|
+
*/
|
|
237
|
+
export declare function menuItemToNavigationItem(item: MenuItem, index?: number): NavigationItem;
|
|
238
|
+
/**
|
|
239
|
+
* Wizard step identifier for app creation flow.
|
|
240
|
+
*/
|
|
241
|
+
export type AppWizardStepId = 'basic' | 'objects' | 'navigation' | 'branding';
|
|
242
|
+
/**
|
|
243
|
+
* App wizard step definition.
|
|
244
|
+
*/
|
|
245
|
+
export interface AppWizardStep {
|
|
246
|
+
/** Step identifier */
|
|
247
|
+
id: AppWizardStepId;
|
|
248
|
+
/** Display label */
|
|
249
|
+
label: string;
|
|
250
|
+
/** Step description */
|
|
251
|
+
description?: string;
|
|
252
|
+
/** Icon name (Lucide) */
|
|
253
|
+
icon?: string;
|
|
254
|
+
/** Whether the step is optional */
|
|
255
|
+
optional?: boolean;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Branding configuration for an application.
|
|
259
|
+
*/
|
|
260
|
+
export interface BrandingConfig {
|
|
261
|
+
/** Logo URL or base64 data URI */
|
|
262
|
+
logo?: string;
|
|
263
|
+
/** Primary brand color (hex) */
|
|
264
|
+
primaryColor?: string;
|
|
265
|
+
/** Favicon URL */
|
|
266
|
+
favicon?: string;
|
|
267
|
+
/** Font family override */
|
|
268
|
+
fontFamily?: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Object selection entry for the wizard.
|
|
272
|
+
*/
|
|
273
|
+
export interface ObjectSelection {
|
|
274
|
+
/** Object name (snake_case) */
|
|
275
|
+
name: string;
|
|
276
|
+
/** Display label */
|
|
277
|
+
label: string;
|
|
278
|
+
/** Icon name (Lucide) */
|
|
279
|
+
icon?: string;
|
|
280
|
+
/** Whether this object is selected */
|
|
281
|
+
selected: boolean;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* App creation wizard draft state — represents the in-progress
|
|
285
|
+
* application configuration before it is finalized into an AppSchema.
|
|
286
|
+
*/
|
|
287
|
+
export interface AppWizardDraft {
|
|
288
|
+
/** App name (snake_case, validated) */
|
|
289
|
+
name: string;
|
|
290
|
+
/** Display title */
|
|
291
|
+
title: string;
|
|
292
|
+
/** Description */
|
|
293
|
+
description?: string;
|
|
294
|
+
/** App icon name (Lucide) */
|
|
295
|
+
icon?: string;
|
|
296
|
+
/** Template to start from */
|
|
297
|
+
template?: string;
|
|
298
|
+
/** Layout strategy */
|
|
299
|
+
layout: 'sidebar' | 'header' | 'empty';
|
|
300
|
+
/** Selected business objects */
|
|
301
|
+
objects: ObjectSelection[];
|
|
302
|
+
/** Navigation tree being built */
|
|
303
|
+
navigation: NavigationItem[];
|
|
304
|
+
/** Branding configuration */
|
|
305
|
+
branding: BrandingConfig;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Editor mode for the app designer.
|
|
309
|
+
*/
|
|
310
|
+
export type EditorMode = 'edit' | 'preview' | 'code';
|
|
311
|
+
/**
|
|
312
|
+
* Validate an app name is snake_case.
|
|
313
|
+
* Pattern: starts with lowercase letter, followed by lowercase letters/digits,
|
|
314
|
+
* with optional underscore-separated segments (no trailing/leading/double underscores).
|
|
315
|
+
*/
|
|
316
|
+
export declare function isValidAppName(name: string): boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Convert an AppWizardDraft to an AppSchema.
|
|
319
|
+
*/
|
|
320
|
+
export declare function wizardDraftToAppSchema(draft: AppWizardDraft): AppSchema;
|
|
104
321
|
/**
|
|
105
322
|
* Application Header/Toolbar Action
|
|
106
323
|
*/
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAMzC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,QAAQ,GACR,WAAW,GACX,MAAM,GACN,QAAQ,GACR,KAAK,GACL,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IAEX,2BAA2B;IAC3B,IAAI,EAAE,kBAAkB,CAAC;IAEzB,gFAAgF;IAChF,KAAK,EAAE,MAAM,GA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AM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;IACjF;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CACzC"}
|
package/dist/app.js
CHANGED
|
@@ -5,4 +5,88 @@
|
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// MenuItem → NavigationItem Transform
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Convert a legacy `MenuItem` to a `NavigationItem`.
|
|
13
|
+
*
|
|
14
|
+
* Mapping rules:
|
|
15
|
+
* - `type: 'item'` → inferred from `href` (url) or `path` (page)
|
|
16
|
+
* - `type: 'group'` → `type: 'group'`
|
|
17
|
+
* - `type: 'separator'` → `type: 'separator'`
|
|
18
|
+
* - `hidden` → `visible` (inverted)
|
|
19
|
+
* - `path` → `pageName` (last segment) or kept as-is for url
|
|
20
|
+
* - `href` → `url` with `target: '_blank'`
|
|
21
|
+
*/
|
|
22
|
+
export function menuItemToNavigationItem(item, index = 0) {
|
|
23
|
+
const id = `migrated_${index}`;
|
|
24
|
+
if (item.type === 'separator') {
|
|
25
|
+
return {
|
|
26
|
+
id,
|
|
27
|
+
type: 'separator',
|
|
28
|
+
label: item.label || '',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
if (item.type === 'group') {
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
type: 'group',
|
|
35
|
+
label: item.label || '',
|
|
36
|
+
icon: item.icon,
|
|
37
|
+
children: (item.children || []).map((child, i) => menuItemToNavigationItem(child, index * 100 + i)),
|
|
38
|
+
visible: item.hidden !== undefined ? !item.hidden : undefined,
|
|
39
|
+
badge: item.badge,
|
|
40
|
+
defaultOpen: true,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// Default: 'item' type — infer target from href / path
|
|
44
|
+
if (item.href) {
|
|
45
|
+
return {
|
|
46
|
+
id,
|
|
47
|
+
type: 'url',
|
|
48
|
+
label: item.label || '',
|
|
49
|
+
icon: item.icon,
|
|
50
|
+
url: item.href,
|
|
51
|
+
target: '_blank',
|
|
52
|
+
visible: item.hidden !== undefined ? !item.hidden : undefined,
|
|
53
|
+
badge: item.badge,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// Path-based item → treat as page navigation
|
|
57
|
+
return {
|
|
58
|
+
id,
|
|
59
|
+
type: 'page',
|
|
60
|
+
label: item.label || '',
|
|
61
|
+
icon: item.icon,
|
|
62
|
+
pageName: item.path || '',
|
|
63
|
+
visible: item.hidden !== undefined ? !item.hidden : undefined,
|
|
64
|
+
badge: item.badge,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Validate an app name is snake_case.
|
|
69
|
+
* Pattern: starts with lowercase letter, followed by lowercase letters/digits,
|
|
70
|
+
* with optional underscore-separated segments (no trailing/leading/double underscores).
|
|
71
|
+
*/
|
|
72
|
+
export function isValidAppName(name) {
|
|
73
|
+
return /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/.test(name);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Convert an AppWizardDraft to an AppSchema.
|
|
77
|
+
*/
|
|
78
|
+
export function wizardDraftToAppSchema(draft) {
|
|
79
|
+
return {
|
|
80
|
+
type: 'app',
|
|
81
|
+
name: draft.name,
|
|
82
|
+
title: draft.title,
|
|
83
|
+
label: draft.title,
|
|
84
|
+
description: draft.description,
|
|
85
|
+
icon: draft.icon,
|
|
86
|
+
logo: draft.branding.logo,
|
|
87
|
+
favicon: draft.branding.favicon,
|
|
88
|
+
branding: draft.branding,
|
|
89
|
+
layout: draft.layout,
|
|
90
|
+
navigation: draft.navigation,
|
|
91
|
+
};
|
|
92
|
+
}
|
package/dist/complex.d.ts
CHANGED
|
@@ -452,6 +452,8 @@ export interface DashboardWidgetLayout {
|
|
|
452
452
|
export interface DashboardWidgetSchema {
|
|
453
453
|
id?: string;
|
|
454
454
|
title?: string;
|
|
455
|
+
/** Widget description */
|
|
456
|
+
description?: string;
|
|
455
457
|
/** Component schema (legacy format) */
|
|
456
458
|
component?: SchemaNode;
|
|
457
459
|
layout?: DashboardWidgetLayout;
|
|
@@ -459,17 +461,133 @@ export interface DashboardWidgetSchema {
|
|
|
459
461
|
type?: string;
|
|
460
462
|
/** Widget-specific configuration (spec shorthand format) */
|
|
461
463
|
options?: unknown;
|
|
464
|
+
/** Chart configuration for chart-type widgets */
|
|
465
|
+
chartConfig?: any;
|
|
466
|
+
/**
|
|
467
|
+
* Widget color variant.
|
|
468
|
+
* Aligned with @objectstack/spec WidgetColorVariantSchema.
|
|
469
|
+
*/
|
|
470
|
+
colorVariant?: 'default' | 'blue' | 'teal' | 'orange' | 'purple' | 'success' | 'warning' | 'danger';
|
|
471
|
+
/** Action URL for clickable widgets */
|
|
472
|
+
actionUrl?: string;
|
|
473
|
+
/** Action type for widget interactions */
|
|
474
|
+
actionType?: string;
|
|
475
|
+
/** Action icon name */
|
|
476
|
+
actionIcon?: string;
|
|
477
|
+
/**
|
|
478
|
+
* Data binding: Object name for data source.
|
|
479
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.object.
|
|
480
|
+
*/
|
|
481
|
+
object?: string;
|
|
482
|
+
/**
|
|
483
|
+
* Data binding: Filter conditions.
|
|
484
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.filter.
|
|
485
|
+
*/
|
|
486
|
+
filter?: any;
|
|
487
|
+
/**
|
|
488
|
+
* Data binding: Category field for grouping.
|
|
489
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.categoryField.
|
|
490
|
+
*/
|
|
491
|
+
categoryField?: string;
|
|
492
|
+
/**
|
|
493
|
+
* Data binding: Value field for aggregation.
|
|
494
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.valueField.
|
|
495
|
+
*/
|
|
496
|
+
valueField?: string;
|
|
497
|
+
/**
|
|
498
|
+
* Aggregation function.
|
|
499
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.aggregate.
|
|
500
|
+
*/
|
|
501
|
+
aggregate?: string;
|
|
502
|
+
/**
|
|
503
|
+
* Multiple measures for pivot/matrix display.
|
|
504
|
+
* Aligned with @objectstack/spec WidgetMeasureSchema.
|
|
505
|
+
*/
|
|
506
|
+
measures?: Array<{
|
|
507
|
+
valueField: string;
|
|
508
|
+
aggregate: string;
|
|
509
|
+
label?: string;
|
|
510
|
+
format?: string;
|
|
511
|
+
}>;
|
|
512
|
+
/**
|
|
513
|
+
* Responsive configuration per breakpoint.
|
|
514
|
+
* Aligned with @objectstack/spec DashboardWidgetSchema.responsive.
|
|
515
|
+
*/
|
|
516
|
+
responsive?: any;
|
|
517
|
+
/**
|
|
518
|
+
* ARIA accessibility attributes.
|
|
519
|
+
* Aligned with @objectstack/spec AriaPropsSchema.
|
|
520
|
+
*/
|
|
521
|
+
aria?: {
|
|
522
|
+
ariaLabel?: string;
|
|
523
|
+
ariaDescribedBy?: string;
|
|
524
|
+
role?: string;
|
|
525
|
+
};
|
|
462
526
|
}
|
|
463
527
|
/**
|
|
464
528
|
* Dashboard Schema
|
|
465
529
|
*/
|
|
466
530
|
export interface DashboardSchema extends BaseSchema {
|
|
467
531
|
type: 'dashboard';
|
|
532
|
+
/** Dashboard title displayed in the header */
|
|
533
|
+
title?: string;
|
|
468
534
|
columns?: number;
|
|
469
535
|
gap?: number;
|
|
470
536
|
widgets: DashboardWidgetSchema[];
|
|
471
537
|
/** Auto-refresh interval in seconds. When set, the dashboard will periodically trigger onRefresh. */
|
|
472
538
|
refreshInterval?: number;
|
|
539
|
+
/**
|
|
540
|
+
* Dashboard header configuration.
|
|
541
|
+
* Aligned with @objectstack/spec DashboardHeaderSchema.
|
|
542
|
+
*/
|
|
543
|
+
header?: {
|
|
544
|
+
showTitle?: boolean;
|
|
545
|
+
showDescription?: boolean;
|
|
546
|
+
actions?: Array<{
|
|
547
|
+
label: string;
|
|
548
|
+
actionUrl?: string;
|
|
549
|
+
actionType?: string;
|
|
550
|
+
icon?: string;
|
|
551
|
+
}>;
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* Global filter configurations.
|
|
555
|
+
* Applied across all dashboard widgets.
|
|
556
|
+
* Aligned with @objectstack/spec GlobalFilterSchema.
|
|
557
|
+
*/
|
|
558
|
+
globalFilters?: Array<{
|
|
559
|
+
field: string;
|
|
560
|
+
label?: string;
|
|
561
|
+
type?: 'text' | 'select' | 'date' | 'number' | 'lookup';
|
|
562
|
+
options?: string[];
|
|
563
|
+
optionsFrom?: {
|
|
564
|
+
object: string;
|
|
565
|
+
valueField: string;
|
|
566
|
+
labelField?: string;
|
|
567
|
+
filter?: any;
|
|
568
|
+
};
|
|
569
|
+
defaultValue?: any;
|
|
570
|
+
scope?: string;
|
|
571
|
+
targetWidgets?: string[];
|
|
572
|
+
}>;
|
|
573
|
+
/**
|
|
574
|
+
* Date range filter configuration.
|
|
575
|
+
* Aligned with @objectstack/spec DashboardSchema.dateRange.
|
|
576
|
+
*/
|
|
577
|
+
dateRange?: {
|
|
578
|
+
field?: string;
|
|
579
|
+
defaultRange?: 'today' | 'yesterday' | 'this_week' | 'last_week' | 'this_month' | 'last_month' | 'this_quarter' | 'last_quarter' | 'this_year' | 'last_year' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'custom';
|
|
580
|
+
allowCustomRange?: boolean;
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* ARIA accessibility attributes.
|
|
584
|
+
* Aligned with @objectstack/spec AriaPropsSchema.
|
|
585
|
+
*/
|
|
586
|
+
aria?: {
|
|
587
|
+
ariaLabel?: string;
|
|
588
|
+
ariaDescribedBy?: string;
|
|
589
|
+
role?: string;
|
|
590
|
+
};
|
|
473
591
|
}
|
|
474
592
|
/**
|
|
475
593
|
* Union type of all complex schemas
|
package/dist/complex.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complex.d.ts","sourceRoot":"","sources":["../src/complex.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,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C;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;QACxD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;QACnB,WAAW,CAAC,EAAE;YACZ,MAAM,EAAE,MAAM,CAAC;YACf,UAAU,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,MAAM,CAAC,EAAE,GAAG,CAAC;SACd,CAAC;QACF,YAAY,CAAC,EAAE,GAAG,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;KAC1B,CAAC,CAAC;IACH;;;OAGG;IACH,SAAS,CAAC,EAAE;QACV,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,GAC1F,cAAc,GAAG,cAAc,GAAG,WAAW,GAAG,WAAW,GAC3D,aAAa,GAAG,cAAc,GAAG,cAAc,GAAG,QAAQ,CAAC;QAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,kBAAkB,GAClB,mBAAmB,GACnB,cAAc,GACd,aAAa,GACb,eAAe,CAAC"}
|
package/dist/data-display.d.ts
CHANGED
|
@@ -330,6 +330,13 @@ export interface DataTableSchema extends BaseSchema {
|
|
|
330
330
|
* @default false
|
|
331
331
|
*/
|
|
332
332
|
selectable?: boolean | 'single' | 'multiple';
|
|
333
|
+
/**
|
|
334
|
+
* Selection checkbox display style
|
|
335
|
+
* - 'always': Checkboxes are always visible
|
|
336
|
+
* - 'hover': Checkboxes only appear on row hover
|
|
337
|
+
* @default 'always'
|
|
338
|
+
*/
|
|
339
|
+
selectionStyle?: 'always' | 'hover';
|
|
333
340
|
/**
|
|
334
341
|
* Enable column sorting
|
|
335
342
|
* @default true
|
|
@@ -377,6 +384,12 @@ export interface DataTableSchema extends BaseSchema {
|
|
|
377
384
|
* @default false
|
|
378
385
|
*/
|
|
379
386
|
editable?: boolean;
|
|
387
|
+
/**
|
|
388
|
+
* Enable single-click editing mode
|
|
389
|
+
* When true with editable, clicking a cell enters edit mode (instead of double-click)
|
|
390
|
+
* @default false
|
|
391
|
+
*/
|
|
392
|
+
singleClickEdit?: boolean;
|
|
380
393
|
/**
|
|
381
394
|
* Cell value change handler
|
|
382
395
|
* Called when a cell value is edited
|
|
@@ -406,6 +419,41 @@ export interface DataTableSchema extends BaseSchema {
|
|
|
406
419
|
* Function that returns a CSS class string for each row
|
|
407
420
|
*/
|
|
408
421
|
rowClassName?: (row: any, index: number) => string | undefined;
|
|
422
|
+
/**
|
|
423
|
+
* Dynamic row inline style
|
|
424
|
+
* Function that returns CSSProperties for each row (e.g., from conditionalFormatting).
|
|
425
|
+
*/
|
|
426
|
+
rowStyle?: (row: any, index: number) => React.CSSProperties | undefined;
|
|
427
|
+
/**
|
|
428
|
+
* Number of columns to freeze (left-pin)
|
|
429
|
+
* When set, the first N columns remain fixed while the rest scroll horizontally.
|
|
430
|
+
* @default 0
|
|
431
|
+
*/
|
|
432
|
+
frozenColumns?: number;
|
|
433
|
+
/**
|
|
434
|
+
* Show row numbers in the first column (Airtable-style)
|
|
435
|
+
* @default false
|
|
436
|
+
*/
|
|
437
|
+
showRowNumbers?: boolean;
|
|
438
|
+
/**
|
|
439
|
+
* Show "+ Add record" row at the bottom of the table (Airtable-style)
|
|
440
|
+
* @default false
|
|
441
|
+
*/
|
|
442
|
+
showAddRow?: boolean;
|
|
443
|
+
/**
|
|
444
|
+
* Callback when the "+ Add record" row is clicked
|
|
445
|
+
*/
|
|
446
|
+
onAddRecord?: () => void;
|
|
447
|
+
/**
|
|
448
|
+
* Column resize handler
|
|
449
|
+
* Called when a column is resized
|
|
450
|
+
*/
|
|
451
|
+
onColumnResize?: (columnKey: string, width: number) => void;
|
|
452
|
+
/**
|
|
453
|
+
* Column reorder handler (new order of accessorKeys)
|
|
454
|
+
* Called when columns are reordered via drag-and-drop
|
|
455
|
+
*/
|
|
456
|
+
onColumnReorder?: (newOrder: string[]) => void;
|
|
409
457
|
}
|
|
410
458
|
/**
|
|
411
459
|
* Markdown renderer component
|
|
@@ -579,6 +627,62 @@ export interface ChartSchema extends BaseSchema {
|
|
|
579
627
|
*/
|
|
580
628
|
config?: Record<string, any>;
|
|
581
629
|
}
|
|
630
|
+
/**
|
|
631
|
+
* Aggregation function for pivot table values
|
|
632
|
+
*/
|
|
633
|
+
export type PivotAggregation = 'sum' | 'count' | 'avg' | 'min' | 'max';
|
|
634
|
+
/**
|
|
635
|
+
* Pivot table (cross-tabulation) component
|
|
636
|
+
*
|
|
637
|
+
* Renders a matrix where rows correspond to one field,
|
|
638
|
+
* columns to another, and cells show an aggregated value.
|
|
639
|
+
*/
|
|
640
|
+
export interface PivotTableSchema extends BaseSchema {
|
|
641
|
+
type: 'pivot';
|
|
642
|
+
/**
|
|
643
|
+
* Pivot table title
|
|
644
|
+
*/
|
|
645
|
+
title?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Field used for row headers
|
|
648
|
+
*/
|
|
649
|
+
rowField: string;
|
|
650
|
+
/**
|
|
651
|
+
* Field used for column headers
|
|
652
|
+
*/
|
|
653
|
+
columnField: string;
|
|
654
|
+
/**
|
|
655
|
+
* Field whose values are aggregated in cells
|
|
656
|
+
*/
|
|
657
|
+
valueField: string;
|
|
658
|
+
/**
|
|
659
|
+
* Aggregation function applied to valueField
|
|
660
|
+
* @default 'sum'
|
|
661
|
+
*/
|
|
662
|
+
aggregation?: PivotAggregation;
|
|
663
|
+
/**
|
|
664
|
+
* Source data rows
|
|
665
|
+
*/
|
|
666
|
+
data: Record<string, unknown>[];
|
|
667
|
+
/**
|
|
668
|
+
* Show a totals column on the right
|
|
669
|
+
* @default false
|
|
670
|
+
*/
|
|
671
|
+
showRowTotals?: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* Show a totals row at the bottom
|
|
674
|
+
* @default false
|
|
675
|
+
*/
|
|
676
|
+
showColumnTotals?: boolean;
|
|
677
|
+
/**
|
|
678
|
+
* Numeric format string (e.g. "$,.2f") — applied via simple prefix/suffix/decimals
|
|
679
|
+
*/
|
|
680
|
+
format?: string;
|
|
681
|
+
/**
|
|
682
|
+
* Mapping of column header values to Tailwind text-color classes
|
|
683
|
+
*/
|
|
684
|
+
columnColors?: Record<string, string>;
|
|
685
|
+
}
|
|
582
686
|
/**
|
|
583
687
|
* Timeline event
|
|
584
688
|
*/
|
|
@@ -677,7 +781,7 @@ export interface KbdSchema extends BaseSchema {
|
|
|
677
781
|
/**
|
|
678
782
|
* Union type of all data display schemas
|
|
679
783
|
*/
|
|
680
|
-
export type DataDisplaySchema = AlertSchema | BadgeSchema | AvatarSchema | ListSchema | TableSchema | DataTableSchema | MarkdownSchema | TreeViewSchema | ChartSchema | TimelineSchema | HtmlSchema | StatisticSchema | BreadcrumbSchema | KbdSchema;
|
|
784
|
+
export type DataDisplaySchema = AlertSchema | BadgeSchema | AvatarSchema | ListSchema | TableSchema | DataTableSchema | MarkdownSchema | TreeViewSchema | ChartSchema | PivotTableSchema | TimelineSchema | HtmlSchema | StatisticSchema | BreadcrumbSchema | KbdSchema;
|
|
681
785
|
/**
|
|
682
786
|
* Raw HTML component
|
|
683
787
|
*/
|