@viur/shop-components 0.14.3 → 0.14.4
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.
|
@@ -8,6 +8,10 @@ on:
|
|
|
8
8
|
tags:
|
|
9
9
|
- v*
|
|
10
10
|
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
11
15
|
jobs:
|
|
12
16
|
publish-npm:
|
|
13
17
|
runs-on: ubuntu-latest
|
|
@@ -18,11 +22,28 @@ jobs:
|
|
|
18
22
|
with:
|
|
19
23
|
node-version: 22
|
|
20
24
|
registry-url: https://registry.npmjs.org/
|
|
25
|
+
|
|
26
|
+
- name: Ensure npm supports trusted publishing
|
|
27
|
+
run: npm install -g npm@latest
|
|
21
28
|
- run: npm ci
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
|
|
30
|
+
- name: Determine npm tag
|
|
31
|
+
id: npm_tag
|
|
32
|
+
run: |
|
|
33
|
+
TAG_NAME="${GITHUB_REF_NAME}"
|
|
34
|
+
echo "Detected tag: $TAG_NAME"
|
|
35
|
+
|
|
36
|
+
if [[ "$TAG_NAME" =~ -alpha[0-9]*$ ]]; then
|
|
37
|
+
echo "tag=alpha" >> $GITHUB_OUTPUT
|
|
38
|
+
elif [[ "$TAG_NAME" =~ -beta[0-9]*$ ]]; then
|
|
39
|
+
echo "tag=beta" >> $GITHUB_OUTPUT
|
|
40
|
+
elif [[ "$TAG_NAME" =~ -rc[0-9]*$ ]]; then
|
|
41
|
+
echo "tag=rc" >> $GITHUB_OUTPUT
|
|
42
|
+
else
|
|
43
|
+
echo "tag=latest" >> $GITHUB_OUTPUT
|
|
44
|
+
fi
|
|
45
|
+
- name: Publish to npm (Trusted Publishing)
|
|
46
|
+
run: npm publish --access public --tag ${{ steps.npm_tag.outputs.tag }}
|
|
26
47
|
|
|
27
48
|
|
|
28
49
|
gh-release:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viur/shop-components",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
4
4
|
"description": "Frontend Vue components for the shop module of ViUR",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@viur/ignite": "^5.1.2",
|
|
27
27
|
"@viur/shoelace": "^1.0.10-v2.20.0",
|
|
28
|
-
"@viur/vue-utils": "^3.1
|
|
28
|
+
"@viur/vue-utils": "^3.3.1",
|
|
29
29
|
"@vueuse/core": "^13.1.0",
|
|
30
30
|
"pinia": "^2.3.1",
|
|
31
31
|
"vue": "^3.5.13",
|
package/src/Shop.vue
CHANGED
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
|
|
28
28
|
<div class="viur-shop-sidebar-wrap" :class="{ bottom: (summary==='bottom') }" v-if="shopStore.state.currentTab!=='complete'">
|
|
29
|
-
<
|
|
29
|
+
<slot name="summary">
|
|
30
|
+
<shop-summary ></shop-summary>
|
|
31
|
+
</slot>
|
|
30
32
|
</div>
|
|
31
33
|
</div>
|
|
32
34
|
<template v-if="shopStore.state.debug">
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script setup>
|
|
19
|
-
import {computed, reactive, watch} from 'vue'
|
|
19
|
+
import {computed, onMounted, reactive, watch} from 'vue'
|
|
20
20
|
import LoadingHandler from './LoadingHandler.vue';
|
|
21
21
|
import ViForm from "@viur/vue-utils/forms/ViForm.vue";
|
|
22
22
|
import {useViurShopStore} from "../shop";
|
|
@@ -80,6 +80,15 @@ function formChange(data){
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
onMounted(()=>{
|
|
84
|
+
// Set form language based on locale (use locale if not de-DE, otherwise use store language)
|
|
85
|
+
if (shopStore.state.locale!=="de-DE"){
|
|
86
|
+
state.language = shopStore.state.locale.split("-")[1].toLowerCase() // use country
|
|
87
|
+
}else{
|
|
88
|
+
state.language = shopStore.state.language
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
83
92
|
|
|
84
93
|
watch(()=>addressState.billingIsShipping, (newVal,oldVal)=>{
|
|
85
94
|
if(oldVal && !newVal){
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
<div class="availability"
|
|
75
75
|
:class="`availability--${item.shop_availability}`"
|
|
76
76
|
>
|
|
77
|
-
<span class="availability-description">{{$t(item.shop_availability)}}</span>
|
|
77
|
+
<span class="availability-description">{{$t(item.shop_availability.toString())}}</span>
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
80
|
|
|
@@ -135,7 +135,7 @@ function removeArticle(){
|
|
|
135
135
|
flex-basis: 70%;
|
|
136
136
|
font-size: .9em;
|
|
137
137
|
align-items: center;
|
|
138
|
-
justify-content:
|
|
138
|
+
justify-content: center;
|
|
139
139
|
white-space: nowrap;
|
|
140
140
|
&:before {
|
|
141
141
|
content: '';
|
|
@@ -156,14 +156,17 @@ function removeArticle(){
|
|
|
156
156
|
text-overflow: ellipsis;
|
|
157
157
|
}
|
|
158
158
|
.availability--onrequest,
|
|
159
|
-
.availability--instock
|
|
159
|
+
.availability--instock,
|
|
160
|
+
.availability--true
|
|
161
|
+
{
|
|
160
162
|
color: var(--ignt-color-success);
|
|
161
163
|
&:before {
|
|
162
164
|
background-color: var(--ignt-color-success);
|
|
163
165
|
}
|
|
164
166
|
}
|
|
165
167
|
.availability--discontinued,
|
|
166
|
-
.availability--outofstock
|
|
168
|
+
.availability--outofstock,
|
|
169
|
+
.availability--false {
|
|
167
170
|
color: var(--ignt-color-danger);
|
|
168
171
|
&:before {
|
|
169
172
|
background-color: var(--ignt-color-danger);
|
|
@@ -310,7 +313,7 @@ function removeArticle(){
|
|
|
310
313
|
.viur-shop-cart-leaf-availability {
|
|
311
314
|
grid-column: 4 / span 1;
|
|
312
315
|
align-self: center;
|
|
313
|
-
text-align:
|
|
316
|
+
text-align: center;
|
|
314
317
|
}
|
|
315
318
|
|
|
316
319
|
.viur-shop-cart-leaf-label,
|
package/src/composables/cart.js
CHANGED
|
@@ -88,11 +88,15 @@ export function useCart() {
|
|
|
88
88
|
if(item.discount){
|
|
89
89
|
shopStore.state.discounts[item.discount.dest.key] = item.discount
|
|
90
90
|
}
|
|
91
|
-
await fetchCartItems(item['key'])
|
|
91
|
+
await fetchCartItems(item['key'], parentKey=true)
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
+
if (parentKey){
|
|
95
|
+
shopStore.state.cartList=shopStore.state.cartList.concat(currentLeafs)
|
|
96
|
+
}else{
|
|
97
|
+
shopStore.state.cartList=currentLeafs
|
|
98
|
+
}
|
|
94
99
|
|
|
95
|
-
shopStore.state.cartList=shopStore.state.cartList.concat(currentLeafs)
|
|
96
100
|
return resp
|
|
97
101
|
})
|
|
98
102
|
}
|