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