@object-ui/types 3.0.3 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.d.ts +217 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +85 -1
- package/dist/complex.d.ts +128 -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 +324 -4
- 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 +365 -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 +163 -7
- package/dist/zod/views.zod.d.ts.map +1 -1
- package/dist/zod/views.zod.js +22 -3
- 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 +130 -0
- package/src/data-display.ts +107 -0
- package/src/data.ts +49 -0
- package/src/designer.ts +219 -30
- package/src/index.ts +194 -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 +344 -4
- 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 +22 -3
package/dist/zod/views.zod.d.ts
CHANGED
|
@@ -21,11 +21,13 @@ import { z } from 'zod';
|
|
|
21
21
|
export declare const ViewTypeSchema: z.ZodEnum<{
|
|
22
22
|
list: "list";
|
|
23
23
|
grid: "grid";
|
|
24
|
+
map: "map";
|
|
24
25
|
kanban: "kanban";
|
|
25
26
|
calendar: "calendar";
|
|
26
27
|
timeline: "timeline";
|
|
27
28
|
detail: "detail";
|
|
28
|
-
|
|
29
|
+
gallery: "gallery";
|
|
30
|
+
gantt: "gantt";
|
|
29
31
|
}>;
|
|
30
32
|
/**
|
|
31
33
|
* Detail View Field Schema
|
|
@@ -34,16 +36,27 @@ export declare const DetailViewFieldSchema: z.ZodObject<{
|
|
|
34
36
|
name: z.ZodString;
|
|
35
37
|
label: z.ZodOptional<z.ZodString>;
|
|
36
38
|
type: z.ZodOptional<z.ZodEnum<{
|
|
39
|
+
number: "number";
|
|
40
|
+
boolean: "boolean";
|
|
37
41
|
date: "date";
|
|
38
42
|
custom: "custom";
|
|
43
|
+
url: "url";
|
|
44
|
+
user: "user";
|
|
39
45
|
link: "link";
|
|
46
|
+
select: "select";
|
|
40
47
|
markdown: "markdown";
|
|
41
48
|
text: "text";
|
|
49
|
+
lookup: "lookup";
|
|
50
|
+
email: "email";
|
|
42
51
|
badge: "badge";
|
|
43
52
|
datetime: "datetime";
|
|
53
|
+
currency: "currency";
|
|
54
|
+
percent: "percent";
|
|
44
55
|
html: "html";
|
|
45
56
|
image: "image";
|
|
46
57
|
json: "json";
|
|
58
|
+
phone: "phone";
|
|
59
|
+
master_detail: "master_detail";
|
|
47
60
|
}>>;
|
|
48
61
|
format: z.ZodOptional<z.ZodString>;
|
|
49
62
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -51,6 +64,14 @@ export declare const DetailViewFieldSchema: z.ZodObject<{
|
|
|
51
64
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
52
65
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
53
66
|
span: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
+
label: z.ZodString;
|
|
69
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
70
|
+
color: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
73
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
74
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
54
75
|
}, z.core.$strip>;
|
|
55
76
|
/**
|
|
56
77
|
* Detail View Section Schema
|
|
@@ -63,16 +84,27 @@ export declare const DetailViewSectionSchema: z.ZodObject<{
|
|
|
63
84
|
name: z.ZodString;
|
|
64
85
|
label: z.ZodOptional<z.ZodString>;
|
|
65
86
|
type: z.ZodOptional<z.ZodEnum<{
|
|
87
|
+
number: "number";
|
|
88
|
+
boolean: "boolean";
|
|
66
89
|
date: "date";
|
|
67
90
|
custom: "custom";
|
|
91
|
+
url: "url";
|
|
92
|
+
user: "user";
|
|
68
93
|
link: "link";
|
|
94
|
+
select: "select";
|
|
69
95
|
markdown: "markdown";
|
|
70
96
|
text: "text";
|
|
97
|
+
lookup: "lookup";
|
|
98
|
+
email: "email";
|
|
71
99
|
badge: "badge";
|
|
72
100
|
datetime: "datetime";
|
|
101
|
+
currency: "currency";
|
|
102
|
+
percent: "percent";
|
|
73
103
|
html: "html";
|
|
74
104
|
image: "image";
|
|
75
105
|
json: "json";
|
|
106
|
+
phone: "phone";
|
|
107
|
+
master_detail: "master_detail";
|
|
76
108
|
}>>;
|
|
77
109
|
format: z.ZodOptional<z.ZodString>;
|
|
78
110
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -80,11 +112,21 @@ export declare const DetailViewSectionSchema: z.ZodObject<{
|
|
|
80
112
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
81
113
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
82
114
|
span: z.ZodOptional<z.ZodNumber>;
|
|
115
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
116
|
+
label: z.ZodString;
|
|
117
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
118
|
+
color: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>>>;
|
|
120
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
121
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
122
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
83
123
|
}, z.core.$strip>>;
|
|
84
124
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
85
125
|
defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
|
|
86
126
|
columns: z.ZodOptional<z.ZodNumber>;
|
|
87
127
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
128
|
+
showBorder: z.ZodOptional<z.ZodBoolean>;
|
|
129
|
+
headerColor: z.ZodOptional<z.ZodString>;
|
|
88
130
|
}, z.core.$strip>;
|
|
89
131
|
/**
|
|
90
132
|
* Detail View Tab Schema
|
|
@@ -138,16 +180,27 @@ export declare const DetailViewSchema: z.ZodObject<{
|
|
|
138
180
|
name: z.ZodString;
|
|
139
181
|
label: z.ZodOptional<z.ZodString>;
|
|
140
182
|
type: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
number: "number";
|
|
184
|
+
boolean: "boolean";
|
|
141
185
|
date: "date";
|
|
142
186
|
custom: "custom";
|
|
187
|
+
url: "url";
|
|
188
|
+
user: "user";
|
|
143
189
|
link: "link";
|
|
190
|
+
select: "select";
|
|
144
191
|
markdown: "markdown";
|
|
145
192
|
text: "text";
|
|
193
|
+
lookup: "lookup";
|
|
194
|
+
email: "email";
|
|
146
195
|
badge: "badge";
|
|
147
196
|
datetime: "datetime";
|
|
197
|
+
currency: "currency";
|
|
198
|
+
percent: "percent";
|
|
148
199
|
html: "html";
|
|
149
200
|
image: "image";
|
|
150
201
|
json: "json";
|
|
202
|
+
phone: "phone";
|
|
203
|
+
master_detail: "master_detail";
|
|
151
204
|
}>>;
|
|
152
205
|
format: z.ZodOptional<z.ZodString>;
|
|
153
206
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -155,26 +208,47 @@ export declare const DetailViewSchema: z.ZodObject<{
|
|
|
155
208
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
156
209
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
157
210
|
span: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
212
|
+
label: z.ZodString;
|
|
213
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
214
|
+
color: z.ZodOptional<z.ZodString>;
|
|
215
|
+
}, z.core.$strip>>>;
|
|
216
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
217
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
218
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
158
219
|
}, z.core.$strip>>;
|
|
159
220
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
160
221
|
defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
|
|
161
222
|
columns: z.ZodOptional<z.ZodNumber>;
|
|
162
223
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
224
|
+
showBorder: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
headerColor: z.ZodOptional<z.ZodString>;
|
|
163
226
|
}, z.core.$strip>>>;
|
|
164
227
|
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
165
228
|
name: z.ZodString;
|
|
166
229
|
label: z.ZodOptional<z.ZodString>;
|
|
167
230
|
type: z.ZodOptional<z.ZodEnum<{
|
|
231
|
+
number: "number";
|
|
232
|
+
boolean: "boolean";
|
|
168
233
|
date: "date";
|
|
169
234
|
custom: "custom";
|
|
235
|
+
url: "url";
|
|
236
|
+
user: "user";
|
|
170
237
|
link: "link";
|
|
238
|
+
select: "select";
|
|
171
239
|
markdown: "markdown";
|
|
172
240
|
text: "text";
|
|
241
|
+
lookup: "lookup";
|
|
242
|
+
email: "email";
|
|
173
243
|
badge: "badge";
|
|
174
244
|
datetime: "datetime";
|
|
245
|
+
currency: "currency";
|
|
246
|
+
percent: "percent";
|
|
175
247
|
html: "html";
|
|
176
248
|
image: "image";
|
|
177
249
|
json: "json";
|
|
250
|
+
phone: "phone";
|
|
251
|
+
master_detail: "master_detail";
|
|
178
252
|
}>>;
|
|
179
253
|
format: z.ZodOptional<z.ZodString>;
|
|
180
254
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -182,6 +256,14 @@ export declare const DetailViewSchema: z.ZodObject<{
|
|
|
182
256
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
183
257
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
184
258
|
span: z.ZodOptional<z.ZodNumber>;
|
|
259
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
+
label: z.ZodString;
|
|
261
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
262
|
+
color: z.ZodOptional<z.ZodString>;
|
|
263
|
+
}, z.core.$strip>>>;
|
|
264
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
265
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
266
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
185
267
|
}, z.core.$strip>>>;
|
|
186
268
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
187
269
|
tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -242,11 +324,13 @@ export declare const ViewSwitcherSchema: z.ZodObject<{
|
|
|
242
324
|
type: z.ZodEnum<{
|
|
243
325
|
list: "list";
|
|
244
326
|
grid: "grid";
|
|
327
|
+
map: "map";
|
|
245
328
|
kanban: "kanban";
|
|
246
329
|
calendar: "calendar";
|
|
247
330
|
timeline: "timeline";
|
|
248
331
|
detail: "detail";
|
|
249
|
-
|
|
332
|
+
gallery: "gallery";
|
|
333
|
+
gantt: "gantt";
|
|
250
334
|
}>;
|
|
251
335
|
label: z.ZodOptional<z.ZodString>;
|
|
252
336
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -255,20 +339,24 @@ export declare const ViewSwitcherSchema: z.ZodObject<{
|
|
|
255
339
|
defaultView: z.ZodOptional<z.ZodEnum<{
|
|
256
340
|
list: "list";
|
|
257
341
|
grid: "grid";
|
|
342
|
+
map: "map";
|
|
258
343
|
kanban: "kanban";
|
|
259
344
|
calendar: "calendar";
|
|
260
345
|
timeline: "timeline";
|
|
261
346
|
detail: "detail";
|
|
262
|
-
|
|
347
|
+
gallery: "gallery";
|
|
348
|
+
gantt: "gantt";
|
|
263
349
|
}>>;
|
|
264
350
|
activeView: z.ZodOptional<z.ZodEnum<{
|
|
265
351
|
list: "list";
|
|
266
352
|
grid: "grid";
|
|
353
|
+
map: "map";
|
|
267
354
|
kanban: "kanban";
|
|
268
355
|
calendar: "calendar";
|
|
269
356
|
timeline: "timeline";
|
|
270
357
|
detail: "detail";
|
|
271
|
-
|
|
358
|
+
gallery: "gallery";
|
|
359
|
+
gantt: "gantt";
|
|
272
360
|
}>>;
|
|
273
361
|
variant: z.ZodOptional<z.ZodEnum<{
|
|
274
362
|
dropdown: "dropdown";
|
|
@@ -284,6 +372,16 @@ export declare const ViewSwitcherSchema: z.ZodObject<{
|
|
|
284
372
|
onViewChange: z.ZodOptional<z.ZodString>;
|
|
285
373
|
persistPreference: z.ZodOptional<z.ZodBoolean>;
|
|
286
374
|
storageKey: z.ZodOptional<z.ZodString>;
|
|
375
|
+
allowCreateView: z.ZodOptional<z.ZodBoolean>;
|
|
376
|
+
viewActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
377
|
+
type: z.ZodEnum<{
|
|
378
|
+
delete: "delete";
|
|
379
|
+
share: "share";
|
|
380
|
+
settings: "settings";
|
|
381
|
+
duplicate: "duplicate";
|
|
382
|
+
}>;
|
|
383
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
384
|
+
}, z.core.$strip>>>;
|
|
287
385
|
}, z.core.$loose>;
|
|
288
386
|
/**
|
|
289
387
|
* Filter UI Schema
|
|
@@ -318,6 +416,7 @@ export declare const FilterUISchema: z.ZodObject<{
|
|
|
318
416
|
select: "select";
|
|
319
417
|
text: "text";
|
|
320
418
|
"date-range": "date-range";
|
|
419
|
+
"multi-select": "multi-select";
|
|
321
420
|
}>;
|
|
322
421
|
operator: z.ZodOptional<z.ZodEnum<{
|
|
323
422
|
equals: "equals";
|
|
@@ -426,16 +525,27 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
426
525
|
name: z.ZodString;
|
|
427
526
|
label: z.ZodOptional<z.ZodString>;
|
|
428
527
|
type: z.ZodOptional<z.ZodEnum<{
|
|
528
|
+
number: "number";
|
|
529
|
+
boolean: "boolean";
|
|
429
530
|
date: "date";
|
|
430
531
|
custom: "custom";
|
|
532
|
+
url: "url";
|
|
533
|
+
user: "user";
|
|
431
534
|
link: "link";
|
|
535
|
+
select: "select";
|
|
432
536
|
markdown: "markdown";
|
|
433
537
|
text: "text";
|
|
538
|
+
lookup: "lookup";
|
|
539
|
+
email: "email";
|
|
434
540
|
badge: "badge";
|
|
435
541
|
datetime: "datetime";
|
|
542
|
+
currency: "currency";
|
|
543
|
+
percent: "percent";
|
|
436
544
|
html: "html";
|
|
437
545
|
image: "image";
|
|
438
546
|
json: "json";
|
|
547
|
+
phone: "phone";
|
|
548
|
+
master_detail: "master_detail";
|
|
439
549
|
}>>;
|
|
440
550
|
format: z.ZodOptional<z.ZodString>;
|
|
441
551
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -443,26 +553,47 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
443
553
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
444
554
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
445
555
|
span: z.ZodOptional<z.ZodNumber>;
|
|
556
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
557
|
+
label: z.ZodString;
|
|
558
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
559
|
+
color: z.ZodOptional<z.ZodString>;
|
|
560
|
+
}, z.core.$strip>>>;
|
|
561
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
562
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
563
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
446
564
|
}, z.core.$strip>>;
|
|
447
565
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
448
566
|
defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
|
|
449
567
|
columns: z.ZodOptional<z.ZodNumber>;
|
|
450
568
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
569
|
+
showBorder: z.ZodOptional<z.ZodBoolean>;
|
|
570
|
+
headerColor: z.ZodOptional<z.ZodString>;
|
|
451
571
|
}, z.core.$strip>>>;
|
|
452
572
|
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
453
573
|
name: z.ZodString;
|
|
454
574
|
label: z.ZodOptional<z.ZodString>;
|
|
455
575
|
type: z.ZodOptional<z.ZodEnum<{
|
|
576
|
+
number: "number";
|
|
577
|
+
boolean: "boolean";
|
|
456
578
|
date: "date";
|
|
457
579
|
custom: "custom";
|
|
580
|
+
url: "url";
|
|
581
|
+
user: "user";
|
|
458
582
|
link: "link";
|
|
583
|
+
select: "select";
|
|
459
584
|
markdown: "markdown";
|
|
460
585
|
text: "text";
|
|
586
|
+
lookup: "lookup";
|
|
587
|
+
email: "email";
|
|
461
588
|
badge: "badge";
|
|
462
589
|
datetime: "datetime";
|
|
590
|
+
currency: "currency";
|
|
591
|
+
percent: "percent";
|
|
463
592
|
html: "html";
|
|
464
593
|
image: "image";
|
|
465
594
|
json: "json";
|
|
595
|
+
phone: "phone";
|
|
596
|
+
master_detail: "master_detail";
|
|
466
597
|
}>>;
|
|
467
598
|
format: z.ZodOptional<z.ZodString>;
|
|
468
599
|
render: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
|
|
@@ -470,6 +601,14 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
470
601
|
readonly: z.ZodOptional<z.ZodBoolean>;
|
|
471
602
|
visible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
472
603
|
span: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
options: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
605
|
+
label: z.ZodString;
|
|
606
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
|
|
607
|
+
color: z.ZodOptional<z.ZodString>;
|
|
608
|
+
}, z.core.$strip>>>;
|
|
609
|
+
reference_to: z.ZodOptional<z.ZodString>;
|
|
610
|
+
reference_field: z.ZodOptional<z.ZodString>;
|
|
611
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
473
612
|
}, z.core.$strip>>>;
|
|
474
613
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
475
614
|
tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -526,11 +665,13 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
526
665
|
type: z.ZodEnum<{
|
|
527
666
|
list: "list";
|
|
528
667
|
grid: "grid";
|
|
668
|
+
map: "map";
|
|
529
669
|
kanban: "kanban";
|
|
530
670
|
calendar: "calendar";
|
|
531
671
|
timeline: "timeline";
|
|
532
672
|
detail: "detail";
|
|
533
|
-
|
|
673
|
+
gallery: "gallery";
|
|
674
|
+
gantt: "gantt";
|
|
534
675
|
}>;
|
|
535
676
|
label: z.ZodOptional<z.ZodString>;
|
|
536
677
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -539,20 +680,24 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
539
680
|
defaultView: z.ZodOptional<z.ZodEnum<{
|
|
540
681
|
list: "list";
|
|
541
682
|
grid: "grid";
|
|
683
|
+
map: "map";
|
|
542
684
|
kanban: "kanban";
|
|
543
685
|
calendar: "calendar";
|
|
544
686
|
timeline: "timeline";
|
|
545
687
|
detail: "detail";
|
|
546
|
-
|
|
688
|
+
gallery: "gallery";
|
|
689
|
+
gantt: "gantt";
|
|
547
690
|
}>>;
|
|
548
691
|
activeView: z.ZodOptional<z.ZodEnum<{
|
|
549
692
|
list: "list";
|
|
550
693
|
grid: "grid";
|
|
694
|
+
map: "map";
|
|
551
695
|
kanban: "kanban";
|
|
552
696
|
calendar: "calendar";
|
|
553
697
|
timeline: "timeline";
|
|
554
698
|
detail: "detail";
|
|
555
|
-
|
|
699
|
+
gallery: "gallery";
|
|
700
|
+
gantt: "gantt";
|
|
556
701
|
}>>;
|
|
557
702
|
variant: z.ZodOptional<z.ZodEnum<{
|
|
558
703
|
dropdown: "dropdown";
|
|
@@ -568,6 +713,16 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
568
713
|
onViewChange: z.ZodOptional<z.ZodString>;
|
|
569
714
|
persistPreference: z.ZodOptional<z.ZodBoolean>;
|
|
570
715
|
storageKey: z.ZodOptional<z.ZodString>;
|
|
716
|
+
allowCreateView: z.ZodOptional<z.ZodBoolean>;
|
|
717
|
+
viewActions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
718
|
+
type: z.ZodEnum<{
|
|
719
|
+
delete: "delete";
|
|
720
|
+
share: "share";
|
|
721
|
+
settings: "settings";
|
|
722
|
+
duplicate: "duplicate";
|
|
723
|
+
}>;
|
|
724
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
725
|
+
}, z.core.$strip>>>;
|
|
571
726
|
}, z.core.$loose>, z.ZodObject<{
|
|
572
727
|
id: z.ZodOptional<z.ZodString>;
|
|
573
728
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -598,6 +753,7 @@ export declare const ViewComponentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
598
753
|
select: "select";
|
|
599
754
|
text: "text";
|
|
600
755
|
"date-range": "date-range";
|
|
756
|
+
"multi-select": "multi-select";
|
|
601
757
|
}>;
|
|
602
758
|
operator: z.ZodOptional<z.ZodEnum<{
|
|
603
759
|
equals: "equals";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views.zod.d.ts","sourceRoot":"","sources":["../../src/zod/views.zod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"views.zod.d.ts","sourceRoot":"","sources":["../../src/zod/views.zod.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;EAAwH,CAAC;AAEpJ;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsBhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAWlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;iBAO9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA+B3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoB7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAezB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAavB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAK9B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC9E,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAClF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAC1E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/zod/views.zod.js
CHANGED
|
@@ -19,20 +19,32 @@ import { BaseSchema, SchemaNodeSchema } from './base.zod.js';
|
|
|
19
19
|
/**
|
|
20
20
|
* View Type Schema
|
|
21
21
|
*/
|
|
22
|
-
export const ViewTypeSchema = z.enum(['list', 'detail', 'grid', 'kanban', 'calendar', 'timeline', 'map']).describe('View type');
|
|
22
|
+
export const ViewTypeSchema = z.enum(['list', 'detail', 'grid', 'kanban', 'calendar', 'timeline', 'map', 'gallery', 'gantt']).describe('View type');
|
|
23
23
|
/**
|
|
24
24
|
* Detail View Field Schema
|
|
25
25
|
*/
|
|
26
26
|
export const DetailViewFieldSchema = z.object({
|
|
27
27
|
name: z.string().describe('Field name/path'),
|
|
28
28
|
label: z.string().optional().describe('Display label'),
|
|
29
|
-
type: z.enum([
|
|
29
|
+
type: z.enum([
|
|
30
|
+
'text', 'number', 'currency', 'percent', 'boolean', 'select', 'lookup', 'master_detail',
|
|
31
|
+
'email', 'url', 'phone', 'user',
|
|
32
|
+
'image', 'link', 'badge', 'date', 'datetime', 'json', 'html', 'markdown', 'custom',
|
|
33
|
+
]).optional().describe('Field type for rendering'),
|
|
30
34
|
format: z.string().optional().describe('Format string (e.g., date format)'),
|
|
31
35
|
render: SchemaNodeSchema.optional().describe('Custom renderer'),
|
|
32
36
|
value: z.any().optional().describe('Field value'),
|
|
33
37
|
readonly: z.boolean().optional().describe('Whether field is read-only'),
|
|
34
38
|
visible: z.union([z.boolean(), z.string()]).optional().describe('Field visibility condition'),
|
|
35
39
|
span: z.number().optional().describe('Span across columns (for grid layout)'),
|
|
40
|
+
options: z.array(z.object({
|
|
41
|
+
label: z.string(),
|
|
42
|
+
value: z.union([z.string(), z.number(), z.boolean()]),
|
|
43
|
+
color: z.string().optional(),
|
|
44
|
+
})).optional().describe('Options for select/lookup fields'),
|
|
45
|
+
reference_to: z.string().optional().describe('Referenced object name for lookup/master_detail fields'),
|
|
46
|
+
reference_field: z.string().optional().describe('Display field on the referenced object'),
|
|
47
|
+
currency: z.string().optional().describe('Currency code for currency fields (e.g. USD, EUR)'),
|
|
36
48
|
});
|
|
37
49
|
/**
|
|
38
50
|
* Detail View Section Schema
|
|
@@ -46,6 +58,8 @@ export const DetailViewSectionSchema = z.object({
|
|
|
46
58
|
defaultCollapsed: z.boolean().optional().describe('Default collapsed state'),
|
|
47
59
|
columns: z.number().optional().describe('Grid columns for field layout'),
|
|
48
60
|
visible: z.union([z.boolean(), z.string()]).optional().describe('Section visibility condition'),
|
|
61
|
+
showBorder: z.boolean().optional().describe('Show border around section'),
|
|
62
|
+
headerColor: z.string().optional().describe('Header background color (Tailwind class)'),
|
|
49
63
|
});
|
|
50
64
|
/**
|
|
51
65
|
* Detail View Tab Schema
|
|
@@ -111,6 +125,11 @@ export const ViewSwitcherSchema = BaseSchema.extend({
|
|
|
111
125
|
onViewChange: z.string().optional().describe('View change callback'),
|
|
112
126
|
persistPreference: z.boolean().optional().describe('Persist view preference'),
|
|
113
127
|
storageKey: z.string().optional().describe('Storage key for persisting view'),
|
|
128
|
+
allowCreateView: z.boolean().optional().describe('Show "+" button to add/create a new view'),
|
|
129
|
+
viewActions: z.array(z.object({
|
|
130
|
+
type: z.enum(['share', 'settings', 'duplicate', 'delete']).describe('Action type'),
|
|
131
|
+
icon: z.string().optional().describe('Action icon'),
|
|
132
|
+
})).optional().describe('Per-view action icons'),
|
|
114
133
|
});
|
|
115
134
|
/**
|
|
116
135
|
* Filter UI Schema
|
|
@@ -120,7 +139,7 @@ export const FilterUISchema = BaseSchema.extend({
|
|
|
120
139
|
filters: z.array(z.object({
|
|
121
140
|
field: z.string().describe('Filter field'),
|
|
122
141
|
label: z.string().optional().describe('Filter label'),
|
|
123
|
-
type: z.enum(['text', 'number', 'select', 'date', 'date-range', 'boolean']).describe('Filter type'),
|
|
142
|
+
type: z.enum(['text', 'number', 'select', 'multi-select', 'date', 'date-range', 'boolean']).describe('Filter type'),
|
|
124
143
|
operator: z.enum(['equals', 'contains', 'startsWith', 'gt', 'lt', 'between', 'in']).optional().describe('Filter operator'),
|
|
125
144
|
options: z.array(z.object({ label: z.string(), value: z.any() })).optional().describe('Options for select filter'),
|
|
126
145
|
placeholder: z.string().optional().describe('Placeholder'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Pure TypeScript type definitions for Object UI - The Protocol Layer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"directory": "packages/types"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@objectstack/spec": "^3.
|
|
79
|
+
"@objectstack/spec": "^3.2.1",
|
|
80
80
|
"zod": "^4.3.6"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|