@gomusdev/web-components 3.0.0-next.1 → 3.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist-js/gomus-webcomponents.iife.js +17 -45
- package/dist-js/gomus-webcomponents.js +17 -45
- package/dist-js/gomus-webcomponents.min.iife.js +11 -11
- package/dist-js/gomus-webcomponents.min.js +742 -762
- package/dist-js/src/lib/stores/shop.svelte.d.ts +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 3.0.0-next.
|
|
3
|
+
## 3.0.0-next.3 (2026-05-21)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* include 2.1.1 patches from master
|
|
8
|
+
|
|
9
|
+
## 3.0.0-next.1 (2026-05-21)
|
|
4
10
|
|
|
5
11
|
### ⚠ BREAKING CHANGES
|
|
6
12
|
|
|
@@ -25,6 +31,7 @@ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
25
31
|
### Bug Fixes
|
|
26
32
|
|
|
27
33
|
* flush unsubmitted coupon token before checkout
|
|
34
|
+
* **shop:** remove dangerous clearCache() that wiped auth and cart, closes [this.#data](https://gitlab.giantmonkey.de/gomus/this./issues/data) [gomus/frontend#24](https://gitlab.giantmonkey.de/gomus/frontend/issues/24)
|
|
28
35
|
* validate coupon on go-after-validation, not just submit
|
|
29
36
|
|
|
30
37
|
### Documentation
|
|
@@ -33,11 +40,11 @@ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|
|
33
40
|
|
|
34
41
|
# Changelog
|
|
35
42
|
|
|
36
|
-
## 2.1.1
|
|
43
|
+
## 2.1.1 (2026-05-21)
|
|
37
44
|
|
|
38
45
|
### Bug Fixes
|
|
39
46
|
|
|
40
|
-
*
|
|
47
|
+
* add optional chaining to barcode id access
|
|
41
48
|
|
|
42
49
|
## 2.1.0 (2026-05-05)
|
|
43
50
|
|
|
@@ -12666,10 +12666,6 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12666
12666
|
}
|
|
12667
12667
|
return get$2(this.#data)[dataKey];
|
|
12668
12668
|
}
|
|
12669
|
-
clearCache() {
|
|
12670
|
-
this.#fetchStatus = {};
|
|
12671
|
-
set(this.#data, {}, true);
|
|
12672
|
-
}
|
|
12673
12669
|
get museums() {
|
|
12674
12670
|
return this.fetchAndCache("/api/v4/museums", "museums", "museums");
|
|
12675
12671
|
}
|
|
@@ -16688,7 +16684,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16688
16684
|
host.replaceChildren(element);
|
|
16689
16685
|
return element;
|
|
16690
16686
|
}
|
|
16691
|
-
var root_1$
|
|
16687
|
+
var root_1$p = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>`, 3);
|
|
16692
16688
|
function Form($$anchor, $$props) {
|
|
16693
16689
|
push($$props, true);
|
|
16694
16690
|
let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
|
|
@@ -16731,7 +16727,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16731
16727
|
var node = first_child(fragment);
|
|
16732
16728
|
{
|
|
16733
16729
|
var consequent = ($$anchor2) => {
|
|
16734
|
-
var fragment_1 = root_1$
|
|
16730
|
+
var fragment_1 = root_1$p();
|
|
16735
16731
|
var go_all_fields = first_child(fragment_1);
|
|
16736
16732
|
var go_form_feedback = sibling(go_all_fields, 2);
|
|
16737
16733
|
var go_submit = sibling(go_form_feedback, 2);
|
|
@@ -17013,7 +17009,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17013
17009
|
const KEY$3 = "go-cart-details";
|
|
17014
17010
|
const setCartDetails = createSetDetails(KEY$3);
|
|
17015
17011
|
const getCartDetails = createGetDetails(KEY$3);
|
|
17016
|
-
var root_1$
|
|
17012
|
+
var root_1$o = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
|
|
17017
17013
|
var root$c = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>`, 1);
|
|
17018
17014
|
function Event$2($$anchor, $$props) {
|
|
17019
17015
|
push($$props, true);
|
|
@@ -17041,7 +17037,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17041
17037
|
var node = sibling(span);
|
|
17042
17038
|
{
|
|
17043
17039
|
var consequent = ($$anchor2) => {
|
|
17044
|
-
var fragment_1 = root_1$
|
|
17040
|
+
var fragment_1 = root_1$o();
|
|
17045
17041
|
var span_3 = first_child(fragment_1);
|
|
17046
17042
|
var text_2 = child(span_3, true);
|
|
17047
17043
|
reset(span_3);
|
|
@@ -17073,7 +17069,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17073
17069
|
}
|
|
17074
17070
|
create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
|
|
17075
17071
|
var root_2$r = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
17076
|
-
var root_1$
|
|
17072
|
+
var root_1$n = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
17077
17073
|
var root$b = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
|
|
17078
17074
|
function Ticket($$anchor, $$props) {
|
|
17079
17075
|
push($$props, true);
|
|
@@ -17094,7 +17090,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17094
17090
|
var node = sibling(span, 2);
|
|
17095
17091
|
{
|
|
17096
17092
|
var consequent_1 = ($$anchor2) => {
|
|
17097
|
-
var fragment_1 = root_1$
|
|
17093
|
+
var fragment_1 = root_1$n();
|
|
17098
17094
|
var span_1 = first_child(fragment_1);
|
|
17099
17095
|
var text_1 = child(span_1, true);
|
|
17100
17096
|
reset(span_1);
|
|
@@ -17150,7 +17146,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17150
17146
|
var root_9$4 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
17151
17147
|
var root_8$3 = /* @__PURE__ */ from_html(`<select class="go-cart-item-select"></select>`);
|
|
17152
17148
|
var root_10$1 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
|
|
17153
|
-
var root_1$
|
|
17149
|
+
var root_1$m = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>`);
|
|
17154
17150
|
function Item$1($$anchor, $$props) {
|
|
17155
17151
|
push($$props, true);
|
|
17156
17152
|
let displayItem = prop($$props, "displayItem", 7), displayCart = prop($$props, "displayCart", 7), preview = prop($$props, "preview", 7);
|
|
@@ -17211,7 +17207,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17211
17207
|
var node = first_child(fragment);
|
|
17212
17208
|
{
|
|
17213
17209
|
var consequent_5 = ($$anchor2) => {
|
|
17214
|
-
var article = root_1$
|
|
17210
|
+
var article = root_1$m();
|
|
17215
17211
|
var ul = child(article);
|
|
17216
17212
|
var li = child(ul);
|
|
17217
17213
|
var node_1 = child(li);
|
|
@@ -17356,7 +17352,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17356
17352
|
create_custom_element(Item$1, { displayItem: {}, displayCart: {}, preview: {} }, [], [], { mode: "open" });
|
|
17357
17353
|
var root_2$q = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove"></li>`);
|
|
17358
17354
|
var root_3$9 = /* @__PURE__ */ from_html(`<li class="go-cart-item"><!></li>`);
|
|
17359
|
-
var root_1$
|
|
17355
|
+
var root_1$l = /* @__PURE__ */ from_html(`<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>`);
|
|
17360
17356
|
function CartItems($$anchor, $$props) {
|
|
17361
17357
|
push($$props, true);
|
|
17362
17358
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17365,7 +17361,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17365
17361
|
var node = first_child(fragment);
|
|
17366
17362
|
{
|
|
17367
17363
|
var consequent_1 = ($$anchor2) => {
|
|
17368
|
-
var ol = root_1$
|
|
17364
|
+
var ol = root_1$l();
|
|
17369
17365
|
var li = child(ol);
|
|
17370
17366
|
var ul = child(li);
|
|
17371
17367
|
var li_1 = child(ul);
|
|
@@ -17437,7 +17433,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17437
17433
|
customElements.define("go-cart-items", create_custom_element(CartItems, {}, [], []));
|
|
17438
17434
|
var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>`);
|
|
17439
17435
|
var root_2$p = /* @__PURE__ */ from_html(`<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>`);
|
|
17440
|
-
var root_1$
|
|
17436
|
+
var root_1$k = /* @__PURE__ */ from_html(`<ol data-testid="cart-coupons"></ol>`);
|
|
17441
17437
|
function CartCoupons($$anchor, $$props) {
|
|
17442
17438
|
push($$props, true);
|
|
17443
17439
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17446,7 +17442,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17446
17442
|
var node = first_child(fragment);
|
|
17447
17443
|
{
|
|
17448
17444
|
var consequent_1 = ($$anchor2) => {
|
|
17449
|
-
var ol = root_1$
|
|
17445
|
+
var ol = root_1$k();
|
|
17450
17446
|
each(ol, 20, () => get$2(details).displayCart.coupons, (coupon) => coupon, ($$anchor3, coupon) => {
|
|
17451
17447
|
var li = root_2$p();
|
|
17452
17448
|
let classes;
|
|
@@ -17497,7 +17493,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17497
17493
|
}
|
|
17498
17494
|
delegate(["click"]);
|
|
17499
17495
|
customElements.define("go-cart-coupons", create_custom_element(CartCoupons, {}, [], []));
|
|
17500
|
-
var root_1$
|
|
17496
|
+
var root_1$j = /* @__PURE__ */ from_html(`<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>`);
|
|
17501
17497
|
function CartTotalAmount($$anchor, $$props) {
|
|
17502
17498
|
push($$props, true);
|
|
17503
17499
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17506,7 +17502,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17506
17502
|
var node = first_child(fragment);
|
|
17507
17503
|
{
|
|
17508
17504
|
var consequent = ($$anchor2) => {
|
|
17509
|
-
var span = root_1$
|
|
17505
|
+
var span = root_1$j();
|
|
17510
17506
|
var text2 = child(span, true);
|
|
17511
17507
|
reset(span);
|
|
17512
17508
|
template_effect(($0) => set_text(text2, $0), [() => formatCurrency(get$2(details).totalPriceCents)]);
|
|
@@ -17520,10 +17516,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17520
17516
|
pop();
|
|
17521
17517
|
}
|
|
17522
17518
|
customElements.define("go-cart-total-amount", create_custom_element(CartTotalAmount, {}, [], []));
|
|
17523
|
-
var root_1$j = /* @__PURE__ */ from_html(`<go-cart-items></go-cart-items> <go-cart-coupons></go-cart-coupons> <go-cart-total-amount></go-cart-total-amount>`, 3);
|
|
17524
17519
|
function Cart($$anchor, $$props) {
|
|
17525
17520
|
push($$props, true);
|
|
17526
|
-
const preview = prop($$props, "preview", 7, false)
|
|
17521
|
+
const preview = prop($$props, "preview", 7, false);
|
|
17527
17522
|
const details = new CartDetails();
|
|
17528
17523
|
setCartDetails($$props.$$host, details);
|
|
17529
17524
|
user_effect(() => {
|
|
@@ -17542,37 +17537,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17542
17537
|
set preview($$value = false) {
|
|
17543
17538
|
preview($$value);
|
|
17544
17539
|
flushSync();
|
|
17545
|
-
},
|
|
17546
|
-
get default() {
|
|
17547
|
-
return useDefault();
|
|
17548
|
-
},
|
|
17549
|
-
set default($$value = false) {
|
|
17550
|
-
useDefault($$value);
|
|
17551
|
-
flushSync();
|
|
17552
17540
|
}
|
|
17553
17541
|
};
|
|
17554
|
-
var fragment = comment();
|
|
17555
|
-
var node = first_child(fragment);
|
|
17556
|
-
{
|
|
17557
|
-
var consequent = ($$anchor2) => {
|
|
17558
|
-
var fragment_1 = root_1$j();
|
|
17559
|
-
var go_cart_items = first_child(fragment_1);
|
|
17560
|
-
var go_cart_coupons = sibling(go_cart_items, 2);
|
|
17561
|
-
sibling(go_cart_coupons, 2);
|
|
17562
|
-
append($$anchor2, fragment_1);
|
|
17563
|
-
};
|
|
17564
|
-
if_block(node, ($$render) => {
|
|
17565
|
-
if (useDefault()) $$render(consequent);
|
|
17566
|
-
});
|
|
17567
|
-
}
|
|
17568
|
-
append($$anchor, fragment);
|
|
17569
17542
|
return pop($$exports);
|
|
17570
17543
|
}
|
|
17571
17544
|
customElements.define("go-cart", create_custom_element(
|
|
17572
17545
|
Cart,
|
|
17573
17546
|
{
|
|
17574
|
-
preview: { attribute: "preview", reflect: true, type: "Boolean" }
|
|
17575
|
-
default: { attribute: "default", reflect: true, type: "Boolean" }
|
|
17547
|
+
preview: { attribute: "preview", reflect: true, type: "Boolean" }
|
|
17576
17548
|
},
|
|
17577
17549
|
[],
|
|
17578
17550
|
[]
|
|
@@ -35126,7 +35098,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
35126
35098
|
var node_2 = sibling(span, 2);
|
|
35127
35099
|
{
|
|
35128
35100
|
var consequent_2 = ($$anchor4) => {
|
|
35129
|
-
const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]
|
|
35101
|
+
const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]?.id);
|
|
35130
35102
|
var fragment_2 = root_3$2();
|
|
35131
35103
|
var node_3 = first_child(fragment_2);
|
|
35132
35104
|
{
|
|
@@ -12666,10 +12666,6 @@ class Shop {
|
|
|
12666
12666
|
}
|
|
12667
12667
|
return get$2(this.#data)[dataKey];
|
|
12668
12668
|
}
|
|
12669
|
-
clearCache() {
|
|
12670
|
-
this.#fetchStatus = {};
|
|
12671
|
-
set(this.#data, {}, true);
|
|
12672
|
-
}
|
|
12673
12669
|
get museums() {
|
|
12674
12670
|
return this.fetchAndCache("/api/v4/museums", "museums", "museums");
|
|
12675
12671
|
}
|
|
@@ -16688,7 +16684,7 @@ function wrapInElement(host, tag, props) {
|
|
|
16688
16684
|
host.replaceChildren(element);
|
|
16689
16685
|
return element;
|
|
16690
16686
|
}
|
|
16691
|
-
var root_1$
|
|
16687
|
+
var root_1$p = /* @__PURE__ */ from_html(`<go-all-fields></go-all-fields> <go-form-feedback><go-errors-feedback></go-errors-feedback> <go-success-feedback></go-success-feedback></go-form-feedback> <go-submit> </go-submit>`, 3);
|
|
16692
16688
|
function Form($$anchor, $$props) {
|
|
16693
16689
|
push($$props, true);
|
|
16694
16690
|
let formId = prop($$props, "formId", 7), custom2 = prop($$props, "custom", 7);
|
|
@@ -16731,7 +16727,7 @@ function Form($$anchor, $$props) {
|
|
|
16731
16727
|
var node = first_child(fragment);
|
|
16732
16728
|
{
|
|
16733
16729
|
var consequent = ($$anchor2) => {
|
|
16734
|
-
var fragment_1 = root_1$
|
|
16730
|
+
var fragment_1 = root_1$p();
|
|
16735
16731
|
var go_all_fields = first_child(fragment_1);
|
|
16736
16732
|
var go_form_feedback = sibling(go_all_fields, 2);
|
|
16737
16733
|
var go_submit = sibling(go_form_feedback, 2);
|
|
@@ -17013,7 +17009,7 @@ class CartDetails {
|
|
|
17013
17009
|
const KEY$3 = "go-cart-details";
|
|
17014
17010
|
const setCartDetails = createSetDetails(KEY$3);
|
|
17015
17011
|
const getCartDetails = createGetDetails(KEY$3);
|
|
17016
|
-
var root_1$
|
|
17012
|
+
var root_1$o = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span><span class="go-cart-item-time" data-testid="cart-item-time"> </span>`, 1);
|
|
17017
17013
|
var root$c = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"><span class="go-cart-item-title-event-title"> </span><span class="go-cart-item-title-ticket-title"> </span></span><!>`, 1);
|
|
17018
17014
|
function Event$2($$anchor, $$props) {
|
|
17019
17015
|
push($$props, true);
|
|
@@ -17041,7 +17037,7 @@ function Event$2($$anchor, $$props) {
|
|
|
17041
17037
|
var node = sibling(span);
|
|
17042
17038
|
{
|
|
17043
17039
|
var consequent = ($$anchor2) => {
|
|
17044
|
-
var fragment_1 = root_1$
|
|
17040
|
+
var fragment_1 = root_1$o();
|
|
17045
17041
|
var span_3 = first_child(fragment_1);
|
|
17046
17042
|
var text_2 = child(span_3, true);
|
|
17047
17043
|
reset(span_3);
|
|
@@ -17073,7 +17069,7 @@ function Event$2($$anchor, $$props) {
|
|
|
17073
17069
|
}
|
|
17074
17070
|
create_custom_element(Event$2, { cartItem: {} }, [], [], { mode: "open" });
|
|
17075
17071
|
var root_2$r = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
17076
|
-
var root_1$
|
|
17072
|
+
var root_1$n = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
17077
17073
|
var root$b = /* @__PURE__ */ from_html(`<span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!>`, 1);
|
|
17078
17074
|
function Ticket($$anchor, $$props) {
|
|
17079
17075
|
push($$props, true);
|
|
@@ -17094,7 +17090,7 @@ function Ticket($$anchor, $$props) {
|
|
|
17094
17090
|
var node = sibling(span, 2);
|
|
17095
17091
|
{
|
|
17096
17092
|
var consequent_1 = ($$anchor2) => {
|
|
17097
|
-
var fragment_1 = root_1$
|
|
17093
|
+
var fragment_1 = root_1$n();
|
|
17098
17094
|
var span_1 = first_child(fragment_1);
|
|
17099
17095
|
var text_1 = child(span_1, true);
|
|
17100
17096
|
reset(span_1);
|
|
@@ -17150,7 +17146,7 @@ var root_7$3 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
|
17150
17146
|
var root_9$4 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
17151
17147
|
var root_8$3 = /* @__PURE__ */ from_html(`<select class="go-cart-item-select"></select>`);
|
|
17152
17148
|
var root_10$1 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
|
|
17153
|
-
var root_1$
|
|
17149
|
+
var root_1$m = /* @__PURE__ */ from_html(`<article class="go-cart-item-content"><ul><li class="go-cart-item-title-container"><!></li> <li class="go-cart-item-price"><!></li> <li class="go-cart-item-count"><!></li> <!> <li class="go-cart-item-sum"> </li></ul></article>`);
|
|
17154
17150
|
function Item$1($$anchor, $$props) {
|
|
17155
17151
|
push($$props, true);
|
|
17156
17152
|
let displayItem = prop($$props, "displayItem", 7), displayCart = prop($$props, "displayCart", 7), preview = prop($$props, "preview", 7);
|
|
@@ -17211,7 +17207,7 @@ function Item$1($$anchor, $$props) {
|
|
|
17211
17207
|
var node = first_child(fragment);
|
|
17212
17208
|
{
|
|
17213
17209
|
var consequent_5 = ($$anchor2) => {
|
|
17214
|
-
var article = root_1$
|
|
17210
|
+
var article = root_1$m();
|
|
17215
17211
|
var ul = child(article);
|
|
17216
17212
|
var li = child(ul);
|
|
17217
17213
|
var node_1 = child(li);
|
|
@@ -17356,7 +17352,7 @@ delegate(["change", "click"]);
|
|
|
17356
17352
|
create_custom_element(Item$1, { displayItem: {}, displayCart: {}, preview: {} }, [], [], { mode: "open" });
|
|
17357
17353
|
var root_2$q = /* @__PURE__ */ from_html(`<li class="go-cart-header-remove"></li>`);
|
|
17358
17354
|
var root_3$9 = /* @__PURE__ */ from_html(`<li class="go-cart-item"><!></li>`);
|
|
17359
|
-
var root_1$
|
|
17355
|
+
var root_1$l = /* @__PURE__ */ from_html(`<ol data-testid="cart-items"><li class="go-cart-header"><ul><li class="go-cart-header-title"> </li> <li class="go-cart-header-price"> </li> <li class="go-cart-header-count"> </li> <!> <li class="go-cart-header-sum"> </li></ul></li> <!></ol>`);
|
|
17360
17356
|
function CartItems($$anchor, $$props) {
|
|
17361
17357
|
push($$props, true);
|
|
17362
17358
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17365,7 +17361,7 @@ function CartItems($$anchor, $$props) {
|
|
|
17365
17361
|
var node = first_child(fragment);
|
|
17366
17362
|
{
|
|
17367
17363
|
var consequent_1 = ($$anchor2) => {
|
|
17368
|
-
var ol = root_1$
|
|
17364
|
+
var ol = root_1$l();
|
|
17369
17365
|
var li = child(ol);
|
|
17370
17366
|
var ul = child(li);
|
|
17371
17367
|
var li_1 = child(ul);
|
|
@@ -17437,7 +17433,7 @@ function CartItems($$anchor, $$props) {
|
|
|
17437
17433
|
customElements.define("go-cart-items", create_custom_element(CartItems, {}, [], []));
|
|
17438
17434
|
var root_3$8 = /* @__PURE__ */ from_html(`<li class="go-cart-coupon-remove-cell"><button class="go-cart-remove go-cart-coupon-remove">⨉</button></li>`);
|
|
17439
17435
|
var root_2$p = /* @__PURE__ */ from_html(`<li><article class="go-cart-coupon-content"><ul><li class="go-cart-coupon-code"> </li> <!></ul></article></li>`);
|
|
17440
|
-
var root_1$
|
|
17436
|
+
var root_1$k = /* @__PURE__ */ from_html(`<ol data-testid="cart-coupons"></ol>`);
|
|
17441
17437
|
function CartCoupons($$anchor, $$props) {
|
|
17442
17438
|
push($$props, true);
|
|
17443
17439
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17446,7 +17442,7 @@ function CartCoupons($$anchor, $$props) {
|
|
|
17446
17442
|
var node = first_child(fragment);
|
|
17447
17443
|
{
|
|
17448
17444
|
var consequent_1 = ($$anchor2) => {
|
|
17449
|
-
var ol = root_1$
|
|
17445
|
+
var ol = root_1$k();
|
|
17450
17446
|
each(ol, 20, () => get$2(details).displayCart.coupons, (coupon) => coupon, ($$anchor3, coupon) => {
|
|
17451
17447
|
var li = root_2$p();
|
|
17452
17448
|
let classes;
|
|
@@ -17497,7 +17493,7 @@ function CartCoupons($$anchor, $$props) {
|
|
|
17497
17493
|
}
|
|
17498
17494
|
delegate(["click"]);
|
|
17499
17495
|
customElements.define("go-cart-coupons", create_custom_element(CartCoupons, {}, [], []));
|
|
17500
|
-
var root_1$
|
|
17496
|
+
var root_1$j = /* @__PURE__ */ from_html(`<span class="go-cart-total-amount" data-testid="cart-total-amount"> </span>`);
|
|
17501
17497
|
function CartTotalAmount($$anchor, $$props) {
|
|
17502
17498
|
push($$props, true);
|
|
17503
17499
|
const _details = getCartDetails($$props.$$host);
|
|
@@ -17506,7 +17502,7 @@ function CartTotalAmount($$anchor, $$props) {
|
|
|
17506
17502
|
var node = first_child(fragment);
|
|
17507
17503
|
{
|
|
17508
17504
|
var consequent = ($$anchor2) => {
|
|
17509
|
-
var span = root_1$
|
|
17505
|
+
var span = root_1$j();
|
|
17510
17506
|
var text2 = child(span, true);
|
|
17511
17507
|
reset(span);
|
|
17512
17508
|
template_effect(($0) => set_text(text2, $0), [() => formatCurrency(get$2(details).totalPriceCents)]);
|
|
@@ -17520,10 +17516,9 @@ function CartTotalAmount($$anchor, $$props) {
|
|
|
17520
17516
|
pop();
|
|
17521
17517
|
}
|
|
17522
17518
|
customElements.define("go-cart-total-amount", create_custom_element(CartTotalAmount, {}, [], []));
|
|
17523
|
-
var root_1$j = /* @__PURE__ */ from_html(`<go-cart-items></go-cart-items> <go-cart-coupons></go-cart-coupons> <go-cart-total-amount></go-cart-total-amount>`, 3);
|
|
17524
17519
|
function Cart($$anchor, $$props) {
|
|
17525
17520
|
push($$props, true);
|
|
17526
|
-
const preview = prop($$props, "preview", 7, false)
|
|
17521
|
+
const preview = prop($$props, "preview", 7, false);
|
|
17527
17522
|
const details = new CartDetails();
|
|
17528
17523
|
setCartDetails($$props.$$host, details);
|
|
17529
17524
|
user_effect(() => {
|
|
@@ -17542,37 +17537,14 @@ function Cart($$anchor, $$props) {
|
|
|
17542
17537
|
set preview($$value = false) {
|
|
17543
17538
|
preview($$value);
|
|
17544
17539
|
flushSync();
|
|
17545
|
-
},
|
|
17546
|
-
get default() {
|
|
17547
|
-
return useDefault();
|
|
17548
|
-
},
|
|
17549
|
-
set default($$value = false) {
|
|
17550
|
-
useDefault($$value);
|
|
17551
|
-
flushSync();
|
|
17552
17540
|
}
|
|
17553
17541
|
};
|
|
17554
|
-
var fragment = comment();
|
|
17555
|
-
var node = first_child(fragment);
|
|
17556
|
-
{
|
|
17557
|
-
var consequent = ($$anchor2) => {
|
|
17558
|
-
var fragment_1 = root_1$j();
|
|
17559
|
-
var go_cart_items = first_child(fragment_1);
|
|
17560
|
-
var go_cart_coupons = sibling(go_cart_items, 2);
|
|
17561
|
-
sibling(go_cart_coupons, 2);
|
|
17562
|
-
append($$anchor2, fragment_1);
|
|
17563
|
-
};
|
|
17564
|
-
if_block(node, ($$render) => {
|
|
17565
|
-
if (useDefault()) $$render(consequent);
|
|
17566
|
-
});
|
|
17567
|
-
}
|
|
17568
|
-
append($$anchor, fragment);
|
|
17569
17542
|
return pop($$exports);
|
|
17570
17543
|
}
|
|
17571
17544
|
customElements.define("go-cart", create_custom_element(
|
|
17572
17545
|
Cart,
|
|
17573
17546
|
{
|
|
17574
|
-
preview: { attribute: "preview", reflect: true, type: "Boolean" }
|
|
17575
|
-
default: { attribute: "default", reflect: true, type: "Boolean" }
|
|
17547
|
+
preview: { attribute: "preview", reflect: true, type: "Boolean" }
|
|
17576
17548
|
},
|
|
17577
17549
|
[],
|
|
17578
17550
|
[]
|
|
@@ -35126,7 +35098,7 @@ function TicketSale($$anchor, $$props) {
|
|
|
35126
35098
|
var node_2 = sibling(span, 2);
|
|
35127
35099
|
{
|
|
35128
35100
|
var consequent_2 = ($$anchor4) => {
|
|
35129
|
-
const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]
|
|
35101
|
+
const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2]?.id);
|
|
35130
35102
|
var fragment_2 = root_3$2();
|
|
35131
35103
|
var node_3 = first_child(fragment_2);
|
|
35132
35104
|
{
|