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