@tet/tet-components 1.3.157-testing → 1.4.0-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.
- package/dist/cjs/{address-5271d3aa.js → address-b695d769.js} +1 -1
- package/dist/cjs/{assets-e3bb045c.js → assets-39f8cd2c.js} +1 -1
- package/dist/cjs/{async-request-29b32d63.js → async-request-77d8e0b8.js} +27 -26
- package/dist/cjs/compare-cards-tab-products-filters-10b06fe0.js +100 -0
- package/dist/cjs/{http-codes-2f72a8b2.js → http-codes-38914116.js} +25 -19
- package/dist/cjs/{index-f559cb2e.js → index-28359ea5.js} +1672 -1598
- package/dist/cjs/{index-84ede372.js → index-bf7cfd19.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{phone-d414fe5a.js → phone-ed64bd26.js} +8 -6
- package/dist/cjs/{product-comparison-f784fb1b.js → product-comparison-ae2ccae4.js} +1 -1
- package/dist/cjs/{tasks-af99ad61.js → tasks-57ad40ae.js} +2 -2
- package/dist/cjs/tet-accordion_2.cjs.entry.js +62 -46
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +249 -232
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +43 -35
- package/dist/cjs/tet-address-offers_4.cjs.entry.js +343 -313
- package/dist/cjs/tet-address-search.cjs.entry.js +175 -167
- package/dist/cjs/tet-asset-addresses.cjs.entry.js +106 -95
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +40 -30
- package/dist/cjs/tet-autocomplete.cjs.entry.js +203 -190
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +280 -241
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +396 -378
- package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +28 -28
- package/dist/cjs/tet-banner-nav.cjs.entry.js +23 -11
- package/dist/cjs/tet-bar-graph.cjs.entry.js +222 -215
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-card.cjs.entry.js +38 -32
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +18 -11
- package/dist/cjs/tet-business-lines.cjs.entry.js +25 -26
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +10 -10
- package/dist/cjs/tet-button.cjs.entry.js +9 -9
- package/dist/cjs/tet-card-list.cjs.entry.js +557 -530
- package/dist/cjs/tet-carousel.cjs.entry.js +180 -184
- package/dist/cjs/tet-checkbox.cjs.entry.js +15 -11
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +30 -4
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +132 -124
- package/dist/cjs/tet-colors.cjs.entry.js +42 -42
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +51 -49
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +29 -28
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +41 -34
- package/dist/cjs/tet-components.cjs.js +3 -3
- package/dist/cjs/tet-contact-form.cjs.entry.js +55 -46
- package/dist/cjs/tet-contact-info.cjs.entry.js +1 -1
- package/dist/cjs/tet-container_2.cjs.entry.js +62 -58
- package/dist/cjs/tet-customer-assets.cjs.entry.js +90 -85
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +202 -187
- package/dist/cjs/tet-datepicker.cjs.entry.js +35 -30
- package/dist/cjs/tet-dialog.cjs.entry.js +41 -35
- package/dist/cjs/tet-dropdown_2.cjs.entry.js +137 -115
- package/dist/cjs/tet-dynamic-card.cjs.entry.js +68 -71
- package/dist/cjs/tet-expandable-input.cjs.entry.js +97 -80
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +17 -19
- package/dist/cjs/tet-filter.cjs.entry.js +26 -11
- package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
- package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
- package/dist/cjs/tet-grid.cjs.entry.js +1 -1
- package/dist/cjs/tet-icon.cjs.entry.js +25 -24
- package/dist/cjs/tet-inline-message.cjs.entry.js +7 -7
- package/dist/cjs/tet-input.cjs.entry.js +47 -37
- package/dist/cjs/tet-label.cjs.entry.js +3 -3
- package/dist/cjs/tet-layout.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +1 -1
- package/dist/cjs/tet-loader.cjs.entry.js +1 -1
- package/dist/cjs/tet-macd-view.cjs.entry.js +50 -23
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +13 -14
- package/dist/cjs/tet-menu.cjs.entry.js +4 -5
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +86 -72
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +19 -15
- package/dist/cjs/tet-news-card-list.cjs.entry.js +35 -36
- package/dist/cjs/tet-number-input.cjs.entry.js +56 -42
- package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/tet-price-view.cjs.entry.js +4 -4
- package/dist/cjs/tet-radio.cjs.entry.js +11 -7
- package/dist/cjs/tet-range-slider.cjs.entry.js +632 -620
- package/dist/cjs/tet-referral.cjs.entry.js +30 -26
- package/dist/cjs/tet-round-stepper.cjs.entry.js +2 -2
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-spinner.cjs.entry.js +16 -16
- package/dist/cjs/tet-stepper-input.cjs.entry.js +32 -26
- package/dist/cjs/tet-stepper-v2.cjs.entry.js +28 -29
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +20 -21
- package/dist/cjs/tet-stepper.cjs.entry.js +62 -63
- package/dist/cjs/tet-switch.cjs.entry.js +4 -2
- package/dist/cjs/tet-tab-header.cjs.entry.js +68 -65
- package/dist/cjs/tet-table.cjs.entry.js +132 -138
- package/dist/cjs/tet-tag_2.cjs.entry.js +11 -11
- package/dist/cjs/tet-text-list.cjs.entry.js +12 -4
- package/dist/cjs/tet-textarea.cjs.entry.js +14 -14
- package/dist/cjs/tet-thank-you-view-v2.cjs.entry.js +36 -33
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +36 -33
- package/dist/cjs/tet-thank-you-view.cjs.entry.js +52 -46
- package/dist/cjs/tet-tv-gift-block.cjs.entry.js +15 -15
- package/dist/cjs/tet-tv-gift-list.cjs.entry.js +15 -15
- package/dist/cjs/{theme-wrapper-a5bbadf6.js → theme-wrapper-6ae60d67.js} +2 -2
- package/dist/cjs/{translations-ed68775f.js → translations-2637e1f9.js} +52 -51
- package/dist/cjs/{utils-ac9be2ff.js → utils-1f67c4b7.js} +23 -8
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/advanced/address/tet-address-offers/tet-address-offers.js +108 -101
- package/dist/collection/components/advanced/address/tet-address-offers-filters/address-offers-filters.js +128 -129
- package/dist/collection/components/advanced/address/tet-address-offers-filters/tet-address-offers-filters.js +17 -17
- package/dist/collection/components/advanced/address/tet-address-offers-filters-products/address-offers-products-filters.js +90 -89
- package/dist/collection/components/advanced/address/tet-address-offers-filters-products/tet-address-offers-filters-products.js +33 -19
- package/dist/collection/components/advanced/address/tet-address-search/tet-address-search.js +171 -163
- package/dist/collection/components/advanced/address/tet-autocomplete/tet-autocomplete.js +203 -206
- package/dist/collection/components/advanced/address/tet-autocomplete-dropdown/tet-autocomplete-dropdown.js +39 -29
- package/dist/collection/components/advanced/cards/tet-b2b-compare-card/tet-b2b-compare-card.js +75 -62
- package/dist/collection/components/advanced/cards/tet-business-card/tet-business-card.js +40 -30
- package/dist/collection/components/advanced/cards/tet-business-compare-card/tet-business-compare-card.js +17 -10
- package/dist/collection/components/advanced/cards/tet-business-summary-card/tet-business-summary-card.js +38 -32
- package/dist/collection/components/advanced/cards/tet-card-list/tet-card-list.js +356 -337
- package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.js +125 -119
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.js +51 -45
- package/dist/collection/components/advanced/cards/tet-compare-cards/tet-compare-cards.js +21 -15
- package/dist/collection/components/advanced/cards/tet-compare-cards-tab/compare-cards-tab-products-filters.js +89 -88
- package/dist/collection/components/advanced/cards/tet-compare-cards-tab/tet-compare-cards-tab.js +25 -22
- package/dist/collection/components/advanced/cards/tet-dynamic-card/tet-dynamic-card.js +67 -70
- package/dist/collection/components/advanced/cards/utils.js +23 -8
- package/dist/collection/components/advanced/customer/tet-asset-addresses/tet-asset-addresses.js +103 -92
- package/dist/collection/components/advanced/customer/tet-asset-availability-addresses/tet-asset-availability-addresses.js +29 -14
- package/dist/collection/components/advanced/customer/tet-customer-assets/tet-customer-assets.js +87 -82
- package/dist/collection/components/advanced/customer/tet-referral/tet-referral.js +24 -19
- package/dist/collection/components/advanced/dialog/tet-multi-step-dialog/tet-multi-step-dialog.js +83 -69
- package/dist/collection/components/advanced/forms/tet-availability-contact-form/tet-availability-contact-form.js +54 -43
- package/dist/collection/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.js +11 -3
- package/dist/collection/components/advanced/forms/tet-contact-form/tet-contact-form.js +49 -40
- package/dist/collection/components/advanced/promotions/tv-gift/tet-tv-gift-block/tet-tv-gift-block.js +14 -13
- package/dist/collection/components/advanced/promotions/tv-gift/tet-tv-gift-list/tet-tv-gift-list.js +15 -13
- package/dist/collection/components/basic/buttons/tet-button/tet-button.js +8 -8
- package/dist/collection/components/basic/buttons/tet-checkbox/tet-checkbox.js +14 -10
- package/dist/collection/components/basic/buttons/tet-radio/tet-radio.js +10 -6
- package/dist/collection/components/basic/buttons/tet-switch/tet-switch.js +3 -1
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-content/tet-tab-content.js +17 -13
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-header/tet-tab-header.js +67 -63
- package/dist/collection/components/basic/buttons/tet-tag-group/tet-tag-group.js +8 -8
- package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.js +177 -181
- package/dist/collection/components/basic/icon/tet-icon.js +23 -22
- package/dist/collection/components/basic/loaders/tet-spinner/tet-spinner.js +15 -14
- package/dist/collection/components/basic/steppers/tet-banner-nav/tet-banner-nav.js +20 -8
- package/dist/collection/components/basic/steppers/tet-business-round-stepper/tet-business-round-stepper.js +9 -9
- package/dist/collection/components/basic/steppers/tet-round-stepper/tet-round-stepper.js +4 -0
- package/dist/collection/components/basic/steppers/tet-stepper/tet-stepper.js +61 -62
- package/dist/collection/components/basic/steppers/tet-stepper-v2/tet-stepper-v2.js +27 -28
- package/dist/collection/components/basic/steppers/tet-stepper-v3/tet-stepper-v3.js +19 -20
- package/dist/collection/components/simple/filter/tet-filter/tet-filter.js +25 -10
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.js +20 -16
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.js +135 -132
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.js +20 -17
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.js +26 -21
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.js +34 -28
- package/dist/collection/components/simple/inputs/tet-dropdown/tet-dropdown.js +20 -8
- package/dist/collection/components/simple/inputs/tet-expandable-input/tet-expandable-input.js +99 -78
- package/dist/collection/components/simple/inputs/tet-input/tet-input.js +44 -34
- package/dist/collection/components/simple/inputs/tet-number-input/tet-number-input.js +55 -41
- package/dist/collection/components/simple/inputs/tet-range-slider/tet-range-slider.js +631 -618
- package/dist/collection/components/simple/inputs/tet-stepper-input/tet-stepper-input.js +29 -23
- package/dist/collection/components/simple/inputs/tet-textarea/tet-textarea.js +13 -13
- package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.js +37 -34
- package/dist/collection/components/simple/lists/tet-selection-list/tet-selection-list.js +61 -57
- package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.js +14 -2
- package/dist/collection/components/simple/menu/tet-business-navigation/tet-business-navigation.js +48 -45
- package/dist/collection/components/simple/menu/tet-menu/tet-menu.js +3 -4
- package/dist/collection/components/simple/menu/tet-menu-mobile/tet-menu-mobile.js +15 -12
- package/dist/collection/components/simple/menu/tet-navigation-mobile/tet-navigation-mobile.js +18 -14
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.js +37 -20
- package/dist/collection/components/simple/structural/tet-expansion-panel/tet-expansion-panel.js +16 -17
- package/dist/collection/components/simple/tables-and-graphs/tet-bar-graph/tet-bar-graph.js +222 -213
- package/dist/collection/components/simple/tables-and-graphs/tet-table/tet-table.js +132 -136
- package/dist/collection/components/simple/text-blocks/tet-cloud-application-form-dialog/tet-cloud-application-form-dialog.js +27 -1
- package/dist/collection/components/simple/text-blocks/tet-dialog/tet-dialog.js +39 -31
- package/dist/collection/components/simple/text-blocks/tet-inline-message/tet-inline-message.js +6 -6
- package/dist/collection/components/simple/text-blocks/tet-notification/tet-notification.js +27 -23
- package/dist/collection/components/simple/text-blocks/tet-tooltip/tet-tooltip.js +119 -105
- package/dist/collection/components/views/tet-address-offers-view/tet-address-offers-view.js +40 -32
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/tet-b2b-configurator-cart.js +99 -88
- package/dist/collection/components/views/tet-b2b-configurator/tet-b2b-configurator.js +392 -373
- package/dist/collection/components/views/tet-b2b-service-calculator/tet-b2b-service-calculator.js +25 -25
- package/dist/collection/components/views/tet-business-lines/tet-business-lines.js +21 -22
- package/dist/collection/components/views/tet-cloud-configurator/tet-cloud-configurator.js +130 -120
- package/dist/collection/components/views/tet-macd-view/tet-macd-view.js +42 -13
- package/dist/collection/components/views/tet-price-view/tet-price-view.js +4 -2
- package/dist/collection/components/views/tet-thank-you-view/tet-thank-you-view.js +52 -44
- package/dist/collection/components/views/tet-thank-you-view-v2/tet-thank-you-view-v2.js +34 -29
- package/dist/collection/components/views/tet-thank-you-view-v3/tet-thank-you-view-v3.js +34 -29
- package/dist/collection/config/bradcasting.js +1 -2
- package/dist/collection/config/endpoints.js +7 -5
- package/dist/collection/config/forms-portal.js +1 -2
- package/dist/collection/config/landing-pages.js +1 -2
- package/dist/collection/config/mytet-portal.js +1 -2
- package/dist/collection/docs/styling/colors/tet-colors.js +41 -41
- package/dist/collection/services/api/async-request.js +26 -25
- package/dist/collection/services/api/request.js +16 -11
- package/dist/collection/services/api/services/tv/tv-channel-count-parser.js +73 -74
- package/dist/collection/services/translations/translations-manager.js +46 -47
- package/dist/collection/services/translations/translations.js +1 -2
- package/dist/collection/services/translations/translations.store.js +2 -3
- package/dist/collection/services/utils/inertia-scroll.js +203 -191
- package/dist/collection/services/utils/object.js +5 -3
- package/dist/collection/services/validators/validators/e-mail.js +6 -5
- package/dist/collection/services/validators/validators/phone.js +6 -5
- package/dist/collection/services/validators/validators/required.js +2 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-35e72a2b.js → p-01f21691.js} +58 -44
- package/dist/components/{p-cec65d0a.js → p-02c55c0d.js} +121 -116
- package/dist/components/{p-7ddd71bd.js → p-08fbbbf9.js} +3 -3
- package/dist/components/{p-00c91e96.js → p-0e0dcb37.js} +2 -2
- package/dist/components/{p-639c9d1a.js → p-11a7865e.js} +80 -69
- package/dist/components/{p-ca66b4b1.js → p-12649d6e.js} +8 -6
- package/dist/components/{p-03177920.js → p-1278b6e9.js} +181 -173
- package/dist/components/{p-f18e5ae3.js → p-153245c0.js} +28 -23
- package/dist/components/{p-7b3c7bf1.js → p-243407f8.js} +4 -2
- package/dist/components/p-245f534d.js +869 -0
- package/dist/components/{p-856695a3.js → p-2630a661.js} +43 -37
- package/dist/components/{p-3fd7310f.js → p-269298f7.js} +1 -1
- package/dist/components/{p-50f207fd.js → p-27b54fb3.js} +54 -34
- package/dist/components/{p-53ca0a91.js → p-281300b4.js} +39 -23
- package/dist/components/{p-163de6e2.js → p-29df1df5.js} +23 -11
- package/dist/components/{p-42ff76b5.js → p-2c7320b5.js} +22 -18
- package/dist/components/{p-aca28e71.js → p-3444731e.js} +53 -52
- package/dist/components/{p-9a47b95f.js → p-35eefb16.js} +26 -26
- package/dist/components/{p-68f0e894.js → p-36c5e434.js} +10 -10
- package/dist/components/{p-9573f82c.js → p-392981a3.js} +41 -35
- package/dist/components/{p-965cea5b.js → p-39c66558.js} +137 -134
- package/dist/components/{p-9fe57fd0.js → p-3bb2ad44.js} +68 -65
- package/dist/components/{p-a188f09e.js → p-3e04ea5b.js} +11 -7
- package/dist/components/{p-eb54f5b9.js → p-4ae2dab9.js} +21 -18
- package/dist/components/{p-9bf262a8.js → p-52152f5b.js} +33 -27
- package/dist/components/{p-a0d406ca.js → p-549fe76f.js} +117 -72
- package/dist/components/{p-e707e73a.js → p-65770d46.js} +13 -5
- package/dist/components/{p-bb324278.js → p-68024f5b.js} +1 -1
- package/dist/components/{p-4d33055f.js → p-6bfd47c5.js} +117 -107
- package/dist/components/{p-a81e545d.js → p-6e8a8d28.js} +1 -1
- package/dist/components/{p-489ae3a0.js → p-6f4bf94f.js} +27 -26
- package/dist/components/{p-df1fe72c.js → p-754dce81.js} +47 -37
- package/dist/components/{p-5c8c2d8d.js → p-7dd65c3a.js} +1 -1
- package/dist/components/{p-6a2a81d8.js → p-85821f41.js} +104 -94
- package/dist/components/{p-817bee22.js → p-8b4a75b2.js} +12 -12
- package/dist/{esm/http-codes-7faa9f6e.js → components/p-94a1eb7a.js} +66 -59
- package/dist/components/{p-045bec85.js → p-98b10b48.js} +16 -16
- package/dist/components/{p-7790eae2.js → p-99823afc.js} +128 -126
- package/dist/components/{p-b0d6ed2e.js → p-9ee3e98b.js} +25 -24
- package/dist/components/{p-6847eb2d.js → p-a09504f7.js} +62 -63
- package/dist/components/{p-88b42c67.js → p-a15512ce.js} +63 -59
- package/dist/components/{p-6b7e73c0.js → p-bd9b1f18.js} +218 -202
- package/dist/components/{p-881093d4.js → p-bf642eca.js} +206 -194
- package/dist/components/{p-91651432.js → p-bfcce1dd.js} +1 -1
- package/dist/components/{p-21c5cfc4.js → p-c47caf67.js} +64 -53
- package/dist/components/{p-c1876db7.js → p-c7dba63e.js} +36 -21
- package/dist/components/{p-5dc5e13c.js → p-c8fc3c1f.js} +2 -2
- package/dist/components/{p-bd3402f6.js → p-c97d9f10.js} +17 -15
- package/dist/components/p-c996a768.js +169 -0
- package/dist/components/{p-37ed3ebb.js → p-c9d79ad4.js} +190 -135
- package/dist/components/{p-029ff2b3.js → p-d22e1c96.js} +24 -24
- package/dist/components/{p-0088d040.js → p-d7d60ba4.js} +16 -12
- package/dist/components/{p-00e689fb.js → p-d92a53ea.js} +1 -1
- package/dist/components/{p-e04716ac.js → p-da4e6cfb.js} +29 -30
- package/dist/components/{p-cb2daf20.js → p-dcf5c661.js} +25 -16
- package/dist/components/{p-04fe59fc.js → p-dcffa870.js} +50 -47
- package/dist/components/{p-616c71e1.js → p-e4f00545.js} +559 -532
- package/dist/components/{p-530ef38b.js → p-f44eb3d8.js} +4 -4
- package/dist/components/{p-144dffdc.js → p-f7bd56ce.js} +1 -1
- package/dist/components/{p-818742ad.js → p-f8ef72c1.js} +21 -22
- package/dist/components/tet-accordion.js +1 -1
- package/dist/components/tet-address-offers-filters-products.js +1 -1
- package/dist/components/tet-address-offers-filters.js +1 -1
- package/dist/components/tet-address-offers-view.js +65 -57
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-asset-addresses.js +116 -105
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +44 -34
- package/dist/components/tet-autocomplete.js +1 -1
- package/dist/components/tet-availability-contact-form.js +1 -1
- package/dist/components/tet-b2b-check-out-form.js +1 -1
- package/dist/components/tet-b2b-compare-card.js +1 -1
- package/dist/components/tet-b2b-configurator-cart.js +1 -1
- package/dist/components/tet-b2b-configurator.js +411 -393
- package/dist/components/tet-b2b-service-calculator.js +33 -33
- package/dist/components/tet-banner-nav.js +23 -11
- package/dist/components/tet-bar-graph.js +222 -215
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-card.js +38 -32
- package/dist/components/tet-business-compare-card.js +20 -13
- package/dist/components/tet-business-lines.js +26 -27
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +11 -11
- package/dist/components/tet-business-summary-card.js +1 -1
- package/dist/components/tet-button.js +1 -1
- package/dist/components/tet-card-list.js +1 -1
- package/dist/components/tet-carousel.js +181 -185
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +35 -9
- package/dist/components/tet-cloud-configurator.js +140 -132
- package/dist/components/tet-colors.js +42 -42
- package/dist/components/tet-compare-card-v2.js +57 -55
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +40 -39
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-contact-form.js +59 -50
- package/dist/components/tet-contact-info.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-customer-assets.js +95 -90
- package/dist/components/tet-datepicker-header.js +1 -1
- package/dist/components/tet-datepicker-month-view.js +1 -1
- package/dist/components/tet-datepicker-multi-year-view.js +1 -1
- package/dist/components/tet-datepicker-year-view.js +1 -1
- package/dist/components/tet-datepicker.js +41 -36
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +71 -74
- package/dist/components/tet-expandable-input.js +99 -82
- package/dist/components/tet-expansion-panel.js +17 -19
- package/dist/components/tet-filter.js +29 -14
- package/dist/components/tet-font-weight.js +1 -1
- package/dist/components/tet-fonts.js +1 -1
- package/dist/components/tet-grid.js +1 -1
- package/dist/components/tet-icon.js +1 -1
- package/dist/components/tet-inline-message.js +8 -8
- package/dist/components/tet-input.js +1 -1
- package/dist/components/tet-label.js +3 -3
- package/dist/components/tet-layout.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-macd-view.js +55 -28
- package/dist/components/tet-menu-mobile.js +14 -15
- package/dist/components/tet-menu.js +5 -6
- package/dist/components/tet-multi-step-dialog.js +88 -74
- package/dist/components/tet-navigation-mobile.js +20 -16
- package/dist/components/tet-news-card-list.js +38 -39
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-placeholder.js +1 -1
- package/dist/components/tet-price-view.js +1 -1
- package/dist/components/tet-radio.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-referral.js +32 -28
- package/dist/components/tet-round-stepper.js +3 -3
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-spinner.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-stepper-v2.js +1 -1
- package/dist/components/tet-stepper-v3.js +1 -1
- package/dist/components/tet-stepper.js +1 -1
- package/dist/components/tet-switch.js +1 -1
- package/dist/components/tet-tab-content.js +1 -1
- package/dist/components/tet-tab-header.js +1 -1
- package/dist/components/tet-table.js +134 -140
- package/dist/components/tet-tag-group.js +1 -1
- package/dist/components/tet-tag.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/components/tet-textarea.js +14 -14
- package/dist/components/tet-thank-you-view-v2.js +38 -35
- package/dist/components/tet-thank-you-view-v3.js +38 -35
- package/dist/components/tet-thank-you-view.js +55 -49
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/components/tet-tv-gift-block.js +15 -15
- package/dist/components/tet-tv-gift-list.js +16 -16
- package/dist/esm/{address-979a9993.js → address-1ff7cd1f.js} +1 -1
- package/dist/esm/{assets-b971f105.js → assets-79f78adb.js} +1 -1
- package/dist/esm/{async-request-6675e5f5.js → async-request-ab25480d.js} +27 -26
- package/dist/esm/compare-cards-tab-products-filters-79b7b7c6.js +98 -0
- package/dist/{components/p-6830b44d.js → esm/http-codes-eb08ff6f.js} +65 -60
- package/dist/esm/{index-1bf36cb9.js → index-8ebb7ad1.js} +1 -1
- package/dist/esm/{index-7f1e2a22.js → index-950abbb7.js} +1672 -1598
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{phone-99c2f297.js → phone-4b016684.js} +8 -6
- package/dist/esm/{product-comparison-830e2764.js → product-comparison-286ce057.js} +1 -1
- package/dist/esm/{tasks-3dfcc330.js → tasks-770dc32d.js} +2 -2
- package/dist/esm/tet-accordion_2.entry.js +62 -46
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +250 -233
- package/dist/esm/tet-address-offers-view.entry.js +44 -36
- package/dist/esm/tet-address-offers_4.entry.js +344 -314
- package/dist/esm/tet-address-search.entry.js +176 -168
- package/dist/esm/tet-asset-addresses.entry.js +106 -95
- package/dist/esm/tet-autocomplete-dropdown.entry.js +40 -30
- package/dist/esm/tet-autocomplete.entry.js +204 -191
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +281 -242
- package/dist/esm/tet-b2b-configurator.entry.js +397 -379
- package/dist/esm/tet-b2b-service-calculator.entry.js +29 -29
- package/dist/esm/tet-banner-nav.entry.js +24 -12
- package/dist/esm/tet-bar-graph.entry.js +222 -215
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-card.entry.js +38 -32
- package/dist/esm/tet-business-compare-card.entry.js +18 -11
- package/dist/esm/tet-business-lines.entry.js +26 -27
- package/dist/esm/tet-business-round-stepper.entry.js +10 -10
- package/dist/esm/tet-button.entry.js +9 -9
- package/dist/esm/tet-card-list.entry.js +557 -530
- package/dist/esm/tet-carousel.entry.js +181 -185
- package/dist/esm/tet-checkbox.entry.js +15 -11
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +31 -5
- package/dist/esm/tet-cloud-configurator.entry.js +133 -125
- package/dist/esm/tet-colors.entry.js +42 -42
- package/dist/esm/tet-compare-card-v2.entry.js +51 -49
- package/dist/esm/tet-compare-cards-tab.entry.js +29 -28
- package/dist/esm/tet-compare-cards_2.entry.js +41 -34
- package/dist/esm/tet-components.js +4 -4
- package/dist/esm/tet-contact-form.entry.js +56 -47
- package/dist/esm/tet-contact-info.entry.js +1 -1
- package/dist/esm/tet-container_2.entry.js +63 -59
- package/dist/esm/tet-customer-assets.entry.js +90 -85
- package/dist/esm/tet-datepicker-header_4.entry.js +203 -188
- package/dist/esm/tet-datepicker.entry.js +36 -31
- package/dist/esm/tet-dialog.entry.js +42 -36
- package/dist/esm/tet-dropdown_2.entry.js +137 -115
- package/dist/esm/tet-dynamic-card.entry.js +68 -71
- package/dist/esm/tet-expandable-input.entry.js +97 -80
- package/dist/esm/tet-expansion-panel.entry.js +17 -19
- package/dist/esm/tet-filter.entry.js +26 -11
- package/dist/esm/tet-font-weight.entry.js +1 -1
- package/dist/esm/tet-fonts.entry.js +1 -1
- package/dist/esm/tet-grid.entry.js +1 -1
- package/dist/esm/tet-icon.entry.js +25 -24
- package/dist/esm/tet-inline-message.entry.js +7 -7
- package/dist/esm/tet-input.entry.js +48 -38
- package/dist/esm/tet-label.entry.js +4 -4
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +1 -1
- package/dist/esm/tet-loader.entry.js +1 -1
- package/dist/esm/tet-macd-view.entry.js +51 -24
- package/dist/esm/tet-menu-mobile.entry.js +13 -14
- package/dist/esm/tet-menu.entry.js +4 -5
- package/dist/esm/tet-multi-step-dialog.entry.js +87 -73
- package/dist/esm/tet-navigation-mobile.entry.js +19 -15
- package/dist/esm/tet-news-card-list.entry.js +35 -36
- package/dist/esm/tet-number-input.entry.js +56 -42
- package/dist/esm/tet-placeholder.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +4 -4
- package/dist/esm/tet-radio.entry.js +11 -7
- package/dist/esm/tet-range-slider.entry.js +632 -620
- package/dist/esm/tet-referral.entry.js +31 -27
- package/dist/esm/tet-round-stepper.entry.js +2 -2
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-spinner.entry.js +16 -16
- package/dist/esm/tet-stepper-input.entry.js +33 -27
- package/dist/esm/tet-stepper-v2.entry.js +28 -29
- package/dist/esm/tet-stepper-v3.entry.js +20 -21
- package/dist/esm/tet-stepper.entry.js +62 -63
- package/dist/esm/tet-switch.entry.js +4 -2
- package/dist/esm/tet-tab-header.entry.js +68 -65
- package/dist/esm/tet-table.entry.js +132 -138
- package/dist/esm/tet-tag_2.entry.js +12 -12
- package/dist/esm/tet-text-list.entry.js +12 -4
- package/dist/esm/tet-textarea.entry.js +14 -14
- package/dist/esm/tet-thank-you-view-v2.entry.js +37 -34
- package/dist/esm/tet-thank-you-view-v3.entry.js +37 -34
- package/dist/esm/tet-thank-you-view.entry.js +52 -46
- package/dist/esm/tet-tv-gift-block.entry.js +15 -15
- package/dist/esm/tet-tv-gift-list.entry.js +15 -15
- package/dist/esm/{theme-wrapper-6e6b2089.js → theme-wrapper-f83deed6.js} +2 -2
- package/dist/esm/{translations-eff34607.js → translations-baabae60.js} +53 -52
- package/dist/esm/{typecheck-31fd6c02.js → typecheck-4abf0258.js} +1 -1
- package/dist/esm/{utils-f8f08058.js → utils-c110a4b1.js} +23 -8
- package/dist/tet-components/{p-c7dbb16f.entry.js → p-0847a214.entry.js} +1 -1
- package/dist/tet-components/p-086f464e.entry.js +1 -0
- package/dist/tet-components/{p-eed2b508.entry.js → p-0ecbcf94.entry.js} +1 -1
- package/dist/tet-components/p-1215e5c0.entry.js +1 -0
- package/dist/tet-components/p-12649d6e.js +1 -0
- package/dist/tet-components/p-15cd7158.entry.js +1 -0
- package/dist/tet-components/p-203651e5.entry.js +1 -0
- package/dist/tet-components/p-20a93866.entry.js +1 -0
- package/dist/tet-components/p-25c9957d.js +1 -0
- package/dist/tet-components/p-29268caf.entry.js +1 -0
- package/dist/tet-components/{p-8f545d45.entry.js → p-29b1a959.entry.js} +1 -1
- package/dist/tet-components/p-2a0bbc16.js +1 -0
- package/dist/tet-components/p-2a346803.entry.js +1 -0
- package/dist/tet-components/p-300dcb5e.entry.js +1 -0
- package/dist/tet-components/{p-1a89919e.entry.js → p-30677f37.entry.js} +1 -1
- package/dist/tet-components/p-30f27049.entry.js +1 -0
- package/dist/tet-components/p-316f0d93.entry.js +1 -0
- package/dist/tet-components/{p-66dd0ede.entry.js → p-39153b16.entry.js} +1 -1
- package/dist/tet-components/p-3b5c1dfc.entry.js +1 -0
- package/dist/tet-components/p-3f630a8d.entry.js +1 -0
- package/dist/tet-components/p-446f550d.entry.js +1 -0
- package/dist/tet-components/{p-a07cada6.entry.js → p-44827a7f.entry.js} +1 -1
- package/dist/tet-components/p-47f100fa.entry.js +1 -0
- package/dist/tet-components/{p-9b027102.entry.js → p-4b4626ec.entry.js} +1 -1
- package/dist/tet-components/p-4e4095c1.js +1 -0
- package/dist/tet-components/{p-46e5b573.entry.js → p-50479341.entry.js} +1 -1
- package/dist/tet-components/p-536dd157.entry.js +1 -0
- package/dist/tet-components/{p-ecff869b.entry.js → p-56b8b4ec.entry.js} +1 -1
- package/dist/tet-components/p-56d32115.entry.js +1 -0
- package/dist/tet-components/p-5d2f0c13.entry.js +1 -0
- package/dist/tet-components/p-618e8591.entry.js +1 -0
- package/dist/tet-components/p-63a909de.entry.js +1 -0
- package/dist/tet-components/p-63b83c11.entry.js +1 -0
- package/dist/tet-components/p-641f4ab5.entry.js +1 -0
- package/dist/tet-components/p-6d468c83.entry.js +1 -0
- package/dist/tet-components/{p-e263ecdf.js → p-6d681c43.js} +1 -1
- package/dist/tet-components/p-72082f3b.entry.js +1 -0
- package/dist/tet-components/{p-7a04bcd7.entry.js → p-739d3344.entry.js} +1 -1
- package/dist/tet-components/p-77d8a2a5.entry.js +1 -0
- package/dist/tet-components/p-77dea317.entry.js +1 -0
- package/dist/tet-components/p-78eb86ff.entry.js +1 -0
- package/dist/tet-components/p-7b91c3d4.entry.js +1 -0
- package/dist/tet-components/{p-f9a1fbb2.entry.js → p-7f520852.entry.js} +1 -1
- package/dist/tet-components/p-8254455b.entry.js +1 -0
- package/dist/tet-components/p-87be3264.entry.js +1 -0
- package/dist/tet-components/{p-918e4e84.entry.js → p-87f36453.entry.js} +1 -1
- package/dist/tet-components/p-88c9ef00.entry.js +1 -0
- package/dist/tet-components/{p-de142575.js → p-88f7bb98.js} +1 -1
- package/dist/tet-components/p-89ae73f2.entry.js +1 -0
- package/dist/tet-components/p-8aecb130.entry.js +1 -0
- package/dist/tet-components/{p-77372984.js → p-90205e46.js} +1 -1
- package/dist/tet-components/p-9081ba98.entry.js +1 -0
- package/dist/tet-components/{p-b680d126.entry.js → p-90ef663e.entry.js} +1 -1
- package/dist/tet-components/p-93e2d958.entry.js +1 -0
- package/dist/tet-components/p-9464cc18.entry.js +1 -0
- package/dist/tet-components/{p-bb9f1a6f.entry.js → p-988b6712.entry.js} +1 -1
- package/dist/tet-components/p-98f93bec.entry.js +1 -0
- package/dist/tet-components/p-9a2b6ee2.js +1 -0
- package/dist/tet-components/{p-8c964cca.js → p-9af9c5e3.js} +2 -2
- package/dist/tet-components/p-9c188d1b.entry.js +1 -0
- package/dist/tet-components/p-a263681d.entry.js +1 -0
- package/dist/tet-components/{p-8b405467.entry.js → p-a43badd1.entry.js} +1 -1
- package/dist/tet-components/{p-775aa778.entry.js → p-a77b7388.entry.js} +1 -1
- package/dist/tet-components/p-ad14115e.entry.js +1 -0
- package/dist/tet-components/{p-36d2a380.entry.js → p-af82e64e.entry.js} +1 -1
- package/dist/tet-components/p-b47e0d55.entry.js +1 -0
- package/dist/tet-components/p-b4b92f9b.js +2 -0
- package/dist/tet-components/p-b9359fea.entry.js +1 -0
- package/dist/tet-components/p-ba494985.entry.js +1 -0
- package/dist/tet-components/p-bda2a644.entry.js +1 -0
- package/dist/tet-components/{p-bc16c07b.js → p-c2a00b6a.js} +1 -1
- package/dist/tet-components/p-c3d9064d.entry.js +1 -0
- package/dist/tet-components/{p-a9ed4e2b.entry.js → p-c61ef9e0.entry.js} +1 -1
- package/dist/tet-components/p-c6818401.entry.js +1 -0
- package/dist/tet-components/{p-ed67bd52.entry.js → p-c7830c8a.entry.js} +1 -1
- package/dist/tet-components/p-c7e4365a.entry.js +1 -0
- package/dist/tet-components/{p-9f1a810e.entry.js → p-c88cdf25.entry.js} +1 -1
- package/dist/tet-components/p-c9cdf98c.js +1 -0
- package/dist/tet-components/p-cba8d001.js +1 -0
- package/dist/tet-components/p-ce271068.entry.js +1 -0
- package/dist/tet-components/p-d55c2f9e.entry.js +1 -0
- package/dist/tet-components/p-db090557.entry.js +1 -0
- package/dist/tet-components/p-df542648.entry.js +1 -0
- package/dist/tet-components/p-e11eb73d.entry.js +1 -0
- package/dist/tet-components/{p-49122f6a.entry.js → p-e6fea049.entry.js} +1 -1
- package/dist/tet-components/p-e87226cb.entry.js +1 -0
- package/dist/tet-components/{p-b2b384d2.js → p-ec1c990e.js} +1 -1
- package/dist/tet-components/p-ec892e18.entry.js +1 -0
- package/dist/tet-components/p-ede893e6.entry.js +1 -0
- package/dist/tet-components/p-eefc4f3d.entry.js +1 -0
- package/dist/tet-components/{p-44d068ac.entry.js → p-efa6f09b.entry.js} +1 -1
- package/dist/tet-components/p-f6f98ea9.entry.js +1 -0
- package/dist/tet-components/{p-5c86ad42.entry.js → p-fca864a8.entry.js} +1 -1
- package/dist/tet-components/{p-f023f124.entry.js → p-ffd1a0d9.entry.js} +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/advanced/address/tet-autocomplete/tet-autocomplete.d.ts +3 -2
- package/dist/types/components.d.ts +0 -8
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +3 -0
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/package.json +6 -12
- package/dist/cjs/compare-cards-tab-products-filters-58410792.js +0 -99
- package/dist/collection/components/advanced/address/tet-address-offers-filters/address-offers-filters.spec.js +0 -105
- package/dist/collection/components/advanced/address/tet-address-offers-filters/test/tet-address-offers-filters.spec.js +0 -23
- package/dist/collection/components/advanced/address/tet-address-offers-filters-products/test/tet-address-offers-filters-products.spec.js +0 -23
- package/dist/collection/components/advanced/address/tet-autocomplete/test/tet-autocomplete.spec.js +0 -110
- package/dist/collection/components/advanced/cards/tet-b2b-compare-card/test/tet-b2b-compare-card.spec.js +0 -86
- package/dist/collection/components/advanced/cards/tet-card-list/test/tet-card-list.spec.js +0 -69
- package/dist/collection/components/advanced/cards/tet-compare-card/test/tet-compare-card.spec.js +0 -292
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/test/tet-compare-card-v2.spec.js +0 -40
- package/dist/collection/components/advanced/cards/tet-compare-cards/test/tet-compare-cards.spec.js +0 -65
- package/dist/collection/components/advanced/cards/tet-compare-cards-tab/test/tet-compare-cards-tab.spec.js +0 -399
- package/dist/collection/components/advanced/customer/tet-asset-addresses/test/tet-asset-addresses.spec.js +0 -30
- package/dist/collection/components/advanced/customer/tet-asset-availability-addresses/test/tet-asset-availability-addresses.spec.js +0 -30
- package/dist/collection/components/advanced/customer/tet-referral/test/tet-referral.spec.js +0 -85
- package/dist/collection/components/advanced/dialog/tet-multi-step-dialog/test/tet-multi-step-dialog.spec.js +0 -53
- package/dist/collection/components/advanced/forms/tet-availability-contact-form/test/tet-availability-contact-form.spec.js +0 -35
- package/dist/collection/components/advanced/promotions/tv-gift/tet-tv-gift-block/test/tet-tv-gift-block.spec.js +0 -61
- package/dist/collection/components/advanced/promotions/tv-gift/tet-tv-gift-list/test/tet-tv-gift-list.spec.js +0 -55
- package/dist/collection/components/basic/buttons/tet-button/test/tet-button.spec.js +0 -131
- package/dist/collection/components/basic/buttons/tet-checkbox/test/tet-checkbox.spec.js +0 -28
- package/dist/collection/components/basic/buttons/tet-radio/test/tet-radio.spec.js +0 -26
- package/dist/collection/components/basic/buttons/tet-switch/test/tet-switch.spec.js +0 -27
- package/dist/collection/components/basic/buttons/tet-tabs/test/tet-tab-content.spec.js +0 -35
- package/dist/collection/components/basic/buttons/tet-tabs/test/tet-tab-header.spec.js +0 -42
- package/dist/collection/components/basic/buttons/tet-tag/test/tet-tag.spec.js +0 -76
- package/dist/collection/components/basic/buttons/tet-tag-group/test/tet-tag-group.spec.js +0 -92
- package/dist/collection/components/basic/carousel/tet-carousel/test/tet-carousel.spec.js +0 -63
- package/dist/collection/components/basic/container/tet-container/test/tet-container.spec.js +0 -50
- package/dist/collection/components/basic/loaders/tet-loader/test/tet-loader.spec.js +0 -19
- package/dist/collection/components/basic/loaders/tet-placeholder/test/tet-placeholder.spec.js +0 -19
- package/dist/collection/components/basic/loaders/tet-spinner/test/tet-spinner.spec.js +0 -52
- package/dist/collection/components/basic/steppers/tet-business-round-stepper/test/tet-business-round-stepper.spec.js +0 -82
- package/dist/collection/components/basic/steppers/tet-round-stepper/test/tet-round-stepper.spec.js +0 -78
- package/dist/collection/components/basic/steppers/tet-stepper/test/tet-stepper.spec.js +0 -110
- package/dist/collection/components/basic/steppers/tet-stepper-v2/test/tet-stepper-v2.spec.js +0 -136
- package/dist/collection/components/basic/steppers/tet-stepper-v3/test/tet-stepper-v3.spec.js +0 -135
- package/dist/collection/components/simple/inputs/tet-dropdown/test/tet-dropdown.spec.js +0 -122
- package/dist/collection/components/simple/inputs/tet-input/test/tet-input.spec.js +0 -110
- package/dist/collection/components/simple/inputs/tet-range-slider/test/tet-range-slider.spec.js +0 -145
- package/dist/collection/components/simple/lists/tet-news-card-list/test/tet-news-card-list.spec.js +0 -111
- package/dist/collection/components/simple/lists/tet-selection-list/test/tet-selection-list.spec.js +0 -64
- package/dist/collection/components/simple/lists/tet-text-list/test/tet-text-list.spec.js +0 -171
- package/dist/collection/components/simple/menu/tet-menu/test/tet-menu.spec.js +0 -231
- package/dist/collection/components/simple/menu/tet-menu-mobile/test/tet-menu-mobile.spec.js +0 -87
- package/dist/collection/components/simple/menu/tet-navigation-mobile/test/tet-navigation-mobile.spec.js +0 -81
- package/dist/collection/components/simple/structural/tet-accordion/test/tet-accordion.spec.js +0 -108
- package/dist/collection/components/simple/structural/tet-expansion-panel/test/tet-expansion-panel.spec.js +0 -42
- package/dist/collection/components/simple/tables-and-graphs/tet-bar-graph/test/tet-bar-graph.spec.js +0 -85
- package/dist/collection/components/simple/tables-and-graphs/tet-table/test/tet-table.spec.js +0 -360
- package/dist/collection/components/simple/text-blocks/tet-dialog/test/tet-dialog.spec.js +0 -84
- package/dist/collection/components/simple/text-blocks/tet-inline-message/test/tet-inline-message.spec.js +0 -22
- package/dist/collection/components/simple/text-blocks/tet-notification/test/tet-notification.spec.js +0 -88
- package/dist/collection/components/simple/text-blocks/tet-tooltip/test/tet-tooltip.spec.js +0 -79
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/test/tet-b2b-configurator-cart.spec.js +0 -50
- package/dist/collection/components/views/tet-b2b-configurator/test/tet-b2b-configurator.spec.js +0 -136
- package/dist/collection/components/views/tet-business-lines/test/tet-business-lines.spec.js +0 -23
- package/dist/collection/components/views/tet-contact-info/test/tet-contact-info.spec.js +0 -44
- package/dist/collection/components/views/tet-macd-view/test/tet-macd-view.spec.js +0 -498
- package/dist/collection/components/views/tet-price-view/test/tet-price-view.spec.js +0 -98
- package/dist/collection/components/views/tet-thank-you-view/test/tet-thank-you-view.spec.js +0 -275
- package/dist/collection/components/views/tet-thank-you-view-v2/test/tet-thank-you-view-v2.spec.js +0 -175
- package/dist/collection/components/views/tet-thank-you-view-v3/test/tet-thank-you-view-v3.spec.js +0 -175
- package/dist/collection/services/api/async-request.spec.js +0 -37
- package/dist/collection/services/api/request.spec.js +0 -32
- package/dist/collection/services/api/services/address.spec.js +0 -39
- package/dist/collection/services/api/services/catalog/product-comparison.spec.js +0 -22
- package/dist/collection/services/api/services/components/component-data.spec.js +0 -20
- package/dist/collection/services/api/services/customer/assets.spec.js +0 -25
- package/dist/collection/services/api/services/customer/query.spec.js +0 -25
- package/dist/collection/services/api/services/macd/macd.spec.js +0 -91
- package/dist/collection/services/api/services/operations/operations.spec.js +0 -19
- package/dist/collection/services/api/services/tasks.spec.js +0 -25
- package/dist/collection/services/api/services/translations.spec.js +0 -20
- package/dist/collection/services/products/product-codes.spec.js +0 -11
- package/dist/collection/services/translations/translations.spec.js +0 -30
- package/dist/collection/services/url/build-url-params.spec.js +0 -11
- package/dist/collection/services/url/url.spec.js +0 -16
- package/dist/collection/services/utils/array.spec.js +0 -10
- package/dist/collection/services/utils/debounce.spec.js +0 -19
- package/dist/collection/services/utils/execute-until.spec.js +0 -10
- package/dist/collection/services/utils/inertia-scroll.spec.js +0 -56
- package/dist/collection/services/utils/isFocusableElementOrChild.spec.js +0 -67
- package/dist/collection/services/utils/object.spec.js +0 -84
- package/dist/collection/services/utils/price.spec.js +0 -18
- package/dist/collection/services/utils/random.spec.js +0 -10
- package/dist/collection/services/utils/reactive.spec.js +0 -15
- package/dist/collection/services/utils/size.spec.js +0 -13
- package/dist/collection/services/utils/string.spec.js +0 -9
- package/dist/collection/services/utils/throttle.spec.js +0 -32
- package/dist/collection/services/utils/typecheck.spec.js +0 -49
- package/dist/collection/services/validators/validator-group.spec.js +0 -30
- package/dist/collection/services/validators/validators/e-mail.spec.js +0 -20
- package/dist/collection/services/validators/validators/phone.spec.js +0 -23
- package/dist/collection/services/validators/validators/required.spec.js +0 -16
- package/dist/components/p-8e19c5da.js +0 -857
- package/dist/components/p-e34bf267.js +0 -170
- package/dist/esm/compare-cards-tab-products-filters-f0fa0712.js +0 -97
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/tet-components/p-021268b7.entry.js +0 -1
- package/dist/tet-components/p-02e548d5.entry.js +0 -1
- package/dist/tet-components/p-06bf08a4.entry.js +0 -1
- package/dist/tet-components/p-0738afc0.entry.js +0 -1
- package/dist/tet-components/p-1b797a96.entry.js +0 -1
- package/dist/tet-components/p-1be23b32.entry.js +0 -1
- package/dist/tet-components/p-1e840eca.entry.js +0 -1
- package/dist/tet-components/p-1ec7f341.js +0 -2
- package/dist/tet-components/p-2e870f4d.entry.js +0 -1
- package/dist/tet-components/p-2f029068.entry.js +0 -1
- package/dist/tet-components/p-34ed0dd7.entry.js +0 -1
- package/dist/tet-components/p-3604bf21.entry.js +0 -1
- package/dist/tet-components/p-3d2dc872.entry.js +0 -1
- package/dist/tet-components/p-48bd3f87.entry.js +0 -1
- package/dist/tet-components/p-4e3c6172.entry.js +0 -1
- package/dist/tet-components/p-4e917b52.entry.js +0 -1
- package/dist/tet-components/p-511680d5.entry.js +0 -1
- package/dist/tet-components/p-5d920c98.entry.js +0 -1
- package/dist/tet-components/p-618134c3.entry.js +0 -1
- package/dist/tet-components/p-695cdc78.entry.js +0 -1
- package/dist/tet-components/p-6a5eca28.js +0 -1
- package/dist/tet-components/p-71cbde0c.entry.js +0 -1
- package/dist/tet-components/p-7751035d.entry.js +0 -1
- package/dist/tet-components/p-78014763.entry.js +0 -1
- package/dist/tet-components/p-78a0c398.entry.js +0 -1
- package/dist/tet-components/p-79255c00.entry.js +0 -1
- package/dist/tet-components/p-805c9ef3.entry.js +0 -1
- package/dist/tet-components/p-88885ba1.entry.js +0 -1
- package/dist/tet-components/p-8a6831bc.entry.js +0 -1
- package/dist/tet-components/p-8c7c6590.entry.js +0 -1
- package/dist/tet-components/p-8c89d1f5.entry.js +0 -1
- package/dist/tet-components/p-8d644f8b.entry.js +0 -1
- package/dist/tet-components/p-9102c6d9.entry.js +0 -1
- package/dist/tet-components/p-977ea27a.entry.js +0 -1
- package/dist/tet-components/p-9a5b8dbc.entry.js +0 -1
- package/dist/tet-components/p-a15d2b6a.entry.js +0 -1
- package/dist/tet-components/p-a549f1dd.entry.js +0 -1
- package/dist/tet-components/p-a8030923.entry.js +0 -1
- package/dist/tet-components/p-aff1e911.entry.js +0 -1
- package/dist/tet-components/p-b0112dde.entry.js +0 -1
- package/dist/tet-components/p-b14b8531.entry.js +0 -1
- package/dist/tet-components/p-bc2e65ab.entry.js +0 -1
- package/dist/tet-components/p-bfa02c13.entry.js +0 -1
- package/dist/tet-components/p-c4a95bbe.entry.js +0 -1
- package/dist/tet-components/p-c4ed060b.entry.js +0 -1
- package/dist/tet-components/p-ca66b4b1.js +0 -1
- package/dist/tet-components/p-cf7d5c84.js +0 -1
- package/dist/tet-components/p-d0d6a340.js +0 -1
- package/dist/tet-components/p-d2919aae.js +0 -1
- package/dist/tet-components/p-d795f9c3.entry.js +0 -1
- package/dist/tet-components/p-dc12dee9.entry.js +0 -1
- package/dist/tet-components/p-dcbe09b5.js +0 -1
- package/dist/tet-components/p-de040767.entry.js +0 -1
- package/dist/tet-components/p-de4c32ee.entry.js +0 -1
- package/dist/tet-components/p-e423fe76.entry.js +0 -1
- package/dist/tet-components/p-e69056de.entry.js +0 -1
- package/dist/tet-components/p-e86164ef.entry.js +0 -1
- package/dist/tet-components/p-eb66d7b2.js +0 -1
- package/dist/tet-components/p-ecbfde88.entry.js +0 -1
- package/dist/tet-components/p-ed4b8bbe.entry.js +0 -1
- package/dist/tet-components/p-eed7244f.entry.js +0 -1
- package/dist/tet-components/p-f48500fd.entry.js +0 -1
- package/dist/tet-components/p-fab4ab39.entry.js +0 -1
- package/dist/tet-components/p-fd4131ad.entry.js +0 -1
|
@@ -9,376 +9,6 @@ const MIN_LOAD_TIME = 500;
|
|
|
9
9
|
const DESKTOP_BREAKPOINT = 1024;
|
|
10
10
|
export class TetB2bConfigurator {
|
|
11
11
|
constructor() {
|
|
12
|
-
/** @private The suffix for the price displayed - "€/mēn."). */
|
|
13
|
-
this.priceSuffix = '€/mēn.';
|
|
14
|
-
/** Syncs desktop resolution with state variable */
|
|
15
|
-
this.checkDesktopResolution = () => {
|
|
16
|
-
this.isDesktopResolution = window.innerWidth >= DESKTOP_BREAKPOINT;
|
|
17
|
-
};
|
|
18
|
-
/** Fetches the data and passes it to Stencil store */
|
|
19
|
-
this.fetchData = async () => {
|
|
20
|
-
const data = await b2bConfigurator();
|
|
21
|
-
initData(data);
|
|
22
|
-
};
|
|
23
|
-
/** Renders the placeholdes/skeleton */
|
|
24
|
-
this.renderPlaceholder = () => {
|
|
25
|
-
const darkTheme = this.theme === 'dark';
|
|
26
|
-
return [
|
|
27
|
-
h("div", { class: "offer placeholder" }, h("div", { style: { padding: this.isDesktopResolution ? '1.5rem' : '1rem' } }, h("tet-placeholder", { class: "placeholder", height: this.isDesktopResolution ? '2rem' : '1.5rem', darkTheme: darkTheme })), h("div", { class: "offer__content" }, h("tet-placeholder", { class: "placeholder offer__navigation", height: this.isDesktopResolution ? '48rem' : ' 2.25rem', darkTheme: darkTheme, style: { margin: '0' } }), h("div", { class: "offer__cards" }, h("div", { class: "offer__cards-list" }, h("tet-placeholder", { class: "placeholder", height: "3rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }))))),
|
|
28
|
-
h("div", { class: "cart cart--empty", style: {
|
|
29
|
-
'padding': '1.5rem 1rem 1rem',
|
|
30
|
-
'background-color': `var(--b2b-background-color)`
|
|
31
|
-
} }, h("tet-placeholder", { class: "placeholder", height: "12.75rem", darkTheme: darkTheme }))
|
|
32
|
-
];
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Handles event form navigation and sets currently active categories
|
|
36
|
-
* @param e
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
this.categoryClickHandler = (e) => {
|
|
40
|
-
const { id } = e.detail;
|
|
41
|
-
const category = this.getCategoryById(id);
|
|
42
|
-
if (!category) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (category.type === 'primary') {
|
|
46
|
-
this.activePrimaryCategoryId = id;
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
this.activeSecondaryCategoryId = id;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
/** Renders the offer section */
|
|
53
|
-
this.renderOffer = () => {
|
|
54
|
-
const blocks = [
|
|
55
|
-
{ name: t('components-b2b-offer-primary-title'), type: 'primary' },
|
|
56
|
-
{ name: t('components-b2b-offer-secondary-title'), type: 'secondary' }
|
|
57
|
-
];
|
|
58
|
-
return (h("div", { class: { offer: true, [`offer--${this.theme}`]: true } }, blocks.map((block) => {
|
|
59
|
-
const menuItems = b2bState.data
|
|
60
|
-
.filter((item) => item.type === block.type)
|
|
61
|
-
.map((category) => {
|
|
62
|
-
const { id, name, icon } = category;
|
|
63
|
-
const selected = id === this.activePrimaryCategoryId || id === this.activeSecondaryCategoryId;
|
|
64
|
-
return { id, name, icon, selected };
|
|
65
|
-
});
|
|
66
|
-
const accRefCallback = (el) => {
|
|
67
|
-
if (block.type === 'primary') {
|
|
68
|
-
this.primaryAccordionEl = el;
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.secondaryAccordionEl = el;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
const navRefCallback = (el) => {
|
|
75
|
-
if (block.type === 'primary') {
|
|
76
|
-
this.primaryNavEl = el;
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.secondaryNavEl = el;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
return (h("tet-accordion", { ref: accRefCallback, key: block.type, class: "offer__block", isOpen: block.type === 'primary', header: block.name, withBorder: true, theme: this.theme, transparentBackground: true }, h("div", { class: "offer__content" }, h("div", { class: "offer__navigation" }, h("tet-business-navigation", { ref: navRefCallback, menuItems: menuItems, theme: this.theme, "onMenu-click-event": this.categoryClickHandler })), this.renderCards(block.type))));
|
|
83
|
-
})));
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Finds category by id. Returns category or undefined.
|
|
87
|
-
* @param categoryId
|
|
88
|
-
* @returns
|
|
89
|
-
*/
|
|
90
|
-
this.getCategoryById = (categoryId) => {
|
|
91
|
-
return b2bState.data.find((category) => category.id === categoryId);
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Event, emitted on compare link click with the relevant modal Id
|
|
95
|
-
* @param categoryId
|
|
96
|
-
* @returns
|
|
97
|
-
*/
|
|
98
|
-
this.onCompareLinkClick = (categoryId) => {
|
|
99
|
-
const category = this.getCategoryById(categoryId);
|
|
100
|
-
if (!category || !category.modalScreenId) {
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
this.compareLinkClick.emit(category.modalScreenId);
|
|
104
|
-
};
|
|
105
|
-
/**
|
|
106
|
-
* Handles card selection (aka. oepen state). Checks for single|multi choice
|
|
107
|
-
* @param cardId
|
|
108
|
-
* @param categoryId
|
|
109
|
-
* @returns
|
|
110
|
-
*/
|
|
111
|
-
this.handleCardSelected = (cardId, categoryId) => {
|
|
112
|
-
const category = this.getCategoryById(categoryId);
|
|
113
|
-
if (!category) {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
const { type, allowMultipleChoice } = category;
|
|
117
|
-
if (type === 'primary') {
|
|
118
|
-
if (this.selectedPrimaryCards.includes(cardId)) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
this.selectedPrimaryCards = allowMultipleChoice ? [...this.selectedPrimaryCards, cardId] : [cardId];
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
if (this.selectedSecondaryCards.includes(cardId)) {
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
this.selectedSecondaryCards = allowMultipleChoice ? [...this.selectedSecondaryCards, cardId] : [cardId];
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
/**
|
|
131
|
-
* Updates product in cart (add, edit, remove)
|
|
132
|
-
* In desktop mode - changes state of summary cart's accordions
|
|
133
|
-
* @param e
|
|
134
|
-
* @param categoryId
|
|
135
|
-
*/
|
|
136
|
-
this.handleProductCountChanged = async (e, categoryId) => {
|
|
137
|
-
const { cardId, count } = e.detail;
|
|
138
|
-
const productCategory = this.getCategoryById(categoryId);
|
|
139
|
-
if (!productCategory || b2bState.cart.get(cardId) === count) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
if (!count) {
|
|
143
|
-
this.itemToRemove = cardId;
|
|
144
|
-
this.confirmationDialogEl.open();
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (!productCategory.allowMultipleChoice) {
|
|
148
|
-
productCategory.products.forEach((product) => product.productCode !== cardId && removeFromCart(product.productCode));
|
|
149
|
-
}
|
|
150
|
-
addToCart(cardId, count);
|
|
151
|
-
if (this.isDesktopResolution) {
|
|
152
|
-
this.cartEl.changeBlockState(productCategory.type, 'open');
|
|
153
|
-
this.cartEl.changeBlockState(productCategory.type === 'primary' ? 'secondary' : 'primary', 'close');
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
/** Resets itemId to be removed when confirmation dialog is closed */
|
|
157
|
-
this.onConfirmationClose = () => {
|
|
158
|
-
this.itemToRemove = null;
|
|
159
|
-
};
|
|
160
|
-
/** Renders confirmation dialog, shown on product removal action */
|
|
161
|
-
this.renderConfirmationDialog = () => {
|
|
162
|
-
return (h("tet-dialog", { ref: (el) => (this.confirmationDialogEl = el), class: this.theme, closeOnOverlayClick: false, onCloseDialog: this.onConfirmationClose, theme: this.theme }, h("div", { class: "action-dialog" }, h("tet-icon", { class: "action-dialog__icon action-dialog__attention-icon", name: "attention" }), h("div", { class: "action-dialog__title" }, t('components-b2b-item-remove-confirmation-title'))), h("div", { slot: "footer", class: "action-dialog__footer" }, h("tet-button", { class: "action-dialog__button", type: "secondary", theme: this.theme, size: "large", onClick: () => this.confirmationDialogEl.close() }, t('components-b2b-item-remove-confirmation-decline')), h("tet-button", { class: "action-dialog__button", type: "primary", theme: this.theme, size: "large", iconName: "tc-trash", iconPosition: "left", onClick: () => {
|
|
163
|
-
removeFromCart(this.itemToRemove);
|
|
164
|
-
this.confirmationDialogEl.close();
|
|
165
|
-
} }, t('components-b2b-item-remove-confirmation-accept')))));
|
|
166
|
-
};
|
|
167
|
-
/** Performs action to start again */
|
|
168
|
-
this.resetState = () => {
|
|
169
|
-
resetCart();
|
|
170
|
-
this.checkoutAttempted = false;
|
|
171
|
-
this.primaryAccordionEl.open();
|
|
172
|
-
this.secondaryAccordionEl.close();
|
|
173
|
-
};
|
|
174
|
-
/** Renders dialog, shown after form submit */
|
|
175
|
-
this.renderSubmissionStateDialog = () => {
|
|
176
|
-
const isFormSubmitLoading = this.formState === 'loading';
|
|
177
|
-
const successClose = () => {
|
|
178
|
-
this.resetState();
|
|
179
|
-
this.successCloseClick.emit();
|
|
180
|
-
this.submissionStateDialogEl.close();
|
|
181
|
-
};
|
|
182
|
-
const content = isFormSubmitLoading ? (h("div", { class: "action-dialog" }, h("tet-spinner", { theme: this.theme }), h("div", { class: "action-dialog__title" }, t('components-b2b-loading-dialog-title')), h("div", { class: "action-dialog__description" }, t('components-b2b-loading-dialog-description')))) : ([
|
|
183
|
-
h("div", { class: "action-dialog" }, h("tet-icon", { class: "action-dialog__icon action-dialog__success-icon", name: "tc-check-circle" }), h("div", { class: "action-dialog__title" }, t('components-b2b-success-dialog-title')), h("div", { class: "action-dialog__description" }, t('components-b2b-success-dialog-description'))),
|
|
184
|
-
h("div", { slot: "footer", class: "action-dialog__footer" }, h("tet-button", { class: "action-dialog__button", type: "secondary", theme: this.theme, size: "large", onClick: successClose }, h("div", { class: "action-dialog__button-text" }, t('components-b2b-success-dialog-close'))), h("tet-button", { class: "action-dialog__button", type: "primary", theme: this.theme, size: "large", onClick: () => {
|
|
185
|
-
this.resetState();
|
|
186
|
-
this.submissionStateDialogEl.close();
|
|
187
|
-
} }, h("div", { class: "action-dialog__button-text" }, t('components-b2b-success-dialog-start-again'))))
|
|
188
|
-
]);
|
|
189
|
-
return (h("tet-dialog", { ref: (el) => (this.submissionStateDialogEl = el), class: { [this.theme]: true, 'action-dialog--loading': isFormSubmitLoading }, closeOnOverlayClick: false, closeOnEscape: !isFormSubmitLoading, hideCloseButton: isFormSubmitLoading, theme: this.theme, onCloseDialog: this.formState === 'success' ? successClose : this.submissionStateDialogEl.close }, content));
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* Renders offer section cards for the given category type
|
|
193
|
-
* @param categoryType The type of category block to render
|
|
194
|
-
* @returns
|
|
195
|
-
*/
|
|
196
|
-
this.renderCards = (categoryType) => {
|
|
197
|
-
var _a;
|
|
198
|
-
const activeCategoryId = categoryType === 'primary' ? this.activePrimaryCategoryId : this.activeSecondaryCategoryId;
|
|
199
|
-
const selectedCards = categoryType === 'primary' ? this.selectedPrimaryCards : this.selectedSecondaryCards;
|
|
200
|
-
const products = ((_a = this.getCategoryById(activeCategoryId)) === null || _a === void 0 ? void 0 : _a.products) || [];
|
|
201
|
-
const cards = products.map((product) => {
|
|
202
|
-
var _a, _b;
|
|
203
|
-
const { productCode: id, name: { lv: title }, description: { lv: subtitle }, amount: price, b2bConfiguratorProduct: { discountAmount: discountPrice, selectionType, defaultValue, minValue, maxValue, translationKey: label }, benefits: { lv: benefits }, contracts } = product;
|
|
204
|
-
const isBestChoice = !!((_a = product.attributes.find((attribute) => attribute.key === 'isBestChoice')) === null || _a === void 0 ? void 0 : _a.value);
|
|
205
|
-
const counterOptions = selectionType === 'single'
|
|
206
|
-
? undefined
|
|
207
|
-
: {
|
|
208
|
-
defaultValue,
|
|
209
|
-
minValue,
|
|
210
|
-
maxValue,
|
|
211
|
-
label
|
|
212
|
-
};
|
|
213
|
-
const options = {
|
|
214
|
-
id,
|
|
215
|
-
title,
|
|
216
|
-
subtitle,
|
|
217
|
-
isBestChoice,
|
|
218
|
-
price,
|
|
219
|
-
discountPrice,
|
|
220
|
-
benefits: benefits.split('\n'),
|
|
221
|
-
contract: (_b = contracts[0]) === null || _b === void 0 ? void 0 : _b.contract,
|
|
222
|
-
counterOptions
|
|
223
|
-
};
|
|
224
|
-
const isSelected = selectedCards.includes(id);
|
|
225
|
-
return (h("tet-b2b-compare-card", { options: options, theme: this.theme, key: id, isSelected: isSelected, onSelectedChange: () => this.handleCardSelected(id, activeCategoryId), count: b2bState.cart.get(id), onCountChange: (e) => this.handleProductCountChanged(e, activeCategoryId) }));
|
|
226
|
-
});
|
|
227
|
-
return (h("div", { class: "offer__cards" }, h("div", { class: "offer__cards-header" }, h("div", { class: "offer__cards-title" }, t('components-b2b-offer-product-list-title')), h("button", { class: { 'button-reset': true, 'compare__button': true, [`${this.theme}`]: true }, onClick: () => {
|
|
228
|
-
this.onCompareLinkClick(activeCategoryId);
|
|
229
|
-
} }, h("span", { class: { 'compare__text': true, 'tet-link': true, [`${this.theme}`]: true } }, t('components-b2b-offer-compare-link-text')), h("div", { class: "compare__icon-wrapper" }, h("tet-icon", { class: "compare__icon", name: "tc-info-circle-outline", theme: this.theme })))), h("div", { class: "offer__cards-list" }, cards)));
|
|
230
|
-
};
|
|
231
|
-
/**
|
|
232
|
-
* Translates Cart "count change" event and uses in the general "count change" handler
|
|
233
|
-
* @param cardId
|
|
234
|
-
* @param count
|
|
235
|
-
* @param categoryId
|
|
236
|
-
*/
|
|
237
|
-
this.handleCartProductCountChange = (cardId, count, categoryId) => {
|
|
238
|
-
const updateEvent = { detail: { cardId, count } };
|
|
239
|
-
this.handleProductCountChanged(updateEvent, categoryId);
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Navigates user in offer section by opening accordion and selecting the specific product which was clicked in cart component
|
|
243
|
-
* @param categoryId
|
|
244
|
-
* @param productCode
|
|
245
|
-
* @returns
|
|
246
|
-
*/
|
|
247
|
-
this.goToProduct = async (categoryId, productCode) => {
|
|
248
|
-
const category = this.getCategoryById(categoryId);
|
|
249
|
-
if (!category) {
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
if (category.type === 'primary') {
|
|
253
|
-
await this.primaryAccordionEl.open();
|
|
254
|
-
await this.primaryNavEl.selectMenuItem(categoryId);
|
|
255
|
-
this.primaryAccordionEl.scrollIntoView({ behavior: 'smooth' });
|
|
256
|
-
}
|
|
257
|
-
else if (category.type === 'secondary') {
|
|
258
|
-
await this.secondaryAccordionEl.open();
|
|
259
|
-
await this.secondaryNavEl.selectMenuItem(categoryId);
|
|
260
|
-
this.secondaryAccordionEl.scrollIntoView({ behavior: 'smooth' });
|
|
261
|
-
}
|
|
262
|
-
setTimeout(() => {
|
|
263
|
-
this.handleCardSelected(productCode, categoryId);
|
|
264
|
-
}, 0);
|
|
265
|
-
};
|
|
266
|
-
/**
|
|
267
|
-
* Renders list of Cards in Cart depending on context
|
|
268
|
-
* @param context
|
|
269
|
-
* @returns
|
|
270
|
-
*/
|
|
271
|
-
this.renderCartCardsList = (context) => {
|
|
272
|
-
const categoryTypes = ['primary', 'secondary'];
|
|
273
|
-
const productCodeToSummaryCard = (productCode) => {
|
|
274
|
-
const count = b2bState.cart.get(productCode);
|
|
275
|
-
const details = b2bState.productDetails.get(productCode);
|
|
276
|
-
if (count === undefined || !details) {
|
|
277
|
-
return null;
|
|
278
|
-
}
|
|
279
|
-
const { name, amount, description, discountAmount, categoryName, categoryType, categoryId, b2bConfiguratorProduct } = details;
|
|
280
|
-
const productDescription = categoryType === 'primary' ? description : categoryName;
|
|
281
|
-
const { selectionType, term, minValue, maxValue, translationKey } = b2bConfiguratorProduct;
|
|
282
|
-
return (h("tet-business-summary-card", { key: productCode, productName: name, price: amount, productDescription: productDescription, discountPrice: discountAmount, currency: this.priceSuffix, contractTerm: term, theme: this.theme, withStepper: selectionType === 'number', value: count, minValue: minValue, maxValue: maxValue, stepperLabel: t(translationKey || ''), context: context, onAmountChange: (e) => this.handleCartProductCountChange(productCode, e.detail, categoryId), onDeleteButtonClick: () => this.handleCartProductCountChange(productCode, 0, categoryId), onEditButtonClick: () => this.goToProduct(categoryId, productCode) }));
|
|
283
|
-
};
|
|
284
|
-
return categoryTypes.map((type) => {
|
|
285
|
-
const summaryCards = [...b2bState.cart]
|
|
286
|
-
.filter(([productCode]) => {
|
|
287
|
-
const details = b2bState.productDetails.get(productCode);
|
|
288
|
-
return details && details.categoryType === type;
|
|
289
|
-
})
|
|
290
|
-
.map(([productCode]) => productCodeToSummaryCard(productCode));
|
|
291
|
-
return summaryCards.length ? (h("div", { class: "cart__card-list", slot: type }, summaryCards)) : null;
|
|
292
|
-
});
|
|
293
|
-
};
|
|
294
|
-
/** Adjusts the top position variable for the sticky cart element */
|
|
295
|
-
this.positionStickyCartEl = () => {
|
|
296
|
-
if (this.referenceElement) {
|
|
297
|
-
if (this.isDesktopResolution) {
|
|
298
|
-
this.hostElement.style.setProperty('--b2b-cart-sticky-top', `${this.referenceElement.offsetTop}px`);
|
|
299
|
-
}
|
|
300
|
-
else {
|
|
301
|
-
this.hostElement.style.removeProperty('--b2b-cart-sticky-top');
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
};
|
|
305
|
-
/**
|
|
306
|
-
* Renders Cart content depending on context
|
|
307
|
-
* @param context
|
|
308
|
-
* @returns
|
|
309
|
-
*/
|
|
310
|
-
this.renderCart = (context = 'edit') => {
|
|
311
|
-
var _a;
|
|
312
|
-
const isCartEmpty = !b2bState.cart.size;
|
|
313
|
-
let summaryAmounts = { primary: 0, secondary: 0 };
|
|
314
|
-
let summaryCounts = { primary: 0, secondary: 0 };
|
|
315
|
-
let summaryWouldBeAmount = 0;
|
|
316
|
-
for (const [key, count] of b2bState.cart) {
|
|
317
|
-
const details = b2bState.productDetails.get(key);
|
|
318
|
-
if (!details) {
|
|
319
|
-
continue;
|
|
320
|
-
}
|
|
321
|
-
summaryAmounts[details.categoryType] += ((_a = details.discountAmount) !== null && _a !== void 0 ? _a : details.amount) * count;
|
|
322
|
-
summaryCounts[details.categoryType] += 1;
|
|
323
|
-
summaryWouldBeAmount += details.amount * count;
|
|
324
|
-
}
|
|
325
|
-
const { primary: primaryAmount, secondary: secondaryAmount } = summaryAmounts;
|
|
326
|
-
const summaryAmount = primaryAmount + secondaryAmount;
|
|
327
|
-
const summarySavings = summaryWouldBeAmount - summaryAmount;
|
|
328
|
-
const { primary, secondary } = this.areProductsAddedToCart();
|
|
329
|
-
const hasPrimaryNotification = context === 'edit' && this.checkoutAttempted && !primary;
|
|
330
|
-
const hasSecondaryNotification = context === 'edit' && this.checkoutAttempted && !secondary;
|
|
331
|
-
const data = {
|
|
332
|
-
summaryAmount: summaryAmount.toFixed(2),
|
|
333
|
-
primaryAmount: primaryAmount.toFixed(2),
|
|
334
|
-
secondaryAmount: secondaryAmount.toFixed(2),
|
|
335
|
-
primaryCount: summaryCounts.primary,
|
|
336
|
-
secondaryCount: summaryCounts.secondary,
|
|
337
|
-
summarySavings: summarySavings.toFixed(2),
|
|
338
|
-
hasPrimaryNotification,
|
|
339
|
-
hasSecondaryNotification
|
|
340
|
-
};
|
|
341
|
-
const ctaButton = context === 'edit' ? (h("tet-button", { onClick: this.checkout, slot: "cta", class: "cart__cta", type: "primary", size: this.isDesktopResolution ? 'large' : 'medium', theme: this.theme }, t('components-b2b-cart-cta-button-title'))) : null;
|
|
342
|
-
return (h("tet-b2b-configurator-cart", { ref: (el) => (context === 'edit' ? (this.cartEl = el) : null), context: context, class: { 'cart': true, 'cart--empty': isCartEmpty, [`cart--${context}`]: true }, data: data, theme: this.theme, isCartEmpty: isCartEmpty, isDesktopResolution: this.isDesktopResolution }, this.renderCartCardsList(context), ctaButton));
|
|
343
|
-
};
|
|
344
|
-
/** Checks if both primary and secondary products are currently in cart */
|
|
345
|
-
this.areProductsAddedToCart = () => {
|
|
346
|
-
const productsInCart = { primary: false, secondary: false };
|
|
347
|
-
for (const [key, _] of b2bState.cart) {
|
|
348
|
-
const details = b2bState.productDetails.get(key);
|
|
349
|
-
if (!details) {
|
|
350
|
-
continue;
|
|
351
|
-
}
|
|
352
|
-
productsInCart[details.categoryType] = true;
|
|
353
|
-
}
|
|
354
|
-
return productsInCart;
|
|
355
|
-
};
|
|
356
|
-
/** Cart checkout handler. Opens Checkout component*/
|
|
357
|
-
this.checkout = () => {
|
|
358
|
-
this.checkoutAttempted = true;
|
|
359
|
-
const { primary, secondary } = this.areProductsAddedToCart();
|
|
360
|
-
if (primary && secondary) {
|
|
361
|
-
this.checkoutFormEl.open();
|
|
362
|
-
}
|
|
363
|
-
};
|
|
364
|
-
/**
|
|
365
|
-
* Catches emitted checkout form data
|
|
366
|
-
* Combines with cart data and re-emits
|
|
367
|
-
* @param e
|
|
368
|
-
*/
|
|
369
|
-
this.submit = ({ detail }) => {
|
|
370
|
-
const data = {
|
|
371
|
-
cart: getCart(),
|
|
372
|
-
contactInfo: detail
|
|
373
|
-
};
|
|
374
|
-
this.formState = 'loading';
|
|
375
|
-
this.b2bConfiguratorSubmit.emit(data);
|
|
376
|
-
this.checkoutFormEl.close();
|
|
377
|
-
this.submissionStateDialogEl.open();
|
|
378
|
-
};
|
|
379
|
-
this.renderCheckoutForm = () => {
|
|
380
|
-
return (h("tet-b2b-check-out-form", { ref: (el) => (this.checkoutFormEl = el), theme: this.theme, "onSubmit-check-out-form": this.submit }, h("div", { slot: "cart" }, this.renderCart('checkout'))));
|
|
381
|
-
};
|
|
382
12
|
this.referenceElement = undefined;
|
|
383
13
|
this.isLoading = true;
|
|
384
14
|
this.itemToRemove = null;
|
|
@@ -392,6 +22,25 @@ export class TetB2bConfigurator {
|
|
|
392
22
|
this.theme = 'light';
|
|
393
23
|
this.stickyRefEl = '';
|
|
394
24
|
}
|
|
25
|
+
hostElement;
|
|
26
|
+
/** @private The suffix for the price displayed - "€/mēn."). */
|
|
27
|
+
priceSuffix = '€/mēn.';
|
|
28
|
+
/**The reference to cart element. */
|
|
29
|
+
cartEl;
|
|
30
|
+
/**The reference to confirmation Modal, shown on delete events. */
|
|
31
|
+
confirmationDialogEl;
|
|
32
|
+
/**The reference to submission state Modal, shown after form submit action. */
|
|
33
|
+
submissionStateDialogEl;
|
|
34
|
+
/**The reference to checkout Modal Form. */
|
|
35
|
+
checkoutFormEl;
|
|
36
|
+
/** @private Reference to 1st inner accordion element*/
|
|
37
|
+
primaryAccordionEl;
|
|
38
|
+
/** @private Reference to 2nd inner accordion element*/
|
|
39
|
+
secondaryAccordionEl;
|
|
40
|
+
/** @private Reference to 1st inner accordion element*/
|
|
41
|
+
primaryNavEl;
|
|
42
|
+
/** @private Reference to 2nd inner accordion element*/
|
|
43
|
+
secondaryNavEl;
|
|
395
44
|
/** Resets selected (open) primary cards on category change */
|
|
396
45
|
resetSelectedPrimaryCards() {
|
|
397
46
|
this.selectedPrimaryCards = [];
|
|
@@ -400,6 +49,12 @@ export class TetB2bConfigurator {
|
|
|
400
49
|
resetSelectedSecondaryCards() {
|
|
401
50
|
this.selectedSecondaryCards = [];
|
|
402
51
|
}
|
|
52
|
+
/** Emitted when the compare link for a category is clicked. */
|
|
53
|
+
compareLinkClick;
|
|
54
|
+
/** The submit event of the B2B configurator. */
|
|
55
|
+
b2bConfiguratorSubmit;
|
|
56
|
+
/** Emitted when the close button of success modal is clicked. */
|
|
57
|
+
successCloseClick;
|
|
403
58
|
/** Checks for desktop resolution and intializes the sticky element's reference using the provided prop or the host's parent */
|
|
404
59
|
async componentWillLoad() {
|
|
405
60
|
this.checkDesktopResolution();
|
|
@@ -414,12 +69,11 @@ export class TetB2bConfigurator {
|
|
|
414
69
|
* - sticky elements position
|
|
415
70
|
*/
|
|
416
71
|
async componentDidLoad() {
|
|
417
|
-
var _a, _b;
|
|
418
72
|
this.isLoading = true;
|
|
419
73
|
await ensureMinDuration(this.fetchData, MIN_LOAD_TIME);
|
|
420
74
|
this.isLoading = false;
|
|
421
|
-
this.activePrimaryCategoryId =
|
|
422
|
-
this.activeSecondaryCategoryId =
|
|
75
|
+
this.activePrimaryCategoryId = b2bState.data.find((category) => category.type === 'primary')?.id || null;
|
|
76
|
+
this.activeSecondaryCategoryId = b2bState.data.find((category) => category.type === 'secondary')?.id || null;
|
|
423
77
|
this.positionStickyCartEl();
|
|
424
78
|
}
|
|
425
79
|
/**
|
|
@@ -433,6 +87,371 @@ export class TetB2bConfigurator {
|
|
|
433
87
|
async setSubmitFormState(value) {
|
|
434
88
|
this.formState = value;
|
|
435
89
|
}
|
|
90
|
+
/** Syncs desktop resolution with state variable */
|
|
91
|
+
checkDesktopResolution = () => {
|
|
92
|
+
this.isDesktopResolution = window.innerWidth >= DESKTOP_BREAKPOINT;
|
|
93
|
+
};
|
|
94
|
+
/** Fetches the data and passes it to Stencil store */
|
|
95
|
+
fetchData = async () => {
|
|
96
|
+
const data = await b2bConfigurator();
|
|
97
|
+
initData(data);
|
|
98
|
+
};
|
|
99
|
+
/** Renders the placeholdes/skeleton */
|
|
100
|
+
renderPlaceholder = () => {
|
|
101
|
+
const darkTheme = this.theme === 'dark';
|
|
102
|
+
return [
|
|
103
|
+
h("div", { class: "offer placeholder" }, h("div", { style: { padding: this.isDesktopResolution ? '1.5rem' : '1rem' } }, h("tet-placeholder", { class: "placeholder", height: this.isDesktopResolution ? '2rem' : '1.5rem', darkTheme: darkTheme })), h("div", { class: "offer__content" }, h("tet-placeholder", { class: "placeholder offer__navigation", height: this.isDesktopResolution ? '48rem' : ' 2.25rem', darkTheme: darkTheme, style: { margin: '0' } }), h("div", { class: "offer__cards" }, h("div", { class: "offer__cards-list" }, h("tet-placeholder", { class: "placeholder", height: "3rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }), h("tet-placeholder", { class: "placeholder", height: "10.25rem", darkTheme: darkTheme }))))),
|
|
104
|
+
h("div", { class: "cart cart--empty", style: {
|
|
105
|
+
'padding': '1.5rem 1rem 1rem',
|
|
106
|
+
'background-color': `var(--b2b-background-color)`
|
|
107
|
+
} }, h("tet-placeholder", { class: "placeholder", height: "12.75rem", darkTheme: darkTheme }))
|
|
108
|
+
];
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Handles event form navigation and sets currently active categories
|
|
112
|
+
* @param e
|
|
113
|
+
* @returns
|
|
114
|
+
*/
|
|
115
|
+
categoryClickHandler = (e) => {
|
|
116
|
+
const { id } = e.detail;
|
|
117
|
+
const category = this.getCategoryById(id);
|
|
118
|
+
if (!category) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (category.type === 'primary') {
|
|
122
|
+
this.activePrimaryCategoryId = id;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.activeSecondaryCategoryId = id;
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
/** Renders the offer section */
|
|
129
|
+
renderOffer = () => {
|
|
130
|
+
const blocks = [
|
|
131
|
+
{ name: t('components-b2b-offer-primary-title'), type: 'primary' },
|
|
132
|
+
{ name: t('components-b2b-offer-secondary-title'), type: 'secondary' }
|
|
133
|
+
];
|
|
134
|
+
return (h("div", { class: { offer: true, [`offer--${this.theme}`]: true } }, blocks.map((block) => {
|
|
135
|
+
const menuItems = b2bState.data
|
|
136
|
+
.filter((item) => item.type === block.type)
|
|
137
|
+
.map((category) => {
|
|
138
|
+
const { id, name, icon } = category;
|
|
139
|
+
const selected = id === this.activePrimaryCategoryId || id === this.activeSecondaryCategoryId;
|
|
140
|
+
return { id, name, icon, selected };
|
|
141
|
+
});
|
|
142
|
+
const accRefCallback = (el) => {
|
|
143
|
+
if (block.type === 'primary') {
|
|
144
|
+
this.primaryAccordionEl = el;
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
this.secondaryAccordionEl = el;
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const navRefCallback = (el) => {
|
|
151
|
+
if (block.type === 'primary') {
|
|
152
|
+
this.primaryNavEl = el;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.secondaryNavEl = el;
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
return (h("tet-accordion", { ref: accRefCallback, key: block.type, class: "offer__block", isOpen: block.type === 'primary', header: block.name, withBorder: true, theme: this.theme, transparentBackground: true }, h("div", { class: "offer__content" }, h("div", { class: "offer__navigation" }, h("tet-business-navigation", { ref: navRefCallback, menuItems: menuItems, theme: this.theme, "onMenu-click-event": this.categoryClickHandler })), this.renderCards(block.type))));
|
|
159
|
+
})));
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Finds category by id. Returns category or undefined.
|
|
163
|
+
* @param categoryId
|
|
164
|
+
* @returns
|
|
165
|
+
*/
|
|
166
|
+
getCategoryById = (categoryId) => {
|
|
167
|
+
return b2bState.data.find((category) => category.id === categoryId);
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Event, emitted on compare link click with the relevant modal Id
|
|
171
|
+
* @param categoryId
|
|
172
|
+
* @returns
|
|
173
|
+
*/
|
|
174
|
+
onCompareLinkClick = (categoryId) => {
|
|
175
|
+
const category = this.getCategoryById(categoryId);
|
|
176
|
+
if (!category || !category.modalScreenId) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
this.compareLinkClick.emit(category.modalScreenId);
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Handles card selection (aka. oepen state). Checks for single|multi choice
|
|
183
|
+
* @param cardId
|
|
184
|
+
* @param categoryId
|
|
185
|
+
* @returns
|
|
186
|
+
*/
|
|
187
|
+
handleCardSelected = (cardId, categoryId) => {
|
|
188
|
+
const category = this.getCategoryById(categoryId);
|
|
189
|
+
if (!category) {
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
const { type, allowMultipleChoice } = category;
|
|
193
|
+
if (type === 'primary') {
|
|
194
|
+
if (this.selectedPrimaryCards.includes(cardId)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this.selectedPrimaryCards = allowMultipleChoice ? [...this.selectedPrimaryCards, cardId] : [cardId];
|
|
198
|
+
}
|
|
199
|
+
else {
|
|
200
|
+
if (this.selectedSecondaryCards.includes(cardId)) {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
this.selectedSecondaryCards = allowMultipleChoice ? [...this.selectedSecondaryCards, cardId] : [cardId];
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* Updates product in cart (add, edit, remove)
|
|
208
|
+
* In desktop mode - changes state of summary cart's accordions
|
|
209
|
+
* @param e
|
|
210
|
+
* @param categoryId
|
|
211
|
+
*/
|
|
212
|
+
handleProductCountChanged = async (e, categoryId) => {
|
|
213
|
+
const { cardId, count } = e.detail;
|
|
214
|
+
const productCategory = this.getCategoryById(categoryId);
|
|
215
|
+
if (!productCategory || b2bState.cart.get(cardId) === count) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (!count) {
|
|
219
|
+
this.itemToRemove = cardId;
|
|
220
|
+
this.confirmationDialogEl.open();
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
if (!productCategory.allowMultipleChoice) {
|
|
224
|
+
productCategory.products.forEach((product) => product.productCode !== cardId && removeFromCart(product.productCode));
|
|
225
|
+
}
|
|
226
|
+
addToCart(cardId, count);
|
|
227
|
+
if (this.isDesktopResolution) {
|
|
228
|
+
this.cartEl.changeBlockState(productCategory.type, 'open');
|
|
229
|
+
this.cartEl.changeBlockState(productCategory.type === 'primary' ? 'secondary' : 'primary', 'close');
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
/** Resets itemId to be removed when confirmation dialog is closed */
|
|
233
|
+
onConfirmationClose = () => {
|
|
234
|
+
this.itemToRemove = null;
|
|
235
|
+
};
|
|
236
|
+
/** Renders confirmation dialog, shown on product removal action */
|
|
237
|
+
renderConfirmationDialog = () => {
|
|
238
|
+
return (h("tet-dialog", { ref: (el) => (this.confirmationDialogEl = el), class: this.theme, closeOnOverlayClick: false, onCloseDialog: this.onConfirmationClose, theme: this.theme }, h("div", { class: "action-dialog" }, h("tet-icon", { class: "action-dialog__icon action-dialog__attention-icon", name: "attention" }), h("div", { class: "action-dialog__title" }, t('components-b2b-item-remove-confirmation-title'))), h("div", { slot: "footer", class: "action-dialog__footer" }, h("tet-button", { class: "action-dialog__button", type: "secondary", theme: this.theme, size: "large", onClick: () => this.confirmationDialogEl.close() }, t('components-b2b-item-remove-confirmation-decline')), h("tet-button", { class: "action-dialog__button", type: "primary", theme: this.theme, size: "large", iconName: "tc-trash", iconPosition: "left", onClick: () => {
|
|
239
|
+
removeFromCart(this.itemToRemove);
|
|
240
|
+
this.confirmationDialogEl.close();
|
|
241
|
+
} }, t('components-b2b-item-remove-confirmation-accept')))));
|
|
242
|
+
};
|
|
243
|
+
/** Performs action to start again */
|
|
244
|
+
resetState = () => {
|
|
245
|
+
resetCart();
|
|
246
|
+
this.checkoutAttempted = false;
|
|
247
|
+
this.primaryAccordionEl.open();
|
|
248
|
+
this.secondaryAccordionEl.close();
|
|
249
|
+
};
|
|
250
|
+
/** Renders dialog, shown after form submit */
|
|
251
|
+
renderSubmissionStateDialog = () => {
|
|
252
|
+
const isFormSubmitLoading = this.formState === 'loading';
|
|
253
|
+
const successClose = () => {
|
|
254
|
+
this.resetState();
|
|
255
|
+
this.successCloseClick.emit();
|
|
256
|
+
this.submissionStateDialogEl.close();
|
|
257
|
+
};
|
|
258
|
+
const content = isFormSubmitLoading ? (h("div", { class: "action-dialog" }, h("tet-spinner", { theme: this.theme }), h("div", { class: "action-dialog__title" }, t('components-b2b-loading-dialog-title')), h("div", { class: "action-dialog__description" }, t('components-b2b-loading-dialog-description')))) : ([
|
|
259
|
+
h("div", { class: "action-dialog" }, h("tet-icon", { class: "action-dialog__icon action-dialog__success-icon", name: "tc-check-circle" }), h("div", { class: "action-dialog__title" }, t('components-b2b-success-dialog-title')), h("div", { class: "action-dialog__description" }, t('components-b2b-success-dialog-description'))),
|
|
260
|
+
h("div", { slot: "footer", class: "action-dialog__footer" }, h("tet-button", { class: "action-dialog__button", type: "secondary", theme: this.theme, size: "large", onClick: successClose }, h("div", { class: "action-dialog__button-text" }, t('components-b2b-success-dialog-close'))), h("tet-button", { class: "action-dialog__button", type: "primary", theme: this.theme, size: "large", onClick: () => {
|
|
261
|
+
this.resetState();
|
|
262
|
+
this.submissionStateDialogEl.close();
|
|
263
|
+
} }, h("div", { class: "action-dialog__button-text" }, t('components-b2b-success-dialog-start-again'))))
|
|
264
|
+
]);
|
|
265
|
+
return (h("tet-dialog", { ref: (el) => (this.submissionStateDialogEl = el), class: { [this.theme]: true, 'action-dialog--loading': isFormSubmitLoading }, closeOnOverlayClick: false, closeOnEscape: !isFormSubmitLoading, hideCloseButton: isFormSubmitLoading, theme: this.theme, onCloseDialog: this.formState === 'success' ? successClose : this.submissionStateDialogEl.close }, content));
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Renders offer section cards for the given category type
|
|
269
|
+
* @param categoryType The type of category block to render
|
|
270
|
+
* @returns
|
|
271
|
+
*/
|
|
272
|
+
renderCards = (categoryType) => {
|
|
273
|
+
const activeCategoryId = categoryType === 'primary' ? this.activePrimaryCategoryId : this.activeSecondaryCategoryId;
|
|
274
|
+
const selectedCards = categoryType === 'primary' ? this.selectedPrimaryCards : this.selectedSecondaryCards;
|
|
275
|
+
const products = this.getCategoryById(activeCategoryId)?.products || [];
|
|
276
|
+
const cards = products.map((product) => {
|
|
277
|
+
const { productCode: id, name: { lv: title }, description: { lv: subtitle }, amount: price, b2bConfiguratorProduct: { discountAmount: discountPrice, selectionType, defaultValue, minValue, maxValue, translationKey: label }, benefits: { lv: benefits }, contracts } = product;
|
|
278
|
+
const isBestChoice = !!product.attributes.find((attribute) => attribute.key === 'isBestChoice')?.value;
|
|
279
|
+
const counterOptions = selectionType === 'single'
|
|
280
|
+
? undefined
|
|
281
|
+
: {
|
|
282
|
+
defaultValue,
|
|
283
|
+
minValue,
|
|
284
|
+
maxValue,
|
|
285
|
+
label
|
|
286
|
+
};
|
|
287
|
+
const options = {
|
|
288
|
+
id,
|
|
289
|
+
title,
|
|
290
|
+
subtitle,
|
|
291
|
+
isBestChoice,
|
|
292
|
+
price,
|
|
293
|
+
discountPrice,
|
|
294
|
+
benefits: benefits.split('\n'),
|
|
295
|
+
contract: contracts[0]?.contract,
|
|
296
|
+
counterOptions
|
|
297
|
+
};
|
|
298
|
+
const isSelected = selectedCards.includes(id);
|
|
299
|
+
return (h("tet-b2b-compare-card", { options: options, theme: this.theme, key: id, isSelected: isSelected, onSelectedChange: () => this.handleCardSelected(id, activeCategoryId), count: b2bState.cart.get(id), onCountChange: (e) => this.handleProductCountChanged(e, activeCategoryId) }));
|
|
300
|
+
});
|
|
301
|
+
return (h("div", { class: "offer__cards" }, h("div", { class: "offer__cards-header" }, h("div", { class: "offer__cards-title" }, t('components-b2b-offer-product-list-title')), h("button", { class: { 'button-reset': true, 'compare__button': true, [`${this.theme}`]: true }, onClick: () => {
|
|
302
|
+
this.onCompareLinkClick(activeCategoryId);
|
|
303
|
+
} }, h("span", { class: { 'compare__text': true, 'tet-link': true, [`${this.theme}`]: true } }, t('components-b2b-offer-compare-link-text')), h("div", { class: "compare__icon-wrapper" }, h("tet-icon", { class: "compare__icon", name: "tc-info-circle-outline", theme: this.theme })))), h("div", { class: "offer__cards-list" }, cards)));
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Translates Cart "count change" event and uses in the general "count change" handler
|
|
307
|
+
* @param cardId
|
|
308
|
+
* @param count
|
|
309
|
+
* @param categoryId
|
|
310
|
+
*/
|
|
311
|
+
handleCartProductCountChange = (cardId, count, categoryId) => {
|
|
312
|
+
const updateEvent = { detail: { cardId, count } };
|
|
313
|
+
this.handleProductCountChanged(updateEvent, categoryId);
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* Navigates user in offer section by opening accordion and selecting the specific product which was clicked in cart component
|
|
317
|
+
* @param categoryId
|
|
318
|
+
* @param productCode
|
|
319
|
+
* @returns
|
|
320
|
+
*/
|
|
321
|
+
goToProduct = async (categoryId, productCode) => {
|
|
322
|
+
const category = this.getCategoryById(categoryId);
|
|
323
|
+
if (!category) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
if (category.type === 'primary') {
|
|
327
|
+
await this.primaryAccordionEl.open();
|
|
328
|
+
await this.primaryNavEl.selectMenuItem(categoryId);
|
|
329
|
+
this.primaryAccordionEl.scrollIntoView({ behavior: 'smooth' });
|
|
330
|
+
}
|
|
331
|
+
else if (category.type === 'secondary') {
|
|
332
|
+
await this.secondaryAccordionEl.open();
|
|
333
|
+
await this.secondaryNavEl.selectMenuItem(categoryId);
|
|
334
|
+
this.secondaryAccordionEl.scrollIntoView({ behavior: 'smooth' });
|
|
335
|
+
}
|
|
336
|
+
setTimeout(() => {
|
|
337
|
+
this.handleCardSelected(productCode, categoryId);
|
|
338
|
+
}, 0);
|
|
339
|
+
};
|
|
340
|
+
/**
|
|
341
|
+
* Renders list of Cards in Cart depending on context
|
|
342
|
+
* @param context
|
|
343
|
+
* @returns
|
|
344
|
+
*/
|
|
345
|
+
renderCartCardsList = (context) => {
|
|
346
|
+
const categoryTypes = ['primary', 'secondary'];
|
|
347
|
+
const productCodeToSummaryCard = (productCode) => {
|
|
348
|
+
const count = b2bState.cart.get(productCode);
|
|
349
|
+
const details = b2bState.productDetails.get(productCode);
|
|
350
|
+
if (count === undefined || !details) {
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
353
|
+
const { name, amount, description, discountAmount, categoryName, categoryType, categoryId, b2bConfiguratorProduct } = details;
|
|
354
|
+
const productDescription = categoryType === 'primary' ? description : categoryName;
|
|
355
|
+
const { selectionType, term, minValue, maxValue, translationKey } = b2bConfiguratorProduct;
|
|
356
|
+
return (h("tet-business-summary-card", { key: productCode, productName: name, price: amount, productDescription: productDescription, discountPrice: discountAmount, currency: this.priceSuffix, contractTerm: term, theme: this.theme, withStepper: selectionType === 'number', value: count, minValue: minValue, maxValue: maxValue, stepperLabel: t(translationKey || ''), context: context, onAmountChange: (e) => this.handleCartProductCountChange(productCode, e.detail, categoryId), onDeleteButtonClick: () => this.handleCartProductCountChange(productCode, 0, categoryId), onEditButtonClick: () => this.goToProduct(categoryId, productCode) }));
|
|
357
|
+
};
|
|
358
|
+
return categoryTypes.map((type) => {
|
|
359
|
+
const summaryCards = [...b2bState.cart]
|
|
360
|
+
.filter(([productCode]) => {
|
|
361
|
+
const details = b2bState.productDetails.get(productCode);
|
|
362
|
+
return details && details.categoryType === type;
|
|
363
|
+
})
|
|
364
|
+
.map(([productCode]) => productCodeToSummaryCard(productCode));
|
|
365
|
+
return summaryCards.length ? (h("div", { class: "cart__card-list", slot: type }, summaryCards)) : null;
|
|
366
|
+
});
|
|
367
|
+
};
|
|
368
|
+
/** Adjusts the top position variable for the sticky cart element */
|
|
369
|
+
positionStickyCartEl = () => {
|
|
370
|
+
if (this.referenceElement) {
|
|
371
|
+
if (this.isDesktopResolution) {
|
|
372
|
+
this.hostElement.style.setProperty('--b2b-cart-sticky-top', `${this.referenceElement.offsetTop}px`);
|
|
373
|
+
}
|
|
374
|
+
else {
|
|
375
|
+
this.hostElement.style.removeProperty('--b2b-cart-sticky-top');
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
/**
|
|
380
|
+
* Renders Cart content depending on context
|
|
381
|
+
* @param context
|
|
382
|
+
* @returns
|
|
383
|
+
*/
|
|
384
|
+
renderCart = (context = 'edit') => {
|
|
385
|
+
const isCartEmpty = !b2bState.cart.size;
|
|
386
|
+
let summaryAmounts = { primary: 0, secondary: 0 };
|
|
387
|
+
let summaryCounts = { primary: 0, secondary: 0 };
|
|
388
|
+
let summaryWouldBeAmount = 0;
|
|
389
|
+
for (const [key, count] of b2bState.cart) {
|
|
390
|
+
const details = b2bState.productDetails.get(key);
|
|
391
|
+
if (!details) {
|
|
392
|
+
continue;
|
|
393
|
+
}
|
|
394
|
+
summaryAmounts[details.categoryType] += (details.discountAmount ?? details.amount) * count;
|
|
395
|
+
summaryCounts[details.categoryType] += 1;
|
|
396
|
+
summaryWouldBeAmount += details.amount * count;
|
|
397
|
+
}
|
|
398
|
+
const { primary: primaryAmount, secondary: secondaryAmount } = summaryAmounts;
|
|
399
|
+
const summaryAmount = primaryAmount + secondaryAmount;
|
|
400
|
+
const summarySavings = summaryWouldBeAmount - summaryAmount;
|
|
401
|
+
const { primary, secondary } = this.areProductsAddedToCart();
|
|
402
|
+
const hasPrimaryNotification = context === 'edit' && this.checkoutAttempted && !primary;
|
|
403
|
+
const hasSecondaryNotification = context === 'edit' && this.checkoutAttempted && !secondary;
|
|
404
|
+
const data = {
|
|
405
|
+
summaryAmount: summaryAmount.toFixed(2),
|
|
406
|
+
primaryAmount: primaryAmount.toFixed(2),
|
|
407
|
+
secondaryAmount: secondaryAmount.toFixed(2),
|
|
408
|
+
primaryCount: summaryCounts.primary,
|
|
409
|
+
secondaryCount: summaryCounts.secondary,
|
|
410
|
+
summarySavings: summarySavings.toFixed(2),
|
|
411
|
+
hasPrimaryNotification,
|
|
412
|
+
hasSecondaryNotification
|
|
413
|
+
};
|
|
414
|
+
const ctaButton = context === 'edit' ? (h("tet-button", { onClick: this.checkout, slot: "cta", class: "cart__cta", type: "primary", size: this.isDesktopResolution ? 'large' : 'medium', theme: this.theme }, t('components-b2b-cart-cta-button-title'))) : null;
|
|
415
|
+
return (h("tet-b2b-configurator-cart", { ref: (el) => (context === 'edit' ? (this.cartEl = el) : null), context: context, class: { 'cart': true, 'cart--empty': isCartEmpty, [`cart--${context}`]: true }, data: data, theme: this.theme, isCartEmpty: isCartEmpty, isDesktopResolution: this.isDesktopResolution }, this.renderCartCardsList(context), ctaButton));
|
|
416
|
+
};
|
|
417
|
+
/** Checks if both primary and secondary products are currently in cart */
|
|
418
|
+
areProductsAddedToCart = () => {
|
|
419
|
+
const productsInCart = { primary: false, secondary: false };
|
|
420
|
+
for (const [key, _] of b2bState.cart) {
|
|
421
|
+
const details = b2bState.productDetails.get(key);
|
|
422
|
+
if (!details) {
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
productsInCart[details.categoryType] = true;
|
|
426
|
+
}
|
|
427
|
+
return productsInCart;
|
|
428
|
+
};
|
|
429
|
+
/** Cart checkout handler. Opens Checkout component*/
|
|
430
|
+
checkout = () => {
|
|
431
|
+
this.checkoutAttempted = true;
|
|
432
|
+
const { primary, secondary } = this.areProductsAddedToCart();
|
|
433
|
+
if (primary && secondary) {
|
|
434
|
+
this.checkoutFormEl.open();
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Catches emitted checkout form data
|
|
439
|
+
* Combines with cart data and re-emits
|
|
440
|
+
* @param e
|
|
441
|
+
*/
|
|
442
|
+
submit = ({ detail }) => {
|
|
443
|
+
const data = {
|
|
444
|
+
cart: getCart(),
|
|
445
|
+
contactInfo: detail
|
|
446
|
+
};
|
|
447
|
+
this.formState = 'loading';
|
|
448
|
+
this.b2bConfiguratorSubmit.emit(data);
|
|
449
|
+
this.checkoutFormEl.close();
|
|
450
|
+
this.submissionStateDialogEl.open();
|
|
451
|
+
};
|
|
452
|
+
renderCheckoutForm = () => {
|
|
453
|
+
return (h("tet-b2b-check-out-form", { ref: (el) => (this.checkoutFormEl = el), theme: this.theme, "onSubmit-check-out-form": this.submit }, h("div", { slot: "cart" }, this.renderCart('checkout'))));
|
|
454
|
+
};
|
|
436
455
|
render() {
|
|
437
456
|
return (h(Host, { key: '1e097cec9901e3772f4dbff047f1a28aee8630c7' }, h("div", { key: 'c2b15b14deea0b7973dd7fee59d48a3ce4a60f40', class: { configurator: true, [`${this.theme}`]: true } }, this.isLoading ? this.renderPlaceholder() : b2bState.data && [this.renderOffer(), this.renderCart()]), this.renderCheckoutForm(), this.renderConfirmationDialog(), this.renderSubmissionStateDialog()));
|
|
438
457
|
}
|