@fieldia/core 0.5.0 → 0.7.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/package.json +1 -1
- package/schema/page.schema.json +430 -17
- package/src/index.d.mts +5 -14
- package/src/index.d.ts +5 -14
- package/src/index.js +4 -28
- package/src/index.js.map +1 -1
- package/src/index.mjs +4 -11
- package/src/index.mjs.map +1 -1
- package/src/lib/format/check-page.d.mts +9 -0
- package/src/lib/format/check-page.d.ts +9 -0
- package/src/lib/format/check-page.js +54 -0
- package/src/lib/format/check-page.js.map +1 -0
- package/src/lib/format/check-page.mjs +51 -0
- package/src/lib/format/check-page.mjs.map +1 -0
- package/src/lib/format/columns.d.mts +3 -0
- package/src/lib/format/columns.d.ts +3 -0
- package/src/lib/format/columns.js +8 -0
- package/src/lib/format/columns.js.map +1 -0
- package/src/lib/format/columns.mjs +5 -0
- package/src/lib/format/columns.mjs.map +1 -0
- package/src/lib/format/field.d.mts +163 -35
- package/src/lib/format/field.d.ts +163 -35
- package/src/lib/format/field.js +36 -38
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +25 -29
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +216 -3
- package/src/lib/format/layout.d.ts +216 -3
- package/src/lib/format/layout.js +19 -3
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +17 -2
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/names.d.mts +5 -0
- package/src/lib/format/names.d.ts +5 -0
- package/src/lib/format/names.js +27 -0
- package/src/lib/format/names.js.map +1 -0
- package/src/lib/format/names.mjs +24 -0
- package/src/lib/format/names.mjs.map +1 -0
- package/src/lib/format/page.d.mts +132 -10
- package/src/lib/format/page.d.ts +132 -10
- package/src/lib/format/page.js +6 -3
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +4 -2
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/references.d.mts +35 -0
- package/src/lib/format/references.d.ts +35 -0
- package/src/lib/format/references.js +278 -0
- package/src/lib/format/references.js.map +1 -0
- package/src/lib/format/references.mjs +274 -0
- package/src/lib/format/references.mjs.map +1 -0
- package/src/lib/format/translate.d.mts +8 -0
- package/src/lib/format/translate.d.ts +8 -0
- package/src/lib/format/translate.js +36 -0
- package/src/lib/format/translate.js.map +1 -0
- package/src/lib/format/translate.mjs +33 -0
- package/src/lib/format/translate.mjs.map +1 -0
- package/src/lib/format/validate.d.mts +2 -13
- package/src/lib/format/validate.d.ts +2 -13
- package/src/lib/format/validate.js +2 -258
- package/src/lib/format/validate.js.map +1 -1
- package/src/lib/format/validate.mjs +1 -257
- package/src/lib/format/validate.mjs.map +1 -1
- package/src/lib/format/version.d.mts +2 -0
- package/src/lib/format/version.d.ts +2 -0
- package/src/lib/format/version.js +6 -0
- package/src/lib/format/version.js.map +1 -0
- package/src/lib/format/version.mjs +3 -0
- package/src/lib/format/version.mjs.map +1 -0
- package/src/lib/record/data-source.d.mts +27 -1
- package/src/lib/record/data-source.d.ts +27 -1
- package/src/lib/record/data-source.js +16 -0
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs +14 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/filter.d.mts +8 -0
- package/src/lib/record/filter.d.ts +8 -0
- package/src/lib/record/filter.js +66 -0
- package/src/lib/record/filter.js.map +1 -0
- package/src/lib/record/filter.mjs +63 -0
- package/src/lib/record/filter.mjs.map +1 -0
- package/src/lib/record/form.d.mts +15 -1
- package/src/lib/record/form.d.ts +15 -1
- package/src/lib/record/form.js +103 -14
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +103 -14
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/memory-data-source.js +2 -28
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +2 -28
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/runtime.d.mts +26 -0
- package/src/runtime.d.ts +26 -0
- package/src/runtime.js +44 -0
- package/src/runtime.js.map +1 -0
- package/src/runtime.mjs +16 -0
- package/src/runtime.mjs.map +1 -0
package/src/lib/format/field.mjs
CHANGED
|
@@ -8,28 +8,8 @@ import { JsonValueSchema } from './json.mjs';
|
|
|
8
8
|
* these definitions from it. Names follow Fieldia's naming rule: a backend's
|
|
9
9
|
* vocabulary stays unless it is a product name, jargon, or a clash.
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
export const FIELD_TYPES = [
|
|
14
|
-
'char',
|
|
15
|
-
'text',
|
|
16
|
-
'html',
|
|
17
|
-
'integer',
|
|
18
|
-
'float',
|
|
19
|
-
'monetary',
|
|
20
|
-
'boolean',
|
|
21
|
-
'date',
|
|
22
|
-
'datetime',
|
|
23
|
-
'selection',
|
|
24
|
-
'binary',
|
|
25
|
-
'image',
|
|
26
|
-
'many2one',
|
|
27
|
-
'many2many',
|
|
28
|
-
'one2many',
|
|
29
|
-
'reference',
|
|
30
|
-
'properties',
|
|
31
|
-
'json',
|
|
32
|
-
];
|
|
11
|
+
import { FIELD_NAME } from './names.mjs';
|
|
12
|
+
export { FIELD_NAME, FIELD_TYPES } from './names.mjs';
|
|
33
13
|
/** One choice in a selection or reference. */
|
|
34
14
|
export const OptionSchema = z
|
|
35
15
|
.object({
|
|
@@ -39,22 +19,38 @@ export const OptionSchema = z
|
|
|
39
19
|
.strict()
|
|
40
20
|
.meta({ id: 'Option' });
|
|
41
21
|
/**
|
|
42
|
-
* One condition limiting which records a relation may point to.
|
|
43
|
-
*
|
|
44
|
-
*
|
|
22
|
+
* One condition limiting which records a relation may point to. `valueFrom`
|
|
23
|
+
* compares against another field of the record being edited, so a region list
|
|
24
|
+
* can follow the chosen country. `like` finds text inside; `ilike`,
|
|
25
|
+
* `startswith` and `endswith` whatever the case; `set` and `notset` take no
|
|
26
|
+
* value; `between` takes `[low, high]`, both ends included.
|
|
45
27
|
*/
|
|
46
28
|
export const FilterConditionSchema = z
|
|
47
29
|
.object({
|
|
48
30
|
field: z.string().min(1),
|
|
49
|
-
op: z.enum(['=', '!=', '<', '>', '<=', '>=', 'in', 'not in', 'like', 'ilike']),
|
|
31
|
+
op: z.enum(['=', '!=', '<', '>', '<=', '>=', 'in', 'not in', 'like', 'ilike', 'startswith', 'endswith', 'set', 'notset', 'between']),
|
|
50
32
|
value: JsonValueSchema.optional(),
|
|
51
33
|
valueFrom: z.string().regex(FIELD_NAME).optional(),
|
|
52
34
|
})
|
|
53
35
|
.strict()
|
|
54
|
-
.refine((c) => (c.value === undefined) !== (c.valueFrom === undefined), {
|
|
55
|
-
message: 'set exactly one of value or valueFrom',
|
|
36
|
+
.refine((c) => (c.op === 'set' || c.op === 'notset' ? c.value === undefined && c.valueFrom === undefined : (c.value === undefined) !== (c.valueFrom === undefined)), {
|
|
37
|
+
message: 'set exactly one of value or valueFrom; set and notset take neither',
|
|
38
|
+
})
|
|
39
|
+
.refine((c) => c.op !== 'between' || c.valueFrom !== undefined || (Array.isArray(c.value) && c.value.length === 2), {
|
|
40
|
+
message: 'between takes value: [low, high]',
|
|
56
41
|
})
|
|
57
42
|
.meta({ id: 'FilterCondition' });
|
|
43
|
+
export const FilterAnySchema = z.strictObject({
|
|
44
|
+
get any() {
|
|
45
|
+
return z.array(FilterItemSchema).min(1);
|
|
46
|
+
},
|
|
47
|
+
}).meta({ id: 'FilterAny' });
|
|
48
|
+
export const FilterAllSchema = z.strictObject({
|
|
49
|
+
get all() {
|
|
50
|
+
return z.array(FilterItemSchema).min(1);
|
|
51
|
+
},
|
|
52
|
+
}).meta({ id: 'FilterAll' });
|
|
53
|
+
export const FilterItemSchema = z.union([FilterConditionSchema, FilterAnySchema, FilterAllSchema]).meta({ id: 'FilterItem' });
|
|
58
54
|
const common = {
|
|
59
55
|
label: z.string(),
|
|
60
56
|
help: z.string().optional(),
|
|
@@ -65,7 +61,7 @@ const common = {
|
|
|
65
61
|
const size = z.int().positive().optional();
|
|
66
62
|
const digits = z.tuple([z.int().positive(), z.int().nonnegative()]).optional();
|
|
67
63
|
const relation = z.string().min(1);
|
|
68
|
-
const filter = z.array(
|
|
64
|
+
const filter = z.array(FilterItemSchema).optional();
|
|
69
65
|
const Char = z.object({ type: z.literal('char'), ...common, size, pattern: z.string().optional() }).strict();
|
|
70
66
|
const Text = z.object({ type: z.literal('text'), ...common, size }).strict();
|
|
71
67
|
const Html = z.object({ type: z.literal('html'), ...common }).strict();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;GAOG;AAEH
|
|
1
|
+
{"version":3,"file":"field.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/field.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAkB,MAAM,SAAS,CAAC;AAElE,8CAA8C;AAC9C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC;KAC1B,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACD,MAAM,EAAE;KACR,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AAI1B;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACn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;IAC1B,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ;IAC7E,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI;CACrF,CAAC;KACD,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;AAIzB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC"}
|
|
@@ -72,17 +72,32 @@ export interface SlotNode {
|
|
|
72
72
|
name: string;
|
|
73
73
|
invisible?: Modifier;
|
|
74
74
|
}
|
|
75
|
+
export type ColumnCount = 1 | 2 | 3 | 4;
|
|
76
|
+
/**
|
|
77
|
+
* Columns at each width of the form: `wide` above 760px, `medium` up to 760px,
|
|
78
|
+
* `narrow` up to 520px. A width left out stacks the way the skin does by itself.
|
|
79
|
+
*/
|
|
80
|
+
export interface ColumnsByWidth {
|
|
81
|
+
wide: ColumnCount;
|
|
82
|
+
medium?: ColumnCount;
|
|
83
|
+
narrow?: ColumnCount;
|
|
84
|
+
}
|
|
85
|
+
export { wideColumns } from './columns.mjs';
|
|
75
86
|
export interface SectionNode {
|
|
76
87
|
type: 'section';
|
|
77
88
|
id: string;
|
|
78
89
|
title?: string;
|
|
90
|
+
/** An icon before the title, by name: one of Fieldia's own, or one the app adds. */
|
|
91
|
+
icon?: string;
|
|
79
92
|
description?: string;
|
|
80
|
-
columns?:
|
|
93
|
+
columns?: ColumnCount | ColumnsByWidth;
|
|
81
94
|
/** The title folds and unfolds the section. Needs a title. */
|
|
82
95
|
collapsible?: boolean;
|
|
83
96
|
/** A collapsible section that starts folded. */
|
|
84
97
|
collapsed?: boolean;
|
|
85
98
|
invisible?: Modifier;
|
|
99
|
+
/** Every field inside is read-only while this holds. */
|
|
100
|
+
readonly?: Modifier;
|
|
86
101
|
children: LayoutNode[];
|
|
87
102
|
}
|
|
88
103
|
export interface TabNode {
|
|
@@ -105,12 +120,21 @@ export interface StepNode {
|
|
|
105
120
|
id: string;
|
|
106
121
|
label: string;
|
|
107
122
|
description?: string;
|
|
123
|
+
icon?: string;
|
|
124
|
+
/** Can be skipped: its answers are then left out, and its required fields not asked for. */
|
|
125
|
+
optional?: boolean;
|
|
108
126
|
invisible?: Modifier;
|
|
109
127
|
children: LayoutNode[];
|
|
110
128
|
}
|
|
111
129
|
export interface WizardNode {
|
|
112
130
|
type: 'wizard';
|
|
113
131
|
id: string;
|
|
132
|
+
/** The list of steps can be clicked: back to any step, or forward past steps that are complete. */
|
|
133
|
+
clickable?: boolean;
|
|
134
|
+
nextLabel?: string;
|
|
135
|
+
backLabel?: string;
|
|
136
|
+
/** The last step's button. */
|
|
137
|
+
finishLabel?: string;
|
|
114
138
|
children: StepNode[];
|
|
115
139
|
}
|
|
116
140
|
export interface SectionsNode {
|
|
@@ -137,6 +161,16 @@ export interface Alert {
|
|
|
137
161
|
id: string;
|
|
138
162
|
message: string;
|
|
139
163
|
tone?: Tone;
|
|
164
|
+
/** Has a × that hides it until the page opens again. */
|
|
165
|
+
dismissible?: boolean;
|
|
166
|
+
invisible?: Modifier;
|
|
167
|
+
}
|
|
168
|
+
/** A small label by the title, such as "Locked" or "VIP". */
|
|
169
|
+
export interface Badge {
|
|
170
|
+
id: string;
|
|
171
|
+
label: string;
|
|
172
|
+
tone?: Tone;
|
|
173
|
+
icon?: string;
|
|
140
174
|
invisible?: Modifier;
|
|
141
175
|
}
|
|
142
176
|
export interface SheetTitle {
|
|
@@ -144,6 +178,10 @@ export interface SheetTitle {
|
|
|
144
178
|
subtitleField?: string;
|
|
145
179
|
avatarField?: string;
|
|
146
180
|
placeholder?: string;
|
|
181
|
+
/** Fields over the title, such as an Individual/Company choice. */
|
|
182
|
+
above?: FieldNode[];
|
|
183
|
+
/** Fields under the title, such as "Can be sold" and "Can be purchased". */
|
|
184
|
+
below?: FieldNode[];
|
|
147
185
|
}
|
|
148
186
|
export interface Statusbar {
|
|
149
187
|
field: string;
|
|
@@ -151,6 +189,8 @@ export interface Statusbar {
|
|
|
151
189
|
visibleStates?: (string | number)[];
|
|
152
190
|
/** Clicking a state moves the record to it. */
|
|
153
191
|
clickable?: boolean;
|
|
192
|
+
/** In the header bar (the default), or in the sheet under the title. */
|
|
193
|
+
position?: 'header' | 'title';
|
|
154
194
|
}
|
|
155
195
|
/** The record layout: a header with a statusbar and buttons, then the sheet itself. */
|
|
156
196
|
export interface SheetNode {
|
|
@@ -162,6 +202,7 @@ export interface SheetNode {
|
|
|
162
202
|
statButtons?: StatButton[];
|
|
163
203
|
ribbon?: Ribbon;
|
|
164
204
|
alerts?: Alert[];
|
|
205
|
+
badges?: Badge[];
|
|
165
206
|
children: LayoutNode[];
|
|
166
207
|
sidePanel?: SlotNode;
|
|
167
208
|
}
|
|
@@ -231,11 +272,17 @@ export declare const SectionNodeSchema: z.ZodObject<{
|
|
|
231
272
|
type: z.ZodLiteral<"section">;
|
|
232
273
|
id: z.ZodString;
|
|
233
274
|
title: z.ZodOptional<z.ZodString>;
|
|
275
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
234
276
|
description: z.ZodOptional<z.ZodString>;
|
|
235
|
-
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]
|
|
277
|
+
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>, z.ZodObject<{
|
|
278
|
+
wide: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
|
|
279
|
+
medium: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
280
|
+
narrow: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
281
|
+
}, z.core.$strict>]>>;
|
|
236
282
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
237
283
|
collapsed: z.ZodOptional<z.ZodBoolean>;
|
|
238
284
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
285
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
239
286
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
240
287
|
}, z.core.$strict>;
|
|
241
288
|
export declare const TabNodeSchema: z.ZodObject<{
|
|
@@ -316,11 +363,17 @@ export declare const LayoutNodeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
316
363
|
type: z.ZodLiteral<"section">;
|
|
317
364
|
id: z.ZodString;
|
|
318
365
|
title: z.ZodOptional<z.ZodString>;
|
|
366
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
319
367
|
description: z.ZodOptional<z.ZodString>;
|
|
320
|
-
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]
|
|
368
|
+
columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>, z.ZodObject<{
|
|
369
|
+
wide: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>;
|
|
370
|
+
medium: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
371
|
+
narrow: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
|
|
372
|
+
}, z.core.$strict>]>>;
|
|
321
373
|
collapsible: z.ZodOptional<z.ZodBoolean>;
|
|
322
374
|
collapsed: z.ZodOptional<z.ZodBoolean>;
|
|
323
375
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
376
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
324
377
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
325
378
|
}, z.core.$strict>, z.ZodObject<{
|
|
326
379
|
type: z.ZodLiteral<"tabs">;
|
|
@@ -340,17 +393,25 @@ export declare const StepNodeSchema: z.ZodObject<{
|
|
|
340
393
|
id: z.ZodString;
|
|
341
394
|
label: z.ZodString;
|
|
342
395
|
description: z.ZodOptional<z.ZodString>;
|
|
396
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
397
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
343
398
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
344
399
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
345
400
|
}, z.core.$strict>;
|
|
346
401
|
export declare const WizardNodeSchema: z.ZodObject<{
|
|
347
402
|
type: z.ZodLiteral<"wizard">;
|
|
348
403
|
id: z.ZodString;
|
|
404
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
405
|
+
nextLabel: z.ZodOptional<z.ZodString>;
|
|
406
|
+
backLabel: z.ZodOptional<z.ZodString>;
|
|
407
|
+
finishLabel: z.ZodOptional<z.ZodString>;
|
|
349
408
|
children: z.ZodArray<z.ZodObject<{
|
|
350
409
|
type: z.ZodLiteral<"step">;
|
|
351
410
|
id: z.ZodString;
|
|
352
411
|
label: z.ZodString;
|
|
353
412
|
description: z.ZodOptional<z.ZodString>;
|
|
413
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
414
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
354
415
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
355
416
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
356
417
|
}, z.core.$strict>>;
|
|
@@ -390,6 +451,20 @@ export declare const AlertSchema: z.ZodObject<{
|
|
|
390
451
|
danger: "danger";
|
|
391
452
|
muted: "muted";
|
|
392
453
|
}>>;
|
|
454
|
+
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
456
|
+
}, z.core.$strict>;
|
|
457
|
+
export declare const BadgeSchema: z.ZodObject<{
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
label: z.ZodString;
|
|
460
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
461
|
+
success: "success";
|
|
462
|
+
info: "info";
|
|
463
|
+
warning: "warning";
|
|
464
|
+
danger: "danger";
|
|
465
|
+
muted: "muted";
|
|
466
|
+
}>>;
|
|
467
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
393
468
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
394
469
|
}, z.core.$strict>;
|
|
395
470
|
export declare const SheetNodeSchema: z.ZodObject<{
|
|
@@ -400,11 +475,63 @@ export declare const SheetNodeSchema: z.ZodObject<{
|
|
|
400
475
|
subtitleField: z.ZodOptional<z.ZodString>;
|
|
401
476
|
avatarField: z.ZodOptional<z.ZodString>;
|
|
402
477
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
478
|
+
above: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
479
|
+
type: z.ZodLiteral<"field">;
|
|
480
|
+
id: z.ZodString;
|
|
481
|
+
field: z.ZodString;
|
|
482
|
+
label: z.ZodOptional<z.ZodString>;
|
|
483
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
484
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
485
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
486
|
+
help: z.ZodOptional<z.ZodString>;
|
|
487
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
488
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
489
|
+
totals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
490
|
+
optionalColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
491
|
+
show: "show";
|
|
492
|
+
hide: "hide";
|
|
493
|
+
}>>>;
|
|
494
|
+
editMode: z.ZodOptional<z.ZodEnum<{
|
|
495
|
+
cell: "cell";
|
|
496
|
+
row: "row";
|
|
497
|
+
}>>;
|
|
498
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
499
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
500
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
501
|
+
}, z.core.$strict>>>;
|
|
502
|
+
below: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
503
|
+
type: z.ZodLiteral<"field">;
|
|
504
|
+
id: z.ZodString;
|
|
505
|
+
field: z.ZodString;
|
|
506
|
+
label: z.ZodOptional<z.ZodString>;
|
|
507
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
508
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
509
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
510
|
+
help: z.ZodOptional<z.ZodString>;
|
|
511
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
512
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
513
|
+
totals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
514
|
+
optionalColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
515
|
+
show: "show";
|
|
516
|
+
hide: "hide";
|
|
517
|
+
}>>>;
|
|
518
|
+
editMode: z.ZodOptional<z.ZodEnum<{
|
|
519
|
+
cell: "cell";
|
|
520
|
+
row: "row";
|
|
521
|
+
}>>;
|
|
522
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
523
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
524
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
525
|
+
}, z.core.$strict>>>;
|
|
403
526
|
}, z.core.$strict>>;
|
|
404
527
|
statusbar: z.ZodOptional<z.ZodObject<{
|
|
405
528
|
field: z.ZodString;
|
|
406
529
|
visibleStates: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
407
530
|
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
531
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
532
|
+
title: "title";
|
|
533
|
+
header: "header";
|
|
534
|
+
}>>;
|
|
408
535
|
}, z.core.$strict>>;
|
|
409
536
|
buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
410
537
|
type: z.ZodLiteral<"button">;
|
|
@@ -452,6 +579,20 @@ export declare const SheetNodeSchema: z.ZodObject<{
|
|
|
452
579
|
danger: "danger";
|
|
453
580
|
muted: "muted";
|
|
454
581
|
}>>;
|
|
582
|
+
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
583
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
584
|
+
}, z.core.$strict>>>;
|
|
585
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
586
|
+
id: z.ZodString;
|
|
587
|
+
label: z.ZodString;
|
|
588
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
589
|
+
success: "success";
|
|
590
|
+
info: "info";
|
|
591
|
+
warning: "warning";
|
|
592
|
+
danger: "danger";
|
|
593
|
+
muted: "muted";
|
|
594
|
+
}>>;
|
|
595
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
455
596
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
456
597
|
}, z.core.$strict>>>;
|
|
457
598
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
@@ -470,11 +611,63 @@ export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
470
611
|
subtitleField: z.ZodOptional<z.ZodString>;
|
|
471
612
|
avatarField: z.ZodOptional<z.ZodString>;
|
|
472
613
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
614
|
+
above: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
615
|
+
type: z.ZodLiteral<"field">;
|
|
616
|
+
id: z.ZodString;
|
|
617
|
+
field: z.ZodString;
|
|
618
|
+
label: z.ZodOptional<z.ZodString>;
|
|
619
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
620
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
621
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
622
|
+
help: z.ZodOptional<z.ZodString>;
|
|
623
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
624
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
625
|
+
totals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
626
|
+
optionalColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
627
|
+
show: "show";
|
|
628
|
+
hide: "hide";
|
|
629
|
+
}>>>;
|
|
630
|
+
editMode: z.ZodOptional<z.ZodEnum<{
|
|
631
|
+
cell: "cell";
|
|
632
|
+
row: "row";
|
|
633
|
+
}>>;
|
|
634
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
635
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
636
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
637
|
+
}, z.core.$strict>>>;
|
|
638
|
+
below: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
639
|
+
type: z.ZodLiteral<"field">;
|
|
640
|
+
id: z.ZodString;
|
|
641
|
+
field: z.ZodString;
|
|
642
|
+
label: z.ZodOptional<z.ZodString>;
|
|
643
|
+
widget: z.ZodOptional<z.ZodString>;
|
|
644
|
+
options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
|
|
645
|
+
placeholder: z.ZodOptional<z.ZodString>;
|
|
646
|
+
help: z.ZodOptional<z.ZodString>;
|
|
647
|
+
colspan: z.ZodOptional<z.ZodInt>;
|
|
648
|
+
columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
649
|
+
totals: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
650
|
+
optionalColumns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
651
|
+
show: "show";
|
|
652
|
+
hide: "hide";
|
|
653
|
+
}>>>;
|
|
654
|
+
editMode: z.ZodOptional<z.ZodEnum<{
|
|
655
|
+
cell: "cell";
|
|
656
|
+
row: "row";
|
|
657
|
+
}>>;
|
|
658
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
659
|
+
readonly: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
660
|
+
required: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
661
|
+
}, z.core.$strict>>>;
|
|
473
662
|
}, z.core.$strict>>;
|
|
474
663
|
statusbar: z.ZodOptional<z.ZodObject<{
|
|
475
664
|
field: z.ZodString;
|
|
476
665
|
visibleStates: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
477
666
|
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
667
|
+
position: z.ZodOptional<z.ZodEnum<{
|
|
668
|
+
title: "title";
|
|
669
|
+
header: "header";
|
|
670
|
+
}>>;
|
|
478
671
|
}, z.core.$strict>>;
|
|
479
672
|
buttons: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
480
673
|
type: z.ZodLiteral<"button">;
|
|
@@ -522,6 +715,20 @@ export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
522
715
|
danger: "danger";
|
|
523
716
|
muted: "muted";
|
|
524
717
|
}>>;
|
|
718
|
+
dismissible: z.ZodOptional<z.ZodBoolean>;
|
|
719
|
+
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
720
|
+
}, z.core.$strict>>>;
|
|
721
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
722
|
+
id: z.ZodString;
|
|
723
|
+
label: z.ZodString;
|
|
724
|
+
tone: z.ZodOptional<z.ZodEnum<{
|
|
725
|
+
success: "success";
|
|
726
|
+
info: "info";
|
|
727
|
+
warning: "warning";
|
|
728
|
+
danger: "danger";
|
|
729
|
+
muted: "muted";
|
|
730
|
+
}>>;
|
|
731
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
525
732
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
526
733
|
}, z.core.$strict>>>;
|
|
527
734
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
@@ -550,11 +757,17 @@ export declare const RootLayoutSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
550
757
|
}, z.core.$strict>, z.ZodObject<{
|
|
551
758
|
type: z.ZodLiteral<"wizard">;
|
|
552
759
|
id: z.ZodString;
|
|
760
|
+
clickable: z.ZodOptional<z.ZodBoolean>;
|
|
761
|
+
nextLabel: z.ZodOptional<z.ZodString>;
|
|
762
|
+
backLabel: z.ZodOptional<z.ZodString>;
|
|
763
|
+
finishLabel: z.ZodOptional<z.ZodString>;
|
|
553
764
|
children: z.ZodArray<z.ZodObject<{
|
|
554
765
|
type: z.ZodLiteral<"step">;
|
|
555
766
|
id: z.ZodString;
|
|
556
767
|
label: z.ZodString;
|
|
557
768
|
description: z.ZodOptional<z.ZodString>;
|
|
769
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
770
|
+
optional: z.ZodOptional<z.ZodBoolean>;
|
|
558
771
|
invisible: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodString]>>;
|
|
559
772
|
children: z.ZodArray<typeof LayoutNodeSchema>;
|
|
560
773
|
}, z.core.$strict>>;
|