@woodylab/payload 0.0.37 → 0.0.39
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/acl/index.cjs.js +1 -7
- package/dist/acl/index.cjs.js.map +1 -1
- package/dist/acl/index.esm.js +1 -1
- package/dist/config/index.cjs.js +1 -22
- package/dist/config/index.cjs.js.map +1 -1
- package/dist/config/index.esm.js +1 -5
- package/dist/config/index.esm.js.map +1 -1
- package/dist/enums/index.cjs.js +1 -7
- package/dist/enums/index.cjs.js.map +1 -1
- package/dist/enums/index.esm.js +1 -1
- package/dist/fieldSectionTabs-DlDvitz9.js +2 -0
- package/dist/fieldSectionTabs-DlDvitz9.js.map +1 -0
- package/dist/fieldSectionTabs-_XQ_oMvR.js +2 -0
- package/dist/fieldSectionTabs-_XQ_oMvR.js.map +1 -0
- package/dist/fields/index.cjs.js +1 -41
- package/dist/fields/index.cjs.js.map +1 -1
- package/dist/fields/index.esm.js +1 -5
- package/dist/fields/index.esm.js.map +1 -1
- package/dist/getNumberValueFromClassNameString-Dm5eOjBJ.js +2 -0
- package/dist/getNumberValueFromClassNameString-Dm5eOjBJ.js.map +1 -0
- package/dist/getNumberValueFromClassNameString-pKKt97eg.js +2 -0
- package/dist/getNumberValueFromClassNameString-pKKt97eg.js.map +1 -0
- package/dist/hooks/index.cjs.js +1 -7
- package/dist/hooks/index.cjs.js.map +1 -1
- package/dist/hooks/index.esm.js +1 -1
- package/dist/index-B7krCnBD.js +2 -0
- package/dist/index-B7krCnBD.js.map +1 -0
- package/dist/index-B93cJAZH.js +2 -0
- package/dist/index-B93cJAZH.js.map +1 -0
- package/dist/index-BnQT4jju.js +2 -0
- package/dist/index-BnQT4jju.js.map +1 -0
- package/dist/index-C4uc5BOd.js +2 -0
- package/dist/index-C4uc5BOd.js.map +1 -0
- package/dist/index-CR0SwRmA.js +2 -0
- package/dist/index-CR0SwRmA.js.map +1 -0
- package/dist/index-CRDQJpTt.js +2 -0
- package/dist/index-CRDQJpTt.js.map +1 -0
- package/dist/index-CaTg4skG.js +2 -0
- package/dist/index-CaTg4skG.js.map +1 -0
- package/dist/index-CgPxqF5L.js +2 -0
- package/dist/index-CgPxqF5L.js.map +1 -0
- package/dist/index-D7075_q9.js +2 -0
- package/dist/index-D7075_q9.js.map +1 -0
- package/dist/index-XuRN7Bay.js +2 -0
- package/dist/index-XuRN7Bay.js.map +1 -0
- package/dist/index-gxytNJWT.js +2 -0
- package/dist/index-gxytNJWT.js.map +1 -0
- package/dist/index-kvH0sGti.js +2 -0
- package/dist/index-kvH0sGti.js.map +1 -0
- package/dist/index.cjs.js +1 -299
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -283
- package/dist/index.esm.js.map +1 -1
- package/dist/tailwind/index.cjs.js +1 -34
- package/dist/tailwind/index.cjs.js.map +1 -1
- package/dist/tailwind/index.esm.js +1 -1
- package/dist/types/index.cjs.js +1 -7
- package/dist/types/index.cjs.js.map +1 -1
- package/dist/types/index.esm.js +1 -5
- package/dist/types/index.esm.js.map +1 -1
- package/dist/userRoles-BIrmWoCJ.js +2 -0
- package/dist/userRoles-BIrmWoCJ.js.map +1 -0
- package/dist/userRoles-Dd_gfx51.js +2 -0
- package/dist/userRoles-Dd_gfx51.js.map +1 -0
- package/package.json +2 -1
- package/dist/fieldSectionTabs-B2XLxdEW.js +0 -919
- package/dist/fieldSectionTabs-B2XLxdEW.js.map +0 -1
- package/dist/fieldSectionTabs-ns8gLfPr.js +0 -942
- package/dist/fieldSectionTabs-ns8gLfPr.js.map +0 -1
- package/dist/getNumberValueFromClassNameString-D4OqkHPA.js +0 -20
- package/dist/getNumberValueFromClassNameString-D4OqkHPA.js.map +0 -1
- package/dist/getNumberValueFromClassNameString-DyZ9P1fd.js +0 -18
- package/dist/getNumberValueFromClassNameString-DyZ9P1fd.js.map +0 -1
- package/dist/index-1Y54jG4C.js +0 -2244
- package/dist/index-1Y54jG4C.js.map +0 -1
- package/dist/index-5EL7OntE.js +0 -645
- package/dist/index-5EL7OntE.js.map +0 -1
- package/dist/index-B5jmz5OR.js +0 -163
- package/dist/index-B5jmz5OR.js.map +0 -1
- package/dist/index-BD7Mx4u9.js +0 -11
- package/dist/index-BD7Mx4u9.js.map +0 -1
- package/dist/index-Bj0auLnA.js +0 -24
- package/dist/index-Bj0auLnA.js.map +0 -1
- package/dist/index-CKwysnVm.js +0 -9
- package/dist/index-CKwysnVm.js.map +0 -1
- package/dist/index-CWYRhz2T.js +0 -2260
- package/dist/index-CWYRhz2T.js.map +0 -1
- package/dist/index-Ces144rr.js +0 -21
- package/dist/index-Ces144rr.js.map +0 -1
- package/dist/index-DZuNTfoQ.js +0 -175
- package/dist/index-DZuNTfoQ.js.map +0 -1
- package/dist/index-DgYntBlB.js +0 -675
- package/dist/index-DgYntBlB.js.map +0 -1
- package/dist/index-I4vA8AmC.js +0 -9
- package/dist/index-I4vA8AmC.js.map +0 -1
- package/dist/index-JvE9Rtmr.js +0 -11
- package/dist/index-JvE9Rtmr.js.map +0 -1
- package/dist/userRoles-Da1JaIoF.js +0 -13
- package/dist/userRoles-Da1JaIoF.js.map +0 -1
- package/dist/userRoles-Dq3yqKLM.js +0 -11
- package/dist/userRoles-Dq3yqKLM.js.map +0 -1
|
@@ -1,919 +0,0 @@
|
|
|
1
|
-
import { a as TailwindContainerWidths, b as TailwindHeights, c as TailwindViewportHeights } from './index-5EL7OntE.js';
|
|
2
|
-
import { g as getNumberValueFromClassNameString } from './getNumberValueFromClassNameString-DyZ9P1fd.js';
|
|
3
|
-
|
|
4
|
-
const fieldText = (override) => ({
|
|
5
|
-
name: 'text',
|
|
6
|
-
label: 'Text',
|
|
7
|
-
type: 'text',
|
|
8
|
-
required: true,
|
|
9
|
-
...override,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
const fieldUpload = (relationTo, override) => ({
|
|
13
|
-
name: 'upload',
|
|
14
|
-
label: 'upload',
|
|
15
|
-
type: 'upload',
|
|
16
|
-
required: false,
|
|
17
|
-
relationTo,
|
|
18
|
-
...override,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
const fieldArray = (override) => ({
|
|
22
|
-
name: 'list',
|
|
23
|
-
label: 'List',
|
|
24
|
-
type: 'array',
|
|
25
|
-
fields: [],
|
|
26
|
-
required: false,
|
|
27
|
-
...override,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const fieldCheckbox = (override) => ({
|
|
31
|
-
name: 'checkbox',
|
|
32
|
-
label: 'Checkbox',
|
|
33
|
-
type: 'checkbox',
|
|
34
|
-
required: false,
|
|
35
|
-
admin: {
|
|
36
|
-
description: 'Enable or disable the checkbox',
|
|
37
|
-
},
|
|
38
|
-
...override,
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
const fieldNumber = (override) => ({
|
|
42
|
-
name: 'number',
|
|
43
|
-
label: 'Number',
|
|
44
|
-
type: 'number',
|
|
45
|
-
required: false,
|
|
46
|
-
...override,
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const fieldRelationship = (relationTo, override) => ({
|
|
50
|
-
name: 'relationship',
|
|
51
|
-
label: 'Relationship',
|
|
52
|
-
type: 'relationship',
|
|
53
|
-
relationTo,
|
|
54
|
-
required: false,
|
|
55
|
-
...override,
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
const fieldRichText = (override) => ({
|
|
59
|
-
name: 'richText',
|
|
60
|
-
label: 'Rich Text',
|
|
61
|
-
type: 'richText',
|
|
62
|
-
required: false,
|
|
63
|
-
admin: {
|
|
64
|
-
placeholder: 'Insert text here',
|
|
65
|
-
rows: 5,
|
|
66
|
-
},
|
|
67
|
-
...override,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const fieldSelect = (override) => ({
|
|
71
|
-
name: 'select',
|
|
72
|
-
label: 'select',
|
|
73
|
-
type: 'select',
|
|
74
|
-
required: false,
|
|
75
|
-
hasMany: false,
|
|
76
|
-
...override,
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Genera un campo per la selezione delle larghezze del container
|
|
81
|
-
* @returns Field - Campo di tipo `select` per PayloadCMS
|
|
82
|
-
*/
|
|
83
|
-
const fieldContainerWidths = () => {
|
|
84
|
-
return fieldSelect({
|
|
85
|
-
name: 'container',
|
|
86
|
-
label: 'Larghezza del container',
|
|
87
|
-
options: [{ value: '', label: '(Nessuno)' }, ...TailwindContainerWidths],
|
|
88
|
-
admin: {
|
|
89
|
-
description: 'Seleziona una larghezza massima per il container. Usa "None" per una larghezza a schermo intero.',
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
const fieldThemeColor = (override) => ({
|
|
95
|
-
name: override?.name || 'color',
|
|
96
|
-
label: override?.label || 'Colore',
|
|
97
|
-
type: 'select',
|
|
98
|
-
required: override?.required ?? false,
|
|
99
|
-
options: [
|
|
100
|
-
{ label: 'Default', value: '' },
|
|
101
|
-
{ label: 'Foreground', value: 'foreground' },
|
|
102
|
-
{ label: 'Primary', value: 'primary' },
|
|
103
|
-
{ label: 'Secondary', value: 'secondary' },
|
|
104
|
-
{ label: 'Accent', value: 'accent' },
|
|
105
|
-
{ label: 'Dark', value: 'dark' },
|
|
106
|
-
{ label: 'Light', value: 'light' },
|
|
107
|
-
{ label: 'White', value: 'white' },
|
|
108
|
-
{ label: 'Black', value: 'black' },
|
|
109
|
-
],
|
|
110
|
-
admin: {
|
|
111
|
-
...override?.admin,
|
|
112
|
-
},
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Genera un campo per la selezione delle altezze
|
|
117
|
-
* @returns Field - Campo di tipo `select` per PayloadCMS
|
|
118
|
-
*/
|
|
119
|
-
const fieldHeights = () => {
|
|
120
|
-
return fieldSelect({
|
|
121
|
-
name: 'h',
|
|
122
|
-
label: 'Altezza',
|
|
123
|
-
type: 'select',
|
|
124
|
-
defaultValue: 'h-full',
|
|
125
|
-
options: [
|
|
126
|
-
{ value: '', label: '(Nessuno)' },
|
|
127
|
-
...TailwindHeights.map((h) => ({ value: `h-${h}`, label: h })),
|
|
128
|
-
],
|
|
129
|
-
admin: {
|
|
130
|
-
description: 'Definisce l’altezza dell’elemento.',
|
|
131
|
-
},
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Genera un campo per la selezione dinamica dei margini
|
|
137
|
-
* @returns Field - Campo di tipo `group` per PayloadCMS
|
|
138
|
-
*/
|
|
139
|
-
const fieldMargins = () => {
|
|
140
|
-
return {
|
|
141
|
-
label: 'Margini',
|
|
142
|
-
type: 'collapsible',
|
|
143
|
-
admin: {
|
|
144
|
-
initCollapsed: true,
|
|
145
|
-
},
|
|
146
|
-
fields: [
|
|
147
|
-
{
|
|
148
|
-
type: 'row',
|
|
149
|
-
fields: [
|
|
150
|
-
fieldNumber({
|
|
151
|
-
name: 'm-',
|
|
152
|
-
label: 'Tutti i lati',
|
|
153
|
-
virtual: true,
|
|
154
|
-
min: 0,
|
|
155
|
-
max: 96,
|
|
156
|
-
admin: {
|
|
157
|
-
width: '25%',
|
|
158
|
-
},
|
|
159
|
-
hooks: {
|
|
160
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
161
|
-
},
|
|
162
|
-
}),
|
|
163
|
-
fieldNumber({
|
|
164
|
-
name: 'mx-',
|
|
165
|
-
label: 'Orizzontale',
|
|
166
|
-
virtual: true,
|
|
167
|
-
min: 0,
|
|
168
|
-
max: 96,
|
|
169
|
-
admin: {
|
|
170
|
-
width: '25%',
|
|
171
|
-
},
|
|
172
|
-
hooks: {
|
|
173
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
174
|
-
},
|
|
175
|
-
}),
|
|
176
|
-
fieldNumber({
|
|
177
|
-
name: 'my-',
|
|
178
|
-
label: 'Verticale',
|
|
179
|
-
virtual: true,
|
|
180
|
-
min: 0,
|
|
181
|
-
max: 96,
|
|
182
|
-
admin: {
|
|
183
|
-
width: '25%',
|
|
184
|
-
},
|
|
185
|
-
hooks: {
|
|
186
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
187
|
-
},
|
|
188
|
-
}),
|
|
189
|
-
fieldNumber({
|
|
190
|
-
name: 'mt-',
|
|
191
|
-
label: 'Top',
|
|
192
|
-
virtual: true,
|
|
193
|
-
min: 0,
|
|
194
|
-
max: 96,
|
|
195
|
-
admin: {
|
|
196
|
-
width: '25%',
|
|
197
|
-
},
|
|
198
|
-
hooks: {
|
|
199
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
200
|
-
},
|
|
201
|
-
}),
|
|
202
|
-
fieldNumber({
|
|
203
|
-
name: 'mr-',
|
|
204
|
-
label: 'Right',
|
|
205
|
-
virtual: true,
|
|
206
|
-
min: 0,
|
|
207
|
-
max: 96,
|
|
208
|
-
admin: {
|
|
209
|
-
width: '25%',
|
|
210
|
-
},
|
|
211
|
-
hooks: {
|
|
212
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
213
|
-
},
|
|
214
|
-
}),
|
|
215
|
-
fieldNumber({
|
|
216
|
-
name: 'mb-',
|
|
217
|
-
label: 'Bottom',
|
|
218
|
-
virtual: true,
|
|
219
|
-
min: 0,
|
|
220
|
-
max: 96,
|
|
221
|
-
admin: {
|
|
222
|
-
width: '25%',
|
|
223
|
-
},
|
|
224
|
-
hooks: {
|
|
225
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
226
|
-
},
|
|
227
|
-
}),
|
|
228
|
-
fieldNumber({
|
|
229
|
-
name: 'ml-',
|
|
230
|
-
label: 'Left',
|
|
231
|
-
virtual: true,
|
|
232
|
-
min: 0,
|
|
233
|
-
max: 96,
|
|
234
|
-
admin: {
|
|
235
|
-
width: '25%',
|
|
236
|
-
},
|
|
237
|
-
hooks: {
|
|
238
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
239
|
-
},
|
|
240
|
-
}),
|
|
241
|
-
],
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Genera un campo per la selezione dinamica dei margini
|
|
249
|
-
* @returns Field - Campo di tipo `group` per PayloadCMS
|
|
250
|
-
*/
|
|
251
|
-
const fieldPaddings = () => {
|
|
252
|
-
return {
|
|
253
|
-
label: 'Paddings',
|
|
254
|
-
type: 'collapsible',
|
|
255
|
-
admin: {
|
|
256
|
-
initCollapsed: true,
|
|
257
|
-
},
|
|
258
|
-
fields: [
|
|
259
|
-
{
|
|
260
|
-
type: 'row',
|
|
261
|
-
fields: [
|
|
262
|
-
fieldNumber({
|
|
263
|
-
name: 'p-',
|
|
264
|
-
label: 'Tutti i lati',
|
|
265
|
-
virtual: true,
|
|
266
|
-
min: 0,
|
|
267
|
-
max: 96,
|
|
268
|
-
admin: {
|
|
269
|
-
width: '25%',
|
|
270
|
-
},
|
|
271
|
-
hooks: {
|
|
272
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
273
|
-
},
|
|
274
|
-
}),
|
|
275
|
-
fieldNumber({
|
|
276
|
-
name: 'px-',
|
|
277
|
-
label: 'Orizzontale',
|
|
278
|
-
virtual: true,
|
|
279
|
-
min: 0,
|
|
280
|
-
max: 96,
|
|
281
|
-
admin: {
|
|
282
|
-
width: '25%',
|
|
283
|
-
},
|
|
284
|
-
hooks: {
|
|
285
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
286
|
-
},
|
|
287
|
-
}),
|
|
288
|
-
fieldNumber({
|
|
289
|
-
name: 'py-',
|
|
290
|
-
label: 'Verticale',
|
|
291
|
-
virtual: true,
|
|
292
|
-
min: 0,
|
|
293
|
-
max: 96,
|
|
294
|
-
admin: {
|
|
295
|
-
width: '25%',
|
|
296
|
-
},
|
|
297
|
-
hooks: {
|
|
298
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
299
|
-
},
|
|
300
|
-
}),
|
|
301
|
-
fieldNumber({
|
|
302
|
-
name: 'pt-',
|
|
303
|
-
label: 'Top',
|
|
304
|
-
virtual: true,
|
|
305
|
-
min: 0,
|
|
306
|
-
max: 96,
|
|
307
|
-
admin: {
|
|
308
|
-
width: '25%',
|
|
309
|
-
},
|
|
310
|
-
hooks: {
|
|
311
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
312
|
-
},
|
|
313
|
-
}),
|
|
314
|
-
fieldNumber({
|
|
315
|
-
name: 'pr-',
|
|
316
|
-
label: 'Right',
|
|
317
|
-
virtual: true,
|
|
318
|
-
min: 0,
|
|
319
|
-
max: 96,
|
|
320
|
-
admin: {
|
|
321
|
-
width: '25%',
|
|
322
|
-
},
|
|
323
|
-
hooks: {
|
|
324
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
325
|
-
},
|
|
326
|
-
}),
|
|
327
|
-
fieldNumber({
|
|
328
|
-
name: 'pb-',
|
|
329
|
-
label: 'Bottom',
|
|
330
|
-
virtual: true,
|
|
331
|
-
min: 0,
|
|
332
|
-
max: 96,
|
|
333
|
-
admin: {
|
|
334
|
-
width: '25%',
|
|
335
|
-
},
|
|
336
|
-
hooks: {
|
|
337
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
338
|
-
},
|
|
339
|
-
}),
|
|
340
|
-
fieldNumber({
|
|
341
|
-
name: 'pl-',
|
|
342
|
-
label: 'Left',
|
|
343
|
-
virtual: true,
|
|
344
|
-
min: 0,
|
|
345
|
-
max: 96,
|
|
346
|
-
admin: {
|
|
347
|
-
width: '25%',
|
|
348
|
-
},
|
|
349
|
-
hooks: {
|
|
350
|
-
afterRead: [getNumberValueFromClassNameString],
|
|
351
|
-
},
|
|
352
|
-
}),
|
|
353
|
-
],
|
|
354
|
-
},
|
|
355
|
-
],
|
|
356
|
-
};
|
|
357
|
-
};
|
|
358
|
-
|
|
359
|
-
const concatCssFields = (args) => {
|
|
360
|
-
const { value, siblingData, operation } = args;
|
|
361
|
-
const classes = [];
|
|
362
|
-
if (operation === 'create' || operation === 'update') {
|
|
363
|
-
Object.entries(siblingData).forEach(([key, val]) => {
|
|
364
|
-
if (key !== 'className' && val !== null && val !== undefined) {
|
|
365
|
-
classes.push(`${key}${val}`);
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
return classes.join(' ') || null;
|
|
370
|
-
};
|
|
371
|
-
const fieldCss = () => {
|
|
372
|
-
return {
|
|
373
|
-
name: 'css',
|
|
374
|
-
type: 'group',
|
|
375
|
-
label: 'Regole di stile',
|
|
376
|
-
fields: [
|
|
377
|
-
fieldText({
|
|
378
|
-
name: 'className',
|
|
379
|
-
label: 'className',
|
|
380
|
-
required: false,
|
|
381
|
-
hooks: {
|
|
382
|
-
beforeChange: [concatCssFields],
|
|
383
|
-
},
|
|
384
|
-
}),
|
|
385
|
-
{
|
|
386
|
-
type: 'tabs',
|
|
387
|
-
tabs: [
|
|
388
|
-
{
|
|
389
|
-
label: 'Spacing',
|
|
390
|
-
fields: [fieldMargins(), fieldPaddings()],
|
|
391
|
-
},
|
|
392
|
-
],
|
|
393
|
-
},
|
|
394
|
-
],
|
|
395
|
-
};
|
|
396
|
-
};
|
|
397
|
-
|
|
398
|
-
const fieldContainerProps = (customFields = []) => {
|
|
399
|
-
return {
|
|
400
|
-
name: 'ctrP',
|
|
401
|
-
label: 'Proprietà container',
|
|
402
|
-
type: 'group',
|
|
403
|
-
fields: [
|
|
404
|
-
...customFields,
|
|
405
|
-
fieldRichText({ name: 'body', label: 'Contenuto', required: false }),
|
|
406
|
-
fieldContainerWidths(),
|
|
407
|
-
{
|
|
408
|
-
type: 'tabs',
|
|
409
|
-
tabs: [
|
|
410
|
-
{
|
|
411
|
-
label: 'Stile',
|
|
412
|
-
fields: [
|
|
413
|
-
fieldUpload('media', { name: 'bgi', label: 'Immagine di sfondo' }),
|
|
414
|
-
fieldThemeColor({ name: 'bgc', label: 'Colore di sfondo', required: false }),
|
|
415
|
-
fieldSelect({
|
|
416
|
-
name: 'borderRadius',
|
|
417
|
-
type: 'select',
|
|
418
|
-
label: 'Angoli arrotondati',
|
|
419
|
-
defaultValue: 'rounded-none',
|
|
420
|
-
options: [
|
|
421
|
-
{ label: 'Nessuno', value: 'rounded-none' },
|
|
422
|
-
{ label: 'Piccolo', value: 'rounded-sm' },
|
|
423
|
-
{ label: 'Medio', value: 'rounded-md' },
|
|
424
|
-
{ label: 'Grande', value: 'rounded-lg' },
|
|
425
|
-
{ label: 'Extra Grande', value: 'rounded-xl' },
|
|
426
|
-
{ label: 'Massimo', value: 'rounded-full' },
|
|
427
|
-
],
|
|
428
|
-
admin: {
|
|
429
|
-
width: '50%',
|
|
430
|
-
description: 'Imposta lo stile degli angoli arrotondati del contenitore.',
|
|
431
|
-
},
|
|
432
|
-
}),
|
|
433
|
-
fieldSelect({
|
|
434
|
-
name: 'boxShadow',
|
|
435
|
-
type: 'select',
|
|
436
|
-
label: 'Ombra contenitore',
|
|
437
|
-
defaultValue: 'shadow-none', // Default: nessuna ombra
|
|
438
|
-
options: [
|
|
439
|
-
{ label: 'Nessuna', value: 'shadow-none' },
|
|
440
|
-
{ label: 'Piccola', value: 'shadow-sm' },
|
|
441
|
-
{ label: 'Normale', value: 'shadow' },
|
|
442
|
-
{ label: 'Media', value: 'shadow-md' },
|
|
443
|
-
{ label: 'Grande', value: 'shadow-lg' },
|
|
444
|
-
{ label: 'Extra Grande', value: 'shadow-xl' },
|
|
445
|
-
{ label: 'Massima', value: 'shadow-2xl' },
|
|
446
|
-
],
|
|
447
|
-
admin: {
|
|
448
|
-
width: '50%',
|
|
449
|
-
description: "Imposta lo stile dell'ombra per il contenitore.",
|
|
450
|
-
},
|
|
451
|
-
}),
|
|
452
|
-
],
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
label: 'Dimensioni',
|
|
456
|
-
fields: [fieldHeights()],
|
|
457
|
-
},
|
|
458
|
-
],
|
|
459
|
-
},
|
|
460
|
-
fieldCss(),
|
|
461
|
-
],
|
|
462
|
-
};
|
|
463
|
-
};
|
|
464
|
-
|
|
465
|
-
const iconsList = [
|
|
466
|
-
{ label: 'Academic Cap', value: 'AcademicCapIcon' },
|
|
467
|
-
{ label: 'Adjustments Horizontal', value: 'AdjustmentsHorizontalIcon' },
|
|
468
|
-
{ label: 'Adjustments Vertical', value: 'AdjustmentsVerticalIcon' },
|
|
469
|
-
{ label: 'Archive Box Arrow Down', value: 'ArchiveBoxArrowDownIcon' },
|
|
470
|
-
{ label: 'Archive Box X Mark', value: 'ArchiveBoxXMarkIcon' },
|
|
471
|
-
{ label: 'Archive Box', value: 'ArchiveBoxIcon' },
|
|
472
|
-
{ label: 'Arrow Down Circle', value: 'ArrowDownCircleIcon' },
|
|
473
|
-
{ label: 'Arrow Down', value: 'ArrowDownIcon' },
|
|
474
|
-
{ label: 'Arrow Left Circle', value: 'ArrowLeftCircleIcon' },
|
|
475
|
-
{ label: 'Arrow Left', value: 'ArrowLeftIcon' },
|
|
476
|
-
{ label: 'Arrow Right Circle', value: 'ArrowRightCircleIcon' },
|
|
477
|
-
{ label: 'Arrow Right', value: 'ArrowRightIcon' },
|
|
478
|
-
{ label: 'Arrow Up Circle', value: 'ArrowUpCircleIcon' },
|
|
479
|
-
{ label: 'Arrow Up', value: 'ArrowUpIcon' },
|
|
480
|
-
{ label: 'Bell Alert', value: 'BellAlertIcon' },
|
|
481
|
-
{ label: 'Bell', value: 'BellIcon' },
|
|
482
|
-
{ label: 'Bookmark Square', value: 'BookmarkSquareIcon' },
|
|
483
|
-
{ label: 'Bookmark', value: 'BookmarkIcon' },
|
|
484
|
-
{ label: 'Building Office', value: 'BuildingOfficeIcon' },
|
|
485
|
-
{ label: 'Calendar', value: 'CalendarIcon' },
|
|
486
|
-
{ label: 'Camera', value: 'CameraIcon' },
|
|
487
|
-
{ label: 'Chart Bar', value: 'ChartBarIcon' },
|
|
488
|
-
{ label: 'Chat Bubble Left Right', value: 'ChatBubbleLeftRightIcon' },
|
|
489
|
-
{ label: 'Chat Bubble Left', value: 'ChatBubbleLeftIcon' },
|
|
490
|
-
{ label: 'Check Circle', value: 'CheckCircleIcon' },
|
|
491
|
-
{ label: 'Check', value: 'CheckIcon' },
|
|
492
|
-
{ label: 'Chevron Down', value: 'ChevronDownIcon' },
|
|
493
|
-
{ label: 'Chevron Left', value: 'ChevronLeftIcon' },
|
|
494
|
-
{ label: 'Chevron Right', value: 'ChevronRightIcon' },
|
|
495
|
-
{ label: 'Chevron Up', value: 'ChevronUpIcon' },
|
|
496
|
-
{ label: 'Clock', value: 'ClockIcon' },
|
|
497
|
-
{ label: 'Cloud Arrow Up', value: 'CloudArrowUpIcon' },
|
|
498
|
-
{ label: 'Cloud', value: 'CloudIcon' },
|
|
499
|
-
{ label: 'Code Bracket', value: 'CodeBracketIcon' },
|
|
500
|
-
{ label: 'Cog', value: 'CogIcon' },
|
|
501
|
-
{ label: 'Command Line', value: 'CommandLineIcon' },
|
|
502
|
-
{ label: 'Computer Desktop', value: 'ComputerDesktopIcon' },
|
|
503
|
-
{ label: 'Credit Card', value: 'CreditCardIcon' },
|
|
504
|
-
{ label: 'Document', value: 'DocumentIcon' },
|
|
505
|
-
{ label: 'Envelope', value: 'EnvelopeIcon' },
|
|
506
|
-
{ label: 'Exclamation Circle', value: 'ExclamationCircleIcon' },
|
|
507
|
-
{ label: 'Exclamation Triangle', value: 'ExclamationTriangleIcon' },
|
|
508
|
-
{ label: 'Eye', value: 'EyeIcon' },
|
|
509
|
-
{ label: 'Face Smile', value: 'FaceSmileIcon' },
|
|
510
|
-
{ label: 'Film', value: 'FilmIcon' },
|
|
511
|
-
{ label: 'Finger Print', value: 'FingerPrintIcon' },
|
|
512
|
-
{ label: 'Fire', value: 'FireIcon' },
|
|
513
|
-
{ label: 'Flag', value: 'FlagIcon' },
|
|
514
|
-
{ label: 'Folder Open', value: 'FolderOpenIcon' },
|
|
515
|
-
{ label: 'Folder', value: 'FolderIcon' },
|
|
516
|
-
{ label: 'Gift', value: 'GiftIcon' },
|
|
517
|
-
{ label: 'Globe Alt', value: 'GlobeAltIcon' },
|
|
518
|
-
{ label: 'Globe Europe Africa', value: 'GlobeEuropeAfricaIcon' },
|
|
519
|
-
{ label: 'Hand Raised', value: 'HandRaisedIcon' },
|
|
520
|
-
{ label: 'Heart', value: 'HeartIcon' },
|
|
521
|
-
{ label: 'Home', value: 'HomeIcon' },
|
|
522
|
-
{ label: 'Identification', value: 'IdentificationIcon' },
|
|
523
|
-
{ label: 'Information Circle', value: 'InformationCircleIcon' },
|
|
524
|
-
{ label: 'Key', value: 'KeyIcon' },
|
|
525
|
-
{ label: 'Link', value: 'LinkIcon' },
|
|
526
|
-
{ label: 'List Bullet', value: 'ListBulletIcon' },
|
|
527
|
-
{ label: 'Lock Closed', value: 'LockClosedIcon' },
|
|
528
|
-
{ label: 'Lock Open', value: 'LockOpenIcon' },
|
|
529
|
-
{ label: 'Magnifying Glass Circle', value: 'MagnifyingGlassCircleIcon' },
|
|
530
|
-
{ label: 'Magnifying Glass', value: 'MagnifyingGlassIcon' },
|
|
531
|
-
{ label: 'Map Pin', value: 'MapPinIcon' },
|
|
532
|
-
{ label: 'Map', value: 'MapIcon' },
|
|
533
|
-
{ label: 'Moon', value: 'MoonIcon' },
|
|
534
|
-
{ label: 'Paper Airplane', value: 'PaperAirplaneIcon' },
|
|
535
|
-
{ label: 'Paper Clip', value: 'PaperClipIcon' },
|
|
536
|
-
{ label: 'Pause Circle', value: 'PauseCircleIcon' },
|
|
537
|
-
{ label: 'Pencil Square', value: 'PencilSquareIcon' },
|
|
538
|
-
{ label: 'Pencil', value: 'PencilIcon' },
|
|
539
|
-
{ label: 'Phone Arrow Up Right', value: 'PhoneArrowUpRightIcon' },
|
|
540
|
-
{ label: 'Phone X Mark', value: 'PhoneXMarkIcon' },
|
|
541
|
-
{ label: 'Phone', value: 'PhoneIcon' },
|
|
542
|
-
{ label: 'Photo', value: 'PhotoIcon' },
|
|
543
|
-
{ label: 'Play Circle', value: 'PlayCircleIcon' },
|
|
544
|
-
{ label: 'Play', value: 'PlayIcon' },
|
|
545
|
-
{ label: 'Plus Circle', value: 'PlusCircleIcon' },
|
|
546
|
-
{ label: 'Plus', value: 'PlusIcon' },
|
|
547
|
-
{ label: 'Power', value: 'PowerIcon' },
|
|
548
|
-
{ label: 'Question Mark Circle', value: 'QuestionMarkCircleIcon' },
|
|
549
|
-
{ label: 'Rocket Launch', value: 'RocketLaunchIcon' },
|
|
550
|
-
{ label: 'Rss', value: 'RssIcon' },
|
|
551
|
-
{ label: 'Scale', value: 'ScaleIcon' },
|
|
552
|
-
{ label: 'Server', value: 'ServerIcon' },
|
|
553
|
-
{ label: 'Share', value: 'ShareIcon' },
|
|
554
|
-
{ label: 'Shield Check', value: 'ShieldCheckIcon' },
|
|
555
|
-
{ label: 'Shield Exclamation', value: 'ShieldExclamationIcon' },
|
|
556
|
-
{ label: 'Shopping Bag', value: 'ShoppingBagIcon' },
|
|
557
|
-
{ label: 'Shopping Cart', value: 'ShoppingCartIcon' },
|
|
558
|
-
{ label: 'Star', value: 'StarIcon' },
|
|
559
|
-
{ label: 'Stop Circle', value: 'StopCircleIcon' },
|
|
560
|
-
{ label: 'Sun', value: 'SunIcon' },
|
|
561
|
-
{ label: 'Tag', value: 'TagIcon' },
|
|
562
|
-
{ label: 'Trash', value: 'TrashIcon' },
|
|
563
|
-
{ label: 'Trophy', value: 'TrophyIcon' },
|
|
564
|
-
{ label: 'User Circle', value: 'UserCircleIcon' },
|
|
565
|
-
{ label: 'User Group', value: 'UserGroupIcon' },
|
|
566
|
-
{ label: 'User', value: 'UserIcon' },
|
|
567
|
-
{ label: 'Users', value: 'UsersIcon' },
|
|
568
|
-
{ label: 'Video Camera', value: 'VideoCameraIcon' },
|
|
569
|
-
{ label: 'Wifi', value: 'WifiIcon' },
|
|
570
|
-
{ label: 'Window', value: 'WindowIcon' },
|
|
571
|
-
{ label: 'Wrench Screwdriver', value: 'WrenchScrewdriverIcon' },
|
|
572
|
-
{ label: 'Wrench', value: 'WrenchIcon' },
|
|
573
|
-
{ label: 'X Circle', value: 'XCircleIcon' },
|
|
574
|
-
{ label: 'X Mark', value: 'XMarkIcon' },
|
|
575
|
-
];
|
|
576
|
-
|
|
577
|
-
const fieldAction = () => ({
|
|
578
|
-
type: 'group',
|
|
579
|
-
label: 'Azione',
|
|
580
|
-
name: 'action',
|
|
581
|
-
fields: [
|
|
582
|
-
fieldCheckbox({
|
|
583
|
-
name: 'show',
|
|
584
|
-
label: 'Mostra azione',
|
|
585
|
-
defaultValue: false,
|
|
586
|
-
admin: {
|
|
587
|
-
width: '50%',
|
|
588
|
-
},
|
|
589
|
-
}),
|
|
590
|
-
fieldText({
|
|
591
|
-
name: 'label',
|
|
592
|
-
type: 'text',
|
|
593
|
-
label: 'Testo da visualizzare',
|
|
594
|
-
defaultValue: 'Action',
|
|
595
|
-
admin: {
|
|
596
|
-
width: '50%',
|
|
597
|
-
},
|
|
598
|
-
}),
|
|
599
|
-
fieldSelect({
|
|
600
|
-
name: 'actionType',
|
|
601
|
-
label: 'Tipo di azione',
|
|
602
|
-
defaultValue: 'internalLink',
|
|
603
|
-
admin: {
|
|
604
|
-
width: '33%',
|
|
605
|
-
},
|
|
606
|
-
options: [
|
|
607
|
-
{
|
|
608
|
-
label: 'Interno',
|
|
609
|
-
value: 'internalLink',
|
|
610
|
-
},
|
|
611
|
-
{
|
|
612
|
-
label: 'Esterno',
|
|
613
|
-
value: 'externalLink',
|
|
614
|
-
},
|
|
615
|
-
/*
|
|
616
|
-
{
|
|
617
|
-
label: 'Azione',
|
|
618
|
-
value: 'customAction',
|
|
619
|
-
},
|
|
620
|
-
*/
|
|
621
|
-
],
|
|
622
|
-
}),
|
|
623
|
-
{
|
|
624
|
-
name: 'internalLink',
|
|
625
|
-
type: 'relationship',
|
|
626
|
-
label: 'Seleziona una pagina interna',
|
|
627
|
-
admin: {
|
|
628
|
-
condition: (data, siblingData) => {
|
|
629
|
-
return siblingData?.actionType === 'internalLink';
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
relationTo: ['pages', 'posts', 'destinations'],
|
|
633
|
-
},
|
|
634
|
-
{
|
|
635
|
-
name: 'externalLink',
|
|
636
|
-
type: 'text',
|
|
637
|
-
label: 'URL esterno',
|
|
638
|
-
admin: {
|
|
639
|
-
condition: (data, siblingData) => {
|
|
640
|
-
return siblingData?.actionType === 'externalLink';
|
|
641
|
-
},
|
|
642
|
-
},
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
type: 'collapsible',
|
|
646
|
-
label: 'Stile',
|
|
647
|
-
fields: [
|
|
648
|
-
{
|
|
649
|
-
type: 'row',
|
|
650
|
-
fields: [
|
|
651
|
-
{
|
|
652
|
-
name: 'buttonStyle',
|
|
653
|
-
type: 'select',
|
|
654
|
-
label: 'Stile bottone',
|
|
655
|
-
defaultValue: 'solid',
|
|
656
|
-
admin: {
|
|
657
|
-
width: '33%',
|
|
658
|
-
},
|
|
659
|
-
options: [
|
|
660
|
-
{ label: 'Solido', value: 'solid' },
|
|
661
|
-
{ label: 'Outline', value: 'outline' },
|
|
662
|
-
{ label: 'Ghost', value: 'ghost' },
|
|
663
|
-
{ label: 'Link', value: 'link' },
|
|
664
|
-
],
|
|
665
|
-
},
|
|
666
|
-
{
|
|
667
|
-
name: 'buttonColor',
|
|
668
|
-
type: 'select',
|
|
669
|
-
label: 'Colore bottone',
|
|
670
|
-
defaultValue: 'primary',
|
|
671
|
-
admin: {
|
|
672
|
-
width: '33%',
|
|
673
|
-
},
|
|
674
|
-
options: [
|
|
675
|
-
{ label: 'Primary', value: 'primary' },
|
|
676
|
-
{ label: 'Secondary', value: 'secondary' },
|
|
677
|
-
{ label: 'Accent', value: 'accent' },
|
|
678
|
-
{ label: 'Dark', value: 'dark' },
|
|
679
|
-
{ label: 'Light', value: 'light' },
|
|
680
|
-
],
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
name: 'buttonSize',
|
|
684
|
-
type: 'select',
|
|
685
|
-
label: 'Dimensione bottone',
|
|
686
|
-
defaultValue: 'default',
|
|
687
|
-
admin: {
|
|
688
|
-
width: '33%',
|
|
689
|
-
},
|
|
690
|
-
options: [
|
|
691
|
-
{ label: 'Small', value: 'small' },
|
|
692
|
-
{ label: 'Default', value: 'default' },
|
|
693
|
-
{ label: 'Medium', value: 'medium' },
|
|
694
|
-
{ label: 'Large', value: 'large' },
|
|
695
|
-
{ label: 'Extra Large', value: 'xl' },
|
|
696
|
-
],
|
|
697
|
-
},
|
|
698
|
-
{
|
|
699
|
-
name: 'buttonRounded',
|
|
700
|
-
type: 'select',
|
|
701
|
-
label: 'Arrotondamento',
|
|
702
|
-
defaultValue: 'default',
|
|
703
|
-
admin: {
|
|
704
|
-
width: '33%',
|
|
705
|
-
},
|
|
706
|
-
options: [
|
|
707
|
-
{ label: 'Nessuno', value: 'none' },
|
|
708
|
-
{ label: 'Piccolo', value: 'sm' },
|
|
709
|
-
{ label: 'Standard', value: 'default' },
|
|
710
|
-
{ label: 'Grande', value: 'lg' },
|
|
711
|
-
{ label: 'Completo', value: 'full' },
|
|
712
|
-
],
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
name: 'alignment',
|
|
716
|
-
type: 'select',
|
|
717
|
-
label: 'Allineamento del Bottone',
|
|
718
|
-
defaultValue: 'left',
|
|
719
|
-
options: [
|
|
720
|
-
{
|
|
721
|
-
label: 'Sinistra',
|
|
722
|
-
value: 'left',
|
|
723
|
-
},
|
|
724
|
-
{
|
|
725
|
-
label: 'Centro',
|
|
726
|
-
value: 'center',
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
label: 'Destra',
|
|
730
|
-
value: 'right',
|
|
731
|
-
},
|
|
732
|
-
],
|
|
733
|
-
admin: {
|
|
734
|
-
width: '33%',
|
|
735
|
-
condition: (data) => true, // Puoi modificare questa condizione se il campo deve essere mostrato solo in determinate circostanze
|
|
736
|
-
},
|
|
737
|
-
},
|
|
738
|
-
fieldThemeColor({
|
|
739
|
-
name: 'textColor',
|
|
740
|
-
label: 'Colore del testo',
|
|
741
|
-
admin: {
|
|
742
|
-
width: '33%',
|
|
743
|
-
},
|
|
744
|
-
}),
|
|
745
|
-
{
|
|
746
|
-
name: 'additionalEffects',
|
|
747
|
-
type: 'select',
|
|
748
|
-
label: 'Effetti aggiuntivi',
|
|
749
|
-
hasMany: true,
|
|
750
|
-
admin: {
|
|
751
|
-
width: '33%',
|
|
752
|
-
},
|
|
753
|
-
options: [
|
|
754
|
-
{ label: 'Ombra', value: 'shadow' },
|
|
755
|
-
{ label: 'Transizione', value: 'transition' },
|
|
756
|
-
{ label: 'Animazione scala', value: 'scale' },
|
|
757
|
-
],
|
|
758
|
-
},
|
|
759
|
-
],
|
|
760
|
-
},
|
|
761
|
-
{
|
|
762
|
-
type: 'row',
|
|
763
|
-
fields: [
|
|
764
|
-
{
|
|
765
|
-
name: 'useIcon',
|
|
766
|
-
type: 'checkbox',
|
|
767
|
-
label: 'Usa icona',
|
|
768
|
-
defaultValue: false,
|
|
769
|
-
admin: {
|
|
770
|
-
width: '33%',
|
|
771
|
-
},
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
name: 'iconPosition',
|
|
775
|
-
type: 'select',
|
|
776
|
-
label: 'Posizione icona',
|
|
777
|
-
defaultValue: 'left',
|
|
778
|
-
admin: {
|
|
779
|
-
width: '33%',
|
|
780
|
-
condition: (_, siblingData) => siblingData?.useIcon === true,
|
|
781
|
-
},
|
|
782
|
-
options: [
|
|
783
|
-
{ label: 'Sinistra', value: 'left' },
|
|
784
|
-
{ label: 'Destra', value: 'right' },
|
|
785
|
-
{ label: 'Solo icona', value: 'only' },
|
|
786
|
-
],
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: 'iconName',
|
|
790
|
-
type: 'select',
|
|
791
|
-
label: 'Icona',
|
|
792
|
-
options: [...iconsList],
|
|
793
|
-
admin: {
|
|
794
|
-
width: '33%',
|
|
795
|
-
condition: (_, siblingData) => siblingData?.useIcon === true,
|
|
796
|
-
},
|
|
797
|
-
// Qui potresti usare un select con le icone disponibili se hai una libreria predefinita
|
|
798
|
-
},
|
|
799
|
-
],
|
|
800
|
-
},
|
|
801
|
-
],
|
|
802
|
-
},
|
|
803
|
-
],
|
|
804
|
-
});
|
|
805
|
-
|
|
806
|
-
const fieldConfigProps = (customFields = []) => {
|
|
807
|
-
return {
|
|
808
|
-
name: 'config',
|
|
809
|
-
label: 'Configurazione',
|
|
810
|
-
type: 'group',
|
|
811
|
-
fields: [
|
|
812
|
-
...customFields,
|
|
813
|
-
],
|
|
814
|
-
};
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
const fieldContentProps = (customFields = []) => {
|
|
818
|
-
return {
|
|
819
|
-
name: 'cntP',
|
|
820
|
-
label: 'Contenuto',
|
|
821
|
-
type: 'group',
|
|
822
|
-
fields: [
|
|
823
|
-
...customFields,
|
|
824
|
-
],
|
|
825
|
-
};
|
|
826
|
-
};
|
|
827
|
-
|
|
828
|
-
/**
|
|
829
|
-
* Genera un campo per la selezione delle altezze
|
|
830
|
-
* @returns Field - Campo di tipo `select` per PayloadCMS
|
|
831
|
-
*/
|
|
832
|
-
const fieldViewportHeights = () => {
|
|
833
|
-
return fieldSelect({
|
|
834
|
-
name: 'h',
|
|
835
|
-
label: 'Altezza',
|
|
836
|
-
type: 'select',
|
|
837
|
-
options: [
|
|
838
|
-
{ value: '', label: '(Nessuno)' },
|
|
839
|
-
...TailwindViewportHeights.map((h) => ({ value: `h-${h}`, label: h })),
|
|
840
|
-
],
|
|
841
|
-
admin: {
|
|
842
|
-
description: 'Definisce l’altezza dell’elemento.',
|
|
843
|
-
width: '50%',
|
|
844
|
-
},
|
|
845
|
-
});
|
|
846
|
-
};
|
|
847
|
-
|
|
848
|
-
const fieldSectionProps = (customFields = []) => {
|
|
849
|
-
return {
|
|
850
|
-
name: 'sctP',
|
|
851
|
-
label: 'Proprietà sezione',
|
|
852
|
-
type: 'group',
|
|
853
|
-
fields: [
|
|
854
|
-
...customFields,
|
|
855
|
-
fieldRichText({ name: 'body', label: 'Contenuto', required: false }),
|
|
856
|
-
{
|
|
857
|
-
type: 'tabs',
|
|
858
|
-
tabs: [
|
|
859
|
-
{
|
|
860
|
-
label: 'Stile',
|
|
861
|
-
fields: [
|
|
862
|
-
fieldUpload('media', { name: 'bgi', label: 'Immagine di sfondo' }),
|
|
863
|
-
fieldThemeColor({ name: 'bgc', label: 'Colore di sfondo', required: false }),
|
|
864
|
-
],
|
|
865
|
-
},
|
|
866
|
-
],
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
type: 'tabs',
|
|
870
|
-
tabs: [
|
|
871
|
-
{
|
|
872
|
-
label: 'Dimensioni',
|
|
873
|
-
fields: [fieldViewportHeights()],
|
|
874
|
-
},
|
|
875
|
-
],
|
|
876
|
-
},
|
|
877
|
-
fieldCss(),
|
|
878
|
-
],
|
|
879
|
-
};
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
const fieldSectionTabs = (options = {}) => {
|
|
883
|
-
const { config = true, section = true, container = true, content = true, configFields = [], sectionFields = [], containerFields = [], contentFields = [], } = options;
|
|
884
|
-
const tabs = [];
|
|
885
|
-
if (config) {
|
|
886
|
-
tabs.push({
|
|
887
|
-
label: 'Configurazione',
|
|
888
|
-
fields: [fieldConfigProps(configFields)],
|
|
889
|
-
});
|
|
890
|
-
}
|
|
891
|
-
// Tab per la sezione
|
|
892
|
-
if (section) {
|
|
893
|
-
tabs.push({
|
|
894
|
-
label: 'Sezione',
|
|
895
|
-
fields: [fieldSectionProps(sectionFields)],
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
// Tab per il container
|
|
899
|
-
if (container) {
|
|
900
|
-
tabs.push({
|
|
901
|
-
label: 'Container',
|
|
902
|
-
fields: [fieldContainerProps(containerFields)],
|
|
903
|
-
});
|
|
904
|
-
}
|
|
905
|
-
// Tab per il contenuto
|
|
906
|
-
if (content) {
|
|
907
|
-
tabs.push({
|
|
908
|
-
label: 'Contenuto',
|
|
909
|
-
fields: [fieldContentProps(contentFields)],
|
|
910
|
-
});
|
|
911
|
-
}
|
|
912
|
-
return {
|
|
913
|
-
type: 'tabs',
|
|
914
|
-
tabs: tabs,
|
|
915
|
-
};
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
export { fieldAction as a, fieldArray as b, fieldCheckbox as c, fieldThemeColor as d, fieldConfigProps as e, fieldSelect as f, fieldContainerProps as g, fieldContainerWidths as h, iconsList as i, fieldContentProps as j, fieldCss as k, fieldHeights as l, fieldMargins as m, fieldNumber as n, fieldPaddings as o, fieldRelationship as p, fieldRichText as q, fieldSectionProps as r, fieldSectionTabs as s, fieldText as t, fieldUpload as u, fieldViewportHeights as v };
|
|
919
|
-
//# sourceMappingURL=fieldSectionTabs-B2XLxdEW.js.map
|