@tet/tet-components 1.4.156-testing → 1.4.157-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/{http-codes-D7ffzpYW.js → http-codes-oHpK-Vsh.js} +1 -1
- package/dist/cjs/{index-BL_zVDFC.js → index-puzHM5yZ.js} +27 -31
- package/dist/cjs/{index-Dzs7Nkbj.js → index-t4WNVvo_.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{product-comparison-DUzqZuWv.js → product-comparison-DAR6p-NV.js} +1 -1
- package/dist/cjs/service-availability-services-jPqzmyx3.js +19 -0
- package/dist/cjs/{string-D0kCSyUd.js → string-CL-wkThZ.js} +0 -4
- package/dist/cjs/tet-accordion.cjs.entry.js +7 -7
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +4 -4
- package/dist/cjs/tet-address-offers-v2.cjs.entry.js +332 -0
- package/dist/cjs/tet-address-offers-view-v2.cjs.entry.js +81 -0
- package/dist/cjs/tet-address-offers-view.cjs.entry.js +5 -5
- package/dist/cjs/{tet-address-offers_5.cjs.entry.js → tet-address-offers_3.cjs.entry.js} +8 -887
- package/dist/cjs/tet-address-search_2.cjs.entry.js +873 -0
- package/dist/cjs/{tet-assembler.cjs.entry.js → tet-assembler_3.cjs.entry.js} +827 -13
- package/dist/cjs/tet-autocomplete-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/tet-autocomplete_2.cjs.entry.js +6 -6
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +17 -17
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +6 -6
- package/dist/cjs/tet-banner-nav.cjs.entry.js +4 -4
- package/dist/cjs/tet-bar-graph.cjs.entry.js +4 -4
- package/dist/cjs/tet-border-radius.cjs.entry.js +2 -2
- package/dist/cjs/tet-business-card.cjs.entry.js +3 -3
- package/dist/cjs/tet-business-compare-card.cjs.entry.js +3 -3
- package/dist/cjs/tet-business-round-stepper.cjs.entry.js +2 -2
- package/dist/cjs/tet-button.cjs.entry.js +2 -2
- package/dist/cjs/tet-card-list.cjs.entry.js +5 -5
- package/dist/cjs/tet-carousel.cjs.entry.js +10 -10
- package/dist/cjs/tet-checkbox_3.cjs.entry.js +9 -9
- package/dist/cjs/tet-cloud-application-form-dialog.cjs.entry.js +6 -6
- package/dist/cjs/tet-cloud-configurator.cjs.entry.js +4 -4
- package/dist/cjs/tet-colors.cjs.entry.js +5 -5
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +4 -4
- package/dist/cjs/tet-compare-cards-tab.cjs.entry.js +3 -3
- package/dist/cjs/tet-compare-cards_2.cjs.entry.js +5 -5
- package/dist/cjs/tet-components.cjs.js +2 -2
- package/dist/cjs/tet-container_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-countdown.cjs.entry.js +2 -2
- package/dist/cjs/tet-counter.cjs.entry.js +1 -1
- package/dist/cjs/tet-dialog.cjs.entry.js +4 -4
- 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 +2 -2
- package/dist/cjs/tet-feedback-form.cjs.entry.js +4 -4
- 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 +2 -2
- package/dist/cjs/tet-fonts.cjs.entry.js +2 -2
- package/dist/cjs/tet-grid.cjs.entry.js +2 -2
- package/dist/cjs/tet-icon.cjs.entry.js +2 -2
- package/dist/cjs/tet-inline-message.cjs.entry.js +1 -1
- package/dist/cjs/tet-input.cjs.entry.js +4 -4
- package/dist/cjs/tet-layout.cjs.entry.js +2 -2
- package/dist/cjs/tet-link-card-list.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +2 -2
- package/dist/cjs/tet-menu-mobile.cjs.entry.js +1 -1
- package/dist/cjs/tet-menu.cjs.entry.js +1 -1
- package/dist/cjs/tet-mini-compare-card.cjs.entry.js +1 -1
- package/dist/cjs/tet-multi-step-dialog.cjs.entry.js +5 -5
- package/dist/cjs/tet-navigation-mobile.cjs.entry.js +7 -7
- package/dist/cjs/tet-news-card-list.cjs.entry.js +2 -2
- package/dist/cjs/tet-news-card.cjs.entry.js +2 -2
- package/dist/cjs/tet-notification.cjs.entry.js +2 -2
- package/dist/cjs/tet-number-input.cjs.entry.js +1 -1
- package/dist/cjs/tet-paginator.cjs.entry.js +5 -5
- package/dist/cjs/tet-placeholder.cjs.entry.js +2 -2
- 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_2.cjs.entry.js +3 -3
- package/dist/cjs/tet-range-slider.cjs.entry.js +8 -8
- package/dist/cjs/tet-round-stepper.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 +4 -4
- package/dist/cjs/tet-spacing.cjs.entry.js +2 -2
- package/dist/cjs/tet-spinner.cjs.entry.js +4 -4
- package/dist/cjs/tet-stepper-input.cjs.entry.js +5 -5
- package/dist/cjs/tet-stepper-v3.cjs.entry.js +1 -1
- package/dist/cjs/tet-sticky-offer.cjs.entry.js +2 -2
- package/dist/cjs/tet-support-search.cjs.entry.js +2 -2
- package/dist/cjs/tet-switch.cjs.entry.js +1 -1
- package/dist/cjs/tet-table.cjs.entry.js +1 -1
- package/dist/cjs/tet-tag_2.cjs.entry.js +6 -6
- 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 +3 -3
- package/dist/cjs/tet-thank-you-view-v3.cjs.entry.js +4 -4
- package/dist/cjs/tet-tv-program-channel-picker_2.cjs.entry.js +5 -5
- package/dist/cjs/tet-tv-program.cjs.entry.js +2 -2
- package/dist/cjs/{translations-Uvcq4kv8.js → translations-D5zHdnnh.js} +2 -2
- package/dist/cjs/{typecheck--Bs-bZ_K.js → typecheck-Do6mN8Vg.js} +0 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/advanced/address/tet-address-offers-v2/address-offers-v2.model.js +147 -0
- package/dist/collection/components/{simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.css → advanced/address/tet-address-offers-v2/tet-address-offers-v2.css} +128 -20
- package/dist/collection/components/advanced/address/tet-address-offers-v2/tet-address-offers-v2.js +346 -0
- package/dist/collection/components/advanced/address/tet-address-search/tet-address-search.js +3 -3
- package/dist/collection/components/advanced/address/tet-autocomplete/tet-autocomplete.js +2 -2
- package/dist/collection/components/advanced/address/tet-autocomplete-dropdown/tet-autocomplete-dropdown.js +1 -1
- package/dist/collection/components/advanced/cards/tet-assembler/tet-assembler.css +1 -17
- package/dist/collection/components/advanced/cards/tet-assembler/tet-assembler.js +70 -9
- package/dist/collection/components/advanced/cards/tet-b2b-compare-card/tet-b2b-compare-card.js +6 -6
- package/dist/collection/components/advanced/cards/tet-business-card/tet-business-card.js +2 -2
- package/dist/collection/components/advanced/cards/tet-business-compare-card/tet-business-compare-card.js +2 -2
- package/dist/collection/components/advanced/cards/tet-business-summary-card/tet-business-summary-card.js +1 -1
- package/dist/collection/components/advanced/cards/tet-card-list/tet-card-list.js +4 -4
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.js +1 -1
- package/dist/collection/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.css +13 -0
- package/dist/collection/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.js +76 -6
- package/dist/collection/components/advanced/cards/tet-news-card/tet-news-card.js +1 -1
- package/dist/collection/components/advanced/customer/tet-asset-availability-addresses/tet-asset-availability-addresses.js +1 -1
- package/dist/collection/components/advanced/dialog/tet-multi-step-dialog/tet-multi-step-dialog.js +1 -1
- package/dist/collection/components/advanced/forms/tet-availability-contact-form/tet-availability-contact-form.js +1 -1
- package/dist/collection/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.js +3 -3
- package/dist/collection/components/basic/buttons/tet-button/tet-button.js +1 -1
- package/dist/collection/components/basic/buttons/tet-checkbox/tet-checkbox.js +7 -7
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-content/tet-tab-content.js +2 -2
- package/dist/collection/components/basic/buttons/tet-tabs/tet-tab-header/tet-tab-header.js +2 -2
- package/dist/collection/components/basic/buttons/tet-tag/tet-tag.js +2 -2
- package/dist/collection/components/basic/carousel/tet-carousel/tet-carousel.js +6 -6
- package/dist/collection/components/basic/loaders/tet-loader/tet-loader.js +1 -1
- package/dist/collection/components/basic/loaders/tet-placeholder/tet-placeholder.js +1 -1
- package/dist/collection/components/basic/loaders/tet-spinner/tet-spinner.js +3 -3
- package/dist/collection/components/basic/misc/tet-countdown/tet-countdown.js +1 -1
- package/dist/collection/components/basic/steppers/tet-business-round-stepper/tet-business-round-stepper.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.js +2 -2
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.js +1 -1
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.js +4 -4
- package/dist/collection/components/simple/inputs/tet-range-slider/tet-range-slider.js +7 -7
- package/dist/collection/components/simple/inputs/tet-stepper-input/tet-stepper-input.js +1 -1
- package/dist/collection/components/simple/inputs/tet-textarea/tet-textarea.js +2 -2
- package/dist/collection/components/simple/lists/tet-news-card-list/tet-news-card-list.js +1 -1
- package/dist/collection/components/simple/lists/tet-selection-list/tet-selection-list.js +1 -1
- package/dist/collection/components/simple/menu/tet-business-navigation/tet-business-navigation.js +1 -1
- package/dist/collection/components/simple/menu/tet-navigation-mobile/tet-navigation-mobile.js +3 -3
- package/dist/collection/components/simple/menu/tet-paginator/tet-paginator.js +1 -1
- package/dist/collection/components/simple/misc/tet-sticky-offer/tet-sticky-offer.js +1 -1
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.js +6 -6
- package/dist/collection/components/simple/structural/tet-expansion-panel/tet-expansion-panel.js +1 -1
- package/dist/collection/components/simple/tables-and-graphs/tet-bar-graph/tet-bar-graph.js +3 -3
- package/dist/collection/components/simple/text-blocks/tet-cloud-application-form-dialog/tet-cloud-application-form-dialog.js +2 -2
- package/dist/collection/components/simple/text-blocks/tet-notification/tet-notification.js +1 -1
- package/dist/collection/components/simple/text-blocks/tet-tooltip/tet-tooltip.js +1 -1
- package/dist/collection/components/views/tet-address-offers-view/tet-address-offers-view.js +1 -1
- package/dist/collection/components/views/tet-address-offers-view-v2/assets/banner.webp +0 -0
- package/dist/collection/components/{simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.css → views/tet-address-offers-view-v2/tet-address-offers-view-v2.css} +78 -34
- package/dist/collection/components/views/tet-address-offers-view-v2/tet-address-offers-view-v2.js +289 -0
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/tet-b2b-configurator-cart.js +2 -2
- package/dist/collection/components/views/tet-b2b-configurator/tet-b2b-configurator.js +1 -1
- package/dist/collection/components/views/tet-tv-program/components/tet-tv-program-date-picker/tet-tv-program-date-picker.js +1 -1
- package/dist/collection/components/views/tet-tv-program/tet-tv-program.js +1 -1
- package/dist/collection/docs/styling/border-radius/tet-border-radius.js +1 -1
- package/dist/collection/docs/styling/colors/tet-colors.js +4 -4
- package/dist/collection/docs/styling/font-weight/tet-font-weight.js +1 -1
- package/dist/collection/docs/styling/fonts/tet-fonts.js +1 -1
- package/dist/collection/docs/styling/layout/tet-layout.js +1 -1
- package/dist/collection/docs/styling/link/tet-link.js +1 -1
- package/dist/collection/docs/styling/spacing/tet-spacing.js +1 -1
- package/dist/collection/docs/styling/tet-grid/tet-grid.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-tMXV3IB5.js → p-B82POgFl.js} +1 -1
- package/dist/components/{p-CNhW7KE6.js → p-BAZQcyA7.js} +1 -1
- package/dist/components/{p-BztqMLE1.js → p-BAf_O-kb.js} +1 -1
- package/dist/components/{p-B9bE6qY-.js → p-BDEIj3j6.js} +1 -1
- package/dist/components/{p-C5khLmO4.js → p-BPTM37Hn.js} +1 -1
- package/dist/components/{p-CHVoAVzT.js → p-BQiafjHE.js} +1 -1
- package/dist/components/{p-DcRCMBBc.js → p-BWy5ewze.js} +1 -1
- package/dist/components/{p-BUyuNqM6.js → p-BX98BUpV.js} +1 -1
- package/dist/components/{p-Dmu5eHbY.js → p-BciwrQoB.js} +1 -1
- package/dist/components/p-BdMiAoro.js +1 -0
- package/dist/components/{p-w1igWoTx.js → p-Bm7pFbvA.js} +1 -1
- package/dist/components/{p-CnVl55e4.js → p-ByM3JujT.js} +1 -1
- package/dist/components/{p-B5y1yfI4.js → p-ByuP1fbX.js} +1 -1
- package/dist/components/{p-CJnk1Plz.js → p-C50q8-fi.js} +1 -1
- package/dist/components/{p-Bc4oqt_L.js → p-C5d7kQcA.js} +1 -1
- package/dist/components/p-CDWcoIgr.js +1 -0
- package/dist/components/{p-B8YPfVrH.js → p-CEVlu6ZD.js} +1 -1
- package/dist/components/{p-t_FgKIcd.js → p-CEyoGS5R.js} +1 -1
- package/dist/components/{p-Ckf6mMEf.js → p-CG9c-nHY.js} +1 -1
- package/dist/components/{p-CMxcvnRv.js → p-CKWJROPt.js} +1 -1
- package/dist/components/p-CQGgxLtq.js +1 -0
- package/dist/components/p-CWuhYFDW.js +1 -0
- package/dist/components/p-Cb-I8QJh.js +1 -0
- package/dist/components/{p-CQBhFzqI.js → p-ClXBenaN.js} +1 -1
- package/dist/components/p-CnMas2yD.js +1 -0
- package/dist/components/{p-DKZxpjnL.js → p-CpJ_GE1B.js} +1 -1
- package/dist/components/{p-d31bvRM6.js → p-CvA9ppPv.js} +1 -1
- package/dist/{tet-components/p-ad8622a2.entry.js → components/p-CvO427nb.js} +1 -1
- package/dist/components/{p-Cqjpl-r4.js → p-D05i9nSD.js} +1 -1
- package/dist/components/{p-C4uKGuRj.js → p-D4MolLd8.js} +1 -1
- package/dist/components/p-D8yjgo3h.js +1 -0
- package/dist/components/{p-CjbC3Ym3.js → p-D9Ay3Miq.js} +1 -1
- package/dist/components/{p-CV0h6H20.js → p-DKtLi_m6.js} +1 -1
- package/dist/components/{p-C61jDpta.js → p-DTOuhcpL.js} +1 -1
- package/dist/components/{p-Cmi0CN7v.js → p-DT_KxFJb.js} +1 -1
- package/dist/components/{p-Dke4zCyb.js → p-DUKWm2NH.js} +1 -1
- package/dist/components/{p-Ba5cZk_W.js → p-DYjsysoT.js} +1 -1
- package/dist/components/{p-DN2JwXg9.js → p-DZRioc0D.js} +1 -1
- package/dist/components/p-DhBrj0ZX.js +1 -0
- package/dist/components/{p-BpfMADD6.js → p-DiSdptzb.js} +1 -1
- package/dist/components/{p-Bsqoxd9G.js → p-DobMlMDf.js} +1 -1
- package/dist/components/{p-BUZAWbGM.js → p-Drc3QqtB.js} +1 -1
- package/dist/components/{p-CxypAmpV.js → p-Ds2b2o-c.js} +1 -1
- package/dist/components/{p-20AXKDtg.js → p-Dxiapgms.js} +1 -1
- package/dist/components/{p-C0RZDFyg.js → p-FC0kZDcz.js} +1 -1
- package/dist/components/{p-Dhe7PE-h.js → p-P5fEcpqm.js} +1 -1
- package/dist/components/{p-Mpe-2CVQ.js → p-QlyBltAE.js} +1 -1
- package/dist/components/{p-BdN4p8Qa.js → p-Xd0ABGeO.js} +1 -1
- package/dist/components/p-_2UzwYR8.js +1 -0
- package/dist/components/{p-Br4jWI9B.js → p-fUGNvavt.js} +1 -1
- package/dist/components/{p-BKqEPSBf.js → p-gcNUTSw9.js} +1 -1
- package/dist/components/{p-B5Dk5hzj.js → p-gw3AOj6h.js} +1 -1
- package/dist/components/{p-1E6motPj.js → p-nNPOjd2b.js} +1 -1
- package/dist/components/{p-Bw-D7nPx.js → p-sp4th_AU.js} +1 -1
- package/dist/components/p-wHiUpSTa.js +1 -0
- 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-datepicker.d.ts → tet-address-offers-v2.d.ts} +4 -4
- package/dist/components/tet-address-offers-v2.js +1 -0
- package/dist/components/tet-address-offers-view-v2.d.ts +11 -0
- package/dist/components/tet-address-offers-view-v2.js +1 -0
- package/dist/components/tet-address-offers-view.js +1 -1
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-address-search.js +1 -1
- package/dist/components/tet-assembler.js +1 -1
- package/dist/components/tet-asset-availability-addresses.js +1 -1
- package/dist/components/tet-autocomplete-dropdown.js +1 -1
- 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 +1 -1
- package/dist/components/tet-banner-nav.js +1 -1
- 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 +1 -1
- package/dist/components/tet-business-navigation.js +1 -1
- package/dist/components/tet-business-round-stepper.js +1 -1
- 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 +1 -1
- package/dist/components/tet-checkbox.js +1 -1
- package/dist/components/tet-cloud-application-form-dialog.js +1 -1
- package/dist/components/tet-cloud-configurator.js +1 -1
- package/dist/components/tet-colors.js +1 -1
- package/dist/components/tet-compare-card-v2.js +1 -1
- package/dist/components/tet-compare-card-v3.js +1 -1
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +1 -1
- package/dist/components/tet-compare-cards.js +1 -1
- package/dist/components/tet-container.js +1 -1
- package/dist/components/tet-countdown.js +1 -1
- package/dist/components/tet-counter.js +1 -1
- package/dist/components/tet-dialog.js +1 -1
- package/dist/components/tet-display.js +1 -1
- package/dist/components/tet-divider.js +1 -1
- package/dist/components/tet-dropdown.js +1 -1
- package/dist/components/tet-dynamic-card.js +1 -1
- package/dist/components/tet-expandable-input.js +1 -1
- package/dist/components/tet-expansion-panel.js +1 -1
- package/dist/components/tet-feedback-form.js +1 -1
- package/dist/components/tet-filter.js +1 -1
- package/dist/components/tet-floating-block.js +1 -1
- 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-layout.js +1 -1
- package/dist/components/tet-link-card-list.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-loader.js +1 -1
- package/dist/components/tet-menu-mobile.js +1 -1
- package/dist/components/tet-menu.js +1 -1
- package/dist/components/tet-mini-compare-card.js +1 -1
- package/dist/components/tet-multi-step-dialog.js +1 -1
- package/dist/components/tet-navigation-mobile.js +1 -1
- package/dist/components/tet-news-card-list.js +1 -1
- package/dist/components/tet-news-card.js +1 -1
- package/dist/components/tet-notification.js +1 -1
- package/dist/components/tet-number-input.js +1 -1
- package/dist/components/tet-paginator.js +1 -1
- package/dist/components/tet-placeholder.js +1 -1
- package/dist/components/tet-position.js +1 -1
- package/dist/components/tet-price-view.js +1 -1
- package/dist/components/tet-radio-blocks.js +1 -1
- package/dist/components/tet-radio.js +1 -1
- package/dist/components/tet-range-slider.js +1 -1
- package/dist/components/tet-round-stepper.js +1 -1
- package/dist/components/tet-selection-list.js +1 -1
- package/dist/components/tet-snicker-card-group.js +1 -1
- package/dist/components/tet-snicker-card.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-spinner.js +1 -1
- package/dist/components/tet-stepper-input.js +1 -1
- package/dist/components/tet-stepper-v3.js +1 -1
- package/dist/components/tet-sticky-offer.js +1 -1
- package/dist/components/tet-support-search.js +1 -1
- package/dist/components/tet-switch.js +1 -1
- package/dist/components/tet-tab-content.js +1 -1
- package/dist/components/tet-tab-header.js +1 -1
- package/dist/components/tet-table.js +1 -1
- 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 +1 -1
- package/dist/components/tet-textarea.js +1 -1
- package/dist/components/tet-thank-you-view-v3.js +1 -1
- package/dist/components/tet-tooltip.js +1 -1
- package/dist/components/tet-tv-program-channel-picker.js +1 -1
- package/dist/components/tet-tv-program-date-picker.js +1 -1
- package/dist/components/tet-tv-program.js +1 -1
- package/dist/esm/{http-codes-BQGPgOl6.js → http-codes-DZlFuxP5.js} +1 -1
- package/dist/esm/{index-BGB6gNkz.js → index-CO8AyGrA.js} +28 -32
- package/dist/esm/{index-DScZlZas.js → index-Rx46bgOe.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{product-comparison-DUVV7BFR.js → product-comparison-Cwy9VRPV.js} +1 -1
- package/dist/esm/service-availability-services-DXz8vHs0.js +17 -0
- package/dist/esm/{string-D0GJDW-O.js → string-C9BlrGW8.js} +1 -4
- package/dist/esm/tet-accordion.entry.js +7 -7
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +4 -4
- package/dist/esm/tet-address-offers-v2.entry.js +330 -0
- package/dist/esm/tet-address-offers-view-v2.entry.js +79 -0
- package/dist/esm/tet-address-offers-view.entry.js +5 -5
- package/dist/esm/{tet-address-offers_5.entry.js → tet-address-offers_3.entry.js} +8 -885
- package/dist/esm/tet-address-search_2.entry.js +870 -0
- package/dist/esm/{tet-assembler.entry.js → tet-assembler_3.entry.js} +826 -14
- package/dist/esm/tet-autocomplete-dropdown.entry.js +3 -3
- package/dist/esm/tet-autocomplete_2.entry.js +6 -6
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +17 -17
- package/dist/esm/tet-b2b-configurator.entry.js +6 -6
- package/dist/esm/tet-banner-nav.entry.js +4 -4
- package/dist/esm/tet-bar-graph.entry.js +4 -4
- package/dist/esm/tet-border-radius.entry.js +2 -2
- package/dist/esm/tet-business-card.entry.js +3 -3
- package/dist/esm/tet-business-compare-card.entry.js +3 -3
- package/dist/esm/tet-business-round-stepper.entry.js +2 -2
- package/dist/esm/tet-button.entry.js +2 -2
- package/dist/esm/tet-card-list.entry.js +5 -5
- package/dist/esm/tet-carousel.entry.js +10 -10
- package/dist/esm/tet-checkbox_3.entry.js +9 -9
- package/dist/esm/tet-cloud-application-form-dialog.entry.js +6 -6
- package/dist/esm/tet-cloud-configurator.entry.js +4 -4
- package/dist/esm/tet-colors.entry.js +5 -5
- package/dist/esm/tet-compare-card-v2.entry.js +4 -4
- package/dist/esm/tet-compare-cards-tab.entry.js +3 -3
- package/dist/esm/tet-compare-cards_2.entry.js +5 -5
- package/dist/esm/tet-components.js +3 -3
- package/dist/esm/tet-container_2.entry.js +3 -3
- package/dist/esm/tet-countdown.entry.js +2 -2
- package/dist/esm/tet-counter.entry.js +1 -1
- package/dist/esm/tet-dialog.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/tet-feedback-form.entry.js +4 -4
- 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 +2 -2
- package/dist/esm/tet-fonts.entry.js +2 -2
- package/dist/esm/tet-grid.entry.js +2 -2
- package/dist/esm/tet-icon.entry.js +2 -2
- package/dist/esm/tet-inline-message.entry.js +1 -1
- package/dist/esm/tet-input.entry.js +4 -4
- package/dist/esm/tet-layout.entry.js +2 -2
- package/dist/esm/tet-link-card-list.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +2 -2
- package/dist/esm/tet-menu-mobile.entry.js +1 -1
- package/dist/esm/tet-menu.entry.js +1 -1
- package/dist/esm/tet-mini-compare-card.entry.js +1 -1
- package/dist/esm/tet-multi-step-dialog.entry.js +5 -5
- package/dist/esm/tet-navigation-mobile.entry.js +7 -7
- package/dist/esm/tet-news-card-list.entry.js +2 -2
- package/dist/esm/tet-news-card.entry.js +2 -2
- package/dist/esm/tet-notification.entry.js +2 -2
- package/dist/esm/tet-number-input.entry.js +1 -1
- package/dist/esm/tet-paginator.entry.js +5 -5
- package/dist/esm/tet-placeholder.entry.js +2 -2
- package/dist/esm/tet-position.entry.js +1 -1
- package/dist/esm/tet-price-view.entry.js +1 -1
- package/dist/esm/tet-radio_2.entry.js +3 -3
- package/dist/esm/tet-range-slider.entry.js +8 -8
- package/dist/esm/tet-round-stepper.entry.js +1 -1
- package/dist/esm/tet-snicker-card-group.entry.js +1 -1
- package/dist/esm/tet-snicker-card.entry.js +4 -4
- package/dist/esm/tet-spacing.entry.js +2 -2
- package/dist/esm/tet-spinner.entry.js +4 -4
- package/dist/esm/tet-stepper-input.entry.js +5 -5
- package/dist/esm/tet-stepper-v3.entry.js +1 -1
- package/dist/esm/tet-sticky-offer.entry.js +2 -2
- package/dist/esm/tet-support-search.entry.js +2 -2
- package/dist/esm/tet-switch.entry.js +1 -1
- package/dist/esm/tet-table.entry.js +1 -1
- package/dist/esm/tet-tag_2.entry.js +6 -6
- 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 +3 -3
- package/dist/esm/tet-thank-you-view-v3.entry.js +4 -4
- package/dist/esm/tet-tv-program-channel-picker_2.entry.js +5 -5
- package/dist/esm/tet-tv-program.entry.js +2 -2
- package/dist/esm/{translations-Dc2OQnbI.js → translations-B5QyZ9vI.js} +2 -2
- package/dist/esm/{typecheck-Bvqcvhjw.js → typecheck-CaZKtSyx.js} +1 -2
- package/dist/tet-components/assets/banner.webp +0 -0
- package/dist/tet-components/{p-6a8f5935.entry.js → p-00440570.entry.js} +1 -1
- package/dist/tet-components/{p-01577a41.entry.js → p-00ee3383.entry.js} +1 -1
- package/dist/tet-components/{p-d62eecdb.entry.js → p-082671b8.entry.js} +1 -1
- package/dist/tet-components/{p-38459b69.entry.js → p-0a35f634.entry.js} +1 -1
- package/dist/tet-components/{p-16199435.entry.js → p-0d582ff6.entry.js} +1 -1
- package/dist/tet-components/{p-be07df58.entry.js → p-0db9ba10.entry.js} +1 -1
- package/dist/tet-components/{p-3bb8e0ec.entry.js → p-172e6e28.entry.js} +1 -1
- package/dist/tet-components/{p-49ba40a1.entry.js → p-19a1e73a.entry.js} +1 -1
- package/dist/{components/p-euiyLrT6.js → tet-components/p-1d183de7.entry.js} +1 -1
- package/dist/tet-components/{p-e3e02e3b.entry.js → p-20a1e096.entry.js} +1 -1
- package/dist/tet-components/{p-79be83b2.entry.js → p-24192844.entry.js} +1 -1
- package/dist/tet-components/{p-b3acb430.entry.js → p-25b05e87.entry.js} +1 -1
- package/dist/tet-components/{p-9cee887f.entry.js → p-2a528ade.entry.js} +1 -1
- package/dist/tet-components/{p-e7e18cc4.entry.js → p-335a6617.entry.js} +1 -1
- package/dist/tet-components/{p-e2d4e5c3.entry.js → p-38ac5d83.entry.js} +1 -1
- package/dist/tet-components/{p-0cb2775f.entry.js → p-397320f3.entry.js} +1 -1
- package/dist/tet-components/{p-ee45806d.entry.js → p-3a317d67.entry.js} +1 -1
- package/dist/tet-components/{p-380c13f1.entry.js → p-4172cf45.entry.js} +1 -1
- package/dist/tet-components/p-417e33c5.entry.js +1 -0
- package/dist/tet-components/{p-a560fec1.entry.js → p-421edd38.entry.js} +1 -1
- package/dist/tet-components/{p-c2d6ac75.entry.js → p-4398cb86.entry.js} +1 -1
- package/dist/tet-components/{p-386be2d5.entry.js → p-43b92cf1.entry.js} +1 -1
- package/dist/tet-components/{p-784dd089.entry.js → p-44f9960d.entry.js} +1 -1
- package/dist/tet-components/{p-a037e4df.entry.js → p-4ba81e21.entry.js} +1 -1
- package/dist/tet-components/{p-66287f28.entry.js → p-4c5557fd.entry.js} +1 -1
- package/dist/tet-components/{p-d8a0eaaa.entry.js → p-4f623f82.entry.js} +1 -1
- package/dist/tet-components/{p-11ed5b55.entry.js → p-53288215.entry.js} +1 -1
- package/dist/tet-components/{p-94b2efaa.entry.js → p-54d6312f.entry.js} +1 -1
- package/dist/tet-components/{p-37c3f4c6.entry.js → p-56b3c60a.entry.js} +1 -1
- package/dist/tet-components/{p-368fb50a.entry.js → p-56f529fa.entry.js} +1 -1
- package/dist/tet-components/p-61561410.entry.js +1 -0
- package/dist/tet-components/p-696802be.entry.js +1 -0
- package/dist/tet-components/{p-7ae4195d.entry.js → p-6fbed98d.entry.js} +1 -1
- package/dist/tet-components/{p-45c01709.entry.js → p-70775616.entry.js} +1 -1
- package/dist/tet-components/{p-cd7efc99.entry.js → p-710077db.entry.js} +1 -1
- package/dist/tet-components/p-71e25e1a.entry.js +1 -0
- package/dist/tet-components/p-7ae98034.entry.js +1 -0
- package/dist/tet-components/{p-c9c4656e.entry.js → p-7d81be98.entry.js} +1 -1
- package/dist/tet-components/{p-fd71a027.entry.js → p-7fe27333.entry.js} +1 -1
- package/dist/tet-components/{p-41ef37c5.entry.js → p-850c65bb.entry.js} +1 -1
- package/dist/tet-components/{p-3005a902.entry.js → p-8e626994.entry.js} +1 -1
- package/dist/tet-components/p-938e02a1.entry.js +1 -0
- package/dist/tet-components/p-94f68711.entry.js +1 -0
- package/dist/tet-components/{p-185e98b4.entry.js → p-998ee6ff.entry.js} +1 -1
- package/dist/tet-components/{p-40503431.entry.js → p-9da92e28.entry.js} +1 -1
- package/dist/tet-components/{p-6d7c406e.entry.js → p-9fcebf59.entry.js} +1 -1
- package/dist/tet-components/{p-9beb88d9.entry.js → p-9fd20cce.entry.js} +1 -1
- package/dist/tet-components/p-B6DaIAt8.js +1 -0
- package/dist/tet-components/p-C9BlrGW8.js +1 -0
- package/dist/tet-components/p-CO8AyGrA.js +3 -0
- package/dist/tet-components/p-CaZKtSyx.js +1 -0
- package/dist/tet-components/p-CclcDrnd.js +1 -0
- package/dist/{components/p-lEX8wezw.js → tet-components/p-Qvh4ioQu.js} +1 -1
- package/dist/tet-components/{p-DX1IQAn5.js → p-WCtqtcml.js} +1 -1
- package/dist/tet-components/{p-5a14b088.entry.js → p-a3554db0.entry.js} +1 -1
- package/dist/tet-components/p-a4308a8d.entry.js +1 -0
- package/dist/tet-components/{p-e0752dc6.entry.js → p-aabaeb21.entry.js} +1 -1
- package/dist/tet-components/p-ae8dd4d2.entry.js +1 -0
- package/dist/tet-components/{p-74ccd606.entry.js → p-af46cb66.entry.js} +1 -1
- package/dist/tet-components/{p-4a39f6bc.entry.js → p-afdfbbe6.entry.js} +1 -1
- package/dist/tet-components/{p-4b92e8e6.entry.js → p-b32bfbcc.entry.js} +1 -1
- package/dist/tet-components/{p-632d382c.entry.js → p-b394da8f.entry.js} +1 -1
- package/dist/tet-components/{p-ad0b78d5.entry.js → p-b47dbd57.entry.js} +1 -1
- package/dist/tet-components/{p-72b23f6a.entry.js → p-b65a081f.entry.js} +1 -1
- package/dist/tet-components/{p-952b6065.entry.js → p-b7604f13.entry.js} +1 -1
- package/dist/tet-components/{p-2c84bff1.entry.js → p-b85587af.entry.js} +1 -1
- package/dist/tet-components/{p-1b29e5f2.entry.js → p-bc168e7d.entry.js} +1 -1
- package/dist/tet-components/p-bd5176b9.entry.js +1 -0
- package/dist/tet-components/{p-17d3a7ff.entry.js → p-bfb89ca9.entry.js} +1 -1
- package/dist/tet-components/{p-c97d7c52.entry.js → p-c0c72e90.entry.js} +1 -1
- package/dist/tet-components/{p-7338bab9.entry.js → p-c6a65c31.entry.js} +1 -1
- package/dist/tet-components/{p-c96c5b96.entry.js → p-cc26cad3.entry.js} +1 -1
- package/dist/tet-components/p-cd8c2923.entry.js +1 -0
- package/dist/tet-components/{p-9d103705.entry.js → p-ce92d83d.entry.js} +1 -1
- package/dist/tet-components/{p-3af65955.entry.js → p-d2bfb56b.entry.js} +1 -1
- package/dist/tet-components/{p-39a59573.entry.js → p-da48adf2.entry.js} +1 -1
- package/dist/tet-components/{p-cc3e87fe.entry.js → p-dc84cd4d.entry.js} +1 -1
- package/dist/tet-components/{p-299c7600.entry.js → p-de2ed849.entry.js} +1 -1
- package/dist/tet-components/{p-954dc5fa.entry.js → p-e3272f96.entry.js} +1 -1
- package/dist/tet-components/{p-41763924.entry.js → p-e6ae26c9.entry.js} +1 -1
- package/dist/tet-components/{p-8310d42d.entry.js → p-e8395909.entry.js} +1 -1
- package/dist/tet-components/{p-830e4fe6.entry.js → p-ea61c173.entry.js} +1 -1
- package/dist/tet-components/p-ef66b469.entry.js +1 -0
- package/dist/tet-components/p-f002f9b5.entry.js +1 -0
- package/dist/tet-components/p-f3b47857.entry.js +1 -0
- package/dist/tet-components/{p-2d36b8a7.entry.js → p-fe36894b.entry.js} +1 -1
- package/dist/tet-components/{p-a32ada3d.entry.js → p-fee45cbd.entry.js} +1 -1
- package/dist/tet-components/{p-0996dd5a.entry.js → p-ff09a8f4.entry.js} +1 -1
- package/dist/tet-components/p-ff425f4d.entry.js +1 -0
- package/dist/tet-components/{p-DbJll7nz.js → p-fxr7DnMu.js} +2 -2
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/advanced/address/tet-address-offers-v2/address-offers-v2.model.d.ts +55 -0
- package/dist/types/components/advanced/address/tet-address-offers-v2/tet-address-offers-v2.d.ts +36 -0
- package/dist/types/components/advanced/cards/tet-assembler/tet-assembler.d.ts +6 -1
- package/dist/types/components/advanced/cards/tet-compare-card-v3/tet-compare-card-v3.d.ts +6 -0
- package/dist/types/components/views/tet-address-offers-view-v2/tet-address-offers-view-v2.d.ts +33 -0
- package/dist/types/components.d.ts +260 -387
- package/dist/types/services/api/services/catalog/service-availability-services.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/tet-compare-card-v3.cjs.entry.js +0 -681
- package/dist/cjs/tet-datepicker-header_4.cjs.entry.js +0 -387
- package/dist/cjs/tet-datepicker.cjs.entry.js +0 -132
- package/dist/cjs/tet-radio-blocks.cjs.entry.js +0 -83
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.css +0 -455
- package/dist/collection/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.css +0 -382
- package/dist/collection/components/simple/inputs/tet-datepicker/tet-datepicker.css +0 -380
- package/dist/components/p-B0kUlgkD.js +0 -1
- package/dist/components/p-C8u5HEb4.js +0 -1
- package/dist/components/p-CAsIFNv3.js +0 -1
- package/dist/components/p-CKSiwKh_.js +0 -1
- package/dist/components/p-Cdi7KDBd.js +0 -1
- package/dist/components/p-Cef0hbKH.js +0 -1
- package/dist/components/p-CoQ-OVcl.js +0 -1
- package/dist/components/p-CvISLoYA.js +0 -1
- package/dist/components/p-D-hVxt6M.js +0 -1
- package/dist/components/p-D0GJDW-O.js +0 -1
- package/dist/components/p-DUxOWNca.js +0 -1
- package/dist/components/tet-datepicker-header.d.ts +0 -11
- package/dist/components/tet-datepicker-header.js +0 -1
- package/dist/components/tet-datepicker-month-view.d.ts +0 -11
- package/dist/components/tet-datepicker-month-view.js +0 -1
- package/dist/components/tet-datepicker-multi-year-view.d.ts +0 -11
- package/dist/components/tet-datepicker-multi-year-view.js +0 -1
- package/dist/components/tet-datepicker-year-view.d.ts +0 -11
- package/dist/components/tet-datepicker-year-view.js +0 -1
- package/dist/components/tet-datepicker.js +0 -1
- package/dist/esm/tet-compare-card-v3.entry.js +0 -679
- package/dist/esm/tet-datepicker-header_4.entry.js +0 -382
- package/dist/esm/tet-datepicker.entry.js +0 -130
- package/dist/esm/tet-radio-blocks.entry.js +0 -81
- package/dist/tet-components/p-067e0001.entry.js +0 -1
- package/dist/tet-components/p-0c0dec4c.entry.js +0 -1
- package/dist/tet-components/p-129027b6.entry.js +0 -1
- package/dist/tet-components/p-137a5837.entry.js +0 -1
- package/dist/tet-components/p-24058988.entry.js +0 -1
- package/dist/tet-components/p-2d285624.entry.js +0 -1
- package/dist/tet-components/p-3ae8cca8.entry.js +0 -1
- package/dist/tet-components/p-45c896dd.entry.js +0 -1
- package/dist/tet-components/p-6bc9b958.entry.js +0 -1
- package/dist/tet-components/p-87f4d9b1.entry.js +0 -1
- package/dist/tet-components/p-97d1416f.entry.js +0 -1
- package/dist/tet-components/p-BGB6gNkz.js +0 -3
- package/dist/tet-components/p-Bvqcvhjw.js +0 -1
- package/dist/tet-components/p-BzLFf73g.js +0 -1
- package/dist/tet-components/p-C1XJmhDH.js +0 -1
- package/dist/tet-components/p-D0GJDW-O.js +0 -1
- package/dist/tet-components/p-bac0cda3.entry.js +0 -1
- package/dist/tet-components/p-d851b8e5.entry.js +0 -1
- package/dist/tet-components/p-de6f9fd9.entry.js +0 -1
- package/dist/tet-components/p-f1608c27.entry.js +0 -1
- package/dist/tet-components/p-fbb45705.entry.js +0 -1
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-header/tet-datepicker-header.d.ts +0 -21
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-month-view/tet-datepicker-month-view.d.ts +0 -45
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-multi-year-view/tet-datepicker-multi-year-view.d.ts +0 -20
- package/dist/types/components/simple/inputs/tet-datepicker/partials/tet-datepicker-year-view/tet-datepicker-year-view.d.ts +0 -20
- package/dist/types/components/simple/inputs/tet-datepicker/tet-datepicker.d.ts +0 -47
|
@@ -0,0 +1,873 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-puzHM5yZ.js');
|
|
4
|
+
var translations = require('./translations-D5zHdnnh.js');
|
|
5
|
+
var httpCodes = require('./http-codes-oHpK-Vsh.js');
|
|
6
|
+
var debounce = require('./debounce-DaxBUS6B.js');
|
|
7
|
+
var string = require('./string-CL-wkThZ.js');
|
|
8
|
+
var a11y = require('./a11y-CzQ63tsq.js');
|
|
9
|
+
var required = require('./required-CHG9KeIg.js');
|
|
10
|
+
require('./typecheck-Do6mN8Vg.js');
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Returns the addresses that match the given keyword.
|
|
14
|
+
* The API currently limits the number of results to 20 addresses.
|
|
15
|
+
*
|
|
16
|
+
* @param keyword
|
|
17
|
+
*/
|
|
18
|
+
const searchAddress = (keyword) => {
|
|
19
|
+
let url;
|
|
20
|
+
try {
|
|
21
|
+
url = new URL(encodeURIComponent(keyword), httpCodes.endpoints.addressSearch).href;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error(error);
|
|
25
|
+
return Promise.resolve([]);
|
|
26
|
+
}
|
|
27
|
+
const request = new httpCodes.ApiRequest()
|
|
28
|
+
.setUrl(url)
|
|
29
|
+
.setOptions({
|
|
30
|
+
method: 'GET',
|
|
31
|
+
})
|
|
32
|
+
.setErrorFallbackValue([]);
|
|
33
|
+
return request.execute();
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Returns the address that matches the address key.
|
|
37
|
+
*
|
|
38
|
+
* @param addressKey
|
|
39
|
+
*/
|
|
40
|
+
const searchAddressByKey = (addressKey) => {
|
|
41
|
+
let url;
|
|
42
|
+
try {
|
|
43
|
+
url = new URL(encodeURIComponent(addressKey), httpCodes.endpoints.address).href;
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
console.error(error);
|
|
47
|
+
return Promise.resolve({ addressKey: '', fullAddress: '', postalCode: '' });
|
|
48
|
+
}
|
|
49
|
+
const request = new httpCodes.ApiRequest()
|
|
50
|
+
.setUrl(url)
|
|
51
|
+
.setOptions({
|
|
52
|
+
method: 'GET',
|
|
53
|
+
})
|
|
54
|
+
.setErrorFallbackValue({ addressKey: '', fullAddress: '', postalCode: '' });
|
|
55
|
+
return request.execute();
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const operations = async (operationId) => {
|
|
59
|
+
let url;
|
|
60
|
+
try {
|
|
61
|
+
url = new URL(operationId, httpCodes.endpoints.operations).href;
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error(error);
|
|
65
|
+
return Promise.reject();
|
|
66
|
+
}
|
|
67
|
+
const request = new httpCodes.ApiRequest()
|
|
68
|
+
.setUrl(url)
|
|
69
|
+
.setOptions({
|
|
70
|
+
method: 'GET',
|
|
71
|
+
})
|
|
72
|
+
.setErrorFallbackValue({});
|
|
73
|
+
const result = request.execute(true);
|
|
74
|
+
return (await result).json();
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
const executeUntil = async (execute, until, { millisecondsToWait = 1000, maxExecutionTries = 10 } = {}) => {
|
|
78
|
+
let result = await execute();
|
|
79
|
+
let tries = maxExecutionTries;
|
|
80
|
+
while (!until(result)) {
|
|
81
|
+
if (--tries <= 0) {
|
|
82
|
+
throw new Error(`Execute Until: maximum tries of ${maxExecutionTries} reached`);
|
|
83
|
+
}
|
|
84
|
+
await wait(millisecondsToWait);
|
|
85
|
+
result = await execute();
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
};
|
|
89
|
+
const wait = (milliseconds) => {
|
|
90
|
+
return new Promise(resolve => {
|
|
91
|
+
setTimeout(resolve, milliseconds);
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
class AsyncApiRequestError extends Error {
|
|
96
|
+
constructor(error) {
|
|
97
|
+
super(`Async API Error: ${error.message}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Generic class for creating and executing async API requests.
|
|
103
|
+
*
|
|
104
|
+
* The initial sync request sends the required data and receives the value of the operation ID in the response header.
|
|
105
|
+
* The operation ID is used to open a channel for processing this request.
|
|
106
|
+
* Eventually, the channel will emit the final returned and processed data,
|
|
107
|
+
* and the channel (WebSocket) connection will be closed.
|
|
108
|
+
*/
|
|
109
|
+
class AsyncApiRequest {
|
|
110
|
+
url;
|
|
111
|
+
options;
|
|
112
|
+
data;
|
|
113
|
+
errorFallbackValue;
|
|
114
|
+
/**
|
|
115
|
+
* The time in milliseconds after which the Websocket connection should be closed if the data is not received.
|
|
116
|
+
*/
|
|
117
|
+
socketTimeoutInMilliseconds = 60000;
|
|
118
|
+
maxPollingAttempts = 45;
|
|
119
|
+
dataRetrievalMethod = 'polling';
|
|
120
|
+
defaultOptions = {
|
|
121
|
+
headers: {
|
|
122
|
+
'Accept': 'application/json',
|
|
123
|
+
'Content-Type': 'application/json'
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* The header name of the response operation ID.
|
|
128
|
+
*/
|
|
129
|
+
operationIdHeader = 'X-Operation';
|
|
130
|
+
/**
|
|
131
|
+
* The event name of the operation data stream.
|
|
132
|
+
*/
|
|
133
|
+
operationEventName = '.operation.status';
|
|
134
|
+
/**
|
|
135
|
+
* Sets the URL.
|
|
136
|
+
*
|
|
137
|
+
* @param url
|
|
138
|
+
*/
|
|
139
|
+
setUrl(url) {
|
|
140
|
+
this.url = url;
|
|
141
|
+
return this;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Sets the request options.
|
|
145
|
+
*
|
|
146
|
+
* @param options
|
|
147
|
+
*/
|
|
148
|
+
setOptions(options) {
|
|
149
|
+
this.options = options;
|
|
150
|
+
return this;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Sets the request body (data).
|
|
154
|
+
*
|
|
155
|
+
* @param data
|
|
156
|
+
*/
|
|
157
|
+
setData(data) {
|
|
158
|
+
this.data = data;
|
|
159
|
+
return this;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Sets the value that will be returned in case of request execution error.
|
|
163
|
+
* The error will be caught and re-thrown if not specified, leaving it up to the implementation to handle it.
|
|
164
|
+
*
|
|
165
|
+
* @param value
|
|
166
|
+
*/
|
|
167
|
+
setErrorFallbackValue(value) {
|
|
168
|
+
this.errorFallbackValue = value;
|
|
169
|
+
return this;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Returns the operation ID.
|
|
173
|
+
*
|
|
174
|
+
* @param response
|
|
175
|
+
*/
|
|
176
|
+
getOperationId(response) {
|
|
177
|
+
return response.headers.get(this.operationIdHeader) ?? '';
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Handles caught error.
|
|
181
|
+
*
|
|
182
|
+
* @param error
|
|
183
|
+
*/
|
|
184
|
+
handleError(error) {
|
|
185
|
+
return this.errorFallbackValue
|
|
186
|
+
? Promise.resolve(this.errorFallbackValue)
|
|
187
|
+
: Promise.reject(new AsyncApiRequestError(error));
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Poll operations endpoint until the async request has been completed and the data is available.
|
|
191
|
+
*
|
|
192
|
+
* @param operationId
|
|
193
|
+
*/
|
|
194
|
+
async pollOperationsEndpoint(operationId) {
|
|
195
|
+
const checkState = ({ state, reason = 'unknown' }) => {
|
|
196
|
+
if (state === 'failed') {
|
|
197
|
+
throw new Error(`Failed due to "${reason}"`);
|
|
198
|
+
}
|
|
199
|
+
return state === 'completed';
|
|
200
|
+
};
|
|
201
|
+
const result = await executeUntil(() => operations(operationId), checkState, { maxExecutionTries: this.maxPollingAttempts });
|
|
202
|
+
return result.data;
|
|
203
|
+
}
|
|
204
|
+
getDataUsingPolling(operationId) {
|
|
205
|
+
return new Promise(async (resolve, reject) => {
|
|
206
|
+
try {
|
|
207
|
+
resolve(await this.pollOperationsEndpoint(operationId));
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
reject(new AsyncApiRequestError(error));
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
getDataUsingWebSockets(operationId) {
|
|
215
|
+
return new Promise((resolve, reject) => {
|
|
216
|
+
const connection = httpCodes.createSocketConnection();
|
|
217
|
+
const requestTimeout = setTimeout(async () => {
|
|
218
|
+
connection.disconnect();
|
|
219
|
+
reject(new AsyncApiRequestError(new Error(`web socket connection timed out after ${this.socketTimeoutInMilliseconds / 1000} seconds`)));
|
|
220
|
+
}, this.socketTimeoutInMilliseconds);
|
|
221
|
+
connection
|
|
222
|
+
.channel(`operations-${operationId}`)
|
|
223
|
+
.listen(this.operationEventName, (socketResponse) => {
|
|
224
|
+
const { data: { state, data } } = socketResponse;
|
|
225
|
+
if (state === 'completed') {
|
|
226
|
+
clearTimeout(requestTimeout);
|
|
227
|
+
resolve(data);
|
|
228
|
+
connection.disconnect();
|
|
229
|
+
}
|
|
230
|
+
})
|
|
231
|
+
.error((error) => {
|
|
232
|
+
clearTimeout(requestTimeout);
|
|
233
|
+
reject(new AsyncApiRequestError(error));
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Returns promise that should resolve to the request data.
|
|
239
|
+
*
|
|
240
|
+
* @param operationId
|
|
241
|
+
*/
|
|
242
|
+
createAsyncRequestPromise(operationId) {
|
|
243
|
+
const dataFunction = this.dataRetrievalMethod === 'polling'
|
|
244
|
+
? this.getDataUsingPolling
|
|
245
|
+
: this.getDataUsingWebSockets;
|
|
246
|
+
return dataFunction.bind(this)(operationId);
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Executes the request.
|
|
250
|
+
*/
|
|
251
|
+
async execute() {
|
|
252
|
+
// Create the initial sync API request
|
|
253
|
+
// that will return the information about the WebSocket channel to connect to for the response.
|
|
254
|
+
const apiRequest = new httpCodes.ApiRequest()
|
|
255
|
+
.setUrl(this.url)
|
|
256
|
+
.setData(this.data)
|
|
257
|
+
.setOptions({ ...this.defaultOptions, ...this.options });
|
|
258
|
+
let response;
|
|
259
|
+
try {
|
|
260
|
+
response = await apiRequest.execute(true);
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
return this.handleError(error);
|
|
264
|
+
}
|
|
265
|
+
if (response.status !== httpCodes.HttpCodes.Accepted) {
|
|
266
|
+
return this.handleError(new Error('Request was not accepted.'));
|
|
267
|
+
}
|
|
268
|
+
// Obtain the operation ID to identify the channel socket to listen to for the data.
|
|
269
|
+
const operationId = this.getOperationId(response);
|
|
270
|
+
return this.createAsyncRequestPromise(operationId);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
const createCallCenterTask = (options) => {
|
|
275
|
+
const url = httpCodes.endpoints.createCallCenterTask;
|
|
276
|
+
const asyncRequest = new AsyncApiRequest()
|
|
277
|
+
.setUrl(url)
|
|
278
|
+
.setData(options)
|
|
279
|
+
.setOptions({ method: 'POST' })
|
|
280
|
+
.setErrorFallbackValue({ TaskId: null });
|
|
281
|
+
return asyncRequest.execute();
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The phone validator class.
|
|
286
|
+
*/
|
|
287
|
+
class PhoneNumberValidator {
|
|
288
|
+
errorMessage;
|
|
289
|
+
/**
|
|
290
|
+
* The regex for the phone validation.
|
|
291
|
+
*/
|
|
292
|
+
latvianPhoneNumberRegex = '^(((\\+371|00371)[26])|[26])([0-9]{7}$)';
|
|
293
|
+
phoneNumberRegex = '^(?:00|\\+)\\d+$';
|
|
294
|
+
/**
|
|
295
|
+
* Constructor.
|
|
296
|
+
*
|
|
297
|
+
* @param errorMessage
|
|
298
|
+
*/
|
|
299
|
+
constructor(errorMessage) {
|
|
300
|
+
this.errorMessage = errorMessage;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Returns validation error message.
|
|
304
|
+
*/
|
|
305
|
+
getErrorMessage() {
|
|
306
|
+
return this.errorMessage;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Validation logic.
|
|
310
|
+
*
|
|
311
|
+
* @param value
|
|
312
|
+
*/
|
|
313
|
+
validate(value) {
|
|
314
|
+
const validateValue = value.trim();
|
|
315
|
+
// If the phone number begins with either 2, 6, +371, or 00371,
|
|
316
|
+
// we assume that it is a Latvian phone number and validate accordingly.
|
|
317
|
+
if (validateValue.slice(0, 1) === '2' ||
|
|
318
|
+
validateValue.slice(0, 1) === '6' ||
|
|
319
|
+
validateValue.slice(0, 4) === '+371' ||
|
|
320
|
+
validateValue.slice(0, 5) === '00371') {
|
|
321
|
+
return RegExp(this.latvianPhoneNumberRegex).test(validateValue);
|
|
322
|
+
}
|
|
323
|
+
// A generic phone number must begin with either a plus sign or 00.
|
|
324
|
+
return RegExp(this.phoneNumberRegex).test(validateValue);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
const tetAddressSearchCss = () => `: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}`;
|
|
329
|
+
|
|
330
|
+
const TetAddressSearch = class {
|
|
331
|
+
constructor(hostRef) {
|
|
332
|
+
index.registerInstance(this, hostRef);
|
|
333
|
+
this.addressSelected = index.createEvent(this, "addressSelected");
|
|
334
|
+
this.clearInputField = index.createEvent(this, "clearInputField");
|
|
335
|
+
this.manualAddressInput = index.createEvent(this, "manualAddressInput");
|
|
336
|
+
this.searchSubmitted = index.createEvent(this, "searchSubmitted");
|
|
337
|
+
}
|
|
338
|
+
/** The reference to the autocomplete element. */
|
|
339
|
+
autocomplete;
|
|
340
|
+
/** The reference to the native input element inside tet-input. */
|
|
341
|
+
nativeInput;
|
|
342
|
+
/** The reference to the tet-input element. */
|
|
343
|
+
inputComponent;
|
|
344
|
+
get searchElement() { return index.getElement(this); }
|
|
345
|
+
/** Translation language used in the component. */
|
|
346
|
+
language = 'lv';
|
|
347
|
+
onLanguageChanged(language) {
|
|
348
|
+
translations.processTranslations('tet-components', language).then(() => index.forceUpdate(this));
|
|
349
|
+
}
|
|
350
|
+
/** The minimum length of the keyword before address search functionality is applied. */
|
|
351
|
+
minSearchKeywordLength = 4;
|
|
352
|
+
/** The value of the placeholder. The placeholder will be hidden if set to empty. */
|
|
353
|
+
placeholder = 'Piemēram, Nometņu iela 10 - 5, Salaspils';
|
|
354
|
+
/** The value of the label. The label will be hidden if set to empty. */
|
|
355
|
+
label = '';
|
|
356
|
+
/** The value of the aria label. */
|
|
357
|
+
accessibilityLabel = '';
|
|
358
|
+
/** The address key of the address. Set to preselect an address. */
|
|
359
|
+
addressKey = '';
|
|
360
|
+
async search(newValue) {
|
|
361
|
+
if (!this.nativeInput) {
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (newValue) {
|
|
365
|
+
await this.searchByAddressKey();
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
await this.resetInputState();
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
/** Toggles the new redesign style. */
|
|
372
|
+
newStyle = false;
|
|
373
|
+
/** Toggles the new forms redesign style. */
|
|
374
|
+
newFormsStyle = false;
|
|
375
|
+
/** Toggles the redesigned style. */
|
|
376
|
+
redesignedStyle = false;
|
|
377
|
+
/** Keeps the redesigned expanded background always visible (without requiring focus). */
|
|
378
|
+
alwaysExpanded = false;
|
|
379
|
+
/** The theme of the component. */
|
|
380
|
+
theme = 'classic';
|
|
381
|
+
/** Determines whether to add the additional elements that will emit the manual address input event on selection. */
|
|
382
|
+
manualAddressTriggers = false;
|
|
383
|
+
/** Keeps track of the input error state. */
|
|
384
|
+
isInputInvalid = false;
|
|
385
|
+
/** The enabled or disabled state of the input. */
|
|
386
|
+
inputDisabled = false;
|
|
387
|
+
/** Determines whether the search keyword is highlighted in option labels. */
|
|
388
|
+
highlightOptionsKeyword = true;
|
|
389
|
+
onInputDisabledStateChange(inputDisabled) {
|
|
390
|
+
inputDisabled ? this.removeIconRight() : this.addClearIcon();
|
|
391
|
+
}
|
|
392
|
+
/** The name for the icon on the right side of the input. */
|
|
393
|
+
inputIconRight = '';
|
|
394
|
+
/** The length of the value of the input. */
|
|
395
|
+
inputValueLength = 0;
|
|
396
|
+
/** Determines if to show the loading spinner. */
|
|
397
|
+
isLoading = false;
|
|
398
|
+
/** State for Tab Keyboard tracking. */
|
|
399
|
+
isKeyboardFocus = true;
|
|
400
|
+
/** State for Keyboard Focus visibility. */
|
|
401
|
+
focusVisible = false;
|
|
402
|
+
/** State for Autocomplete Element active. */
|
|
403
|
+
elementActive = false;
|
|
404
|
+
/** The event that is emitted when the user selects an address via autocomplete. */
|
|
405
|
+
addressSelected;
|
|
406
|
+
/** The event that is emitted when the input field is cleared automatically or by manually deleting the value. */
|
|
407
|
+
clearInputField;
|
|
408
|
+
/** The event that is emitted when the user selects the manual address input option. */
|
|
409
|
+
manualAddressInput;
|
|
410
|
+
/** The event that is emitted when the user clicks the search button. */
|
|
411
|
+
searchSubmitted;
|
|
412
|
+
/** The text for the search button. Defaults to "Parbaudīt". */
|
|
413
|
+
searchButtonText = 'Parbaudīt';
|
|
414
|
+
/** The text for the close button. Defaults to "Aizvert". */
|
|
415
|
+
closeButtonText = 'Aizvert';
|
|
416
|
+
/**
|
|
417
|
+
* - Resets the native input value to an empty string
|
|
418
|
+
* - Resets input value length state
|
|
419
|
+
* - Removes the right hand side icon
|
|
420
|
+
*/
|
|
421
|
+
async resetInputState() {
|
|
422
|
+
this.nativeInput.value = '';
|
|
423
|
+
this.inputValueLength = 0;
|
|
424
|
+
this.removeIconRight();
|
|
425
|
+
}
|
|
426
|
+
async componentWillLoad() {
|
|
427
|
+
await translations.processTranslations('tet-components', this.language);
|
|
428
|
+
}
|
|
429
|
+
async componentDidLoad() {
|
|
430
|
+
this.nativeInput = await this.inputComponent?.getInputHtmlElement();
|
|
431
|
+
this.nativeInput?.addEventListener('input', this.toggleInputClearIcon);
|
|
432
|
+
this.nativeInput?.addEventListener('input', this.handleInputTyping);
|
|
433
|
+
this.nativeInput?.addEventListener('input', this.handleInputEmptyState);
|
|
434
|
+
this.nativeInput?.addEventListener('click', this.handleClick);
|
|
435
|
+
this.autocomplete?.addEventListener('activeComponentStateChanged', this.handleActiveStateChange);
|
|
436
|
+
if (this.nativeInput) {
|
|
437
|
+
this.nativeInput.style.whiteSpace = 'nowrap';
|
|
438
|
+
this.nativeInput.style.overflow = 'hidden';
|
|
439
|
+
this.nativeInput.style.textOverflow = 'ellipsis';
|
|
440
|
+
}
|
|
441
|
+
if (this.addressKey) {
|
|
442
|
+
await this.searchByAddressKey();
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
disconnectedCallback() {
|
|
446
|
+
this.nativeInput?.removeEventListener('input', this.toggleInputClearIcon);
|
|
447
|
+
this.nativeInput?.removeEventListener('input', this.handleInputTyping);
|
|
448
|
+
this.nativeInput?.removeEventListener('input', this.handleInputEmptyState);
|
|
449
|
+
this.nativeInput?.removeEventListener('click', this.handleClick);
|
|
450
|
+
this.autocomplete?.removeEventListener('activeComponentStateChanged', this.handleActiveStateChange);
|
|
451
|
+
}
|
|
452
|
+
handleClick = () => {
|
|
453
|
+
this.elementActive = true;
|
|
454
|
+
this.focusVisible = false;
|
|
455
|
+
};
|
|
456
|
+
handleInputTyping = (event) => {
|
|
457
|
+
this.elementActive = true;
|
|
458
|
+
if (event?.data) {
|
|
459
|
+
this.focusVisible = false;
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
handleActiveStateChange = (event) => {
|
|
463
|
+
this.elementActive = event.detail !== null;
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Listen for Tab key event.
|
|
467
|
+
*/
|
|
468
|
+
onKeyDown(event) {
|
|
469
|
+
if (event.key === 'Tab' && !this.nativeInput?.value) {
|
|
470
|
+
this.focusVisible = true;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Resets the active state when focus leaves the component entirely.
|
|
475
|
+
*/
|
|
476
|
+
onFocusOut(event) {
|
|
477
|
+
if (!this.searchElement.contains(event.relatedTarget)) {
|
|
478
|
+
this.elementActive = false;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Initiates the address search by the address key and sets the value of the input field.
|
|
483
|
+
*/
|
|
484
|
+
async searchByAddressKey() {
|
|
485
|
+
const keepInputDisabled = this.inputDisabled;
|
|
486
|
+
this.inputDisabled = true;
|
|
487
|
+
const address = await searchAddressByKey(this.addressKey);
|
|
488
|
+
if (address && address.fullAddress) {
|
|
489
|
+
this.addressSelected.emit(address);
|
|
490
|
+
this.nativeInput.value = address.fullAddress;
|
|
491
|
+
this.inputValueLength = this.nativeInput.value.length;
|
|
492
|
+
if (!keepInputDisabled) {
|
|
493
|
+
this.addClearIcon();
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
else {
|
|
497
|
+
this.clearInputAction();
|
|
498
|
+
}
|
|
499
|
+
if (!keepInputDisabled) {
|
|
500
|
+
this.inputDisabled = false;
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Clears the autocomplete state when the normalized input value becomes empty.
|
|
505
|
+
*
|
|
506
|
+
* @param event
|
|
507
|
+
*/
|
|
508
|
+
handleInputEmptyState = ({ target, inputType }) => {
|
|
509
|
+
const value = string.normalize(target.value);
|
|
510
|
+
const deleteInputTypes = [
|
|
511
|
+
'deleteContentBackward',
|
|
512
|
+
'deleteContentForward',
|
|
513
|
+
'deleteWordBackward',
|
|
514
|
+
'deleteWordForward',
|
|
515
|
+
'deleteByCut',
|
|
516
|
+
'historyUndo',
|
|
517
|
+
'historyRedo',
|
|
518
|
+
];
|
|
519
|
+
if (value.length === 0 && deleteInputTypes.includes(inputType)) {
|
|
520
|
+
this.clearInputAction();
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
/**
|
|
524
|
+
* Toggles the icon on the right side of the input based on the current input value.
|
|
525
|
+
*
|
|
526
|
+
* @param event
|
|
527
|
+
*/
|
|
528
|
+
toggleInputClearIcon = ({ target }) => {
|
|
529
|
+
const value = string.normalize(target.value);
|
|
530
|
+
this.inputValueLength = value.length;
|
|
531
|
+
if (this.newStyle && this.inputValueLength >= this.minSearchKeywordLength) {
|
|
532
|
+
this.addLoadIcon();
|
|
533
|
+
this.removeIconRight();
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
if (value && !this.inputIconRight) {
|
|
537
|
+
this.addClearIcon();
|
|
538
|
+
}
|
|
539
|
+
if (!value && this.inputIconRight) {
|
|
540
|
+
this.removeIconRight();
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
/**
|
|
544
|
+
* Functionality that is executed when a manual address input trigger element is clicked upon or selected.
|
|
545
|
+
*/
|
|
546
|
+
manualAddressInputAction = () => {
|
|
547
|
+
this.manualAddressInput.emit();
|
|
548
|
+
this.clearInputAction();
|
|
549
|
+
};
|
|
550
|
+
/**
|
|
551
|
+
* Filters autocomplete options by the given keyword.
|
|
552
|
+
*
|
|
553
|
+
* @param keyword
|
|
554
|
+
*/
|
|
555
|
+
addressFilterFunction = async (keyword) => {
|
|
556
|
+
if (keyword.length < this.minSearchKeywordLength) {
|
|
557
|
+
return Promise.resolve([]);
|
|
558
|
+
}
|
|
559
|
+
const addresses = (await searchAddress(keyword)) ?? [];
|
|
560
|
+
const addressOptions = addresses.map(({ fullAddress, addressKey, postalCode }) => {
|
|
561
|
+
return {
|
|
562
|
+
label: fullAddress,
|
|
563
|
+
value: { addressKey, postalCode },
|
|
564
|
+
};
|
|
565
|
+
});
|
|
566
|
+
if (this.manualAddressTriggers && addressOptions.length > 0) {
|
|
567
|
+
addressOptions.push({
|
|
568
|
+
label: translations.translate('components-address-search-manual-address-input'),
|
|
569
|
+
value: 'manual-input',
|
|
570
|
+
clickCallback: this.manualAddressInputAction,
|
|
571
|
+
ignoreHighlighting: true,
|
|
572
|
+
cssPart: `manual-input-option`
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
return addressOptions;
|
|
576
|
+
};
|
|
577
|
+
debounceAddressFilter = debounce.debounceAsync(this.addressFilterFunction, 300);
|
|
578
|
+
/**
|
|
579
|
+
* Removes the icon on the right side of the input.
|
|
580
|
+
*/
|
|
581
|
+
removeIconRight = () => {
|
|
582
|
+
this.inputIconRight = '';
|
|
583
|
+
};
|
|
584
|
+
/**
|
|
585
|
+
* Executes input "clear" functionality.
|
|
586
|
+
*/
|
|
587
|
+
clearInputAction = () => {
|
|
588
|
+
this.autocomplete?.clear();
|
|
589
|
+
};
|
|
590
|
+
/**
|
|
591
|
+
* Functionality to execute after the autocomplete input field has been cleared.
|
|
592
|
+
*/
|
|
593
|
+
autocompleteClearInputCallback = () => {
|
|
594
|
+
this.removeIconRight();
|
|
595
|
+
this.inputValueLength = 0;
|
|
596
|
+
this.clearInputField.emit();
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* Adds the `clear` icon in the input field.
|
|
600
|
+
*/
|
|
601
|
+
addClearIcon = () => {
|
|
602
|
+
this.isLoading = false;
|
|
603
|
+
this.inputIconRight = 'tc-close';
|
|
604
|
+
};
|
|
605
|
+
/**
|
|
606
|
+
* Removes the loader icon and adds the clear icon.
|
|
607
|
+
*/
|
|
608
|
+
finishedLoading = () => {
|
|
609
|
+
if (this.newStyle) {
|
|
610
|
+
this.removeIconRight();
|
|
611
|
+
if (this.inputValueLength >= 1) {
|
|
612
|
+
this.addClearIcon();
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
/**
|
|
617
|
+
* Adds the "load" icon to the input field.
|
|
618
|
+
*/
|
|
619
|
+
addLoadIcon = () => {
|
|
620
|
+
this.isLoading = true;
|
|
621
|
+
};
|
|
622
|
+
/**
|
|
623
|
+
* The function that is executed when an autocomplete option is selected.
|
|
624
|
+
*
|
|
625
|
+
* @param event
|
|
626
|
+
*/
|
|
627
|
+
handleAutocompleteOptionSelection = (event) => {
|
|
628
|
+
// Convert back to the original API address interface to keep the data structures in sync.
|
|
629
|
+
if (event.detail._originalEvent instanceof PointerEvent) {
|
|
630
|
+
this.addressSelected.emit({
|
|
631
|
+
addressKey: event.detail.value.addressKey,
|
|
632
|
+
fullAddress: event.detail.label,
|
|
633
|
+
postalCode: event.detail.value.postalCode
|
|
634
|
+
});
|
|
635
|
+
this.searchSubmitted.emit(event.detail.label);
|
|
636
|
+
}
|
|
637
|
+
else {
|
|
638
|
+
this.addressSelected.emit({
|
|
639
|
+
addressKey: event.detail.value.addressKey,
|
|
640
|
+
fullAddress: event.detail.label,
|
|
641
|
+
postalCode: event.detail.value.postalCode
|
|
642
|
+
});
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
/**
|
|
646
|
+
* Handles the search button click.
|
|
647
|
+
*/
|
|
648
|
+
handleSearchSubmit = () => {
|
|
649
|
+
this.searchSubmitted.emit(this.nativeInput?.value);
|
|
650
|
+
};
|
|
651
|
+
/**
|
|
652
|
+
* Handles the redesigned close button click by collapsing the autocomplete overlay.
|
|
653
|
+
*/
|
|
654
|
+
handleCloseButtonClick = () => {
|
|
655
|
+
this.focusVisible = false;
|
|
656
|
+
this.elementActive = false;
|
|
657
|
+
this.autocomplete?.dispatchEvent(new CustomEvent('activeComponentStateChanged', {
|
|
658
|
+
detail: null,
|
|
659
|
+
bubbles: true,
|
|
660
|
+
composed: true
|
|
661
|
+
}));
|
|
662
|
+
};
|
|
663
|
+
/**
|
|
664
|
+
* Renders the content that is shown when there are no matching addresses.
|
|
665
|
+
*/
|
|
666
|
+
renderManualAddressInputNoOptionsMessage = () => {
|
|
667
|
+
return (index.h("div", { part: "address-not-found" }, index.h("p", null, translations.translate('components-address-search-not-found-message')), index.h("p", { part: `manual-input ${this.theme}` }, index.h("a", { onClick: this.manualAddressInputAction, onKeyDown: a11y.a11yBtnClick, class: { 'tet-link': true, 'dark': this.theme === 'dark' }, tabindex: "0", role: "button" }, translations.translate('components-address-search-manual-address-input')))));
|
|
668
|
+
};
|
|
669
|
+
render() {
|
|
670
|
+
const inputClasses = ['autocomplete-input'];
|
|
671
|
+
if (this.redesignedStyle) {
|
|
672
|
+
inputClasses.push('address-search--redesigned__input-field');
|
|
673
|
+
}
|
|
674
|
+
if (this.newStyle) {
|
|
675
|
+
inputClasses.push('address-search__input--rounded');
|
|
676
|
+
}
|
|
677
|
+
if (this.newFormsStyle) {
|
|
678
|
+
inputClasses.push('address-search__input--forms');
|
|
679
|
+
}
|
|
680
|
+
const isDarkContainerTheme = this.theme === 'dark' || this.theme === 'mint-original';
|
|
681
|
+
const submitButtonTheme = isDarkContainerTheme ? 'dark' : 'light';
|
|
682
|
+
const isButtonActive = (this.elementActive && !this.focusVisible) || this.alwaysExpanded;
|
|
683
|
+
const submitButtonColor = isButtonActive ? undefined : 'var(--tc-grey-80)';
|
|
684
|
+
const submitButtonColorTheme = (isButtonActive && isDarkContainerTheme && this.alwaysExpanded)
|
|
685
|
+
? 'adaptive-yellow'
|
|
686
|
+
: undefined;
|
|
687
|
+
return (index.h(index.Host, { key: '658b2bbf379148493a49a086acbda1d3fc5ec79c', class: {
|
|
688
|
+
"address-search": true,
|
|
689
|
+
"address-search--redesigned": this.redesignedStyle,
|
|
690
|
+
"always-expanded": this.alwaysExpanded,
|
|
691
|
+
"keyboard-focus": this.focusVisible,
|
|
692
|
+
"active": this.elementActive,
|
|
693
|
+
[this.theme]: true,
|
|
694
|
+
} }, index.h("tet-autocomplete", { key: '9c4dd12245069dfb1fc2ed229c89e043e2a09dce', class: `address-search--redesigned__autocomplete
|
|
695
|
+
${isDarkContainerTheme ? 'dark' : ''}
|
|
696
|
+
`, part: "autocomplete", optionsFilterAction: this.debounceAddressFilter, onOptionSelected: this.handleAutocompleteOptionSelection, noOptionsMessage: translations.translate('components-address-search-not-found-message'), noOptionsRenderFunction: this.manualAddressTriggers ? this.renderManualAddressInputNoOptionsMessage : undefined, clearCallback: this.autocompleteClearInputCallback, finishedLoading: this.finishedLoading, darkTheme: isDarkContainerTheme, newStyle: this.newStyle, ref: (el) => (this.autocomplete = el), optionsIcon: "location", redesignedStyle: this.redesignedStyle, highlightOptionsKeyword: this.highlightOptionsKeyword }, this.redesignedStyle ? (index.h("div", { class: "address-search--redesigned__autocomplete-content" }, index.h("div", { class: `address-search--redesigned__input-wrapper
|
|
697
|
+
${isDarkContainerTheme ? 'dark' : ''}` }, index.h("tet-input", { class: `address-search__input address-search--redesigned__input
|
|
698
|
+
${isDarkContainerTheme ? 'dark' : ''}`, part: "input", "input-class": inputClasses.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: (el) => (this.inputComponent = el), error: this.isInputInvalid, autocomplete: "off" }, this.isLoading &&
|
|
699
|
+
index.h("tet-spinner", { theme: isDarkContainerTheme ? 'dark' : 'light', class: "address-search__spinner", size: "small" }))), index.h("div", { class: `address-search--redesigned__button-wrapper
|
|
700
|
+
${isDarkContainerTheme ? 'dark' : ''}` }, index.h("tet-button", { class: "submit-address js-button-mobile button-icon", type: "primary", theme: submitButtonTheme, colorTheme: submitButtonColorTheme, customColorCode: submitButtonColor, "accessibility-label": translations.translate('components-address-search-search'), iconName: "tc-arrow-right", iconMode: true, onClick: this.handleSearchSubmit }), index.h("tet-button", { class: "submit-address button js-button", type: "primary", size: "medium", theme: submitButtonTheme, colorTheme: submitButtonColorTheme, customColorCode: submitButtonColor, onClick: this.handleSearchSubmit }, this.searchButtonText)))) : (index.h("tet-input", { class: "address-search__input", part: "input", "input-class": inputClasses.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: (el) => (this.inputComponent = el), error: this.isInputInvalid, autocomplete: "off" }, this.isLoading &&
|
|
701
|
+
index.h("tet-spinner", { theme: this.theme === 'dark' ? 'dark' : 'light', class: "address-search__spinner", size: "small" })))), this.redesignedStyle && (index.h("div", { key: 'dd631a0b03e688f5f741b8b6af23372b8c0931d2', class: "address-search--redesigned__close-button" }, index.h("tet-button", { key: '302229327ca4fbcb1de710a0bbe880a6cc1840be', type: "link", iconName: "tc-close", theme: "dark", onMouseDown: (event) => event.preventDefault(), onClick: this.handleCloseButtonClick }, this.closeButtonText)))));
|
|
702
|
+
}
|
|
703
|
+
static get watchers() { return {
|
|
704
|
+
"language": [{
|
|
705
|
+
"onLanguageChanged": 0
|
|
706
|
+
}],
|
|
707
|
+
"addressKey": [{
|
|
708
|
+
"search": 0
|
|
709
|
+
}],
|
|
710
|
+
"inputDisabled": [{
|
|
711
|
+
"onInputDisabledStateChange": 0
|
|
712
|
+
}]
|
|
713
|
+
}; }
|
|
714
|
+
};
|
|
715
|
+
TetAddressSearch.style = tetAddressSearchCss();
|
|
716
|
+
|
|
717
|
+
const tetAvailabilityContactFormCss = () => `: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{--contact-form-container-background:initial;--contact-form-text-color:var(--color-ta600);--contact-form-loader-overlay-background:rgb(255, 255, 255);max-width:37.5rem;margin:0 auto;display:block}.dark-theme{--contact-form-container-background:var(--color-tg500);--contact-form-text-color:rgb(255, 255, 255);--contact-form-loader-overlay-background:var(--color-tg600)}.container{--border-radius:0.625rem;--box-shadow:0 0 0 0.03125rem rgba(5, 29, 89, 0.07), 0 0.1875rem 0.5625rem rgba(5, 29, 89, 0.15);--padding:2.5em 1em;--background:var(--contact-form-container-background)}.form-container{max-width:26em;display:flex;flex-direction:column;margin:0 auto;text-align:center}.form-container .icon-error{--icon-color:rgb(233, 69, 54)}.form-container .icon-success{--icon-color:rgb(22, 197, 95)}.form-container .form-input{--input-border-radius:0.625rem}.form-container-close{margin-top:2.5rem;margin-bottom:4rem;margin-left:auto;margin-right:auto}.form-container-close span{min-width:11.375rem;width:100%}.form-title{margin-bottom:0.5em;margin-top:1.5rem;font:600 2.5rem/3rem "Gilroy", "Gilroy, Arial, sans-serif";color:rgb(10, 11, 13)}.form-subtitle{font:400 1rem/1.5rem "Inter", "Gilroy, Arial, sans-serif";color:rgb(67, 75, 86)}.form-input{margin-top:2em;text-align:left}.form-submit{width:fit-content;margin-top:1.5em;--button-font-size:1rem}@media only screen and (max-width: 44.9375rem){.form-submit{--button-width:100%}}.loader-overlay{position:absolute;top:0;bottom:0;left:0;right:0;background:var(--contact-form-loader-overlay-background);z-index:100;opacity:0.75}.loader-overlay .loader{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}`;
|
|
718
|
+
|
|
719
|
+
const TetAvailabilityContactForm = class {
|
|
720
|
+
constructor(hostRef) {
|
|
721
|
+
index.registerInstance(this, hostRef);
|
|
722
|
+
this.taskCreationSuccess = index.createEvent(this, "taskCreationSuccess");
|
|
723
|
+
this.taskCreationFailed = index.createEvent(this, "taskCreationFailed");
|
|
724
|
+
}
|
|
725
|
+
/** The input component. */
|
|
726
|
+
phoneInput;
|
|
727
|
+
/** The dialog component. */
|
|
728
|
+
dialogElement;
|
|
729
|
+
/** The list of validators to apply to the input field. */
|
|
730
|
+
validators = [
|
|
731
|
+
new PhoneNumberValidator('components-validation-incorrect-phone'),
|
|
732
|
+
new required.RequiredValidator('components-validation-required')
|
|
733
|
+
];
|
|
734
|
+
/** The prop that determines whether to show the loader. */
|
|
735
|
+
showLoader = false;
|
|
736
|
+
/** The translation language code for the component. */
|
|
737
|
+
language = 'lv';
|
|
738
|
+
/**
|
|
739
|
+
* The watch to update translations.
|
|
740
|
+
* @param language
|
|
741
|
+
*/
|
|
742
|
+
onLanguageChange(language) {
|
|
743
|
+
translations.processTranslations('tet-components', language).then(() => index.forceUpdate(this));
|
|
744
|
+
}
|
|
745
|
+
/** The task creation parameters. */
|
|
746
|
+
taskOptions;
|
|
747
|
+
/** The props for the submit button. */
|
|
748
|
+
submitButtonProps = {};
|
|
749
|
+
/** The prop to determine whether to show or hide title text. */
|
|
750
|
+
showTitle = true;
|
|
751
|
+
/** The prop to determine whether to show or hide input label text. */
|
|
752
|
+
showInputLabel = false;
|
|
753
|
+
/** The theme of the input field. */
|
|
754
|
+
theme = 'classic';
|
|
755
|
+
/** The property that determines the color of the component theme. */
|
|
756
|
+
darkTheme = false;
|
|
757
|
+
/** The prop that determines if the form was submitted successfully. */
|
|
758
|
+
success = false;
|
|
759
|
+
/** The prop that determines if the form should be opened. */
|
|
760
|
+
showAvailabilityContactForm = false;
|
|
761
|
+
/**
|
|
762
|
+
* The contact form subtitle. Can provide any translation key from `tet-components` translation group.
|
|
763
|
+
* Otherwise, provide already translated text.
|
|
764
|
+
*/
|
|
765
|
+
subtitle = 'components-contact-form-subtitle';
|
|
766
|
+
/** The event emitted if the task creation was successful. */
|
|
767
|
+
taskCreationSuccess;
|
|
768
|
+
/** The event emitted if the task creation failed. */
|
|
769
|
+
taskCreationFailed;
|
|
770
|
+
/**
|
|
771
|
+
* Listen for task creation success event.
|
|
772
|
+
* @param event
|
|
773
|
+
*/
|
|
774
|
+
onSuccess(event) {
|
|
775
|
+
if (event) {
|
|
776
|
+
this.success = true;
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Listen for empty catalog to open contact form dialog.
|
|
781
|
+
*/
|
|
782
|
+
onEmptyCatalog() {
|
|
783
|
+
this.openDialogElement();
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* Lifecycle method.
|
|
787
|
+
*/
|
|
788
|
+
async componentWillLoad() {
|
|
789
|
+
await translations.processTranslations('tet-components', this.language);
|
|
790
|
+
index.forceUpdate(this);
|
|
791
|
+
}
|
|
792
|
+
/**
|
|
793
|
+
* Method to close dialog element.
|
|
794
|
+
*/
|
|
795
|
+
closeDialogElement = async () => {
|
|
796
|
+
await this.dialogElement.close();
|
|
797
|
+
};
|
|
798
|
+
/**
|
|
799
|
+
* Method to open dialog element.
|
|
800
|
+
*/
|
|
801
|
+
openDialogElement = async () => {
|
|
802
|
+
await this.dialogElement.open();
|
|
803
|
+
};
|
|
804
|
+
/**
|
|
805
|
+
* Method to create task for call center.
|
|
806
|
+
*/
|
|
807
|
+
createManualTask = async () => {
|
|
808
|
+
this.showLoader = true;
|
|
809
|
+
const phoneInputElement = await this.phoneInput.getInputHtmlElement();
|
|
810
|
+
const errors = await this.phoneInput.validateInput();
|
|
811
|
+
if (errors.length) {
|
|
812
|
+
this.showLoader = false;
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
815
|
+
try {
|
|
816
|
+
const data = await createCallCenterTask(this.getTaskOptions(phoneInputElement.value));
|
|
817
|
+
if (data && data.TaskId) {
|
|
818
|
+
this.taskCreationSuccess.emit(data.TaskId);
|
|
819
|
+
}
|
|
820
|
+
else {
|
|
821
|
+
this.taskCreationFailed.emit();
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
catch (error) {
|
|
825
|
+
this.taskCreationFailed.emit(error);
|
|
826
|
+
}
|
|
827
|
+
this.showLoader = false;
|
|
828
|
+
};
|
|
829
|
+
/**
|
|
830
|
+
* Appends the submitted phone number to the task description and returns the options.
|
|
831
|
+
*
|
|
832
|
+
* @param phoneNumber
|
|
833
|
+
*/
|
|
834
|
+
getTaskOptions(phoneNumber) {
|
|
835
|
+
const { taskDescription } = this.taskOptions;
|
|
836
|
+
return {
|
|
837
|
+
...this.taskOptions,
|
|
838
|
+
taskDescription: [taskDescription.trim(), `Phone: ${phoneNumber}`].join(' ')
|
|
839
|
+
};
|
|
840
|
+
}
|
|
841
|
+
;
|
|
842
|
+
/**
|
|
843
|
+
* Renders the loader.
|
|
844
|
+
*/
|
|
845
|
+
renderLoader() {
|
|
846
|
+
return (index.h("div", { class: "loader-overlay" }, index.h("tet-loader", { class: "loader" })));
|
|
847
|
+
}
|
|
848
|
+
;
|
|
849
|
+
/**
|
|
850
|
+
* Render contact form.
|
|
851
|
+
*/
|
|
852
|
+
renderForm() {
|
|
853
|
+
return (index.h("div", null, index.h("tet-dialog", { ref: (element) => this.dialogElement = element, "footer-display": "between", "is-open": this.showAvailabilityContactForm, closeOnEscape: false, closeOnOverlayClick: false }, this.showLoader && this.renderLoader(), index.h("div", { class: "form-container" }, index.h("tet-icon", { name: "info-help-md", class: "icon icon-error icon-size" }), this.showTitle && index.h("h2", { class: "form-title" }, translations.translate('components-availability-contact-form-title')), index.h("p", { class: "form-subtitle" }, translations.translate('components-availability-contact-form-subtitle')), index.h("tet-input", { class: "form-input", "input-value": "+371", placeholder: "+37122345678", ref: (element) => this.phoneInput = element ? element : this.phoneInput, validators: this.validators, label: this.showInputLabel ? translations.translate('components-availability-contact-form-input-label') : null, theme: this.darkTheme ? 'dark' : 'classic' })), index.h("tet-button", { clickCallback: this.closeDialogElement, slot: "footer", size: "medium", type: "secondary", theme: "light" }, translations.translate('components-availability-contact-form-cancel')), index.h("tet-button", { slot: "footer", clickCallback: this.createManualTask, size: "medium", theme: "light" }, translations.translate('components-availability-contact-form-send')))));
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* Render contact form success step.
|
|
857
|
+
*/
|
|
858
|
+
renderSuccessStep() {
|
|
859
|
+
return (index.h("div", null, index.h("tet-dialog", { ref: (element) => this.dialogElement = element, "footer-display": "hidden", "is-open": this.showAvailabilityContactForm, closeOnEscape: true, closeOnOverlayClick: true }, index.h("div", { class: "form-container" }, index.h("tet-icon", { name: "confirm-md", class: "icon icon-success icon-size" }), this.showTitle && index.h("h2", { class: "form-title" }, translations.translate('components-availability-contact-form-success-title')), index.h("p", { class: "form-subtitle" }, translations.translate('components-availability-contact-form-success-subtitle')), index.h("tet-button", { class: "form-container-close", clickCallback: this.closeDialogElement, size: "medium", type: "primary", theme: "light" }, index.h("span", null, translations.translate('components-availability-contact-form-success-close')))))));
|
|
860
|
+
}
|
|
861
|
+
render() {
|
|
862
|
+
return (index.h("div", { key: 'e1ee0332e7e3c41d82227f0ec043a8201b1a892e', class: { 'dark-theme': this.darkTheme } }, this.success ? this.renderSuccessStep() : this.renderForm()));
|
|
863
|
+
}
|
|
864
|
+
static get watchers() { return {
|
|
865
|
+
"language": [{
|
|
866
|
+
"onLanguageChange": 0
|
|
867
|
+
}]
|
|
868
|
+
}; }
|
|
869
|
+
};
|
|
870
|
+
TetAvailabilityContactForm.style = tetAvailabilityContactFormCss();
|
|
871
|
+
|
|
872
|
+
exports.tet_address_search = TetAddressSearch;
|
|
873
|
+
exports.tet_availability_contact_form = TetAvailabilityContactForm;
|