@woodylab/payload 0.0.85 → 0.0.88
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/hasRoles.js +17 -0
- package/dist/acl/index.js +1 -0
- package/dist/config/blocks/blockCarousel.d.ts +1 -1
- package/dist/config/blocks/blockCarousel.js +102 -0
- package/dist/config/blocks/blockDisclosureList.d.ts +1 -1
- package/dist/config/blocks/blockDisclosureList.js +58 -0
- package/dist/config/blocks/blockGrid.d.ts +1 -1
- package/dist/config/blocks/blockGrid.js +161 -0
- package/dist/config/blocks/blockGridContent.d.ts +1 -1
- package/dist/config/blocks/blockGridContent.js +195 -0
- package/dist/config/blocks/blockHtmlElement.d.ts +5 -2
- package/dist/config/blocks/blockHtmlElement.js +13 -0
- package/dist/config/blocks/blockImage.d.ts +1 -1
- package/dist/config/blocks/blockImage.js +15 -0
- package/dist/config/blocks/blockParallax.d.ts +1 -1
- package/dist/config/blocks/blockParallax.js +76 -0
- package/dist/config/blocks/blockTabs.d.ts +1 -1
- package/dist/config/blocks/blockTabs.js +24 -0
- package/dist/config/blocks/blockView.d.ts +2 -0
- package/dist/config/blocks/blockView.js +234 -0
- package/dist/config/collections/collectionMenus.js +41 -0
- package/dist/config/globals/configFooter.d.ts +1 -1
- package/dist/config/globals/configFooter.js +46 -0
- package/dist/config/globals/configHeader.d.ts +1 -1
- package/dist/config/globals/configHeader.js +50 -0
- package/dist/config/globals/configSettings.d.ts +1 -1
- package/dist/config/globals/configSettings.js +144 -0
- package/dist/config/index.cjs.js +1 -1
- package/dist/config/index.esm.js +1 -1
- package/dist/config/index.js +15 -0
- package/dist/enums/index.js +1 -0
- package/dist/enums/userRoles.js +8 -0
- package/dist/fields/fieldArray.js +9 -0
- package/dist/fields/fieldBlocks.js +9 -0
- package/dist/fields/fieldCheckbox.js +11 -0
- package/dist/fields/fieldCode.js +8 -0
- package/dist/fields/fieldDate.js +15 -0
- package/dist/fields/fieldEmail.js +8 -0
- package/dist/fields/fieldJoin.js +9 -0
- package/dist/fields/fieldNumber.js +8 -0
- package/dist/fields/fieldPoint.js +8 -0
- package/dist/fields/fieldRadioGroup.js +18 -0
- package/dist/fields/fieldRelationship.js +9 -0
- package/dist/fields/fieldRichText.js +12 -0
- package/dist/fields/fieldSelect.js +9 -0
- package/dist/fields/fieldText.js +8 -0
- package/dist/fields/fieldTextArea.js +8 -0
- package/dist/fields/fieldUpload.js +9 -0
- package/dist/fields/index.js +37 -0
- package/dist/fields/layout/fieldContainerProps.js +74 -0
- package/dist/fields/section/fieldAction.js +236 -0
- package/dist/fields/section/fieldConfigProps.js +11 -0
- package/dist/fields/section/fieldContentProps.js +11 -0
- package/dist/fields/section/fieldSectionProps.js +15 -0
- package/dist/fields/section/fieldSectionTabs.js +40 -0
- package/dist/fields/style/fieldColor.js +21 -0
- package/dist/fields/style/fieldContainerWidths.js +17 -0
- package/dist/fields/style/fieldCss.js +68 -0
- package/dist/fields/style/fieldFontSizes.js +14 -0
- package/dist/fields/style/fieldHeights.js +23 -0
- package/dist/fields/style/fieldMargins.js +138 -0
- package/dist/fields/style/fieldPaddings.js +114 -0
- package/dist/fields/style/fieldViewportHeights.js +22 -0
- package/dist/fields/utils/fieldRoles.js +26 -0
- package/dist/generateCssVars.js +71 -0
- package/dist/generatePreviewPath.d.ts +1 -1
- package/dist/generatePreviewPath.js +14 -0
- package/dist/getButtonClasses.js +135 -0
- package/dist/getClassName.js +28 -0
- package/dist/getInlineStyles.d.ts +2 -2
- package/dist/getInlineStyles.js +17 -0
- package/dist/googleFonts.js +1343 -0
- package/dist/hexToRgb.js +21 -0
- package/dist/hooks/fields/getNumberValueFromClassNameString.js +16 -0
- package/dist/hooks/fields/populateSiblingClassName.js +23 -0
- package/dist/hooks/fields/populateSiblingClassNameAfterChange.js +6 -0
- package/dist/hooks/fields/updateClassNameAfterRead.js +16 -0
- package/dist/hooks/index.js +4 -0
- package/dist/iconsList.js +112 -0
- package/dist/index-AsrRNOzZ.js +2 -0
- package/dist/index-AsrRNOzZ.js.map +1 -0
- package/dist/index-CVxEpCHf.js +2 -0
- package/dist/index-CVxEpCHf.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +26 -0
- package/dist/tailwind/index.d.ts +5 -3
- package/dist/tailwind/index.js +2692 -0
- package/dist/types/fieldOverride.js +1 -0
- package/package.json +16 -33
- package/dist/acl/index.cjs.js +0 -2
- package/dist/acl/index.cjs.js.map +0 -1
- package/dist/acl/index.esm.js +0 -2
- package/dist/acl/index.esm.js.map +0 -1
- package/dist/enums/index.cjs.js +0 -2
- package/dist/enums/index.cjs.js.map +0 -1
- package/dist/enums/index.esm.js +0 -2
- package/dist/enums/index.esm.js.map +0 -1
- package/dist/fieldViewportHeights-BDcXwnNa.js +0 -2
- package/dist/fieldViewportHeights-BDcXwnNa.js.map +0 -1
- package/dist/fieldViewportHeights-BiejOiGj.js +0 -2
- package/dist/fieldViewportHeights-BiejOiGj.js.map +0 -1
- package/dist/fields/index.cjs.js +0 -2
- package/dist/fields/index.cjs.js.map +0 -1
- package/dist/fields/index.esm.js +0 -2
- package/dist/fields/index.esm.js.map +0 -1
- package/dist/getNumberValueFromClassNameString-Dm5eOjBJ.js +0 -2
- package/dist/getNumberValueFromClassNameString-Dm5eOjBJ.js.map +0 -1
- package/dist/getNumberValueFromClassNameString-pKKt97eg.js +0 -2
- package/dist/getNumberValueFromClassNameString-pKKt97eg.js.map +0 -1
- package/dist/hooks/index.cjs.js +0 -2
- package/dist/hooks/index.cjs.js.map +0 -1
- package/dist/hooks/index.esm.js +0 -2
- package/dist/hooks/index.esm.js.map +0 -1
- package/dist/index--JXKMhaT.js +0 -2
- package/dist/index--JXKMhaT.js.map +0 -1
- package/dist/index-B-FTpy4t.js +0 -2
- package/dist/index-B-FTpy4t.js.map +0 -1
- package/dist/index-C4uc5BOd.js +0 -2
- package/dist/index-C4uc5BOd.js.map +0 -1
- package/dist/index-C6SROxLn.js +0 -2
- package/dist/index-C6SROxLn.js.map +0 -1
- package/dist/index-CPtPsRwp.js +0 -2
- package/dist/index-CPtPsRwp.js.map +0 -1
- package/dist/index-CbPSDPpZ.js +0 -2
- package/dist/index-CbPSDPpZ.js.map +0 -1
- package/dist/index-D7075_q9.js +0 -2
- package/dist/index-D7075_q9.js.map +0 -1
- package/dist/index-DArGZfob.js +0 -2
- package/dist/index-DArGZfob.js.map +0 -1
- package/dist/index-DfvZ1mDE.js +0 -2
- package/dist/index-DfvZ1mDE.js.map +0 -1
- package/dist/index-FnRjWfU7.js +0 -2
- package/dist/index-FnRjWfU7.js.map +0 -1
- package/dist/index-GDdL2MgQ.js +0 -2
- package/dist/index-GDdL2MgQ.js.map +0 -1
- package/dist/index-gxytNJWT.js +0 -2
- package/dist/index-gxytNJWT.js.map +0 -1
- package/dist/tailwind/index.cjs.js +0 -2
- package/dist/tailwind/index.cjs.js.map +0 -1
- package/dist/tailwind/index.esm.js +0 -2
- package/dist/tailwind/index.esm.js.map +0 -1
- package/dist/userRoles-BIrmWoCJ.js +0 -2
- package/dist/userRoles-BIrmWoCJ.js.map +0 -1
- package/dist/userRoles-Dd_gfx51.js +0 -2
- package/dist/userRoles-Dd_gfx51.js.map +0 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
// config/blockCarousel.ts
|
|
2
|
+
import { fieldCheckbox, fieldNumber, fieldRichText, fieldText, fieldUpload, fieldViewportHeights, } from '../../fields';
|
|
3
|
+
const blockParallax = {
|
|
4
|
+
slug: 'parallax',
|
|
5
|
+
labels: {
|
|
6
|
+
singular: 'Parallax',
|
|
7
|
+
plural: 'Parallaxes',
|
|
8
|
+
},
|
|
9
|
+
fields: [
|
|
10
|
+
fieldUpload('media', {
|
|
11
|
+
name: 'parallaxImage',
|
|
12
|
+
required: true,
|
|
13
|
+
label: 'Immagine di sfondo',
|
|
14
|
+
}),
|
|
15
|
+
fieldRichText({
|
|
16
|
+
name: 'content',
|
|
17
|
+
label: 'Contenuto',
|
|
18
|
+
}),
|
|
19
|
+
{
|
|
20
|
+
type: 'row',
|
|
21
|
+
fields: [
|
|
22
|
+
fieldViewportHeights(),
|
|
23
|
+
fieldCheckbox({
|
|
24
|
+
name: 'hasOverlay',
|
|
25
|
+
label: 'Overlay',
|
|
26
|
+
defaultValue: true,
|
|
27
|
+
admin: {
|
|
28
|
+
description: "Abilità overlay sull'immagine",
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'row',
|
|
35
|
+
fields: [
|
|
36
|
+
fieldNumber({
|
|
37
|
+
name: 'parallaxStrength',
|
|
38
|
+
label: 'Intensità parallax',
|
|
39
|
+
defaultValue: 300,
|
|
40
|
+
min: 0,
|
|
41
|
+
max: 1000,
|
|
42
|
+
admin: {
|
|
43
|
+
width: '25%',
|
|
44
|
+
},
|
|
45
|
+
}),
|
|
46
|
+
fieldNumber({
|
|
47
|
+
name: 'parallaxBlur',
|
|
48
|
+
label: 'Sfocatura (0 = nessuna)',
|
|
49
|
+
defaultValue: 0,
|
|
50
|
+
min: 0,
|
|
51
|
+
max: 5,
|
|
52
|
+
admin: {
|
|
53
|
+
width: '25%',
|
|
54
|
+
},
|
|
55
|
+
}),
|
|
56
|
+
fieldText({
|
|
57
|
+
name: 'className',
|
|
58
|
+
label: 'Classi CSS personalizzate',
|
|
59
|
+
required: false,
|
|
60
|
+
admin: {
|
|
61
|
+
width: '25%',
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
fieldNumber({
|
|
65
|
+
name: 'minHeight',
|
|
66
|
+
label: 'Altezza minima (px)',
|
|
67
|
+
defaultValue: 400,
|
|
68
|
+
admin: {
|
|
69
|
+
width: '25%',
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
export default blockParallax;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// config/blockCarousel.ts
|
|
2
|
+
import { fieldArray, fieldRichText, fieldSectionTabs, fieldText } from '../../fields';
|
|
3
|
+
const blockTabs = {
|
|
4
|
+
slug: 'tabs',
|
|
5
|
+
labels: {
|
|
6
|
+
singular: 'tabs',
|
|
7
|
+
plural: 'tabs',
|
|
8
|
+
},
|
|
9
|
+
fields: [
|
|
10
|
+
fieldSectionTabs({
|
|
11
|
+
contentFields: [
|
|
12
|
+
fieldArray({
|
|
13
|
+
name: 'tab',
|
|
14
|
+
label: 'tab',
|
|
15
|
+
fields: [
|
|
16
|
+
fieldText({ name: 'title', label: 'Titolo tab' }),
|
|
17
|
+
fieldRichText({ name: 'body', label: 'Contenuto tab' }),
|
|
18
|
+
],
|
|
19
|
+
}),
|
|
20
|
+
],
|
|
21
|
+
}),
|
|
22
|
+
],
|
|
23
|
+
};
|
|
24
|
+
export default blockTabs;
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
export const BlockViewConfig = {
|
|
3
|
+
slug: 'view', // #TODO verificare referenze lato client per rendering
|
|
4
|
+
labels: {
|
|
5
|
+
singular: 'View',
|
|
6
|
+
plural: 'Views',
|
|
7
|
+
},
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
type: 'tabs',
|
|
11
|
+
tabs: [
|
|
12
|
+
// ======================================================
|
|
13
|
+
// TAB 1 — DATA SOURCE
|
|
14
|
+
// ======================================================
|
|
15
|
+
{
|
|
16
|
+
label: 'Data Source',
|
|
17
|
+
fields: [
|
|
18
|
+
{
|
|
19
|
+
name: 'useInternalSource',
|
|
20
|
+
type: 'checkbox',
|
|
21
|
+
defaultValue: true,
|
|
22
|
+
label: 'Usa sorgente interna Payload',
|
|
23
|
+
admin: {
|
|
24
|
+
readOnly: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
// ---------------- INTERNAL SOURCE ----------------
|
|
28
|
+
{
|
|
29
|
+
type: 'row',
|
|
30
|
+
fields: [
|
|
31
|
+
{
|
|
32
|
+
name: 'internalCollection',
|
|
33
|
+
type: 'select',
|
|
34
|
+
label: 'Collection',
|
|
35
|
+
admin: {
|
|
36
|
+
width: '50%',
|
|
37
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === true,
|
|
38
|
+
},
|
|
39
|
+
options: [
|
|
40
|
+
// puoi popolarlI dinamicamente via hook admin se preferisci
|
|
41
|
+
{ label: 'Articles', value: 'articles' },
|
|
42
|
+
{ label: 'Users', value: 'users' },
|
|
43
|
+
{ label: 'Categories', value: 'categories' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'internalSort',
|
|
48
|
+
type: 'text',
|
|
49
|
+
label: 'Ordina per',
|
|
50
|
+
admin: {
|
|
51
|
+
width: '50%',
|
|
52
|
+
placeholder: '-createdAt oppure title',
|
|
53
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === true,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'internalWhere',
|
|
60
|
+
type: 'json',
|
|
61
|
+
label: 'Filtro (where)',
|
|
62
|
+
admin: {
|
|
63
|
+
description: 'Opzionale — oggetto where di Payload CMS 3',
|
|
64
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === true,
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
// ---------------- EXTERNAL SOURCE ----------------
|
|
68
|
+
{
|
|
69
|
+
type: 'row',
|
|
70
|
+
fields: [
|
|
71
|
+
{
|
|
72
|
+
name: 'dataSource',
|
|
73
|
+
type: 'text',
|
|
74
|
+
required: true,
|
|
75
|
+
label: 'Endpoint / Provider',
|
|
76
|
+
admin: {
|
|
77
|
+
width: '50%',
|
|
78
|
+
placeholder: '/api/articles',
|
|
79
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === false,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'dataSet',
|
|
84
|
+
type: 'text',
|
|
85
|
+
required: true,
|
|
86
|
+
label: 'Campo Array nei Dati',
|
|
87
|
+
admin: {
|
|
88
|
+
width: '50%',
|
|
89
|
+
placeholder: 'docs',
|
|
90
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === false,
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'sourceOptions',
|
|
97
|
+
type: 'json',
|
|
98
|
+
required: false,
|
|
99
|
+
label: 'Opzioni Query (HTTP)',
|
|
100
|
+
admin: {
|
|
101
|
+
description: 'Headers, query params, ecc.',
|
|
102
|
+
condition: (_, siblingData) => siblingData?.useInternalSource === false,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
// ======================================================
|
|
108
|
+
// TAB 2 — VIEW CONTAINER (INVARIATO)
|
|
109
|
+
// ======================================================
|
|
110
|
+
{
|
|
111
|
+
label: 'View Container',
|
|
112
|
+
fields: [
|
|
113
|
+
{
|
|
114
|
+
type: 'row',
|
|
115
|
+
fields: [
|
|
116
|
+
{
|
|
117
|
+
name: 'component',
|
|
118
|
+
label: 'View Component',
|
|
119
|
+
type: 'relationship',
|
|
120
|
+
//@ts-ignore
|
|
121
|
+
relationTo: 'component-definitions',
|
|
122
|
+
admin: { width: '50%' },
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'viewMode',
|
|
126
|
+
label: 'View Style',
|
|
127
|
+
type: 'relationship',
|
|
128
|
+
//@ts-ignore
|
|
129
|
+
relationTo: 'view-modes',
|
|
130
|
+
required: true,
|
|
131
|
+
admin: { width: '50%' },
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: 'fieldMapping',
|
|
137
|
+
type: 'json',
|
|
138
|
+
label: 'Mapping verso Container Props',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
// ======================================================
|
|
143
|
+
// TAB 3 — ROW (INVARIATO)
|
|
144
|
+
// ======================================================
|
|
145
|
+
{
|
|
146
|
+
label: 'Row Items',
|
|
147
|
+
fields: [
|
|
148
|
+
{
|
|
149
|
+
type: 'row',
|
|
150
|
+
fields: [
|
|
151
|
+
{
|
|
152
|
+
name: 'rowComponent',
|
|
153
|
+
label: 'Row Component',
|
|
154
|
+
type: 'relationship',
|
|
155
|
+
//@ts-ignore
|
|
156
|
+
relationTo: 'component-definitions',
|
|
157
|
+
hasMany: false,
|
|
158
|
+
admin: { width: '50%' },
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: 'rowViewMode',
|
|
162
|
+
label: 'Row Style',
|
|
163
|
+
type: 'relationship',
|
|
164
|
+
relationTo: 'view-modes',
|
|
165
|
+
admin: { width: '50%' },
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
name: 'rowPropsMapping',
|
|
171
|
+
type: 'json',
|
|
172
|
+
label: 'Mapping verso Row Props',
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
name: 'rowChildren',
|
|
176
|
+
type: 'array',
|
|
177
|
+
label: 'Row Children',
|
|
178
|
+
admin: {
|
|
179
|
+
description: 'Definisci i componenti figli da renderizzare per ogni item della view. Usa props statiche o propsBinding per mappare campi della singola item.',
|
|
180
|
+
},
|
|
181
|
+
fields: [
|
|
182
|
+
{
|
|
183
|
+
type: 'row',
|
|
184
|
+
fields: [
|
|
185
|
+
{
|
|
186
|
+
name: 'definition',
|
|
187
|
+
label: 'Child Definition',
|
|
188
|
+
type: 'relationship',
|
|
189
|
+
//@ts-ignore
|
|
190
|
+
relationTo: 'component-definitions',
|
|
191
|
+
required: true,
|
|
192
|
+
admin: {
|
|
193
|
+
width: '50%',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: 'viewMode',
|
|
198
|
+
label: 'Child ViewMode',
|
|
199
|
+
type: 'relationship',
|
|
200
|
+
//@ts-ignore
|
|
201
|
+
relationTo: 'view-modes',
|
|
202
|
+
hasMany: true,
|
|
203
|
+
required: false,
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: 'staticProps',
|
|
207
|
+
type: 'json',
|
|
208
|
+
required: false,
|
|
209
|
+
label: 'Binding da JSON statico',
|
|
210
|
+
admin: {
|
|
211
|
+
width: '50%',
|
|
212
|
+
description: 'Valori statici da passare al child (usati così come sono).',
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
name: 'sourceProps',
|
|
217
|
+
type: 'json',
|
|
218
|
+
required: false,
|
|
219
|
+
label: 'Binding dinamico da sorgente dati',
|
|
220
|
+
admin: {
|
|
221
|
+
width: '50%',
|
|
222
|
+
description: 'Valori dinamici da passare al child (usati così come sono).',
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
],
|
|
228
|
+
},
|
|
229
|
+
],
|
|
230
|
+
},
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { fieldArray, fieldCheckbox, fieldRelationship, fieldText } from '../../fields';
|
|
2
|
+
const collectionMenus = ({ relationToOptions }) => {
|
|
3
|
+
return {
|
|
4
|
+
slug: 'menus',
|
|
5
|
+
admin: {
|
|
6
|
+
useAsTitle: 'name',
|
|
7
|
+
},
|
|
8
|
+
fields: [
|
|
9
|
+
fieldText({ name: 'name' }),
|
|
10
|
+
fieldArray({
|
|
11
|
+
name: 'menuItems',
|
|
12
|
+
label: 'Menu items',
|
|
13
|
+
type: 'array',
|
|
14
|
+
fields: [
|
|
15
|
+
fieldCheckbox({
|
|
16
|
+
name: 'is-external',
|
|
17
|
+
label: 'open in new tab',
|
|
18
|
+
}),
|
|
19
|
+
fieldText({ name: 'label', label: 'label' }),
|
|
20
|
+
fieldRelationship(relationToOptions),
|
|
21
|
+
fieldArray({
|
|
22
|
+
name: 'sub-menu',
|
|
23
|
+
label: 'Sub menu',
|
|
24
|
+
admin: {
|
|
25
|
+
description: "Aggiungere voci figlio a una voce di menù ne disabilita il click di navigazione per permettere l'apertura del dropdown",
|
|
26
|
+
},
|
|
27
|
+
fields: [
|
|
28
|
+
fieldCheckbox({
|
|
29
|
+
name: 'is-external',
|
|
30
|
+
label: 'open in new tab',
|
|
31
|
+
}),
|
|
32
|
+
fieldText({ name: 'label', label: 'label' }),
|
|
33
|
+
fieldRelationship(relationToOptions),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
],
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export default collectionMenus;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { fieldArray, fieldColor, fieldRelationship, fieldText } from '../../fields';
|
|
2
|
+
import generatePreviewPath from '../../generatePreviewPath';
|
|
3
|
+
const configFooter = {
|
|
4
|
+
slug: 'footer',
|
|
5
|
+
label: 'Footer',
|
|
6
|
+
access: {
|
|
7
|
+
read: () => true, // Chi può leggere questo globale?
|
|
8
|
+
},
|
|
9
|
+
admin: {
|
|
10
|
+
livePreview: {
|
|
11
|
+
url: ({ data, req }) => {
|
|
12
|
+
const path = generatePreviewPath({
|
|
13
|
+
slug: 'home',
|
|
14
|
+
collection: 'pages',
|
|
15
|
+
req,
|
|
16
|
+
});
|
|
17
|
+
return path;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
fields: [
|
|
22
|
+
fieldColor({ name: 'bgc', label: 'Colore sfondo' }),
|
|
23
|
+
fieldColor({ name: 'tc', label: 'Colore testo' }),
|
|
24
|
+
fieldArray({
|
|
25
|
+
name: 'footerCols',
|
|
26
|
+
label: 'Colonne footer',
|
|
27
|
+
maxRows: 2,
|
|
28
|
+
fields: [
|
|
29
|
+
fieldText({ name: 'title', label: 'Titolo' }),
|
|
30
|
+
fieldRelationship('menus', {
|
|
31
|
+
name: 'menu',
|
|
32
|
+
label: 'Menu visualizzato',
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
}),
|
|
36
|
+
],
|
|
37
|
+
versions: {
|
|
38
|
+
drafts: {
|
|
39
|
+
autosave: {
|
|
40
|
+
interval: 100, // We set this interval for optimal live preview
|
|
41
|
+
},
|
|
42
|
+
schedulePublish: true,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
export default configFooter;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { fieldCheckbox, fieldColor, fieldRelationship, fieldSectionTabs, fieldSelect, } from '../../fields';
|
|
2
|
+
import generatePreviewPath from '../../generatePreviewPath';
|
|
3
|
+
const configHeader = {
|
|
4
|
+
slug: 'header',
|
|
5
|
+
label: 'Header',
|
|
6
|
+
access: {
|
|
7
|
+
read: () => true, // Chi può leggere questo globale?
|
|
8
|
+
},
|
|
9
|
+
admin: {
|
|
10
|
+
livePreview: {
|
|
11
|
+
url: ({ data, req }) => {
|
|
12
|
+
const path = generatePreviewPath({
|
|
13
|
+
slug: 'home',
|
|
14
|
+
collection: 'pages',
|
|
15
|
+
req,
|
|
16
|
+
});
|
|
17
|
+
return path;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
fields: [
|
|
22
|
+
fieldCheckbox({ name: 'isSticky', label: 'Sticky on scroll' }),
|
|
23
|
+
fieldColor({ name: 'bcg', label: 'Colore sfondo' }),
|
|
24
|
+
fieldColor({ name: 'bcgSticky', label: 'Colore sfondo sticky' }),
|
|
25
|
+
fieldSelect({
|
|
26
|
+
name: 'variant',
|
|
27
|
+
label: 'Variant',
|
|
28
|
+
options: [
|
|
29
|
+
{ value: 'logoLeftMenuLeft', label: 'Logo sinistra - menu sinistra' },
|
|
30
|
+
{ value: 'logoLeftMenuCentered', label: 'Logo sinistra - menu centrato' },
|
|
31
|
+
{ value: 'logoLeftMenuRight', label: 'Logo sinistra - menu destra' },
|
|
32
|
+
{ value: 'logoCenterMenuSplitted', label: 'Logo centro - menu splitted' },
|
|
33
|
+
],
|
|
34
|
+
}),
|
|
35
|
+
fieldRelationship('menus', {
|
|
36
|
+
name: 'menu',
|
|
37
|
+
label: 'Menu visualizzato',
|
|
38
|
+
}),
|
|
39
|
+
fieldSectionTabs(),
|
|
40
|
+
],
|
|
41
|
+
versions: {
|
|
42
|
+
drafts: {
|
|
43
|
+
autosave: {
|
|
44
|
+
interval: 100, // We set this interval for optimal live preview
|
|
45
|
+
},
|
|
46
|
+
schedulePublish: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
export default configHeader;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { fieldArray, fieldCheckbox, fieldSelect, fieldText, fieldUpload } from '../../fields';
|
|
2
|
+
import googleFonts from '../../googleFonts';
|
|
3
|
+
const configSettings = {
|
|
4
|
+
slug: 'settings',
|
|
5
|
+
label: 'Settings',
|
|
6
|
+
access: {
|
|
7
|
+
read: () => true,
|
|
8
|
+
},
|
|
9
|
+
fields: [
|
|
10
|
+
{
|
|
11
|
+
type: 'tabs',
|
|
12
|
+
tabs: [
|
|
13
|
+
{
|
|
14
|
+
label: 'Generali',
|
|
15
|
+
fields: [
|
|
16
|
+
fieldCheckbox({
|
|
17
|
+
name: 'maintenanceMode',
|
|
18
|
+
label: 'Modalità manutenzione',
|
|
19
|
+
admin: {
|
|
20
|
+
description: 'La modalità manutenzione rende NON VISITABILE il sito agli utenti anonimi. Gli utenti autenticati continueranno a vedere il sito e potranno applicare le modifiche necessarie',
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: 'Informazioni',
|
|
27
|
+
fields: [
|
|
28
|
+
fieldText({ name: 'companyName', label: 'Nome compagnia', required: true }),
|
|
29
|
+
fieldText({ name: 'siteEmail', label: 'Email sito' }),
|
|
30
|
+
fieldText({ name: 'phoneNumber', label: 'Numero di telefono' }),
|
|
31
|
+
fieldText({ name: 'whatsAppNumber', label: 'Numero whatsapp' }),
|
|
32
|
+
fieldArray({
|
|
33
|
+
name: 'socials',
|
|
34
|
+
label: 'Social',
|
|
35
|
+
fields: [
|
|
36
|
+
fieldSelect({
|
|
37
|
+
name: 'social',
|
|
38
|
+
label: 'Piattaforma',
|
|
39
|
+
options: [
|
|
40
|
+
{
|
|
41
|
+
label: 'Instagram',
|
|
42
|
+
value: 'instagram',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
label: 'Facebook',
|
|
46
|
+
value: 'facebook',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
label: 'LinkedIn',
|
|
50
|
+
value: 'linkedin',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'X',
|
|
54
|
+
value: 'x',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: 'YouTube',
|
|
58
|
+
value: 'youtube',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'TikTok',
|
|
62
|
+
value: 'tiktok',
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: 'Pinterest',
|
|
66
|
+
value: 'pinterest',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: 'Snapchat',
|
|
70
|
+
value: 'snapchat',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: 'WhatsApp',
|
|
74
|
+
value: 'whatsapp',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
label: 'Telegram',
|
|
78
|
+
value: 'telegram',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
label: 'Reddit',
|
|
82
|
+
value: 'reddit',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Discord',
|
|
86
|
+
value: 'discord',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Twitch',
|
|
90
|
+
value: 'twitch',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: 'Vimeo',
|
|
94
|
+
value: 'vimeo',
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: 'Medium',
|
|
98
|
+
value: 'medium',
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
}),
|
|
102
|
+
fieldText({ name: 'url', label: 'Link' }),
|
|
103
|
+
],
|
|
104
|
+
}),
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
label: 'Stile',
|
|
109
|
+
fields: [
|
|
110
|
+
fieldUpload('media', { name: 'logo', label: 'Logo mobile', required: true }),
|
|
111
|
+
fieldUpload('media', { name: 'logoDesktop', label: 'Logo Desktop' }),
|
|
112
|
+
fieldUpload('media', { name: 'logoAlt', label: 'Logo alternativo' }),
|
|
113
|
+
fieldSelect({
|
|
114
|
+
name: 'headingFont',
|
|
115
|
+
label: 'Heading Font',
|
|
116
|
+
options: Array.from(new Set(googleFonts)),
|
|
117
|
+
}),
|
|
118
|
+
fieldSelect({
|
|
119
|
+
name: 'textFont',
|
|
120
|
+
label: 'Text Font',
|
|
121
|
+
options: Array.from(new Set(googleFonts)),
|
|
122
|
+
}),
|
|
123
|
+
fieldText({ name: 'foregroundColor', label: 'Colore sfondo', required: false }),
|
|
124
|
+
fieldText({ name: 'primaryColor', label: 'Colore primario', required: false }),
|
|
125
|
+
fieldText({ name: 'secondaryColor', label: 'Colore secondario', required: false }),
|
|
126
|
+
fieldText({ name: 'accentColor', label: 'Colore accento', required: false }),
|
|
127
|
+
fieldText({ name: 'darkColor', label: 'Colore scuro', required: false }),
|
|
128
|
+
fieldText({ name: 'lightColor', label: 'Colore chiaro', required: false }),
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
versions: {
|
|
135
|
+
drafts: {
|
|
136
|
+
autosave: {
|
|
137
|
+
interval: 100, // We set this interval for optimal live preview
|
|
138
|
+
},
|
|
139
|
+
schedulePublish: true,
|
|
140
|
+
},
|
|
141
|
+
max: 50,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
export default configSettings;
|
package/dist/config/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var o=require("../index-CVxEpCHf.js");exports.blockCarousel=o.blockCarousel,exports.blockDisclosureList=o.blockDisclosureList,exports.blockGrid=o.blockGrid,exports.blockGridContent=o.blockGridContent,exports.blockHtmlElement=o.blockHtmlElement,exports.blockImage=o.blockImage,exports.blockParallax=o.blockParallax,exports.blockTabs=o.blockTabs,exports.collectionMenus=o.collectionMenus,exports.configFooter=o.configFooter,exports.configHeader=o.configHeader,exports.configSettings=o.configSettings;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/config/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{D as blockCarousel,E as blockDisclosureList,F as blockGrid,G as blockGridContent,K as blockHtmlElement,H as blockImage,I as blockParallax,J as blockTabs,C as collectionMenus,B as configFooter,A as configHeader,z as configSettings}from"../index-AsrRNOzZ.js";
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|