@gomusdev/web-components 3.8.2 → 3.9.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.
- package/README.md +18 -0
- package/dist-js/gomus-webcomponents.iife.js +162 -51
- package/dist-js/gomus-webcomponents.js +162 -51
- package/dist-js/gomus-webcomponents.min.iife.js +36 -36
- package/dist-js/gomus-webcomponents.min.js +5927 -5853
- package/dist-js/src/components/cart/mocks/gomusTicketMocks.d.ts +3 -0
- package/dist-js/src/components/ticketSelection/filters/_helpers.d.ts +16 -0
- package/dist-js/src/components/ticketSelection/filters/_helpers.spec.d.ts +1 -0
- package/dist-js/src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/SegmentDetails.svelte.d.ts +1 -0
- package/dist-js/src/lib/helpers/translations.d.ts +1 -0
- package/dist-js/src/lib/models/ticket/UITicket.svelte.d.ts +4 -1
- package/dist-js/src/lib/stores/shop.fetchAndCache.spec.d.ts +1 -0
- package/dist-js/src/lib/stores/shop.svelte.d.ts +2 -1
- package/dist-js/src/zod-config.d.ts +1 -0
- package/dist-js/src/zod-config.spec.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
//#region src/zod-config.ts
|
|
2
|
+
var g = globalThis;
|
|
3
|
+
(g.__zod_globalConfig ??= {}).jitless = true;
|
|
4
|
+
//#endregion
|
|
1
5
|
//#region ../../node_modules/.pnpm/svelte@5.56.1_@typescript-eslint+types@8.60.1/node_modules/svelte/src/internal/disclose-version.js
|
|
2
6
|
if (typeof window !== "undefined") ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
|
|
3
7
|
//#endregion
|
|
@@ -11799,7 +11803,8 @@ function createUITicket(apiTicket, options) {
|
|
|
11799
11803
|
normal: "day",
|
|
11800
11804
|
annual: "annual"
|
|
11801
11805
|
}[apiTicket.ticket_type],
|
|
11802
|
-
shop_order: apiTicket.shop_order ?? 0
|
|
11806
|
+
shop_order: apiTicket.shop_order ?? 0,
|
|
11807
|
+
content: void 0
|
|
11803
11808
|
};
|
|
11804
11809
|
}
|
|
11805
11810
|
function initUITimeslotTickets(tickets, selectedTime = "") {
|
|
@@ -13531,13 +13536,19 @@ var Shop = class {
|
|
|
13531
13536
|
ticketsAndQuotas(params) {
|
|
13532
13537
|
return this.fetchAndCache(TICKET_AND_QUOTAS_ENDPOINT, `ticketsAndQuotas-${JSON.stringify(params)}`, "", {
|
|
13533
13538
|
cache: 60,
|
|
13534
|
-
query: params
|
|
13539
|
+
query: assign({ per_page: 100 }, params ?? {})
|
|
13535
13540
|
});
|
|
13536
13541
|
}
|
|
13537
13542
|
tickets(params) {
|
|
13538
13543
|
return this.fetchAndCache(TICKETS_ENDPOINT, `tickets-${JSON.stringify(params)}`, "tickets", {
|
|
13539
13544
|
cache: 60,
|
|
13540
|
-
query: params
|
|
13545
|
+
query: assign({ per_page: 100 }, params ?? {})
|
|
13546
|
+
});
|
|
13547
|
+
}
|
|
13548
|
+
ticketsContent(ticketIds) {
|
|
13549
|
+
return this.fetchAndCache("/api/v4/tickets/content", `ticketsContent-${JSON.stringify(ticketIds)}`, "data", {
|
|
13550
|
+
cache: 300,
|
|
13551
|
+
query: assign({ "ticket_ids[]": ticketIds }, { per_page: 100 })
|
|
13541
13552
|
});
|
|
13542
13553
|
}
|
|
13543
13554
|
signIn(params) {
|
|
@@ -13586,7 +13597,7 @@ var Shop = class {
|
|
|
13586
13597
|
}
|
|
13587
13598
|
getDates(query) {
|
|
13588
13599
|
return this.fetchAndCache("/api/v4/dates", `dates-${JSON.stringify(query)}`, "dates", {
|
|
13589
|
-
query,
|
|
13600
|
+
query: assign({ per_page: 100 }, query),
|
|
13590
13601
|
cache: 60
|
|
13591
13602
|
});
|
|
13592
13603
|
}
|
|
@@ -13672,7 +13683,7 @@ var Shop = class {
|
|
|
13672
13683
|
console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!");
|
|
13673
13684
|
return get$2(this.#data)[dataKey];
|
|
13674
13685
|
}
|
|
13675
|
-
const query =
|
|
13686
|
+
const query = options.query;
|
|
13676
13687
|
const fetchId = endpoint + JSON.stringify(query);
|
|
13677
13688
|
const isNotFetchedYet = !this.#fetchStatus[fetchId];
|
|
13678
13689
|
const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
|
|
@@ -13682,10 +13693,10 @@ var Shop = class {
|
|
|
13682
13693
|
return get$2(this.#data)[dataKey];
|
|
13683
13694
|
}
|
|
13684
13695
|
get museums() {
|
|
13685
|
-
return this.fetchAndCache("/api/v4/museums", "museums", "museums");
|
|
13696
|
+
return this.fetchAndCache("/api/v4/museums", "museums", "museums", { query: { per_page: 100 } });
|
|
13686
13697
|
}
|
|
13687
13698
|
get exhibitions() {
|
|
13688
|
-
return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions");
|
|
13699
|
+
return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions", { query: { per_page: 100 } });
|
|
13689
13700
|
}
|
|
13690
13701
|
getEvent(id) {
|
|
13691
13702
|
return this.fetchAndCache(`/api/v4/events/${id}`, `single_event_${id}`, "event");
|
|
@@ -13703,31 +13714,35 @@ var Shop = class {
|
|
|
13703
13714
|
return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${token}`, `coupon_sale_barcode_${token}`, "coupon_sale");
|
|
13704
13715
|
}
|
|
13705
13716
|
getCoupons() {
|
|
13706
|
-
return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: {
|
|
13717
|
+
return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: {
|
|
13718
|
+
online_available: true,
|
|
13719
|
+
per_page: 100
|
|
13720
|
+
} });
|
|
13707
13721
|
}
|
|
13708
13722
|
getEventDetailsOnDate(eventId, dateId) {
|
|
13709
13723
|
return this.fetchAndCache(`/api/v4/events/${eventId}/dates/${dateId}`, `/api/v4/events/${eventId}/dates/${dateId}`, "date");
|
|
13710
13724
|
}
|
|
13711
13725
|
get events() {
|
|
13712
|
-
return this.fetchAndCache("/api/v4/events", "events", "events");
|
|
13726
|
+
return this.fetchAndCache("/api/v4/events", "events", "events", { query: { per_page: 100 } });
|
|
13713
13727
|
}
|
|
13714
13728
|
get upcomingEvents() {
|
|
13715
13729
|
return this.fetchAndCache("/api/v4/events", "events", "events", { query: {
|
|
13716
13730
|
by_bookable: true,
|
|
13717
|
-
with_bookings_in_future: 1
|
|
13731
|
+
with_bookings_in_future: 1,
|
|
13732
|
+
per_page: 100
|
|
13718
13733
|
} });
|
|
13719
13734
|
}
|
|
13720
13735
|
get tours() {
|
|
13721
|
-
return this.fetchAndCache("/api/v4/tours", "tours", "tours");
|
|
13736
|
+
return this.fetchAndCache("/api/v4/tours", "tours", "tours", { query: { per_page: 100 } });
|
|
13722
13737
|
}
|
|
13723
13738
|
get merchandises() {
|
|
13724
|
-
return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises");
|
|
13739
|
+
return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises", { query: { per_page: 100 } });
|
|
13725
13740
|
}
|
|
13726
13741
|
get customerSalutations() {
|
|
13727
13742
|
return this.fetchAndCache("/api/v3/customer_salutations", "customerSalutations", "customer_salutations");
|
|
13728
13743
|
}
|
|
13729
13744
|
get countries() {
|
|
13730
|
-
return this.fetchAndCache("/api/v3/countries", "countries", "countries");
|
|
13745
|
+
return this.fetchAndCache("/api/v3/countries", "countries", "countries", { query: { per_page: 100 } });
|
|
13731
13746
|
}
|
|
13732
13747
|
get locales() {
|
|
13733
13748
|
return this.fetchAndCache("/api/v4/locales", "locales", "locales_options");
|
|
@@ -15186,8 +15201,8 @@ function option(value) {
|
|
|
15186
15201
|
var root$46 = /* @__PURE__ */ from_html(`<s class="go-cart-item-price-original"> </s> <span class="go-cart-item-price-discounted"> </span>`, 1);
|
|
15187
15202
|
var root_1$14 = /* @__PURE__ */ from_html(`<span class="go-cart-item-price-discounted"> </span>`);
|
|
15188
15203
|
var root_2$10 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
15189
|
-
var root_3$
|
|
15190
|
-
var root_4$
|
|
15204
|
+
var root_3$7 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
15205
|
+
var root_4$4 = /* @__PURE__ */ from_html(`<select class="go-cart-item-select"></select>`);
|
|
15191
15206
|
var root_5$2 = /* @__PURE__ */ from_html(`<li class="go-cart-item-remove"><button class="go-cart-remove">⨉</button></li>`);
|
|
15192
15207
|
var root_6$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>`);
|
|
15193
15208
|
function Item$1($$anchor, $$props) {
|
|
@@ -15309,9 +15324,9 @@ function Item$1($$anchor, $$props) {
|
|
|
15309
15324
|
append($$anchor, span_2);
|
|
15310
15325
|
};
|
|
15311
15326
|
var alternate_1 = ($$anchor) => {
|
|
15312
|
-
var select = root_4$
|
|
15327
|
+
var select = root_4$4();
|
|
15313
15328
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor, q) => {
|
|
15314
|
-
var option = root_3$
|
|
15329
|
+
var option = root_3$7();
|
|
15315
15330
|
var text_4 = child(option, true);
|
|
15316
15331
|
reset(option);
|
|
15317
15332
|
var option_value = {};
|
|
@@ -30296,8 +30311,8 @@ var rest_excludes = new Set([
|
|
|
30296
30311
|
var root$15 = /* @__PURE__ */ from_html(`<span class="go-field-star" aria-hidden="true">*</span>`);
|
|
30297
30312
|
var root_1$7 = /* @__PURE__ */ from_html(` <!>`, 1);
|
|
30298
30313
|
var root_2$6 = /* @__PURE__ */ from_html(`<label><!></label> <input/>`, 1);
|
|
30299
|
-
var root_3$
|
|
30300
|
-
var root_4$
|
|
30314
|
+
var root_3$6 = /* @__PURE__ */ from_html(`<label><!></label> <textarea></textarea>`, 1);
|
|
30315
|
+
var root_4$3 = /* @__PURE__ */ from_html(`<figure role="status" aria-live="polite"><img class="go-file-preview"/> <figcaption class="go-file-preview-caption"> </figcaption></figure>`);
|
|
30301
30316
|
var root_5$1 = /* @__PURE__ */ from_html(`<label><!></label> <input/> <!>`, 1);
|
|
30302
30317
|
var root_6$1 = /* @__PURE__ */ from_html(`<label><input/> <span class="go-checkbox-label"><!></span></label>`);
|
|
30303
30318
|
var root_7$1 = /* @__PURE__ */ from_html(`<img src="" alt=""/> <option> </option>`, 1);
|
|
@@ -30348,7 +30363,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
30348
30363
|
append($$anchor, fragment_1);
|
|
30349
30364
|
};
|
|
30350
30365
|
const textarea = ($$anchor) => {
|
|
30351
|
-
var fragment_2 = root_3$
|
|
30366
|
+
var fragment_2 = root_3$6();
|
|
30352
30367
|
var label_2 = first_child(fragment_2);
|
|
30353
30368
|
labelText(child(label_2));
|
|
30354
30369
|
reset(label_2);
|
|
@@ -30391,7 +30406,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
30391
30406
|
}), void 0, void 0, void 0, void 0, true);
|
|
30392
30407
|
var node_4 = sibling(input_2, 2);
|
|
30393
30408
|
var consequent_1 = ($$anchor) => {
|
|
30394
|
-
var figure = root_4$
|
|
30409
|
+
var figure = root_4$3();
|
|
30395
30410
|
var img = child(figure);
|
|
30396
30411
|
var figcaption = sibling(img, 2);
|
|
30397
30412
|
var text_1 = child(figcaption, true);
|
|
@@ -30708,7 +30723,7 @@ create_custom_element(InputAndLabel, {
|
|
|
30708
30723
|
var root$14 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
30709
30724
|
var root_1$6 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
30710
30725
|
var root_2$5 = /* @__PURE__ */ from_html(`<ul class="go-field-errors"></ul>`);
|
|
30711
|
-
var root_3$
|
|
30726
|
+
var root_3$5 = /* @__PURE__ */ from_html(`<!> <!> <!>`, 1);
|
|
30712
30727
|
function Field($$anchor, $$props) {
|
|
30713
30728
|
push($$props, true);
|
|
30714
30729
|
let key = prop($$props, "key", 7), required = prop($$props, "required", 7, false), labelClass = prop($$props, "labelClass", 7), inputClass = prop($$props, "inputClass", 7);
|
|
@@ -30766,7 +30781,7 @@ function Field($$anchor, $$props) {
|
|
|
30766
30781
|
flushSync();
|
|
30767
30782
|
}
|
|
30768
30783
|
};
|
|
30769
|
-
var fragment = root_3$
|
|
30784
|
+
var fragment = root_3$5();
|
|
30770
30785
|
var node = first_child(fragment);
|
|
30771
30786
|
InputAndLabel(node, {
|
|
30772
30787
|
get describedByIds() {
|
|
@@ -30866,7 +30881,7 @@ customElements.define("go-all-fields", create_custom_element(AllFields, {}, [],
|
|
|
30866
30881
|
var root$12 = /* @__PURE__ */ from_html(`<p aria-hidden="true"> </p>`);
|
|
30867
30882
|
var root_1$5 = /* @__PURE__ */ from_html(`<li> </li>`);
|
|
30868
30883
|
var root_2$4 = /* @__PURE__ */ from_html(`<ul class="go-error-feedback-api-errors"></ul>`);
|
|
30869
|
-
var root_3$
|
|
30884
|
+
var root_3$4 = /* @__PURE__ */ from_html(`<div><p aria-live="assertive" class="sr-only"><!></p> <!> <!></div>`);
|
|
30870
30885
|
function ErrorsFeedback($$anchor, $$props) {
|
|
30871
30886
|
push($$props, true);
|
|
30872
30887
|
const _details = getDetails$1($$props.$$host);
|
|
@@ -30887,7 +30902,7 @@ function ErrorsFeedback($$anchor, $$props) {
|
|
|
30887
30902
|
$$props.$$host.classList.toggle("go-feedback", true);
|
|
30888
30903
|
$$props.$$host.setAttribute("data-num-errors", get$2(numErrors).toString());
|
|
30889
30904
|
});
|
|
30890
|
-
var div = root_3$
|
|
30905
|
+
var div = root_3$4();
|
|
30891
30906
|
var p = child(div);
|
|
30892
30907
|
var node = child(p);
|
|
30893
30908
|
var consequent = ($$anchor) => {
|
|
@@ -32428,6 +32443,33 @@ var FILTER_NAMES = [
|
|
|
32428
32443
|
//#region src/components/ticketSelection/filters/_helpers.ts
|
|
32429
32444
|
var TWO_HOURS_MS = 7200 * 1e3;
|
|
32430
32445
|
/**
|
|
32446
|
+
* When a segment opts into content attributes (with-content), batch-fetch
|
|
32447
|
+
* tickets/content for the given tickets and merge each entry's `content` onto
|
|
32448
|
+
* the matching ticket by id (mirrors the legacy `ticket.content = item.content`).
|
|
32449
|
+
* Mutates the tickets in place; call before adding them to the preCart so the
|
|
32450
|
+
* content is present on first render. No-op — and no request — when the segment
|
|
32451
|
+
* hasn't enabled the feature or there are no tickets to enrich.
|
|
32452
|
+
*
|
|
32453
|
+
* Best-effort: the content is an optional, additive sidecar, so a failed or
|
|
32454
|
+
* absent fetch degrades to "no info buttons" and must never empty the ticket
|
|
32455
|
+
* list (see audit finding IB-01). Note this does NOT cover a hung request — a
|
|
32456
|
+
* never-settling fetch is a separate core-infra concern (IB-05).
|
|
32457
|
+
*/
|
|
32458
|
+
async function enrichTicketsWithContent(segment, tickets) {
|
|
32459
|
+
if (!segment.withContent) return;
|
|
32460
|
+
const ids = tickets.map((t) => t.id).filter((id) => typeof id === "number");
|
|
32461
|
+
if (!ids.length) return;
|
|
32462
|
+
try {
|
|
32463
|
+
const entries = await shop.asyncFetch(() => shop.ticketsContent(ids)) ?? [];
|
|
32464
|
+
const byId = new Map(entries.map((e) => [e.id, e.content]));
|
|
32465
|
+
for (const ticket of tickets) {
|
|
32466
|
+
if (typeof ticket.id !== "number") continue;
|
|
32467
|
+
const content = byId.get(ticket.id);
|
|
32468
|
+
if (content) ticket.content = content;
|
|
32469
|
+
}
|
|
32470
|
+
} catch {}
|
|
32471
|
+
}
|
|
32472
|
+
/**
|
|
32431
32473
|
* Load quotas fetched by a filter's loadTimeslots into the shared quota store and
|
|
32432
32474
|
* record which ticket ids this selection loaded for its picker. timeslotsOn() reads
|
|
32433
32475
|
* tsd.timeslotTicketIds, so only these tickets' slots render — a foreign
|
|
@@ -32503,6 +32545,7 @@ var REGISTRY = {
|
|
|
32503
32545
|
}));
|
|
32504
32546
|
shop.capacityManager.addQuotas(quotas);
|
|
32505
32547
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
|
|
32548
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32506
32549
|
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: tsd.selectedTime }));
|
|
32507
32550
|
}
|
|
32508
32551
|
},
|
|
@@ -32534,6 +32577,7 @@ var REGISTRY = {
|
|
|
32534
32577
|
const firstQuota = Object.values(quotas)[0];
|
|
32535
32578
|
const timeslot = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
32536
32579
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, timeslot), timeslot);
|
|
32580
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32537
32581
|
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: timeslot }));
|
|
32538
32582
|
}
|
|
32539
32583
|
},
|
|
@@ -32555,7 +32599,9 @@ var REGISTRY = {
|
|
|
32555
32599
|
"by_ticket_ids[]": tsd.ticketIds,
|
|
32556
32600
|
"by_ticket_group_ids[]": segment.ticketGroupIds ?? tsd.ticketGroupIds
|
|
32557
32601
|
}));
|
|
32558
|
-
|
|
32602
|
+
const uiTickets = Object.values(tickets).map((t) => createUITicket(t));
|
|
32603
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32604
|
+
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket));
|
|
32559
32605
|
}
|
|
32560
32606
|
},
|
|
32561
32607
|
"event:admission": {
|
|
@@ -32594,6 +32640,7 @@ var REGISTRY = {
|
|
|
32594
32640
|
}));
|
|
32595
32641
|
shop.capacityManager.addQuotas(quotas);
|
|
32596
32642
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
|
|
32643
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32597
32644
|
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: tsd.selectedTime }));
|
|
32598
32645
|
}
|
|
32599
32646
|
},
|
|
@@ -32626,6 +32673,7 @@ var REGISTRY = {
|
|
|
32626
32673
|
const firstQuota = Object.values(quotas)[0];
|
|
32627
32674
|
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
32628
32675
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
32676
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32629
32677
|
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
32630
32678
|
}
|
|
32631
32679
|
},
|
|
@@ -32674,6 +32722,7 @@ var REGISTRY = {
|
|
|
32674
32722
|
}));
|
|
32675
32723
|
shop.capacityManager.addQuotas(quotas);
|
|
32676
32724
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
|
|
32725
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32677
32726
|
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: tsd.selectedTime }));
|
|
32678
32727
|
}
|
|
32679
32728
|
},
|
|
@@ -32741,6 +32790,7 @@ var REGISTRY = {
|
|
|
32741
32790
|
}));
|
|
32742
32791
|
shop.capacityManager.addQuotas(quotas);
|
|
32743
32792
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, date.start_time), date.start_time);
|
|
32793
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32744
32794
|
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: date.start_time }));
|
|
32745
32795
|
}
|
|
32746
32796
|
}
|
|
@@ -32786,6 +32836,7 @@ var REGISTRY = {
|
|
|
32786
32836
|
const firstQuota = Object.values(quotas)[0];
|
|
32787
32837
|
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : date.start_time;
|
|
32788
32838
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
32839
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32789
32840
|
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
32790
32841
|
}
|
|
32791
32842
|
}
|
|
@@ -32829,6 +32880,7 @@ var REGISTRY = {
|
|
|
32829
32880
|
}));
|
|
32830
32881
|
shop.capacityManager.addQuotas(quotas);
|
|
32831
32882
|
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, date.start_time), date.start_time);
|
|
32883
|
+
await enrichTicketsWithContent(segment, uiTickets);
|
|
32832
32884
|
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: date.start_time }));
|
|
32833
32885
|
}
|
|
32834
32886
|
}
|
|
@@ -33278,7 +33330,7 @@ customElements.define("go-order", create_custom_element(Order, { token: {
|
|
|
33278
33330
|
var root$9 = /* @__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);
|
|
33279
33331
|
var root_1$4 = /* @__PURE__ */ from_html(`<br/> <span class="go-order-item-quantities"> </span>`, 1);
|
|
33280
33332
|
var root_2$3 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
|
|
33281
|
-
var root_3$
|
|
33333
|
+
var root_3$3 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count">1</li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!> <!> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
|
|
33282
33334
|
function Event$1($$anchor, $$props) {
|
|
33283
33335
|
push($$props, true);
|
|
33284
33336
|
let item = prop($$props, "item", 7), orderDetails = prop($$props, "orderDetails", 7);
|
|
@@ -33298,7 +33350,7 @@ function Event$1($$anchor, $$props) {
|
|
|
33298
33350
|
flushSync();
|
|
33299
33351
|
}
|
|
33300
33352
|
};
|
|
33301
|
-
var li = root_3$
|
|
33353
|
+
var li = root_3$3();
|
|
33302
33354
|
var article = child(li);
|
|
33303
33355
|
var ul = child(article);
|
|
33304
33356
|
var li_1 = sibling(child(ul), 2);
|
|
@@ -33383,8 +33435,8 @@ create_custom_element(Event$1, {
|
|
|
33383
33435
|
var root$8 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
|
|
33384
33436
|
var root_1$3 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
|
|
33385
33437
|
var root_2$2 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`, 1);
|
|
33386
|
-
var root_3$
|
|
33387
|
-
var root_4$
|
|
33438
|
+
var root_3$2 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization"> </a>`, 1);
|
|
33439
|
+
var root_4$2 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
|
|
33388
33440
|
var root_5 = /* @__PURE__ */ from_html(`<a aria-label="iCal link"> </a>`);
|
|
33389
33441
|
var root_6 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-order-breakdown-count"></li> <li class="go-order-breakdown-product"><span class="go-order-item-title"> </span> <!></li> <li class="go-order-breakdown-item-price"> </li> <li class="go-order-breakdown-passbook"><!></li> <li class="go-order-breakdown-ical"><!></li></ul></article></li>`);
|
|
33390
33442
|
var root_7 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank" rel="noopener noreferrer"> </a>`);
|
|
@@ -33470,7 +33522,7 @@ function TicketSale($$anchor, $$props) {
|
|
|
33470
33522
|
append($$anchor, fragment_2);
|
|
33471
33523
|
};
|
|
33472
33524
|
var alternate = ($$anchor) => {
|
|
33473
|
-
var fragment_4 = root_3$
|
|
33525
|
+
var fragment_4 = root_3$2();
|
|
33474
33526
|
var a_1 = sibling(first_child(fragment_4), 2);
|
|
33475
33527
|
var text_5 = child(a_1, true);
|
|
33476
33528
|
reset(a_1);
|
|
@@ -33491,7 +33543,7 @@ function TicketSale($$anchor, $$props) {
|
|
|
33491
33543
|
var li_4 = sibling(li_3, 2);
|
|
33492
33544
|
var node_4 = child(li_4);
|
|
33493
33545
|
var consequent_3 = ($$anchor) => {
|
|
33494
|
-
var a_2 = root_4$
|
|
33546
|
+
var a_2 = root_4$2();
|
|
33495
33547
|
var img = child(a_2);
|
|
33496
33548
|
reset(a_2);
|
|
33497
33549
|
template_effect(() => {
|
|
@@ -34077,6 +34129,13 @@ var SegmentDetails = class {
|
|
|
34077
34129
|
set museumIds(value) {
|
|
34078
34130
|
set(this.#museumIds, value, true);
|
|
34079
34131
|
}
|
|
34132
|
+
#withContent = /* @__PURE__ */ state(false);
|
|
34133
|
+
get withContent() {
|
|
34134
|
+
return get$2(this.#withContent);
|
|
34135
|
+
}
|
|
34136
|
+
set withContent(value) {
|
|
34137
|
+
set(this.#withContent, value, true);
|
|
34138
|
+
}
|
|
34080
34139
|
constructor(filters, tsdWrapper) {
|
|
34081
34140
|
this.filters = filters === void 0 ? void 0 : Array.isArray(filters) ? filters : [filters];
|
|
34082
34141
|
this.#ticketSelectionDetails = /* @__PURE__ */ user_derived(() => tsdWrapper.value);
|
|
@@ -34107,7 +34166,7 @@ var getSegmentDetails = createGetDetails(KEY);
|
|
|
34107
34166
|
//#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/TicketSegment.svelte
|
|
34108
34167
|
function TicketSegment($$anchor, $$props) {
|
|
34109
34168
|
push($$props, true);
|
|
34110
|
-
const filters = prop($$props, "filters", 7), dateId = prop($$props, "dateId", 7), query = prop($$props, "query", 7), limit = prop($$props, "limit", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7), languageIds = prop($$props, "languageIds", 7), catchWordIds = prop($$props, "catchWordIds", 7), museumIds = prop($$props, "museumIds", 7);
|
|
34169
|
+
const filters = prop($$props, "filters", 7), dateId = prop($$props, "dateId", 7), query = prop($$props, "query", 7), limit = prop($$props, "limit", 7), ticketGroupIds = prop($$props, "ticketGroupIds", 7), languageIds = prop($$props, "languageIds", 7), catchWordIds = prop($$props, "catchWordIds", 7), museumIds = prop($$props, "museumIds", 7), withContent = prop($$props, "withContent", 7);
|
|
34111
34170
|
function parseFilters(value) {
|
|
34112
34171
|
if (!value) return void 0;
|
|
34113
34172
|
const out = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
@@ -34126,6 +34185,7 @@ function TicketSegment($$anchor, $$props) {
|
|
|
34126
34185
|
details.languageIds = parseIds(languageIds());
|
|
34127
34186
|
details.catchWordIds = parseIds(catchWordIds());
|
|
34128
34187
|
details.museumIds = parseIds(museumIds());
|
|
34188
|
+
details.withContent = Boolean(withContent());
|
|
34129
34189
|
});
|
|
34130
34190
|
user_effect(() => {
|
|
34131
34191
|
details.dateId;
|
|
@@ -34136,6 +34196,7 @@ function TicketSegment($$anchor, $$props) {
|
|
|
34136
34196
|
details.catchWordIds;
|
|
34137
34197
|
details.query;
|
|
34138
34198
|
details.limit;
|
|
34199
|
+
details.withContent;
|
|
34139
34200
|
tsd?.filters;
|
|
34140
34201
|
tsd?.selectedTimeslot;
|
|
34141
34202
|
tsd?.selectedTime;
|
|
@@ -34210,6 +34271,13 @@ function TicketSegment($$anchor, $$props) {
|
|
|
34210
34271
|
set museumIds($$value) {
|
|
34211
34272
|
museumIds($$value);
|
|
34212
34273
|
flushSync();
|
|
34274
|
+
},
|
|
34275
|
+
get withContent() {
|
|
34276
|
+
return withContent();
|
|
34277
|
+
},
|
|
34278
|
+
set withContent($$value) {
|
|
34279
|
+
withContent($$value);
|
|
34280
|
+
flushSync();
|
|
34213
34281
|
}
|
|
34214
34282
|
});
|
|
34215
34283
|
}
|
|
@@ -34253,6 +34321,11 @@ customElements.define("go-ticket-segment", create_custom_element(TicketSegment,
|
|
|
34253
34321
|
attribute: "museum-ids",
|
|
34254
34322
|
reflect: true,
|
|
34255
34323
|
type: "String"
|
|
34324
|
+
},
|
|
34325
|
+
withContent: {
|
|
34326
|
+
attribute: "with-content",
|
|
34327
|
+
reflect: true,
|
|
34328
|
+
type: "Boolean"
|
|
34256
34329
|
}
|
|
34257
34330
|
}, [], ["details"]));
|
|
34258
34331
|
//#endregion
|
|
@@ -36123,9 +36196,12 @@ var purify = createDOMPurify();
|
|
|
36123
36196
|
//#endregion
|
|
36124
36197
|
//#region src/components/ticketSelection/subcomponents/tickets/subcomponents/segment/Item.svelte
|
|
36125
36198
|
var root$3 = /* @__PURE__ */ from_html(`<span class="go-tickets-item-title-event-title"> </span> <span class="go-tickets-item-title-product-title"> </span>`, 1);
|
|
36126
|
-
var root_1$2 = /* @__PURE__ */ from_html(`<
|
|
36127
|
-
var root_2$1 = /* @__PURE__ */ from_html(`<li
|
|
36199
|
+
var root_1$2 = /* @__PURE__ */ from_html(`<li class="go-tickets-item-info"><button type="button" data-testid="ticket-info-toggle"></button></li>`);
|
|
36200
|
+
var root_2$1 = /* @__PURE__ */ from_html(`<li class="go-ticket-additional-info" data-testid="ticket-additional-info"> </li>`);
|
|
36201
|
+
var root_3$1 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
36202
|
+
var root_4$1 = /* @__PURE__ */ from_html(`<li><article><ul><li class="go-tickets-item-title"><!></li> <!> <li class="go-tickets-item-description" data-go-tickets-description=""></li> <!> <li class="go-tickets-item-price" data-go-tickets-price=""> </li> <li class="go-tickets-item-quality" data-go-tickets-quality=""><select class="go-tickets-item-select"></select></li></ul></article></li>`);
|
|
36128
36203
|
function Item($$anchor, $$props) {
|
|
36204
|
+
const uid = props_id();
|
|
36129
36205
|
push($$props, true);
|
|
36130
36206
|
const scaled_title = ($$anchor) => {
|
|
36131
36207
|
var fragment = root$3();
|
|
@@ -36149,6 +36225,9 @@ function Item($$anchor, $$props) {
|
|
|
36149
36225
|
};
|
|
36150
36226
|
let item = prop($$props, "item", 7), details = prop($$props, "details", 7);
|
|
36151
36227
|
let capacity = /* @__PURE__ */ state(void 0);
|
|
36228
|
+
let infoExpanded = /* @__PURE__ */ state(false);
|
|
36229
|
+
const reductionReason = /* @__PURE__ */ user_derived(() => item().product?.content?.reduction_reason);
|
|
36230
|
+
const infoPanelId = `go-ticket-info-${uid}`;
|
|
36152
36231
|
user_effect(() => {
|
|
36153
36232
|
details().preCart.items.map((i) => i.quantity);
|
|
36154
36233
|
untrack(() => {
|
|
@@ -36178,55 +36257,87 @@ function Item($$anchor, $$props) {
|
|
|
36178
36257
|
};
|
|
36179
36258
|
var fragment_2 = comment();
|
|
36180
36259
|
var node = first_child(fragment_2);
|
|
36181
|
-
var
|
|
36182
|
-
var li =
|
|
36260
|
+
var consequent_2 = ($$anchor) => {
|
|
36261
|
+
var li = root_4$1();
|
|
36183
36262
|
var article = child(li);
|
|
36184
36263
|
var ul = child(article);
|
|
36185
36264
|
var li_1 = child(ul);
|
|
36186
36265
|
var node_1 = child(li_1);
|
|
36187
36266
|
titleSnippet(node_1);
|
|
36188
36267
|
reset(li_1);
|
|
36189
|
-
var
|
|
36190
|
-
|
|
36191
|
-
|
|
36192
|
-
|
|
36193
|
-
|
|
36268
|
+
var node_2 = sibling(li_1, 2);
|
|
36269
|
+
var consequent = ($$anchor) => {
|
|
36270
|
+
var li_2 = root_1$2();
|
|
36271
|
+
var button = child(li_2);
|
|
36272
|
+
reset(li_2);
|
|
36273
|
+
template_effect(($0) => {
|
|
36274
|
+
set_class(button, 1, clsx(["go-ticket-info-icon", get$2(infoExpanded) && "is-active"]));
|
|
36275
|
+
set_attribute(button, "aria-expanded", get$2(infoExpanded));
|
|
36276
|
+
set_attribute(button, "aria-controls", infoPanelId);
|
|
36277
|
+
set_attribute(button, "aria-label", $0);
|
|
36278
|
+
}, [() => shop.t("ticket.list.additionalInfo")]);
|
|
36279
|
+
delegated("click", button, () => set(infoExpanded, !get$2(infoExpanded)));
|
|
36280
|
+
append($$anchor, li_2);
|
|
36281
|
+
};
|
|
36282
|
+
if_block(node_2, ($$render) => {
|
|
36283
|
+
if (get$2(reductionReason)) $$render(consequent);
|
|
36284
|
+
});
|
|
36285
|
+
var li_3 = sibling(node_2, 2);
|
|
36286
|
+
html$2(li_3, () => purify.sanitize(item().product.description), true);
|
|
36194
36287
|
reset(li_3);
|
|
36195
|
-
var
|
|
36196
|
-
var
|
|
36288
|
+
var node_3 = sibling(li_3, 2);
|
|
36289
|
+
var consequent_1 = ($$anchor) => {
|
|
36290
|
+
var li_4 = root_2$1();
|
|
36291
|
+
var text_3 = child(li_4, true);
|
|
36292
|
+
reset(li_4);
|
|
36293
|
+
template_effect(($0) => {
|
|
36294
|
+
set_attribute(li_4, "id", infoPanelId);
|
|
36295
|
+
set_attribute(li_4, "hidden", !get$2(infoExpanded));
|
|
36296
|
+
set_text(text_3, $0);
|
|
36297
|
+
}, [() => shop.t(get$2(reductionReason))]);
|
|
36298
|
+
append($$anchor, li_4);
|
|
36299
|
+
};
|
|
36300
|
+
if_block(node_3, ($$render) => {
|
|
36301
|
+
if (get$2(reductionReason)) $$render(consequent_1);
|
|
36302
|
+
});
|
|
36303
|
+
var li_5 = sibling(node_3, 2);
|
|
36304
|
+
var text_4 = child(li_5, true);
|
|
36305
|
+
reset(li_5);
|
|
36306
|
+
var li_6 = sibling(li_5, 2);
|
|
36307
|
+
var select = child(li_6);
|
|
36197
36308
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor, q) => {
|
|
36198
|
-
var option =
|
|
36199
|
-
var
|
|
36309
|
+
var option = root_3$1();
|
|
36310
|
+
var text_5 = child(option, true);
|
|
36200
36311
|
reset(option);
|
|
36201
36312
|
var option_value = {};
|
|
36202
36313
|
template_effect(() => {
|
|
36203
36314
|
set_selected(option, item().quantity === get$2(q).value);
|
|
36204
|
-
set_text(
|
|
36315
|
+
set_text(text_5, get$2(q).label);
|
|
36205
36316
|
if (option_value !== (option_value = get$2(q).value)) option.value = (option.__value = get$2(q).value) ?? "";
|
|
36206
36317
|
});
|
|
36207
36318
|
append($$anchor, option);
|
|
36208
36319
|
});
|
|
36209
36320
|
reset(select);
|
|
36210
|
-
reset(
|
|
36321
|
+
reset(li_6);
|
|
36211
36322
|
reset(ul);
|
|
36212
36323
|
reset(article);
|
|
36213
36324
|
reset(li);
|
|
36214
36325
|
template_effect(($0) => {
|
|
36215
36326
|
set_class(article, 1, clsx(["go-tickets-item", get$2(capacity).bookedOut && "is-booked-out"]));
|
|
36216
36327
|
set_attribute(article, "data-testid", item().uuid);
|
|
36217
|
-
set_text(
|
|
36328
|
+
set_text(text_4, item().price_formatted);
|
|
36218
36329
|
set_attribute(select, "aria-label", $0);
|
|
36219
36330
|
}, [() => shop.t("cart.content.table.edit")]);
|
|
36220
36331
|
delegated("change", select, (e) => update(item(), e.target, details()?.ticketSelectionDetails));
|
|
36221
36332
|
append($$anchor, li);
|
|
36222
36333
|
};
|
|
36223
36334
|
if_block(node, ($$render) => {
|
|
36224
|
-
if (get$2(capacity) && !get$2(capacity).unavailable) $$render(
|
|
36335
|
+
if (get$2(capacity) && !get$2(capacity).unavailable) $$render(consequent_2);
|
|
36225
36336
|
});
|
|
36226
36337
|
append($$anchor, fragment_2);
|
|
36227
36338
|
return pop($$exports);
|
|
36228
36339
|
}
|
|
36229
|
-
delegate(["change"]);
|
|
36340
|
+
delegate(["click", "change"]);
|
|
36230
36341
|
create_custom_element(Item, {
|
|
36231
36342
|
item: {},
|
|
36232
36343
|
details: {}
|