@gomusdev/web-components 1.25.0 → 1.25.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.
@@ -121,7 +121,7 @@ export declare class OrderDetails {
121
121
  };
122
122
  }[];
123
123
  } | undefined;
124
- downloadLink(item: OrderItem): string | undefined;
124
+ downloadLink(item: OrderItem, barcodeId?: number): string | undefined;
125
125
  }
126
126
  export declare const setDetails: (host: HTMLElement, details: OrderDetails) => void;
127
127
  export declare const getDetails: (host: HTMLElement, options?: {
@@ -11072,6 +11072,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
11072
11072
  apiData: quotas,
11073
11073
  _timeslots: [],
11074
11074
  addQuotas(data) {
11075
+ this._timeslots = [];
11075
11076
  this.apiData = { ...this.apiData, ...data };
11076
11077
  },
11077
11078
  precart,
@@ -31031,7 +31032,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31031
31032
  const result = snapshot(shop.order(this.token));
31032
31033
  return result;
31033
31034
  }
31034
- downloadLink(item) {
31035
+ downloadLink(item, barcodeId) {
31035
31036
  if (!this.order?.is_valid) return;
31036
31037
  switch (item.type) {
31037
31038
  case "Event":
@@ -31044,7 +31045,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31044
31045
  return shop.urls?.annualTicketPersonalizationList(this.token);
31045
31046
  }
31046
31047
  } else {
31047
- return `${shop.apiUrl}/api/v4/orders/${this.order.id}/tickets/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}`;
31048
+ return `${shop.apiUrl}/api/v4/orders/${this.order.id}/tickets/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}&barcode_id=${barcodeId}`;
31048
31049
  }
31049
31050
  }
31050
31051
  }
@@ -31136,14 +31137,13 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31136
31137
  create_custom_element(Event$1, { item: {}, orderDetails: {} }, [], [], true);
31137
31138
  var root_4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
31138
31139
  var root_6 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
31139
- var root_7$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31140
- var root_3$1 = /* @__PURE__ */ from_html(`<!> <br/> <!>`, 1);
31141
- var root_8 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization">Personalize</a>`, 1);
31142
- var root_9 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
31140
+ var root_3$1 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank">Download</a>`, 1);
31141
+ var root_7$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization">Personalize</a>`, 1);
31142
+ var root_8 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
31143
31143
  var root_2$3 = /* @__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></ul></article></li>`);
31144
- var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31145
- var root_12 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization">Personalize</a>`);
31146
- var root_10 = /* @__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></ul></article></li>`);
31144
+ var root_10 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31145
+ var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization">Personalize</a>`);
31146
+ var root_9 = /* @__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></ul></article></li>`);
31147
31147
  function TicketSale($$anchor, $$props) {
31148
31148
  push($$props, true);
31149
31149
  const APPLE_WALLET_CDN_PATH = `https://cdn.shop.platform.gomus.de/apple_wallet_${shop.locale}.svg`;
@@ -31167,7 +31167,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31167
31167
  var fragment = comment();
31168
31168
  var node = first_child(fragment);
31169
31169
  {
31170
- var consequent_5 = ($$anchor2) => {
31170
+ var consequent_4 = ($$anchor2) => {
31171
31171
  var fragment_1 = comment();
31172
31172
  var node_1 = first_child(fragment_1);
31173
31173
  each(node_1, 17, () => ({ length: item().attributes.quantity }), index$1, ($$anchor3, $$item, index2) => {
@@ -31182,7 +31182,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31182
31182
  reset(span);
31183
31183
  var node_2 = sibling(span, 2);
31184
31184
  {
31185
- var consequent_3 = ($$anchor4) => {
31185
+ var consequent_2 = ($$anchor4) => {
31186
+ const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2].id);
31186
31187
  var fragment_2 = root_3$1();
31187
31188
  var node_3 = first_child(fragment_2);
31188
31189
  {
@@ -31234,27 +31235,18 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31234
31235
  else $$render(alternate, false);
31235
31236
  });
31236
31237
  }
31237
- var node_5 = sibling(node_3, 4);
31238
- {
31239
- var consequent_2 = ($$anchor5) => {
31240
- var a2 = root_7$1();
31241
- template_effect(($0) => set_attribute(a2, "href", $0), [() => orderDetails().downloadLink(item())]);
31242
- append($$anchor5, a2);
31243
- };
31244
- if_block(node_5, ($$render) => {
31245
- if (index2 == 0) $$render(consequent_2);
31246
- });
31247
- }
31238
+ var a2 = sibling(node_3, 4);
31239
+ template_effect(($0) => set_attribute(a2, "href", $0), [() => orderDetails().downloadLink(item(), get$2(barcodeId))]);
31248
31240
  append($$anchor4, fragment_2);
31249
31241
  };
31250
31242
  var alternate_1 = ($$anchor4) => {
31251
- var fragment_5 = root_8();
31243
+ var fragment_5 = root_7$1();
31252
31244
  var a_1 = sibling(first_child(fragment_5), 2);
31253
31245
  template_effect(($0) => set_attribute(a_1, "href", $0), [() => orderDetails().downloadLink(item())]);
31254
31246
  append($$anchor4, fragment_5);
31255
31247
  };
31256
31248
  if_block(node_2, ($$render) => {
31257
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_3);
31249
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_2);
31258
31250
  else $$render(alternate_1, false);
31259
31251
  });
31260
31252
  }
@@ -31263,10 +31255,10 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31263
31255
  var text_4 = child(li_3, true);
31264
31256
  reset(li_3);
31265
31257
  var li_4 = sibling(li_3, 2);
31266
- var node_6 = child(li_4);
31258
+ var node_5 = child(li_4);
31267
31259
  {
31268
- var consequent_4 = ($$anchor4) => {
31269
- var a_2 = root_9();
31260
+ var consequent_3 = ($$anchor4) => {
31261
+ var a_2 = root_8();
31270
31262
  var img = child(a_2);
31271
31263
  reset(a_2);
31272
31264
  template_effect(() => {
@@ -31275,8 +31267,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31275
31267
  });
31276
31268
  append($$anchor4, a_2);
31277
31269
  };
31278
- if_block(node_6, ($$render) => {
31279
- if (item().attributes.barcodes[index2]) $$render(consequent_4);
31270
+ if_block(node_5, ($$render) => {
31271
+ if (item().attributes.barcodes[index2]) $$render(consequent_3);
31280
31272
  });
31281
31273
  }
31282
31274
  reset(li_4);
@@ -31295,7 +31287,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31295
31287
  append($$anchor2, fragment_1);
31296
31288
  };
31297
31289
  var alternate_3 = ($$anchor2) => {
31298
- var li_5 = root_10();
31290
+ var li_5 = root_9();
31299
31291
  var article_1 = child(li_5);
31300
31292
  var ul_1 = child(article_1);
31301
31293
  var li_6 = child(ul_1);
@@ -31305,20 +31297,20 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31305
31297
  var span_4 = child(li_7);
31306
31298
  var text_6 = child(span_4, true);
31307
31299
  reset(span_4);
31308
- var node_7 = sibling(span_4, 2);
31300
+ var node_6 = sibling(span_4, 2);
31309
31301
  {
31310
- var consequent_6 = ($$anchor3) => {
31311
- var a_3 = root_11$1();
31302
+ var consequent_5 = ($$anchor3) => {
31303
+ var a_3 = root_10();
31312
31304
  template_effect(($0) => set_attribute(a_3, "href", $0), [() => orderDetails().downloadLink(item())]);
31313
31305
  append($$anchor3, a_3);
31314
31306
  };
31315
31307
  var alternate_2 = ($$anchor3) => {
31316
- var a_4 = root_12();
31308
+ var a_4 = root_11$1();
31317
31309
  template_effect(($0) => set_attribute(a_4, "href", $0), [() => orderDetails().downloadLink(item())]);
31318
31310
  append($$anchor3, a_4);
31319
31311
  };
31320
- if_block(node_7, ($$render) => {
31321
- if (item().attributes.is_voucher) $$render(consequent_6);
31312
+ if_block(node_6, ($$render) => {
31313
+ if (item().attributes.is_voucher) $$render(consequent_5);
31322
31314
  else $$render(alternate_2, false);
31323
31315
  });
31324
31316
  }
@@ -31341,7 +31333,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
31341
31333
  append($$anchor2, li_5);
31342
31334
  };
31343
31335
  if_block(node, ($$render) => {
31344
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_5);
31336
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_4);
31345
31337
  else $$render(alternate_3, false);
31346
31338
  });
31347
31339
  }
@@ -11072,6 +11072,7 @@ function createQuotaManager(quotas) {
11072
11072
  apiData: quotas,
11073
11073
  _timeslots: [],
11074
11074
  addQuotas(data) {
11075
+ this._timeslots = [];
11075
11076
  this.apiData = { ...this.apiData, ...data };
11076
11077
  },
11077
11078
  precart,
@@ -31031,7 +31032,7 @@ class OrderDetails {
31031
31032
  const result = snapshot(shop.order(this.token));
31032
31033
  return result;
31033
31034
  }
31034
- downloadLink(item) {
31035
+ downloadLink(item, barcodeId) {
31035
31036
  if (!this.order?.is_valid) return;
31036
31037
  switch (item.type) {
31037
31038
  case "Event":
@@ -31044,7 +31045,7 @@ class OrderDetails {
31044
31045
  return shop.urls?.annualTicketPersonalizationList(this.token);
31045
31046
  }
31046
31047
  } else {
31047
- return `${shop.apiUrl}/api/v4/orders/${this.order.id}/tickets/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}`;
31048
+ return `${shop.apiUrl}/api/v4/orders/${this.order.id}/tickets/${item.attributes.id}.pdf?locale=${shop.locale}&token=${this.token}&barcode_id=${barcodeId}`;
31048
31049
  }
31049
31050
  }
31050
31051
  }
@@ -31136,14 +31137,13 @@ function Event$1($$anchor, $$props) {
31136
31137
  create_custom_element(Event$1, { item: {}, orderDetails: {} }, [], [], true);
31137
31138
  var root_4 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span> <span class="go-cart-item-time"> </span>`, 1);
31138
31139
  var root_6 = /* @__PURE__ */ from_html(`<span class="go-cart-item-date"> </span>`);
31139
- var root_7$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31140
- var root_3$1 = /* @__PURE__ */ from_html(`<!> <br/> <!>`, 1);
31141
- var root_8 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization">Personalize</a>`, 1);
31142
- var root_9 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
31140
+ var root_3$1 = /* @__PURE__ */ from_html(`<!> <br/> <a class="go-ticket-download" target="_blank">Download</a>`, 1);
31141
+ var root_7$1 = /* @__PURE__ */ from_html(`<br/> <a class="go-ticket-personalization">Personalize</a>`, 1);
31142
+ var root_8 = /* @__PURE__ */ from_html(`<a aria-label="passbook link"><img alt="apple wallet icon"/></a>`);
31143
31143
  var root_2$3 = /* @__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></ul></article></li>`);
31144
- var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31145
- var root_12 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization">Personalize</a>`);
31146
- var root_10 = /* @__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></ul></article></li>`);
31144
+ var root_10 = /* @__PURE__ */ from_html(`<a class="go-ticket-download" target="_blank">Download</a>`);
31145
+ var root_11$1 = /* @__PURE__ */ from_html(`<a class="go-ticket-personalization">Personalize</a>`);
31146
+ var root_9 = /* @__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></ul></article></li>`);
31147
31147
  function TicketSale($$anchor, $$props) {
31148
31148
  push($$props, true);
31149
31149
  const APPLE_WALLET_CDN_PATH = `https://cdn.shop.platform.gomus.de/apple_wallet_${shop.locale}.svg`;
@@ -31167,7 +31167,7 @@ function TicketSale($$anchor, $$props) {
31167
31167
  var fragment = comment();
31168
31168
  var node = first_child(fragment);
31169
31169
  {
31170
- var consequent_5 = ($$anchor2) => {
31170
+ var consequent_4 = ($$anchor2) => {
31171
31171
  var fragment_1 = comment();
31172
31172
  var node_1 = first_child(fragment_1);
31173
31173
  each(node_1, 17, () => ({ length: item().attributes.quantity }), index$1, ($$anchor3, $$item, index2) => {
@@ -31182,7 +31182,8 @@ function TicketSale($$anchor, $$props) {
31182
31182
  reset(span);
31183
31183
  var node_2 = sibling(span, 2);
31184
31184
  {
31185
- var consequent_3 = ($$anchor4) => {
31185
+ var consequent_2 = ($$anchor4) => {
31186
+ const barcodeId = /* @__PURE__ */ user_derived(() => item().attributes.barcodes[index2].id);
31186
31187
  var fragment_2 = root_3$1();
31187
31188
  var node_3 = first_child(fragment_2);
31188
31189
  {
@@ -31234,27 +31235,18 @@ function TicketSale($$anchor, $$props) {
31234
31235
  else $$render(alternate, false);
31235
31236
  });
31236
31237
  }
31237
- var node_5 = sibling(node_3, 4);
31238
- {
31239
- var consequent_2 = ($$anchor5) => {
31240
- var a2 = root_7$1();
31241
- template_effect(($0) => set_attribute(a2, "href", $0), [() => orderDetails().downloadLink(item())]);
31242
- append($$anchor5, a2);
31243
- };
31244
- if_block(node_5, ($$render) => {
31245
- if (index2 == 0) $$render(consequent_2);
31246
- });
31247
- }
31238
+ var a2 = sibling(node_3, 4);
31239
+ template_effect(($0) => set_attribute(a2, "href", $0), [() => orderDetails().downloadLink(item(), get$2(barcodeId))]);
31248
31240
  append($$anchor4, fragment_2);
31249
31241
  };
31250
31242
  var alternate_1 = ($$anchor4) => {
31251
- var fragment_5 = root_8();
31243
+ var fragment_5 = root_7$1();
31252
31244
  var a_1 = sibling(first_child(fragment_5), 2);
31253
31245
  template_effect(($0) => set_attribute(a_1, "href", $0), [() => orderDetails().downloadLink(item())]);
31254
31246
  append($$anchor4, fragment_5);
31255
31247
  };
31256
31248
  if_block(node_2, ($$render) => {
31257
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_3);
31249
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_2);
31258
31250
  else $$render(alternate_1, false);
31259
31251
  });
31260
31252
  }
@@ -31263,10 +31255,10 @@ function TicketSale($$anchor, $$props) {
31263
31255
  var text_4 = child(li_3, true);
31264
31256
  reset(li_3);
31265
31257
  var li_4 = sibling(li_3, 2);
31266
- var node_6 = child(li_4);
31258
+ var node_5 = child(li_4);
31267
31259
  {
31268
- var consequent_4 = ($$anchor4) => {
31269
- var a_2 = root_9();
31260
+ var consequent_3 = ($$anchor4) => {
31261
+ var a_2 = root_8();
31270
31262
  var img = child(a_2);
31271
31263
  reset(a_2);
31272
31264
  template_effect(() => {
@@ -31275,8 +31267,8 @@ function TicketSale($$anchor, $$props) {
31275
31267
  });
31276
31268
  append($$anchor4, a_2);
31277
31269
  };
31278
- if_block(node_6, ($$render) => {
31279
- if (item().attributes.barcodes[index2]) $$render(consequent_4);
31270
+ if_block(node_5, ($$render) => {
31271
+ if (item().attributes.barcodes[index2]) $$render(consequent_3);
31280
31272
  });
31281
31273
  }
31282
31274
  reset(li_4);
@@ -31295,7 +31287,7 @@ function TicketSale($$anchor, $$props) {
31295
31287
  append($$anchor2, fragment_1);
31296
31288
  };
31297
31289
  var alternate_3 = ($$anchor2) => {
31298
- var li_5 = root_10();
31290
+ var li_5 = root_9();
31299
31291
  var article_1 = child(li_5);
31300
31292
  var ul_1 = child(article_1);
31301
31293
  var li_6 = child(ul_1);
@@ -31305,20 +31297,20 @@ function TicketSale($$anchor, $$props) {
31305
31297
  var span_4 = child(li_7);
31306
31298
  var text_6 = child(span_4, true);
31307
31299
  reset(span_4);
31308
- var node_7 = sibling(span_4, 2);
31300
+ var node_6 = sibling(span_4, 2);
31309
31301
  {
31310
- var consequent_6 = ($$anchor3) => {
31311
- var a_3 = root_11$1();
31302
+ var consequent_5 = ($$anchor3) => {
31303
+ var a_3 = root_10();
31312
31304
  template_effect(($0) => set_attribute(a_3, "href", $0), [() => orderDetails().downloadLink(item())]);
31313
31305
  append($$anchor3, a_3);
31314
31306
  };
31315
31307
  var alternate_2 = ($$anchor3) => {
31316
- var a_4 = root_12();
31308
+ var a_4 = root_11$1();
31317
31309
  template_effect(($0) => set_attribute(a_4, "href", $0), [() => orderDetails().downloadLink(item())]);
31318
31310
  append($$anchor3, a_4);
31319
31311
  };
31320
- if_block(node_7, ($$render) => {
31321
- if (item().attributes.is_voucher) $$render(consequent_6);
31312
+ if_block(node_6, ($$render) => {
31313
+ if (item().attributes.is_voucher) $$render(consequent_5);
31322
31314
  else $$render(alternate_2, false);
31323
31315
  });
31324
31316
  }
@@ -31341,7 +31333,7 @@ function TicketSale($$anchor, $$props) {
31341
31333
  append($$anchor2, li_5);
31342
31334
  };
31343
31335
  if_block(node, ($$render) => {
31344
- if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_5);
31336
+ if (item().attributes.ticket_type == "time_slot" || item().attributes.ticket_type == "normal") $$render(consequent_4);
31345
31337
  else $$render(alternate_3, false);
31346
31338
  });
31347
31339
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "name": "Giantmonkey GmbH"
5
5
  },
6
6
  "license": "MIT",
7
- "version": "1.25.0",
7
+ "version": "1.25.2",
8
8
  "type": "module",
9
9
  "main": "./dist-js/gomus-webcomponents.iife.js",
10
10
  "module": "./dist-js/gomus-webcomponents.iife.js",