@payloadcms/plugin-form-builder 4.0.0-internal.fa345ef → 4.0.0-internal.fec2230
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/collections/FormSubmissions/fields/defaultPaymentFields.d.ts.map +1 -1
- package/dist/collections/FormSubmissions/fields/defaultPaymentFields.js +14 -7
- package/dist/collections/FormSubmissions/fields/defaultPaymentFields.js.map +1 -1
- package/dist/collections/FormSubmissions/hooks/createCharge.d.ts.map +1 -1
- package/dist/collections/FormSubmissions/hooks/handleUploads.d.ts.map +1 -1
- package/dist/collections/FormSubmissions/hooks/sendEmail.d.ts.map +1 -1
- package/dist/collections/FormSubmissions/index.d.ts.map +1 -1
- package/dist/collections/Forms/DynamicPriceSelector.js +1 -1
- package/dist/collections/Forms/DynamicPriceSelector.js.map +1 -1
- package/dist/collections/Forms/fields.d.ts.map +1 -1
- package/dist/collections/Forms/fields.js +156 -78
- package/dist/collections/Forms/fields.js.map +1 -1
- package/dist/collections/Forms/index.d.ts +1 -1
- package/dist/collections/Forms/index.d.ts.map +1 -1
- package/dist/collections/Forms/index.js +54 -19
- package/dist/collections/Forms/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/translations/index.d.ts +6 -0
- package/dist/translations/index.d.ts.map +1 -0
- package/dist/translations/index.js +92 -0
- package/dist/translations/index.js.map +1 -0
- package/dist/translations/languages/ar.d.ts +4 -0
- package/dist/translations/languages/ar.d.ts.map +1 -0
- package/dist/translations/languages/ar.js +101 -0
- package/dist/translations/languages/ar.js.map +1 -0
- package/dist/translations/languages/az.d.ts +4 -0
- package/dist/translations/languages/az.d.ts.map +1 -0
- package/dist/translations/languages/az.js +101 -0
- package/dist/translations/languages/az.js.map +1 -0
- package/dist/translations/languages/bg.d.ts +4 -0
- package/dist/translations/languages/bg.d.ts.map +1 -0
- package/dist/translations/languages/bg.js +101 -0
- package/dist/translations/languages/bg.js.map +1 -0
- package/dist/translations/languages/bnBd.d.ts +4 -0
- package/dist/translations/languages/bnBd.d.ts.map +1 -0
- package/dist/translations/languages/bnBd.js +101 -0
- package/dist/translations/languages/bnBd.js.map +1 -0
- package/dist/translations/languages/bnIn.d.ts +4 -0
- package/dist/translations/languages/bnIn.d.ts.map +1 -0
- package/dist/translations/languages/bnIn.js +101 -0
- package/dist/translations/languages/bnIn.js.map +1 -0
- package/dist/translations/languages/ca.d.ts +4 -0
- package/dist/translations/languages/ca.d.ts.map +1 -0
- package/dist/translations/languages/ca.js +101 -0
- package/dist/translations/languages/ca.js.map +1 -0
- package/dist/translations/languages/cs.d.ts +4 -0
- package/dist/translations/languages/cs.d.ts.map +1 -0
- package/dist/translations/languages/cs.js +101 -0
- package/dist/translations/languages/cs.js.map +1 -0
- package/dist/translations/languages/da.d.ts +4 -0
- package/dist/translations/languages/da.d.ts.map +1 -0
- package/dist/translations/languages/da.js +101 -0
- package/dist/translations/languages/da.js.map +1 -0
- package/dist/translations/languages/de.d.ts +4 -0
- package/dist/translations/languages/de.d.ts.map +1 -0
- package/dist/translations/languages/de.js +101 -0
- package/dist/translations/languages/de.js.map +1 -0
- package/dist/translations/languages/en.d.ts +98 -0
- package/dist/translations/languages/en.d.ts.map +1 -0
- package/dist/translations/languages/en.js +101 -0
- package/dist/translations/languages/en.js.map +1 -0
- package/dist/translations/languages/es.d.ts +4 -0
- package/dist/translations/languages/es.d.ts.map +1 -0
- package/dist/translations/languages/es.js +101 -0
- package/dist/translations/languages/es.js.map +1 -0
- package/dist/translations/languages/et.d.ts +4 -0
- package/dist/translations/languages/et.d.ts.map +1 -0
- package/dist/translations/languages/et.js +101 -0
- package/dist/translations/languages/et.js.map +1 -0
- package/dist/translations/languages/fa.d.ts +4 -0
- package/dist/translations/languages/fa.d.ts.map +1 -0
- package/dist/translations/languages/fa.js +101 -0
- package/dist/translations/languages/fa.js.map +1 -0
- package/dist/translations/languages/fr.d.ts +4 -0
- package/dist/translations/languages/fr.d.ts.map +1 -0
- package/dist/translations/languages/fr.js +101 -0
- package/dist/translations/languages/fr.js.map +1 -0
- package/dist/translations/languages/he.d.ts +4 -0
- package/dist/translations/languages/he.d.ts.map +1 -0
- package/dist/translations/languages/he.js +101 -0
- package/dist/translations/languages/he.js.map +1 -0
- package/dist/translations/languages/hr.d.ts +4 -0
- package/dist/translations/languages/hr.d.ts.map +1 -0
- package/dist/translations/languages/hr.js +101 -0
- package/dist/translations/languages/hr.js.map +1 -0
- package/dist/translations/languages/hu.d.ts +4 -0
- package/dist/translations/languages/hu.d.ts.map +1 -0
- package/dist/translations/languages/hu.js +101 -0
- package/dist/translations/languages/hu.js.map +1 -0
- package/dist/translations/languages/hy.d.ts +4 -0
- package/dist/translations/languages/hy.d.ts.map +1 -0
- package/dist/translations/languages/hy.js +101 -0
- package/dist/translations/languages/hy.js.map +1 -0
- package/dist/translations/languages/id.d.ts +4 -0
- package/dist/translations/languages/id.d.ts.map +1 -0
- package/dist/translations/languages/id.js +101 -0
- package/dist/translations/languages/id.js.map +1 -0
- package/dist/translations/languages/is.d.ts +4 -0
- package/dist/translations/languages/is.d.ts.map +1 -0
- package/dist/translations/languages/is.js +101 -0
- package/dist/translations/languages/is.js.map +1 -0
- package/dist/translations/languages/it.d.ts +4 -0
- package/dist/translations/languages/it.d.ts.map +1 -0
- package/dist/translations/languages/it.js +101 -0
- package/dist/translations/languages/it.js.map +1 -0
- package/dist/translations/languages/ja.d.ts +4 -0
- package/dist/translations/languages/ja.d.ts.map +1 -0
- package/dist/translations/languages/ja.js +101 -0
- package/dist/translations/languages/ja.js.map +1 -0
- package/dist/translations/languages/ko.d.ts +4 -0
- package/dist/translations/languages/ko.d.ts.map +1 -0
- package/dist/translations/languages/ko.js +101 -0
- package/dist/translations/languages/ko.js.map +1 -0
- package/dist/translations/languages/lt.d.ts +4 -0
- package/dist/translations/languages/lt.d.ts.map +1 -0
- package/dist/translations/languages/lt.js +101 -0
- package/dist/translations/languages/lt.js.map +1 -0
- package/dist/translations/languages/lv.d.ts +4 -0
- package/dist/translations/languages/lv.d.ts.map +1 -0
- package/dist/translations/languages/lv.js +101 -0
- package/dist/translations/languages/lv.js.map +1 -0
- package/dist/translations/languages/my.d.ts +4 -0
- package/dist/translations/languages/my.d.ts.map +1 -0
- package/dist/translations/languages/my.js +101 -0
- package/dist/translations/languages/my.js.map +1 -0
- package/dist/translations/languages/nb.d.ts +4 -0
- package/dist/translations/languages/nb.d.ts.map +1 -0
- package/dist/translations/languages/nb.js +101 -0
- package/dist/translations/languages/nb.js.map +1 -0
- package/dist/translations/languages/nl.d.ts +4 -0
- package/dist/translations/languages/nl.d.ts.map +1 -0
- package/dist/translations/languages/nl.js +101 -0
- package/dist/translations/languages/nl.js.map +1 -0
- package/dist/translations/languages/pl.d.ts +4 -0
- package/dist/translations/languages/pl.d.ts.map +1 -0
- package/dist/translations/languages/pl.js +101 -0
- package/dist/translations/languages/pl.js.map +1 -0
- package/dist/translations/languages/pt.d.ts +4 -0
- package/dist/translations/languages/pt.d.ts.map +1 -0
- package/dist/translations/languages/pt.js +101 -0
- package/dist/translations/languages/pt.js.map +1 -0
- package/dist/translations/languages/ro.d.ts +4 -0
- package/dist/translations/languages/ro.d.ts.map +1 -0
- package/dist/translations/languages/ro.js +101 -0
- package/dist/translations/languages/ro.js.map +1 -0
- package/dist/translations/languages/rs.d.ts +4 -0
- package/dist/translations/languages/rs.d.ts.map +1 -0
- package/dist/translations/languages/rs.js +101 -0
- package/dist/translations/languages/rs.js.map +1 -0
- package/dist/translations/languages/rsLatin.d.ts +4 -0
- package/dist/translations/languages/rsLatin.d.ts.map +1 -0
- package/dist/translations/languages/rsLatin.js +101 -0
- package/dist/translations/languages/rsLatin.js.map +1 -0
- package/dist/translations/languages/ru.d.ts +4 -0
- package/dist/translations/languages/ru.d.ts.map +1 -0
- package/dist/translations/languages/ru.js +101 -0
- package/dist/translations/languages/ru.js.map +1 -0
- package/dist/translations/languages/sk.d.ts +4 -0
- package/dist/translations/languages/sk.d.ts.map +1 -0
- package/dist/translations/languages/sk.js +101 -0
- package/dist/translations/languages/sk.js.map +1 -0
- package/dist/translations/languages/sl.d.ts +4 -0
- package/dist/translations/languages/sl.d.ts.map +1 -0
- package/dist/translations/languages/sl.js +101 -0
- package/dist/translations/languages/sl.js.map +1 -0
- package/dist/translations/languages/sv.d.ts +4 -0
- package/dist/translations/languages/sv.d.ts.map +1 -0
- package/dist/translations/languages/sv.js +101 -0
- package/dist/translations/languages/sv.js.map +1 -0
- package/dist/translations/languages/ta.d.ts +4 -0
- package/dist/translations/languages/ta.d.ts.map +1 -0
- package/dist/translations/languages/ta.js +101 -0
- package/dist/translations/languages/ta.js.map +1 -0
- package/dist/translations/languages/th.d.ts +4 -0
- package/dist/translations/languages/th.d.ts.map +1 -0
- package/dist/translations/languages/th.js +101 -0
- package/dist/translations/languages/th.js.map +1 -0
- package/dist/translations/languages/tr.d.ts +4 -0
- package/dist/translations/languages/tr.d.ts.map +1 -0
- package/dist/translations/languages/tr.js +101 -0
- package/dist/translations/languages/tr.js.map +1 -0
- package/dist/translations/languages/uk.d.ts +4 -0
- package/dist/translations/languages/uk.d.ts.map +1 -0
- package/dist/translations/languages/uk.js +101 -0
- package/dist/translations/languages/uk.js.map +1 -0
- package/dist/translations/languages/vi.d.ts +4 -0
- package/dist/translations/languages/vi.d.ts.map +1 -0
- package/dist/translations/languages/vi.js +101 -0
- package/dist/translations/languages/vi.js.map +1 -0
- package/dist/translations/languages/zh.d.ts +4 -0
- package/dist/translations/languages/zh.d.ts.map +1 -0
- package/dist/translations/languages/zh.js +101 -0
- package/dist/translations/languages/zh.js.map +1 -0
- package/dist/translations/languages/zhTw.d.ts +4 -0
- package/dist/translations/languages/zhTw.d.ts.map +1 -0
- package/dist/translations/languages/zhTw.js +101 -0
- package/dist/translations/languages/zhTw.js.map +1 -0
- package/dist/translations/types.d.ts +5 -0
- package/dist/translations/types.d.ts.map +1 -0
- package/dist/translations/types.js +3 -0
- package/dist/translations/types.js.map +1 -0
- package/dist/utilities/getPaymentTotal.d.ts.map +1 -1
- package/dist/utilities/lexical/converters/link.js +1 -0
- package/dist/utilities/lexical/converters/link.js.map +1 -1
- package/dist/utilities/lexical/nodeFormat.d.ts.map +1 -1
- package/dist/utilities/replaceDoubleCurlys.d.ts.map +1 -1
- package/package.json +15 -4
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
const name = {
|
|
2
2
|
name: 'name',
|
|
3
3
|
type: 'text',
|
|
4
|
-
label:
|
|
4
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
5
|
+
t('plugin-form-builder:name'),
|
|
5
6
|
required: true
|
|
6
7
|
};
|
|
7
8
|
const label = {
|
|
8
9
|
name: 'label',
|
|
9
10
|
type: 'text',
|
|
10
|
-
label:
|
|
11
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
12
|
+
t('plugin-form-builder:label'),
|
|
11
13
|
localized: true
|
|
12
14
|
};
|
|
13
15
|
const required = {
|
|
14
16
|
name: 'required',
|
|
15
17
|
type: 'checkbox',
|
|
16
|
-
label:
|
|
18
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
19
|
+
t('plugin-form-builder:required')
|
|
17
20
|
};
|
|
18
21
|
const width = {
|
|
19
22
|
name: 'width',
|
|
20
23
|
type: 'number',
|
|
21
|
-
label:
|
|
24
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
25
|
+
t('plugin-form-builder:fieldWidth')
|
|
22
26
|
};
|
|
23
27
|
const placeholder = {
|
|
24
28
|
name: 'placeholder',
|
|
25
29
|
type: 'text',
|
|
26
|
-
label:
|
|
30
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
31
|
+
t('plugin-form-builder:placeholder')
|
|
27
32
|
};
|
|
28
33
|
const Radio = {
|
|
29
34
|
slug: 'radio',
|
|
@@ -60,7 +65,8 @@ const Radio = {
|
|
|
60
65
|
admin: {
|
|
61
66
|
width: '50%'
|
|
62
67
|
},
|
|
63
|
-
label:
|
|
68
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
69
|
+
t('plugin-form-builder:defaultValue'),
|
|
64
70
|
localized: true
|
|
65
71
|
}
|
|
66
72
|
]
|
|
@@ -78,7 +84,8 @@ const Radio = {
|
|
|
78
84
|
admin: {
|
|
79
85
|
width: '50%'
|
|
80
86
|
},
|
|
81
|
-
label:
|
|
87
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
88
|
+
t('plugin-form-builder:label'),
|
|
82
89
|
localized: true,
|
|
83
90
|
required: true
|
|
84
91
|
},
|
|
@@ -88,23 +95,29 @@ const Radio = {
|
|
|
88
95
|
admin: {
|
|
89
96
|
width: '50%'
|
|
90
97
|
},
|
|
91
|
-
label:
|
|
98
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
99
|
+
t('plugin-form-builder:value'),
|
|
92
100
|
required: true
|
|
93
101
|
}
|
|
94
102
|
]
|
|
95
103
|
}
|
|
96
104
|
],
|
|
97
|
-
label:
|
|
105
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
106
|
+
t('plugin-form-builder:radioOptions'),
|
|
98
107
|
labels: {
|
|
99
|
-
plural:
|
|
100
|
-
|
|
108
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
109
|
+
t('plugin-form-builder:optionPlural'),
|
|
110
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
111
|
+
t('plugin-form-builder:optionSingular')
|
|
101
112
|
}
|
|
102
113
|
},
|
|
103
114
|
required
|
|
104
115
|
],
|
|
105
116
|
labels: {
|
|
106
|
-
plural:
|
|
107
|
-
|
|
117
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
118
|
+
t('plugin-form-builder:radioPlural'),
|
|
119
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
120
|
+
t('plugin-form-builder:radioSingular')
|
|
108
121
|
}
|
|
109
122
|
};
|
|
110
123
|
const Select = {
|
|
@@ -142,7 +155,8 @@ const Select = {
|
|
|
142
155
|
admin: {
|
|
143
156
|
width: '50%'
|
|
144
157
|
},
|
|
145
|
-
label:
|
|
158
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
159
|
+
t('plugin-form-builder:defaultValue'),
|
|
146
160
|
localized: true
|
|
147
161
|
}
|
|
148
162
|
]
|
|
@@ -168,7 +182,8 @@ const Select = {
|
|
|
168
182
|
admin: {
|
|
169
183
|
width: '50%'
|
|
170
184
|
},
|
|
171
|
-
label:
|
|
185
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
186
|
+
t('plugin-form-builder:label'),
|
|
172
187
|
localized: true,
|
|
173
188
|
required: true
|
|
174
189
|
},
|
|
@@ -178,23 +193,29 @@ const Select = {
|
|
|
178
193
|
admin: {
|
|
179
194
|
width: '50%'
|
|
180
195
|
},
|
|
181
|
-
label:
|
|
196
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
197
|
+
t('plugin-form-builder:value'),
|
|
182
198
|
required: true
|
|
183
199
|
}
|
|
184
200
|
]
|
|
185
201
|
}
|
|
186
202
|
],
|
|
187
|
-
label:
|
|
203
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
204
|
+
t('plugin-form-builder:selectOptions'),
|
|
188
205
|
labels: {
|
|
189
|
-
plural:
|
|
190
|
-
|
|
206
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
207
|
+
t('plugin-form-builder:optionPlural'),
|
|
208
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
209
|
+
t('plugin-form-builder:optionSingular')
|
|
191
210
|
}
|
|
192
211
|
},
|
|
193
212
|
required
|
|
194
213
|
],
|
|
195
214
|
labels: {
|
|
196
|
-
plural:
|
|
197
|
-
|
|
215
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
216
|
+
t('plugin-form-builder:selectPlural'),
|
|
217
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
218
|
+
t('plugin-form-builder:selectSingular')
|
|
198
219
|
}
|
|
199
220
|
};
|
|
200
221
|
const Text = {
|
|
@@ -232,7 +253,8 @@ const Text = {
|
|
|
232
253
|
admin: {
|
|
233
254
|
width: '50%'
|
|
234
255
|
},
|
|
235
|
-
label:
|
|
256
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
257
|
+
t('plugin-form-builder:defaultValue'),
|
|
236
258
|
localized: true
|
|
237
259
|
}
|
|
238
260
|
]
|
|
@@ -240,8 +262,10 @@ const Text = {
|
|
|
240
262
|
required
|
|
241
263
|
],
|
|
242
264
|
labels: {
|
|
243
|
-
plural:
|
|
244
|
-
|
|
265
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
266
|
+
t('plugin-form-builder:textPlural'),
|
|
267
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
268
|
+
t('plugin-form-builder:textSingular')
|
|
245
269
|
}
|
|
246
270
|
};
|
|
247
271
|
const TextArea = {
|
|
@@ -279,7 +303,8 @@ const TextArea = {
|
|
|
279
303
|
admin: {
|
|
280
304
|
width: '50%'
|
|
281
305
|
},
|
|
282
|
-
label:
|
|
306
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
307
|
+
t('plugin-form-builder:defaultValue'),
|
|
283
308
|
localized: true
|
|
284
309
|
}
|
|
285
310
|
]
|
|
@@ -287,8 +312,10 @@ const TextArea = {
|
|
|
287
312
|
required
|
|
288
313
|
],
|
|
289
314
|
labels: {
|
|
290
|
-
plural:
|
|
291
|
-
|
|
315
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
316
|
+
t('plugin-form-builder:textareaPlural'),
|
|
317
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
318
|
+
t('plugin-form-builder:textareaSingular')
|
|
292
319
|
}
|
|
293
320
|
};
|
|
294
321
|
const Number = {
|
|
@@ -326,15 +353,18 @@ const Number = {
|
|
|
326
353
|
admin: {
|
|
327
354
|
width: '50%'
|
|
328
355
|
},
|
|
329
|
-
label:
|
|
356
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
357
|
+
t('plugin-form-builder:defaultValue')
|
|
330
358
|
}
|
|
331
359
|
]
|
|
332
360
|
},
|
|
333
361
|
required
|
|
334
362
|
],
|
|
335
363
|
labels: {
|
|
336
|
-
plural:
|
|
337
|
-
|
|
364
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
365
|
+
t('plugin-form-builder:numberPlural'),
|
|
366
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
367
|
+
t('plugin-form-builder:numberSingular')
|
|
338
368
|
}
|
|
339
369
|
};
|
|
340
370
|
const Email = {
|
|
@@ -361,8 +391,10 @@ const Email = {
|
|
|
361
391
|
required
|
|
362
392
|
],
|
|
363
393
|
labels: {
|
|
364
|
-
plural:
|
|
365
|
-
|
|
394
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
395
|
+
t('plugin-form-builder:emailPlural'),
|
|
396
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
397
|
+
t('plugin-form-builder:emailSingular')
|
|
366
398
|
}
|
|
367
399
|
};
|
|
368
400
|
const State = {
|
|
@@ -389,8 +421,10 @@ const State = {
|
|
|
389
421
|
required
|
|
390
422
|
],
|
|
391
423
|
labels: {
|
|
392
|
-
plural:
|
|
393
|
-
|
|
424
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
425
|
+
t('plugin-form-builder:statePlural'),
|
|
426
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
427
|
+
t('plugin-form-builder:stateSingular')
|
|
394
428
|
}
|
|
395
429
|
};
|
|
396
430
|
const Country = {
|
|
@@ -417,8 +451,10 @@ const Country = {
|
|
|
417
451
|
required
|
|
418
452
|
],
|
|
419
453
|
labels: {
|
|
420
|
-
plural:
|
|
421
|
-
|
|
454
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
455
|
+
t('plugin-form-builder:countryPlural'),
|
|
456
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
457
|
+
t('plugin-form-builder:countrySingular')
|
|
422
458
|
}
|
|
423
459
|
};
|
|
424
460
|
const Checkbox = {
|
|
@@ -461,12 +497,15 @@ const Checkbox = {
|
|
|
461
497
|
{
|
|
462
498
|
name: 'defaultValue',
|
|
463
499
|
type: 'checkbox',
|
|
464
|
-
label:
|
|
500
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
501
|
+
t('plugin-form-builder:checkedByDefault')
|
|
465
502
|
}
|
|
466
503
|
],
|
|
467
504
|
labels: {
|
|
468
|
-
plural:
|
|
469
|
-
|
|
505
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
506
|
+
t('plugin-form-builder:checkboxPlural'),
|
|
507
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
508
|
+
t('plugin-form-builder:checkboxSingular')
|
|
470
509
|
}
|
|
471
510
|
};
|
|
472
511
|
const Date = {
|
|
@@ -509,12 +548,15 @@ const Date = {
|
|
|
509
548
|
{
|
|
510
549
|
name: 'defaultValue',
|
|
511
550
|
type: 'date',
|
|
512
|
-
label:
|
|
551
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
552
|
+
t('plugin-form-builder:defaultValue')
|
|
513
553
|
}
|
|
514
554
|
],
|
|
515
555
|
labels: {
|
|
516
|
-
plural:
|
|
517
|
-
|
|
556
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
557
|
+
t('plugin-form-builder:datePlural'),
|
|
558
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
559
|
+
t('plugin-form-builder:dateSingular')
|
|
518
560
|
}
|
|
519
561
|
};
|
|
520
562
|
const Payment = (fieldConfig)=>{
|
|
@@ -523,7 +565,8 @@ const Payment = (fieldConfig)=>{
|
|
|
523
565
|
paymentProcessorField = {
|
|
524
566
|
name: 'paymentProcessor',
|
|
525
567
|
type: 'select',
|
|
526
|
-
label:
|
|
568
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
569
|
+
t('plugin-form-builder:paymentProcessor'),
|
|
527
570
|
options: [],
|
|
528
571
|
...fieldConfig.paymentProcessor
|
|
529
572
|
};
|
|
@@ -563,11 +606,14 @@ const Payment = (fieldConfig)=>{
|
|
|
563
606
|
admin: {
|
|
564
607
|
width: '50%'
|
|
565
608
|
},
|
|
566
|
-
label:
|
|
609
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
610
|
+
t('plugin-form-builder:basePrice')
|
|
567
611
|
}
|
|
568
612
|
]
|
|
569
613
|
},
|
|
570
|
-
paymentProcessorField
|
|
614
|
+
...paymentProcessorField ? [
|
|
615
|
+
paymentProcessorField
|
|
616
|
+
] : [],
|
|
571
617
|
{
|
|
572
618
|
name: 'priceConditions',
|
|
573
619
|
type: 'array',
|
|
@@ -585,18 +631,22 @@ const Payment = (fieldConfig)=>{
|
|
|
585
631
|
name: 'condition',
|
|
586
632
|
type: 'select',
|
|
587
633
|
defaultValue: 'hasValue',
|
|
588
|
-
label:
|
|
634
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
635
|
+
t('plugin-form-builder:condition'),
|
|
589
636
|
options: [
|
|
590
637
|
{
|
|
591
|
-
label:
|
|
638
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
639
|
+
t('plugin-form-builder:hasAnyValue'),
|
|
592
640
|
value: 'hasValue'
|
|
593
641
|
},
|
|
594
642
|
{
|
|
595
|
-
label:
|
|
643
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
644
|
+
t('plugin-form-builder:equals'),
|
|
596
645
|
value: 'equals'
|
|
597
646
|
},
|
|
598
647
|
{
|
|
599
|
-
label:
|
|
648
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
649
|
+
t('plugin-form-builder:doesNotEqual'),
|
|
600
650
|
value: 'notEquals'
|
|
601
651
|
}
|
|
602
652
|
]
|
|
@@ -607,7 +657,8 @@ const Payment = (fieldConfig)=>{
|
|
|
607
657
|
admin: {
|
|
608
658
|
condition: (_, { condition })=>condition === 'equals' || condition === 'notEquals'
|
|
609
659
|
},
|
|
610
|
-
label:
|
|
660
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
661
|
+
t('plugin-form-builder:value')
|
|
611
662
|
},
|
|
612
663
|
{
|
|
613
664
|
name: 'operator',
|
|
@@ -615,19 +666,23 @@ const Payment = (fieldConfig)=>{
|
|
|
615
666
|
defaultValue: 'add',
|
|
616
667
|
options: [
|
|
617
668
|
{
|
|
618
|
-
label:
|
|
669
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
670
|
+
t('plugin-form-builder:add'),
|
|
619
671
|
value: 'add'
|
|
620
672
|
},
|
|
621
673
|
{
|
|
622
|
-
label:
|
|
674
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
675
|
+
t('plugin-form-builder:subtract'),
|
|
623
676
|
value: 'subtract'
|
|
624
677
|
},
|
|
625
678
|
{
|
|
626
|
-
label:
|
|
679
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
680
|
+
t('plugin-form-builder:multiply'),
|
|
627
681
|
value: 'multiply'
|
|
628
682
|
},
|
|
629
683
|
{
|
|
630
|
-
label:
|
|
684
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
685
|
+
t('plugin-form-builder:divide'),
|
|
631
686
|
value: 'divide'
|
|
632
687
|
}
|
|
633
688
|
]
|
|
@@ -639,14 +694,17 @@ const Payment = (fieldConfig)=>{
|
|
|
639
694
|
width: '100%'
|
|
640
695
|
},
|
|
641
696
|
defaultValue: 'static',
|
|
642
|
-
label:
|
|
697
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
698
|
+
t('plugin-form-builder:valueType'),
|
|
643
699
|
options: [
|
|
644
700
|
{
|
|
645
|
-
label:
|
|
701
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
702
|
+
t('plugin-form-builder:staticValue'),
|
|
646
703
|
value: 'static'
|
|
647
704
|
},
|
|
648
705
|
{
|
|
649
|
-
label:
|
|
706
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
707
|
+
t('plugin-form-builder:valueOfField'),
|
|
650
708
|
value: 'valueOfField'
|
|
651
709
|
}
|
|
652
710
|
]
|
|
@@ -659,20 +717,26 @@ const Payment = (fieldConfig)=>{
|
|
|
659
717
|
Field: '@payloadcms/plugin-form-builder/client#DynamicPriceSelector'
|
|
660
718
|
}
|
|
661
719
|
},
|
|
662
|
-
label:
|
|
720
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
721
|
+
t('plugin-form-builder:value')
|
|
663
722
|
}
|
|
664
723
|
],
|
|
665
|
-
label:
|
|
724
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
725
|
+
t('plugin-form-builder:priceConditions'),
|
|
666
726
|
labels: {
|
|
667
|
-
plural:
|
|
668
|
-
|
|
727
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
728
|
+
t('plugin-form-builder:priceConditionsPlural'),
|
|
729
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
730
|
+
t('plugin-form-builder:priceConditionsSingular')
|
|
669
731
|
}
|
|
670
732
|
},
|
|
671
733
|
required
|
|
672
|
-
]
|
|
734
|
+
],
|
|
673
735
|
labels: {
|
|
674
|
-
plural:
|
|
675
|
-
|
|
736
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
737
|
+
t('plugin-form-builder:paymentFieldPlural'),
|
|
738
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
739
|
+
t('plugin-form-builder:paymentFieldSingular')
|
|
676
740
|
}
|
|
677
741
|
};
|
|
678
742
|
return fields;
|
|
@@ -687,8 +751,10 @@ const Message = {
|
|
|
687
751
|
}
|
|
688
752
|
],
|
|
689
753
|
labels: {
|
|
690
|
-
plural:
|
|
691
|
-
|
|
754
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
755
|
+
t('plugin-form-builder:messagePlural'),
|
|
756
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
757
|
+
t('plugin-form-builder:messageSingular')
|
|
692
758
|
}
|
|
693
759
|
};
|
|
694
760
|
const Upload = (uploadCollections)=>{
|
|
@@ -716,9 +782,11 @@ const Upload = (uploadCollections)=>{
|
|
|
716
782
|
name: 'uploadCollection',
|
|
717
783
|
type: 'select',
|
|
718
784
|
admin: {
|
|
719
|
-
description:
|
|
785
|
+
description: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
786
|
+
t('plugin-form-builder:uploadCollectionDescription')
|
|
720
787
|
},
|
|
721
|
-
label:
|
|
788
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
789
|
+
t('plugin-form-builder:uploadCollection'),
|
|
722
790
|
options: uploadCollections.map((slug)=>({
|
|
723
791
|
label: slug,
|
|
724
792
|
value: slug
|
|
@@ -729,20 +797,25 @@ const Upload = (uploadCollections)=>{
|
|
|
729
797
|
name: 'mimeTypes',
|
|
730
798
|
type: 'array',
|
|
731
799
|
admin: {
|
|
732
|
-
description:
|
|
800
|
+
description: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
801
|
+
t('plugin-form-builder:allowedFileTypesDescription')
|
|
733
802
|
},
|
|
734
803
|
fields: [
|
|
735
804
|
{
|
|
736
805
|
name: 'mimeType',
|
|
737
806
|
type: 'text',
|
|
738
|
-
label:
|
|
807
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
808
|
+
t('plugin-form-builder:mimeType'),
|
|
739
809
|
required: true
|
|
740
810
|
}
|
|
741
811
|
],
|
|
742
|
-
label:
|
|
812
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
813
|
+
t('plugin-form-builder:allowedFileTypes'),
|
|
743
814
|
labels: {
|
|
744
|
-
plural:
|
|
745
|
-
|
|
815
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
816
|
+
t('plugin-form-builder:mimeTypePlural'),
|
|
817
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
818
|
+
t('plugin-form-builder:mimeTypeSingular')
|
|
746
819
|
}
|
|
747
820
|
},
|
|
748
821
|
{
|
|
@@ -758,10 +831,12 @@ const Upload = (uploadCollections)=>{
|
|
|
758
831
|
name: 'maxFileSize',
|
|
759
832
|
type: 'number',
|
|
760
833
|
admin: {
|
|
761
|
-
description:
|
|
834
|
+
description: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
835
|
+
t('plugin-form-builder:maxFileSizeDescription'),
|
|
762
836
|
width: '50%'
|
|
763
837
|
},
|
|
764
|
-
label:
|
|
838
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
839
|
+
t('plugin-form-builder:maxFileSize')
|
|
765
840
|
}
|
|
766
841
|
]
|
|
767
842
|
},
|
|
@@ -780,14 +855,17 @@ const Upload = (uploadCollections)=>{
|
|
|
780
855
|
admin: {
|
|
781
856
|
width: '50%'
|
|
782
857
|
},
|
|
783
|
-
label:
|
|
858
|
+
label: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
859
|
+
t('plugin-form-builder:allowMultipleFiles')
|
|
784
860
|
}
|
|
785
861
|
]
|
|
786
862
|
}
|
|
787
863
|
],
|
|
788
864
|
labels: {
|
|
789
|
-
plural:
|
|
790
|
-
|
|
865
|
+
plural: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
866
|
+
t('plugin-form-builder:uploadFieldPlural'),
|
|
867
|
+
singular: ({ t })=>// @ts-expect-error - translations are not typed in plugins yet
|
|
868
|
+
t('plugin-form-builder:uploadFieldSingular')
|
|
791
869
|
}
|
|
792
870
|
};
|
|
793
871
|
};
|