@kanorio/elements 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/AudioPlayer-DKUAB5KE.js +2 -0
- package/dist/AudioPlayer-S7YF7A2E.js +2 -0
- package/dist/CustomerAccountPanel-DJKV7LT4.js +2 -0
- package/dist/CustomerAccountPanel-RWEHWBJY.js +2 -0
- package/dist/FormAddressField-C6VN7J6I.js +2 -0
- package/dist/FormAddressField-QR7ZCH77.js +2 -0
- package/dist/FormChoiceDropdown-SJXD26CC.js +2 -0
- package/dist/FormChoiceDropdown-U3NIOOHG.js +2 -0
- package/dist/FormFileField-LZDCXI2Z.js +2 -0
- package/dist/FormFileField-ONL4Q55V.js +2 -0
- package/dist/FormTaxIdField-K34MDUPW.js +2 -0
- package/dist/FormTaxIdField-XMK5WRQO.js +2 -0
- package/dist/KanorioAccount-EN3TM67X.js +2 -0
- package/dist/KanorioAccount-XGVSGVYN.js +2 -0
- package/dist/KanorioAnalytics-NEKTFQEE.js +2 -0
- package/dist/KanorioAnalytics-UMCUWQM7.js +2 -0
- package/dist/KanorioCurriculum-3QSCOHK7.js +2 -0
- package/dist/KanorioCurriculum-RUIGZ5X7.js +2 -0
- package/dist/KanorioForm-GUA5GEJY.js +2 -0
- package/dist/KanorioForm-KXV7D2TU.js +2 -0
- package/dist/KanorioLightbox-M72HNQQX.js +2 -0
- package/dist/KanorioLightbox-TQ3Q73TD.js +2 -0
- package/dist/KanorioLogin-5XFN3YEE.js +2 -0
- package/dist/KanorioLogin-AJHHVQGV.js +2 -0
- package/dist/KanorioMedia-ADKUDH5C.js +2 -0
- package/dist/KanorioMedia-DLBSXCKA.js +2 -0
- package/dist/KanorioReviews-42FZSXTI.js +2 -0
- package/dist/KanorioReviews-7LD5WKFG.js +2 -0
- package/dist/KanorioUnit-NWBX5DEI.js +2 -0
- package/dist/KanorioUnit-SIM3344J.js +2 -0
- package/dist/MediaPlayer-F43FPK4E.js +2 -0
- package/dist/MediaPlayer-JHFZFOOG.js +2 -0
- package/dist/{PDFViewerFull-KMUVT2BL.js → PDFViewerFull-CB44M7GW.js} +3 -3
- package/dist/{PDFViewerFull-FBLYNUDX.js → PDFViewerFull-INVHZL4V.js} +2 -2
- package/dist/VideoPlayer-FWZF4DQK.js +2 -0
- package/dist/VideoPlayer-LNS7XJ4C.js +2 -0
- package/dist/account.d.ts +165 -0
- package/dist/account.js +2 -0
- package/dist/analytics.d.ts +44 -0
- package/dist/analytics.js +2 -0
- package/dist/bot-protection.d.ts +297 -0
- package/dist/bot-protection.js +2 -0
- package/dist/chunk-2E6RCDAA.js +2 -0
- package/dist/chunk-2FSD3N7F.js +6 -0
- package/dist/chunk-2J5XQK4H.js +2 -0
- package/dist/chunk-2LOQXVFI.js +2 -0
- package/dist/chunk-2ONAW3CA.js +2 -0
- package/dist/chunk-33AQQY6T.js +69 -0
- package/dist/chunk-36YEGBKK.js +2 -0
- package/dist/chunk-4BBERZ6T.js +2 -0
- package/dist/chunk-4BEKWYEW.js +2 -0
- package/dist/chunk-4DPSNQEI.js +2 -0
- package/dist/chunk-4KA3HSRQ.js +2 -0
- package/dist/chunk-4MOCTNN7.js +2 -0
- package/dist/chunk-5AUWUK5R.js +2 -0
- package/dist/chunk-5G3PQI25.js +2 -0
- package/dist/chunk-5HWAL7VK.js +2 -0
- package/dist/chunk-63XJWMJG.js +2 -0
- package/dist/chunk-66XN5RR4.js +2 -0
- package/dist/chunk-6RZBXZFP.js +2 -0
- package/dist/chunk-763LNERD.js +2 -0
- package/dist/chunk-7XWBVRXP.js +15 -0
- package/dist/chunk-A4DPHHAP.js +42 -0
- package/dist/chunk-AF46NLXK.js +2 -0
- package/dist/chunk-AFNEGNVJ.js +2 -0
- package/dist/chunk-AQ6F6MIJ.js +2 -0
- package/dist/chunk-ARU5PTJV.js +2 -0
- package/dist/chunk-B7KLKVIM.js +2 -0
- package/dist/chunk-BGVTMWPN.js +2 -0
- package/dist/chunk-BKNL7ZCI.js +2 -0
- package/dist/chunk-BU7KUHZK.js +8 -0
- package/dist/chunk-C7HUM2EN.js +2 -0
- package/dist/chunk-CU2JJTXI.js +2 -0
- package/dist/{chunk-5U2SZE3H.js → chunk-CUQUEGX2.js} +2 -2
- package/dist/chunk-D7K3YCBR.js +2 -0
- package/dist/chunk-DLJDYXKL.js +2 -0
- package/dist/chunk-DTBRUBPG.js +2 -0
- package/dist/chunk-E77WGXYW.js +2 -0
- package/dist/chunk-EE4S6NRV.js +3 -0
- package/dist/chunk-ET57PWXC.js +2 -0
- package/dist/chunk-EZMTUAQX.js +2 -0
- package/dist/chunk-FFAWYDLJ.js +2 -0
- package/dist/chunk-FQCA2VGY.js +2 -0
- package/dist/chunk-FSY5GB5E.js +3 -0
- package/dist/chunk-G4U6BFZY.js +2 -0
- package/dist/chunk-GJY6AQIS.js +2 -0
- package/dist/chunk-GMW7AUSG.js +2 -0
- package/dist/chunk-GZCED6V3.js +2 -0
- package/dist/chunk-H2XQYT62.js +2 -0
- package/dist/chunk-H7VP4BYY.js +2 -0
- package/dist/chunk-HFYLTH5B.js +2 -0
- package/dist/chunk-IAXVJLJ3.js +2 -0
- package/dist/chunk-IXDKZO42.js +2 -0
- package/dist/chunk-J37D44SX.js +2 -0
- package/dist/chunk-JH5D6YJX.js +2 -0
- package/dist/chunk-JREL5347.js +2 -0
- package/dist/chunk-K2XZKV3Q.js +2 -0
- package/dist/chunk-K4VRRKYJ.js +2 -0
- package/dist/chunk-KBKDMTYF.js +2 -0
- package/dist/chunk-KDNGDR64.js +2 -0
- package/dist/chunk-KNNN5V3T.js +2 -0
- package/dist/chunk-LWKCGUHS.js +2 -0
- package/dist/chunk-LWRWKZBC.js +2 -0
- package/dist/chunk-LXNMHQFN.js +2 -0
- package/dist/chunk-MC63CLSM.js +2 -0
- package/dist/chunk-MIQK3T3Y.js +2 -0
- package/dist/chunk-MQ7PBFUM.js +4 -0
- package/dist/chunk-MWPRTK32.js +2 -0
- package/dist/chunk-MXGMJAWS.js +2 -0
- package/dist/chunk-N4BGAMWD.js +2 -0
- package/dist/chunk-N5PIQM4L.js +3 -0
- package/dist/chunk-NBDRYQZV.js +2 -0
- package/dist/chunk-NGRNPVON.js +2 -0
- package/dist/chunk-NSY72ZYX.js +15 -0
- package/dist/chunk-O2SYHUQF.js +2 -0
- package/dist/chunk-OIKRLEW6.js +2 -0
- package/dist/chunk-OTK4YNSG.js +2 -0
- package/dist/chunk-OU4IOHLN.js +15 -0
- package/dist/chunk-PR2NRUEI.js +2 -0
- package/dist/chunk-QGR3QAQB.js +3 -0
- package/dist/chunk-QOQQCCID.js +2 -0
- package/dist/chunk-RG5JA44V.js +2 -0
- package/dist/chunk-RKEHHJDU.js +2 -0
- package/dist/chunk-S2NFWI7C.js +69 -0
- package/dist/chunk-S7FE2XRA.js +2 -0
- package/dist/chunk-SUXTLVTX.js +2 -0
- package/dist/chunk-SVWEVSYJ.js +2 -0
- package/dist/chunk-TEUQV3AT.js +2 -0
- package/dist/chunk-U7H3W23Q.js +2 -0
- package/dist/chunk-U7KVGD47.js +2 -0
- package/dist/chunk-UIHBR4NU.js +3 -0
- package/dist/chunk-UM74DXPE.js +2 -0
- package/dist/chunk-VKSYPXNL.js +2 -0
- package/dist/chunk-VUTODQFX.js +2 -0
- package/dist/chunk-VYSRVTYI.js +2 -0
- package/dist/chunk-W32ZFOPN.js +2 -0
- package/dist/chunk-W63RJF6Q.js +2 -0
- package/dist/chunk-WM5S3YN5.js +2 -0
- package/dist/chunk-WP7UEAIB.js +2 -0
- package/dist/chunk-WXIUWMFR.js +2 -0
- package/dist/chunk-Z4A5NQWJ.js +2 -0
- package/dist/chunk-Z4OV6QHI.js +2 -0
- package/dist/curriculum.d.ts +20 -0
- package/dist/curriculum.js +2 -0
- package/dist/deliverables-BDS7WMBC.js +99 -0
- package/dist/deliverables-C5RD2ASE.js +131 -0
- package/dist/elements.css +1 -1
- package/dist/events-CJeBru-H.d.ts +11 -0
- package/dist/form.d.ts +775 -0
- package/dist/form.js +2 -0
- package/dist/forms-answers-address-7P6EVFY5.js +2 -0
- package/dist/forms-answers-address-IQV2Y56H.js +2 -0
- package/dist/forms-answers-phone-2VZ46OME.js +2 -0
- package/dist/forms-answers-phone-5PUB5WKD.js +2 -0
- package/dist/forms-answers-tax-id-D4GOUC6N.js +2 -0
- package/dist/forms-answers-tax-id-WJD7K3PG.js +2 -0
- package/dist/index.d.ts +17 -3045
- package/dist/index.js +1 -1
- package/dist/kanorio-elements.js +9 -73
- package/dist/lightbox-DEvsB5dB.d.ts +100 -0
- package/dist/lightbox.d.ts +5 -0
- package/dist/lightbox.js +2 -0
- package/dist/login.d.ts +14 -0
- package/dist/login.js +2 -0
- package/dist/media.d.ts +85 -0
- package/dist/media.js +2 -0
- package/dist/phone-input-Q5AV6KSW.js +2 -0
- package/dist/phone-input-T6QX2TDS.js +2 -0
- package/dist/provider-CMLzyAjJ.d.ts +1277 -0
- package/dist/provider.d.ts +4 -0
- package/dist/provider.js +2 -0
- package/dist/reviews.d.ts +42 -0
- package/dist/reviews.js +2 -0
- package/dist/unit.d.ts +118 -0
- package/dist/unit.js +2 -0
- package/dist/{vidstack-BmcqUMKx-XYI2YLUH.js → vidstack-BmcqUMKx-FXVV4FRB.js} +2 -2
- package/dist/{vidstack-GkTzay8D-PBE5ZIYA.js → vidstack-GkTzay8D-53C3FRCO.js} +2 -2
- package/dist/web-components.d.ts +13 -1
- package/dist/web-components.js +1 -1
- package/dist/wire-ofSodpi1.d.ts +176 -0
- package/package.json +46 -2
- package/dist/MediaPlayer-7IBSXL7Q.js +0 -2
- package/dist/MediaPlayer-HTXF4T2V.js +0 -2
- package/dist/chunk-2UVUNYL6.js +0 -2
- package/dist/chunk-3OGF7I4H.js +0 -2
- package/dist/chunk-5AWUTOK7.js +0 -2
- package/dist/chunk-DTDUK36B.js +0 -8
- package/dist/chunk-JZXJO62T.js +0 -15
- package/dist/chunk-LLHBSWTL.js +0 -2
- package/dist/chunk-NOCGHD2O.js +0 -2
- package/dist/chunk-S4ZA2INU.js +0 -415
- package/dist/chunk-TLBIYET7.js +0 -404
- package/dist/chunk-TLRFFLH4.js +0 -94
- package/dist/chunk-U3U5KVR6.js +0 -2
- package/dist/chunk-UBMXRFSK.js +0 -4
- package/dist/deliverables-FBCRGMTB.js +0 -93
- package/dist/deliverables-FMKPDHJH.js +0 -92
package/dist/form.d.ts
ADDED
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { K as KanorioConfig } from './provider-CMLzyAjJ.js';
|
|
3
|
+
import { z } from 'zod';
|
|
4
|
+
export { F as FORM_SUBMIT_EVENT } from './events-CJeBru-H.js';
|
|
5
|
+
export { KanorioBotProtection, KanorioBotProtectionAltcha, UseKanorioBotProtectionOptions, useKanorioBotProtection } from './bot-protection.js';
|
|
6
|
+
import 'react';
|
|
7
|
+
import '@kanorio/sdk';
|
|
8
|
+
|
|
9
|
+
/** Maximum column options: 1 to 5 columns (no auto; each section's UI may lower the limit) */
|
|
10
|
+
type MaxColumnsValue = 1 | 2 | 3 | 4 | 5 | 6;
|
|
11
|
+
/** Maximum columns per device (phone / tablet / desktop) */
|
|
12
|
+
type MaxColumnsConfig = {
|
|
13
|
+
mobile?: MaxColumnsValue;
|
|
14
|
+
tablet?: MaxColumnsValue;
|
|
15
|
+
desktop?: MaxColumnsValue;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* The single source of truth for the online form schema.
|
|
20
|
+
*
|
|
21
|
+
* - `formFieldSchema` and `formSettingsSchema`: the form definition the owner sets up in the dashboard
|
|
22
|
+
* - Validation and normalization of visitor answers live in `validateFormAnswers` (`forms-answers.ts`); the server's submit endpoint and the public form widget share the same rules
|
|
23
|
+
*
|
|
24
|
+
* Pure functions with no DOM or database dependency, importable by the editor, hosted sites and the server.
|
|
25
|
+
* See Kanorio's forms documentation.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
declare const formFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"short_text">;
|
|
30
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
pattern: z.ZodOptional<z.ZodString>;
|
|
33
|
+
patternMessage: z.ZodOptional<z.ZodString>;
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
label: z.ZodString;
|
|
36
|
+
description: z.ZodOptional<z.ZodString>;
|
|
37
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
38
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
39
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
41
|
+
all: "all";
|
|
42
|
+
any: "any";
|
|
43
|
+
}>>;
|
|
44
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
45
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
46
|
+
field: "field";
|
|
47
|
+
hidden: "hidden";
|
|
48
|
+
}>>;
|
|
49
|
+
ref: z.ZodString;
|
|
50
|
+
op: z.ZodEnum<{
|
|
51
|
+
includes: "includes";
|
|
52
|
+
answered: "answered";
|
|
53
|
+
not_answered: "not_answered";
|
|
54
|
+
not_includes: "not_includes";
|
|
55
|
+
equals: "equals";
|
|
56
|
+
not_equals: "not_equals";
|
|
57
|
+
contains: "contains";
|
|
58
|
+
gt: "gt";
|
|
59
|
+
gte: "gte";
|
|
60
|
+
lt: "lt";
|
|
61
|
+
lte: "lte";
|
|
62
|
+
}>;
|
|
63
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
64
|
+
}, z.core.$strip>>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
67
|
+
type: z.ZodLiteral<"long_text">;
|
|
68
|
+
minLength: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
maxLength: z.ZodOptional<z.ZodNumber>;
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
label: z.ZodString;
|
|
72
|
+
description: z.ZodOptional<z.ZodString>;
|
|
73
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
74
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
75
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
76
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
77
|
+
all: "all";
|
|
78
|
+
any: "any";
|
|
79
|
+
}>>;
|
|
80
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
81
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
82
|
+
field: "field";
|
|
83
|
+
hidden: "hidden";
|
|
84
|
+
}>>;
|
|
85
|
+
ref: z.ZodString;
|
|
86
|
+
op: z.ZodEnum<{
|
|
87
|
+
includes: "includes";
|
|
88
|
+
answered: "answered";
|
|
89
|
+
not_answered: "not_answered";
|
|
90
|
+
not_includes: "not_includes";
|
|
91
|
+
equals: "equals";
|
|
92
|
+
not_equals: "not_equals";
|
|
93
|
+
contains: "contains";
|
|
94
|
+
gt: "gt";
|
|
95
|
+
gte: "gte";
|
|
96
|
+
lt: "lt";
|
|
97
|
+
lte: "lte";
|
|
98
|
+
}>;
|
|
99
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
}, z.core.$strip>>;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"email">;
|
|
104
|
+
required: z.ZodPipe<z.ZodDefault<z.ZodBoolean>, z.ZodTransform<boolean, boolean>>;
|
|
105
|
+
contactMapping: z.ZodDefault<z.ZodLiteral<"email">>;
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
label: z.ZodString;
|
|
108
|
+
description: z.ZodOptional<z.ZodString>;
|
|
109
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
110
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
111
|
+
all: "all";
|
|
112
|
+
any: "any";
|
|
113
|
+
}>>;
|
|
114
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
115
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
116
|
+
field: "field";
|
|
117
|
+
hidden: "hidden";
|
|
118
|
+
}>>;
|
|
119
|
+
ref: z.ZodString;
|
|
120
|
+
op: z.ZodEnum<{
|
|
121
|
+
includes: "includes";
|
|
122
|
+
answered: "answered";
|
|
123
|
+
not_answered: "not_answered";
|
|
124
|
+
not_includes: "not_includes";
|
|
125
|
+
equals: "equals";
|
|
126
|
+
not_equals: "not_equals";
|
|
127
|
+
contains: "contains";
|
|
128
|
+
gt: "gt";
|
|
129
|
+
gte: "gte";
|
|
130
|
+
lt: "lt";
|
|
131
|
+
lte: "lte";
|
|
132
|
+
}>;
|
|
133
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
134
|
+
}, z.core.$strip>>;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
type: z.ZodLiteral<"phone">;
|
|
138
|
+
contactMapping: z.ZodDefault<z.ZodLiteral<"phone">>;
|
|
139
|
+
defaultCountry: z.ZodOptional<z.ZodString>;
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
label: z.ZodString;
|
|
142
|
+
description: z.ZodOptional<z.ZodString>;
|
|
143
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
144
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
146
|
+
all: "all";
|
|
147
|
+
any: "any";
|
|
148
|
+
}>>;
|
|
149
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
150
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
151
|
+
field: "field";
|
|
152
|
+
hidden: "hidden";
|
|
153
|
+
}>>;
|
|
154
|
+
ref: z.ZodString;
|
|
155
|
+
op: z.ZodEnum<{
|
|
156
|
+
includes: "includes";
|
|
157
|
+
answered: "answered";
|
|
158
|
+
not_answered: "not_answered";
|
|
159
|
+
not_includes: "not_includes";
|
|
160
|
+
equals: "equals";
|
|
161
|
+
not_equals: "not_equals";
|
|
162
|
+
contains: "contains";
|
|
163
|
+
gt: "gt";
|
|
164
|
+
gte: "gte";
|
|
165
|
+
lt: "lt";
|
|
166
|
+
lte: "lte";
|
|
167
|
+
}>;
|
|
168
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<"choice">;
|
|
173
|
+
options: z.ZodArray<z.ZodObject<{
|
|
174
|
+
id: z.ZodString;
|
|
175
|
+
label: z.ZodString;
|
|
176
|
+
}, z.core.$strip>>;
|
|
177
|
+
allowMultiple: z.ZodDefault<z.ZodBoolean>;
|
|
178
|
+
allowOther: z.ZodDefault<z.ZodBoolean>;
|
|
179
|
+
display: z.ZodDefault<z.ZodEnum<{
|
|
180
|
+
list: "list";
|
|
181
|
+
dropdown: "dropdown";
|
|
182
|
+
}>>;
|
|
183
|
+
minSelections: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
label: z.ZodString;
|
|
187
|
+
description: z.ZodOptional<z.ZodString>;
|
|
188
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
189
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
190
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
192
|
+
all: "all";
|
|
193
|
+
any: "any";
|
|
194
|
+
}>>;
|
|
195
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
196
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
197
|
+
field: "field";
|
|
198
|
+
hidden: "hidden";
|
|
199
|
+
}>>;
|
|
200
|
+
ref: z.ZodString;
|
|
201
|
+
op: z.ZodEnum<{
|
|
202
|
+
includes: "includes";
|
|
203
|
+
answered: "answered";
|
|
204
|
+
not_answered: "not_answered";
|
|
205
|
+
not_includes: "not_includes";
|
|
206
|
+
equals: "equals";
|
|
207
|
+
not_equals: "not_equals";
|
|
208
|
+
contains: "contains";
|
|
209
|
+
gt: "gt";
|
|
210
|
+
gte: "gte";
|
|
211
|
+
lt: "lt";
|
|
212
|
+
lte: "lte";
|
|
213
|
+
}>;
|
|
214
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
215
|
+
}, z.core.$strip>>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
type: z.ZodLiteral<"date">;
|
|
219
|
+
range: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
min: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
221
|
+
type: z.ZodLiteral<"today">;
|
|
222
|
+
offsetDays: z.ZodDefault<z.ZodNumber>;
|
|
223
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
224
|
+
type: z.ZodLiteral<"date">;
|
|
225
|
+
value: z.ZodString;
|
|
226
|
+
}, z.core.$strip>], "type">>;
|
|
227
|
+
max: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
228
|
+
type: z.ZodLiteral<"today">;
|
|
229
|
+
offsetDays: z.ZodDefault<z.ZodNumber>;
|
|
230
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
231
|
+
type: z.ZodLiteral<"date">;
|
|
232
|
+
value: z.ZodString;
|
|
233
|
+
}, z.core.$strip>], "type">>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
id: z.ZodString;
|
|
236
|
+
label: z.ZodString;
|
|
237
|
+
description: z.ZodOptional<z.ZodString>;
|
|
238
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
239
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
240
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
241
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
242
|
+
all: "all";
|
|
243
|
+
any: "any";
|
|
244
|
+
}>>;
|
|
245
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
246
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
247
|
+
field: "field";
|
|
248
|
+
hidden: "hidden";
|
|
249
|
+
}>>;
|
|
250
|
+
ref: z.ZodString;
|
|
251
|
+
op: z.ZodEnum<{
|
|
252
|
+
includes: "includes";
|
|
253
|
+
answered: "answered";
|
|
254
|
+
not_answered: "not_answered";
|
|
255
|
+
not_includes: "not_includes";
|
|
256
|
+
equals: "equals";
|
|
257
|
+
not_equals: "not_equals";
|
|
258
|
+
contains: "contains";
|
|
259
|
+
gt: "gt";
|
|
260
|
+
gte: "gte";
|
|
261
|
+
lt: "lt";
|
|
262
|
+
lte: "lte";
|
|
263
|
+
}>;
|
|
264
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
265
|
+
}, z.core.$strip>>;
|
|
266
|
+
}, z.core.$strip>>;
|
|
267
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
268
|
+
type: z.ZodLiteral<"time">;
|
|
269
|
+
id: z.ZodString;
|
|
270
|
+
label: z.ZodString;
|
|
271
|
+
description: z.ZodOptional<z.ZodString>;
|
|
272
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
273
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
274
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
275
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
276
|
+
all: "all";
|
|
277
|
+
any: "any";
|
|
278
|
+
}>>;
|
|
279
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
280
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
281
|
+
field: "field";
|
|
282
|
+
hidden: "hidden";
|
|
283
|
+
}>>;
|
|
284
|
+
ref: z.ZodString;
|
|
285
|
+
op: z.ZodEnum<{
|
|
286
|
+
includes: "includes";
|
|
287
|
+
answered: "answered";
|
|
288
|
+
not_answered: "not_answered";
|
|
289
|
+
not_includes: "not_includes";
|
|
290
|
+
equals: "equals";
|
|
291
|
+
not_equals: "not_equals";
|
|
292
|
+
contains: "contains";
|
|
293
|
+
gt: "gt";
|
|
294
|
+
gte: "gte";
|
|
295
|
+
lt: "lt";
|
|
296
|
+
lte: "lte";
|
|
297
|
+
}>;
|
|
298
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
299
|
+
}, z.core.$strip>>;
|
|
300
|
+
}, z.core.$strip>>;
|
|
301
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
302
|
+
type: z.ZodLiteral<"file">;
|
|
303
|
+
maxFiles: z.ZodDefault<z.ZodNumber>;
|
|
304
|
+
accept: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
305
|
+
id: z.ZodString;
|
|
306
|
+
label: z.ZodString;
|
|
307
|
+
description: z.ZodOptional<z.ZodString>;
|
|
308
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
309
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
310
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
312
|
+
all: "all";
|
|
313
|
+
any: "any";
|
|
314
|
+
}>>;
|
|
315
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
316
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
317
|
+
field: "field";
|
|
318
|
+
hidden: "hidden";
|
|
319
|
+
}>>;
|
|
320
|
+
ref: z.ZodString;
|
|
321
|
+
op: z.ZodEnum<{
|
|
322
|
+
includes: "includes";
|
|
323
|
+
answered: "answered";
|
|
324
|
+
not_answered: "not_answered";
|
|
325
|
+
not_includes: "not_includes";
|
|
326
|
+
equals: "equals";
|
|
327
|
+
not_equals: "not_equals";
|
|
328
|
+
contains: "contains";
|
|
329
|
+
gt: "gt";
|
|
330
|
+
gte: "gte";
|
|
331
|
+
lt: "lt";
|
|
332
|
+
lte: "lte";
|
|
333
|
+
}>;
|
|
334
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
335
|
+
}, z.core.$strip>>;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
338
|
+
type: z.ZodLiteral<"rating">;
|
|
339
|
+
max: z.ZodDefault<z.ZodNumber>;
|
|
340
|
+
icon: z.ZodDefault<z.ZodEnum<{
|
|
341
|
+
heart: "heart";
|
|
342
|
+
star: "star";
|
|
343
|
+
thumb: "thumb";
|
|
344
|
+
}>>;
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
label: z.ZodString;
|
|
347
|
+
description: z.ZodOptional<z.ZodString>;
|
|
348
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
349
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
350
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
351
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
352
|
+
all: "all";
|
|
353
|
+
any: "any";
|
|
354
|
+
}>>;
|
|
355
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
356
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
357
|
+
field: "field";
|
|
358
|
+
hidden: "hidden";
|
|
359
|
+
}>>;
|
|
360
|
+
ref: z.ZodString;
|
|
361
|
+
op: z.ZodEnum<{
|
|
362
|
+
includes: "includes";
|
|
363
|
+
answered: "answered";
|
|
364
|
+
not_answered: "not_answered";
|
|
365
|
+
not_includes: "not_includes";
|
|
366
|
+
equals: "equals";
|
|
367
|
+
not_equals: "not_equals";
|
|
368
|
+
contains: "contains";
|
|
369
|
+
gt: "gt";
|
|
370
|
+
gte: "gte";
|
|
371
|
+
lt: "lt";
|
|
372
|
+
lte: "lte";
|
|
373
|
+
}>;
|
|
374
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
375
|
+
}, z.core.$strip>>;
|
|
376
|
+
}, z.core.$strip>>;
|
|
377
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"number">;
|
|
379
|
+
min: z.ZodOptional<z.ZodNumber>;
|
|
380
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
381
|
+
integer: z.ZodDefault<z.ZodBoolean>;
|
|
382
|
+
id: z.ZodString;
|
|
383
|
+
label: z.ZodString;
|
|
384
|
+
description: z.ZodOptional<z.ZodString>;
|
|
385
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
386
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
387
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
388
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
389
|
+
all: "all";
|
|
390
|
+
any: "any";
|
|
391
|
+
}>>;
|
|
392
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
393
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
394
|
+
field: "field";
|
|
395
|
+
hidden: "hidden";
|
|
396
|
+
}>>;
|
|
397
|
+
ref: z.ZodString;
|
|
398
|
+
op: z.ZodEnum<{
|
|
399
|
+
includes: "includes";
|
|
400
|
+
answered: "answered";
|
|
401
|
+
not_answered: "not_answered";
|
|
402
|
+
not_includes: "not_includes";
|
|
403
|
+
equals: "equals";
|
|
404
|
+
not_equals: "not_equals";
|
|
405
|
+
contains: "contains";
|
|
406
|
+
gt: "gt";
|
|
407
|
+
gte: "gte";
|
|
408
|
+
lt: "lt";
|
|
409
|
+
lte: "lte";
|
|
410
|
+
}>;
|
|
411
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
412
|
+
}, z.core.$strip>>;
|
|
413
|
+
}, z.core.$strip>>;
|
|
414
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
415
|
+
type: z.ZodLiteral<"url">;
|
|
416
|
+
id: z.ZodString;
|
|
417
|
+
label: z.ZodString;
|
|
418
|
+
description: z.ZodOptional<z.ZodString>;
|
|
419
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
420
|
+
contactMapping: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"name">, z.ZodLiteral<"email">, z.ZodLiteral<"phone">, z.ZodString]>>;
|
|
421
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
422
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
423
|
+
all: "all";
|
|
424
|
+
any: "any";
|
|
425
|
+
}>>;
|
|
426
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
427
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
428
|
+
field: "field";
|
|
429
|
+
hidden: "hidden";
|
|
430
|
+
}>>;
|
|
431
|
+
ref: z.ZodString;
|
|
432
|
+
op: z.ZodEnum<{
|
|
433
|
+
includes: "includes";
|
|
434
|
+
answered: "answered";
|
|
435
|
+
not_answered: "not_answered";
|
|
436
|
+
not_includes: "not_includes";
|
|
437
|
+
equals: "equals";
|
|
438
|
+
not_equals: "not_equals";
|
|
439
|
+
contains: "contains";
|
|
440
|
+
gt: "gt";
|
|
441
|
+
gte: "gte";
|
|
442
|
+
lt: "lt";
|
|
443
|
+
lte: "lte";
|
|
444
|
+
}>;
|
|
445
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
446
|
+
}, z.core.$strip>>;
|
|
447
|
+
}, z.core.$strip>>;
|
|
448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
449
|
+
type: z.ZodLiteral<"address">;
|
|
450
|
+
defaultCountry: z.ZodOptional<z.ZodString>;
|
|
451
|
+
countries: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
452
|
+
askRecipientName: z.ZodDefault<z.ZodBoolean>;
|
|
453
|
+
contactMapping: z.ZodOptional<z.ZodLiteral<"address">>;
|
|
454
|
+
id: z.ZodString;
|
|
455
|
+
label: z.ZodString;
|
|
456
|
+
description: z.ZodOptional<z.ZodString>;
|
|
457
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
458
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
459
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
460
|
+
all: "all";
|
|
461
|
+
any: "any";
|
|
462
|
+
}>>;
|
|
463
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
464
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
465
|
+
field: "field";
|
|
466
|
+
hidden: "hidden";
|
|
467
|
+
}>>;
|
|
468
|
+
ref: z.ZodString;
|
|
469
|
+
op: z.ZodEnum<{
|
|
470
|
+
includes: "includes";
|
|
471
|
+
answered: "answered";
|
|
472
|
+
not_answered: "not_answered";
|
|
473
|
+
not_includes: "not_includes";
|
|
474
|
+
equals: "equals";
|
|
475
|
+
not_equals: "not_equals";
|
|
476
|
+
contains: "contains";
|
|
477
|
+
gt: "gt";
|
|
478
|
+
gte: "gte";
|
|
479
|
+
lt: "lt";
|
|
480
|
+
lte: "lte";
|
|
481
|
+
}>;
|
|
482
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
483
|
+
}, z.core.$strip>>;
|
|
484
|
+
}, z.core.$strip>>;
|
|
485
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
486
|
+
type: z.ZodLiteral<"tax_id">;
|
|
487
|
+
defaultCountry: z.ZodOptional<z.ZodString>;
|
|
488
|
+
countries: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
489
|
+
companyNameFieldId: z.ZodOptional<z.ZodString>;
|
|
490
|
+
contactMapping: z.ZodOptional<z.ZodLiteral<"tax_identity">>;
|
|
491
|
+
id: z.ZodString;
|
|
492
|
+
label: z.ZodString;
|
|
493
|
+
description: z.ZodOptional<z.ZodString>;
|
|
494
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
495
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
496
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
497
|
+
all: "all";
|
|
498
|
+
any: "any";
|
|
499
|
+
}>>;
|
|
500
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
501
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
502
|
+
field: "field";
|
|
503
|
+
hidden: "hidden";
|
|
504
|
+
}>>;
|
|
505
|
+
ref: z.ZodString;
|
|
506
|
+
op: z.ZodEnum<{
|
|
507
|
+
includes: "includes";
|
|
508
|
+
answered: "answered";
|
|
509
|
+
not_answered: "not_answered";
|
|
510
|
+
not_includes: "not_includes";
|
|
511
|
+
equals: "equals";
|
|
512
|
+
not_equals: "not_equals";
|
|
513
|
+
contains: "contains";
|
|
514
|
+
gt: "gt";
|
|
515
|
+
gte: "gte";
|
|
516
|
+
lt: "lt";
|
|
517
|
+
lte: "lte";
|
|
518
|
+
}>;
|
|
519
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
520
|
+
}, z.core.$strip>>;
|
|
521
|
+
}, z.core.$strip>>;
|
|
522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
523
|
+
id: z.ZodString;
|
|
524
|
+
type: z.ZodLiteral<"statement">;
|
|
525
|
+
label: z.ZodString;
|
|
526
|
+
description: z.ZodOptional<z.ZodString>;
|
|
527
|
+
required: z.ZodPipe<z.ZodDefault<z.ZodBoolean>, z.ZodTransform<boolean, boolean>>;
|
|
528
|
+
contactMapping: z.ZodOptional<z.ZodUndefined>;
|
|
529
|
+
visibleWhen: z.ZodOptional<z.ZodObject<{
|
|
530
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
531
|
+
all: "all";
|
|
532
|
+
any: "any";
|
|
533
|
+
}>>;
|
|
534
|
+
conditions: z.ZodArray<z.ZodObject<{
|
|
535
|
+
kind: z.ZodDefault<z.ZodEnum<{
|
|
536
|
+
field: "field";
|
|
537
|
+
hidden: "hidden";
|
|
538
|
+
}>>;
|
|
539
|
+
ref: z.ZodString;
|
|
540
|
+
op: z.ZodEnum<{
|
|
541
|
+
includes: "includes";
|
|
542
|
+
answered: "answered";
|
|
543
|
+
not_answered: "not_answered";
|
|
544
|
+
not_includes: "not_includes";
|
|
545
|
+
equals: "equals";
|
|
546
|
+
not_equals: "not_equals";
|
|
547
|
+
contains: "contains";
|
|
548
|
+
gt: "gt";
|
|
549
|
+
gte: "gte";
|
|
550
|
+
lt: "lt";
|
|
551
|
+
lte: "lte";
|
|
552
|
+
}>;
|
|
553
|
+
value: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
554
|
+
}, z.core.$strip>>;
|
|
555
|
+
}, z.core.$strip>>;
|
|
556
|
+
}, z.core.$strip>], "type">;
|
|
557
|
+
type FormField = z.infer<typeof formFieldSchema>;
|
|
558
|
+
declare const formSettingsObjectSchema: z.ZodObject<{
|
|
559
|
+
submitLabel: z.ZodOptional<z.ZodString>;
|
|
560
|
+
successMessage: z.ZodOptional<z.ZodString>;
|
|
561
|
+
redirectUrl: z.ZodOptional<z.ZodString>;
|
|
562
|
+
marketingConsent: z.ZodDefault<z.ZodEnum<{
|
|
563
|
+
off: "off";
|
|
564
|
+
checkbox: "checkbox";
|
|
565
|
+
submit: "submit";
|
|
566
|
+
}>>;
|
|
567
|
+
consentText: z.ZodOptional<z.ZodObject<{
|
|
568
|
+
checkbox: z.ZodOptional<z.ZodString>;
|
|
569
|
+
submit: z.ZodOptional<z.ZodString>;
|
|
570
|
+
}, z.core.$strip>>;
|
|
571
|
+
limitOnePerContact: z.ZodDefault<z.ZodBoolean>;
|
|
572
|
+
openAt: z.ZodOptional<z.ZodCustomStringFormat<"datetime">>;
|
|
573
|
+
closeAt: z.ZodOptional<z.ZodCustomStringFormat<"datetime">>;
|
|
574
|
+
maxSubmissions: z.ZodOptional<z.ZodNumber>;
|
|
575
|
+
replyKind: z.ZodDefault<z.ZodEnum<{
|
|
576
|
+
inquiry: "inquiry";
|
|
577
|
+
booking: "booking";
|
|
578
|
+
event: "event";
|
|
579
|
+
application: "application";
|
|
580
|
+
signup: "signup";
|
|
581
|
+
feedback: "feedback";
|
|
582
|
+
general: "general";
|
|
583
|
+
}>>;
|
|
584
|
+
hiddenFields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
585
|
+
id: z.ZodString;
|
|
586
|
+
label: z.ZodOptional<z.ZodString>;
|
|
587
|
+
}, z.core.$strip>>>;
|
|
588
|
+
}, z.core.$strip>;
|
|
589
|
+
type FormSettings = z.infer<typeof formSettingsObjectSchema>;
|
|
590
|
+
declare const FORM_STATUSES: readonly ["DRAFT", "ACTIVE", "ARCHIVED"];
|
|
591
|
+
type FormStatusKey = (typeof FORM_STATUSES)[number];
|
|
592
|
+
/** The form definition for rendering on public sites (without the owner's internal fields) */
|
|
593
|
+
interface PublicFormDefinition {
|
|
594
|
+
id: string;
|
|
595
|
+
name: string;
|
|
596
|
+
description: string | null;
|
|
597
|
+
status: FormStatusKey;
|
|
598
|
+
fields: FormField[];
|
|
599
|
+
settings: FormSettings;
|
|
600
|
+
/** Number of non-spam submissions; used for the response limit (sent even when maxSubmissions is not set) */
|
|
601
|
+
submissionCount: number;
|
|
602
|
+
/** Identifier of the consent text of the current mode (the front end reports it back unchanged on submit and the server compares); null when off */
|
|
603
|
+
consentTextId: string | null;
|
|
604
|
+
/**
|
|
605
|
+
* The consent text of the current mode as the visitor should see it, in the requested language: the owner's own wording, or the platform
|
|
606
|
+
* default with the site name and the submit button text filled in. Null when consent is off. Set by the public forms API; a front end
|
|
607
|
+
* that draws its own form shows this text and reports `consentTextId` on submit, so the consent record matches what the visitor saw.
|
|
608
|
+
*/
|
|
609
|
+
consentText?: string | null;
|
|
610
|
+
/**
|
|
611
|
+
* The URL to go to after a successful submit; null or absent when not set. The front end uses this field and does not read `settings.redirectUrl`:
|
|
612
|
+
* on hosted sites the locale prefix of multilingual pages is added for it.
|
|
613
|
+
*/
|
|
614
|
+
redirectUrl?: string | null;
|
|
615
|
+
/** The site's default phone country (ISO 3166-1 alpha-2, from business location then site language); when a phone question has no default country code, the front end's initial code and the server's parsing both use it */
|
|
616
|
+
defaultPhoneCountry?: string | null;
|
|
617
|
+
/** The site's time zone (IANA); "from today" ranges of date questions are based on it, so the front end and the server compute the same day */
|
|
618
|
+
timezone?: string | null;
|
|
619
|
+
/** @deprecated Older public sites read this field; same value as defaultPhoneCountry, removed once all public sites are updated */
|
|
620
|
+
businessCountry: string | null;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Building section props (data logic only)
|
|
625
|
+
*
|
|
626
|
+
* Imports no React component; shared by the worker, the editor and the renderer.
|
|
627
|
+
* The component mapping is in sections.ts.
|
|
628
|
+
*/
|
|
629
|
+
|
|
630
|
+
/** Interface text of the form section (injected by the host on public sites and in the editor) */
|
|
631
|
+
interface FormSectionLabels {
|
|
632
|
+
submit?: string;
|
|
633
|
+
submitting?: string;
|
|
634
|
+
success?: string;
|
|
635
|
+
error?: string;
|
|
636
|
+
required?: string;
|
|
637
|
+
invalidEmail?: string;
|
|
638
|
+
invalidPhone?: string;
|
|
639
|
+
invalidDate?: string;
|
|
640
|
+
invalidTime?: string;
|
|
641
|
+
tooLong?: string;
|
|
642
|
+
/** "Other" is checked but left empty */
|
|
643
|
+
otherRequired?: string;
|
|
644
|
+
/** Submit-level errors (answers are kept and can be resent): one response per person, paused intake (daily cap), rate limit, expired bot protection */
|
|
645
|
+
duplicate?: string;
|
|
646
|
+
temporarilyUnavailable?: string;
|
|
647
|
+
rateLimited?: string;
|
|
648
|
+
verificationExpired?: string;
|
|
649
|
+
/** The server attached an error to a question this screen does not have: the visitor has an old version of the form open and should reload */
|
|
650
|
+
outdated?: string;
|
|
651
|
+
/** The whole response exceeds the submission size limit (nothing was stored) */
|
|
652
|
+
tooLarge?: string;
|
|
653
|
+
/** Submitted successfully and about to go to the URL the owner set */
|
|
654
|
+
redirecting?: string;
|
|
655
|
+
/** Generic error for a question: the server returned an error code this version of the front end does not know */
|
|
656
|
+
invalid?: string;
|
|
657
|
+
/** Text shorter than the minimum length; contains `{min}` */
|
|
658
|
+
tooShort?: string;
|
|
659
|
+
invalidNumber?: string;
|
|
660
|
+
/** The question accepts whole numbers only */
|
|
661
|
+
notInteger?: string;
|
|
662
|
+
/** Number range: lower bound only (`{min}`), upper bound only (`{max}`), or both */
|
|
663
|
+
numberMin?: string;
|
|
664
|
+
numberMax?: string;
|
|
665
|
+
numberRange?: string;
|
|
666
|
+
invalidUrl?: string;
|
|
667
|
+
/** Date range: `{min}` and `{max}` are dates formatted for the visitor's locale */
|
|
668
|
+
dateMin?: string;
|
|
669
|
+
dateMax?: string;
|
|
670
|
+
dateRange?: string;
|
|
671
|
+
/** Number of selections: `{min}` and `{max}` are option counts */
|
|
672
|
+
tooFewOptions?: string;
|
|
673
|
+
tooManyOptions?: string;
|
|
674
|
+
/** Text shown in a dropdown before anything is chosen */
|
|
675
|
+
selectPlaceholder?: string;
|
|
676
|
+
/** Address question: a field the country requires is missing, or the postal code format is wrong */
|
|
677
|
+
invalidAddress?: string;
|
|
678
|
+
/** Tax ID question: wrong format or check digit */
|
|
679
|
+
invalidTaxId?: string;
|
|
680
|
+
/** Tax ID question: looking up the registry */
|
|
681
|
+
taxIdChecking?: string;
|
|
682
|
+
/** Tax ID question: the registered name, contains `{name}` */
|
|
683
|
+
taxIdRegisteredName?: string;
|
|
684
|
+
/** Tax ID question: the registry shows the business as closed or dissolved */
|
|
685
|
+
taxIdInactive?: string;
|
|
686
|
+
/** Tax ID question: the data source, contains `{provider}` */
|
|
687
|
+
taxIdSource?: string;
|
|
688
|
+
invalidPostalCode?: string;
|
|
689
|
+
/** Names of the address question's fields; region, city and postal code use the key for that country's naming */
|
|
690
|
+
addressCountry?: string;
|
|
691
|
+
addressRecipient?: string;
|
|
692
|
+
addressLine1?: string;
|
|
693
|
+
addressLine2?: string;
|
|
694
|
+
addressPostal_postal?: string;
|
|
695
|
+
addressPostal_zip?: string;
|
|
696
|
+
addressPostal_pin?: string;
|
|
697
|
+
addressPostal_eircode?: string;
|
|
698
|
+
addressLocality_city?: string;
|
|
699
|
+
addressLocality_district?: string;
|
|
700
|
+
addressLocality_post_town?: string;
|
|
701
|
+
addressLocality_suburb?: string;
|
|
702
|
+
addressRegion_area?: string;
|
|
703
|
+
addressRegion_county?: string;
|
|
704
|
+
addressRegion_department?: string;
|
|
705
|
+
addressRegion_district?: string;
|
|
706
|
+
addressRegion_do_si?: string;
|
|
707
|
+
addressRegion_emirate?: string;
|
|
708
|
+
addressRegion_island?: string;
|
|
709
|
+
addressRegion_oblast?: string;
|
|
710
|
+
addressRegion_parish?: string;
|
|
711
|
+
addressRegion_prefecture?: string;
|
|
712
|
+
addressRegion_province?: string;
|
|
713
|
+
addressRegion_state?: string;
|
|
714
|
+
/** The platform's default text for the marketing consent checkbox (contains {siteName}); the owner can customize it in the form settings */
|
|
715
|
+
marketingOptIn?: string;
|
|
716
|
+
/** The platform's default notice for subscribing on submit (contains {siteName} and {button}); the owner can customize it in the form settings */
|
|
717
|
+
subscribeOnSubmit?: string;
|
|
718
|
+
otherOption?: string;
|
|
719
|
+
otherPlaceholder?: string;
|
|
720
|
+
closed?: string;
|
|
721
|
+
notOpenYet?: string;
|
|
722
|
+
full?: string;
|
|
723
|
+
/** File question type */
|
|
724
|
+
fileChoose?: string;
|
|
725
|
+
/** May contain the `{max}` (file count) and `{size}` (per-file limit) placeholders */
|
|
726
|
+
fileLimitHint?: string;
|
|
727
|
+
fileWaiting?: string;
|
|
728
|
+
fileUploading?: string;
|
|
729
|
+
fileUploadFailed?: string;
|
|
730
|
+
fileTooLarge?: string;
|
|
731
|
+
fileTypeNotAllowed?: string;
|
|
732
|
+
/** Quota full or service unavailable: the question is skipped and the form can still be submitted */
|
|
733
|
+
fileUnavailable?: string;
|
|
734
|
+
fileRemove?: string;
|
|
735
|
+
/** Editor only */
|
|
736
|
+
noFormSelected?: string;
|
|
737
|
+
formNotFound?: string;
|
|
738
|
+
previewNotice?: string;
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
interface KanorioFormProps extends KanorioConfig {
|
|
742
|
+
/** Form id (c...) */
|
|
743
|
+
formId: string;
|
|
744
|
+
/** Optional: a public form definition fetched ahead during SSR, which skips the first client-side GET */
|
|
745
|
+
definition?: PublicFormDefinition | null;
|
|
746
|
+
/** Questions per row (1 to 3); one column by default */
|
|
747
|
+
maxColumns?: MaxColumnsConfig;
|
|
748
|
+
/** The site's display name (interpolated as `{siteName}` in the marketing consent statement) */
|
|
749
|
+
siteName?: string;
|
|
750
|
+
/** Overrides for interface text */
|
|
751
|
+
labels?: FormSectionLabels;
|
|
752
|
+
/**
|
|
753
|
+
* Called after a successful submit (the DOM event `kanorio:form-submit` is dispatched too). `submissionId` is the id of this submission;
|
|
754
|
+
* `redirectUrl` is present when the form redirects after submit, with answers already filled in
|
|
755
|
+
*/
|
|
756
|
+
onSuccess?: (detail: {
|
|
757
|
+
formId: string;
|
|
758
|
+
redirectUrl?: string;
|
|
759
|
+
submissionId?: string;
|
|
760
|
+
}) => void;
|
|
761
|
+
/**
|
|
762
|
+
* Whether the component navigates when the form has a URL to go to after submit; true by default. In-site paths (`/thank-you`) are resolved against your site.
|
|
763
|
+
* Pass false to navigate with your own router, and take the URL from `redirectUrl` in `onSuccess`.
|
|
764
|
+
*/
|
|
765
|
+
followRedirect?: boolean;
|
|
766
|
+
/**
|
|
767
|
+
* Hidden field values: keys are the hidden field ids set for the form in the dashboard (for example `{ campaign: "spring", ref: userId }`).
|
|
768
|
+
* Without them the component reads same-named parameters from the current URL; when both exist, these win.
|
|
769
|
+
*/
|
|
770
|
+
hiddenValues?: Record<string, string>;
|
|
771
|
+
className?: string;
|
|
772
|
+
}
|
|
773
|
+
declare function KanorioForm({ formId, definition: initialDefinition, maxColumns, siteName, labels, onSuccess, followRedirect, hiddenValues, className, ...config }: KanorioFormProps): react_jsx_runtime.JSX.Element;
|
|
774
|
+
|
|
775
|
+
export { KanorioForm, type KanorioFormProps };
|