@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://npmjs.com/package/@shopware/cms-base-layer)
|
|
4
|
-
[](https://github.com/shopware/frontends/tree/main/packages/cms-base)
|
|
4
|
+
[](https://github.com/shopware/frontends/tree/main/packages/cms-base-layer)
|
|
5
5
|
[](https://github.com/shopware/frontends/issues?q=is%3Aopen+is%3Aissue+label%3Acms-base)
|
|
6
6
|
[](#)
|
|
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.
|
|
132
|
+
### Latest changes: 1.4.1
|
|
133
133
|
|
|
134
|
-
###
|
|
134
|
+
### Patch Changes
|
|
135
135
|
|
|
136
|
-
- [#
|
|
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
|
-
-
|
|
138
|
+
- SwNewsletterForm
|
|
139
|
+
- SwContactForm
|
|
139
140
|
|
|
140
|
-
|
|
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 [[`
|
|
143
|
-
- @shopware/
|
|
144
|
-
- @shopware/
|
|
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 }}
|
|
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="
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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": "
|
|
38
|
-
"entities": "
|
|
37
|
+
"@vueuse/core": "12.5.0",
|
|
38
|
+
"entities": "6.0.0",
|
|
39
39
|
"html-to-ast": "0.0.6",
|
|
40
|
-
"three": "0.
|
|
40
|
+
"three": "0.173.0",
|
|
41
41
|
"vue": "3.5.13",
|
|
42
42
|
"xss": "1.0.15",
|
|
43
|
-
"@shopware/composables": "1.8.
|
|
44
|
-
"@shopware/
|
|
45
|
-
"@shopware/
|
|
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.
|
|
50
|
-
"@types/three": "0.
|
|
51
|
-
"@vitest/coverage-v8": "
|
|
52
|
-
"nuxt": "3.
|
|
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": "
|
|
55
|
+
"vitest": "3.0.5",
|
|
56
56
|
"vue-router": "4.5.0",
|
|
57
|
-
"vue-tsc": "2.
|
|
57
|
+
"vue-tsc": "2.2.0",
|
|
58
58
|
"tsconfig": "0.0.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|