@formbox/htmx 0.4.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +669 -51
- package/dist/index.js +232 -48
- package/dist/templates/AnswerList.html.hbs +2 -2
- package/dist/templates/AnswerScaffold.html.hbs +2 -2
- package/dist/templates/CheckboxList.html.hbs +2 -2
- package/dist/templates/CustomOptionForm.html.hbs +6 -4
- package/dist/templates/FileInput.html.hbs +2 -2
- package/dist/templates/Flyover.html.hbs +2 -2
- package/dist/templates/GroupList.html.hbs +2 -2
- package/dist/templates/GroupScaffold.html.hbs +5 -5
- package/dist/templates/Help.html.hbs +2 -2
- package/dist/templates/Label.html.hbs +4 -4
- package/dist/templates/LanguageSelector.html.hbs +2 -1
- package/dist/templates/Legal.html.hbs +2 -2
- package/dist/templates/Link.html.hbs +2 -1
- package/dist/templates/MultiSelectInput.html.hbs +2 -2
- package/dist/templates/QuestionScaffold.html.hbs +2 -2
- package/dist/templates/RadioButtonList.html.hbs +2 -2
- package/dist/templates/Table.html.hbs +2 -2
- package/package.json +8 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,56 +1,8 @@
|
|
|
1
|
-
import { AnswerListProperties } from '@formbox/theme';
|
|
2
|
-
import { AnswerScaffoldProperties } from '@formbox/theme';
|
|
3
|
-
import { Attachment } from '@formbox/theme';
|
|
4
|
-
import { CheckboxListProperties } from '@formbox/theme';
|
|
5
|
-
import { CheckboxProperties } from '@formbox/theme';
|
|
6
|
-
import { CustomExtensionDefinitions } from '@formbox/theme';
|
|
7
|
-
import { CustomOptionFormProperties } from '@formbox/theme';
|
|
8
|
-
import { DateInputProperties } from '@formbox/theme';
|
|
9
|
-
import { DateTimeInputProperties } from '@formbox/theme';
|
|
10
|
-
import { DisplayRendererProperties } from '@formbox/theme';
|
|
11
|
-
import { ErrorsProperties } from '@formbox/theme';
|
|
12
1
|
import { FhirVersion } from '@formbox/fhir';
|
|
13
|
-
import {
|
|
14
|
-
import { FlyoverProperties } from '@formbox/theme';
|
|
15
|
-
import { FooterProperties } from '@formbox/theme';
|
|
16
|
-
import { FormPagination } from '@formbox/theme';
|
|
17
|
-
import { FormProperties } from '@formbox/theme';
|
|
18
|
-
import { GroupListProperties } from '@formbox/theme';
|
|
19
|
-
import { GroupScaffoldProperties } from '@formbox/theme';
|
|
20
|
-
import { HeaderProperties } from '@formbox/theme';
|
|
21
|
-
import { HelpProperties } from '@formbox/theme';
|
|
22
|
-
import { InputGroupProperties } from '@formbox/theme';
|
|
23
|
-
import { LabelProperties } from '@formbox/theme';
|
|
24
|
-
import { LanguageSelectorProperties } from '@formbox/theme';
|
|
25
|
-
import { LegalProperties } from '@formbox/theme';
|
|
26
|
-
import { LinkProperties } from '@formbox/theme';
|
|
27
|
-
import { MultiSelectInputProperties } from '@formbox/theme';
|
|
28
|
-
import { NodePath } from '@formbox/theme';
|
|
29
|
-
import { NumberInputProperties } from '@formbox/theme';
|
|
30
|
-
import { OptionDisplayProperties } from '@formbox/theme';
|
|
31
|
-
import { OptionItem } from '@formbox/theme';
|
|
32
|
-
import { OptionsLoadingProperties } from '@formbox/theme';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
33
3
|
import { QuestionnaireOf } from '@formbox/fhir';
|
|
34
4
|
import { QuestionnaireResponseOf } from '@formbox/fhir';
|
|
35
|
-
import { QuestionScaffoldProperties } from '@formbox/theme';
|
|
36
|
-
import { RadioButtonListProperties } from '@formbox/theme';
|
|
37
|
-
import { RadioButtonProperties } from '@formbox/theme';
|
|
38
5
|
import { ReactNode } from 'react';
|
|
39
|
-
import { SelectedOptionItem } from '@formbox/theme';
|
|
40
|
-
import { SelectInputProperties } from '@formbox/theme';
|
|
41
|
-
import { SignatureInputProperties } from '@formbox/theme';
|
|
42
|
-
import { SliderInputProperties } from '@formbox/theme';
|
|
43
|
-
import { SpinnerInputProperties } from '@formbox/theme';
|
|
44
|
-
import { StackProperties } from '@formbox/theme';
|
|
45
|
-
import { Strings } from '@formbox/theme';
|
|
46
|
-
import { TabContainerProperties } from '@formbox/theme';
|
|
47
|
-
import { TableCell } from '@formbox/theme';
|
|
48
|
-
import { TableColumn } from '@formbox/theme';
|
|
49
|
-
import { TableProperties } from '@formbox/theme';
|
|
50
|
-
import { TableRow } from '@formbox/theme';
|
|
51
|
-
import { TextAreaProperties } from '@formbox/theme';
|
|
52
|
-
import { TextInputProperties } from '@formbox/theme';
|
|
53
|
-
import { TimeInputProperties } from '@formbox/theme';
|
|
54
6
|
|
|
55
7
|
export declare const ACTION_FIELD = "fb[action]";
|
|
56
8
|
|
|
@@ -61,6 +13,7 @@ export declare function actionValue(kind: ActionKind, path: NodePath): string;
|
|
|
61
13
|
export declare type AddActionProperties = {
|
|
62
14
|
readonly actionName: string;
|
|
63
15
|
readonly addAction?: string | undefined;
|
|
16
|
+
readonly addId?: string | undefined;
|
|
64
17
|
readonly addLabel: string;
|
|
65
18
|
readonly count?: number | undefined;
|
|
66
19
|
readonly countName?: string | undefined;
|
|
@@ -69,23 +22,67 @@ export declare type AddActionProperties = {
|
|
|
69
22
|
|
|
70
23
|
export declare type AnswerField = "value" | "system" | "code" | "display" | "unit" | "baseline" | "signature";
|
|
71
24
|
|
|
25
|
+
declare type AnswerListProperties = {
|
|
26
|
+
children: ReactNode;
|
|
27
|
+
onAdd?: (() => void) | undefined;
|
|
28
|
+
canAdd?: boolean | undefined;
|
|
29
|
+
path?: NodePath | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
72
32
|
export declare type AnswerListTemplateProperties = Omit<TemplateBase<AnswerListProperties>, "children"> & {
|
|
73
33
|
readonly children: string;
|
|
74
34
|
readonly hasCount: boolean;
|
|
75
35
|
} & AddActionProperties;
|
|
76
36
|
|
|
37
|
+
declare type AnswerScaffoldProperties = {
|
|
38
|
+
control: ReactNode;
|
|
39
|
+
onRemove?: (() => void) | undefined;
|
|
40
|
+
canRemove?: boolean | undefined;
|
|
41
|
+
errors?: ReactNode;
|
|
42
|
+
children?: ReactNode;
|
|
43
|
+
path?: NodePath | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
77
46
|
export declare type AnswerScaffoldTemplateProperties = Omit<TemplateBase<AnswerScaffoldProperties>, "children" | "control" | "errors"> & {
|
|
78
47
|
readonly control: string;
|
|
79
48
|
readonly errors?: string | undefined;
|
|
80
49
|
readonly children?: string | undefined;
|
|
81
50
|
} & RemoveActionProperties;
|
|
82
51
|
|
|
52
|
+
declare type Attachment = {
|
|
53
|
+
title?: string | undefined;
|
|
54
|
+
url?: string | undefined;
|
|
55
|
+
size?: number | undefined;
|
|
56
|
+
contentType?: string | undefined;
|
|
57
|
+
data?: string | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
83
60
|
export declare function attribute(name: string, value: unknown): string;
|
|
84
61
|
|
|
62
|
+
declare type BivariantExtract<TContext, TValue> = {
|
|
63
|
+
bivarianceHack(context: TContext): TValue;
|
|
64
|
+
}["bivarianceHack"];
|
|
65
|
+
|
|
85
66
|
export declare function calculatedName(path: NodePath): string;
|
|
86
67
|
|
|
87
68
|
export declare function checkboxHiddenValue(properties: CheckboxProperties, checkedValue: string): string | undefined;
|
|
88
69
|
|
|
70
|
+
declare type CheckboxListProperties = {
|
|
71
|
+
options: readonly OptionItem[];
|
|
72
|
+
selectedOptions: readonly SelectedOptionItem[];
|
|
73
|
+
orientation?: ChoiceOrientation | undefined;
|
|
74
|
+
onSelect: (token: string) => void;
|
|
75
|
+
onDeselect: (token: string) => void;
|
|
76
|
+
specifyOtherOption?: OptionItem | undefined;
|
|
77
|
+
customOptionForm?: ReactNode;
|
|
78
|
+
id: string;
|
|
79
|
+
path?: NodePath | undefined;
|
|
80
|
+
ariaLabelledBy: string;
|
|
81
|
+
ariaDescribedBy?: string | undefined;
|
|
82
|
+
disabled?: boolean | undefined;
|
|
83
|
+
isLoading?: boolean | undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
89
86
|
export declare type CheckboxListTemplateProperties = Omit<FieldTemplateProperties<CheckboxListProperties>, "customOptionForm" | "options" | "selectedOptions" | "specifyOtherOption"> & {
|
|
90
87
|
readonly baselineName?: string | undefined;
|
|
91
88
|
readonly hiddenInputs: readonly HiddenTemplateInput[];
|
|
@@ -98,22 +95,39 @@ export declare type CheckboxListTemplateProperties = Omit<FieldTemplatePropertie
|
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
export declare type CheckboxOptionTemplateItem = TemplateOptionItem & {
|
|
98
|
+
readonly id: string;
|
|
101
99
|
readonly selected: boolean;
|
|
102
100
|
readonly disabled?: boolean | undefined;
|
|
103
101
|
readonly hiddenInput?: HiddenTemplateInput | undefined;
|
|
104
102
|
};
|
|
105
103
|
|
|
104
|
+
declare type CheckboxProperties = {
|
|
105
|
+
id: string;
|
|
106
|
+
path?: NodePath | undefined;
|
|
107
|
+
checkedValue?: string | undefined;
|
|
108
|
+
uncheckedValue?: string | undefined;
|
|
109
|
+
checked: boolean;
|
|
110
|
+
onChange: () => void;
|
|
111
|
+
ariaLabelledBy: string;
|
|
112
|
+
ariaDescribedBy?: string | undefined;
|
|
113
|
+
disabled?: boolean;
|
|
114
|
+
label?: ReactNode;
|
|
115
|
+
};
|
|
116
|
+
|
|
106
117
|
export declare type CheckboxTemplateProperties = Omit<FieldTemplateProperties<CheckboxProperties>, "label"> & {
|
|
107
118
|
readonly hiddenValue?: string | undefined;
|
|
108
119
|
readonly label?: string | undefined;
|
|
109
120
|
};
|
|
110
121
|
|
|
122
|
+
declare type ChoiceOrientation = "horizontal" | "vertical";
|
|
123
|
+
|
|
111
124
|
export declare type CollapsibleActionProperties = {
|
|
112
125
|
readonly actionName?: string | undefined;
|
|
113
126
|
readonly collapseLabel?: string | undefined;
|
|
114
127
|
readonly expandedName?: string | undefined;
|
|
115
128
|
readonly expandLabel?: string | undefined;
|
|
116
129
|
readonly toggleAction?: string | undefined;
|
|
130
|
+
readonly toggleId?: string | undefined;
|
|
117
131
|
};
|
|
118
132
|
|
|
119
133
|
export declare function compileTemplate<TProperties extends TemplateProperties>(source: TemplateSource<TProperties>): Template<TProperties>;
|
|
@@ -122,16 +136,53 @@ export declare function compileTemplates(sources: TemplateSources): Templates;
|
|
|
122
136
|
|
|
123
137
|
export declare function countName(path: NodePath): string;
|
|
124
138
|
|
|
139
|
+
declare type CustomExtensionDefinition<TContext = unknown, TValue = unknown, TRepeats extends boolean = boolean> = {
|
|
140
|
+
readonly target: CustomExtensionTarget;
|
|
141
|
+
readonly url: string;
|
|
142
|
+
readonly repeats: TRepeats;
|
|
143
|
+
readonly extract: BivariantExtract<TContext, TValue>;
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
declare type CustomExtensionDefinitions<TContext = unknown> = Readonly<Record<string, CustomExtensionDefinition<TContext, unknown, boolean>>>;
|
|
147
|
+
|
|
148
|
+
declare type CustomExtensionTarget = "questionnaire" | "item";
|
|
149
|
+
|
|
150
|
+
declare type CustomExtensionValues = Readonly<Record<string, unknown>>;
|
|
151
|
+
|
|
152
|
+
declare type CustomOptionFormProperties = {
|
|
153
|
+
id?: string | undefined;
|
|
154
|
+
content: ReactNode;
|
|
155
|
+
errors?: ReactNode | undefined;
|
|
156
|
+
onCancel: () => void;
|
|
157
|
+
onSubmit: () => void;
|
|
158
|
+
canSubmit?: boolean | undefined;
|
|
159
|
+
};
|
|
160
|
+
|
|
125
161
|
export declare type CustomOptionFormTemplateProperties = Omit<TemplateBase<CustomOptionFormProperties>, "content" | "errors"> & {
|
|
126
162
|
readonly actionName: string;
|
|
127
163
|
readonly cancelLabel: string;
|
|
164
|
+
readonly cancelId?: string | undefined;
|
|
128
165
|
readonly content: string;
|
|
129
166
|
readonly errors?: string | undefined;
|
|
167
|
+
readonly submitId?: string | undefined;
|
|
130
168
|
readonly submitLabel: string;
|
|
131
169
|
};
|
|
132
170
|
|
|
133
171
|
export declare function customUnitFormName(path: NodePath): string;
|
|
134
172
|
|
|
173
|
+
declare type DateInputProperties = {
|
|
174
|
+
id: string;
|
|
175
|
+
path?: NodePath | undefined;
|
|
176
|
+
value: string;
|
|
177
|
+
onChange: (v: string) => void;
|
|
178
|
+
disabled?: boolean | undefined;
|
|
179
|
+
placeholder?: string | undefined;
|
|
180
|
+
ariaLabelledBy: string;
|
|
181
|
+
ariaDescribedBy?: string | undefined;
|
|
182
|
+
min?: string | undefined;
|
|
183
|
+
max?: string | undefined;
|
|
184
|
+
};
|
|
185
|
+
|
|
135
186
|
export declare type DateInputTemplateProperties = FieldTemplateProperties<DateInputProperties> & {
|
|
136
187
|
readonly inputType: "date" | "text";
|
|
137
188
|
readonly step: undefined;
|
|
@@ -139,6 +190,19 @@ export declare type DateInputTemplateProperties = FieldTemplateProperties<DateIn
|
|
|
139
190
|
|
|
140
191
|
export declare function dateTimeConstraint(value: string | undefined): string | undefined;
|
|
141
192
|
|
|
193
|
+
declare type DateTimeInputProperties = {
|
|
194
|
+
id: string;
|
|
195
|
+
path?: NodePath | undefined;
|
|
196
|
+
value: string;
|
|
197
|
+
onChange: (v: string) => void;
|
|
198
|
+
disabled?: boolean | undefined;
|
|
199
|
+
placeholder?: string | undefined;
|
|
200
|
+
ariaLabelledBy: string;
|
|
201
|
+
ariaDescribedBy?: string | undefined;
|
|
202
|
+
min?: string | undefined;
|
|
203
|
+
max?: string | undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
142
206
|
export declare type DateTimeInputTemplateProperties = FieldTemplateProperties<DateTimeInputProperties> & {
|
|
143
207
|
readonly baselineName?: string | undefined;
|
|
144
208
|
readonly baselineValue?: string | undefined;
|
|
@@ -151,10 +215,21 @@ export declare type DateTimeInputTemplateProperties = FieldTemplateProperties<Da
|
|
|
151
215
|
|
|
152
216
|
export declare function defaultAttributes(action: string | undefined): HtmlAttributes;
|
|
153
217
|
|
|
218
|
+
declare type DisplayRendererProperties = {
|
|
219
|
+
linkId: string;
|
|
220
|
+
children: ReactNode;
|
|
221
|
+
customExtensions?: CustomExtensionValues | undefined;
|
|
222
|
+
};
|
|
223
|
+
|
|
154
224
|
export declare type DisplayRendererTemplateProperties = Omit<TemplateBase<DisplayRendererProperties>, "children"> & {
|
|
155
225
|
readonly children: string;
|
|
156
226
|
};
|
|
157
227
|
|
|
228
|
+
declare type ErrorsProperties = {
|
|
229
|
+
id: string;
|
|
230
|
+
messages: string[];
|
|
231
|
+
};
|
|
232
|
+
|
|
158
233
|
export declare type ErrorsTemplateProperties = Omit<TemplateBase<ErrorsProperties>, "messages"> & {
|
|
159
234
|
readonly hasMessages: boolean;
|
|
160
235
|
readonly messages: readonly {
|
|
@@ -170,7 +245,19 @@ export declare function fieldAttributes(path: NodePath | undefined, field: Answe
|
|
|
170
245
|
|
|
171
246
|
declare type FieldTemplateProperties<TProperties> = TemplateBase<TProperties> & TemplateFieldAttributes;
|
|
172
247
|
|
|
248
|
+
declare type FileInputProperties = {
|
|
249
|
+
value: Attachment | undefined;
|
|
250
|
+
id: string;
|
|
251
|
+
path?: NodePath | undefined;
|
|
252
|
+
ariaLabelledBy: string;
|
|
253
|
+
ariaDescribedBy?: string | undefined;
|
|
254
|
+
disabled?: boolean | undefined;
|
|
255
|
+
accept?: string | undefined;
|
|
256
|
+
onChange?: ((file?: File) => void) | undefined;
|
|
257
|
+
};
|
|
258
|
+
|
|
173
259
|
export declare type FileInputTemplateProperties = FieldTemplateProperties<FileInputProperties> & {
|
|
260
|
+
readonly clearId?: string | undefined;
|
|
174
261
|
readonly clearLabel: string;
|
|
175
262
|
readonly hiddenValue?: string | undefined;
|
|
176
263
|
readonly clearAction: boolean;
|
|
@@ -178,11 +265,22 @@ export declare type FileInputTemplateProperties = FieldTemplateProperties<FileIn
|
|
|
178
265
|
readonly hxInclude: "closest form";
|
|
179
266
|
};
|
|
180
267
|
|
|
268
|
+
declare type FlyoverProperties = {
|
|
269
|
+
id: string;
|
|
270
|
+
children: ReactNode;
|
|
271
|
+
};
|
|
272
|
+
|
|
181
273
|
export declare type FlyoverTemplateProperties = Omit<TemplateBase<FlyoverProperties>, "children"> & {
|
|
182
274
|
readonly ariaLabel: string;
|
|
275
|
+
readonly buttonId?: string | undefined;
|
|
183
276
|
readonly children: string;
|
|
184
277
|
};
|
|
185
278
|
|
|
279
|
+
declare type FooterProperties = {
|
|
280
|
+
linkId: string;
|
|
281
|
+
children: ReactNode;
|
|
282
|
+
};
|
|
283
|
+
|
|
186
284
|
export declare type FooterTemplateProperties = Omit<TemplateBase<FooterProperties>, "children"> & {
|
|
187
285
|
readonly children: string;
|
|
188
286
|
};
|
|
@@ -191,6 +289,31 @@ declare type FormFieldsProperties = Omit<FormTemplateProperties, "attributes" |
|
|
|
191
289
|
|
|
192
290
|
export declare function formFieldsTemplate(properties: FormFieldsProperties): string;
|
|
193
291
|
|
|
292
|
+
declare type FormPagination = {
|
|
293
|
+
current: number;
|
|
294
|
+
total: number;
|
|
295
|
+
onPrev: () => void;
|
|
296
|
+
onNext: () => void;
|
|
297
|
+
disabledPrev: boolean;
|
|
298
|
+
disabledNext: boolean;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
declare type FormProperties = {
|
|
302
|
+
id?: string | undefined;
|
|
303
|
+
onSubmit?: (() => void) | undefined;
|
|
304
|
+
onCancel?: (() => void) | undefined;
|
|
305
|
+
children: ReactNode;
|
|
306
|
+
pagination?: FormPagination | undefined;
|
|
307
|
+
title?: string | undefined;
|
|
308
|
+
description?: string | undefined;
|
|
309
|
+
languageSelector?: ReactNode;
|
|
310
|
+
errors?: ReactNode;
|
|
311
|
+
before?: ReactNode;
|
|
312
|
+
after?: ReactNode;
|
|
313
|
+
signature?: ReactNode;
|
|
314
|
+
customExtensions?: CustomExtensionValues | undefined;
|
|
315
|
+
};
|
|
316
|
+
|
|
194
317
|
export declare type FormTemplateProperties = Omit<TemplateBase<FormProperties>, "after" | "before" | "children" | "errors" | "languageSelector" | "pagination" | "signature"> & {
|
|
195
318
|
readonly after?: string | undefined;
|
|
196
319
|
readonly before?: string | undefined;
|
|
@@ -204,6 +327,18 @@ export declare type FormTemplateProperties = Omit<TemplateBase<FormProperties>,
|
|
|
204
327
|
readonly submitLabel: string;
|
|
205
328
|
};
|
|
206
329
|
|
|
330
|
+
declare type GroupListProperties = {
|
|
331
|
+
linkId: string;
|
|
332
|
+
header?: ReactNode;
|
|
333
|
+
errors?: ReactNode;
|
|
334
|
+
children: ReactNode;
|
|
335
|
+
onAdd?: (() => void) | undefined;
|
|
336
|
+
canAdd?: boolean | undefined;
|
|
337
|
+
path?: NodePath | undefined;
|
|
338
|
+
count?: number | undefined;
|
|
339
|
+
customExtensions?: CustomExtensionValues | undefined;
|
|
340
|
+
};
|
|
341
|
+
|
|
207
342
|
export declare type GroupListTemplateProperties = Omit<TemplateBase<GroupListProperties>, "children" | "errors" | "header"> & {
|
|
208
343
|
readonly header?: string | undefined;
|
|
209
344
|
readonly errors?: string | undefined;
|
|
@@ -211,6 +346,20 @@ export declare type GroupListTemplateProperties = Omit<TemplateBase<GroupListPro
|
|
|
211
346
|
readonly hasCount: boolean;
|
|
212
347
|
} & AddActionProperties;
|
|
213
348
|
|
|
349
|
+
declare type GroupScaffoldProperties = {
|
|
350
|
+
linkId?: string | undefined;
|
|
351
|
+
path?: NodePath | undefined;
|
|
352
|
+
header?: ReactNode;
|
|
353
|
+
children?: ReactNode;
|
|
354
|
+
errors?: ReactNode;
|
|
355
|
+
signature?: ReactNode;
|
|
356
|
+
isExpandable?: boolean | undefined;
|
|
357
|
+
isExpanded: boolean;
|
|
358
|
+
onRemove?: (() => void) | undefined;
|
|
359
|
+
canRemove?: boolean | undefined;
|
|
360
|
+
customExtensions?: CustomExtensionValues | undefined;
|
|
361
|
+
};
|
|
362
|
+
|
|
214
363
|
export declare type GroupScaffoldTemplateProperties = Omit<TemplateBase<GroupScaffoldProperties>, "children" | "errors" | "header" | "signature"> & {
|
|
215
364
|
readonly header?: string | undefined;
|
|
216
365
|
readonly children?: string | undefined;
|
|
@@ -221,12 +370,23 @@ export declare type GroupScaffoldTemplateProperties = Omit<TemplateBase<GroupSca
|
|
|
221
370
|
readonly signature?: string | undefined;
|
|
222
371
|
} & RemoveActionProperties & CollapsibleActionProperties;
|
|
223
372
|
|
|
373
|
+
declare type HeaderProperties = {
|
|
374
|
+
linkId: string;
|
|
375
|
+
children: ReactNode;
|
|
376
|
+
};
|
|
377
|
+
|
|
224
378
|
export declare type HeaderTemplateProperties = Omit<TemplateBase<HeaderProperties>, "children"> & {
|
|
225
379
|
readonly children: string;
|
|
226
380
|
};
|
|
227
381
|
|
|
382
|
+
declare type HelpProperties = {
|
|
383
|
+
id: string;
|
|
384
|
+
children: ReactNode;
|
|
385
|
+
};
|
|
386
|
+
|
|
228
387
|
export declare type HelpTemplateProperties = Omit<TemplateBase<HelpProperties>, "children"> & {
|
|
229
388
|
readonly ariaLabel: string;
|
|
389
|
+
readonly buttonId?: string | undefined;
|
|
230
390
|
readonly children: string;
|
|
231
391
|
};
|
|
232
392
|
|
|
@@ -243,8 +403,18 @@ export declare function htmlAttributes(values: HtmlAttributes): string;
|
|
|
243
403
|
|
|
244
404
|
export declare type HtmlAttributeValue = string | number | boolean | null | undefined;
|
|
245
405
|
|
|
406
|
+
declare type Hyperlink = {
|
|
407
|
+
href: string;
|
|
408
|
+
label: string | undefined;
|
|
409
|
+
};
|
|
410
|
+
|
|
246
411
|
export declare function inferTextField(id: string, group: InputGroupState | undefined): AnswerField;
|
|
247
412
|
|
|
413
|
+
declare type InputGroupProperties = {
|
|
414
|
+
children: ReactNode;
|
|
415
|
+
spans: number[];
|
|
416
|
+
};
|
|
417
|
+
|
|
248
418
|
export declare type InputGroupState = {
|
|
249
419
|
readonly size: number;
|
|
250
420
|
readonly index: number;
|
|
@@ -260,6 +430,25 @@ export declare function isDefined<T>(value: T | undefined): value is T;
|
|
|
260
430
|
|
|
261
431
|
export declare function isPreservedOptionToken(token: string): boolean;
|
|
262
432
|
|
|
433
|
+
declare type LabelAs = "legend" | "label" | "text";
|
|
434
|
+
|
|
435
|
+
declare type LabelProperties = {
|
|
436
|
+
prefix?: ReactNode;
|
|
437
|
+
shortText?: string | undefined;
|
|
438
|
+
supportHyperlinks?: ReadonlyArray<Hyperlink> | undefined;
|
|
439
|
+
media?: Attachment | undefined;
|
|
440
|
+
isExpanded: boolean;
|
|
441
|
+
onToggleExpanded?: (() => void) | undefined;
|
|
442
|
+
children: ReactNode;
|
|
443
|
+
id: string;
|
|
444
|
+
htmlFor?: string | undefined;
|
|
445
|
+
required?: boolean | undefined;
|
|
446
|
+
help?: ReactNode;
|
|
447
|
+
legal?: ReactNode;
|
|
448
|
+
flyover?: ReactNode;
|
|
449
|
+
as?: LabelAs | undefined;
|
|
450
|
+
};
|
|
451
|
+
|
|
263
452
|
export declare type LabelTemplateProperties = Omit<TemplateBase<LabelProperties>, "children" | "flyover" | "help" | "legal" | "prefix"> & {
|
|
264
453
|
readonly attachmentLabel: string;
|
|
265
454
|
readonly prefix?: string | undefined;
|
|
@@ -272,13 +461,27 @@ export declare type LabelTemplateProperties = Omit<TemplateBase<LabelProperties>
|
|
|
272
461
|
readonly flyover?: string | undefined;
|
|
273
462
|
readonly media: string;
|
|
274
463
|
readonly supportHyperlinks?: ReadonlyArray<NonNullable<LabelProperties["supportHyperlinks"]>[number] & {
|
|
464
|
+
readonly id: string;
|
|
275
465
|
readonly labelHtml: string;
|
|
276
466
|
}>;
|
|
277
467
|
};
|
|
278
468
|
|
|
279
469
|
export declare const LANGUAGE_FIELD = "fb[language]";
|
|
280
470
|
|
|
471
|
+
declare type LanguageOption = {
|
|
472
|
+
value: string;
|
|
473
|
+
label: string;
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
declare type LanguageSelectorProperties = {
|
|
477
|
+
id?: string | undefined;
|
|
478
|
+
options: readonly LanguageOption[];
|
|
479
|
+
value: string;
|
|
480
|
+
onChange: (value: string) => void;
|
|
481
|
+
};
|
|
482
|
+
|
|
281
483
|
export declare type LanguageSelectorTemplateProperties = Omit<TemplateBase<LanguageSelectorProperties>, "options"> & {
|
|
484
|
+
readonly id?: string | undefined;
|
|
282
485
|
readonly name: string;
|
|
283
486
|
readonly options: ReadonlyArray<LanguageSelectorProperties["options"][number] & {
|
|
284
487
|
readonly selected: boolean;
|
|
@@ -289,11 +492,25 @@ export declare function lastLinkId(path: NodePath): string;
|
|
|
289
492
|
|
|
290
493
|
export declare type LaunchContext = Record<string, unknown>;
|
|
291
494
|
|
|
495
|
+
declare type LegalProperties = {
|
|
496
|
+
id: string;
|
|
497
|
+
children: ReactNode;
|
|
498
|
+
};
|
|
499
|
+
|
|
292
500
|
export declare type LegalTemplateProperties = Omit<TemplateBase<LegalProperties>, "children"> & {
|
|
293
501
|
readonly ariaLabel: string;
|
|
502
|
+
readonly buttonId?: string | undefined;
|
|
294
503
|
readonly children: string;
|
|
295
504
|
};
|
|
296
505
|
|
|
506
|
+
declare type LinkProperties = {
|
|
507
|
+
id?: string | undefined;
|
|
508
|
+
href: string;
|
|
509
|
+
children: ReactNode;
|
|
510
|
+
target?: string | undefined;
|
|
511
|
+
rel?: string | undefined;
|
|
512
|
+
};
|
|
513
|
+
|
|
297
514
|
export declare type LinkTemplateProperties = Omit<TemplateBase<LinkProperties>, "children"> & {
|
|
298
515
|
readonly children: string;
|
|
299
516
|
};
|
|
@@ -302,7 +519,25 @@ export declare function loadDefaultTemplates(): Promise<RequiredTemplates>;
|
|
|
302
519
|
|
|
303
520
|
export declare function loadTemplates(directory: string | URL): Promise<Templates>;
|
|
304
521
|
|
|
305
|
-
export declare function mediaHtml(attachment: Attachment | undefined, fallbackLabel: string): string;
|
|
522
|
+
export declare function mediaHtml(attachment: Attachment | undefined, fallbackLabel: string, id?: string | undefined): string;
|
|
523
|
+
|
|
524
|
+
declare type MultiSelectInputProperties = {
|
|
525
|
+
options: readonly OptionItem[];
|
|
526
|
+
selectedOptions: readonly SelectedOptionItem[];
|
|
527
|
+
searchQuery: string;
|
|
528
|
+
onSelect: (token: string) => void;
|
|
529
|
+
onDeselect: (token: string) => void;
|
|
530
|
+
onSearch?: (query: string) => void;
|
|
531
|
+
specifyOtherOption?: OptionItem | undefined;
|
|
532
|
+
customOptionForm?: ReactNode;
|
|
533
|
+
id: string;
|
|
534
|
+
path?: NodePath | undefined;
|
|
535
|
+
ariaLabelledBy: string;
|
|
536
|
+
ariaDescribedBy?: string | undefined;
|
|
537
|
+
disabled?: boolean | undefined;
|
|
538
|
+
isLoading?: boolean | undefined;
|
|
539
|
+
placeholder?: string | undefined;
|
|
540
|
+
};
|
|
306
541
|
|
|
307
542
|
export declare type MultiSelectInputTemplateProperties = Omit<FieldTemplateProperties<MultiSelectInputProperties>, "customOptionForm" | "options" | "selectedOptions" | "specifyOtherOption"> & {
|
|
308
543
|
readonly baselineName?: string | undefined;
|
|
@@ -317,6 +552,28 @@ export declare type MultiSelectInputTemplateProperties = Omit<FieldTemplatePrope
|
|
|
317
552
|
readonly customOptionForm?: string | undefined;
|
|
318
553
|
};
|
|
319
554
|
|
|
555
|
+
declare type NodePath = readonly NodePathSegment[];
|
|
556
|
+
|
|
557
|
+
declare interface NodePathSegment {
|
|
558
|
+
readonly linkId: string;
|
|
559
|
+
readonly index?: number | undefined;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
declare type NumberInputProperties = {
|
|
563
|
+
id: string;
|
|
564
|
+
path?: NodePath | undefined;
|
|
565
|
+
value: number | undefined;
|
|
566
|
+
onChange: (v?: number) => void;
|
|
567
|
+
disabled?: boolean | undefined;
|
|
568
|
+
placeholder?: string | undefined;
|
|
569
|
+
step?: number | "any";
|
|
570
|
+
min?: number | undefined;
|
|
571
|
+
max?: number | undefined;
|
|
572
|
+
ariaLabelledBy: string;
|
|
573
|
+
ariaDescribedBy?: string | undefined;
|
|
574
|
+
unitLabel?: string | undefined;
|
|
575
|
+
};
|
|
576
|
+
|
|
320
577
|
export declare type NumberInputTemplateProperties = FieldTemplateProperties<NumberInputProperties> & NumberInputViewProperties;
|
|
321
578
|
|
|
322
579
|
declare type NumberInputViewProperties = {
|
|
@@ -331,12 +588,29 @@ export declare function numberTemplateProperties(properties: SliderInputProperti
|
|
|
331
588
|
|
|
332
589
|
export declare function numberTemplateProperties(properties: SpinnerInputProperties): SpinnerInputTemplateProperties;
|
|
333
590
|
|
|
591
|
+
declare type OptionDisplayProperties = {
|
|
592
|
+
children: ReactNode;
|
|
593
|
+
prefix?: string | undefined;
|
|
594
|
+
media?: Attachment | undefined;
|
|
595
|
+
};
|
|
596
|
+
|
|
334
597
|
export declare type OptionDisplayTemplateProperties = Omit<TemplateBase<OptionDisplayProperties>, "children" | "media"> & {
|
|
335
598
|
readonly attachmentLabel: string;
|
|
336
599
|
readonly children: string;
|
|
337
600
|
readonly media: string;
|
|
338
601
|
};
|
|
339
602
|
|
|
603
|
+
declare type OptionItem = {
|
|
604
|
+
token: string;
|
|
605
|
+
label: ReactNode;
|
|
606
|
+
disabled: boolean;
|
|
607
|
+
exclusive: boolean;
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
declare type OptionsLoadingProperties = {
|
|
611
|
+
isLoading: boolean;
|
|
612
|
+
};
|
|
613
|
+
|
|
340
614
|
export declare type OptionsLoadingTemplateProperties = TemplateBase<OptionsLoadingProperties> & {
|
|
341
615
|
readonly loadingLabel: string;
|
|
342
616
|
};
|
|
@@ -345,6 +619,10 @@ export declare function optionValueName(path: NodePath, token: string): string;
|
|
|
345
619
|
|
|
346
620
|
export declare const PAGE_FIELD = "fb[page]";
|
|
347
621
|
|
|
622
|
+
export declare function pathControlId(token: string, path: NodePath | undefined, ...parts: Array<string | number | undefined>): string | undefined;
|
|
623
|
+
|
|
624
|
+
declare type PlaceholderString<Key extends string> = `${string}{${Key}}${string}`;
|
|
625
|
+
|
|
348
626
|
export declare type ProcessResult = {
|
|
349
627
|
readonly submitted: false;
|
|
350
628
|
} | {
|
|
@@ -379,6 +657,18 @@ export declare interface QuestionnaireRendererOptions<V extends FhirVersion = Fh
|
|
|
379
657
|
action?: string | undefined;
|
|
380
658
|
}
|
|
381
659
|
|
|
660
|
+
declare type QuestionScaffoldProperties = {
|
|
661
|
+
linkId: string;
|
|
662
|
+
path?: NodePath | undefined;
|
|
663
|
+
header?: ReactNode;
|
|
664
|
+
children: ReactNode;
|
|
665
|
+
errors?: ReactNode;
|
|
666
|
+
signature?: ReactNode;
|
|
667
|
+
isExpandable?: boolean | undefined;
|
|
668
|
+
isExpanded: boolean;
|
|
669
|
+
customExtensions?: CustomExtensionValues | undefined;
|
|
670
|
+
};
|
|
671
|
+
|
|
382
672
|
export declare type QuestionScaffoldTemplateProperties = Omit<TemplateBase<QuestionScaffoldProperties>, "children" | "errors" | "header" | "signature"> & {
|
|
383
673
|
readonly header?: string | undefined;
|
|
384
674
|
readonly children: string;
|
|
@@ -389,6 +679,21 @@ export declare type QuestionScaffoldTemplateProperties = Omit<TemplateBase<Quest
|
|
|
389
679
|
readonly signature?: string | undefined;
|
|
390
680
|
} & CollapsibleActionProperties;
|
|
391
681
|
|
|
682
|
+
declare type RadioButtonListProperties = {
|
|
683
|
+
options: readonly OptionItem[];
|
|
684
|
+
selectedOption: SelectedOptionItem | undefined;
|
|
685
|
+
orientation?: ChoiceOrientation | undefined;
|
|
686
|
+
onChange: (token?: string) => void;
|
|
687
|
+
specifyOtherOption?: OptionItem | undefined;
|
|
688
|
+
customOptionForm?: ReactNode;
|
|
689
|
+
id: string;
|
|
690
|
+
path?: NodePath | undefined;
|
|
691
|
+
ariaLabelledBy: string;
|
|
692
|
+
ariaDescribedBy?: string | undefined;
|
|
693
|
+
disabled?: boolean | undefined;
|
|
694
|
+
isLoading?: boolean | undefined;
|
|
695
|
+
};
|
|
696
|
+
|
|
392
697
|
export declare type RadioButtonListTemplateProperties = Omit<FieldTemplateProperties<RadioButtonListProperties>, "customOptionForm" | "options" | "selectedOption" | "specifyOtherOption"> & {
|
|
393
698
|
readonly baselineName?: string | undefined;
|
|
394
699
|
readonly baselineValue?: string | undefined;
|
|
@@ -399,12 +704,26 @@ export declare type RadioButtonListTemplateProperties = Omit<FieldTemplateProper
|
|
|
399
704
|
readonly customOptionForm?: string | undefined;
|
|
400
705
|
};
|
|
401
706
|
|
|
707
|
+
declare type RadioButtonProperties = {
|
|
708
|
+
id: string;
|
|
709
|
+
path?: NodePath | undefined;
|
|
710
|
+
groupName: string;
|
|
711
|
+
value: string;
|
|
712
|
+
checked: boolean;
|
|
713
|
+
onChange: () => void;
|
|
714
|
+
ariaLabelledBy: string;
|
|
715
|
+
ariaDescribedBy?: string | undefined;
|
|
716
|
+
disabled?: boolean;
|
|
717
|
+
label?: ReactNode;
|
|
718
|
+
};
|
|
719
|
+
|
|
402
720
|
export declare type RadioButtonTemplateProperties = Omit<FieldTemplateProperties<RadioButtonProperties>, "label"> & {
|
|
403
721
|
readonly hiddenValue?: string | undefined;
|
|
404
722
|
readonly label?: string | undefined;
|
|
405
723
|
};
|
|
406
724
|
|
|
407
725
|
export declare type RadioOptionTemplateItem = TemplateOptionItem & {
|
|
726
|
+
readonly id: string;
|
|
408
727
|
readonly checked: boolean;
|
|
409
728
|
readonly disabled?: boolean | undefined;
|
|
410
729
|
};
|
|
@@ -415,6 +734,7 @@ export declare type RemoveActionProperties = {
|
|
|
415
734
|
readonly actionName: string;
|
|
416
735
|
readonly linkId?: string | undefined;
|
|
417
736
|
readonly removeAction?: string | undefined;
|
|
737
|
+
readonly removeId?: string | undefined;
|
|
418
738
|
readonly removeLabel: string;
|
|
419
739
|
};
|
|
420
740
|
|
|
@@ -440,6 +760,28 @@ export declare function searchName(path: NodePath): string;
|
|
|
440
760
|
|
|
441
761
|
export declare function selectedName(path: NodePath): string;
|
|
442
762
|
|
|
763
|
+
declare type SelectedOptionItem = OptionItem & {
|
|
764
|
+
ariaDescribedBy?: string | undefined;
|
|
765
|
+
errors?: ReactNode;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
declare type SelectInputProperties = {
|
|
769
|
+
options: readonly OptionItem[];
|
|
770
|
+
selectedOption: SelectedOptionItem | undefined;
|
|
771
|
+
searchQuery: string;
|
|
772
|
+
onChange: (token?: string) => void;
|
|
773
|
+
onSearch?: (query: string) => void;
|
|
774
|
+
specifyOtherOption?: OptionItem | undefined;
|
|
775
|
+
customOptionForm?: ReactNode;
|
|
776
|
+
id: string;
|
|
777
|
+
path?: NodePath | undefined;
|
|
778
|
+
ariaLabelledBy: string;
|
|
779
|
+
ariaDescribedBy?: string | undefined;
|
|
780
|
+
disabled?: boolean | undefined;
|
|
781
|
+
isLoading?: boolean | undefined;
|
|
782
|
+
placeholder?: string | undefined;
|
|
783
|
+
};
|
|
784
|
+
|
|
443
785
|
export declare type SelectInputTemplateProperties = Omit<FieldTemplateProperties<SelectInputProperties>, "customOptionForm" | "options" | "selectedOption" | "specifyOtherOption"> & {
|
|
444
786
|
readonly baselineName?: string | undefined;
|
|
445
787
|
readonly baselineValue?: string | undefined;
|
|
@@ -458,22 +800,217 @@ export declare type SelectOptionTemplateItem = TemplateOptionItem & {
|
|
|
458
800
|
readonly selected: boolean;
|
|
459
801
|
};
|
|
460
802
|
|
|
803
|
+
declare type SignatureInputProperties = {
|
|
804
|
+
value: string | undefined;
|
|
805
|
+
id: string;
|
|
806
|
+
path?: NodePath | undefined;
|
|
807
|
+
ariaLabelledBy?: string | undefined;
|
|
808
|
+
ariaDescribedBy?: string | undefined;
|
|
809
|
+
disabled?: boolean | undefined;
|
|
810
|
+
onChange?: ((value?: string) => void) | undefined;
|
|
811
|
+
};
|
|
812
|
+
|
|
461
813
|
export declare type SignatureInputTemplateProperties = FieldTemplateProperties<SignatureInputProperties> & {
|
|
462
814
|
readonly inputValue: string;
|
|
463
815
|
};
|
|
464
816
|
|
|
465
817
|
export declare function signatureName(path: NodePath): string;
|
|
466
818
|
|
|
819
|
+
declare type SliderInputProperties = {
|
|
820
|
+
id: string;
|
|
821
|
+
path?: NodePath | undefined;
|
|
822
|
+
value: number | undefined;
|
|
823
|
+
onChange: (v?: number) => void;
|
|
824
|
+
disabled?: boolean | undefined;
|
|
825
|
+
min?: number | undefined;
|
|
826
|
+
max?: number | undefined;
|
|
827
|
+
step?: number | undefined;
|
|
828
|
+
ariaLabelledBy: string;
|
|
829
|
+
ariaDescribedBy?: string | undefined;
|
|
830
|
+
lowerLabel?: string | undefined;
|
|
831
|
+
upperLabel?: string | undefined;
|
|
832
|
+
unitLabel?: string | undefined;
|
|
833
|
+
};
|
|
834
|
+
|
|
467
835
|
export declare type SliderInputTemplateProperties = FieldTemplateProperties<SliderInputProperties> & NumberInputViewProperties;
|
|
468
836
|
|
|
837
|
+
declare type SpinnerInputProperties = {
|
|
838
|
+
id: string;
|
|
839
|
+
path?: NodePath | undefined;
|
|
840
|
+
value: number | undefined;
|
|
841
|
+
onChange: (v?: number) => void;
|
|
842
|
+
disabled?: boolean | undefined;
|
|
843
|
+
min?: number | undefined;
|
|
844
|
+
max?: number | undefined;
|
|
845
|
+
step?: number | undefined;
|
|
846
|
+
ariaLabelledBy: string;
|
|
847
|
+
ariaDescribedBy?: string | undefined;
|
|
848
|
+
placeholder?: string | undefined;
|
|
849
|
+
unitLabel?: string | undefined;
|
|
850
|
+
};
|
|
851
|
+
|
|
469
852
|
export declare type SpinnerInputTemplateProperties = FieldTemplateProperties<SpinnerInputProperties> & NumberInputViewProperties;
|
|
470
853
|
|
|
854
|
+
export declare function stableId(base: string | undefined, ...parts: Array<string | number | undefined>): string | undefined;
|
|
855
|
+
|
|
856
|
+
declare type StackProperties = {
|
|
857
|
+
children: ReactNode;
|
|
858
|
+
};
|
|
859
|
+
|
|
471
860
|
export declare type StackTemplateProperties = Omit<TemplateBase<StackProperties>, "children"> & {
|
|
472
861
|
readonly children: string;
|
|
473
862
|
};
|
|
474
863
|
|
|
864
|
+
declare type Strings = {
|
|
865
|
+
readonly aria: {
|
|
866
|
+
readonly help: string;
|
|
867
|
+
readonly legal: string;
|
|
868
|
+
readonly flyover: string;
|
|
869
|
+
};
|
|
870
|
+
readonly value: {
|
|
871
|
+
readonly yes: string;
|
|
872
|
+
readonly no: string;
|
|
873
|
+
readonly unanswered: string;
|
|
874
|
+
};
|
|
875
|
+
readonly dialog: {
|
|
876
|
+
readonly cancel: string;
|
|
877
|
+
readonly submit: string;
|
|
878
|
+
};
|
|
879
|
+
readonly form: {
|
|
880
|
+
readonly submit: string;
|
|
881
|
+
readonly cancel: string;
|
|
882
|
+
};
|
|
883
|
+
readonly errors: {
|
|
884
|
+
readonly unknownMessage: string;
|
|
885
|
+
readonly issuesTitle: string;
|
|
886
|
+
readonly issueMessage: PlaceholderString<"message">;
|
|
887
|
+
};
|
|
888
|
+
readonly file: {
|
|
889
|
+
readonly sizeLabel: PlaceholderString<"sizeKb">;
|
|
890
|
+
readonly chooseAction: string;
|
|
891
|
+
readonly changeAction: string;
|
|
892
|
+
readonly replaceAction: string;
|
|
893
|
+
readonly clearAction: string;
|
|
894
|
+
readonly noFileChosen: string;
|
|
895
|
+
};
|
|
896
|
+
readonly group: {
|
|
897
|
+
readonly addSection: string;
|
|
898
|
+
readonly removeSection: string;
|
|
899
|
+
readonly noNodesYet: string;
|
|
900
|
+
};
|
|
901
|
+
readonly gridTable: {
|
|
902
|
+
readonly headerActions: string;
|
|
903
|
+
};
|
|
904
|
+
readonly inputs: {
|
|
905
|
+
readonly referencePlaceholder: string;
|
|
906
|
+
readonly referenceDisplayPlaceholder: string;
|
|
907
|
+
readonly codingSystemPlaceholder: string;
|
|
908
|
+
readonly codingCodePlaceholder: string;
|
|
909
|
+
readonly codingDisplayPlaceholder: string;
|
|
910
|
+
readonly quantityValuePlaceholder: string;
|
|
911
|
+
readonly quantityUnitPlaceholder: string;
|
|
912
|
+
readonly attachmentSelected: string;
|
|
913
|
+
readonly attachmentLabel: string;
|
|
914
|
+
};
|
|
915
|
+
readonly selection: {
|
|
916
|
+
readonly specifyOther: string;
|
|
917
|
+
readonly addAnother: string;
|
|
918
|
+
readonly selectPlaceholder: string;
|
|
919
|
+
readonly removeSelection: string;
|
|
920
|
+
readonly removeCustomValue: string;
|
|
921
|
+
readonly searchPlaceholder: string;
|
|
922
|
+
readonly noOptions: string;
|
|
923
|
+
readonly loadingOptions: string;
|
|
924
|
+
readonly dividerOr: string;
|
|
925
|
+
};
|
|
926
|
+
readonly pagination: {
|
|
927
|
+
readonly navigation: string;
|
|
928
|
+
readonly previous: string;
|
|
929
|
+
readonly next: string;
|
|
930
|
+
readonly pageLabel: PlaceholderString<"page">;
|
|
931
|
+
readonly previousTargetPage: PlaceholderString<"page">;
|
|
932
|
+
readonly nextTargetPage: PlaceholderString<"page">;
|
|
933
|
+
};
|
|
934
|
+
readonly language: {
|
|
935
|
+
readonly label: string;
|
|
936
|
+
readonly placeholder: string;
|
|
937
|
+
};
|
|
938
|
+
readonly table: {
|
|
939
|
+
readonly empty: string;
|
|
940
|
+
readonly noChoiceQuestionsHorizontal: string;
|
|
941
|
+
readonly noChoiceQuestions: string;
|
|
942
|
+
readonly noAnswerOptionsHorizontal: string;
|
|
943
|
+
readonly noAnswerOptions: string;
|
|
944
|
+
};
|
|
945
|
+
readonly collapsible: {
|
|
946
|
+
readonly expand: string;
|
|
947
|
+
readonly collapse: string;
|
|
948
|
+
};
|
|
949
|
+
readonly tab: {
|
|
950
|
+
readonly empty: string;
|
|
951
|
+
readonly scrollLeft: string;
|
|
952
|
+
readonly scrollRight: string;
|
|
953
|
+
};
|
|
954
|
+
readonly signature: {
|
|
955
|
+
readonly sign: string;
|
|
956
|
+
readonly signed: string;
|
|
957
|
+
readonly clearAction: string;
|
|
958
|
+
};
|
|
959
|
+
readonly spinner: {
|
|
960
|
+
readonly decrease: string;
|
|
961
|
+
readonly increase: string;
|
|
962
|
+
};
|
|
963
|
+
readonly unsupported: {
|
|
964
|
+
readonly itemType: PlaceholderString<"type">;
|
|
965
|
+
};
|
|
966
|
+
readonly validation: {
|
|
967
|
+
readonly group: {
|
|
968
|
+
readonly atLeastOneAnswer: string;
|
|
969
|
+
};
|
|
970
|
+
readonly groupList: {
|
|
971
|
+
readonly minOccurs: PlaceholderString<"minOccurs">;
|
|
972
|
+
readonly maxOccurs: PlaceholderString<"maxOccurs">;
|
|
973
|
+
};
|
|
974
|
+
readonly question: {
|
|
975
|
+
readonly minOccursSingle: string;
|
|
976
|
+
readonly minOccursMultiple: PlaceholderString<"minOccurs">;
|
|
977
|
+
readonly maxOccurs: PlaceholderString<"maxOccurs">;
|
|
978
|
+
};
|
|
979
|
+
readonly signature: {
|
|
980
|
+
readonly required: string;
|
|
981
|
+
};
|
|
982
|
+
readonly answer: {
|
|
983
|
+
readonly minLength: PlaceholderString<"minLength">;
|
|
984
|
+
readonly maxLength: PlaceholderString<"maxLength">;
|
|
985
|
+
readonly minPrecision: PlaceholderString<"minLength">;
|
|
986
|
+
readonly maxPrecision: PlaceholderString<"maxLength">;
|
|
987
|
+
readonly blank: string;
|
|
988
|
+
readonly valueNotEarlier: PlaceholderString<"formatted">;
|
|
989
|
+
readonly valueNotLater: PlaceholderString<"formatted">;
|
|
990
|
+
readonly valueMin: PlaceholderString<"formatted">;
|
|
991
|
+
readonly valueMax: PlaceholderString<"formatted">;
|
|
992
|
+
readonly valueDecimalPlaces: PlaceholderString<"maxPlaces">;
|
|
993
|
+
readonly quantityMin: PlaceholderString<"formatted">;
|
|
994
|
+
readonly quantityMax: PlaceholderString<"formatted">;
|
|
995
|
+
readonly attachmentTypeMissing: PlaceholderString<"allowed">;
|
|
996
|
+
readonly attachmentTypeNotAllowed: PlaceholderString<"allowed">;
|
|
997
|
+
readonly attachmentSizeMax: PlaceholderString<"maxSize">;
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
|
|
475
1002
|
export declare const SUBMIT_ATTEMPTED_FIELD = "fb[submitAttempted]";
|
|
476
1003
|
|
|
1004
|
+
declare type TabContainerProperties = {
|
|
1005
|
+
path?: NodePath | undefined;
|
|
1006
|
+
header?: ReactNode;
|
|
1007
|
+
items: TabItem[];
|
|
1008
|
+
value: number;
|
|
1009
|
+
onChange: (index: number) => void;
|
|
1010
|
+
errors?: ReactNode;
|
|
1011
|
+
linkId: string;
|
|
1012
|
+
};
|
|
1013
|
+
|
|
477
1014
|
export declare type TabContainerTemplateProperties = Omit<TemplateBase<TabContainerProperties>, "errors" | "header" | "items"> & {
|
|
478
1015
|
readonly header?: string | undefined;
|
|
479
1016
|
readonly errors?: string | undefined;
|
|
@@ -483,9 +1020,46 @@ export declare type TabContainerTemplateProperties = Omit<TemplateBase<TabContai
|
|
|
483
1020
|
readonly tabName?: string | undefined;
|
|
484
1021
|
};
|
|
485
1022
|
|
|
1023
|
+
declare type TabItem = {
|
|
1024
|
+
token: string;
|
|
1025
|
+
label: ReactNode;
|
|
1026
|
+
buttonId: string;
|
|
1027
|
+
panelId: string;
|
|
1028
|
+
content: ReactNode;
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
declare type TableCell = {
|
|
1032
|
+
token: string;
|
|
1033
|
+
content?: ReactNode;
|
|
1034
|
+
};
|
|
1035
|
+
|
|
1036
|
+
declare type TableColumn = {
|
|
1037
|
+
token: string;
|
|
1038
|
+
content: ReactNode;
|
|
1039
|
+
width?: string | undefined;
|
|
1040
|
+
errors?: ReactNode | undefined;
|
|
1041
|
+
isLoading?: boolean | undefined;
|
|
1042
|
+
};
|
|
1043
|
+
|
|
486
1044
|
export declare function tableColumn(column: TableColumn, renderHtml: RenderHtml): TemplateTableColumn;
|
|
487
1045
|
|
|
488
|
-
|
|
1046
|
+
declare type TableProperties = {
|
|
1047
|
+
columns: TableColumn[];
|
|
1048
|
+
rows: TableRow[];
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
declare type TableRow = {
|
|
1052
|
+
token: string;
|
|
1053
|
+
path?: NodePath | undefined;
|
|
1054
|
+
content?: ReactNode | undefined;
|
|
1055
|
+
errors?: ReactNode | undefined;
|
|
1056
|
+
isLoading?: boolean | undefined;
|
|
1057
|
+
cells: TableCell[];
|
|
1058
|
+
onRemove?: (() => void) | undefined;
|
|
1059
|
+
canRemove?: boolean | undefined;
|
|
1060
|
+
};
|
|
1061
|
+
|
|
1062
|
+
export declare function tableRow(row: TableRow, renderHtml: RenderHtml, strings: Strings, token: string): TemplateTableRow;
|
|
489
1063
|
|
|
490
1064
|
export declare type TableTemplateProperties = Omit<TemplateBase<TableProperties>, "columns" | "rows"> & {
|
|
491
1065
|
readonly hasRowHeader: boolean;
|
|
@@ -508,7 +1082,9 @@ export declare interface TemplateFieldAttributes {
|
|
|
508
1082
|
}
|
|
509
1083
|
|
|
510
1084
|
export declare type TemplateFormPagination = Omit<FormPagination, "onNext" | "onPrev"> & {
|
|
1085
|
+
readonly nextId?: string | undefined;
|
|
511
1086
|
readonly nextLabel: string;
|
|
1087
|
+
readonly previousId?: string | undefined;
|
|
512
1088
|
readonly previousLabel: string;
|
|
513
1089
|
};
|
|
514
1090
|
|
|
@@ -600,12 +1176,54 @@ export declare type TemplateTableRow = Omit<TableRow, "cells" | "content" | "err
|
|
|
600
1176
|
readonly removeLabelHtml: string;
|
|
601
1177
|
} & RemoveActionProperties;
|
|
602
1178
|
|
|
1179
|
+
declare type TextAreaProperties = {
|
|
1180
|
+
id: string;
|
|
1181
|
+
path?: NodePath | undefined;
|
|
1182
|
+
value: string;
|
|
1183
|
+
onChange: (v: string) => void;
|
|
1184
|
+
disabled?: boolean | undefined;
|
|
1185
|
+
placeholder?: string | undefined;
|
|
1186
|
+
ariaLabelledBy: string;
|
|
1187
|
+
ariaDescribedBy?: string | undefined;
|
|
1188
|
+
inputMode?: HTMLAttributes<Element>["inputMode"] | undefined;
|
|
1189
|
+
minLength?: number | undefined;
|
|
1190
|
+
maxLength?: number | undefined;
|
|
1191
|
+
};
|
|
1192
|
+
|
|
603
1193
|
export declare type TextAreaTemplateProperties = FieldTemplateProperties<TextAreaProperties>;
|
|
604
1194
|
|
|
1195
|
+
declare type TextInputProperties = {
|
|
1196
|
+
id: string;
|
|
1197
|
+
path?: NodePath | undefined;
|
|
1198
|
+
type?: string | undefined;
|
|
1199
|
+
value: string;
|
|
1200
|
+
onChange: (v: string) => void;
|
|
1201
|
+
disabled?: boolean | undefined;
|
|
1202
|
+
placeholder?: string | undefined;
|
|
1203
|
+
ariaLabelledBy: string;
|
|
1204
|
+
ariaDescribedBy?: string | undefined;
|
|
1205
|
+
inputMode?: HTMLAttributes<Element>["inputMode"] | undefined;
|
|
1206
|
+
minLength?: number | undefined;
|
|
1207
|
+
maxLength?: number | undefined;
|
|
1208
|
+
};
|
|
1209
|
+
|
|
605
1210
|
export declare type TextInputTemplateProperties = FieldTemplateProperties<TextInputProperties> & {
|
|
606
1211
|
readonly inputType: string;
|
|
607
1212
|
};
|
|
608
1213
|
|
|
1214
|
+
declare type TimeInputProperties = {
|
|
1215
|
+
id: string;
|
|
1216
|
+
path?: NodePath | undefined;
|
|
1217
|
+
value: string;
|
|
1218
|
+
onChange: (v: string) => void;
|
|
1219
|
+
disabled?: boolean | undefined;
|
|
1220
|
+
placeholder?: string | undefined;
|
|
1221
|
+
ariaLabelledBy: string;
|
|
1222
|
+
ariaDescribedBy?: string | undefined;
|
|
1223
|
+
min?: string | undefined;
|
|
1224
|
+
max?: string | undefined;
|
|
1225
|
+
};
|
|
1226
|
+
|
|
609
1227
|
export declare type TimeInputTemplateProperties = FieldTemplateProperties<TimeInputProperties>;
|
|
610
1228
|
|
|
611
1229
|
export declare function unitValueName(path: NodePath, token: string): string;
|