@gomusdev/web-components 4.8.1 → 4.8.2
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 +7 -0
- package/dist-js/gomus-webcomponents.iife.js +17 -12
- package/dist-js/gomus-webcomponents.js +17 -12
- package/dist-js/gomus-webcomponents.min.iife.js +19 -19
- package/dist-js/gomus-webcomponents.min.js +3616 -3612
- package/dist-js/src/lib/models/ticket/UITicket.svelte.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.8.2 (2026-07-16)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **mr2:** expand spec detection to include sibling `spec/` subdirectory
|
|
8
|
+
* **ticket-selection:** derive day-ticket time per ticket, not from first quota (TC-04), closes [#136](https://gitlab.giantmonkey.de/gomus/frontend/issues/136)
|
|
9
|
+
|
|
3
10
|
## 4.8.1 (2026-07-16)
|
|
4
11
|
|
|
5
12
|
### Bug Fixes
|
|
@@ -11860,6 +11860,17 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
11860
11860
|
function initUITimeslotTickets(tickets, selectedTime = "") {
|
|
11861
11861
|
return sort(Object.values(tickets).map((ticket) => createUITicket(ticket, { selectedTime })), (f) => f.shop_order);
|
|
11862
11862
|
}
|
|
11863
|
+
/**
|
|
11864
|
+
* Day tickets (TC-04): each day quota keys its capacity at its OWN first-entry time, so
|
|
11865
|
+
* capacity keys differ across quotas. The day 'time' must be derived per ticket — the
|
|
11866
|
+
* first positive key of the ticket's own total_capacities — never from one global quota
|
|
11867
|
+
* key. A ticket with capacity keys that are all zero is sold out and dropped; a ticket
|
|
11868
|
+
* with no keys at all (no quota) is kept and gets `fallbackTime`.
|
|
11869
|
+
*/
|
|
11870
|
+
function initUIDayTickets(tickets, fallbackTime) {
|
|
11871
|
+
const ownDayTime = (t) => Object.keys(t.total_capacities ?? {}).find((key) => (t.total_capacities?.[key] ?? 0) > 0);
|
|
11872
|
+
return sort(Object.values(tickets).filter((t) => ownDayTime(t) || Object.keys(t.total_capacities ?? {}).length === 0).map((t) => createUITicket(t, { selectedTime: ownDayTime(t) ?? fallbackTime })), (f) => f.shop_order);
|
|
11873
|
+
}
|
|
11863
11874
|
function filterAvailabletickets(tickets, selectedTime = "") {
|
|
11864
11875
|
let available = Object.entries(tickets);
|
|
11865
11876
|
if (selectedTime !== "") available = available.filter(([, t]) => t.total_capacities?.[selectedTime] && t.total_capacities[selectedTime] > 0);
|
|
@@ -35403,11 +35414,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
35403
35414
|
"by_ticket_group_ids[]": segment.ticketGroupIds ?? tsd.ticketGroupIds
|
|
35404
35415
|
}));
|
|
35405
35416
|
shop.capacityManager.addQuotas(quotas);
|
|
35406
|
-
const
|
|
35407
|
-
const timeslot = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
35408
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, timeslot), timeslot);
|
|
35417
|
+
const uiTickets = initUIDayTickets(tickets);
|
|
35409
35418
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35410
|
-
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time:
|
|
35419
|
+
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: ticket.selectedTime }));
|
|
35411
35420
|
}
|
|
35412
35421
|
},
|
|
35413
35422
|
"ticket:annual": {
|
|
@@ -35499,11 +35508,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
35499
35508
|
valid_at: tsd.selectedDate.toString()
|
|
35500
35509
|
}));
|
|
35501
35510
|
shop.capacityManager.addQuotas(quotas);
|
|
35502
|
-
const
|
|
35503
|
-
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
35504
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
35511
|
+
const uiTickets = initUIDayTickets(tickets);
|
|
35505
35512
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35506
|
-
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
35513
|
+
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: t.selectedTime }));
|
|
35507
35514
|
}
|
|
35508
35515
|
},
|
|
35509
35516
|
"event:admission:timeslot": {
|
|
@@ -35662,11 +35669,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
35662
35669
|
valid_at: date.start_time.slice(0, 10)
|
|
35663
35670
|
}));
|
|
35664
35671
|
shop.capacityManager.addQuotas(quotas);
|
|
35665
|
-
const
|
|
35666
|
-
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : date.start_time;
|
|
35667
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
35672
|
+
const uiTickets = initUIDayTickets(tickets, date.start_time);
|
|
35668
35673
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35669
|
-
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
35674
|
+
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: t.selectedTime }));
|
|
35670
35675
|
}
|
|
35671
35676
|
}
|
|
35672
35677
|
},
|
|
@@ -11859,6 +11859,17 @@ function createUITicket(apiTicket, options) {
|
|
|
11859
11859
|
function initUITimeslotTickets(tickets, selectedTime = "") {
|
|
11860
11860
|
return sort(Object.values(tickets).map((ticket) => createUITicket(ticket, { selectedTime })), (f) => f.shop_order);
|
|
11861
11861
|
}
|
|
11862
|
+
/**
|
|
11863
|
+
* Day tickets (TC-04): each day quota keys its capacity at its OWN first-entry time, so
|
|
11864
|
+
* capacity keys differ across quotas. The day 'time' must be derived per ticket — the
|
|
11865
|
+
* first positive key of the ticket's own total_capacities — never from one global quota
|
|
11866
|
+
* key. A ticket with capacity keys that are all zero is sold out and dropped; a ticket
|
|
11867
|
+
* with no keys at all (no quota) is kept and gets `fallbackTime`.
|
|
11868
|
+
*/
|
|
11869
|
+
function initUIDayTickets(tickets, fallbackTime) {
|
|
11870
|
+
const ownDayTime = (t) => Object.keys(t.total_capacities ?? {}).find((key) => (t.total_capacities?.[key] ?? 0) > 0);
|
|
11871
|
+
return sort(Object.values(tickets).filter((t) => ownDayTime(t) || Object.keys(t.total_capacities ?? {}).length === 0).map((t) => createUITicket(t, { selectedTime: ownDayTime(t) ?? fallbackTime })), (f) => f.shop_order);
|
|
11872
|
+
}
|
|
11862
11873
|
function filterAvailabletickets(tickets, selectedTime = "") {
|
|
11863
11874
|
let available = Object.entries(tickets);
|
|
11864
11875
|
if (selectedTime !== "") available = available.filter(([, t]) => t.total_capacities?.[selectedTime] && t.total_capacities[selectedTime] > 0);
|
|
@@ -35402,11 +35413,9 @@ var REGISTRY = {
|
|
|
35402
35413
|
"by_ticket_group_ids[]": segment.ticketGroupIds ?? tsd.ticketGroupIds
|
|
35403
35414
|
}));
|
|
35404
35415
|
shop.capacityManager.addQuotas(quotas);
|
|
35405
|
-
const
|
|
35406
|
-
const timeslot = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
35407
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, timeslot), timeslot);
|
|
35416
|
+
const uiTickets = initUIDayTickets(tickets);
|
|
35408
35417
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35409
|
-
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time:
|
|
35418
|
+
for (const ticket of uiTickets) segment.preCart.addItem(createCartItem(ticket, { time: ticket.selectedTime }));
|
|
35410
35419
|
}
|
|
35411
35420
|
},
|
|
35412
35421
|
"ticket:annual": {
|
|
@@ -35498,11 +35507,9 @@ var REGISTRY = {
|
|
|
35498
35507
|
valid_at: tsd.selectedDate.toString()
|
|
35499
35508
|
}));
|
|
35500
35509
|
shop.capacityManager.addQuotas(quotas);
|
|
35501
|
-
const
|
|
35502
|
-
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : void 0;
|
|
35503
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
35510
|
+
const uiTickets = initUIDayTickets(tickets);
|
|
35504
35511
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35505
|
-
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
35512
|
+
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: t.selectedTime }));
|
|
35506
35513
|
}
|
|
35507
35514
|
},
|
|
35508
35515
|
"event:admission:timeslot": {
|
|
@@ -35661,11 +35668,9 @@ var REGISTRY = {
|
|
|
35661
35668
|
valid_at: date.start_time.slice(0, 10)
|
|
35662
35669
|
}));
|
|
35663
35670
|
shop.capacityManager.addQuotas(quotas);
|
|
35664
|
-
const
|
|
35665
|
-
const time = firstQuota ? Object.keys(firstQuota.capacities)[0] : date.start_time;
|
|
35666
|
-
const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, time), time);
|
|
35671
|
+
const uiTickets = initUIDayTickets(tickets, date.start_time);
|
|
35667
35672
|
await enrichTicketsWithContent(segment, uiTickets);
|
|
35668
|
-
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time }));
|
|
35673
|
+
for (const t of uiTickets) segment.preCart.addItem(createCartItem(t, { time: t.selectedTime }));
|
|
35669
35674
|
}
|
|
35670
35675
|
}
|
|
35671
35676
|
},
|