@tet/tet-components 1.4.71-testing → 1.4.72-staging

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.
Files changed (523) hide show
  1. package/dist/cjs/{address-656e77f6.js → address-f852270f.js} +1 -1
  2. package/dist/cjs/{assets-f64f0e16.js → assets-b9d36649.js} +1 -1
  3. package/dist/cjs/{async-request-fcf33aba.js → async-request-4517f566.js} +1 -1
  4. package/dist/cjs/{http-codes-40da1e61.js → http-codes-062f76cf.js} +1 -1
  5. package/dist/cjs/{index-4b423f33.js → index-19a7608f.js} +1 -1
  6. package/dist/cjs/{index-3242ff3f.js → index-faec4c52.js} +17 -9
  7. package/dist/cjs/loader.cjs.js +2 -2
  8. package/dist/cjs/{phone-055efd07.js → phone-d6be0dd2.js} +2 -2
  9. package/dist/cjs/{product-comparison-88a89820.js → product-comparison-aa80a77c.js} +1 -1
  10. package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
  11. package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +4 -4
  12. package/dist/cjs/tet-address-offers-view.cjs.entry.js +3 -3
  13. package/dist/cjs/tet-address-offers_4.cjs.entry.js +7 -7
  14. package/dist/cjs/tet-address-search.cjs.entry.js +4 -4
  15. package/dist/cjs/tet-asset-addresses.cjs.entry.js +3 -3
  16. package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +1 -1
  17. package/dist/cjs/tet-autocomplete.cjs.entry.js +1 -1
  18. package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +3 -3
  19. package/dist/cjs/tet-b2b-configurator.cjs.entry.js +4 -4
  20. package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +3 -3
  21. package/dist/cjs/tet-banner-nav.cjs.entry.js +3 -3
  22. package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
  23. package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
  24. package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
  25. package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
  26. package/dist/cjs/tet-business-lines.cjs.entry.js +4 -4
  27. package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
  28. package/dist/cjs/tet-button.cjs.entry.js +1 -1
  29. package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
  30. package/dist/cjs/tet-carousel.cjs.entry.js +3 -3
  31. package/dist/cjs/{tet-checkbox_3.cjs.entry.js → tet-checkbox_2.cjs.entry.js} +1 -375
  32. package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +3 -3
  33. package/dist/cjs/tet-cloud-configurator.cjs.entry.js +3 -3
  34. package/dist/cjs/tet-colors.cjs.entry.js +1 -1
  35. package/dist/cjs/tet-compare-card-v2.cjs.entry.js +4 -4
  36. package/dist/cjs/tet-compare-card-v3.cjs.entry.js +360 -0
  37. package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
  38. package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
  39. package/dist/cjs/tet-components.cjs.js +2 -2
  40. package/dist/cjs/tet-contact-form.cjs.entry.js +5 -5
  41. package/dist/cjs/tet-contact-info.cjs.entry.js +1 -1
  42. package/dist/cjs/tet-container_2.cjs.entry.js +1 -1
  43. package/dist/cjs/tet-countdown.cjs.entry.js +1 -1
  44. package/dist/cjs/tet-counter.cjs.entry.js +1 -1
  45. package/dist/cjs/tet-customer-assets.cjs.entry.js +3 -3
  46. package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +1 -1
  47. package/dist/cjs/tet-datepicker.cjs.entry.js +1 -1
  48. package/dist/cjs/tet-dialog.cjs.entry.js +3 -3
  49. package/dist/cjs/tet-display.cjs.entry.js +1 -1
  50. package/dist/cjs/tet-divider.cjs.entry.js +1 -1
  51. package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
  52. package/dist/cjs/tet-expandable-input.cjs.entry.js +2 -2
  53. package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
  54. package/dist/cjs/tet-feedback-form.cjs.entry.js +3 -3
  55. package/dist/cjs/tet-filter.cjs.entry.js +1 -1
  56. package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
  57. package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
  58. package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
  59. package/dist/cjs/tet-grid.cjs.entry.js +1 -1
  60. package/dist/cjs/tet-icon.cjs.entry.js +2 -2
  61. package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
  62. package/dist/cjs/tet-input.cjs.entry.js +3 -3
  63. package/dist/cjs/tet-label.cjs.entry.js +3 -3
  64. package/dist/cjs/tet-layout.cjs.entry.js +1 -1
  65. package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
  66. package/dist/cjs/tet-link.cjs.entry.js +1 -1
  67. package/dist/cjs/tet-loader.cjs.entry.js +1 -1
  68. package/dist/cjs/tet-macd-view.cjs.entry.js +6 -6
  69. package/dist/cjs/tet-menu-mobile.cjs.entry.js +7 -5
  70. package/dist/cjs/tet-menu.cjs.entry.js +397 -92
  71. package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
  72. package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +3 -3
  73. package/dist/cjs/tet-navigation-mobile.cjs.entry.js +2 -2
  74. package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
  75. package/dist/cjs/tet-notification.cjs.entry.js +1 -1
  76. package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
  77. package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
  78. package/dist/cjs/tet-position.cjs.entry.js +1 -1
  79. package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
  80. package/dist/cjs/tet-radio.cjs.entry.js +13 -11
  81. package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
  82. package/dist/cjs/tet-referral.cjs.entry.js +5 -5
  83. package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
  84. package/dist/cjs/tet-snicker-card-badge.cjs.entry.js +1 -1
  85. package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
  86. package/dist/cjs/tet-snicker-card.cjs.entry.js +3 -3
  87. package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
  88. package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
  89. package/dist/cjs/tet-stepper-input.cjs.entry.js +3 -3
  90. package/dist/cjs/tet-stepper-v2.cjs.entry.js +1 -1
  91. package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
  92. package/dist/cjs/tet-stepper.cjs.entry.js +1 -1
  93. package/dist/cjs/tet-support-search.cjs.entry.js +1 -1
  94. package/dist/cjs/tet-switch.cjs.entry.js +2 -2
  95. package/dist/cjs/tet-tab-header.cjs.entry.js +1 -1
  96. package/dist/cjs/tet-table.cjs.entry.js +1 -1
  97. package/dist/cjs/tet-tag_2.cjs.entry.js +3 -3
  98. package/dist/cjs/tet-text-list.cjs.entry.js +2 -2
  99. package/dist/cjs/tet-text.cjs.entry.js +1 -1
  100. package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
  101. package/dist/cjs/tet-thank-you-view-v2.cjs.entry.js +3 -3
  102. package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +3 -3
  103. package/dist/cjs/tet-thank-you-view.cjs.entry.js +1 -1
  104. package/dist/cjs/tet-tooltip.cjs.entry.js +380 -0
  105. package/dist/cjs/tet-tv-gift-block.cjs.entry.js +1 -1
  106. package/dist/cjs/tet-tv-gift-list.cjs.entry.js +1 -1
  107. package/dist/cjs/{theme-wrapper-66880718.js → theme-wrapper-46514846.js} +2 -2
  108. package/dist/cjs/{translations-03c9de64.js → translations-89a0ec3d.js} +1 -1
  109. package/dist/collection/collection-manifest.json +1 -0
  110. package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.css +34 -0
  111. package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.css +34 -0
  112. package/dist/collection/components/advanced/cards/tet-compare-card-v3/test/comparison-response.mock.js +463 -0
  113. package/dist/collection/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.css +868 -0
  114. package/dist/collection/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.js +699 -0
  115. package/dist/collection/components/basic/buttons/tet-radio/tet-radio.css +3 -0
  116. package/dist/collection/components/basic/buttons/tet-radio/tet-radio.js +11 -9
  117. package/dist/collection/components/basic/buttons/tet-switch/tet-switch.css +3 -0
  118. package/dist/collection/components/simple/inputs/tet-expandable-input/tet-expandable-input.css +23 -7
  119. package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.css +34 -0
  120. package/dist/collection/components/simple/menu/tet-menu/tet-menu.css +819 -39
  121. package/dist/collection/components/simple/menu/tet-menu/tet-menu.js +464 -95
  122. package/dist/collection/components/simple/menu/tet-menu-mobile/tet-menu-mobile.css +56 -36
  123. package/dist/collection/components/simple/menu/tet-menu-mobile/tet-menu-mobile.js +23 -3
  124. package/dist/collection/components/simple/menu/tet-navigation-mobile/tet-navigation-mobile.css +17 -3
  125. package/dist/components/index.js +3 -1
  126. package/dist/components/{p-8803338b.js → p-05f9e34d.js} +1 -1
  127. package/dist/components/{p-42d78188.js → p-08612744.js} +7 -7
  128. package/dist/components/{p-22b05881.js → p-0c48b91d.js} +3 -3
  129. package/dist/components/{p-a57638be.js → p-0dc23dbb.js} +1 -1
  130. package/dist/components/{p-61ba5ba1.js → p-1585767d.js} +1 -1
  131. package/dist/components/{p-1942f0f5.js → p-1a0a5e0b.js} +3 -3
  132. package/dist/components/{p-d840d114.js → p-1bfee463.js} +1 -1
  133. package/dist/components/{p-c7f783f8.js → p-1c324769.js} +7 -7
  134. package/dist/components/{p-4d181fc9.js → p-25538d98.js} +5 -5
  135. package/dist/components/{p-4468c9e9.js → p-3493f65f.js} +1 -1
  136. package/dist/components/{p-dab4d025.js → p-3794206a.js} +1 -1
  137. package/dist/components/{p-5a41a155.js → p-3e36e361.js} +4 -4
  138. package/dist/components/{p-05a4a88a.js → p-3f70a86a.js} +2 -2
  139. package/dist/components/{p-72215a89.js → p-3fef4912.js} +2 -2
  140. package/dist/components/{p-de671173.js → p-43ae78c6.js} +1 -1
  141. package/dist/components/{p-734f67c5.js → p-446fe76d.js} +1 -1
  142. package/dist/components/{p-a46ed058.js → p-4606f4f9.js} +1 -1
  143. package/dist/components/{p-70a6ba6c.js → p-464941c1.js} +14 -14
  144. package/dist/components/{p-7cd73a11.js → p-4ca8db20.js} +3 -3
  145. package/dist/components/{p-789bee5f.js → p-503abf7a.js} +1 -1
  146. package/dist/components/{p-b63a7833.js → p-538a0e87.js} +3 -3
  147. package/dist/components/{p-8cd5cc24.js → p-57b59a16.js} +2 -2
  148. package/dist/components/{p-eabd73fc.js → p-5c4dbc29.js} +3 -3
  149. package/dist/components/{p-f6c678ae.js → p-5f9d5d42.js} +2 -2
  150. package/dist/components/{p-69ddd50b.js → p-65955941.js} +6 -6
  151. package/dist/components/{p-d659d0dc.js → p-6d79283f.js} +1 -1
  152. package/dist/components/{p-f6e855a8.js → p-6e8583d1.js} +7 -7
  153. package/dist/components/{p-2f7b2d35.js → p-72ab8bd5.js} +1 -1
  154. package/dist/components/{p-68c6a6d2.js → p-785629c2.js} +1 -1
  155. package/dist/components/{p-6e273f47.js → p-79241ad5.js} +1 -1
  156. package/dist/components/{p-e8595e06.js → p-7e14c59f.js} +14 -12
  157. package/dist/components/{p-ecb62209.js → p-7e21e309.js} +2 -2
  158. package/dist/components/{p-6b6e4f80.js → p-7f14c72a.js} +1 -1
  159. package/dist/components/{p-efa3ec10.js → p-89110d69.js} +2 -2
  160. package/dist/components/{p-a6c51126.js → p-8a9be4ba.js} +2 -2
  161. package/dist/components/{p-d2906f29.js → p-8e3c606a.js} +3 -3
  162. package/dist/components/{p-b7eb822d.js → p-926949eb.js} +1 -1
  163. package/dist/components/{p-8f9ff447.js → p-9568c281.js} +2 -2
  164. package/dist/components/{p-d5d6ad18.js → p-95b43510.js} +2 -2
  165. package/dist/components/{p-454eccfc.js → p-9972183e.js} +3 -3
  166. package/dist/components/{p-e72337be.js → p-9e4881fa.js} +1 -1
  167. package/dist/components/{p-25ea4db6.js → p-a2b1a79a.js} +1 -1
  168. package/dist/components/{p-806583bf.js → p-a40527e5.js} +4 -4
  169. package/dist/components/{p-411270c6.js → p-a4099430.js} +2 -2
  170. package/dist/components/{p-23f7b264.js → p-a4c4d2c3.js} +7 -7
  171. package/dist/components/{p-b51591ec.js → p-a79cb5c9.js} +1 -1
  172. package/dist/components/{p-25b93e8f.js → p-aa122c92.js} +1 -1
  173. package/dist/components/{p-189a37d2.js → p-b4ccc509.js} +5 -5
  174. package/dist/components/{p-1a84e464.js → p-b520b98a.js} +6 -6
  175. package/dist/components/{p-d6c8d210.js → p-c9d8d5c6.js} +10 -10
  176. package/dist/components/{p-3c404244.js → p-d0df24b6.js} +1 -1
  177. package/dist/components/{p-70507bfc.js → p-d2a24b94.js} +1 -1
  178. package/dist/components/{p-79e64e7a.js → p-d65f79c8.js} +3 -3
  179. package/dist/components/{p-a004fba4.js → p-d8eb751f.js} +2 -2
  180. package/dist/components/{p-2be031c9.js → p-d9008657.js} +9 -9
  181. package/dist/components/{p-1281b61e.js → p-d92091d6.js} +2 -2
  182. package/dist/components/{p-8f3097ac.js → p-e7e499ef.js} +10 -10
  183. package/dist/components/{p-cd88c18e.js → p-f2443ea9.js} +7 -7
  184. package/dist/components/{p-809b2c68.js → p-fcf4aad0.js} +3 -3
  185. package/dist/components/tet-accordion.js +1 -1
  186. package/dist/components/tet-address-offers-filters-products.js +1 -1
  187. package/dist/components/tet-address-offers-filters.js +1 -1
  188. package/dist/components/tet-address-offers-view.js +24 -24
  189. package/dist/components/tet-address-offers.js +1 -1
  190. package/dist/components/tet-address-search.js +1 -1
  191. package/dist/components/tet-asset-addresses.js +13 -13
  192. package/dist/components/tet-asset-availability-addresses.js +1 -1
  193. package/dist/components/tet-autocomplete-dropdown.js +5 -5
  194. package/dist/components/tet-autocomplete.js +1 -1
  195. package/dist/components/tet-availability-contact-form.js +1 -1
  196. package/dist/components/tet-b2b-check-out-form.js +1 -1
  197. package/dist/components/tet-b2b-compare-card.js +1 -1
  198. package/dist/components/tet-b2b-configurator-cart.js +1 -1
  199. package/dist/components/tet-b2b-configurator.js +20 -20
  200. package/dist/components/tet-b2b-service-calculator.js +8 -8
  201. package/dist/components/tet-banner-nav.js +3 -3
  202. package/dist/components/tet-bar-graph.js +1 -1
  203. package/dist/components/tet-border-radius.js +1 -1
  204. package/dist/components/tet-business-card.js +1 -1
  205. package/dist/components/tet-business-compare-card.js +3 -3
  206. package/dist/components/tet-business-lines.js +5 -5
  207. package/dist/components/tet-business-navigation.js +1 -1
  208. package/dist/components/tet-business-round-stepper.js +2 -2
  209. package/dist/components/tet-business-summary-card.js +1 -1
  210. package/dist/components/tet-button.js +1 -1
  211. package/dist/components/tet-card-list.js +1 -1
  212. package/dist/components/tet-carousel.js +4 -4
  213. package/dist/components/tet-checkbox.js +1 -1
  214. package/dist/components/tet-cloud-application-form-dialog.js +8 -8
  215. package/dist/components/tet-cloud-configurator.js +12 -12
  216. package/dist/components/tet-colors.js +1 -1
  217. package/dist/components/tet-compare-card-v2.js +10 -10
  218. package/dist/components/tet-compare-card-v3.d.ts +11 -0
  219. package/dist/components/tet-compare-card-v3.js +440 -0
  220. package/dist/components/tet-compare-card.js +1 -1
  221. package/dist/components/tet-compare-cards-tab.js +16 -16
  222. package/dist/components/tet-compare-cards.js +1 -1
  223. package/dist/components/tet-contact-form.js +9 -9
  224. package/dist/components/tet-contact-info.js +1 -1
  225. package/dist/components/tet-container.js +1 -1
  226. package/dist/components/tet-countdown.js +1 -1
  227. package/dist/components/tet-counter.js +1 -1
  228. package/dist/components/tet-customer-assets.js +9 -9
  229. package/dist/components/tet-datepicker-header.js +1 -1
  230. package/dist/components/tet-datepicker-month-view.js +1 -1
  231. package/dist/components/tet-datepicker-multi-year-view.js +1 -1
  232. package/dist/components/tet-datepicker-year-view.js +1 -1
  233. package/dist/components/tet-datepicker.js +6 -6
  234. package/dist/components/tet-dialog.js +1 -1
  235. package/dist/components/tet-display.js +8 -8
  236. package/dist/components/tet-divider.js +7 -7
  237. package/dist/components/tet-dropdown.js +1 -1
  238. package/dist/components/tet-dynamic-card.js +4 -4
  239. package/dist/components/tet-expandable-input.js +4 -4
  240. package/dist/components/tet-expansion-panel.js +1 -1
  241. package/dist/components/tet-feedback-form.js +7 -7
  242. package/dist/components/tet-filter.js +4 -4
  243. package/dist/components/tet-floating-block.js +3 -3
  244. package/dist/components/tet-font-weight.js +1 -1
  245. package/dist/components/tet-fonts.js +1 -1
  246. package/dist/components/tet-grid.js +1 -1
  247. package/dist/components/tet-icon.js +1 -1
  248. package/dist/components/tet-inline-message.js +1 -1
  249. package/dist/components/tet-input.js +1 -1
  250. package/dist/components/tet-label.js +3 -3
  251. package/dist/components/tet-layout.js +1 -1
  252. package/dist/components/tet-link-card-list.js +3 -3
  253. package/dist/components/tet-link.js +1 -1
  254. package/dist/components/tet-loader.js +1 -1
  255. package/dist/components/tet-macd-view.js +10 -10
  256. package/dist/components/tet-menu-mobile.js +9 -6
  257. package/dist/components/tet-menu.js +405 -95
  258. package/dist/components/tet-mini-compare-card.js +3 -3
  259. package/dist/components/tet-multi-step-dialog.js +5 -5
  260. package/dist/components/tet-navigation-mobile.js +3 -3
  261. package/dist/components/tet-news-card-list.js +4 -4
  262. package/dist/components/tet-notification.js +1 -1
  263. package/dist/components/tet-number-input.js +1 -1
  264. package/dist/components/tet-placeholder.js +1 -1
  265. package/dist/components/tet-position.js +7 -7
  266. package/dist/components/tet-price-view.js +1 -1
  267. package/dist/components/tet-radio.js +1 -1
  268. package/dist/components/tet-range-slider.js +1 -1
  269. package/dist/components/tet-referral.js +6 -6
  270. package/dist/components/tet-round-stepper.js +2 -2
  271. package/dist/components/tet-selection-list.js +1 -1
  272. package/dist/components/tet-snicker-card-badge.js +1 -1
  273. package/dist/components/tet-snicker-card-group.js +1 -1
  274. package/dist/components/tet-snicker-card.js +11 -11
  275. package/dist/components/tet-spacing.js +1 -1
  276. package/dist/components/tet-spinner.js +1 -1
  277. package/dist/components/tet-stepper-input.js +1 -1
  278. package/dist/components/tet-stepper-v2.js +1 -1
  279. package/dist/components/tet-stepper-v3.js +1 -1
  280. package/dist/components/tet-stepper.js +1 -1
  281. package/dist/components/tet-support-search.js +7 -7
  282. package/dist/components/tet-switch.js +1 -1
  283. package/dist/components/tet-tab-content.js +1 -1
  284. package/dist/components/tet-tab-header.js +1 -1
  285. package/dist/components/tet-table.js +3 -3
  286. package/dist/components/tet-tag-group.js +1 -1
  287. package/dist/components/tet-tag.js +1 -1
  288. package/dist/components/tet-text-list.js +1 -1
  289. package/dist/components/tet-text.js +7 -7
  290. package/dist/components/tet-textarea.js +1 -1
  291. package/dist/components/tet-thank-you-view-v2.js +5 -5
  292. package/dist/components/tet-thank-you-view-v3.js +5 -5
  293. package/dist/components/tet-thank-you-view.js +4 -4
  294. package/dist/components/tet-tooltip.js +1 -1
  295. package/dist/components/tet-tv-gift-block.js +1 -1
  296. package/dist/components/tet-tv-gift-list.js +2 -2
  297. package/dist/esm/{address-1e0810e7.js → address-20e2d850.js} +1 -1
  298. package/dist/esm/{assets-e1349520.js → assets-894007df.js} +1 -1
  299. package/dist/esm/{async-request-4c945e13.js → async-request-ae1056de.js} +1 -1
  300. package/dist/esm/{http-codes-1927ea00.js → http-codes-cf0086d4.js} +1 -1
  301. package/dist/esm/{index-412df137.js → index-e3209c56.js} +1 -1
  302. package/dist/esm/{index-aac31bd2.js → index-e933a7d2.js} +17 -9
  303. package/dist/esm/loader.js +3 -3
  304. package/dist/esm/{phone-1a920c5c.js → phone-62660137.js} +2 -2
  305. package/dist/esm/{product-comparison-dd90c721.js → product-comparison-cb8955f6.js} +1 -1
  306. package/dist/esm/tet-accordion.entry.js +1 -1
  307. package/dist/esm/tet-address-offers-filters-products_2.entry.js +4 -4
  308. package/dist/esm/tet-address-offers-view.entry.js +3 -3
  309. package/dist/esm/tet-address-offers_4.entry.js +7 -7
  310. package/dist/esm/tet-address-search.entry.js +4 -4
  311. package/dist/esm/tet-asset-addresses.entry.js +3 -3
  312. package/dist/esm/tet-autocomplete-dropdown.entry.js +1 -1
  313. package/dist/esm/tet-autocomplete.entry.js +1 -1
  314. package/dist/esm/tet-b2b-check-out-form_5.entry.js +3 -3
  315. package/dist/esm/tet-b2b-configurator.entry.js +4 -4
  316. package/dist/esm/tet-b2b-service-calculator.entry.js +3 -3
  317. package/dist/esm/tet-banner-nav.entry.js +3 -3
  318. package/dist/esm/tet-bar-graph.entry.js +1 -1
  319. package/dist/esm/tet-border-radius.entry.js +1 -1
  320. package/dist/esm/tet-business-card.entry.js +1 -1
  321. package/dist/esm/tet-business-compare-card.entry.js +1 -1
  322. package/dist/esm/tet-business-lines.entry.js +4 -4
  323. package/dist/esm/tet-business-round-stepper.entry.js +1 -1
  324. package/dist/esm/tet-button.entry.js +1 -1
  325. package/dist/esm/tet-card-list.entry.js +1 -1
  326. package/dist/esm/tet-carousel.entry.js +3 -3
  327. package/dist/esm/{tet-checkbox_3.entry.js → tet-checkbox_2.entry.js} +2 -375
  328. package/dist/esm/tet-cloud-application-form-dialog.entry.js +3 -3
  329. package/dist/esm/tet-cloud-configurator.entry.js +3 -3
  330. package/dist/esm/tet-colors.entry.js +1 -1
  331. package/dist/esm/tet-compare-card-v2.entry.js +4 -4
  332. package/dist/esm/tet-compare-card-v3.entry.js +356 -0
  333. package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
  334. package/dist/esm/tet-compare-cards_2.entry.js +3 -3
  335. package/dist/esm/tet-components.js +3 -3
  336. package/dist/esm/tet-contact-form.entry.js +5 -5
  337. package/dist/esm/tet-contact-info.entry.js +1 -1
  338. package/dist/esm/tet-container_2.entry.js +1 -1
  339. package/dist/esm/tet-countdown.entry.js +1 -1
  340. package/dist/esm/tet-counter.entry.js +1 -1
  341. package/dist/esm/tet-customer-assets.entry.js +3 -3
  342. package/dist/esm/tet-datepicker-header_4.entry.js +1 -1
  343. package/dist/esm/tet-datepicker.entry.js +1 -1
  344. package/dist/esm/tet-dialog.entry.js +3 -3
  345. package/dist/esm/tet-display.entry.js +1 -1
  346. package/dist/esm/tet-divider.entry.js +1 -1
  347. package/dist/esm/tet-dynamic-card.entry.js +1 -1
  348. package/dist/esm/tet-expandable-input.entry.js +2 -2
  349. package/dist/esm/tet-expansion-panel.entry.js +1 -1
  350. package/dist/esm/tet-feedback-form.entry.js +3 -3
  351. package/dist/esm/tet-filter.entry.js +1 -1
  352. package/dist/esm/tet-floating-block.entry.js +1 -1
  353. package/dist/esm/tet-font-weight.entry.js +1 -1
  354. package/dist/esm/tet-fonts.entry.js +1 -1
  355. package/dist/esm/tet-grid.entry.js +1 -1
  356. package/dist/esm/tet-icon.entry.js +2 -2
  357. package/dist/esm/tet-inline-message.entry.js +1 -1
  358. package/dist/esm/tet-input.entry.js +3 -3
  359. package/dist/esm/tet-label.entry.js +3 -3
  360. package/dist/esm/tet-layout.entry.js +1 -1
  361. package/dist/esm/tet-link-card-list.entry.js +1 -1
  362. package/dist/esm/tet-link.entry.js +1 -1
  363. package/dist/esm/tet-loader.entry.js +1 -1
  364. package/dist/esm/tet-macd-view.entry.js +6 -6
  365. package/dist/esm/tet-menu-mobile.entry.js +7 -5
  366. package/dist/esm/tet-menu.entry.js +397 -92
  367. package/dist/esm/tet-mini-compare-card.entry.js +1 -1
  368. package/dist/esm/tet-multi-step-dialog.entry.js +3 -3
  369. package/dist/esm/tet-navigation-mobile.entry.js +2 -2
  370. package/dist/esm/tet-news-card-list.entry.js +1 -1
  371. package/dist/esm/tet-notification.entry.js +1 -1
  372. package/dist/esm/tet-number-input.entry.js +1 -1
  373. package/dist/esm/tet-placeholder.entry.js +1 -1
  374. package/dist/esm/tet-position.entry.js +1 -1
  375. package/dist/esm/tet-price-view.entry.js +1 -1
  376. package/dist/esm/tet-radio.entry.js +13 -11
  377. package/dist/esm/tet-range-slider.entry.js +1 -1
  378. package/dist/esm/tet-referral.entry.js +5 -5
  379. package/dist/esm/tet-round-stepper.entry.js +1 -1
  380. package/dist/esm/tet-snicker-card-badge.entry.js +1 -1
  381. package/dist/esm/tet-snicker-card-group.entry.js +1 -1
  382. package/dist/esm/tet-snicker-card.entry.js +3 -3
  383. package/dist/esm/tet-spacing.entry.js +1 -1
  384. package/dist/esm/tet-spinner.entry.js +1 -1
  385. package/dist/esm/tet-stepper-input.entry.js +3 -3
  386. package/dist/esm/tet-stepper-v2.entry.js +1 -1
  387. package/dist/esm/tet-stepper-v3.entry.js +1 -1
  388. package/dist/esm/tet-stepper.entry.js +1 -1
  389. package/dist/esm/tet-support-search.entry.js +1 -1
  390. package/dist/esm/tet-switch.entry.js +2 -2
  391. package/dist/esm/tet-tab-header.entry.js +1 -1
  392. package/dist/esm/tet-table.entry.js +1 -1
  393. package/dist/esm/tet-tag_2.entry.js +3 -3
  394. package/dist/esm/tet-text-list.entry.js +2 -2
  395. package/dist/esm/tet-text.entry.js +1 -1
  396. package/dist/esm/tet-textarea.entry.js +1 -1
  397. package/dist/esm/tet-thank-you-view-v2.entry.js +3 -3
  398. package/dist/esm/tet-thank-you-view-v3.entry.js +3 -3
  399. package/dist/esm/tet-thank-you-view.entry.js +1 -1
  400. package/dist/esm/tet-tooltip.entry.js +376 -0
  401. package/dist/esm/tet-tv-gift-block.entry.js +1 -1
  402. package/dist/esm/tet-tv-gift-list.entry.js +1 -1
  403. package/dist/esm/{theme-wrapper-72d0b9da.js → theme-wrapper-cf4d7d54.js} +2 -2
  404. package/dist/esm/{translations-4712c45f.js → translations-e60db8fd.js} +1 -1
  405. package/dist/tet-components/{p-805fb580.entry.js → p-0416fa6c.entry.js} +1 -1
  406. package/dist/tet-components/{p-25bb7d4f.entry.js → p-08aeaafd.entry.js} +1 -1
  407. package/dist/tet-components/{p-84322a3d.entry.js → p-091ba284.entry.js} +1 -1
  408. package/dist/tet-components/{p-4c6a379b.entry.js → p-0dca3de0.entry.js} +1 -1
  409. package/dist/tet-components/{p-b01405f8.entry.js → p-0e6d4a8f.entry.js} +1 -1
  410. package/dist/tet-components/{p-e93ab3e8.entry.js → p-0f8cdb24.entry.js} +1 -1
  411. package/dist/tet-components/{p-1080e977.entry.js → p-18c74666.entry.js} +1 -1
  412. package/dist/tet-components/{p-697d23d7.entry.js → p-1beb018b.entry.js} +1 -1
  413. package/dist/tet-components/{p-97cff839.entry.js → p-1d7b8a14.entry.js} +1 -1
  414. package/dist/tet-components/p-1deaa34b.entry.js +1 -0
  415. package/dist/tet-components/{p-edd42275.entry.js → p-1ff90a2c.entry.js} +1 -1
  416. package/dist/tet-components/{p-6693715e.entry.js → p-25d4852b.entry.js} +1 -1
  417. package/dist/tet-components/{p-e290c65d.entry.js → p-26147420.entry.js} +1 -1
  418. package/dist/tet-components/{p-f6916bfc.entry.js → p-265701de.entry.js} +1 -1
  419. package/dist/tet-components/{p-7f18c74c.entry.js → p-278f1d5e.entry.js} +1 -1
  420. package/dist/tet-components/{p-d06f8b4e.entry.js → p-27a33156.entry.js} +1 -1
  421. package/dist/tet-components/{p-52949a88.entry.js → p-2bf6d5b3.entry.js} +1 -1
  422. package/dist/tet-components/{p-ccfa9f31.entry.js → p-2c891567.entry.js} +1 -1
  423. package/dist/tet-components/{p-d8518d4b.js → p-2dbe670c.js} +1 -1
  424. package/dist/tet-components/{p-46f6a051.entry.js → p-2f25de81.entry.js} +1 -1
  425. package/dist/tet-components/{p-724189c2.entry.js → p-31be2161.entry.js} +1 -1
  426. package/dist/tet-components/{p-64e277c1.entry.js → p-3251b52b.entry.js} +1 -1
  427. package/dist/tet-components/{p-778c46a6.js → p-3ac57578.js} +1 -1
  428. package/dist/tet-components/{p-fc88ce77.entry.js → p-40ed3be9.entry.js} +1 -1
  429. package/dist/tet-components/{p-f81b3bb0.js → p-4213c1d1.js} +1 -1
  430. package/dist/tet-components/{p-2b5b2c71.entry.js → p-47a897c5.entry.js} +1 -1
  431. package/dist/tet-components/p-4a86dd2b.entry.js +1 -0
  432. package/dist/tet-components/{p-6be0549b.entry.js → p-4babd7b2.entry.js} +1 -1
  433. package/dist/tet-components/{p-d778c1fe.entry.js → p-4e21dd2f.entry.js} +1 -1
  434. package/dist/tet-components/{p-900bd4e1.entry.js → p-4e9f66a8.entry.js} +1 -1
  435. package/dist/tet-components/{p-cf3456e2.entry.js → p-51dfe68c.entry.js} +1 -1
  436. package/dist/tet-components/{p-122f3d3c.entry.js → p-548d7cc1.entry.js} +1 -1
  437. package/dist/tet-components/{p-1393ed60.entry.js → p-5527dd96.entry.js} +1 -1
  438. package/dist/tet-components/{p-003e17a0.entry.js → p-58313d11.entry.js} +1 -1
  439. package/dist/tet-components/{p-38be49a6.entry.js → p-592f0674.entry.js} +1 -1
  440. package/dist/tet-components/{p-83f43fdd.js → p-5abb3bea.js} +1 -1
  441. package/dist/tet-components/{p-b0c62997.entry.js → p-5e8bd119.entry.js} +1 -1
  442. package/dist/tet-components/{p-d5b36540.entry.js → p-5ec1a6cf.entry.js} +1 -1
  443. package/dist/tet-components/{p-cde8057a.entry.js → p-60abca86.entry.js} +1 -1
  444. package/dist/tet-components/{p-480ca12a.entry.js → p-60ef69f6.entry.js} +1 -1
  445. package/dist/tet-components/{p-8bfd498e.entry.js → p-63f6def9.entry.js} +1 -1
  446. package/dist/tet-components/{p-39ae25f5.entry.js → p-65644d7a.entry.js} +1 -1
  447. package/dist/tet-components/p-660bdc27.js +1 -0
  448. package/dist/tet-components/p-6c468fef.entry.js +1 -0
  449. package/dist/tet-components/{p-401e736e.entry.js → p-70448ec8.entry.js} +1 -1
  450. package/dist/tet-components/{p-0ebbf5ef.js → p-726651bc.js} +1 -1
  451. package/dist/tet-components/{p-b31168fc.entry.js → p-738c3987.entry.js} +1 -1
  452. package/dist/tet-components/{p-e13c62c8.entry.js → p-78ec990b.entry.js} +1 -1
  453. package/dist/tet-components/{p-ff291490.entry.js → p-7c7330ad.entry.js} +1 -1
  454. package/dist/tet-components/{p-b10165d6.entry.js → p-7e2c854a.entry.js} +1 -1
  455. package/dist/tet-components/{p-78d6f52c.entry.js → p-812e4964.entry.js} +1 -1
  456. package/dist/tet-components/{p-69c58fc4.entry.js → p-81cabfb1.entry.js} +1 -1
  457. package/dist/tet-components/{p-5fb62a1b.entry.js → p-85fffa05.entry.js} +1 -1
  458. package/dist/tet-components/p-87248982.entry.js +1 -0
  459. package/dist/tet-components/{p-949d0eaf.entry.js → p-8998d112.entry.js} +1 -1
  460. package/dist/tet-components/{p-ba8c6a1c.entry.js → p-89d2d3d9.entry.js} +1 -1
  461. package/dist/tet-components/{p-46b3fc7f.entry.js → p-8ac7782f.entry.js} +1 -1
  462. package/dist/tet-components/{p-3324b31a.entry.js → p-8e72a5cb.entry.js} +1 -1
  463. package/dist/tet-components/{p-be3cb49b.entry.js → p-90d2e87a.entry.js} +1 -1
  464. package/dist/tet-components/p-928c38da.entry.js +1 -0
  465. package/dist/tet-components/{p-b98f7254.entry.js → p-9c0a5507.entry.js} +1 -1
  466. package/dist/tet-components/{p-d1035694.entry.js → p-9c34400c.entry.js} +1 -1
  467. package/dist/tet-components/{p-87221449.entry.js → p-9f921c87.entry.js} +1 -1
  468. package/dist/tet-components/{p-331e7bf2.entry.js → p-a28e087f.entry.js} +1 -1
  469. package/dist/tet-components/{p-83e4ae9f.entry.js → p-a3b09130.entry.js} +1 -1
  470. package/dist/tet-components/{p-a8051a99.js → p-a476fd02.js} +1 -1
  471. package/dist/tet-components/{p-c711cd66.entry.js → p-a80fa7d0.entry.js} +1 -1
  472. package/dist/tet-components/{p-7fc933fe.entry.js → p-aa09ca5f.entry.js} +1 -1
  473. package/dist/tet-components/{p-9a75ed39.entry.js → p-aba71e2d.entry.js} +1 -1
  474. package/dist/tet-components/{p-cd86d0b1.entry.js → p-ad38e14e.entry.js} +1 -1
  475. package/dist/tet-components/{p-7544dfd7.js → p-b39df477.js} +1 -1
  476. package/dist/tet-components/{p-9c837569.entry.js → p-b4b90473.entry.js} +1 -1
  477. package/dist/tet-components/{p-93820289.entry.js → p-b4fb5193.entry.js} +1 -1
  478. package/dist/tet-components/{p-1fd2adaf.js → p-b92dff8a.js} +1 -1
  479. package/dist/tet-components/{p-e6aab016.entry.js → p-bb0dd139.entry.js} +1 -1
  480. package/dist/tet-components/{p-2c92d701.entry.js → p-bea999e0.entry.js} +1 -1
  481. package/dist/tet-components/{p-2fb8ea65.entry.js → p-bf61c059.entry.js} +1 -1
  482. package/dist/tet-components/{p-f58bb61e.entry.js → p-c07ad1c3.entry.js} +1 -1
  483. package/dist/tet-components/{p-75bbc14a.entry.js → p-c1955aa6.entry.js} +1 -1
  484. package/dist/tet-components/{p-f93ab9f3.entry.js → p-c7e67378.entry.js} +1 -1
  485. package/dist/tet-components/{p-ed07c65a.entry.js → p-c82904b9.entry.js} +1 -1
  486. package/dist/tet-components/{p-0c6b6730.js → p-c9ddf890.js} +1 -1
  487. package/dist/tet-components/{p-1ff1f044.entry.js → p-ceff5b1f.entry.js} +1 -1
  488. package/dist/tet-components/{p-5c821eef.entry.js → p-cf362ecc.entry.js} +1 -1
  489. package/dist/tet-components/{p-85f3f726.entry.js → p-d811ee75.entry.js} +1 -1
  490. package/dist/tet-components/{p-a0baf31a.entry.js → p-db46f3c9.entry.js} +1 -1
  491. package/dist/tet-components/{p-8fa0be45.entry.js → p-dcfc2639.entry.js} +1 -1
  492. package/dist/tet-components/{p-689e9d36.entry.js → p-e1aa6a4d.entry.js} +1 -1
  493. package/dist/tet-components/{p-b5315830.entry.js → p-e1bba17c.entry.js} +1 -1
  494. package/dist/tet-components/{p-5b5001cf.entry.js → p-e1ce8689.entry.js} +1 -1
  495. package/dist/tet-components/{p-6b088283.entry.js → p-e30eca37.entry.js} +1 -1
  496. package/dist/tet-components/{p-876009b7.entry.js → p-e3f93dd7.entry.js} +1 -1
  497. package/dist/tet-components/{p-f9c69d39.entry.js → p-e70a8127.entry.js} +1 -1
  498. package/dist/tet-components/{p-fa259a3d.entry.js → p-e8ec9d1c.entry.js} +1 -1
  499. package/dist/tet-components/{p-c9f21fde.entry.js → p-ec5b1040.entry.js} +1 -1
  500. package/dist/tet-components/p-ecfd2169.entry.js +1 -0
  501. package/dist/tet-components/{p-e17d0862.entry.js → p-f1771c69.entry.js} +1 -1
  502. package/dist/tet-components/{p-4b84438a.entry.js → p-f17a4724.entry.js} +1 -1
  503. package/dist/tet-components/{p-b44083d7.entry.js → p-f63082c7.entry.js} +1 -1
  504. package/dist/tet-components/{p-bd9f9dea.entry.js → p-fada27ab.entry.js} +1 -1
  505. package/dist/tet-components/{p-255cd889.entry.js → p-fbc6cc0a.entry.js} +1 -1
  506. package/dist/tet-components/{p-7e7068af.entry.js → p-fbe053de.entry.js} +1 -1
  507. package/dist/tet-components/{p-6babde37.entry.js → p-fc81fb8e.entry.js} +1 -1
  508. package/dist/tet-components/{p-25e48d9f.entry.js → p-fcbb1ac6.entry.js} +1 -1
  509. package/dist/tet-components/{p-ddce536f.entry.js → p-fd682dea.entry.js} +1 -1
  510. package/dist/tet-components/{p-c4de9e32.entry.js → p-ff5b0f63.entry.js} +1 -1
  511. package/dist/tet-components/tet-components.css +2 -2
  512. package/dist/tet-components/tet-components.esm.js +1 -1
  513. package/dist/types/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.d.ts +169 -0
  514. package/dist/types/components/simple/menu/tet-menu/tet-menu.d.ts +111 -1
  515. package/dist/types/components/simple/menu/tet-menu-mobile/tet-menu-mobile.d.ts +4 -0
  516. package/dist/types/components.d.ts +186 -3
  517. package/dist/types/services/api/services/catalog/product-comparison.d.ts +3 -3
  518. package/package.json +1 -1
  519. package/dist/tet-components/p-1fbb7d96.entry.js +0 -1
  520. package/dist/tet-components/p-b0688983.entry.js +0 -1
  521. package/dist/tet-components/p-cac7dbf9.entry.js +0 -1
  522. package/dist/tet-components/p-d091fa60.entry.js +0 -1
  523. package/dist/tet-components/p-f81d95ae.js +0 -1
@@ -0,0 +1,699 @@
1
+ import { h, Fragment } from "@stencil/core";
2
+ import { productComparison } from "../../../../services/api/index";
3
+ export class TetCompareCardV3 {
4
+ constructor() {
5
+ this.cardType = 'static';
6
+ this.theme = 'light';
7
+ this.bestChoice = false;
8
+ this.language = 'lv';
9
+ this.options = [];
10
+ this.bonuses = [];
11
+ this.benefits = [];
12
+ this.contractTerm = 0;
13
+ this.bestChoiceText = '';
14
+ this.currency = '€/mēn.';
15
+ this.secondaryLink = '';
16
+ this.secondaryLinkText = '';
17
+ this.secondaryLinkOpenBlank = false;
18
+ this.buttonTitle = '';
19
+ this.linkOpenBlank = false;
20
+ this.showLoader = true;
21
+ this.selectedProductCode = '';
22
+ this.selectedSwitchKeys = [];
23
+ this.preselectedKeys = [];
24
+ this.preselectedProductCode = '';
25
+ this.allProductData = {};
26
+ this.preselectedRemountId = 0;
27
+ this.buttonSize = 'large';
28
+ }
29
+ buttonSizeBreakpoint = 1280;
30
+ /**
31
+ * WeakMap to store unique IDs for bonuses.
32
+ */
33
+ bonusWeakMap = new WeakMap();
34
+ /**
35
+ * Counter for unique bonus IDs.
36
+ */
37
+ bonusCounter = 0;
38
+ /**
39
+ * Emitted when the card has loaded.
40
+ */
41
+ cardLoaded;
42
+ /**
43
+ * Emitted when the selected product has changed.
44
+ */
45
+ productChanged;
46
+ /**
47
+ * @param event
48
+ */
49
+ onOptionSelected(event) {
50
+ const productCode = event.detail.value;
51
+ this.selectedProductCode = productCode;
52
+ this.productChanged.emit();
53
+ }
54
+ async componentWillLoad() {
55
+ this.syncButtonSize();
56
+ this.fetchProductComparison();
57
+ switch (this.cardType) {
58
+ case 'dropdown':
59
+ case 'radio': {
60
+ const selectedOption = this.options.find(option => option.preselected) ?? this.options[0];
61
+ if (selectedOption) {
62
+ this.selectedProductCode = selectedOption.productCode;
63
+ this.productChanged.emit();
64
+ }
65
+ break;
66
+ }
67
+ case 'switcher': {
68
+ const preselected = this.options.find(option => option.preselected);
69
+ if (preselected) {
70
+ this.preselectedKeys = [...preselected.keys ?? []];
71
+ this.preselectedProductCode = preselected.productCode;
72
+ this.selectedSwitchKeys = [...preselected.keys ?? []];
73
+ this.selectedProductCode = preselected.productCode;
74
+ this.productChanged.emit();
75
+ }
76
+ break;
77
+ }
78
+ case 'static':
79
+ this.selectedProductCode = this.options.find(option => option.productCode)?.productCode || '';
80
+ this.productChanged.emit();
81
+ break;
82
+ default:
83
+ break;
84
+ }
85
+ }
86
+ onResize() {
87
+ this.syncButtonSize();
88
+ }
89
+ syncButtonSize() {
90
+ if (globalThis.window === undefined) {
91
+ this.buttonSize = 'large';
92
+ return;
93
+ }
94
+ const nextButtonSize = globalThis.window.innerWidth < this.buttonSizeBreakpoint
95
+ ? 'medium'
96
+ : 'large';
97
+ if (this.buttonSize !== nextButtonSize) {
98
+ this.buttonSize = nextButtonSize;
99
+ }
100
+ }
101
+ getSelectionOptions() {
102
+ return this.options.map((option) => ({
103
+ label: option.label || '',
104
+ value: option.productCode || '',
105
+ preselected: option.preselected || false
106
+ }));
107
+ }
108
+ /**
109
+ * Resolves product code by matching an exact toggle-key combination.
110
+ */
111
+ getToggledProductCode(keys) {
112
+ const sortedKeys = [...keys].sort((a, b) => a.localeCompare(b)).join(',');
113
+ const found = this.options.find(option => [...option.keys ?? []].sort((a, b) => a.localeCompare(b)).join(',') === sortedKeys);
114
+ return found ? found.productCode : null;
115
+ }
116
+ /**
117
+ * Handles switch interactions and keeps selection in a valid state.
118
+ */
119
+ handleSwitchToggle(key, checked) {
120
+ const benefit = this.benefits.find(benefit => benefit.toggleKey === key);
121
+ let activeKeys = [...this.selectedSwitchKeys];
122
+ if (checked) {
123
+ if (benefit?.selectAll) {
124
+ const fullCombo = this.getFullComboToggleOption();
125
+ if (fullCombo) {
126
+ this.selectedSwitchKeys = [...fullCombo.keys ?? []];
127
+ this.selectedProductCode = fullCombo.productCode;
128
+ this.productChanged.emit();
129
+ return;
130
+ }
131
+ }
132
+ if (!activeKeys.includes(key))
133
+ activeKeys.push(key);
134
+ }
135
+ else {
136
+ const newActiveKeys = activeKeys.filter(k => k !== key);
137
+ if (newActiveKeys.length === 0) {
138
+ this.selectedSwitchKeys = [...this.preselectedKeys];
139
+ this.selectedProductCode = this.preselectedProductCode;
140
+ this.preselectedRemountId++;
141
+ this.productChanged.emit();
142
+ return;
143
+ }
144
+ const validProductCode = this.getToggledProductCode(newActiveKeys);
145
+ if (validProductCode) {
146
+ this.selectedSwitchKeys = newActiveKeys;
147
+ this.selectedProductCode = validProductCode;
148
+ this.productChanged.emit();
149
+ return;
150
+ }
151
+ this.selectedSwitchKeys = [...this.preselectedKeys];
152
+ this.selectedProductCode = this.preselectedProductCode;
153
+ this.preselectedRemountId++;
154
+ this.productChanged.emit();
155
+ return;
156
+ }
157
+ activeKeys = activeKeys.sort((a, b) => a.localeCompare(b));
158
+ const productCode = this.getToggledProductCode(activeKeys);
159
+ this.selectedSwitchKeys = activeKeys;
160
+ if (productCode) {
161
+ this.selectedProductCode = productCode;
162
+ this.productChanged.emit();
163
+ }
164
+ else {
165
+ this.selectedProductCode = this.preselectedProductCode;
166
+ this.selectedSwitchKeys = [...this.preselectedKeys];
167
+ this.preselectedRemountId++;
168
+ this.productChanged.emit();
169
+ }
170
+ }
171
+ /**
172
+ * Returns option with the most keys (used by select-all switch behavior).
173
+ */
174
+ getFullComboToggleOption() {
175
+ if (!this.options.length) {
176
+ return null;
177
+ }
178
+ return this.options.reduce((max, curr) => (curr.keys ?? []).length > (max.keys ?? []).length ? curr : max, this.options[0]);
179
+ }
180
+ async fetchProductComparison() {
181
+ const productCodes = this.options.map(option => option.productCode).filter(Boolean);
182
+ if (productCodes.length) {
183
+ try {
184
+ const response = await productComparison(productCodes.join(','));
185
+ this.allProductData = response['products'] || {};
186
+ }
187
+ catch (e) {
188
+ this.allProductData = {};
189
+ console.error(e);
190
+ }
191
+ }
192
+ else {
193
+ this.allProductData = {};
194
+ }
195
+ this.showLoader = false;
196
+ this.cardLoaded.emit();
197
+ }
198
+ /**
199
+ * Returns contract term data matching current `contractTerm` prop.
200
+ */
201
+ selectedContractTerm() {
202
+ const contractTerms = this.allProductData[this.selectedProductCode]?.contractTerms;
203
+ if (!contractTerms?.length) {
204
+ return;
205
+ }
206
+ return contractTerms.find((contractTerm) => contractTerm.term === this.contractTerm);
207
+ }
208
+ currentBonuses() {
209
+ const option = this.options.find(option => option.productCode === this.selectedProductCode);
210
+ return option?.bonuses ?? [];
211
+ }
212
+ allBonuses() {
213
+ return this.options.flatMap(option => option.bonuses || []);
214
+ }
215
+ /**
216
+ * Returns a stable ID for each bonus object across renders.
217
+ */
218
+ getUniqueBonusId(bonus) {
219
+ const existingId = this.bonusWeakMap.get(bonus);
220
+ if (existingId) {
221
+ return existingId;
222
+ }
223
+ const nextId = `bonus-${this.bonusCounter++}`;
224
+ this.bonusWeakMap.set(bonus, nextId);
225
+ return nextId;
226
+ }
227
+ /**
228
+ * Chooses semantic element tag from provided data attributes.
229
+ */
230
+ getElementTag(attributes) {
231
+ if (attributes?.href?.trim()) {
232
+ return 'a';
233
+ }
234
+ const modalKey = attributes?.['data-modal-screen-key']?.trim();
235
+ const role = attributes?.role?.trim().toLowerCase();
236
+ if (modalKey || role === 'button') {
237
+ return 'button';
238
+ }
239
+ return 'div';
240
+ }
241
+ renderBenefit(benefit) {
242
+ const attributes = Array.isArray(benefit.dataAttributes) ? undefined : benefit.dataAttributes;
243
+ const isInteractive = Boolean(attributes && Object.keys(attributes).length > 0);
244
+ const ElementTag = this.getElementTag(attributes);
245
+ const hasTitle = !!benefit.title;
246
+ const hasBenefit = !!benefit.icon && !!benefit.name;
247
+ return (h(Fragment, null, hasTitle && (h("div", { class: "benefits__title" }, benefit.title)), hasBenefit && (h(ElementTag, { class: {
248
+ 'benefit': true,
249
+ 'benefit--interactive': isInteractive,
250
+ }, key: benefit.toggleKey, ...(attributes || {}) }, h("tet-icon", { theme: this.theme, class: "benefit__icon", name: benefit.icon }), h("span", { class: "benefit__text" }, benefit.name), isInteractive && (h("div", { class: "benefit__chevron-icon-container" }, h("tet-icon", { class: "benefit__icon benefit__icon--chevron", name: "tc-chevron-right-small" })))))));
251
+ }
252
+ renderSwitch(benefit) {
253
+ const { toggleKey } = benefit;
254
+ if (!toggleKey) {
255
+ return null;
256
+ }
257
+ const isPreselected = this.preselectedKeys.includes(toggleKey);
258
+ const switchKey = isPreselected
259
+ ? `${toggleKey}-${this.preselectedRemountId}`
260
+ : toggleKey;
261
+ const hasTitle = !!benefit.title;
262
+ return (h(Fragment, null, hasTitle && (h("div", { class: "benefits__title" }, benefit.title)), h("div", { class: "switch-wrapper" }, h("tet-switch", { class: "switch", theme: this.theme, key: switchKey, name: toggleKey, checked: this.selectedSwitchKeys.includes(toggleKey), onCheck: (e) => this.handleSwitchToggle(toggleKey, e.detail.checked), labelPosition: "left", focusStyleOnContainer: true }, h("div", { class: "switch-label" }, h("tet-icon", { theme: this.theme, class: "benefit__icon", name: benefit.icon }), benefit.name)))));
263
+ }
264
+ /**
265
+ * Renders bonuses and marks bonuses outside current product as inactive.
266
+ */
267
+ renderBonuses() {
268
+ const currentBonusIds = new Set(this.currentBonuses().map(this.getUniqueBonusId.bind(this)));
269
+ const allBonuses = this.allBonuses();
270
+ const bonusTitle = this.options.find(option => option.productCode === this.selectedProductCode)?.bonusTitle;
271
+ if (allBonuses.length < 1) {
272
+ return null;
273
+ }
274
+ return (h("div", { class: "bonuses" }, !!bonusTitle && (h("div", { class: "bonuses__title" }, bonusTitle)), h("div", { class: "bonuses__bonus-container" }, allBonuses.map((bonus) => {
275
+ const id = this.getUniqueBonusId(bonus);
276
+ const isActive = currentBonusIds.has(id);
277
+ const attributes = Array.isArray(bonus.dataAttributes) ? undefined : bonus.dataAttributes;
278
+ const isInteractive = Boolean(attributes && Object.keys(attributes).length > 0);
279
+ const ElementTag = this.getElementTag(attributes);
280
+ return (h(ElementTag, { key: id, type: isInteractive ? 'button' : undefined, class: {
281
+ 'bonus': true,
282
+ 'bonus--inactive': !isActive,
283
+ 'bonus--interactive': isInteractive,
284
+ }, ...(attributes || {}) }, h("tet-icon", { theme: this.theme, class: "bonus__icon", name: bonus.iconName }), h("span", { class: "bonus__text" }, bonus.name), isInteractive && (h("div", { class: "bonus__chevron-icon-container" }, h("tet-icon", { class: "bonus__icon bonus__icon--chevron", name: "tc-chevron-right-small" })))));
285
+ }))));
286
+ }
287
+ renderRadioOptions() {
288
+ const selectionOptions = this.getSelectionOptions();
289
+ return (h("div", { class: "radio-container" }, selectionOptions.map((option) => (h("div", { class: "radio-wrapper" }, h("tet-radio", { class: "radio", theme: this.theme, name: "radio-card-options", label: option.label, value: option.value, checked: this.selectedProductCode === option.value, focusStyleOnContainer: true, onCheck: (event) => this.onOptionSelected(event) }))))));
290
+ }
291
+ renderPrice(price, parsedPrice, priceDescription) {
292
+ if (!price || Number.isNaN(parsedPrice)) {
293
+ return null;
294
+ }
295
+ return (h("div", { class: "price-wrapper" }, h("div", { class: "price-container" }, h("div", { class: "price-container__price translation-none" }, parsedPrice.toFixed(2).replace('.', ',')), h("div", { class: "price-container__currency" }, h("span", null, this.currency))), priceDescription && h("span", { class: "price-container__description" }, priceDescription)));
296
+ }
297
+ renderBenefitsSection() {
298
+ const selectionOptions = this.getSelectionOptions();
299
+ if (this.cardType === 'switcher') {
300
+ return (h("div", { class: "benefits" }, h("div", null, this.benefits.map((benefit) => this.renderSwitch(benefit)))));
301
+ }
302
+ const renderedBenefits = this.benefits.map((benefit) => this.renderBenefit(benefit));
303
+ return (h("div", { class: "benefits" }, h("div", { class: "benefits__benefit-container" }, renderedBenefits, this.cardType === 'dropdown' && (h("tet-dropdown", { id: "dropdown", class: "dropdown", theme: this.theme, "button-label": "", "close-on-selection": "true", "flex-layout": "true", options: selectionOptions })), this.cardType === 'radio' && this.renderRadioOptions())));
304
+ }
305
+ /**
306
+ * Renders the card body.
307
+ * @returns rendered card body.
308
+ */
309
+ renderCard() {
310
+ const comparisonData = this.allProductData[this.selectedProductCode];
311
+ const contractTermData = this.selectedContractTerm();
312
+ const overrideProductName = comparisonData?.attributes?.find(attr => attr.key === 'overrideProductName')?.value;
313
+ const mainTitle = overrideProductName ?? comparisonData?.name?.[this.language];
314
+ const price = contractTermData?.amount.toString() ?? '';
315
+ const parsedPrice = Number.parseFloat(price.replace(',', '.'));
316
+ const promotionCode = contractTermData?.promotionCode ?? '';
317
+ const term = contractTermData?.term ?? '';
318
+ const priceDescription = contractTermData?.priceDescription?.[this.language] ?? '';
319
+ const secondaryLink = this.secondaryLink || contractTermData?.contract || '';
320
+ const shouldRenderSecondaryLink = !!secondaryLink && !!this.secondaryLinkText;
321
+ const secondaryLinkTarget = this.secondaryLinkOpenBlank ? '_blank' : undefined;
322
+ const secondaryLinkRel = this.secondaryLinkOpenBlank ? 'noopener noreferrer' : undefined;
323
+ const baseUrl = comparisonData?.formUrl?.[this.language] || '';
324
+ const params = new URLSearchParams({
325
+ contractTerm: term?.toString() ?? '',
326
+ product: this.selectedProductCode,
327
+ promotion: promotionCode ?? '',
328
+ lang: this.language ?? '',
329
+ from: 'tet.lv'
330
+ });
331
+ const link = `${baseUrl}${baseUrl.includes('?') ? '&' : '?'}${params.toString()}`;
332
+ const isBestChoice = !!this.options.find(option => option.productCode === this.selectedProductCode)?.bestChoice;
333
+ return (h("div", { class: { 'card': true, 'best-choice': isBestChoice } }, this.bestChoiceText && (h("div", { class: { 'best-choice-title': true, 'active': isBestChoice } }, this.bestChoiceText)), h("div", { class: "content content__top" }, mainTitle && h("h3", { class: "title" }, mainTitle), this.renderPrice(price, parsedPrice, priceDescription), h("tet-button", { class: "button", type: "primary", theme: "light", size: this.buttonSize, url: link, urlTarget: this.linkOpenBlank ? '_blank' : '_self' }, this.buttonTitle), shouldRenderSecondaryLink && (h("div", { class: "secondary-link" }, h("a", { class: "tet-link", href: secondaryLink, target: secondaryLinkTarget, rel: secondaryLinkRel }, this.secondaryLinkText)))), h("div", { class: "content content__bottom" }, this.renderBonuses(), this.renderBenefitsSection())));
334
+ }
335
+ /**
336
+ * Renders the loader.
337
+ */
338
+ renderLoader() {
339
+ return (h("tet-placeholder", { class: "card__placeholder", height: "37rem", width: "100%", darkTheme: this.theme === 'dark' }));
340
+ }
341
+ render() {
342
+ if (this.showLoader) {
343
+ return this.renderLoader();
344
+ }
345
+ return this.renderCard();
346
+ }
347
+ static get is() { return "tet-compare-card-v3"; }
348
+ static get encapsulation() { return "shadow"; }
349
+ static get originalStyleUrls() {
350
+ return {
351
+ "$": ["tet-compare-card-v3.scss"]
352
+ };
353
+ }
354
+ static get styleUrls() {
355
+ return {
356
+ "$": ["tet-compare-card-v3.css"]
357
+ };
358
+ }
359
+ static get properties() {
360
+ return {
361
+ "cardType": {
362
+ "type": "string",
363
+ "mutable": false,
364
+ "complexType": {
365
+ "original": "'dropdown' | 'switcher' | 'static' | 'radio'",
366
+ "resolved": "\"dropdown\" | \"radio\" | \"static\" | \"switcher\"",
367
+ "references": {}
368
+ },
369
+ "required": false,
370
+ "optional": false,
371
+ "docs": {
372
+ "tags": [],
373
+ "text": "The size of the button."
374
+ },
375
+ "attribute": "card-type",
376
+ "reflect": false,
377
+ "defaultValue": "'static'"
378
+ },
379
+ "theme": {
380
+ "type": "string",
381
+ "mutable": false,
382
+ "complexType": {
383
+ "original": "'light' | 'dark'",
384
+ "resolved": "\"dark\" | \"light\"",
385
+ "references": {}
386
+ },
387
+ "required": false,
388
+ "optional": false,
389
+ "docs": {
390
+ "tags": [],
391
+ "text": "The theme of the card."
392
+ },
393
+ "attribute": "theme",
394
+ "reflect": false,
395
+ "defaultValue": "'light'"
396
+ },
397
+ "bestChoice": {
398
+ "type": "boolean",
399
+ "mutable": false,
400
+ "complexType": {
401
+ "original": "boolean",
402
+ "resolved": "boolean",
403
+ "references": {}
404
+ },
405
+ "required": false,
406
+ "optional": false,
407
+ "docs": {
408
+ "tags": [],
409
+ "text": "The disabled state of the bestChoice card."
410
+ },
411
+ "attribute": "best-choice",
412
+ "reflect": false,
413
+ "defaultValue": "false"
414
+ },
415
+ "language": {
416
+ "type": "string",
417
+ "mutable": false,
418
+ "complexType": {
419
+ "original": "string",
420
+ "resolved": "string",
421
+ "references": {}
422
+ },
423
+ "required": false,
424
+ "optional": false,
425
+ "docs": {
426
+ "tags": [],
427
+ "text": "The language of the component."
428
+ },
429
+ "attribute": "language",
430
+ "reflect": false,
431
+ "defaultValue": "'lv'"
432
+ },
433
+ "options": {
434
+ "type": "unknown",
435
+ "mutable": false,
436
+ "complexType": {
437
+ "original": "CompareCardInterfaceV3[]",
438
+ "resolved": "CompareCardInterfaceV3[]",
439
+ "references": {
440
+ "CompareCardInterfaceV3": {
441
+ "location": "local",
442
+ "path": "/__w/internal-tet-web-components-tet-components/internal-tet-web-components-tet-components/src/src/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.tsx",
443
+ "id": "src/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.tsx::CompareCardInterfaceV3"
444
+ }
445
+ }
446
+ },
447
+ "required": false,
448
+ "optional": false,
449
+ "docs": {
450
+ "tags": [],
451
+ "text": "Product variants available in this card.\nUsed as the source for dropdown/radio/switcher selection and to resolve\nthe active variant data (productCode, keys, labels, bonuses, etc.)."
452
+ },
453
+ "defaultValue": "[]"
454
+ },
455
+ "bonuses": {
456
+ "type": "unknown",
457
+ "mutable": false,
458
+ "complexType": {
459
+ "original": "string[]",
460
+ "resolved": "string[]",
461
+ "references": {}
462
+ },
463
+ "required": false,
464
+ "optional": false,
465
+ "docs": {
466
+ "tags": [],
467
+ "text": "Additional bonuses shown on the card.\nBonuses are product-specific."
468
+ },
469
+ "defaultValue": "[]"
470
+ },
471
+ "benefits": {
472
+ "type": "unknown",
473
+ "mutable": false,
474
+ "complexType": {
475
+ "original": "BenefitInterfaceV3[]",
476
+ "resolved": "BenefitInterfaceV3[]",
477
+ "references": {
478
+ "BenefitInterfaceV3": {
479
+ "location": "local",
480
+ "path": "/__w/internal-tet-web-components-tet-components/internal-tet-web-components-tet-components/src/src/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.tsx",
481
+ "id": "src/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.tsx::BenefitInterfaceV3"
482
+ }
483
+ }
484
+ },
485
+ "required": false,
486
+ "optional": false,
487
+ "docs": {
488
+ "tags": [],
489
+ "text": "Additional benefits shown on the card.\nBenefits are shared across all products."
490
+ },
491
+ "defaultValue": "[]"
492
+ },
493
+ "contractTerm": {
494
+ "type": "number",
495
+ "mutable": false,
496
+ "complexType": {
497
+ "original": "number",
498
+ "resolved": "number",
499
+ "references": {}
500
+ },
501
+ "required": false,
502
+ "optional": false,
503
+ "docs": {
504
+ "tags": [],
505
+ "text": "This prop defines selected contract term for the card."
506
+ },
507
+ "attribute": "contract-term",
508
+ "reflect": false,
509
+ "defaultValue": "0"
510
+ },
511
+ "bestChoiceText": {
512
+ "type": "string",
513
+ "mutable": false,
514
+ "complexType": {
515
+ "original": "string",
516
+ "resolved": "string",
517
+ "references": {}
518
+ },
519
+ "required": false,
520
+ "optional": false,
521
+ "docs": {
522
+ "tags": [],
523
+ "text": "This prop defines best choice text for the card."
524
+ },
525
+ "attribute": "best-choice-text",
526
+ "reflect": false,
527
+ "defaultValue": "''"
528
+ },
529
+ "currency": {
530
+ "type": "string",
531
+ "mutable": false,
532
+ "complexType": {
533
+ "original": "string",
534
+ "resolved": "string",
535
+ "references": {}
536
+ },
537
+ "required": false,
538
+ "optional": false,
539
+ "docs": {
540
+ "tags": [],
541
+ "text": "This prop defines currency for the card."
542
+ },
543
+ "attribute": "currency",
544
+ "reflect": false,
545
+ "defaultValue": "'\u20AC/m\u0113n.'"
546
+ },
547
+ "secondaryLink": {
548
+ "type": "string",
549
+ "mutable": false,
550
+ "complexType": {
551
+ "original": "string",
552
+ "resolved": "string",
553
+ "references": {}
554
+ },
555
+ "required": false,
556
+ "optional": false,
557
+ "docs": {
558
+ "tags": [],
559
+ "text": "This prop defines secondary link for the card."
560
+ },
561
+ "attribute": "secondary-link",
562
+ "reflect": false,
563
+ "defaultValue": "''"
564
+ },
565
+ "secondaryLinkText": {
566
+ "type": "string",
567
+ "mutable": false,
568
+ "complexType": {
569
+ "original": "string",
570
+ "resolved": "string",
571
+ "references": {}
572
+ },
573
+ "required": false,
574
+ "optional": false,
575
+ "docs": {
576
+ "tags": [],
577
+ "text": "This prop defines secondary link text for the card."
578
+ },
579
+ "attribute": "secondary-link-text",
580
+ "reflect": false,
581
+ "defaultValue": "''"
582
+ },
583
+ "secondaryLinkOpenBlank": {
584
+ "type": "boolean",
585
+ "mutable": false,
586
+ "complexType": {
587
+ "original": "boolean",
588
+ "resolved": "boolean",
589
+ "references": {}
590
+ },
591
+ "required": false,
592
+ "optional": false,
593
+ "docs": {
594
+ "tags": [],
595
+ "text": "This prop defines whether the secondary link opens in a new tab."
596
+ },
597
+ "attribute": "secondary-link-open-blank",
598
+ "reflect": false,
599
+ "defaultValue": "false"
600
+ },
601
+ "buttonTitle": {
602
+ "type": "string",
603
+ "mutable": false,
604
+ "complexType": {
605
+ "original": "string",
606
+ "resolved": "string",
607
+ "references": {}
608
+ },
609
+ "required": false,
610
+ "optional": false,
611
+ "docs": {
612
+ "tags": [],
613
+ "text": "This prop defines button title for the card."
614
+ },
615
+ "attribute": "button-title",
616
+ "reflect": false,
617
+ "defaultValue": "''"
618
+ },
619
+ "linkOpenBlank": {
620
+ "type": "boolean",
621
+ "mutable": false,
622
+ "complexType": {
623
+ "original": "boolean",
624
+ "resolved": "boolean",
625
+ "references": {}
626
+ },
627
+ "required": false,
628
+ "optional": false,
629
+ "docs": {
630
+ "tags": [],
631
+ "text": "This prop defines whether the main link (button) opens in a new tab."
632
+ },
633
+ "attribute": "link-open-blank",
634
+ "reflect": false,
635
+ "defaultValue": "false"
636
+ }
637
+ };
638
+ }
639
+ static get states() {
640
+ return {
641
+ "showLoader": {},
642
+ "selectedProductCode": {},
643
+ "selectedSwitchKeys": {},
644
+ "preselectedKeys": {},
645
+ "preselectedProductCode": {},
646
+ "allProductData": {},
647
+ "preselectedRemountId": {},
648
+ "buttonSize": {}
649
+ };
650
+ }
651
+ static get events() {
652
+ return [{
653
+ "method": "cardLoaded",
654
+ "name": "cardLoaded",
655
+ "bubbles": true,
656
+ "cancelable": true,
657
+ "composed": true,
658
+ "docs": {
659
+ "tags": [],
660
+ "text": "Emitted when the card has loaded."
661
+ },
662
+ "complexType": {
663
+ "original": "void",
664
+ "resolved": "void",
665
+ "references": {}
666
+ }
667
+ }, {
668
+ "method": "productChanged",
669
+ "name": "productChanged",
670
+ "bubbles": true,
671
+ "cancelable": true,
672
+ "composed": true,
673
+ "docs": {
674
+ "tags": [],
675
+ "text": "Emitted when the selected product has changed."
676
+ },
677
+ "complexType": {
678
+ "original": "void",
679
+ "resolved": "void",
680
+ "references": {}
681
+ }
682
+ }];
683
+ }
684
+ static get listeners() {
685
+ return [{
686
+ "name": "optionSelected",
687
+ "method": "onOptionSelected",
688
+ "target": undefined,
689
+ "capture": false,
690
+ "passive": false
691
+ }, {
692
+ "name": "resize",
693
+ "method": "onResize",
694
+ "target": "window",
695
+ "capture": false,
696
+ "passive": true
697
+ }];
698
+ }
699
+ }