@shopware/cms-base-layer 1.4.0 → 1.4.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # shopware/frontends - cms-base
2
2
 
3
3
  [![](https://img.shields.io/npm/v/@shopware/cms-base-layer?color=blue&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCA0ODggNTUzIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNDM5LjA0MSAxMjkuNTkzTDI1OC43NjkgMzEuMzA3NkMyNDQuOTE1IDIzLjc1NDEgMjI4LjExNiAyNC4wMDkzIDIxNC40OTcgMzEuOTgwMkw0Ny4yNjkgMTI5Ljg1OEMzMy40NzYzIDEzNy45MzEgMjUgMTUyLjcxMyAyNSAxNjguNjk1VjM4OC40NjZDMjUgNDA0LjczMiAzMy43Nzg1IDQxOS43MzIgNDcuOTYwMiA0MjcuNjk5TDIxNS4xNzggNTIxLjYzNkMyMjguNDUxIDUyOS4wOTIgMjQ0LjU5MyA1MjkuMzMyIDI1OC4wODIgNTIyLjI3NEw0MzguMzY0IDQyNy45MzRDNDUzLjIwMSA0MjAuMTcgNDYyLjUgNDA0LjgwOSA0NjIuNSAzODguMDYzVjE2OS4xMDJDNDYyLjUgMTUyLjYzMiA0NTMuNTAyIDEzNy40NzcgNDM5LjA0MSAxMjkuNTkzWiIgc3Ryb2tlPSJ1cmwoI3BhaW50MF9saW5lYXJfMTUzXzY5MjY1KSIgc3Ryb2tlLXdpZHRoPSI1MCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8ZGVmcz4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzE1M182OTI2NSIgeDE9Ii0xNi4yOTg5IiB5MT0iMTY1LjM0OSIgeDI9IjI3Ni40MTIiIHkyPSItODkuMzIzNCIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDA4NUZGIi8+CjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iI0MwRTJGNSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8L2RlZnM+Cjwvc3ZnPg==)](https://npmjs.com/package/@shopware/cms-base-layer)
4
- [![](https://img.shields.io/github/package-json/v/shopware/frontends?color=blue&filename=packages%2Fcms-base%2Fpackage.json&label=cms-base%40monorepo&logo=github)](https://github.com/shopware/frontends/tree/main/packages/cms-base)
4
+ [![](https://img.shields.io/github/package-json/v/shopware/frontends?color=blue&filename=packages%2Fcms-base-layer%2Fpackage.json&label=cms-base%40monorepo&logo=github)](https://github.com/shopware/frontends/tree/main/packages/cms-base-layer)
5
5
  [![](https://img.shields.io/github/issues/shopware/frontends/cms-base?label=cms-base%20issues&logo=github)](https://github.com/shopware/frontends/issues?q=is%3Aopen+is%3Aissue+label%3Acms-base)
6
6
  [![](https://img.shields.io/github/license/shopware/frontends?color=blue)](#)
7
7
 
@@ -129,16 +129,21 @@ No additional packages needed to be installed.
129
129
 
130
130
  Full changelog for stable version is available [here](https://github.com/shopware/frontends/blob/main/packages/cms-base-layer/CHANGELOG.md)
131
131
 
132
- ### Latest changes: 1.4.0
132
+ ### Latest changes: 1.4.1
133
133
 
134
- ### Minor Changes
134
+ ### Patch Changes
135
135
 
136
- - [#1602](https://github.com/shopware/frontends/pull/1602) [`bb7d1cb`](https://github.com/shopware/frontends/commit/bb7d1cbc4204ff1d48f77416f94f550bc235e5ed) Thanks [@patzick](https://github.com/patzick)! - Switch from `@shopware-pwa/helpers-next` to `@shopware/helpers` package.
136
+ - [#1685](https://github.com/shopware/frontends/pull/1685) [`7324620`](https://github.com/shopware/frontends/commit/7324620a3f39c1b62f7cc294192a3e8b8b336d09) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Remove `salutationId` as a required field from the forms:
137
137
 
138
- - [#1602](https://github.com/shopware/frontends/pull/1602) [`bb7d1cb`](https://github.com/shopware/frontends/commit/bb7d1cbc4204ff1d48f77416f94f550bc235e5ed) Thanks [@patzick](https://github.com/patzick)! - Switch from `@shopware-pwa/cms-base` to `@shopware/cms-base-layer` package.
138
+ - SwNewsletterForm
139
+ - SwContactForm
139
140
 
140
- ### Patch Changes
141
+ - [#1659](https://github.com/shopware/frontends/pull/1659) [`7c10417`](https://github.com/shopware/frontends/commit/7c10417e9c0bb9fe049a0e36abf115be6c63c945) Thanks [@patzick](https://github.com/patzick)! - SwVariantConfigurator - URL prefix on Variant Change
142
+
143
+ - [#1677](https://github.com/shopware/frontends/pull/1677) [`d663627`](https://github.com/shopware/frontends/commit/d663627aaa00abc797f5c2413c4e978f95bd6f89) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Fix displaying product variants on the product page
144
+
145
+ - [#1692](https://github.com/shopware/frontends/pull/1692) [`2440a55`](https://github.com/shopware/frontends/commit/2440a55066d31edf2942dbab19a7b5043cdff532) Thanks [@mdanilowicz](https://github.com/mdanilowicz)! - Change `h5` HTML tag to `div` for better accessibility structure - for ProductCard component
141
146
 
142
- - Updated dependencies [[`bb7d1cb`](https://github.com/shopware/frontends/commit/bb7d1cbc4204ff1d48f77416f94f550bc235e5ed), [`bb7d1cb`](https://github.com/shopware/frontends/commit/bb7d1cbc4204ff1d48f77416f94f550bc235e5ed)]:
143
- - @shopware/composables@1.8.0
144
- - @shopware/helpers@1.4.0
147
+ - Updated dependencies [[`7324620`](https://github.com/shopware/frontends/commit/7324620a3f39c1b62f7cc294192a3e8b8b336d09)]:
148
+ - @shopware/api-client@1.2.1
149
+ - @shopware/composables@1.8.1
@@ -115,9 +115,6 @@ const rules = computed(() => ({
115
115
  required,
116
116
  minLength: minLength(3),
117
117
  },
118
- salutationId: {
119
- required,
120
- },
121
118
  phone: {
122
119
  required,
123
120
  minLength: minLength(3),
@@ -176,18 +173,12 @@ const invokeSubmit = async () => {
176
173
  <template v-if="!formSent">
177
174
  <div class="grid grid-cols-12 gap-5">
178
175
  <div class="col-span-4">
179
- <label for="salutation">{{ translations.form.salutation }} *</label>
176
+ <label for="salutation">{{ translations.form.salutation }}</label>
180
177
  <select
181
178
  id="salutation"
182
179
  v-model="state.salutationId"
183
180
  name="salutation"
184
- class="appearance-none relative block w-full px-3 py-2 border placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:z-10 sm:text-sm"
185
- :class="[
186
- $v.salutationId.$error
187
- ? 'border-red-600 focus:border-red-600'
188
- : 'border-gray-300 focus:border-indigo-500',
189
- ]"
190
- @blur="$v.salutationId.$touch()"
181
+ class="border-gray-300 focus:border-indigo-500 appearance-none relative block w-full px-3 py-2 border placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:z-10 sm:text-sm"
191
182
  >
192
183
  <option disabled selected value="">
193
184
  {{ translations.form.salutationPlaceholder }}
@@ -200,12 +191,6 @@ const invokeSubmit = async () => {
200
191
  {{ salutation.displayName }}
201
192
  </option>
202
193
  </select>
203
- <span
204
- v-if="$v.salutationId.$error"
205
- class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
206
- >
207
- {{ $v.salutationId.$errors[0].$message }}
208
- </span>
209
194
  </div>
210
195
  <div class="col-span-4">
211
196
  <label for="first-name">{{ translations.form.firstName }} *</label>
@@ -104,9 +104,6 @@ type Rules = {
104
104
  required: ValidationRuleWithoutParams;
105
105
  minLength: number;
106
106
  };
107
- salutationId: {
108
- required: ValidationRuleWithoutParams;
109
- };
110
107
  };
111
108
  const rules = computed(() => {
112
109
  let temp: Partial<Rules> = {
@@ -130,9 +127,6 @@ const rules = computed(() => {
130
127
  required,
131
128
  minLength: 3,
132
129
  },
133
- salutationId: {
134
- required,
135
- },
136
130
  };
137
131
  }
138
132
  return temp;
@@ -231,13 +225,7 @@ const invokeSubmit = async () => {
231
225
  id="salutation"
232
226
  v-model="state.salutationId"
233
227
  name="salutation"
234
- class="appearance-none relative block w-full px-3 py-2 border placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:z-10 sm:text-sm"
235
- :class="[
236
- $v.salutationId?.$error
237
- ? 'border-red-600 focus:border-red-600'
238
- : 'border-gray-300 focus:border-indigo-500',
239
- ]"
240
- @blur="$v.salutationId?.$touch()"
228
+ class=" border-gray-300 focus:border-indigo-500appearance-none relative block w-full px-3 py-2 border placeholder-gray-500 text-gray-900 rounded-md focus:outline-none focus:ring-indigo-500 focus:z-10 sm:text-sm"
241
229
  >
242
230
  <option disabled selected value="">
243
231
  {{ translations.form.salutationPlaceholder }}
@@ -250,12 +238,6 @@ const invokeSubmit = async () => {
250
238
  {{ salutation.displayName }}
251
239
  </option>
252
240
  </select>
253
- <span
254
- v-if="$v.salutationId?.$error"
255
- class="pt-1 text-sm text-red-600 focus:ring-brand-primary border-gray-300"
256
- >
257
- {{ $v.salutationId?.$errors[0].$message }}
258
- </span>
259
241
  </div>
260
242
  <div v-if="state.option === 'subscribe'" class="col-span-4">
261
243
  <label for="first-name">{{ translations.form.firstName }} *</label>
@@ -235,11 +235,11 @@ const srcPath = computed(() => {
235
235
  :to="buildUrlPrefix(getProductRoute(product), getUrlPrefix())"
236
236
  data-testid="product-box-product-name-link"
237
237
  >
238
- <h5
238
+ <div
239
239
  class="text-xl font-semibold tracking-tight text-gray-900 dark:text-white min-h-60px"
240
240
  >
241
241
  {{ getProductName({ product }) }}
242
- </h5>
242
+ </div>
243
243
  </RouterLink>
244
244
 
245
245
  <SwListingProductPrice
@@ -1,13 +1,17 @@
1
1
  <script setup lang="ts">
2
2
  import { useCmsTranslations } from "@shopware/composables";
3
- import { getProductRoute } from "@shopware/helpers";
3
+ import { buildUrlPrefix, getProductRoute } from "@shopware/helpers";
4
4
  import { defu } from "defu";
5
5
  import { computed, ref, unref } from "vue";
6
6
  import type { ComputedRef } from "vue";
7
7
  import { useRouter } from "vue-router";
8
- import { useProductConfigurator } from "#imports";
8
+ import { useProductConfigurator, useUrlResolver } from "#imports";
9
9
  import type { Schemas } from "#shopware";
10
10
 
11
+ const { getUrlPrefix } = useUrlResolver();
12
+
13
+ const prefix = getUrlPrefix();
14
+
11
15
  const props = withDefaults(
12
16
  defineProps<{
13
17
  allowRedirect?: boolean;
@@ -52,11 +56,11 @@ const isOptionSelected = (optionId: string) =>
52
56
 
53
57
  const onHandleChange = async () => {
54
58
  isLoading.value = true;
55
- const variantFound = await findVariantForSelectedOptions(
56
- unref(selectedOptions),
59
+ const variantFound = await findVariantForSelectedOptions();
60
+ const selectedOptionsVariantPath = buildUrlPrefix(
61
+ getProductRoute(variantFound),
62
+ prefix,
57
63
  );
58
-
59
- const selectedOptionsVariantPath = getProductRoute(variantFound);
60
64
  if (props.allowRedirect && selectedOptionsVariantPath) {
61
65
  try {
62
66
  router.push(selectedOptionsVariantPath);
@@ -100,13 +104,13 @@ const onHandleChange = async () => {
100
104
  :class="{
101
105
  'border-3 border-indigo-600': isOptionSelected(option.id),
102
106
  }"
103
- @click="handleChange(optionGroup.name, option.id, onHandleChange)"
107
+ @click="handleChange(optionGroup.translated.name, option.id, onHandleChange)"
104
108
  >
105
109
  <p
106
110
  :id="`${option.id}-choice-label`"
107
111
  data-testid="product-variant-text"
108
112
  >
109
- {{ option.name }}
113
+ {{ option.translated.name }}
110
114
  </p>
111
115
  </label>
112
116
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopware/cms-base-layer",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Vue CMS Nuxt Layer for Shopware",
5
5
  "author": "Shopware",
6
6
  "repository": {
@@ -29,32 +29,32 @@
29
29
  "nuxt.config.ts"
30
30
  ],
31
31
  "dependencies": {
32
- "@nuxt/kit": "3.14.1592",
32
+ "@nuxt/kit": "3.15.4",
33
33
  "@tresjs/cientos": "4.0.2",
34
34
  "@tresjs/core": "4.3.1",
35
35
  "@vuelidate/core": "2.0.3",
36
36
  "@vuelidate/validators": "2.0.4",
37
- "@vueuse/core": "11.2.0",
38
- "entities": "5.0.0",
37
+ "@vueuse/core": "12.5.0",
38
+ "entities": "6.0.0",
39
39
  "html-to-ast": "0.0.6",
40
- "three": "0.166.1",
40
+ "three": "0.173.0",
41
41
  "vue": "3.5.13",
42
42
  "xss": "1.0.15",
43
- "@shopware/composables": "1.8.0",
44
- "@shopware/helpers": "1.4.0",
45
- "@shopware/api-client": "1.2.0"
43
+ "@shopware/composables": "1.8.1",
44
+ "@shopware/api-client": "1.2.1",
45
+ "@shopware/helpers": "1.4.0"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@biomejs/biome": "1.8.3",
49
- "@nuxt/schema": "3.14.1592",
50
- "@types/three": "0.166.0",
51
- "@vitest/coverage-v8": "2.1.8",
52
- "nuxt": "3.14.1592",
49
+ "@nuxt/schema": "3.15.4",
50
+ "@types/three": "0.173.0",
51
+ "@vitest/coverage-v8": "3.0.5",
52
+ "nuxt": "3.15.4",
53
53
  "typescript": "5.6.3",
54
54
  "unbuild": "2.0.0",
55
- "vitest": "2.1.8",
55
+ "vitest": "3.0.5",
56
56
  "vue-router": "4.5.0",
57
- "vue-tsc": "2.1.10",
57
+ "vue-tsc": "2.2.0",
58
58
  "tsconfig": "0.0.0"
59
59
  },
60
60
  "scripts": {