@viur/shop-components 0.0.1-dev.6 → 0.0.1-dev.61
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/.editorconfig +16 -0
- package/.github/workflows/npm-publish.yml +42 -0
- package/.gitmodules +3 -0
- package/LICENSE +21 -0
- package/README.md +13 -2
- package/old/client/HttpClient.js +111 -0
- package/old/client/ViURShopClient.js +472 -0
- package/old/client/index.js +23 -0
- package/old/client/types.js +10 -0
- package/old/components/ExampleUsage.vue +95 -0
- package/old/components/ShopCart.vue +91 -0
- package/old/components/ShopOrderComplete.vue +73 -0
- package/old/components/ShopOrderConfirm.vue +311 -0
- package/old/components/ShopOrderStepper.vue +352 -0
- package/old/components/ShopPaymentProvider.vue +113 -0
- package/old/components/ShopShippingMethod.vue +52 -0
- package/old/components/ShopSummary.vue +138 -0
- package/old/components/ShopUserData.vue +218 -0
- package/old/components/cart/CartLeaf.vue +277 -0
- package/old/components/cart/CartLeafModel.vue +312 -0
- package/old/components/cart/CartNode.vue +26 -0
- package/old/components/cart/CartTree.vue +67 -0
- package/old/components/cart/CartTreeWrapper.vue +73 -0
- package/old/components/cart/CartView.vue +82 -0
- package/old/components/cart/Discount.vue +91 -0
- package/old/components/generic/loadinghandler.vue +76 -0
- package/old/components/paymentProvider/paypalplus.vue +0 -0
- package/old/components/paymentProvider/prepayment.vue +0 -0
- package/old/components/paymentProvider/unzerPayment.vue +140 -0
- package/old/components/simple/ShopUserData.vue +161 -0
- package/old/components/simple/SimpleDefaultLayout.vue +116 -0
- package/old/components/ui/generic/CardSelector.vue +52 -0
- package/old/components/ui/generic/CartList.vue +69 -0
- package/old/components/ui/generic/ShippingInfo.vue +56 -0
- package/old/components/ui/generic/ShopPriceFormatter.vue +41 -0
- package/old/components/ui/generic/alerts/ShopAlert.vue +30 -0
- package/old/components/ui/payment/PaymentOption.vue +79 -0
- package/old/components/ui/payment/PaymentSelector.vue +158 -0
- package/old/components/ui/stepper/StepperItem.vue +90 -0
- package/old/components/ui/stepper/StepperTab.vue +161 -0
- package/old/components/ui/stepper/StepperTrigger.vue +69 -0
- package/old/components/ui/userdata/AddForm.vue +160 -0
- package/old/components/ui/userdata/AddressBox.vue +137 -0
- package/old/components/ui/userdata/BaseLayout.vue +77 -0
- package/old/components/ui/userdata/CustomBooleanBone.vue +58 -0
- package/old/components/ui/userdata/CustomSelectBone.vue +91 -0
- package/old/components/ui/userdata/CustomStringBone.vue +71 -0
- package/old/components/ui/userdata/DefaultLayout.vue +126 -0
- package/old/components/ui/userdata/SelectAddress.vue +21 -0
- package/old/components/ui/userdata/multi/ActionBar.vue +38 -0
- package/old/components/ui/userdata/multi/CartSelection.vue +42 -0
- package/old/ignite/.editorconfig +20 -0
- package/old/ignite/.github/workflows/ignite.yml +64 -0
- package/old/ignite/.github/workflows/node.yml +30 -0
- package/old/ignite/.postcssrc.cjs +25 -0
- package/old/ignite/CHANGELOG.md +244 -0
- package/old/ignite/LICENSE +21 -0
- package/old/ignite/README.md +92 -0
- package/old/ignite/dist/ignite.css +2019 -0
- package/old/ignite/dist/ignite.min.css +4 -0
- package/old/ignite/foundation/basic.css +371 -0
- package/old/ignite/foundation/color.css +323 -0
- package/old/ignite/foundation/config.css +188 -0
- package/old/ignite/foundation/grid.css +78 -0
- package/old/ignite/foundation/mediaqueries.css +71 -0
- package/old/ignite/foundation/reset.css +261 -0
- package/old/ignite/ignite.css +29 -0
- package/old/ignite/ignite.css.map +1 -0
- package/old/ignite/package-lock.json +5530 -0
- package/old/ignite/package.json +58 -0
- package/old/ignite/shoelace.css +19 -0
- package/old/ignite/themes/dark.css +12 -0
- package/old/ignite/themes/light.css +11 -0
- package/old/ignite/utilities/shoelace.css +537 -0
- package/old/ignite/utilities/utilities.css +24 -0
- package/old/stores/address.js +122 -0
- package/old/stores/cart.js +266 -0
- package/old/stores/message.js +21 -0
- package/old/stores/order.js +202 -0
- package/old/stores/payment.js +79 -0
- package/old/stores/shipping.js +78 -0
- package/package.json +23 -23
- package/src/Shop.vue +212 -0
- package/src/ShopOrderStepper.vue +89 -0
- package/src/ShopSummary.vue +170 -0
- package/src/Steps/ShopCart.vue +60 -0
- package/src/Steps/ShopOrderComplete.vue +24 -0
- package/src/Steps/ShopOrderConfirm.vue +295 -0
- package/src/Steps/ShopPaymentProvider.vue +53 -0
- package/src/Steps/ShopShippingMethod.vue +53 -0
- package/src/Steps/ShopUserDataGuest.vue +78 -0
- package/src/Steps/index.js +15 -0
- package/src/components/AddressForm.vue +84 -0
- package/src/components/AddressFormLayout.vue +107 -0
- package/src/components/CardSelector.vue +68 -0
- package/src/components/CartItem.vue +325 -0
- package/src/components/CartItemSmall.vue +257 -0
- package/src/components/LoadingHandler.vue +76 -0
- package/src/components/PaymentOption.vue +78 -0
- package/src/components/PaymentProviderUnzer.vue +201 -0
- package/src/components/PaymentSelector.vue +55 -0
- package/src/components/ShopAlert.vue +30 -0
- package/src/components/StepperTab.vue +132 -0
- package/src/components/dialogButton.vue +49 -0
- package/src/composables/address.js +95 -0
- package/src/composables/cart.js +132 -0
- package/src/composables/order.js +80 -0
- package/src/composables/payment.js +75 -0
- package/src/composables/shipping.js +32 -0
- package/src/main.js +44 -0
- package/src/shop.js +251 -0
- package/src/translations/de.js +15 -0
- package/src/translations/en.js +5 -0
- package/src/utils.js +49 -0
- package/vite.config.js +51 -0
- package/src/components/cart/CartView.vue +0 -692
- package/src/components/cart/ConfirmView.vue +0 -314
- package/src/components/order/category/CategoryList.vue +0 -83
- package/src/components/order/category/CategoryView.vue +0 -143
- package/src/components/order/information/UserInfoMulti.vue +0 -427
- package/src/components/order/information/UserInformation.vue +0 -332
- package/src/components/order/information/adress/ShippingAdress.vue +0 -143
- package/src/components/order/item/ItemCard.vue +0 -168
- package/src/components/order/item/ItemView.vue +0 -233
- package/src/components/order/process/ExampleUsage.vue +0 -100
- package/src/components/order/process/OrderComplete.vue +0 -41
- package/src/components/order/process/OrderTabHeader.vue +0 -7
- package/src/components/order/process/OrderView.vue +0 -210
- package/src/router/index.js +0 -103
- package/src/stores/cart.js +0 -111
- package/src/views/ViewMissing.vue +0 -20
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wrap">
|
|
3
|
-
<div class="viur-shop-item-view-image-wrap">
|
|
4
|
-
<sl-carousel class="viur-shop-item-view-carousel-thumbnails" navigation loop>
|
|
5
|
-
<sl-carousel-item>
|
|
6
|
-
<img
|
|
7
|
-
:alt="state.item.shop_name"
|
|
8
|
-
:src="getImage(state.item)"
|
|
9
|
-
/>
|
|
10
|
-
</sl-carousel-item>
|
|
11
|
-
</sl-carousel>
|
|
12
|
-
|
|
13
|
-
<div class="viur-shop-item-view-thumbnails">
|
|
14
|
-
<div class="viur-shop-item-view-thumbnails-scroller">
|
|
15
|
-
<img :alt="state.item.shop_name"
|
|
16
|
-
class="viur-shop-item-view-thumbnails-image active"
|
|
17
|
-
:src="getImage(state.item)" />
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="viur-shop-item-view-info-wrap">
|
|
23
|
-
<h1 class="viur-shop-item-view-headline">{{ state.item.shop_name }}</h1>
|
|
24
|
-
<h2 class="viur-shop-item-view-subline">B 21 x H 6,5 x T 19 cm</h2>
|
|
25
|
-
|
|
26
|
-
<div class="viur-shop-item-view-price">
|
|
27
|
-
{{ state.item.shop_price_retail }} €
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<div class="viur-shop-item-view-paragraph">
|
|
31
|
-
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
|
32
|
-
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
|
|
33
|
-
sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
|
|
34
|
-
Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
|
|
35
|
-
amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
|
|
36
|
-
eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|
|
37
|
-
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd
|
|
38
|
-
gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="viur-shop-item-view-btn-wrap">
|
|
42
|
-
<sl-button
|
|
43
|
-
size="small"
|
|
44
|
-
class="viur-shop-item-view-add-to-cart-btn"
|
|
45
|
-
variant="primary"
|
|
46
|
-
title="Add to cart"
|
|
47
|
-
@click.stop="cartStore.addToCart(item.key, cartStore.state.currentCart)"
|
|
48
|
-
>
|
|
49
|
-
<sl-icon name="bag-plus"
|
|
50
|
-
slot="prefix"
|
|
51
|
-
></sl-icon>
|
|
52
|
-
|
|
53
|
-
In den Warenkorb
|
|
54
|
-
</sl-button>
|
|
55
|
-
|
|
56
|
-
<sl-button
|
|
57
|
-
size="small"
|
|
58
|
-
outline
|
|
59
|
-
class="viur-shop-item-view-add-to-favourites-btn"
|
|
60
|
-
variant="primary"
|
|
61
|
-
title="Add to favourites"
|
|
62
|
-
>
|
|
63
|
-
<sl-icon name="heart"
|
|
64
|
-
slot="prefix"
|
|
65
|
-
></sl-icon>
|
|
66
|
-
Auf die Wunschliste
|
|
67
|
-
</sl-button>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
|
|
71
|
-
</div>
|
|
72
|
-
<br>
|
|
73
|
-
<h1 class="viur-shop-item-view-headline">Ähnliche Artikel</h1>
|
|
74
|
-
<div class="viur-shop-item-view-item-grid">
|
|
75
|
-
<ItemCard :item="state.item">
|
|
76
|
-
</ItemCard>
|
|
77
|
-
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<script setup>
|
|
83
|
-
import { computed, onBeforeMount, reactive } from "vue";
|
|
84
|
-
import { Request } from "@viur/vue-utils";
|
|
85
|
-
import { useRoute } from "vue-router";
|
|
86
|
-
// component imports
|
|
87
|
-
import ItemCard from "../item/ItemCard.vue";
|
|
88
|
-
import '@viur/shoelace/dist/components/carousel/carousel.js';
|
|
89
|
-
|
|
90
|
-
const route = useRoute();
|
|
91
|
-
|
|
92
|
-
const state = reactive({
|
|
93
|
-
item: {},
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
function getImage(item) {
|
|
97
|
-
console.log("hier", item.dk_artikel);
|
|
98
|
-
let imageUrl =
|
|
99
|
-
"https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
|
|
100
|
-
if (item?.dk_artikel.dest.image) {
|
|
101
|
-
return Request.downloadUrlFor(item.dk_artikel.dest.image);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
return imageUrl;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
onBeforeMount(async () => {
|
|
108
|
-
Request.get(`/json/variante/view/${route.params.item}`).then(async (resp) => {
|
|
109
|
-
let data = await resp.json();
|
|
110
|
-
|
|
111
|
-
state.item = data.values;
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
</script>
|
|
115
|
-
|
|
116
|
-
<style scoped>
|
|
117
|
-
.wrap{
|
|
118
|
-
display: grid;
|
|
119
|
-
grid-template-columns: 45% minmax(0 ,1fr);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.viur-shop-item-view-info-wrap{
|
|
123
|
-
padding: var(--sl-spacing-x-large);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.viur-shop-item-view-image-wrap{
|
|
127
|
-
display: flex;
|
|
128
|
-
flex-direction: column;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
sl-carousel{
|
|
132
|
-
aspect-ratio: 1;
|
|
133
|
-
background-color: var(--sl-color-neutral-200);
|
|
134
|
-
|
|
135
|
-
&::part(base){
|
|
136
|
-
display: flex;
|
|
137
|
-
gap: 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&::part(scroll-container){
|
|
141
|
-
border-radius: 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
&::part(navigation-button){
|
|
145
|
-
position: absolute;
|
|
146
|
-
background-color: color-mix(in hsl, var(--sl-color-neutral-0) 85%, transparent);
|
|
147
|
-
color: var(--app-primary-color);
|
|
148
|
-
border-radius: 0;
|
|
149
|
-
transition: all ease.3s;
|
|
150
|
-
opacity: 0;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
&::part(navigation-button--previous){
|
|
154
|
-
left: 0;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&::part(navigation-button--next){
|
|
158
|
-
right: 0;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&:hover{
|
|
162
|
-
&::part(navigation-button){
|
|
163
|
-
opacity: 1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.viur-shop-item-view-thumbnails {
|
|
169
|
-
display: flex;
|
|
170
|
-
justify-content: start;
|
|
171
|
-
margin-top: vaR(--sl-spacing-medium)
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.viur-shop-item-view-thumbnails-scroller {
|
|
175
|
-
display: flex;
|
|
176
|
-
gap: var(--sl-spacing-small);
|
|
177
|
-
overflow-x: auto;
|
|
178
|
-
scrollbar-width: none;
|
|
179
|
-
scroll-behavior: smooth;
|
|
180
|
-
scroll-padding: var(--sl-spacing-small);
|
|
181
|
-
|
|
182
|
-
&::-webkit-scrollbar {
|
|
183
|
-
display: none;
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.viur-shop-item-view-thumbnails-image {
|
|
188
|
-
width: 64px;
|
|
189
|
-
height: 64px;
|
|
190
|
-
object-fit: cover;
|
|
191
|
-
opacity: 0.3;
|
|
192
|
-
will-change: opacity;
|
|
193
|
-
transition: 250ms opacity;
|
|
194
|
-
cursor: pointer;
|
|
195
|
-
|
|
196
|
-
&.active {
|
|
197
|
-
opacity: 1;
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
.viur-shop-item-view-headline{
|
|
203
|
-
margin-bottom: var(--sl-spacing-small);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.viur-shop-item-view-subline{
|
|
207
|
-
margin-bottom: var(--sl-spacing-small);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.viur-shop-item-view-price{
|
|
211
|
-
font-size: 1.4em;
|
|
212
|
-
margin-bottom: var(--sl-spacing-small);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.viur-shop-item-view-paragraph{
|
|
216
|
-
margin-bottom: var(--sl-spacing-x-large);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
.viur-shop-item-view-btn-wrap{
|
|
220
|
-
display: flex;
|
|
221
|
-
flex-direction: column;
|
|
222
|
-
|
|
223
|
-
sl-button{
|
|
224
|
-
margin-bottom: var(--sl-spacing-x-small);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.viur-shop-item-view-item-grid{
|
|
229
|
-
display: grid;
|
|
230
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
231
|
-
grid-gap: var(--sl-spacing-medium);
|
|
232
|
-
}
|
|
233
|
-
</style>
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<order-view :tabs="state.tabs" @tabChange="handleTabs" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script setup>
|
|
6
|
-
import { onBeforeMount, reactive, shallowRef } from "vue";
|
|
7
|
-
import { ListRequest } from "@viur/vue-utils";
|
|
8
|
-
|
|
9
|
-
import CartView from "../../cart/CartView.vue";
|
|
10
|
-
import ConfirmView from "../../cart/ConfirmView.vue";
|
|
11
|
-
import OrderView from "./OrderView.vue";
|
|
12
|
-
import CategoryView from "../category/CategoryView.vue";
|
|
13
|
-
import OrderComplete from "./OrderComplete.vue";
|
|
14
|
-
import UserInformation from "../information/UserInformation.vue";
|
|
15
|
-
import UserInfoMulti from "../information/UserInfoMulti.vue";
|
|
16
|
-
import { useCartStore } from "../../../stores/cart";
|
|
17
|
-
|
|
18
|
-
const cartStore = useCartStore();
|
|
19
|
-
|
|
20
|
-
const state = reactive({
|
|
21
|
-
tabs: {
|
|
22
|
-
cart: {
|
|
23
|
-
component: shallowRef(CartView),
|
|
24
|
-
props: { sidebar: true, mode: "basket" },
|
|
25
|
-
displayName: "Warenkorb",
|
|
26
|
-
icon: { name: "cart", library: "hsk" },
|
|
27
|
-
position: 2,
|
|
28
|
-
disabled: false,
|
|
29
|
-
atShow: null,
|
|
30
|
-
atHide: null,
|
|
31
|
-
},
|
|
32
|
-
// confirm: {
|
|
33
|
-
// component: shallowRef(ConfirmView),
|
|
34
|
-
// props: {},
|
|
35
|
-
// displayName: "Bestellung prüfen",
|
|
36
|
-
// icon: { name: "order-check", library: "hsk" },
|
|
37
|
-
// position: 5,
|
|
38
|
-
// disabled: false,
|
|
39
|
-
// atShow: null,
|
|
40
|
-
// atHide: null,
|
|
41
|
-
// },
|
|
42
|
-
// order: {
|
|
43
|
-
// component: shallowRef(CategoryView),
|
|
44
|
-
// props: {
|
|
45
|
-
// listHandler: ListRequest("categorystore", {
|
|
46
|
-
// module: "variante",
|
|
47
|
-
// params: { type: "dk", limit: 99 },
|
|
48
|
-
// }),
|
|
49
|
-
// },
|
|
50
|
-
// displayName: "Artikel Bestellen",
|
|
51
|
-
// icon: { name: "cart-add", library: "hsk" },
|
|
52
|
-
// position: 1,
|
|
53
|
-
// disabled: false,
|
|
54
|
-
// atShow: null,
|
|
55
|
-
// atHide: null,
|
|
56
|
-
// },
|
|
57
|
-
// orderComplete: {
|
|
58
|
-
// component: shallowRef(OrderComplete),
|
|
59
|
-
// props: {},
|
|
60
|
-
// displayName: "Bestellung Abgeschlossen",
|
|
61
|
-
// icon: { name: "order-confirmed", library: "hsk" },
|
|
62
|
-
// position: 6,
|
|
63
|
-
// disabled: true,
|
|
64
|
-
// atShow: null,
|
|
65
|
-
// atHide: null,
|
|
66
|
-
// },
|
|
67
|
-
userInfo: {
|
|
68
|
-
component: shallowRef(UserInformation),
|
|
69
|
-
props: {},
|
|
70
|
-
displayName: "Daten Eingeben",
|
|
71
|
-
icon: { name: "user", library: "hsk" },
|
|
72
|
-
position: 3,
|
|
73
|
-
disabled: false,
|
|
74
|
-
atShow: null,
|
|
75
|
-
atHide: null,
|
|
76
|
-
},
|
|
77
|
-
// userInfoMulti: {
|
|
78
|
-
// component: shallowRef(UserInfoMulti),
|
|
79
|
-
// props: {},
|
|
80
|
-
// displayName: "Daten Eingeben (Multi)",
|
|
81
|
-
// icon: { name: "user", library: "hsk" },
|
|
82
|
-
// position: 4,
|
|
83
|
-
// disabled: false,
|
|
84
|
-
// atShow: null,
|
|
85
|
-
// atHide: null,
|
|
86
|
-
// },
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
function handleTabs(e) {
|
|
91
|
-
// console.dir("hier", e.target)
|
|
92
|
-
if (e?.detail.name === "confirm") {
|
|
93
|
-
state.tabs.orderComplete.disabled = false;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
onBeforeMount(async () => {
|
|
98
|
-
await cartStore.getAdressStructure();
|
|
99
|
-
});
|
|
100
|
-
</script>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bind">
|
|
3
|
-
<h1 class="headline">Vielen Dank für Ihre Bestellung</h1>
|
|
4
|
-
<br>
|
|
5
|
-
<p class="paragraph">
|
|
6
|
-
<strong>Ihre Bestellnummer:</strong> 123345670
|
|
7
|
-
</p>
|
|
8
|
-
<p class="paragraph">
|
|
9
|
-
Wir haben Ihre Bestellung erhalten und werden diese schenllstmöglich bearbeiten.<br>
|
|
10
|
-
Sie erhalten in wenigen Minuten eine Bestätigung per E-Mail.
|
|
11
|
-
|
|
12
|
-
<div class="btn-wrap">
|
|
13
|
-
<sl-button size="medium">
|
|
14
|
-
Zur Startseite
|
|
15
|
-
</sl-button>
|
|
16
|
-
|
|
17
|
-
<sl-button variant="primary"
|
|
18
|
-
size="medium">
|
|
19
|
-
Weiter Einkaufen
|
|
20
|
-
</sl-button>
|
|
21
|
-
</div>
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script setup></script>
|
|
28
|
-
|
|
29
|
-
<style scoped>
|
|
30
|
-
|
|
31
|
-
.btn-wrap{
|
|
32
|
-
display: flex;
|
|
33
|
-
flex-direction: row;
|
|
34
|
-
flex-wrap: nowrap;
|
|
35
|
-
justify-content: space-between;
|
|
36
|
-
width: 100%;
|
|
37
|
-
|
|
38
|
-
margin-top: var(--sl-spacing-x-large);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
</style>
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="bind viur-shop-wrap">
|
|
3
|
-
<sl-tab-group
|
|
4
|
-
class="viur-shop-order-tab"
|
|
5
|
-
noScrollControls
|
|
6
|
-
@sl-tab-show="onTabChange"
|
|
7
|
-
ref="tabGroup"
|
|
8
|
-
>
|
|
9
|
-
<sl-tab
|
|
10
|
-
slot="nav"
|
|
11
|
-
:panel="tab"
|
|
12
|
-
v-for="(tab, index) in state.tabNames"
|
|
13
|
-
:key="tab"
|
|
14
|
-
:disabled="tabs[tab].disabled"
|
|
15
|
-
>
|
|
16
|
-
<div class="viur-shop-order-step">
|
|
17
|
-
<sl-icon
|
|
18
|
-
:name="tabs[tab].icon.name"
|
|
19
|
-
:library="tabs[tab].icon.library"
|
|
20
|
-
>
|
|
21
|
-
</sl-icon>
|
|
22
|
-
<div class="viur-shop-order-status-text">
|
|
23
|
-
{{ index + 1 }}. {{ tabs[tab].displayName }}
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<sl-icon
|
|
27
|
-
name="chevron-right"
|
|
28
|
-
class="viur-shop-order-tab-check"
|
|
29
|
-
v-if="index < state.tabNames.length - 1"
|
|
30
|
-
></sl-icon>
|
|
31
|
-
</sl-tab>
|
|
32
|
-
|
|
33
|
-
<sl-tab-panel
|
|
34
|
-
:name="tab"
|
|
35
|
-
v-for="(tab, index) in state.tabNames"
|
|
36
|
-
:key="tab"
|
|
37
|
-
>
|
|
38
|
-
<component
|
|
39
|
-
:is="tabs[tab].component"
|
|
40
|
-
v-bind="tabs[tab].props ? tabs[tab].props : ''"
|
|
41
|
-
>
|
|
42
|
-
</component>
|
|
43
|
-
<div
|
|
44
|
-
class="viur-shop-form-footer"
|
|
45
|
-
:class="{ 'flex-end': state.isFirstTab(index) }"
|
|
46
|
-
v-if="index !== state.tabNames.length - 1"
|
|
47
|
-
>
|
|
48
|
-
<sl-button type="submit" v-show="index !== 0" @click="prevTab(state.tabNames[index-1])">
|
|
49
|
-
Zurück
|
|
50
|
-
</sl-button>
|
|
51
|
-
<!-- :disabled="!state.requiredFieldsFilled" -->
|
|
52
|
-
<sl-button type="submit" variant="primary" @click="nextTab(state.tabNames[index+1])">
|
|
53
|
-
Weiter
|
|
54
|
-
</sl-button>
|
|
55
|
-
</div>
|
|
56
|
-
</sl-tab-panel>
|
|
57
|
-
</sl-tab-group>
|
|
58
|
-
|
|
59
|
-
<div class="viur-shop-sidebar" id="order_sidebar"></div>
|
|
60
|
-
</div>
|
|
61
|
-
</template>
|
|
62
|
-
|
|
63
|
-
<script setup>
|
|
64
|
-
import { reactive, computed, ref } from "vue";
|
|
65
|
-
|
|
66
|
-
const props = defineProps({
|
|
67
|
-
tabs: {
|
|
68
|
-
type: Object,
|
|
69
|
-
required: true,
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
const emit = defineEmits(["tabChange"]);
|
|
74
|
-
|
|
75
|
-
const state = reactive({
|
|
76
|
-
tabNames: computed(() => sortTabs(props.tabs)),
|
|
77
|
-
isFirstTab: (index) => {
|
|
78
|
-
if (index === 0) {
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
return false;
|
|
82
|
-
},
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
const tabGroup = ref(null);
|
|
86
|
-
|
|
87
|
-
function sortTabs(tabs) {
|
|
88
|
-
let sortedArray = [];
|
|
89
|
-
let outputArray = [];
|
|
90
|
-
|
|
91
|
-
for (const tab in tabs) {
|
|
92
|
-
if (tabs[tab].position) {
|
|
93
|
-
sortedArray.push([tab, tabs[tab].position]);
|
|
94
|
-
} else {
|
|
95
|
-
sortedArray.push([tab, 0]);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
sortedArray.sort((a, b) => {
|
|
100
|
-
return a[1] - b[1];
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
sortedArray.forEach((tab) => {
|
|
104
|
-
outputArray.push(tab[0]);
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
return outputArray;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function onTabChange(e) {
|
|
111
|
-
emit("tabChange", e);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
function prevTab(tabName) {
|
|
116
|
-
tabGroup.value.show(tabName);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function nextTab(tabName) {
|
|
120
|
-
tabGroup.value.show(tabName);
|
|
121
|
-
}
|
|
122
|
-
</script>
|
|
123
|
-
|
|
124
|
-
<style scoped>
|
|
125
|
-
.viur-shop-wrap {
|
|
126
|
-
flex-direction: row;
|
|
127
|
-
gap: var(--sl-spacing-x-large);
|
|
128
|
-
align-items: flex-start;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.viur-shop-sidebar {
|
|
132
|
-
display: flex;
|
|
133
|
-
flex-direction: column;
|
|
134
|
-
background-color: var(--sl-color-neutral-100);
|
|
135
|
-
min-width: 300px;
|
|
136
|
-
padding: var(--sl-spacing-medium);
|
|
137
|
-
position: sticky;
|
|
138
|
-
top: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.viur-shop-order-tab {
|
|
142
|
-
sl-tab {
|
|
143
|
-
width: 25%;
|
|
144
|
-
|
|
145
|
-
&::part(base) {
|
|
146
|
-
width: 100%;
|
|
147
|
-
height: 100%;
|
|
148
|
-
display: flex;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
align-items: center;
|
|
151
|
-
position: relative;
|
|
152
|
-
color: var(--sl-color-neutral-400);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&[aria-selected="true"]::part(base) {
|
|
156
|
-
color: var(--ignt-color-primary) !important;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.viur-shop-order-step {
|
|
162
|
-
width: 100%;
|
|
163
|
-
height: 100%;
|
|
164
|
-
display: flex;
|
|
165
|
-
flex-direction: column;
|
|
166
|
-
justify-content: flex-start;
|
|
167
|
-
align-items: center;
|
|
168
|
-
|
|
169
|
-
@media (--ignt-mq-max-break-small) {
|
|
170
|
-
justify-content: center;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
sl-icon {
|
|
174
|
-
font-size: 2.5em;
|
|
175
|
-
margin-bottom: 10px;
|
|
176
|
-
|
|
177
|
-
@media (--ignt-mq-max-break-small) {
|
|
178
|
-
display: none;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.viur-shop-order-tab-check {
|
|
184
|
-
position: absolute;
|
|
185
|
-
right: -0.5em;
|
|
186
|
-
|
|
187
|
-
@media (--ignt-mq-max-break-small) {
|
|
188
|
-
font-size: 0.7em;
|
|
189
|
-
right: -0.35em;
|
|
190
|
-
top: calc(50% - 0.35em);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.viur-shop-order-status-text {
|
|
195
|
-
font-size: 0.8em;
|
|
196
|
-
color: inherit;
|
|
197
|
-
text-align: center;
|
|
198
|
-
margin-top: 0.6em;
|
|
199
|
-
white-space: initial;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.viur-shop-form-footer {
|
|
203
|
-
display: flex;
|
|
204
|
-
justify-content: space-between;
|
|
205
|
-
margin-top: var(--sl-spacing-large);
|
|
206
|
-
}
|
|
207
|
-
.flex-end {
|
|
208
|
-
justify-content: flex-end;
|
|
209
|
-
}
|
|
210
|
-
</style>
|
package/src/router/index.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { createRouter, createWebHashHistory } from "vue-router";
|
|
3
|
-
import ViewMissing from "../views/ViewMissing.vue";
|
|
4
|
-
|
|
5
|
-
const default_routes = [
|
|
6
|
-
{
|
|
7
|
-
path: "/:pathMatch(.*)*",
|
|
8
|
-
name: "view_missing",
|
|
9
|
-
component: ViewMissing,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
path: "/shop/category/:identifier",
|
|
13
|
-
name: "CategoryView",
|
|
14
|
-
component: () => import("../components/order/category/CategoryView.vue"),
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
path: "/shop/item/:item",
|
|
18
|
-
name: "itemView",
|
|
19
|
-
component: () => import("../components/order/item/ItemView.vue"),
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
path: "/shop/cart/view",
|
|
23
|
-
name: "CartView",
|
|
24
|
-
component: () => import("../components/cart/CartView.vue"),
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
path: "/shop/order/",
|
|
28
|
-
name: "OrderView",
|
|
29
|
-
component: () => import("../components/order/process/ExampleUsage.vue"),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
path: "/shop/order/confirm",
|
|
33
|
-
name: "ConfirmView",
|
|
34
|
-
component: () => import("../components/cart/ConfirmView.vue"),
|
|
35
|
-
},
|
|
36
|
-
];4
|
|
37
|
-
|
|
38
|
-
function createRouterInstance(routes, replace = false) {
|
|
39
|
-
let newRoutes = [];
|
|
40
|
-
if (replace) {
|
|
41
|
-
newRoutes = routes;
|
|
42
|
-
} else {
|
|
43
|
-
newRoutes = routes.concat(default_routes);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const router = createRouter({
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
history: createWebHashHistory(import.meta.env.BASE_URL),
|
|
49
|
-
routes: newRoutes,
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
// router.afterEach((to, from) => {
|
|
53
|
-
// //useUserStore().addAction();
|
|
54
|
-
// });
|
|
55
|
-
|
|
56
|
-
// router.beforeEach((to, from, next) => {
|
|
57
|
-
// const contextStore = useContextStore();
|
|
58
|
-
// let localContext = {};
|
|
59
|
-
// let handlerId = to.query["_"]?.toString();
|
|
60
|
-
// if (!handlerId) next();
|
|
61
|
-
// if (Object.keys(contextStore.state.localContext).includes(handlerId)) {
|
|
62
|
-
// localContext = contextStore.state.localContext[handlerId];
|
|
63
|
-
// }
|
|
64
|
-
// let newQuery = {
|
|
65
|
-
// ...contextStore.state.globalContext,
|
|
66
|
-
// ...localContext,
|
|
67
|
-
// ...to.query,
|
|
68
|
-
// };
|
|
69
|
-
// if (
|
|
70
|
-
// Object.keys(to.query).every(
|
|
71
|
-
// (key) =>
|
|
72
|
-
// to.query[key] === newQuery[key] &&
|
|
73
|
-
// to.query.hasOwnProperty(key) &&
|
|
74
|
-
// newQuery.hasOwnProperty(key),
|
|
75
|
-
// ) &&
|
|
76
|
-
// Object.keys(newQuery).every(
|
|
77
|
-
// (key) =>
|
|
78
|
-
// to.query[key] === newQuery[key] &&
|
|
79
|
-
// to.query.hasOwnProperty(key) &&
|
|
80
|
-
// newQuery.hasOwnProperty(key),
|
|
81
|
-
// )
|
|
82
|
-
// ) {
|
|
83
|
-
// //disabled because of to much context copy and updates
|
|
84
|
-
// // Writes query to context
|
|
85
|
-
// /*
|
|
86
|
-
// for (const [k, v] of Object.entries(to.query)) {
|
|
87
|
-
// if (k.startsWith("_")) continue
|
|
88
|
-
// if (Object.keys(contextStore.state.localContext).includes(handlerId)) {
|
|
89
|
-
// contextStore.state.localContext[handlerId][k] = v
|
|
90
|
-
// } else {
|
|
91
|
-
// contextStore.state.localContext[handlerId] = { [k]: v }
|
|
92
|
-
// }
|
|
93
|
-
// }*/
|
|
94
|
-
// next(); // no change
|
|
95
|
-
// } else {
|
|
96
|
-
// to.query = newQuery;
|
|
97
|
-
// next(to);
|
|
98
|
-
// }
|
|
99
|
-
// });
|
|
100
|
-
return router;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export default createRouterInstance;
|