@wix/form-public 0.54.0 → 0.56.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/_tsup-dts-rollup.d.cts +122 -1692
- package/dist/_tsup-dts-rollup.d.ts +122 -1692
- package/dist/index.cjs +560 -255
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +561 -257
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,428 +1,46 @@
|
|
|
1
1
|
import { ErrorType } from '@wix/ambassador-forms-v1-validation-result/types';
|
|
2
2
|
import { Form } from '@wix/ambassador-forms-v4-form/types';
|
|
3
|
-
import { FormFields } from '@wix/form-fields';
|
|
4
3
|
import type { i18n } from '@wix/fe-essentials/i18n';
|
|
5
4
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
6
5
|
import { Layout } from '@wix/form-fields';
|
|
6
|
+
import { PublicAppointmentProps } from '@wix/form-fields';
|
|
7
|
+
import { PublicCheckboxGroupProps } from '@wix/form-fields';
|
|
8
|
+
import { PublicCheckboxProps } from '@wix/form-fields';
|
|
9
|
+
import { PublicDateInputProps } from '@wix/form-fields';
|
|
10
|
+
import { PublicDatePickerProps } from '@wix/form-fields';
|
|
11
|
+
import { PublicDateTimeInputProps } from '@wix/form-fields';
|
|
12
|
+
import { PublicDonationProps } from '@wix/form-fields';
|
|
13
|
+
import { PublicDropdownProps } from '@wix/form-fields';
|
|
14
|
+
import { PublicFieldsProps } from '@wix/form-fields';
|
|
15
|
+
import { PublicFileUploadProps } from '@wix/form-fields';
|
|
16
|
+
import { PublicFixedPaymentProps } from '@wix/form-fields';
|
|
17
|
+
import { PublicImageChoiceProps } from '@wix/form-fields';
|
|
18
|
+
import { PublicMultilineAddressProps } from '@wix/form-fields';
|
|
19
|
+
import { PublicNumberInputProps } from '@wix/form-fields';
|
|
20
|
+
import { PublicPaymentInputProps } from '@wix/form-fields';
|
|
21
|
+
import { PublicPhoneInputProps } from '@wix/form-fields';
|
|
22
|
+
import { PublicProductListProps } from '@wix/form-fields';
|
|
23
|
+
import { PublicRadioGroupProps } from '@wix/form-fields';
|
|
24
|
+
import { PublicRatingInputProps } from '@wix/form-fields';
|
|
25
|
+
import { PublicRichTextProps } from '@wix/form-fields';
|
|
26
|
+
import { PublicSignatureProps } from '@wix/form-fields';
|
|
27
|
+
import { PublicSubmitButtonProps } from '@wix/form-fields';
|
|
28
|
+
import { PublicTagsProps } from '@wix/form-fields';
|
|
29
|
+
import { PublicTextAreaProps } from '@wix/form-fields';
|
|
30
|
+
import { PublicTextInputProps } from '@wix/form-fields';
|
|
31
|
+
import { PublicTimeInputProps } from '@wix/form-fields';
|
|
7
32
|
import { default as React_2 } from 'react';
|
|
8
33
|
import { ReactElement } from 'react';
|
|
9
34
|
import { requests } from '@wix/ambassador-forms-v4-submission/build/cjs/proto/client/proto-generated';
|
|
10
|
-
import { RichContent } from '@wix/ricos';
|
|
11
35
|
import { FieldType as SchemaFieldType } from '@wix/form-fields';
|
|
36
|
+
import { useFieldProps } from '@wix/form-fields';
|
|
12
37
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Props for appointment field.
|
|
17
|
-
* Field allows users to select a date and time for an appointment.
|
|
18
|
-
* Used with fieldMap key: APPOINTMENT
|
|
19
|
-
*
|
|
20
|
-
* @interface AppointmentProps
|
|
21
|
-
*
|
|
22
|
-
* @property {string} id - The unique identifier for the form field
|
|
23
|
-
* @property {string | null | undefined} value - The current value of the form field (ISO datetime string format: YYYY-MM-DDTHH:mm)
|
|
24
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
25
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
26
|
-
* @property {string} label - The display label for the form field
|
|
27
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
28
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
29
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
30
|
-
* @property {function} onChange - Callback function called when the appointment value changes
|
|
31
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
32
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```tsx
|
|
36
|
-
* const appointmentField: AppointmentProps = {
|
|
37
|
-
* id: 'appointment',
|
|
38
|
-
* value: '2024-12-25T14:30',
|
|
39
|
-
* required: true,
|
|
40
|
-
* readOnly: false,
|
|
41
|
-
* label: 'Appointment Date & Time',
|
|
42
|
-
* showLabel: true,
|
|
43
|
-
* description: { nodes: [{ type: 'text', text: 'Choose your preferred appointment time' }] },
|
|
44
|
-
* onChange: (value) => console.log('Appointment changed:', value),
|
|
45
|
-
* onBlur: () => console.log('Field blurred'),
|
|
46
|
-
* onFocus: () => console.log('Field focused')
|
|
47
|
-
* };
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
declare interface AppointmentProps extends BaseFieldProps {
|
|
51
|
-
value: string | null | undefined;
|
|
52
|
-
label: string;
|
|
53
|
-
showLabel: boolean;
|
|
54
|
-
description?: RichContent;
|
|
55
|
-
}
|
|
56
|
-
export { AppointmentProps }
|
|
57
|
-
export { AppointmentProps as AppointmentProps_alias_1 }
|
|
58
|
-
|
|
59
|
-
export declare interface AppointmentSubmitData {
|
|
38
|
+
declare interface AppointmentSubmitData {
|
|
60
39
|
startDate: string;
|
|
61
40
|
endDate: string;
|
|
62
41
|
timeZone: string;
|
|
63
42
|
}
|
|
64
43
|
|
|
65
|
-
declare interface BaseCheckboxProps extends BaseFieldProps {
|
|
66
|
-
value: boolean;
|
|
67
|
-
label: RichContent;
|
|
68
|
-
defaultValue: boolean;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare interface BaseFieldProps {
|
|
72
|
-
id: string;
|
|
73
|
-
required: boolean;
|
|
74
|
-
readOnly: boolean;
|
|
75
|
-
hasError: boolean;
|
|
76
|
-
errorMessage: string | undefined;
|
|
77
|
-
onChange: (value: unknown) => void;
|
|
78
|
-
onBlur: () => void;
|
|
79
|
-
onFocus: () => void;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export declare const BaseMapper: PropsMapper;
|
|
83
|
-
|
|
84
|
-
declare interface BaseTextFieldProps extends BaseFieldProps {
|
|
85
|
-
value: string | null | undefined;
|
|
86
|
-
label: string;
|
|
87
|
-
showLabel: boolean;
|
|
88
|
-
placeholder?: string;
|
|
89
|
-
description?: RichContent;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
declare const CALLING_COUNTRY_CODES: {
|
|
93
|
-
readonly AW: "ABW";
|
|
94
|
-
readonly AO: "AGO";
|
|
95
|
-
readonly AF: "AFG";
|
|
96
|
-
readonly AI: "AIA";
|
|
97
|
-
readonly AX: "ALA";
|
|
98
|
-
readonly AL: "ALB";
|
|
99
|
-
readonly AD: "AND";
|
|
100
|
-
readonly AE: "ARE";
|
|
101
|
-
readonly AR: "ARG";
|
|
102
|
-
readonly AM: "ARM";
|
|
103
|
-
readonly AS: "ASM";
|
|
104
|
-
readonly AG: "ATG";
|
|
105
|
-
readonly AU: "AUS";
|
|
106
|
-
readonly AT: "AUT";
|
|
107
|
-
readonly AZ: "AZE";
|
|
108
|
-
readonly BI: "BDI";
|
|
109
|
-
readonly BE: "BEL";
|
|
110
|
-
readonly BJ: "BEN";
|
|
111
|
-
readonly BQ: "BES";
|
|
112
|
-
readonly BF: "BFA";
|
|
113
|
-
readonly BD: "BGD";
|
|
114
|
-
readonly BG: "BGR";
|
|
115
|
-
readonly BH: "BHR";
|
|
116
|
-
readonly BS: "BHS";
|
|
117
|
-
readonly BA: "BIH";
|
|
118
|
-
readonly BL: "BLM";
|
|
119
|
-
readonly BY: "BLR";
|
|
120
|
-
readonly BZ: "BLZ";
|
|
121
|
-
readonly BM: "BMU";
|
|
122
|
-
readonly BO: "BOL";
|
|
123
|
-
readonly BR: "BRA";
|
|
124
|
-
readonly BB: "BRB";
|
|
125
|
-
readonly BN: "BRN";
|
|
126
|
-
readonly BT: "BTN";
|
|
127
|
-
readonly BW: "BWA";
|
|
128
|
-
readonly CF: "CAF";
|
|
129
|
-
readonly CA: "CAN";
|
|
130
|
-
readonly CC: "CCK";
|
|
131
|
-
readonly CH: "CHE";
|
|
132
|
-
readonly CL: "CHL";
|
|
133
|
-
readonly CN: "CHN";
|
|
134
|
-
readonly CI: "CIV";
|
|
135
|
-
readonly CM: "CMR";
|
|
136
|
-
readonly CD: "COD";
|
|
137
|
-
readonly CG: "COG";
|
|
138
|
-
readonly CK: "COK";
|
|
139
|
-
readonly CO: "COL";
|
|
140
|
-
readonly KM: "COM";
|
|
141
|
-
readonly CV: "CPV";
|
|
142
|
-
readonly CR: "CRI";
|
|
143
|
-
readonly CW: "CUW";
|
|
144
|
-
readonly CX: "CXR";
|
|
145
|
-
readonly KY: "CYM";
|
|
146
|
-
readonly CY: "CYP";
|
|
147
|
-
readonly CZ: "CZE";
|
|
148
|
-
readonly DE: "DEU";
|
|
149
|
-
readonly DJ: "DJI";
|
|
150
|
-
readonly DM: "DMA";
|
|
151
|
-
readonly DK: "DNK";
|
|
152
|
-
readonly DO: "DOM";
|
|
153
|
-
readonly DZ: "DZA";
|
|
154
|
-
readonly EC: "ECU";
|
|
155
|
-
readonly EG: "EGY";
|
|
156
|
-
readonly ER: "ERI";
|
|
157
|
-
readonly ES: "ESP";
|
|
158
|
-
readonly EE: "EST";
|
|
159
|
-
readonly ET: "ETH";
|
|
160
|
-
readonly FI: "FIN";
|
|
161
|
-
readonly FJ: "FJI";
|
|
162
|
-
readonly FK: "FLK";
|
|
163
|
-
readonly FR: "FRA";
|
|
164
|
-
readonly FO: "FRO";
|
|
165
|
-
readonly FM: "FSM";
|
|
166
|
-
readonly GA: "GAB";
|
|
167
|
-
readonly GB: "GBR";
|
|
168
|
-
readonly GE: "GEO";
|
|
169
|
-
readonly GG: "GGY";
|
|
170
|
-
readonly GH: "GHA";
|
|
171
|
-
readonly GI: "GIB";
|
|
172
|
-
readonly GN: "GIN";
|
|
173
|
-
readonly GP: "GLP";
|
|
174
|
-
readonly GM: "GMB";
|
|
175
|
-
readonly GW: "GNB";
|
|
176
|
-
readonly GQ: "GNQ";
|
|
177
|
-
readonly GR: "GRC";
|
|
178
|
-
readonly GD: "GRD";
|
|
179
|
-
readonly GL: "GRL";
|
|
180
|
-
readonly GT: "GTM";
|
|
181
|
-
readonly GF: "GUF";
|
|
182
|
-
readonly GU: "GUM";
|
|
183
|
-
readonly GY: "GUY";
|
|
184
|
-
readonly HK: "HKG";
|
|
185
|
-
readonly HN: "HND";
|
|
186
|
-
readonly HR: "HRV";
|
|
187
|
-
readonly HT: "HTI";
|
|
188
|
-
readonly HU: "HUN";
|
|
189
|
-
readonly ID: "IDN";
|
|
190
|
-
readonly IM: "IMN";
|
|
191
|
-
readonly IN: "IND";
|
|
192
|
-
readonly IO: "IOT";
|
|
193
|
-
readonly IE: "IRL";
|
|
194
|
-
readonly IS: "ISL";
|
|
195
|
-
readonly IL: "ISR";
|
|
196
|
-
readonly IT: "ITA";
|
|
197
|
-
readonly IQ: "IRQ";
|
|
198
|
-
readonly JM: "JAM";
|
|
199
|
-
readonly JE: "JEY";
|
|
200
|
-
readonly JO: "JOR";
|
|
201
|
-
readonly JP: "JPN";
|
|
202
|
-
readonly KZ: "KAZ";
|
|
203
|
-
readonly KE: "KEN";
|
|
204
|
-
readonly KG: "KGZ";
|
|
205
|
-
readonly KH: "KHM";
|
|
206
|
-
readonly KI: "KIR";
|
|
207
|
-
readonly KN: "KNA";
|
|
208
|
-
readonly KR: "KOR";
|
|
209
|
-
readonly KW: "KWT";
|
|
210
|
-
readonly LA: "LAO";
|
|
211
|
-
readonly LB: "LBN";
|
|
212
|
-
readonly LR: "LBR";
|
|
213
|
-
readonly LY: "LBY";
|
|
214
|
-
readonly LC: "LCA";
|
|
215
|
-
readonly LI: "LIE";
|
|
216
|
-
readonly LK: "LKA";
|
|
217
|
-
readonly LS: "LSO";
|
|
218
|
-
readonly LT: "LTU";
|
|
219
|
-
readonly LU: "LUX";
|
|
220
|
-
readonly LV: "LVA";
|
|
221
|
-
readonly MO: "MAC";
|
|
222
|
-
readonly MF: "MAF";
|
|
223
|
-
readonly MA: "MAR";
|
|
224
|
-
readonly MC: "MCO";
|
|
225
|
-
readonly MD: "MDA";
|
|
226
|
-
readonly MG: "MDG";
|
|
227
|
-
readonly MV: "MDV";
|
|
228
|
-
readonly MX: "MEX";
|
|
229
|
-
readonly MH: "MHL";
|
|
230
|
-
readonly MK: "MKD";
|
|
231
|
-
readonly ML: "MLI";
|
|
232
|
-
readonly MT: "MLT";
|
|
233
|
-
readonly MM: "MMR";
|
|
234
|
-
readonly ME: "MNE";
|
|
235
|
-
readonly MN: "MNG";
|
|
236
|
-
readonly MP: "MNP";
|
|
237
|
-
readonly MZ: "MOZ";
|
|
238
|
-
readonly MR: "MRT";
|
|
239
|
-
readonly MS: "MSR";
|
|
240
|
-
readonly MQ: "MTQ";
|
|
241
|
-
readonly MU: "MUS";
|
|
242
|
-
readonly MW: "MWI";
|
|
243
|
-
readonly MY: "MYS";
|
|
244
|
-
readonly YT: "MYT";
|
|
245
|
-
readonly NA: "NAM";
|
|
246
|
-
readonly NC: "NCL";
|
|
247
|
-
readonly NE: "NER";
|
|
248
|
-
readonly NF: "NFK";
|
|
249
|
-
readonly NG: "NGA";
|
|
250
|
-
readonly NI: "NIC";
|
|
251
|
-
readonly NU: "NIU";
|
|
252
|
-
readonly NL: "NLD";
|
|
253
|
-
readonly NO: "NOR";
|
|
254
|
-
readonly NP: "NPL";
|
|
255
|
-
readonly NR: "NRU";
|
|
256
|
-
readonly NZ: "NZL";
|
|
257
|
-
readonly OM: "OMN";
|
|
258
|
-
readonly PK: "PAK";
|
|
259
|
-
readonly PA: "PAN";
|
|
260
|
-
readonly PE: "PER";
|
|
261
|
-
readonly PH: "PHL";
|
|
262
|
-
readonly PW: "PLW";
|
|
263
|
-
readonly PG: "PNG";
|
|
264
|
-
readonly PL: "POL";
|
|
265
|
-
readonly PR: "PRI";
|
|
266
|
-
readonly PT: "PRT";
|
|
267
|
-
readonly PY: "PRY";
|
|
268
|
-
readonly PS: "PSE";
|
|
269
|
-
readonly PF: "PYF";
|
|
270
|
-
readonly QA: "QAT";
|
|
271
|
-
readonly RE: "REU";
|
|
272
|
-
readonly RO: "ROU";
|
|
273
|
-
readonly RU: "RUS";
|
|
274
|
-
readonly RW: "RWA";
|
|
275
|
-
readonly SA: "SAU";
|
|
276
|
-
readonly SD: "SDN";
|
|
277
|
-
readonly SN: "SEN";
|
|
278
|
-
readonly SG: "SGP";
|
|
279
|
-
readonly SH: "SHN";
|
|
280
|
-
readonly SJ: "SJM";
|
|
281
|
-
readonly SB: "SLB";
|
|
282
|
-
readonly SL: "SLE";
|
|
283
|
-
readonly SV: "SLV";
|
|
284
|
-
readonly SM: "SMR";
|
|
285
|
-
readonly SO: "SOM";
|
|
286
|
-
readonly PM: "SPM";
|
|
287
|
-
readonly RS: "SRB";
|
|
288
|
-
readonly SS: "SSD";
|
|
289
|
-
readonly ST: "STP";
|
|
290
|
-
readonly SR: "SUR";
|
|
291
|
-
readonly SK: "SVK";
|
|
292
|
-
readonly SI: "SVN";
|
|
293
|
-
readonly SE: "SWE";
|
|
294
|
-
readonly SZ: "SWZ";
|
|
295
|
-
readonly SX: "SXM";
|
|
296
|
-
readonly SC: "SYC";
|
|
297
|
-
readonly TC: "TCA";
|
|
298
|
-
readonly TD: "TCD";
|
|
299
|
-
readonly TG: "TGO";
|
|
300
|
-
readonly TH: "THA";
|
|
301
|
-
readonly TJ: "TJK";
|
|
302
|
-
readonly TK: "TKL";
|
|
303
|
-
readonly TM: "TKM";
|
|
304
|
-
readonly TL: "TLS";
|
|
305
|
-
readonly TO: "TON";
|
|
306
|
-
readonly TT: "TTO";
|
|
307
|
-
readonly TN: "TUN";
|
|
308
|
-
readonly TR: "TUR";
|
|
309
|
-
readonly TV: "TUV";
|
|
310
|
-
readonly TW: "TWN";
|
|
311
|
-
readonly TZ: "TZA";
|
|
312
|
-
readonly UG: "UGA";
|
|
313
|
-
readonly UA: "UKR";
|
|
314
|
-
readonly UY: "URY";
|
|
315
|
-
readonly US: "USA";
|
|
316
|
-
readonly UZ: "UZB";
|
|
317
|
-
readonly VA: "VAT";
|
|
318
|
-
readonly VC: "VCT";
|
|
319
|
-
readonly VE: "VEN";
|
|
320
|
-
readonly VG: "VGB";
|
|
321
|
-
readonly VI: "VIR";
|
|
322
|
-
readonly VN: "VNM";
|
|
323
|
-
readonly VU: "VUT";
|
|
324
|
-
readonly WF: "WLF";
|
|
325
|
-
readonly WS: "WSM";
|
|
326
|
-
readonly XK: "KOS";
|
|
327
|
-
readonly YE: "YEM";
|
|
328
|
-
readonly ZA: "ZAF";
|
|
329
|
-
readonly ZM: "ZMB";
|
|
330
|
-
readonly ZW: "ZWE";
|
|
331
|
-
};
|
|
332
|
-
|
|
333
|
-
declare type CallingCountryCode = keyof typeof CALLING_COUNTRY_CODES;
|
|
334
|
-
export { CallingCountryCode }
|
|
335
|
-
export { CallingCountryCode as CallingCountryCode_alias_1 }
|
|
336
|
-
|
|
337
|
-
export declare const CheckboxGroupMapper: PropsMapper;
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Props for checkbox group field.
|
|
341
|
-
* Field allows to choose multiple options from a list.
|
|
342
|
-
* Used with fieldMap key: CHECKBOX_GROUP
|
|
343
|
-
*
|
|
344
|
-
* @interface CheckboxGroupProps
|
|
345
|
-
*
|
|
346
|
-
* @property {string} id - The unique identifier for the form field
|
|
347
|
-
* @property {string[] | null | undefined} value - The current values of the checkbox group (array of selected option values)
|
|
348
|
-
* @property {string} label - The display label for the form field
|
|
349
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
350
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
351
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
352
|
-
* @property {ChoiceOption[]} options - Array of checkbox options with id, value, label, and default properties
|
|
353
|
-
* @property {1 | 2 | 3} numberOfColumns - Number of columns for layout (1, 2, or 3)
|
|
354
|
-
* @property {Object} customOption - Configuration for custom "Other" option with text input
|
|
355
|
-
* @property {string} customOption.label - Label for the custom option checkbox
|
|
356
|
-
* @property {string} customOption.placeholder - Placeholder text for the custom option input
|
|
357
|
-
* @property {number} [minItems] - Minimum number of items that must be selected
|
|
358
|
-
* @property {number} [maxItems] - Maximum number of items that can be selected
|
|
359
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
360
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
361
|
-
* @property {function} onChange - Callback function called when the checkbox group values change
|
|
362
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
363
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
364
|
-
*/
|
|
365
|
-
declare interface CheckboxGroupProps extends BaseFieldProps {
|
|
366
|
-
value: string[] | null | undefined;
|
|
367
|
-
label: string;
|
|
368
|
-
showLabel: boolean;
|
|
369
|
-
options: ChoiceOption[];
|
|
370
|
-
description?: RichContent;
|
|
371
|
-
numberOfColumns: 1 | 2 | 3;
|
|
372
|
-
customOption: CustomOption;
|
|
373
|
-
maxItems?: number;
|
|
374
|
-
minItems?: number;
|
|
375
|
-
}
|
|
376
|
-
export { CheckboxGroupProps }
|
|
377
|
-
export { CheckboxGroupProps as CheckboxGroupProps_alias_1 }
|
|
378
|
-
|
|
379
|
-
export declare const CheckboxMapper: PropsMapper;
|
|
380
|
-
|
|
381
|
-
/**
|
|
382
|
-
* Props for checkbox field.
|
|
383
|
-
* Field allows to collect a boolean answer.
|
|
384
|
-
* Used with fieldMap key: CHECKBOX
|
|
385
|
-
*
|
|
386
|
-
* @interface CheckboxProps
|
|
387
|
-
*
|
|
388
|
-
* @property {string} id - The unique identifier for the form field
|
|
389
|
-
* @property {boolean} value - The current value of the form field
|
|
390
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
391
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
392
|
-
* @property {RichContent} label - The display label for the form field
|
|
393
|
-
* @property {boolean} defaultValue - The default checked state for the checkbox
|
|
394
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
395
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
396
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
397
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
398
|
-
*
|
|
399
|
-
* @example
|
|
400
|
-
* ```tsx
|
|
401
|
-
* const checkboxField: CheckboxProps = {
|
|
402
|
-
* id: 'agree',
|
|
403
|
-
* value: true,
|
|
404
|
-
* required: true,
|
|
405
|
-
* readOnly: false,
|
|
406
|
-
* label: { nodes: [{ type: 'text', text: 'I agree to the terms and conditions' }] },
|
|
407
|
-
* defaultValue: false,
|
|
408
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
409
|
-
* onBlur: () => console.log('Field blurred'),
|
|
410
|
-
* onFocus: () => console.log('Field focused')
|
|
411
|
-
* };
|
|
412
|
-
* ```
|
|
413
|
-
*/
|
|
414
|
-
declare interface CheckboxProps extends BaseCheckboxProps {
|
|
415
|
-
}
|
|
416
|
-
export { CheckboxProps }
|
|
417
|
-
export { CheckboxProps as CheckboxProps_alias_1 }
|
|
418
|
-
|
|
419
|
-
declare interface ChoiceOption {
|
|
420
|
-
id: string;
|
|
421
|
-
value: string;
|
|
422
|
-
label: string;
|
|
423
|
-
default: boolean;
|
|
424
|
-
}
|
|
425
|
-
|
|
426
44
|
export declare function createI18n(locale: string): Promise<i18n>;
|
|
427
45
|
|
|
428
46
|
declare type Currency = {
|
|
@@ -432,431 +50,39 @@ declare type Currency = {
|
|
|
432
50
|
export { Currency }
|
|
433
51
|
export { Currency as Currency_alias_1 }
|
|
434
52
|
|
|
435
|
-
declare interface CustomOption {
|
|
436
|
-
label: string;
|
|
437
|
-
placeholder: string;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
export declare const DateInputMapper: PropsMapper;
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Props for date input field.
|
|
444
|
-
* Used with fieldMap key: DATE_INPUT
|
|
445
|
-
* The field MUST render 3 separate number inputs on the UI for day, month and year.
|
|
446
|
-
*
|
|
447
|
-
* @interface DateInputProps
|
|
448
|
-
*
|
|
449
|
-
* @property {string} id - The unique identifier for the form field
|
|
450
|
-
* @property {string | null | undefined} value - The current value of the form field (ISO date string format: YYYY-MM-DD)
|
|
451
|
-
* @property {string} label - The display label for the form field
|
|
452
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
453
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
454
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
455
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
456
|
-
* @property {boolean} showPlaceholder - Whether to show placeholder text for the date inputs
|
|
457
|
-
* @property {'SUNDAY' | 'MONDAY'} [firstDayOfWeek] - The first day of the week for date calculations (defaults to 'SUNDAY')
|
|
458
|
-
* @property {'all' | 'past' | 'future'} [acceptedDates] - Which dates are accepted for selection (defaults to 'all')
|
|
459
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
460
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
461
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
462
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
463
|
-
*
|
|
464
|
-
* @example
|
|
465
|
-
* ```tsx
|
|
466
|
-
* const dateField: DateInputProps = {
|
|
467
|
-
* id: 'event-date',
|
|
468
|
-
* value: '2024-12-25',
|
|
469
|
-
* label: 'Event Date',
|
|
470
|
-
* required: true,
|
|
471
|
-
* readOnly: false,
|
|
472
|
-
* showLabel: true,
|
|
473
|
-
* showPlaceholder: true,
|
|
474
|
-
* firstDayOfWeek: 'MONDAY',
|
|
475
|
-
* acceptedDates: 'future',
|
|
476
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
477
|
-
* onBlur: () => console.log('Field blurred'),
|
|
478
|
-
* onFocus: () => console.log('Field focused')
|
|
479
|
-
* };
|
|
480
|
-
* ```
|
|
481
|
-
*/
|
|
482
|
-
declare interface DateInputProps extends BaseFieldProps {
|
|
483
|
-
value: string | null | undefined;
|
|
484
|
-
label: string;
|
|
485
|
-
showLabel: boolean;
|
|
486
|
-
showPlaceholder: boolean;
|
|
487
|
-
showDateLabels: boolean;
|
|
488
|
-
acceptedDates: 'all' | 'past' | 'future';
|
|
489
|
-
description?: RichContent;
|
|
490
|
-
}
|
|
491
|
-
export { DateInputProps }
|
|
492
|
-
export { DateInputProps as DateInputProps_alias_1 }
|
|
493
|
-
|
|
494
|
-
export declare const DatePickerMapper: PropsMapper;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Props for date picker field.
|
|
498
|
-
* Field allows to select a date from a calendar.
|
|
499
|
-
* Used with fieldMap key: DATE_PICKER
|
|
500
|
-
*
|
|
501
|
-
* @interface DatePickerProps
|
|
502
|
-
*
|
|
503
|
-
* @property {string} id - The unique identifier for the form field
|
|
504
|
-
* @property {string | null | undefined} value - The current value of the form field (ISO date string format: YYYY-MM-DD)
|
|
505
|
-
* @property {string} label - The display label for the form field
|
|
506
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
507
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
508
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
509
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
510
|
-
* @property {string} [placeholder] - Placeholder text for the date picker input
|
|
511
|
-
* @property {'SUNDAY' | 'MONDAY'} [firstDayOfWeek] - The first day of the week for the calendar (defaults to 'SUNDAY')
|
|
512
|
-
* @property {'all' | 'past' | 'future'} [acceptedDates] - Which dates are accepted for selection (defaults to 'all')
|
|
513
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
514
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
515
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
516
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
517
|
-
*
|
|
518
|
-
* @example
|
|
519
|
-
* ```tsx
|
|
520
|
-
* const dateField: DatePickerProps = {
|
|
521
|
-
* id: 'appointment-date',
|
|
522
|
-
* value: '2024-12-25',
|
|
523
|
-
* label: 'Appointment Date',
|
|
524
|
-
* required: true,
|
|
525
|
-
* readOnly: false,
|
|
526
|
-
* showLabel: true,
|
|
527
|
-
* placeholder: 'Select a date',
|
|
528
|
-
* firstDayOfWeek: 'MONDAY',
|
|
529
|
-
* acceptedDates: 'future',
|
|
530
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
531
|
-
* onBlur: () => console.log('Field blurred'),
|
|
532
|
-
* onFocus: () => console.log('Field focused')
|
|
533
|
-
* };
|
|
534
|
-
* ```
|
|
535
|
-
*/
|
|
536
|
-
declare interface DatePickerProps extends BaseFieldProps {
|
|
537
|
-
value: string | null | undefined;
|
|
538
|
-
label: string;
|
|
539
|
-
showLabel: boolean;
|
|
540
|
-
placeholder?: string;
|
|
541
|
-
firstDayOfWeek?: 'SUNDAY' | 'MONDAY';
|
|
542
|
-
acceptedDates: 'all' | 'past' | 'future';
|
|
543
|
-
description?: RichContent;
|
|
544
|
-
}
|
|
545
|
-
export { DatePickerProps }
|
|
546
|
-
export { DatePickerProps as DatePickerProps_alias_1 }
|
|
547
|
-
|
|
548
|
-
export declare const DateTimeInputMapper: PropsMapper;
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Props for date time input field.
|
|
552
|
-
* Field allows to enter a date and time.
|
|
553
|
-
* Used with fieldMap key: DATE_TIME_INPUT
|
|
554
|
-
*
|
|
555
|
-
* @interface DateTimeInputProps
|
|
556
|
-
*
|
|
557
|
-
* @property {string} id - The unique identifier for the form field
|
|
558
|
-
* @property {string | null | undefined} value - The current value of the form field (ISO datetime string format: YYYY-MM-DDTHH:mm)
|
|
559
|
-
* @property {string} label - The display label for the form field
|
|
560
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
561
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
562
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
563
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
564
|
-
* @property {boolean} showDateLabels - Whether to display individual labels for date and time inputs
|
|
565
|
-
* @property {boolean} showPlaceholder - Whether to show placeholder text in the inputs
|
|
566
|
-
* @property {boolean} use24HourFormat - Whether to use 24-hour format for time input (defaults to true)
|
|
567
|
-
* @property {'all' | 'past' | 'future'} [acceptedDates] - Which dates are accepted for selection (defaults to 'all')
|
|
568
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
569
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
570
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
571
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
572
|
-
*
|
|
573
|
-
* @example
|
|
574
|
-
* ```tsx
|
|
575
|
-
* const dateTimeField: DateTimeInputProps = {
|
|
576
|
-
* id: 'appointment-datetime',
|
|
577
|
-
* value: '2024-12-25T14:30',
|
|
578
|
-
* label: 'Appointment Date & Time',
|
|
579
|
-
* required: true,
|
|
580
|
-
* readOnly: false,
|
|
581
|
-
* showLabel: true,
|
|
582
|
-
* showDateLabels: true,
|
|
583
|
-
* showPlaceholder: true,
|
|
584
|
-
* use24HourFormat: true,
|
|
585
|
-
* acceptedDates: 'future',
|
|
586
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
587
|
-
* onBlur: () => console.log('Field blurred'),
|
|
588
|
-
* onFocus: () => console.log('Field focused')
|
|
589
|
-
* };
|
|
590
|
-
* ```
|
|
591
|
-
*/
|
|
592
|
-
declare interface DateTimeInputProps extends BaseFieldProps {
|
|
593
|
-
value: string | null | undefined;
|
|
594
|
-
label: string;
|
|
595
|
-
showLabel: boolean;
|
|
596
|
-
showDateLabels: boolean;
|
|
597
|
-
showPlaceholder: boolean;
|
|
598
|
-
use24HourFormat: boolean;
|
|
599
|
-
acceptedDates: 'all' | 'past' | 'future';
|
|
600
|
-
description?: RichContent;
|
|
601
|
-
}
|
|
602
|
-
export { DateTimeInputProps }
|
|
603
|
-
export { DateTimeInputProps as DateTimeInputProps_alias_1 }
|
|
604
|
-
|
|
605
|
-
export declare const DonationMapper: PropsMapper;
|
|
606
|
-
|
|
607
|
-
/**
|
|
608
|
-
* Props for donation field.
|
|
609
|
-
* Field allows users to select a donation amount.
|
|
610
|
-
* Used with fieldMap key: DONATION
|
|
611
|
-
*
|
|
612
|
-
* @interface DonationProps
|
|
613
|
-
*
|
|
614
|
-
* @property {string} id - The unique identifier for the form field
|
|
615
|
-
* @property {string | null | undefined} value - The current value of the form field
|
|
616
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
617
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
618
|
-
* @property {string} label - The display label for the form field
|
|
619
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
620
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
621
|
-
* @property {1 | 2 | 3} numberOfColumns - Number of columns for layout (1, 2, or 3)
|
|
622
|
-
* @property {string} currency - The currency symbol (e.g., '$', '€', '£')
|
|
623
|
-
* @property {string[]} options - Array of predefined donation amounts
|
|
624
|
-
* @property {CustomOption} [customOption] - Optional configuration for custom donation amount input
|
|
625
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
626
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
627
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
628
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
629
|
-
*
|
|
630
|
-
* @example
|
|
631
|
-
* ```tsx
|
|
632
|
-
* const donationField: DonationProps = {
|
|
633
|
-
* id: 'donation',
|
|
634
|
-
* value: '50.00',
|
|
635
|
-
* required: false,
|
|
636
|
-
* readOnly: false,
|
|
637
|
-
* label: 'Donation Amount',
|
|
638
|
-
* showLabel: true,
|
|
639
|
-
* description: { nodes: [{ type: 'text', text: 'Choose a donation amount' }] },
|
|
640
|
-
* numberOfColumns: 2,
|
|
641
|
-
* currency: '$',
|
|
642
|
-
* options: ['25.00', '50.00', '100.00', '250.00'],
|
|
643
|
-
* customOption: { label: 'Other Amount', placeholder: 'Enter custom amount' },
|
|
644
|
-
* onChange: (value) => console.log('Donation changed:', value),
|
|
645
|
-
* onBlur: () => console.log('Field blurred'),
|
|
646
|
-
* onFocus: () => console.log('Field focused')
|
|
647
|
-
* };
|
|
648
|
-
* ```
|
|
649
|
-
*/
|
|
650
|
-
declare interface DonationProps extends BaseFieldProps {
|
|
651
|
-
value: string | null | undefined;
|
|
652
|
-
label: string;
|
|
653
|
-
showLabel: boolean;
|
|
654
|
-
description?: RichContent;
|
|
655
|
-
numberOfColumns: 1 | 2 | 3;
|
|
656
|
-
currency: string;
|
|
657
|
-
options: string[];
|
|
658
|
-
customOption?: CustomOption;
|
|
659
|
-
}
|
|
660
|
-
export { DonationProps }
|
|
661
|
-
export { DonationProps as DonationProps_alias_1 }
|
|
662
|
-
|
|
663
|
-
export declare const DropdownMapper: PropsMapper;
|
|
664
|
-
|
|
665
|
-
/**
|
|
666
|
-
* Props for dropdown field.
|
|
667
|
-
* Field allows to choose one option from a dropdown list.
|
|
668
|
-
* Used with fieldMap key: DROPDOWN
|
|
669
|
-
*
|
|
670
|
-
* @interface DropdownProps
|
|
671
|
-
*
|
|
672
|
-
* @property {string} id - The unique identifier for the form field
|
|
673
|
-
* @property {string | null | undefined} value - The current value of the dropdown (selected option value)
|
|
674
|
-
* @property {string} label - The display label for the form field
|
|
675
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
676
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
677
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
678
|
-
* @property {ChoiceOption[]} options - Array of dropdown options with id, value, label, and default properties
|
|
679
|
-
* @property {string} [placeholder] - Placeholder text for the dropdown when no option is selected
|
|
680
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
681
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
682
|
-
* @property {function} onChange - Callback function called when the dropdown value changes
|
|
683
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
684
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
685
|
-
*/
|
|
686
|
-
declare interface DropdownProps extends BaseFieldProps {
|
|
687
|
-
value: string | null | undefined;
|
|
688
|
-
label: string;
|
|
689
|
-
showLabel: boolean;
|
|
690
|
-
options: ChoiceOption[];
|
|
691
|
-
placeholder?: string;
|
|
692
|
-
description?: RichContent;
|
|
693
|
-
}
|
|
694
|
-
export { DropdownProps }
|
|
695
|
-
export { DropdownProps as DropdownProps_alias_1 }
|
|
696
|
-
|
|
697
|
-
export declare const ErrorMapper: PropsMapper;
|
|
698
|
-
|
|
699
|
-
export declare const FIELD_PROP_MAP: FieldMappers;
|
|
700
|
-
|
|
701
53
|
export declare const FIELD_TYPE_MAP: Record<SchemaFieldType, FieldType>;
|
|
702
54
|
|
|
703
55
|
declare type FieldMap = {
|
|
704
|
-
TEXT_INPUT: React.ComponentType<
|
|
705
|
-
TEXT_AREA: React.ComponentType<
|
|
706
|
-
PHONE_INPUT: React.ComponentType<
|
|
707
|
-
MULTILINE_ADDRESS: React.ComponentType<
|
|
708
|
-
DATE_INPUT: React.ComponentType<
|
|
709
|
-
DATE_PICKER: React.ComponentType<
|
|
710
|
-
DATE_TIME_INPUT: React.ComponentType<
|
|
711
|
-
FILE_UPLOAD: React.ComponentType<
|
|
712
|
-
NUMBER_INPUT: React.ComponentType<
|
|
713
|
-
CHECKBOX: React.ComponentType<
|
|
714
|
-
SIGNATURE: React.ComponentType<
|
|
715
|
-
RATING_INPUT: React.ComponentType<
|
|
716
|
-
RADIO_GROUP: React.ComponentType<
|
|
717
|
-
CHECKBOX_GROUP: React.ComponentType<
|
|
718
|
-
DROPDOWN: React.ComponentType<
|
|
719
|
-
TAGS: React.ComponentType<
|
|
720
|
-
TIME_INPUT: React.ComponentType<
|
|
721
|
-
TEXT: React.ComponentType<
|
|
722
|
-
SUBMIT_BUTTON: React.ComponentType<
|
|
723
|
-
PRODUCT_LIST: React.ComponentType<
|
|
724
|
-
FIXED_PAYMENT: React.ComponentType<
|
|
725
|
-
PAYMENT_INPUT: React.ComponentType<
|
|
726
|
-
DONATION: React.ComponentType<
|
|
727
|
-
APPOINTMENT: React.ComponentType<
|
|
728
|
-
IMAGE_CHOICE: React.ComponentType<
|
|
56
|
+
TEXT_INPUT: React.ComponentType<PublicTextInputProps>;
|
|
57
|
+
TEXT_AREA: React.ComponentType<PublicTextAreaProps>;
|
|
58
|
+
PHONE_INPUT: React.ComponentType<PublicPhoneInputProps>;
|
|
59
|
+
MULTILINE_ADDRESS: React.ComponentType<PublicMultilineAddressProps>;
|
|
60
|
+
DATE_INPUT: React.ComponentType<PublicDateInputProps>;
|
|
61
|
+
DATE_PICKER: React.ComponentType<PublicDatePickerProps>;
|
|
62
|
+
DATE_TIME_INPUT: React.ComponentType<PublicDateTimeInputProps>;
|
|
63
|
+
FILE_UPLOAD: React.ComponentType<PublicFileUploadProps>;
|
|
64
|
+
NUMBER_INPUT: React.ComponentType<PublicNumberInputProps>;
|
|
65
|
+
CHECKBOX: React.ComponentType<PublicCheckboxProps>;
|
|
66
|
+
SIGNATURE: React.ComponentType<PublicSignatureProps>;
|
|
67
|
+
RATING_INPUT: React.ComponentType<PublicRatingInputProps>;
|
|
68
|
+
RADIO_GROUP: React.ComponentType<PublicRadioGroupProps>;
|
|
69
|
+
CHECKBOX_GROUP: React.ComponentType<PublicCheckboxGroupProps>;
|
|
70
|
+
DROPDOWN: React.ComponentType<PublicDropdownProps>;
|
|
71
|
+
TAGS: React.ComponentType<PublicTagsProps>;
|
|
72
|
+
TIME_INPUT: React.ComponentType<PublicTimeInputProps>;
|
|
73
|
+
TEXT: React.ComponentType<PublicRichTextProps>;
|
|
74
|
+
SUBMIT_BUTTON: React.ComponentType<PublicSubmitButtonProps>;
|
|
75
|
+
PRODUCT_LIST: React.ComponentType<PublicProductListProps>;
|
|
76
|
+
FIXED_PAYMENT: React.ComponentType<PublicFixedPaymentProps>;
|
|
77
|
+
PAYMENT_INPUT: React.ComponentType<PublicPaymentInputProps>;
|
|
78
|
+
DONATION: React.ComponentType<PublicDonationProps>;
|
|
79
|
+
APPOINTMENT: React.ComponentType<PublicAppointmentProps>;
|
|
80
|
+
IMAGE_CHOICE: React.ComponentType<PublicImageChoiceProps>;
|
|
729
81
|
};
|
|
730
82
|
export { FieldMap }
|
|
731
83
|
export { FieldMap as FieldMap_alias_1 }
|
|
732
84
|
|
|
733
|
-
export declare type
|
|
734
|
-
|
|
735
|
-
export declare type FieldProps = TextInputProps | TextAreaProps | PhoneInputProps | MultilineAddressProps | DateInputProps | DatePickerProps | DateTimeInputProps | FileUploadProps | NumberInputProps | CheckboxProps | SignatureProps | RatingInputProps | RadioGroupProps | CheckboxGroupProps | DropdownProps | TagsProps | TimeInputProps | RichTextProps | SubmitButtonProps | ProductListProps | FixedPaymentProps | PaymentInputProps | DonationProps | AppointmentProps | ImageChoiceProps;
|
|
736
|
-
|
|
737
|
-
export declare type FieldType = 'TEXT_INPUT' | 'TEXT_AREA' | 'PHONE_INPUT' | 'MULTILINE_ADDRESS' | 'DATE_INPUT' | 'DATE_PICKER' | 'DATE_TIME_INPUT' | 'TIME_INPUT' | 'FILE_UPLOAD' | 'NUMBER_INPUT' | 'CHECKBOX' | 'SIGNATURE' | 'RATING_INPUT' | 'RADIO_GROUP' | 'CHECKBOX_GROUP' | 'DROPDOWN' | 'TAGS' | 'SUBMIT_BUTTON' | 'PRODUCT_LIST' | 'FIXED_PAYMENT' | 'PAYMENT_INPUT' | 'DONATION' | 'APPOINTMENT' | 'IMAGE_CHOICE' | 'TEXT' | '';
|
|
738
|
-
|
|
739
|
-
/**
|
|
740
|
-
* Data structure for uploaded file information.
|
|
741
|
-
*
|
|
742
|
-
* @interface FileData
|
|
743
|
-
*
|
|
744
|
-
* @property {string} fileId - Unique identifier for the uploaded file
|
|
745
|
-
* @property {string} displayName - Human-readable name for the file
|
|
746
|
-
* @property {string} url - URL where the file can be accessed
|
|
747
|
-
* @property {string} fileType - MIME type or file extension of the uploaded file
|
|
748
|
-
*
|
|
749
|
-
* @example
|
|
750
|
-
* ```tsx
|
|
751
|
-
* const fileData: FileData = {
|
|
752
|
-
* fileId: 'file_123456789',
|
|
753
|
-
* displayName: 'document.pdf',
|
|
754
|
-
* url: 'https://example.com/uploads/document.pdf',
|
|
755
|
-
* fileType: 'application/pdf'
|
|
756
|
-
* };
|
|
757
|
-
* ```
|
|
758
|
-
*/
|
|
759
|
-
declare interface FileData {
|
|
760
|
-
fileId: string;
|
|
761
|
-
displayName: string;
|
|
762
|
-
url: string;
|
|
763
|
-
fileType: string;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
declare type FileFormat = 'Video' | 'Image' | 'Audio' | 'Document' | 'Archive';
|
|
767
|
-
|
|
768
|
-
export declare const FileUploadMapper: PropsMapper;
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Props for file upload field.
|
|
772
|
-
* Used with fieldMap key: FILE_UPLOAD
|
|
773
|
-
*
|
|
774
|
-
* @interface FileUploadProps
|
|
775
|
-
*
|
|
776
|
-
* @property {string} id - The unique identifier for the form field
|
|
777
|
-
* @property {FileData[] | null | undefined} value - The current value of the form field (array of uploaded file data)
|
|
778
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
779
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
780
|
-
* @property {string} label - The display label for the form field
|
|
781
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
782
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
783
|
-
* @property {string} [buttonText] - Optional custom text for the upload button
|
|
784
|
-
* @property {number} [maxFiles] - Optional maximum number of files allowed
|
|
785
|
-
* @property {FileFormat[]} [allowedFileFormats] - Optional array of allowed file format extensions (e.g., [".pdf", ".doc", ".docx"])
|
|
786
|
-
* @property {string} [explanationText] - Optional explanatory text to display below the upload area
|
|
787
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
788
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
789
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
790
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
791
|
-
*
|
|
792
|
-
* @example
|
|
793
|
-
* ```tsx
|
|
794
|
-
* const fileUploadField: FileUploadProps = {
|
|
795
|
-
* id: 'documents',
|
|
796
|
-
* value: null,
|
|
797
|
-
* required: true,
|
|
798
|
-
* readOnly: false,
|
|
799
|
-
* label: 'Upload Documents',
|
|
800
|
-
* showLabel: true,
|
|
801
|
-
* description: { nodes: [{ type: 'text', text: 'Upload your documents (PDF, DOC, DOCX)' }] },
|
|
802
|
-
* buttonText: 'Choose Files',
|
|
803
|
-
* allowedFileFormats: ['.pdf', '.doc', '.docx'],
|
|
804
|
-
* explanationText: 'Maximum file size: 10MB',
|
|
805
|
-
* maxFiles: 5,
|
|
806
|
-
* onChange: (files) => console.log('Files changed:', files),
|
|
807
|
-
* onBlur: () => console.log('Field blurred'),
|
|
808
|
-
* onFocus: () => console.log('Field focused')
|
|
809
|
-
* };
|
|
810
|
-
* ```
|
|
811
|
-
*/
|
|
812
|
-
declare interface FileUploadProps extends BaseFieldProps {
|
|
813
|
-
value: FileData[] | null | undefined;
|
|
814
|
-
label: string;
|
|
815
|
-
showLabel: boolean;
|
|
816
|
-
description?: RichContent;
|
|
817
|
-
buttonText?: string;
|
|
818
|
-
maxFiles?: number;
|
|
819
|
-
allowedFileFormats?: FileFormat[];
|
|
820
|
-
explanationText?: string;
|
|
821
|
-
}
|
|
822
|
-
export { FileUploadProps }
|
|
823
|
-
export { FileUploadProps as FileUploadProps_alias_1 }
|
|
824
|
-
|
|
825
|
-
export declare const FixedPaymentMapper: PropsMapper;
|
|
826
|
-
|
|
827
|
-
/**
|
|
828
|
-
* Props for fixed payment field.
|
|
829
|
-
* Field displays a fixed payment amount with currency.
|
|
830
|
-
* Used with fieldMap key: FIXED_PAYMENT
|
|
831
|
-
*
|
|
832
|
-
* @interface FixedPaymentProps
|
|
833
|
-
*
|
|
834
|
-
* @property {string} label - The display label for the form field
|
|
835
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
836
|
-
* @property {number} amount - The fixed payment amount
|
|
837
|
-
* @property {string} currency - The currency symbol (e.g., '$', '€', '£')
|
|
838
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
839
|
-
*
|
|
840
|
-
* @example
|
|
841
|
-
* ```tsx
|
|
842
|
-
* const fixedPaymentField: FixedPaymentProps = {
|
|
843
|
-
* label: 'Payment Amount',
|
|
844
|
-
* showLabel: true,
|
|
845
|
-
* amount: 29.99,
|
|
846
|
-
* currency: '$',
|
|
847
|
-
* description: { nodes: [{ type: 'text', text: 'This is a one-time payment' }] }
|
|
848
|
-
* };
|
|
849
|
-
* ```
|
|
850
|
-
*/
|
|
851
|
-
declare interface FixedPaymentProps {
|
|
852
|
-
label: string;
|
|
853
|
-
showLabel: boolean;
|
|
854
|
-
amount: number;
|
|
855
|
-
currency: string;
|
|
856
|
-
description?: RichContent;
|
|
857
|
-
}
|
|
858
|
-
export { FixedPaymentProps }
|
|
859
|
-
export { FixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
85
|
+
export declare type FieldType = 'TEXT_INPUT' | 'TEXT_AREA' | 'PHONE_INPUT' | 'MULTILINE_ADDRESS' | 'DATE_INPUT' | 'DATE_PICKER' | 'DATE_TIME_INPUT' | 'TIME_INPUT' | 'FILE_UPLOAD' | 'NUMBER_INPUT' | 'CHECKBOX' | 'SIGNATURE' | 'RATING_INPUT' | 'RADIO_GROUP' | 'CHECKBOX_GROUP' | 'DROPDOWN' | 'TAGS' | 'SUBMIT_BUTTON' | 'PRODUCT_LIST' | 'FIXED_PAYMENT' | 'PAYMENT_INPUT' | 'DONATION' | 'APPOINTMENT' | 'IMAGE_CHOICE' | 'TEXT';
|
|
860
86
|
|
|
861
87
|
export declare const FORM_VIEWER_NAMESPACE = "form-viewer";
|
|
862
88
|
|
|
@@ -887,256 +113,9 @@ declare type FormValues = {
|
|
|
887
113
|
export { FormValues }
|
|
888
114
|
export { FormValues as FormValues_alias_1 }
|
|
889
115
|
|
|
890
|
-
export declare const
|
|
116
|
+
export declare const mapFieldTypes: (fields: FieldMap, typeMap: Record<SchemaFieldType, FieldType>) => Record<string, React_2.ComponentType<any>>;
|
|
891
117
|
|
|
892
|
-
|
|
893
|
-
* Data structure for image choice option.
|
|
894
|
-
* Extends the base ChoiceOption with image-specific properties.
|
|
895
|
-
*
|
|
896
|
-
* @interface ImageChoiceOption
|
|
897
|
-
*
|
|
898
|
-
* @property {string} id - Unique identifier for the option
|
|
899
|
-
* @property {string} value - The value that will be submitted when this option is selected
|
|
900
|
-
* @property {string} label - Display label for the option
|
|
901
|
-
* @property {boolean} default - Whether this option is selected by default
|
|
902
|
-
* @property {Object} image - Image data for the option
|
|
903
|
-
* @property {string | undefined} image.alt - Alt text for accessibility (can be undefined)
|
|
904
|
-
* @property {string} image.id - Unique identifier for the image
|
|
905
|
-
* @property {string} [image.url] - Optional URL for the image source. If not provided, a placeholder will be shown.
|
|
906
|
-
*
|
|
907
|
-
* @example
|
|
908
|
-
* ```tsx
|
|
909
|
-
* const imageOption: ImageChoiceOption = {
|
|
910
|
-
* id: 'red-color',
|
|
911
|
-
* value: 'red',
|
|
912
|
-
* label: 'Red',
|
|
913
|
-
* default: false,
|
|
914
|
-
* image: {
|
|
915
|
-
* alt: 'Red color swatch',
|
|
916
|
-
* id: 'img_red_001',
|
|
917
|
-
* url: 'https://example.com/images/red-swatch.jpg'
|
|
918
|
-
* }
|
|
919
|
-
* };
|
|
920
|
-
* ```
|
|
921
|
-
*/
|
|
922
|
-
declare interface ImageChoiceOption extends ChoiceOption {
|
|
923
|
-
image: {
|
|
924
|
-
alt: string | undefined;
|
|
925
|
-
id: string;
|
|
926
|
-
url?: string;
|
|
927
|
-
};
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/**
|
|
931
|
-
* Props for image choice field.
|
|
932
|
-
* Field allows users to select one or multiple options by clicking on images.
|
|
933
|
-
* Used with fieldMap key: IMAGE_CHOICE
|
|
934
|
-
*
|
|
935
|
-
* @interface ImageChoiceProps
|
|
936
|
-
*
|
|
937
|
-
* @property {string} id - The unique identifier for the form field
|
|
938
|
-
* @property {string | string[] | null | undefined} value - The current value(s) of the image choice field. For single selection, this is a string. For multiple selection, this is an array of strings.
|
|
939
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
940
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
941
|
-
* @property {string} label - The display label for the form field
|
|
942
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
943
|
-
* @property {ImageChoiceOption[]} options - Array of image choice options. Each option must include an image object with alt text, id, and optional URL.
|
|
944
|
-
* @property {1 | 2 | 3} numberOfColumns - Number of columns for the grid layout. Determines how many options are displayed per row.
|
|
945
|
-
* @property {boolean} [multiple=false] - Whether multiple selections are allowed. When true, users can select multiple options. When false, only one option can be selected at a time.
|
|
946
|
-
* @property {number} [minItems] - Minimum number of items that must be selected. Only applicable when multiple is true. Used for validation.
|
|
947
|
-
* @property {number} [maxItems] - Maximum number of items that can be selected. Only applicable when multiple is true. Used for validation.
|
|
948
|
-
* @property {RichContent} [description] - Optional rich content description for the field. Can include formatted text, links, etc.
|
|
949
|
-
* @property {string} [error] - Error message to display when validation fails. Undefined when the field is valid.
|
|
950
|
-
* @property {function} onChange - Callback function called when the image choice value(s) change. Receives the new value(s) as parameter.
|
|
951
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
952
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
953
|
-
*
|
|
954
|
-
* @example
|
|
955
|
-
* ```tsx
|
|
956
|
-
* // Single selection example
|
|
957
|
-
* const singleImageChoice: ImageChoiceProps = {
|
|
958
|
-
* id: 'preferred-color',
|
|
959
|
-
* value: 'red',
|
|
960
|
-
* required: true,
|
|
961
|
-
* readOnly: false,
|
|
962
|
-
* label: 'Choose Your Preferred Color',
|
|
963
|
-
* showLabel: true,
|
|
964
|
-
* options: [
|
|
965
|
-
* {
|
|
966
|
-
* id: 'red',
|
|
967
|
-
* value: 'red',
|
|
968
|
-
* label: 'Red',
|
|
969
|
-
* default: false,
|
|
970
|
-
* image: {
|
|
971
|
-
* alt: 'Red color option',
|
|
972
|
-
* id: 'img_red',
|
|
973
|
-
* url: 'https://example.com/red.jpg'
|
|
974
|
-
* }
|
|
975
|
-
* },
|
|
976
|
-
* {
|
|
977
|
-
* id: 'blue',
|
|
978
|
-
* value: 'blue',
|
|
979
|
-
* label: 'Blue',
|
|
980
|
-
* default: false,
|
|
981
|
-
* image: {
|
|
982
|
-
* alt: 'Blue color option',
|
|
983
|
-
* id: 'img_blue',
|
|
984
|
-
* url: 'https://example.com/blue.jpg'
|
|
985
|
-
* }
|
|
986
|
-
* }
|
|
987
|
-
* ],
|
|
988
|
-
* numberOfColumns: 2,
|
|
989
|
-
* multiple: false,
|
|
990
|
-
* description: {
|
|
991
|
-
* nodes: [{ type: 'text', text: 'Select your favorite color from the options below' }]
|
|
992
|
-
* },
|
|
993
|
-
* onChange: (value) => console.log('Color selection changed:', value),
|
|
994
|
-
* onBlur: () => console.log('Field blurred'),
|
|
995
|
-
* onFocus: () => console.log('Field focused')
|
|
996
|
-
* };
|
|
997
|
-
*
|
|
998
|
-
* // Multiple selection example
|
|
999
|
-
* const multipleImageChoice: ImageChoiceProps = {
|
|
1000
|
-
* id: 'preferred-features',
|
|
1001
|
-
* value: ['feature1', 'feature3'],
|
|
1002
|
-
* required: false,
|
|
1003
|
-
* readOnly: false,
|
|
1004
|
-
* label: 'Select Your Preferred Features',
|
|
1005
|
-
* showLabel: true,
|
|
1006
|
-
* options: [
|
|
1007
|
-
* {
|
|
1008
|
-
* id: 'feature1',
|
|
1009
|
-
* value: 'feature1',
|
|
1010
|
-
* label: 'Fast Loading',
|
|
1011
|
-
* default: false,
|
|
1012
|
-
* image: {
|
|
1013
|
-
* alt: 'Fast loading icon',
|
|
1014
|
-
* id: 'img_fast',
|
|
1015
|
-
* url: 'https://example.com/fast.jpg'
|
|
1016
|
-
* }
|
|
1017
|
-
* },
|
|
1018
|
-
* {
|
|
1019
|
-
* id: 'feature2',
|
|
1020
|
-
* value: 'feature2',
|
|
1021
|
-
* label: 'Mobile Friendly',
|
|
1022
|
-
* default: false,
|
|
1023
|
-
* image: {
|
|
1024
|
-
* alt: 'Mobile friendly icon',
|
|
1025
|
-
* id: 'img_mobile',
|
|
1026
|
-
* url: 'https://example.com/mobile.jpg'
|
|
1027
|
-
* }
|
|
1028
|
-
* },
|
|
1029
|
-
* {
|
|
1030
|
-
* id: 'feature3',
|
|
1031
|
-
* value: 'feature3',
|
|
1032
|
-
* label: 'Secure',
|
|
1033
|
-
* default: false,
|
|
1034
|
-
* image: {
|
|
1035
|
-
* alt: 'Security icon',
|
|
1036
|
-
* id: 'img_secure',
|
|
1037
|
-
* url: 'https://example.com/secure.jpg'
|
|
1038
|
-
* }
|
|
1039
|
-
* }
|
|
1040
|
-
* ],
|
|
1041
|
-
* numberOfColumns: 3,
|
|
1042
|
-
* multiple: true,
|
|
1043
|
-
* minItems: 1,
|
|
1044
|
-
* maxItems: 2,
|
|
1045
|
-
* description: {
|
|
1046
|
-
* nodes: [{ type: 'text', text: 'Choose up to 2 features that matter most to you' }]
|
|
1047
|
-
* },
|
|
1048
|
-
* onChange: (values) => console.log('Feature selection changed:', values),
|
|
1049
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1050
|
-
* onFocus: () => console.log('Field focused')
|
|
1051
|
-
* };
|
|
1052
|
-
* ```
|
|
1053
|
-
*/
|
|
1054
|
-
declare interface ImageChoiceProps extends BaseFieldProps {
|
|
1055
|
-
value: string | string[] | null | undefined;
|
|
1056
|
-
label: string;
|
|
1057
|
-
showLabel: boolean;
|
|
1058
|
-
options: ImageChoiceOption[];
|
|
1059
|
-
numberOfColumns: 1 | 2 | 3;
|
|
1060
|
-
multiple: boolean;
|
|
1061
|
-
description?: RichContent;
|
|
1062
|
-
imageAspectRatio: 'contain' | 'cover';
|
|
1063
|
-
}
|
|
1064
|
-
export { ImageChoiceProps }
|
|
1065
|
-
export { ImageChoiceProps as ImageChoiceProps_alias_1 }
|
|
1066
|
-
|
|
1067
|
-
export declare const mapFieldProps: (fields: FieldMap, mappers: FieldMappers) => FormFields;
|
|
1068
|
-
|
|
1069
|
-
export declare const mapFieldTypes: (fields: FormFields, typeMap: Record<SchemaFieldType, string>) => Record<string, React_2.ComponentType<any>>;
|
|
1070
|
-
|
|
1071
|
-
declare interface MinMaxLengthProps {
|
|
1072
|
-
minLength: number | undefined;
|
|
1073
|
-
maxLength: number | undefined;
|
|
1074
|
-
}
|
|
1075
|
-
|
|
1076
|
-
export declare const MultilineAddressMapper: PropsMapper;
|
|
1077
|
-
|
|
1078
|
-
/**
|
|
1079
|
-
* Props for multiline address field.
|
|
1080
|
-
* Used with fieldMap key: MULTILINE_ADDRESS
|
|
1081
|
-
* The field MUST render separate inputs on the UI for these values:
|
|
1082
|
-
* 1. Country/Region
|
|
1083
|
-
* 2. Address
|
|
1084
|
-
* 3. Address - line 2 (if showAddressLine2 is true)
|
|
1085
|
-
* 4. City
|
|
1086
|
-
* 5. Zip / Postal Code
|
|
1087
|
-
*
|
|
1088
|
-
* @interface MultilineAddressProps
|
|
1089
|
-
*
|
|
1090
|
-
* @property {string} id - The unique identifier for the form field
|
|
1091
|
-
* @property {MultilineAddressValue | null | undefined} value - The current value of the form field
|
|
1092
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1093
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1094
|
-
* @property {string} label - The display label for the form field
|
|
1095
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1096
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1097
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1098
|
-
* @property {boolean} showAddressLine2 - Whether to show the address line 2 field
|
|
1099
|
-
* @property {boolean} addressLine2Required - Whether the address line 2 field is required
|
|
1100
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1101
|
-
*
|
|
1102
|
-
* @example
|
|
1103
|
-
* ```tsx
|
|
1104
|
-
* const multilineAddressField: MultilineAddressProps = {
|
|
1105
|
-
* id: 'multilineAddress',
|
|
1106
|
-
* value: '123 Main Street\nApt 4B\nNew York, NY 10001\nUnited States',
|
|
1107
|
-
* required: true,
|
|
1108
|
-
* readOnly: false,
|
|
1109
|
-
* label: 'Full Address',
|
|
1110
|
-
* showAddressLine2: true,
|
|
1111
|
-
* addressLine2Required: false,
|
|
1112
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1113
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1114
|
-
* onFocus: () => console.log('Field focused')
|
|
1115
|
-
* };
|
|
1116
|
-
* ```
|
|
1117
|
-
*/
|
|
1118
|
-
declare interface MultilineAddressProps extends BaseFieldProps {
|
|
1119
|
-
label?: string;
|
|
1120
|
-
value: MultilineAddressValue;
|
|
1121
|
-
showAddressLine2: boolean;
|
|
1122
|
-
addressLine2Required?: boolean;
|
|
1123
|
-
}
|
|
1124
|
-
export { MultilineAddressProps }
|
|
1125
|
-
export { MultilineAddressProps as MultilineAddressProps_alias_1 }
|
|
1126
|
-
|
|
1127
|
-
export declare type MultilineAddressSubmission = requests.wix.forms.v4.values.MultilineAddressSubmission;
|
|
1128
|
-
|
|
1129
|
-
declare type MultilineAddressValue = {
|
|
1130
|
-
country?: CallingCountryCode;
|
|
1131
|
-
subdivision?: string;
|
|
1132
|
-
city?: string;
|
|
1133
|
-
addressLine?: string;
|
|
1134
|
-
addressLine2?: string;
|
|
1135
|
-
postalCode?: string;
|
|
1136
|
-
streetName?: string;
|
|
1137
|
-
streetNumber?: string;
|
|
1138
|
-
apartment?: string;
|
|
1139
|
-
};
|
|
118
|
+
declare type MultilineAddressSubmission = requests.wix.forms.v4.values.MultilineAddressSubmission;
|
|
1140
119
|
|
|
1141
120
|
/**
|
|
1142
121
|
* Normalizes object schema by removing underscore prefixes and converting keys to camelCase
|
|
@@ -1145,650 +124,101 @@ declare type MultilineAddressValue = {
|
|
|
1145
124
|
*/
|
|
1146
125
|
export declare function normalizeSchema<T = unknown>(obj: T): T;
|
|
1147
126
|
|
|
1148
|
-
export declare const NumberInputMapper: PropsMapper;
|
|
1149
|
-
|
|
1150
|
-
/**
|
|
1151
|
-
* Props for number input field.
|
|
1152
|
-
* Field allows to give a numerical answer.
|
|
1153
|
-
* Used with fieldMap key: NUMBER_INPUT
|
|
1154
|
-
*
|
|
1155
|
-
* @interface NumberInputProps
|
|
1156
|
-
*
|
|
1157
|
-
* @property {string} id - The unique identifier for the form field
|
|
1158
|
-
* @property {string | number | null | undefined} value - The current value of the form field
|
|
1159
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1160
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1161
|
-
* @property {string} label - The display label for the form field
|
|
1162
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1163
|
-
* @property {string} [placeholder] - Optional placeholder text to display when the field is empty
|
|
1164
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1165
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1166
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1167
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1168
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1169
|
-
*
|
|
1170
|
-
* @example
|
|
1171
|
-
* ```tsx
|
|
1172
|
-
* const numberInputField: NumberInputProps = {
|
|
1173
|
-
* id: 'age',
|
|
1174
|
-
* value: 25,
|
|
1175
|
-
* required: true,
|
|
1176
|
-
* readOnly: false,
|
|
1177
|
-
* label: 'Age',
|
|
1178
|
-
* showLabel: true,
|
|
1179
|
-
* placeholder: 'Enter your age',
|
|
1180
|
-
* description: { nodes: [{ type: 'text', text: 'Must be 18 or older' }] },
|
|
1181
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1182
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1183
|
-
* onFocus: () => console.log('Field focused')
|
|
1184
|
-
* };
|
|
1185
|
-
* ```
|
|
1186
|
-
*/
|
|
1187
|
-
declare interface NumberInputProps extends BaseFieldProps {
|
|
1188
|
-
value: string | number | null | undefined;
|
|
1189
|
-
label: string;
|
|
1190
|
-
showLabel: boolean;
|
|
1191
|
-
placeholder?: string;
|
|
1192
|
-
description?: RichContent;
|
|
1193
|
-
}
|
|
1194
|
-
export { NumberInputProps }
|
|
1195
|
-
export { NumberInputProps as NumberInputProps_alias_1 }
|
|
1196
|
-
|
|
1197
127
|
export declare type OnChange = (values: FormValues) => void;
|
|
1198
128
|
|
|
1199
|
-
|
|
129
|
+
declare type PossibleValues = ValueType | {
|
|
130
|
+
[target: string]: ValueType;
|
|
131
|
+
} | FormValues[];
|
|
1200
132
|
|
|
1201
|
-
|
|
1202
|
-
* Props for payment input field.
|
|
1203
|
-
* Field allows users to enter a custom payment amount.
|
|
1204
|
-
* Used with fieldMap key: PAYMENT_INPUT
|
|
1205
|
-
*
|
|
1206
|
-
* @interface PaymentInputProps
|
|
1207
|
-
*
|
|
1208
|
-
* @property {string} id - The unique identifier for the form field
|
|
1209
|
-
* @property {string | null | undefined} value - The current value of the form field
|
|
1210
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1211
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1212
|
-
* @property {string} label - The display label for the form field
|
|
1213
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1214
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1215
|
-
* @property {string} [placeholder] - Optional placeholder text to display when the field is empty
|
|
1216
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1217
|
-
* @property {string} currency - The currency symbol (e.g., '$', '€', '£')
|
|
1218
|
-
* @property {string} minValue - Minimum payment amount as string
|
|
1219
|
-
* @property {string} [maxValue] - Optional maximum payment amount as string
|
|
1220
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1221
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1222
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1223
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1224
|
-
*
|
|
1225
|
-
* @example
|
|
1226
|
-
* ```tsx
|
|
1227
|
-
* const paymentInputField: PaymentInputProps = {
|
|
1228
|
-
* id: 'payment',
|
|
1229
|
-
* value: '25.50',
|
|
1230
|
-
* required: true,
|
|
1231
|
-
* readOnly: false,
|
|
1232
|
-
* label: 'Payment Amount',
|
|
1233
|
-
* showLabel: true,
|
|
1234
|
-
* required: true,
|
|
1235
|
-
* placeholder: 'Enter amount',
|
|
1236
|
-
* description: { nodes: [{ type: 'text', text: 'Enter your payment amount' }] },
|
|
1237
|
-
* currency: '$',
|
|
1238
|
-
* minValue: '1.00',
|
|
1239
|
-
* maxValue: '1000.00',
|
|
1240
|
-
* onChange: (value) => console.log('Payment changed:', value),
|
|
1241
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1242
|
-
* onFocus: () => console.log('Field focused')
|
|
1243
|
-
* };
|
|
1244
|
-
* ```
|
|
1245
|
-
*/
|
|
1246
|
-
declare interface PaymentInputProps extends BaseFieldProps {
|
|
1247
|
-
value: string | null | undefined;
|
|
1248
|
-
label: string;
|
|
1249
|
-
showLabel: boolean;
|
|
1250
|
-
required: boolean;
|
|
1251
|
-
placeholder?: string;
|
|
1252
|
-
description?: RichContent;
|
|
1253
|
-
currency: string;
|
|
1254
|
-
minValue: string;
|
|
1255
|
-
maxValue?: string;
|
|
1256
|
-
}
|
|
1257
|
-
export { PaymentInputProps }
|
|
1258
|
-
export { PaymentInputProps as PaymentInputProps_alias_1 }
|
|
133
|
+
declare type ProductListValue = ProductValue[];
|
|
1259
134
|
|
|
1260
|
-
|
|
135
|
+
declare type ProductValue = {
|
|
136
|
+
productId: string;
|
|
137
|
+
price: string | number;
|
|
138
|
+
quantity: number;
|
|
139
|
+
};
|
|
1261
140
|
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
* Used with fieldMap key: CONTACTS_PHONE
|
|
1265
|
-
*
|
|
1266
|
-
* @interface PhoneInputProps
|
|
1267
|
-
*
|
|
1268
|
-
* @property {string} id - The unique identifier for the form field
|
|
1269
|
-
* @property {string | null | undefined} value - The current value of the form field
|
|
1270
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1271
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1272
|
-
* @property {string} label - The display label for the form field
|
|
1273
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1274
|
-
* @property {string} [placeholder] - Optional placeholder text to display when the field is empty
|
|
1275
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1276
|
-
* @property {CallingCountryCode[]} [allowedCountryCodes] - Optional array of allowed country codes for phone number validation
|
|
1277
|
-
* @property {CallingCountryCode} [defaultCountryCode] - Optional default country code to pre-select
|
|
1278
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1279
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1280
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1281
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1282
|
-
*
|
|
1283
|
-
* @example
|
|
1284
|
-
* ```tsx
|
|
1285
|
-
* const phoneField: PhoneInputProps = {
|
|
1286
|
-
* id: 'phone',
|
|
1287
|
-
* value: '+1-555-123-4567',
|
|
1288
|
-
* required: true,
|
|
1289
|
-
* readOnly: false,
|
|
1290
|
-
* label: 'Phone Number',
|
|
1291
|
-
* showLabel: true,
|
|
1292
|
-
* placeholder: 'Enter your phone number',
|
|
1293
|
-
* description: { nodes: [{ type: 'text', text: 'Include country code' }] },
|
|
1294
|
-
* allowedCountryCodes: ['US', 'CA', 'GB'],
|
|
1295
|
-
* defaultCountryCode: 'US',
|
|
1296
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1297
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1298
|
-
* onFocus: () => console.log('Field focused')
|
|
1299
|
-
* };
|
|
1300
|
-
* ```
|
|
1301
|
-
*/
|
|
1302
|
-
declare interface PhoneInputProps extends BaseTextFieldProps {
|
|
1303
|
-
allowedCountryCodes: CallingCountryCode[];
|
|
1304
|
-
defaultCountryCode?: CallingCountryCode;
|
|
1305
|
-
}
|
|
1306
|
-
export { PhoneInputProps }
|
|
1307
|
-
export { PhoneInputProps as PhoneInputProps_alias_1 }
|
|
141
|
+
export { PublicAppointmentProps as AppointmentProps }
|
|
142
|
+
export { PublicAppointmentProps as AppointmentProps_alias_1 }
|
|
1308
143
|
|
|
1309
|
-
export
|
|
1310
|
-
|
|
1311
|
-
} | FormValues[];
|
|
144
|
+
export { PublicCheckboxGroupProps as CheckboxGroupProps }
|
|
145
|
+
export { PublicCheckboxGroupProps as CheckboxGroupProps_alias_1 }
|
|
1312
146
|
|
|
1313
|
-
export
|
|
147
|
+
export { PublicCheckboxProps as CheckboxProps }
|
|
148
|
+
export { PublicCheckboxProps as CheckboxProps_alias_1 }
|
|
1314
149
|
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
* Field allows to display and select products from a list.
|
|
1318
|
-
* Used with fieldMap key: PRODUCT_LIST
|
|
1319
|
-
*
|
|
1320
|
-
* @interface ProductListProps
|
|
1321
|
-
*
|
|
1322
|
-
* @property {string} id - The unique identifier for the form field
|
|
1323
|
-
* @property {ProductValue | null | undefined} value - The current value of the form field (selected product data)
|
|
1324
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1325
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1326
|
-
* @property {string} label - The display label for the form field
|
|
1327
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1328
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1329
|
-
* @property {ProductOption[]} options - Array of product options with id, value, label, price, quantity limits, and image
|
|
1330
|
-
* @property {number | undefined} minItems - Optional minimum number of products that must be selected
|
|
1331
|
-
* @property {number | undefined} maxItems - Optional maximum number of products that can be selected
|
|
1332
|
-
* @property {string} currency - The price currency symbol
|
|
1333
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1334
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1335
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1336
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1337
|
-
*
|
|
1338
|
-
* @example
|
|
1339
|
-
* ```tsx
|
|
1340
|
-
* const productListField: ProductListProps = {
|
|
1341
|
-
* id: 'products',
|
|
1342
|
-
* value: [{ productId: 'prod_123', quantity: 2 }],
|
|
1343
|
-
* required: true,
|
|
1344
|
-
* readOnly: false,
|
|
1345
|
-
* label: 'Select Products',
|
|
1346
|
-
* showLabel: true,
|
|
1347
|
-
* description: { nodes: [{ type: 'text', text: 'Choose your desired products' }] },
|
|
1348
|
-
* options: [
|
|
1349
|
-
* {
|
|
1350
|
-
* id: 'prod_123',
|
|
1351
|
-
* value: 'prod_123',
|
|
1352
|
-
* label: 'Premium Widget',
|
|
1353
|
-
* default: false,
|
|
1354
|
-
* price: '29.99',
|
|
1355
|
-
* minAmount: 1,
|
|
1356
|
-
* maxAmount: 10,
|
|
1357
|
-
* image: { alt: 'Premium Widget', id: 'img_123' }
|
|
1358
|
-
* }
|
|
1359
|
-
* ],
|
|
1360
|
-
* currency: '$',
|
|
1361
|
-
* minItems: 1,
|
|
1362
|
-
* maxItems: 5,
|
|
1363
|
-
* onChange: (value) => console.log('Product selection changed:', value),
|
|
1364
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1365
|
-
* onFocus: () => console.log('Field focused')
|
|
1366
|
-
* };
|
|
1367
|
-
* ```
|
|
1368
|
-
*/
|
|
1369
|
-
declare interface ProductListProps extends BaseFieldProps {
|
|
1370
|
-
value: ProductValue | null | undefined;
|
|
1371
|
-
label: string;
|
|
1372
|
-
showLabel: boolean;
|
|
1373
|
-
description?: RichContent;
|
|
1374
|
-
options: ProductOption[];
|
|
1375
|
-
minItems: number | undefined;
|
|
1376
|
-
maxItems: number | undefined;
|
|
1377
|
-
currency: string;
|
|
1378
|
-
}
|
|
1379
|
-
export { ProductListProps }
|
|
1380
|
-
export { ProductListProps as ProductListProps_alias_1 }
|
|
150
|
+
export { PublicDateInputProps as DateInputProps }
|
|
151
|
+
export { PublicDateInputProps as DateInputProps_alias_1 }
|
|
1381
152
|
|
|
1382
|
-
export
|
|
153
|
+
export { PublicDatePickerProps as DatePickerProps }
|
|
154
|
+
export { PublicDatePickerProps as DatePickerProps_alias_1 }
|
|
1383
155
|
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
minAmount: number;
|
|
1387
|
-
maxAmount: number;
|
|
1388
|
-
image: {
|
|
1389
|
-
alt: string | undefined;
|
|
1390
|
-
id: string;
|
|
1391
|
-
};
|
|
1392
|
-
}
|
|
156
|
+
export { PublicDateTimeInputProps as DateTimeInputProps }
|
|
157
|
+
export { PublicDateTimeInputProps as DateTimeInputProps_alias_1 }
|
|
1393
158
|
|
|
1394
|
-
export
|
|
1395
|
-
|
|
1396
|
-
price: string | number;
|
|
1397
|
-
quantity: number;
|
|
1398
|
-
};
|
|
159
|
+
export { PublicDonationProps as DonationProps }
|
|
160
|
+
export { PublicDonationProps as DonationProps_alias_1 }
|
|
1399
161
|
|
|
1400
|
-
export
|
|
162
|
+
export { PublicDropdownProps as DropdownProps }
|
|
163
|
+
export { PublicDropdownProps as DropdownProps_alias_1 }
|
|
1401
164
|
|
|
1402
|
-
export
|
|
165
|
+
export { PublicFieldsProps as FieldsProps }
|
|
166
|
+
export { PublicFieldsProps as FieldsProps_alias_1 }
|
|
1403
167
|
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
* Ask people to choose one option from a list.
|
|
1407
|
-
* Used with fieldMap key: RADIO_GROUP
|
|
1408
|
-
*
|
|
1409
|
-
* @interface RadioGroupProps
|
|
1410
|
-
*
|
|
1411
|
-
* @property {string} id - The unique identifier for the form field
|
|
1412
|
-
* @property {string | null | undefined} value - The current value of the radio group (selected option value)
|
|
1413
|
-
* @property {string} label - The display label for the form field
|
|
1414
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1415
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1416
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1417
|
-
* @property {ChoiceOption[]} options - Array of radio button options with id, value, label, and default properties
|
|
1418
|
-
* @property {1 | 2 | 3} numberOfColumns - Number of columns for layout (1, 2, or 3)
|
|
1419
|
-
* @property {Object} customOption - Configuration for custom "Other" option with text input
|
|
1420
|
-
* @property {string} customOption.label - Label for the custom option radio button
|
|
1421
|
-
* @property {string} customOption.placeholder - Placeholder text for the custom option input
|
|
1422
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1423
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1424
|
-
* @property {function} onChange - Callback function called when the radio group value changes
|
|
1425
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1426
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1427
|
-
*/
|
|
1428
|
-
declare interface RadioGroupProps extends BaseFieldProps {
|
|
1429
|
-
value: string | null | undefined;
|
|
1430
|
-
label: string;
|
|
1431
|
-
showLabel: boolean;
|
|
1432
|
-
options: ChoiceOption[];
|
|
1433
|
-
description?: RichContent;
|
|
1434
|
-
numberOfColumns: 1 | 2 | 3;
|
|
1435
|
-
customOption: CustomOption;
|
|
1436
|
-
}
|
|
1437
|
-
export { RadioGroupProps }
|
|
1438
|
-
export { RadioGroupProps as RadioGroupProps_alias_1 }
|
|
168
|
+
export { PublicFileUploadProps as FileUploadProps }
|
|
169
|
+
export { PublicFileUploadProps as FileUploadProps_alias_1 }
|
|
1439
170
|
|
|
1440
|
-
export
|
|
171
|
+
export { PublicFixedPaymentProps as FixedPaymentProps }
|
|
172
|
+
export { PublicFixedPaymentProps as FixedPaymentProps_alias_1 }
|
|
1441
173
|
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
* Field allows to collect feedback on products, services and etc by choosing a rating from 1 to 5.
|
|
1445
|
-
* Used with fieldMap key: RATING_INPUT
|
|
1446
|
-
*
|
|
1447
|
-
* @interface RatingInputProps
|
|
1448
|
-
*
|
|
1449
|
-
* @property {string} id - The unique identifier for the form field
|
|
1450
|
-
* @property {number | null | undefined} value - The current value of the rating field (number between 1 and 5)
|
|
1451
|
-
* @property {number} [defaultValue] - The default value for the rating field (number between 1 and 5)
|
|
1452
|
-
* @property {string} label - The display label for the form field
|
|
1453
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1454
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1455
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1456
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1457
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1458
|
-
* @property {function} onChange - Callback function called when the rating value changes
|
|
1459
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1460
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1461
|
-
*/
|
|
1462
|
-
declare interface RatingInputProps extends BaseFieldProps {
|
|
1463
|
-
value: number | null | undefined;
|
|
1464
|
-
defaultValue: number | undefined;
|
|
1465
|
-
label: string;
|
|
1466
|
-
showLabel: boolean;
|
|
1467
|
-
description?: RichContent;
|
|
1468
|
-
}
|
|
1469
|
-
export { RatingInputProps }
|
|
1470
|
-
export { RatingInputProps as RatingInputProps_alias_1 }
|
|
174
|
+
export { PublicImageChoiceProps as ImageChoiceProps }
|
|
175
|
+
export { PublicImageChoiceProps as ImageChoiceProps_alias_1 }
|
|
1471
176
|
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
* The field is used to display text in the form.
|
|
1475
|
-
* Used with fieldMap key: RICH_TEXT
|
|
1476
|
-
*
|
|
1477
|
-
* @interface RichTextProps
|
|
1478
|
-
*
|
|
1479
|
-
* @property {RichContent} content - The textrich content to display
|
|
1480
|
-
* @property {number} maxShownParagraphs - Maximum number of paragraphs to display before truncating
|
|
1481
|
-
*
|
|
1482
|
-
* @example
|
|
1483
|
-
* ```tsx
|
|
1484
|
-
* const richTextField: RichTextProps = {
|
|
1485
|
-
* content: {
|
|
1486
|
-
* nodes: [
|
|
1487
|
-
* {
|
|
1488
|
-
* type: 'text',
|
|
1489
|
-
* text: 'Please fill out all required fields marked with an asterisk (*).',
|
|
1490
|
-
* marks: [{ type: 'bold' }]
|
|
1491
|
-
* }
|
|
1492
|
-
* ]
|
|
1493
|
-
* },
|
|
1494
|
-
* maxShownParagraphs: 2
|
|
1495
|
-
* };
|
|
1496
|
-
* ```
|
|
1497
|
-
*/
|
|
1498
|
-
declare interface RichTextProps {
|
|
1499
|
-
content: RichContent;
|
|
1500
|
-
maxShownParagraphs: number;
|
|
1501
|
-
id: string;
|
|
1502
|
-
}
|
|
1503
|
-
export { RichTextProps }
|
|
1504
|
-
export { RichTextProps as RichTextProps_alias_1 }
|
|
177
|
+
export { PublicMultilineAddressProps as MultilineAddressProps }
|
|
178
|
+
export { PublicMultilineAddressProps as MultilineAddressProps_alias_1 }
|
|
1505
179
|
|
|
1506
|
-
export {
|
|
180
|
+
export { PublicNumberInputProps as NumberInputProps }
|
|
181
|
+
export { PublicNumberInputProps as NumberInputProps_alias_1 }
|
|
1507
182
|
|
|
1508
|
-
export
|
|
183
|
+
export { PublicPaymentInputProps as PaymentInputProps }
|
|
184
|
+
export { PublicPaymentInputProps as PaymentInputProps_alias_1 }
|
|
1509
185
|
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
* Used with fieldMap key: SIGNATURE
|
|
1513
|
-
* The field MUST render a signature pad/canvas for capturing user signatures.
|
|
1514
|
-
*
|
|
1515
|
-
* @interface SignatureProps
|
|
1516
|
-
*
|
|
1517
|
-
* @property {string} id - The unique identifier for the form field
|
|
1518
|
-
* @property {FileData | null | undefined} value - The current value of the signature field (FileData object containing signature image data)
|
|
1519
|
-
* @property {string} label - The display label for the form field
|
|
1520
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1521
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1522
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1523
|
-
* @property {boolean} imageUploadEnabled - Whether image upload functionality is enabled for the signature field
|
|
1524
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1525
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1526
|
-
* @property {function} onChange - Callback function called when the signature value changes
|
|
1527
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1528
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1529
|
-
*/
|
|
1530
|
-
declare interface SignatureProps extends BaseFieldProps {
|
|
1531
|
-
value: FileData | null | undefined;
|
|
1532
|
-
label: string;
|
|
1533
|
-
showLabel: boolean;
|
|
1534
|
-
imageUploadEnabled: boolean;
|
|
1535
|
-
description?: RichContent;
|
|
1536
|
-
}
|
|
1537
|
-
export { SignatureProps }
|
|
1538
|
-
export { SignatureProps as SignatureProps_alias_1 }
|
|
186
|
+
export { PublicPhoneInputProps as PhoneInputProps }
|
|
187
|
+
export { PublicPhoneInputProps as PhoneInputProps_alias_1 }
|
|
1539
188
|
|
|
1540
|
-
export
|
|
1541
|
-
|
|
1542
|
-
country?: string;
|
|
1543
|
-
languageCode: string;
|
|
1544
|
-
};
|
|
1545
|
-
currency?: Currency;
|
|
1546
|
-
}
|
|
189
|
+
export { PublicProductListProps as ProductListProps }
|
|
190
|
+
export { PublicProductListProps as ProductListProps_alias_1 }
|
|
1547
191
|
|
|
1548
|
-
export
|
|
192
|
+
export { PublicRadioGroupProps as RadioGroupProps }
|
|
193
|
+
export { PublicRadioGroupProps as RadioGroupProps_alias_1 }
|
|
1549
194
|
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
* The field is used to render navigation and submit buttons for the form.
|
|
1553
|
-
* Used with fieldMap key: SUBMIT_BUTTON
|
|
1554
|
-
*
|
|
1555
|
-
* @interface SubmitButtonProps
|
|
1556
|
-
*
|
|
1557
|
-
* @property {string} id - The unique identifier for the submit button field
|
|
1558
|
-
* @property {string} submitText - The text to display on the submit button
|
|
1559
|
-
* @property {string} previousText - The text to display on the previous button
|
|
1560
|
-
* @property {string} nextText - The text to display on the next button
|
|
1561
|
-
* @property {boolean} showPreviousButton - Whether to show the previous button
|
|
1562
|
-
* @property {boolean} showNextButton - Whether to show the next button
|
|
1563
|
-
* @property {boolean} showSubmitButton - Whether to show the submit button
|
|
1564
|
-
* @property {function} onSubmitClick - The function to call when the submit button is clicked
|
|
1565
|
-
* @property {boolean} isSubmitInProgress - Whether the form submission is currently in progress
|
|
1566
|
-
* @property {function} onPreviousClick - The function to call when the previous button is clicked
|
|
1567
|
-
* @property {function} onNextClick - The function to call when the next button is clicked
|
|
1568
|
-
*
|
|
1569
|
-
* @example
|
|
1570
|
-
* ```tsx
|
|
1571
|
-
* const submitButton: SubmitButtonProps = {
|
|
1572
|
-
* id: 'submit',
|
|
1573
|
-
* submitText: 'Submit Form',
|
|
1574
|
-
* previousText: 'Previous',
|
|
1575
|
-
* nextText: 'Next',
|
|
1576
|
-
* showPreviousButton: true,
|
|
1577
|
-
* showNextButton: false,
|
|
1578
|
-
* showSubmitButton: true,
|
|
1579
|
-
* onSubmitClick: handleSubmit,
|
|
1580
|
-
* isSubmitInProgress: false,
|
|
1581
|
-
* onPreviousClick: handlePrevious,
|
|
1582
|
-
* onNextClick: handleNext,
|
|
1583
|
-
* };
|
|
1584
|
-
* ```
|
|
1585
|
-
*/
|
|
1586
|
-
declare interface SubmitButtonProps {
|
|
1587
|
-
id: string;
|
|
1588
|
-
submitText: string;
|
|
1589
|
-
previousText: string;
|
|
1590
|
-
nextText: string;
|
|
1591
|
-
showPreviousButton: boolean;
|
|
1592
|
-
showNextButton: boolean;
|
|
1593
|
-
showSubmitButton: boolean;
|
|
1594
|
-
onSubmitClick: () => void;
|
|
1595
|
-
isSubmitInProgress: boolean;
|
|
1596
|
-
onPreviousClick: () => void;
|
|
1597
|
-
onNextClick: () => void;
|
|
1598
|
-
}
|
|
1599
|
-
export { SubmitButtonProps }
|
|
1600
|
-
export { SubmitButtonProps as SubmitButtonProps_alias_1 }
|
|
195
|
+
export { PublicRatingInputProps as RatingInputProps }
|
|
196
|
+
export { PublicRatingInputProps as RatingInputProps_alias_1 }
|
|
1601
197
|
|
|
1602
|
-
export
|
|
198
|
+
export { PublicRichTextProps as RichTextProps }
|
|
199
|
+
export { PublicRichTextProps as RichTextProps_alias_1 }
|
|
1603
200
|
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
* Field allows to choose options by selecting tags.
|
|
1607
|
-
* Used with fieldMap key: TAGS
|
|
1608
|
-
*
|
|
1609
|
-
* @interface TagsProps
|
|
1610
|
-
*
|
|
1611
|
-
* @property {string} id - The unique identifier for the form field
|
|
1612
|
-
* @property {string[] | null | undefined} value - The current values of the tags field (array of selected option values)
|
|
1613
|
-
* @property {string} label - The display label for the form field
|
|
1614
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1615
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1616
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1617
|
-
* @property {ChoiceOption[]} options - Array of tag options with id, value, label, and default properties
|
|
1618
|
-
* @property {0 | 1 | 2 | 3} numberOfColumns - Number of columns for layout (0 for auto, 1, 2, or 3)
|
|
1619
|
-
* @property {Object} customOption - Configuration for custom "Other" option with text input
|
|
1620
|
-
* @property {string} customOption.label - Label for the custom option
|
|
1621
|
-
* @property {string} customOption.placeholder - Placeholder text for the custom option input
|
|
1622
|
-
* @property {number} [minItems] - Minimum number of tags that must be selected
|
|
1623
|
-
* @property {number} [maxItems] - Maximum number of tags that can be selected
|
|
1624
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1625
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1626
|
-
* @property {function} onChange - Callback function called when the tags values change
|
|
1627
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1628
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1629
|
-
*/
|
|
1630
|
-
declare interface TagsProps extends BaseFieldProps {
|
|
1631
|
-
value: string[] | null | undefined;
|
|
1632
|
-
options: ChoiceOption[];
|
|
1633
|
-
label: string;
|
|
1634
|
-
showLabel: boolean;
|
|
1635
|
-
description?: RichContent;
|
|
1636
|
-
customOption?: CustomOption;
|
|
1637
|
-
numberOfColumns: 0 | 1 | 2 | 3;
|
|
1638
|
-
minItems?: number;
|
|
1639
|
-
maxItems?: number;
|
|
1640
|
-
}
|
|
1641
|
-
export { TagsProps }
|
|
1642
|
-
export { TagsProps as TagsProps_alias_1 }
|
|
201
|
+
export { PublicSignatureProps as SignatureProps }
|
|
202
|
+
export { PublicSignatureProps as SignatureProps_alias_1 }
|
|
1643
203
|
|
|
1644
|
-
export
|
|
204
|
+
export { PublicSubmitButtonProps as SubmitButtonProps }
|
|
205
|
+
export { PublicSubmitButtonProps as SubmitButtonProps_alias_1 }
|
|
1645
206
|
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
* Field allows to give a multi-line answer.
|
|
1649
|
-
* Used with fieldMap key: TEXT_AREA
|
|
1650
|
-
*
|
|
1651
|
-
* @interface TextAreaProps
|
|
1652
|
-
*
|
|
1653
|
-
* @property {string} id - The unique identifier for the form field
|
|
1654
|
-
* @property {string | null | undefined} value - The current value of the form field
|
|
1655
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1656
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1657
|
-
* @property {string} label - The display label for the form field
|
|
1658
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1659
|
-
* @property {string} [placeholder] - Optional placeholder text to display when the field is empty
|
|
1660
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1661
|
-
* @property {number} [minLength] - Optional minimum number of characters required
|
|
1662
|
-
* @property {number} [maxLength] - Optional maximum number of characters allowed
|
|
1663
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1664
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1665
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1666
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1667
|
-
*
|
|
1668
|
-
* @example
|
|
1669
|
-
* ```tsx
|
|
1670
|
-
* const textAreaField: TextAreaProps = {
|
|
1671
|
-
* id: 'message',
|
|
1672
|
-
* value: 'Hello world!',
|
|
1673
|
-
* required: true,
|
|
1674
|
-
* readOnly: false,
|
|
1675
|
-
* label: 'Your Message',
|
|
1676
|
-
* showLabel: true,
|
|
1677
|
-
* placeholder: 'Enter your message here...',
|
|
1678
|
-
* description: { nodes: [{ type: 'text', text: 'Please provide detailed information' }] },
|
|
1679
|
-
* minLength: 10,
|
|
1680
|
-
* maxLength: 1000,
|
|
1681
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1682
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1683
|
-
* onFocus: () => console.log('Field focused')
|
|
1684
|
-
* };
|
|
1685
|
-
* ```
|
|
1686
|
-
*/
|
|
1687
|
-
declare interface TextAreaProps extends BaseTextFieldProps, MinMaxLengthProps {
|
|
1688
|
-
}
|
|
1689
|
-
export { TextAreaProps }
|
|
1690
|
-
export { TextAreaProps as TextAreaProps_alias_1 }
|
|
207
|
+
export { PublicTagsProps as TagsProps }
|
|
208
|
+
export { PublicTagsProps as TagsProps_alias_1 }
|
|
1691
209
|
|
|
1692
|
-
export
|
|
210
|
+
export { PublicTextAreaProps as TextAreaProps }
|
|
211
|
+
export { PublicTextAreaProps as TextAreaProps_alias_1 }
|
|
1693
212
|
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
* Field allows to give a single line for a brief answer.
|
|
1697
|
-
* Used with fieldMap key: TEXT_INPUT
|
|
1698
|
-
*
|
|
1699
|
-
* @interface TextInputProps
|
|
1700
|
-
*
|
|
1701
|
-
* @property {string} id - The unique identifier for the form field
|
|
1702
|
-
* @property {string | null | undefined} value - The current value of the form field
|
|
1703
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1704
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1705
|
-
* @property {string} label - The display label for the form field
|
|
1706
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1707
|
-
* @property {string} [placeholder] - Optional placeholder text to display when the field is empty
|
|
1708
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1709
|
-
* @property {number} [minLength] - Optional minimum number of characters required
|
|
1710
|
-
* @property {number} [maxLength] - Optional maximum number of characters allowed
|
|
1711
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1712
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1713
|
-
* @property {function} onBlur - Callback function called when the field loses focus
|
|
1714
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1715
|
-
*
|
|
1716
|
-
* @example
|
|
1717
|
-
* ```tsx
|
|
1718
|
-
* const textInputField: TextInputProps = {
|
|
1719
|
-
* id: 'firstName',
|
|
1720
|
-
* value: 'John',
|
|
1721
|
-
* required: true,
|
|
1722
|
-
* readOnly: false,
|
|
1723
|
-
* label: 'First Name',
|
|
1724
|
-
* showLabel: true,
|
|
1725
|
-
* placeholder: 'Enter your first name',
|
|
1726
|
-
* description: { nodes: [{ type: 'text', text: 'Your given name' }] },
|
|
1727
|
-
* minLength: 1,
|
|
1728
|
-
* maxLength: 50,
|
|
1729
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1730
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1731
|
-
* onFocus: () => console.log('Field focused')
|
|
1732
|
-
* };
|
|
1733
|
-
* ```
|
|
1734
|
-
*/
|
|
1735
|
-
declare interface TextInputProps extends BaseTextFieldProps, MinMaxLengthProps {
|
|
1736
|
-
}
|
|
1737
|
-
export { TextInputProps }
|
|
1738
|
-
export { TextInputProps as TextInputProps_alias_1 }
|
|
213
|
+
export { PublicTextInputProps as TextInputProps }
|
|
214
|
+
export { PublicTextInputProps as TextInputProps_alias_1 }
|
|
1739
215
|
|
|
1740
|
-
export
|
|
216
|
+
export { PublicTimeInputProps as TimeInputProps }
|
|
217
|
+
export { PublicTimeInputProps as TimeInputProps_alias_1 }
|
|
1741
218
|
|
|
1742
|
-
export
|
|
219
|
+
export { SchemaFieldType }
|
|
1743
220
|
|
|
1744
|
-
|
|
1745
|
-
* Props for time input field.
|
|
1746
|
-
* Field allows to enetr a time.
|
|
1747
|
-
* Used with fieldMap key: TIME_INPUT
|
|
1748
|
-
*
|
|
1749
|
-
* @interface TimeInputProps
|
|
1750
|
-
*
|
|
1751
|
-
* @property {string} id - The unique identifier for the form field
|
|
1752
|
-
* @property {string | null | undefined} value - The current value of the form field (time string format: HH:mm or HH:mm:ss)
|
|
1753
|
-
* @property {string} label - The display label for the form field
|
|
1754
|
-
* @property {boolean} required - Whether the field is required for form submission
|
|
1755
|
-
* @property {boolean} readOnly - Whether the field is read-only and cannot be edited by the user
|
|
1756
|
-
* @property {RichContent} [description] - Optional rich content description for the field
|
|
1757
|
-
* @property {boolean} showLabel - Whether to display the field label
|
|
1758
|
-
* @property {boolean} showPlaceholder - Whether to show placeholder text in the input
|
|
1759
|
-
* @property {boolean} use24HourFormat - Whether to use 24-hour format for time input (defaults to true)
|
|
1760
|
-
* @property {string} [error] - Error message to display when validation fails (undefined when valid)
|
|
1761
|
-
* @property {function} onChange - Callback function called when the field value changes
|
|
1762
|
-
* @property {function} onBlur - Callback function callezqd when the field loses focus
|
|
1763
|
-
* @property {function} onFocus - Callback function called when the field gains focus
|
|
1764
|
-
*
|
|
1765
|
-
* @example
|
|
1766
|
-
* ```tsx
|
|
1767
|
-
* const timeField: TimeInputProps = {
|
|
1768
|
-
* id: 'appointment-time',
|
|
1769
|
-
* value: '14:30',
|
|
1770
|
-
* label: 'Appointment Time',
|
|
1771
|
-
* required: true,
|
|
1772
|
-
* readOnly: false,
|
|
1773
|
-
* showLabel: true,
|
|
1774
|
-
* showPlaceholder: true,
|
|
1775
|
-
* use24HourFormat: true,
|
|
1776
|
-
* onChange: (value) => console.log('Value changed:', value),
|
|
1777
|
-
* onBlur: () => console.log('Field blurred'),
|
|
1778
|
-
* onFocus: () => console.log('Field focused')
|
|
1779
|
-
* };
|
|
1780
|
-
* ```
|
|
1781
|
-
*/
|
|
1782
|
-
declare interface TimeInputProps extends BaseFieldProps {
|
|
1783
|
-
value: string | null | undefined;
|
|
1784
|
-
label: string;
|
|
1785
|
-
showLabel: boolean;
|
|
1786
|
-
showPlaceholder: boolean;
|
|
1787
|
-
use24HourFormat: boolean;
|
|
1788
|
-
description?: RichContent;
|
|
1789
|
-
}
|
|
1790
|
-
export { TimeInputProps }
|
|
1791
|
-
export { TimeInputProps as TimeInputProps_alias_1 }
|
|
221
|
+
export { useFieldProps }
|
|
1792
222
|
|
|
1793
223
|
declare const useForm: ({ form: unformattedForm, values, onChange, errors, onValidate, submitForm, fieldMap: fields, }: UseFormProps) => UseFormReturn;
|
|
1794
224
|
export { useForm }
|
|
@@ -1810,14 +240,14 @@ declare type UseFormReturn = {
|
|
|
1810
240
|
fieldsLayout: Record<string, Layout>;
|
|
1811
241
|
} | null;
|
|
1812
242
|
|
|
1813
|
-
|
|
243
|
+
declare type ValueType = string | number | boolean | string[] | null | undefined | VatIDValue | ProductListValue | WixFile[] | MultilineAddressSubmission | AppointmentSubmitData;
|
|
1814
244
|
|
|
1815
|
-
|
|
245
|
+
declare type VatIDValue = {
|
|
1816
246
|
id: string;
|
|
1817
247
|
type?: string;
|
|
1818
248
|
};
|
|
1819
249
|
|
|
1820
|
-
|
|
250
|
+
declare interface WixFile {
|
|
1821
251
|
fileId: string;
|
|
1822
252
|
displayName: string;
|
|
1823
253
|
url?: string;
|