@tet/tet-components 1.4.36-testing → 1.4.37-production
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-656e77f6.js → address-951109ee.js} +1 -1
- package/dist/cjs/{assets-f64f0e16.js → assets-c00a24d2.js} +1 -1
- package/dist/cjs/{async-request-fcf33aba.js → async-request-13036d6f.js} +1 -1
- package/dist/cjs/{http-codes-40da1e61.js → http-codes-16564d25.js} +1 -1
- package/dist/cjs/{index-3242ff3f.js → index-162b4cbc.js} +1 -1
- package/dist/cjs/{index-4b423f33.js → index-a59cbcb0.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{phone-055efd07.js → phone-39f20542.js} +2 -2
- package/dist/cjs/{product-comparison-88a89820.js → product-comparison-5535cd9e.js} +1 -1
- package/dist/cjs/tet-accordion.cjs.entry.js +1 -1
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +3 -3
- package/dist/cjs/tet-address-offers_4.cjs.entry.js +7 -7
- package/dist/cjs/tet-address-search.cjs.entry.js +4 -4
- package/dist/cjs/tet-asset-addresses.cjs.entry.js +3 -3
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/tet-autocomplete.cjs.entry.js +9 -3
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +26 -14
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +4 -4
- package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +3 -3
- package/dist/cjs/tet-banner-nav.cjs.entry.js +3 -3
- package/dist/cjs/tet-bar-graph.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-lines.cjs.entry.js +4 -4
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-button.cjs.entry.js +1 -1
- package/dist/cjs/tet-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-carousel.cjs.entry.js +3 -3
- package/dist/cjs/tet-checkbox_3.cjs.entry.js +1 -1
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +3 -3
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +3 -3
- package/dist/cjs/tet-colors.cjs.entry.js +1 -1
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-components.cjs.js +2 -2
- package/dist/cjs/tet-contact-form.cjs.entry.js +5 -5
- package/dist/cjs/tet-contact-info.cjs.entry.js +1 -1
- package/dist/cjs/tet-container_2.cjs.entry.js +1 -1
- package/dist/cjs/tet-counter.cjs.entry.js +1 -1
- package/dist/cjs/tet-customer-assets.cjs.entry.js +3 -3
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +1 -1
- package/dist/cjs/tet-datepicker.cjs.entry.js +1 -1
- package/dist/cjs/tet-dialog.cjs.entry.js +3 -3
- package/dist/cjs/tet-display.cjs.entry.js +1 -1
- package/dist/cjs/tet-divider.cjs.entry.js +1 -1
- package/dist/cjs/tet-dynamic-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-expandable-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/tet-feedback-form.cjs.entry.js +5 -5
- package/dist/cjs/tet-filter.cjs.entry.js +1 -1
- package/dist/cjs/tet-floating-block.cjs.entry.js +1 -1
- 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 +3 -3
- package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +3 -3
- 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-card-list.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 +6 -6
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +95 -36
- package/dist/cjs/tet-menu.cjs.entry.js +1 -1
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +3 -3
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +1 -1
- package/dist/cjs/tet-news-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-notification.cjs.entry.js +1 -1
- package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-placeholder.cjs.entry.js +1 -1
- package/dist/cjs/tet-position.cjs.entry.js +1 -1
- package/dist/cjs/tet-price-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-radio.cjs.entry.js +1 -1
- package/dist/cjs/tet-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/tet-referral.cjs.entry.js +5 -5
- package/dist/cjs/tet-round-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card-badge.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card-group.cjs.entry.js +1 -1
- package/dist/cjs/tet-snicker-card.cjs.entry.js +3 -3
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-spinner.cjs.entry.js +1 -1
- package/dist/cjs/tet-stepper-input.cjs.entry.js +3 -3
- package/dist/cjs/tet-stepper-v2.cjs.entry.js +1 -1
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
- package/dist/cjs/tet-stepper.cjs.entry.js +1 -1
- package/dist/cjs/tet-support-search.cjs.entry.js +32 -5
- package/dist/cjs/tet-switch.cjs.entry.js +1 -1
- package/dist/cjs/tet-tab-header.cjs.entry.js +1 -1
- package/dist/cjs/tet-table.cjs.entry.js +1 -1
- package/dist/cjs/tet-tag_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-text.cjs.entry.js +1 -1
- package/dist/cjs/tet-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tet-thank-you-view-v2.cjs.entry.js +3 -3
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +3 -3
- package/dist/cjs/tet-thank-you-view.cjs.entry.js +1 -1
- package/dist/cjs/tet-tv-gift-block.cjs.entry.js +1 -1
- package/dist/cjs/tet-tv-gift-list.cjs.entry.js +1 -1
- package/dist/cjs/{theme-wrapper-66880718.js → theme-wrapper-cde3168f.js} +2 -2
- package/dist/cjs/{translations-03c9de64.js → translations-ca556860.js} +1 -1
- package/dist/collection/assets/icons/icon-map.json +1 -1
- package/dist/collection/assets/icons/tc/tc-add-money.svg +7 -0
- package/dist/collection/assets/icons/tc/tc-edit-services.svg +5 -0
- package/dist/collection/assets/icons/tc/tc-touch.svg +3 -0
- package/dist/collection/assets/icons/tc/tc-transfer.svg +4 -0
- package/dist/collection/components/advanced/address/tet-autocomplete/tet-autocomplete.js +22 -2
- package/dist/collection/components/advanced/forms/tet-feedback-form/tet-feedback-form.js +2 -2
- package/dist/collection/components/advanced/search/tet-support-search/tet-support-search.js +68 -5
- package/dist/collection/components/basic/icon/tet-icon.js +2 -2
- package/dist/collection/components/simple/menu/tet-business-navigation/tet-business-navigation.js +59 -11
- package/dist/collection/components/simple/menu/tet-menu-mobile/tet-menu-mobile.css +84 -57
- package/dist/collection/components/simple/menu/tet-menu-mobile/tet-menu-mobile.js +116 -37
- package/dist/components/assets/icons/icon-map.json +1 -1
- package/dist/components/assets/icons/tc/tc-add-money.svg +7 -0
- package/dist/components/assets/icons/tc/tc-edit-services.svg +5 -0
- package/dist/components/assets/icons/tc/tc-touch.svg +3 -0
- package/dist/components/assets/icons/tc/tc-transfer.svg +4 -0
- package/dist/components/index.js +1 -1
- package/dist/components/{p-26afe09a.js → p-00d15f28.js} +7 -7
- package/dist/components/{p-715aabc1.js → p-0be06e48.js} +10 -10
- package/dist/components/{p-4061b379.js → p-2653b746.js} +5 -5
- package/dist/components/{p-c615bc41.js → p-2a33c5d8.js} +1 -1
- package/dist/components/{p-58991856.js → p-2bf20615.js} +1 -1
- package/dist/components/{p-19a63760.js → p-300e9cf0.js} +1 -1
- package/dist/components/{p-73a547c8.js → p-310232fe.js} +3 -3
- package/dist/components/{p-1dc3b03c.js → p-3a16c3af.js} +3 -3
- package/dist/components/{p-ea70eb16.js → p-3a934577.js} +2 -2
- package/dist/components/{p-f1380f68.js → p-3dd6d065.js} +3 -3
- package/dist/components/{p-869958e9.js → p-3f93ecef.js} +2 -2
- package/dist/components/{p-848ec723.js → p-42c65c66.js} +1 -1
- package/dist/components/{p-d96c9c10.js → p-508d3bbf.js} +11 -5
- package/dist/components/{p-e9bf0228.js → p-50bc472a.js} +1 -1
- package/dist/components/{p-f76fad86.js → p-5dcf08ec.js} +1 -1
- package/dist/components/{p-ce823477.js → p-6062e752.js} +2 -2
- package/dist/components/{p-ee54db57.js → p-72ea9b04.js} +1 -1
- package/dist/components/{p-548501b5.js → p-7650876b.js} +1 -1
- package/dist/components/{p-c6354c8f.js → p-77b42f83.js} +29 -15
- package/dist/components/{p-b0040cc1.js → p-785ad00e.js} +2 -2
- package/dist/components/{p-b66ed473.js → p-7c3e26d1.js} +10 -10
- package/dist/components/{p-2985a16c.js → p-86458c39.js} +5 -5
- package/dist/components/{p-4468c9e9.js → p-8792ebce.js} +1 -1
- package/dist/components/{p-eca7dc6f.js → p-880870af.js} +2 -2
- package/dist/components/{p-25b93e8f.js → p-8b6ad07d.js} +1 -1
- package/dist/components/{p-6cd63078.js → p-8b7f3bc7.js} +1 -1
- package/dist/components/{p-250eb091.js → p-8e6abfc8.js} +3 -3
- package/dist/components/{p-595baac6.js → p-917ae03a.js} +1 -1
- package/dist/components/{p-4a4f4abf.js → p-93756e65.js} +2 -2
- package/dist/components/{p-c6c5425e.js → p-9d882e3c.js} +1 -1
- package/dist/components/{p-9c321f66.js → p-a133571c.js} +7 -7
- package/dist/components/{p-1ffee60d.js → p-a1aa008e.js} +2 -2
- package/dist/components/{p-c7f5caaa.js → p-a6b07fd2.js} +4 -4
- package/dist/components/{p-d32eca66.js → p-a89ff403.js} +2 -2
- package/dist/components/{p-86aaf990.js → p-a9eceeca.js} +3 -3
- package/dist/components/{p-6c2f67ce.js → p-ad4bf71e.js} +6 -6
- package/dist/components/{p-c527c604.js → p-b130fff0.js} +14 -14
- package/dist/components/{p-4e0e2b59.js → p-b1cfadab.js} +1 -1
- package/dist/components/{p-924b430a.js → p-b377f650.js} +1 -1
- package/dist/components/{p-61968c62.js → p-b69702c0.js} +2 -2
- package/dist/components/{p-13c2091d.js → p-b6eb0db9.js} +7 -7
- package/dist/components/{p-43ec1361.js → p-bc2addce.js} +2 -2
- package/dist/components/{p-dd3541f5.js → p-c13688d0.js} +1 -1
- package/dist/components/{p-0138c33f.js → p-cee6d522.js} +6 -6
- package/dist/components/{p-d41f8f87.js → p-d3e5371f.js} +2 -2
- package/dist/components/{p-b79e0d77.js → p-d4531928.js} +9 -9
- package/dist/components/{p-0d8e93da.js → p-d833ee5c.js} +1 -1
- package/dist/components/{p-4ff94d2c.js → p-dc0d5a92.js} +2 -2
- package/dist/components/{p-0e06a7a7.js → p-e08c6841.js} +7 -7
- package/dist/components/{p-b3f6c2ea.js → p-e2ed5f1b.js} +3 -3
- package/dist/components/{p-b453369c.js → p-eb255b53.js} +1 -1
- package/dist/components/{p-7620ce21.js → p-ebe463f5.js} +1 -1
- package/dist/components/{p-b58090e2.js → p-eee6f4f5.js} +6 -6
- package/dist/components/{p-ca8df28e.js → p-efebb41e.js} +3 -3
- package/dist/components/{p-44201f97.js → p-f0861d7a.js} +1 -1
- package/dist/components/{p-e1e52894.js → p-f11db6e7.js} +3 -3
- package/dist/components/{p-d69376b7.js → p-f3b79a9c.js} +2 -2
- package/dist/components/{p-52fcf7aa.js → p-fadcb8c0.js} +1 -1
- package/dist/components/{p-89c93c64.js → p-fdc21d19.js} +1 -1
- 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 +24 -24
- 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 +13 -13
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +5 -5
- 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 +20 -20
- package/dist/components/tet-b2b-service-calculator.js +8 -8
- package/dist/components/tet-banner-nav.js +3 -3
- package/dist/components/tet-bar-graph.js +1 -1
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-card.js +1 -1
- package/dist/components/tet-business-compare-card.js +3 -3
- package/dist/components/tet-business-lines.js +5 -5
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +2 -2
- 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 +4 -4
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +8 -8
- package/dist/components/tet-cloud-configurator.js +12 -12
- package/dist/components/tet-colors.js +1 -1
- package/dist/components/tet-compare-card-v2.js +9 -9
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +16 -16
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-contact-form.js +9 -9
- package/dist/components/tet-contact-info.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-counter.js +1 -1
- package/dist/components/tet-customer-assets.js +9 -9
- 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 +6 -6
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-display.js +8 -8
- package/dist/components/tet-divider.js +7 -7
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +4 -4
- package/dist/components/tet-expandable-input.js +3 -3
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-feedback-form.js +9 -9
- package/dist/components/tet-filter.js +4 -4
- package/dist/components/tet-floating-block.js +3 -3
- 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 +1 -1
- 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-card-list.js +3 -3
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-macd-view.js +10 -10
- package/dist/components/tet-menu-mobile.js +99 -37
- package/dist/components/tet-menu.js +2 -2
- package/dist/components/tet-multi-step-dialog.js +5 -5
- package/dist/components/tet-navigation-mobile.js +2 -2
- package/dist/components/tet-news-card-list.js +4 -4
- 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-position.js +7 -7
- 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 +6 -6
- package/dist/components/tet-round-stepper.js +2 -2
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-snicker-card-badge.js +1 -1
- package/dist/components/tet-snicker-card-group.js +1 -1
- package/dist/components/tet-snicker-card.js +11 -11
- 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-support-search.js +40 -11
- 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 +3 -3
- 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-text.js +7 -7
- package/dist/components/tet-textarea.js +1 -1
- package/dist/components/tet-thank-you-view-v2.js +5 -5
- package/dist/components/tet-thank-you-view-v3.js +5 -5
- package/dist/components/tet-thank-you-view.js +4 -4
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/components/tet-tv-gift-block.js +1 -1
- package/dist/components/tet-tv-gift-list.js +2 -2
- package/dist/esm/{address-1e0810e7.js → address-24e316f2.js} +1 -1
- package/dist/esm/{assets-e1349520.js → assets-343a0b59.js} +1 -1
- package/dist/esm/{async-request-4c945e13.js → async-request-a5159336.js} +1 -1
- package/dist/esm/{http-codes-1927ea00.js → http-codes-98d3e25c.js} +1 -1
- package/dist/esm/{index-aac31bd2.js → index-0da0d682.js} +1 -1
- package/dist/esm/{index-412df137.js → index-6c5bc6fc.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{phone-1a920c5c.js → phone-ea11e1d0.js} +2 -2
- package/dist/esm/{product-comparison-dd90c721.js → product-comparison-21980b84.js} +1 -1
- package/dist/esm/tet-accordion.entry.js +1 -1
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +3 -3
- package/dist/esm/tet-address-offers-view.entry.js +3 -3
- package/dist/esm/tet-address-offers_4.entry.js +7 -7
- package/dist/esm/tet-address-search.entry.js +4 -4
- package/dist/esm/tet-asset-addresses.entry.js +3 -3
- package/dist/esm/tet-autocomplete-dropdown.entry.js +1 -1
- package/dist/esm/tet-autocomplete.entry.js +9 -3
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +26 -14
- package/dist/esm/tet-b2b-configurator.entry.js +4 -4
- package/dist/esm/tet-b2b-service-calculator.entry.js +3 -3
- package/dist/esm/tet-banner-nav.entry.js +3 -3
- package/dist/esm/tet-bar-graph.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-card.entry.js +1 -1
- package/dist/esm/tet-business-compare-card.entry.js +1 -1
- package/dist/esm/tet-business-lines.entry.js +4 -4
- package/dist/esm/tet-business-round-stepper.entry.js +1 -1
- package/dist/esm/tet-button.entry.js +1 -1
- package/dist/esm/tet-card-list.entry.js +1 -1
- package/dist/esm/tet-carousel.entry.js +3 -3
- package/dist/esm/tet-checkbox_3.entry.js +1 -1
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +3 -3
- package/dist/esm/tet-cloud-configurator.entry.js +3 -3
- package/dist/esm/tet-colors.entry.js +1 -1
- package/dist/esm/tet-compare-card-v2.entry.js +3 -3
- package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
- package/dist/esm/tet-compare-cards_2.entry.js +3 -3
- package/dist/esm/tet-components.js +3 -3
- package/dist/esm/tet-contact-form.entry.js +5 -5
- package/dist/esm/tet-contact-info.entry.js +1 -1
- package/dist/esm/tet-container_2.entry.js +1 -1
- package/dist/esm/tet-counter.entry.js +1 -1
- package/dist/esm/tet-customer-assets.entry.js +3 -3
- package/dist/esm/tet-datepicker-header_4.entry.js +1 -1
- package/dist/esm/tet-datepicker.entry.js +1 -1
- package/dist/esm/tet-dialog.entry.js +3 -3
- package/dist/esm/tet-display.entry.js +1 -1
- package/dist/esm/tet-divider.entry.js +1 -1
- package/dist/esm/tet-dynamic-card.entry.js +1 -1
- package/dist/esm/tet-expandable-input.entry.js +1 -1
- package/dist/esm/tet-expansion-panel.entry.js +1 -1
- package/dist/esm/tet-feedback-form.entry.js +5 -5
- package/dist/esm/tet-filter.entry.js +1 -1
- package/dist/esm/tet-floating-block.entry.js +1 -1
- 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 +3 -3
- package/dist/esm/tet-inline-message.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +3 -3
- package/dist/esm/tet-label.entry.js +3 -3
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link-card-list.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 +6 -6
- package/dist/esm/tet-menu-mobile.entry.js +95 -36
- package/dist/esm/tet-menu.entry.js +1 -1
- package/dist/esm/tet-multi-step-dialog.entry.js +3 -3
- package/dist/esm/tet-navigation-mobile.entry.js +1 -1
- package/dist/esm/tet-news-card-list.entry.js +1 -1
- package/dist/esm/tet-notification.entry.js +1 -1
- package/dist/esm/tet-number-input.entry.js +1 -1
- package/dist/esm/tet-placeholder.entry.js +1 -1
- package/dist/esm/tet-position.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +1 -1
- package/dist/esm/tet-radio.entry.js +1 -1
- package/dist/esm/tet-range-slider.entry.js +1 -1
- package/dist/esm/tet-referral.entry.js +5 -5
- package/dist/esm/tet-round-stepper.entry.js +1 -1
- package/dist/esm/tet-snicker-card-badge.entry.js +1 -1
- package/dist/esm/tet-snicker-card-group.entry.js +1 -1
- package/dist/esm/tet-snicker-card.entry.js +3 -3
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-spinner.entry.js +1 -1
- package/dist/esm/tet-stepper-input.entry.js +3 -3
- package/dist/esm/tet-stepper-v2.entry.js +1 -1
- package/dist/esm/tet-stepper-v3.entry.js +1 -1
- package/dist/esm/tet-stepper.entry.js +1 -1
- package/dist/esm/tet-support-search.entry.js +32 -5
- package/dist/esm/tet-switch.entry.js +1 -1
- package/dist/esm/tet-tab-header.entry.js +1 -1
- package/dist/esm/tet-table.entry.js +1 -1
- package/dist/esm/tet-tag_2.entry.js +3 -3
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/esm/tet-text.entry.js +1 -1
- package/dist/esm/tet-textarea.entry.js +1 -1
- package/dist/esm/tet-thank-you-view-v2.entry.js +3 -3
- package/dist/esm/tet-thank-you-view-v3.entry.js +3 -3
- package/dist/esm/tet-thank-you-view.entry.js +1 -1
- package/dist/esm/tet-tv-gift-block.entry.js +1 -1
- package/dist/esm/tet-tv-gift-list.entry.js +1 -1
- package/dist/esm/{theme-wrapper-72d0b9da.js → theme-wrapper-37dd9692.js} +2 -2
- package/dist/esm/{translations-4712c45f.js → translations-9a0d9386.js} +1 -1
- package/dist/tet-components/assets/icons/icon-map.json +1 -1
- package/dist/tet-components/assets/icons/tc/tc-add-money.svg +7 -0
- package/dist/tet-components/assets/icons/tc/tc-edit-services.svg +5 -0
- package/dist/tet-components/assets/icons/tc/tc-touch.svg +3 -0
- package/dist/tet-components/assets/icons/tc/tc-transfer.svg +4 -0
- package/dist/tet-components/{p-f6916bfc.entry.js → p-01a44fa7.entry.js} +1 -1
- package/dist/tet-components/{p-1308389c.entry.js → p-01a73822.entry.js} +1 -1
- package/dist/tet-components/{p-0c6b6730.js → p-0255120e.js} +1 -1
- package/dist/tet-components/{p-63427787.entry.js → p-03ec29c8.entry.js} +1 -1
- package/dist/tet-components/{p-85a4823a.entry.js → p-069bb428.entry.js} +1 -1
- package/dist/tet-components/p-075b58ae.entry.js +1 -0
- package/dist/tet-components/{p-068ab35d.entry.js → p-09244635.entry.js} +1 -1
- package/dist/tet-components/{p-ee15fbb6.entry.js → p-0a010d49.entry.js} +1 -1
- package/dist/tet-components/{p-5845a3dc.entry.js → p-0dff386b.entry.js} +1 -1
- package/dist/tet-components/{p-3e7e1106.entry.js → p-129ea4aa.entry.js} +1 -1
- package/dist/tet-components/{p-4fb3f48b.entry.js → p-1305ac8b.entry.js} +1 -1
- package/dist/tet-components/{p-0e6f4848.entry.js → p-133f1a9a.entry.js} +1 -1
- package/dist/tet-components/{p-3e1e9943.entry.js → p-1367a20e.entry.js} +1 -1
- package/dist/tet-components/{p-1881f6e6.entry.js → p-143e8738.entry.js} +1 -1
- package/dist/tet-components/{p-ce850061.entry.js → p-154f01f9.entry.js} +1 -1
- package/dist/tet-components/{p-46975ec4.entry.js → p-17276f7a.entry.js} +1 -1
- package/dist/tet-components/{p-a093603e.entry.js → p-18fd9a9b.entry.js} +1 -1
- package/dist/tet-components/{p-7544dfd7.js → p-19c6a28c.js} +1 -1
- package/dist/tet-components/{p-724189c2.entry.js → p-1ad37ab3.entry.js} +1 -1
- package/dist/tet-components/{p-76526271.entry.js → p-1cecb836.entry.js} +1 -1
- package/dist/tet-components/p-1e633218.entry.js +1 -0
- package/dist/tet-components/{p-1fd2adaf.js → p-1e9db0cc.js} +1 -1
- package/dist/tet-components/{p-d8518d4b.js → p-21acfb7d.js} +1 -1
- package/dist/tet-components/{p-24862e1d.entry.js → p-21ea3769.entry.js} +1 -1
- package/dist/tet-components/{p-32691e85.entry.js → p-23f007d1.entry.js} +1 -1
- package/dist/tet-components/{p-970336de.entry.js → p-26bb92cf.entry.js} +1 -1
- package/dist/tet-components/{p-c1b70e23.entry.js → p-2c384e28.entry.js} +1 -1
- package/dist/tet-components/{p-8a363e18.entry.js → p-3090ceaf.entry.js} +1 -1
- package/dist/tet-components/{p-09dd8219.entry.js → p-31395459.entry.js} +1 -1
- package/dist/tet-components/{p-e0fc34c9.entry.js → p-3a2ababb.entry.js} +1 -1
- package/dist/tet-components/{p-1db8895a.entry.js → p-3eb50fd4.entry.js} +1 -1
- package/dist/tet-components/{p-cde8057a.entry.js → p-48d13280.entry.js} +1 -1
- package/dist/tet-components/{p-c380ea54.entry.js → p-4dd78947.entry.js} +1 -1
- package/dist/tet-components/{p-7ffb8e4f.entry.js → p-4e5981ec.entry.js} +1 -1
- package/dist/tet-components/{p-8d2269b5.entry.js → p-51031414.entry.js} +1 -1
- package/dist/tet-components/{p-920c54d8.entry.js → p-5104fc99.entry.js} +1 -1
- package/dist/tet-components/{p-5391d594.entry.js → p-52301881.entry.js} +1 -1
- package/dist/tet-components/{p-c455736d.entry.js → p-544b367e.entry.js} +1 -1
- package/dist/tet-components/{p-0ebbf5ef.js → p-59ffdcd3.js} +1 -1
- package/dist/tet-components/{p-94322144.entry.js → p-5a159d09.entry.js} +1 -1
- package/dist/tet-components/{p-747e5e19.entry.js → p-5b398efa.entry.js} +1 -1
- package/dist/tet-components/{p-b7393577.entry.js → p-5beaf555.entry.js} +1 -1
- package/dist/tet-components/{p-8c0ac70a.entry.js → p-5c95f657.entry.js} +1 -1
- package/dist/tet-components/{p-28c54fff.entry.js → p-60b40369.entry.js} +1 -1
- package/dist/tet-components/{p-10e72480.entry.js → p-6235b259.entry.js} +1 -1
- package/dist/tet-components/{p-be3a10d0.entry.js → p-62d40cca.entry.js} +1 -1
- package/dist/tet-components/{p-ab13d33d.entry.js → p-66889c36.entry.js} +1 -1
- package/dist/tet-components/{p-2a43ccef.entry.js → p-6c2146a3.entry.js} +1 -1
- package/dist/tet-components/{p-7d64d525.entry.js → p-6d3f9540.entry.js} +1 -1
- package/dist/tet-components/{p-1ddfaaa0.entry.js → p-75c10e63.entry.js} +1 -1
- package/dist/tet-components/p-7c868b40.js +2 -0
- package/dist/tet-components/{p-71018cb8.entry.js → p-7f302806.entry.js} +1 -1
- package/dist/tet-components/p-81456c37.js +1 -0
- package/dist/tet-components/{p-778c46a6.js → p-81586378.js} +1 -1
- package/dist/tet-components/{p-7056a120.entry.js → p-83a9957c.entry.js} +1 -1
- package/dist/tet-components/{p-b0c62997.entry.js → p-8763c126.entry.js} +1 -1
- package/dist/tet-components/{p-b34e86ef.entry.js → p-886b6db2.entry.js} +1 -1
- package/dist/tet-components/{p-f16514db.entry.js → p-8a26190c.entry.js} +1 -1
- package/dist/tet-components/{p-ed061701.entry.js → p-8ff5d57f.entry.js} +1 -1
- package/dist/tet-components/{p-20bb8b10.entry.js → p-9273644f.entry.js} +1 -1
- package/dist/tet-components/p-93e67d37.entry.js +1 -0
- package/dist/tet-components/{p-eaaf3ccf.entry.js → p-9454be24.entry.js} +1 -1
- package/dist/tet-components/{p-c858f416.entry.js → p-9852c6ed.entry.js} +1 -1
- package/dist/tet-components/{p-8915cdcf.entry.js → p-9ef884ed.entry.js} +1 -1
- package/dist/tet-components/{p-f81b3bb0.js → p-a0b08ff1.js} +1 -1
- package/dist/tet-components/{p-c9f21fde.entry.js → p-a193f723.entry.js} +1 -1
- package/dist/tet-components/{p-122f3d3c.entry.js → p-a31f3a9a.entry.js} +1 -1
- package/dist/tet-components/{p-2ee91947.entry.js → p-a541a98f.entry.js} +1 -1
- package/dist/tet-components/{p-14c2b68d.entry.js → p-ab2b65d2.entry.js} +1 -1
- package/dist/tet-components/{p-1f169e55.entry.js → p-adce7264.entry.js} +1 -1
- package/dist/tet-components/{p-f68450a4.entry.js → p-b40bff4c.entry.js} +1 -1
- package/dist/tet-components/{p-eaaaeafe.entry.js → p-bb9f2d7e.entry.js} +1 -1
- package/dist/tet-components/{p-46f6a051.entry.js → p-bcbb0768.entry.js} +1 -1
- package/dist/tet-components/{p-503fa549.entry.js → p-be319bd7.entry.js} +1 -1
- package/dist/tet-components/{p-b87db05c.entry.js → p-c336a502.entry.js} +1 -1
- package/dist/tet-components/{p-3e3ecc08.entry.js → p-c5fdf41f.entry.js} +1 -1
- package/dist/tet-components/{p-b365e697.entry.js → p-c7e5e252.entry.js} +1 -1
- package/dist/tet-components/{p-9c837569.entry.js → p-c95500c7.entry.js} +1 -1
- package/dist/tet-components/{p-c4de9e32.entry.js → p-ccbe2f2a.entry.js} +1 -1
- package/dist/tet-components/{p-77eaa70d.entry.js → p-d01bc0e2.entry.js} +1 -1
- package/dist/tet-components/{p-a64e3e96.entry.js → p-d69f671b.entry.js} +1 -1
- package/dist/tet-components/{p-da0fc55d.entry.js → p-d9ba7a6e.entry.js} +1 -1
- package/dist/tet-components/{p-aa54c6ab.entry.js → p-dfce7d08.entry.js} +1 -1
- package/dist/tet-components/{p-dd66f595.entry.js → p-dfe3a0db.entry.js} +1 -1
- package/dist/tet-components/{p-8dad0d3e.entry.js → p-e08c9fa7.entry.js} +1 -1
- package/dist/tet-components/{p-903c4587.entry.js → p-e615ce9c.entry.js} +1 -1
- package/dist/tet-components/{p-e481116c.entry.js → p-e6c1a083.entry.js} +1 -1
- package/dist/tet-components/{p-13b8d342.entry.js → p-eaefbd67.entry.js} +1 -1
- package/dist/tet-components/{p-aff47d36.entry.js → p-ed471ab0.entry.js} +1 -1
- package/dist/tet-components/p-eef2a648.entry.js +1 -0
- package/dist/tet-components/{p-39796998.entry.js → p-f080b1a0.entry.js} +1 -1
- package/dist/tet-components/{p-87221449.entry.js → p-f3cd9c56.entry.js} +1 -1
- package/dist/tet-components/{p-e9883cd3.entry.js → p-f7f3a146.entry.js} +1 -1
- package/dist/tet-components/{p-3ab161b4.entry.js → p-f84f150b.entry.js} +1 -1
- package/dist/tet-components/{p-5262ee39.entry.js → p-f8a29423.entry.js} +1 -1
- package/dist/tet-components/{p-a8051a99.js → p-f9e5405c.js} +1 -1
- package/dist/tet-components/{p-a5bbadd5.entry.js → p-fa101e62.entry.js} +1 -1
- package/dist/tet-components/{p-8bfd498e.entry.js → p-fa69d1cf.entry.js} +1 -1
- package/dist/tet-components/{p-4eb981d1.entry.js → p-fc7811b1.entry.js} +1 -1
- package/dist/tet-components/{p-ccfa9f31.entry.js → p-fc8d6963.entry.js} +1 -1
- package/dist/tet-components/{p-7a3c1254.entry.js → p-fedf8a46.entry.js} +1 -1
- package/dist/tet-components/{p-d6aa828a.entry.js → p-ff9c35bb.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 +2 -0
- package/dist/types/components/advanced/search/tet-support-search/tet-support-search.d.ts +11 -1
- package/dist/types/components/simple/menu/tet-business-navigation/tet-business-navigation.d.ts +6 -0
- package/dist/types/components/simple/menu/tet-menu-mobile/tet-menu-mobile.d.ts +10 -2
- package/dist/types/components.d.ts +48 -3
- package/package.json +1 -1
- package/dist/tet-components/p-32ece6e1.entry.js +0 -1
- package/dist/tet-components/p-74c1f044.entry.js +0 -1
- package/dist/tet-components/p-83f43fdd.js +0 -2
- package/dist/tet-components/p-bf378dfd.entry.js +0 -1
- package/dist/tet-components/p-c8c0f6d3.entry.js +0 -1
- package/dist/tet-components/p-f81d95ae.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,g as o,f as s,h as r,H as n}from"./p-83f43fdd.js";import{p as a,t as i}from"./p-a8051a99.js";import{s as d,a as c}from"./p-7544dfd7.js";import"./p-0ebbf5ef.js";import{d as l}from"./p-64ec8edd.js";import{n as f}from"./p-58434b0c.js";import{a as h}from"./p-713fff27.js";import"./p-9a2b6ee2.js";const p=class{constructor(o){e(this,o),this.addressSelected=t(this,"addressSelected",7),this.clearInputField=t(this,"clearInputField",7),this.manualAddressInput=t(this,"manualAddressInput",7),this.searchSubmitted=t(this,"searchSubmitted",7),this.language="lv",this.minSearchKeywordLength=4,this.placeholder="Piemēram, Nometņu iela 10 - 5, Salaspils",this.label="",this.accessibilityLabel="",this.addressKey="",this.newStyle=!1,this.newFormsStyle=!1,this.redesignedStyle=!1,this.alwaysExpanded=!1,this.theme="classic",this.manualAddressTriggers=!1,this.isInputInvalid=!1,this.inputDisabled=!1,this.inputIconRight="",this.inputValueLength=0,this.isLoading=!1,this.isKeyboardFocus=!0,this.focusVisible=!1,this.elementActive=!1,this.searchButtonText="Parbaudīt",this.closeButtonText="Aizvert"}autocomplete;nativeInput;inputComponent;get searchElement(){return o(this)}onLanguageChanged(e){a("tet-components",e).then((()=>s(this)))}async search(e){this.nativeInput&&(e?await this.searchByAddressKey():await this.resetInputState())}onInputDisabledStateChange(e){e?this.removeIconRight():this.addClearIcon()}addressSelected;clearInputField;manualAddressInput;searchSubmitted;async resetInputState(){this.nativeInput.value="",this.inputValueLength=0,this.removeIconRight()}async componentWillLoad(){a("tet-components",this.language).then((()=>s(this)))}async componentDidLoad(){this.nativeInput=await(this.inputComponent?.getInputHtmlElement()),this.nativeInput?.addEventListener("input",this.toggleInputClearIcon),this.nativeInput?.addEventListener("input",this.handleInputTyping),this.nativeInput?.addEventListener("click",this.handleClick),this.autocomplete?.addEventListener("activeComponentStateChanged",this.handleActiveStateChange),this.nativeInput&&(this.nativeInput.style.whiteSpace="nowrap",this.nativeInput.style.overflow="hidden",this.nativeInput.style.textOverflow="ellipsis"),this.addressKey&&await this.searchByAddressKey()}disconnectedCallback(){this.nativeInput?.removeEventListener("input",this.toggleInputClearIcon),this.nativeInput?.removeEventListener("input",this.handleInputTyping),this.nativeInput?.removeEventListener("click",this.handleClick),this.autocomplete?.removeEventListener("activeComponentStateChanged",this.handleActiveStateChange)}handleClick=()=>{this.elementActive=!0,this.focusVisible=!1};handleInputTyping=e=>{this.elementActive=!0,e?.data&&(this.focusVisible=!1)};handleActiveStateChange=e=>{this.elementActive=null!==e.detail};onKeyDown(e){"Tab"!==e.key||this.nativeInput?.value||(this.focusVisible=!0)}onFocusOut(e){this.searchElement.contains(e.relatedTarget)||(this.elementActive=!1)}async searchByAddressKey(){const e=this.inputDisabled;this.inputDisabled=!0;const t=await d(this.addressKey);t&&t.fullAddress?(this.addressSelected.emit(t),this.nativeInput.value=t.fullAddress,this.inputValueLength=this.nativeInput.value.length,e||this.addClearIcon()):this.clearInputAction(),e||(this.inputDisabled=!1)}toggleInputClearIcon=({target:e})=>{const t=f(e.value);if(this.inputValueLength=t.length,this.newStyle&&this.inputValueLength>=this.minSearchKeywordLength)return this.addLoadIcon(),void this.removeIconRight();t&&!this.inputIconRight&&this.addClearIcon(),!t&&this.inputIconRight&&this.removeIconRight()};manualAddressInputAction=()=>{this.manualAddressInput.emit(),this.clearInputAction()};addressFilterFunction=async e=>{if(e.length<this.minSearchKeywordLength)return Promise.resolve([]);const t=(await c(e)??[]).map((({fullAddress:e,addressKey:t,postalCode:o})=>({label:e,value:{addressKey:t,postalCode:o}})));return this.manualAddressTriggers&&t.length>0&&t.push({label:i("components-address-search-manual-address-input"),value:"manual-input",clickCallback:this.manualAddressInputAction,ignoreHighlighting:!0,cssPart:"manual-input-option"}),t};debounceAddressFilter=l(this.addressFilterFunction,300);removeIconRight=()=>{this.inputIconRight=""};clearInputAction=()=>{this.autocomplete?.clear()};autocompleteClearInputCallback=()=>{this.removeIconRight(),this.inputValueLength=0,this.clearInputField.emit()};addClearIcon=()=>{this.isLoading=!1,this.inputIconRight="close"};finishedLoading=()=>{this.newStyle&&(this.removeIconRight(),this.inputValueLength>=1&&this.addClearIcon())};addLoadIcon=()=>{this.isLoading=!0};handleAutocompleteOptionSelection=e=>{e.detail._originalEvent instanceof PointerEvent?(this.addressSelected.emit({addressKey:e.detail.value.addressKey,fullAddress:e.detail.label,postalCode:e.detail.value.postalCode}),this.searchSubmitted.emit(e.detail.label)):this.addressSelected.emit({addressKey:e.detail.value.addressKey,fullAddress:e.detail.label,postalCode:e.detail.value.postalCode})};handleSearchSubmit=()=>{this.searchSubmitted.emit(this.nativeInput?.value)};handleCloseButtonClick=()=>{this.focusVisible=!1,this.elementActive=!1,this.autocomplete?.dispatchEvent(new CustomEvent("activeComponentStateChanged",{detail:null,bubbles:!0,composed:!0}))};renderManualAddressInputNoOptionsMessage=()=>r("div",{part:"address-not-found"},r("p",null,i("components-address-search-not-found-message")),r("p",{part:`manual-input ${this.theme}`},r("a",{onClick:this.manualAddressInputAction,onKeyDown:h,class:{"tet-link":!0,dark:"dark"===this.theme},tabindex:"0",role:"button"},i("components-address-search-manual-address-input"))));render(){const e=["autocomplete-input"];this.redesignedStyle&&e.push("address-search--redesigned__input-field"),this.newStyle&&e.push("address-search__input--rounded"),this.newFormsStyle&&e.push("address-search__input--forms");const t="dark"===this.theme||"mint-original"===this.theme,o=t?"dark":"light",s=this.elementActive&&!this.focusVisible||this.alwaysExpanded,a=s?void 0:"var(--tc-grey-80)",d=s&&t&&this.alwaysExpanded?"adaptive-yellow":void 0;return r(n,{key:"bb202d7ac47468461a7721249c205b41e39ae541",class:{"address-search":!0,"address-search--redesigned":this.redesignedStyle,"always-expanded":this.alwaysExpanded,"keyboard-focus":this.focusVisible,active:this.elementActive,[this.theme]:!0}},r("tet-autocomplete",{key:"0f73feb08b3d113c17ebbd51c58e523a28145a02",class:`address-search--redesigned__autocomplete\n ${t?"dark":""}\n `,part:"autocomplete",optionsFilterAction:this.debounceAddressFilter,onOptionSelected:this.handleAutocompleteOptionSelection,noOptionsMessage:i("components-address-search-not-found-message"),noOptionsRenderFunction:this.manualAddressTriggers?this.renderManualAddressInputNoOptionsMessage:void 0,clearCallback:this.autocompleteClearInputCallback,finishedLoading:this.finishedLoading,darkTheme:t,newStyle:this.newStyle,ref:e=>this.autocomplete=e,optionsIcon:"location",redesignedStyle:this.redesignedStyle},this.redesignedStyle?r("div",{class:"address-search--redesigned__autocomplete-content"},r("div",{class:"address-search--redesigned__input-wrapper\n "+(t?"dark":"")},r("tet-input",{class:"address-search__input address-search--redesigned__input\n "+(t?"dark":""),part:"input","input-class":e.join(" "),"input-placeholder":this.placeholder,"input-disabled":this.inputDisabled,label:this.label,accessibilityLabel:this.accessibilityLabel,iconLeft:this.newFormsStyle?"":"tc-search-short",iconRight:this.inputIconRight,iconRightClickCallback:this.clearInputAction,ref:e=>this.inputComponent=e,error:this.isInputInvalid,autocomplete:"off"},this.isLoading&&r("tet-spinner",{theme:t?"dark":"light",class:"address-search__spinner",size:"small"}))),r("div",{class:"address-search--redesigned__button-wrapper\n "+(t?"dark":"")},r("tet-button",{class:"submit-address js-button-mobile button-icon",type:"primary",theme:o,colorTheme:d,customColorCode:a,"accessibility-label":i("components-address-search-search"),iconName:"arrow-right",iconMode:!0,onClick:this.handleSearchSubmit}),r("tet-button",{class:"submit-address button js-button",type:"primary",size:"medium",theme:o,colorTheme:d,customColorCode:a,onClick:this.handleSearchSubmit},this.searchButtonText))):r("tet-input",{class:"address-search__input",part:"input","input-class":e.join(" "),"input-placeholder":this.placeholder,"input-disabled":this.inputDisabled,label:this.label,accessibilityLabel:this.accessibilityLabel,iconLeft:this.newFormsStyle?"":"search",iconRight:this.inputIconRight,iconRightClickCallback:this.clearInputAction,theme:this.theme,ref:e=>this.inputComponent=e,error:this.isInputInvalid,autocomplete:"off"},this.isLoading&&r("tet-spinner",{theme:"dark"===this.theme?"dark":"light",class:"address-search__spinner",size:"small"}))),this.redesignedStyle&&r("div",{key:"3f53d5ac4c6f364cbcf8f75f2b0a88cfed28e975",class:"address-search--redesigned__close-button"},r("tet-button",{key:"c9546124fd7fade8aefae440a56541ba90fb936a",type:"link",iconName:"close",theme:"dark",onMouseDown:e=>e.preventDefault(),onClick:this.handleCloseButtonClick},this.closeButtonText)))}static get watchers(){return{language:["onLanguageChanged"],addressKey:["search"],inputDisabled:["onInputDisabledStateChange"]}}};p.style=':host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;--manual-input-option-background-color:var(--tc-background-secondary);--hover-option-background-color:var(--tc-layer-primary);--input-field-icon-color:var(--tc-icon-secondary);--redesigned-address-search-padding-vertical:1rem;--redesigned-address-search-padding-horizontal:0.5rem;--redesigned-address-search-radius:1rem}:host(.address-search--redesigned){--address-search-width:100%;--address-search-height:2.75rem;width:var(--address-search-width);height:var(--address-search-height)}:host(.address-search--redesigned) ::part(autocomplete-options-container){display:none;border:none;position:unset;z-index:auto;box-shadow:none}:host(.address-search--redesigned:not(.keyboard-focus)) ::part(autocomplete-options-container){display:block}:host(.address-search--redesigned:not(.keyboard-focus).active:focus-within) .address-search--redesigned__close-button{display:block}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__autocomplete{position:absolute;top:calc(-1 * var(--redesigned-address-search-padding-vertical));left:calc(-1 * var(--redesigned-address-search-padding-horizontal));border:0.0625rem solid var(--tc-border-quaternary);background-color:var(--tc-layer-primary);border-radius:var(--redesigned-address-search-radius);padding:var(--redesigned-address-search-padding-vertical) var(--redesigned-address-search-padding-horizontal);width:calc(var(--address-search-width) + 2 * var(--redesigned-address-search-padding-horizontal))}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark){--input-text-color:var(--tc-button-text-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark) .icon-left{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark) .icon-right{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__autocomplete.dark{border-color:var(--tc-border-quaternary-dark);background-color:var(--tc-layer-primary-dark)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input-wrapper{border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.address-search--redesigned.always-expanded){height:auto;--redesigned-close-button-top:-0.5rem}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark){--input-text-color:var(--tc-button-text-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark):focus-within .icon-left{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark):focus-within .icon-right{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__autocomplete{border:0.0625rem solid var(--tc-border-quaternary);background-color:var(--tc-layer-primary);border-radius:var(--redesigned-address-search-radius);padding:var(--redesigned-address-search-padding-vertical) var(--redesigned-address-search-padding-horizontal)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__autocomplete.dark{border-color:var(--tc-border-quaternary-dark);background-color:var(--tc-layer-primary-dark)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper:not(.dark){border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.address-search--redesigned.always-expanded:focus-within) .address-search--redesigned__input-wrapper.dark{border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.dark){--manual-input-option-background-color:var(--tc-background-secondary-dark);--hover-option-background-color:var(--tc-layer-primary-dark);--input-field-icon-color:var(--tc-icon-secondary-dark)}::part(address-not-found){display:flex;flex-direction:column;gap:0.5em}::part(manual-input-option){position:sticky;bottom:0;background-color:var(--manual-input-option-background-color);margin:0.125rem 0 0 0;border-radius:0;z-index:3}::part(manual-input-option):hover{--option-hover-background-color:var(--hover-option-background-color)}.address-search__input{--input-icon-color:var(--input-field-icon-color)}.address-search__input .icon-left{--input-icon-left-position:0.875rem}.address-search__input--rounded{--input-border-radius:1.375rem;--input-hover-background-color:none}.address-search__input--rounded~.icon-left,.address-search__input--rounded~.icon-right{--icon-size:1.5rem;--input-icon-top-position:0.625rem}.address-search__input--forms{--input-border-radius:0.75rem;--input-padding:0.75rem}.address-search__spinner{position:absolute;right:1rem}.address-search--redesigned__autocomplete{border:0.0625rem solid transparent}.address-search--redesigned__autocomplete-content{position:relative;display:flex;gap:0.75rem}.address-search--redesigned__input-wrapper{width:100%;border-bottom:0.0625rem solid var(--tc-grey-70);margin:0 0 0 0.5rem;display:flex;align-items:center;gap:0.5rem}.address-search--redesigned__button-wrapper{display:flex;align-items:center;margin-left:0.5rem}.address-search--redesigned__button-wrapper .js-button-mobile{width:fit-content;display:block;--button-icon-mode-padding:0.5rem}@media (min-width: 46rem){.address-search--redesigned__button-wrapper .js-button-mobile{display:none}}.address-search--redesigned__button-wrapper .js-button{display:none;--button-padding:0.5rem 0.875rem}@media (min-width: 46rem){.address-search--redesigned__button-wrapper .js-button{display:block}}.address-search--redesigned__input{width:100%;--input-height:var(--address-search-height);--input-text-color:var(--tc-button-text-white-permanent);--input-background-color:transparent;--input-hover-background-color:transparent;--input-border-radius:0;--input-border-color:transparent;--input-focus-border-color:transparent;--input-focus-outline-color:transparent;--input-focus-background-color:transparent}.address-search--redesigned__input .icon-left{--input-icon-left-position:0.25rem;--input-focus-icon-color:var(--tc-button-icon-white-permanent)}.address-search--redesigned__input .icon-right{--input-focus-icon-color:var(--tc-button-icon-white-permanent)}.address-search--redesigned__input-field{--input-border-radius:0.0125rem}.address-search--redesigned__close-button{display:none;position:absolute;right:0;top:var(--redesigned-close-button-top, calc(-0.5rem - var(--redesigned-address-search-padding-vertical)));transform:translateY(-100%);--button-icon-color:var(--tc-button-icon-primary);--button-text-decoration:underline}.address-search--redesigned__close-button:hover{--button-icon-color:var(--color-grey-30)}.address-search--redesigned__close-button ::part(button){backdrop-filter:none;text-decoration:underline;--button-padding:0.5rem 0}';export{p as tet_address_search}
|
|
1
|
+
import{r as e,c as t,g as o,f as s,h as r,H as n}from"./p-7c868b40.js";import{p as a,t as i}from"./p-f9e5405c.js";import{s as d,a as c}from"./p-19c6a28c.js";import"./p-59ffdcd3.js";import{d as l}from"./p-64ec8edd.js";import{n as f}from"./p-58434b0c.js";import{a as h}from"./p-713fff27.js";import"./p-9a2b6ee2.js";const p=class{constructor(o){e(this,o),this.addressSelected=t(this,"addressSelected",7),this.clearInputField=t(this,"clearInputField",7),this.manualAddressInput=t(this,"manualAddressInput",7),this.searchSubmitted=t(this,"searchSubmitted",7),this.language="lv",this.minSearchKeywordLength=4,this.placeholder="Piemēram, Nometņu iela 10 - 5, Salaspils",this.label="",this.accessibilityLabel="",this.addressKey="",this.newStyle=!1,this.newFormsStyle=!1,this.redesignedStyle=!1,this.alwaysExpanded=!1,this.theme="classic",this.manualAddressTriggers=!1,this.isInputInvalid=!1,this.inputDisabled=!1,this.inputIconRight="",this.inputValueLength=0,this.isLoading=!1,this.isKeyboardFocus=!0,this.focusVisible=!1,this.elementActive=!1,this.searchButtonText="Parbaudīt",this.closeButtonText="Aizvert"}autocomplete;nativeInput;inputComponent;get searchElement(){return o(this)}onLanguageChanged(e){a("tet-components",e).then((()=>s(this)))}async search(e){this.nativeInput&&(e?await this.searchByAddressKey():await this.resetInputState())}onInputDisabledStateChange(e){e?this.removeIconRight():this.addClearIcon()}addressSelected;clearInputField;manualAddressInput;searchSubmitted;async resetInputState(){this.nativeInput.value="",this.inputValueLength=0,this.removeIconRight()}async componentWillLoad(){a("tet-components",this.language).then((()=>s(this)))}async componentDidLoad(){this.nativeInput=await(this.inputComponent?.getInputHtmlElement()),this.nativeInput?.addEventListener("input",this.toggleInputClearIcon),this.nativeInput?.addEventListener("input",this.handleInputTyping),this.nativeInput?.addEventListener("click",this.handleClick),this.autocomplete?.addEventListener("activeComponentStateChanged",this.handleActiveStateChange),this.nativeInput&&(this.nativeInput.style.whiteSpace="nowrap",this.nativeInput.style.overflow="hidden",this.nativeInput.style.textOverflow="ellipsis"),this.addressKey&&await this.searchByAddressKey()}disconnectedCallback(){this.nativeInput?.removeEventListener("input",this.toggleInputClearIcon),this.nativeInput?.removeEventListener("input",this.handleInputTyping),this.nativeInput?.removeEventListener("click",this.handleClick),this.autocomplete?.removeEventListener("activeComponentStateChanged",this.handleActiveStateChange)}handleClick=()=>{this.elementActive=!0,this.focusVisible=!1};handleInputTyping=e=>{this.elementActive=!0,e?.data&&(this.focusVisible=!1)};handleActiveStateChange=e=>{this.elementActive=null!==e.detail};onKeyDown(e){"Tab"!==e.key||this.nativeInput?.value||(this.focusVisible=!0)}onFocusOut(e){this.searchElement.contains(e.relatedTarget)||(this.elementActive=!1)}async searchByAddressKey(){const e=this.inputDisabled;this.inputDisabled=!0;const t=await d(this.addressKey);t&&t.fullAddress?(this.addressSelected.emit(t),this.nativeInput.value=t.fullAddress,this.inputValueLength=this.nativeInput.value.length,e||this.addClearIcon()):this.clearInputAction(),e||(this.inputDisabled=!1)}toggleInputClearIcon=({target:e})=>{const t=f(e.value);if(this.inputValueLength=t.length,this.newStyle&&this.inputValueLength>=this.minSearchKeywordLength)return this.addLoadIcon(),void this.removeIconRight();t&&!this.inputIconRight&&this.addClearIcon(),!t&&this.inputIconRight&&this.removeIconRight()};manualAddressInputAction=()=>{this.manualAddressInput.emit(),this.clearInputAction()};addressFilterFunction=async e=>{if(e.length<this.minSearchKeywordLength)return Promise.resolve([]);const t=(await c(e)??[]).map((({fullAddress:e,addressKey:t,postalCode:o})=>({label:e,value:{addressKey:t,postalCode:o}})));return this.manualAddressTriggers&&t.length>0&&t.push({label:i("components-address-search-manual-address-input"),value:"manual-input",clickCallback:this.manualAddressInputAction,ignoreHighlighting:!0,cssPart:"manual-input-option"}),t};debounceAddressFilter=l(this.addressFilterFunction,300);removeIconRight=()=>{this.inputIconRight=""};clearInputAction=()=>{this.autocomplete?.clear()};autocompleteClearInputCallback=()=>{this.removeIconRight(),this.inputValueLength=0,this.clearInputField.emit()};addClearIcon=()=>{this.isLoading=!1,this.inputIconRight="close"};finishedLoading=()=>{this.newStyle&&(this.removeIconRight(),this.inputValueLength>=1&&this.addClearIcon())};addLoadIcon=()=>{this.isLoading=!0};handleAutocompleteOptionSelection=e=>{e.detail._originalEvent instanceof PointerEvent?(this.addressSelected.emit({addressKey:e.detail.value.addressKey,fullAddress:e.detail.label,postalCode:e.detail.value.postalCode}),this.searchSubmitted.emit(e.detail.label)):this.addressSelected.emit({addressKey:e.detail.value.addressKey,fullAddress:e.detail.label,postalCode:e.detail.value.postalCode})};handleSearchSubmit=()=>{this.searchSubmitted.emit(this.nativeInput?.value)};handleCloseButtonClick=()=>{this.focusVisible=!1,this.elementActive=!1,this.autocomplete?.dispatchEvent(new CustomEvent("activeComponentStateChanged",{detail:null,bubbles:!0,composed:!0}))};renderManualAddressInputNoOptionsMessage=()=>r("div",{part:"address-not-found"},r("p",null,i("components-address-search-not-found-message")),r("p",{part:`manual-input ${this.theme}`},r("a",{onClick:this.manualAddressInputAction,onKeyDown:h,class:{"tet-link":!0,dark:"dark"===this.theme},tabindex:"0",role:"button"},i("components-address-search-manual-address-input"))));render(){const e=["autocomplete-input"];this.redesignedStyle&&e.push("address-search--redesigned__input-field"),this.newStyle&&e.push("address-search__input--rounded"),this.newFormsStyle&&e.push("address-search__input--forms");const t="dark"===this.theme||"mint-original"===this.theme,o=t?"dark":"light",s=this.elementActive&&!this.focusVisible||this.alwaysExpanded,a=s?void 0:"var(--tc-grey-80)",d=s&&t&&this.alwaysExpanded?"adaptive-yellow":void 0;return r(n,{key:"bb202d7ac47468461a7721249c205b41e39ae541",class:{"address-search":!0,"address-search--redesigned":this.redesignedStyle,"always-expanded":this.alwaysExpanded,"keyboard-focus":this.focusVisible,active:this.elementActive,[this.theme]:!0}},r("tet-autocomplete",{key:"0f73feb08b3d113c17ebbd51c58e523a28145a02",class:`address-search--redesigned__autocomplete\n ${t?"dark":""}\n `,part:"autocomplete",optionsFilterAction:this.debounceAddressFilter,onOptionSelected:this.handleAutocompleteOptionSelection,noOptionsMessage:i("components-address-search-not-found-message"),noOptionsRenderFunction:this.manualAddressTriggers?this.renderManualAddressInputNoOptionsMessage:void 0,clearCallback:this.autocompleteClearInputCallback,finishedLoading:this.finishedLoading,darkTheme:t,newStyle:this.newStyle,ref:e=>this.autocomplete=e,optionsIcon:"location",redesignedStyle:this.redesignedStyle},this.redesignedStyle?r("div",{class:"address-search--redesigned__autocomplete-content"},r("div",{class:"address-search--redesigned__input-wrapper\n "+(t?"dark":"")},r("tet-input",{class:"address-search__input address-search--redesigned__input\n "+(t?"dark":""),part:"input","input-class":e.join(" "),"input-placeholder":this.placeholder,"input-disabled":this.inputDisabled,label:this.label,accessibilityLabel:this.accessibilityLabel,iconLeft:this.newFormsStyle?"":"tc-search-short",iconRight:this.inputIconRight,iconRightClickCallback:this.clearInputAction,ref:e=>this.inputComponent=e,error:this.isInputInvalid,autocomplete:"off"},this.isLoading&&r("tet-spinner",{theme:t?"dark":"light",class:"address-search__spinner",size:"small"}))),r("div",{class:"address-search--redesigned__button-wrapper\n "+(t?"dark":"")},r("tet-button",{class:"submit-address js-button-mobile button-icon",type:"primary",theme:o,colorTheme:d,customColorCode:a,"accessibility-label":i("components-address-search-search"),iconName:"arrow-right",iconMode:!0,onClick:this.handleSearchSubmit}),r("tet-button",{class:"submit-address button js-button",type:"primary",size:"medium",theme:o,colorTheme:d,customColorCode:a,onClick:this.handleSearchSubmit},this.searchButtonText))):r("tet-input",{class:"address-search__input",part:"input","input-class":e.join(" "),"input-placeholder":this.placeholder,"input-disabled":this.inputDisabled,label:this.label,accessibilityLabel:this.accessibilityLabel,iconLeft:this.newFormsStyle?"":"search",iconRight:this.inputIconRight,iconRightClickCallback:this.clearInputAction,theme:this.theme,ref:e=>this.inputComponent=e,error:this.isInputInvalid,autocomplete:"off"},this.isLoading&&r("tet-spinner",{theme:"dark"===this.theme?"dark":"light",class:"address-search__spinner",size:"small"}))),this.redesignedStyle&&r("div",{key:"3f53d5ac4c6f364cbcf8f75f2b0a88cfed28e975",class:"address-search--redesigned__close-button"},r("tet-button",{key:"c9546124fd7fade8aefae440a56541ba90fb936a",type:"link",iconName:"close",theme:"dark",onMouseDown:e=>e.preventDefault(),onClick:this.handleCloseButtonClick},this.closeButtonText)))}static get watchers(){return{language:["onLanguageChanged"],addressKey:["search"],inputDisabled:["onInputDisabledStateChange"]}}};p.style=':host{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit;padding:0;margin:0}:host{--color-gray-light:#cdd2de;--color-ta070:#f5f6f8;--color-ta080:#e6e8ee;--color-ta100:#cdd2de;--color-ta200:#9ba5be;--color-ta300:#69789c;--color-ta500:#1e356a;--color-ta600:#051d59;--color-tc090:#d6e6fd;--color-tc100:#d1dffe;--color-tc300:#75a1fb;--color-tc500:#1a70f6;--color-tc600:#0060f5;--color-td500:#00F1F2;--color-td600:#01cbe0;--color-tf600:#f53b2a;--color-tg300:#2b3036;--color-tg400:#1d2128;--color-tg500:#12171e;--color-tg600:#01050c;--color-th500:#f5f5f5;--color-ti500:#869198;--color-ti600:#aeb7bc;--text-font:Gilroy, serif;--text-color-darker:var(--color-ta600);--text-color-dark:var(--color-ta500);--text-color-dark-theme:var(--color-th500);--icons-font:Tet Icons, serif}.icon.tet-search{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-search::before{content:"\\e86e"}.icon.tet-close-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close-circled::before{content:"\\e85a"}.icon.tet-close{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-close::before{content:"\\e85b"}.icon.tet-check-circled{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check-circled::before{content:"\\e86c"}.icon.tet-check{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-check::before{content:"\\e855"}.icon.tet-chevron-up{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-up::before{content:"\\e859"}.icon.tet-chevron-down{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-chevron-down::before{content:"\\e856"}.icon.tet-clipboard{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-clipboard::before{content:"\\e86a"}.icon.tet-info{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-info::before{content:"\\e81d"}.icon.tet-done{font-family:var(--icons-font);font-weight:400;font-style:normal;font-size:1.25rem;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;speak:none;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale}.icon.tet-done::before{content:"\\e867"}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:host{display:block;--manual-input-option-background-color:var(--tc-background-secondary);--hover-option-background-color:var(--tc-layer-primary);--input-field-icon-color:var(--tc-icon-secondary);--redesigned-address-search-padding-vertical:1rem;--redesigned-address-search-padding-horizontal:0.5rem;--redesigned-address-search-radius:1rem}:host(.address-search--redesigned){--address-search-width:100%;--address-search-height:2.75rem;width:var(--address-search-width);height:var(--address-search-height)}:host(.address-search--redesigned) ::part(autocomplete-options-container){display:none;border:none;position:unset;z-index:auto;box-shadow:none}:host(.address-search--redesigned:not(.keyboard-focus)) ::part(autocomplete-options-container){display:block}:host(.address-search--redesigned:not(.keyboard-focus).active:focus-within) .address-search--redesigned__close-button{display:block}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__autocomplete{position:absolute;top:calc(-1 * var(--redesigned-address-search-padding-vertical));left:calc(-1 * var(--redesigned-address-search-padding-horizontal));border:0.0625rem solid var(--tc-border-quaternary);background-color:var(--tc-layer-primary);border-radius:var(--redesigned-address-search-radius);padding:var(--redesigned-address-search-padding-vertical) var(--redesigned-address-search-padding-horizontal);width:calc(var(--address-search-width) + 2 * var(--redesigned-address-search-padding-horizontal))}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark){--input-text-color:var(--tc-button-text-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark) .icon-left{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input:not(.dark) .icon-right{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__autocomplete.dark{border-color:var(--tc-border-quaternary-dark);background-color:var(--tc-layer-primary-dark)}:host(.address-search--redesigned:not(.keyboard-focus):not(.always-expanded).active:focus-within) .address-search--redesigned__input-wrapper{border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.address-search--redesigned.always-expanded){height:auto;--redesigned-close-button-top:-0.5rem}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark){--input-text-color:var(--tc-button-text-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark):focus-within .icon-left{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper .address-search--redesigned__input:not(.dark):focus-within .icon-right{--input-focus-icon-color:var(--tc-button-icon-black-permanent)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__autocomplete{border:0.0625rem solid var(--tc-border-quaternary);background-color:var(--tc-layer-primary);border-radius:var(--redesigned-address-search-radius);padding:var(--redesigned-address-search-padding-vertical) var(--redesigned-address-search-padding-horizontal)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__autocomplete.dark{border-color:var(--tc-border-quaternary-dark);background-color:var(--tc-layer-primary-dark)}:host(.address-search--redesigned.always-expanded) .address-search--redesigned__input-wrapper:not(.dark){border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.address-search--redesigned.always-expanded:focus-within) .address-search--redesigned__input-wrapper.dark{border-bottom:0.0625rem solid var(--tc-border-secondary)}:host(.dark){--manual-input-option-background-color:var(--tc-background-secondary-dark);--hover-option-background-color:var(--tc-layer-primary-dark);--input-field-icon-color:var(--tc-icon-secondary-dark)}::part(address-not-found){display:flex;flex-direction:column;gap:0.5em}::part(manual-input-option){position:sticky;bottom:0;background-color:var(--manual-input-option-background-color);margin:0.125rem 0 0 0;border-radius:0;z-index:3}::part(manual-input-option):hover{--option-hover-background-color:var(--hover-option-background-color)}.address-search__input{--input-icon-color:var(--input-field-icon-color)}.address-search__input .icon-left{--input-icon-left-position:0.875rem}.address-search__input--rounded{--input-border-radius:1.375rem;--input-hover-background-color:none}.address-search__input--rounded~.icon-left,.address-search__input--rounded~.icon-right{--icon-size:1.5rem;--input-icon-top-position:0.625rem}.address-search__input--forms{--input-border-radius:0.75rem;--input-padding:0.75rem}.address-search__spinner{position:absolute;right:1rem}.address-search--redesigned__autocomplete{border:0.0625rem solid transparent}.address-search--redesigned__autocomplete-content{position:relative;display:flex;gap:0.75rem}.address-search--redesigned__input-wrapper{width:100%;border-bottom:0.0625rem solid var(--tc-grey-70);margin:0 0 0 0.5rem;display:flex;align-items:center;gap:0.5rem}.address-search--redesigned__button-wrapper{display:flex;align-items:center;margin-left:0.5rem}.address-search--redesigned__button-wrapper .js-button-mobile{width:fit-content;display:block;--button-icon-mode-padding:0.5rem}@media (min-width: 46rem){.address-search--redesigned__button-wrapper .js-button-mobile{display:none}}.address-search--redesigned__button-wrapper .js-button{display:none;--button-padding:0.5rem 0.875rem}@media (min-width: 46rem){.address-search--redesigned__button-wrapper .js-button{display:block}}.address-search--redesigned__input{width:100%;--input-height:var(--address-search-height);--input-text-color:var(--tc-button-text-white-permanent);--input-background-color:transparent;--input-hover-background-color:transparent;--input-border-radius:0;--input-border-color:transparent;--input-focus-border-color:transparent;--input-focus-outline-color:transparent;--input-focus-background-color:transparent}.address-search--redesigned__input .icon-left{--input-icon-left-position:0.25rem;--input-focus-icon-color:var(--tc-button-icon-white-permanent)}.address-search--redesigned__input .icon-right{--input-focus-icon-color:var(--tc-button-icon-white-permanent)}.address-search--redesigned__input-field{--input-border-radius:0.0125rem}.address-search--redesigned__close-button{display:none;position:absolute;right:0;top:var(--redesigned-close-button-top, calc(-0.5rem - var(--redesigned-address-search-padding-vertical)));transform:translateY(-100%);--button-icon-color:var(--tc-button-icon-primary);--button-text-decoration:underline}.address-search--redesigned__close-button:hover{--button-icon-color:var(--color-grey-30)}.address-search--redesigned__close-button ::part(button){backdrop-filter:none;text-decoration:underline;--button-padding:0.5rem 0}';export{p as tet_address_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as o,g as e,h as r,H as i}from"./p-83f43fdd.js";import{e as a,A as n}from"./p-0ebbf5ef.js";import{f as s}from"./p-e1e74d01.js";import{c}from"./p-d8518d4b.js";import{t as l}from"./p-a8051a99.js";import"./p-9a2b6ee2.js";const{state:d,set:f,get:m}=c({data:[],cart:new Map,productDetails:new Map}),h=t=>{const o=new Map(d.cart);o.delete(t),f("cart",o)},u=()=>{const t=m("cart"),o=m("productDetails"),e={};for(const[r,i]of t.entries())e[o.get(r)?.name||r]=i;return e},y=class{constructor(e){t(this,e),this.compareLinkClick=o(this,"compareLinkClick",7),this.b2bConfiguratorSubmit=o(this,"b2bConfiguratorSubmit",7),this.successCloseClick=o(this,"successCloseClick",7),this.referenceElement=void 0,this.isLoading=!0,this.itemToRemove=null,this.checkoutAttempted=!1,this.formState="success",this.activePrimaryCategoryId=null,this.activeSecondaryCategoryId=null,this.selectedPrimaryCards=[],this.selectedSecondaryCards=[],this.isDesktopResolution=void 0,this.theme="light",this.stickyRefEl=""}get hostElement(){return e(this)}priceSuffix="€/mēn.";cartEl;confirmationDialogEl;submissionStateDialogEl;checkoutFormEl;primaryAccordionEl;secondaryAccordionEl;primaryNavEl;secondaryNavEl;resetSelectedPrimaryCards(){this.selectedPrimaryCards=[]}resetSelectedSecondaryCards(){this.selectedSecondaryCards=[]}compareLinkClick;b2bConfiguratorSubmit;successCloseClick;async componentWillLoad(){this.checkDesktopResolution(),this.referenceElement=this.stickyRefEl?document.querySelector(this.stickyRefEl):this.hostElement.parentElement}async componentDidLoad(){this.isLoading=!0,await(async t=>{const o="function"==typeof t?t():t,e=new Promise((t=>setTimeout(t,500))),[r]=await Promise.all([o,e]);return r})(this.fetchData),this.isLoading=!1,this.activePrimaryCategoryId=d.data.find((t=>"primary"===t.type))?.id||null,this.activeSecondaryCategoryId=d.data.find((t=>"secondary"===t.type))?.id||null,this.positionStickyCartEl()}onResize(){this.checkDesktopResolution(),this.positionStickyCartEl()}async setSubmitFormState(t){"validation-error"===t&&(this.submissionStateDialogEl.close(),this.checkoutFormEl.open()),this.formState=t}checkDesktopResolution=()=>{this.isDesktopResolution=window.innerWidth>=1024};fetchData=async()=>{(t=>{f("data",t);const o=new Map;for(const e of t)for(const t of e.products){const{type:r,name:i,id:a}=e,{name:{lv:n},description:{lv:s},amount:c,b2bConfiguratorProduct:l}=t;o.set(t.productCode,{name:n,description:s,amount:c,discountAmount:l.discountAmount,categoryType:r,categoryName:i,categoryId:a,b2bConfiguratorProduct:l})}f("productDetails",o)})(await(()=>{let t;try{t=new URL(a.b2bConfigurator).href}catch(t){return console.error(t),Promise.reject("B2B configurator endpoint URL generation failed.")}return(new n).setUrl(t).setErrorFallbackValue([]).execute()})())};renderPlaceholder=()=>{const t="dark"===this.theme;return[r("div",{class:"offer placeholder"},r("div",{style:{padding:this.isDesktopResolution?"1.5rem":"1rem"}},r("tet-placeholder",{class:"placeholder",height:this.isDesktopResolution?"2rem":"1.5rem",darkTheme:t})),r("div",{class:"offer__content"},r("tet-placeholder",{class:"placeholder offer__navigation",height:this.isDesktopResolution?"48rem":" 2.25rem",darkTheme:t,style:{margin:"0"}}),r("div",{class:"offer__cards"},r("div",{class:"offer__cards-list"},r("tet-placeholder",{class:"placeholder",height:"3rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}))))),r("div",{class:"cart cart--empty",style:{padding:"1.5rem 1rem 1rem","background-color":"var(--b2b-background-color)"}},r("tet-placeholder",{class:"placeholder",height:"12.75rem",darkTheme:t}))]};categoryClickHandler=t=>{const{id:o}=t.detail,e=this.getCategoryById(o);e&&("primary"===e.type?this.activePrimaryCategoryId=o:this.activeSecondaryCategoryId=o)};renderOffer=()=>{const t=[{name:l("components-b2b-offer-primary-title"),type:"primary"},{name:l("components-b2b-offer-secondary-title"),type:"secondary"}];return r("div",{class:{offer:!0,[`offer--${this.theme}`]:!0}},t.map((t=>{const o=d.data.filter((o=>o.type===t.type)).map((t=>{const{id:o,name:e,icon:r}=t;return{id:o,name:e,icon:r,selected:o===this.activePrimaryCategoryId||o===this.activeSecondaryCategoryId}}));return r("tet-accordion",{ref:o=>{"primary"===t.type?this.primaryAccordionEl=o:this.secondaryAccordionEl=o},key:t.type,class:"offer__block",isOpen:"primary"===t.type,header:t.name,withBorder:!0,theme:this.theme,transparentBackground:!0},r("div",{class:"offer__content"},r("div",{class:"offer__navigation"},r("tet-business-navigation",{ref:o=>{"primary"===t.type?this.primaryNavEl=o:this.secondaryNavEl=o},menuItems:o,theme:this.theme,"onMenu-click-event":this.categoryClickHandler})),this.renderCards(t.type)))})))};getCategoryById=t=>d.data.find((o=>o.id===t));onCompareLinkClick=t=>{const o=this.getCategoryById(t);o&&o.modalScreenId&&this.compareLinkClick.emit(o.modalScreenId)};handleCardSelected=(t,o)=>{const e=this.getCategoryById(o);if(!e)return;const{type:r,allowMultipleChoice:i}=e;if("primary"===r){if(this.selectedPrimaryCards.includes(t))return;this.selectedPrimaryCards=i?[...this.selectedPrimaryCards,t]:[t]}else{if(this.selectedSecondaryCards.includes(t))return;this.selectedSecondaryCards=i?[...this.selectedSecondaryCards,t]:[t]}};handleProductCountChanged=async(t,o)=>{const{cardId:e,count:r}=t.detail,i=this.getCategoryById(o);if(i&&d.cart.get(e)!==r){if(!r)return this.itemToRemove=e,void this.confirmationDialogEl.open();i.allowMultipleChoice||i.products.forEach((t=>t.productCode!==e&&h(t.productCode))),((t,o)=>{if(o<0)return;const e=new Map(d.cart);e.set(t,o),f("cart",e)})(e,r),this.isDesktopResolution&&(this.cartEl.changeBlockState(i.type,"open"),this.cartEl.changeBlockState("primary"===i.type?"secondary":"primary","close"))}};onConfirmationClose=()=>{this.itemToRemove=null};renderConfirmationDialog=()=>r("tet-dialog",{ref:t=>this.confirmationDialogEl=t,class:this.theme,closeOnOverlayClick:!1,onCloseDialog:this.onConfirmationClose,theme:this.theme},r("div",{class:"action-dialog"},r("tet-icon",{class:"action-dialog__icon action-dialog__attention-icon",name:"attention"}),r("div",{class:"action-dialog__title"},l("components-b2b-item-remove-confirmation-title"))),r("div",{slot:"footer",class:"action-dialog__footer"},r("tet-button",{class:"action-dialog__button",type:"secondary",theme:this.theme,size:"large",onClick:()=>this.confirmationDialogEl.close()},l("components-b2b-item-remove-confirmation-decline")),r("tet-button",{class:"action-dialog__button",type:"primary",theme:this.theme,size:"large",iconName:"tc-trash",iconPosition:"left",onClick:()=>{h(this.itemToRemove),this.confirmationDialogEl.close()}},l("components-b2b-item-remove-confirmation-accept"))));resetState=()=>{f("cart",new Map),this.checkoutAttempted=!1,this.primaryAccordionEl.open(),this.secondaryAccordionEl.close()};renderSubmissionStateDialog=()=>{const t="loading"===this.formState,o=()=>{this.resetState(),this.successCloseClick.emit(),this.submissionStateDialogEl.close()},e=t?r("div",{class:"action-dialog"},r("tet-spinner",{theme:this.theme}),r("div",{class:"action-dialog__title"},l("components-b2b-loading-dialog-title")),r("div",{class:"action-dialog__description"},l("components-b2b-loading-dialog-description"))):[r("div",{class:"action-dialog"},r("tet-icon",{class:"action-dialog__icon action-dialog__success-icon",name:"tc-check-circle"}),r("div",{class:"action-dialog__title"},l("components-b2b-success-dialog-title")),r("div",{class:"action-dialog__description"},l("components-b2b-success-dialog-description"))),r("div",{slot:"footer",class:"action-dialog__footer"},r("tet-button",{class:"action-dialog__button",type:"secondary",theme:this.theme,size:"large",onClick:o},r("div",{class:"action-dialog__button-text"},l("components-b2b-success-dialog-close"))),r("tet-button",{class:"action-dialog__button",type:"primary",theme:this.theme,size:"large",onClick:()=>{this.resetState(),this.submissionStateDialogEl.close()}},r("div",{class:"action-dialog__button-text"},l("components-b2b-success-dialog-start-again"))))];return r("tet-dialog",{ref:t=>this.submissionStateDialogEl=t,class:{[this.theme]:!0,"action-dialog--loading":t},closeOnOverlayClick:!1,closeOnEscape:!t,hideCloseButton:t,theme:this.theme,onCloseDialog:"success"===this.formState?o:this.submissionStateDialogEl.close},e)};renderCards=t=>{const o="primary"===t?this.activePrimaryCategoryId:this.activeSecondaryCategoryId,e="primary"===t?this.selectedPrimaryCards:this.selectedSecondaryCards,i=this.getCategoryById(o),{modalScreenId:a,products:n=[]}=i||{},s=n.map((t=>{const{productCode:i,name:{lv:a},description:{lv:n},amount:s,b2bConfiguratorProduct:{discountAmount:c,selectionType:l,defaultValue:f,minValue:m,maxValue:h,translationKey:u},benefits:{lv:y},contracts:p}=t,b=!!t.attributes.find((t=>"isBestChoice"===t.key))?.value,g="single"===l?void 0:{defaultValue:f,minValue:m,maxValue:h,label:u},_={id:i,title:a,subtitle:n,isBestChoice:b,price:s,discountPrice:c,benefits:y.split("\n"),contract:p[0]?.contract,counterOptions:g},v=e.includes(i);return r("tet-b2b-compare-card",{options:_,theme:this.theme,key:i,isSelected:v,onSelectedChange:()=>this.handleCardSelected(i,o),count:d.cart.get(i),onCountChange:t=>this.handleProductCountChanged(t,o)})}));return r("div",{class:"offer__cards"},r("div",{class:"offer__cards-header"},r("div",{class:"offer__cards-title"},l("components-b2b-offer-product-list-title")),a&&r("button",{class:{"button-reset":!0,compare__button:!0,[`${this.theme}`]:!0},onClick:()=>{this.onCompareLinkClick(o)}},r("span",{class:{compare__text:!0,"tet-link":!0,[`${this.theme}`]:!0}},l("components-b2b-offer-compare-link-text")),r("div",{class:"compare__icon-wrapper"},r("tet-icon",{class:"compare__icon",name:"tc-info-circle-outline",theme:this.theme})))),r("div",{class:"offer__cards-list"},s))};handleCartProductCountChange=(t,o,e)=>{this.handleProductCountChanged({detail:{cardId:t,count:o}},e)};goToProduct=async(t,o)=>{const e=this.getCategoryById(t);e&&("primary"===e.type?(await this.primaryAccordionEl.open(),await this.primaryNavEl.selectMenuItem(t),this.primaryAccordionEl.scrollIntoView({behavior:"smooth"})):"secondary"===e.type&&(await this.secondaryAccordionEl.open(),await this.secondaryNavEl.selectMenuItem(t),this.secondaryAccordionEl.scrollIntoView({behavior:"smooth"})),setTimeout((()=>{this.handleCardSelected(o,t)}),0))};renderCartCardsList=t=>{const o=o=>{const e=d.cart.get(o),i=d.productDetails.get(o);if(void 0===e||!i)return null;const{name:a,amount:n,description:s,discountAmount:c,categoryName:f,categoryType:m,categoryId:h,b2bConfiguratorProduct:u}=i,y="primary"===m?s:f,{selectionType:p,term:b,minValue:g,maxValue:_,translationKey:v}=u;return r("tet-business-summary-card",{key:o,productName:a,price:n,productDescription:y,discountPrice:c,currency:this.priceSuffix,contractTerm:b,theme:this.theme,withStepper:"number"===p,value:e,minValue:g,maxValue:_,stepperLabel:l(v||""),context:t,onAmountChange:t=>this.handleCartProductCountChange(o,t.detail,h),onDeleteButtonClick:()=>this.handleCartProductCountChange(o,0,h),onEditButtonClick:()=>this.goToProduct(h,o)})};return["primary","secondary"].map((t=>{const e=[...d.cart].filter((([o])=>{const e=d.productDetails.get(o);return e&&e.categoryType===t})).map((([t])=>o(t)));return e.length?r("div",{class:"cart__card-list",slot:t},e):null}))};positionStickyCartEl=()=>{this.referenceElement&&(this.isDesktopResolution?this.hostElement.style.setProperty("--b2b-cart-sticky-top",`${this.referenceElement.offsetTop}px`):this.hostElement.style.removeProperty("--b2b-cart-sticky-top"))};renderCart=(t="edit")=>{const o=!d.cart.size;let e={primary:0,secondary:0},i={primary:0,secondary:0},a=0;for(const[t,o]of d.cart){const r=d.productDetails.get(t);r&&(e[r.categoryType]+=(r.discountAmount??r.amount)*o,i[r.categoryType]+=1,a+=r.amount*o)}const{primary:n,secondary:c}=e,f=n+c,m=a-f,{primary:h,secondary:u}=this.areProductsAddedToCart(),y="edit"===t&&this.checkoutAttempted&&!h,p="edit"===t&&this.checkoutAttempted&&!u,b={summaryAmount:s(f,{currency:""}),primaryAmount:s(n,{currency:""}),secondaryAmount:s(c,{currency:""}),primaryCount:i.primary,secondaryCount:i.secondary,summarySavings:s(m,{currency:""}),hasPrimaryNotification:y,hasSecondaryNotification:p},g="edit"===t?r("tet-button",{onClick:this.checkout,slot:"cta",class:"cart__cta",type:"primary",size:this.isDesktopResolution?"large":"medium",theme:this.theme},l("components-b2b-cart-cta-button-title")):null;return r("tet-b2b-configurator-cart",{ref:o=>"edit"===t?this.cartEl=o:null,context:t,class:{cart:!0,"cart--empty":o,[`cart--${t}`]:!0},data:b,theme:this.theme,isCartEmpty:o,isDesktopResolution:this.isDesktopResolution},this.renderCartCardsList(t),g)};areProductsAddedToCart=()=>{const t={primary:!1,secondary:!1};for(const[o,e]of d.cart){const e=d.productDetails.get(o);e&&(t[e.categoryType]=!0)}return t};checkout=()=>{this.checkoutAttempted=!0;const{primary:t,secondary:o}=this.areProductsAddedToCart();t&&o&&this.checkoutFormEl.open()};submit=({detail:t})=>{const o={cart:u(),contactInfo:t};this.formState="loading",this.b2bConfiguratorSubmit.emit(o),this.checkoutFormEl.close(),this.submissionStateDialogEl.open()};renderCheckoutForm=()=>r("tet-b2b-check-out-form",{ref:t=>this.checkoutFormEl=t,theme:this.theme,"onSubmit-check-out-form":this.submit},r("div",{slot:"cart"},this.renderCart("checkout")));render(){return r(i,{key:"001da651eb395990d65a929558920f80f67ec357"},r("div",{key:"b20fe87916971db6c1173796f20f0b5b307f152c",class:{configurator:!0,[`${this.theme}`]:!0}},this.isLoading?this.renderPlaceholder():d.data&&[this.renderOffer(),this.renderCart()]),this.renderCheckoutForm(),this.renderConfirmationDialog(),this.renderSubmissionStateDialog())}static get watchers(){return{activePrimaryCategoryId:["resetSelectedPrimaryCards"],activeSecondaryCategoryId:["resetSelectedSecondaryCards"]}}};y.style='@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:root{--tet-link-color:var(--tc-text-primary);--tet-link-color-hover:var(--tc-text-secondary);--tet-link-color-active:var(--tc-text-tertiary);--tet-link-color-focus:var(--tc-blue-40);--tet-link-color-disabled:var(--tc-button-text-inverse-disabled);--tet-link-secondary-color:var(--tc-text-secondary);--tet-link-secondary-color-hover:var(--tc-text-primary)}.tet-link,.tet-link__arrow{text-decoration:underline;color:var(--tet-link-color);position:relative;line-height:1.5rem;cursor:pointer}.tet-link.dark,.tet-link__arrow.dark{--tet-link-color:var(--tc-text-primary-dark);--tet-link-color-hover:var(--tc-text-secondary-dark);--tet-link-color-active:var(--tc-text-tertiary-dark);--tet-link-color-focus:var(--tc-blue-40-dark);--tet-link-color-disabled:var(--tc-button-text-inverse-disabled-dark);--tet-link-secondary-color:var(--tc-text-secondary-dark);--tet-link-secondary-color-hover:var(--tc-text-primary-dark)}.tet-link.tet-link--secondary,.tet-link__arrow.tet-link--secondary{--tet-link-color:var(--tet-link-secondary-color);--tet-link-color-hover:var(--tet-link-secondary-color-hover)}.tet-link tet-icon,.tet-link__arrow tet-icon{--icon-color:var(--tet-link-color)}.tet-link:hover,.tet-link__arrow:hover{color:var(--tet-link-color-hover)}.tet-link:hover tet-icon,.tet-link__arrow:hover tet-icon{--icon-color:var(--tet-link-color-hover)}.tet-link:active,.tet-link__arrow:active{color:var(--tet-link-color-active)}.tet-link:active tet-icon,.tet-link__arrow:active tet-icon{--icon-color:var(--tet-link-color-active)}.tet-link:focus-visible,.tet-link__arrow:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem;transition:outline 0s;outline-color:var(--tet-link-color-focus);border-radius:0.125rem}.tet-link.disabled,.tet-link__arrow.disabled{color:var(--tet-link-color-disabled);pointer-events:none;cursor:auto}.tet-link.disabled tet-icon,.tet-link__arrow.disabled tet-icon{--icon-color:var(--tet-link-color-disabled)}.tet-link.disabled:focus-visible,.tet-link__arrow.disabled:focus-visible{outline:none}.tet-link tet-icon,.tet-link__arrow tet-icon{padding-left:0.25rem;padding-right:0.25rem;--icon-container-display:inline-block}.tet-link__arrow{padding-right:1.5rem}.tet-link__arrow::after{content:"--\x3e";position:absolute;white-space:nowrap;display:inline-block;text-decoration:none;padding-left:0.25rem;letter-spacing:initial;transition:all 0.15s ease-in}.tet-link__arrow:hover::after{padding-left:0.375rem}:host{display:block;--b2b-cart-offset-top:0px}.light{--b2b-text-color:var(--tc-text-primary);--b2b-text-color-secondary:var(--tc-text-secondary);--b2b-background-color:var(--tc-layer-primary);--b2b-icon-background-color:var(--tc-layer-secondary);--b2b-icon-pressed-background-color:var(--tc-layer-quaternary);--b2b-box-shadow:var(--tc-elevation-one);--b2b-border-color:var(--tc-border-quaternary);--b2b-summary-block-color:var(--tc-layer-secondary);--b2b-summary-accent-color:var(--tc-yellow-20);--b2b-confirmation-dialog-icon-color:var(--tc-yellow-40);--b2b-success-dialog-icon-color:var(--tc-green-40)}.dark{--b2b-text-color:var(--tc-text-primary-dark);--b2b-text-color-secondary:var(--tc-text-secondary-dark);--b2b-background-color:var(--tc-layer-primary-dark);--b2b-icon-background-color:var(--tc-layer-secondary-dark);--b2b-icon-pressed-background-color:var(--tc-layer-quaternary-dark);--b2b-box-shadow:var(--tc-elevation-one-dark);--b2b-border-color:var(--tc-border-quaternary-dark);--b2b-summary-block-color:var(--tc-layer-secondary-dark);--b2b-summary-accent-color:var(--tc-grey-20-dark);--b2b-confirmation-dialog-icon-color:var(--tc-yellow-40-dark);--b2b-success-dialog-icon-color:var(--tc-green-40-dark)}button.button-reset{background:none;border:none;padding:0;color:inherit;text-align:inherit}.placeholder{--placeholder-animation-speed:5s}.configurator{display:flex;gap:1rem;flex-direction:column;color:var(--b2b-text-color)}@media screen and (min-width: 64rem){.configurator{gap:1.5rem;flex-direction:row;align-items:flex-start}}.offer{border-radius:1rem;height:fit-content;flex:0 0 calc(70% - 0.75rem);background-color:var(--b2b-background-color);box-shadow:var(--b2b-box-shadow)}.offer__block{--accordion-header-padding:1rem;--accordion-header-mobile-padding:1rem;--accordion-header-font:600 1.25rem/1.5rem Gilroy, Gilroy, Arial, sans-serif;--accordion-header-mobile-font:600 1.25rem/1.5rem Gilroy, Gilroy, Arial, sans-serif}.offer__block:first-child{--accordion-border-radius:1rem 1rem 0 0;--accordion-outer-border:var(--b2b-border-color)}.offer__block:last-child{--accordion-border-radius:0 0 1rem 1rem;--accordion-border-bottom-width:0}@media screen and (min-width: 64rem){.offer__block{--accordion-header-padding:1.5rem;--accordion-header-font:600 1.75rem/2rem Gilroy, Gilroy, Arial, sans-serif}}.offer__content{overflow:hidden;padding:1.5rem 1rem;display:flex;flex-direction:column;gap:0.75rem;border-color:var(--b2b-border-color);border-top-style:solid;border-top-width:0.0625rem}@media screen and (min-width: 48rem){.offer__content{padding:1.5rem}}@media screen and (min-width: 64rem){.offer__content{flex-direction:row;gap:1.5rem;padding-bottom:2.5rem}}.offer__navigation{margin:0 -1.5rem;flex:0 0 30%}@media screen and (min-width: 64rem){.offer__navigation{max-width:20.5rem;margin:0}}.offer__cards{flex:1 1 0%}.offer__cards-header{padding:0.5rem 0 0.75rem 0;display:flex;gap:0.5rem;justify-content:space-between;align-items:center}@media screen and (min-width: 64rem){.offer__cards-header{padding:1rem 0}}.offer__cards-list{display:flex;flex-direction:column;gap:1rem}.offer__cards-title{flex:auto;font:600 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}@media screen and (min-width: 64rem){.offer__cards-title{font:600 1.25rem/1.5rem "Gilroy", "Gilroy, Arial, sans-serif"}}.compare__button{border-radius:50%;overflow:hidden;font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}@media screen and (min-width: 64rem){.compare__button{border-radius:0.125rem}}.compare__button:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem;transition:outline 0s}.compare__button.dark:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline:0.125rem solid var(--tc-blue-40-dark);outline-offset:0.125rem;transition:outline 0s}.compare__button:active{--b2b-icon-background-color:var(--b2b-icon-pressed-background-color)}.compare__text{font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif";display:none}@media screen and (min-width: 64rem){.compare__text{display:initial}}.compare__icon-wrapper{width:2.75rem;height:2.75rem;display:flex;justify-content:center;align-items:center;background-color:var(--b2b-icon-background-color);cursor:pointer}@media screen and (min-width: 64rem){.compare__icon-wrapper{display:none}}.compare__icon{--icon-size:1.5rem;--icon-container-display:flex}.cart{flex:0 0 calc(30% - 0.75rem);position:sticky}.cart--edit{bottom:-1px;top:calc(var(--b2b-cart-sticky-top) + var(--b2b-cart-offset-top))}@media screen and (min-width: 64rem){.cart--edit{max-width:calc(30% - 0.75rem)}}.cart--empty{display:none}@media screen and (min-width: 64rem){.cart--empty{display:flex}}.cart__card-list{padding:0 1rem 1rem;display:flex;flex-direction:column;gap:0.5rem}.cart__cta{display:block;align-self:center;width:stretch;--button-width:100%}@media screen and (min-width: 48rem){.cart__cta{align-self:flex-end;width:unset;--button-width:auto}}.action-dialog{display:flex;flex-direction:column;gap:0.5rem;align-items:center;margin-bottom:1.5rem}.action-dialog--loading{--dialog-footer-border-color:transparent}.action-dialog__title{text-align:center;font:600 1.5rem/1.75rem "Gilroy", "Gilroy, Arial, sans-serif"}.action-dialog__description{text-align:center;font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}.action-dialog__icon{--icon-size:3rem}.action-dialog__attention-icon{--icon-color:var(--b2b-confirmation-dialog-icon-color)}.action-dialog__success-icon{--icon-color:var(--b2b-success-dialog-icon-color)}.action-dialog__footer{display:flex;flex-direction:column;justify-content:space-between;flex:auto;gap:1rem}@media screen and (min-width: 31.25rem){.action-dialog__footer{flex-direction:row}}.action-dialog__button{--button-width:100%}.action-dialog__button-text{white-space:nowrap}';export{y as tet_b2b_configurator}
|
|
1
|
+
import{r as t,c as o,g as e,h as r,H as i}from"./p-7c868b40.js";import{e as a,A as n}from"./p-59ffdcd3.js";import{f as s}from"./p-e1e74d01.js";import{c}from"./p-21acfb7d.js";import{t as l}from"./p-f9e5405c.js";import"./p-9a2b6ee2.js";const{state:d,set:f,get:m}=c({data:[],cart:new Map,productDetails:new Map}),h=t=>{const o=new Map(d.cart);o.delete(t),f("cart",o)},u=()=>{const t=m("cart"),o=m("productDetails"),e={};for(const[r,i]of t.entries())e[o.get(r)?.name||r]=i;return e},y=class{constructor(e){t(this,e),this.compareLinkClick=o(this,"compareLinkClick",7),this.b2bConfiguratorSubmit=o(this,"b2bConfiguratorSubmit",7),this.successCloseClick=o(this,"successCloseClick",7),this.referenceElement=void 0,this.isLoading=!0,this.itemToRemove=null,this.checkoutAttempted=!1,this.formState="success",this.activePrimaryCategoryId=null,this.activeSecondaryCategoryId=null,this.selectedPrimaryCards=[],this.selectedSecondaryCards=[],this.isDesktopResolution=void 0,this.theme="light",this.stickyRefEl=""}get hostElement(){return e(this)}priceSuffix="€/mēn.";cartEl;confirmationDialogEl;submissionStateDialogEl;checkoutFormEl;primaryAccordionEl;secondaryAccordionEl;primaryNavEl;secondaryNavEl;resetSelectedPrimaryCards(){this.selectedPrimaryCards=[]}resetSelectedSecondaryCards(){this.selectedSecondaryCards=[]}compareLinkClick;b2bConfiguratorSubmit;successCloseClick;async componentWillLoad(){this.checkDesktopResolution(),this.referenceElement=this.stickyRefEl?document.querySelector(this.stickyRefEl):this.hostElement.parentElement}async componentDidLoad(){this.isLoading=!0,await(async t=>{const o="function"==typeof t?t():t,e=new Promise((t=>setTimeout(t,500))),[r]=await Promise.all([o,e]);return r})(this.fetchData),this.isLoading=!1,this.activePrimaryCategoryId=d.data.find((t=>"primary"===t.type))?.id||null,this.activeSecondaryCategoryId=d.data.find((t=>"secondary"===t.type))?.id||null,this.positionStickyCartEl()}onResize(){this.checkDesktopResolution(),this.positionStickyCartEl()}async setSubmitFormState(t){"validation-error"===t&&(this.submissionStateDialogEl.close(),this.checkoutFormEl.open()),this.formState=t}checkDesktopResolution=()=>{this.isDesktopResolution=window.innerWidth>=1024};fetchData=async()=>{(t=>{f("data",t);const o=new Map;for(const e of t)for(const t of e.products){const{type:r,name:i,id:a}=e,{name:{lv:n},description:{lv:s},amount:c,b2bConfiguratorProduct:l}=t;o.set(t.productCode,{name:n,description:s,amount:c,discountAmount:l.discountAmount,categoryType:r,categoryName:i,categoryId:a,b2bConfiguratorProduct:l})}f("productDetails",o)})(await(()=>{let t;try{t=new URL(a.b2bConfigurator).href}catch(t){return console.error(t),Promise.reject("B2B configurator endpoint URL generation failed.")}return(new n).setUrl(t).setErrorFallbackValue([]).execute()})())};renderPlaceholder=()=>{const t="dark"===this.theme;return[r("div",{class:"offer placeholder"},r("div",{style:{padding:this.isDesktopResolution?"1.5rem":"1rem"}},r("tet-placeholder",{class:"placeholder",height:this.isDesktopResolution?"2rem":"1.5rem",darkTheme:t})),r("div",{class:"offer__content"},r("tet-placeholder",{class:"placeholder offer__navigation",height:this.isDesktopResolution?"48rem":" 2.25rem",darkTheme:t,style:{margin:"0"}}),r("div",{class:"offer__cards"},r("div",{class:"offer__cards-list"},r("tet-placeholder",{class:"placeholder",height:"3rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}),r("tet-placeholder",{class:"placeholder",height:"10.25rem",darkTheme:t}))))),r("div",{class:"cart cart--empty",style:{padding:"1.5rem 1rem 1rem","background-color":"var(--b2b-background-color)"}},r("tet-placeholder",{class:"placeholder",height:"12.75rem",darkTheme:t}))]};categoryClickHandler=t=>{const{id:o}=t.detail,e=this.getCategoryById(o);e&&("primary"===e.type?this.activePrimaryCategoryId=o:this.activeSecondaryCategoryId=o)};renderOffer=()=>{const t=[{name:l("components-b2b-offer-primary-title"),type:"primary"},{name:l("components-b2b-offer-secondary-title"),type:"secondary"}];return r("div",{class:{offer:!0,[`offer--${this.theme}`]:!0}},t.map((t=>{const o=d.data.filter((o=>o.type===t.type)).map((t=>{const{id:o,name:e,icon:r}=t;return{id:o,name:e,icon:r,selected:o===this.activePrimaryCategoryId||o===this.activeSecondaryCategoryId}}));return r("tet-accordion",{ref:o=>{"primary"===t.type?this.primaryAccordionEl=o:this.secondaryAccordionEl=o},key:t.type,class:"offer__block",isOpen:"primary"===t.type,header:t.name,withBorder:!0,theme:this.theme,transparentBackground:!0},r("div",{class:"offer__content"},r("div",{class:"offer__navigation"},r("tet-business-navigation",{ref:o=>{"primary"===t.type?this.primaryNavEl=o:this.secondaryNavEl=o},menuItems:o,theme:this.theme,"onMenu-click-event":this.categoryClickHandler})),this.renderCards(t.type)))})))};getCategoryById=t=>d.data.find((o=>o.id===t));onCompareLinkClick=t=>{const o=this.getCategoryById(t);o&&o.modalScreenId&&this.compareLinkClick.emit(o.modalScreenId)};handleCardSelected=(t,o)=>{const e=this.getCategoryById(o);if(!e)return;const{type:r,allowMultipleChoice:i}=e;if("primary"===r){if(this.selectedPrimaryCards.includes(t))return;this.selectedPrimaryCards=i?[...this.selectedPrimaryCards,t]:[t]}else{if(this.selectedSecondaryCards.includes(t))return;this.selectedSecondaryCards=i?[...this.selectedSecondaryCards,t]:[t]}};handleProductCountChanged=async(t,o)=>{const{cardId:e,count:r}=t.detail,i=this.getCategoryById(o);if(i&&d.cart.get(e)!==r){if(!r)return this.itemToRemove=e,void this.confirmationDialogEl.open();i.allowMultipleChoice||i.products.forEach((t=>t.productCode!==e&&h(t.productCode))),((t,o)=>{if(o<0)return;const e=new Map(d.cart);e.set(t,o),f("cart",e)})(e,r),this.isDesktopResolution&&(this.cartEl.changeBlockState(i.type,"open"),this.cartEl.changeBlockState("primary"===i.type?"secondary":"primary","close"))}};onConfirmationClose=()=>{this.itemToRemove=null};renderConfirmationDialog=()=>r("tet-dialog",{ref:t=>this.confirmationDialogEl=t,class:this.theme,closeOnOverlayClick:!1,onCloseDialog:this.onConfirmationClose,theme:this.theme},r("div",{class:"action-dialog"},r("tet-icon",{class:"action-dialog__icon action-dialog__attention-icon",name:"attention"}),r("div",{class:"action-dialog__title"},l("components-b2b-item-remove-confirmation-title"))),r("div",{slot:"footer",class:"action-dialog__footer"},r("tet-button",{class:"action-dialog__button",type:"secondary",theme:this.theme,size:"large",onClick:()=>this.confirmationDialogEl.close()},l("components-b2b-item-remove-confirmation-decline")),r("tet-button",{class:"action-dialog__button",type:"primary",theme:this.theme,size:"large",iconName:"tc-trash",iconPosition:"left",onClick:()=>{h(this.itemToRemove),this.confirmationDialogEl.close()}},l("components-b2b-item-remove-confirmation-accept"))));resetState=()=>{f("cart",new Map),this.checkoutAttempted=!1,this.primaryAccordionEl.open(),this.secondaryAccordionEl.close()};renderSubmissionStateDialog=()=>{const t="loading"===this.formState,o=()=>{this.resetState(),this.successCloseClick.emit(),this.submissionStateDialogEl.close()},e=t?r("div",{class:"action-dialog"},r("tet-spinner",{theme:this.theme}),r("div",{class:"action-dialog__title"},l("components-b2b-loading-dialog-title")),r("div",{class:"action-dialog__description"},l("components-b2b-loading-dialog-description"))):[r("div",{class:"action-dialog"},r("tet-icon",{class:"action-dialog__icon action-dialog__success-icon",name:"tc-check-circle"}),r("div",{class:"action-dialog__title"},l("components-b2b-success-dialog-title")),r("div",{class:"action-dialog__description"},l("components-b2b-success-dialog-description"))),r("div",{slot:"footer",class:"action-dialog__footer"},r("tet-button",{class:"action-dialog__button",type:"secondary",theme:this.theme,size:"large",onClick:o},r("div",{class:"action-dialog__button-text"},l("components-b2b-success-dialog-close"))),r("tet-button",{class:"action-dialog__button",type:"primary",theme:this.theme,size:"large",onClick:()=>{this.resetState(),this.submissionStateDialogEl.close()}},r("div",{class:"action-dialog__button-text"},l("components-b2b-success-dialog-start-again"))))];return r("tet-dialog",{ref:t=>this.submissionStateDialogEl=t,class:{[this.theme]:!0,"action-dialog--loading":t},closeOnOverlayClick:!1,closeOnEscape:!t,hideCloseButton:t,theme:this.theme,onCloseDialog:"success"===this.formState?o:this.submissionStateDialogEl.close},e)};renderCards=t=>{const o="primary"===t?this.activePrimaryCategoryId:this.activeSecondaryCategoryId,e="primary"===t?this.selectedPrimaryCards:this.selectedSecondaryCards,i=this.getCategoryById(o),{modalScreenId:a,products:n=[]}=i||{},s=n.map((t=>{const{productCode:i,name:{lv:a},description:{lv:n},amount:s,b2bConfiguratorProduct:{discountAmount:c,selectionType:l,defaultValue:f,minValue:m,maxValue:h,translationKey:u},benefits:{lv:y},contracts:p}=t,b=!!t.attributes.find((t=>"isBestChoice"===t.key))?.value,g="single"===l?void 0:{defaultValue:f,minValue:m,maxValue:h,label:u},_={id:i,title:a,subtitle:n,isBestChoice:b,price:s,discountPrice:c,benefits:y.split("\n"),contract:p[0]?.contract,counterOptions:g},v=e.includes(i);return r("tet-b2b-compare-card",{options:_,theme:this.theme,key:i,isSelected:v,onSelectedChange:()=>this.handleCardSelected(i,o),count:d.cart.get(i),onCountChange:t=>this.handleProductCountChanged(t,o)})}));return r("div",{class:"offer__cards"},r("div",{class:"offer__cards-header"},r("div",{class:"offer__cards-title"},l("components-b2b-offer-product-list-title")),a&&r("button",{class:{"button-reset":!0,compare__button:!0,[`${this.theme}`]:!0},onClick:()=>{this.onCompareLinkClick(o)}},r("span",{class:{compare__text:!0,"tet-link":!0,[`${this.theme}`]:!0}},l("components-b2b-offer-compare-link-text")),r("div",{class:"compare__icon-wrapper"},r("tet-icon",{class:"compare__icon",name:"tc-info-circle-outline",theme:this.theme})))),r("div",{class:"offer__cards-list"},s))};handleCartProductCountChange=(t,o,e)=>{this.handleProductCountChanged({detail:{cardId:t,count:o}},e)};goToProduct=async(t,o)=>{const e=this.getCategoryById(t);e&&("primary"===e.type?(await this.primaryAccordionEl.open(),await this.primaryNavEl.selectMenuItem(t),this.primaryAccordionEl.scrollIntoView({behavior:"smooth"})):"secondary"===e.type&&(await this.secondaryAccordionEl.open(),await this.secondaryNavEl.selectMenuItem(t),this.secondaryAccordionEl.scrollIntoView({behavior:"smooth"})),setTimeout((()=>{this.handleCardSelected(o,t)}),0))};renderCartCardsList=t=>{const o=o=>{const e=d.cart.get(o),i=d.productDetails.get(o);if(void 0===e||!i)return null;const{name:a,amount:n,description:s,discountAmount:c,categoryName:f,categoryType:m,categoryId:h,b2bConfiguratorProduct:u}=i,y="primary"===m?s:f,{selectionType:p,term:b,minValue:g,maxValue:_,translationKey:v}=u;return r("tet-business-summary-card",{key:o,productName:a,price:n,productDescription:y,discountPrice:c,currency:this.priceSuffix,contractTerm:b,theme:this.theme,withStepper:"number"===p,value:e,minValue:g,maxValue:_,stepperLabel:l(v||""),context:t,onAmountChange:t=>this.handleCartProductCountChange(o,t.detail,h),onDeleteButtonClick:()=>this.handleCartProductCountChange(o,0,h),onEditButtonClick:()=>this.goToProduct(h,o)})};return["primary","secondary"].map((t=>{const e=[...d.cart].filter((([o])=>{const e=d.productDetails.get(o);return e&&e.categoryType===t})).map((([t])=>o(t)));return e.length?r("div",{class:"cart__card-list",slot:t},e):null}))};positionStickyCartEl=()=>{this.referenceElement&&(this.isDesktopResolution?this.hostElement.style.setProperty("--b2b-cart-sticky-top",`${this.referenceElement.offsetTop}px`):this.hostElement.style.removeProperty("--b2b-cart-sticky-top"))};renderCart=(t="edit")=>{const o=!d.cart.size;let e={primary:0,secondary:0},i={primary:0,secondary:0},a=0;for(const[t,o]of d.cart){const r=d.productDetails.get(t);r&&(e[r.categoryType]+=(r.discountAmount??r.amount)*o,i[r.categoryType]+=1,a+=r.amount*o)}const{primary:n,secondary:c}=e,f=n+c,m=a-f,{primary:h,secondary:u}=this.areProductsAddedToCart(),y="edit"===t&&this.checkoutAttempted&&!h,p="edit"===t&&this.checkoutAttempted&&!u,b={summaryAmount:s(f,{currency:""}),primaryAmount:s(n,{currency:""}),secondaryAmount:s(c,{currency:""}),primaryCount:i.primary,secondaryCount:i.secondary,summarySavings:s(m,{currency:""}),hasPrimaryNotification:y,hasSecondaryNotification:p},g="edit"===t?r("tet-button",{onClick:this.checkout,slot:"cta",class:"cart__cta",type:"primary",size:this.isDesktopResolution?"large":"medium",theme:this.theme},l("components-b2b-cart-cta-button-title")):null;return r("tet-b2b-configurator-cart",{ref:o=>"edit"===t?this.cartEl=o:null,context:t,class:{cart:!0,"cart--empty":o,[`cart--${t}`]:!0},data:b,theme:this.theme,isCartEmpty:o,isDesktopResolution:this.isDesktopResolution},this.renderCartCardsList(t),g)};areProductsAddedToCart=()=>{const t={primary:!1,secondary:!1};for(const[o,e]of d.cart){const e=d.productDetails.get(o);e&&(t[e.categoryType]=!0)}return t};checkout=()=>{this.checkoutAttempted=!0;const{primary:t,secondary:o}=this.areProductsAddedToCart();t&&o&&this.checkoutFormEl.open()};submit=({detail:t})=>{const o={cart:u(),contactInfo:t};this.formState="loading",this.b2bConfiguratorSubmit.emit(o),this.checkoutFormEl.close(),this.submissionStateDialogEl.open()};renderCheckoutForm=()=>r("tet-b2b-check-out-form",{ref:t=>this.checkoutFormEl=t,theme:this.theme,"onSubmit-check-out-form":this.submit},r("div",{slot:"cart"},this.renderCart("checkout")));render(){return r(i,{key:"001da651eb395990d65a929558920f80f67ec357"},r("div",{key:"b20fe87916971db6c1173796f20f0b5b307f152c",class:{configurator:!0,[`${this.theme}`]:!0}},this.isLoading?this.renderPlaceholder():d.data&&[this.renderOffer(),this.renderCart()]),this.renderCheckoutForm(),this.renderConfirmationDialog(),this.renderSubmissionStateDialog())}static get watchers(){return{activePrimaryCategoryId:["resetSelectedPrimaryCards"],activeSecondaryCategoryId:["resetSelectedSecondaryCards"]}}};y.style='@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Gilroy-W05-Medium.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Medium.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Gilroy-W05-Semibold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Semibold.woff") format("woff")}@font-face{font-family:"Gilroy";font-style:normal;font-weight:700;font-display:swap;src:url("assets/fonts/Gilroy-W05-Bold.woff2") format("woff2"), url("assets/fonts/Gilroy-W05-Bold.woff") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("assets/fonts/Inter-Regular.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Regular.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("assets/fonts/Inter-Medium.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-Medium.woff?v=3.19") format("woff")}@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("assets/fonts/Inter-SemiBold.woff2?v=3.19") format("woff2"), url("assets/fonts/Inter-SemiBold.woff?v=3.19") format("woff")}:host{--font-family-fallback:Gilroy, Arial, sans-serif;--font-family-headline:Gilroy;--font-family-content:Inter, var(--font-family-fallback);font-family:var(--font-family-content)}:root{--tet-link-color:var(--tc-text-primary);--tet-link-color-hover:var(--tc-text-secondary);--tet-link-color-active:var(--tc-text-tertiary);--tet-link-color-focus:var(--tc-blue-40);--tet-link-color-disabled:var(--tc-button-text-inverse-disabled);--tet-link-secondary-color:var(--tc-text-secondary);--tet-link-secondary-color-hover:var(--tc-text-primary)}.tet-link,.tet-link__arrow{text-decoration:underline;color:var(--tet-link-color);position:relative;line-height:1.5rem;cursor:pointer}.tet-link.dark,.tet-link__arrow.dark{--tet-link-color:var(--tc-text-primary-dark);--tet-link-color-hover:var(--tc-text-secondary-dark);--tet-link-color-active:var(--tc-text-tertiary-dark);--tet-link-color-focus:var(--tc-blue-40-dark);--tet-link-color-disabled:var(--tc-button-text-inverse-disabled-dark);--tet-link-secondary-color:var(--tc-text-secondary-dark);--tet-link-secondary-color-hover:var(--tc-text-primary-dark)}.tet-link.tet-link--secondary,.tet-link__arrow.tet-link--secondary{--tet-link-color:var(--tet-link-secondary-color);--tet-link-color-hover:var(--tet-link-secondary-color-hover)}.tet-link tet-icon,.tet-link__arrow tet-icon{--icon-color:var(--tet-link-color)}.tet-link:hover,.tet-link__arrow:hover{color:var(--tet-link-color-hover)}.tet-link:hover tet-icon,.tet-link__arrow:hover tet-icon{--icon-color:var(--tet-link-color-hover)}.tet-link:active,.tet-link__arrow:active{color:var(--tet-link-color-active)}.tet-link:active tet-icon,.tet-link__arrow:active tet-icon{--icon-color:var(--tet-link-color-active)}.tet-link:focus-visible,.tet-link__arrow:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem;transition:outline 0s;outline-color:var(--tet-link-color-focus);border-radius:0.125rem}.tet-link.disabled,.tet-link__arrow.disabled{color:var(--tet-link-color-disabled);pointer-events:none;cursor:auto}.tet-link.disabled tet-icon,.tet-link__arrow.disabled tet-icon{--icon-color:var(--tet-link-color-disabled)}.tet-link.disabled:focus-visible,.tet-link__arrow.disabled:focus-visible{outline:none}.tet-link tet-icon,.tet-link__arrow tet-icon{padding-left:0.25rem;padding-right:0.25rem;--icon-container-display:inline-block}.tet-link__arrow{padding-right:1.5rem}.tet-link__arrow::after{content:"--\x3e";position:absolute;white-space:nowrap;display:inline-block;text-decoration:none;padding-left:0.25rem;letter-spacing:initial;transition:all 0.15s ease-in}.tet-link__arrow:hover::after{padding-left:0.375rem}:host{display:block;--b2b-cart-offset-top:0px}.light{--b2b-text-color:var(--tc-text-primary);--b2b-text-color-secondary:var(--tc-text-secondary);--b2b-background-color:var(--tc-layer-primary);--b2b-icon-background-color:var(--tc-layer-secondary);--b2b-icon-pressed-background-color:var(--tc-layer-quaternary);--b2b-box-shadow:var(--tc-elevation-one);--b2b-border-color:var(--tc-border-quaternary);--b2b-summary-block-color:var(--tc-layer-secondary);--b2b-summary-accent-color:var(--tc-yellow-20);--b2b-confirmation-dialog-icon-color:var(--tc-yellow-40);--b2b-success-dialog-icon-color:var(--tc-green-40)}.dark{--b2b-text-color:var(--tc-text-primary-dark);--b2b-text-color-secondary:var(--tc-text-secondary-dark);--b2b-background-color:var(--tc-layer-primary-dark);--b2b-icon-background-color:var(--tc-layer-secondary-dark);--b2b-icon-pressed-background-color:var(--tc-layer-quaternary-dark);--b2b-box-shadow:var(--tc-elevation-one-dark);--b2b-border-color:var(--tc-border-quaternary-dark);--b2b-summary-block-color:var(--tc-layer-secondary-dark);--b2b-summary-accent-color:var(--tc-grey-20-dark);--b2b-confirmation-dialog-icon-color:var(--tc-yellow-40-dark);--b2b-success-dialog-icon-color:var(--tc-green-40-dark)}button.button-reset{background:none;border:none;padding:0;color:inherit;text-align:inherit}.placeholder{--placeholder-animation-speed:5s}.configurator{display:flex;gap:1rem;flex-direction:column;color:var(--b2b-text-color)}@media screen and (min-width: 64rem){.configurator{gap:1.5rem;flex-direction:row;align-items:flex-start}}.offer{border-radius:1rem;height:fit-content;flex:0 0 calc(70% - 0.75rem);background-color:var(--b2b-background-color);box-shadow:var(--b2b-box-shadow)}.offer__block{--accordion-header-padding:1rem;--accordion-header-mobile-padding:1rem;--accordion-header-font:600 1.25rem/1.5rem Gilroy, Gilroy, Arial, sans-serif;--accordion-header-mobile-font:600 1.25rem/1.5rem Gilroy, Gilroy, Arial, sans-serif}.offer__block:first-child{--accordion-border-radius:1rem 1rem 0 0;--accordion-outer-border:var(--b2b-border-color)}.offer__block:last-child{--accordion-border-radius:0 0 1rem 1rem;--accordion-border-bottom-width:0}@media screen and (min-width: 64rem){.offer__block{--accordion-header-padding:1.5rem;--accordion-header-font:600 1.75rem/2rem Gilroy, Gilroy, Arial, sans-serif}}.offer__content{overflow:hidden;padding:1.5rem 1rem;display:flex;flex-direction:column;gap:0.75rem;border-color:var(--b2b-border-color);border-top-style:solid;border-top-width:0.0625rem}@media screen and (min-width: 48rem){.offer__content{padding:1.5rem}}@media screen and (min-width: 64rem){.offer__content{flex-direction:row;gap:1.5rem;padding-bottom:2.5rem}}.offer__navigation{margin:0 -1.5rem;flex:0 0 30%}@media screen and (min-width: 64rem){.offer__navigation{max-width:20.5rem;margin:0}}.offer__cards{flex:1 1 0%}.offer__cards-header{padding:0.5rem 0 0.75rem 0;display:flex;gap:0.5rem;justify-content:space-between;align-items:center}@media screen and (min-width: 64rem){.offer__cards-header{padding:1rem 0}}.offer__cards-list{display:flex;flex-direction:column;gap:1rem}.offer__cards-title{flex:auto;font:600 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}@media screen and (min-width: 64rem){.offer__cards-title{font:600 1.25rem/1.5rem "Gilroy", "Gilroy, Arial, sans-serif"}}.compare__button{border-radius:50%;overflow:hidden;font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}@media screen and (min-width: 64rem){.compare__button{border-radius:0.125rem}}.compare__button:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline-offset:0.125rem;transition:outline 0s}.compare__button.dark:focus-visible{outline:0.125rem solid var(--tc-blue-40);outline:0.125rem solid var(--tc-blue-40-dark);outline-offset:0.125rem;transition:outline 0s}.compare__button:active{--b2b-icon-background-color:var(--b2b-icon-pressed-background-color)}.compare__text{font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif";display:none}@media screen and (min-width: 64rem){.compare__text{display:initial}}.compare__icon-wrapper{width:2.75rem;height:2.75rem;display:flex;justify-content:center;align-items:center;background-color:var(--b2b-icon-background-color);cursor:pointer}@media screen and (min-width: 64rem){.compare__icon-wrapper{display:none}}.compare__icon{--icon-size:1.5rem;--icon-container-display:flex}.cart{flex:0 0 calc(30% - 0.75rem);position:sticky}.cart--edit{bottom:-1px;top:calc(var(--b2b-cart-sticky-top) + var(--b2b-cart-offset-top))}@media screen and (min-width: 64rem){.cart--edit{max-width:calc(30% - 0.75rem)}}.cart--empty{display:none}@media screen and (min-width: 64rem){.cart--empty{display:flex}}.cart__card-list{padding:0 1rem 1rem;display:flex;flex-direction:column;gap:0.5rem}.cart__cta{display:block;align-self:center;width:stretch;--button-width:100%}@media screen and (min-width: 48rem){.cart__cta{align-self:flex-end;width:unset;--button-width:auto}}.action-dialog{display:flex;flex-direction:column;gap:0.5rem;align-items:center;margin-bottom:1.5rem}.action-dialog--loading{--dialog-footer-border-color:transparent}.action-dialog__title{text-align:center;font:600 1.5rem/1.75rem "Gilroy", "Gilroy, Arial, sans-serif"}.action-dialog__description{text-align:center;font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif"}.action-dialog__icon{--icon-size:3rem}.action-dialog__attention-icon{--icon-color:var(--b2b-confirmation-dialog-icon-color)}.action-dialog__success-icon{--icon-color:var(--b2b-success-dialog-icon-color)}.action-dialog__footer{display:flex;flex-direction:column;justify-content:space-between;flex:auto;gap:1rem}@media screen and (min-width: 31.25rem){.action-dialog__footer{flex-direction:row}}.action-dialog__button{--button-width:100%}.action-dialog__button-text{white-space:nowrap}';export{y as tet_b2b_configurator}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,f as s,h as i,H as o}from"./p-
|
|
1
|
+
import{r as t,c as e,f as s,h as i,H as o}from"./p-7c868b40.js";import{p as a,t as h}from"./p-f9e5405c.js";import"./p-9a2b6ee2.js";import"./p-59ffdcd3.js";const n=class{constructor(s){t(this,s),this.closeDialog=e(this,"closeDialog",7),this.openDialog=e(this,"openDialog",7),this.content="",this.steps=[],this.isOpen=!1,this.dialogDataScreenKey="",this.tetDialogClass="",this.language="lv",this.isKeydownFocus=!1,this.theme="light"}stepBlocks=[];prevButton;nextButton;tetDialog;closeDialog;openDialog;async componentWillLoad(){a("tet-components",this.language).then((()=>s(this)))}componentDidLoad(){this.setActive(!1),this.prevButton.addEventListener("click",(()=>{this.setActive(!0),this.prevButton.shadowRoot.querySelector("button")?.blur(),this.isKeydownFocus&&("none"!==this.prevButton.style.display?this.prevButton.focus():this.nextButton.focus())})),this.nextButton.addEventListener("click",(()=>{this.setActive(!1),this.nextButton.shadowRoot.querySelector("button")?.blur(),this.isKeydownFocus&&("none"!==this.nextButton.style.display?this.nextButton.focus():this.prevButton.focus())}))}setStepBlocks=t=>{t&&this.stepBlocks.push(t)};setActive=t=>{const e=Array.from(this.stepBlocks).find((t=>t.classList.contains("active"))),s=e?Number(e.getAttribute("data-step")):0,i=t?s-1:s+1,o=Array.from(this.stepBlocks),a=o.find((t=>Number(t.getAttribute("data-step"))===i));a&&(this.stepBlocks.forEach((t=>{t.style.display="none",t.classList.remove("active")})),a.classList.add("active"),a.style.display="block",this.updateButtonVisibility(i,o))};updateButtonVisibility=(t,e)=>{const s=e.find((e=>Number(e.getAttribute("data-step"))===t+1)),i=e.find((e=>Number(e.getAttribute("data-step"))===t-1));this.nextButton.style.display=s?"block":"none",this.prevButton.style.display=i?"block":"none",this.tetDialog.setAttribute("footer-display",s?i?"between":"right":"left")};handleKeydownEvent=t=>{["Enter"," "].includes(t.key)&&(this.isKeydownFocus=!0)};handleCloseDialog=t=>{t.stopPropagation(),this.closeDialog.emit(t.detail)};handleOpenDialog=t=>{t.stopPropagation(),this.openDialog.emit(t.detail)};renderStep(t,e){return i("div",{innerHTML:t,"data-step":Number(e)+1,class:"multi-step-dialog__step",ref:this.setStepBlocks})}render(){return i(o,{key:"4f5b617d22dd672c2e441e79164ed7842bbca7d3",class:"multi-step-dialog"},i("tet-dialog",{key:"23e2a4c3e2a544e6da39bdf06e33f9f85784472a",class:this.tetDialogClass,"is-open":this.isOpen,"data-screen-key":this.dialogDataScreenKey,"footer-display":"right",ref:t=>this.tetDialog=t,theme:this.theme,onCloseDialog:this.handleCloseDialog,onOpenDialog:this.handleOpenDialog},i("div",{key:"bbb973ab7f3a0b156bf2f12888a0b655987424f1",innerHTML:this.content}),this.steps.map(((t,e)=>this.renderStep(t,e))),i("tet-button",{key:"aa9558c6c9c3bfcae3b0126d57c052744c2fa5db",class:"footer-button",slot:"footer",size:"medium",theme:this.theme,type:"secondary",ref:t=>this.prevButton=t,onKeyDown:t=>this.handleKeydownEvent(t)},h("components-go-back")),i("tet-button",{key:"d73779cb37e7ab7d3f6e883d93afda18eeb9cbf4",class:"footer-button",slot:"footer",size:"medium",theme:this.theme,ref:t=>this.nextButton=t,onKeyDown:t=>this.handleKeydownEvent(t)},h("components-next-step"))))}};export{n as tet_multi_step_dialog}
|