@viur/shop-components 0.1.9 → 0.1.10
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/package.json
CHANGED
package/src/Shop.vue
CHANGED
|
@@ -88,13 +88,15 @@ const props = defineProps({
|
|
|
88
88
|
default:'shop'
|
|
89
89
|
},
|
|
90
90
|
debug:false,
|
|
91
|
-
showCartNodes:false
|
|
91
|
+
showCartNodes:false,
|
|
92
|
+
topActions:false
|
|
92
93
|
})
|
|
93
94
|
|
|
94
95
|
|
|
95
96
|
onBeforeMount(()=>{
|
|
96
97
|
shopStore.state.showNodes = props.showCartNodes
|
|
97
98
|
shopStore.state.debug = props.debug
|
|
99
|
+
shopStore.state.topActions = props.topActions
|
|
98
100
|
if(props.tabs){
|
|
99
101
|
shopStore.state.tabs = props.tabs
|
|
100
102
|
}
|
package/src/ShopOrderStepper.vue
CHANGED
|
@@ -13,8 +13,27 @@
|
|
|
13
13
|
<sl-tab-panel :name="name">
|
|
14
14
|
<template v-if="tab?.['loaded']">
|
|
15
15
|
|
|
16
|
-
|
|
17
16
|
<component :is="tab['component']" :params="tab['params']">
|
|
17
|
+
<template #top_actions="slotProps">
|
|
18
|
+
<sl-bar class="viur-shop-stepper-bar">
|
|
19
|
+
<div v-if="slotProps.left" slot="left" :id="slotProps.left"></div>
|
|
20
|
+
<div slot="right">
|
|
21
|
+
<span v-if="slotProps.hint" class="hint">{{ slotProps.hint }}</span>
|
|
22
|
+
<sl-button
|
|
23
|
+
:class="{'action-button-hint':slotProps.hint}"
|
|
24
|
+
variant="success"
|
|
25
|
+
size="large"
|
|
26
|
+
:disabled="active(slotProps)"
|
|
27
|
+
@click="nextStep(slotProps)"
|
|
28
|
+
:loading="tab['validating']"
|
|
29
|
+
>
|
|
30
|
+
{{slotProps.nextName}}
|
|
31
|
+
<sl-icon slot="suffix" name="chevron-right"></sl-icon>
|
|
32
|
+
</sl-button>
|
|
33
|
+
</div>
|
|
34
|
+
</sl-bar>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
18
37
|
<template #['template_'+name]>
|
|
19
38
|
<slot :name="'template_'+name"></slot>
|
|
20
39
|
</template>
|
package/src/Steps/ShopCart.vue
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
+
:nextName="$t('shop.proceed-checkout')"
|
|
4
|
+
:activefunction="()=>state.items.length>0"
|
|
5
|
+
:nextfunction="nextStep"
|
|
6
|
+
>
|
|
7
|
+
</slot>
|
|
8
|
+
|
|
2
9
|
<loading-handler :isLoading="cartState.isLoading" :isUpdating="cartState.isUpdating">
|
|
3
10
|
<div class="viur-shop-item-wrapper" v-if="state.items.length>0">
|
|
4
11
|
<cart-item v-for="item in state.items" :item="item"
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
+
nextName="weiter"
|
|
4
|
+
:activefunction="()=>shopStore.state.order?.['payment_provider']"
|
|
5
|
+
:nextfunction="()=>true"
|
|
6
|
+
>
|
|
7
|
+
</slot>
|
|
8
|
+
|
|
2
9
|
<sl-radio-group :value="state.selection">
|
|
3
10
|
<sl-details-group>
|
|
4
11
|
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
+
nextName="weiter"
|
|
4
|
+
:activefunction="()=>shopStore.state.cartRoot?.['shipping']"
|
|
5
|
+
:nextfunction="()=>nextStep"
|
|
6
|
+
>
|
|
7
|
+
</slot>
|
|
8
|
+
|
|
2
9
|
<loading-handler :isLoading="shippingState.isLoading" :hasError="shippingState.hasError" :errorMessage="shippingState.errorMessage">
|
|
3
10
|
|
|
4
11
|
<card-selector :options="shippingState.shippingData"
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<slot name="top_actions" v-if="shopStore.state.topActions"
|
|
3
|
+
nextName="weiter"
|
|
4
|
+
:activefunction="()=>true"
|
|
5
|
+
:nextfunction="nextStep"
|
|
6
|
+
:hint="$t('messages.order_check_later')"
|
|
7
|
+
>
|
|
8
|
+
</slot>
|
|
9
|
+
|
|
2
10
|
<div class="viur-shop-user-data-headline">
|
|
3
11
|
{{ $t("skeleton.address.address_type.billing") }}
|
|
4
12
|
</div>
|
package/src/shop.js
CHANGED
|
@@ -20,6 +20,7 @@ export const useViurShopStore = defineStore("viurshopStore", () => {
|
|
|
20
20
|
return `${state.hostUrl}/json/${state.moduleName}/api`
|
|
21
21
|
}),
|
|
22
22
|
debug:false,
|
|
23
|
+
topActions:false,
|
|
23
24
|
//default Tabs
|
|
24
25
|
tabs:{
|
|
25
26
|
cart: {
|
|
@@ -243,6 +244,9 @@ export const useViurShopStore = defineStore("viurshopStore", () => {
|
|
|
243
244
|
})
|
|
244
245
|
}
|
|
245
246
|
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
246
250
|
return {
|
|
247
251
|
state,
|
|
248
252
|
navigateToTab,
|
|
@@ -253,6 +257,5 @@ export const useViurShopStore = defineStore("viurshopStore", () => {
|
|
|
253
257
|
checkoutOrder,
|
|
254
258
|
addTab,
|
|
255
259
|
removeTab
|
|
256
|
-
|
|
257
260
|
}
|
|
258
261
|
})
|