@viur/shop-components 0.0.1-dev.58 → 0.0.1-dev.60

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 (86) hide show
  1. package/.editorconfig +16 -0
  2. package/.github/workflows/npm-publish.yml +42 -0
  3. package/.gitmodules +3 -0
  4. package/LICENSE +21 -0
  5. package/README.md +13 -2
  6. package/package.json +19 -32
  7. package/src/components/ShopCart.vue +512 -0
  8. package/src/components/ShopOrderComplete.vue +73 -0
  9. package/src/components/ShopOrderConfirm.vue +291 -0
  10. package/src/components/ShopOrderStepper.vue +264 -0
  11. package/src/components/ShopUserData.vue +232 -0
  12. package/src/components/cart/CartLeaf.vue +277 -0
  13. package/src/components/cart/CartLeafModel.vue +304 -0
  14. package/src/components/cart/CartNode.vue +25 -0
  15. package/src/components/cart/CartTree.vue +54 -0
  16. package/src/components/cart/CartTreeWrapper.vue +73 -0
  17. package/src/components/cart/CartView.vue +723 -0
  18. package/src/components/cart/Discount.vue +91 -0
  19. package/src/components/lib/utils.js +0 -0
  20. package/src/components/order/OrderSidebar.vue +102 -0
  21. package/src/components/order/category/CategoryList.vue +83 -0
  22. package/src/components/order/category/CategoryView.vue +143 -0
  23. package/src/components/order/information/adress/ShippingAdress.vue +143 -0
  24. package/src/components/order/item/ItemCard.vue +168 -0
  25. package/src/components/order/item/ItemView.vue +232 -0
  26. package/src/components/order/process/ConfirmView.vue +312 -0
  27. package/src/components/order/process/ExampleUsage.vue +113 -0
  28. package/src/components/order/process/OrderTabHeader.vue +16 -0
  29. package/src/components/order/process/SelectPaymentProvider.vue +62 -0
  30. package/src/components/order/process/Shipping.vue +46 -0
  31. package/src/components/ui/ShopSummary.vue +145 -0
  32. package/src/components/ui/generic/ArticleList.vue +222 -0
  33. package/src/components/ui/generic/ExamplePagination.vue +236 -0
  34. package/src/components/ui/generic/ShopPriceFormatter.vue +41 -0
  35. package/src/components/ui/generic/alerts/ShopAlert.vue +19 -0
  36. package/src/components/ui/generic/makeData.js +39 -0
  37. package/src/components/ui/stepper/StepperItem.vue +39 -0
  38. package/src/components/ui/stepper/StepperTab.vue +133 -0
  39. package/src/components/ui/stepper/StepperTrigger.vue +35 -0
  40. package/src/components/ui/userdata/AddForm.vue +125 -0
  41. package/src/components/ui/userdata/AddressBox.vue +117 -0
  42. package/src/components/ui/userdata/BaseLayout.vue +94 -0
  43. package/src/components/ui/userdata/CustomBooleanBone.vue +58 -0
  44. package/src/components/ui/userdata/CustomSelectBone.vue +91 -0
  45. package/src/components/ui/userdata/CustomStringBone.vue +71 -0
  46. package/src/components/ui/userdata/DefaultLayout.vue +126 -0
  47. package/src/components/ui/userdata/SelectAddress.vue +21 -0
  48. package/src/components/ui/userdata/multi/ActionBar.vue +38 -0
  49. package/src/components/ui/userdata/multi/CartSelection.vue +42 -0
  50. package/src/main.js +50 -0
  51. package/src/router/index.js +103 -0
  52. package/src/stores/cart.js +336 -0
  53. package/src/style/ignite/.editorconfig +20 -0
  54. package/src/style/ignite/.github/workflows/ignite.yml +64 -0
  55. package/src/style/ignite/.github/workflows/node.yml +30 -0
  56. package/src/style/ignite/.postcssrc.cjs +25 -0
  57. package/src/style/ignite/CHANGELOG.md +244 -0
  58. package/src/style/ignite/LICENSE +21 -0
  59. package/src/style/ignite/README.md +92 -0
  60. package/src/style/ignite/dist/ignite.css +2019 -0
  61. package/src/style/ignite/dist/ignite.min.css +4 -0
  62. package/src/style/ignite/foundation/basic.css +371 -0
  63. package/src/style/ignite/foundation/color.css +323 -0
  64. package/src/style/ignite/foundation/config.css +188 -0
  65. package/src/style/ignite/foundation/grid.css +78 -0
  66. package/src/style/ignite/foundation/mediaqueries.css +71 -0
  67. package/src/style/ignite/foundation/reset.css +261 -0
  68. package/src/style/ignite/ignite.css +29 -0
  69. package/src/style/ignite/ignite.css.map +1 -0
  70. package/src/style/ignite/package-lock.json +5530 -0
  71. package/src/style/ignite/package.json +58 -0
  72. package/src/style/ignite/shoelace.css +19 -0
  73. package/src/style/ignite/themes/dark.css +12 -0
  74. package/src/style/ignite/themes/light.css +11 -0
  75. package/src/style/ignite/utilities/shoelace.css +537 -0
  76. package/src/style/ignite/utilities/utilities.css +24 -0
  77. package/src/views/ViewMissing.vue +20 -0
  78. package/vite.config.js +53 -0
  79. package/dist/CategoryView-Z-tCFNv1.mjs +0 -60
  80. package/dist/ItemCard-CVfih_bz.mjs +0 -64
  81. package/dist/ItemView-cjeQBSTR.mjs +0 -1848
  82. package/dist/ItemView.css +0 -1
  83. package/dist/main-CZfMYx-A.mjs +0 -3167
  84. package/dist/main.css +0 -1
  85. package/dist/viur-shop-components.es.js +0 -10
  86. package/dist/viur-shop-components.umd.js +0 -417
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <sl-card class="viur-shop-item-card-card">
3
+ <img
4
+ slot="image"
5
+ :src="getImage(item)"
6
+ :alt="item.shop_name"
7
+ loading="lazy"
8
+ class="viur-shop-item-card-image"
9
+ />
10
+ <h3 class="viur-shop-item-card-headline">{{ item.shop_name }}</h3>
11
+ <h4 class="viur-shop-item-card-subline">B 21 x H 6,5 x T 19 cm</h4>
12
+ <div class="viur-shop-item-card-price">{{ item.shop_price_retail }} €</div>
13
+ <div class="viur-shop-item-card-footer" slot="footer">
14
+ <!-- <sl-button-group label="Amount">
15
+ <sl-tooltip content="Remove">
16
+ <sl-icon-button
17
+ variant="primary"
18
+ name="cart-dash"
19
+ label="Remove Amount"
20
+ style="font-size: 2em"
21
+ >
22
+ </sl-icon-button>
23
+ </sl-tooltip>
24
+ <sl-tooltip content="Plus">
25
+ <sl-icon-button
26
+ variant="primary"
27
+ name="cart-plus"
28
+ label="Add Amount"
29
+ style="font-size: 2em"
30
+ >
31
+ </sl-icon-button>
32
+ </sl-tooltip>
33
+ <sl-tooltip content="Add to cart">
34
+ <sl-icon-button
35
+ variant="primary"
36
+ name="cart-check"
37
+ label="Add to cart"
38
+ style="font-size: 2em"
39
+ @click="
40
+ cartStore.addToCart(item.key, cartStore.state.currentCart)
41
+ "
42
+ >
43
+ </sl-icon-button>
44
+ </sl-tooltip>
45
+ </sl-button-group> -->
46
+ <sl-button
47
+ size="small"
48
+ class="viur-shop-item-card-add-to-cart-btn"
49
+ variant="primary"
50
+ title="Add to cart"
51
+ @click.stop="cartStore.addToCart(item.key, cartStore.state.basket)"
52
+ >
53
+ <sl-icon name="bag-plus" slot="prefix"></sl-icon>
54
+
55
+ In den Warenkorb
56
+ </sl-button>
57
+
58
+ <sl-button
59
+ size="small"
60
+ outline
61
+ class="viur-shop-item-card-add-to-favourites-btn"
62
+ variant="primary"
63
+ title="Add to favourites"
64
+ >
65
+ <sl-icon name="heart" slot="prefix"></sl-icon>
66
+ </sl-button>
67
+ </div>
68
+ </sl-card>
69
+ </template>
70
+
71
+ <script setup>
72
+ import { Request } from "@viur/vue-utils";
73
+ import { useCartStore } from "../../../stores/cart";
74
+
75
+ const props = defineProps({
76
+ item: {
77
+ type: Object,
78
+ required: true,
79
+ },
80
+ });
81
+
82
+ const cartStore = useCartStore();
83
+
84
+ function getImage(item) {
85
+ let imageUrl =
86
+ "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
87
+ if (item.dk_artikel.dest.image) {
88
+ return Request.downloadUrlFor(item.dk_artikel.dest.image);
89
+ }
90
+
91
+ return imageUrl;
92
+ }
93
+ </script>
94
+
95
+ <style scoped>
96
+ .viur-shop-item-card-card {
97
+ width: 100%;
98
+
99
+ &::part(header) {
100
+ padding: var(--sl-spacing-medium) 0;
101
+ }
102
+
103
+ &::part(body) {
104
+ padding: var(--sl-spacing-medium) 0;
105
+ }
106
+
107
+ &::part(footer) {
108
+ padding: var(--sl-spacing-medium) 0;
109
+ }
110
+
111
+ &:hover {
112
+ .viur-shop-item-card-add-to-cart-btn {
113
+ opacity: 1;
114
+ }
115
+
116
+ .viur-shop-item-card-headline {
117
+ color: var(--sl-color-primary-500);
118
+ }
119
+
120
+ .viur-shop-item-card-image {
121
+ transform: scale(1.02);
122
+ }
123
+ }
124
+ }
125
+
126
+ .viur-shop-item-card-footer {
127
+ display: flex;
128
+ flex-direction: row;
129
+ align-items: center;
130
+ width: 100%;
131
+ }
132
+
133
+ .viur-shop-item-card-add-to-cart-btn {
134
+ transition: all ease 0.3s;
135
+ margin-right: var(--sl-spacing-medium);
136
+ opacity: 0;
137
+ }
138
+
139
+ .viur-shop-item-card-add-to-favourites-btn {
140
+ margin-left: auto;
141
+ }
142
+
143
+ .viur-shop-item-card-image {
144
+ aspect-ratio: 1;
145
+ object-fit: cover;
146
+ transition: all ease 0.3s;
147
+ }
148
+
149
+ .viur-shop-item-card-headline {
150
+ font-size: 1.1em;
151
+ font-weight: bold;
152
+ color: var(--ignt-basic-color-text);
153
+ margin-bottom: var(--sl-spacing-2x-small);
154
+ transition: all ease 0.3s;
155
+ }
156
+
157
+ .viur-shop-item-card-subline {
158
+ color: var(--ignt-basic-color-text);
159
+ margin-bottom: var(--sl-spacing-2x-small);
160
+ }
161
+
162
+ .viur-shop-item-card-price {
163
+ font-size: 1.1em;
164
+ font-weight: bold;
165
+ color: var(--ignt-basic-color-text);
166
+ margin-left: auto;
167
+ }
168
+ </style>
@@ -0,0 +1,232 @@
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>
@@ -0,0 +1,312 @@
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>