@shopbite-de/storefront 1.2.3 → 1.2.5

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.
@@ -17,6 +17,9 @@
17
17
  --color-brand-900: #7a2800;
18
18
  --color-brand-950: #471500;
19
19
  --color-neutral-950: #171717;
20
+
21
+ /* This is important because apple devices will zoom in when the font size is below 16px */
22
+ --text-sm: 16px;
20
23
  }
21
24
 
22
25
  :root {
@@ -24,7 +24,7 @@ const props = withDefaults(defineProps<Props>(), {
24
24
  duration: "duration-1000",
25
25
  delay: "delay-0",
26
26
  threshold: 0.1,
27
- rootMargin: "0px 0px -100px 0px",
27
+ rootMargin: "0px 0px 100px 0px",
28
28
  });
29
29
 
30
30
  const { isVisible, elementRef } = useScrollAnimation({
@@ -27,17 +27,12 @@ defineProps<{
27
27
  <div v-else class="absolute inset-0 bg-primary" />
28
28
 
29
29
  <div class="relative p-4">
30
- <h2
31
- class="text-pretty font-semibold text-3xl md:text-4xl text-white drop-shadow"
32
- >
30
+ <h1 class="text-white font-semibold">
33
31
  {{ category.name }}
34
- </h2>
35
- <h3
36
- v-if="category.description"
37
- class="text-white/90 text-[15px] text-pretty mt-1"
38
- >
32
+ </h1>
33
+ <p v-if="category.description">
39
34
  {{ category.description }}
40
- </h3>
35
+ </p>
41
36
  </div>
42
37
  </div>
43
38
  <UPageCard
@@ -51,3 +46,15 @@ defineProps<{
51
46
  }"
52
47
  />
53
48
  </template>
49
+
50
+ <style scoped>
51
+ @import "tailwindcss";
52
+
53
+ h1 {
54
+ @apply text-white text-4xl md:text-5xl lg:text-6xl font-extrabold leading-none tracking-tighter mb-3;
55
+ }
56
+
57
+ p {
58
+ @apply text-white/90 text-[16px] text-pretty mt-1;
59
+ }
60
+ </style>
@@ -7,7 +7,7 @@ const props = defineProps<{
7
7
 
8
8
  const { id: categoryId } = toRefs(props);
9
9
 
10
- const query = {
10
+ const searchCriteria = {
11
11
  includes: {
12
12
  product: [
13
13
  "id",
@@ -16,21 +16,13 @@ const query = {
16
16
  "description",
17
17
  "calculatedPrice",
18
18
  "translated",
19
- "categories",
20
19
  "properties",
21
20
  "propertyIds",
22
- "options",
23
- "optionIds",
24
- "configuratorSettings",
25
- "children",
26
- "parentId",
27
21
  "sortedProperties",
28
22
  "cover",
29
- "parentId",
30
23
  ],
31
24
  property: ["id", "name", "translated", "options"],
32
25
  property_group_option: ["id", "name", "translated", "group"],
33
- product_configurator_setting: ["id", "optionId", "option", "productId"],
34
26
  product_option: ["id", "groupId", "name", "translated", "group"],
35
27
  },
36
28
  associations: {
@@ -39,40 +31,11 @@ const query = {
39
31
  media: {},
40
32
  },
41
33
  },
42
- categories: {},
43
34
  properties: {
44
35
  associations: {
45
36
  group: {},
46
37
  },
47
38
  },
48
- options: {
49
- associations: {
50
- group: {},
51
- },
52
- },
53
- configuratorSettings: {
54
- associations: {
55
- option: {
56
- associations: {
57
- group: {},
58
- },
59
- },
60
- },
61
- },
62
- children: {
63
- associations: {
64
- properties: {
65
- associations: {
66
- group: {},
67
- },
68
- },
69
- options: {
70
- associations: {
71
- group: {},
72
- },
73
- },
74
- },
75
- },
76
39
  },
77
40
  } as operations["searchPage post /search"]["body"];
78
41
 
@@ -90,7 +53,7 @@ const {
90
53
  } = useListing({
91
54
  listingType: "categoryListing",
92
55
  categoryId: props.id,
93
- defaultSearchCriteria: query,
56
+ defaultSearchCriteria: searchCriteria,
94
57
  });
95
58
 
96
59
  const { search: categorySearch } = useCategorySearch();
@@ -135,20 +98,27 @@ const selectedListingFilters = computed<ShortcutFilterParam[]>(() => {
135
98
  });
136
99
 
137
100
  await useAsyncData(`listing${categoryId.value}`, async () => {
138
- await search(query);
101
+ await search(searchCriteria);
139
102
  });
140
103
 
141
- watch(selectedListingFilters, () => {
142
- setCurrentFilters(selectedListingFilters.value);
104
+ watch(selectedListingFilters, (newFilters, oldFilters) => {
105
+ if (newFilters[0]?.value === oldFilters?.[0]?.value) {
106
+ return;
107
+ }
108
+ setCurrentFilters(newFilters);
109
+ currentSorting.value = "Sortieren";
143
110
  });
144
111
 
145
- watch(currentSorting, () => {
146
- changeCurrentSortingOrder(currentSorting.value as string);
112
+ watch(currentSorting, async () => {
113
+ const sortingQuery = {
114
+ query: getCurrentFilters.value?.search,
115
+ properties: getCurrentFilters.value?.properties?.join("|"),
116
+ };
117
+ await changeCurrentSortingOrder(currentSorting.value as string, sortingQuery);
147
118
  });
148
119
 
149
120
  async function handleFilterRest() {
150
121
  await resetFilters();
151
- selectedPropertyFilters.value = [];
152
122
  }
153
123
 
154
124
  const moreThanOneFilterAndOption = computed<boolean>(
@@ -254,7 +224,7 @@ const moreThanOneFilterAndOption = computed<boolean>(
254
224
  <template #right>
255
225
  <UPageAside>
256
226
  <div v-if="moreThanOneFilterAndOption" class="flex flex-col gap-4">
257
- <h3>Filter</h3>
227
+ <h2 class="text-3xl md:text-4xl mt-8 mb-3 pb-2">Filter</h2>
258
228
  <div
259
229
  v-for="filter in propertyFilters"
260
230
  :key="filter.id"
@@ -18,6 +18,7 @@ defineProps<{
18
18
  <UPageSection
19
19
  id="features"
20
20
  :description="description"
21
+ :title="title"
21
22
  :features="features"
22
23
  :headline="headline"
23
24
  class="relative overflow-hidden"
@@ -127,6 +127,17 @@ const cartQuickViewOpen = ref(false);
127
127
  icon="i-lucide-shopping-cart"
128
128
  />
129
129
  </UChip>
130
+
131
+ <template #header>
132
+ <h2 class="text-3xl md:text-4xl mt-8 mb-3 pb-2">
133
+ <UIcon
134
+ name="i-lucide-shopping-cart"
135
+ class="size-8"
136
+ color="primary"
137
+ />
138
+ Warenkorb
139
+ </h2>
140
+ </template>
130
141
  <template #body>
131
142
  <CartQuickView
132
143
  :with-to-cart-button="true"
@@ -32,7 +32,7 @@ const navItems = computed<NavigationMenuItem[]>(() => {
32
32
 
33
33
  <template>
34
34
  <div>
35
- <h2>Navigation</h2>
35
+ <h2 class="text-3xl md:text-4xl mt-8 mb-3 pb-2">Speisekarte</h2>
36
36
  <UNavigationMenu
37
37
  variant="link"
38
38
  orientation="vertical"
@@ -87,7 +87,7 @@ const mainIngredients = computed<Schemas["PropertyGroupOption"][]>(() => {
87
87
  >
88
88
 
89
89
  <p class="text-base text-pretty font-semibold text-highlighted">
90
- {{ product.translated.name }}
90
+ {{ product.translated.name ?? product.name }}
91
91
  </p>
92
92
  </div>
93
93
  </template>
@@ -123,7 +123,10 @@ const mainIngredients = computed<Schemas["PropertyGroupOption"][]>(() => {
123
123
  </div>
124
124
  <UCollapsible v-model:open="openDetails" class="flex flex-col gap-2">
125
125
  <template #content>
126
- <ProductDetail2 :product="product" @product-added="toggleDetails" />
126
+ <ProductDetail2
127
+ :product-id="product.id"
128
+ @product-added="toggleDetails"
129
+ />
127
130
  </template>
128
131
  </UCollapsible>
129
132
  </template>
@@ -1,14 +1,81 @@
1
1
  <script setup lang="ts">
2
- import type { Schemas } from "#shopware";
2
+ import type { operations, Schemas } from "#shopware";
3
3
  import type { AssociationItemProduct } from "~/types/Association";
4
4
 
5
5
  const props = defineProps<{
6
- product: Schemas["Product"];
6
+ productId: string;
7
7
  }>();
8
8
 
9
9
  const { apiClient } = useShopwareContext();
10
10
 
11
- const productId = toRef(props.product.id);
11
+ const productId = toRef(props.productId);
12
+
13
+ const searchCriteria = {
14
+ includes: {
15
+ product: [
16
+ "id",
17
+ "productNumber",
18
+ "name",
19
+ "description",
20
+ "calculatedPrice",
21
+ "translated",
22
+ "properties",
23
+ "propertyIds",
24
+ "options",
25
+ "optionIds",
26
+ "configuratorSettings",
27
+ "children",
28
+ "parentId",
29
+ "sortedProperties",
30
+ "cover",
31
+ ],
32
+ property: ["id", "name", "translated", "options"],
33
+ property_group_option: ["id", "name", "translated", "group"],
34
+ product_configurator_setting: ["id", "optionId", "option", "productId"],
35
+ product_option: ["id", "groupId", "name", "translated", "group"],
36
+ },
37
+ associations: {
38
+ cover: {
39
+ associations: {
40
+ media: {},
41
+ },
42
+ },
43
+ properties: {
44
+ associations: {
45
+ group: {},
46
+ },
47
+ },
48
+ options: {
49
+ associations: {
50
+ group: {},
51
+ },
52
+ },
53
+ configuratorSettings: {
54
+ associations: {
55
+ option: {
56
+ associations: {
57
+ group: {},
58
+ },
59
+ },
60
+ },
61
+ },
62
+ children: {
63
+ associations: {
64
+ properties: {
65
+ associations: {
66
+ group: {},
67
+ },
68
+ },
69
+ options: {
70
+ associations: {
71
+ group: {},
72
+ },
73
+ },
74
+ },
75
+ },
76
+ },
77
+ } as operations["searchPage post /search"]["body"];
78
+
12
79
  const { data: productDetails, pending } = useAsyncData(
13
80
  () => `product-${productId.value ?? "none"}`,
14
81
  async () => {
@@ -17,6 +84,7 @@ const { data: productDetails, pending } = useAsyncData(
17
84
  "readProductDetail post /product/{productId}",
18
85
  {
19
86
  pathParams: { productId: productId.value },
87
+ body: searchCriteria,
20
88
  },
21
89
  );
22
90
  return response.data;
@@ -65,7 +133,7 @@ const emit = defineEmits(["product-added"]);
65
133
  <div v-if="productDetails?.configurator">
66
134
  <ProductConfigurator2
67
135
  v-if="productDetails?.configurator"
68
- :p="product"
136
+ :p="productDetails.product"
69
137
  :c="productDetails.configurator"
70
138
  @variant-switched="onVariantSwitched"
71
139
  />
package/content/index.yml CHANGED
@@ -55,7 +55,7 @@ marquee:
55
55
  title: Das lieben unsere Kunden
56
56
  description: Kundenbilder
57
57
  headline: SHOPBITE
58
-
58
+ items:
59
59
  gallery:
60
60
  title: Restaurant
61
61
  description: Genießen Sie leckeres Essen in einem rustikalen und gemütlichen Ambiente.
@@ -66,7 +66,21 @@ gallery:
66
66
  color: primary
67
67
  variant: subtle
68
68
  trailingIcon: i-lucide-phone
69
-
69
+ images:
70
+ - image: https://shopware.shopbite.de/media/71/2a/1a/1762465670/restaurant1.webp
71
+ alt: La Fattoria Restaurant Innenbereich 1
72
+ - image: https://shopware.shopbite.de/media/61/ea/77/1762465670/restaurant2.webp
73
+ alt: La Fattoria Restaurant Innenbereich 2
74
+ - image: https://shopware.shopbite.de/media/6d/ac/ca/1762465670/restaurant3.webp
75
+ alt: La Fattoria Restaurant Innenbereich 3
76
+ - image: https://shopware.shopbite.de/media/af/d6/da/1762465670/restaurant4.webp
77
+ alt: La Fattoria Restaurant Innenbereich 4
78
+ - image: https://shopware.shopbite.de/media/6a/ff/e2/1762465670/restaurant5.webp
79
+ alt: La Fattoria Restaurant Innenbereich 5
80
+ - image: https://shopware.shopbite.de/media/80/76/d0/1762465670/restaurant6.webp
81
+ alt: La Fattoria Restaurant Innenbereich 6
82
+ - image: https://nbg1.your-objectstorage.com/lafattoria-public/media/30/f7/76/1763383122/restaurant10.webp
83
+ alt: La Fattoria Restaurant Innenbereich 10
70
84
  cta:
71
85
  title: Jetzt bestellen!
72
86
  description: Genieße die italienische Küche, frisch zubereitet und direkt zu dir geliefert oder vor Ort genießen.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopbite-de/storefront",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "main": "nuxt.config.ts",
5
5
  "description": "Shopware storefront for food delivery shops",
6
6
  "keywords": [