@shopware/cms-base-layer 1.5.0 → 2.0.0
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 +328 -13
- package/app/app.config.ts +7 -0
- package/app/assets/icons/check-circle.svg +3 -0
- package/app/assets/icons/checkmark.svg +3 -0
- package/app/assets/icons/chevron.svg +3 -0
- package/app/assets/icons/exclamation-circle.svg +3 -0
- package/app/assets/icons/star-empty.svg +3 -0
- package/app/assets/icons/star-filled.svg +3 -0
- package/app/assets/icons/user.svg +1 -0
- package/app/components/SwCategoryNavigation.vue +76 -0
- package/app/components/SwCategoryNavigationLink.vue +128 -0
- package/{components → app/components}/SwContactForm.vue +27 -27
- package/app/components/SwFilterChips.vue +144 -0
- package/app/components/SwListingProductPrice.vue +89 -0
- package/{components → app/components}/SwNewsletterForm.vue +45 -34
- package/{components → app/components}/SwPagination.vue +3 -5
- package/{components → app/components}/SwProductAddToCart.vue +22 -27
- package/app/components/SwProductCard.vue +170 -0
- package/app/components/SwProductCardDetails.vue +57 -0
- package/app/components/SwProductCardImage.vue +87 -0
- package/app/components/SwProductCardSkeleton.vue +33 -0
- package/app/components/SwProductListingFilter.vue +64 -0
- package/app/components/SwProductListingFilters.vue +308 -0
- package/{components → app/components}/SwProductReviews.vue +28 -13
- package/app/components/SwProductReviewsForm.vue +292 -0
- package/app/components/SwQuantitySelect.vue +106 -0
- package/{components → app/components}/SwSlider.vue +4 -4
- package/app/components/SwSortDropdown.vue +83 -0
- package/app/components/SwStockInfo.vue +44 -0
- package/{components → app/components}/SwVariantConfigurator.vue +1 -1
- package/app/components/listing-filters/SwFilterPrice.vue +214 -0
- package/app/components/listing-filters/SwFilterProperties.vue +113 -0
- package/app/components/listing-filters/SwFilterRating.vue +90 -0
- package/app/components/listing-filters/SwFilterShippingFree.vue +107 -0
- package/{components → app/components}/public/cms/CmsPage.vue +19 -4
- package/{components → app/components}/public/cms/block/CmsBlockGalleryBuybox.vue +5 -5
- package/{components → app/components}/public/cms/block/CmsBlockImageBubbleRow.vue +5 -5
- package/app/components/public/cms/block/CmsBlockImageFourColumn.vue +41 -0
- package/app/components/public/cms/block/CmsBlockImageGalleryBig.vue +42 -0
- package/app/components/public/cms/block/CmsBlockImageHighlightRow.vue +37 -0
- package/{components → app/components}/public/cms/block/CmsBlockImageSimpleGrid.vue +11 -5
- package/{components → app/components}/public/cms/block/CmsBlockImageText.vue +7 -3
- package/{components → app/components}/public/cms/block/CmsBlockImageTextBubble.vue +13 -16
- package/{components → app/components}/public/cms/block/CmsBlockImageTextCover.vue +7 -9
- package/app/components/public/cms/block/CmsBlockImageTextGallery.vue +88 -0
- package/app/components/public/cms/block/CmsBlockImageTextRow.vue +53 -0
- package/{components → app/components}/public/cms/block/CmsBlockImageThreeColumn.vue +10 -4
- package/app/components/public/cms/block/CmsBlockImageThreeCover.vue +37 -0
- package/app/components/public/cms/block/CmsBlockImageTwoColumn.vue +37 -0
- package/{components → app/components}/public/cms/block/CmsBlockProductHeading.vue +1 -1
- package/{components → app/components}/public/cms/block/CmsBlockProductThreeColumn.vue +10 -4
- package/{components → app/components}/public/cms/block/CmsBlockSidebarFilter.vue +3 -1
- package/app/components/public/cms/block/CmsBlockTextOnImage.vue +30 -0
- package/{components → app/components}/public/cms/block/CmsBlockTextTeaserSection.vue +4 -4
- package/{components → app/components}/public/cms/block/CmsBlockTextTwoColumn.vue +3 -5
- package/app/components/public/cms/element/CmsElementBuyBox.vue +145 -0
- package/app/components/public/cms/element/CmsElementCategoryNavigation.vue +53 -0
- package/{components → app/components}/public/cms/element/CmsElementCrossSelling.vue +3 -3
- package/{components → app/components}/public/cms/element/CmsElementImage.vue +52 -13
- package/app/components/public/cms/element/CmsElementImageGallery.vue +158 -0
- package/{components → app/components}/public/cms/element/CmsElementImageSlider.vue +2 -2
- package/{components → app/components}/public/cms/element/CmsElementProductBox.vue +2 -1
- package/app/components/public/cms/element/CmsElementProductDescriptionReviews.vue +217 -0
- package/{components → app/components}/public/cms/element/CmsElementProductListing.vue +23 -94
- package/app/components/public/cms/element/CmsElementProductName.vue +11 -0
- package/{components → app/components}/public/cms/element/CmsElementProductSlider.vue +4 -4
- package/{components → app/components}/public/cms/element/CmsElementText.vue +8 -2
- package/{components → app/components}/public/cms/element/CmsElementYoutubeVideo.vue +8 -2
- package/app/components/public/cms/element/SwProductListingPagination.vue +70 -0
- package/{components → app/components}/public/cms/section/CmsSectionDefault.vue +1 -1
- package/app/components/public/cms/section/CmsSectionSidebar.vue +36 -0
- package/app/components/public/cms/skeleton/ProductCardSkeleton.vue +28 -0
- package/app/components/ui/BaseButton.vue +99 -0
- package/app/components/ui/BaseIcon.vue +15 -0
- package/app/components/ui/Checkbox.vue +49 -0
- package/app/components/ui/CheckmarkIcon.vue +23 -0
- package/app/components/ui/ChevronIcon.vue +37 -0
- package/app/components/ui/ExclamationIcon.vue +11 -0
- package/app/components/ui/IconButton.vue +32 -0
- package/app/components/ui/RadioButton.vue +26 -0
- package/app/components/ui/StarIcon.vue +18 -0
- package/app/components/ui/SwitchButton.vue +100 -0
- package/app/components/ui/UserIcon.vue +11 -0
- package/app/components/ui/WishlistIcon.vue +20 -0
- package/app/composables/useImagePlaceholder.ts +27 -0
- package/{helpers → app/helpers}/clientOnly.ts +5 -0
- package/app/providers/shopware.test.ts +213 -0
- package/app/providers/shopware.ts +107 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -2
- package/index.d.ts +12 -0
- package/nuxt.config.ts +80 -6
- package/package.json +29 -21
- package/uno.config.ts +83 -0
- package/components/SwCategoryNavigation.vue +0 -44
- package/components/SwCategoryNavigationLink.vue +0 -57
- package/components/SwListingProductPrice.vue +0 -89
- package/components/SwProductCard.vue +0 -286
- package/components/SwProductListingFilter.vue +0 -42
- package/components/SwProductListingFilters.vue +0 -292
- package/components/listing-filters/SwFilterPrice.vue +0 -160
- package/components/listing-filters/SwFilterProperties.vue +0 -123
- package/components/listing-filters/SwFilterRating.vue +0 -101
- package/components/listing-filters/SwFilterShippingFree.vue +0 -104
- package/components/public/cms/block/CmsBlockImageFourColumn.vue +0 -29
- package/components/public/cms/block/CmsBlockImageHighlightRow.vue +0 -27
- package/components/public/cms/block/CmsBlockImageTextGallery.vue +0 -85
- package/components/public/cms/block/CmsBlockImageTextRow.vue +0 -43
- package/components/public/cms/block/CmsBlockImageThreeCover.vue +0 -27
- package/components/public/cms/block/CmsBlockImageTwoColumn.vue +0 -25
- package/components/public/cms/block/CmsBlockTextOnImage.vue +0 -20
- package/components/public/cms/element/CmsBlockHtml.md +0 -1
- package/components/public/cms/element/CmsElementBuyBox.vue +0 -190
- package/components/public/cms/element/CmsElementCategoryNavigation.vue +0 -167
- package/components/public/cms/element/CmsElementImageGallery.vue +0 -249
- package/components/public/cms/element/CmsElementProductDescriptionReviews.vue +0 -123
- package/components/public/cms/element/CmsElementProductName.vue +0 -10
- package/components/public/cms/section/CmsSectionSidebar.vue +0 -49
- package/components/public/cms/skeleton/ProductCardSkeleton.vue +0 -44
- /package/{components → app/components}/SwMedia3D.vue +0 -0
- /package/{components → app/components}/SwProductGallery.vue +0 -0
- /package/{components → app/components}/SwProductPrice.vue +0 -0
- /package/{components → app/components}/SwProductUnits.vue +0 -0
- /package/{components → app/components}/SwSharedPrice.vue +0 -0
- /package/{components → app/components}/public/cms/CmsGenericBlock.md +0 -0
- /package/{components → app/components}/public/cms/CmsGenericBlock.vue +0 -0
- /package/{components → app/components}/public/cms/CmsGenericElement.md +0 -0
- /package/{components → app/components}/public/cms/CmsGenericElement.vue +0 -0
- /package/{components → app/components}/public/cms/CmsNoComponent.vue +0 -0
- /package/{components → app/components}/public/cms/CmsPage.md +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockCategoryNavigation.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockCenterText.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockCrossSelling.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockCustomForm.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockDefault.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockForm.vue +0 -0
- /package/{components/public/cms/element → app/components/public/cms/block}/CmsBlockHtml.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockImage.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockImageCover.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockImageGallery.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockImageSlider.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockProductDescriptionReviews.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockProductListing.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockProductSlider.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockText.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockTextHero.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockTextTeaser.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockTextThreeColumn.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockVimeoVideo.vue +0 -0
- /package/{components → app/components}/public/cms/block/CmsBlockYoutubeVideo.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementBuyBox.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementCategoryNavigation.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementCrossSelling.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementCustomForm.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementCustomForm.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementForm.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementForm.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementHtml.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementImage.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementImageGallery.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementImageGallery3dPlaceholder.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementImageSlider.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementManufacturerLogo.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementManufacturerLogo.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementProductBox.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementProductDescriptionReviews.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementProductListing.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementProductName.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementProductSlider.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementSidebarFilter.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementSidebarFilter.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementText.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementVimeoVideo.md +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementVimeoVideo.vue +0 -0
- /package/{components → app/components}/public/cms/element/CmsElementYoutubeVideo.md +0 -0
- /package/{components → app/components}/public/cms/section/CmsSectionDefault.md +0 -0
- /package/{components → app/components}/public/cms/section/CmsSectionSidebar.md +0 -0
- /package/{helpers → app/helpers}/html-to-vue/ast.ts +0 -0
- /package/{helpers → app/helpers}/html-to-vue/getOptionsFromNode.test.ts +0 -0
- /package/{helpers → app/helpers}/html-to-vue/getOptionsFromNode.ts +0 -0
- /package/{helpers → app/helpers}/html-to-vue/renderToHtml.ts +0 -0
- /package/{helpers → app/helpers}/html-to-vue/renderer.ts +0 -0
- /package/{helpers → app/helpers}/media/isSpatial.ts +0 -0
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script
|
|
2
|
-
setup
|
|
3
|
-
lang="ts"
|
|
4
|
-
generic="
|
|
5
|
-
ListingFilter extends {
|
|
6
|
-
id: string;
|
|
7
|
-
code: keyof Schemas['ProductListingResult']['currentFilters'];
|
|
8
|
-
label: string;
|
|
9
|
-
name: string;
|
|
10
|
-
}
|
|
11
|
-
"
|
|
12
|
-
>
|
|
13
|
-
import { onClickOutside } from "@vueuse/core";
|
|
14
|
-
import { computed, ref } from "vue";
|
|
15
|
-
import type { Schemas } from "#shopware";
|
|
16
|
-
|
|
17
|
-
const props = defineProps<{
|
|
18
|
-
filter: ListingFilter;
|
|
19
|
-
selectedFilters: Schemas["ProductListingResult"]["currentFilters"];
|
|
20
|
-
}>();
|
|
21
|
-
|
|
22
|
-
const emits =
|
|
23
|
-
defineEmits<
|
|
24
|
-
(e: "select-value", value: { code: string; value: unknown }) => void
|
|
25
|
-
>();
|
|
26
|
-
const currentFilterData = computed(
|
|
27
|
-
() => !!props.selectedFilters[props.filter?.code],
|
|
28
|
-
);
|
|
29
|
-
const onChangeOption = (): void => {
|
|
30
|
-
emits("select-value", {
|
|
31
|
-
code: props.filter?.code,
|
|
32
|
-
value: !currentFilterData.value,
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const isFilterVisible = ref<boolean>(false);
|
|
37
|
-
const toggle = () => {
|
|
38
|
-
isFilterVisible.value = !isFilterVisible.value;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const dropdownElement = ref(null);
|
|
42
|
-
onClickOutside(dropdownElement, () => {
|
|
43
|
-
isFilterVisible.value = false;
|
|
44
|
-
});
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<template>
|
|
48
|
-
<div class="border-b border-gray-200 py-6 px-5">
|
|
49
|
-
<h3 class="-my-3 flow-root">
|
|
50
|
-
<button
|
|
51
|
-
type="button"
|
|
52
|
-
class="flex w-full items-center justify-between bg-white py-2 text-base text-gray-400 hover:text-gray-500"
|
|
53
|
-
@click="toggle"
|
|
54
|
-
>
|
|
55
|
-
<span class="font-medium text-gray-900 text-left">{{
|
|
56
|
-
props.filter.label
|
|
57
|
-
}}</span>
|
|
58
|
-
<span class="ml-6 flex items-center">
|
|
59
|
-
<i
|
|
60
|
-
:class="[
|
|
61
|
-
!isFilterVisible
|
|
62
|
-
? 'i-carbon-chevron-down'
|
|
63
|
-
: 'i-carbon-chevron-up',
|
|
64
|
-
]"
|
|
65
|
-
/>
|
|
66
|
-
</span>
|
|
67
|
-
</button>
|
|
68
|
-
</h3>
|
|
69
|
-
<transition name="fade" mode="out-in">
|
|
70
|
-
<div v-show="isFilterVisible" id="filter-section-0" class="pt-6">
|
|
71
|
-
<div class="space-y-4">
|
|
72
|
-
<div class="flex items-center" @click="onChangeOption()">
|
|
73
|
-
<input
|
|
74
|
-
:id="`filter-mobile-${props.filter.id || props.filter.code}`"
|
|
75
|
-
:checked="currentFilterData"
|
|
76
|
-
:name="props.filter.name"
|
|
77
|
-
:value="props.filter.name"
|
|
78
|
-
type="checkbox"
|
|
79
|
-
class="h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"
|
|
80
|
-
/>
|
|
81
|
-
|
|
82
|
-
<label
|
|
83
|
-
:for="`filter-mobile-${props.filter.id || props.filter.code}`"
|
|
84
|
-
class="ml-3 text-gray-600"
|
|
85
|
-
>
|
|
86
|
-
{{ props.filter.label }}
|
|
87
|
-
</label>
|
|
88
|
-
</div>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</transition>
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
94
|
-
<style scoped>
|
|
95
|
-
.fade-enter-active,
|
|
96
|
-
.fade-leave-active {
|
|
97
|
-
transition: all 0.2s ease;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.fade-enter-from,
|
|
101
|
-
.fade-leave-to {
|
|
102
|
-
opacity: 0;
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockImageFourColumn } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockImageFourColumn;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const leftContent = getSlotContent("left");
|
|
12
|
-
const rightContent = getSlotContent("right");
|
|
13
|
-
const centerLeftContent = getSlotContent("center-left");
|
|
14
|
-
const centerRightContent = getSlotContent("center-right");
|
|
15
|
-
</script>
|
|
16
|
-
<template>
|
|
17
|
-
<div class="cms-block-image-four-column grid md:grid-cols-4 gap-10">
|
|
18
|
-
<CmsGenericElement :content="leftContent" />
|
|
19
|
-
<CmsGenericElement :content="centerLeftContent" />
|
|
20
|
-
<CmsGenericElement :content="centerRightContent" />
|
|
21
|
-
<CmsGenericElement :content="rightContent" />
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<style scoped>
|
|
26
|
-
.cms-block-image-four-column .cms-element-image {
|
|
27
|
-
@apply object-cover;
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockImageHighlightRow } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockImageHighlightRow;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const leftContent = getSlotContent("left");
|
|
12
|
-
const rightContent = getSlotContent("right");
|
|
13
|
-
const centerContent = getSlotContent("center");
|
|
14
|
-
</script>
|
|
15
|
-
<template>
|
|
16
|
-
<div class="cms-block-image-highlight-row grid md:grid-cols-3 gap-10">
|
|
17
|
-
<CmsGenericElement :content="leftContent" />
|
|
18
|
-
<CmsGenericElement :content="centerContent" />
|
|
19
|
-
<CmsGenericElement :content="rightContent" />
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style scoped>
|
|
24
|
-
.cms-block-image-highlight-row .cms-element-image {
|
|
25
|
-
@apply border-[12px] border-white;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
CmsBlockImageTextGallery,
|
|
4
|
-
CmsElementImage,
|
|
5
|
-
CmsElementText,
|
|
6
|
-
} from "@shopware/composables";
|
|
7
|
-
import { useCmsBlock } from "#imports";
|
|
8
|
-
import type { Schemas } from "#shopware";
|
|
9
|
-
|
|
10
|
-
const props = defineProps<{
|
|
11
|
-
content: CmsBlockImageTextGallery;
|
|
12
|
-
}>();
|
|
13
|
-
|
|
14
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
15
|
-
|
|
16
|
-
const leftTextContent = getSlotContent("left-text") as CmsElementText;
|
|
17
|
-
const rightTextContent = getSlotContent("right-text") as CmsElementText;
|
|
18
|
-
const centerTextContent = getSlotContent("center-text") as CmsElementText;
|
|
19
|
-
|
|
20
|
-
const leftImageContent = getSlotContent("left-image") as CmsElementImage;
|
|
21
|
-
const rightImageContent = getSlotContent("right-image") as CmsElementImage;
|
|
22
|
-
const centerImageContent = getSlotContent("center-image") as CmsElementImage;
|
|
23
|
-
|
|
24
|
-
// TODO: useRouter
|
|
25
|
-
function onImageClick(
|
|
26
|
-
slotContent: Schemas["CmsSlot"] & {
|
|
27
|
-
data: {
|
|
28
|
-
url?: string;
|
|
29
|
-
newTab?: boolean;
|
|
30
|
-
};
|
|
31
|
-
},
|
|
32
|
-
) {
|
|
33
|
-
if (slotContent.data?.url) {
|
|
34
|
-
if (slotContent.data?.newTab) {
|
|
35
|
-
window.open(slotContent.data.url);
|
|
36
|
-
} else {
|
|
37
|
-
window.location.href = slotContent.data.url;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
</script>
|
|
42
|
-
<template>
|
|
43
|
-
<article
|
|
44
|
-
class="cms-block-image-text-gallery"
|
|
45
|
-
:style="{ backgroundColor: content.backgroundColor || '' }"
|
|
46
|
-
>
|
|
47
|
-
<div class="cms-block-image-text-gallery__container">
|
|
48
|
-
<div class="cms-block-image-text-gallery__container__column">
|
|
49
|
-
<CmsElementImage
|
|
50
|
-
:content="leftImageContent"
|
|
51
|
-
:style="{ cursor: leftImageContent.data?.url && 'pointer' }"
|
|
52
|
-
@click="onImageClick(leftImageContent)"
|
|
53
|
-
/>
|
|
54
|
-
<CmsElementText
|
|
55
|
-
:content="leftTextContent"
|
|
56
|
-
class="cms-block-imag)e-text-gallery__container__column--text"
|
|
57
|
-
/>
|
|
58
|
-
</div>
|
|
59
|
-
<div class="cms-block-image-text-gallery__container__column">
|
|
60
|
-
<CmsElementImage
|
|
61
|
-
:content="centerImageContent"
|
|
62
|
-
:style="{
|
|
63
|
-
cursor: centerImageContent.data?.url && 'pointer',
|
|
64
|
-
}"
|
|
65
|
-
@click="onImageClick(centerImageContent)"
|
|
66
|
-
/>
|
|
67
|
-
<CmsElementText
|
|
68
|
-
:content="centerTextContent"
|
|
69
|
-
class="cms-block-image-text-gallery__container__column--text"
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
<div class="cms-block-image-text-gallery__container__column">
|
|
73
|
-
<CmsElementImage
|
|
74
|
-
:content="rightImageContent"
|
|
75
|
-
:style="{ cursor: rightImageContent.data?.url && 'pointer' }"
|
|
76
|
-
@click="onImageClick(rightImageContent)"
|
|
77
|
-
/>
|
|
78
|
-
<CmsElementText
|
|
79
|
-
:content="rightTextContent"
|
|
80
|
-
class="cms-block-image-text-gallery__container__column--text"
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
</div>
|
|
84
|
-
</article>
|
|
85
|
-
</template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockImageTextRow } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockImageTextRow;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const leftImageContent = getSlotContent("left-image");
|
|
12
|
-
const leftTextContent = getSlotContent("left-text");
|
|
13
|
-
const centerImageContent = getSlotContent("center-image");
|
|
14
|
-
const centerTextContent = getSlotContent("center-text");
|
|
15
|
-
const rightImageContent = getSlotContent("right-image");
|
|
16
|
-
const rightTextContent = getSlotContent("right-text");
|
|
17
|
-
</script>
|
|
18
|
-
<template>
|
|
19
|
-
<div class="cms-block-image-text-row grid md:grid-cols-3 gap-10">
|
|
20
|
-
<div class="cms-block-image-text-row__column">
|
|
21
|
-
<CmsGenericElement :content="leftImageContent" />
|
|
22
|
-
<CmsGenericElement :content="leftTextContent" />
|
|
23
|
-
</div>
|
|
24
|
-
<div class="cms-block-image-text-row__column">
|
|
25
|
-
<CmsGenericElement :content="centerImageContent" />
|
|
26
|
-
<CmsGenericElement :content="centerTextContent" />
|
|
27
|
-
</div>
|
|
28
|
-
<div class="cms-block-image-text-row__column">
|
|
29
|
-
<CmsGenericElement :content="rightImageContent" />
|
|
30
|
-
<CmsGenericElement :content="rightTextContent" />
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</template>
|
|
34
|
-
|
|
35
|
-
<style scoped>
|
|
36
|
-
.cms-block-image-text-row .cms-element-image {
|
|
37
|
-
@apply object-cover;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.cms-block-image-text-row .cms-block-image-text-row__column div:first-child {
|
|
41
|
-
@apply mb-5;
|
|
42
|
-
}
|
|
43
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockImageThreeCover } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockImageThreeCover;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const leftContent = getSlotContent("left");
|
|
12
|
-
const rightContent = getSlotContent("right");
|
|
13
|
-
const centerContent = getSlotContent("center");
|
|
14
|
-
</script>
|
|
15
|
-
<template>
|
|
16
|
-
<div class="cms-block-image-three-cover grid md:grid-cols-3 gap-10">
|
|
17
|
-
<CmsGenericElement :content="leftContent" />
|
|
18
|
-
<CmsGenericElement :content="centerContent" />
|
|
19
|
-
<CmsGenericElement :content="rightContent" />
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
22
|
-
|
|
23
|
-
<style scoped>
|
|
24
|
-
.cms-block-image-three-cover .cms-element-image {
|
|
25
|
-
@apply aspect-square object-cover;
|
|
26
|
-
}
|
|
27
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockImageTwoColumn } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockImageTwoColumn;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const leftContent = getSlotContent("left");
|
|
12
|
-
const rightContent = getSlotContent("right");
|
|
13
|
-
</script>
|
|
14
|
-
<template>
|
|
15
|
-
<div class="cms-block-image-two-column grid md:grid-cols-2 gap-10">
|
|
16
|
-
<CmsGenericElement :content="leftContent" />
|
|
17
|
-
<CmsGenericElement :content="rightContent" />
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<style scoped>
|
|
22
|
-
.cms-block-image-two-column .cms-element-image {
|
|
23
|
-
@apply object-cover;
|
|
24
|
-
}
|
|
25
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsBlockTextOnImage } from "@shopware/composables";
|
|
3
|
-
import { useCmsBlock } from "#imports";
|
|
4
|
-
|
|
5
|
-
const props = defineProps<{
|
|
6
|
-
content: CmsBlockTextOnImage;
|
|
7
|
-
}>();
|
|
8
|
-
|
|
9
|
-
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
-
|
|
11
|
-
const slotContent = getSlotContent("content");
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<CmsGenericElement
|
|
16
|
-
v-if="slotContent"
|
|
17
|
-
:content="slotContent"
|
|
18
|
-
class="cms-block-text-on-image min-h-md"
|
|
19
|
-
/>
|
|
20
|
-
</template>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Render a HTML section
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import type { CmsElementBuyBox } from "@shopware/composables";
|
|
3
|
-
import { useCmsTranslations } from "@shopware/composables";
|
|
4
|
-
import { defu } from "defu";
|
|
5
|
-
import { computed } from "vue";
|
|
6
|
-
import {
|
|
7
|
-
useCmsElementConfig,
|
|
8
|
-
usePrice,
|
|
9
|
-
useProduct,
|
|
10
|
-
useProductPrice,
|
|
11
|
-
useSessionContext,
|
|
12
|
-
} from "#imports";
|
|
13
|
-
|
|
14
|
-
const props = defineProps<{
|
|
15
|
-
content: CmsElementBuyBox;
|
|
16
|
-
}>();
|
|
17
|
-
|
|
18
|
-
type Translations = {
|
|
19
|
-
product: {
|
|
20
|
-
previously: string;
|
|
21
|
-
amount: string;
|
|
22
|
-
price: {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
};
|
|
25
|
-
to: string;
|
|
26
|
-
from: string;
|
|
27
|
-
content: string;
|
|
28
|
-
pricesIncl: string;
|
|
29
|
-
pricesExcl: string;
|
|
30
|
-
deliveryTime: string;
|
|
31
|
-
days: string;
|
|
32
|
-
noAvailable: string;
|
|
33
|
-
productNumber: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
let translations: Translations = {
|
|
38
|
-
product: {
|
|
39
|
-
previously: "Previously",
|
|
40
|
-
amount: "Amount",
|
|
41
|
-
price: {
|
|
42
|
-
label: "Price",
|
|
43
|
-
to: "To",
|
|
44
|
-
from: "From",
|
|
45
|
-
},
|
|
46
|
-
to: "To",
|
|
47
|
-
from: "From",
|
|
48
|
-
content: "Content",
|
|
49
|
-
pricesIncl: "Prices incl. VAT plus shipping costs",
|
|
50
|
-
pricesExcl: "Prices excl. VAT plus shipping costs",
|
|
51
|
-
deliveryTime: "Available, delivery time",
|
|
52
|
-
days: "days",
|
|
53
|
-
noAvailable: "No longer available",
|
|
54
|
-
productNumber: "Product number",
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
translations = defu(useCmsTranslations(), translations) as Translations;
|
|
59
|
-
|
|
60
|
-
const { getConfigValue } = useCmsElementConfig(props.content);
|
|
61
|
-
const alignment = computed(() => getConfigValue("alignment"));
|
|
62
|
-
|
|
63
|
-
const { taxState, currency } = useSessionContext();
|
|
64
|
-
|
|
65
|
-
const { product, changeVariant } = useProduct(
|
|
66
|
-
props.content.data.product,
|
|
67
|
-
props.content.data.configuratorSettings || [],
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
const { unitPrice, price, tierPrices, isListPrice } = useProductPrice(product);
|
|
71
|
-
const regulationPrice = computed(() => price.value?.regulationPrice?.price);
|
|
72
|
-
const { getFormattedPrice } = usePrice();
|
|
73
|
-
|
|
74
|
-
const referencePrice = computed(
|
|
75
|
-
() => product.value?.calculatedPrice?.referencePrice,
|
|
76
|
-
);
|
|
77
|
-
const productNumber = computed(() => product.value?.productNumber);
|
|
78
|
-
const purchaseUnit = computed(() => product.value?.purchaseUnit);
|
|
79
|
-
const unitName = computed(() => product.value?.unit?.name);
|
|
80
|
-
const availableStock = computed(() => product.value?.availableStock ?? 0);
|
|
81
|
-
const minPurchase = computed(() => product.value?.minPurchase ?? 0);
|
|
82
|
-
const deliveryTime = computed(() => product.value?.deliveryTime);
|
|
83
|
-
const restockTime = computed(() => product.value?.restockTime);
|
|
84
|
-
</script>
|
|
85
|
-
<template>
|
|
86
|
-
<div
|
|
87
|
-
v-if="product"
|
|
88
|
-
:class="{
|
|
89
|
-
'h-full flex flex-col': true,
|
|
90
|
-
'justify-start': alignment === 'flex-start',
|
|
91
|
-
'justify-end': alignment === 'flex-end',
|
|
92
|
-
'justify-center': alignment === 'center',
|
|
93
|
-
}"
|
|
94
|
-
>
|
|
95
|
-
<div>
|
|
96
|
-
<div v-if="tierPrices.length <= 1">
|
|
97
|
-
<SwSharedPrice
|
|
98
|
-
v-if="isListPrice"
|
|
99
|
-
class="text-1xl text-secondary-900 basis-2/6 justify-start line-through"
|
|
100
|
-
:value="price?.listPrice?.price"
|
|
101
|
-
/>
|
|
102
|
-
<SwSharedPrice
|
|
103
|
-
v-if="unitPrice"
|
|
104
|
-
class="text-3xl text-secondary-900 basis-2/6 justify-start"
|
|
105
|
-
:class="{
|
|
106
|
-
'text-red': isListPrice,
|
|
107
|
-
}"
|
|
108
|
-
:value="unitPrice"
|
|
109
|
-
/>
|
|
110
|
-
<div v-if="regulationPrice" class="text-xs flex text-secondary-500">
|
|
111
|
-
{{ translations.product.previously }}
|
|
112
|
-
<SwSharedPrice class="ml-1" :value="regulationPrice" />
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
<div v-else>
|
|
116
|
-
<table class="border-collapse table-auto w-full text-sm mb-8">
|
|
117
|
-
<thead>
|
|
118
|
-
<tr>
|
|
119
|
-
<th
|
|
120
|
-
class="border-b dark:border-secondary-600 font-medium p-4 pl-8 pt-0 pb-3 text-secondary-600 dark:text-secondary-200 text-left"
|
|
121
|
-
>
|
|
122
|
-
{{ translations.product.amount }}
|
|
123
|
-
</th>
|
|
124
|
-
|
|
125
|
-
<th
|
|
126
|
-
class="border-b dark:border-secondary-600 font-medium p-4 pr-8 pt-0 pb-3 text-secondary-600 dark:text-secondary-200 text-left"
|
|
127
|
-
>
|
|
128
|
-
{{ translations.product.price.label }}
|
|
129
|
-
</th>
|
|
130
|
-
</tr>
|
|
131
|
-
</thead>
|
|
132
|
-
<tbody class="bg-white dark:bg-secondary-800">
|
|
133
|
-
<tr v-for="(tierPrice, index) in tierPrices" :key="tierPrice.label">
|
|
134
|
-
<td
|
|
135
|
-
class="border-b border-secondary-100 dark:border-secondary-700 p-4 pl-8 font-medium text-secondary-500 dark:text-secondary-400"
|
|
136
|
-
>
|
|
137
|
-
<span v-if="index < tierPrices.length - 1">{{
|
|
138
|
-
translations.product.to
|
|
139
|
-
}}</span
|
|
140
|
-
><span v-else>{{ translations.product.from }}</span>
|
|
141
|
-
{{ tierPrice.quantity }}
|
|
142
|
-
</td>
|
|
143
|
-
<td
|
|
144
|
-
class="border-b border-secondary-100 dark:border-secondary-700 p-4 pr-8 font-medium text-current-500 dark:text-secondary-400"
|
|
145
|
-
>
|
|
146
|
-
{{ getFormattedPrice(tierPrice.unitPrice) }}
|
|
147
|
-
</td>
|
|
148
|
-
</tr>
|
|
149
|
-
</tbody>
|
|
150
|
-
</table>
|
|
151
|
-
</div>
|
|
152
|
-
<div v-if="purchaseUnit && unitName" class="mt-1">
|
|
153
|
-
<span class="font-light"> {{ translations.product.content }}: </span>
|
|
154
|
-
<span class="font-light"> {{ purchaseUnit }} {{ unitName }} </span>
|
|
155
|
-
<span v-if="referencePrice" class="font-light">
|
|
156
|
-
{{ currency?.symbol }} {{ referencePrice?.price }} / /
|
|
157
|
-
{{ referencePrice?.referenceUnit }} {{ referencePrice?.unitName }}
|
|
158
|
-
</span>
|
|
159
|
-
</div>
|
|
160
|
-
<span class="text-indigo-600">
|
|
161
|
-
<template v-if="taxState === 'gross'">
|
|
162
|
-
{{ translations.product.pricesIncl }}
|
|
163
|
-
</template>
|
|
164
|
-
<template v-else> {{ translations.product.pricesExcl }} </template>
|
|
165
|
-
</span>
|
|
166
|
-
</div>
|
|
167
|
-
<div class="mt-4">
|
|
168
|
-
<span v-if="availableStock >= minPurchase && deliveryTime"
|
|
169
|
-
>{{ translations.product.deliveryTime }} {{ deliveryTime?.name }}
|
|
170
|
-
</span>
|
|
171
|
-
<span
|
|
172
|
-
v-else-if="availableStock < minPurchase && deliveryTime && restockTime"
|
|
173
|
-
>
|
|
174
|
-
{{ translations.product.deliveryTime }} {{ restockTime }}
|
|
175
|
-
{{ translations.product.days }} {{ deliveryTime?.name }}</span
|
|
176
|
-
>
|
|
177
|
-
<span v-else>{{ translations.product.noAvailable }}</span>
|
|
178
|
-
</div>
|
|
179
|
-
<SwVariantConfigurator @change="changeVariant" />
|
|
180
|
-
<SwProductAddToCart :product="product" />
|
|
181
|
-
<div class="mt-3 product-detail-ordernumber-container">
|
|
182
|
-
<span class="font-bold text-secondary-900">
|
|
183
|
-
{{ translations.product.productNumber }}:
|
|
184
|
-
</span>
|
|
185
|
-
<span>
|
|
186
|
-
{{ productNumber }}
|
|
187
|
-
</span>
|
|
188
|
-
</div>
|
|
189
|
-
</div>
|
|
190
|
-
</template>
|