@tet/tet-components 1.3.146-testing → 1.3.147-testing
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-f559cb2e.js +24 -36
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{tet-notification.cjs.entry.js → tet-accordion_2.cjs.entry.js} +131 -0
- package/dist/cjs/tet-address-offers-filters-products_2.cjs.entry.js +1 -1
- package/dist/cjs/{tet-autocomplete_2.cjs.entry.js → tet-autocomplete.cjs.entry.js} +0 -65
- package/dist/cjs/tet-b2b-check-out-form_5.cjs.entry.js +647 -0
- package/dist/cjs/tet-b2b-configurator.cjs.entry.js +536 -0
- package/dist/cjs/tet-b2b-service-calculator.cjs.entry.js +1 -1
- package/dist/cjs/tet-border-radius.cjs.entry.js +1 -1
- package/dist/cjs/tet-business-lines.cjs.entry.js +1 -1
- package/dist/cjs/tet-colors.cjs.entry.js +4 -4
- package/dist/cjs/tet-compare-card-v2.cjs.entry.js +1 -1
- package/dist/cjs/tet-components.cjs.js +1 -1
- package/dist/cjs/tet-font-weight.cjs.entry.js +1 -1
- package/dist/cjs/tet-fonts.cjs.entry.js +1 -1
- package/dist/cjs/tet-grid.cjs.entry.js +1 -1
- package/dist/cjs/tet-layout.cjs.entry.js +1 -1
- package/dist/cjs/tet-link.cjs.entry.js +1 -1
- package/dist/cjs/tet-spacing.cjs.entry.js +1 -1
- package/dist/cjs/tet-spinner.cjs.entry.js +71 -0
- package/dist/cjs/tet-text-list.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/advanced/cards/tet-b2b-compare-card/test/tet-b2b-compare-card.spec.js +0 -1
- package/dist/collection/components/advanced/cards/tet-b2b-compare-card/tet-b2b-compare-card.js +8 -8
- package/dist/collection/components/advanced/cards/tet-business-summary-card/tet-business-summary-card.css +7 -0
- package/dist/collection/components/advanced/cards/tet-business-summary-card/tet-business-summary-card.js +31 -7
- package/dist/collection/components/advanced/cards/tet-compare-card/tet-compare-card.css +1 -0
- package/dist/collection/components/advanced/cards/tet-compare-card-v2/tet-compare-card-v2.css +1 -0
- package/dist/collection/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.css +0 -2
- package/dist/collection/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.js +24 -4
- package/dist/collection/components/simple/lists/tet-text-list/tet-text-list.css +1 -0
- package/dist/collection/components/simple/menu/tet-business-navigation/tet-business-navigation.css +15 -5
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.css +4 -2
- package/dist/collection/components/simple/structural/tet-accordion/tet-accordion.js +27 -5
- package/dist/collection/components/views/tet-b2b-configurator/b2b-configurator.store.js +47 -0
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/test/tet-b2b-configurator-cart.spec.js +10 -1
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/tet-b2b-configurator-cart.css +54 -9
- package/dist/collection/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/tet-b2b-configurator-cart.js +106 -8
- package/dist/collection/components/views/tet-b2b-configurator/tet-b2b-configurator.css +472 -0
- package/dist/collection/components/views/tet-b2b-configurator/tet-b2b-configurator.js +612 -0
- package/dist/collection/components/views/tet-b2b-service-calculator/tet-b2b-service-calculator.js +1 -1
- package/dist/collection/components/views/tet-business-lines/tet-business-lines.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/collection/services/utils/minimum-duration-time.js +14 -0
- package/dist/components/index.js +2 -0
- package/dist/components/{p-08cb8e8b.js → p-401be6d8.js} +8 -6
- package/dist/components/{p-b3266df2.js → p-42c3311c.js} +1 -1
- package/dist/components/{p-c15aec6f.js → p-4a4c9b2c.js} +1 -1
- package/dist/{esm/tet-business-navigation.entry.js → components/p-5541195e.js} +35 -8
- package/dist/components/{p-e735af9c.js → p-8dd212bd.js} +1 -1
- package/dist/{esm/tet-b2b-compare-card.entry.js → components/p-922171da.js} +68 -20
- package/dist/{esm/tet-b2b-check-out-form.entry.js → components/p-b74f5470.js} +69 -16
- package/dist/components/p-cbf2c238.js +227 -0
- package/dist/components/{p-18778346.js → p-e72ea31d.js} +1 -1
- package/dist/{esm/tet-business-summary-card.entry.js → components/p-f68a8deb.js} +66 -14
- package/dist/components/tet-accordion.js +1 -1
- package/dist/components/tet-address-offers-view.js +2 -2
- package/dist/components/tet-address-offers.js +1 -1
- package/dist/components/tet-b2b-check-out-form.js +1 -207
- package/dist/components/tet-b2b-compare-card.js +1 -206
- package/dist/components/tet-b2b-configurator-cart.js +1 -167
- package/dist/components/tet-b2b-configurator.d.ts +11 -0
- package/dist/components/tet-b2b-configurator.js +661 -0
- package/dist/components/tet-b2b-service-calculator.js +1 -1
- package/dist/components/tet-border-radius.js +1 -1
- package/dist/components/tet-business-compare-card.js +1 -1
- package/dist/components/tet-business-lines.js +1 -1
- package/dist/components/tet-business-navigation.js +1 -103
- package/dist/components/tet-business-summary-card.js +1 -116
- package/dist/components/tet-colors.js +4 -4
- package/dist/components/tet-compare-card-v2.js +1 -1
- package/dist/components/tet-compare-card.js +1 -1
- package/dist/components/tet-compare-cards-tab.js +2 -2
- package/dist/components/tet-compare-cards.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-layout.js +1 -1
- package/dist/components/tet-link.js +1 -1
- package/dist/components/tet-spacing.js +1 -1
- package/dist/components/tet-text-list.js +1 -1
- package/dist/esm/index-7f1e2a22.js +24 -36
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{tet-notification.entry.js → tet-accordion_2.entry.js} +132 -2
- package/dist/esm/tet-address-offers-filters-products_2.entry.js +1 -1
- package/dist/esm/{tet-autocomplete_2.entry.js → tet-autocomplete.entry.js} +1 -65
- package/dist/esm/tet-b2b-check-out-form_5.entry.js +639 -0
- package/dist/esm/tet-b2b-configurator.entry.js +532 -0
- package/dist/esm/tet-b2b-service-calculator.entry.js +1 -1
- package/dist/esm/tet-border-radius.entry.js +1 -1
- package/dist/esm/tet-business-lines.entry.js +1 -1
- package/dist/esm/tet-colors.entry.js +4 -4
- package/dist/esm/tet-compare-card-v2.entry.js +1 -1
- package/dist/esm/tet-components.js +1 -1
- package/dist/esm/tet-font-weight.entry.js +1 -1
- package/dist/esm/tet-fonts.entry.js +1 -1
- package/dist/esm/tet-grid.entry.js +1 -1
- package/dist/esm/tet-layout.entry.js +1 -1
- package/dist/esm/tet-link.entry.js +1 -1
- package/dist/esm/tet-spacing.entry.js +1 -1
- package/dist/esm/tet-spinner.entry.js +67 -0
- package/dist/esm/tet-text-list.entry.js +1 -1
- package/dist/tet-components/{p-0121cef5.entry.js → p-067c2f1b.entry.js} +1 -1
- package/dist/tet-components/{p-bb6387c6.entry.js → p-0738afc0.entry.js} +1 -1
- package/dist/tet-components/{p-f476f61c.entry.js → p-07aee8d0.entry.js} +1 -1
- package/dist/tet-components/p-0d818b7e.entry.js +1 -0
- package/dist/tet-components/{p-56460d2d.entry.js → p-4c9e742f.entry.js} +1 -1
- package/dist/tet-components/{p-9c274191.entry.js → p-4e0a24ba.entry.js} +1 -1
- package/dist/tet-components/p-4ea127f4.entry.js +1 -0
- package/dist/tet-components/{p-9bfcf2cc.entry.js → p-62eb4fe0.entry.js} +1 -1
- package/dist/tet-components/{p-38c3b247.entry.js → p-662d9457.entry.js} +1 -1
- package/dist/tet-components/{p-1ddb9e3c.entry.js → p-677b8bf7.entry.js} +1 -1
- package/dist/tet-components/{p-7f00f463.entry.js → p-6a4a979c.entry.js} +1 -1
- package/dist/tet-components/p-6d2c4b16.entry.js +1 -0
- package/dist/tet-components/{p-6782340f.entry.js → p-9513c8f6.entry.js} +1 -1
- package/dist/tet-components/p-af917a8f.entry.js +1 -0
- package/dist/tet-components/{p-597e234a.entry.js → p-dcb66405.entry.js} +1 -1
- package/dist/tet-components/{p-4838a00a.entry.js → p-e311eb7d.entry.js} +1 -1
- package/dist/tet-components/p-ed67bd52.entry.js +1 -0
- package/dist/tet-components/{p-bd8a0449.entry.js → p-eed6163a.entry.js} +1 -1
- package/dist/tet-components/tet-components.css +1 -1
- package/dist/tet-components/tet-components.esm.js +1 -1
- package/dist/types/components/advanced/cards/tet-business-summary-card/tet-business-summary-card.d.ts +4 -2
- package/dist/types/components/advanced/forms/tet-b2b-check-out-form/tet-b2b-check-out-form.d.ts +2 -1
- package/dist/types/components/simple/structural/tet-accordion/tet-accordion.d.ts +5 -0
- package/dist/types/components/views/tet-b2b-configurator/b2b-configurator.store.d.ts +22 -0
- package/dist/types/components.d.ts +100 -4
- package/dist/types/services/api/interfaces/property.interface.d.ts +2 -2
- package/dist/types/services/api/services/b2b-configurator/b2b-configurator.d.ts +4 -4
- package/dist/types/services/utils/minimum-duration-time.d.ts +9 -0
- package/package.json +1 -1
- package/dist/cjs/tet-accordion.cjs.entry.js +0 -136
- package/dist/cjs/tet-b2b-check-out-form.cjs.entry.js +0 -164
- package/dist/cjs/tet-b2b-compare-card.cjs.entry.js +0 -164
- package/dist/cjs/tet-b2b-configurator-cart.cjs.entry.js +0 -129
- package/dist/cjs/tet-business-navigation.cjs.entry.js +0 -82
- package/dist/cjs/tet-business-summary-card.cjs.entry.js +0 -77
- package/dist/esm/tet-accordion.entry.js +0 -132
- package/dist/esm/tet-b2b-configurator-cart.entry.js +0 -125
- package/dist/tet-components/p-05fc6443.entry.js +0 -1
- package/dist/tet-components/p-319c29e9.entry.js +0 -1
- package/dist/tet-components/p-47618056.entry.js +0 -1
- package/dist/tet-components/p-4eb386f5.entry.js +0 -1
- package/dist/tet-components/p-62419a1f.entry.js +0 -1
- package/dist/tet-components/p-a9499bbb.entry.js +0 -1
- package/dist/tet-components/p-d0d39e88.entry.js +0 -1
- package/dist/tet-components/p-ff5dba0e.entry.js +0 -1
- package/dist/types/components/views/tet-b2b-configurator/partials/tet-b2b-configurator-cart/tet-b2b-configurator-cart.d.ts +0 -67
|
@@ -1,170 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as translate, p as processTranslations } from './p-aca28e71.js';
|
|
3
|
-
import { d as defineCustomElement$4 } from './p-08cb8e8b.js';
|
|
4
|
-
import { d as defineCustomElement$3 } from './p-9da9a443.js';
|
|
5
|
-
import { d as defineCustomElement$2 } from './p-b2d2b9f2.js';
|
|
6
|
-
|
|
7
|
-
const tetB2bConfiguratorCartCss = "@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}.light{--b2b-cart-text-color:var(--tc-text-primary);--b2b-cart-text-color-secondary:var(--tc-text-secondary);--b2b-cart-background-color:var(--tc-layer-primary);--b2b-cart-box-shadow:var(--tc-elevation-one);--b2b-cart-border-color:var(--tc-border-quaternary);--b2b-cart-block-color:var(--tc-layer-secondary);--b2b-cart-block-details-color:var(--tc-layer-tertiary);--b2b-cart-summary-accent-color:var(--tc-yellow-20);--elevation-six-layer-1-color:rgba(12, 12, 14, 0.06)}.light.checkout{--b2b-cart-background-color:var(--tc-layer-secondary);--b2b-cart-block-color:var(--tc-layer-tertiary);--b2b-cart-block-details-color:var(--tc-layer-quaternary)}.dark{--b2b-cart-text-color:var(--tc-text-primary-dark);--b2b-cart-text-color-secondary:var(--tc-text-secondary-dark);--b2b-cart-background-color:var(--tc-layer-primary-dark);--b2b-cart-box-shadow:var(--tc-elevation-one-dark);--b2b-cart-border-color:var(--tc-border-quaternary-dark);--b2b-cart-block-color:var(--tc-layer-secondary-dark);--b2b-cart-block-details-color:var(--tc-layer-tertiary-dark);--b2b-cart-summary-accent-color:var(--tc-grey-20-dark);--elevation-six-layer-1-color:rgba(12, 12, 14, 0.20)}.dark.checkout{--b2b-cart-background-color:var(--tc-layer-secondary-dark);--b2b-cart-block-color:var(--tc-layer-tertiary-dark);--b2b-cart-block-details-color:var(--tc-layer-quaternary-dark)}.cart{color:var(--b2b-cart-text-color);display:flex;flex:auto;flex-direction:column;height:fit-content;border-radius:1rem;background:var(--b2b-cart-background-color);box-shadow:var(--b2b-cart-box-shadow)}.cart__accordion{--accordion-border-radius:1rem 1rem 0 0;--accordion-header-padding:1rem;--accordion-header-mobile-padding:1rem;--accordion-header-font:600 1rem/1.5rem Inter, Gilroy, Arial, sans-serif}@media all and (min-width: 90rem){.cart__accordion--edit{--accordion-header-display:none}}.cart__accordion--rounded{--accordion-border-radius:1rem}.cart__accordion--empty{--accordion-border-radius:1rem}.cart__title--edit{display:none}@media all and (min-width: 90rem){.cart__title--edit{display:block;padding:1.5rem 1.5rem 1rem 1.5rem;border-bottom:0.0625rem solid var(--b2b-cart-border-color);align-self:stretch;font:600 1.125rem/1.75rem \"Inter\", \"Gilroy, Arial, sans-serif\"}}.cart__title--checkout{display:none}.cart__content{display:flex;flex-direction:column;gap:1rem;padding:1rem 1.5rem;border-color:var(--b2b-cart-border-color);border-top-style:solid;border-top-width:0.0625rem}.block{--accordion-border-radius:0.5rem;--accordion-background-color:var(--b2b-cart-block-color);--accordion-header-padding:1rem 1rem 0.75rem 1rem;--accordion-header-mobile-padding:1rem 1rem 0.75rem 1rem;--accordion-header-font:600 0.875rem/1.25rem Inter, Gilroy, Arial, sans-serif}.block__wrapper{border-radius:0.5rem;border:0.0625rem solid var(--b2b-cart-border-color);background-color:var(--b2b-cart-block-color)}@media all and (min-width: 48rem){.block{--accordion-header-padding:1rem;--accordion-header-mobile-padding:1rem;--accordion-header-font:600 1rem/1.5rem Inter, Gilroy, Arial, sans-serif}}.block__header{display:flex;flex-direction:column;flex:auto;gap:0.5rem}.block__header-row{display:flex;justify-content:space-between}.block__header-amount{text-align:end}.block__header-details{font:500 0.75rem/1rem \"Inter\", \"Gilroy, Arial, sans-serif\";background:var(--b2b-cart-block-details-color);padding:0.25rem 0.5rem;border-radius:1.375rem}.block__header-indicator{font:400 0.875rem/1.25rem \"Inter\", \"Gilroy, Arial, sans-serif\"}@media all and (min-width: 48rem){.block__header-indicator{font:400 1rem/1.5rem \"Inter\", \"Gilroy, Arial, sans-serif\"}}.block__header-icon{--icon-size:1.25rem}.empty-cart{display:flex;flex-direction:column;align-items:center}.empty-cart__icon{margin-bottom:0.5rem;--icon-size:3rem}.empty-cart__title{font:500 1rem/1.5rem \"Inter\", \"Gilroy, Arial, sans-serif\"}.empty-cart__description{color:var(--b2b-cart-text-color-secondary);font:400 0.875rem/1.25rem \"Inter\", \"Gilroy, Arial, sans-serif\"}.summary{display:flex;flex-direction:column;padding:1rem 1rem 1.5rem;border-color:var(--b2b-cart-border-color);border-top-style:solid;border-top-width:0.0625rem;box-shadow:0 -6px 12px 0 var(--elevation-six-layer-1-color)}@media all and (min-width: 48rem){.summary{padding:1rem 1.5rem 1.5rem}}.summary__notification{margin-bottom:1rem}.summary__savings{padding:0.5rem;margin-bottom:1rem;display:flex;justify-content:space-between;gap:0.5rem;border-radius:0.5rem;background-color:var(--b2b-cart-summary-accent-color);font:500 0.875rem/1.25rem \"Inter\", \"Gilroy, Arial, sans-serif\"}.summary__savings-amount{text-align:end}.summary__monthly-payment{margin-bottom:1rem;display:flex;justify-content:space-between;gap:0.5rem;font:500 1.125rem/1.75rem \"Inter\", \"Gilroy, Arial, sans-serif\"}@media all and (min-width: 48rem){.summary__monthly-payment{margin-bottom:1.5rem}}@media all and (min-width: 90rem){.summary__monthly-payment{margin-bottom:1rem;font:500 1.25rem/1.5rem \"Gilroy\", \"Gilroy, Arial, sans-serif\"}}.summary__monthly-price{display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap}.summary__monthly-price-disclosure{color:var(--b2b-cart-text-color-secondary);font:400 0.875rem/1.25rem \"Inter\", \"Gilroy, Arial, sans-serif\"}";
|
|
8
|
-
const TetB2bConfiguratorCartStyle0 = tetB2bConfiguratorCartCss;
|
|
9
|
-
|
|
10
|
-
const TetB2bConfiguratorCart$1 = /*@__PURE__*/ proxyCustomElement(class TetB2bConfiguratorCart extends H {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.__registerHost();
|
|
14
|
-
this.__attachShadow();
|
|
15
|
-
/** @private The suffix for the price displayed - "€/mēn."). */
|
|
16
|
-
this.priceSuffix = '€/mēn.';
|
|
17
|
-
/**
|
|
18
|
-
* Updates `primarySlotFilled` or `secondarySlotFilled` based on assigned slot elements.
|
|
19
|
-
* @param e The slotchange event.
|
|
20
|
-
*/
|
|
21
|
-
this.handleSlotChanged = (e) => {
|
|
22
|
-
const slot = e.target;
|
|
23
|
-
const slotName = slot.name;
|
|
24
|
-
if (slotName === 'primary') {
|
|
25
|
-
this.primarySlotFilled = slot.assignedElements().length !== 0;
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
this.secondarySlotFilled = slot.assignedElements().length !== 0;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
/**
|
|
32
|
-
* Handler for all accordion open state changes.
|
|
33
|
-
* Uses element reference checking to correctly distinguish between nested components (lower events bubble up).
|
|
34
|
-
* @param e The CustomEvent containing the new open state.
|
|
35
|
-
*/
|
|
36
|
-
this.handleAccordionChanged = (e) => {
|
|
37
|
-
const targetEl = e.target;
|
|
38
|
-
const isOpen = e.detail;
|
|
39
|
-
if (targetEl === this.accordionEl) {
|
|
40
|
-
this.isAccordionOpen = e.detail;
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (targetEl === this.primaryBlockEl) {
|
|
44
|
-
this.isPrimaryBlockOpen = isOpen;
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
if (targetEl === this.secondaryBlockEl) {
|
|
48
|
-
this.isSecondaryBlockOpen = isOpen;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
/** Renders the empty cart content placeholder. */
|
|
53
|
-
this.renderEmptyContent = () => {
|
|
54
|
-
return (h("div", { class: "empty-cart" }, h("tet-icon", { class: "empty-cart__icon", name: "tc-empty", theme: this.theme }), h("div", { class: "empty-cart__title" }, translate('components-b2b-cart-empty-title')), h("div", { class: "empty-cart__description" }, translate('components-b2b-cart-empty-description'))));
|
|
55
|
-
};
|
|
56
|
-
/** Renders the two inner service accordions based on slot content. */
|
|
57
|
-
this.renderContent = () => {
|
|
58
|
-
const blocks = [
|
|
59
|
-
{ name: translate('components-b2b-cart-primary-service-title'), type: 'primary' },
|
|
60
|
-
{ name: translate('components-b2b-cart-secondary-service-title'), type: 'secondary' }
|
|
61
|
-
];
|
|
62
|
-
const content = blocks.map((block) => {
|
|
63
|
-
const isPrimary = block.type === 'primary';
|
|
64
|
-
const blockOpen = isPrimary ? this.isPrimaryBlockOpen : this.isSecondaryBlockOpen;
|
|
65
|
-
const slotFilled = isPrimary ? this.primarySlotFilled : this.secondarySlotFilled;
|
|
66
|
-
const amount = isPrimary ? this.data.primaryAmount : this.data.secondaryAmount;
|
|
67
|
-
const count = isPrimary ? this.data.primaryCount : this.data.secondaryCount;
|
|
68
|
-
const countValue = count % 10 === 1 && count !== 11
|
|
69
|
-
? translate('components-b2b-cart-service-singular')
|
|
70
|
-
: translate('components-b2b-cart-service-plural');
|
|
71
|
-
const refCallback = (el) => {
|
|
72
|
-
if (block.type === 'primary') {
|
|
73
|
-
this.primaryBlockEl = el;
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
this.secondaryBlockEl = el;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
return (h("div", { hidden: !slotFilled, class: "block__wrapper" }, h("tet-accordion", { ref: refCallback, key: block.type, class: "block", isOpen: isPrimary ? this.isPrimaryBlockOpen : this.isSecondaryBlockOpen, header: block.name, theme: this.theme, transparentBackground: true }, h("div", { slot: "header", class: "block__header" }, h("div", { class: "block__header-row" }, block.name, " ", h("span", { class: "block__header-amount" }, `${amount} ${this.priceSuffix}`)), h("div", { class: "block__header-row" }, h("div", { class: "block__header-details" }, `${count} ${countValue}`), h("div", { class: "block__header-indicator" }, blockOpen ? translate('components-b2b-cart-accordion-less') : translate('components-b2b-cart-accordion-more'), h("tet-icon", { class: "block__header-icon", name: `chevron-${blockOpen ? 'up' : 'down'}`, theme: this.theme })))), h("slot", { onSlotchange: this.handleSlotChanged, name: block.type }))));
|
|
80
|
-
});
|
|
81
|
-
return content;
|
|
82
|
-
};
|
|
83
|
-
/** Renders the cart summary, including notifications and financial details. */
|
|
84
|
-
this.renderSummary = () => {
|
|
85
|
-
const { summarySavings, summaryAmount, hasPrimaryNotification, hasSecondaryNotification } = this.data;
|
|
86
|
-
return (h("div", { class: "summary" }, hasPrimaryNotification && (h("tet-notification", { class: "summary__notification", type: "warning", headerTitle: translate('components-b2b-cart-primary-notification-title'), content: translate('components-b2b-cart-primary-notification-description'), allowClose: false, theme: this.theme, icon: null })), hasSecondaryNotification && (h("tet-notification", { class: "summary__notification", type: "neutral", headerTitle: translate('components-b2b-cart-secondary-notification-title'), content: translate('components-b2b-cart-secondary-notification-description'), allowClose: false, theme: this.theme })), this.isAccordionOpen && (h("div", { class: "summary__savings" }, translate('components-b2b-cart-savings-title'), h("span", { class: "summary__savings-amount" }, " ", `${summarySavings} ${this.priceSuffix}`))), h("div", { class: "summary__monthly-payment" }, translate('components-b2b-cart-monthly-payment-title'), h("div", { class: "summary__monthly-price" }, `${summaryAmount} ${this.priceSuffix}`, h("span", { class: "summary__monthly-price-disclosure" }, ' ', translate('components-b2b-cart-monthly-payment-disclosure'), ' '))), h("slot", { name: "cta" })));
|
|
87
|
-
};
|
|
88
|
-
this.theme = 'light';
|
|
89
|
-
this.data = undefined;
|
|
90
|
-
this.isCartEmpty = true;
|
|
91
|
-
this.context = 'edit';
|
|
92
|
-
this.isDesktopResolution = true;
|
|
93
|
-
this.isAccordionOpen = this.context === 'edit';
|
|
94
|
-
this.isPrimaryBlockOpen = true;
|
|
95
|
-
this.isSecondaryBlockOpen = true;
|
|
96
|
-
this.primarySlotFilled = false;
|
|
97
|
-
this.secondarySlotFilled = false;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Imperatively opens the main accordion when transitioning to desktop in 'edit' context.
|
|
101
|
-
* @param isDesktop The new resolution state.
|
|
102
|
-
*/
|
|
103
|
-
openAccordionOnResolutionChange(isDesktop) {
|
|
104
|
-
if (isDesktop && this.accordionEl && this.context === 'edit') {
|
|
105
|
-
this.accordionEl.open();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
componentWillLoad() {
|
|
109
|
-
processTranslations('tet-components', 'lv').then(() => forceUpdate(this));
|
|
110
|
-
}
|
|
111
|
-
render() {
|
|
112
|
-
const cartTitle = translate('components-b2b-cart-title');
|
|
113
|
-
const isEditMode = this.context === 'edit';
|
|
114
|
-
const isCheckoutMode = this.context === 'checkout';
|
|
115
|
-
const showSummary = !this.isCartEmpty && (isEditMode || (isCheckoutMode && this.isAccordionOpen));
|
|
116
|
-
return (h(Host, { key: '93e2d13d305c2d6ddfec3105ed0775ae3c057d92' }, h("div", { key: '563e968522292ef43b859361647545bbc375e30a', class: { cart: true, [`${this.theme}`]: true, [`${this.context}`]: true } }, h("tet-accordion", { key: 'dabb165e6dcffcbc3258929c559010ad9c8ac1d9', ref: (el) => (this.accordionEl = el), class: {
|
|
117
|
-
'cart__accordion': true,
|
|
118
|
-
[`cart__accordion--${this.context}`]: true,
|
|
119
|
-
'cart__accordion--rounded': this.isCartEmpty || (isCheckoutMode && !this.isAccordionOpen)
|
|
120
|
-
}, isOpen: this.isAccordionOpen, onOpenChanged: this.handleAccordionChanged, header: cartTitle, withBorder: true, theme: this.theme, transparentBackground: true }, h("div", { key: '10fd1d316bea9ae9e1251f8605e18759cdf77c4f', class: `cart__title--${this.context}` }, cartTitle), h("div", { key: '1df2c1b5dc98399bd194f4782ad0ec22074eb2a4', class: "cart__content" }, this.isCartEmpty ? this.renderEmptyContent() : [this.renderContent()])), showSummary && this.renderSummary())));
|
|
121
|
-
}
|
|
122
|
-
static get watchers() { return {
|
|
123
|
-
"isDesktopResolution": ["openAccordionOnResolutionChange"]
|
|
124
|
-
}; }
|
|
125
|
-
static get style() { return TetB2bConfiguratorCartStyle0; }
|
|
126
|
-
}, [1, "tet-b2b-configurator-cart", {
|
|
127
|
-
"theme": [1],
|
|
128
|
-
"data": [16],
|
|
129
|
-
"isCartEmpty": [4, "is-cart-empty"],
|
|
130
|
-
"context": [1],
|
|
131
|
-
"isDesktopResolution": [4, "is-desktop-resolution"],
|
|
132
|
-
"isAccordionOpen": [32],
|
|
133
|
-
"isPrimaryBlockOpen": [32],
|
|
134
|
-
"isSecondaryBlockOpen": [32],
|
|
135
|
-
"primarySlotFilled": [32],
|
|
136
|
-
"secondarySlotFilled": [32]
|
|
137
|
-
}, undefined, {
|
|
138
|
-
"isDesktopResolution": ["openAccordionOnResolutionChange"]
|
|
139
|
-
}]);
|
|
140
|
-
function defineCustomElement$1() {
|
|
141
|
-
if (typeof customElements === "undefined") {
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
const components = ["tet-b2b-configurator-cart", "tet-accordion", "tet-icon", "tet-notification"];
|
|
145
|
-
components.forEach(tagName => { switch (tagName) {
|
|
146
|
-
case "tet-b2b-configurator-cart":
|
|
147
|
-
if (!customElements.get(tagName)) {
|
|
148
|
-
customElements.define(tagName, TetB2bConfiguratorCart$1);
|
|
149
|
-
}
|
|
150
|
-
break;
|
|
151
|
-
case "tet-accordion":
|
|
152
|
-
if (!customElements.get(tagName)) {
|
|
153
|
-
defineCustomElement$4();
|
|
154
|
-
}
|
|
155
|
-
break;
|
|
156
|
-
case "tet-icon":
|
|
157
|
-
if (!customElements.get(tagName)) {
|
|
158
|
-
defineCustomElement$3();
|
|
159
|
-
}
|
|
160
|
-
break;
|
|
161
|
-
case "tet-notification":
|
|
162
|
-
if (!customElements.get(tagName)) {
|
|
163
|
-
defineCustomElement$2();
|
|
164
|
-
}
|
|
165
|
-
break;
|
|
166
|
-
} });
|
|
167
|
-
}
|
|
1
|
+
import { T as TetB2bConfiguratorCart$1, d as defineCustomElement$1 } from './p-cbf2c238.js';
|
|
168
2
|
|
|
169
3
|
const TetB2bConfiguratorCart = TetB2bConfiguratorCart$1;
|
|
170
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface TetB2bConfigurator extends Components.TetB2bConfigurator, HTMLElement {}
|
|
4
|
+
export const TetB2bConfigurator: {
|
|
5
|
+
prototype: TetB2bConfigurator;
|
|
6
|
+
new (): TetB2bConfigurator;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|