@viur/shop-components 0.0.1-dev.60 → 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.
Files changed (135) hide show
  1. package/old/client/HttpClient.js +111 -0
  2. package/old/client/ViURShopClient.js +472 -0
  3. package/old/client/index.js +23 -0
  4. package/old/client/types.js +10 -0
  5. package/old/components/ExampleUsage.vue +95 -0
  6. package/old/components/ShopCart.vue +91 -0
  7. package/old/components/ShopOrderConfirm.vue +311 -0
  8. package/{src → old}/components/ShopOrderStepper.vue +111 -23
  9. package/old/components/ShopPaymentProvider.vue +113 -0
  10. package/old/components/ShopShippingMethod.vue +52 -0
  11. package/{src/components/ui → old/components}/ShopSummary.vue +28 -35
  12. package/{src → old}/components/ShopUserData.vue +51 -65
  13. package/{src → old}/components/cart/CartLeafModel.vue +24 -16
  14. package/{src → old}/components/cart/CartNode.vue +1 -0
  15. package/{src → old}/components/cart/CartTree.vue +13 -0
  16. package/old/components/cart/CartView.vue +82 -0
  17. package/{src → old}/components/cart/Discount.vue +8 -8
  18. package/old/components/generic/loadinghandler.vue +76 -0
  19. package/old/components/paymentProvider/prepayment.vue +0 -0
  20. package/old/components/paymentProvider/unzerPayment.vue +140 -0
  21. package/old/components/simple/ShopUserData.vue +161 -0
  22. package/old/components/simple/SimpleDefaultLayout.vue +116 -0
  23. package/old/components/ui/generic/CardSelector.vue +52 -0
  24. package/old/components/ui/generic/CartList.vue +69 -0
  25. package/old/components/ui/generic/ShippingInfo.vue +56 -0
  26. package/old/components/ui/generic/alerts/ShopAlert.vue +30 -0
  27. package/old/components/ui/payment/PaymentOption.vue +79 -0
  28. package/old/components/ui/payment/PaymentSelector.vue +158 -0
  29. package/old/components/ui/stepper/StepperItem.vue +90 -0
  30. package/{src → old}/components/ui/stepper/StepperTab.vue +30 -2
  31. package/old/components/ui/stepper/StepperTrigger.vue +69 -0
  32. package/old/components/ui/userdata/AddForm.vue +160 -0
  33. package/old/components/ui/userdata/AddressBox.vue +137 -0
  34. package/{src → old}/components/ui/userdata/BaseLayout.vue +15 -32
  35. package/old/stores/address.js +122 -0
  36. package/old/stores/cart.js +266 -0
  37. package/old/stores/message.js +21 -0
  38. package/old/stores/order.js +202 -0
  39. package/old/stores/payment.js +79 -0
  40. package/old/stores/shipping.js +78 -0
  41. package/package.json +3 -5
  42. package/src/Shop.vue +212 -0
  43. package/src/ShopOrderStepper.vue +89 -0
  44. package/src/ShopSummary.vue +170 -0
  45. package/src/Steps/ShopCart.vue +60 -0
  46. package/src/Steps/ShopOrderComplete.vue +24 -0
  47. package/src/Steps/ShopOrderConfirm.vue +295 -0
  48. package/src/Steps/ShopPaymentProvider.vue +53 -0
  49. package/src/Steps/ShopShippingMethod.vue +53 -0
  50. package/src/Steps/ShopUserDataGuest.vue +78 -0
  51. package/src/Steps/index.js +15 -0
  52. package/src/components/AddressForm.vue +84 -0
  53. package/src/components/AddressFormLayout.vue +107 -0
  54. package/src/components/CardSelector.vue +68 -0
  55. package/src/components/CartItem.vue +325 -0
  56. package/src/components/CartItemSmall.vue +257 -0
  57. package/src/components/LoadingHandler.vue +76 -0
  58. package/src/components/PaymentOption.vue +78 -0
  59. package/src/components/PaymentProviderUnzer.vue +201 -0
  60. package/src/components/PaymentSelector.vue +55 -0
  61. package/src/components/ShopAlert.vue +30 -0
  62. package/src/components/StepperTab.vue +132 -0
  63. package/src/components/dialogButton.vue +49 -0
  64. package/src/composables/address.js +95 -0
  65. package/src/composables/cart.js +132 -0
  66. package/src/composables/order.js +80 -0
  67. package/src/composables/payment.js +75 -0
  68. package/src/composables/shipping.js +32 -0
  69. package/src/main.js +32 -38
  70. package/src/shop.js +251 -0
  71. package/src/translations/de.js +15 -0
  72. package/src/translations/en.js +5 -0
  73. package/src/utils.js +49 -0
  74. package/vite.config.js +0 -2
  75. package/src/components/ShopCart.vue +0 -512
  76. package/src/components/ShopOrderConfirm.vue +0 -291
  77. package/src/components/cart/CartView.vue +0 -723
  78. package/src/components/order/OrderSidebar.vue +0 -102
  79. package/src/components/order/category/CategoryList.vue +0 -83
  80. package/src/components/order/category/CategoryView.vue +0 -143
  81. package/src/components/order/information/adress/ShippingAdress.vue +0 -143
  82. package/src/components/order/item/ItemCard.vue +0 -168
  83. package/src/components/order/item/ItemView.vue +0 -232
  84. package/src/components/order/process/ConfirmView.vue +0 -312
  85. package/src/components/order/process/ExampleUsage.vue +0 -113
  86. package/src/components/order/process/OrderTabHeader.vue +0 -16
  87. package/src/components/order/process/SelectPaymentProvider.vue +0 -62
  88. package/src/components/order/process/Shipping.vue +0 -46
  89. package/src/components/ui/generic/ArticleList.vue +0 -222
  90. package/src/components/ui/generic/ExamplePagination.vue +0 -236
  91. package/src/components/ui/generic/alerts/ShopAlert.vue +0 -19
  92. package/src/components/ui/generic/makeData.js +0 -39
  93. package/src/components/ui/stepper/StepperItem.vue +0 -39
  94. package/src/components/ui/stepper/StepperTrigger.vue +0 -35
  95. package/src/components/ui/userdata/AddForm.vue +0 -125
  96. package/src/components/ui/userdata/AddressBox.vue +0 -117
  97. package/src/router/index.js +0 -103
  98. package/src/stores/cart.js +0 -336
  99. package/src/views/ViewMissing.vue +0 -20
  100. /package/{src → old}/components/ShopOrderComplete.vue +0 -0
  101. /package/{src → old}/components/cart/CartLeaf.vue +0 -0
  102. /package/{src → old}/components/cart/CartTreeWrapper.vue +0 -0
  103. /package/{src/components/lib/utils.js → old/components/paymentProvider/paypalplus.vue} +0 -0
  104. /package/{src → old}/components/ui/generic/ShopPriceFormatter.vue +0 -0
  105. /package/{src → old}/components/ui/userdata/CustomBooleanBone.vue +0 -0
  106. /package/{src → old}/components/ui/userdata/CustomSelectBone.vue +0 -0
  107. /package/{src → old}/components/ui/userdata/CustomStringBone.vue +0 -0
  108. /package/{src → old}/components/ui/userdata/DefaultLayout.vue +0 -0
  109. /package/{src → old}/components/ui/userdata/SelectAddress.vue +0 -0
  110. /package/{src → old}/components/ui/userdata/multi/ActionBar.vue +0 -0
  111. /package/{src → old}/components/ui/userdata/multi/CartSelection.vue +0 -0
  112. /package/{src/style → old}/ignite/.editorconfig +0 -0
  113. /package/{src/style → old}/ignite/.github/workflows/ignite.yml +0 -0
  114. /package/{src/style → old}/ignite/.github/workflows/node.yml +0 -0
  115. /package/{src/style → old}/ignite/.postcssrc.cjs +0 -0
  116. /package/{src/style → old}/ignite/CHANGELOG.md +0 -0
  117. /package/{src/style → old}/ignite/LICENSE +0 -0
  118. /package/{src/style → old}/ignite/README.md +0 -0
  119. /package/{src/style → old}/ignite/dist/ignite.css +0 -0
  120. /package/{src/style → old}/ignite/dist/ignite.min.css +0 -0
  121. /package/{src/style → old}/ignite/foundation/basic.css +0 -0
  122. /package/{src/style → old}/ignite/foundation/color.css +0 -0
  123. /package/{src/style → old}/ignite/foundation/config.css +0 -0
  124. /package/{src/style → old}/ignite/foundation/grid.css +0 -0
  125. /package/{src/style → old}/ignite/foundation/mediaqueries.css +0 -0
  126. /package/{src/style → old}/ignite/foundation/reset.css +0 -0
  127. /package/{src/style → old}/ignite/ignite.css +0 -0
  128. /package/{src/style → old}/ignite/ignite.css.map +0 -0
  129. /package/{src/style → old}/ignite/package-lock.json +0 -0
  130. /package/{src/style → old}/ignite/package.json +0 -0
  131. /package/{src/style → old}/ignite/shoelace.css +0 -0
  132. /package/{src/style → old}/ignite/themes/dark.css +0 -0
  133. /package/{src/style → old}/ignite/themes/light.css +0 -0
  134. /package/{src/style → old}/ignite/utilities/shoelace.css +0 -0
  135. /package/{src/style → old}/ignite/utilities/utilities.css +0 -0
@@ -1,232 +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
- let imageUrl =
98
- "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
99
- if (item?.dk_artikel.dest.image) {
100
- return Request.downloadUrlFor(item.dk_artikel.dest.image);
101
- }
102
-
103
- return imageUrl;
104
- }
105
-
106
- onBeforeMount(async () => {
107
- Request.get(`/json/variante/view/${route.params.item}`).then(async (resp) => {
108
- let data = await resp.json();
109
-
110
- state.item = data.values;
111
- });
112
- });
113
- </script>
114
-
115
- <style scoped>
116
- .wrap{
117
- display: grid;
118
- grid-template-columns: 45% minmax(0 ,1fr);
119
- }
120
-
121
- .viur-shop-item-view-info-wrap{
122
- padding: var(--sl-spacing-x-large);
123
- }
124
-
125
- .viur-shop-item-view-image-wrap{
126
- display: flex;
127
- flex-direction: column;
128
- }
129
-
130
- sl-carousel{
131
- aspect-ratio: 1;
132
- background-color: var(--sl-color-neutral-200);
133
-
134
- &::part(base){
135
- display: flex;
136
- gap: 0;
137
- }
138
-
139
- &::part(scroll-container){
140
- border-radius: 0;
141
- }
142
-
143
- &::part(navigation-button){
144
- position: absolute;
145
- background-color: color-mix(in hsl, var(--sl-color-neutral-0) 85%, transparent);
146
- color: var(--app-primary-color);
147
- border-radius: 0;
148
- transition: all ease.3s;
149
- opacity: 0;
150
- }
151
-
152
- &::part(navigation-button--previous){
153
- left: 0;
154
- }
155
-
156
- &::part(navigation-button--next){
157
- right: 0;
158
- }
159
-
160
- &:hover{
161
- &::part(navigation-button){
162
- opacity: 1;
163
- }
164
- }
165
- }
166
-
167
- .viur-shop-item-view-thumbnails {
168
- display: flex;
169
- justify-content: start;
170
- margin-top: vaR(--sl-spacing-medium)
171
- }
172
-
173
- .viur-shop-item-view-thumbnails-scroller {
174
- display: flex;
175
- gap: var(--sl-spacing-small);
176
- overflow-x: auto;
177
- scrollbar-width: none;
178
- scroll-behavior: smooth;
179
- scroll-padding: var(--sl-spacing-small);
180
-
181
- &::-webkit-scrollbar {
182
- display: none;
183
- }
184
- }
185
-
186
- .viur-shop-item-view-thumbnails-image {
187
- width: 64px;
188
- height: 64px;
189
- object-fit: cover;
190
- opacity: 0.3;
191
- will-change: opacity;
192
- transition: 250ms opacity;
193
- cursor: pointer;
194
-
195
- &.active {
196
- opacity: 1;
197
- }
198
- }
199
-
200
-
201
- .viur-shop-item-view-headline{
202
- margin-bottom: var(--sl-spacing-small);
203
- }
204
-
205
- .viur-shop-item-view-subline{
206
- margin-bottom: var(--sl-spacing-small);
207
- }
208
-
209
- .viur-shop-item-view-price{
210
- font-size: 1.4em;
211
- margin-bottom: var(--sl-spacing-small);
212
- }
213
-
214
- .viur-shop-item-view-paragraph{
215
- margin-bottom: var(--sl-spacing-x-large);
216
- }
217
-
218
- .viur-shop-item-view-btn-wrap{
219
- display: flex;
220
- flex-direction: column;
221
-
222
- sl-button{
223
- margin-bottom: var(--sl-spacing-x-small);
224
- }
225
- }
226
-
227
- .viur-shop-item-view-item-grid{
228
- display: grid;
229
- grid-template-columns: repeat(4, minmax(0, 1fr));
230
- grid-gap: var(--sl-spacing-medium);
231
- }
232
- </style>
@@ -1,312 +0,0 @@
1
- <template>
2
- <Loader v-if="!state.cartIsInit"></Loader>
3
-
4
- <template v-else>
5
-
6
- <div class="list">
7
- <h2 class="viur-shop-cart-headline headline">Bestellung prüfen</h2>
8
- <div class="viur-shop-cart-address-wrap">
9
- <div class="viur-shop-cart-address">
10
- <div class="viur-shop-cart-address-headline">
11
- Versandadresse
12
- <sl-button outline size="small">
13
- <sl-icon name="pencil" slot="prefix"></sl-icon>
14
- </sl-button>
15
- </div>
16
- {{ cartStore.state.shippingAddress.firstname }} {{ cartStore.state.shippingAddress.lastname }}<br/>
17
- {{ cartStore.state.shippingAddress.street_name }} {{ cartStore.state.shippingAddress.street_number }}<br/>
18
- {{ cartStore.state.shippingAddress.zip_code }} {{ cartStore.state.shippingAddress.city }}
19
- {{ cartStore.state.shippingAddress.country }}<br/>
20
-
21
- <br/>
22
- ##TODO MAIL<br/>
23
- ##TODO Phone
24
- </div>
25
- <div class="viur-shop-cart-address">
26
- <div class="viur-shop-cart-address-headline">
27
- Rechnungsadresse
28
- <sl-button outline size="small">
29
- <sl-icon name="pencil" slot="prefix"></sl-icon>
30
- </sl-button>
31
- </div>
32
- {{ cartStore.state.billingAddress.firstname }} {{ cartStore.state.billingAddress.lastname }}<br/>
33
- {{ cartStore.state.billingAddress.street_name }} {{ cartStore.state.billingAddress.street_number }}<br/>
34
- {{ cartStore.state.billingAddress.zip_code }} {{ cartStore.state.billingAddress.city }}
35
- {{ cartStore.state.billingAddress.country }}<br/>
36
- <br/>
37
- ##TODO MAIL<br/>
38
- ##TODO Phone
39
-
40
- </div>
41
-
42
- </div>
43
-
44
- <div class="viur-shop-cart-payment">
45
- <div class="viur-shop-cart-payment-method">
46
- <span>Zahlungsmethode:</span>
47
- {{ state.selectedPaymentProvider }}
48
- </div>
49
- <sl-button outline size="small">
50
- <sl-icon name="pencil" slot="prefix"></sl-icon>
51
- </sl-button>
52
- </div>
53
-
54
- <h2 class="viur-shop-cart-headline headline">Warenkorb</h2>
55
-
56
- <CartView :in-order-confirm="true"></CartView>
57
-
58
- <sl-checkbox @sl-change="onTosAccept">
59
- Ich akzeptiere die geltenden AGBs und Datenschutzbestimmungen
60
- </sl-checkbox>
61
-
62
- <div class="viur-shop-cart-sidebar-btn-wrap" v-if="state.showOrderButton">
63
- <sl-button
64
- :variant="state.showOrderButton ? 'info' : 'disabled'"
65
- size="small"
66
- :disabled="!state.showOrderButton"
67
- @click="addOrder"
68
- >
69
- Zahlungspflichtig bestellen
70
- </sl-button>
71
- </div>
72
- <teleport to="#order_sidebar" v-show="false"><!--TOO-->
73
- <h2 class="viur-shop-cart-sidebar-headline headline">Jetzt Bestellen</h2>
74
- <br/>
75
- <!-- <div class="viur-shop-cart-sidebar-info-line">
76
- <span>Zwischensumme</span>
77
- {{ cartStore.state?.basket ? cartStore.state.carts[cartStore.state.basket].info.total : "00,00" }} €
78
- </div>
79
- <div class="viur-shop-cart-sidebar-info-line">
80
- <span>Rabatt</span>
81
- 0 €
82
- </div>
83
- <div class="viur-shop-cart-sidebar-info-line">
84
- <span>Versandkosten</span>
85
- 0 €
86
- </div>
87
- <div class="viur-shop-cart-sidebar-info-line total">
88
- <span>Gesamt:</span>
89
- {{ cartStore.state?.basket ? cartStore.state.carts[cartStore.state.basket].info.total : "00" }} €
90
- </div> -->
91
-
92
-
93
- </teleport>
94
- </div>
95
- </template>
96
- </template>
97
-
98
- <script setup>
99
- import {reactive, onBeforeMount, computed} from "vue";
100
- import Loader from "@viur/vue-utils/generic/Loader.vue";
101
- import {useCartStore} from "../../../stores/cart.js";
102
- import {Request} from "@viur/vue-utils";
103
- import CartView from "../../cart/CartView.vue";
104
-
105
- const cartStore = useCartStore();
106
-
107
- // const searchWarning = ref()
108
- const state = reactive({
109
- cartIsInit: computed(() => {
110
- return true
111
- }),
112
- itemsIsInit: computed(() => {
113
- return !!cartStore.state?.carts[cartStore.state.basket].items;
114
- }),
115
- selectedPaymentProvider: computed(() => {
116
- /* fixme this compute generates an error
117
- Uncaught (in promise) TypeError: Cannot set properties of null (setting '__vnode')
118
- but the value is correct.
119
- */
120
- return cartStore.state?.selectedPaymentProvider.title;
121
-
122
-
123
- }),
124
- images: {},
125
- showOrderButton: false,
126
-
127
- });
128
-
129
-
130
- function getImage(item) {
131
- Request.get(`/json/dk_variante/view/${item}`).then(async (resp) => {
132
- let data = await resp.json();
133
-
134
- data = data.values;
135
-
136
- let imageUrl = data.dk_artikel.dest.image
137
- ? Request.downloadUrlFor(data.dk_artikel.dest.image)
138
- : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
139
-
140
- state.images[item] = imageUrl;
141
- });
142
-
143
- return state.images[item];
144
- }
145
-
146
- function onTosAccept(e) {
147
- state.showOrderButton = e.target.checked;
148
- }
149
- function addOrder()
150
- {
151
- console.log("start order add");
152
- cartStore.orderAdd();
153
- }
154
-
155
- onBeforeMount(async () => {
156
- await cartStore.init();
157
- });
158
- </script>
159
-
160
- <style scoped>
161
-
162
- .viur-shop-cart-sidebar-btn-wrap {
163
- display: flex;
164
- flex-direction: column;
165
- margin-top: var(--sl-spacing-large);
166
-
167
- sl-button {
168
- margin-bottom: var(--sl-spacing-x-small);
169
- }
170
- }
171
-
172
- sl-alert {
173
- margin-top: var(--sl-spacing-medium);
174
- margin-bottom: var(--sl-spacing-medium);
175
- }
176
-
177
- sl-tooltip {
178
- &::part(body) {
179
- line-height: 1.2;
180
- font-weight: 400;
181
- padding: 10px;
182
- }
183
- }
184
-
185
- sl-menu-item {
186
- &::part(base) {
187
- padding: 0.2em 0.9em 0.2em 0.8em;
188
- }
189
-
190
- &::part(checked-icon) {
191
- display: none;
192
- }
193
-
194
- &::part(prefix) {
195
- margin-right: 10px;
196
- }
197
-
198
- &::part(suffix) {
199
- margin-right: -1.5em;
200
- }
201
- }
202
-
203
- .viur-shop-cart-sidebar-info-line {
204
- display: flex;
205
- flex-direction: row;
206
- flex-wrap: nowrap;
207
- margin: var(--sl-spacing-2x-small) 0;
208
-
209
- span {
210
- margin-right: auto;
211
- }
212
-
213
- &.total {
214
- font-weight: 600;
215
- border-top: 1px solid var(--sl-color-neutral-300);
216
- border-bottom: 1px solid var(--sl-color-neutral-300);
217
- padding: var(--sl-spacing-x-small) 0;
218
- margin: var(--sl-spacing-small) 0;
219
- }
220
- }
221
-
222
- .viur-shop-cart-mini-card {
223
- margin-bottom: var(--sl-spacing-x-large);
224
-
225
- &::part(header) {
226
- border-bottom: none;
227
- padding-top: 0;
228
- padding-right: 0;
229
- }
230
-
231
- &::part(image) {
232
- flex-basis: 25%;
233
- max-width: 90px;
234
- }
235
-
236
- &::part(body) {
237
- display: flex;
238
- flex: 1;
239
- padding-top: 0;
240
- padding-bottom: 0;
241
- padding-right: 0;
242
- }
243
-
244
- &::part(group) {
245
- padding: var(--sl-spacing-small) 0;
246
- }
247
- }
248
-
249
- .viur-shop-cart-mini-card-body-row {
250
- display: grid;
251
- grid-template-columns: 1fr auto auto;
252
- gap: var(--sl-spacing-large);
253
- flex: 1;
254
- }
255
-
256
- .viur-shop-cart-mini-card-body-info {
257
- display: flex;
258
- flex-direction: column;
259
- height: 100%;
260
- }
261
-
262
- .viur-shop-cart-mini-card-info-wrap {
263
- display: flex;
264
- flex-wrap: nowrap;
265
- gap: var(--sl-spacing-medium);
266
- }
267
-
268
- .viur-shop-cart-mini-card-info {
269
- display: flex;
270
- flex-direction: row;
271
- flex-wrap: nowrap;
272
-
273
- span {
274
- margin-right: var(--sl-spacing-x-small);
275
- font-weight: 600;
276
- }
277
- }
278
-
279
- .viur-shop-cart-address-wrap {
280
- display: grid;
281
- grid-template-columns: 1fr 1fr;
282
- gap: var(--sl-spacing-x-large);
283
- margin-bottom: var(--sl-spacing-x-large);
284
- }
285
-
286
- .viur-shop-cart-address-headline {
287
- display: flex;
288
- flex-direction: row;
289
- flex-wrap: nowrap;
290
- align-items: center;
291
- justify-content: space-between;
292
- font-weight: 600;
293
- }
294
-
295
- .viur-shop-cart-payment {
296
- display: flex;
297
- flex-direction: row;
298
- flex-wrap: nowrap;
299
- align-items: center;
300
- justify-content: space-between;
301
- margin-bottom: var(--sl-spacing-x-large);
302
-
303
- span {
304
- font-weight: 600;
305
- }
306
- }
307
-
308
- .viur-shop-cart-headline {
309
- margin: 0 0 var(--sl-spacing-x-large) 0;
310
- font-size: var(--shop-form-headline-size);
311
- }
312
- </style>
@@ -1,113 +0,0 @@
1
- <template>
2
- <shop-order-stepper
3
- :tabs="state.tabs"
4
- @tabChange="handleTabs"
5
- :sidebar="true"
6
- :sidebar-bottom="false"
7
- :show-discount="false"
8
- >
9
- <!-- customize slots -->
10
- <!-- <template #main> The Order Stepper </template> -->
11
- <!-- <template #trigger> Buttons for Stepper control </template> -->
12
- <!-- <template #sidebar> the side/bottom bar </template> -->
13
- </shop-order-stepper>
14
- </template>
15
-
16
- <script setup>
17
- import { onBeforeMount, reactive, shallowRef, computed } from "vue";
18
- import ShopOrderStepper from "../../ShopOrderStepper.vue";
19
- import CartView from "../../cart/CartView.vue";
20
- import ShopCart from "../../ShopCart.vue";
21
- import ConfirmView from "../../ShopOrderConfirm.vue";
22
- import ShopOrderComplete from "../../ShopOrderComplete.vue";
23
- import ShopUserData from "../../ShopUserData.vue";
24
- import { useCartStore } from "../../../stores/cart";
25
-
26
- const cartStore = useCartStore();
27
-
28
- const rootNode = computed(() =>
29
- cartStore.state.basketRootNode.key ? cartStore.state.basketRootNode.key : "",
30
- );
31
- const state = reactive({
32
- rootNode: {},
33
- tabs: {
34
- cart: {
35
- component: shallowRef(CartView),
36
- props: {
37
- sidebar: true,
38
- mode: "basket",
39
- cartKey: rootNode, // cartKey (on initial call has to be a root node) is a required prop, make sure that cartStore.init() is called before cart is mounted
40
- placeholder: "/static/partnerbereich/img/placeholder.svg",
41
- standalone: false,
42
- },
43
- displayName: "Warenkorb",
44
- icon: { name: "bag" },
45
- position: 2,
46
- disabled: false,
47
- },
48
- confirm: {
49
- component: shallowRef(ConfirmView),
50
- props: {
51
- tabName: "userInfo",
52
- },
53
- displayName: "Bestellung prüfen",
54
- icon: { name: "clipboard-check" },
55
- position: 5,
56
- disabled: false,
57
- },
58
- orderComplete: {
59
- component: shallowRef(ShopOrderComplete),
60
- props: {
61
- redirectUrl: "http://localhost:8081",
62
- additionalComponents: [
63
- {
64
- component: shallowRef(CartView),
65
- props: {
66
- sidebar: true,
67
- mode: "basket",
68
- cartKey: rootNode,
69
- },
70
- },
71
- ],
72
- },
73
- displayName: "Bestellung Abgeschlossen",
74
- icon: { name: "bag-check" },
75
- position: 6,
76
- disabled: true,
77
- },
78
- userInfo: {
79
- component: shallowRef(ShopUserData),
80
- props: { multiMode: false },
81
- displayName: "Daten Eingeben",
82
- icon: { name: "card-list" },
83
- position: 3,
84
- disabled: false,
85
- },
86
- cartTest: {
87
- component: shallowRef(ShopCart),
88
- props: {
89
- sidebar: true,
90
- mode: "basket",
91
- cartKey: rootNode, // cartKey (on initial call has to be a root node) is a required prop, make sure that cartStore.init() is called before cart is mounted
92
- placeholder: "/static/partnerbereich/img/placeholder.svg",
93
- standalone: false,
94
- },
95
- displayName: "neuer Korb",
96
- icon: { name: "bag" },
97
- position: 1,
98
- disabled: false,
99
- },
100
- },
101
- });
102
-
103
- function handleTabs(e) {
104
- if (e?.detail.name === "confirm") {
105
- state.tabs.orderComplete.disabled = false;
106
- }
107
- }
108
-
109
- onBeforeMount(async () => {
110
- await cartStore.init("/static/partnerbereich/img/placeholder.svg");
111
- await cartStore.getAddressStructure();
112
- });
113
- </script>
@@ -1,16 +0,0 @@
1
- <template>
2
- HALLO
3
- <div v-if="a">{{ a }}</div>
4
- <div v-if="b">{{ b }}</div>
5
- </template>
6
-
7
- <script setup>
8
- const props = defineProps({
9
- a: {
10
- type: String,
11
- },
12
- b: {
13
- type: String,
14
- },
15
- });
16
- </script>