@iqual/nuxt-icms 1.6.1 → 1.6.2-rc.2
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/README.md +86 -0
- package/__tests__/anchors.spec.ts +43 -0
- package/__tests__/contract/blokkliComponents.spec.ts +59 -0
- package/__tests__/contract/componentFragments.spec.ts +24 -0
- package/__tests__/contract/languages.spec.ts +63 -0
- package/__tests__/contract/project.ts +144 -0
- package/__tests__/hreflang.spec.ts +39 -0
- package/{tests → __tests__}/pages.spec.ts +14 -5
- package/app.config.ts +15 -0
- package/app.vue +3 -21
- package/assets/css/backend.css +56 -0
- package/assets/css/base/base.css +2 -2
- package/assets/css/base/typography.css +2 -2
- package/assets/css/ckeditor.css +3 -4
- package/assets/css/components/decorations.css +1 -1
- package/assets/css/components/editor.css +1 -1
- package/assets/css/components/grid-container.css +19 -19
- package/assets/css/fe-fixes.css +6 -12
- package/assets/css/theme/colors/color-primary.css +33 -11
- package/assets/css/theme/colors/color-secondary.css +33 -11
- package/assets/css/utilities/utilities.css +1 -1
- package/assets/symbols/anchor.svg +3 -0
- package/blokkli.editAdapter.ts +56 -0
- package/bundles.ts +6 -6
- package/cache/__tests__/pageCache.spec.ts +540 -0
- package/cache/cacheTagRegistry.ts +124 -0
- package/cache/enabledForRequest.ts +21 -0
- package/cache/multiCache.serverOptions.ts +58 -0
- package/cache/pageCache.ts +360 -0
- package/components/Blokkli/Anchor/icon.svg +3 -0
- package/components/Blokkli/Anchor/index.vue +13 -0
- package/components/Blokkli/AnchorNavigation/icon.svg +8 -0
- package/components/Blokkli/AnchorNavigation/index.vue +9 -0
- package/components/Blokkli/Card/Element/index.vue +0 -1
- package/components/Blokkli/Collapsible/Element/index.vue +5 -0
- package/components/Blokkli/FAQ/Element/index.vue +0 -1
- package/components/Blokkli/Fragment/Separator/icon.svg +4 -0
- package/components/Blokkli/Fragment/Separator/index.vue +87 -0
- package/components/Blokkli/Gallery/index.vue +1 -3
- package/components/Blokkli/IconText/Element/index.vue +0 -1
- package/components/Blokkli/Introduction/index.vue +0 -1
- package/components/Blokkli/Listing/icon.svg +9 -0
- package/components/Blokkli/Listing/index.vue +24 -0
- package/components/Blokkli/Logo/Element/index.vue +0 -1
- package/components/Blokkli/Table/index.vue +0 -1
- package/components/Blokkli/Team/Element/index.vue +0 -1
- package/components/Blokkli/Team/Layout/index.vue +0 -1
- package/components/Blokkli/Testimonial/Element/index.vue +0 -1
- package/components/Blokkli/Text/index.vue +0 -1
- package/components/DesignSystem/Atoms/Button.vue +3 -0
- package/components/DesignSystem/Atoms/GridRow.vue +3 -1
- package/components/DesignSystem/Molecules/ButtonGroup.vue +5 -4
- package/components/DesignSystem/Molecules/IconText.vue +6 -6
- package/components/DesignSystem/Molecules/MediaLightbox.vue +8 -8
- package/components/DesignSystem/Molecules/MediaSlider.vue +9 -11
- package/components/DesignSystem/Molecules/Partnership.vue +7 -4
- package/components/DesignSystem/Molecules/Table.vue +35 -19
- package/components/DesignSystem/Molecules/TitleComposition.vue +46 -15
- package/components/DesignSystem/Molecules/iFrame.vue +2 -2
- package/components/DesignSystem/Organisms/CallToAction.vue +8 -7
- package/components/DesignSystem/Organisms/CallToActionFeature.vue +8 -7
- package/components/DesignSystem/Organisms/CallToActionFullwidth.vue +9 -8
- package/components/DesignSystem/Organisms/ContentBlock.vue +26 -16
- package/components/DesignSystem/Organisms/FacetedListing.vue +38 -17
- package/components/DesignSystem/Organisms/FactCard.vue +6 -7
- package/components/DesignSystem/Organisms/FeatureCard.vue +14 -14
- package/components/DesignSystem/Organisms/FlipTeaser.vue +19 -19
- package/components/DesignSystem/Organisms/HeaderHero.vue +11 -11
- package/components/DesignSystem/Organisms/HeaderTextImage.vue +10 -10
- package/components/DesignSystem/Organisms/LinkList.vue +20 -12
- package/components/DesignSystem/Organisms/LogoElement.vue +7 -4
- package/components/DesignSystem/Organisms/Map.vue +1 -1
- package/components/DesignSystem/Organisms/SearchResults.vue +15 -6
- package/components/DesignSystem/Organisms/SpotlightCard.vue +18 -18
- package/components/DesignSystem/Organisms/TeamElement.vue +19 -18
- package/components/DesignSystem/Organisms/TeaserCard.vue +16 -17
- package/components/DesignSystem/Organisms/TeaserSimple.vue +4 -31
- package/components/DesignSystem/Organisms/Testimonial.vue +13 -13
- package/components/DesignSystem/Organisms/TextCard.vue +10 -10
- package/components/DesignSystem/Organisms/TimelineElement.vue +20 -19
- package/components/DesignSystem/Organisms/TwoColumnTextElement.vue +5 -5
- package/components/DesignSystem/README.md +59 -40
- package/components/Drupal/Breadcrumb/index.vue +25 -12
- package/components/Drupal/Messages/index.vue +9 -4
- package/components/Drupal/Webform/index.vue +271 -51
- package/components/Drupal/Webform/mutation.graphql +17 -1
- package/components/Form/HiddenInput.vue +1 -4
- package/components/Form/SelectInput.vue +1 -1
- package/components/Form/SubmitButton.vue +2 -2
- package/components/Form/TextAreaInput.vue +3 -3
- package/components/Form/TextEmailInput.vue +1 -1
- package/components/Form/TextInput.vue +1 -1
- package/components/Form/TextPhoneInput.vue +1 -1
- package/components/Form/WebformMarkup.vue +1 -1
- package/components/Form/composables/useFormDefaultValue.ts +9 -13
- package/components/Form/composables/useFormElement.ts +5 -3
- package/components/Form/utils/types.ts +3 -3
- package/components/Media/Image/fragment.graphql +4 -0
- package/components/Media/Image/index.vue +27 -17
- package/components/Media/RemoteVideo/index.vue +3 -3
- package/components/Media/Video/index.vue +1 -1
- package/components/Node/Icms/Page/SearchResult/fragment.graphql +1 -1
- package/components/Node/Icms/Page/SearchResult/index.vue +2 -2
- package/components/Node/Icms/Page/Teaser/index.vue +1 -1
- package/components/Node/Icms/Page/index.vue +8 -2
- package/components/Paragraph/Anchor/fragment.graphql +4 -0
- package/components/Paragraph/Anchor/index.vue +48 -0
- package/components/Paragraph/AnchorNavigation/fragment.graphql +3 -0
- package/components/Paragraph/AnchorNavigation/index.vue +154 -0
- package/components/Paragraph/BlokkliFragment/fragment.graphql +5 -0
- package/components/Paragraph/Button/Element/fragment.graphql +1 -1
- package/components/Paragraph/Button/Element/index.vue +13 -8
- package/components/Paragraph/Card/Element/index.vue +1 -1
- package/components/Paragraph/Card/Layout/index.vue +9 -9
- package/components/Paragraph/Collapsible/Element/index.vue +2 -2
- package/components/Paragraph/Collapsible/Layout/index.vue +19 -18
- package/components/Paragraph/Contact/index.vue +17 -17
- package/components/Paragraph/Downloads/fragment.graphql +1 -1
- package/components/Paragraph/Downloads/index.vue +13 -13
- package/components/Paragraph/FAQ/Element/index.vue +4 -3
- package/components/Paragraph/FAQ/Layout/index.vue +42 -21
- package/components/Paragraph/FromLibrary/fragment.graphql +17 -0
- package/components/Paragraph/Gallery/index.vue +14 -14
- package/components/Paragraph/HeroImage/index.vue +26 -19
- package/components/Paragraph/IconText/Element/index.vue +4 -4
- package/components/Paragraph/IconText/Layout/index.vue +12 -12
- package/components/Paragraph/Introduction/index.vue +17 -17
- package/components/Paragraph/LinkLists/Element/fragment.graphql +1 -1
- package/components/Paragraph/LinkLists/Element/index.vue +5 -5
- package/components/Paragraph/LinkLists/Layout/index.vue +9 -9
- package/components/Paragraph/Listing/fragment.graphql +14 -0
- package/components/Paragraph/Listing/index.vue +91 -0
- package/components/Paragraph/Logo/Element/fragment.graphql +1 -1
- package/components/Paragraph/Logo/Element/index.vue +7 -4
- package/components/Paragraph/Media/index.vue +23 -21
- package/components/Paragraph/Partnerships/Element/fragment.graphql +1 -1
- package/components/Paragraph/Partnerships/Element/index.vue +10 -7
- package/components/Paragraph/Partnerships/Layout/index.vue +13 -13
- package/components/Paragraph/SingleTestimonial/index.vue +13 -13
- package/components/Paragraph/Table/index.vue +12 -12
- package/components/Paragraph/Team/Element/index.vue +16 -14
- package/components/Paragraph/Team/Layout/index.vue +9 -9
- package/components/Paragraph/Teasers/index.vue +14 -17
- package/components/Paragraph/Testimonial/Element/index.vue +19 -18
- package/components/Paragraph/Testimonial/Layout/index.vue +24 -18
- package/components/Paragraph/Text/fragment.graphql +1 -1
- package/components/Paragraph/Text/index.vue +8 -8
- package/components/Paragraph/TextMedia/index.vue +22 -22
- package/components/Paragraph/Timeline/Element/index.vue +19 -19
- package/components/Paragraph/Timeline/Layout/index.vue +51 -20
- package/components/Paragraph/TwoColumnText/Element/index.vue +13 -13
- package/components/Paragraph/TwoColumnText/Layout/index.vue +1 -1
- package/components/Paragraph/iFrame/index.vue +8 -8
- package/components/Search/Facets/FacetDropdownUI.vue +25 -31
- package/components/Search/Facets/FacetedSearchUI.vue +72 -48
- package/components/Search/Facets/fragment.graphql +20 -15
- package/components/Section/Footer/index.vue +55 -32
- package/components/Section/Header/Buttons.vue +4 -5
- package/components/Section/Header/DesktopMainMenu.vue +5 -4
- package/components/Section/Header/DesktopMainMenuDropdown.vue +5 -5
- package/components/Section/Header/LanguageDropdown.vue +2 -3
- package/components/Section/Header/Logo.vue +3 -3
- package/components/Section/Header/MainButtons.vue +4 -5
- package/components/Section/Header/MetaButtons.vue +5 -6
- package/components/Section/Header/MetaMenu.vue +1 -1
- package/components/Section/Header/MobileMainMenu.vue +1 -1
- package/components/Section/Header/MobileMainMenuItem.vue +2 -2
- package/components/Section/Header/index.vue +6 -13
- package/composables/__tests__/useImageSources.spec.ts +91 -0
- package/composables/breadcrumb.ts +12 -7
- package/composables/useAccordionScroll.ts +12 -4
- package/composables/useAllowedFragments.ts +14 -0
- package/composables/useAnchors.ts +48 -0
- package/composables/useChildTitleWeight.ts +1 -1
- package/composables/useCurrentLangcodeEnum.ts +1 -1
- package/composables/useCurrentNodeId.ts +8 -0
- package/composables/useDrupalUrl.ts +15 -0
- package/composables/useEnrichFacetLabels.ts +8 -6
- package/composables/useEntityRegistry.ts +3 -3
- package/composables/useGlobalConfig.ts +1 -2
- package/composables/useGraphqlCacheability.ts +12 -1
- package/composables/useHreflangLinks.ts +54 -0
- package/composables/useImageSources.ts +70 -28
- package/composables/useInitData.ts +1 -2
- package/composables/useIsHomepage.ts +1 -1
- package/composables/useLinkUrl.ts +30 -0
- package/composables/useMediaLightbox.ts +62 -50
- package/composables/useMenu.ts +1 -3
- package/composables/useMessageBus.ts +14 -7
- package/composables/useMobileMenuOverlayBus.ts +1 -1
- package/composables/useNavigationOffset.ts +49 -6
- package/composables/usePageCache.ts +33 -0
- package/composables/useSiteShell.ts +11 -0
- package/composables/useTheme.ts +17 -13
- package/config/__tests__/stubs/nuxt-multi-cache-config.ts +2 -0
- package/config/blokkli.ts +7 -13
- package/config/easyTexts.ts +1 -1
- package/config/graphqlMiddleware.ts +11 -4
- package/config/index.ts +5 -2
- package/config/languageNegotiation.ts +1 -1
- package/config/multiCache.ts +6 -1
- package/config/postcss-drupal/postcss.config.cjs +2 -2
- package/config/runtimeConfig.ts +7 -2
- package/config/svgIconSprite.ts +1 -2
- package/config/vuepal.ts +16 -18
- package/error.vue +1 -22
- package/layouts/default.vue +2 -6
- package/layouts/error.vue +7 -15
- package/modules/blokkliFragments.ts +76 -0
- package/modules/dynamicEntityComponentResolver.ts +47 -47
- package/modules/dynamicParagraphResolver.ts +43 -8
- package/modules/pageCache.ts +106 -0
- package/nuxt.config.ts +62 -33
- package/package.json +23 -22
- package/pages/[...slug]/index.vue +25 -4
- package/pages/index.vue +3 -3
- package/pages/node/[nid]/index.vue +2 -3
- package/patches/@blokkli+editor+2.0.0-alpha.13.patch +15 -1
- package/plugins/currentNode.ts +17 -0
- package/plugins/graphqlMiddleware.ts +10 -2
- package/plugins/initData.ts +15 -7
- package/plugins/registerNodeIcmsPageComponents.ts +6 -2
- package/plugins/siteShell.client.ts +94 -0
- package/queries/facetTermLabels.graphql +1 -5
- package/queries/fragment.linkUrl.graphql +12 -0
- package/queries/query.contentSearch.graphql +17 -2
- package/queries/query.initData.graphql +1 -1
- package/scripts/create-shade.ts +13 -4
- package/scripts/update-icms.ts +3 -1
- package/server/__tests__/graphqlMiddleware.serverOptions.spec.ts +2 -2
- package/server/__tests__/turnstile.spec.ts +119 -0
- package/server/api/icms/blokkli/last-changed.get.ts +24 -0
- package/server/api/icon/[...params].ts +3 -9
- package/server/graphqlMiddleware.serverOptions.ts +9 -8
- package/server/helpers/index.ts +0 -1
- package/server/middleware/turnstile.ts +51 -0
- package/server/plugins/frameAncestors.ts +20 -0
- package/server/plugins/pageCache.ts +59 -0
- package/server/utils/__tests__/accessDeniedHandover.spec.ts +49 -0
- package/server/utils/__tests__/backendRequestHeaders.spec.ts +115 -0
- package/server/utils/accessDeniedHandover.ts +48 -0
- package/server/utils/backendRequestHeaders.ts +51 -0
- package/server/utils/cacheability.ts +4 -4
- package/shared/__tests__/blokkliState.spec.ts +54 -0
- package/shared/__tests__/csp.spec.ts +53 -0
- package/shared/__tests__/drupalUrl.spec.ts +50 -0
- package/shared/blokkliState.ts +40 -0
- package/shared/csp.ts +47 -0
- package/shared/drupalUrl.ts +30 -0
- package/tailwind.config.ts +0 -5
- package/types/breadcrumb.ts +22 -0
- package/types/global.ts +15 -14
- package/types/langcode.ts +16 -0
- package/types/layerConfig.ts +84 -0
- package/utils/pageCache.ts +95 -0
- package/utils/turnstile.ts +35 -0
- package/composables/useWebformEnrichment.ts +0 -68
- package/server/__tests__/graphqlMiddleware.ts +0 -41
- package/server/multiCache.serverOptions.ts +0 -32
- package/vitest.config.mts +0 -28
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
>
|
|
18
18
|
<DesignSystemOrganismsContentBlock
|
|
19
19
|
:pretitle="pretitle"
|
|
20
|
-
:
|
|
20
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
21
21
|
:title="title"
|
|
22
|
-
:
|
|
22
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
23
23
|
:subtitle="subtitle"
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
27
|
-
:
|
|
24
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
25
|
+
:title-weight="titleWeight"
|
|
26
|
+
:title-style="titleStyle"
|
|
27
|
+
:color-scheme="colorScheme"
|
|
28
28
|
/>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
>
|
|
36
36
|
<DesignSystemOrganismsContentBlock
|
|
37
37
|
:text="text"
|
|
38
|
-
:
|
|
38
|
+
:text-class="themedClass('textClass')"
|
|
39
39
|
:media="media"
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
40
|
+
:media-class="themedClass('mediaClass')"
|
|
41
|
+
:media-container-class="themedClass('mediaContainerClass', 'mt-0')"
|
|
42
|
+
:color-scheme="colorScheme"
|
|
43
|
+
:image-format="imageFormat"
|
|
44
44
|
/>
|
|
45
45
|
|
|
46
46
|
<BlokkliField
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
>
|
|
70
70
|
<DrupalWebform
|
|
71
71
|
v-if="webform?.id"
|
|
72
|
-
:
|
|
73
|
-
:
|
|
74
|
-
:
|
|
75
|
-
:
|
|
72
|
+
:form-id="webform?.id"
|
|
73
|
+
:container-class="themedClass('containerClass')"
|
|
74
|
+
:form-class="themedClass('formClass')"
|
|
75
|
+
:color-scheme="colorScheme"
|
|
76
76
|
:debug="false"
|
|
77
77
|
/>
|
|
78
78
|
</div>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
import type { ParagraphIcmsLayoutContactFragment } from '#graphql-operations'
|
|
85
85
|
import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
defineProps<ParagraphIcmsLayoutContactFragment>()
|
|
88
88
|
|
|
89
89
|
const { options, isEditing } = useAttrs().blokkliData as any
|
|
90
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
>
|
|
17
17
|
<DesignSystemOrganismsContentBlock
|
|
18
18
|
:pretitle="pretitle"
|
|
19
|
-
:
|
|
19
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
20
20
|
:title="title"
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
24
|
-
:
|
|
21
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
22
|
+
:title-weight="titleWeight"
|
|
23
|
+
:title-style="titleStyle"
|
|
24
|
+
:color-scheme="colorScheme"
|
|
25
25
|
/>
|
|
26
26
|
</div>
|
|
27
27
|
<div
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
>
|
|
31
31
|
<DesignSystemOrganismsContentBlock
|
|
32
32
|
:text="text"
|
|
33
|
-
:
|
|
33
|
+
:text-class="themedClass('textClass')"
|
|
34
34
|
:media="media"
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
:
|
|
35
|
+
:image-format="imageFormat"
|
|
36
|
+
:media-class="themedClass('mediaClass')"
|
|
37
|
+
:media-container-class="themedClass('mediaContainerClass', 'mt-0')"
|
|
38
|
+
:color-scheme="colorScheme"
|
|
39
39
|
/>
|
|
40
40
|
|
|
41
41
|
<BlokkliField
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
<a
|
|
68
68
|
v-for="(document, index) in documents"
|
|
69
69
|
:key="index"
|
|
70
|
-
:href="document?.
|
|
70
|
+
:href="document?.url?.path"
|
|
71
71
|
target="_blank"
|
|
72
72
|
rel="noopener noreferrer"
|
|
73
73
|
:class="download({ colorScheme })"
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
</div>
|
|
81
81
|
<DesignSystemOrganismsContentBlock
|
|
82
82
|
:text="document?.name"
|
|
83
|
-
:
|
|
83
|
+
:text-class="themedClass('downloadFileNameClass')"
|
|
84
84
|
/>
|
|
85
85
|
</a>
|
|
86
86
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="
|
|
4
|
-
themedClass('accordionItemClass', '
|
|
4
|
+
themedClass('accordionItemClass', 'border-none p-4 pb-6 not-last:mb-1')
|
|
5
5
|
"
|
|
6
6
|
v-bind="computedProps"
|
|
7
7
|
>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{{ question }}
|
|
10
10
|
</div>
|
|
11
11
|
<div :class="themedClass('accordionContentClass', 'p-4 pb-6 text-base')">
|
|
12
|
-
<div
|
|
12
|
+
<div :class="themedClass('contentClass')" v-html="answer" />
|
|
13
13
|
<BlokkliField
|
|
14
14
|
name="field_icms_buttons"
|
|
15
15
|
:list="buttons"
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
<script lang="ts" setup>
|
|
29
29
|
import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
|
|
30
|
+
import type { DefineBlokkliContext } from '#blokkli/types'
|
|
30
31
|
import type { ParagraphIcmsFaqElementFragment } from '#graphql-operations'
|
|
31
32
|
import { tv } from 'tailwind-variants'
|
|
32
33
|
|
|
@@ -61,7 +62,7 @@ const accordionTrigger = tv({
|
|
|
61
62
|
},
|
|
62
63
|
})
|
|
63
64
|
|
|
64
|
-
const { isEditing } = useAttrs().blokkliData
|
|
65
|
+
const { isEditing } = useAttrs().blokkliData as DefineBlokkliContext
|
|
65
66
|
const colorScheme = inject<ColorScheme>('colorScheme')
|
|
66
67
|
|
|
67
68
|
const computedProps = computed(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
3
|
:spacing="spacing"
|
|
4
|
-
:
|
|
4
|
+
:color-scheme="colorScheme"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
7
7
|
<DesignSystemAtomsGridRow :class="themedClass('rowClass')">
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
>
|
|
17
17
|
<DesignSystemOrganismsContentBlock
|
|
18
18
|
:pretitle="pretitle"
|
|
19
|
-
:
|
|
19
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
20
20
|
:title="title"
|
|
21
|
-
:
|
|
21
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
22
22
|
:subtitle="subtitle"
|
|
23
|
-
:
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
23
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
24
|
+
:title-weight="titleWeight"
|
|
25
|
+
:title-style="titleStyle"
|
|
26
|
+
:color-scheme="colorScheme"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
<div
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
>
|
|
38
38
|
<DesignSystemOrganismsContentBlock
|
|
39
39
|
:text="text"
|
|
40
|
-
:
|
|
40
|
+
:text-class="themedClass('textClass')"
|
|
41
41
|
:media="media"
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
:
|
|
45
|
-
:
|
|
42
|
+
:image-format="imageFormat"
|
|
43
|
+
:media-class="themedClass('mediaClass')"
|
|
44
|
+
:media-container-class="themedClass('mediaContainerClass', 'mt-0')"
|
|
45
|
+
:color-scheme="colorScheme"
|
|
46
46
|
/>
|
|
47
47
|
<BlokkliField
|
|
48
48
|
name="field_icms_buttons"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}"
|
|
92
92
|
>
|
|
93
93
|
<template #content="{ item }">
|
|
94
|
-
<div
|
|
94
|
+
<div :class="themedClass('contentClass')" v-html="item.answer" />
|
|
95
95
|
<BlokkliField
|
|
96
96
|
name="field_icms_buttons"
|
|
97
97
|
:list="item.buttons"
|
|
@@ -110,7 +110,10 @@
|
|
|
110
110
|
</template>
|
|
111
111
|
|
|
112
112
|
<script lang="ts" setup>
|
|
113
|
-
import type {
|
|
113
|
+
import type {
|
|
114
|
+
ParagraphIcmsFaqElementFragment,
|
|
115
|
+
ParagraphIcmsLayoutFaqFragment,
|
|
116
|
+
} from '#graphql-operations'
|
|
114
117
|
import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
115
118
|
import { tv } from 'tailwind-variants'
|
|
116
119
|
|
|
@@ -120,12 +123,30 @@ const themedClass = useTheme('ParagraphFAQLayout')
|
|
|
120
123
|
|
|
121
124
|
const { options, isEditing } = useAttrs().blokkliData as any
|
|
122
125
|
|
|
126
|
+
/**
|
|
127
|
+
* A field item's `props` is generated as a union with `object`, because the
|
|
128
|
+
* field is declared on the Paragraph interface and the inline fragment only
|
|
129
|
+
* covers one bundle of it. The Drupal field only accepts FAQ elements, so
|
|
130
|
+
* narrowing on one of their own fields is enough.
|
|
131
|
+
*/
|
|
132
|
+
function isFaqElement(
|
|
133
|
+
itemProps: object | null | undefined,
|
|
134
|
+
): itemProps is ParagraphIcmsFaqElementFragment {
|
|
135
|
+
return !!itemProps && 'question' in itemProps
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const faqElementProps = computed(() =>
|
|
139
|
+
(props.faqElements || []).map((faq) =>
|
|
140
|
+
isFaqElement(faq?.props) ? faq.props : undefined,
|
|
141
|
+
),
|
|
142
|
+
)
|
|
143
|
+
|
|
123
144
|
// Transform faqElements into UAccordion format
|
|
124
145
|
const accordionItems = computed(() => {
|
|
125
|
-
return
|
|
126
|
-
label:
|
|
127
|
-
answer:
|
|
128
|
-
buttons:
|
|
146
|
+
return faqElementProps.value.map((element) => ({
|
|
147
|
+
label: element?.question || '',
|
|
148
|
+
answer: element?.answer || '',
|
|
149
|
+
buttons: element?.buttons || [],
|
|
129
150
|
}))
|
|
130
151
|
})
|
|
131
152
|
|
|
@@ -240,12 +261,12 @@ provide('colorScheme', colorScheme)
|
|
|
240
261
|
const faqJsonLd = {
|
|
241
262
|
'@context': 'https://schema.org',
|
|
242
263
|
'@type': 'FAQPage',
|
|
243
|
-
mainEntity:
|
|
264
|
+
mainEntity: faqElementProps.value.map((element) => ({
|
|
244
265
|
'@type': 'Question',
|
|
245
|
-
name:
|
|
266
|
+
name: element?.question?.trim() ?? '',
|
|
246
267
|
acceptedAnswer: {
|
|
247
268
|
'@type': 'Answer',
|
|
248
|
-
text:
|
|
269
|
+
text: element?.answer?.replace(/<[^>]+>/g, '').trim() ?? '',
|
|
249
270
|
},
|
|
250
271
|
})),
|
|
251
272
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# The from_library wrapper blökkli places for a reusable block. Its rendering
|
|
2
|
+
# component ships with @blokkli/editor and expects the referenced library item
|
|
3
|
+
# as `libraryItem` with the wrapped block in `block`. The nested block spreads
|
|
4
|
+
# `paragraphInLibrary` (generated by dynamicParagraphResolver): the full
|
|
5
|
+
# `paragraph` fragment would contain this one and GraphQL forbids the cycle.
|
|
6
|
+
fragment paragraphFromLibrary on ParagraphFromLibrary {
|
|
7
|
+
libraryItem: fieldReusableParagraph {
|
|
8
|
+
uuid
|
|
9
|
+
label
|
|
10
|
+
block: paragraphs {
|
|
11
|
+
...paragraphsFieldItem
|
|
12
|
+
props {
|
|
13
|
+
...paragraphInLibrary
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
>
|
|
20
20
|
<DesignSystemOrganismsContentBlock
|
|
21
21
|
:pretitle="pretitle"
|
|
22
|
-
:
|
|
22
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
23
23
|
:title="title"
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
27
|
-
:
|
|
24
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
25
|
+
:title-weight="titleWeight"
|
|
26
|
+
:title-style="titleStyle"
|
|
27
|
+
:color-scheme="colorScheme"
|
|
28
28
|
/>
|
|
29
29
|
</div>
|
|
30
30
|
<div
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
>
|
|
42
42
|
<DesignSystemOrganismsContentBlock
|
|
43
43
|
:subtitle="subtitle"
|
|
44
|
-
:
|
|
44
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
45
45
|
:text="text"
|
|
46
|
-
:
|
|
47
|
-
:
|
|
46
|
+
:text-class="themedClass('textClass')"
|
|
47
|
+
:color-scheme="colorScheme"
|
|
48
48
|
/>
|
|
49
49
|
</div>
|
|
50
50
|
</DesignSystemAtomsGridRow>
|
|
@@ -73,11 +73,11 @@
|
|
|
73
73
|
<MediaImage
|
|
74
74
|
v-if="image"
|
|
75
75
|
:media="image"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:
|
|
79
|
-
:
|
|
80
|
-
:
|
|
76
|
+
image-aspect-ratios="1/1"
|
|
77
|
+
image-sizes="xs:100vw sm:100vw md:320px lg:400px"
|
|
78
|
+
:media-class="themedClass('mediaClass', 'w-full cursor-pointer')"
|
|
79
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
80
|
+
:element-class="themedClass('elementClass')"
|
|
81
81
|
/>
|
|
82
82
|
</div>
|
|
83
83
|
|
|
@@ -20,25 +20,32 @@
|
|
|
20
20
|
/>
|
|
21
21
|
|
|
22
22
|
<!-- Image/video wrapper -->
|
|
23
|
-
|
|
23
|
+
<!-- overflow-hidden + size-full crop videos to the hero bounds, since
|
|
24
|
+
unlike images they have no aspect-ratio handling of their own and
|
|
25
|
+
would otherwise overlap the following layouts. -->
|
|
26
|
+
<div
|
|
27
|
+
:class="
|
|
28
|
+
themedClass('mediaContainerClass', 'absolute inset-0 overflow-hidden')
|
|
29
|
+
"
|
|
30
|
+
>
|
|
24
31
|
<Media
|
|
25
32
|
v-if="medium"
|
|
26
33
|
:media="medium"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:
|
|
35
|
-
:
|
|
34
|
+
image-aspect-ratios="xs:1/1 sm:1/1 md:16/9 lg:16/9 xl:16/9 xxl:16/9"
|
|
35
|
+
image-sizes="xs:100vw sm:100vw md:100vw lg:100vw xl:100vw xxl:100vw"
|
|
36
|
+
image-loading="eager"
|
|
37
|
+
:video-controls="false"
|
|
38
|
+
video-autoplay
|
|
39
|
+
video-muted
|
|
40
|
+
video-loop
|
|
41
|
+
:media-class="themedClass('mediaClass', 'flex size-full items-center')"
|
|
42
|
+
:element-class="
|
|
36
43
|
cn(
|
|
37
44
|
themedClass('elementClass', 'size-full object-cover'),
|
|
38
45
|
elementClass,
|
|
39
46
|
)
|
|
40
47
|
"
|
|
41
|
-
:
|
|
48
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
42
49
|
/>
|
|
43
50
|
</div>
|
|
44
51
|
|
|
@@ -59,15 +66,15 @@
|
|
|
59
66
|
>
|
|
60
67
|
<DesignSystemOrganismsContentBlock
|
|
61
68
|
:pretitle="pretitle"
|
|
62
|
-
:
|
|
69
|
+
:pretitle-class="cn(themedClass('pretitleClass'), textShadow)"
|
|
63
70
|
:title="title"
|
|
64
|
-
:
|
|
65
|
-
:
|
|
66
|
-
:
|
|
71
|
+
:title-weight="titleWeight"
|
|
72
|
+
:title-style="titleStyle"
|
|
73
|
+
:title-class="cn(themedClass('titleClass'), textShadow)"
|
|
67
74
|
:subtitle="subtitle"
|
|
68
|
-
:
|
|
75
|
+
:subtitle-class="cn(themedClass('subtitleClass'), textShadow)"
|
|
69
76
|
:text="text"
|
|
70
|
-
:
|
|
77
|
+
:text-class="cn(themedClass('textClass'), textShadow)"
|
|
71
78
|
/>
|
|
72
79
|
<BlokkliField
|
|
73
80
|
name="field_icms_buttons"
|
|
@@ -144,11 +151,11 @@ const overlayClass = computed(() => {
|
|
|
144
151
|
|
|
145
152
|
if (alignHorizontal.value === 'left') {
|
|
146
153
|
classList.push(
|
|
147
|
-
themedClass('overlayClassAlignLeftClass', 'md:bg-
|
|
154
|
+
themedClass('overlayClassAlignLeftClass', 'md:bg-linear-to-l'),
|
|
148
155
|
)
|
|
149
156
|
} else if (alignHorizontal.value === 'right') {
|
|
150
157
|
classList.push(
|
|
151
|
-
themedClass('overlayClassAlignRightClass', 'md:bg-
|
|
158
|
+
themedClass('overlayClassAlignRightClass', 'md:bg-linear-to-r'),
|
|
152
159
|
)
|
|
153
160
|
}
|
|
154
161
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemMoleculesIconText
|
|
3
3
|
:title="title"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
4
|
+
:title-class="themedClass('titleClass')"
|
|
5
|
+
:title-weight="titleWeight"
|
|
6
6
|
:text="text"
|
|
7
|
-
:
|
|
7
|
+
:text-class="themedClass('textClass')"
|
|
8
8
|
:icon="icon"
|
|
9
|
-
:
|
|
9
|
+
:color-scheme="colorScheme"
|
|
10
10
|
/>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
>
|
|
14
14
|
<DesignSystemOrganismsContentBlock
|
|
15
15
|
:pretitle="pretitle"
|
|
16
|
-
:
|
|
16
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
17
17
|
:title="title"
|
|
18
|
-
:
|
|
18
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
19
19
|
:subtitle="subtitle"
|
|
20
|
-
:
|
|
21
|
-
:
|
|
22
|
-
:
|
|
23
|
-
:
|
|
20
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
21
|
+
:title-weight="titleWeight"
|
|
22
|
+
:title-style="titleStyle"
|
|
23
|
+
:color-scheme="colorScheme"
|
|
24
24
|
/>
|
|
25
25
|
</div>
|
|
26
26
|
<div
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
>
|
|
30
30
|
<DesignSystemOrganismsContentBlock
|
|
31
31
|
:text="text"
|
|
32
|
-
:
|
|
32
|
+
:text-class="themedClass('textClass')"
|
|
33
33
|
:media="media"
|
|
34
|
-
:
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:
|
|
34
|
+
:image-format="imageFormat"
|
|
35
|
+
:media-class="themedClass('mediaClass')"
|
|
36
|
+
:media-container-class="themedClass('mediaContainerClass', 'mt-0')"
|
|
37
|
+
:color-scheme="colorScheme"
|
|
38
38
|
/>
|
|
39
39
|
|
|
40
40
|
<BlokkliField
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass')"
|
|
6
6
|
>
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
<Media
|
|
20
20
|
v-if="image"
|
|
21
21
|
:media="image"
|
|
22
|
-
:
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
22
|
+
:image-format="imageFormat"
|
|
23
|
+
image-sizes="xs:100vw sm:100vw md:320px lg:380px"
|
|
24
|
+
:media-class="themedClass('mediaClass')"
|
|
25
|
+
:element-class="themedClass('elementClass')"
|
|
26
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
27
27
|
/>
|
|
28
28
|
</div>
|
|
29
29
|
<div
|
|
@@ -39,16 +39,16 @@
|
|
|
39
39
|
>
|
|
40
40
|
<DesignSystemOrganismsContentBlock
|
|
41
41
|
:pretitle="pretitle"
|
|
42
|
-
:
|
|
42
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
43
43
|
:title="title"
|
|
44
|
-
:
|
|
44
|
+
:title-class="themedClass('titleClass')"
|
|
45
45
|
:subtitle="subtitle"
|
|
46
|
-
:
|
|
46
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
47
47
|
:text="text"
|
|
48
|
-
:
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
:
|
|
48
|
+
:text-class="themedClass('textClass')"
|
|
49
|
+
:title-weight="titleWeight"
|
|
50
|
+
:title-style="titleStyle"
|
|
51
|
+
:color-scheme="colorScheme"
|
|
52
52
|
/>
|
|
53
53
|
<BlokkliField
|
|
54
54
|
name="field_icms_buttons"
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
<Media
|
|
67
67
|
v-if="signature"
|
|
68
68
|
:media="signature"
|
|
69
|
-
|
|
70
|
-
:
|
|
69
|
+
image-sizes="xs:180px"
|
|
70
|
+
:media-class="
|
|
71
71
|
themedClass('secondMediaClass', 'ml-auto mr-6 mt-6 max-w-44')
|
|
72
72
|
"
|
|
73
|
-
:
|
|
74
|
-
:
|
|
73
|
+
:figcaption-class="themedClass('secondFigcaptionClass')"
|
|
74
|
+
:element-class="themedClass('secondElementClass')"
|
|
75
75
|
/>
|
|
76
76
|
</div>
|
|
77
77
|
</DesignSystemAtomsGridRow>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemOrganismsLinkList
|
|
3
3
|
:title="title"
|
|
4
|
-
:
|
|
4
|
+
:title-weight="titleWeight"
|
|
5
5
|
:text="text"
|
|
6
6
|
:links="links"
|
|
7
|
-
:
|
|
8
|
-
:
|
|
7
|
+
:color-scheme="colorScheme"
|
|
8
|
+
:teaser-style="teaserStyle"
|
|
9
9
|
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
|
|
14
14
|
import type { ParagraphIcmsLinkListElementFragment } from '#graphql-operations'
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
defineProps<ParagraphIcmsLinkListElementFragment>()
|
|
17
17
|
|
|
18
|
-
const { options
|
|
18
|
+
const { options } = useAttrs().blokkliData as any
|
|
19
19
|
|
|
20
20
|
const teaserStyle = computed(() => {
|
|
21
21
|
return options.value.teaserStyle
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DesignSystemAtomsContainer
|
|
3
|
-
:
|
|
3
|
+
:color-scheme="colorScheme"
|
|
4
4
|
:spacing="spacing"
|
|
5
5
|
:class="themedClass('containerClass', 'flex flex-col gap-6')"
|
|
6
6
|
>
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
>
|
|
20
20
|
<DesignSystemOrganismsContentBlock
|
|
21
21
|
:pretitle="pretitle"
|
|
22
|
-
:
|
|
22
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
23
23
|
:title="title"
|
|
24
|
-
:
|
|
25
|
-
:
|
|
26
|
-
:
|
|
27
|
-
:
|
|
24
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
25
|
+
:title-weight="titleWeight"
|
|
26
|
+
:title-style="titleStyle"
|
|
27
|
+
:color-scheme="colorScheme"
|
|
28
28
|
/>
|
|
29
29
|
</div>
|
|
30
30
|
<div
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
>
|
|
39
39
|
<DesignSystemOrganismsContentBlock
|
|
40
40
|
:subtitle="subtitle"
|
|
41
|
-
:
|
|
41
|
+
:subtitle-class="themedClass('subtitleClass')"
|
|
42
42
|
:text="text"
|
|
43
|
-
:
|
|
44
|
-
:
|
|
43
|
+
:text-class="themedClass('textClass')"
|
|
44
|
+
:color-scheme="colorScheme"
|
|
45
45
|
/>
|
|
46
46
|
</div>
|
|
47
47
|
</DesignSystemAtomsGridRow>
|