@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
|
@@ -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';
|
|
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.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.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.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.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.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.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.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.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.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.z.core.$strict>>>;
|
|
403
526
|
}, z.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.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.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.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.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.z.core.$strict>>>;
|
|
473
662
|
}, z.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.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.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.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.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.z.core.$strict>>;
|
package/src/lib/format/layout.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RootLayoutSchema = exports.SheetNodeSchema = exports.AlertSchema = exports.RibbonSchema = exports.StatButtonSchema = exports.SectionsNodeSchema = exports.WizardNodeSchema = exports.StepNodeSchema = exports.LayoutNodeSchema = exports.TabsNodeSchema = exports.TabNodeSchema = exports.SectionNodeSchema = exports.SlotNodeSchema = exports.TextNodeSchema = exports.ButtonNodeSchema = exports.FieldNodeSchema = exports.ModifierSchema = void 0;
|
|
3
|
+
exports.RootLayoutSchema = exports.SheetNodeSchema = exports.BadgeSchema = exports.AlertSchema = exports.RibbonSchema = exports.StatButtonSchema = exports.SectionsNodeSchema = exports.WizardNodeSchema = exports.StepNodeSchema = exports.LayoutNodeSchema = exports.TabsNodeSchema = exports.TabNodeSchema = exports.SectionNodeSchema = exports.SlotNodeSchema = exports.TextNodeSchema = exports.ButtonNodeSchema = exports.FieldNodeSchema = exports.ModifierSchema = exports.wideColumns = void 0;
|
|
4
4
|
const z = require("zod");
|
|
5
5
|
const field_1 = require("./field");
|
|
6
6
|
const json_1 = require("./json");
|
|
7
|
+
var columns_1 = require("./columns");
|
|
8
|
+
Object.defineProperty(exports, "wideColumns", { enumerable: true, get: function () { return columns_1.wideColumns; } });
|
|
7
9
|
// ---------------------------------------------------------------------------
|
|
8
10
|
// Schemas. Recursion goes through getters on z.strictObject (zod 4's own
|
|
9
11
|
// pattern); `.strict()` would clone the shape and run the getters too early.
|
|
@@ -13,6 +15,7 @@ exports.ModifierSchema = z.union([z.boolean(), z.string().min(1)]).meta({ id: 'M
|
|
|
13
15
|
const id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/);
|
|
14
16
|
const fieldName = z.string().regex(field_1.FIELD_NAME);
|
|
15
17
|
const tone = z.enum(['info', 'success', 'warning', 'danger', 'muted']);
|
|
18
|
+
const columnCount = z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]);
|
|
16
19
|
const invisible = exports.ModifierSchema.optional();
|
|
17
20
|
exports.FieldNodeSchema = z.strictObject({
|
|
18
21
|
type: z.literal('field'),
|
|
@@ -55,11 +58,13 @@ exports.SectionNodeSchema = z.strictObject({
|
|
|
55
58
|
type: z.literal('section'),
|
|
56
59
|
id,
|
|
57
60
|
title: z.string().optional(),
|
|
61
|
+
icon: z.string().min(1).optional(),
|
|
58
62
|
description: z.string().optional(),
|
|
59
|
-
columns: z.union([
|
|
63
|
+
columns: z.union([columnCount, z.strictObject({ wide: columnCount, medium: columnCount.optional(), narrow: columnCount.optional() })]).optional(),
|
|
60
64
|
collapsible: z.boolean().optional(),
|
|
61
65
|
collapsed: z.boolean().optional(),
|
|
62
66
|
invisible,
|
|
67
|
+
readonly: exports.ModifierSchema.optional(),
|
|
63
68
|
get children() {
|
|
64
69
|
return z.array(exports.LayoutNodeSchema);
|
|
65
70
|
},
|
|
@@ -95,6 +100,8 @@ exports.StepNodeSchema = z.strictObject({
|
|
|
95
100
|
id,
|
|
96
101
|
label: z.string(),
|
|
97
102
|
description: z.string().optional(),
|
|
103
|
+
icon: z.string().min(1).optional(),
|
|
104
|
+
optional: z.boolean().optional(),
|
|
98
105
|
invisible,
|
|
99
106
|
get children() {
|
|
100
107
|
return z.array(exports.LayoutNodeSchema);
|
|
@@ -103,6 +110,10 @@ exports.StepNodeSchema = z.strictObject({
|
|
|
103
110
|
exports.WizardNodeSchema = z.strictObject({
|
|
104
111
|
type: z.literal('wizard'),
|
|
105
112
|
id,
|
|
113
|
+
clickable: z.boolean().optional(),
|
|
114
|
+
nextLabel: z.string().min(1).optional(),
|
|
115
|
+
backLabel: z.string().min(1).optional(),
|
|
116
|
+
finishLabel: z.string().min(1).optional(),
|
|
106
117
|
children: z.array(exports.StepNodeSchema).min(1),
|
|
107
118
|
}).meta({ id: 'WizardNode' });
|
|
108
119
|
exports.SectionsNodeSchema = z.strictObject({
|
|
@@ -121,7 +132,8 @@ exports.StatButtonSchema = z.strictObject({
|
|
|
121
132
|
invisible,
|
|
122
133
|
});
|
|
123
134
|
exports.RibbonSchema = z.strictObject({ id, label: z.string(), tone: tone.optional(), invisible });
|
|
124
|
-
exports.AlertSchema = z.strictObject({ id, message: z.string(), tone: tone.optional(), invisible });
|
|
135
|
+
exports.AlertSchema = z.strictObject({ id, message: z.string(), tone: tone.optional(), dismissible: z.boolean().optional(), invisible });
|
|
136
|
+
exports.BadgeSchema = z.strictObject({ id, label: z.string(), tone: tone.optional(), icon: z.string().min(1).optional(), invisible });
|
|
125
137
|
exports.SheetNodeSchema = z.strictObject({
|
|
126
138
|
type: z.literal('sheet'),
|
|
127
139
|
id,
|
|
@@ -131,6 +143,8 @@ exports.SheetNodeSchema = z.strictObject({
|
|
|
131
143
|
subtitleField: fieldName.optional(),
|
|
132
144
|
avatarField: fieldName.optional(),
|
|
133
145
|
placeholder: z.string().optional(),
|
|
146
|
+
above: z.array(exports.FieldNodeSchema).optional(),
|
|
147
|
+
below: z.array(exports.FieldNodeSchema).optional(),
|
|
134
148
|
})
|
|
135
149
|
.optional(),
|
|
136
150
|
statusbar: z
|
|
@@ -138,12 +152,14 @@ exports.SheetNodeSchema = z.strictObject({
|
|
|
138
152
|
field: fieldName,
|
|
139
153
|
visibleStates: z.array(z.union([z.string(), z.number()])).optional(),
|
|
140
154
|
clickable: z.boolean().optional(),
|
|
155
|
+
position: z.enum(['header', 'title']).optional(),
|
|
141
156
|
})
|
|
142
157
|
.optional(),
|
|
143
158
|
buttons: z.array(exports.ButtonNodeSchema).optional(),
|
|
144
159
|
statButtons: z.array(exports.StatButtonSchema).optional(),
|
|
145
160
|
ribbon: exports.RibbonSchema.optional(),
|
|
146
161
|
alerts: z.array(exports.AlertSchema).optional(),
|
|
162
|
+
badges: z.array(exports.BadgeSchema).optional(),
|
|
147
163
|
get children() {
|
|
148
164
|
return z.array(exports.LayoutNodeSchema);
|
|
149
165
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/layout.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAAqC;AACrC,iCAAyD;
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/layout.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,mCAAqC;AACrC,iCAAyD;AAuFzD,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AAgJpB,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,uEAAuE;AACvE,8EAA8E;AAEjE,QAAA,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AAEjG,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC5D,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC,CAAC;AAC/C,MAAM,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AACvE,MAAM,WAA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} from './json.mjs';
|
|
4
|
+
export { wideColumns } from './columns.mjs';
|
|
4
5
|
// ---------------------------------------------------------------------------
|
|
5
6
|
// Schemas. Recursion goes through getters on z.strictObject (zod 4's own
|
|
6
7
|
// pattern); `.strict()` would clone the shape and run the getters too early.
|
|
@@ -10,6 +11,7 @@ export const ModifierSchema = z.union([z.boolean(), z.string().min(1)]).meta({ i
|
|
|
10
11
|
const id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._-]*$/);
|
|
11
12
|
const fieldName = z.string().regex(FIELD_NAME);
|
|
12
13
|
const tone = z.enum(['info', 'success', 'warning', 'danger', 'muted']);
|
|
14
|
+
const columnCount = z.union([z.literal(1), z.literal(2), z.literal(3), z.literal(4)]);
|
|
13
15
|
const invisible = ModifierSchema.optional();
|
|
14
16
|
export const FieldNodeSchema = z.strictObject({
|
|
15
17
|
type: z.literal('field'),
|
|
@@ -52,11 +54,13 @@ export const SectionNodeSchema = z.strictObject({
|
|
|
52
54
|
type: z.literal('section'),
|
|
53
55
|
id,
|
|
54
56
|
title: z.string().optional(),
|
|
57
|
+
icon: z.string().min(1).optional(),
|
|
55
58
|
description: z.string().optional(),
|
|
56
|
-
columns: z.union([
|
|
59
|
+
columns: z.union([columnCount, z.strictObject({ wide: columnCount, medium: columnCount.optional(), narrow: columnCount.optional() })]).optional(),
|
|
57
60
|
collapsible: z.boolean().optional(),
|
|
58
61
|
collapsed: z.boolean().optional(),
|
|
59
62
|
invisible,
|
|
63
|
+
readonly: ModifierSchema.optional(),
|
|
60
64
|
get children() {
|
|
61
65
|
return z.array(LayoutNodeSchema);
|
|
62
66
|
},
|
|
@@ -92,6 +96,8 @@ export const StepNodeSchema = z.strictObject({
|
|
|
92
96
|
id,
|
|
93
97
|
label: z.string(),
|
|
94
98
|
description: z.string().optional(),
|
|
99
|
+
icon: z.string().min(1).optional(),
|
|
100
|
+
optional: z.boolean().optional(),
|
|
95
101
|
invisible,
|
|
96
102
|
get children() {
|
|
97
103
|
return z.array(LayoutNodeSchema);
|
|
@@ -100,6 +106,10 @@ export const StepNodeSchema = z.strictObject({
|
|
|
100
106
|
export const WizardNodeSchema = z.strictObject({
|
|
101
107
|
type: z.literal('wizard'),
|
|
102
108
|
id,
|
|
109
|
+
clickable: z.boolean().optional(),
|
|
110
|
+
nextLabel: z.string().min(1).optional(),
|
|
111
|
+
backLabel: z.string().min(1).optional(),
|
|
112
|
+
finishLabel: z.string().min(1).optional(),
|
|
103
113
|
children: z.array(StepNodeSchema).min(1),
|
|
104
114
|
}).meta({ id: 'WizardNode' });
|
|
105
115
|
export const SectionsNodeSchema = z.strictObject({
|
|
@@ -118,7 +128,8 @@ export const StatButtonSchema = z.strictObject({
|
|
|
118
128
|
invisible,
|
|
119
129
|
});
|
|
120
130
|
export const RibbonSchema = z.strictObject({ id, label: z.string(), tone: tone.optional(), invisible });
|
|
121
|
-
export const AlertSchema = z.strictObject({ id, message: z.string(), tone: tone.optional(), invisible });
|
|
131
|
+
export const AlertSchema = z.strictObject({ id, message: z.string(), tone: tone.optional(), dismissible: z.boolean().optional(), invisible });
|
|
132
|
+
export const BadgeSchema = z.strictObject({ id, label: z.string(), tone: tone.optional(), icon: z.string().min(1).optional(), invisible });
|
|
122
133
|
export const SheetNodeSchema = z.strictObject({
|
|
123
134
|
type: z.literal('sheet'),
|
|
124
135
|
id,
|
|
@@ -128,6 +139,8 @@ export const SheetNodeSchema = z.strictObject({
|
|
|
128
139
|
subtitleField: fieldName.optional(),
|
|
129
140
|
avatarField: fieldName.optional(),
|
|
130
141
|
placeholder: z.string().optional(),
|
|
142
|
+
above: z.array(FieldNodeSchema).optional(),
|
|
143
|
+
below: z.array(FieldNodeSchema).optional(),
|
|
131
144
|
})
|
|
132
145
|
.optional(),
|
|
133
146
|
statusbar: z
|
|
@@ -135,12 +148,14 @@ export const SheetNodeSchema = z.strictObject({
|
|
|
135
148
|
field: fieldName,
|
|
136
149
|
visibleStates: z.array(z.union([z.string(), z.number()])).optional(),
|
|
137
150
|
clickable: z.boolean().optional(),
|
|
151
|
+
position: z.enum(['header', 'title']).optional(),
|
|
138
152
|
})
|
|
139
153
|
.optional(),
|
|
140
154
|
buttons: z.array(ButtonNodeSchema).optional(),
|
|
141
155
|
statButtons: z.array(StatButtonSchema).optional(),
|
|
142
156
|
ribbon: RibbonSchema.optional(),
|
|
143
157
|
alerts: z.array(AlertSchema).optional(),
|
|
158
|
+
badges: z.array(BadgeSchema).optional(),
|
|
144
159
|
get children() {
|
|
145
160
|
return z.array(LayoutNodeSchema);
|
|
146
161
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,eAAe,EAAkB,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"layout.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/layout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,eAAe,EAAkB,MAAM,QAAQ,CAAC;AAuFzD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAgJxC,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,uEAAuE;AACvE,8EAA8E;AAE9E,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;AAEjG,MAAM,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KA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ACnC,CAAC;IACD,SAAS,EAAE,cAAc,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,CAAC;AAE7B,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC;KAC9B,kBAAkB,CAAC,MAAM,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAAC;KACnG,IAAI,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Field names and kinds, apart from the schemas so code that runs a form never carries the validation library. */
|
|
2
|
+
/** A field name: what expressions and layout nodes use to refer to a field. */
|
|
3
|
+
export declare const FIELD_NAME: RegExp;
|
|
4
|
+
export declare const FIELD_TYPES: readonly ["char", "text", "html", "integer", "float", "monetary", "boolean", "date", "datetime", "selection", "binary", "image", "many2one", "many2many", "one2many", "reference", "properties", "json"];
|
|
5
|
+
export type FieldType = (typeof FIELD_TYPES)[number];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Field names and kinds, apart from the schemas so code that runs a form never carries the validation library. */
|
|
2
|
+
/** A field name: what expressions and layout nodes use to refer to a field. */
|
|
3
|
+
export declare const FIELD_NAME: RegExp;
|
|
4
|
+
export declare const FIELD_TYPES: readonly ["char", "text", "html", "integer", "float", "monetary", "boolean", "date", "datetime", "selection", "binary", "image", "many2one", "many2many", "one2many", "reference", "properties", "json"];
|
|
5
|
+
export type FieldType = (typeof FIELD_TYPES)[number];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/** Field names and kinds, apart from the schemas so code that runs a form never carries the validation library. */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.FIELD_TYPES = exports.FIELD_NAME = void 0;
|
|
5
|
+
/** A field name: what expressions and layout nodes use to refer to a field. */
|
|
6
|
+
exports.FIELD_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
7
|
+
exports.FIELD_TYPES = [
|
|
8
|
+
'char',
|
|
9
|
+
'text',
|
|
10
|
+
'html',
|
|
11
|
+
'integer',
|
|
12
|
+
'float',
|
|
13
|
+
'monetary',
|
|
14
|
+
'boolean',
|
|
15
|
+
'date',
|
|
16
|
+
'datetime',
|
|
17
|
+
'selection',
|
|
18
|
+
'binary',
|
|
19
|
+
'image',
|
|
20
|
+
'many2one',
|
|
21
|
+
'many2many',
|
|
22
|
+
'one2many',
|
|
23
|
+
'reference',
|
|
24
|
+
'properties',
|
|
25
|
+
'json',
|
|
26
|
+
];
|
|
27
|
+
//# sourceMappingURL=names.js.map
|