@gomusdev/web-components 1.25.0 → 1.25.1

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