@gomusdev/web-components 4.12.0 → 4.13.1
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 +12 -0
- package/dist-js/gomus-webcomponents.iife.js +156 -115
- package/dist-js/gomus-webcomponents.js +156 -115
- package/dist-js/gomus-webcomponents.min.iife.js +46 -46
- package/dist-js/gomus-webcomponents.min.js +6290 -6261
- package/dist-js/src/components/shared/quantityStepper/quantityLabel.d.ts +3 -1
- package/dist-js/src/lib/stores/shop.formatters.spec.d.ts +1 -0
- package/dist-js/src/lib/stores/shop.svelte.d.ts +5 -4
- package/dist-js/src/lib/stores/shop.translate.spec.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.13.1 (2026-07-28)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **i18n:** format times and dates per shop.locale with shared presets
|
|
8
|
+
|
|
9
|
+
## 4.13.0 (2026-07-28)
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **cart:** make − remove the line at its minimum quantity
|
|
14
|
+
|
|
3
15
|
## 4.12.0 (2026-07-28)
|
|
4
16
|
|
|
5
17
|
### Features
|
|
@@ -6378,6 +6378,18 @@ createHTML: (html) => {
|
|
|
6378
6378
|
console.warn(`[go] Invalid locale "${locale}" — not a valid BCP 47 language tag (use "de", "de-CH", "en", …). Price and date formatting will throw.`);
|
|
6379
6379
|
}
|
|
6380
6380
|
}
|
|
6381
|
+
var defaultTranslations_default = {
|
|
6382
|
+
en: {
|
|
6383
|
+
"quantity.remove": "Remove item",
|
|
6384
|
+
"quantity.remove.label": "✕",
|
|
6385
|
+
"cart.item.remove": "✕"
|
|
6386
|
+
},
|
|
6387
|
+
de: {
|
|
6388
|
+
"quantity.remove": "Artikel entfernen",
|
|
6389
|
+
"quantity.remove.label": "✕",
|
|
6390
|
+
"cart.item.remove": "✕"
|
|
6391
|
+
}
|
|
6392
|
+
};
|
|
6381
6393
|
//#endregion
|
|
6382
6394
|
//#region src/lib/helpers/urls.ts
|
|
6383
6395
|
var ANGULAR_URLS = {
|
|
@@ -11101,9 +11113,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11101
11113
|
if (time) ({hour: hour, minute: minute, second: second, millisecond: millisecond} = time);
|
|
11102
11114
|
return new $2aaf608024c21ca1$export$ca871e8dbb80966f(date.calendar, date.era, date.year, date.month, date.day, hour, minute, second, millisecond);
|
|
11103
11115
|
}
|
|
11104
|
-
function $d07e34cce18680fd$export$d33f79e3ffc3dc83(dateTime) {
|
|
11105
|
-
return new $2aaf608024c21ca1$export$680ea196effce5f(dateTime.hour, dateTime.minute, dateTime.second, dateTime.millisecond);
|
|
11106
|
-
}
|
|
11107
11116
|
function $d07e34cce18680fd$export$b4a036af3fc0b032(date, calendar) {
|
|
11108
11117
|
if ($ad063034c8620db8$export$dbc69fd56b53d5e(date.calendar, calendar)) return date;
|
|
11109
11118
|
let calendarDate = calendar.fromJulianDay(date.calendar.toJulianDay(date));
|
|
@@ -11261,14 +11270,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11261
11270
|
time.millisecond += duration.milliseconds || 0;
|
|
11262
11271
|
return $435a2ceaa8778ed8$var$balanceTime(time);
|
|
11263
11272
|
}
|
|
11264
|
-
function $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, duration) {
|
|
11265
|
-
let res = time.copy();
|
|
11266
|
-
$435a2ceaa8778ed8$var$addTimeFields(res, duration);
|
|
11267
|
-
return res;
|
|
11268
|
-
}
|
|
11269
|
-
function $435a2ceaa8778ed8$export$fe34d3a381cd7501(time, duration) {
|
|
11270
|
-
return $435a2ceaa8778ed8$export$7ed87b6bc2506470(time, $435a2ceaa8778ed8$export$3e2544e88a25bff8(duration));
|
|
11271
|
-
}
|
|
11272
11273
|
function $435a2ceaa8778ed8$export$d52ced6badfb9a4c(value, field, amount, options) {
|
|
11273
11274
|
let mutable = value.copy();
|
|
11274
11275
|
switch (field) {
|
|
@@ -11550,46 +11551,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11550
11551
|
return $ad063034c8620db8$export$68781ddf31c0090f(this, b);
|
|
11551
11552
|
}
|
|
11552
11553
|
};
|
|
11553
|
-
var $2aaf608024c21ca1$export$680ea196effce5f = class $2aaf608024c21ca1$export$680ea196effce5f {
|
|
11554
|
-
#type;
|
|
11555
|
-
constructor(hour = 0, minute = 0, second = 0, millisecond = 0) {
|
|
11556
|
-
this.hour = hour;
|
|
11557
|
-
this.minute = minute;
|
|
11558
|
-
this.second = second;
|
|
11559
|
-
this.millisecond = millisecond;
|
|
11560
|
-
$435a2ceaa8778ed8$export$7555de1e070510cb(this);
|
|
11561
|
-
}
|
|
11562
|
-
/** Returns a copy of this time. */ copy() {
|
|
11563
|
-
return new $2aaf608024c21ca1$export$680ea196effce5f(this.hour, this.minute, this.second, this.millisecond);
|
|
11564
|
-
}
|
|
11565
|
-
/** Returns a new `Time` with the given duration added to it. */ add(duration) {
|
|
11566
|
-
return $435a2ceaa8778ed8$export$7ed87b6bc2506470(this, duration);
|
|
11567
|
-
}
|
|
11568
|
-
/** Returns a new `Time` with the given duration subtracted from it. */ subtract(duration) {
|
|
11569
|
-
return $435a2ceaa8778ed8$export$fe34d3a381cd7501(this, duration);
|
|
11570
|
-
}
|
|
11571
|
-
/**
|
|
11572
|
-
* Returns a new `Time` with the given fields set to the provided values. Other fields will be
|
|
11573
|
-
* constrained accordingly.
|
|
11574
|
-
*/ set(fields) {
|
|
11575
|
-
return $435a2ceaa8778ed8$export$e5d5e1c1822b6e56(this, fields);
|
|
11576
|
-
}
|
|
11577
|
-
/**
|
|
11578
|
-
* Returns a new `Time` with the given field adjusted by a specified amount.
|
|
11579
|
-
* When the resulting value reaches the limits of the field, it wraps around.
|
|
11580
|
-
*/ cycle(field, amount, options) {
|
|
11581
|
-
return $435a2ceaa8778ed8$export$dd02b3e0007dfe28(this, field, amount, options);
|
|
11582
|
-
}
|
|
11583
|
-
/** Converts the time to an ISO 8601 formatted string. */ toString() {
|
|
11584
|
-
return $58246871e4652552$export$f59dee82248f5ad4(this);
|
|
11585
|
-
}
|
|
11586
|
-
/**
|
|
11587
|
-
* Compares this time with another. A negative result indicates that this time is before the given
|
|
11588
|
-
* one, and a positive time indicates that it is after.
|
|
11589
|
-
*/ compare(b) {
|
|
11590
|
-
return $ad063034c8620db8$export$c19a80a9721b80f6(this, b);
|
|
11591
|
-
}
|
|
11592
|
-
};
|
|
11593
11554
|
var $2aaf608024c21ca1$export$ca871e8dbb80966f = class $2aaf608024c21ca1$export$ca871e8dbb80966f {
|
|
11594
11555
|
#type;
|
|
11595
11556
|
constructor(...args) {
|
|
@@ -11814,19 +11775,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11814
11775
|
}
|
|
11815
11776
|
//#endregion
|
|
11816
11777
|
//#region ../../packages/gomus-types/lib/helpers/utils.ts
|
|
11817
|
-
|
|
11818
|
-
|
|
11778
|
+
/** Named date presets — the single place defining what each rendering means (WI 151). */
|
|
11779
|
+
var DATE_FORMAT_PRESETS = {
|
|
11780
|
+
dayMonth: {
|
|
11781
|
+
month: "numeric",
|
|
11782
|
+
day: "numeric"
|
|
11783
|
+
},
|
|
11784
|
+
short: {
|
|
11785
|
+
year: "numeric",
|
|
11786
|
+
month: "numeric",
|
|
11787
|
+
day: "numeric"
|
|
11788
|
+
}
|
|
11789
|
+
};
|
|
11790
|
+
function formatTime(value, locale) {
|
|
11791
|
+
const zoned = $58246871e4652552$export$5adfdab05168c219(value, "Europe/Berlin");
|
|
11792
|
+
return new $12a3c853105e5a70$export$ad991b66133851cf(locale, {
|
|
11793
|
+
timeZone: zoned.timeZone,
|
|
11794
|
+
hour: "numeric",
|
|
11795
|
+
minute: "numeric"
|
|
11796
|
+
}).format(zoned.toDate());
|
|
11819
11797
|
}
|
|
11820
|
-
function formatDate(isoDateString,
|
|
11821
|
-
weekday: "long",
|
|
11822
|
-
year: "numeric",
|
|
11823
|
-
month: "long",
|
|
11824
|
-
day: "numeric"
|
|
11825
|
-
}, locale = "de") {
|
|
11798
|
+
function formatDate(isoDateString, preset, locale) {
|
|
11826
11799
|
const zoned = $58246871e4652552$export$5adfdab05168c219(isoDateString instanceof Date ? isoDateString.toISOString() : isoDateString, "Europe/Berlin");
|
|
11827
11800
|
return new $12a3c853105e5a70$export$ad991b66133851cf(locale, {
|
|
11828
11801
|
timeZone: zoned.timeZone,
|
|
11829
|
-
...
|
|
11802
|
+
...DATE_FORMAT_PRESETS[preset]
|
|
11830
11803
|
}).format(zoned.toDate());
|
|
11831
11804
|
}
|
|
11832
11805
|
//#endregion
|
|
@@ -13723,6 +13696,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13723
13696
|
success: false,
|
|
13724
13697
|
errors: ["Not signed in"]
|
|
13725
13698
|
} };
|
|
13699
|
+
var defaultTranslations = defaultTranslations_default;
|
|
13726
13700
|
var Shop = class {
|
|
13727
13701
|
type;
|
|
13728
13702
|
#data = /* @__PURE__ */ state(proxy({
|
|
@@ -13790,7 +13764,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13790
13764
|
return this.shop?.config.donations;
|
|
13791
13765
|
}
|
|
13792
13766
|
get translations() {
|
|
13793
|
-
return
|
|
13767
|
+
return {
|
|
13768
|
+
...defaultTranslations[(this.locale ?? "en").toLowerCase().split(/[-_]/)[0]] ?? defaultTranslations.en,
|
|
13769
|
+
...this.shop?.translations
|
|
13770
|
+
};
|
|
13794
13771
|
}
|
|
13795
13772
|
get currency() {
|
|
13796
13773
|
return this.shop?.config.currency;
|
|
@@ -13814,7 +13791,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
13814
13791
|
return "https://" + this.shopDomain;
|
|
13815
13792
|
}
|
|
13816
13793
|
get locale() {
|
|
13817
|
-
return get$2(this.#data).locale;
|
|
13794
|
+
return get$2(this.#data).locale ?? "de";
|
|
13795
|
+
}
|
|
13796
|
+
formatTime(value) {
|
|
13797
|
+
return formatTime(value, this.locale);
|
|
13798
|
+
}
|
|
13799
|
+
formatDate(value, preset) {
|
|
13800
|
+
return formatDate(value, preset, this.locale);
|
|
13818
13801
|
}
|
|
13819
13802
|
get shop() {
|
|
13820
13803
|
return this.fetchAndCache("/api/v4/shop", "shop", "shop");
|
|
@@ -15550,10 +15533,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15550
15533
|
template_effect(($0, $1) => {
|
|
15551
15534
|
set_text(text_2, $0);
|
|
15552
15535
|
set_text(text_3, $1);
|
|
15553
|
-
}, [() => formatDate(cartItem().time,
|
|
15554
|
-
month: "numeric",
|
|
15555
|
-
day: "numeric"
|
|
15556
|
-
}, shop.locale), () => formatTime(cartItem().time)]);
|
|
15536
|
+
}, [() => shop.formatDate(cartItem().time, "dayMonth"), () => shop.formatTime(cartItem().time)]);
|
|
15557
15537
|
append($$anchor, fragment_1);
|
|
15558
15538
|
};
|
|
15559
15539
|
if_block(node, ($$render) => {
|
|
@@ -15612,16 +15592,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15612
15592
|
var span_3 = root_1$19();
|
|
15613
15593
|
var text_3 = child(span_3, true);
|
|
15614
15594
|
reset(span_3);
|
|
15615
|
-
template_effect(($0) => set_text(text_3, $0), [() => formatTime(cartItem().time)]);
|
|
15595
|
+
template_effect(($0) => set_text(text_3, $0), [() => shop.formatTime(cartItem().time)]);
|
|
15616
15596
|
append($$anchor, span_3);
|
|
15617
15597
|
};
|
|
15618
15598
|
if_block(node_2, ($$render) => {
|
|
15619
15599
|
if (cartItem().product.type === "Ticket" && cartItem().product.subtype === "timeslot") $$render(consequent_1);
|
|
15620
15600
|
});
|
|
15621
|
-
template_effect(($0) => set_text(text_2, $0), [() => formatDate(cartItem().time,
|
|
15622
|
-
month: "numeric",
|
|
15623
|
-
day: "numeric"
|
|
15624
|
-
}, shop.locale)]);
|
|
15601
|
+
template_effect(($0) => set_text(text_2, $0), [() => shop.formatDate(cartItem().time, "dayMonth")]);
|
|
15625
15602
|
append($$anchor, fragment_1);
|
|
15626
15603
|
};
|
|
15627
15604
|
if_block(node_1, ($$render) => {
|
|
@@ -15646,12 +15623,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15646
15623
|
if (!cartItem().time) return null;
|
|
15647
15624
|
try {
|
|
15648
15625
|
return {
|
|
15649
|
-
date: formatDate(cartItem().time,
|
|
15650
|
-
|
|
15651
|
-
month: "numeric",
|
|
15652
|
-
day: "numeric"
|
|
15653
|
-
}, shop.locale),
|
|
15654
|
-
time: formatTime(cartItem().time)
|
|
15626
|
+
date: shop.formatDate(cartItem().time, "short"),
|
|
15627
|
+
time: shop.formatTime(cartItem().time)
|
|
15655
15628
|
};
|
|
15656
15629
|
} catch {
|
|
15657
15630
|
return {
|
|
@@ -15753,23 +15726,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15753
15726
|
}
|
|
15754
15727
|
//#endregion
|
|
15755
15728
|
//#region src/components/shared/quantityStepper/QuantityStepper.svelte
|
|
15756
|
-
var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button"
|
|
15729
|
+
var root$50 = /* @__PURE__ */ from_html(`<div class="go-quantity-stepper" role="group"><button type="button" tabindex="-1"><span aria-hidden="true"> </span></button> <input class="go-quantity-stepper-value" type="text" role="spinbutton" inputmode="numeric" autocomplete="off"/> <button type="button" class="go-quantity-stepper-button go-quantity-stepper-increment" tabindex="-1"><span aria-hidden="true">+</span></button></div>`);
|
|
15757
15730
|
function QuantityStepper($$anchor, $$props) {
|
|
15758
15731
|
const inputId = props_id();
|
|
15759
15732
|
push($$props, true);
|
|
15760
|
-
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onChange = prop($$props, "onChange", 7);
|
|
15761
|
-
const
|
|
15733
|
+
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), floor = prop($$props, "floor", 7, 0), label = prop($$props, "label", 7), decreaseLabel = prop($$props, "decreaseLabel", 7), increaseLabel = prop($$props, "increaseLabel", 7), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), removeAriaLabel = prop($$props, "removeAriaLabel", 7), removeLabel = prop($$props, "removeLabel", 7, "✕"), onChange = prop($$props, "onChange", 7);
|
|
15734
|
+
const removeMode = /* @__PURE__ */ user_derived(() => onDecrementBelowMin() != null);
|
|
15735
|
+
const removeBottom = /* @__PURE__ */ user_derived(() => Math.max(min(), 1));
|
|
15736
|
+
const bounds = /* @__PURE__ */ user_derived(() => get$2(removeMode) ? {
|
|
15737
|
+
min: get$2(removeBottom),
|
|
15738
|
+
max: max(),
|
|
15739
|
+
floor: get$2(removeBottom)
|
|
15740
|
+
} : {
|
|
15762
15741
|
min: min(),
|
|
15763
15742
|
max: max(),
|
|
15764
15743
|
floor: floor()
|
|
15765
|
-
})
|
|
15744
|
+
});
|
|
15745
|
+
const atRemove = /* @__PURE__ */ user_derived(() => get$2(removeMode) && value() <= get$2(removeBottom));
|
|
15766
15746
|
let inputEl;
|
|
15767
15747
|
let invalid = /* @__PURE__ */ state(false);
|
|
15768
|
-
const decDisabled = /* @__PURE__ */ user_derived(() => !canDecrement(value(), get$2(bounds)));
|
|
15748
|
+
const decDisabled = /* @__PURE__ */ user_derived(() => !get$2(atRemove) && !canDecrement(value(), get$2(bounds)));
|
|
15769
15749
|
const incDisabled = /* @__PURE__ */ user_derived(() => !canIncrement(value(), get$2(bounds)));
|
|
15770
15750
|
function emit(next) {
|
|
15771
15751
|
if (next !== value()) onChange()(next);
|
|
15772
15752
|
}
|
|
15753
|
+
function pressDecrement() {
|
|
15754
|
+
if (get$2(atRemove)) onDecrementBelowMin()();
|
|
15755
|
+
else stepDown();
|
|
15756
|
+
}
|
|
15773
15757
|
function stepDown() {
|
|
15774
15758
|
if (canDecrement(value(), get$2(bounds))) emit(decrement(value(), get$2(bounds)));
|
|
15775
15759
|
}
|
|
@@ -15777,7 +15761,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15777
15761
|
if (canIncrement(value(), get$2(bounds))) emit(increment(value(), get$2(bounds)));
|
|
15778
15762
|
}
|
|
15779
15763
|
function commitTyped() {
|
|
15780
|
-
const
|
|
15764
|
+
const raw = parseInt(inputEl.value, 10);
|
|
15765
|
+
if (get$2(removeMode) && (!Number.isFinite(raw) || raw <= 0)) {
|
|
15766
|
+
set(invalid, false);
|
|
15767
|
+
inputEl.value = String(value());
|
|
15768
|
+
onDecrementBelowMin()();
|
|
15769
|
+
return;
|
|
15770
|
+
}
|
|
15771
|
+
const next = clampTyped(raw, get$2(bounds));
|
|
15781
15772
|
set(invalid, false);
|
|
15782
15773
|
inputEl.value = String(next);
|
|
15783
15774
|
emit(next);
|
|
@@ -15798,7 +15789,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15798
15789
|
break;
|
|
15799
15790
|
case "Home":
|
|
15800
15791
|
e.preventDefault();
|
|
15801
|
-
emit(
|
|
15792
|
+
emit(get$2(bounds).floor);
|
|
15802
15793
|
break;
|
|
15803
15794
|
case "End":
|
|
15804
15795
|
e.preventDefault();
|
|
@@ -15860,6 +15851,27 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15860
15851
|
increaseLabel($$value);
|
|
15861
15852
|
flushSync();
|
|
15862
15853
|
},
|
|
15854
|
+
get onDecrementBelowMin() {
|
|
15855
|
+
return onDecrementBelowMin();
|
|
15856
|
+
},
|
|
15857
|
+
set onDecrementBelowMin($$value) {
|
|
15858
|
+
onDecrementBelowMin($$value);
|
|
15859
|
+
flushSync();
|
|
15860
|
+
},
|
|
15861
|
+
get removeAriaLabel() {
|
|
15862
|
+
return removeAriaLabel();
|
|
15863
|
+
},
|
|
15864
|
+
set removeAriaLabel($$value) {
|
|
15865
|
+
removeAriaLabel($$value);
|
|
15866
|
+
flushSync();
|
|
15867
|
+
},
|
|
15868
|
+
get removeLabel() {
|
|
15869
|
+
return removeLabel();
|
|
15870
|
+
},
|
|
15871
|
+
set removeLabel($$value = "✕") {
|
|
15872
|
+
removeLabel($$value);
|
|
15873
|
+
flushSync();
|
|
15874
|
+
},
|
|
15863
15875
|
get onChange() {
|
|
15864
15876
|
return onChange();
|
|
15865
15877
|
},
|
|
@@ -15870,6 +15882,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15870
15882
|
};
|
|
15871
15883
|
var div = root$50();
|
|
15872
15884
|
var button = child(div);
|
|
15885
|
+
let classes;
|
|
15886
|
+
var span = child(button);
|
|
15887
|
+
var text = child(span, true);
|
|
15888
|
+
reset(span);
|
|
15889
|
+
reset(button);
|
|
15873
15890
|
var input = sibling(button, 2);
|
|
15874
15891
|
remove_input_defaults(input);
|
|
15875
15892
|
bind_this(input, ($$value) => inputEl = $$value, () => inputEl);
|
|
@@ -15877,21 +15894,23 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15877
15894
|
reset(div);
|
|
15878
15895
|
template_effect(() => {
|
|
15879
15896
|
set_attribute(div, "aria-label", label());
|
|
15880
|
-
|
|
15897
|
+
classes = set_class(button, 1, "go-quantity-stepper-button go-quantity-stepper-decrement", null, classes, { "go-quantity-stepper-remove": get$2(atRemove) });
|
|
15898
|
+
set_attribute(button, "title", get$2(atRemove) ? removeAriaLabel() : decreaseLabel());
|
|
15881
15899
|
set_attribute(button, "aria-controls", inputId);
|
|
15882
15900
|
set_attribute(button, "aria-disabled", get$2(decDisabled));
|
|
15901
|
+
set_text(text, get$2(atRemove) ? removeLabel() : "−");
|
|
15883
15902
|
set_attribute(input, "id", inputId);
|
|
15884
15903
|
set_attribute(input, "aria-label", label());
|
|
15885
15904
|
set_value(input, value());
|
|
15886
15905
|
set_attribute(input, "aria-valuenow", value());
|
|
15887
|
-
set_attribute(input, "aria-valuemin",
|
|
15906
|
+
set_attribute(input, "aria-valuemin", get$2(bounds).floor);
|
|
15888
15907
|
set_attribute(input, "aria-valuemax", max());
|
|
15889
15908
|
set_attribute(input, "aria-invalid", get$2(invalid) ? "true" : void 0);
|
|
15890
15909
|
set_attribute(button_1, "title", increaseLabel());
|
|
15891
15910
|
set_attribute(button_1, "aria-controls", inputId);
|
|
15892
15911
|
set_attribute(button_1, "aria-disabled", get$2(incDisabled));
|
|
15893
15912
|
});
|
|
15894
|
-
delegated("click", button,
|
|
15913
|
+
delegated("click", button, pressDecrement);
|
|
15895
15914
|
delegated("input", input, onInput);
|
|
15896
15915
|
delegated("change", input, commitTyped);
|
|
15897
15916
|
event("blur", input, commitTyped);
|
|
@@ -15914,6 +15933,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15914
15933
|
label: {},
|
|
15915
15934
|
decreaseLabel: {},
|
|
15916
15935
|
increaseLabel: {},
|
|
15936
|
+
onDecrementBelowMin: {},
|
|
15937
|
+
removeAriaLabel: {},
|
|
15938
|
+
removeLabel: {},
|
|
15917
15939
|
onChange: {}
|
|
15918
15940
|
}, [], [], { mode: "open" });
|
|
15919
15941
|
//#endregion
|
|
@@ -15954,8 +15976,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15954
15976
|
* `min_persons`) a hard bottom on both controls: the backend does not enforce it,
|
|
15955
15977
|
* so the UI must (Angular-shop parity).
|
|
15956
15978
|
*/
|
|
15979
|
+
/**
|
|
15980
|
+
* Cart-only: when set, the stepper's `−` at the order minimum removes the line instead of
|
|
15981
|
+
* stepping (fires this). Presence turns the behaviour on; the legacy `<select>` ignores it.
|
|
15982
|
+
*/
|
|
15957
15983
|
/** Emits the next committed quantity. The control never mutates anything itself. */
|
|
15958
|
-
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onChange = prop($$props, "onChange", 7);
|
|
15984
|
+
let value = prop($$props, "value", 7), min = prop($$props, "min", 7), max = prop($$props, "max", 7), label = prop($$props, "label", 7), floor = prop($$props, "floor", 7, 0), deselectable = prop($$props, "deselectable", 7, true), onDecrementBelowMin = prop($$props, "onDecrementBelowMin", 7), onChange = prop($$props, "onChange", 7);
|
|
15959
15985
|
const useStepper = /* @__PURE__ */ user_derived(() => configStore.config.quantityStepper);
|
|
15960
15986
|
var $$exports = {
|
|
15961
15987
|
get value() {
|
|
@@ -16000,6 +16026,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16000
16026
|
deselectable($$value);
|
|
16001
16027
|
flushSync();
|
|
16002
16028
|
},
|
|
16029
|
+
get onDecrementBelowMin() {
|
|
16030
|
+
return onDecrementBelowMin();
|
|
16031
|
+
},
|
|
16032
|
+
set onDecrementBelowMin($$value) {
|
|
16033
|
+
onDecrementBelowMin($$value);
|
|
16034
|
+
flushSync();
|
|
16035
|
+
},
|
|
16003
16036
|
get onChange() {
|
|
16004
16037
|
return onChange();
|
|
16005
16038
|
},
|
|
@@ -16015,6 +16048,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16015
16048
|
let $0 = /* @__PURE__ */ user_derived(() => deselectable() ? 0 : min());
|
|
16016
16049
|
let $1 = /* @__PURE__ */ user_derived(() => shop.t("quantity.decrease"));
|
|
16017
16050
|
let $2 = /* @__PURE__ */ user_derived(() => shop.t("quantity.increase"));
|
|
16051
|
+
let $3 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove"));
|
|
16052
|
+
let $4 = /* @__PURE__ */ user_derived(() => shop.t("quantity.remove.label"));
|
|
16018
16053
|
QuantityStepper($$anchor, {
|
|
16019
16054
|
get value() {
|
|
16020
16055
|
return value();
|
|
@@ -16037,6 +16072,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16037
16072
|
get increaseLabel() {
|
|
16038
16073
|
return get$2($2);
|
|
16039
16074
|
},
|
|
16075
|
+
get onDecrementBelowMin() {
|
|
16076
|
+
return onDecrementBelowMin();
|
|
16077
|
+
},
|
|
16078
|
+
get removeAriaLabel() {
|
|
16079
|
+
return get$2($3);
|
|
16080
|
+
},
|
|
16081
|
+
get removeLabel() {
|
|
16082
|
+
return get$2($4);
|
|
16083
|
+
},
|
|
16040
16084
|
get onChange() {
|
|
16041
16085
|
return onChange();
|
|
16042
16086
|
}
|
|
@@ -16077,6 +16121,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16077
16121
|
label: {},
|
|
16078
16122
|
floor: {},
|
|
16079
16123
|
deselectable: {},
|
|
16124
|
+
onDecrementBelowMin: {},
|
|
16080
16125
|
onChange: {}
|
|
16081
16126
|
}, [], [], { mode: "open" });
|
|
16082
16127
|
//#endregion
|
|
@@ -18055,12 +18100,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18055
18100
|
* the visible row title: event rows compose it from event_title + time because a
|
|
18056
18101
|
* flat-price event's price row carries no title (the row IS the event) — naming
|
|
18057
18102
|
* the control from product.title alone left it unnamed (WI #141).
|
|
18103
|
+
*
|
|
18104
|
+
* Locale comes in as a parameter — shared/ components stay store-agnostic (WI #151).
|
|
18058
18105
|
*/
|
|
18059
|
-
function quantityLabel(item) {
|
|
18106
|
+
function quantityLabel(item, locale) {
|
|
18060
18107
|
const { product } = item;
|
|
18061
18108
|
return isEventTicket(product) ? [
|
|
18062
18109
|
product.event_title,
|
|
18063
|
-
item.time && formatTime(item.time),
|
|
18110
|
+
item.time && formatTime(item.time, locale),
|
|
18064
18111
|
product.title
|
|
18065
18112
|
].filter(Boolean).join(" - ") : product.title;
|
|
18066
18113
|
}
|
|
@@ -18071,7 +18118,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18071
18118
|
var root_2$11 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-participant-count"> </span>`);
|
|
18072
18119
|
var root_3$8 = /* @__PURE__ */ from_html(`<span data-testid="cart-item-voucher-quantity"> </span>`);
|
|
18073
18120
|
var root_4$4 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
18074
|
-
var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"
|
|
18121
|
+
var root_5$3 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove"> </button></li>`);
|
|
18075
18122
|
var root_6$2 = /* @__PURE__ */ from_html(`<ul class="go-sub-tickets" role="list"></ul>`);
|
|
18076
18123
|
var root_7$2 = /* @__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> <!>`, 1);
|
|
18077
18124
|
function Item$1($$anchor, $$props) {
|
|
@@ -18225,7 +18272,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18225
18272
|
var alternate_1 = ($$anchor) => {
|
|
18226
18273
|
{
|
|
18227
18274
|
let $0 = /* @__PURE__ */ user_derived(() => displayItem().quantity ?? 0);
|
|
18228
|
-
let $1 = /* @__PURE__ */ user_derived(() => quantityLabel(displayItem()));
|
|
18275
|
+
let $1 = /* @__PURE__ */ user_derived(() => quantityLabel(displayItem(), shop.locale));
|
|
18229
18276
|
QuantityControl($$anchor, {
|
|
18230
18277
|
get value() {
|
|
18231
18278
|
return get$2($0);
|
|
@@ -18240,7 +18287,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18240
18287
|
return get$2($1);
|
|
18241
18288
|
},
|
|
18242
18289
|
floor: 1,
|
|
18243
|
-
onChange: updateQuantity
|
|
18290
|
+
onChange: updateQuantity,
|
|
18291
|
+
onDecrementBelowMin: del
|
|
18244
18292
|
});
|
|
18245
18293
|
}
|
|
18246
18294
|
};
|
|
@@ -18255,8 +18303,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18255
18303
|
var consequent_8 = ($$anchor) => {
|
|
18256
18304
|
var li_3 = root_5$3();
|
|
18257
18305
|
var button = child(li_3);
|
|
18306
|
+
var text_6 = child(button, true);
|
|
18307
|
+
reset(button);
|
|
18258
18308
|
reset(li_3);
|
|
18259
|
-
template_effect(($0
|
|
18309
|
+
template_effect(($0, $1) => {
|
|
18310
|
+
set_attribute(button, "aria-label", $0);
|
|
18311
|
+
set_text(text_6, $1);
|
|
18312
|
+
}, [() => shop.t("cart.item.aria.removeItem"), () => shop.t("cart.item.remove")]);
|
|
18260
18313
|
delegated("click", button, del);
|
|
18261
18314
|
append($$anchor, li_3);
|
|
18262
18315
|
};
|
|
@@ -18264,7 +18317,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18264
18317
|
if (!preview()) $$render(consequent_8);
|
|
18265
18318
|
});
|
|
18266
18319
|
var li_4 = sibling(node_4, 2);
|
|
18267
|
-
var
|
|
18320
|
+
var text_7 = child(li_4, true);
|
|
18268
18321
|
reset(li_4);
|
|
18269
18322
|
reset(ul);
|
|
18270
18323
|
reset(article);
|
|
@@ -18298,7 +18351,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18298
18351
|
if_block(node_5, ($$render) => {
|
|
18299
18352
|
if (get$2(mantleProduct)) $$render(consequent_9);
|
|
18300
18353
|
});
|
|
18301
|
-
template_effect(($0) => set_text(
|
|
18354
|
+
template_effect(($0) => set_text(text_7, $0), [() => formatCurrency(displayItem().total_price_cents)]);
|
|
18302
18355
|
append($$anchor, fragment_1);
|
|
18303
18356
|
};
|
|
18304
18357
|
if_block(node, ($$render) => {
|
|
@@ -36414,10 +36467,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
36414
36467
|
template_effect(($0, $1) => {
|
|
36415
36468
|
set_text(text_1, $0);
|
|
36416
36469
|
set_text(text_2, $1);
|
|
36417
|
-
}, [() => formatDate(item().attributes.start_time,
|
|
36418
|
-
month: "numeric",
|
|
36419
|
-
day: "numeric"
|
|
36420
|
-
}, shop.locale), () => formatTime(item().attributes.start_time)]);
|
|
36470
|
+
}, [() => shop.formatDate(item().attributes.start_time, "dayMonth"), () => shop.formatTime(item().attributes.start_time)]);
|
|
36421
36471
|
append($$anchor, fragment);
|
|
36422
36472
|
};
|
|
36423
36473
|
if_block(node, ($$render) => {
|
|
@@ -36560,20 +36610,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
36560
36610
|
template_effect(($0, $1) => {
|
|
36561
36611
|
set_text(text_3, $0);
|
|
36562
36612
|
set_text(text_4, $1);
|
|
36563
|
-
}, [() => formatDate(item().attributes.start_time,
|
|
36564
|
-
month: "numeric",
|
|
36565
|
-
day: "numeric"
|
|
36566
|
-
}, shop.locale), () => formatTime(item().attributes.start_time)]);
|
|
36613
|
+
}, [() => shop.formatDate(item().attributes.start_time, "dayMonth"), () => shop.formatTime(item().attributes.start_time)]);
|
|
36567
36614
|
append($$anchor, fragment_4);
|
|
36568
36615
|
};
|
|
36569
36616
|
var consequent_2 = ($$anchor) => {
|
|
36570
36617
|
var span_5 = root_3$3();
|
|
36571
36618
|
var text_5 = child(span_5, true);
|
|
36572
36619
|
reset(span_5);
|
|
36573
|
-
template_effect(($0) => set_text(text_5, $0), [() => formatDate(item().attributes.start_time,
|
|
36574
|
-
month: "numeric",
|
|
36575
|
-
day: "numeric"
|
|
36576
|
-
}, shop.locale)]);
|
|
36620
|
+
template_effect(($0) => set_text(text_5, $0), [() => shop.formatDate(item().attributes.start_time, "dayMonth")]);
|
|
36577
36621
|
append($$anchor, span_5);
|
|
36578
36622
|
};
|
|
36579
36623
|
if_block(node_5, ($$render) => {
|
|
@@ -36765,10 +36809,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
36765
36809
|
template_effect(($0, $1) => {
|
|
36766
36810
|
set_text(text_2, $0);
|
|
36767
36811
|
set_text(text_3, $1);
|
|
36768
|
-
}, [() => formatDate(item().attributes.start_time,
|
|
36769
|
-
month: "numeric",
|
|
36770
|
-
day: "numeric"
|
|
36771
|
-
}, shop.locale), () => formatTime(item().attributes.start_time)]);
|
|
36812
|
+
}, [() => shop.formatDate(item().attributes.start_time, "dayMonth"), () => shop.formatTime(item().attributes.start_time)]);
|
|
36772
36813
|
append($$anchor, fragment);
|
|
36773
36814
|
};
|
|
36774
36815
|
if_block(node, ($$render) => {
|
|
@@ -37542,7 +37583,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
37542
37583
|
template_effect(($0) => {
|
|
37543
37584
|
set_text(text, `${item().product.event_title ?? ""} - ${$0 ?? ""}`);
|
|
37544
37585
|
set_text(text_1, item().product.title);
|
|
37545
|
-
}, [() => formatTime(item().time)]);
|
|
37586
|
+
}, [() => shop.formatTime(item().time)]);
|
|
37546
37587
|
append($$anchor, fragment);
|
|
37547
37588
|
};
|
|
37548
37589
|
const default_title = ($$anchor) => {
|
|
@@ -37651,7 +37692,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
37651
37692
|
var li_6 = sibling(li_5, 2);
|
|
37652
37693
|
var node_5 = child(li_6);
|
|
37653
37694
|
{
|
|
37654
|
-
let $0 = /* @__PURE__ */ user_derived(() => quantityLabel(item()));
|
|
37695
|
+
let $0 = /* @__PURE__ */ user_derived(() => quantityLabel(item(), shop.locale));
|
|
37655
37696
|
QuantityControl(node_5, {
|
|
37656
37697
|
get value() {
|
|
37657
37698
|
return item().quantity;
|
|
@@ -37829,7 +37870,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
37829
37870
|
this.timeslots = quotaManager.timeslotsOn(date, this.tsd?.timeslotTicketIds).map((x) => ({
|
|
37830
37871
|
...x,
|
|
37831
37872
|
startAt: x.timeSlot,
|
|
37832
|
-
timeFormatted: x.timeSlot
|
|
37873
|
+
timeFormatted: shop.formatTime(x.timeSlot),
|
|
37833
37874
|
available: x.capacity > 0
|
|
37834
37875
|
}));
|
|
37835
37876
|
}
|