@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
package/assets/css/ckeditor.css
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/* Vendor stuff */
|
|
2
2
|
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
|
|
3
3
|
|
|
4
|
-
@import
|
|
4
|
+
@import 'tailwindcss';
|
|
5
5
|
@import './theme/theme.css';
|
|
6
|
-
@import
|
|
7
|
-
@import
|
|
6
|
+
@import './base/typography.css';
|
|
7
|
+
@import './components/ck-content.css';
|
|
8
8
|
|
|
9
9
|
.ck.ck-editor {
|
|
10
10
|
a {
|
|
11
11
|
text-decoration-style: inherit;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
:root {
|
|
3
2
|
--container-max-width: 1380px;
|
|
4
3
|
--container-max-width-bk: calc(1380px * 0.8); /* 80vw coming from blokkli */
|
|
@@ -25,16 +24,17 @@
|
|
|
25
24
|
|
|
26
25
|
--container-columns-width-xl: calc(
|
|
27
26
|
calc(
|
|
28
|
-
var(--container-max-width) -
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
var(--container-max-width) - calc(11 * var(--container-gutter-width-xl))
|
|
28
|
+
) /
|
|
29
|
+
12
|
|
31
30
|
);
|
|
32
31
|
|
|
33
32
|
--container-columns-width-xl-bk: calc(
|
|
34
33
|
calc(
|
|
35
34
|
var(--container-max-width-bk) -
|
|
36
35
|
calc(11 * var(--container-gutter-width-xl))
|
|
37
|
-
) /
|
|
36
|
+
) /
|
|
37
|
+
12
|
|
38
38
|
);
|
|
39
39
|
|
|
40
40
|
/* Repeat doesn't work with grid-template, hence we simply repeat by copy-pasting. */
|
|
@@ -309,12 +309,12 @@
|
|
|
309
309
|
}
|
|
310
310
|
|
|
311
311
|
&:has(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
312
|
+
> *:first-child:not(
|
|
313
|
+
:nth-last-child(1),
|
|
314
|
+
:nth-last-child(2),
|
|
315
|
+
:nth-last-child(3)
|
|
316
|
+
)
|
|
317
|
+
) {
|
|
318
318
|
@apply lg:!grid-cols-3;
|
|
319
319
|
}
|
|
320
320
|
}
|
|
@@ -334,13 +334,13 @@
|
|
|
334
334
|
}
|
|
335
335
|
|
|
336
336
|
&:has(
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
337
|
+
> *:first-child:not(
|
|
338
|
+
:nth-last-child(1),
|
|
339
|
+
:nth-last-child(2),
|
|
340
|
+
:nth-last-child(3),
|
|
341
|
+
:nth-last-child(4)
|
|
342
|
+
)
|
|
343
|
+
) {
|
|
344
344
|
@apply lg:!grid-cols-4;
|
|
345
345
|
}
|
|
346
|
-
}
|
|
346
|
+
}
|
package/assets/css/fe-fixes.css
CHANGED
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
/* Vuepal toolbar logo */
|
|
2
|
-
.vuepal-admin-toolbar-link[data-route-name='<front>']
|
|
3
|
-
.vuepal-admin-toolbar-icon {
|
|
4
|
-
background: var(--vuepal-environment-color);
|
|
5
|
-
mask-image: url(/modules/contrib/icms_admin/img/iqual-logo-q.svg) !important;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
1
|
/**
|
|
9
2
|
*
|
|
10
3
|
* BLÖKKLI EDIT PAGE BUTTON
|
|
11
4
|
*
|
|
5
|
+
* Editors open the editor from Drupal ("Edit page content" in the site
|
|
6
|
+
* shell); blökkli offers no option to drop its indicator, so it is hidden.
|
|
7
|
+
*
|
|
12
8
|
**/
|
|
13
9
|
body {
|
|
14
10
|
position: relative;
|
|
15
11
|
|
|
16
|
-
.bk .bk-edit-indicator
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
top: 275px;
|
|
20
|
-
z-index: 1000;
|
|
12
|
+
.bk .bk-edit-indicator,
|
|
13
|
+
.bk .bk-edit-indicator-overlay {
|
|
14
|
+
display: none !important;
|
|
21
15
|
}
|
|
22
16
|
}
|
|
23
17
|
|
|
@@ -4,17 +4,39 @@
|
|
|
4
4
|
--primary-chroma: 0.19;
|
|
5
5
|
--primary-hue: 41;
|
|
6
6
|
|
|
7
|
-
--primary-50: oklch(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--primary-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
--primary-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--primary-
|
|
17
|
-
|
|
7
|
+
--primary-50: oklch(
|
|
8
|
+
var(--lightness-50) var(--primary-chroma) var(--primary-hue)
|
|
9
|
+
);
|
|
10
|
+
--primary-100: oklch(
|
|
11
|
+
var(--lightness-100) var(--primary-chroma) var(--primary-hue)
|
|
12
|
+
);
|
|
13
|
+
--primary-200: oklch(
|
|
14
|
+
var(--lightness-200) var(--primary-chroma) var(--primary-hue)
|
|
15
|
+
);
|
|
16
|
+
--primary-300: oklch(
|
|
17
|
+
var(--lightness-300) var(--primary-chroma) var(--primary-hue)
|
|
18
|
+
);
|
|
19
|
+
--primary-400: oklch(
|
|
20
|
+
var(--lightness-400) var(--primary-chroma) var(--primary-hue)
|
|
21
|
+
);
|
|
22
|
+
--primary-500: oklch(
|
|
23
|
+
var(--primary-lightness) var(--primary-chroma) var(--primary-hue)
|
|
24
|
+
);
|
|
25
|
+
--primary-600: oklch(
|
|
26
|
+
var(--lightness-600) var(--primary-chroma) var(--primary-hue)
|
|
27
|
+
);
|
|
28
|
+
--primary-700: oklch(
|
|
29
|
+
var(--lightness-700) var(--primary-chroma) var(--primary-hue)
|
|
30
|
+
);
|
|
31
|
+
--primary-800: oklch(
|
|
32
|
+
var(--lightness-800) var(--primary-chroma) var(--primary-hue)
|
|
33
|
+
);
|
|
34
|
+
--primary-900: oklch(
|
|
35
|
+
var(--lightness-900) var(--primary-chroma) var(--primary-hue)
|
|
36
|
+
);
|
|
37
|
+
--primary-950: oklch(
|
|
38
|
+
var(--lightness-950) var(--primary-chroma) var(--primary-hue)
|
|
39
|
+
);
|
|
18
40
|
}
|
|
19
41
|
|
|
20
42
|
@theme {
|
|
@@ -4,17 +4,39 @@
|
|
|
4
4
|
--secondary-chroma: 0.12;
|
|
5
5
|
--secondary-hue: 243;
|
|
6
6
|
|
|
7
|
-
--secondary-50: oklch(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
--secondary-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
--secondary-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
--secondary-
|
|
17
|
-
|
|
7
|
+
--secondary-50: oklch(
|
|
8
|
+
var(--lightness-50) var(--secondary-chroma) var(--secondary-hue)
|
|
9
|
+
);
|
|
10
|
+
--secondary-100: oklch(
|
|
11
|
+
var(--lightness-100) var(--secondary-chroma) var(--secondary-hue)
|
|
12
|
+
);
|
|
13
|
+
--secondary-200: oklch(
|
|
14
|
+
var(--lightness-200) var(--secondary-chroma) var(--secondary-hue)
|
|
15
|
+
);
|
|
16
|
+
--secondary-300: oklch(
|
|
17
|
+
var(--lightness-300) var(--secondary-chroma) var(--secondary-hue)
|
|
18
|
+
);
|
|
19
|
+
--secondary-400: oklch(
|
|
20
|
+
var(--lightness-400) var(--secondary-chroma) var(--secondary-hue)
|
|
21
|
+
);
|
|
22
|
+
--secondary-500: oklch(
|
|
23
|
+
var(--secondary-lightness) var(--secondary-chroma) var(--secondary-hue)
|
|
24
|
+
);
|
|
25
|
+
--secondary-600: oklch(
|
|
26
|
+
var(--lightness-600) var(--secondary-chroma) var(--secondary-hue)
|
|
27
|
+
);
|
|
28
|
+
--secondary-700: oklch(
|
|
29
|
+
var(--lightness-700) var(--secondary-chroma) var(--secondary-hue)
|
|
30
|
+
);
|
|
31
|
+
--secondary-800: oklch(
|
|
32
|
+
var(--lightness-800) var(--secondary-chroma) var(--secondary-hue)
|
|
33
|
+
);
|
|
34
|
+
--secondary-900: oklch(
|
|
35
|
+
var(--lightness-900) var(--secondary-chroma) var(--secondary-hue)
|
|
36
|
+
);
|
|
37
|
+
--secondary-950: oklch(
|
|
38
|
+
var(--lightness-950) var(--secondary-chroma) var(--secondary-hue)
|
|
39
|
+
);
|
|
18
40
|
}
|
|
19
41
|
|
|
20
42
|
@theme {
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M12 3C14.0083 3 15.6364 4.68781 15.6364 6.76983C15.6364 8.31559 14.7387 9.64347 13.4545 10.2253V16.8313L16.7273 14.8727C16.9522 14.7381 17.0909 14.489 17.0909 14.2197V12.8015C17.0909 11.9687 17.7421 11.2936 18.5455 11.2936C19.3488 11.2936 20 11.9687 20 12.8015V15.961C20 16.2303 19.8613 16.4794 19.6364 16.6141L13.4545 20.314L12.3345 20.9155C12.1247 21.0282 11.8753 21.0282 11.6655 20.9155L10.5455 20.314L4.36364 16.6141C4.13866 16.4794 4.00005 16.2303 4 15.961V12.8015C4 11.9687 4.65122 11.2936 5.45455 11.2936C6.25787 11.2936 6.90909 11.9687 6.90909 12.8015V14.2197C6.90913 14.489 7.04776 14.7381 7.27273 14.8727L10.5455 16.8313V10.2253C9.2613 9.64347 8.36364 8.31559 8.36364 6.76983C8.36364 4.68781 9.99169 3 12 3ZM12 5.2619C11.1967 5.2619 10.5455 5.93702 10.5455 6.76983C10.5455 7.60263 11.1967 8.27776 12 8.27776C12.8033 8.27776 13.4545 7.60263 13.4545 6.76983C13.4545 5.93702 12.8033 5.2619 12 5.2619Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineBlokkliEditAdapter } from '#blokkli/adapter'
|
|
2
|
+
import drupalAdapter from '#blokkli/drupal/adapter'
|
|
3
|
+
import useDrupalUrl from './composables/useDrupalUrl'
|
|
4
|
+
import { withoutTranslationEditUrls } from './shared/blokkliState'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* blökkli's Drupal adapter, aware of the Drupal backend on its own domain.
|
|
8
|
+
*
|
|
9
|
+
* The editor embeds Drupal forms in iframes and polls a Drupal route; the
|
|
10
|
+
* backend lives on the "backend." subdomain of the frontend domain (see
|
|
11
|
+
* docs/routing.md), so those URLs must point there. Creating a translation
|
|
12
|
+
* opens its form through the same form frame builder as the page settings
|
|
13
|
+
* (see withoutTranslationEditUrls). Everything else goes through the GraphQL
|
|
14
|
+
* middleware and needs no change. A project's own
|
|
15
|
+
* app/blokkli.editAdapter.ts takes precedence over this file and can wrap it
|
|
16
|
+
* the same way.
|
|
17
|
+
*/
|
|
18
|
+
export default defineBlokkliEditAdapter(async (ctx) => {
|
|
19
|
+
const adapter = await drupalAdapter(ctx)
|
|
20
|
+
const withDrupalUrl = useDrupalUrl()
|
|
21
|
+
|
|
22
|
+
const { formFrameBuilder, buildEditableFrameUrl, getLibraryItemEditUrl } =
|
|
23
|
+
adapter
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
...adapter,
|
|
27
|
+
// Every state the editor receives (initial load and mutation results)
|
|
28
|
+
// passes through here.
|
|
29
|
+
mapState: (state: Parameters<typeof adapter.mapState>[0]) =>
|
|
30
|
+
withoutTranslationEditUrls(adapter.mapState(state)),
|
|
31
|
+
formFrameBuilder: formFrameBuilder
|
|
32
|
+
? (e) => {
|
|
33
|
+
const result = formFrameBuilder(e)
|
|
34
|
+
return result?.url
|
|
35
|
+
? { ...result, url: withDrupalUrl(result.url) }
|
|
36
|
+
: result
|
|
37
|
+
}
|
|
38
|
+
: undefined,
|
|
39
|
+
buildEditableFrameUrl: buildEditableFrameUrl
|
|
40
|
+
? (e) => {
|
|
41
|
+
const url = buildEditableFrameUrl(e)
|
|
42
|
+
return url ? withDrupalUrl(url) : url
|
|
43
|
+
}
|
|
44
|
+
: undefined,
|
|
45
|
+
getLibraryItemEditUrl: getLibraryItemEditUrl
|
|
46
|
+
? (uuid) => withDrupalUrl(getLibraryItemEditUrl(uuid))
|
|
47
|
+
: undefined,
|
|
48
|
+
getLastChanged: () =>
|
|
49
|
+
$fetch<{ changed: number }>('/api/icms/blokkli/last-changed', {
|
|
50
|
+
query: {
|
|
51
|
+
entityType: ctx.value.entityType,
|
|
52
|
+
entityUuid: ctx.value.entityUuid,
|
|
53
|
+
},
|
|
54
|
+
}).then((v) => v.changed),
|
|
55
|
+
}
|
|
56
|
+
})
|
package/bundles.ts
CHANGED
|
@@ -31,12 +31,12 @@ export function collectProjectDeps(): ProjectDeps {
|
|
|
31
31
|
|
|
32
32
|
if (existsSync(pkgPath)) {
|
|
33
33
|
try {
|
|
34
|
-
const {
|
|
35
|
-
dependencies = {}
|
|
36
|
-
} = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
34
|
+
const { dependencies = {} } = JSON.parse(readFileSync(pkgPath, 'utf8'))
|
|
37
35
|
|
|
38
36
|
deps = { ...dependencies }
|
|
39
|
-
} catch {
|
|
37
|
+
} catch {
|
|
38
|
+
// A malformed package.json simply yields no bundle dependencies.
|
|
39
|
+
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
cache = deps
|
|
@@ -50,5 +50,5 @@ export function collectProjectDeps(): ProjectDeps {
|
|
|
50
50
|
*/
|
|
51
51
|
export function buildBundleStack(): string[] {
|
|
52
52
|
const deps = collectProjectDeps()
|
|
53
|
-
return ICMS_BUNDLES.filter(layer => deps[layer])
|
|
54
|
-
}
|
|
53
|
+
return ICMS_BUNDLES.filter((layer) => deps[layer])
|
|
54
|
+
}
|