@tet/tet-components 1.3.119-testing → 1.3.120-testing

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.
@@ -231,7 +231,7 @@ const TetCompareCardV2 = class {
231
231
  * @returns rendered card body.
232
232
  */
233
233
  renderCard() {
234
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
234
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
235
235
  // Get data for rendering
236
236
  const comparisonData = this.allProductData[this.selectedProductCode];
237
237
  const contractTermData = this.selectedContractTerm();
@@ -241,19 +241,19 @@ const TetCompareCardV2 = class {
241
241
  const price = contractTermData.amount.toString();
242
242
  const promotionCode = (_b = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.promotionCode) !== null && _b !== void 0 ? _b : '';
243
243
  const term = (_c = contractTermData.term) !== null && _c !== void 0 ? _c : '';
244
- const priceDescription = (contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) !== undefined ? contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription : '';
245
- const secondaryLink = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _d !== void 0 ? _d : '';
246
- const baseUrl = ((_e = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _e === void 0 ? void 0 : _e[this.language]) || '';
244
+ const priceDescription = (_e = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) === null || _d === void 0 ? void 0 : _d[this.language]) !== null && _e !== void 0 ? _e : '';
245
+ const secondaryLink = (_f = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _f !== void 0 ? _f : '';
246
+ const baseUrl = ((_g = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _g === void 0 ? void 0 : _g[this.language]) || '';
247
247
  const params = new URLSearchParams({
248
- contractTerm: (_f = term === null || term === void 0 ? void 0 : term.toString()) !== null && _f !== void 0 ? _f : '',
248
+ contractTerm: (_h = term === null || term === void 0 ? void 0 : term.toString()) !== null && _h !== void 0 ? _h : '',
249
249
  product: this.selectedProductCode,
250
250
  promotion: promotionCode !== null && promotionCode !== void 0 ? promotionCode : '',
251
- lang: (_g = this.language) !== null && _g !== void 0 ? _g : '',
251
+ lang: (_j = this.language) !== null && _j !== void 0 ? _j : '',
252
252
  from: 'tet.lv'
253
253
  });
254
254
  const link = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${params.toString()}`;
255
255
  const currentBonuses = this.currentBonuses();
256
- const isBestChoice = ((_h = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _h === void 0 ? void 0 : _h.bestChoice) || false;
256
+ const isBestChoice = ((_k = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _k === void 0 ? void 0 : _k.bestChoice) || false;
257
257
  return (index.h("div", { onClick: this.clickCallback, onKeyDown: () => { }, class: {
258
258
  'card': true,
259
259
  [`${this.cardType}`]: true,
@@ -269,8 +269,8 @@ const TetCompareCardV2 = class {
269
269
  'js-resize-title': true
270
270
  }, part: "compare-card-title-wrapper" }, index.h("h3", { class: "main-title" }, mainTitle))) : (''), index.h("div", { class: "price js-resize-price" }, price && !isNaN(parseFloat(price)) ? (index.h("div", { class: {
271
271
  'price-wrapper': true
272
- } }, index.h("div", { class: "price-container" }, index.h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), index.h("div", { class: "currency" }, index.h("span", null, this.currency))), priceDescription ? (index.h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (index.h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (index.h("div", { class: "bonuss", key: bonus.modalId }, index.h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (index.h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (index.h("span", { class: "bonuss__text" }, bonus.name))))))), index.h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), index.h("div", { class: "compare-card-half-40" }, index.h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), (_j = this === null || this === void 0 ? void 0 : this.benefits) === null || _j === void 0 ? void 0 :
273
- _j.map((benefit) => (this.benefitHandler(benefit))), index.h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
272
+ } }, index.h("div", { class: "price-container" }, index.h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), index.h("div", { class: "currency" }, index.h("span", null, this.currency))), priceDescription ? (index.h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (index.h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (index.h("div", { class: "bonuss", key: bonus.modalId }, index.h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (index.h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (index.h("span", { class: "bonuss__text" }, bonus.name))))))), index.h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), index.h("div", { class: "compare-card-half-40" }, index.h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), (_l = this === null || this === void 0 ? void 0 : this.benefits) === null || _l === void 0 ? void 0 :
273
+ _l.map((benefit) => (this.benefitHandler(benefit))), index.h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
274
274
  const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
275
275
  const benefitAsImg = !!benefit.img;
276
276
  // Is this switch the only active one and preselected?
@@ -286,8 +286,8 @@ const TetCompareCardV2 = class {
286
286
  const shouldDisableSwitch = isOnlyActivePreselected ||
287
287
  (isMultiPreselected && this.selectedSwitchKeys.includes(benefit.toggleKey));
288
288
  return (index.h("div", { class: "benefit", key: benefit.toggleKey }, benefitAsImg ? (index.h("img", { src: benefit.img, class: "benefit__icon benefit__img" })) : (index.h("tet-icon", { class: "benefit__icon icon", name: benefit.icon })), benefitAsLink ? (index.h("a", Object.assign({ class: "benefit__name benefit__link" }, (benefit.dataAttributes || {})), benefit.name)) : (index.h("span", { class: "benefit__name" }, benefit.name)), index.h("tet-switch", { name: benefit.toggleKey, checked: this.selectedSwitchKeys.includes(benefit.toggleKey), disabled: shouldDisableSwitch, onCheck: e => this.handleSwitchToggle(benefit.toggleKey, e.detail.checked) })));
289
- }))), this.cardType === 'static' && this.benefits.length > 0 ? (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), (_k = this === null || this === void 0 ? void 0 : this.benefits) === null || _k === void 0 ? void 0 :
290
- _k.map((benefit) => (this.benefitHandler(benefit))))) : (''), index.h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (index.h("div", { class: {
289
+ }))), this.cardType === 'static' && this.benefits.length > 0 ? (index.h("div", { class: "benefit-wrapper" }, index.h("span", { class: "benefit-title" }, this.benefitTitle), (_m = this === null || this === void 0 ? void 0 : this.benefits) === null || _m === void 0 ? void 0 :
290
+ _m.map((benefit) => (this.benefitHandler(benefit))))) : (''), index.h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (index.h("div", { class: {
291
291
  'secondary-link': true
292
292
  } }, this.secondaryLinkOpenBlank ? (index.h("a", { target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (index.h("a", { href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? index.h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
293
293
  }
@@ -224,7 +224,7 @@ export class TetCompareCardV2 {
224
224
  * @returns rendered card body.
225
225
  */
226
226
  renderCard() {
227
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
227
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
228
228
  // Get data for rendering
229
229
  const comparisonData = this.allProductData[this.selectedProductCode];
230
230
  const contractTermData = this.selectedContractTerm();
@@ -234,19 +234,19 @@ export class TetCompareCardV2 {
234
234
  const price = contractTermData.amount.toString();
235
235
  const promotionCode = (_b = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.promotionCode) !== null && _b !== void 0 ? _b : '';
236
236
  const term = (_c = contractTermData.term) !== null && _c !== void 0 ? _c : '';
237
- const priceDescription = (contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) !== undefined ? contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription : '';
238
- const secondaryLink = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _d !== void 0 ? _d : '';
239
- const baseUrl = ((_e = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _e === void 0 ? void 0 : _e[this.language]) || '';
237
+ const priceDescription = (_e = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) === null || _d === void 0 ? void 0 : _d[this.language]) !== null && _e !== void 0 ? _e : '';
238
+ const secondaryLink = (_f = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _f !== void 0 ? _f : '';
239
+ const baseUrl = ((_g = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _g === void 0 ? void 0 : _g[this.language]) || '';
240
240
  const params = new URLSearchParams({
241
- contractTerm: (_f = term === null || term === void 0 ? void 0 : term.toString()) !== null && _f !== void 0 ? _f : '',
241
+ contractTerm: (_h = term === null || term === void 0 ? void 0 : term.toString()) !== null && _h !== void 0 ? _h : '',
242
242
  product: this.selectedProductCode,
243
243
  promotion: promotionCode !== null && promotionCode !== void 0 ? promotionCode : '',
244
- lang: (_g = this.language) !== null && _g !== void 0 ? _g : '',
244
+ lang: (_j = this.language) !== null && _j !== void 0 ? _j : '',
245
245
  from: 'tet.lv'
246
246
  });
247
247
  const link = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${params.toString()}`;
248
248
  const currentBonuses = this.currentBonuses();
249
- const isBestChoice = ((_h = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _h === void 0 ? void 0 : _h.bestChoice) || false;
249
+ const isBestChoice = ((_k = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _k === void 0 ? void 0 : _k.bestChoice) || false;
250
250
  return (h("div", { onClick: this.clickCallback, onKeyDown: () => { }, class: {
251
251
  'card': true,
252
252
  [`${this.cardType}`]: true,
@@ -262,8 +262,8 @@ export class TetCompareCardV2 {
262
262
  'js-resize-title': true
263
263
  }, part: "compare-card-title-wrapper" }, h("h3", { class: "main-title" }, mainTitle))) : (''), h("div", { class: "price js-resize-price" }, price && !isNaN(parseFloat(price)) ? (h("div", { class: {
264
264
  'price-wrapper': true
265
- } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_j = this === null || this === void 0 ? void 0 : this.benefits) === null || _j === void 0 ? void 0 :
266
- _j.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
265
+ } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_l = this === null || this === void 0 ? void 0 : this.benefits) === null || _l === void 0 ? void 0 :
266
+ _l.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
267
267
  const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
268
268
  const benefitAsImg = !!benefit.img;
269
269
  // Is this switch the only active one and preselected?
@@ -279,8 +279,8 @@ export class TetCompareCardV2 {
279
279
  const shouldDisableSwitch = isOnlyActivePreselected ||
280
280
  (isMultiPreselected && this.selectedSwitchKeys.includes(benefit.toggleKey));
281
281
  return (h("div", { class: "benefit", key: benefit.toggleKey }, benefitAsImg ? (h("img", { src: benefit.img, class: "benefit__icon benefit__img" })) : (h("tet-icon", { class: "benefit__icon icon", name: benefit.icon })), benefitAsLink ? (h("a", Object.assign({ class: "benefit__name benefit__link" }, (benefit.dataAttributes || {})), benefit.name)) : (h("span", { class: "benefit__name" }, benefit.name)), h("tet-switch", { name: benefit.toggleKey, checked: this.selectedSwitchKeys.includes(benefit.toggleKey), disabled: shouldDisableSwitch, onCheck: e => this.handleSwitchToggle(benefit.toggleKey, e.detail.checked) })));
282
- }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_k = this === null || this === void 0 ? void 0 : this.benefits) === null || _k === void 0 ? void 0 :
283
- _k.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
282
+ }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_m = this === null || this === void 0 ? void 0 : this.benefits) === null || _m === void 0 ? void 0 :
283
+ _m.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
284
284
  'secondary-link': true
285
285
  } }, this.secondaryLinkOpenBlank ? (h("a", { target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (h("a", { href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
286
286
  }
@@ -235,7 +235,7 @@ const TetCompareCardV2$1 = /*@__PURE__*/ proxyCustomElement(class TetCompareCard
235
235
  * @returns rendered card body.
236
236
  */
237
237
  renderCard() {
238
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
238
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
239
239
  // Get data for rendering
240
240
  const comparisonData = this.allProductData[this.selectedProductCode];
241
241
  const contractTermData = this.selectedContractTerm();
@@ -245,19 +245,19 @@ const TetCompareCardV2$1 = /*@__PURE__*/ proxyCustomElement(class TetCompareCard
245
245
  const price = contractTermData.amount.toString();
246
246
  const promotionCode = (_b = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.promotionCode) !== null && _b !== void 0 ? _b : '';
247
247
  const term = (_c = contractTermData.term) !== null && _c !== void 0 ? _c : '';
248
- const priceDescription = (contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) !== undefined ? contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription : '';
249
- const secondaryLink = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _d !== void 0 ? _d : '';
250
- const baseUrl = ((_e = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _e === void 0 ? void 0 : _e[this.language]) || '';
248
+ const priceDescription = (_e = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) === null || _d === void 0 ? void 0 : _d[this.language]) !== null && _e !== void 0 ? _e : '';
249
+ const secondaryLink = (_f = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _f !== void 0 ? _f : '';
250
+ const baseUrl = ((_g = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _g === void 0 ? void 0 : _g[this.language]) || '';
251
251
  const params = new URLSearchParams({
252
- contractTerm: (_f = term === null || term === void 0 ? void 0 : term.toString()) !== null && _f !== void 0 ? _f : '',
252
+ contractTerm: (_h = term === null || term === void 0 ? void 0 : term.toString()) !== null && _h !== void 0 ? _h : '',
253
253
  product: this.selectedProductCode,
254
254
  promotion: promotionCode !== null && promotionCode !== void 0 ? promotionCode : '',
255
- lang: (_g = this.language) !== null && _g !== void 0 ? _g : '',
255
+ lang: (_j = this.language) !== null && _j !== void 0 ? _j : '',
256
256
  from: 'tet.lv'
257
257
  });
258
258
  const link = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${params.toString()}`;
259
259
  const currentBonuses = this.currentBonuses();
260
- const isBestChoice = ((_h = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _h === void 0 ? void 0 : _h.bestChoice) || false;
260
+ const isBestChoice = ((_k = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _k === void 0 ? void 0 : _k.bestChoice) || false;
261
261
  return (h("div", { onClick: this.clickCallback, onKeyDown: () => { }, class: {
262
262
  'card': true,
263
263
  [`${this.cardType}`]: true,
@@ -273,8 +273,8 @@ const TetCompareCardV2$1 = /*@__PURE__*/ proxyCustomElement(class TetCompareCard
273
273
  'js-resize-title': true
274
274
  }, part: "compare-card-title-wrapper" }, h("h3", { class: "main-title" }, mainTitle))) : (''), h("div", { class: "price js-resize-price" }, price && !isNaN(parseFloat(price)) ? (h("div", { class: {
275
275
  'price-wrapper': true
276
- } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_j = this === null || this === void 0 ? void 0 : this.benefits) === null || _j === void 0 ? void 0 :
277
- _j.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
276
+ } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_l = this === null || this === void 0 ? void 0 : this.benefits) === null || _l === void 0 ? void 0 :
277
+ _l.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
278
278
  const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
279
279
  const benefitAsImg = !!benefit.img;
280
280
  // Is this switch the only active one and preselected?
@@ -290,8 +290,8 @@ const TetCompareCardV2$1 = /*@__PURE__*/ proxyCustomElement(class TetCompareCard
290
290
  const shouldDisableSwitch = isOnlyActivePreselected ||
291
291
  (isMultiPreselected && this.selectedSwitchKeys.includes(benefit.toggleKey));
292
292
  return (h("div", { class: "benefit", key: benefit.toggleKey }, benefitAsImg ? (h("img", { src: benefit.img, class: "benefit__icon benefit__img" })) : (h("tet-icon", { class: "benefit__icon icon", name: benefit.icon })), benefitAsLink ? (h("a", Object.assign({ class: "benefit__name benefit__link" }, (benefit.dataAttributes || {})), benefit.name)) : (h("span", { class: "benefit__name" }, benefit.name)), h("tet-switch", { name: benefit.toggleKey, checked: this.selectedSwitchKeys.includes(benefit.toggleKey), disabled: shouldDisableSwitch, onCheck: e => this.handleSwitchToggle(benefit.toggleKey, e.detail.checked) })));
293
- }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_k = this === null || this === void 0 ? void 0 : this.benefits) === null || _k === void 0 ? void 0 :
294
- _k.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
293
+ }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_m = this === null || this === void 0 ? void 0 : this.benefits) === null || _m === void 0 ? void 0 :
294
+ _m.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
295
295
  'secondary-link': true
296
296
  } }, this.secondaryLinkOpenBlank ? (h("a", { target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (h("a", { href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
297
297
  }
@@ -227,7 +227,7 @@ const TetCompareCardV2 = class {
227
227
  * @returns rendered card body.
228
228
  */
229
229
  renderCard() {
230
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
230
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
231
231
  // Get data for rendering
232
232
  const comparisonData = this.allProductData[this.selectedProductCode];
233
233
  const contractTermData = this.selectedContractTerm();
@@ -237,19 +237,19 @@ const TetCompareCardV2 = class {
237
237
  const price = contractTermData.amount.toString();
238
238
  const promotionCode = (_b = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.promotionCode) !== null && _b !== void 0 ? _b : '';
239
239
  const term = (_c = contractTermData.term) !== null && _c !== void 0 ? _c : '';
240
- const priceDescription = (contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) !== undefined ? contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription : '';
241
- const secondaryLink = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _d !== void 0 ? _d : '';
242
- const baseUrl = ((_e = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _e === void 0 ? void 0 : _e[this.language]) || '';
240
+ const priceDescription = (_e = (_d = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.priceDescription) === null || _d === void 0 ? void 0 : _d[this.language]) !== null && _e !== void 0 ? _e : '';
241
+ const secondaryLink = (_f = contractTermData === null || contractTermData === void 0 ? void 0 : contractTermData.contract) !== null && _f !== void 0 ? _f : '';
242
+ const baseUrl = ((_g = comparisonData === null || comparisonData === void 0 ? void 0 : comparisonData.formUrl) === null || _g === void 0 ? void 0 : _g[this.language]) || '';
243
243
  const params = new URLSearchParams({
244
- contractTerm: (_f = term === null || term === void 0 ? void 0 : term.toString()) !== null && _f !== void 0 ? _f : '',
244
+ contractTerm: (_h = term === null || term === void 0 ? void 0 : term.toString()) !== null && _h !== void 0 ? _h : '',
245
245
  product: this.selectedProductCode,
246
246
  promotion: promotionCode !== null && promotionCode !== void 0 ? promotionCode : '',
247
- lang: (_g = this.language) !== null && _g !== void 0 ? _g : '',
247
+ lang: (_j = this.language) !== null && _j !== void 0 ? _j : '',
248
248
  from: 'tet.lv'
249
249
  });
250
250
  const link = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${params.toString()}`;
251
251
  const currentBonuses = this.currentBonuses();
252
- const isBestChoice = ((_h = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _h === void 0 ? void 0 : _h.bestChoice) || false;
252
+ const isBestChoice = ((_k = this.options.find(options => options.productCode === this.selectedProductCode)) === null || _k === void 0 ? void 0 : _k.bestChoice) || false;
253
253
  return (h("div", { onClick: this.clickCallback, onKeyDown: () => { }, class: {
254
254
  'card': true,
255
255
  [`${this.cardType}`]: true,
@@ -265,8 +265,8 @@ const TetCompareCardV2 = class {
265
265
  'js-resize-title': true
266
266
  }, part: "compare-card-title-wrapper" }, h("h3", { class: "main-title" }, mainTitle))) : (''), h("div", { class: "price js-resize-price" }, price && !isNaN(parseFloat(price)) ? (h("div", { class: {
267
267
  'price-wrapper': true
268
- } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_j = this === null || this === void 0 ? void 0 : this.benefits) === null || _j === void 0 ? void 0 :
269
- _j.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
268
+ } }, h("div", { class: "price-container" }, h("div", { class: "new-price translation-none" }, parseFloat(price.replace(',', '.')).toFixed(2).replace('.', ',')), h("div", { class: "currency" }, h("span", null, this.currency))), priceDescription ? (h("span", { class: "price-description" }, priceDescription)) : (''))) : ('')), currentBonuses.length > 0 && (h("div", { class: "bonuses-wrapper" }, currentBonuses.map(bonus => (h("div", { class: "bonuss", key: bonus.modalId }, h("tet-icon", { class: "bonuss__icon icon", name: "add" }), bonus.modalId ? (h("a", { "data-modal-screen-key": bonus.modalId, "tab-index": "0", role: "button", class: "bonuss__text bonuss__link" }, bonus.name)) : (h("span", { class: "bonuss__text" }, bonus.name))))))), h("tet-button", { class: "button", type: "primary", theme: "yellow", url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle))), h("div", { class: "compare-card-half-40" }, h("div", { class: "content bottom" }, this.cardType === 'dropdown' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_l = this === null || this === void 0 ? void 0 : this.benefits) === null || _l === void 0 ? void 0 :
269
+ _l.map((benefit) => (this.benefitHandler(benefit))), h("tet-dropdown", { id: "dropdown", class: "dropdown", "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: this.dropdownOptions }))) : (''), this.cardType === 'switcher' && this.benefits.length > 0 && (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), this.benefits.map((benefit) => {
270
270
  const benefitAsLink = benefit.dataAttributes && Object.keys(benefit.dataAttributes).length > 0;
271
271
  const benefitAsImg = !!benefit.img;
272
272
  // Is this switch the only active one and preselected?
@@ -282,8 +282,8 @@ const TetCompareCardV2 = class {
282
282
  const shouldDisableSwitch = isOnlyActivePreselected ||
283
283
  (isMultiPreselected && this.selectedSwitchKeys.includes(benefit.toggleKey));
284
284
  return (h("div", { class: "benefit", key: benefit.toggleKey }, benefitAsImg ? (h("img", { src: benefit.img, class: "benefit__icon benefit__img" })) : (h("tet-icon", { class: "benefit__icon icon", name: benefit.icon })), benefitAsLink ? (h("a", Object.assign({ class: "benefit__name benefit__link" }, (benefit.dataAttributes || {})), benefit.name)) : (h("span", { class: "benefit__name" }, benefit.name)), h("tet-switch", { name: benefit.toggleKey, checked: this.selectedSwitchKeys.includes(benefit.toggleKey), disabled: shouldDisableSwitch, onCheck: e => this.handleSwitchToggle(benefit.toggleKey, e.detail.checked) })));
285
- }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_k = this === null || this === void 0 ? void 0 : this.benefits) === null || _k === void 0 ? void 0 :
286
- _k.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
285
+ }))), this.cardType === 'static' && this.benefits.length > 0 ? (h("div", { class: "benefit-wrapper" }, h("span", { class: "benefit-title" }, this.benefitTitle), (_m = this === null || this === void 0 ? void 0 : this.benefits) === null || _m === void 0 ? void 0 :
286
+ _m.map((benefit) => (this.benefitHandler(benefit))))) : (''), h("div", { class: "button-wrapper" }, secondaryLink && this.secondaryLinkText && (h("div", { class: {
287
287
  'secondary-link': true
288
288
  } }, this.secondaryLinkOpenBlank ? (h("a", { target: "_blank", href: secondaryLink }, this.secondaryLinkText)) : (h("a", { href: secondaryLink }, this.secondaryLinkText))))))), this.cardScript ? h("link", { href: this.cardScript, rel: "stylesheet", type: "text/css" }) : ''));
289
289
  }