@woodylab/payload 0.0.131 → 0.0.133
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/LayoutRenderer-B1IoWb16.js +2 -0
- package/dist/LayoutRenderer-B1IoWb16.js.map +1 -0
- package/dist/LayoutRenderer-Ba6ITI7O.js +2 -0
- package/dist/LayoutRenderer-Ba6ITI7O.js.map +1 -0
- package/dist/config/blocks/blockCard.d.ts +2 -0
- package/dist/config/blocks/blockCard.js +101 -0
- package/dist/config/blocks/blockReference.d.ts +2 -0
- package/dist/config/blocks/blockReference.js +11 -0
- package/dist/config/{blockView.js → blocks/blockView.js} +35 -91
- package/dist/config/collections/collectionBlocks.d.ts +2 -0
- package/dist/config/collections/collectionBlocks.js +35 -0
- package/dist/config/{collectionComponentDefinitions.d.ts → collections/collectionComponentDefinitions.d.ts} +1 -1
- package/dist/config/collections/collectionComponentDefinitions.js +40 -0
- package/dist/config/collections/collectionMenus.d.ts +2 -0
- package/dist/config/collections/collectionMenus.js +40 -0
- package/dist/config/collections/collectionStyles.d.ts +2 -0
- package/dist/config/collections/collectionStyles.js +25 -0
- package/dist/config/{collectionViewModes.d.ts → collections/collectionViewModes.d.ts} +1 -1
- package/dist/config/collections/collectionViewModes.js +106 -0
- package/dist/config/{fieldCss.js → fields/fieldCss.js} +3 -10
- package/dist/config/fields/fieldRoles.d.ts +2 -0
- package/dist/{fields/utils → config/fields}/fieldRoles.js +7 -11
- package/dist/config/fields/tailwindFieldSelectors.d.ts +2 -1
- package/dist/config/fields/tailwindFieldSelectors.js +1547 -1
- package/dist/config/fields/tailwindSelectorVariants.js +45 -45
- package/dist/config/{configFooter.js → globals/configFooter.js} +11 -9
- package/dist/config/{configHeader.js → globals/configHeader.js} +11 -10
- package/dist/config/{configSettings.js → globals/configSettings.js} +48 -26
- package/dist/{hooks → config/hooks}/fields/populateSiblingClassName.js +0 -2
- package/dist/{hooks → config/hooks}/fields/populateSiblingClassNameAfterChange.js +0 -1
- package/dist/config/hooks/fields/resolveComponentFromRef.d.ts +2 -0
- package/dist/config/hooks/fields/resolveComponentFromRef.js +30 -0
- package/dist/config/hooks/fields/resolveStyleFromRef.d.ts +2 -0
- package/dist/config/hooks/fields/resolveStyleFromRef.js +35 -0
- package/dist/config/hooks/fields/resolveViewModeFromRef.d.ts +2 -0
- package/dist/config/hooks/fields/resolveViewModeFromRef.js +23 -0
- package/dist/config/index.cjs.js +1 -1
- package/dist/config/index.cjs.js.map +1 -1
- package/dist/config/index.d.ts +15 -9
- package/dist/config/index.esm.js +1 -1
- package/dist/config/index.esm.js.map +1 -1
- package/dist/config/index.js +15 -9
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.js +2 -0
- package/dist/react/ComponentRenderer.js +1 -1
- package/dist/react/LayoutRenderer.d.ts +5 -0
- package/dist/react/LayoutRenderer.js +19 -0
- package/dist/react/componentRegistry.js +7 -0
- package/dist/react/components/Card.d.ts +19 -0
- package/dist/react/components/Card.js +6 -0
- package/dist/react/components/Container.d.ts +5 -0
- package/dist/react/components/Container.js +4 -0
- package/dist/react/components/View.d.ts +1 -0
- package/dist/react/components/View.js +9 -0
- package/dist/react/index.cjs.js +1 -1
- package/dist/react/index.d.ts +5 -5
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +5 -5
- package/dist/resolveLayout-DlRnQBn8.js +2 -0
- package/dist/resolveLayout-DlRnQBn8.js.map +1 -0
- package/dist/resolveLayout-DryOXHEy.js +2 -0
- package/dist/resolveLayout-DryOXHEy.js.map +1 -0
- package/dist/seeders/UIMSSeeder.d.ts +7 -0
- package/dist/seeders/UIMSSeeder.js +14 -0
- package/dist/seeders/clearCollection.d.ts +2 -0
- package/dist/seeders/clearCollection.js +18 -0
- package/dist/seeders/components.d.ts +1 -0
- package/dist/seeders/components.js +3 -0
- package/dist/seeders/generateTailwindStyles.d.ts +6 -0
- package/dist/seeders/generateTailwindStyles.js +18 -0
- package/dist/seeders/index.cjs.js +2 -0
- package/dist/seeders/index.cjs.js.map +1 -0
- package/dist/seeders/index.d.ts +2 -0
- package/dist/seeders/index.esm.js +2 -0
- package/dist/seeders/index.esm.js.map +1 -0
- package/dist/seeders/index.js +2 -0
- package/dist/seeders/styles.d.ts +1 -0
- package/dist/seeders/styles.js +27 -0
- package/dist/seeders/viewModes.d.ts +1 -0
- package/dist/seeders/viewModes.js +3 -0
- package/dist/tailwind/index.cjs.js +2 -0
- package/dist/tailwind/index.cjs.js.map +1 -0
- package/dist/tailwind/index.d.ts +2 -94
- package/dist/tailwind/index.esm.js +2 -0
- package/dist/tailwind/index.esm.js.map +1 -0
- package/dist/tailwind/index.js +2 -2692
- package/dist/tailwind/tailwindFieldSelectors.d.ts +181 -0
- package/dist/tailwind/tailwindFieldSelectors.js +1184 -0
- package/dist/tailwind/tailwindSelectorVariants.d.ts +4 -0
- package/dist/tailwind/tailwindSelectorVariants.js +69 -0
- package/dist/uims/index.cjs.js +2 -0
- package/dist/uims/index.cjs.js.map +1 -0
- package/dist/uims/index.d.ts +6 -0
- package/dist/uims/index.esm.js +2 -0
- package/dist/uims/index.esm.js.map +1 -0
- package/dist/uims/index.js +9 -0
- package/dist/uims/mapper/applyStylesToProps.d.ts +4 -0
- package/dist/uims/mapper/applyStylesToProps.js +18 -0
- package/dist/uims/mapper/getValueByPath.d.ts +1 -0
- package/dist/uims/mapper/getValueByPath.js +3 -0
- package/dist/uims/mapper/mapDataToProps.d.ts +6 -0
- package/dist/uims/mapper/mapDataToProps.js +26 -0
- package/dist/uims/mapper/mapInlineBlockToProps.d.ts +6 -0
- package/dist/uims/mapper/mapInlineBlockToProps.js +16 -0
- package/dist/uims/registry/componentRegistry.d.ts +4 -0
- package/dist/uims/registry/componentRegistry.js +20 -0
- package/dist/uims/registry/styleRegistry.d.ts +4 -0
- package/dist/uims/registry/styleRegistry.js +20 -0
- package/dist/uims/registry/viewModeRegistry.d.ts +4 -0
- package/dist/uims/registry/viewModeRegistry.js +20 -0
- package/dist/uims/resolver/createUIMSContext.d.ts +3 -0
- package/dist/uims/resolver/createUIMSContext.js +13 -0
- package/dist/uims/resolver/resolveInlineBlock.d.ts +8 -0
- package/dist/uims/resolver/resolveInlineBlock.js +22 -0
- package/dist/uims/resolver/resolveInlineStylesBySlot.d.ts +1 -0
- package/dist/uims/resolver/resolveInlineStylesBySlot.js +15 -0
- package/dist/uims/resolver/resolveLayout.d.ts +5 -0
- package/dist/uims/resolver/resolveLayout.js +24 -0
- package/dist/uims/resolver/resolveStylesBySlot.d.ts +11 -0
- package/dist/uims/resolver/resolveStylesBySlot.js +12 -0
- package/dist/uims/resolver/resolveViewBlock.d.ts +12 -0
- package/dist/uims/resolver/resolveViewBlock.js +26 -0
- package/dist/{utils → uims/resolver}/resolveViewData.d.ts +3 -1
- package/dist/uims/resolver/resolveViewData.js +56 -0
- package/dist/uims/types/UIMSContext.d.ts +18 -0
- package/dist/uims/types/UIMSContext.js +1 -0
- package/dist/utils/getPropsKeys.d.ts +1 -0
- package/dist/utils/getPropsKeys.js +3 -0
- package/dist/utils/index.cjs.js +1 -1
- package/dist/utils/index.cjs.js.map +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/normalizeStyles.d.ts +1 -0
- package/dist/utils/normalizeStyles.js +12 -0
- package/dist/utils/pickProps.d.ts +1 -0
- package/dist/utils/pickProps.js +9 -0
- package/package.json +12 -4
- package/dist/PageRenderer-BiZflIhY.js +0 -2
- package/dist/PageRenderer-BiZflIhY.js.map +0 -1
- package/dist/PageRenderer-DX3iEA8n.js +0 -2
- package/dist/PageRenderer-DX3iEA8n.js.map +0 -1
- package/dist/config/blockComponentInstance.d.ts +0 -2
- package/dist/config/blockComponentInstance.js +0 -84
- package/dist/config/blocks/blockCarousel.d.ts +0 -3
- package/dist/config/blocks/blockCarousel.js +0 -102
- package/dist/config/blocks/blockDisclosureList.d.ts +0 -3
- package/dist/config/blocks/blockDisclosureList.js +0 -58
- package/dist/config/blocks/blockGrid.d.ts +0 -6
- package/dist/config/blocks/blockGrid.js +0 -161
- package/dist/config/blocks/blockGridContent.d.ts +0 -6
- package/dist/config/blocks/blockGridContent.js +0 -195
- package/dist/config/blocks/blockHtmlElement.d.ts +0 -6
- package/dist/config/blocks/blockHtmlElement.js +0 -13
- package/dist/config/blocks/blockImage.d.ts +0 -3
- package/dist/config/blocks/blockImage.js +0 -15
- package/dist/config/blocks/blockParallax.d.ts +0 -3
- package/dist/config/blocks/blockParallax.js +0 -76
- package/dist/config/blocks/blockTabs.d.ts +0 -3
- package/dist/config/blocks/blockTabs.js +0 -24
- package/dist/config/collectionComponentDefinitions.js +0 -33
- package/dist/config/collectionMenus.d.ts +0 -6
- package/dist/config/collectionMenus.js +0 -40
- package/dist/config/collectionViewModes.js +0 -20
- package/dist/config/utils/resolveInlineComponent.d.ts +0 -4
- package/dist/config/utils/resolveInlineComponent.js +0 -35
- package/dist/config/utils/resolveViewRow.d.ts +0 -4
- package/dist/config/utils/resolveViewRow.js +0 -15
- package/dist/fields/fieldArray.d.ts +0 -4
- package/dist/fields/fieldArray.js +0 -9
- package/dist/fields/fieldBlocks.d.ts +0 -4
- package/dist/fields/fieldBlocks.js +0 -9
- package/dist/fields/fieldCheckbox.d.ts +0 -4
- package/dist/fields/fieldCheckbox.js +0 -11
- package/dist/fields/fieldCode.d.ts +0 -4
- package/dist/fields/fieldCode.js +0 -8
- package/dist/fields/fieldDate.d.ts +0 -4
- package/dist/fields/fieldDate.js +0 -15
- package/dist/fields/fieldEmail.d.ts +0 -4
- package/dist/fields/fieldEmail.js +0 -8
- package/dist/fields/fieldJoin.d.ts +0 -4
- package/dist/fields/fieldJoin.js +0 -9
- package/dist/fields/fieldNumber.d.ts +0 -4
- package/dist/fields/fieldNumber.js +0 -8
- package/dist/fields/fieldPoint.d.ts +0 -4
- package/dist/fields/fieldPoint.js +0 -8
- package/dist/fields/fieldRadioGroup.d.ts +0 -4
- package/dist/fields/fieldRadioGroup.js +0 -18
- package/dist/fields/fieldRelationship.d.ts +0 -4
- package/dist/fields/fieldRelationship.js +0 -9
- package/dist/fields/fieldRichText.d.ts +0 -4
- package/dist/fields/fieldRichText.js +0 -12
- package/dist/fields/fieldSelect.d.ts +0 -4
- package/dist/fields/fieldSelect.js +0 -9
- package/dist/fields/fieldText.d.ts +0 -4
- package/dist/fields/fieldText.js +0 -8
- package/dist/fields/fieldTextArea.d.ts +0 -4
- package/dist/fields/fieldTextArea.js +0 -8
- package/dist/fields/fieldUpload.d.ts +0 -4
- package/dist/fields/fieldUpload.js +0 -9
- package/dist/fields/index.cjs.js +0 -2
- package/dist/fields/index.cjs.js.map +0 -1
- package/dist/fields/index.d.ts +0 -31
- package/dist/fields/index.esm.js +0 -2
- package/dist/fields/index.esm.js.map +0 -1
- package/dist/fields/index.js +0 -37
- package/dist/fields/layout/fieldContainerProps.d.ts +0 -3
- package/dist/fields/layout/fieldContainerProps.js +0 -74
- package/dist/fields/section/fieldAction.d.ts +0 -6
- package/dist/fields/section/fieldAction.js +0 -236
- package/dist/fields/section/fieldConfigProps.d.ts +0 -3
- package/dist/fields/section/fieldConfigProps.js +0 -11
- package/dist/fields/section/fieldContentProps.d.ts +0 -3
- package/dist/fields/section/fieldContentProps.js +0 -11
- package/dist/fields/section/fieldSectionProps.d.ts +0 -3
- package/dist/fields/section/fieldSectionProps.js +0 -15
- package/dist/fields/section/fieldSectionTabs.d.ts +0 -13
- package/dist/fields/section/fieldSectionTabs.js +0 -40
- package/dist/fields/style/fieldColor.d.ts +0 -4
- package/dist/fields/style/fieldColor.js +0 -21
- package/dist/fields/style/fieldContainerWidths.d.ts +0 -7
- package/dist/fields/style/fieldContainerWidths.js +0 -17
- package/dist/fields/style/fieldCss.d.ts +0 -3
- package/dist/fields/style/fieldCss.js +0 -65
- package/dist/fields/style/fieldFontSizes.d.ts +0 -3
- package/dist/fields/style/fieldFontSizes.js +0 -14
- package/dist/fields/style/fieldHeights.d.ts +0 -7
- package/dist/fields/style/fieldHeights.js +0 -23
- package/dist/fields/style/fieldMargins.d.ts +0 -7
- package/dist/fields/style/fieldMargins.js +0 -138
- package/dist/fields/style/fieldPaddings.d.ts +0 -7
- package/dist/fields/style/fieldPaddings.js +0 -114
- package/dist/fields/style/fieldViewportHeights.d.ts +0 -7
- package/dist/fields/style/fieldViewportHeights.js +0 -22
- package/dist/fields/utils/fieldRoles.d.ts +0 -4
- package/dist/react/Card.d.ts +0 -6
- package/dist/react/Card.js +0 -4
- package/dist/react/PageRenderer.d.ts +0 -4
- package/dist/react/PageRenderer.js +0 -34
- package/dist/react/ViewBlock.d.ts +0 -1
- package/dist/react/ViewBlock.js +0 -62
- package/dist/react/registry.js +0 -5
- package/dist/userRoles-BqQg1D6Q.js +0 -2
- package/dist/userRoles-BqQg1D6Q.js.map +0 -1
- package/dist/userRoles-CL8SQUFs.js +0 -2
- package/dist/userRoles-CL8SQUFs.js.map +0 -1
- package/dist/utils/resolveViewData.js +0 -26
- /package/dist/{acl → config/acl}/hasRoles.d.ts +0 -0
- /package/dist/{acl → config/acl}/hasRoles.js +0 -0
- /package/dist/{acl → config/acl}/index.d.ts +0 -0
- /package/dist/{acl → config/acl}/index.js +0 -0
- /package/dist/config/{blockView.d.ts → blocks/blockView.d.ts} +0 -0
- /package/dist/{enums → config/enums}/index.d.ts +0 -0
- /package/dist/{enums → config/enums}/index.js +0 -0
- /package/dist/{enums → config/enums}/userRoles.d.ts +0 -0
- /package/dist/{enums → config/enums}/userRoles.js +0 -0
- /package/dist/config/{fieldCss.d.ts → fields/fieldCss.d.ts} +0 -0
- /package/dist/config/{configFooter.d.ts → globals/configFooter.d.ts} +0 -0
- /package/dist/config/{configHeader.d.ts → globals/configHeader.d.ts} +0 -0
- /package/dist/config/{configSettings.d.ts → globals/configSettings.d.ts} +0 -0
- /package/dist/{hooks → config/hooks}/fields/getNumberValueFromClassNameString.d.ts +0 -0
- /package/dist/{hooks → config/hooks}/fields/getNumberValueFromClassNameString.js +0 -0
- /package/dist/{hooks → config/hooks}/fields/populateSiblingClassName.d.ts +0 -0
- /package/dist/{hooks → config/hooks}/fields/populateSiblingClassNameAfterChange.d.ts +0 -0
- /package/dist/{hooks → config/hooks}/fields/updateClassNameAfterRead.d.ts +0 -0
- /package/dist/{hooks → config/hooks}/fields/updateClassNameAfterRead.js +0 -0
- /package/dist/{hooks → config/hooks}/index.d.ts +0 -0
- /package/dist/{hooks → config/hooks}/index.js +0 -0
- /package/dist/react/{registry.d.ts → componentRegistry.d.ts} +0 -0
|
@@ -8,62 +8,62 @@ export const tailwindSelectorVariants = [
|
|
|
8
8
|
{ label: 'xl', value: 'xl:' },
|
|
9
9
|
{ label: '2xl', value: '2xl:' },
|
|
10
10
|
// Interaction states
|
|
11
|
-
{ label: 'hover', value: 'hover:' },
|
|
12
|
-
{ label: 'focus', value: 'focus:' },
|
|
13
|
-
{ label: 'active', value: 'active:' },
|
|
14
|
-
{ label: 'visited', value: 'visited:' },
|
|
15
|
-
{ label: 'disabled', value: 'disabled:' },
|
|
16
|
-
{ label: 'focus-within', value: 'focus-within:' },
|
|
17
|
-
{ label: 'focus-visible', value: 'focus-visible:' },
|
|
18
|
-
{ label: 'checked', value: 'checked:' },
|
|
11
|
+
//{ label: 'hover', value: 'hover:' },
|
|
12
|
+
//{ label: 'focus', value: 'focus:' },
|
|
13
|
+
//{ label: 'active', value: 'active:' },
|
|
14
|
+
//{ label: 'visited', value: 'visited:' },
|
|
15
|
+
//{ label: 'disabled', value: 'disabled:' },
|
|
16
|
+
//{ label: 'focus-within', value: 'focus-within:' },
|
|
17
|
+
//{ label: 'focus-visible', value: 'focus-visible:' },
|
|
18
|
+
//{ label: 'checked', value: 'checked:' },
|
|
19
19
|
// Form states
|
|
20
|
-
{ label: 'placeholder-shown', value: 'placeholder-shown:' },
|
|
21
|
-
{ label: 'read-only', value: 'read-only:' },
|
|
22
|
-
{ label: 'required', value: 'required:' },
|
|
23
|
-
{ label: 'valid', value: 'valid:' },
|
|
24
|
-
{ label: 'invalid', value: 'invalid:' },
|
|
20
|
+
//{ label: 'placeholder-shown', value: 'placeholder-shown:' },
|
|
21
|
+
//{ label: 'read-only', value: 'read-only:' },
|
|
22
|
+
//{ label: 'required', value: 'required:' },
|
|
23
|
+
//{ label: 'valid', value: 'valid:' },
|
|
24
|
+
//{ label: 'invalid', value: 'invalid:' },
|
|
25
25
|
// Structural
|
|
26
|
-
{ label: 'first', value: 'first:' },
|
|
27
|
-
{ label: 'last', value: 'last:' },
|
|
28
|
-
{ label: 'odd', value: 'odd:' },
|
|
29
|
-
{ label: 'even', value: 'even:' },
|
|
30
|
-
{ label: 'only', value: 'only:' },
|
|
31
|
-
{ label: 'first-of-type', value: 'first-of-type:' },
|
|
32
|
-
{ label: 'last-of-type', value: 'last-of-type:' },
|
|
26
|
+
//{ label: 'first', value: 'first:' },
|
|
27
|
+
//{ label: 'last', value: 'last:' },
|
|
28
|
+
//{ label: 'odd', value: 'odd:' },
|
|
29
|
+
//{ label: 'even', value: 'even:' },
|
|
30
|
+
//{ label: 'only', value: 'only:' },
|
|
31
|
+
//{ label: 'first-of-type', value: 'first-of-type:' },
|
|
32
|
+
//{ label: 'last-of-type', value: 'last-of-type:' },
|
|
33
33
|
// Group
|
|
34
|
-
{ label: 'group-hover', value: 'group-hover:' },
|
|
35
|
-
{ label: 'group-focus', value: 'group-focus:' },
|
|
36
|
-
{ label: 'group-active', value: 'group-active:' },
|
|
34
|
+
//{ label: 'group-hover', value: 'group-hover:' },
|
|
35
|
+
//{ label: 'group-focus', value: 'group-focus:' },
|
|
36
|
+
//{ label: 'group-active', value: 'group-active:' },
|
|
37
37
|
// Peer
|
|
38
|
-
{ label: 'peer-hover', value: 'peer-hover:' },
|
|
39
|
-
{ label: 'peer-focus', value: 'peer-focus:' },
|
|
40
|
-
{ label: 'peer-checked', value: 'peer-checked:' },
|
|
38
|
+
//{ label: 'peer-hover', value: 'peer-hover:' },
|
|
39
|
+
//{ label: 'peer-focus', value: 'peer-focus:' },
|
|
40
|
+
//{ label: 'peer-checked', value: 'peer-checked:' },
|
|
41
41
|
// Environment / media
|
|
42
|
-
{ label: 'dark', value: 'dark:' },
|
|
43
|
-
{ label: 'motion-safe', value: 'motion-safe:' },
|
|
44
|
-
{ label: 'motion-reduce', value: 'motion-reduce:' },
|
|
45
|
-
{ label: 'contrast-more', value: 'contrast-more:' },
|
|
46
|
-
{ label: 'contrast-less', value: 'contrast-less:' },
|
|
42
|
+
//{ label: 'dark', value: 'dark:' },
|
|
43
|
+
//{ label: 'motion-safe', value: 'motion-safe:' },
|
|
44
|
+
//{ label: 'motion-reduce', value: 'motion-reduce:' },
|
|
45
|
+
//{ label: 'contrast-more', value: 'contrast-more:' },
|
|
46
|
+
//{ label: 'contrast-less', value: 'contrast-less:' },
|
|
47
47
|
// Direction / orientation
|
|
48
|
-
{ label: 'rtl', value: 'rtl:' },
|
|
49
|
-
{ label: 'ltr', value: 'ltr:' },
|
|
50
|
-
{ label: 'portrait', value: 'portrait:' },
|
|
51
|
-
{ label: 'landscape', value: 'landscape:' },
|
|
48
|
+
//{ label: 'rtl', value: 'rtl:' },
|
|
49
|
+
//{ label: 'ltr', value: 'ltr:' },
|
|
50
|
+
//{ label: 'portrait', value: 'portrait:' },
|
|
51
|
+
//{ label: 'landscape', value: 'landscape:' },
|
|
52
52
|
// ARIA
|
|
53
|
-
{ label: 'aria-checked', value: 'aria-checked:' },
|
|
54
|
-
{ label: 'aria-selected', value: 'aria-selected:' },
|
|
55
|
-
{ label: 'aria-expanded', value: 'aria-expanded:' },
|
|
53
|
+
//{ label: 'aria-checked', value: 'aria-checked:' },
|
|
54
|
+
//{ label: 'aria-selected', value: 'aria-selected:' },
|
|
55
|
+
//{ label: 'aria-expanded', value: 'aria-expanded:' },
|
|
56
56
|
// Data attributes (generic)
|
|
57
57
|
//{ label: 'data-[state]', value: 'data-[state]:' },
|
|
58
58
|
//{ label: 'data-[active]', value: 'data-[active]:' },
|
|
59
59
|
// Pseudo-elements
|
|
60
|
-
{ label: 'before', value: 'before:' },
|
|
61
|
-
{ label: 'after', value: 'after:' },
|
|
62
|
-
{ label: 'placeholder', value: 'placeholder:' },
|
|
63
|
-
{ label: 'selection', value: 'selection:' },
|
|
64
|
-
{ label: 'marker', value: 'marker:' },
|
|
65
|
-
{ label: 'file', value: 'file:' },
|
|
66
|
-
{ label: 'backdrop', value: 'backdrop:' },
|
|
60
|
+
//{ label: 'before', value: 'before:' },
|
|
61
|
+
//{ label: 'after', value: 'after:' },
|
|
62
|
+
//{ label: 'placeholder', value: 'placeholder:' },
|
|
63
|
+
//{ label: 'selection', value: 'selection:' },
|
|
64
|
+
//{ label: 'marker', value: 'marker:' },
|
|
65
|
+
//{ label: 'file', value: 'file:' },
|
|
66
|
+
//{ label: 'backdrop', value: 'backdrop:' },
|
|
67
67
|
// Feature queries
|
|
68
68
|
//{ label: 'supports-[...]', value: 'supports-[...]:' },
|
|
69
69
|
];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import generatePreviewPath from '../generatePreviewPath';
|
|
1
|
+
import generatePreviewPath from '../../generatePreviewPath';
|
|
3
2
|
export const configFooter = {
|
|
4
3
|
slug: 'footer',
|
|
5
4
|
label: 'Footer',
|
|
@@ -19,20 +18,23 @@ export const configFooter = {
|
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
fields: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
{ name: 'bgc', label: 'Colore sfondo', type: 'text' },
|
|
22
|
+
{ name: 'tc', label: 'Colore testo', type: 'text' },
|
|
23
|
+
{
|
|
24
|
+
type: 'array',
|
|
25
25
|
name: 'footerCols',
|
|
26
26
|
label: 'Colonne footer',
|
|
27
27
|
maxRows: 2,
|
|
28
28
|
fields: [
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
{ name: 'title', label: 'Titolo', type: 'text' },
|
|
30
|
+
{
|
|
31
|
+
type: 'relationship',
|
|
32
|
+
relationTo: ['menus'],
|
|
31
33
|
name: 'menu',
|
|
32
34
|
label: 'Menu visualizzato',
|
|
33
|
-
}
|
|
35
|
+
},
|
|
34
36
|
],
|
|
35
|
-
}
|
|
37
|
+
},
|
|
36
38
|
],
|
|
37
39
|
versions: {
|
|
38
40
|
drafts: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import generatePreviewPath from '../generatePreviewPath';
|
|
1
|
+
import generatePreviewPath from '../../generatePreviewPath';
|
|
3
2
|
export const configHeader = {
|
|
4
3
|
slug: 'header',
|
|
5
4
|
label: 'Header',
|
|
@@ -19,10 +18,11 @@ export const configHeader = {
|
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
fields: [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
{ type: 'checkbox', name: 'isSticky', label: 'Sticky on scroll' },
|
|
22
|
+
{ name: 'bcg', label: 'Colore sfondo', type: 'text' },
|
|
23
|
+
{ name: 'bcgSticky', label: 'Colore sfondo sticky', type: 'text' },
|
|
24
|
+
{
|
|
25
|
+
type: 'select',
|
|
26
26
|
name: 'variant',
|
|
27
27
|
label: 'Variant',
|
|
28
28
|
options: [
|
|
@@ -31,12 +31,13 @@ export const configHeader = {
|
|
|
31
31
|
{ value: 'logoLeftMenuRight', label: 'Logo sinistra - menu destra' },
|
|
32
32
|
{ value: 'logoCenterMenuSplitted', label: 'Logo centro - menu splitted' },
|
|
33
33
|
],
|
|
34
|
-
}
|
|
35
|
-
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: 'relationship',
|
|
37
|
+
relationTo: ['menus'],
|
|
36
38
|
name: 'menu',
|
|
37
39
|
label: 'Menu visualizzato',
|
|
38
|
-
}
|
|
39
|
-
fieldSectionTabs(),
|
|
40
|
+
},
|
|
40
41
|
],
|
|
41
42
|
versions: {
|
|
42
43
|
drafts: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import googleFonts from '../googleFonts';
|
|
1
|
+
import googleFonts from '../../googleFonts';
|
|
3
2
|
export const configSettings = {
|
|
4
3
|
slug: 'settings',
|
|
5
4
|
label: 'Settings',
|
|
@@ -13,27 +12,30 @@ export const configSettings = {
|
|
|
13
12
|
{
|
|
14
13
|
label: 'Generali',
|
|
15
14
|
fields: [
|
|
16
|
-
|
|
15
|
+
{
|
|
16
|
+
type: 'checkbox',
|
|
17
17
|
name: 'maintenanceMode',
|
|
18
18
|
label: 'Modalità manutenzione',
|
|
19
19
|
admin: {
|
|
20
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
21
|
},
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
23
|
],
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
label: 'Informazioni',
|
|
27
27
|
fields: [
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
{ type: 'text', name: 'companyName', label: 'Nome compagnia', required: true },
|
|
29
|
+
{ type: 'text', name: 'siteEmail', label: 'Email sito' },
|
|
30
|
+
{ type: 'text', name: 'phoneNumber', label: 'Numero di telefono' },
|
|
31
|
+
{ type: 'text', name: 'whatsAppNumber', label: 'Numero whatsapp' },
|
|
32
|
+
{
|
|
33
|
+
type: 'array',
|
|
33
34
|
name: 'socials',
|
|
34
35
|
label: 'Social',
|
|
35
36
|
fields: [
|
|
36
|
-
|
|
37
|
+
{
|
|
38
|
+
type: 'select',
|
|
37
39
|
name: 'social',
|
|
38
40
|
label: 'Piattaforma',
|
|
39
41
|
options: [
|
|
@@ -98,34 +100,54 @@ export const configSettings = {
|
|
|
98
100
|
value: 'medium',
|
|
99
101
|
},
|
|
100
102
|
],
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
+
},
|
|
104
|
+
{ type: 'text', name: 'url', label: 'Link' },
|
|
103
105
|
],
|
|
104
|
-
}
|
|
106
|
+
},
|
|
105
107
|
],
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
110
|
label: 'Stile',
|
|
109
111
|
fields: [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
{
|
|
113
|
+
type: 'relationship',
|
|
114
|
+
relationTo: ['media'],
|
|
115
|
+
name: 'logo',
|
|
116
|
+
label: 'Logo mobile',
|
|
117
|
+
required: true,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: 'relationship',
|
|
121
|
+
relationTo: ['media'],
|
|
122
|
+
name: 'logoDesktop',
|
|
123
|
+
label: 'Logo Desktop',
|
|
124
|
+
required: true,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
type: 'relationship',
|
|
128
|
+
relationTo: ['media'],
|
|
129
|
+
name: 'logoAlt',
|
|
130
|
+
label: 'Logo alternativo',
|
|
131
|
+
required: true,
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: 'select',
|
|
114
135
|
name: 'headingFont',
|
|
115
136
|
label: 'Heading Font',
|
|
116
137
|
options: Array.from(new Set(googleFonts)),
|
|
117
|
-
}
|
|
118
|
-
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'select',
|
|
119
141
|
name: 'textFont',
|
|
120
142
|
label: 'Text Font',
|
|
121
143
|
options: Array.from(new Set(googleFonts)),
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
144
|
+
},
|
|
145
|
+
{ type: 'text', name: 'foregroundColor', label: 'Colore sfondo', required: false },
|
|
146
|
+
{ type: 'text', name: 'primaryColor', label: 'Colore primario', required: false },
|
|
147
|
+
{ type: 'text', name: 'secondaryColor', label: 'Colore secondario', required: false },
|
|
148
|
+
{ type: 'text', name: 'accentColor', label: 'Colore accento', required: false },
|
|
149
|
+
{ type: 'text', name: 'darkColor', label: 'Colore scuro', required: false },
|
|
150
|
+
{ type: 'text', name: 'lightColor', label: 'Colore chiaro', required: false },
|
|
129
151
|
],
|
|
130
152
|
},
|
|
131
153
|
],
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
const populateSiblingClassName = async (args) => {
|
|
2
2
|
const { value, operation } = args;
|
|
3
|
-
console.log('value => ', value);
|
|
4
|
-
console.log('operation => ', operation);
|
|
5
3
|
// Controlla se esiste il campo "css" in "value"
|
|
6
4
|
if (value?.css && (operation === 'create' || operation === 'update')) {
|
|
7
5
|
const css = value.css;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export const resolveComponentFromRef = (ref) => async (args) => {
|
|
2
|
+
const { value, siblingData, operation, req } = args;
|
|
3
|
+
if (operation !== 'create' && operation !== 'update') {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
const refField = siblingData[ref];
|
|
7
|
+
if (!refField)
|
|
8
|
+
return;
|
|
9
|
+
if (refField.value) {
|
|
10
|
+
try {
|
|
11
|
+
const result = await req.payload.find({
|
|
12
|
+
collection: 'component-definitions',
|
|
13
|
+
where: {
|
|
14
|
+
id: {
|
|
15
|
+
in: refField.value,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
pagination: false,
|
|
19
|
+
depth: 0,
|
|
20
|
+
});
|
|
21
|
+
if (!result.docs.length)
|
|
22
|
+
return '';
|
|
23
|
+
return result.docs[0].componentName;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.warn(`[viewMode afterChange] Impossibile risolvere viewModeRef ${'boh'}`, error);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return value;
|
|
30
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const resolveStyleFromRef = (ref) => async (args) => {
|
|
2
|
+
const { value, siblingData, operation, req } = args;
|
|
3
|
+
if (operation !== 'create' && operation !== 'update') {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
const styleField = siblingData[ref];
|
|
7
|
+
if (!styleField)
|
|
8
|
+
return value;
|
|
9
|
+
const stylesID = styleField.map((sf) => sf.value);
|
|
10
|
+
if (stylesID.length) {
|
|
11
|
+
try {
|
|
12
|
+
const result = await req.payload.find({
|
|
13
|
+
collection: 'styles',
|
|
14
|
+
where: {
|
|
15
|
+
id: {
|
|
16
|
+
in: stylesID,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
pagination: false,
|
|
20
|
+
depth: 0,
|
|
21
|
+
});
|
|
22
|
+
if (!result.docs.length)
|
|
23
|
+
return '';
|
|
24
|
+
return result.docs
|
|
25
|
+
.map((doc) => {
|
|
26
|
+
return doc.css.className;
|
|
27
|
+
})
|
|
28
|
+
.join(' ');
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.warn(`[viewMode afterChange] Impossibile risolvere viewModeRef ${'boh'}`, error);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return value;
|
|
35
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const resolveViewModeFromRef = (viewModeRef) => async (args) => {
|
|
2
|
+
const { value, siblingData, operation, req } = args;
|
|
3
|
+
if (operation !== 'create' && operation !== 'update') {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
const viewModeId = siblingData[viewModeRef]?.value;
|
|
7
|
+
if (viewModeId) {
|
|
8
|
+
try {
|
|
9
|
+
const viewModeDoc = await req.payload.findByID({
|
|
10
|
+
collection: 'view-modes',
|
|
11
|
+
id: viewModeId,
|
|
12
|
+
depth: 0,
|
|
13
|
+
});
|
|
14
|
+
if (viewModeDoc?.name) {
|
|
15
|
+
return viewModeDoc.name;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
console.warn(`[viewMode afterChange] Impossibile risolvere viewModeRef ${viewModeId}`, error);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
};
|