@gomusdev/web-components 3.8.1 → 3.8.3

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.8.3 (2026-06-30)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **web-components:** force Zod jitless to stop CSP unsafe-eval violation
8
+
9
+ ## 3.8.2 (2026-06-22)
10
+
11
+ ### Bug Fixes
12
+
13
+ * **ticket-selection:** scope event:admission products to the event's own tickets (AR-02, TC-03, TC-08)
14
+
3
15
  ## 3.8.1 (2026-06-22)
4
16
 
5
17
  ### 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
@@ -13532,13 +13536,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13532
13536
  ticketsAndQuotas(params) {
13533
13537
  return this.fetchAndCache(TICKET_AND_QUOTAS_ENDPOINT, `ticketsAndQuotas-${JSON.stringify(params)}`, "", {
13534
13538
  cache: 60,
13535
- query: params
13539
+ query: assign({ per_page: 100 }, params ?? {})
13536
13540
  });
13537
13541
  }
13538
13542
  tickets(params) {
13539
13543
  return this.fetchAndCache(TICKETS_ENDPOINT, `tickets-${JSON.stringify(params)}`, "tickets", {
13540
13544
  cache: 60,
13541
- query: params
13545
+ query: assign({ per_page: 100 }, params ?? {})
13542
13546
  });
13543
13547
  }
13544
13548
  signIn(params) {
@@ -13587,7 +13591,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13587
13591
  }
13588
13592
  getDates(query) {
13589
13593
  return this.fetchAndCache("/api/v4/dates", `dates-${JSON.stringify(query)}`, "dates", {
13590
- query,
13594
+ query: assign({ per_page: 100 }, query),
13591
13595
  cache: 60
13592
13596
  });
13593
13597
  }
@@ -13673,7 +13677,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13673
13677
  console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!");
13674
13678
  return get$2(this.#data)[dataKey];
13675
13679
  }
13676
- const query = assign({ per_page: 1e3 }, options.query);
13680
+ const query = options.query;
13677
13681
  const fetchId = endpoint + JSON.stringify(query);
13678
13682
  const isNotFetchedYet = !this.#fetchStatus[fetchId];
13679
13683
  const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
@@ -13683,10 +13687,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13683
13687
  return get$2(this.#data)[dataKey];
13684
13688
  }
13685
13689
  get museums() {
13686
- return this.fetchAndCache("/api/v4/museums", "museums", "museums");
13690
+ return this.fetchAndCache("/api/v4/museums", "museums", "museums", { query: { per_page: 100 } });
13687
13691
  }
13688
13692
  get exhibitions() {
13689
- return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions");
13693
+ return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions", { query: { per_page: 100 } });
13690
13694
  }
13691
13695
  getEvent(id) {
13692
13696
  return this.fetchAndCache(`/api/v4/events/${id}`, `single_event_${id}`, "event");
@@ -13704,31 +13708,35 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
13704
13708
  return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${token}`, `coupon_sale_barcode_${token}`, "coupon_sale");
13705
13709
  }
13706
13710
  getCoupons() {
13707
- return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: { online_available: true } });
13711
+ return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: {
13712
+ online_available: true,
13713
+ per_page: 100
13714
+ } });
13708
13715
  }
13709
13716
  getEventDetailsOnDate(eventId, dateId) {
13710
13717
  return this.fetchAndCache(`/api/v4/events/${eventId}/dates/${dateId}`, `/api/v4/events/${eventId}/dates/${dateId}`, "date");
13711
13718
  }
13712
13719
  get events() {
13713
- return this.fetchAndCache("/api/v4/events", "events", "events");
13720
+ return this.fetchAndCache("/api/v4/events", "events", "events", { query: { per_page: 100 } });
13714
13721
  }
13715
13722
  get upcomingEvents() {
13716
13723
  return this.fetchAndCache("/api/v4/events", "events", "events", { query: {
13717
13724
  by_bookable: true,
13718
- with_bookings_in_future: 1
13725
+ with_bookings_in_future: 1,
13726
+ per_page: 100
13719
13727
  } });
13720
13728
  }
13721
13729
  get tours() {
13722
- return this.fetchAndCache("/api/v4/tours", "tours", "tours");
13730
+ return this.fetchAndCache("/api/v4/tours", "tours", "tours", { query: { per_page: 100 } });
13723
13731
  }
13724
13732
  get merchandises() {
13725
- return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises");
13733
+ return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises", { query: { per_page: 100 } });
13726
13734
  }
13727
13735
  get customerSalutations() {
13728
13736
  return this.fetchAndCache("/api/v3/customer_salutations", "customerSalutations", "customer_salutations");
13729
13737
  }
13730
13738
  get countries() {
13731
- return this.fetchAndCache("/api/v3/countries", "countries", "countries");
13739
+ return this.fetchAndCache("/api/v3/countries", "countries", "countries", { query: { per_page: 100 } });
13732
13740
  }
13733
13741
  get locales() {
13734
13742
  return this.fetchAndCache("/api/v4/locales", "locales", "locales_options");
@@ -32586,11 +32594,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32586
32594
  async loadProducts(segment) {
32587
32595
  const tsd = segment.ticketSelectionDetails;
32588
32596
  if (!tsd?.eventIds?.length || !tsd.selectedDate) return;
32589
- if (!(await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]))).tickets?.length) return;
32597
+ const event = await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]));
32598
+ if (!event.tickets?.length) return;
32590
32599
  const { tickets, quotas } = await shop.asyncFetch(() => shop.ticketsAndQuotas({
32600
+ "by_ticket_ids[]": event.tickets,
32591
32601
  by_bookable: true,
32592
- valid_at: tsd.selectedDate.toString(),
32593
- date_id: segment.dateId
32602
+ valid_at: tsd.selectedDate.toString()
32594
32603
  }));
32595
32604
  shop.capacityManager.addQuotas(quotas);
32596
32605
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);
@@ -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
@@ -13531,13 +13535,13 @@ var Shop = class {
13531
13535
  ticketsAndQuotas(params) {
13532
13536
  return this.fetchAndCache(TICKET_AND_QUOTAS_ENDPOINT, `ticketsAndQuotas-${JSON.stringify(params)}`, "", {
13533
13537
  cache: 60,
13534
- query: params
13538
+ query: assign({ per_page: 100 }, params ?? {})
13535
13539
  });
13536
13540
  }
13537
13541
  tickets(params) {
13538
13542
  return this.fetchAndCache(TICKETS_ENDPOINT, `tickets-${JSON.stringify(params)}`, "tickets", {
13539
13543
  cache: 60,
13540
- query: params
13544
+ query: assign({ per_page: 100 }, params ?? {})
13541
13545
  });
13542
13546
  }
13543
13547
  signIn(params) {
@@ -13586,7 +13590,7 @@ var Shop = class {
13586
13590
  }
13587
13591
  getDates(query) {
13588
13592
  return this.fetchAndCache("/api/v4/dates", `dates-${JSON.stringify(query)}`, "dates", {
13589
- query,
13593
+ query: assign({ per_page: 100 }, query),
13590
13594
  cache: 60
13591
13595
  });
13592
13596
  }
@@ -13672,7 +13676,7 @@ var Shop = class {
13672
13676
  console.warn("(fetchAndCache) Couldn't fetch, Shop not loaded!");
13673
13677
  return get$2(this.#data)[dataKey];
13674
13678
  }
13675
- const query = assign({ per_page: 1e3 }, options.query);
13679
+ const query = options.query;
13676
13680
  const fetchId = endpoint + JSON.stringify(query);
13677
13681
  const isNotFetchedYet = !this.#fetchStatus[fetchId];
13678
13682
  const isCacheExpired = this.#fetchStatus[fetchId]?.fetchedAt < Date.now() - options.cache * 1e3;
@@ -13682,10 +13686,10 @@ var Shop = class {
13682
13686
  return get$2(this.#data)[dataKey];
13683
13687
  }
13684
13688
  get museums() {
13685
- return this.fetchAndCache("/api/v4/museums", "museums", "museums");
13689
+ return this.fetchAndCache("/api/v4/museums", "museums", "museums", { query: { per_page: 100 } });
13686
13690
  }
13687
13691
  get exhibitions() {
13688
- return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions");
13692
+ return this.fetchAndCache("/api/v4/exhibitions", "exhibitions", "exhibitions", { query: { per_page: 100 } });
13689
13693
  }
13690
13694
  getEvent(id) {
13691
13695
  return this.fetchAndCache(`/api/v4/events/${id}`, `single_event_${id}`, "event");
@@ -13703,31 +13707,35 @@ var Shop = class {
13703
13707
  return this.fetchAndCache(`/api/v4/coupon_sales/barcode/${token}`, `coupon_sale_barcode_${token}`, "coupon_sale");
13704
13708
  }
13705
13709
  getCoupons() {
13706
- return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: { online_available: true } });
13710
+ return this.fetchAndCache("/api/v4/coupons", "coupons", "coupons", { query: {
13711
+ online_available: true,
13712
+ per_page: 100
13713
+ } });
13707
13714
  }
13708
13715
  getEventDetailsOnDate(eventId, dateId) {
13709
13716
  return this.fetchAndCache(`/api/v4/events/${eventId}/dates/${dateId}`, `/api/v4/events/${eventId}/dates/${dateId}`, "date");
13710
13717
  }
13711
13718
  get events() {
13712
- return this.fetchAndCache("/api/v4/events", "events", "events");
13719
+ return this.fetchAndCache("/api/v4/events", "events", "events", { query: { per_page: 100 } });
13713
13720
  }
13714
13721
  get upcomingEvents() {
13715
13722
  return this.fetchAndCache("/api/v4/events", "events", "events", { query: {
13716
13723
  by_bookable: true,
13717
- with_bookings_in_future: 1
13724
+ with_bookings_in_future: 1,
13725
+ per_page: 100
13718
13726
  } });
13719
13727
  }
13720
13728
  get tours() {
13721
- return this.fetchAndCache("/api/v4/tours", "tours", "tours");
13729
+ return this.fetchAndCache("/api/v4/tours", "tours", "tours", { query: { per_page: 100 } });
13722
13730
  }
13723
13731
  get merchandises() {
13724
- return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises");
13732
+ return this.fetchAndCache("/api/v4/merchandises", "merchandises", "merchandises", { query: { per_page: 100 } });
13725
13733
  }
13726
13734
  get customerSalutations() {
13727
13735
  return this.fetchAndCache("/api/v3/customer_salutations", "customerSalutations", "customer_salutations");
13728
13736
  }
13729
13737
  get countries() {
13730
- return this.fetchAndCache("/api/v3/countries", "countries", "countries");
13738
+ return this.fetchAndCache("/api/v3/countries", "countries", "countries", { query: { per_page: 100 } });
13731
13739
  }
13732
13740
  get locales() {
13733
13741
  return this.fetchAndCache("/api/v4/locales", "locales", "locales_options");
@@ -32585,11 +32593,12 @@ var REGISTRY = {
32585
32593
  async loadProducts(segment) {
32586
32594
  const tsd = segment.ticketSelectionDetails;
32587
32595
  if (!tsd?.eventIds?.length || !tsd.selectedDate) return;
32588
- if (!(await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]))).tickets?.length) return;
32596
+ const event = await shop.asyncFetch(() => shop.getEvent(tsd.eventIds[0]));
32597
+ if (!event.tickets?.length) return;
32589
32598
  const { tickets, quotas } = await shop.asyncFetch(() => shop.ticketsAndQuotas({
32599
+ "by_ticket_ids[]": event.tickets,
32590
32600
  by_bookable: true,
32591
- valid_at: tsd.selectedDate.toString(),
32592
- date_id: segment.dateId
32601
+ valid_at: tsd.selectedDate.toString()
32593
32602
  }));
32594
32603
  shop.capacityManager.addQuotas(quotas);
32595
32604
  const uiTickets = initUITimeslotTickets(filterAvailabletickets(tickets, tsd.selectedTime), tsd.selectedTime);