@gomusdev/web-components 1.10.0 → 1.12.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -12510,7 +12510,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12510
12510
|
const timeRegex2 = `${time2}(?:${opts.join("|")})`;
|
|
12511
12511
|
return new RegExp(`^${dateSource}T(?:${timeRegex2})$`);
|
|
12512
12512
|
}
|
|
12513
|
-
const string$
|
|
12513
|
+
const string$1 = (params) => {
|
|
12514
12514
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
12515
12515
|
return new RegExp(`^${regex}$`);
|
|
12516
12516
|
};
|
|
@@ -12858,7 +12858,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
12858
12858
|
});
|
|
12859
12859
|
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
12860
12860
|
$ZodType.init(inst, def);
|
|
12861
|
-
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$
|
|
12861
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
12862
12862
|
inst._zod.parse = (payload, _) => {
|
|
12863
12863
|
if (def.coerce)
|
|
12864
12864
|
try {
|
|
@@ -14215,7 +14215,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14215
14215
|
inst.time = (params) => inst.check(time(params));
|
|
14216
14216
|
inst.duration = (params) => inst.check(duration(params));
|
|
14217
14217
|
});
|
|
14218
|
-
function string
|
|
14218
|
+
function string(params) {
|
|
14219
14219
|
return _string(ZodString, params);
|
|
14220
14220
|
}
|
|
14221
14221
|
const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
@@ -14519,7 +14519,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14519
14519
|
placeholder: "",
|
|
14520
14520
|
description: "",
|
|
14521
14521
|
autocomplete: "email",
|
|
14522
|
-
validator: string
|
|
14522
|
+
validator: string().email("Invalid email")
|
|
14523
14523
|
},
|
|
14524
14524
|
confirmEmail: {
|
|
14525
14525
|
key: "confirmEmail",
|
|
@@ -14529,7 +14529,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14529
14529
|
placeholder: "",
|
|
14530
14530
|
description: "",
|
|
14531
14531
|
autocomplete: "email",
|
|
14532
|
-
validator: string
|
|
14532
|
+
validator: string().email("Invalid email").min(1, "Please confirm your email")
|
|
14533
14533
|
},
|
|
14534
14534
|
password: {
|
|
14535
14535
|
key: "password",
|
|
@@ -14548,7 +14548,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14548
14548
|
placeholder: "",
|
|
14549
14549
|
description: "",
|
|
14550
14550
|
autocomplete: "new-password",
|
|
14551
|
-
validator: string
|
|
14551
|
+
validator: string().min(6, "Password must be at least 6 characters")
|
|
14552
14552
|
},
|
|
14553
14553
|
confirmPassword: {
|
|
14554
14554
|
key: "confirmPassword",
|
|
@@ -14558,7 +14558,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14558
14558
|
placeholder: "",
|
|
14559
14559
|
description: "",
|
|
14560
14560
|
autocomplete: "new-password",
|
|
14561
|
-
validator: string
|
|
14561
|
+
validator: string().min(6, "Please confirm your password")
|
|
14562
14562
|
},
|
|
14563
14563
|
addressee: {
|
|
14564
14564
|
key: "addressee",
|
|
@@ -14658,7 +14658,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14658
14658
|
placeholder: "",
|
|
14659
14659
|
description: "",
|
|
14660
14660
|
autocomplete: "off",
|
|
14661
|
-
validator: string
|
|
14661
|
+
validator: string().date()
|
|
14662
14662
|
}
|
|
14663
14663
|
};
|
|
14664
14664
|
function createField(data, required) {
|
|
@@ -15373,12 +15373,13 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15373
15373
|
return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(priceCents / 100);
|
|
15374
15374
|
}
|
|
15375
15375
|
var root_2$p = /* @__PURE__ */ from_html(`<li data-go-cart-header-remove="">remove</li>`);
|
|
15376
|
-
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
15377
|
-
var root_4$4 = /* @__PURE__ */ from_html(`<span> </span> <!>`, 1);
|
|
15376
|
+
var root_5$2 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
15377
|
+
var root_4$4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
15378
15378
|
var root_6$1 = /* @__PURE__ */ from_html(`<li data-go-cart-item-remove=""><button>⨉</button></li>`);
|
|
15379
|
-
var root_3$6 = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <!> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
|
|
15379
|
+
var root_3$6 = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""><span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <!> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
|
|
15380
15380
|
var root_7$3 = /* @__PURE__ */ from_html(`<li data-go-cart-footer-remove=""></li>`);
|
|
15381
|
-
var
|
|
15381
|
+
var root_8 = /* @__PURE__ */ from_html(`<a href="javascript:void(0);" class="go-cart-checkout-button" data-testid="checkout-button">Checkout</a>`);
|
|
15382
|
+
var root_1$b = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li data-go-cart-header="" data-testid="cart-header"><ul><li data-go-cart-header-title="">Product</li> <li data-go-cart-header-price="">Price</li> <li data-go-cart-header-count="">Count</li> <!> <li data-go-cart-header-sum="">Sum</li></ul></li> <!> <li data-go-cart-footer="" data-testid="cart-footer"><ul><li data-go-cart-footer-title=""></li> <li data-go-cart-footer-price=""></li> <li data-go-cart-footer-count=""></li> <!> <li data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol> <!>`, 1);
|
|
15382
15383
|
function Cart($$anchor, $$props) {
|
|
15383
15384
|
push($$props, true);
|
|
15384
15385
|
const preview = prop($$props, "preview", 7, false);
|
|
@@ -15399,7 +15400,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15399
15400
|
var fragment = comment();
|
|
15400
15401
|
var node = first_child(fragment);
|
|
15401
15402
|
{
|
|
15402
|
-
var
|
|
15403
|
+
var consequent_6 = ($$anchor2) => {
|
|
15403
15404
|
var fragment_1 = root_1$b();
|
|
15404
15405
|
var ol = first_child(fragment_1);
|
|
15405
15406
|
var li = child(ol);
|
|
@@ -15423,22 +15424,24 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15423
15424
|
var article = child(li_2);
|
|
15424
15425
|
var ul_1 = child(article);
|
|
15425
15426
|
var li_3 = child(ul_1);
|
|
15426
|
-
var
|
|
15427
|
-
var
|
|
15427
|
+
var span = child(li_3);
|
|
15428
|
+
var text2 = child(span, true);
|
|
15429
|
+
reset(span);
|
|
15430
|
+
var node_3 = sibling(span, 2);
|
|
15428
15431
|
{
|
|
15429
15432
|
var consequent_2 = ($$anchor4) => {
|
|
15430
15433
|
var fragment_2 = root_4$4();
|
|
15431
|
-
var
|
|
15432
|
-
var text_1 = child(
|
|
15433
|
-
reset(
|
|
15434
|
-
var node_4 = sibling(
|
|
15434
|
+
var span_1 = first_child(fragment_2);
|
|
15435
|
+
var text_1 = child(span_1, true);
|
|
15436
|
+
reset(span_1);
|
|
15437
|
+
var node_4 = sibling(span_1, 2);
|
|
15435
15438
|
{
|
|
15436
15439
|
var consequent_1 = ($$anchor5) => {
|
|
15437
|
-
var
|
|
15438
|
-
var text_2 = child(
|
|
15439
|
-
reset(
|
|
15440
|
+
var span_2 = root_5$2();
|
|
15441
|
+
var text_2 = child(span_2, true);
|
|
15442
|
+
reset(span_2);
|
|
15440
15443
|
template_effect(($0) => set_text(text_2, $0), [() => formatTime(get$2(cartItem).attributes.time)]);
|
|
15441
|
-
append($$anchor5,
|
|
15444
|
+
append($$anchor5, span_2);
|
|
15442
15445
|
};
|
|
15443
15446
|
if_block(node_4, ($$render) => {
|
|
15444
15447
|
if (get$2(cartItem).item.type === "timeslot") $$render(consequent_1);
|
|
@@ -15481,7 +15484,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15481
15484
|
reset(li_2);
|
|
15482
15485
|
template_effect(() => {
|
|
15483
15486
|
set_attribute(article, "data-testid", get$2(cartItem).uuid);
|
|
15484
|
-
set_text(text2,
|
|
15487
|
+
set_text(text2, get$2(cartItem).item.title);
|
|
15485
15488
|
set_text(text_3, get$2(cartItem).final_price_formatted);
|
|
15486
15489
|
set_text(text_4, get$2(cartItem).quantity);
|
|
15487
15490
|
set_text(text_5, get$2(cartItem).total_price_formatted);
|
|
@@ -15506,13 +15509,22 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15506
15509
|
reset(ul_2);
|
|
15507
15510
|
reset(li_8);
|
|
15508
15511
|
reset(ol);
|
|
15509
|
-
var
|
|
15510
|
-
|
|
15512
|
+
var node_7 = sibling(ol, 2);
|
|
15513
|
+
{
|
|
15514
|
+
var consequent_5 = ($$anchor3) => {
|
|
15515
|
+
var a2 = root_8();
|
|
15516
|
+
a2.__click = navToCheckout;
|
|
15517
|
+
append($$anchor3, a2);
|
|
15518
|
+
};
|
|
15519
|
+
if_block(node_7, ($$render) => {
|
|
15520
|
+
if (!preview()) $$render(consequent_5);
|
|
15521
|
+
});
|
|
15522
|
+
}
|
|
15511
15523
|
template_effect(() => set_text(text_6, cart.totalFormatted));
|
|
15512
15524
|
append($$anchor2, fragment_1);
|
|
15513
15525
|
};
|
|
15514
15526
|
if_block(node, ($$render) => {
|
|
15515
|
-
if (cart.items.length) $$render(
|
|
15527
|
+
if (cart.items.length) $$render(consequent_6);
|
|
15516
15528
|
});
|
|
15517
15529
|
}
|
|
15518
15530
|
append($$anchor, fragment);
|
|
@@ -15520,6 +15532,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
15520
15532
|
}
|
|
15521
15533
|
delegate(["click"]);
|
|
15522
15534
|
customElements.define("go-cart", create_custom_element(Cart, { preview: {} }, [], [], false));
|
|
15535
|
+
function CartEmpty($$anchor, $$props) {
|
|
15536
|
+
push($$props, true);
|
|
15537
|
+
wrapInElement($$props.$$host, "go-if", { when: "data.cart.items.length === 0" });
|
|
15538
|
+
pop();
|
|
15539
|
+
}
|
|
15540
|
+
customElements.define("go-cart-empty", create_custom_element(CartEmpty, {}, [], [], false));
|
|
15523
15541
|
enable_legacy_mode_flag();
|
|
15524
15542
|
function CartCounter($$anchor, $$props) {
|
|
15525
15543
|
push($$props, false);
|
|
@@ -29364,7 +29382,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29364
29382
|
var root_1$8 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29365
29383
|
function DatePicker_1($$anchor, $$props) {
|
|
29366
29384
|
push($$props, true);
|
|
29367
|
-
let dateString = prop($$props, "dateString", 15);
|
|
29385
|
+
let dateString = prop($$props, "dateString", 15), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29368
29386
|
let date2 = /* @__PURE__ */ state(proxy($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())));
|
|
29369
29387
|
user_effect(() => {
|
|
29370
29388
|
dateString(get$2(date2).toString());
|
|
@@ -29376,6 +29394,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29376
29394
|
set dateString($$value) {
|
|
29377
29395
|
dateString($$value);
|
|
29378
29396
|
flushSync();
|
|
29397
|
+
},
|
|
29398
|
+
get labelClass() {
|
|
29399
|
+
return labelClass();
|
|
29400
|
+
},
|
|
29401
|
+
set labelClass($$value) {
|
|
29402
|
+
labelClass($$value);
|
|
29403
|
+
flushSync();
|
|
29404
|
+
},
|
|
29405
|
+
get inputClass() {
|
|
29406
|
+
return inputClass();
|
|
29407
|
+
},
|
|
29408
|
+
set inputClass($$value) {
|
|
29409
|
+
inputClass($$value);
|
|
29410
|
+
flushSync();
|
|
29379
29411
|
}
|
|
29380
29412
|
};
|
|
29381
29413
|
var fragment = comment();
|
|
@@ -29392,7 +29424,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29392
29424
|
var fragment_1 = root_1$8();
|
|
29393
29425
|
var node_1 = first_child(fragment_1);
|
|
29394
29426
|
component(node_1, () => Date_field_label, ($$anchor4, DatePicker_Label) => {
|
|
29395
|
-
DatePicker_Label($$anchor4, {
|
|
29427
|
+
DatePicker_Label($$anchor4, {
|
|
29428
|
+
get class() {
|
|
29429
|
+
return `go-datepicker-label $${labelClass() ?? ""}`;
|
|
29430
|
+
}
|
|
29431
|
+
});
|
|
29396
29432
|
});
|
|
29397
29433
|
var node_2 = sibling(node_1, 2);
|
|
29398
29434
|
{
|
|
@@ -29429,7 +29465,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29429
29465
|
};
|
|
29430
29466
|
component(node_2, () => Date_field_input, ($$anchor4, DatePicker_Input) => {
|
|
29431
29467
|
DatePicker_Input($$anchor4, {
|
|
29432
|
-
class
|
|
29468
|
+
get class() {
|
|
29469
|
+
return `go-datepicker-input $${inputClass() ?? ""}`;
|
|
29470
|
+
},
|
|
29433
29471
|
children,
|
|
29434
29472
|
$$slots: { default: true }
|
|
29435
29473
|
});
|
|
@@ -29589,7 +29627,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29589
29627
|
append($$anchor, fragment);
|
|
29590
29628
|
return pop($$exports);
|
|
29591
29629
|
}
|
|
29592
|
-
create_custom_element(DatePicker_1, { dateString: {} }, [], [], true);
|
|
29630
|
+
create_custom_element(DatePicker_1, { dateString: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29593
29631
|
var root_2$6 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
|
|
29594
29632
|
var root_1$7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
29595
29633
|
var root_3$4 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
|
|
@@ -29628,6 +29666,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29628
29666
|
() => ({
|
|
29629
29667
|
...get$2(fieldAttributes),
|
|
29630
29668
|
...restProps,
|
|
29669
|
+
class: inputClass(),
|
|
29631
29670
|
placeholder: field().placeholder,
|
|
29632
29671
|
type: field().type,
|
|
29633
29672
|
name: field().key
|
|
@@ -29638,7 +29677,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29638
29677
|
void 0,
|
|
29639
29678
|
true
|
|
29640
29679
|
);
|
|
29641
|
-
template_effect(() =>
|
|
29680
|
+
template_effect(() => {
|
|
29681
|
+
set_class(label, 1, clsx(labelClass()));
|
|
29682
|
+
set_attribute(label, "for", get$2(inputId));
|
|
29683
|
+
});
|
|
29642
29684
|
bind_value(input_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29643
29685
|
append($$anchor2, fragment_1);
|
|
29644
29686
|
};
|
|
@@ -29666,7 +29708,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29666
29708
|
labelText(node_3);
|
|
29667
29709
|
reset(span_1);
|
|
29668
29710
|
reset(label_1);
|
|
29669
|
-
template_effect(() =>
|
|
29711
|
+
template_effect(() => {
|
|
29712
|
+
set_class(label_1, 1, clsx(labelClass()));
|
|
29713
|
+
set_attribute(label_1, "for", get$2(inputId));
|
|
29714
|
+
});
|
|
29670
29715
|
append($$anchor2, label_1);
|
|
29671
29716
|
};
|
|
29672
29717
|
const select = ($$anchor2) => {
|
|
@@ -29676,7 +29721,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29676
29721
|
labelText(node_4);
|
|
29677
29722
|
reset(label_2);
|
|
29678
29723
|
var select_1 = sibling(label_2, 2);
|
|
29679
|
-
attribute_effect(select_1, () => ({
|
|
29724
|
+
attribute_effect(select_1, () => ({
|
|
29725
|
+
...get$2(fieldAttributes),
|
|
29726
|
+
...restProps,
|
|
29727
|
+
name: field().key,
|
|
29728
|
+
class: inputClass()
|
|
29729
|
+
}));
|
|
29680
29730
|
var node_5 = child(select_1);
|
|
29681
29731
|
{
|
|
29682
29732
|
var consequent_1 = ($$anchor3) => {
|
|
@@ -29702,12 +29752,21 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29702
29752
|
});
|
|
29703
29753
|
}
|
|
29704
29754
|
reset(select_1);
|
|
29705
|
-
template_effect(() =>
|
|
29755
|
+
template_effect(() => {
|
|
29756
|
+
set_class(label_2, 1, clsx(labelClass()));
|
|
29757
|
+
set_attribute(label_2, "for", get$2(inputId));
|
|
29758
|
+
});
|
|
29706
29759
|
bind_select_value(select_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29707
29760
|
append($$anchor2, fragment_2);
|
|
29708
29761
|
};
|
|
29709
29762
|
const date2 = ($$anchor2) => {
|
|
29710
29763
|
DatePicker_1($$anchor2, {
|
|
29764
|
+
get labelClass() {
|
|
29765
|
+
return labelClass();
|
|
29766
|
+
},
|
|
29767
|
+
get inputClass() {
|
|
29768
|
+
return inputClass();
|
|
29769
|
+
},
|
|
29711
29770
|
get dateString() {
|
|
29712
29771
|
return field().value;
|
|
29713
29772
|
},
|
|
@@ -29731,9 +29790,23 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29731
29790
|
var label_3 = root_11$1();
|
|
29732
29791
|
var text_1 = child(label_3);
|
|
29733
29792
|
var input_3 = sibling(text_1);
|
|
29734
|
-
attribute_effect(
|
|
29793
|
+
attribute_effect(
|
|
29794
|
+
input_3,
|
|
29795
|
+
() => ({
|
|
29796
|
+
...get$2(fieldAttributes),
|
|
29797
|
+
...restProps,
|
|
29798
|
+
class: inputClass(),
|
|
29799
|
+
type: "radio"
|
|
29800
|
+
}),
|
|
29801
|
+
void 0,
|
|
29802
|
+
void 0,
|
|
29803
|
+
void 0,
|
|
29804
|
+
void 0,
|
|
29805
|
+
true
|
|
29806
|
+
);
|
|
29735
29807
|
reset(label_3);
|
|
29736
29808
|
template_effect(() => {
|
|
29809
|
+
set_class(label_3, 1, clsx(labelClass()));
|
|
29737
29810
|
set_attribute(label_3, "for", get$2(inputId) + get$2(option));
|
|
29738
29811
|
set_text(text_1, `${get$2(option) ?? ""} `);
|
|
29739
29812
|
});
|
|
@@ -29749,13 +29822,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29749
29822
|
reset(fieldset);
|
|
29750
29823
|
append($$anchor2, fieldset);
|
|
29751
29824
|
};
|
|
29752
|
-
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29825
|
+
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29753
29826
|
"$$slots",
|
|
29754
29827
|
"$$events",
|
|
29755
29828
|
"$$legacy",
|
|
29756
29829
|
"$$host",
|
|
29757
29830
|
"field",
|
|
29758
|
-
"describedById"
|
|
29831
|
+
"describedById",
|
|
29832
|
+
"labelClass",
|
|
29833
|
+
"inputClass"
|
|
29759
29834
|
]);
|
|
29760
29835
|
const map = {
|
|
29761
29836
|
input,
|
|
@@ -29800,6 +29875,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29800
29875
|
set describedById($$value) {
|
|
29801
29876
|
describedById($$value);
|
|
29802
29877
|
flushSync();
|
|
29878
|
+
},
|
|
29879
|
+
get labelClass() {
|
|
29880
|
+
return labelClass();
|
|
29881
|
+
},
|
|
29882
|
+
set labelClass($$value) {
|
|
29883
|
+
labelClass($$value);
|
|
29884
|
+
flushSync();
|
|
29885
|
+
},
|
|
29886
|
+
get inputClass() {
|
|
29887
|
+
return inputClass();
|
|
29888
|
+
},
|
|
29889
|
+
set inputClass($$value) {
|
|
29890
|
+
inputClass($$value);
|
|
29891
|
+
flushSync();
|
|
29803
29892
|
}
|
|
29804
29893
|
};
|
|
29805
29894
|
var fragment_6 = comment();
|
|
@@ -29818,14 +29907,14 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29818
29907
|
append($$anchor, fragment_6);
|
|
29819
29908
|
return pop($$exports);
|
|
29820
29909
|
}
|
|
29821
|
-
create_custom_element(InputAndLabel, { field: {}, describedById: {} }, [], [], true);
|
|
29910
|
+
create_custom_element(InputAndLabel, { field: {}, describedById: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29822
29911
|
var root_1$6 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
29823
29912
|
var root_3$3 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
29824
29913
|
var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors" role="alert"></ul>`);
|
|
29825
29914
|
var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29826
29915
|
function Field($$anchor, $$props) {
|
|
29827
29916
|
push($$props, true);
|
|
29828
|
-
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false);
|
|
29917
|
+
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29829
29918
|
let field = /* @__PURE__ */ state(proxy(Forms.createField(key(), required())));
|
|
29830
29919
|
let details = /* @__PURE__ */ state(void 0);
|
|
29831
29920
|
onMount(async () => {
|
|
@@ -29868,6 +29957,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29868
29957
|
set required($$value = false) {
|
|
29869
29958
|
required($$value);
|
|
29870
29959
|
flushSync();
|
|
29960
|
+
},
|
|
29961
|
+
get labelClass() {
|
|
29962
|
+
return labelClass();
|
|
29963
|
+
},
|
|
29964
|
+
set labelClass($$value) {
|
|
29965
|
+
labelClass($$value);
|
|
29966
|
+
flushSync();
|
|
29967
|
+
},
|
|
29968
|
+
get inputClass() {
|
|
29969
|
+
return inputClass();
|
|
29970
|
+
},
|
|
29971
|
+
set inputClass($$value) {
|
|
29972
|
+
inputClass($$value);
|
|
29973
|
+
flushSync();
|
|
29871
29974
|
}
|
|
29872
29975
|
};
|
|
29873
29976
|
var fragment = root$5();
|
|
@@ -29876,6 +29979,12 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29876
29979
|
get describedById() {
|
|
29877
29980
|
return get$2(describedById);
|
|
29878
29981
|
},
|
|
29982
|
+
get labelClass() {
|
|
29983
|
+
return labelClass();
|
|
29984
|
+
},
|
|
29985
|
+
get inputClass() {
|
|
29986
|
+
return inputClass();
|
|
29987
|
+
},
|
|
29879
29988
|
get field() {
|
|
29880
29989
|
return get$2(field);
|
|
29881
29990
|
},
|
|
@@ -29925,7 +30034,9 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
29925
30034
|
Field,
|
|
29926
30035
|
{
|
|
29927
30036
|
key: { attribute: "key", reflect: true, type: "String" },
|
|
29928
|
-
required: { attribute: "required", reflect: true, type: "Boolean" }
|
|
30037
|
+
required: { attribute: "required", reflect: true, type: "Boolean" },
|
|
30038
|
+
labelClass: { attribute: "label-class", reflect: true, type: "String" },
|
|
30039
|
+
inputClass: { attribute: "input-class", reflect: true, type: "String" }
|
|
29929
30040
|
},
|
|
29930
30041
|
[],
|
|
29931
30042
|
["getField"],
|
|
@@ -30042,14 +30153,32 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
30042
30153
|
customElements.define("go-form-feedback", create_custom_element(FormFeedback, {}, ["default"], [], false));
|
|
30043
30154
|
function Submit($$anchor, $$props) {
|
|
30044
30155
|
push($$props, true);
|
|
30156
|
+
let buttonClass = prop($$props, "buttonClass", 7, "");
|
|
30045
30157
|
let details = /* @__PURE__ */ state(void 0);
|
|
30046
30158
|
onMount(() => {
|
|
30047
30159
|
set(details, getDetails($$props.$$host), true);
|
|
30048
|
-
wrapInElement($$props.$$host, "button", { type: "submit" });
|
|
30160
|
+
wrapInElement($$props.$$host, "button", { type: "submit", class: buttonClass() });
|
|
30049
30161
|
});
|
|
30050
|
-
|
|
30162
|
+
var $$exports = {
|
|
30163
|
+
get buttonClass() {
|
|
30164
|
+
return buttonClass();
|
|
30165
|
+
},
|
|
30166
|
+
set buttonClass($$value = "") {
|
|
30167
|
+
buttonClass($$value);
|
|
30168
|
+
flushSync();
|
|
30169
|
+
}
|
|
30170
|
+
};
|
|
30171
|
+
return pop($$exports);
|
|
30051
30172
|
}
|
|
30052
|
-
customElements.define("go-submit", create_custom_element(
|
|
30173
|
+
customElements.define("go-submit", create_custom_element(
|
|
30174
|
+
Submit,
|
|
30175
|
+
{
|
|
30176
|
+
buttonClass: { attribute: "button-class", reflect: true, type: "String" }
|
|
30177
|
+
},
|
|
30178
|
+
[],
|
|
30179
|
+
[],
|
|
30180
|
+
false
|
|
30181
|
+
));
|
|
30053
30182
|
var root_1$3 = /* @__PURE__ */ from_html(`<p>Form submitted successfully!</p>`);
|
|
30054
30183
|
var root$3 = /* @__PURE__ */ from_html(`<div aria-live="assertive"><!></div>`);
|
|
30055
30184
|
function SuccessFeedback($$anchor, $$props) {
|
|
@@ -30090,7 +30219,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
30090
30219
|
const func = new Function("data", `return ${expression};`);
|
|
30091
30220
|
return func(data);
|
|
30092
30221
|
} catch (error) {
|
|
30093
|
-
throw new Error(`Error while evaluating when (${
|
|
30222
|
+
throw new Error(`Error while evaluating when (${expression}) in go-if: ${error.message}`);
|
|
30094
30223
|
}
|
|
30095
30224
|
}
|
|
30096
30225
|
const validTicketSelectionFilters = ["timeslot", "day", "annual"];
|
|
@@ -30220,6 +30349,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
30220
30349
|
if (!get$2(formDetails)) return;
|
|
30221
30350
|
get$2(data).formData = get$2(formDetails).formData;
|
|
30222
30351
|
});
|
|
30352
|
+
get$2(data).cart = cart;
|
|
30223
30353
|
let evaluatedWhen = /* @__PURE__ */ user_derived(() => evaluateExpression(when(), get$2(data)));
|
|
30224
30354
|
let content = null;
|
|
30225
30355
|
user_effect(() => {
|
|
@@ -12510,7 +12510,7 @@ function datetime$1(args) {
|
|
|
12510
12510
|
const timeRegex2 = `${time2}(?:${opts.join("|")})`;
|
|
12511
12511
|
return new RegExp(`^${dateSource}T(?:${timeRegex2})$`);
|
|
12512
12512
|
}
|
|
12513
|
-
const string$
|
|
12513
|
+
const string$1 = (params) => {
|
|
12514
12514
|
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
12515
12515
|
return new RegExp(`^${regex}$`);
|
|
12516
12516
|
};
|
|
@@ -12858,7 +12858,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
12858
12858
|
});
|
|
12859
12859
|
const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
12860
12860
|
$ZodType.init(inst, def);
|
|
12861
|
-
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$
|
|
12861
|
+
inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
|
|
12862
12862
|
inst._zod.parse = (payload, _) => {
|
|
12863
12863
|
if (def.coerce)
|
|
12864
12864
|
try {
|
|
@@ -14215,7 +14215,7 @@ const ZodString2 = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
|
|
|
14215
14215
|
inst.time = (params) => inst.check(time(params));
|
|
14216
14216
|
inst.duration = (params) => inst.check(duration(params));
|
|
14217
14217
|
});
|
|
14218
|
-
function string
|
|
14218
|
+
function string(params) {
|
|
14219
14219
|
return _string(ZodString2, params);
|
|
14220
14220
|
}
|
|
14221
14221
|
const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
|
|
@@ -14519,7 +14519,7 @@ var allFields = {
|
|
|
14519
14519
|
placeholder: "",
|
|
14520
14520
|
description: "",
|
|
14521
14521
|
autocomplete: "email",
|
|
14522
|
-
validator: string
|
|
14522
|
+
validator: string().email("Invalid email")
|
|
14523
14523
|
},
|
|
14524
14524
|
confirmEmail: {
|
|
14525
14525
|
key: "confirmEmail",
|
|
@@ -14529,7 +14529,7 @@ var allFields = {
|
|
|
14529
14529
|
placeholder: "",
|
|
14530
14530
|
description: "",
|
|
14531
14531
|
autocomplete: "email",
|
|
14532
|
-
validator: string
|
|
14532
|
+
validator: string().email("Invalid email").min(1, "Please confirm your email")
|
|
14533
14533
|
},
|
|
14534
14534
|
password: {
|
|
14535
14535
|
key: "password",
|
|
@@ -14548,7 +14548,7 @@ var allFields = {
|
|
|
14548
14548
|
placeholder: "",
|
|
14549
14549
|
description: "",
|
|
14550
14550
|
autocomplete: "new-password",
|
|
14551
|
-
validator: string
|
|
14551
|
+
validator: string().min(6, "Password must be at least 6 characters")
|
|
14552
14552
|
},
|
|
14553
14553
|
confirmPassword: {
|
|
14554
14554
|
key: "confirmPassword",
|
|
@@ -14558,7 +14558,7 @@ var allFields = {
|
|
|
14558
14558
|
placeholder: "",
|
|
14559
14559
|
description: "",
|
|
14560
14560
|
autocomplete: "new-password",
|
|
14561
|
-
validator: string
|
|
14561
|
+
validator: string().min(6, "Please confirm your password")
|
|
14562
14562
|
},
|
|
14563
14563
|
addressee: {
|
|
14564
14564
|
key: "addressee",
|
|
@@ -14658,7 +14658,7 @@ var allFields = {
|
|
|
14658
14658
|
placeholder: "",
|
|
14659
14659
|
description: "",
|
|
14660
14660
|
autocomplete: "off",
|
|
14661
|
-
validator: string
|
|
14661
|
+
validator: string().date()
|
|
14662
14662
|
}
|
|
14663
14663
|
};
|
|
14664
14664
|
function createField(data, required) {
|
|
@@ -15373,12 +15373,13 @@ function formatCurrency(priceCents) {
|
|
|
15373
15373
|
return new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(priceCents / 100);
|
|
15374
15374
|
}
|
|
15375
15375
|
var root_2$p = /* @__PURE__ */ from_html(`<li data-go-cart-header-remove="">remove</li>`);
|
|
15376
|
-
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
15377
|
-
var root_4$4 = /* @__PURE__ */ from_html(`<span> </span> <!>`, 1);
|
|
15376
|
+
var root_5$2 = /* @__PURE__ */ from_html(`<span class="go-cart-item-time" data-testid="cart-item-time"> </span>`);
|
|
15377
|
+
var root_4$4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date" data-testid="cart-item-date"> </span> <!>`, 1);
|
|
15378
15378
|
var root_6$1 = /* @__PURE__ */ from_html(`<li data-go-cart-item-remove=""><button>⨉</button></li>`);
|
|
15379
|
-
var root_3$6 = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <!> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
|
|
15379
|
+
var root_3$6 = /* @__PURE__ */ from_html(`<li data-go-cart-item=""><article><ul><li data-go-cart-item-title=""><span class="go-cart-item-title" data-testid="cart-item-title"> </span> <!></li> <li data-go-cart-item-price=""> </li> <li data-go-cart-item-count=""> </li> <!> <li data-go-cart-item-sum=""> </li></ul></article></li>`);
|
|
15380
15380
|
var root_7$3 = /* @__PURE__ */ from_html(`<li data-go-cart-footer-remove=""></li>`);
|
|
15381
|
-
var
|
|
15381
|
+
var root_8 = /* @__PURE__ */ from_html(`<a href="javascript:void(0);" class="go-cart-checkout-button" data-testid="checkout-button">Checkout</a>`);
|
|
15382
|
+
var root_1$b = /* @__PURE__ */ from_html(`<ol data-testid="cart"><li data-go-cart-header="" data-testid="cart-header"><ul><li data-go-cart-header-title="">Product</li> <li data-go-cart-header-price="">Price</li> <li data-go-cart-header-count="">Count</li> <!> <li data-go-cart-header-sum="">Sum</li></ul></li> <!> <li data-go-cart-footer="" data-testid="cart-footer"><ul><li data-go-cart-footer-title=""></li> <li data-go-cart-footer-price=""></li> <li data-go-cart-footer-count=""></li> <!> <li data-go-cart-footer-sum="" data-go-cart-sum=""> </li></ul></li></ol> <!>`, 1);
|
|
15382
15383
|
function Cart($$anchor, $$props) {
|
|
15383
15384
|
push($$props, true);
|
|
15384
15385
|
const preview = prop($$props, "preview", 7, false);
|
|
@@ -15399,7 +15400,7 @@ function Cart($$anchor, $$props) {
|
|
|
15399
15400
|
var fragment = comment();
|
|
15400
15401
|
var node = first_child(fragment);
|
|
15401
15402
|
{
|
|
15402
|
-
var
|
|
15403
|
+
var consequent_6 = ($$anchor2) => {
|
|
15403
15404
|
var fragment_1 = root_1$b();
|
|
15404
15405
|
var ol = first_child(fragment_1);
|
|
15405
15406
|
var li = child(ol);
|
|
@@ -15423,22 +15424,24 @@ function Cart($$anchor, $$props) {
|
|
|
15423
15424
|
var article = child(li_2);
|
|
15424
15425
|
var ul_1 = child(article);
|
|
15425
15426
|
var li_3 = child(ul_1);
|
|
15426
|
-
var
|
|
15427
|
-
var
|
|
15427
|
+
var span = child(li_3);
|
|
15428
|
+
var text2 = child(span, true);
|
|
15429
|
+
reset(span);
|
|
15430
|
+
var node_3 = sibling(span, 2);
|
|
15428
15431
|
{
|
|
15429
15432
|
var consequent_2 = ($$anchor4) => {
|
|
15430
15433
|
var fragment_2 = root_4$4();
|
|
15431
|
-
var
|
|
15432
|
-
var text_1 = child(
|
|
15433
|
-
reset(
|
|
15434
|
-
var node_4 = sibling(
|
|
15434
|
+
var span_1 = first_child(fragment_2);
|
|
15435
|
+
var text_1 = child(span_1, true);
|
|
15436
|
+
reset(span_1);
|
|
15437
|
+
var node_4 = sibling(span_1, 2);
|
|
15435
15438
|
{
|
|
15436
15439
|
var consequent_1 = ($$anchor5) => {
|
|
15437
|
-
var
|
|
15438
|
-
var text_2 = child(
|
|
15439
|
-
reset(
|
|
15440
|
+
var span_2 = root_5$2();
|
|
15441
|
+
var text_2 = child(span_2, true);
|
|
15442
|
+
reset(span_2);
|
|
15440
15443
|
template_effect(($0) => set_text(text_2, $0), [() => formatTime(get$2(cartItem).attributes.time)]);
|
|
15441
|
-
append($$anchor5,
|
|
15444
|
+
append($$anchor5, span_2);
|
|
15442
15445
|
};
|
|
15443
15446
|
if_block(node_4, ($$render) => {
|
|
15444
15447
|
if (get$2(cartItem).item.type === "timeslot") $$render(consequent_1);
|
|
@@ -15481,7 +15484,7 @@ function Cart($$anchor, $$props) {
|
|
|
15481
15484
|
reset(li_2);
|
|
15482
15485
|
template_effect(() => {
|
|
15483
15486
|
set_attribute(article, "data-testid", get$2(cartItem).uuid);
|
|
15484
|
-
set_text(text2,
|
|
15487
|
+
set_text(text2, get$2(cartItem).item.title);
|
|
15485
15488
|
set_text(text_3, get$2(cartItem).final_price_formatted);
|
|
15486
15489
|
set_text(text_4, get$2(cartItem).quantity);
|
|
15487
15490
|
set_text(text_5, get$2(cartItem).total_price_formatted);
|
|
@@ -15506,13 +15509,22 @@ function Cart($$anchor, $$props) {
|
|
|
15506
15509
|
reset(ul_2);
|
|
15507
15510
|
reset(li_8);
|
|
15508
15511
|
reset(ol);
|
|
15509
|
-
var
|
|
15510
|
-
|
|
15512
|
+
var node_7 = sibling(ol, 2);
|
|
15513
|
+
{
|
|
15514
|
+
var consequent_5 = ($$anchor3) => {
|
|
15515
|
+
var a2 = root_8();
|
|
15516
|
+
a2.__click = navToCheckout;
|
|
15517
|
+
append($$anchor3, a2);
|
|
15518
|
+
};
|
|
15519
|
+
if_block(node_7, ($$render) => {
|
|
15520
|
+
if (!preview()) $$render(consequent_5);
|
|
15521
|
+
});
|
|
15522
|
+
}
|
|
15511
15523
|
template_effect(() => set_text(text_6, cart.totalFormatted));
|
|
15512
15524
|
append($$anchor2, fragment_1);
|
|
15513
15525
|
};
|
|
15514
15526
|
if_block(node, ($$render) => {
|
|
15515
|
-
if (cart.items.length) $$render(
|
|
15527
|
+
if (cart.items.length) $$render(consequent_6);
|
|
15516
15528
|
});
|
|
15517
15529
|
}
|
|
15518
15530
|
append($$anchor, fragment);
|
|
@@ -15520,6 +15532,12 @@ function Cart($$anchor, $$props) {
|
|
|
15520
15532
|
}
|
|
15521
15533
|
delegate(["click"]);
|
|
15522
15534
|
customElements.define("go-cart", create_custom_element(Cart, { preview: {} }, [], [], false));
|
|
15535
|
+
function CartEmpty($$anchor, $$props) {
|
|
15536
|
+
push($$props, true);
|
|
15537
|
+
wrapInElement($$props.$$host, "go-if", { when: "data.cart.items.length === 0" });
|
|
15538
|
+
pop();
|
|
15539
|
+
}
|
|
15540
|
+
customElements.define("go-cart-empty", create_custom_element(CartEmpty, {}, [], [], false));
|
|
15523
15541
|
enable_legacy_mode_flag();
|
|
15524
15542
|
function CartCounter($$anchor, $$props) {
|
|
15525
15543
|
push($$props, false);
|
|
@@ -29364,7 +29382,7 @@ var root_6 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
|
29364
29382
|
var root_1$8 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29365
29383
|
function DatePicker_1($$anchor, $$props) {
|
|
29366
29384
|
push($$props, true);
|
|
29367
|
-
let dateString = prop($$props, "dateString", 15);
|
|
29385
|
+
let dateString = prop($$props, "dateString", 15), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29368
29386
|
let date2 = /* @__PURE__ */ state(proxy($14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2())));
|
|
29369
29387
|
user_effect(() => {
|
|
29370
29388
|
dateString(get$2(date2).toString());
|
|
@@ -29376,6 +29394,20 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29376
29394
|
set dateString($$value) {
|
|
29377
29395
|
dateString($$value);
|
|
29378
29396
|
flushSync();
|
|
29397
|
+
},
|
|
29398
|
+
get labelClass() {
|
|
29399
|
+
return labelClass();
|
|
29400
|
+
},
|
|
29401
|
+
set labelClass($$value) {
|
|
29402
|
+
labelClass($$value);
|
|
29403
|
+
flushSync();
|
|
29404
|
+
},
|
|
29405
|
+
get inputClass() {
|
|
29406
|
+
return inputClass();
|
|
29407
|
+
},
|
|
29408
|
+
set inputClass($$value) {
|
|
29409
|
+
inputClass($$value);
|
|
29410
|
+
flushSync();
|
|
29379
29411
|
}
|
|
29380
29412
|
};
|
|
29381
29413
|
var fragment = comment();
|
|
@@ -29392,7 +29424,11 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29392
29424
|
var fragment_1 = root_1$8();
|
|
29393
29425
|
var node_1 = first_child(fragment_1);
|
|
29394
29426
|
component(node_1, () => Date_field_label, ($$anchor4, DatePicker_Label) => {
|
|
29395
|
-
DatePicker_Label($$anchor4, {
|
|
29427
|
+
DatePicker_Label($$anchor4, {
|
|
29428
|
+
get class() {
|
|
29429
|
+
return `go-datepicker-label $${labelClass() ?? ""}`;
|
|
29430
|
+
}
|
|
29431
|
+
});
|
|
29396
29432
|
});
|
|
29397
29433
|
var node_2 = sibling(node_1, 2);
|
|
29398
29434
|
{
|
|
@@ -29429,7 +29465,9 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29429
29465
|
};
|
|
29430
29466
|
component(node_2, () => Date_field_input, ($$anchor4, DatePicker_Input) => {
|
|
29431
29467
|
DatePicker_Input($$anchor4, {
|
|
29432
|
-
class
|
|
29468
|
+
get class() {
|
|
29469
|
+
return `go-datepicker-input $${inputClass() ?? ""}`;
|
|
29470
|
+
},
|
|
29433
29471
|
children,
|
|
29434
29472
|
$$slots: { default: true }
|
|
29435
29473
|
});
|
|
@@ -29589,7 +29627,7 @@ function DatePicker_1($$anchor, $$props) {
|
|
|
29589
29627
|
append($$anchor, fragment);
|
|
29590
29628
|
return pop($$exports);
|
|
29591
29629
|
}
|
|
29592
|
-
create_custom_element(DatePicker_1, { dateString: {} }, [], [], true);
|
|
29630
|
+
create_custom_element(DatePicker_1, { dateString: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29593
29631
|
var root_2$6 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
|
|
29594
29632
|
var root_1$7 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
|
|
29595
29633
|
var root_3$4 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
|
|
@@ -29628,6 +29666,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29628
29666
|
() => ({
|
|
29629
29667
|
...get$2(fieldAttributes),
|
|
29630
29668
|
...restProps,
|
|
29669
|
+
class: inputClass(),
|
|
29631
29670
|
placeholder: field().placeholder,
|
|
29632
29671
|
type: field().type,
|
|
29633
29672
|
name: field().key
|
|
@@ -29638,7 +29677,10 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29638
29677
|
void 0,
|
|
29639
29678
|
true
|
|
29640
29679
|
);
|
|
29641
|
-
template_effect(() =>
|
|
29680
|
+
template_effect(() => {
|
|
29681
|
+
set_class(label, 1, clsx(labelClass()));
|
|
29682
|
+
set_attribute(label, "for", get$2(inputId));
|
|
29683
|
+
});
|
|
29642
29684
|
bind_value(input_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29643
29685
|
append($$anchor2, fragment_1);
|
|
29644
29686
|
};
|
|
@@ -29666,7 +29708,10 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29666
29708
|
labelText(node_3);
|
|
29667
29709
|
reset(span_1);
|
|
29668
29710
|
reset(label_1);
|
|
29669
|
-
template_effect(() =>
|
|
29711
|
+
template_effect(() => {
|
|
29712
|
+
set_class(label_1, 1, clsx(labelClass()));
|
|
29713
|
+
set_attribute(label_1, "for", get$2(inputId));
|
|
29714
|
+
});
|
|
29670
29715
|
append($$anchor2, label_1);
|
|
29671
29716
|
};
|
|
29672
29717
|
const select = ($$anchor2) => {
|
|
@@ -29676,7 +29721,12 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29676
29721
|
labelText(node_4);
|
|
29677
29722
|
reset(label_2);
|
|
29678
29723
|
var select_1 = sibling(label_2, 2);
|
|
29679
|
-
attribute_effect(select_1, () => ({
|
|
29724
|
+
attribute_effect(select_1, () => ({
|
|
29725
|
+
...get$2(fieldAttributes),
|
|
29726
|
+
...restProps,
|
|
29727
|
+
name: field().key,
|
|
29728
|
+
class: inputClass()
|
|
29729
|
+
}));
|
|
29680
29730
|
var node_5 = child(select_1);
|
|
29681
29731
|
{
|
|
29682
29732
|
var consequent_1 = ($$anchor3) => {
|
|
@@ -29702,12 +29752,21 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29702
29752
|
});
|
|
29703
29753
|
}
|
|
29704
29754
|
reset(select_1);
|
|
29705
|
-
template_effect(() =>
|
|
29755
|
+
template_effect(() => {
|
|
29756
|
+
set_class(label_2, 1, clsx(labelClass()));
|
|
29757
|
+
set_attribute(label_2, "for", get$2(inputId));
|
|
29758
|
+
});
|
|
29706
29759
|
bind_select_value(select_1, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
29707
29760
|
append($$anchor2, fragment_2);
|
|
29708
29761
|
};
|
|
29709
29762
|
const date2 = ($$anchor2) => {
|
|
29710
29763
|
DatePicker_1($$anchor2, {
|
|
29764
|
+
get labelClass() {
|
|
29765
|
+
return labelClass();
|
|
29766
|
+
},
|
|
29767
|
+
get inputClass() {
|
|
29768
|
+
return inputClass();
|
|
29769
|
+
},
|
|
29711
29770
|
get dateString() {
|
|
29712
29771
|
return field().value;
|
|
29713
29772
|
},
|
|
@@ -29731,9 +29790,23 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29731
29790
|
var label_3 = root_11$1();
|
|
29732
29791
|
var text_1 = child(label_3);
|
|
29733
29792
|
var input_3 = sibling(text_1);
|
|
29734
|
-
attribute_effect(
|
|
29793
|
+
attribute_effect(
|
|
29794
|
+
input_3,
|
|
29795
|
+
() => ({
|
|
29796
|
+
...get$2(fieldAttributes),
|
|
29797
|
+
...restProps,
|
|
29798
|
+
class: inputClass(),
|
|
29799
|
+
type: "radio"
|
|
29800
|
+
}),
|
|
29801
|
+
void 0,
|
|
29802
|
+
void 0,
|
|
29803
|
+
void 0,
|
|
29804
|
+
void 0,
|
|
29805
|
+
true
|
|
29806
|
+
);
|
|
29735
29807
|
reset(label_3);
|
|
29736
29808
|
template_effect(() => {
|
|
29809
|
+
set_class(label_3, 1, clsx(labelClass()));
|
|
29737
29810
|
set_attribute(label_3, "for", get$2(inputId) + get$2(option));
|
|
29738
29811
|
set_text(text_1, `${get$2(option) ?? ""} `);
|
|
29739
29812
|
});
|
|
@@ -29749,13 +29822,15 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29749
29822
|
reset(fieldset);
|
|
29750
29823
|
append($$anchor2, fieldset);
|
|
29751
29824
|
};
|
|
29752
|
-
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29825
|
+
let field = prop($$props, "field", 15), describedById = prop($$props, "describedById", 7), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7), restProps = /* @__PURE__ */ rest_props($$props, [
|
|
29753
29826
|
"$$slots",
|
|
29754
29827
|
"$$events",
|
|
29755
29828
|
"$$legacy",
|
|
29756
29829
|
"$$host",
|
|
29757
29830
|
"field",
|
|
29758
|
-
"describedById"
|
|
29831
|
+
"describedById",
|
|
29832
|
+
"labelClass",
|
|
29833
|
+
"inputClass"
|
|
29759
29834
|
]);
|
|
29760
29835
|
const map = {
|
|
29761
29836
|
input,
|
|
@@ -29800,6 +29875,20 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29800
29875
|
set describedById($$value) {
|
|
29801
29876
|
describedById($$value);
|
|
29802
29877
|
flushSync();
|
|
29878
|
+
},
|
|
29879
|
+
get labelClass() {
|
|
29880
|
+
return labelClass();
|
|
29881
|
+
},
|
|
29882
|
+
set labelClass($$value) {
|
|
29883
|
+
labelClass($$value);
|
|
29884
|
+
flushSync();
|
|
29885
|
+
},
|
|
29886
|
+
get inputClass() {
|
|
29887
|
+
return inputClass();
|
|
29888
|
+
},
|
|
29889
|
+
set inputClass($$value) {
|
|
29890
|
+
inputClass($$value);
|
|
29891
|
+
flushSync();
|
|
29803
29892
|
}
|
|
29804
29893
|
};
|
|
29805
29894
|
var fragment_6 = comment();
|
|
@@ -29818,14 +29907,14 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
29818
29907
|
append($$anchor, fragment_6);
|
|
29819
29908
|
return pop($$exports);
|
|
29820
29909
|
}
|
|
29821
|
-
create_custom_element(InputAndLabel, { field: {}, describedById: {} }, [], [], true);
|
|
29910
|
+
create_custom_element(InputAndLabel, { field: {}, describedById: {}, labelClass: {}, inputClass: {} }, [], [], true);
|
|
29822
29911
|
var root_1$6 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
29823
29912
|
var root_3$3 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
29824
29913
|
var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors" role="alert"></ul>`);
|
|
29825
29914
|
var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
29826
29915
|
function Field($$anchor, $$props) {
|
|
29827
29916
|
push($$props, true);
|
|
29828
|
-
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false);
|
|
29917
|
+
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
29829
29918
|
let field = /* @__PURE__ */ state(proxy(Forms.createField(key(), required())));
|
|
29830
29919
|
let details = /* @__PURE__ */ state(void 0);
|
|
29831
29920
|
onMount(async () => {
|
|
@@ -29868,6 +29957,20 @@ function Field($$anchor, $$props) {
|
|
|
29868
29957
|
set required($$value = false) {
|
|
29869
29958
|
required($$value);
|
|
29870
29959
|
flushSync();
|
|
29960
|
+
},
|
|
29961
|
+
get labelClass() {
|
|
29962
|
+
return labelClass();
|
|
29963
|
+
},
|
|
29964
|
+
set labelClass($$value) {
|
|
29965
|
+
labelClass($$value);
|
|
29966
|
+
flushSync();
|
|
29967
|
+
},
|
|
29968
|
+
get inputClass() {
|
|
29969
|
+
return inputClass();
|
|
29970
|
+
},
|
|
29971
|
+
set inputClass($$value) {
|
|
29972
|
+
inputClass($$value);
|
|
29973
|
+
flushSync();
|
|
29871
29974
|
}
|
|
29872
29975
|
};
|
|
29873
29976
|
var fragment = root$5();
|
|
@@ -29876,6 +29979,12 @@ function Field($$anchor, $$props) {
|
|
|
29876
29979
|
get describedById() {
|
|
29877
29980
|
return get$2(describedById);
|
|
29878
29981
|
},
|
|
29982
|
+
get labelClass() {
|
|
29983
|
+
return labelClass();
|
|
29984
|
+
},
|
|
29985
|
+
get inputClass() {
|
|
29986
|
+
return inputClass();
|
|
29987
|
+
},
|
|
29879
29988
|
get field() {
|
|
29880
29989
|
return get$2(field);
|
|
29881
29990
|
},
|
|
@@ -29925,7 +30034,9 @@ customElements.define("go-field", create_custom_element(
|
|
|
29925
30034
|
Field,
|
|
29926
30035
|
{
|
|
29927
30036
|
key: { attribute: "key", reflect: true, type: "String" },
|
|
29928
|
-
required: { attribute: "required", reflect: true, type: "Boolean" }
|
|
30037
|
+
required: { attribute: "required", reflect: true, type: "Boolean" },
|
|
30038
|
+
labelClass: { attribute: "label-class", reflect: true, type: "String" },
|
|
30039
|
+
inputClass: { attribute: "input-class", reflect: true, type: "String" }
|
|
29929
30040
|
},
|
|
29930
30041
|
[],
|
|
29931
30042
|
["getField"],
|
|
@@ -30042,14 +30153,32 @@ function FormFeedback($$anchor, $$props) {
|
|
|
30042
30153
|
customElements.define("go-form-feedback", create_custom_element(FormFeedback, {}, ["default"], [], false));
|
|
30043
30154
|
function Submit($$anchor, $$props) {
|
|
30044
30155
|
push($$props, true);
|
|
30156
|
+
let buttonClass = prop($$props, "buttonClass", 7, "");
|
|
30045
30157
|
let details = /* @__PURE__ */ state(void 0);
|
|
30046
30158
|
onMount(() => {
|
|
30047
30159
|
set(details, getDetails($$props.$$host), true);
|
|
30048
|
-
wrapInElement($$props.$$host, "button", { type: "submit" });
|
|
30160
|
+
wrapInElement($$props.$$host, "button", { type: "submit", class: buttonClass() });
|
|
30049
30161
|
});
|
|
30050
|
-
|
|
30162
|
+
var $$exports = {
|
|
30163
|
+
get buttonClass() {
|
|
30164
|
+
return buttonClass();
|
|
30165
|
+
},
|
|
30166
|
+
set buttonClass($$value = "") {
|
|
30167
|
+
buttonClass($$value);
|
|
30168
|
+
flushSync();
|
|
30169
|
+
}
|
|
30170
|
+
};
|
|
30171
|
+
return pop($$exports);
|
|
30051
30172
|
}
|
|
30052
|
-
customElements.define("go-submit", create_custom_element(
|
|
30173
|
+
customElements.define("go-submit", create_custom_element(
|
|
30174
|
+
Submit,
|
|
30175
|
+
{
|
|
30176
|
+
buttonClass: { attribute: "button-class", reflect: true, type: "String" }
|
|
30177
|
+
},
|
|
30178
|
+
[],
|
|
30179
|
+
[],
|
|
30180
|
+
false
|
|
30181
|
+
));
|
|
30053
30182
|
var root_1$3 = /* @__PURE__ */ from_html(`<p>Form submitted successfully!</p>`);
|
|
30054
30183
|
var root$3 = /* @__PURE__ */ from_html(`<div aria-live="assertive"><!></div>`);
|
|
30055
30184
|
function SuccessFeedback($$anchor, $$props) {
|
|
@@ -30090,7 +30219,7 @@ function evaluateExpression(expression, data) {
|
|
|
30090
30219
|
const func = new Function("data", `return ${expression};`);
|
|
30091
30220
|
return func(data);
|
|
30092
30221
|
} catch (error) {
|
|
30093
|
-
throw new Error(`Error while evaluating when (${
|
|
30222
|
+
throw new Error(`Error while evaluating when (${expression}) in go-if: ${error.message}`);
|
|
30094
30223
|
}
|
|
30095
30224
|
}
|
|
30096
30225
|
const validTicketSelectionFilters = ["timeslot", "day", "annual"];
|
|
@@ -30220,6 +30349,7 @@ function If($$anchor, $$props) {
|
|
|
30220
30349
|
if (!get$2(formDetails)) return;
|
|
30221
30350
|
get$2(data).formData = get$2(formDetails).formData;
|
|
30222
30351
|
});
|
|
30352
|
+
get$2(data).cart = cart;
|
|
30223
30353
|
let evaluatedWhen = /* @__PURE__ */ user_derived(() => evaluateExpression(when(), get$2(data)));
|
|
30224
30354
|
let content = null;
|
|
30225
30355
|
user_effect(() => {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "Giantmonkey GmbH"
|
|
5
5
|
},
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.12.0",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist-js/gomus-webcomponents.iife.js",
|
|
10
10
|
"module": "./dist-js/gomus-webcomponents.iife.js",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"@storybook/addon-designs": "^11.0.1",
|
|
59
59
|
"@storybook/addon-docs": "^10.0.1",
|
|
60
60
|
"@storybook/addon-svelte-csf": "^5.0.10",
|
|
61
|
-
"@storybook/addons": "^7.6.17",
|
|
62
61
|
"@storybook/svelte-vite": "^10.0.1",
|
|
63
62
|
"@sveltejs/vite-plugin-svelte": "^6.2.1",
|
|
64
63
|
"@testing-library/jest-dom": "^6.9.1",
|