domma-js 1.1.0 → 1.2.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/README.md +6 -0
- package/assets/types/catalogue.json +29 -29
- package/assets/types/generated/public/assets/icons/code.d.ts +236 -1
- package/assets/types/generated/src/auth.d.ts +38 -38
- package/assets/types/generated/src/avatar.d.ts +31 -31
- package/assets/types/generated/src/binding-source.d.ts +3 -3
- package/assets/types/generated/src/component-factory.d.ts +15 -15
- package/assets/types/generated/src/component.d.ts +4 -4
- package/assets/types/generated/src/components/back-to-top.d.ts +18 -18
- package/assets/types/generated/src/components/badge.d.ts +26 -26
- package/assets/types/generated/src/components/card.d.ts +30 -30
- package/assets/types/generated/src/components/command-palette.d.ts +69 -69
- package/assets/types/generated/src/components/dropzone.d.ts +54 -54
- package/assets/types/generated/src/components/focus-trap.d.ts +22 -22
- package/assets/types/generated/src/components/loader.d.ts +15 -15
- package/assets/types/generated/src/components/modal.d.ts +59 -59
- package/assets/types/generated/src/components/range-slider.d.ts +54 -54
- package/assets/types/generated/src/components/shared.d.ts +1 -1
- package/assets/types/generated/src/components/split-pane.d.ts +45 -45
- package/assets/types/generated/src/components/toast.d.ts +38 -38
- package/assets/types/generated/src/components/tooltip.d.ts +24 -24
- package/assets/types/generated/src/components/virtual-list.d.ts +61 -61
- package/assets/types/generated/src/config.d.ts +21 -21
- package/assets/types/generated/src/context-cursor.d.ts +6 -6
- package/assets/types/generated/src/context-menu.d.ts +72 -72
- package/assets/types/generated/src/dom.d.ts +12 -12
- package/assets/types/generated/src/effects.d.ts +154 -141
- package/assets/types/generated/src/elements.d.ts +644 -644
- package/assets/types/generated/src/flags.d.ts +38 -38
- package/assets/types/generated/src/forms.d.ts +100 -100
- package/assets/types/generated/src/globals.d.ts +6 -6
- package/assets/types/generated/src/http.d.ts +12 -12
- package/assets/types/generated/src/i18n.d.ts +8 -8
- package/assets/types/generated/src/icons.d.ts +13 -13
- package/assets/types/generated/src/index.d.ts +10 -10
- package/assets/types/generated/src/input-group.d.ts +21 -21
- package/assets/types/generated/src/models.d.ts +21 -21
- package/assets/types/generated/src/popover.d.ts +45 -45
- package/assets/types/generated/src/router.d.ts +30 -30
- package/assets/types/generated/src/sanitize.d.ts +13 -5
- package/assets/types/generated/src/schema-builder.d.ts +34 -34
- package/assets/types/generated/src/skeleton.d.ts +11 -11
- package/assets/types/generated/src/sortable.d.ts +46 -46
- package/assets/types/generated/src/tables.d.ts +75 -75
- package/assets/types/generated/src/theme.d.ts +8 -8
- package/assets/types/generated/src/treeview.d.ts +48 -48
- package/assets/types/generated/src/utils.d.ts +13 -13
- package/assets/types/generated/vendor/domma-reactive.d.ts +2 -2
- package/package.json +22 -16
- package/public/dist/bundles/domma-complete.css +53 -14
- package/public/dist/bundles/domma-data-focused.css +53 -14
- package/public/dist/bundles/domma-essentials.css +53 -14
- package/public/dist/bundles/domma-full.css +53 -14
- package/public/dist/bundles/domma-minimal.css +47 -8
- package/public/dist/domma-flags.esm.js +3 -3
- package/public/dist/domma-flags.min.js +3 -3
- package/public/dist/domma-syntax.min.js +3 -3
- package/public/dist/domma.css +42 -3
- package/public/dist/domma.esm.js +4 -4
- package/public/dist/domma.esm.js.map +1 -1
- package/public/dist/domma.min.js +4 -4
- package/public/dist/domma.min.js.map +1 -1
- package/public/dist/elements.css +3 -3
- package/public/dist/grid.css +3 -3
- package/public/dist/syntax.css +3 -3
- package/public/dist/themes/domma-themes.css +3 -3
|
@@ -103,50 +103,50 @@ export type FlagShape = "rect" | "rounded" | "square" | "circle";
|
|
|
103
103
|
*/
|
|
104
104
|
export type FlagOverlay = {
|
|
105
105
|
type: "rect" | "circle" | "ellipse" | "line" | "path" | "star" | "crescent" | "group";
|
|
106
|
-
fill?: string;
|
|
107
|
-
stroke?: string;
|
|
108
|
-
strokeWidth?: number;
|
|
109
|
-
x?: number;
|
|
110
|
-
y?: number;
|
|
111
|
-
w?: number;
|
|
112
|
-
h?: number;
|
|
113
|
-
rx?: number;
|
|
114
|
-
ry?: number;
|
|
115
|
-
cx?: number;
|
|
116
|
-
cy?: number;
|
|
117
|
-
r?: number;
|
|
118
|
-
x1?: number;
|
|
119
|
-
y1?: number;
|
|
120
|
-
x2?: number;
|
|
121
|
-
y2?: number;
|
|
106
|
+
fill?: string | undefined;
|
|
107
|
+
stroke?: string | undefined;
|
|
108
|
+
strokeWidth?: number | undefined;
|
|
109
|
+
x?: number | undefined;
|
|
110
|
+
y?: number | undefined;
|
|
111
|
+
w?: number | undefined;
|
|
112
|
+
h?: number | undefined;
|
|
113
|
+
rx?: number | undefined;
|
|
114
|
+
ry?: number | undefined;
|
|
115
|
+
cx?: number | undefined;
|
|
116
|
+
cy?: number | undefined;
|
|
117
|
+
r?: number | undefined;
|
|
118
|
+
x1?: number | undefined;
|
|
119
|
+
y1?: number | undefined;
|
|
120
|
+
x2?: number | undefined;
|
|
121
|
+
y2?: number | undefined;
|
|
122
122
|
/**
|
|
123
123
|
* Path data
|
|
124
124
|
*/
|
|
125
|
-
d?: string;
|
|
125
|
+
d?: string | undefined;
|
|
126
126
|
/**
|
|
127
127
|
* Star points (default 5)
|
|
128
128
|
*/
|
|
129
|
-
points?: number;
|
|
129
|
+
points?: number | undefined;
|
|
130
130
|
/**
|
|
131
131
|
* Star inner radius as a fraction of outer (default 0.382)
|
|
132
132
|
*/
|
|
133
|
-
innerRatio?: number;
|
|
133
|
+
innerRatio?: number | undefined;
|
|
134
134
|
/**
|
|
135
135
|
* Star rotation in degrees (default -90, pointing up)
|
|
136
136
|
*/
|
|
137
|
-
rotation?: number;
|
|
137
|
+
rotation?: number | undefined;
|
|
138
138
|
/**
|
|
139
139
|
* Crescent carving-circle offset
|
|
140
140
|
*/
|
|
141
|
-
off?: number;
|
|
141
|
+
off?: number | undefined;
|
|
142
142
|
/**
|
|
143
143
|
* Group transform
|
|
144
144
|
*/
|
|
145
|
-
transform?: string;
|
|
145
|
+
transform?: string | undefined;
|
|
146
146
|
/**
|
|
147
147
|
* Group members
|
|
148
148
|
*/
|
|
149
|
-
children?: FlagOverlay[];
|
|
149
|
+
children?: FlagOverlay[] | undefined;
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
152
152
|
* A flag definition - either raw SVG markup or a compact descriptor.
|
|
@@ -159,15 +159,15 @@ export type FlagDefinition = {
|
|
|
159
159
|
/**
|
|
160
160
|
* Region group (defaults to 'custom' when registered)
|
|
161
161
|
*/
|
|
162
|
-
region?: FlagRegion;
|
|
162
|
+
region?: FlagRegion | undefined;
|
|
163
163
|
/**
|
|
164
164
|
* Raw inner SVG markup (60x40 canvas)
|
|
165
165
|
*/
|
|
166
|
-
svg?: string;
|
|
166
|
+
svg?: string | undefined;
|
|
167
167
|
/**
|
|
168
168
|
* Solid background colour
|
|
169
169
|
*/
|
|
170
|
-
bg?: string;
|
|
170
|
+
bg?: string | undefined;
|
|
171
171
|
/**
|
|
172
172
|
* Stripe descriptor
|
|
173
173
|
*/
|
|
@@ -175,7 +175,7 @@ export type FlagDefinition = {
|
|
|
175
175
|
dir?: "h" | "v";
|
|
176
176
|
colors: string[];
|
|
177
177
|
weights?: number[];
|
|
178
|
-
};
|
|
178
|
+
} | undefined;
|
|
179
179
|
/**
|
|
180
180
|
* Nordic (offset) cross descriptor
|
|
181
181
|
*/
|
|
@@ -184,11 +184,11 @@ export type FlagDefinition = {
|
|
|
184
184
|
colour: string;
|
|
185
185
|
border?: string;
|
|
186
186
|
thickness?: number;
|
|
187
|
-
};
|
|
187
|
+
} | undefined;
|
|
188
188
|
/**
|
|
189
189
|
* Overlay primitives drawn on top
|
|
190
190
|
*/
|
|
191
|
-
overlays?: FlagOverlay[];
|
|
191
|
+
overlays?: FlagOverlay[] | undefined;
|
|
192
192
|
};
|
|
193
193
|
/**
|
|
194
194
|
* Options for rendering a flag.
|
|
@@ -197,35 +197,35 @@ export type FlagRenderOptions = {
|
|
|
197
197
|
/**
|
|
198
198
|
* Height in px (width follows aspect)
|
|
199
199
|
*/
|
|
200
|
-
size?: number;
|
|
200
|
+
size?: number | undefined;
|
|
201
201
|
/**
|
|
202
202
|
* Explicit width override
|
|
203
203
|
*/
|
|
204
|
-
width?: number;
|
|
204
|
+
width?: number | undefined;
|
|
205
205
|
/**
|
|
206
206
|
* Explicit height override
|
|
207
207
|
*/
|
|
208
|
-
height?: number;
|
|
208
|
+
height?: number | undefined;
|
|
209
209
|
/**
|
|
210
210
|
* Output shape
|
|
211
211
|
*/
|
|
212
|
-
shape?: FlagShape;
|
|
212
|
+
shape?: FlagShape | undefined;
|
|
213
213
|
/**
|
|
214
214
|
* Add a hairline border (or colour)
|
|
215
215
|
*/
|
|
216
|
-
border?: boolean |
|
|
216
|
+
border?: string | boolean | undefined;
|
|
217
217
|
/**
|
|
218
218
|
* Extra CSS classes
|
|
219
219
|
*/
|
|
220
|
-
class?: string;
|
|
220
|
+
class?: string | undefined;
|
|
221
221
|
/**
|
|
222
222
|
* Accessible title (defaults to country name)
|
|
223
223
|
*/
|
|
224
|
-
title?: string | null;
|
|
224
|
+
title?: string | null | undefined;
|
|
225
225
|
/**
|
|
226
226
|
* Additional attributes
|
|
227
227
|
*/
|
|
228
|
-
attrs?: Record<string, string
|
|
228
|
+
attrs?: Record<string, string> | undefined;
|
|
229
229
|
};
|
|
230
230
|
/**
|
|
231
231
|
* Options for `inject()`.
|
|
@@ -235,7 +235,7 @@ export type FlagInjectOptions = FlagRenderOptions & {
|
|
|
235
235
|
};
|
|
236
236
|
export type FlagRegionMeta = {
|
|
237
237
|
name: string;
|
|
238
|
-
description?: string;
|
|
238
|
+
description?: string | undefined;
|
|
239
239
|
codes: string[];
|
|
240
240
|
};
|
|
241
241
|
/**
|
|
@@ -298,7 +298,7 @@ export class Forma {
|
|
|
298
298
|
*/
|
|
299
299
|
renderTo(selector: string | HTMLElement): HTMLElement;
|
|
300
300
|
/** @type {HTMLFormElement|null} The rendered <form> */
|
|
301
|
-
formElement: HTMLFormElement | null;
|
|
301
|
+
formElement: HTMLFormElement | null | undefined;
|
|
302
302
|
/**
|
|
303
303
|
* Build the complete form structure
|
|
304
304
|
* @private
|
|
@@ -452,7 +452,7 @@ export class Forma {
|
|
|
452
452
|
private _initInputExtras;
|
|
453
453
|
/** @private */
|
|
454
454
|
private _destroyInputExtras;
|
|
455
|
-
_inputGroups: {};
|
|
455
|
+
_inputGroups: {} | undefined;
|
|
456
456
|
/**
|
|
457
457
|
* Put every field back to the value the form started with (its data, else the schema
|
|
458
458
|
* default): the model, the native inputs, and the slider / dropzone / chooser controls.
|
|
@@ -475,7 +475,7 @@ export class Forma {
|
|
|
475
475
|
* @private
|
|
476
476
|
*/
|
|
477
477
|
private _initChooserFields;
|
|
478
|
-
_choosers: {};
|
|
478
|
+
_choosers: {} | undefined;
|
|
479
479
|
/**
|
|
480
480
|
* Initialise any signature fields inside a rendered form.
|
|
481
481
|
* @param {HTMLElement} formElement
|
|
@@ -618,95 +618,95 @@ export type FormAddon = string | {
|
|
|
618
618
|
* accept/multiple/maxFiles/maxSize/minSize/previews/upload/autoUpload/retry/labels/list/className to E.dropzone.
|
|
619
619
|
*/
|
|
620
620
|
export type FormFieldConfig = {
|
|
621
|
-
placeholder?: string;
|
|
621
|
+
placeholder?: string | undefined;
|
|
622
622
|
/**
|
|
623
623
|
* - Small text beside the label; also the message when `pattern` fails
|
|
624
624
|
*/
|
|
625
|
-
hint?: string;
|
|
625
|
+
hint?: string | undefined;
|
|
626
626
|
/**
|
|
627
627
|
* - Text under the control (HTML)
|
|
628
628
|
*/
|
|
629
|
-
helperText?: string;
|
|
629
|
+
helperText?: string | undefined;
|
|
630
630
|
/**
|
|
631
631
|
* - Tooltip on the label (a slider field also passes it to E.rangeSlider)
|
|
632
632
|
*/
|
|
633
|
-
tooltip?: string;
|
|
633
|
+
tooltip?: string | undefined;
|
|
634
634
|
/**
|
|
635
635
|
* - Columns the field spans in a grid layout
|
|
636
636
|
*/
|
|
637
|
-
span?: number;
|
|
638
|
-
disabled?: boolean;
|
|
637
|
+
span?: number | undefined;
|
|
638
|
+
disabled?: boolean | undefined;
|
|
639
639
|
/**
|
|
640
640
|
* - textarea rows (default 3)
|
|
641
641
|
*/
|
|
642
|
-
rows?: number;
|
|
642
|
+
rows?: number | undefined;
|
|
643
643
|
/**
|
|
644
644
|
* - Used when the field definition has no `step`
|
|
645
645
|
*/
|
|
646
|
-
step?: number | "any";
|
|
647
|
-
autocomplete?: string;
|
|
648
|
-
prefix?: FormAddon;
|
|
649
|
-
suffix?: FormAddon;
|
|
646
|
+
step?: number | "any" | undefined;
|
|
647
|
+
autocomplete?: string | undefined;
|
|
648
|
+
prefix?: FormAddon | undefined;
|
|
649
|
+
suffix?: FormAddon | undefined;
|
|
650
650
|
/**
|
|
651
651
|
* - password: show / hide toggle
|
|
652
652
|
*/
|
|
653
|
-
reveal?: boolean;
|
|
653
|
+
reveal?: boolean | undefined;
|
|
654
654
|
/**
|
|
655
655
|
* - text-like inputs and textareas: a clear button
|
|
656
656
|
*/
|
|
657
|
-
clear?: boolean;
|
|
657
|
+
clear?: boolean | undefined;
|
|
658
658
|
/**
|
|
659
659
|
* - number / integer / float: - and + buttons
|
|
660
660
|
*/
|
|
661
|
-
stepper?: boolean;
|
|
661
|
+
stepper?: boolean | undefined;
|
|
662
662
|
/**
|
|
663
663
|
* - text-like inputs and textareas: a character counter; true reads `maxLength`
|
|
664
664
|
*/
|
|
665
|
-
counter?: boolean |
|
|
665
|
+
counter?: number | boolean | undefined;
|
|
666
666
|
/**
|
|
667
667
|
* - Text for the input extras or the dropzone; a slider's value formatter
|
|
668
668
|
*/
|
|
669
|
-
labels?: Record<string, string> | ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string);
|
|
669
|
+
labels?: Record<string, string> | ((value: number, where: "tick" | "mark" | "tooltip" | "aria") => string) | undefined;
|
|
670
670
|
/**
|
|
671
671
|
* - file / dropzone
|
|
672
672
|
*/
|
|
673
|
-
accept?: string | string[];
|
|
673
|
+
accept?: string | string[] | undefined;
|
|
674
674
|
/**
|
|
675
675
|
* - file / dropzone (a dropzone allows several unless false)
|
|
676
676
|
*/
|
|
677
|
-
multiple?: boolean;
|
|
677
|
+
multiple?: boolean | undefined;
|
|
678
678
|
/**
|
|
679
679
|
* - Render a `range` field as E.rangeSlider
|
|
680
680
|
*/
|
|
681
|
-
slider?: boolean;
|
|
681
|
+
slider?: boolean | undefined;
|
|
682
682
|
/**
|
|
683
683
|
* - slider: two thumbs, value [low, high]
|
|
684
684
|
*/
|
|
685
|
-
range?: boolean;
|
|
685
|
+
range?: boolean | undefined;
|
|
686
686
|
ticks?: import("./components/range-slider.js").RangeSliderOptions["ticks"];
|
|
687
|
-
tickLabels?: boolean;
|
|
687
|
+
tickLabels?: boolean | undefined;
|
|
688
688
|
format?: import("./components/range-slider.js").RangeSliderOptions["format"];
|
|
689
689
|
marks?: import("./components/range-slider.js").RangeSliderOptions["marks"];
|
|
690
|
-
minDistance?: number;
|
|
691
|
-
orientation?: "
|
|
692
|
-
rtl?: boolean | null;
|
|
693
|
-
names?: [string, string] | null;
|
|
694
|
-
ariaLabels?: [string, string] | null;
|
|
695
|
-
className?: string;
|
|
696
|
-
maxFiles?: number | null;
|
|
690
|
+
minDistance?: number | undefined;
|
|
691
|
+
orientation?: "vertical" | "horizontal" | undefined;
|
|
692
|
+
rtl?: boolean | null | undefined;
|
|
693
|
+
names?: [string, string] | null | undefined;
|
|
694
|
+
ariaLabels?: [string, string] | null | undefined;
|
|
695
|
+
className?: string | undefined;
|
|
696
|
+
maxFiles?: number | null | undefined;
|
|
697
697
|
/**
|
|
698
698
|
* - Bytes
|
|
699
699
|
*/
|
|
700
|
-
maxSize?: number | null;
|
|
700
|
+
maxSize?: number | null | undefined;
|
|
701
701
|
/**
|
|
702
702
|
* - Bytes
|
|
703
703
|
*/
|
|
704
|
-
minSize?: number | null;
|
|
705
|
-
previews?: boolean;
|
|
704
|
+
minSize?: number | null | undefined;
|
|
705
|
+
previews?: boolean | undefined;
|
|
706
706
|
upload?: import("./components/dropzone.js").DropzoneOptions["upload"];
|
|
707
|
-
autoUpload?: boolean;
|
|
708
|
-
retry?: number;
|
|
709
|
-
list?: boolean |
|
|
707
|
+
autoUpload?: boolean | undefined;
|
|
708
|
+
retry?: number | undefined;
|
|
709
|
+
list?: string | boolean | HTMLElement | undefined;
|
|
710
710
|
};
|
|
711
711
|
/**
|
|
712
712
|
* One field of a form blueprint. The same object also feeds `M.create` (the form builds its model from the
|
|
@@ -716,76 +716,76 @@ export type FormFieldDefinition = {
|
|
|
716
716
|
/**
|
|
717
717
|
* - default 'string'
|
|
718
718
|
*/
|
|
719
|
-
type?: FormFieldType;
|
|
719
|
+
type?: FormFieldType | undefined;
|
|
720
720
|
/**
|
|
721
721
|
* - default: the capitalised field name
|
|
722
722
|
*/
|
|
723
|
-
label?: string;
|
|
723
|
+
label?: string | undefined;
|
|
724
724
|
default?: any;
|
|
725
|
-
required?: boolean;
|
|
725
|
+
required?: boolean | undefined;
|
|
726
726
|
/**
|
|
727
727
|
* - Renders the control disabled
|
|
728
728
|
*/
|
|
729
|
-
readonly?: boolean;
|
|
730
|
-
min?: number;
|
|
731
|
-
max?: number;
|
|
732
|
-
step?: number | "any";
|
|
733
|
-
minLength?: number;
|
|
734
|
-
maxLength?: number;
|
|
735
|
-
pattern?: RegExp;
|
|
729
|
+
readonly?: boolean | undefined;
|
|
730
|
+
min?: number | undefined;
|
|
731
|
+
max?: number | undefined;
|
|
732
|
+
step?: number | "any" | undefined;
|
|
733
|
+
minLength?: number | undefined;
|
|
734
|
+
maxLength?: number | undefined;
|
|
735
|
+
pattern?: RegExp | undefined;
|
|
736
736
|
/**
|
|
737
737
|
* - true passes; a string (or anything else) fails with that message
|
|
738
738
|
*/
|
|
739
|
-
validate?: (value: any, data: Record<string, any>) => boolean | string;
|
|
739
|
+
validate?: ((value: any, data: Record<string, any>) => boolean | string) | undefined;
|
|
740
740
|
/**
|
|
741
741
|
* - Choices for select / radio / checkbox-group / multiselect / chooser
|
|
742
742
|
*/
|
|
743
|
-
options?: FormOption[];
|
|
744
|
-
formConfig?: FormFieldConfig;
|
|
743
|
+
options?: FormOption[] | undefined;
|
|
744
|
+
formConfig?: FormFieldConfig | undefined;
|
|
745
745
|
/**
|
|
746
746
|
* - `F.crud` table cell renderer
|
|
747
747
|
*/
|
|
748
|
-
tableRender?: (value: any, row: Record<string, any>, index: number) => string;
|
|
748
|
+
tableRender?: ((value: any, row: Record<string, any>, index: number) => string) | undefined;
|
|
749
749
|
/**
|
|
750
750
|
* - chooser (default 'card')
|
|
751
751
|
*/
|
|
752
|
-
variant?: "card" | "chip";
|
|
752
|
+
variant?: "card" | "chip" | undefined;
|
|
753
753
|
/**
|
|
754
754
|
* - chooser: several choices (value is an array)
|
|
755
755
|
*/
|
|
756
|
-
multiple?: boolean;
|
|
756
|
+
multiple?: boolean | undefined;
|
|
757
757
|
/**
|
|
758
758
|
* - chooser
|
|
759
759
|
*/
|
|
760
|
-
density?: "comfortable" | "compact";
|
|
760
|
+
density?: "comfortable" | "compact" | undefined;
|
|
761
761
|
/**
|
|
762
762
|
* - chooser (default 3)
|
|
763
763
|
*/
|
|
764
|
-
columns?: number;
|
|
764
|
+
columns?: number | undefined;
|
|
765
765
|
/**
|
|
766
766
|
* - chooser: semantic name or CSS colour (default 'primary')
|
|
767
767
|
*/
|
|
768
|
-
accent?: string;
|
|
768
|
+
accent?: string | undefined;
|
|
769
769
|
/**
|
|
770
770
|
* - chooser
|
|
771
771
|
*/
|
|
772
|
-
accentStyle?: "border" | "solid" | "glow" | "overlay" | "underline";
|
|
772
|
+
accentStyle?: "border" | "solid" | "glow" | "overlay" | "underline" | undefined;
|
|
773
773
|
/**
|
|
774
774
|
* - chooser
|
|
775
775
|
*/
|
|
776
|
-
glow?: boolean;
|
|
776
|
+
glow?: boolean | undefined;
|
|
777
777
|
/**
|
|
778
778
|
* - chooser
|
|
779
779
|
*/
|
|
780
|
-
glowColour?: string | null;
|
|
780
|
+
glowColour?: string | null | undefined;
|
|
781
781
|
/**
|
|
782
782
|
* - chooser (default 'none')
|
|
783
783
|
*/
|
|
784
|
-
shadow?: string;
|
|
784
|
+
shadow?: string | undefined;
|
|
785
785
|
/**
|
|
786
786
|
* - chooser
|
|
787
787
|
*/
|
|
788
|
-
shadowColour?: string | null;
|
|
788
|
+
shadowColour?: string | null | undefined;
|
|
789
789
|
};
|
|
790
790
|
/**
|
|
791
791
|
* A form blueprint: field name -> definition. Fields render in key order unless `options.sections` says otherwise.
|
|
@@ -797,115 +797,115 @@ export type FormBlueprint = {
|
|
|
797
797
|
* A group of fields (`options.sections`); with a title it is a fieldset with a legend.
|
|
798
798
|
*/
|
|
799
799
|
export type FormSection = {
|
|
800
|
-
title?: string;
|
|
800
|
+
title?: string | undefined;
|
|
801
801
|
/**
|
|
802
802
|
* - Blueprint keys, in order
|
|
803
803
|
*/
|
|
804
|
-
fields?: string[];
|
|
805
|
-
layout?: "
|
|
804
|
+
fields?: string[] | undefined;
|
|
805
|
+
layout?: "stacked" | "grid" | undefined;
|
|
806
806
|
/**
|
|
807
807
|
* - grid columns (default 2)
|
|
808
808
|
*/
|
|
809
|
-
columns?: number;
|
|
809
|
+
columns?: number | undefined;
|
|
810
810
|
};
|
|
811
811
|
export type FormOptions = {
|
|
812
812
|
/**
|
|
813
813
|
* - default 'stacked'
|
|
814
814
|
*/
|
|
815
|
-
layout?: "stacked" | "grid" | "inline";
|
|
815
|
+
layout?: "stacked" | "grid" | "inline" | undefined;
|
|
816
816
|
/**
|
|
817
817
|
* - grid layout columns (2 or 3, default 2)
|
|
818
818
|
*/
|
|
819
|
-
columns?:
|
|
819
|
+
columns?: number | undefined;
|
|
820
820
|
/**
|
|
821
821
|
* - default 'top'
|
|
822
822
|
*/
|
|
823
|
-
labelPosition?: "top" | "left" | "floating";
|
|
823
|
+
labelPosition?: "top" | "left" | "floating" | undefined;
|
|
824
824
|
/**
|
|
825
825
|
* - default true
|
|
826
826
|
*/
|
|
827
|
-
showLabels?: boolean;
|
|
827
|
+
showLabels?: boolean | undefined;
|
|
828
828
|
/**
|
|
829
829
|
* - default true
|
|
830
830
|
*/
|
|
831
|
-
showHelperText?: boolean;
|
|
831
|
+
showHelperText?: boolean | undefined;
|
|
832
832
|
/**
|
|
833
833
|
* - default true
|
|
834
834
|
*/
|
|
835
|
-
showHints?: boolean;
|
|
835
|
+
showHints?: boolean | undefined;
|
|
836
836
|
/**
|
|
837
837
|
* - default 'blur'
|
|
838
838
|
*/
|
|
839
|
-
validationMode?: "blur" | "change" | "submit";
|
|
839
|
+
validationMode?: "blur" | "change" | "submit" | undefined;
|
|
840
840
|
/**
|
|
841
841
|
* - default 'domma'
|
|
842
842
|
*/
|
|
843
|
-
cssFramework?: "domma" | "bootstrap" | "tailwind";
|
|
843
|
+
cssFramework?: "domma" | "bootstrap" | "tailwind" | undefined;
|
|
844
844
|
/**
|
|
845
845
|
* - default 'domma-form'
|
|
846
846
|
*/
|
|
847
|
-
className?: string;
|
|
847
|
+
className?: string | undefined;
|
|
848
848
|
/**
|
|
849
849
|
* - default 'domma-form-field'
|
|
850
850
|
*/
|
|
851
|
-
fieldClassName?: string;
|
|
851
|
+
fieldClassName?: string | undefined;
|
|
852
852
|
/**
|
|
853
853
|
* - default 'form-label'
|
|
854
854
|
*/
|
|
855
|
-
labelClassName?: string;
|
|
855
|
+
labelClassName?: string | undefined;
|
|
856
856
|
/**
|
|
857
857
|
* - default 'form-input'
|
|
858
858
|
*/
|
|
859
|
-
inputClassName?: string;
|
|
859
|
+
inputClassName?: string | undefined;
|
|
860
860
|
/**
|
|
861
861
|
* - default 'form-error'
|
|
862
862
|
*/
|
|
863
|
-
errorClassName?: string;
|
|
863
|
+
errorClassName?: string | undefined;
|
|
864
864
|
/**
|
|
865
865
|
* - default 'form-helper-text'
|
|
866
866
|
*/
|
|
867
|
-
helperClassName?: string;
|
|
867
|
+
helperClassName?: string | undefined;
|
|
868
868
|
/**
|
|
869
869
|
* - default 'form-hint'
|
|
870
870
|
*/
|
|
871
|
-
hintClassName?: string;
|
|
871
|
+
hintClassName?: string | undefined;
|
|
872
872
|
/**
|
|
873
873
|
* - Wrap the form in a card (default false)
|
|
874
874
|
*/
|
|
875
|
-
cardWrapper?: boolean;
|
|
876
|
-
sections?: FormSection[];
|
|
875
|
+
cardWrapper?: boolean | undefined;
|
|
876
|
+
sections?: FormSection[] | undefined;
|
|
877
877
|
/**
|
|
878
878
|
* - default true
|
|
879
879
|
*/
|
|
880
|
-
showSubmitButton?: boolean;
|
|
880
|
+
showSubmitButton?: boolean | undefined;
|
|
881
881
|
/**
|
|
882
882
|
* - default 'Submit'
|
|
883
883
|
*/
|
|
884
|
-
submitText?: string;
|
|
884
|
+
submitText?: string | undefined;
|
|
885
885
|
/**
|
|
886
886
|
* - Adds a reset button with this text
|
|
887
887
|
*/
|
|
888
|
-
resetText?: string;
|
|
888
|
+
resetText?: string | undefined;
|
|
889
889
|
/**
|
|
890
890
|
* - default 'right'
|
|
891
891
|
*/
|
|
892
|
-
buttonAlignment?: "
|
|
892
|
+
buttonAlignment?: "center" | "left" | "right" | undefined;
|
|
893
893
|
/**
|
|
894
894
|
* - A valid submit
|
|
895
895
|
*/
|
|
896
|
-
onSubmit?: (data: Record<string, any>, form: FormInstance) => void;
|
|
896
|
+
onSubmit?: ((data: Record<string, any>, form: FormInstance) => void) | undefined;
|
|
897
897
|
/**
|
|
898
898
|
* - An invalid submit
|
|
899
899
|
*/
|
|
900
|
-
onValidationError?: (errors: Record<string, string>, form: FormInstance) => void;
|
|
900
|
+
onValidationError?: ((errors: Record<string, string>, form: FormInstance) => void) | undefined;
|
|
901
901
|
/**
|
|
902
902
|
* - Passed to the model: a storage key to keep the values under
|
|
903
903
|
*/
|
|
904
|
-
persist?: string;
|
|
904
|
+
persist?: string | undefined;
|
|
905
905
|
/**
|
|
906
906
|
* - Passed to the model
|
|
907
907
|
*/
|
|
908
|
-
autoSave?: boolean;
|
|
908
|
+
autoSave?: boolean | undefined;
|
|
909
909
|
};
|
|
910
910
|
/**
|
|
911
911
|
* What `handleSubmit()` returns.
|
|
@@ -925,13 +925,13 @@ export type FormWizardStep = {
|
|
|
925
925
|
/**
|
|
926
926
|
* - default 'Step <n>'
|
|
927
927
|
*/
|
|
928
|
-
title?: string;
|
|
929
|
-
description?: string;
|
|
928
|
+
title?: string | undefined;
|
|
929
|
+
description?: string | undefined;
|
|
930
930
|
/**
|
|
931
931
|
* - The step's blueprint
|
|
932
932
|
*/
|
|
933
933
|
fields: FormBlueprint;
|
|
934
|
-
layout?: "stacked" | "grid" | "inline";
|
|
934
|
+
layout?: "stacked" | "grid" | "inline" | undefined;
|
|
935
935
|
};
|
|
936
936
|
/**
|
|
937
937
|
* `F.wizard` options; the rest are FormOptions applied to every step.
|
|
@@ -1009,22 +1009,22 @@ export type FormCrudConfig = {
|
|
|
1009
1009
|
/**
|
|
1010
1010
|
* - Where the table goes
|
|
1011
1011
|
*/
|
|
1012
|
-
tableSelector?: string | HTMLElement;
|
|
1012
|
+
tableSelector?: string | HTMLElement | undefined;
|
|
1013
1013
|
/**
|
|
1014
1014
|
* - default 'Manage Items'
|
|
1015
1015
|
*/
|
|
1016
|
-
title?: string;
|
|
1016
|
+
title?: string | undefined;
|
|
1017
1017
|
/**
|
|
1018
1018
|
* - default 'id'
|
|
1019
1019
|
*/
|
|
1020
|
-
primaryKey?: string;
|
|
1020
|
+
primaryKey?: string | undefined;
|
|
1021
1021
|
/**
|
|
1022
1022
|
* - default 'name'
|
|
1023
1023
|
*/
|
|
1024
|
-
displayField?: string;
|
|
1025
|
-
headers?: Record<string, string
|
|
1026
|
-
onError?: (error: any) => void;
|
|
1027
|
-
onSuccess?: (message: string) => void;
|
|
1024
|
+
displayField?: string | undefined;
|
|
1025
|
+
headers?: Record<string, string> | undefined;
|
|
1026
|
+
onError?: ((error: any) => void) | undefined;
|
|
1027
|
+
onSuccess?: ((message: string) => void) | undefined;
|
|
1028
1028
|
};
|
|
1029
1029
|
/**
|
|
1030
1030
|
* The object `F.crud` returns. Call `init()` to load the data and build the table.
|
|
@@ -21,25 +21,25 @@ export type DommaLoadOptions = {
|
|
|
21
21
|
/**
|
|
22
22
|
* true (default): every alias; 'safe': only aliases nobody else owns; false: window.Domma only
|
|
23
23
|
*/
|
|
24
|
-
globals?: boolean | "safe";
|
|
24
|
+
globals?: boolean | "safe" | undefined;
|
|
25
25
|
/**
|
|
26
26
|
* false: never add the `dm-cloaked` class
|
|
27
27
|
*/
|
|
28
|
-
cloak?: boolean;
|
|
28
|
+
cloak?: boolean | undefined;
|
|
29
29
|
/**
|
|
30
30
|
* false: don't initialise the theme engine automatically
|
|
31
31
|
*/
|
|
32
|
-
theme?: boolean;
|
|
32
|
+
theme?: boolean | undefined;
|
|
33
33
|
/**
|
|
34
34
|
* false: no console warning when DOMPurify is missing
|
|
35
35
|
*/
|
|
36
|
-
purifyWarning?: boolean;
|
|
36
|
+
purifyWarning?: boolean | undefined;
|
|
37
37
|
/**
|
|
38
38
|
* false: no deprecation warnings (none are pending in 1.0)
|
|
39
39
|
*/
|
|
40
|
-
deprecationWarnings?: boolean;
|
|
40
|
+
deprecationWarnings?: boolean | undefined;
|
|
41
41
|
/**
|
|
42
42
|
* false: no console warning for a missing translation
|
|
43
43
|
*/
|
|
44
|
-
i18nWarnings?: boolean;
|
|
44
|
+
i18nWarnings?: boolean | undefined;
|
|
45
45
|
};
|