@viur/shop-components 0.0.1-dev.34 → 0.0.1-dev.35

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.
@@ -1,14 +1,14 @@
1
- import { reactive as R, computed as C, useCssVars as L, resolveComponent as v, openBlock as c, createBlock as N, Transition as M, withCtx as f, createElementBlock as k, createVNode as l, createElementVNode as e, createCommentVNode as B, Fragment as x, createTextVNode as i, toDisplayString as S, onBeforeMount as E, pushScopeId as T, popScopeId as j, ref as P, renderList as q, unref as z, Teleport as Q, resolveDynamicComponent as X, mergeProps as Y, normalizeClass as ee, withDirectives as te, vShow as se, shallowRef as ae } from "vue";
2
- import { Request as U } from "@viur/vue-utils";
3
- import { defineStore as oe } from "pinia";
4
- import { ViURShopClient as ne } from "@viur/viur-shop-client";
1
+ import { reactive as I, computed as v, useCssVars as K, openBlock as d, createBlock as C, Transition as G, withCtx as Z, createElementBlock as h, createElementVNode as e, createCommentVNode as R, pushScopeId as N, popScopeId as z, Fragment as $, createTextVNode as i, toDisplayString as y, onBeforeMount as q, withDirectives as U, vModelText as F, ref as M, renderList as B, createVNode as P, unref as k, Teleport as J, resolveDynamicComponent as L, mergeProps as Q, normalizeClass as X, vShow as Y, shallowRef as E } from "vue";
2
+ import { Request as A } from "@viur/vue-utils";
3
+ import { defineStore as ee } from "pinia";
4
+ import { ViURShopClient as te } from "@viur/viur-shop-client";
5
5
  import "vue-router";
6
- const O = (t, n) => {
6
+ const x = (t, n) => {
7
7
  const o = t.__vccOpts || t;
8
8
  for (const [p, s] of n)
9
9
  o[p] = s;
10
10
  return o;
11
- }, K = {
11
+ }, T = {
12
12
  props: {
13
13
  size: {
14
14
  type: String,
@@ -28,17 +28,17 @@ const O = (t, n) => {
28
28
  }
29
29
  },
30
30
  setup(t, n) {
31
- const o = R({
32
- trackWidth: C(() => `${t.size / 30}rem`),
33
- outerSize: C(() => `calc(${t.size}rem + ${o.trackWidth})`),
34
- spinnerSize: C(() => `${t.size}rem`),
35
- logoSize: C(() => `calc(${t.size}rem - ${o.trackWidth} * 10)`),
36
- shadow: C(() => `0px 0px ${t.size / 6}rem 0 color-mix(in hsl, var(--sl-color-neutral-1000), 80% transparent)`)
31
+ const o = I({
32
+ trackWidth: v(() => `${t.size / 30}rem`),
33
+ outerSize: v(() => `calc(${t.size}rem + ${o.trackWidth})`),
34
+ spinnerSize: v(() => `${t.size}rem`),
35
+ logoSize: v(() => `calc(${t.size}rem - ${o.trackWidth} * 10)`),
36
+ shadow: v(() => `0px 0px ${t.size / 6}rem 0 color-mix(in hsl, var(--sl-color-neutral-1000), 80% transparent)`)
37
37
  });
38
38
  return { state: o };
39
39
  }
40
- }, Z = () => {
41
- L((t) => ({
40
+ }, W = () => {
41
+ K((t) => ({
42
42
  "93747d92": t.state.outerSize,
43
43
  "284424e5": t.state.shadow,
44
44
  "6485ca5e": t.state.logoSize,
@@ -46,30 +46,29 @@ const O = (t, n) => {
46
46
  d5b3feca: t.color,
47
47
  "2050b700": t.state.trackWidth
48
48
  }));
49
- }, H = K.setup;
50
- K.setup = H ? (t, n) => (Z(), H(t, n)) : Z;
51
- const re = {
49
+ }, j = T.setup;
50
+ T.setup = j ? (t, n) => (W(), j(t, n)) : W;
51
+ const se = (t) => (N("data-v-46c45785"), t = t(), z(), t), ae = {
52
52
  key: 0,
53
53
  class: "loading"
54
- }, ie = { class: "logo" };
55
- function le(t, n, o, p, s, d) {
56
- const $ = v("sl-spinner"), b = v("sl-icon");
57
- return c(), N(M, null, {
58
- default: f(() => [
59
- o.active ? (c(), k("div", re, [
60
- l($, { class: "loader" }),
61
- e("div", ie, [
62
- l(b, { src: o.logo }, null, 8, ["src"])
54
+ }, oe = /* @__PURE__ */ se(() => /* @__PURE__ */ e("sl-spinner", { class: "loader" }, null, -1)), ne = { class: "logo" }, re = ["src"];
55
+ function ie(t, n, o, p, s, u) {
56
+ return d(), C(G, null, {
57
+ default: Z(() => [
58
+ o.active ? (d(), h("div", ae, [
59
+ oe,
60
+ e("div", ne, [
61
+ e("sl-icon", { src: o.logo }, null, 8, re)
63
62
  ])
64
- ])) : B("", !0)
63
+ ])) : R("", !0)
65
64
  ]),
66
65
  _: 1
67
66
  });
68
67
  }
69
- const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"]]), G = oe("cartstore", () => {
70
- const t = new ne({
68
+ const le = /* @__PURE__ */ x(T, [["render", ie], ["__scopeId", "data-v-46c45785"]]), D = ee("cartstore", () => {
69
+ const t = new te({
71
70
  host_url: window.location.origin === "http://localhost:8081" ? "http://localhost:8080" : window.location.origin
72
- }), n = R({
71
+ }), n = I({
73
72
  basketRootNode: {},
74
73
  whishlistRootNodes: [],
75
74
  children: {},
@@ -86,65 +85,68 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
86
85
  a.is_root_node && (a.cart_type === "basket" ? n.basketRootNode = a : n.whishlistRootNodes.push(a));
87
86
  });
88
87
  }
89
- async function d(r, a) {
90
- let _ = await t.article_add({
88
+ async function u(r, a) {
89
+ let c = await t.article_add({
91
90
  article_key: r,
92
91
  parent_cart_key: a
93
92
  });
94
- console.log("addToCart", _);
93
+ console.log("addToCart", c);
95
94
  }
96
- async function $(r, a) {
97
- let _ = await t.article_view({
95
+ async function g(r, a) {
96
+ let c = await t.article_view({
98
97
  article_key: r,
99
98
  parent_cart_key: a
100
99
  });
101
- console.log("getArticleView", _);
100
+ console.log("getArticleView", c);
102
101
  }
103
- async function b(r, a) {
104
- let _ = await t.article_remove({
102
+ async function _(r, a) {
103
+ let c = await t.article_remove({
105
104
  article_key: r,
106
105
  parent_cart_key: a
107
106
  });
108
- console.log("remove Resp", _);
107
+ console.log("remove Resp", c);
109
108
  }
110
- async function m(r, a, _) {
111
- let h = await t.article_update({
109
+ async function f(r, a, c) {
110
+ let l = await t.article_update({
112
111
  article_key: r,
113
112
  parent_cart_key: a,
114
- quantity: _,
113
+ quantity: c,
115
114
  quantity_mode: "replace"
116
115
  });
117
- console.log("update Resp", h);
116
+ console.log("update Resp", l);
118
117
  }
119
- async function y() {
118
+ async function m() {
120
119
  let r = await t.address_structure();
121
120
  n.structure.address = r.addSkel, console.log("adress add", n.structure.address);
122
121
  }
123
122
  return {
124
123
  state: n,
125
- addToCart: d,
126
- getArticleView: $,
127
- removeItem: b,
128
- updateItem: m,
124
+ addToCart: u,
125
+ getArticleView: g,
126
+ removeItem: _,
127
+ updateItem: f,
129
128
  init: o,
130
- getAdressStructure: y,
129
+ getAdressStructure: m,
131
130
  getChildren: p
132
131
  };
133
- }), de = {
132
+ }), ce = {
134
133
  __name: "CartNode",
135
134
  props: {
136
135
  node: { type: Object, required: !0 }
137
136
  },
138
137
  setup(t) {
139
- return R({}), (n, o) => (c(), k(x, null, [
138
+ return I({}), (n, o) => (d(), h($, null, [
140
139
  i(" cartnode "),
141
- e("pre", null, S(t.node.name), 1)
140
+ e("pre", null, y(t.node.name), 1)
142
141
  ], 64));
143
142
  }
144
- }, F = (t) => (T("data-v-0e24135f"), t = t(), j(), t), ue = ["src"], _e = {
143
+ }, V = (t) => (N("data-v-0e24135f"), t = t(), z(), t), de = {
144
+ horizontal: "",
145
+ class: "viur-shop-cart-card"
146
+ }, ue = ["src"], he = {
145
147
  class: "viur-shop-cart-card-header",
146
148
  slot: "header"
147
- }, he = { class: "viur-shop-cart-card-headline headline" }, pe = { class: "viur-shop-cart-card-body-row" }, me = { class: "viur-shop-cart-card-body-info" }, fe = /* @__PURE__ */ F(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-descr" }, [
149
+ }, pe = { class: "viur-shop-cart-card-headline headline" }, _e = { class: "viur-shop-cart-card-body-row" }, me = { class: "viur-shop-cart-card-body-info" }, fe = /* @__PURE__ */ V(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-descr" }, [
148
150
  /* @__PURE__ */ i(" Version: 900x900x2000 "),
149
151
  /* @__PURE__ */ e("br"),
150
152
  /* @__PURE__ */ i(" Farbe: Chromoptik "),
@@ -154,10 +156,26 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
154
156
  /* @__PURE__ */ i(" Anschlag: Beidseitig variabel"),
155
157
  /* @__PURE__ */ e("br"),
156
158
  /* @__PURE__ */ i(" Griff: Stangengriff Exklusiv (56) ")
157
- ], -1)), ve = { class: "viur-shop-cart-card-body-footer" }, be = { class: "viur-shop-cart-card-body-amount" }, ye = {
159
+ ], -1)), be = { class: "viur-shop-cart-card-body-footer" }, ve = /* @__PURE__ */ V(() => /* @__PURE__ */ e("sl-button", {
160
+ size: "small",
161
+ outline: "",
162
+ class: "viur-shop-cart-card-add-to-favourites-btn",
163
+ variant: "primary",
164
+ title: "Add to favourites"
165
+ }, [
166
+ /* @__PURE__ */ e("sl-icon", {
167
+ name: "heart",
168
+ slot: "prefix"
169
+ })
170
+ ], -1)), ye = /* @__PURE__ */ V(() => /* @__PURE__ */ e("sl-icon", {
171
+ name: "trash",
172
+ slot: "prefix"
173
+ }, null, -1)), ge = [
174
+ ye
175
+ ], ke = { class: "viur-shop-cart-card-body-amount" }, we = {
158
176
  class: "viur-shop-cart-card-price-wrap",
159
177
  slot: "footer"
160
- }, ke = /* @__PURE__ */ F(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-price-label" }, "Preis", -1)), ge = { class: "viur-shop-cart-card-price" }, we = /* @__PURE__ */ F(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-small-print" }, "Brutto / Stk.", -1)), $e = {
178
+ }, $e = /* @__PURE__ */ V(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-price-label" }, "Preis", -1)), Ie = { class: "viur-shop-cart-card-price" }, Se = /* @__PURE__ */ V(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-card-small-print" }, "Brutto / Stk.", -1)), Ce = {
161
179
  __name: "CartLeaf",
162
180
  props: {
163
181
  leaf: { type: Object, required: !0 },
@@ -165,118 +183,103 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
165
183
  },
166
184
  emits: ["updateItem", "removeItem"],
167
185
  setup(t, { emit: n }) {
168
- const o = t, p = n, s = R({
186
+ const o = t, p = n, s = I({
169
187
  leaf: {}
170
188
  });
171
- function d(m) {
172
- return m !== void 0 ? U.downloadUrlFor(m) : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
189
+ function u(f) {
190
+ return f !== void 0 ? A.downloadUrlFor(f) : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
173
191
  }
174
- function $(m, y, r, a) {
192
+ function g(f, m, r, a) {
175
193
  p("updateItem", {
176
- item: m,
177
- articleKey: y,
194
+ item: f,
195
+ articleKey: m,
178
196
  node: r,
179
197
  quantity: a
180
198
  });
181
199
  }
182
- function b(m, y, r) {
183
- p("removeItem", { item: m, articleKey: y, node: r });
200
+ function _(f, m, r) {
201
+ p("removeItem", { item: f, articleKey: m, node: r });
184
202
  }
185
- return E(() => {
203
+ return q(() => {
186
204
  s.leaf = o.leaf;
187
- }), (m, y) => {
188
- const r = v("sl-icon"), a = v("sl-button"), _ = v("sl-input"), h = v("sl-card");
189
- return c(), k(x, null, [
190
- i(" cartleafe "),
191
- l(h, {
192
- horizontal: "",
193
- class: "viur-shop-cart-card"
194
- }, {
195
- default: f(() => [
196
- e("img", {
197
- class: "viur-shop-cart-card-img",
198
- slot: "image",
199
- src: d(s.leaf.shop_image ? s.leaf.shop_image : void 0)
200
- }, null, 8, ue),
201
- e("div", _e, [
202
- e("h4", he, S(s.leaf.shop_name) + " | " + S(t.leaf.shop_art_no_or_gtin), 1)
203
- ]),
204
- e("div", pe, [
205
- e("div", me, [
206
- fe,
207
- e("div", ve, [
208
- l(a, {
209
- size: "small",
210
- outline: "",
211
- class: "viur-shop-cart-card-add-to-favourites-btn",
212
- variant: "primary",
213
- title: "Add to favourites"
214
- }, {
215
- default: f(() => [
216
- l(r, {
217
- name: "heart",
218
- slot: "prefix"
219
- })
220
- ]),
221
- _: 1
222
- }),
223
- l(a, {
224
- size: "small",
225
- outline: "",
226
- class: "viur-shop-cart-card-delete-btn",
227
- variant: "primary",
228
- title: "Remove from cart",
229
- onClick: y[0] || (y[0] = (I) => b(s.leaf, s.leaf.article.dest.key, t.node))
230
- }, {
231
- default: f(() => [
232
- l(r, {
233
- name: "trash",
234
- slot: "prefix"
235
- })
236
- ]),
237
- _: 1
238
- })
239
- ])
240
- ]),
241
- e("div", be, [
242
- l(_, {
243
- class: "amount-input",
244
- type: "number",
245
- label: "Anzahl",
246
- placeholder: "Number",
247
- min: "0",
248
- modelValue: s.leaf.quantity,
249
- "onUpdate:modelValue": y[1] || (y[1] = (I) => s.leaf.quantity = I),
250
- onInput: y[2] || (y[2] = (I) => $(
251
- s.leaf,
252
- s.leaf.article.dest.key,
253
- t.node,
254
- s.leaf.quantity
255
- ))
256
- }, null, 8, ["modelValue"])
257
- ]),
258
- e("div", ye, [
259
- ke,
260
- e("div", ge, S(s.leaf.price.retail) + " € ", 1),
261
- we
262
- ])
205
+ }), (f, m) => (d(), h($, null, [
206
+ i(" cartleafe "),
207
+ e("sl-card", de, [
208
+ e("img", {
209
+ class: "viur-shop-cart-card-img",
210
+ slot: "image",
211
+ src: u(s.leaf.shop_image ? s.leaf.shop_image : void 0)
212
+ }, null, 8, ue),
213
+ e("div", he, [
214
+ e("h4", pe, y(s.leaf.shop_name) + " | " + y(t.leaf.shop_art_no_or_gtin), 1)
215
+ ]),
216
+ e("div", _e, [
217
+ e("div", me, [
218
+ fe,
219
+ e("div", be, [
220
+ ve,
221
+ e("sl-button", {
222
+ size: "small",
223
+ outline: "",
224
+ class: "viur-shop-cart-card-delete-btn",
225
+ variant: "primary",
226
+ title: "Remove from cart",
227
+ onClick: m[0] || (m[0] = (r) => _(s.leaf, s.leaf.article.dest.key, t.node))
228
+ }, ge)
263
229
  ])
264
230
  ]),
265
- _: 1
266
- })
267
- ], 64);
268
- };
231
+ e("div", ke, [
232
+ U(e("sl-input", {
233
+ class: "amount-input",
234
+ type: "number",
235
+ label: "Anzahl",
236
+ placeholder: "Number",
237
+ min: "0",
238
+ "onUpdate:modelValue": m[1] || (m[1] = (r) => s.leaf.quantity = r),
239
+ onInput: m[2] || (m[2] = (r) => g(
240
+ s.leaf,
241
+ s.leaf.article.dest.key,
242
+ t.node,
243
+ s.leaf.quantity
244
+ ))
245
+ }, null, 544), [
246
+ [F, s.leaf.quantity]
247
+ ])
248
+ ]),
249
+ e("div", we, [
250
+ $e,
251
+ e("div", Ie, y(s.leaf.price.retail) + " € ", 1),
252
+ Se
253
+ ])
254
+ ])
255
+ ])
256
+ ], 64));
269
257
  }
270
- }, Ie = /* @__PURE__ */ O($e, [["__scopeId", "data-v-0e24135f"]]), V = (t) => (T("data-v-7aae4815"), t = t(), j(), t), Ce = /* @__PURE__ */ V(() => /* @__PURE__ */ e("p", null, "Möchten Sie den Artikel wirklich aus dem Warenkorb entfernen?", -1)), Se = {
258
+ }, Ne = /* @__PURE__ */ x(Ce, [["__scopeId", "data-v-0e24135f"]]), w = (t) => (N("data-v-7aae4815"), t = t(), z(), t), ze = { key: 0 }, xe = /* @__PURE__ */ w(() => /* @__PURE__ */ e("p", null, "Möchten Sie den Artikel wirklich aus dem Warenkorb entfernen?", -1)), Re = {
271
259
  class: "footer-wrap",
272
260
  slot: "footer"
273
- }, Ne = { key: 0 }, ze = /* @__PURE__ */ V(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Zusammenfassung", -1)), xe = /* @__PURE__ */ V(() => /* @__PURE__ */ e("br", null, null, -1)), Re = /* @__PURE__ */ V(() => /* @__PURE__ */ e("br", null, null, -1)), Ve = { class: "viur-shop-cart-sidebar-info-line" }, Be = /* @__PURE__ */ V(() => /* @__PURE__ */ e("span", null, "Zwischensumme", -1)), qe = /* @__PURE__ */ V(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
261
+ }, Be = { key: 0 }, Ve = /* @__PURE__ */ w(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Zusammenfassung", -1)), Ee = /* @__PURE__ */ w(() => /* @__PURE__ */ e("br", null, null, -1)), qe = /* @__PURE__ */ w(() => /* @__PURE__ */ e("sl-input", { label: "Rabattcode eingeben" }, null, -1)), Oe = /* @__PURE__ */ w(() => /* @__PURE__ */ e("br", null, null, -1)), Ae = { class: "viur-shop-cart-sidebar-info-line" }, Te = /* @__PURE__ */ w(() => /* @__PURE__ */ e("span", null, "Zwischensumme", -1)), De = /* @__PURE__ */ w(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
274
262
  /* @__PURE__ */ e("span", null, "Rabatt"),
275
263
  /* @__PURE__ */ i(" 0 € ")
276
- ], -1)), Oe = /* @__PURE__ */ V(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
264
+ ], -1)), We = /* @__PURE__ */ w(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
277
265
  /* @__PURE__ */ e("span", null, "Versandkosten"),
278
266
  /* @__PURE__ */ i(" 0 € ")
279
- ], -1)), Ae = { class: "viur-shop-cart-sidebar-info-line total" }, Ee = /* @__PURE__ */ V(() => /* @__PURE__ */ e("span", null, "Gesamt:", -1)), Te = { class: "viur-shop-cart-sidebar-btn-wrap" }, je = {
267
+ ], -1)), je = { class: "viur-shop-cart-sidebar-info-line total" }, Ue = /* @__PURE__ */ w(() => /* @__PURE__ */ e("span", null, "Gesamt:", -1)), Me = /* @__PURE__ */ w(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-btn-wrap" }, [
268
+ /* @__PURE__ */ e("sl-button", {
269
+ variant: "info",
270
+ size: "small"
271
+ }, " Jetzt Bestellen "),
272
+ /* @__PURE__ */ e("sl-button", {
273
+ size: "small",
274
+ variant: "primary"
275
+ }, [
276
+ /* @__PURE__ */ e("sl-icon", {
277
+ name: "paypal",
278
+ slot: "prefix"
279
+ }),
280
+ /* @__PURE__ */ i(" Paypal ")
281
+ ])
282
+ ], -1)), He = {
280
283
  __name: "CartView",
281
284
  props: {
282
285
  mode: { type: String, default: "basket" },
@@ -284,320 +287,260 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
284
287
  sidebar: { type: Boolean, default: !0 }
285
288
  },
286
289
  setup(t) {
287
- const n = t, o = G(), p = P(null), s = R({
288
- cartIsInit: C(() => !!o.state.basketRootNode),
289
- itemsIsInit: C(() => !0),
290
+ const n = t, o = D(), p = M(null), s = I({
291
+ cartIsInit: v(() => !!o.state.basketRootNode),
292
+ itemsIsInit: v(() => !0),
290
293
  images: {},
291
294
  currentItem: {},
292
295
  currentNode: {},
293
296
  nodes: [],
294
297
  leaves: {}
295
298
  });
296
- C(() => n.mode === "basket" ? o.state.basket : n.cartKey);
297
- async function d() {
299
+ v(() => n.mode === "basket" ? o.state.basket : n.cartKey);
300
+ async function u() {
298
301
  await o.updateItem(
299
302
  s.currentItem.article.dest.key,
300
303
  s.currentNode.key,
301
304
  0
302
- ), await y(), p.value.hide();
305
+ ), await m(), p.value.hide();
303
306
  }
304
- async function $(a) {
307
+ async function g(a) {
305
308
  console.log("updateItem :", a), a.quantity === 0 ? (p.value.show(), s.currentItem = a.item, s.currentNode = a.node) : (await o.updateItem(a.articleKey, a.node.key, a.quantity), await o.init());
306
309
  }
307
- function b(a) {
310
+ function _(a) {
308
311
  console.log("removeItem :", a), p.value.show(), s.currentItem = a.item, s.currentNode = a.node;
309
312
  }
310
- async function m() {
313
+ async function f() {
311
314
  s.leaves[s.currentNode.key].forEach((a) => {
312
315
  a.key === s.currentItem.key && (a.quantity = 1);
313
316
  }), s.currentItem = {}, s.currentNode = {};
314
317
  }
315
- async function y() {
318
+ async function m() {
316
319
  s.nodes = [], s.leaves = {}, await o.init(), await r();
317
320
  }
318
321
  async function r(a = n.cartKey) {
319
322
  console.log("debug getChildren parentKey from comp: ", a);
320
- const _ = await o.getChildren(a);
321
- console.log("getChildren children: ", _), _.forEach(async (h) => {
322
- h.skel_type === "node" ? (s.nodes.push(h), await r(h.key)) : (Object.keys(s.leaves).includes(a) || (s.leaves[a] = []), s.leaves[a].push(h));
323
+ const c = await o.getChildren(a);
324
+ console.log("getChildren children: ", c), c.forEach(async (l) => {
325
+ l.skel_type === "node" ? (s.nodes.push(l), await r(l.key)) : (Object.keys(s.leaves).includes(a) || (s.leaves[a] = []), s.leaves[a].push(l));
323
326
  });
324
327
  }
325
- return E(async () => {
328
+ return q(async () => {
326
329
  await o.init(), await r(), n.mode === "basket" && s.nodes.push(o.state.basketRootNode), console.log("state.nodes test", s.nodes), console.log("state.leaves", s.leaves);
327
- }), (a, _) => {
328
- const h = v("sl-spinner"), I = v("sl-button"), D = v("sl-dialog"), W = v("sl-input"), g = v("sl-icon");
329
- return t.cartKey.length ? (c(), k(x, { key: 1 }, [
330
- l(D, {
331
- ref_key: "confirm",
332
- ref: p,
333
- onSlHide: m
334
- }, {
335
- default: f(() => [
336
- Ce,
337
- e("div", Se, [
338
- l(I, {
339
- variant: "danger",
340
- onClick: _[0] || (_[0] = (w) => p.value.hide()),
341
- size: "medium"
342
- }, {
343
- default: f(() => [
344
- i(" Abbrechen ")
345
- ]),
346
- _: 1
347
- }),
348
- l(I, {
349
- variant: "success",
350
- onClick: d,
351
- size: "medium"
352
- }, {
353
- default: f(() => [
354
- i(" Aus Warenkorb entfernen ")
355
- ]),
356
- _: 1
357
- })
358
- ])
359
- ]),
360
- _: 1
361
- }, 512),
362
- (c(!0), k(x, null, q(s.nodes, (w) => (c(), k("div", null, [
363
- Object.keys(s.leaves).includes(w.key) ? (c(), k(x, { key: 0 }, [
364
- l(de, { node: w }, null, 8, ["node"]),
365
- (c(!0), k(x, null, q(s.leaves[w.key], (A) => (c(), N(Ie, {
366
- key: A.key,
367
- leaf: A,
368
- node: w,
369
- onRemoveItem: b,
370
- onUpdateItem: $
371
- }, null, 8, ["leaf", "node"]))), 128))
372
- ], 64)) : B("", !0)
373
- ]))), 256)),
374
- t.sidebar ? (c(), k("div", Ne, [
375
- ze,
376
- xe,
377
- l(W, { label: "Rabattcode eingeben" }),
378
- Re,
379
- e("div", Ve, [
380
- Be,
381
- i(" --> " + S(t.mode === "basket" ? z(o).state.basketRootNode.total : z(o).state.whishlistRootNodes[t.cartKey].total) + " € ", 1)
382
- ]),
383
- qe,
384
- Oe,
385
- e("div", Ae, [
386
- Ee,
387
- i(" " + S(t.mode === "basket" ? z(o).state.basketRootNode.total : z(o).state.whishlistRootNodes[t.cartKey].total) + " € ", 1)
388
- ]),
389
- e("div", Te, [
390
- l(I, {
391
- variant: "info",
392
- size: "small"
393
- }, {
394
- default: f(() => [
395
- i(" Jetzt Bestellen ")
396
- ]),
397
- _: 1
398
- }),
399
- l(I, {
400
- size: "small",
401
- variant: "primary"
402
- }, {
403
- default: f(() => [
404
- l(g, {
405
- name: "paypal",
406
- slot: "prefix"
407
- }),
408
- i(" Paypal ")
409
- ]),
410
- _: 1
411
- })
412
- ])
413
- ])) : B("", !0)
414
- ], 64)) : (c(), N(h, { key: 0 }));
415
- };
330
+ }), (a, c) => t.cartKey.length ? (d(), h($, { key: 1 }, [
331
+ e("sl-dialog", {
332
+ ref_key: "confirm",
333
+ ref: p,
334
+ onSlHide: f
335
+ }, [
336
+ xe,
337
+ e("div", Re, [
338
+ e("sl-button", {
339
+ variant: "danger",
340
+ onClick: c[0] || (c[0] = (l) => p.value.hide()),
341
+ size: "medium"
342
+ }, " Abbrechen "),
343
+ e("sl-button", {
344
+ variant: "success",
345
+ onClick: u,
346
+ size: "medium"
347
+ }, " Aus Warenkorb entfernen ")
348
+ ])
349
+ ], 544),
350
+ (d(!0), h($, null, B(s.nodes, (l) => (d(), h("div", null, [
351
+ Object.keys(s.leaves).includes(l.key) ? (d(), h($, { key: 0 }, [
352
+ P(ce, { node: l }, null, 8, ["node"]),
353
+ (d(!0), h($, null, B(s.leaves[l.key], (S) => (d(), C(Ne, {
354
+ key: S.key,
355
+ leaf: S,
356
+ node: l,
357
+ onRemoveItem: _,
358
+ onUpdateItem: g
359
+ }, null, 8, ["leaf", "node"]))), 128))
360
+ ], 64)) : R("", !0)
361
+ ]))), 256)),
362
+ t.sidebar ? (d(), h("div", Be, [
363
+ Ve,
364
+ Ee,
365
+ qe,
366
+ Oe,
367
+ e("div", Ae, [
368
+ Te,
369
+ i(" --> " + y(t.mode === "basket" ? k(o).state.basketRootNode.total : k(o).state.whishlistRootNodes[t.cartKey].total) + " € ", 1)
370
+ ]),
371
+ De,
372
+ We,
373
+ e("div", je, [
374
+ Ue,
375
+ i(" " + y(t.mode === "basket" ? k(o).state.basketRootNode.total : k(o).state.whishlistRootNodes[t.cartKey].total) + "", 1)
376
+ ]),
377
+ Me
378
+ ])) : R("", !0)
379
+ ], 64)) : (d(), h("sl-spinner", ze));
416
380
  }
417
- }, J = /* @__PURE__ */ O(je, [["__scopeId", "data-v-7aae4815"]]), u = (t) => (T("data-v-75e70e9a"), t = t(), j(), t), De = {
381
+ }, H = /* @__PURE__ */ x(He, [["__scopeId", "data-v-7aae4815"]]), b = (t) => (N("data-v-75e70e9a"), t = t(), z(), t), Ke = {
418
382
  key: 1,
419
383
  class: "list"
420
- }, We = /* @__PURE__ */ u(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-headline headline" }, "Bestellung prüfen", -1)), Ue = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Ke = { class: "viur-shop-cart-address-wrap" }, Ge = { class: "viur-shop-cart-address" }, Fe = { class: "viur-shop-cart-address-headline" }, Ze = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), He = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Pe = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Je = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Le = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Me = { class: "viur-shop-cart-address" }, Qe = { class: "viur-shop-cart-address-headline" }, Xe = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), Ye = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), et = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), tt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), st = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), at = { class: "viur-shop-cart-payment" }, ot = /* @__PURE__ */ u(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-payment-method" }, [
421
- /* @__PURE__ */ e("span", null, "Zahlungsmethode:"),
422
- /* @__PURE__ */ i(" Paypal ")
423
- ], -1)), nt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-headline headline" }, "Warenkorb", -1)), rt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), it = ["src"], lt = {
384
+ }, Ge = /* @__PURE__ */ b(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-headline headline" }, "Bestellung prüfen", -1)), Ze = /* @__PURE__ */ b(() => /* @__PURE__ */ e("br", null, null, -1)), Fe = /* @__PURE__ */ b(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-address-wrap" }, [
385
+ /* @__PURE__ */ e("div", { class: "viur-shop-cart-address" }, [
386
+ /* @__PURE__ */ e("div", { class: "viur-shop-cart-address-headline" }, [
387
+ /* @__PURE__ */ i(" Versandadresse "),
388
+ /* @__PURE__ */ e("sl-button", {
389
+ outline: "",
390
+ size: "small"
391
+ }, [
392
+ /* @__PURE__ */ e("sl-icon", {
393
+ name: "pencil",
394
+ slot: "prefix"
395
+ })
396
+ ])
397
+ ]),
398
+ /* @__PURE__ */ i(" Roland Brose"),
399
+ /* @__PURE__ */ e("br"),
400
+ /* @__PURE__ */ i(" Speicherstraße 33"),
401
+ /* @__PURE__ */ e("br"),
402
+ /* @__PURE__ */ i(" 44147 Dortmund, DE"),
403
+ /* @__PURE__ */ e("br"),
404
+ /* @__PURE__ */ e("br"),
405
+ /* @__PURE__ */ i(" rb@mausbrand.de"),
406
+ /* @__PURE__ */ e("br"),
407
+ /* @__PURE__ */ i(" 0231 21 34 68 90 ")
408
+ ]),
409
+ /* @__PURE__ */ e("div", { class: "viur-shop-cart-address" }, [
410
+ /* @__PURE__ */ e("div", { class: "viur-shop-cart-address-headline" }, [
411
+ /* @__PURE__ */ i(" Rechnungsadresse "),
412
+ /* @__PURE__ */ e("sl-button", {
413
+ outline: "",
414
+ size: "small"
415
+ }, [
416
+ /* @__PURE__ */ e("sl-icon", {
417
+ name: "pencil",
418
+ slot: "prefix"
419
+ })
420
+ ])
421
+ ]),
422
+ /* @__PURE__ */ i(" Roland Brose"),
423
+ /* @__PURE__ */ e("br"),
424
+ /* @__PURE__ */ i(" Speicherstraße 33"),
425
+ /* @__PURE__ */ e("br"),
426
+ /* @__PURE__ */ i(" 44147 Dortmund, DE"),
427
+ /* @__PURE__ */ e("br"),
428
+ /* @__PURE__ */ e("br"),
429
+ /* @__PURE__ */ i(" rb@mausbrand.de"),
430
+ /* @__PURE__ */ e("br"),
431
+ /* @__PURE__ */ i(" 0231 21 34 68 90 ")
432
+ ])
433
+ ], -1)), Pe = /* @__PURE__ */ b(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-payment" }, [
434
+ /* @__PURE__ */ e("div", { class: "viur-shop-cart-payment-method" }, [
435
+ /* @__PURE__ */ e("span", null, "Zahlungsmethode:"),
436
+ /* @__PURE__ */ i(" Paypal ")
437
+ ]),
438
+ /* @__PURE__ */ e("sl-button", {
439
+ outline: "",
440
+ size: "small"
441
+ }, [
442
+ /* @__PURE__ */ e("sl-icon", {
443
+ name: "pencil",
444
+ slot: "prefix"
445
+ })
446
+ ])
447
+ ], -1)), Je = /* @__PURE__ */ b(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-headline headline" }, "Warenkorb", -1)), Le = /* @__PURE__ */ b(() => /* @__PURE__ */ e("br", null, null, -1)), Qe = {
448
+ horizontal: "",
449
+ class: "viur-shop-cart-mini-card"
450
+ }, Xe = ["src"], Ye = {
424
451
  class: "viur-shop-cart-mini-cart-header",
425
452
  slot: "header"
426
- }, ct = { class: "viur-shop-cart-mini-headline headline" }, dt = { class: "viur-shop-cart-mini-card-body-row" }, ut = { class: "viur-shop-cart-mini-card-body-info" }, _t = { class: "viur-shop-cart-mini-card-info-wrap" }, ht = /* @__PURE__ */ u(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-mini-card-info" }, [
453
+ }, et = { class: "viur-shop-cart-mini-headline headline" }, tt = { class: "viur-shop-cart-mini-card-body-row" }, st = { class: "viur-shop-cart-mini-card-body-info" }, at = { class: "viur-shop-cart-mini-card-info-wrap" }, ot = /* @__PURE__ */ b(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-mini-card-info" }, [
427
454
  /* @__PURE__ */ e("span", null, "Anzahl: "),
428
455
  /* @__PURE__ */ i(" 1 ")
429
- ], -1)), pt = { class: "viur-shop-cart-mini-card-info" }, mt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("span", null, "Preis: ", -1)), ft = /* @__PURE__ */ u(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Jetzt Bestellen", -1)), vt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("br", null, null, -1)), bt = { class: "viur-shop-cart-sidebar-info-line" }, yt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("span", null, "Zwischensumme", -1)), kt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
456
+ ], -1)), nt = { class: "viur-shop-cart-mini-card-info" }, rt = /* @__PURE__ */ b(() => /* @__PURE__ */ e("span", null, "Preis: ", -1)), it = /* @__PURE__ */ b(() => /* @__PURE__ */ e("h2", { class: "viur-shop-cart-sidebar-headline headline" }, "Jetzt Bestellen", -1)), lt = /* @__PURE__ */ b(() => /* @__PURE__ */ e("br", null, null, -1)), ct = { class: "viur-shop-cart-sidebar-info-line" }, dt = /* @__PURE__ */ b(() => /* @__PURE__ */ e("span", null, "Zwischensumme", -1)), ut = /* @__PURE__ */ b(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
430
457
  /* @__PURE__ */ e("span", null, "Rabatt"),
431
458
  /* @__PURE__ */ i(" 0 € ")
432
- ], -1)), gt = /* @__PURE__ */ u(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
459
+ ], -1)), ht = /* @__PURE__ */ b(() => /* @__PURE__ */ e("div", { class: "viur-shop-cart-sidebar-info-line" }, [
433
460
  /* @__PURE__ */ e("span", null, "Versandkosten"),
434
461
  /* @__PURE__ */ i(" 0 € ")
435
- ], -1)), wt = { class: "viur-shop-cart-sidebar-info-line total" }, $t = /* @__PURE__ */ u(() => /* @__PURE__ */ e("span", null, "Gesamt:", -1)), It = { class: "viur-shop-cart-sidebar-btn-wrap" }, Ct = {
462
+ ], -1)), pt = { class: "viur-shop-cart-sidebar-info-line total" }, _t = /* @__PURE__ */ b(() => /* @__PURE__ */ e("span", null, "Gesamt:", -1)), mt = { class: "viur-shop-cart-sidebar-btn-wrap" }, ft = ["variant", "disabled"], bt = {
436
463
  __name: "ConfirmView",
437
464
  setup(t) {
438
- const n = G(), o = R({
439
- cartIsInit: C(() => !!n.state.basket.length),
440
- itemsIsInit: C(() => !!n.state.carts[n.state.basket].items),
465
+ const n = D(), o = I({
466
+ cartIsInit: v(() => !!n.state.basket.length),
467
+ itemsIsInit: v(() => !!n.state.carts[n.state.basket].items),
441
468
  images: {},
442
469
  showOrderButton: !1
443
470
  });
444
- function p(d) {
445
- return U.get(`/json/dk_variante/view/${d}`).then(async ($) => {
446
- let b = await $.json();
447
- b = b.values;
448
- let m = b.dk_artikel.dest.image ? U.downloadUrlFor(b.dk_artikel.dest.image) : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
449
- o.images[d] = m;
450
- }), o.images[d];
471
+ function p(u) {
472
+ return A.get(`/json/dk_variante/view/${u}`).then(async (g) => {
473
+ let _ = await g.json();
474
+ _ = _.values;
475
+ let f = _.dk_artikel.dest.image ? A.downloadUrlFor(_.dk_artikel.dest.image) : "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80";
476
+ o.images[u] = f;
477
+ }), o.images[u];
451
478
  }
452
- function s(d) {
453
- d.target.checked && (o.showOrderButton = !0), d.target.checked || (o.showOrderButton = !1);
479
+ function s(u) {
480
+ u.target.checked && (o.showOrderButton = !0), u.target.checked || (o.showOrderButton = !1);
454
481
  }
455
- return E(async () => {
482
+ return q(async () => {
456
483
  await n.init();
457
- }), (d, $) => {
458
- const b = v("sl-icon"), m = v("sl-button"), y = v("sl-card"), r = v("sl-checkbox");
459
- return o.cartIsInit ? (c(), k("div", De, [
460
- We,
461
- Ue,
462
- e("div", Ke, [
463
- e("div", Ge, [
464
- e("div", Fe, [
465
- i(" Versandadresse "),
466
- l(m, {
467
- outline: "",
468
- size: "small"
469
- }, {
470
- default: f(() => [
471
- l(b, {
472
- name: "pencil",
473
- slot: "prefix"
474
- })
475
- ]),
476
- _: 1
477
- })
478
- ]),
479
- i(" Roland Brose"),
480
- Ze,
481
- i(" Speicherstraße 33"),
482
- He,
483
- i(" 44147 Dortmund, DE"),
484
- Pe,
485
- Je,
486
- i(" rb@mausbrand.de"),
487
- Le,
488
- i(" 0231 21 34 68 90 ")
489
- ]),
490
- e("div", Me, [
491
- e("div", Qe, [
492
- i(" Rechnungsadresse "),
493
- l(m, {
494
- outline: "",
495
- size: "small"
496
- }, {
497
- default: f(() => [
498
- l(b, {
499
- name: "pencil",
500
- slot: "prefix"
501
- })
502
- ]),
503
- _: 1
504
- })
505
- ]),
506
- i(" Roland Brose"),
507
- Xe,
508
- i(" Speicherstraße 33"),
509
- Ye,
510
- i(" 44147 Dortmund, DE"),
511
- et,
512
- tt,
513
- i(" rb@mausbrand.de"),
514
- st,
515
- i(" 0231 21 34 68 90 ")
516
- ])
517
- ]),
518
- e("div", at, [
519
- ot,
520
- l(m, {
521
- outline: "",
522
- size: "small"
523
- }, {
524
- default: f(() => [
525
- l(b, {
526
- name: "pencil",
527
- slot: "prefix"
528
- })
529
- ]),
530
- _: 1
531
- })
484
+ }), (u, g) => o.cartIsInit ? (d(), h("div", Ke, [
485
+ Ge,
486
+ Ze,
487
+ Fe,
488
+ Pe,
489
+ Je,
490
+ Le,
491
+ (d(!0), h($, null, B(k(n).state.carts[k(n).state.basket].items, (_) => (d(), h("sl-card", Qe, [
492
+ e("img", {
493
+ class: "viur-shop-cart-mini-card-img",
494
+ slot: "image",
495
+ src: p(_.article.dest.key)
496
+ }, null, 8, Xe),
497
+ e("div", Ye, [
498
+ e("h4", et, y(_.article.dest.shop_name) + " | 425018", 1)
532
499
  ]),
533
- nt,
534
- rt,
535
- (c(!0), k(x, null, q(z(n).state.carts[z(n).state.basket].items, (a) => (c(), N(y, {
536
- horizontal: "",
537
- class: "viur-shop-cart-mini-card"
538
- }, {
539
- default: f(() => [
540
- e("img", {
541
- class: "viur-shop-cart-mini-card-img",
542
- slot: "image",
543
- src: p(a.article.dest.key)
544
- }, null, 8, it),
545
- e("div", lt, [
546
- e("h4", ct, S(a.article.dest.shop_name) + " | 425018", 1)
547
- ]),
548
- e("div", dt, [
549
- e("div", ut, [
550
- e("div", _t, [
551
- ht,
552
- e("div", pt, [
553
- mt,
554
- i(" " + S(a.article.dest.shop_price_recommended) + " € ", 1)
555
- ])
556
- ])
500
+ e("div", tt, [
501
+ e("div", st, [
502
+ e("div", at, [
503
+ ot,
504
+ e("div", nt, [
505
+ rt,
506
+ i(" " + y(_.article.dest.shop_price_recommended) + " € ", 1)
557
507
  ])
558
508
  ])
559
- ]),
560
- _: 2
561
- }, 1024))), 256)),
562
- (c(), N(Q, { to: "#order_sidebar" }, [
563
- ft,
564
- vt,
565
- e("div", bt, [
566
- yt,
567
- i(" " + S(z(n).state.carts[z(n).state.basket].info.total) + " € ", 1)
568
- ]),
569
- kt,
570
- gt,
571
- e("div", wt, [
572
- $t,
573
- i(" " + S(z(n).state.carts[z(n).state.basket].info.total) + " € ", 1)
574
- ]),
575
- l(r, { onSlChange: s }, {
576
- default: f(() => [
577
- i(" Ich akzeptiere die geltenden AGBs und Datenschutzbestimmungen ")
578
- ]),
579
- _: 1
580
- }),
581
- e("div", It, [
582
- l(m, {
583
- variant: o.showOrderButton ? "info" : "disabled",
584
- size: "small",
585
- disabled: !o.showOrderButton
586
- }, {
587
- default: f(() => [
588
- i(" Zahlungspflichtig bestellen ")
589
- ]),
590
- _: 1
591
- }, 8, ["variant", "disabled"])
592
509
  ])
593
- ]))
594
- ])) : (c(), N(ce, { key: 0 }));
595
- };
510
+ ])
511
+ ]))), 256)),
512
+ (d(), C(J, { to: "#order_sidebar" }, [
513
+ it,
514
+ lt,
515
+ e("div", ct, [
516
+ dt,
517
+ i(" " + y(k(n).state.carts[k(n).state.basket].info.total) + " € ", 1)
518
+ ]),
519
+ ut,
520
+ ht,
521
+ e("div", pt, [
522
+ _t,
523
+ i(" " + y(k(n).state.carts[k(n).state.basket].info.total) + " € ", 1)
524
+ ]),
525
+ e("sl-checkbox", { onSlChange: s }, " Ich akzeptiere die geltenden AGBs und Datenschutzbestimmungen ", 32),
526
+ e("div", mt, [
527
+ e("sl-button", {
528
+ variant: o.showOrderButton ? "info" : "disabled",
529
+ size: "small",
530
+ disabled: !o.showOrderButton
531
+ }, " Zahlungspflichtig bestellen ", 8, ft)
532
+ ])
533
+ ]))
534
+ ])) : (d(), C(le, { key: 0 }));
596
535
  }
597
- }, St = /* @__PURE__ */ O(Ct, [["__scopeId", "data-v-75e70e9a"]]), Nt = (t) => (T("data-v-61488015"), t = t(), j(), t), zt = { class: "bind viur-shop-wrap" }, xt = { class: "viur-shop-order-step" }, Rt = { class: "viur-shop-order-status-text" }, Vt = /* @__PURE__ */ Nt(() => /* @__PURE__ */ e("div", {
536
+ }, vt = /* @__PURE__ */ x(bt, [["__scopeId", "data-v-75e70e9a"]]), yt = (t) => (N("data-v-61488015"), t = t(), z(), t), gt = { class: "bind viur-shop-wrap" }, kt = ["panel", "disabled"], wt = { class: "viur-shop-order-step" }, $t = ["name", "library"], It = { class: "viur-shop-order-status-text" }, St = {
537
+ key: 0,
538
+ name: "chevron-right",
539
+ class: "viur-shop-order-tab-check"
540
+ }, Ct = ["name"], Nt = ["onClick"], zt = ["onClick"], xt = /* @__PURE__ */ yt(() => /* @__PURE__ */ e("div", {
598
541
  class: "viur-shop-sidebar",
599
542
  id: "order_sidebar"
600
- }, null, -1)), Bt = {
543
+ }, null, -1)), Rt = {
601
544
  __name: "OrderView",
602
545
  props: {
603
546
  tabs: {
@@ -607,112 +550,109 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
607
550
  },
608
551
  emits: ["tabChange"],
609
552
  setup(t, { emit: n }) {
610
- const o = t, p = n, s = R({
611
- tabNames: C(() => $(o.tabs)),
553
+ const o = t, p = n, s = I({
554
+ tabNames: v(() => g(o.tabs)),
612
555
  isFirstTab: (r) => r === 0
613
- }), d = P(null);
614
- function $(r) {
615
- let a = [], _ = [];
616
- for (const h in r)
617
- r[h].position ? a.push([h, r[h].position]) : a.push([h, 0]);
618
- return a.sort((h, I) => h[1] - I[1]), a.forEach((h) => {
619
- _.push(h[0]);
620
- }), _;
556
+ }), u = M(null);
557
+ function g(r) {
558
+ let a = [], c = [];
559
+ for (const l in r)
560
+ r[l].position ? a.push([l, r[l].position]) : a.push([l, 0]);
561
+ return a.sort((l, S) => l[1] - S[1]), a.forEach((l) => {
562
+ c.push(l[0]);
563
+ }), c;
621
564
  }
622
- function b(r) {
565
+ function _(r) {
623
566
  p("tabChange", r);
624
567
  }
625
- function m(r) {
626
- d.value.show(r);
568
+ function f(r) {
569
+ u.value.show(r);
627
570
  }
628
- function y(r) {
629
- d.value.show(r);
571
+ function m(r) {
572
+ u.value.show(r);
630
573
  }
631
- return (r, a) => {
632
- const _ = v("sl-icon"), h = v("sl-tab"), I = v("sl-button"), D = v("sl-tab-panel"), W = v("sl-tab-group");
633
- return c(), k("div", zt, [
634
- l(W, {
635
- class: "viur-shop-order-tab",
636
- noScrollControls: "",
637
- onSlTabShow: b,
638
- ref_key: "tabGroup",
639
- ref: d
640
- }, {
641
- default: f(() => [
642
- (c(!0), k(x, null, q(s.tabNames, (g, w) => (c(), N(h, {
643
- slot: "nav",
644
- panel: g,
645
- key: g,
646
- disabled: t.tabs[g].disabled
647
- }, {
648
- default: f(() => [
649
- e("div", xt, [
650
- l(_, {
651
- name: t.tabs[g].icon.name,
652
- library: t.tabs[g].icon.library
653
- }, null, 8, ["name", "library"]),
654
- e("div", Rt, S(w + 1) + ". " + S(t.tabs[g].displayName), 1)
655
- ]),
656
- w < s.tabNames.length - 1 ? (c(), N(_, {
657
- key: 0,
658
- name: "chevron-right",
659
- class: "viur-shop-order-tab-check"
660
- })) : B("", !0)
661
- ]),
662
- _: 2
663
- }, 1032, ["panel", "disabled"]))), 128)),
664
- (c(!0), k(x, null, q(s.tabNames, (g, w) => (c(), N(D, {
665
- name: g,
666
- key: g
667
- }, {
668
- default: f(() => [
669
- (c(), N(X(t.tabs[g].component), Y({ ref_for: !0 }, t.tabs[g].props ? t.tabs[g].props : ""), null, 16)),
670
- w !== s.tabNames.length - 1 ? (c(), k("div", {
671
- key: 0,
672
- class: ee(["viur-shop-form-footer", { "flex-end": s.isFirstTab(w) }])
673
- }, [
674
- te(l(I, {
675
- type: "submit",
676
- onClick: (A) => m(s.tabNames[w - 1])
677
- }, {
678
- default: f(() => [
679
- i(" Zurück ")
680
- ]),
681
- _: 2
682
- }, 1032, ["onClick"]), [
683
- [se, w !== 0]
684
- ]),
685
- l(I, {
686
- type: "submit",
687
- variant: "primary",
688
- onClick: (A) => y(s.tabNames[w + 1])
689
- }, {
690
- default: f(() => [
691
- i(" Weiter ")
692
- ]),
693
- _: 2
694
- }, 1032, ["onClick"])
695
- ], 2)) : B("", !0)
696
- ]),
697
- _: 2
698
- }, 1032, ["name"]))), 128))
574
+ return (r, a) => (d(), h("div", gt, [
575
+ e("sl-tab-group", {
576
+ class: "viur-shop-order-tab",
577
+ noScrollControls: "",
578
+ onSlTabShow: _,
579
+ ref_key: "tabGroup",
580
+ ref: u
581
+ }, [
582
+ (d(!0), h($, null, B(s.tabNames, (c, l) => (d(), h("sl-tab", {
583
+ slot: "nav",
584
+ panel: c,
585
+ key: c,
586
+ disabled: t.tabs[c].disabled
587
+ }, [
588
+ e("div", wt, [
589
+ e("sl-icon", {
590
+ name: t.tabs[c].icon.name,
591
+ library: t.tabs[c].icon.library
592
+ }, null, 8, $t),
593
+ e("div", It, y(l + 1) + ". " + y(t.tabs[c].displayName), 1)
699
594
  ]),
700
- _: 1
701
- }, 512),
702
- Vt
703
- ]);
704
- };
595
+ l < s.tabNames.length - 1 ? (d(), h("sl-icon", St)) : R("", !0)
596
+ ], 8, kt))), 128)),
597
+ (d(!0), h($, null, B(s.tabNames, (c, l) => (d(), h("sl-tab-panel", {
598
+ name: c,
599
+ key: c
600
+ }, [
601
+ (d(), C(L(t.tabs[c].component), Q({ ref_for: !0 }, t.tabs[c].props ? t.tabs[c].props : ""), null, 16)),
602
+ l !== s.tabNames.length - 1 ? (d(), h("div", {
603
+ key: 0,
604
+ class: X(["viur-shop-form-footer", { "flex-end": s.isFirstTab(l) }])
605
+ }, [
606
+ U(e("sl-button", {
607
+ type: "submit",
608
+ onClick: (S) => f(s.tabNames[l - 1])
609
+ }, " Zurück ", 8, Nt), [
610
+ [Y, l !== 0]
611
+ ]),
612
+ e("sl-button", {
613
+ type: "submit",
614
+ variant: "primary",
615
+ onClick: (S) => m(s.tabNames[l + 1])
616
+ }, " Weiter ", 8, zt)
617
+ ], 2)) : R("", !0)
618
+ ], 8, Ct))), 128))
619
+ ], 544),
620
+ xt
621
+ ]));
705
622
  }
706
- }, qt = /* @__PURE__ */ O(Bt, [["__scopeId", "data-v-61488015"]]), Ot = {
623
+ }, Bt = /* @__PURE__ */ x(Rt, [["__scopeId", "data-v-61488015"]]), Vt = {}, O = (t) => (N("data-v-36ccc280"), t = t(), z(), t), Et = { class: "bind" }, qt = /* @__PURE__ */ O(() => /* @__PURE__ */ e("h1", { class: "headline" }, "Vielen Dank für Ihre Bestellung", -1)), Ot = /* @__PURE__ */ O(() => /* @__PURE__ */ e("br", null, null, -1)), At = /* @__PURE__ */ O(() => /* @__PURE__ */ e("p", { class: "paragraph" }, [
624
+ /* @__PURE__ */ e("strong", null, "Ihre Bestellnummer:"),
625
+ /* @__PURE__ */ i(" 123345670 ")
626
+ ], -1)), Tt = /* @__PURE__ */ O(() => /* @__PURE__ */ e("p", { class: "paragraph" }, [
627
+ /* @__PURE__ */ i(" Wir haben Ihre Bestellung erhalten und werden diese schenllstmöglich bearbeiten."),
628
+ /* @__PURE__ */ e("br"),
629
+ /* @__PURE__ */ i(" Sie erhalten in wenigen Minuten eine Bestätigung per E-Mail. "),
630
+ /* @__PURE__ */ e("div", { class: "btn-wrap" }, [
631
+ /* @__PURE__ */ e("sl-button", { size: "medium" }, " Zur Startseite "),
632
+ /* @__PURE__ */ e("sl-button", {
633
+ variant: "primary",
634
+ size: "medium"
635
+ }, " Weiter Einkaufen ")
636
+ ])
637
+ ], -1)), Dt = [
638
+ qt,
639
+ Ot,
640
+ At,
641
+ Tt
642
+ ];
643
+ function Wt(t, n) {
644
+ return d(), h("div", Et, Dt);
645
+ }
646
+ const jt = /* @__PURE__ */ x(Vt, [["render", Wt], ["__scopeId", "data-v-36ccc280"]]), Ut = {
707
647
  __name: "ExampleUsage",
708
648
  setup(t) {
709
- const n = G(), o = C(
649
+ const n = D(), o = v(
710
650
  () => n.state.basketRootNode.key ? n.state.basketRootNode.key : ""
711
- ), p = R({
651
+ ), p = I({
712
652
  rootNode: {},
713
653
  tabs: {
714
654
  cart: {
715
- component: ae(J),
655
+ component: E(H),
716
656
  props: {
717
657
  sidebar: !0,
718
658
  mode: "basket",
@@ -725,7 +665,7 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
725
665
  disabled: !1,
726
666
  atShow: null,
727
667
  atHide: null
728
- }
668
+ },
729
669
  // confirm: {
730
670
  // component: shallowRef(ConfirmView),
731
671
  // props: {},
@@ -751,57 +691,57 @@ const ce = /* @__PURE__ */ O(K, [["render", le], ["__scopeId", "data-v-46c45785"
751
691
  // atShow: null,
752
692
  // atHide: null,
753
693
  // },
754
- // orderComplete: {
755
- // component: shallowRef(OrderComplete),
756
- // props: {},
757
- // displayName: "Bestellung Abgeschlossen",
758
- // icon: { name: "order-confirmed", library: "hsk" },
759
- // position: 6,
760
- // disabled: true,
761
- // atShow: null,
762
- // atHide: null,
763
- // },
764
- // userInfo: {
765
- // component: shallowRef(UserInformation),
766
- // props: {},
767
- // displayName: "Daten Eingeben",
768
- // icon: { name: "user", library: "hsk" },
769
- // position: 3,
770
- // disabled: false,
771
- // atShow: null,
772
- // atHide: null,
773
- // },
774
- // userInfoMulti: {
775
- // component: shallowRef(UserInfoMulti),
776
- // props: {},
777
- // displayName: "Daten Eingeben (Multi)",
778
- // icon: { name: "user", library: "hsk" },
779
- // position: 4,
780
- // disabled: false,
781
- // atShow: null,
782
- // atHide: null,
783
- // },
694
+ orderComplete: {
695
+ component: E(jt),
696
+ props: {},
697
+ displayName: "Bestellung Abgeschlossen",
698
+ icon: { name: "order-confirmed", library: "hsk" },
699
+ position: 6,
700
+ disabled: !0,
701
+ atShow: null,
702
+ atHide: null
703
+ },
704
+ userInfo: {
705
+ component: E(UserInformation),
706
+ props: {},
707
+ displayName: "Daten Eingeben",
708
+ icon: { name: "user", library: "hsk" },
709
+ position: 3,
710
+ disabled: !1,
711
+ atShow: null,
712
+ atHide: null
713
+ },
714
+ userInfoMulti: {
715
+ component: E(UserInfoMulti),
716
+ props: {},
717
+ displayName: "Daten Eingeben (Multi)",
718
+ icon: { name: "user", library: "hsk" },
719
+ position: 4,
720
+ disabled: !1,
721
+ atShow: null,
722
+ atHide: null
723
+ }
784
724
  }
785
725
  });
786
- function s(d) {
787
- (d == null ? void 0 : d.detail.name) === "confirm" && (p.tabs.orderComplete.disabled = !1);
726
+ function s(u) {
727
+ (u == null ? void 0 : u.detail.name) === "confirm" && (p.tabs.orderComplete.disabled = !1);
788
728
  }
789
- return E(async () => {
729
+ return q(async () => {
790
730
  await n.init(), await n.getAdressStructure(), console.log("debug init exampleusage :", n.state.basketRootNode);
791
- }), (d, $) => (c(), N(qt, {
731
+ }), (u, g) => (d(), C(Bt, {
792
732
  tabs: p.tabs,
793
733
  onTabChange: s
794
734
  }, null, 8, ["tabs"]));
795
735
  }
796
- }, Wt = {
736
+ }, Ft = {
797
737
  install(t) {
798
- t.component("CartView", J), t.component("ExampleUsage", Ot), t.component("ConfirmView", St);
738
+ t.component("CartView", H), t.component("ExampleUsage", Ut), t.component("ConfirmView", vt);
799
739
  }
800
740
  };
801
741
  export {
802
- J as CartView,
803
- St as ConfirmView,
804
- Ot as ExampleUsage,
805
- Wt as default,
806
- G as useCartStore
742
+ H as CartView,
743
+ vt as ConfirmView,
744
+ Ut as ExampleUsage,
745
+ Ft as default,
746
+ D as useCartStore
807
747
  };