@postnord/pn-marketweb-components 3.0.2 → 3.0.4
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/cjs/{FetchHelper-8d537d38.js → FetchHelper-dcfe4038.js} +122 -123
- package/cjs/FetchHelper-dcfe4038.js.map +1 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-address-autofill.cjs.entry.js +47 -49
- package/cjs/pn-address-autofill.cjs.entry.js.map +1 -1
- package/cjs/pn-animated-tile.cjs.entry.js +4 -4
- package/cjs/pn-animated-tile.cjs.entry.js.map +1 -1
- package/cjs/pn-app-banner.cjs.entry.js +15 -15
- package/cjs/pn-app-banner.cjs.entry.js.map +1 -1
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js.map +1 -1
- package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar.cjs.entry.js.map +1 -1
- package/cjs/pn-breakpoints.cjs.entry.js +1 -1
- package/cjs/pn-breakpoints.cjs.entry.js.map +1 -1
- package/cjs/pn-chart.cjs.entry.js +47 -10
- package/cjs/pn-chart.cjs.entry.js.map +1 -1
- package/cjs/pn-charts-card.cjs.entry.js +7 -7
- package/cjs/pn-charts-card.cjs.entry.js.map +1 -1
- package/cjs/pn-choice-button.cjs.entry.js +1 -1
- package/cjs/pn-choice-button.cjs.entry.js.map +1 -1
- package/cjs/pn-cta-block.cjs.entry.js +1 -1
- package/cjs/pn-cta-block.cjs.entry.js.map +1 -1
- package/cjs/pn-customernumber-selector-option.cjs.entry.js +1 -1
- package/cjs/pn-customernumber-selector-option.cjs.entry.js.map +1 -1
- package/cjs/pn-customernumber-selector.cjs.entry.js +1 -1
- package/cjs/pn-customernumber-selector.cjs.entry.js.map +1 -1
- package/cjs/pn-date-and-time.cjs.entry.js +13 -15
- package/cjs/pn-date-and-time.cjs.entry.js.map +1 -1
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js +33 -36
- package/cjs/pn-dropdown-choice-adds-row.cjs.entry.js.map +1 -1
- package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js +13 -10
- package/cjs/pn-dropdown-with-multi-input-rows-row.cjs.entry.js.map +1 -1
- package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js +46 -40
- package/cjs/pn-dropdown-with-multi-input-rows.cjs.entry.js.map +1 -1
- package/cjs/pn-filter-checkbox.cjs.entry.js +2 -3
- package/cjs/pn-filter-checkbox.cjs.entry.js.map +1 -1
- package/cjs/pn-find-price.cjs.entry.js +1 -2
- package/cjs/pn-find-price.cjs.entry.js.map +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +2 -3
- package/cjs/pn-find-service-and-price.cjs.entry.js.map +1 -1
- package/cjs/pn-hero-block-international.cjs.entry.js +3 -3
- package/cjs/pn-hero-block-international.cjs.entry.js.map +1 -1
- package/cjs/pn-language-selector_9.cjs.entry.js +83 -79
- package/cjs/pn-language-selector_9.cjs.entry.js.map +1 -1
- package/cjs/pn-line-shape.cjs.entry.js +1 -1
- package/cjs/pn-line-shape.cjs.entry.js.map +1 -1
- package/cjs/pn-link-list.cjs.entry.js +33 -37
- package/cjs/pn-link-list.cjs.entry.js.map +1 -1
- package/cjs/pn-mainnav-link.cjs.entry.js +2 -2
- package/cjs/pn-mainnav-link.cjs.entry.js.map +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-input.cjs.entry.js +1 -2
- package/cjs/pn-marketweb-input.cjs.entry.js.map +1 -1
- package/cjs/pn-marketweb-search.cjs.entry.js +5 -1
- package/cjs/pn-marketweb-search.cjs.entry.js.map +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +18 -24
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js.map +1 -1
- package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js +17 -20
- package/cjs/pn-marketweb-siteheader-login-button_5.cjs.entry.js.map +1 -1
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js +5 -5
- package/cjs/pn-marketweb-siteheader-login-linklist.cjs.entry.js.map +1 -1
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +22 -27
- package/cjs/pn-marketweb-siteheader.cjs.entry.js.map +1 -1
- package/cjs/pn-media-block.cjs.entry.js +31 -29
- package/cjs/pn-media-block.cjs.entry.js.map +1 -1
- package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js +37 -45
- package/cjs/pn-multi-row-connected-dropdown-row.cjs.entry.js.map +1 -1
- package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js +40 -34
- package/cjs/pn-multi-row-connected-dropdown.cjs.entry.js.map +1 -1
- package/cjs/pn-multiple-input.cjs.entry.js +9 -6
- package/cjs/pn-multiple-input.cjs.entry.js.map +1 -1
- package/cjs/pn-parcel-tracker.cjs.entry.js +1 -1
- package/cjs/pn-parcel-tracker.cjs.entry.js.map +1 -1
- package/cjs/pn-pex-pricefinder.cjs.entry.js +1 -1
- package/cjs/pn-pex-pricefinder.cjs.entry.js.map +1 -1
- package/cjs/pn-play-on-scroll.cjs.entry.js +19 -17
- package/cjs/pn-play-on-scroll.cjs.entry.js.map +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +2 -3
- package/cjs/pn-product-pricelist.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-modal-customernumber.cjs.entry.js +2 -1
- package/cjs/pn-profile-modal-customernumber.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-modal-profile.cjs.entry.js +3 -1
- package/cjs/pn-profile-modal-profile.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-modal-type.cjs.entry.js +1 -1
- package/cjs/pn-profile-modal-type.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-modal.cjs.entry.js +1 -1
- package/cjs/pn-profile-modal.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js.map +1 -1
- package/cjs/pn-profile-selector.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector.cjs.entry.js.map +1 -1
- package/cjs/pn-proxio-findprice-result.cjs.entry.js +8 -12
- package/cjs/pn-proxio-findprice-result.cjs.entry.js.map +1 -1
- package/cjs/pn-proxio-findprice.cjs.entry.js +16 -23
- package/cjs/pn-proxio-findprice.cjs.entry.js.map +1 -1
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +9 -13
- package/cjs/pn-proxio-pricegroup.cjs.entry.js.map +1 -1
- package/cjs/pn-quick-cta.cjs.entry.js +1 -1
- package/cjs/pn-quick-cta.cjs.entry.js.map +1 -1
- package/cjs/pn-quote-card.cjs.entry.js +1 -1
- package/cjs/pn-quote-card.cjs.entry.js.map +1 -1
- package/cjs/pn-scroll_2.cjs.entry.js +16 -15
- package/cjs/pn-scroll_2.cjs.entry.js.map +1 -1
- package/cjs/pn-share-item.cjs.entry.js +1 -1
- package/cjs/pn-share-item.cjs.entry.js.map +1 -1
- package/cjs/pn-share.cjs.entry.js +1 -1
- package/cjs/pn-share.cjs.entry.js.map +1 -1
- package/cjs/pn-sidenav-level.cjs.entry.js +3 -4
- package/cjs/pn-sidenav-level.cjs.entry.js.map +1 -1
- package/cjs/pn-sidenav-link.cjs.entry.js +2 -2
- package/cjs/pn-sidenav-link.cjs.entry.js.map +1 -1
- package/cjs/pn-sidenav-togglebutton.cjs.entry.js +1 -1
- package/cjs/pn-sidenav-togglebutton.cjs.entry.js.map +1 -1
- package/cjs/pn-sidenav.cjs.entry.js +1 -1
- package/cjs/pn-sidenav.cjs.entry.js.map +1 -1
- package/cjs/pn-site-footer_3.cjs.entry.js +1 -1
- package/cjs/pn-site-footer_3.cjs.entry.js.map +1 -1
- package/cjs/pn-spotlight.cjs.entry.js +1 -1
- package/cjs/pn-spotlight.cjs.entry.js.map +1 -1
- package/cjs/pn-stats-info-data.cjs.entry.js +5 -5
- package/cjs/pn-stats-info-data.cjs.entry.js.map +1 -1
- package/cjs/pn-teaser-card.cjs.entry.js +2 -3
- package/cjs/pn-teaser-card.cjs.entry.js.map +1 -1
- package/cjs/pn-titletag.cjs.entry.js +1 -1
- package/cjs/pn-titletag.cjs.entry.js.map +1 -1
- package/cjs/pn-usp-promoter.cjs.entry.js +1 -1
- package/cjs/pn-usp-promoter.cjs.entry.js.map +1 -1
- package/collection/components/animation/pn-animated-tile/pn-animated-tile.js +4 -3
- package/collection/components/animation/pn-animated-tile/pn-animated-tile.js.map +1 -1
- package/collection/components/animation/pn-play-on-scroll/pn-play-on-scroll.js +19 -16
- package/collection/components/animation/pn-play-on-scroll/pn-play-on-scroll.js.map +1 -1
- package/collection/components/animation/pn-play-on-scroll/pn-video-overlay/pn-video-overlay.js +11 -9
- package/collection/components/animation/pn-play-on-scroll/pn-video-overlay/pn-video-overlay.js.map +1 -1
- package/collection/components/animation/pn-scroll/pn-scroll.js +5 -4
- package/collection/components/animation/pn-scroll/pn-scroll.js.map +1 -1
- package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js +1 -0
- package/collection/components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js.map +1 -1
- package/collection/components/cards/pn-quote-card/pn-quote-card.js +1 -0
- package/collection/components/cards/pn-quote-card/pn-quote-card.js.map +1 -1
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +2 -2
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.js.map +1 -1
- package/collection/components/charts/pn-chart/pn-chart-helper.js +32 -7
- package/collection/components/charts/pn-chart/pn-chart-helper.js.map +1 -1
- package/collection/components/charts/pn-chart/pn-chart.js +15 -2
- package/collection/components/charts/pn-chart/pn-chart.js.map +1 -1
- package/collection/components/charts/pn-charts-card/pn-charts-card.js +7 -6
- package/collection/components/charts/pn-charts-card/pn-charts-card.js.map +1 -1
- package/collection/components/cta/pn-cta-block/pn-cta-block.js +1 -0
- package/collection/components/cta/pn-cta-block/pn-cta-block.js.map +1 -1
- package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js +1 -0
- package/collection/components/cta/pn-parcel-tracker/pn-parcel-tracker.js.map +1 -1
- package/collection/components/cta/pn-quick-cta/pn-quick-cta.js +1 -0
- package/collection/components/cta/pn-quick-cta/pn-quick-cta.js.map +1 -1
- package/collection/components/cta/pn-share/pn-share-item.js +1 -0
- package/collection/components/cta/pn-share/pn-share-item.js.map +1 -1
- package/collection/components/cta/pn-share/pn-share.js +1 -0
- package/collection/components/cta/pn-share/pn-share.js.map +1 -1
- package/collection/components/cta/pn-spotlight/pn-spotlight.js +1 -0
- package/collection/components/cta/pn-spotlight/pn-spotlight.js.map +1 -1
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js +5 -5
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.js.map +1 -1
- package/collection/components/input/pn-address-autofill/pn-address-autofill.js +46 -47
- package/collection/components/input/pn-address-autofill/pn-address-autofill.js.map +1 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js +1 -0
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar-level.js.map +1 -1
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js +1 -0
- package/collection/components/input/pn-bonus-progressbar/pn-bonus-progressbar.js.map +1 -1
- package/collection/components/input/pn-choice-button/pn-choice-button.js +1 -0
- package/collection/components/input/pn-choice-button/pn-choice-button.js.map +1 -1
- package/collection/components/input/pn-date-and-time/pn-date-and-time.js +13 -14
- package/collection/components/input/pn-date-and-time/pn-date-and-time.js.map +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js +51 -35
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map +1 -1
- package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.stories.js +1 -1
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.js +13 -9
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.js.map +1 -1
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.js +46 -39
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.js.map +1 -1
- package/collection/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.stories.js +1 -1
- package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js +2 -2
- package/collection/components/input/pn-filter-checkbox/pn-filter-checkbox.js.map +1 -1
- package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js +1 -2
- package/collection/components/input/pn-marketweb-input/pn-marketweb-input.js.map +1 -1
- package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js +5 -0
- package/collection/components/input/pn-marketweb-search/pn-marketweb-search.js.map +1 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.js +37 -44
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown-row.js.map +1 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.js +40 -33
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.js.map +1 -1
- package/collection/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.stories.js +1 -1
- package/collection/components/input/pn-multiple-input/pn-multiple-input.js +9 -5
- package/collection/components/input/pn-multiple-input/pn-multiple-input.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js +17 -22
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js +2 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-button.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js +5 -4
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-linklist.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js +6 -7
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-links.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js +1 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-mypage-button.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js +7 -8
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login-profileselection.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +7 -6
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js +3 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-search.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js +1 -0
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-unified-login.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js +21 -25
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.js.map +1 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +5 -22
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js.map +1 -1
- package/collection/components/media/pn-media-block/pn-media-block.js +31 -28
- package/collection/components/media/pn-media-block/pn-media-block.js.map +1 -1
- package/collection/components/minor/pn-app-banner/pn-app-banner.js +15 -14
- package/collection/components/minor/pn-app-banner/pn-app-banner.js.map +1 -1
- package/collection/components/minor/pn-swan/pn-swan.js +1 -0
- package/collection/components/minor/pn-swan/pn-swan.js.map +1 -1
- package/collection/components/minor/pn-titletag/pn-titletag.js +1 -0
- package/collection/components/minor/pn-titletag/pn-titletag.js.map +1 -1
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js +1 -0
- package/collection/components/navigation/pn-language-selector/pn-language-selector-option.js.map +1 -1
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js +4 -2
- package/collection/components/navigation/pn-language-selector/pn-language-selector.js.map +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js +2 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-level.js.map +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js +2 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-link.js.map +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js +1 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav-list.js.map +1 -1
- package/collection/components/navigation/pn-mainnav/pn-mainnav.js +4 -0
- package/collection/components/navigation/pn-mainnav/pn-mainnav.js.map +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js +3 -3
- package/collection/components/navigation/pn-sidenav/pn-sidenav-level.js.map +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js +2 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-link.js.map +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js +1 -0
- package/collection/components/navigation/pn-sidenav/pn-sidenav-togglebutton.js.map +1 -1
- package/collection/components/navigation/pn-sidenav/pn-sidenav.js +1 -0
- package/collection/components/navigation/pn-sidenav/pn-sidenav.js.map +1 -1
- package/collection/components/navigation/pn-site-selector/pn-site-selector.js +1 -0
- package/collection/components/navigation/pn-site-selector/pn-site-selector.js.map +1 -1
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js +1 -0
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector-option.js.map +1 -1
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js +1 -0
- package/collection/components/profile/pn-customernumber-selector/pn-customernumber-selector.js.map +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js +2 -0
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-customernumber.js.map +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js +3 -0
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-profile.js.map +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js +1 -0
- package/collection/components/profile/pn-profile-modal/pn-profile-modal-type.js.map +1 -1
- package/collection/components/profile/pn-profile-modal/pn-profile-modal.js +1 -0
- package/collection/components/profile/pn-profile-modal/pn-profile-modal.js.map +1 -1
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js +1 -0
- package/collection/components/profile/pn-profile-selector/pn-profile-selector-option.js.map +1 -1
- package/collection/components/profile/pn-profile-selector/pn-profile-selector.js +1 -0
- package/collection/components/profile/pn-profile-selector/pn-profile-selector.js.map +1 -1
- package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js +1 -0
- package/collection/components/utilities/pn-breakpoints/pn-breakpoints.js.map +1 -1
- package/collection/components/widgets/pn-find-price/pn-find-price.js +1 -2
- package/collection/components/widgets/pn-find-price/pn-find-price.js.map +1 -1
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js +2 -3
- package/collection/components/widgets/pn-find-service-and-price/pn-find-service-and-price.js.map +1 -1
- package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.js +3 -2
- package/collection/components/widgets/pn-hero-block-international/pn-hero-block-international.js.map +1 -1
- package/collection/components/widgets/pn-link-list/pn-link-list.js +33 -37
- package/collection/components/widgets/pn-link-list/pn-link-list.js.map +1 -1
- package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js +1 -0
- package/collection/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.js.map +1 -1
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js +2 -3
- package/collection/components/widgets/pn-product-pricelist/pn-product-pricelist.js.map +1 -1
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js +8 -12
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice-result.js.map +1 -1
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js +15 -22
- package/collection/components/widgets/pn-proxio-findprice/pn-proxio-findprice.js.map +1 -1
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js +8 -12
- package/collection/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.js.map +1 -1
- package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js +1 -0
- package/collection/components/widgets/pn-usp-promoter/pn-usp-promoter.js.map +1 -1
- package/collection/globals/FetchHelper.js +35 -35
- package/collection/globals/FetchHelper.js.map +1 -1
- package/collection/globals/MarketWebContextService.js +86 -87
- package/collection/globals/MarketWebContextService.js.map +1 -1
- package/collection/globals/MarketWebLoginManager.js +60 -61
- package/collection/globals/MarketWebLoginManager.js.map +1 -1
- package/components/FetchHelper.js +121 -122
- package/components/FetchHelper.js.map +1 -1
- package/components/pn-address-autofill.js +46 -48
- package/components/pn-address-autofill.js.map +1 -1
- package/components/pn-animated-tile.js +4 -4
- package/components/pn-animated-tile.js.map +1 -1
- package/components/pn-app-banner.js +15 -15
- package/components/pn-app-banner.js.map +1 -1
- package/components/pn-bonus-progressbar-level.js +1 -1
- package/components/pn-bonus-progressbar-level.js.map +1 -1
- package/components/pn-bonus-progressbar.js +1 -1
- package/components/pn-bonus-progressbar.js.map +1 -1
- package/components/pn-breakpoints.js +1 -1
- package/components/pn-breakpoints.js.map +1 -1
- package/components/pn-chart.js +47 -10
- package/components/pn-chart.js.map +1 -1
- package/components/pn-charts-card.js +7 -7
- package/components/pn-charts-card.js.map +1 -1
- package/components/pn-choice-button2.js +1 -1
- package/components/pn-choice-button2.js.map +1 -1
- package/components/pn-cta-block.js +1 -1
- package/components/pn-cta-block.js.map +1 -1
- package/components/pn-customernumber-selector-option.js +1 -1
- package/components/pn-customernumber-selector-option.js.map +1 -1
- package/components/pn-customernumber-selector.js +1 -1
- package/components/pn-customernumber-selector.js.map +1 -1
- package/components/pn-date-and-time.js +13 -15
- package/components/pn-date-and-time.js.map +1 -1
- package/components/pn-dropdown-choice-adds-row.js +34 -36
- package/components/pn-dropdown-choice-adds-row.js.map +1 -1
- package/components/pn-dropdown-with-multi-input-rows-row2.js +13 -10
- package/components/pn-dropdown-with-multi-input-rows-row2.js.map +1 -1
- package/components/pn-dropdown-with-multi-input-rows.js +46 -40
- package/components/pn-dropdown-with-multi-input-rows.js.map +1 -1
- package/components/pn-filter-checkbox2.js +2 -3
- package/components/pn-filter-checkbox2.js.map +1 -1
- package/components/pn-find-price.js +1 -2
- package/components/pn-find-price.js.map +1 -1
- package/components/pn-find-service-and-price.js +2 -3
- package/components/pn-find-service-and-price.js.map +1 -1
- package/components/pn-hero-block-international.js +3 -3
- package/components/pn-hero-block-international.js.map +1 -1
- package/components/pn-language-selector-option2.js +1 -0
- package/components/pn-language-selector-option2.js.map +1 -1
- package/components/pn-language-selector2.js +4 -3
- package/components/pn-language-selector2.js.map +1 -1
- package/components/pn-line-shape.js +1 -1
- package/components/pn-line-shape.js.map +1 -1
- package/components/pn-link-list.js +33 -37
- package/components/pn-link-list.js.map +1 -1
- package/components/pn-mainnav-level2.js +2 -2
- package/components/pn-mainnav-level2.js.map +1 -1
- package/components/pn-mainnav-link2.js +2 -2
- package/components/pn-mainnav-link2.js.map +1 -1
- package/components/pn-mainnav-list2.js +1 -1
- package/components/pn-mainnav-list2.js.map +1 -1
- package/components/pn-mainnav2.js +4 -1
- package/components/pn-mainnav2.js.map +1 -1
- package/components/pn-marketweb-input2.js +1 -2
- package/components/pn-marketweb-input2.js.map +1 -1
- package/components/pn-marketweb-search.js +5 -1
- package/components/pn-marketweb-search.js.map +1 -1
- package/components/pn-marketweb-sitefooter.js +17 -23
- package/components/pn-marketweb-sitefooter.js.map +1 -1
- package/components/pn-marketweb-siteheader-login-button2.js +2 -1
- package/components/pn-marketweb-siteheader-login-button2.js.map +1 -1
- package/components/pn-marketweb-siteheader-login-linklist2.js +5 -5
- package/components/pn-marketweb-siteheader-login-linklist2.js.map +1 -1
- package/components/pn-marketweb-siteheader-login-links2.js +6 -8
- package/components/pn-marketweb-siteheader-login-links2.js.map +1 -1
- package/components/pn-marketweb-siteheader-login-mypage-button2.js +1 -1
- package/components/pn-marketweb-siteheader-login-mypage-button2.js.map +1 -1
- package/components/pn-marketweb-siteheader-login-profileselection2.js +7 -9
- package/components/pn-marketweb-siteheader-login-profileselection2.js.map +1 -1
- package/components/pn-marketweb-siteheader-login2.js +67 -68
- package/components/pn-marketweb-siteheader-login2.js.map +1 -1
- package/components/pn-marketweb-siteheader-search2.js +3 -3
- package/components/pn-marketweb-siteheader-search2.js.map +1 -1
- package/components/pn-marketweb-siteheader-unified-login2.js +1 -1
- package/components/pn-marketweb-siteheader-unified-login2.js.map +1 -1
- package/components/pn-marketweb-siteheader.js +21 -26
- package/components/pn-marketweb-siteheader.js.map +1 -1
- package/components/pn-media-block.js +31 -29
- package/components/pn-media-block.js.map +1 -1
- package/components/pn-multi-row-connected-dropdown-row2.js +37 -45
- package/components/pn-multi-row-connected-dropdown-row2.js.map +1 -1
- package/components/pn-multi-row-connected-dropdown.js +40 -34
- package/components/pn-multi-row-connected-dropdown.js.map +1 -1
- package/components/pn-multiple-input.js +9 -6
- package/components/pn-multiple-input.js.map +1 -1
- package/components/pn-parcel-tracker.js +1 -1
- package/components/pn-parcel-tracker.js.map +1 -1
- package/components/pn-pex-pricefinder.js +1 -1
- package/components/pn-pex-pricefinder.js.map +1 -1
- package/components/pn-play-on-scroll2.js +19 -17
- package/components/pn-play-on-scroll2.js.map +1 -1
- package/components/pn-product-pricelist.js +2 -3
- package/components/pn-product-pricelist.js.map +1 -1
- package/components/pn-profile-modal-customernumber.js +2 -1
- package/components/pn-profile-modal-customernumber.js.map +1 -1
- package/components/pn-profile-modal-profile.js +3 -1
- package/components/pn-profile-modal-profile.js.map +1 -1
- package/components/pn-profile-modal-type.js +1 -1
- package/components/pn-profile-modal-type.js.map +1 -1
- package/components/pn-profile-modal.js +1 -1
- package/components/pn-profile-modal.js.map +1 -1
- package/components/pn-profile-selector-option.js +1 -1
- package/components/pn-profile-selector-option.js.map +1 -1
- package/components/pn-profile-selector.js +1 -1
- package/components/pn-profile-selector.js.map +1 -1
- package/components/pn-proxio-findprice-result2.js +8 -12
- package/components/pn-proxio-findprice-result2.js.map +1 -1
- package/components/pn-proxio-findprice.js +15 -22
- package/components/pn-proxio-findprice.js.map +1 -1
- package/components/pn-proxio-pricegroup.js +8 -12
- package/components/pn-proxio-pricegroup.js.map +1 -1
- package/components/pn-quick-cta.js +1 -1
- package/components/pn-quick-cta.js.map +1 -1
- package/components/pn-quote-card.js +1 -1
- package/components/pn-quote-card.js.map +1 -1
- package/components/pn-scroll2.js +5 -5
- package/components/pn-scroll2.js.map +1 -1
- package/components/pn-share-item2.js +1 -1
- package/components/pn-share-item2.js.map +1 -1
- package/components/pn-share.js +1 -1
- package/components/pn-share.js.map +1 -1
- package/components/pn-sidenav-level.js +3 -4
- package/components/pn-sidenav-level.js.map +1 -1
- package/components/pn-sidenav-link.js +2 -2
- package/components/pn-sidenav-link.js.map +1 -1
- package/components/pn-sidenav-togglebutton.js +1 -1
- package/components/pn-sidenav-togglebutton.js.map +1 -1
- package/components/pn-sidenav.js +1 -1
- package/components/pn-sidenav.js.map +1 -1
- package/components/pn-site-selector2.js +1 -1
- package/components/pn-site-selector2.js.map +1 -1
- package/components/pn-spotlight.js +1 -1
- package/components/pn-spotlight.js.map +1 -1
- package/components/pn-stats-info-data2.js +5 -5
- package/components/pn-stats-info-data2.js.map +1 -1
- package/components/pn-swan2.js +1 -1
- package/components/pn-swan2.js.map +1 -1
- package/components/pn-teaser-card.js +2 -3
- package/components/pn-teaser-card.js.map +1 -1
- package/components/pn-titletag2.js +1 -1
- package/components/pn-titletag2.js.map +1 -1
- package/components/pn-usp-promoter.js +1 -1
- package/components/pn-usp-promoter.js.map +1 -1
- package/components/pn-video-overlay2.js +11 -10
- package/components/pn-video-overlay2.js.map +1 -1
- package/esm/{FetchHelper-03b37a44.js → FetchHelper-da579b12.js} +122 -123
- package/esm/FetchHelper-da579b12.js.map +1 -0
- package/esm/loader.js +1 -1
- package/esm/pn-address-autofill.entry.js +48 -50
- package/esm/pn-address-autofill.entry.js.map +1 -1
- package/esm/pn-animated-tile.entry.js +5 -5
- package/esm/pn-animated-tile.entry.js.map +1 -1
- package/esm/pn-app-banner.entry.js +16 -16
- package/esm/pn-app-banner.entry.js.map +1 -1
- package/esm/pn-bonus-progressbar-level.entry.js +2 -2
- package/esm/pn-bonus-progressbar-level.entry.js.map +1 -1
- package/esm/pn-bonus-progressbar.entry.js +2 -2
- package/esm/pn-bonus-progressbar.entry.js.map +1 -1
- package/esm/pn-breakpoints.entry.js +2 -2
- package/esm/pn-breakpoints.entry.js.map +1 -1
- package/esm/pn-chart.entry.js +48 -11
- package/esm/pn-chart.entry.js.map +1 -1
- package/esm/pn-charts-card.entry.js +8 -8
- package/esm/pn-charts-card.entry.js.map +1 -1
- package/esm/pn-choice-button.entry.js +2 -2
- package/esm/pn-choice-button.entry.js.map +1 -1
- package/esm/pn-cta-block.entry.js +2 -2
- package/esm/pn-cta-block.entry.js.map +1 -1
- package/esm/pn-customernumber-selector-option.entry.js +2 -2
- package/esm/pn-customernumber-selector-option.entry.js.map +1 -1
- package/esm/pn-customernumber-selector.entry.js +2 -2
- package/esm/pn-customernumber-selector.entry.js.map +1 -1
- package/esm/pn-date-and-time.entry.js +14 -16
- package/esm/pn-date-and-time.entry.js.map +1 -1
- package/esm/pn-dropdown-choice-adds-row.entry.js +34 -37
- package/esm/pn-dropdown-choice-adds-row.entry.js.map +1 -1
- package/esm/pn-dropdown-with-multi-input-rows-row.entry.js +14 -11
- package/esm/pn-dropdown-with-multi-input-rows-row.entry.js.map +1 -1
- package/esm/pn-dropdown-with-multi-input-rows.entry.js +47 -41
- package/esm/pn-dropdown-with-multi-input-rows.entry.js.map +1 -1
- package/esm/pn-filter-checkbox.entry.js +3 -4
- package/esm/pn-filter-checkbox.entry.js.map +1 -1
- package/esm/pn-find-price.entry.js +1 -2
- package/esm/pn-find-price.entry.js.map +1 -1
- package/esm/pn-find-service-and-price.entry.js +2 -3
- package/esm/pn-find-service-and-price.entry.js.map +1 -1
- package/esm/pn-hero-block-international.entry.js +4 -4
- package/esm/pn-hero-block-international.entry.js.map +1 -1
- package/esm/pn-language-selector_9.entry.js +84 -80
- package/esm/pn-language-selector_9.entry.js.map +1 -1
- package/esm/pn-line-shape.entry.js +2 -2
- package/esm/pn-line-shape.entry.js.map +1 -1
- package/esm/pn-link-list.entry.js +33 -37
- package/esm/pn-link-list.entry.js.map +1 -1
- package/esm/pn-mainnav-link.entry.js +3 -3
- package/esm/pn-mainnav-link.entry.js.map +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-input.entry.js +1 -2
- package/esm/pn-marketweb-input.entry.js.map +1 -1
- package/esm/pn-marketweb-search.entry.js +6 -2
- package/esm/pn-marketweb-search.entry.js.map +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +19 -25
- package/esm/pn-marketweb-sitefooter.entry.js.map +1 -1
- package/esm/pn-marketweb-siteheader-login-button_5.entry.js +18 -21
- package/esm/pn-marketweb-siteheader-login-button_5.entry.js.map +1 -1
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js +6 -6
- package/esm/pn-marketweb-siteheader-login-linklist.entry.js.map +1 -1
- package/esm/pn-marketweb-siteheader.entry.js +23 -28
- package/esm/pn-marketweb-siteheader.entry.js.map +1 -1
- package/esm/pn-media-block.entry.js +32 -30
- package/esm/pn-media-block.entry.js.map +1 -1
- package/esm/pn-multi-row-connected-dropdown-row.entry.js +38 -46
- package/esm/pn-multi-row-connected-dropdown-row.entry.js.map +1 -1
- package/esm/pn-multi-row-connected-dropdown.entry.js +41 -35
- package/esm/pn-multi-row-connected-dropdown.entry.js.map +1 -1
- package/esm/pn-multiple-input.entry.js +10 -7
- package/esm/pn-multiple-input.entry.js.map +1 -1
- package/esm/pn-parcel-tracker.entry.js +2 -2
- package/esm/pn-parcel-tracker.entry.js.map +1 -1
- package/esm/pn-pex-pricefinder.entry.js +2 -2
- package/esm/pn-pex-pricefinder.entry.js.map +1 -1
- package/esm/pn-play-on-scroll.entry.js +20 -18
- package/esm/pn-play-on-scroll.entry.js.map +1 -1
- package/esm/pn-product-pricelist.entry.js +2 -3
- package/esm/pn-product-pricelist.entry.js.map +1 -1
- package/esm/pn-profile-modal-customernumber.entry.js +3 -2
- package/esm/pn-profile-modal-customernumber.entry.js.map +1 -1
- package/esm/pn-profile-modal-profile.entry.js +4 -2
- package/esm/pn-profile-modal-profile.entry.js.map +1 -1
- package/esm/pn-profile-modal-type.entry.js +2 -2
- package/esm/pn-profile-modal-type.entry.js.map +1 -1
- package/esm/pn-profile-modal.entry.js +2 -2
- package/esm/pn-profile-modal.entry.js.map +1 -1
- package/esm/pn-profile-selector-option.entry.js +2 -2
- package/esm/pn-profile-selector-option.entry.js.map +1 -1
- package/esm/pn-profile-selector.entry.js +2 -2
- package/esm/pn-profile-selector.entry.js.map +1 -1
- package/esm/pn-proxio-findprice-result.entry.js +8 -12
- package/esm/pn-proxio-findprice-result.entry.js.map +1 -1
- package/esm/pn-proxio-findprice.entry.js +16 -23
- package/esm/pn-proxio-findprice.entry.js.map +1 -1
- package/esm/pn-proxio-pricegroup.entry.js +9 -13
- package/esm/pn-proxio-pricegroup.entry.js.map +1 -1
- package/esm/pn-quick-cta.entry.js +2 -2
- package/esm/pn-quick-cta.entry.js.map +1 -1
- package/esm/pn-quote-card.entry.js +2 -2
- package/esm/pn-quote-card.entry.js.map +1 -1
- package/esm/pn-scroll_2.entry.js +17 -16
- package/esm/pn-scroll_2.entry.js.map +1 -1
- package/esm/pn-share-item.entry.js +2 -2
- package/esm/pn-share-item.entry.js.map +1 -1
- package/esm/pn-share.entry.js +2 -2
- package/esm/pn-share.entry.js.map +1 -1
- package/esm/pn-sidenav-level.entry.js +4 -5
- package/esm/pn-sidenav-level.entry.js.map +1 -1
- package/esm/pn-sidenav-link.entry.js +3 -3
- package/esm/pn-sidenav-link.entry.js.map +1 -1
- package/esm/pn-sidenav-togglebutton.entry.js +2 -2
- package/esm/pn-sidenav-togglebutton.entry.js.map +1 -1
- package/esm/pn-sidenav.entry.js +2 -2
- package/esm/pn-sidenav.entry.js.map +1 -1
- package/esm/pn-site-footer_3.entry.js +1 -1
- package/esm/pn-site-footer_3.entry.js.map +1 -1
- package/esm/pn-spotlight.entry.js +2 -2
- package/esm/pn-spotlight.entry.js.map +1 -1
- package/esm/pn-stats-info-data.entry.js +5 -5
- package/esm/pn-stats-info-data.entry.js.map +1 -1
- package/esm/pn-teaser-card.entry.js +3 -4
- package/esm/pn-teaser-card.entry.js.map +1 -1
- package/esm/pn-titletag.entry.js +2 -2
- package/esm/pn-titletag.entry.js.map +1 -1
- package/esm/pn-usp-promoter.entry.js +2 -2
- package/esm/pn-usp-promoter.entry.js.map +1 -1
- package/package.json +1 -2
- package/pn-market-web-components/{p-8ca34ec3.entry.js → p-0247c553.entry.js} +2 -2
- package/pn-market-web-components/p-0247c553.entry.js.map +1 -0
- package/pn-market-web-components/{p-3f50be05.entry.js → p-09b9cc06.entry.js} +2 -2
- package/pn-market-web-components/{p-3f50be05.entry.js.map → p-09b9cc06.entry.js.map} +1 -1
- package/pn-market-web-components/{p-03dfc155.entry.js → p-0a522476.entry.js} +2 -2
- package/pn-market-web-components/{p-03dfc155.entry.js.map → p-0a522476.entry.js.map} +1 -1
- package/pn-market-web-components/{p-2b2b615e.entry.js → p-1317587f.entry.js} +4 -4
- package/pn-market-web-components/{p-2b2b615e.entry.js.map → p-1317587f.entry.js.map} +1 -1
- package/pn-market-web-components/p-1535a09f.entry.js +2 -0
- package/pn-market-web-components/p-1535a09f.entry.js.map +1 -0
- package/pn-market-web-components/{p-470ca6e7.entry.js → p-1578e02e.entry.js} +2 -2
- package/pn-market-web-components/{p-470ca6e7.entry.js.map → p-1578e02e.entry.js.map} +1 -1
- package/pn-market-web-components/p-16f70311.entry.js +2 -0
- package/pn-market-web-components/{p-b7a5fb1b.entry.js.map → p-16f70311.entry.js.map} +1 -1
- package/pn-market-web-components/{p-c8bbdd96.entry.js → p-190c671b.entry.js} +2 -2
- package/pn-market-web-components/{p-c8bbdd96.entry.js.map → p-190c671b.entry.js.map} +1 -1
- package/pn-market-web-components/{p-3e4208bb.entry.js → p-1bd5fa26.entry.js} +2 -2
- package/pn-market-web-components/{p-3e4208bb.entry.js.map → p-1bd5fa26.entry.js.map} +1 -1
- package/pn-market-web-components/{p-e74e962e.entry.js → p-2044eddc.entry.js} +2 -2
- package/pn-market-web-components/{p-e74e962e.entry.js.map → p-2044eddc.entry.js.map} +1 -1
- package/pn-market-web-components/p-370829c6.entry.js +2 -0
- package/pn-market-web-components/p-370829c6.entry.js.map +1 -0
- package/pn-market-web-components/p-391970af.entry.js +2 -0
- package/pn-market-web-components/p-391970af.entry.js.map +1 -0
- package/pn-market-web-components/{p-49fd7182.entry.js → p-40538914.entry.js} +2 -2
- package/pn-market-web-components/{p-49fd7182.entry.js.map → p-40538914.entry.js.map} +1 -1
- package/pn-market-web-components/{p-fa9ea740.entry.js → p-4372d10e.entry.js} +2 -2
- package/pn-market-web-components/p-4372d10e.entry.js.map +1 -0
- package/pn-market-web-components/p-4ea1409d.entry.js +2 -0
- package/pn-market-web-components/p-4ea1409d.entry.js.map +1 -0
- package/pn-market-web-components/{p-66981606.entry.js → p-56bd346e.entry.js} +2 -2
- package/pn-market-web-components/{p-66981606.entry.js.map → p-56bd346e.entry.js.map} +1 -1
- package/pn-market-web-components/p-586a1e3c.entry.js +2 -0
- package/pn-market-web-components/{p-f8eb860b.entry.js.map → p-586a1e3c.entry.js.map} +1 -1
- package/pn-market-web-components/{p-baa28521.entry.js → p-5a467ca6.entry.js} +2 -2
- package/pn-market-web-components/{p-baa28521.entry.js.map → p-5a467ca6.entry.js.map} +1 -1
- package/pn-market-web-components/p-5ac23b38.entry.js +2 -0
- package/pn-market-web-components/p-5ac23b38.entry.js.map +1 -0
- package/pn-market-web-components/{p-7fdc49d1.entry.js → p-63505736.entry.js} +2 -2
- package/pn-market-web-components/p-63505736.entry.js.map +1 -0
- package/pn-market-web-components/{p-3696ebf8.entry.js → p-67d862ac.entry.js} +2 -2
- package/pn-market-web-components/{p-3696ebf8.entry.js.map → p-67d862ac.entry.js.map} +1 -1
- package/pn-market-web-components/{p-3d3f0648.entry.js → p-68aa55f7.entry.js} +2 -2
- package/pn-market-web-components/{p-3d3f0648.entry.js.map → p-68aa55f7.entry.js.map} +1 -1
- package/pn-market-web-components/{p-d2109ea6.entry.js → p-6e9875e5.entry.js} +2 -2
- package/pn-market-web-components/p-6e9875e5.entry.js.map +1 -0
- package/pn-market-web-components/p-7021985c.entry.js +2 -0
- package/pn-market-web-components/{p-c64cb117.entry.js.map → p-7021985c.entry.js.map} +1 -1
- package/pn-market-web-components/{p-716165d2.entry.js → p-721598b8.entry.js} +2 -2
- package/pn-market-web-components/p-721598b8.entry.js.map +1 -0
- package/pn-market-web-components/p-73cef33c.js +2 -0
- package/pn-market-web-components/p-73cef33c.js.map +1 -0
- package/pn-market-web-components/p-74203d3e.entry.js +2 -0
- package/pn-market-web-components/{p-545ea4ef.entry.js.map → p-74203d3e.entry.js.map} +1 -1
- package/pn-market-web-components/p-781ef432.entry.js +2 -0
- package/pn-market-web-components/p-781ef432.entry.js.map +1 -0
- package/pn-market-web-components/{p-3a08299c.entry.js → p-78fbc88c.entry.js} +2 -2
- package/pn-market-web-components/{p-3a08299c.entry.js.map → p-78fbc88c.entry.js.map} +1 -1
- package/pn-market-web-components/{p-22a65c3e.entry.js → p-796ebfee.entry.js} +2 -2
- package/pn-market-web-components/p-796ebfee.entry.js.map +1 -0
- package/pn-market-web-components/p-7b05d7c7.entry.js +2 -0
- package/pn-market-web-components/p-7b05d7c7.entry.js.map +1 -0
- package/pn-market-web-components/{p-6b2009dc.entry.js → p-81b3e038.entry.js} +2 -2
- package/pn-market-web-components/{p-6b2009dc.entry.js.map → p-81b3e038.entry.js.map} +1 -1
- package/pn-market-web-components/p-828449da.entry.js +2 -0
- package/pn-market-web-components/{p-db2f3f6d.entry.js.map → p-828449da.entry.js.map} +1 -1
- package/pn-market-web-components/p-85d57c9d.entry.js +2 -0
- package/pn-market-web-components/p-85d57c9d.entry.js.map +1 -0
- package/pn-market-web-components/p-90ba1d8e.entry.js +2 -0
- package/pn-market-web-components/{p-655e6f71.entry.js.map → p-90ba1d8e.entry.js.map} +1 -1
- package/pn-market-web-components/{p-eee5ec0a.entry.js → p-931d3a9b.entry.js} +2 -2
- package/pn-market-web-components/{p-eee5ec0a.entry.js.map → p-931d3a9b.entry.js.map} +1 -1
- package/pn-market-web-components/{p-9a93bcd0.entry.js → p-95c10b7e.entry.js} +2 -2
- package/pn-market-web-components/{p-9a93bcd0.entry.js.map → p-95c10b7e.entry.js.map} +1 -1
- package/pn-market-web-components/{p-138ecede.entry.js → p-95e054fd.entry.js} +2 -2
- package/pn-market-web-components/{p-138ecede.entry.js.map → p-95e054fd.entry.js.map} +1 -1
- package/pn-market-web-components/p-9776a1c5.entry.js +2 -0
- package/pn-market-web-components/p-9776a1c5.entry.js.map +1 -0
- package/pn-market-web-components/{p-db2e2762.entry.js → p-9998c29d.entry.js} +2 -2
- package/pn-market-web-components/p-9998c29d.entry.js.map +1 -0
- package/pn-market-web-components/p-9a7abcee.entry.js +2 -0
- package/pn-market-web-components/p-9a7abcee.entry.js.map +1 -0
- package/pn-market-web-components/{p-0dca82de.entry.js → p-9be27d72.entry.js} +2 -2
- package/pn-market-web-components/{p-0dca82de.entry.js.map → p-9be27d72.entry.js.map} +1 -1
- package/pn-market-web-components/{p-48f6e683.entry.js → p-a8220c88.entry.js} +2 -2
- package/pn-market-web-components/{p-48f6e683.entry.js.map → p-a8220c88.entry.js.map} +1 -1
- package/pn-market-web-components/p-a9d2f528.entry.js +2 -0
- package/pn-market-web-components/p-a9d2f528.entry.js.map +1 -0
- package/pn-market-web-components/p-acbe60df.entry.js +2 -0
- package/pn-market-web-components/p-acbe60df.entry.js.map +1 -0
- package/pn-market-web-components/{p-5666f0e7.entry.js → p-ade7ffcf.entry.js} +2 -2
- package/pn-market-web-components/p-ade7ffcf.entry.js.map +1 -0
- package/pn-market-web-components/p-b2dcce7c.entry.js +2 -0
- package/pn-market-web-components/p-b2dcce7c.entry.js.map +1 -0
- package/pn-market-web-components/{p-10a3c6f4.entry.js → p-b765e4a9.entry.js} +2 -2
- package/pn-market-web-components/p-b765e4a9.entry.js.map +1 -0
- package/pn-market-web-components/{p-914e1d15.entry.js → p-c224d7c4.entry.js} +2 -2
- package/pn-market-web-components/p-c224d7c4.entry.js.map +1 -0
- package/pn-market-web-components/{p-787e20a1.entry.js → p-c5856c0b.entry.js} +2 -2
- package/pn-market-web-components/{p-787e20a1.entry.js.map → p-c5856c0b.entry.js.map} +1 -1
- package/pn-market-web-components/p-c696bedf.entry.js +2 -0
- package/pn-market-web-components/{p-012ee486.entry.js.map → p-c696bedf.entry.js.map} +1 -1
- package/pn-market-web-components/p-c9f21ea3.entry.js +2 -0
- package/pn-market-web-components/{p-03cb46c2.entry.js.map → p-c9f21ea3.entry.js.map} +1 -1
- package/pn-market-web-components/{p-87aa1f73.entry.js → p-d07cf4c8.entry.js} +2 -2
- package/pn-market-web-components/{p-87aa1f73.entry.js.map → p-d07cf4c8.entry.js.map} +1 -1
- package/pn-market-web-components/p-d40ff187.entry.js +2 -0
- package/pn-market-web-components/p-d40ff187.entry.js.map +1 -0
- package/pn-market-web-components/{p-f21fdae0.entry.js → p-e42f0fbe.entry.js} +2 -2
- package/pn-market-web-components/{p-f21fdae0.entry.js.map → p-e42f0fbe.entry.js.map} +1 -1
- package/pn-market-web-components/{p-4f2a7d41.entry.js → p-e4c7aaec.entry.js} +2 -2
- package/pn-market-web-components/{p-4f2a7d41.entry.js.map → p-e4c7aaec.entry.js.map} +1 -1
- package/pn-market-web-components/{p-107568aa.entry.js → p-e5345c69.entry.js} +2 -2
- package/pn-market-web-components/p-e5345c69.entry.js.map +1 -0
- package/pn-market-web-components/p-e9501c6f.entry.js +2 -0
- package/pn-market-web-components/p-e9501c6f.entry.js.map +1 -0
- package/pn-market-web-components/{p-fa3ccbfb.entry.js → p-ebaeee5e.entry.js} +2 -2
- package/pn-market-web-components/{p-fa3ccbfb.entry.js.map → p-ebaeee5e.entry.js.map} +1 -1
- package/pn-market-web-components/{p-9de267ec.entry.js → p-f2d0d0cc.entry.js} +2 -2
- package/pn-market-web-components/{p-9de267ec.entry.js.map → p-f2d0d0cc.entry.js.map} +1 -1
- package/pn-market-web-components/{p-da953848.entry.js → p-f62879f6.entry.js} +2 -2
- package/pn-market-web-components/p-f62879f6.entry.js.map +1 -0
- package/pn-market-web-components/{p-ec3fcbf9.entry.js → p-fbc07c7a.entry.js} +2 -2
- package/pn-market-web-components/{p-ec3fcbf9.entry.js.map → p-fbc07c7a.entry.js.map} +1 -1
- package/pn-market-web-components/p-fbe70284.entry.js +2 -0
- package/pn-market-web-components/{p-663e4bb8.entry.js.map → p-fbe70284.entry.js.map} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js.map +1 -1
- package/types/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.d.ts +1 -0
- package/types/components/widgets/pn-proxio-pricegroup/pn-proxio-pricegroup.d.ts +1 -1
- package/types/components.d.ts +2 -0
- package/umd/standalone-loader-salesforce.js +3 -3
- package/umd/standalone-loader.js +2 -2
- package/cjs/FetchHelper-8d537d38.js.map +0 -1
- package/esm/FetchHelper-03b37a44.js.map +0 -1
- package/pn-market-web-components/p-012ee486.entry.js +0 -2
- package/pn-market-web-components/p-03cb46c2.entry.js +0 -2
- package/pn-market-web-components/p-07253be3.entry.js +0 -2
- package/pn-market-web-components/p-07253be3.entry.js.map +0 -1
- package/pn-market-web-components/p-08a64973.entry.js +0 -2
- package/pn-market-web-components/p-08a64973.entry.js.map +0 -1
- package/pn-market-web-components/p-107568aa.entry.js.map +0 -1
- package/pn-market-web-components/p-10a3c6f4.entry.js.map +0 -1
- package/pn-market-web-components/p-161970d1.entry.js +0 -2
- package/pn-market-web-components/p-161970d1.entry.js.map +0 -1
- package/pn-market-web-components/p-22a65c3e.entry.js.map +0 -1
- package/pn-market-web-components/p-23916c49.entry.js +0 -2
- package/pn-market-web-components/p-23916c49.entry.js.map +0 -1
- package/pn-market-web-components/p-2ac83614.entry.js +0 -2
- package/pn-market-web-components/p-2ac83614.entry.js.map +0 -1
- package/pn-market-web-components/p-2fd40198.entry.js +0 -2
- package/pn-market-web-components/p-2fd40198.entry.js.map +0 -1
- package/pn-market-web-components/p-545ea4ef.entry.js +0 -2
- package/pn-market-web-components/p-5666f0e7.entry.js.map +0 -1
- package/pn-market-web-components/p-655e6f71.entry.js +0 -2
- package/pn-market-web-components/p-657957fc.entry.js +0 -2
- package/pn-market-web-components/p-657957fc.entry.js.map +0 -1
- package/pn-market-web-components/p-663e4bb8.entry.js +0 -2
- package/pn-market-web-components/p-67089fc8.entry.js +0 -2
- package/pn-market-web-components/p-67089fc8.entry.js.map +0 -1
- package/pn-market-web-components/p-716165d2.entry.js.map +0 -1
- package/pn-market-web-components/p-7fdc49d1.entry.js.map +0 -1
- package/pn-market-web-components/p-8ca34ec3.entry.js.map +0 -1
- package/pn-market-web-components/p-914e1d15.entry.js.map +0 -1
- package/pn-market-web-components/p-b7a5fb1b.entry.js +0 -2
- package/pn-market-web-components/p-be6e903e.entry.js +0 -2
- package/pn-market-web-components/p-be6e903e.entry.js.map +0 -1
- package/pn-market-web-components/p-bece6791.entry.js +0 -2
- package/pn-market-web-components/p-bece6791.entry.js.map +0 -1
- package/pn-market-web-components/p-c64cb117.entry.js +0 -2
- package/pn-market-web-components/p-c95def57.js +0 -2
- package/pn-market-web-components/p-c95def57.js.map +0 -1
- package/pn-market-web-components/p-d2109ea6.entry.js.map +0 -1
- package/pn-market-web-components/p-da0c533f.entry.js +0 -2
- package/pn-market-web-components/p-da0c533f.entry.js.map +0 -1
- package/pn-market-web-components/p-da953848.entry.js.map +0 -1
- package/pn-market-web-components/p-db2e2762.entry.js.map +0 -1
- package/pn-market-web-components/p-db2f3f6d.entry.js +0 -2
- package/pn-market-web-components/p-e0f4dc3d.entry.js +0 -2
- package/pn-market-web-components/p-e0f4dc3d.entry.js.map +0 -1
- package/pn-market-web-components/p-e8189227.entry.js +0 -2
- package/pn-market-web-components/p-e8189227.entry.js.map +0 -1
- package/pn-market-web-components/p-e9088d97.entry.js +0 -2
- package/pn-market-web-components/p-e9088d97.entry.js.map +0 -1
- package/pn-market-web-components/p-f8eb860b.entry.js +0 -2
- package/pn-market-web-components/p-fa9ea740.entry.js.map +0 -1
- package/pn-market-web-components/p-fd639f58.entry.js +0 -2
- package/pn-market-web-components/p-fd639f58.entry.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, d as Host
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h, d as Host } from './index-fa51bde4.js';
|
|
2
2
|
import { p as plus } from './plus-7ee93ae7.js';
|
|
3
3
|
import { v as v4 } from './v4-964634d6.js';
|
|
4
4
|
|
|
@@ -9,24 +9,6 @@ const PnMultiRowConnectedDropdown = class {
|
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.allFormValues = createEvent(this, "allFormValues", 7);
|
|
12
|
-
this._buttonValueName = null;
|
|
13
|
-
this._firstDropdownValueName = null;
|
|
14
|
-
this._secondDropdownValueName = null;
|
|
15
|
-
this._inputValueName = null;
|
|
16
|
-
this._dateValueName = null;
|
|
17
|
-
this._defaultRow = {
|
|
18
|
-
id: this.generateUniqueId(),
|
|
19
|
-
buttons: [],
|
|
20
|
-
firstDropdown: [],
|
|
21
|
-
secondDropdown: [],
|
|
22
|
-
input: '',
|
|
23
|
-
dates: '',
|
|
24
|
-
dateRange: {
|
|
25
|
-
days: [],
|
|
26
|
-
startDate: '',
|
|
27
|
-
endDate: '',
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
12
|
this.dropdownData = null;
|
|
31
13
|
this.languageCode = null;
|
|
32
14
|
this.label = null;
|
|
@@ -52,17 +34,36 @@ const PnMultiRowConnectedDropdown = class {
|
|
|
52
34
|
this.rowData = null;
|
|
53
35
|
this.formValues = null;
|
|
54
36
|
}
|
|
37
|
+
get hostElement() { return getElement(this); }
|
|
38
|
+
_buttonValueName = null;
|
|
39
|
+
_firstDropdownValueName = null;
|
|
40
|
+
_secondDropdownValueName = null;
|
|
41
|
+
_inputValueName = null;
|
|
42
|
+
_dateValueName = null;
|
|
43
|
+
allFormValues;
|
|
44
|
+
_defaultRow = {
|
|
45
|
+
id: this.generateUniqueId(),
|
|
46
|
+
buttons: [],
|
|
47
|
+
firstDropdown: [],
|
|
48
|
+
secondDropdown: [],
|
|
49
|
+
input: '',
|
|
50
|
+
dates: '',
|
|
51
|
+
dateRange: {
|
|
52
|
+
days: [],
|
|
53
|
+
startDate: '',
|
|
54
|
+
endDate: '',
|
|
55
|
+
},
|
|
56
|
+
};
|
|
55
57
|
componentWillLoad() {
|
|
56
|
-
var _a, _b, _c, _d, _e;
|
|
57
58
|
this.setDaysArr();
|
|
58
59
|
this.formValues = [];
|
|
59
60
|
this.rowData = [this._defaultRow];
|
|
60
61
|
this.rowCount = this.rowData.length;
|
|
61
|
-
this._buttonValueName =
|
|
62
|
-
this._firstDropdownValueName =
|
|
63
|
-
this._secondDropdownValueName =
|
|
64
|
-
this._inputValueName =
|
|
65
|
-
this._dateValueName =
|
|
62
|
+
this._buttonValueName = this.label?.length ? this.label : 'value0';
|
|
63
|
+
this._firstDropdownValueName = this.firstDropdownLabel?.length ? this.firstDropdownLabel : 'value1';
|
|
64
|
+
this._secondDropdownValueName = this.secondDropdownLabel?.length ? this.secondDropdownLabel : 'value2';
|
|
65
|
+
this._inputValueName = this.inputFildLabel?.length ? this.inputFildLabel : 'value3';
|
|
66
|
+
this._dateValueName = this.dateButtonText?.length ? this.dateButtonText : 'value4';
|
|
66
67
|
}
|
|
67
68
|
componentDidLoad() { }
|
|
68
69
|
emittValuesIfValid() {
|
|
@@ -85,12 +86,12 @@ const PnMultiRowConnectedDropdown = class {
|
|
|
85
86
|
rowValue.row.push(secondDropdownValue);
|
|
86
87
|
}
|
|
87
88
|
const input = item.input;
|
|
88
|
-
if (input
|
|
89
|
+
if (input?.length) {
|
|
89
90
|
const inputValue = { name: this._inputValueName, value: input };
|
|
90
91
|
rowValue.row.push(inputValue);
|
|
91
92
|
}
|
|
92
|
-
const dates = item.dates;
|
|
93
|
-
if (dates
|
|
93
|
+
const dates = item.dates["start"];
|
|
94
|
+
if (dates?.length) {
|
|
94
95
|
const datestValue = { name: this._dateValueName, value: dates };
|
|
95
96
|
rowValue.row.push(datestValue);
|
|
96
97
|
}
|
|
@@ -109,7 +110,15 @@ const PnMultiRowConnectedDropdown = class {
|
|
|
109
110
|
predefinedValueChange(e) {
|
|
110
111
|
const indexToUpdate = this.rowData.findIndex(data => data.id === e.detail.id);
|
|
111
112
|
const val = e.detail;
|
|
112
|
-
this.rowData[indexToUpdate] =
|
|
113
|
+
this.rowData[indexToUpdate] = {
|
|
114
|
+
...this.rowData[indexToUpdate],
|
|
115
|
+
buttons: val.buttons,
|
|
116
|
+
firstDropdown: val.firstDropdown,
|
|
117
|
+
secondDropdown: val.secondDropdown,
|
|
118
|
+
input: val.input,
|
|
119
|
+
dates: val.dates,
|
|
120
|
+
dateRange: val.dateRange,
|
|
121
|
+
};
|
|
113
122
|
this.emittValuesIfValid();
|
|
114
123
|
}
|
|
115
124
|
deleteRowEvent(e) {
|
|
@@ -188,15 +197,12 @@ const PnMultiRowConnectedDropdown = class {
|
|
|
188
197
|
}
|
|
189
198
|
}
|
|
190
199
|
render() {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
return (h("div", { class: 'generated-row-' + i, id: 'generated-row-connected-dropdown-' + i }, h("pn-multi-row-connected-dropdown-row", { "dropdown-data": this.dropdownData, "language-code": this.languageCode, label: this.label, "first-dropdown-label": this.firstDropdownLabel, "second-dropdown-label": this.secondDropdownLabel, "dropdown-placeholder": this.dropdownPlaceholder, "add-row-text": this.addRowText, "input-fild-label": this.inputFildLabel, "input-fild-placeholder": this.inputFildPlaceholder, "date-button-text": this.dateButtonText, "date-placeholder": this.datePlaceholder, "date-days-from-today": this.dateDaysFromToday, "allow-multiple-dates": this.allowMultipleDates, "start-date-label": this.startDateLabel, "end-date-label": this.endDateLabel, "multi-date-helper-text": this.multiDateHelperText, "generate-dates-button-text": this.generateDatesButtonText, "save-date-button-text": this.saveDateButtonText, "no-dates-text": this.noDatesText, index: i, "predefined-value": JSON.stringify(data), "years-to-add-to-end-date": this.yearsToAddToEndDate })));
|
|
195
|
-
}), this.allowMultipleRows ? (h("div", { class: "connected-dropdown__row" }, h("pn-button", { tooltip: this.addRowText ? this.addRowText : null, "left-icon": "true", arialabel: "Add", icon: plus, appearance: "light", variant: "borderless", class: "connected-dropdown__button-right", onClick: () => {
|
|
200
|
+
return (h(Host, { key: '35f9a37f73fc0713405c0f403c8f8df7eff987ae' }, this.rowData?.map((data, i) => {
|
|
201
|
+
return (h("div", { class: 'generated-row-' + i, id: 'generated-row-connected-dropdown-' + i }, h("pn-multi-row-connected-dropdown-row", { "dropdown-data": this.dropdownData, "language-code": this.languageCode, label: this.label, "first-dropdown-label": this.firstDropdownLabel, "second-dropdown-label": this.secondDropdownLabel, "dropdown-placeholder": this.dropdownPlaceholder, "add-row-text": this.addRowText, "input-fild-label": this.inputFildLabel, "input-fild-placeholder": this.inputFildPlaceholder, "date-button-text": this.dateButtonText, "date-placeholder": this.datePlaceholder, "date-days-from-today": this.dateDaysFromToday, "allow-multiple-dates": this.allowMultipleDates, "start-date-label": this.startDateLabel, "end-date-label": this.endDateLabel, "multi-date-helper-text": this.multiDateHelperText, "generate-dates-button-text": this.generateDatesButtonText, "save-date-button-text": this.saveDateButtonText, "no-dates-text": this.noDatesText, index: i, "predefined-value": JSON.stringify(data), "years-to-add-to-end-date": this.yearsToAddToEndDate })));
|
|
202
|
+
}), this.allowMultipleRows ? (h("div", { class: "connected-dropdown__row" }, h("pn-button", { tooltip: this.addRowText ? this.addRowText : null, "left-icon": "true", arialabel: "Add", icon: plus, appearance: "light", variant: "borderless", class: "connected-dropdown__button-right", onClick: () => {
|
|
196
203
|
this.addRow();
|
|
197
204
|
} }, this.addRowText))) : null));
|
|
198
205
|
}
|
|
199
|
-
get hostElement() { return getElement(this); }
|
|
200
206
|
};
|
|
201
207
|
PnMultiRowConnectedDropdown.style = PnMultiRowConnectedDropdownStyle0;
|
|
202
208
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-multi-row-connected-dropdown.entry.js","mappings":";;;;AAAA,MAAM,8BAA8B,GAAG,+aAA+a,CAAC;AACvd,0CAAe,8BAA8B;;MCQhC,2BAA2B;;;;QA6B9B,qBAAgB,GAAW,IAAI,CAAC;QAChC,4BAAuB,GAAW,IAAI,CAAC;QACvC,6BAAwB,GAAW,IAAI,CAAC;QACxC,oBAAe,GAAW,IAAI,CAAC;QAC/B,mBAAc,GAAW,IAAI,CAAC;QAI9B,gBAAW,GAAqB;YACtC,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAE;YAC3B,OAAO,EAAE,EAAE;YACX,aAAa,EAAE,EAAE;YACjB,cAAc,EAAE,EAAE;YAClB,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,SAAS,EAAE;gBACT,IAAI,EAAE,EAAE;gBACR,SAAS,EAAE,EAAE;gBACb,OAAO,EAAE,EAAE;aACZ;SACF,CAAC;4BA9CsC,IAAI;4BACb,IAAI;qBACX,IAAI;kCACS,IAAI;mCACH,IAAI;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CAAC,8BACZ,IAAI,CAAC,mBAAmB,GACb,CACnC,EACN;aACH,CAAC,EAED,IAAI,CAAC,iBAAiB,IACrB,WAAK,KAAK,EAAC,yBAAyB,IAClC,iBACE,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,eACvC,MAAM,EAChB,SAAS,EAAC,KAAK,EACf,IAAI,EAAE,IAAI,EACV,UAAU,EAAC,OAAO,EAClB,OAAO,EAAC,YAAY,EACpB,KAAK,EAAC,kCAAkC,EACxC,OAAO,EAAE;gBACP,IAAI,CAAC,MAAM,EAAE,CAAC;aACf,IAEA,IAAI,CAAC,UAAU,CACN,CACR,IACJ,IAAI,CACH,EACP;KACH;;;;;;;","names":["uuidv4"],"sources":["src/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.scss?tag=pn-multi-row-connected-dropdown","src/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.tsx"],"sourcesContent":["@import '../../../globals/main.scss';\n\npn-multi-row-connected-dropdown {\n gap: 1rem;\n\n .connected-dropdown {\n &__row {\n display: flex;\n align-items: flex-end;\n gap: 1rem;\n margin-bottom: 1rem;\n justify-content: space-between;\n\n &__no-margin {\n margin: 0;\n }\n }\n\n &__button-right {\n margin-left: auto;\n }\n }\n}\n","import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { FormValue, PredefinedValues, Root, RowValue, SelectItem } from './types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { plus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-multi-row-connected-dropdown',\n styleUrl: 'pn-multi-row-connected-dropdown.scss',\n})\nexport class PnMultiRowConnectedDropdown {\n @Element() hostElement: Element;\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() languageCode: string = null;\n @Prop() label: string = null;\n @Prop() firstDropdownLabel: string = null;\n @Prop() secondDropdownLabel: string = null;\n @Prop() dropdownPlaceholder: string = null;\n @Prop() addRowText: string = null;\n @Prop() inputFildLabel: string = null;\n @Prop() inputFildPlaceholder: string = null;\n @Prop() dateButtonText: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() dateDaysFromToday: number = null;\n @Prop() allowMultipleRows: boolean = false;\n @Prop() allowMultipleDates: boolean = false;\n @Prop() startDateLabel: string = null;\n @Prop() endDateLabel: string = null;\n @Prop() multiDateHelperText: string = null;\n @Prop() generateDatesButtonText: string = null;\n @Prop() saveDateButtonText: string = null;\n @Prop() noDatesText: string = null;\n @Prop() yearsToAddToEndDate: number = null;\n\n @State() rowCount: number = null;\n @State() rowData: PredefinedValues[] = null;\n @State() formValues: FormValue[] = null;\n\n private _buttonValueName: string = null;\n private _firstDropdownValueName: string = null;\n private _secondDropdownValueName: string = null;\n private _inputValueName: string = null;\n private _dateValueName: string = null;\n\n @Event() allFormValues: EventEmitter<string>;\n\n private _defaultRow: PredefinedValues = {\n id: this.generateUniqueId(),\n buttons: [],\n firstDropdown: [],\n secondDropdown: [],\n input: '',\n dates: '',\n dateRange: {\n days: [],\n startDate: '',\n endDate: '',\n },\n };\n\n componentWillLoad() {\n this.setDaysArr();\n this.formValues = [];\n this.rowData = [this._defaultRow];\n this.rowCount = this.rowData.length;\n\n this._buttonValueName = this.label?.length ? this.label : 'value0';\n this._firstDropdownValueName = this.firstDropdownLabel?.length ? this.firstDropdownLabel : 'value1';\n this._secondDropdownValueName = this.secondDropdownLabel?.length ? this.secondDropdownLabel : 'value2';\n this._inputValueName = this.inputFildLabel?.length ? this.inputFildLabel : 'value3';\n this._dateValueName = this.dateButtonText?.length ? this.dateButtonText : 'value4';\n }\n\n componentDidLoad() {}\n\n emittValuesIfValid() {\n this.formValues = [];\n this.rowData.forEach(item => {\n const rowValue: FormValue = { row: [] };\n\n const buttonSelection = item.buttons.find(x => x.selected === true);\n if (buttonSelection) {\n const buttonValue: RowValue = { name: this._buttonValueName, value: buttonSelection.label };\n rowValue.row.push(buttonValue);\n }\n\n const firstDropdownSelection = item.firstDropdown.find(x => x.selected === true);\n if (firstDropdownSelection) {\n const firstDropdownValue: RowValue = { name: this._firstDropdownValueName, value: firstDropdownSelection.label };\n rowValue.row.push(firstDropdownValue);\n }\n\n const secondDropdownSelection = item.secondDropdown.find(x => x.selected === true);\n if (secondDropdownSelection) {\n const secondDropdownValue: RowValue = { name: this._secondDropdownValueName, value: secondDropdownSelection.label };\n rowValue.row.push(secondDropdownValue);\n }\n\n const input = item.input;\n if (input?.length) {\n const inputValue: RowValue = { name: this._inputValueName, value: input };\n rowValue.row.push(inputValue);\n }\n\n const dates = item.dates;\n if (dates?.length) {\n const datestValue: RowValue = { name: this._dateValueName, value: dates };\n rowValue.row.push(datestValue);\n }\n\n if (rowValue.row.length === 5) {\n this.formValues.push(rowValue);\n }\n });\n\n if (this.formValues.length === this.rowData.length) {\n const valueJsonString = JSON.stringify(this.formValues);\n this.allFormValues.emit(valueJsonString);\n } else {\n this.allFormValues.emit('');\n }\n }\n\n @Listen('rowValueChange')\n predefinedValueChange(e) {\n const indexToUpdate = this.rowData.findIndex(data => data.id === e.detail.id);\n const val: PredefinedValues = e.detail;\n this.rowData[indexToUpdate] = {\n ...this.rowData[indexToUpdate],\n buttons: val.buttons,\n firstDropdown: val.firstDropdown,\n secondDropdown: val.secondDropdown,\n input: val.input,\n dates: val.dates,\n dateRange: val.dateRange,\n };\n this.emittValuesIfValid();\n }\n\n @Listen('deleteRowEvent')\n deleteRowEvent(e) {\n const indexToRemove = this.rowData.findIndex(data => data.id === e.detail);\n this.rowData.splice(indexToRemove, 1);\n this.rowData = [...this.rowData];\n this.rowCount = this.rowData.length;\n this.emittValuesIfValid();\n }\n\n generateUniqueId() {\n return uuidv4();\n }\n\n addRow() {\n const newRow = this._defaultRow;\n newRow.id = this.generateUniqueId();\n\n this.rowData = [...this.rowData, newRow];\n this.rowCount = this.rowData.length;\n }\n\n setDaysArr() {\n const language = this.languageCode.toLowerCase();\n\n switch (language) {\n case 'en':\n this._defaultRow.dateRange.days = [\n { label: 'Monday', value: '1', selected: false },\n { label: 'Tuesday', value: '2', selected: false },\n { label: 'Wednesday', value: '3', selected: false },\n { label: 'Thursday', value: '4', selected: false },\n { label: 'Friday', value: '5', selected: false },\n ];\n break;\n\n case 'sv':\n this._defaultRow.dateRange.days = [\n { label: 'Måndag', value: '1', selected: false },\n { label: 'Tisdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n case 'da':\n this._defaultRow.dateRange.days = [\n { label: 'Mandag', value: '1', selected: false },\n { label: 'Tirsdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n case 'fi':\n this._defaultRow.dateRange.days = [\n { label: 'Maanantai', value: '1', selected: false },\n { label: 'Tiistai', value: '2', selected: false },\n { label: 'Keskiviikko', value: '3', selected: false },\n { label: 'Torstai', value: '4', selected: false },\n { label: 'Perjantai', value: '5', selected: false },\n ];\n break;\n\n case 'no':\n this._defaultRow.dateRange.days = [\n { label: 'Mandag', value: '1', selected: false },\n { label: 'Tirsdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n default:\n this._defaultRow.dateRange.days = [\n { label: 'Monday', value: '1', selected: false },\n { label: 'Tuesday', value: '2', selected: false },\n { label: 'Wednesday', value: '3', selected: false },\n { label: 'Thursday', value: '4', selected: false },\n { label: 'Friday', value: '5', selected: false },\n ];\n break;\n }\n }\n\n render() {\n return (\n <Host>\n {this.rowData?.map((data, i) => {\n return (\n <div class={'generated-row-' + i} id={'generated-row-connected-dropdown-' + i}>\n <pn-multi-row-connected-dropdown-row\n dropdown-data={this.dropdownData}\n language-code={this.languageCode}\n label={this.label}\n first-dropdown-label={this.firstDropdownLabel}\n second-dropdown-label={this.secondDropdownLabel}\n dropdown-placeholder={this.dropdownPlaceholder}\n add-row-text={this.addRowText}\n input-fild-label={this.inputFildLabel}\n input-fild-placeholder={this.inputFildPlaceholder}\n date-button-text={this.dateButtonText}\n date-placeholder={this.datePlaceholder}\n date-days-from-today={this.dateDaysFromToday}\n allow-multiple-dates={this.allowMultipleDates}\n start-date-label={this.startDateLabel}\n end-date-label={this.endDateLabel}\n multi-date-helper-text={this.multiDateHelperText}\n generate-dates-button-text={this.generateDatesButtonText}\n save-date-button-text={this.saveDateButtonText}\n no-dates-text={this.noDatesText}\n index={i}\n predefined-value={JSON.stringify(data)}\n years-to-add-to-end-date={this.yearsToAddToEndDate}\n ></pn-multi-row-connected-dropdown-row>\n </div>\n );\n })}\n\n {this.allowMultipleRows ? (\n <div class=\"connected-dropdown__row\">\n <pn-button\n tooltip={this.addRowText ? this.addRowText : null}\n left-icon=\"true\"\n arialabel=\"Add\"\n icon={plus}\n appearance=\"light\"\n variant=\"borderless\"\n class=\"connected-dropdown__button-right\"\n onClick={() => {\n this.addRow();\n }}\n >\n {this.addRowText}\n </pn-button>\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pn-multi-row-connected-dropdown.entry.js","mappings":";;;;AAAA,MAAM,8BAA8B,GAAG,+aAA+a,CAAC;AACvd,0CAAe,8BAA8B;;MCQhC,2BAA2B;;;;4BAGE,IAAI;4BACb,IAAI;qBACX,IAAI;kCACS,IAAI;mCACH,IAAI;mCACJ,IAAI;0BACb,IAAI;8BACA,IAAI;oCACE,IAAI;8BACV,IAAI;+BACH,IAAI;iCACF,IAAI;iCACH,KAAK;kCACJ,KAAK;8BACV,IAAI;4BACN,IAAI;mCACG,IAAI;uCACA,IAAI;kCACT,IAAI;2BACX,IAAI;mCACI,IAAI;wBAEd,IAAI;uBACO,IAAI;0BACR,IAAI;;;IAE/B,gBAAgB,GAAW,IAAI,CAAC;IAChC,uBAAuB,GAA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B,IAAI,CAAC,WAAW,EAC/B,KAAK,EAAE,CAAC,sBACU,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,8BACZ,IAAI,CAAC,mBAAmB,GACb,CACnC,EACN;SACH,CAAC,EAED,IAAI,CAAC,iBAAiB,IACrB,WAAK,KAAK,EAAC,yBAAyB,IAClC,iBACE,OAAO,EAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,GAAG,IAAI,eACvC,MAAM,EAChB,SAAS,EAAC,KAAK,EACf,IAAI,EAAE,IAAI,EACV,UAAU,EAAC,OAAO,EAClB,OAAO,EAAC,YAAY,EACpB,KAAK,EAAC,kCAAkC,EACxC,OAAO,EAAE;gBACP,IAAI,CAAC,MAAM,EAAE,CAAC;aACf,IAEA,IAAI,CAAC,UAAU,CACN,CACR,IACJ,IAAI,CACH,EACP;KACH;;;;;;","names":["uuidv4"],"sources":["src/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.scss?tag=pn-multi-row-connected-dropdown","src/components/input/pn-multi-row-connected-dropdown/pn-multi-row-connected-dropdown.tsx"],"sourcesContent":["@import '../../../globals/main.scss';\n\npn-multi-row-connected-dropdown {\n gap: 1rem;\n\n .connected-dropdown {\n &__row {\n display: flex;\n align-items: flex-end;\n gap: 1rem;\n margin-bottom: 1rem;\n justify-content: space-between;\n\n &__no-margin {\n margin: 0;\n }\n }\n\n &__button-right {\n margin-left: auto;\n }\n }\n}\n","import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { FormValue, PredefinedValues, Root, RowValue, SelectItem } from './types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { plus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-multi-row-connected-dropdown',\n styleUrl: 'pn-multi-row-connected-dropdown.scss',\n})\nexport class PnMultiRowConnectedDropdown {\n @Element() hostElement: Element;\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() languageCode: string = null;\n @Prop() label: string = null;\n @Prop() firstDropdownLabel: string = null;\n @Prop() secondDropdownLabel: string = null;\n @Prop() dropdownPlaceholder: string = null;\n @Prop() addRowText: string = null;\n @Prop() inputFildLabel: string = null;\n @Prop() inputFildPlaceholder: string = null;\n @Prop() dateButtonText: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() dateDaysFromToday: number = null;\n @Prop() allowMultipleRows: boolean = false;\n @Prop() allowMultipleDates: boolean = false;\n @Prop() startDateLabel: string = null;\n @Prop() endDateLabel: string = null;\n @Prop() multiDateHelperText: string = null;\n @Prop() generateDatesButtonText: string = null;\n @Prop() saveDateButtonText: string = null;\n @Prop() noDatesText: string = null;\n @Prop() yearsToAddToEndDate: number = null;\n\n @State() rowCount: number = null;\n @State() rowData: PredefinedValues[] = null;\n @State() formValues: FormValue[] = null;\n\n private _buttonValueName: string = null;\n private _firstDropdownValueName: string = null;\n private _secondDropdownValueName: string = null;\n private _inputValueName: string = null;\n private _dateValueName: string = null;\n\n @Event() allFormValues: EventEmitter<string>;\n\n private _defaultRow: PredefinedValues = {\n id: this.generateUniqueId(),\n buttons: [],\n firstDropdown: [],\n secondDropdown: [],\n input: '',\n dates: '',\n dateRange: {\n days: [],\n startDate: '',\n endDate: '',\n },\n };\n\n componentWillLoad() {\n this.setDaysArr();\n this.formValues = [];\n this.rowData = [this._defaultRow];\n this.rowCount = this.rowData.length;\n\n this._buttonValueName = this.label?.length ? this.label : 'value0';\n this._firstDropdownValueName = this.firstDropdownLabel?.length ? this.firstDropdownLabel : 'value1';\n this._secondDropdownValueName = this.secondDropdownLabel?.length ? this.secondDropdownLabel : 'value2';\n this._inputValueName = this.inputFildLabel?.length ? this.inputFildLabel : 'value3';\n this._dateValueName = this.dateButtonText?.length ? this.dateButtonText : 'value4';\n }\n\n componentDidLoad() {}\n\n emittValuesIfValid() {\n this.formValues = [];\n this.rowData.forEach(item => {\n const rowValue: FormValue = { row: [] };\n\n const buttonSelection = item.buttons.find(x => x.selected === true);\n if (buttonSelection) {\n const buttonValue: RowValue = { name: this._buttonValueName, value: buttonSelection.label };\n rowValue.row.push(buttonValue);\n }\n\n const firstDropdownSelection = item.firstDropdown.find(x => x.selected === true);\n if (firstDropdownSelection) {\n const firstDropdownValue: RowValue = { name: this._firstDropdownValueName, value: firstDropdownSelection.label };\n rowValue.row.push(firstDropdownValue);\n }\n\n const secondDropdownSelection = item.secondDropdown.find(x => x.selected === true);\n if (secondDropdownSelection) {\n const secondDropdownValue: RowValue = { name: this._secondDropdownValueName, value: secondDropdownSelection.label };\n rowValue.row.push(secondDropdownValue);\n }\n\n const input = item.input;\n if (input?.length) {\n const inputValue: RowValue = { name: this._inputValueName, value: input };\n rowValue.row.push(inputValue);\n }\n\n const dates = item.dates[\"start\"];\n if (dates?.length) {\n const datestValue: RowValue = { name: this._dateValueName, value: dates };\n rowValue.row.push(datestValue);\n }\n\n if (rowValue.row.length === 5) {\n this.formValues.push(rowValue);\n }\n });\n\n if (this.formValues.length === this.rowData.length) {\n const valueJsonString = JSON.stringify(this.formValues);\n this.allFormValues.emit(valueJsonString);\n } else {\n this.allFormValues.emit('');\n }\n }\n\n @Listen('rowValueChange')\n predefinedValueChange(e) {\n const indexToUpdate = this.rowData.findIndex(data => data.id === e.detail.id);\n const val: PredefinedValues = e.detail;\n this.rowData[indexToUpdate] = {\n ...this.rowData[indexToUpdate],\n buttons: val.buttons,\n firstDropdown: val.firstDropdown,\n secondDropdown: val.secondDropdown,\n input: val.input,\n dates: val.dates,\n dateRange: val.dateRange,\n };\n this.emittValuesIfValid();\n }\n\n @Listen('deleteRowEvent')\n deleteRowEvent(e) {\n const indexToRemove = this.rowData.findIndex(data => data.id === e.detail);\n this.rowData.splice(indexToRemove, 1);\n this.rowData = [...this.rowData];\n this.rowCount = this.rowData.length;\n this.emittValuesIfValid();\n }\n\n generateUniqueId() {\n return uuidv4();\n }\n\n addRow() {\n const newRow = this._defaultRow;\n newRow.id = this.generateUniqueId();\n\n this.rowData = [...this.rowData, newRow];\n this.rowCount = this.rowData.length;\n }\n\n setDaysArr() {\n const language = this.languageCode.toLowerCase();\n\n switch (language) {\n case 'en':\n this._defaultRow.dateRange.days = [\n { label: 'Monday', value: '1', selected: false },\n { label: 'Tuesday', value: '2', selected: false },\n { label: 'Wednesday', value: '3', selected: false },\n { label: 'Thursday', value: '4', selected: false },\n { label: 'Friday', value: '5', selected: false },\n ];\n break;\n\n case 'sv':\n this._defaultRow.dateRange.days = [\n { label: 'Måndag', value: '1', selected: false },\n { label: 'Tisdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n case 'da':\n this._defaultRow.dateRange.days = [\n { label: 'Mandag', value: '1', selected: false },\n { label: 'Tirsdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n case 'fi':\n this._defaultRow.dateRange.days = [\n { label: 'Maanantai', value: '1', selected: false },\n { label: 'Tiistai', value: '2', selected: false },\n { label: 'Keskiviikko', value: '3', selected: false },\n { label: 'Torstai', value: '4', selected: false },\n { label: 'Perjantai', value: '5', selected: false },\n ];\n break;\n\n case 'no':\n this._defaultRow.dateRange.days = [\n { label: 'Mandag', value: '1', selected: false },\n { label: 'Tirsdag', value: '2', selected: false },\n { label: 'Onsdag', value: '3', selected: false },\n { label: 'Torsdag', value: '4', selected: false },\n { label: 'Fredag', value: '5', selected: false },\n ];\n break;\n\n default:\n this._defaultRow.dateRange.days = [\n { label: 'Monday', value: '1', selected: false },\n { label: 'Tuesday', value: '2', selected: false },\n { label: 'Wednesday', value: '3', selected: false },\n { label: 'Thursday', value: '4', selected: false },\n { label: 'Friday', value: '5', selected: false },\n ];\n break;\n }\n }\n\n render() {\n return (\n <Host>\n {this.rowData?.map((data, i) => {\n return (\n <div class={'generated-row-' + i} id={'generated-row-connected-dropdown-' + i}>\n <pn-multi-row-connected-dropdown-row\n dropdown-data={this.dropdownData}\n language-code={this.languageCode}\n label={this.label}\n first-dropdown-label={this.firstDropdownLabel}\n second-dropdown-label={this.secondDropdownLabel}\n dropdown-placeholder={this.dropdownPlaceholder}\n add-row-text={this.addRowText}\n input-fild-label={this.inputFildLabel}\n input-fild-placeholder={this.inputFildPlaceholder}\n date-button-text={this.dateButtonText}\n date-placeholder={this.datePlaceholder}\n date-days-from-today={this.dateDaysFromToday}\n allow-multiple-dates={this.allowMultipleDates}\n start-date-label={this.startDateLabel}\n end-date-label={this.endDateLabel}\n multi-date-helper-text={this.multiDateHelperText}\n generate-dates-button-text={this.generateDatesButtonText}\n save-date-button-text={this.saveDateButtonText}\n no-dates-text={this.noDatesText}\n index={i}\n predefined-value={JSON.stringify(data)}\n years-to-add-to-end-date={this.yearsToAddToEndDate}\n ></pn-multi-row-connected-dropdown-row>\n </div>\n );\n })}\n\n {this.allowMultipleRows ? (\n <div class=\"connected-dropdown__row\">\n <pn-button\n tooltip={this.addRowText ? this.addRowText : null}\n left-icon=\"true\"\n arialabel=\"Add\"\n icon={plus}\n appearance=\"light\"\n variant=\"borderless\"\n class=\"connected-dropdown__button-right\"\n onClick={() => {\n this.addRow();\n }}\n >\n {this.addRowText}\n </pn-button>\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, d as Host
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h, d as Host } from './index-fa51bde4.js';
|
|
2
2
|
import { d as debounce } from './index-1093ae90.js';
|
|
3
3
|
import { m as minus } from './minus-2b8ae0b8.js';
|
|
4
4
|
import { p as plus } from './plus-7ee93ae7.js';
|
|
@@ -11,13 +11,15 @@ const PnMultipleInput = class {
|
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
registerInstance(this, hostRef);
|
|
13
13
|
this.allFormValues = createEvent(this, "allFormValues", 7);
|
|
14
|
-
this.pnSlotElement = null;
|
|
15
|
-
this._formValues = [];
|
|
16
14
|
this.label = null;
|
|
17
15
|
this.placeholder = null;
|
|
18
16
|
this.addRowButtonText = null;
|
|
19
17
|
this.rowData = [];
|
|
20
18
|
}
|
|
19
|
+
get hostElement() { return getElement(this); }
|
|
20
|
+
pnSlotElement = null;
|
|
21
|
+
_formValues = [];
|
|
22
|
+
allFormValues;
|
|
21
23
|
componentWillLoad() {
|
|
22
24
|
const elemtnId = this.generateUniqueId();
|
|
23
25
|
const newRow = { id: elemtnId, input: '' };
|
|
@@ -63,7 +65,10 @@ const PnMultipleInput = class {
|
|
|
63
65
|
if (index < 0) {
|
|
64
66
|
return;
|
|
65
67
|
}
|
|
66
|
-
this.rowData[index] =
|
|
68
|
+
this.rowData[index] = {
|
|
69
|
+
...this.rowData[index],
|
|
70
|
+
input: value,
|
|
71
|
+
};
|
|
67
72
|
this.emitValues();
|
|
68
73
|
}
|
|
69
74
|
emitValues() {
|
|
@@ -88,8 +93,7 @@ const PnMultipleInput = class {
|
|
|
88
93
|
}
|
|
89
94
|
}
|
|
90
95
|
render() {
|
|
91
|
-
|
|
92
|
-
return (h(Host, { key: '0e11604bc1d4a9be1ff05d2f926ca39c4e20c369' }, h("div", { key: '0b5c1a99dce6934bd54f73e5d60eddb579fa1cb4', ref: el => (this.pnSlotElement = el), class: "multiple-input-slot" }, (_a = this.rowData) === null || _a === void 0 ? void 0 : _a.map((data, i) => {
|
|
96
|
+
return (h(Host, { key: '0e11604bc1d4a9be1ff05d2f926ca39c4e20c369' }, h("div", { key: '0b5c1a99dce6934bd54f73e5d60eddb579fa1cb4', ref: el => (this.pnSlotElement = el), class: "multiple-input-slot" }, this.rowData?.map((data, i) => {
|
|
93
97
|
return (h("div", { class: "multiple-input-generated-row" }, h("pn-marketweb-input", { label: this.label, type: "text", placeholder: this.placeholder, value: data.input, id: data.id }), i > 0 ? (h("pn-button", { arialabel: "Delete", icon: minus, appearance: "warning", onClick: () => {
|
|
94
98
|
this.deleteRow(i);
|
|
95
99
|
}, index: i, id: data.id }, "Delete")) : null));
|
|
@@ -97,7 +101,6 @@ const PnMultipleInput = class {
|
|
|
97
101
|
this.addRow();
|
|
98
102
|
} }, this.addRowButtonText))));
|
|
99
103
|
}
|
|
100
|
-
get hostElement() { return getElement(this); }
|
|
101
104
|
};
|
|
102
105
|
PnMultipleInput.style = PnMultipleInputStyle0;
|
|
103
106
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-multiple-input.entry.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,2WAA2W,CAAC;AACvY,8BAAe,kBAAkB;;MCSpB,eAAe;;;;
|
|
1
|
+
{"file":"pn-multiple-input.entry.js","mappings":";;;;;;AAAA,MAAM,kBAAkB,GAAG,2WAA2W,CAAC;AACvY,8BAAe,kBAAkB;;MCSpB,eAAe;;;;qBAIF,IAAI;2BACE,IAAI;gCACC,IAAI;uBAEb,EAAE;;;IAN5B,aAAa,GAAgB,IAAI,CAAC;IAQ1B,WAAW,GAAgB,EAAE,CAAC;IAE7B,aAAa,CAAuB;IAE7C,iBAAiB;QACf,MAAM,QAAQ,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACzC,MAAM,MAAM,GAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;KAC1C;IAED,gBAAgB;QACd,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,kBAAkB;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;KACzB;IAED,gBAAgB;QACd,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAC;QAEvE,IAAI,CAAC,OAAO,CAAC,OAAO;YAClB,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,C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KAAK,EAAE,IAAI,EAAC,MAAM,EAAC,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,GAAuB,EACtI,CAAC,GAAG,CAAC,IACJ,iBACE,SAAS,EAAC,QAAQ,EAClB,IAAI,EAAE,KAAK,EACX,UAAU,EAAC,SAAS,EACpB,OAAO,EAAE;oBACP,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;iBACnB,EACD,KAAK,EAAE,CAAC,EACR,EAAE,EAAE,IAAI,CAAC,EAAE,aAGD,IACV,IAAI,CACJ,EACN;SACH,CAAC,CACE,EACN,4DAAK,KAAK,EAAC,oBAAoB,IAC7B,kEACE,OAAO,EAAE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,eACnD,MAAM,EAChB,SAAS,EAAC,KAAK,EACf,IAAI,EAAE,IAAI,EACV,UAAU,EAAC,OAAO,EAClB,OAAO,EAAC,YAAY,EACpB,KAAK,EAAC,kCAAkC,EACxC,OAAO,EAAE;gBACP,IAAI,CAAC,MAAM,EAAE,CAAC;aACf,IAEA,IAAI,CAAC,gBAAgB,CACZ,CACR,CACD,EACP;KACH;;;;;;","names":["uuidv4"],"sources":["src/components/input/pn-multiple-input/pn-multiple-input.scss?tag=pn-multiple-input","src/components/input/pn-multiple-input/pn-multiple-input.tsx"],"sourcesContent":["pn-multiple-input {\n .multiple-input-generated-row,\n .multiple-input-row {\n display: flex;\n gap: 1rem;\n\n pn-marketweb-input {\n width: 100%;\n }\n }\n\n .multiple-input-slot {\n display: flex;\n gap: 1rem;\n flex-direction: column;\n margin-top: 1rem;\n margin-bottom: 1rem;\n }\n}\n","import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { FormValue, Row, RowValue } from './types';\nimport { v4 as uuidv4 } from 'uuid';\nimport debounce from 'debounce';\nimport { minus, plus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-multiple-input',\n styleUrl: 'pn-multiple-input.scss',\n})\nexport class PnMultipleInput {\n @Element() hostElement: Element;\n pnSlotElement: HTMLElement = null;\n\n @Prop() label: string = null;\n @Prop() placeholder: string = null;\n @Prop() addRowButtonText: string = null;\n\n @State() rowData: Row[] = [];\n\n private _formValues: FormValue[] = [];\n\n @Event() allFormValues: EventEmitter<string>;\n\n componentWillLoad() {\n const elemtnId = this.generateUniqueId();\n const newRow: Row = { id: elemtnId, input: '' };\n this.rowData = [...this.rowData, newRow];\n }\n\n componentDidLoad() {\n this.addEventHandlers();\n }\n\n componentDidUpdate() {\n this.addEventHandlers();\n }\n\n addEventHandlers() {\n const rows = this.pnSlotElement.querySelectorAll('pn-marketweb-input');\n\n rows.forEach(element => {\n element.addEventListener('keyup', debounce(this.handleInput.bind(this), 500));\n });\n }\n\n generateUniqueId() {\n return uuidv4();\n }\n\n deleteRow(indexToRemove) {\n if (indexToRemove < 0) {\n return;\n }\n\n this.rowData.splice(indexToRemove, 1);\n this.rowData = [...this.rowData];\n this.emitValues();\n }\n\n addRow() {\n const newRow: Row = { id: this.generateUniqueId(), input: '' };\n this.rowData = [...this.rowData, newRow];\n this.emitValues();\n }\n\n handleInput(e) {\n const target = e.target;\n const inputElm = target.closest('pn-marketweb-input');\n\n if (!inputElm) {\n return;\n }\n\n const inputElmId = inputElm.id;\n const value = target.value;\n const index = this.rowData.findIndex(item => item.id === inputElmId);\n\n if (index < 0) {\n return;\n }\n\n this.rowData[index] = {\n ...this.rowData[index],\n input: value,\n };\n\n this.emitValues();\n }\n\n emitValues() {\n this._formValues = [];\n const label = this.label ? this.label : 'InputField';\n this.rowData.forEach(item => {\n const rowValue: FormValue = { row: [] };\n if (item.input) {\n const dropDownValue: RowValue = { name: label, value: item.input };\n rowValue.row.push(dropDownValue);\n }\n\n if (rowValue.row.length === 1) {\n this._formValues.push(rowValue);\n }\n });\n\n if (this._formValues.length === this.rowData.length) {\n const valueJsonString = JSON.stringify(this._formValues);\n this.allFormValues.emit(valueJsonString);\n } else {\n this.allFormValues.emit('');\n }\n }\n\n render() {\n return (\n <Host>\n <div ref={el => (this.pnSlotElement = el as HTMLElement)} class=\"multiple-input-slot\">\n {this.rowData?.map((data, i) => {\n return (\n <div class=\"multiple-input-generated-row\">\n <pn-marketweb-input label={this.label} type=\"text\" placeholder={this.placeholder} value={data.input} id={data.id}></pn-marketweb-input>\n {i > 0 ? (\n <pn-button\n arialabel=\"Delete\"\n icon={minus}\n appearance=\"warning\"\n onClick={() => {\n this.deleteRow(i);\n }}\n index={i}\n id={data.id}\n >\n Delete\n </pn-button>\n ) : null}\n </div>\n );\n })}\n </div>\n <dvi class=\"multiple-input-row\">\n <pn-button\n tooltip={this.addRowButtonText ? this.addRowButtonText : null}\n left-icon=\"true\"\n arialabel=\"Add\"\n icon={plus}\n appearance=\"light\"\n variant=\"borderless\"\n class=\"connected-dropdown__button-right\"\n onClick={() => {\n this.addRow();\n }}\n >\n {this.addRowButtonText}\n </pn-button>\n </dvi>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, d as Host
|
|
1
|
+
import { r as registerInstance, g as getElement, h, d as Host } from './index-fa51bde4.js';
|
|
2
2
|
import { s as search } from './search-36631e55.js';
|
|
3
3
|
|
|
4
4
|
const pnParcelTrackerCss = "pn-button-dropdown .pn-button-dropdown>pn-button>.pn-button{min-height:initial}pn-spotlight .pn-spotlight__container:has(pn-parcel-tracker) [slot=mobile-heading]{color:#005d92}.pn-spotlight__container__wrapper__content [slot=content]:has(pn-parcel-tracker){padding-left:2rem}pn-parcel-tracker{width:100%}pn-parcel-tracker .pn-parcel-tracker__container form{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;gap:1.6rem}pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{color:#005d92;font-weight:500;margin-bottom:0}@media screen and (max-width: 768px){pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{display:none}}@media screen and (min-width: 1640px){pn-parcel-tracker .pn-parcel-tracker__container form .pn-parcel-tracker__container__heading{font-size:2.4rem;font-weight:700}}pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{flex-grow:1;max-width:80%}@media screen and (min-width: 768px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:50%}}@media screen and (min-width: 992px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:45%}}@media screen and (min-width: 1640px){pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input{max-width:35%}}pn-parcel-tracker .pn-parcel-tracker__container form pn-marketweb-input input{border-radius:6.4rem}";
|
|
@@ -15,13 +15,13 @@ const PnSpotlight = class {
|
|
|
15
15
|
this.inputName = 'shipmentID';
|
|
16
16
|
this.currentWidth = window.innerWidth;
|
|
17
17
|
}
|
|
18
|
+
get hostElement() { return getElement(this); }
|
|
18
19
|
handleViewportSizeChange(event) {
|
|
19
20
|
this.currentWidth = event.target.innerWidth;
|
|
20
21
|
}
|
|
21
22
|
render() {
|
|
22
23
|
return (h(Host, { key: '1175ee79bdd43c697cff71530375a02bc7608382' }, h("div", { key: '7d5059b7384060cf1937c45341b01998ec1220d7', class: "pn-parcel-tracker__container" }, h("form", { key: '3a416b4c483e99a953c715e16f3f3ea83591570a', method: "GET", action: this.formActionUrl }, h("h3", { key: '832541b313250e8960f93298f5c6e90e5af405c8', class: "pn-parcel-tracker__container__heading" }, this.heading), h("pn-marketweb-input", { key: '73b2290a2ec9427faf6110ef97a2df0f5c7bd51f', name: this.inputName, placeholder: this.placeholder }), h("pn-button", { key: '1f99b01aba200dc0e863058d9df9ff3bd015f959', type: "submit", icon: search, tooltip: this.currentWidth < 412 ? this.buttonLabel : null }, this.currentWidth >= 412 && this.buttonLabel)))));
|
|
23
24
|
}
|
|
24
|
-
get hostElement() { return getElement(this); }
|
|
25
25
|
};
|
|
26
26
|
PnSpotlight.style = PnParcelTrackerStyle0;
|
|
27
27
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-parcel-tracker.entry.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,q7CAAq7C,CAAC;AACj9C,8BAAe,kBAAkB;;MCMpB,WAAW;;;6BAEU,IAAI;uBACV,mBAAmB;2BACf,IAAI;sBACT,IAAI;2BACC,mBAAmB;yBACrB,YAAY;4BAEhB,MAAM,CAAC,UAAU
|
|
1
|
+
{"file":"pn-parcel-tracker.entry.js","mappings":";;;AAAA,MAAM,kBAAkB,GAAG,q7CAAq7C,CAAC;AACj9C,8BAAe,kBAAkB;;MCMpB,WAAW;;;6BAEU,IAAI;uBACV,mBAAmB;2BACf,IAAI;sBACT,IAAI;2BACC,mBAAmB;yBACrB,YAAY;4BAEhB,MAAM,CAAC,UAAU;;;IAGzC,wBAAwB,CAAC,KAAU;QACjC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC;KAC7C;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,4DAAK,KAAK,EAAC,8BAA8B,IACvC,6DAAM,MAAM,EAAC,KAAK,EAAC,MAAM,EAAE,IAAI,CAAC,aAAa,IAC3C,2DAAI,KAAK,EAAC,uCAAuC,IAAE,IAAI,CAAC,OAAO,CAAM,EACrE,2EAAoB,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,GAAI,EAC3E,kEAAW,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,GAAG,IAAI,IAC9F,IAAI,CAAC,YAAY,IAAI,GAAG,IAAI,IAAI,CAAC,WAAW,CACnC,CACP,CACH,CACD,EACP;KACH;;;;;;","names":[],"sources":["src/components/cta/pn-parcel-tracker/pn-parcel-tracker.scss?tag=pn-parcel-tracker","src/components/cta/pn-parcel-tracker/pn-parcel-tracker.tsx"],"sourcesContent":["@import '../../../globals/main.scss';\n\npn-spotlight .pn-spotlight__container:has(pn-parcel-tracker) {\n [slot='mobile-heading'] {\n color: $blue700;\n }\n}\n\n.pn-spotlight__container__wrapper:has(pn-parcel-tracker) {\n}\n\n.pn-spotlight__container__wrapper__content [slot='content']:has(pn-parcel-tracker) {\n padding-left: 2rem;\n}\n\npn-parcel-tracker {\n width: 100%;\n\n .pn-parcel-tracker__container {\n form {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n gap: 1.6rem;\n\n .pn-parcel-tracker__container__heading {\n color: $blue700;\n font-weight: 500;\n margin-bottom: 0;\n\n @media screen and (max-width: 768px) {\n display: none;\n }\n\n @media screen and (min-width: 1640px) {\n font-size: 2.4rem;\n font-weight: 700;\n }\n }\n\n pn-marketweb-input {\n flex-grow: 1;\n max-width: 80%;\n\n @media screen and (min-width: 576px) {\n }\n\n @media screen and (min-width: 768px) {\n max-width: 50%;\n }\n\n @media screen and (min-width: 992px) {\n max-width: 45%;\n }\n\n @media screen and (min-width: 1640px) {\n max-width: 35%;\n }\n\n input {\n border-radius: 6.4rem;\n }\n }\n }\n }\n}\n","import { Component, Element, h, Host, Listen, Prop, State } from '@stencil/core';\nimport { search } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-parcel-tracker',\n styleUrl: 'pn-parcel-tracker.scss',\n})\nexport class PnSpotlight {\n @Element() hostElement: HTMLElement;\n @Prop() formActionUrl: string = null;\n @Prop() heading: string = 'Track your parcel';\n @Prop() buttonLabel: string = null;\n @Prop() locale: string = 'en';\n @Prop() placeholder: string = 'Enter shipment ID';\n @Prop() inputName: string = 'shipmentID';\n\n @State() currentWidth = window.innerWidth;\n\n @Listen('resize', { target: 'window' })\n handleViewportSizeChange(event: any) {\n this.currentWidth = event.target.innerWidth;\n }\n\n render() {\n return (\n <Host>\n <div class=\"pn-parcel-tracker__container\">\n <form method=\"GET\" action={this.formActionUrl}>\n <h3 class=\"pn-parcel-tracker__container__heading\">{this.heading}</h3>\n <pn-marketweb-input name={this.inputName} placeholder={this.placeholder} />\n <pn-button type=\"submit\" icon={search} tooltip={this.currentWidth < 412 ? this.buttonLabel : null}>\n {this.currentWidth >= 412 && this.buttonLabel}\n </pn-button>\n </form>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, d as Host
|
|
1
|
+
import { r as registerInstance, g as getElement, h, d as Host } from './index-fa51bde4.js';
|
|
2
2
|
|
|
3
3
|
const translations = {
|
|
4
4
|
sv: {
|
|
@@ -42,6 +42,7 @@ const PnPexPricefinder = class {
|
|
|
42
42
|
this.when = '';
|
|
43
43
|
this.response = null;
|
|
44
44
|
}
|
|
45
|
+
get hostElement() { return getElement(this); }
|
|
45
46
|
componentWillLoad() {
|
|
46
47
|
this.init();
|
|
47
48
|
}
|
|
@@ -119,7 +120,6 @@ const PnPexPricefinder = class {
|
|
|
119
120
|
render() {
|
|
120
121
|
return (h(Host, { key: '742cd6396e2ad9b3e0e187cd119d5f4adec8dbf1' }, h("div", { key: 'f49ad71ba0aff4415620aa5bfed4609e052fb58c', class: "pex-pricefinder-top" }, h("pn-illustration", { key: '24080dabb15a48e0d68f5b6a6d85ec6c7cd09e49', illustration: PEX_truck }), h("h2", { key: '43ad48d518aedbf6741b07e57808e3dd58321d26' }, this.i18n.heading)), h("form", { key: '3407cc0e217d2fbfe63dce5603a3b43fa5a6056f', method: "get", action: "", class: "pex-pricefinder-form", onSubmit: this.onSubmit.bind(this) }, h("fieldset", { key: 'f6ae922213d0fb6c06ab91fe00b35b61b3881eac' }, h("div", { key: 'e6822da8aebfb2040413d43035be24e18e337ec8' }, h("pn-input", { key: 'b5108e58ea6ed0b45f6e1b64bf756d0abf26eae9', type: "number", label: this.i18n.labelFrom, inputid: "fromzip", name: "fromzip", placeholder: this.i18n.zipPlaceholder, required: true, value: this.fromzip }), h("pn-input", { key: '83c0b8cbc2310f89dfbd2c7eedde4851d9a3b40d', type: "number", label: this.i18n.labelTo, inputid: "tozip", name: "tozip", placeholder: this.i18n.zipPlaceholder, required: true, value: this.tozip }))), h("fieldset", { key: '1ce0961fc701b461a189002ba52b2f4a4877ad50' }, h("div", { key: '3415fffa5db6d7fa7217b99e7eda8f5b28bd15df' }, h("pn-input", { key: '33362d3cf3c4948fb983d1dde4024b7edf14777d', type: "number", label: this.i18n.labelWeight, inputid: "weight", name: "weight", placeholder: this.i18n.weightPlaceholder, required: true, value: this.weight }), h("div", { key: 'c4c9b1b172506c082bf98c521c68a2ed485662d3', class: "datepicker" }, h("label", { key: '0a76111d4d38e8e7dc68fae3be00a95ab4d14ff8', htmlFor: "when" }, this.i18n.labelWhen), h("pn-marketweb-input", { key: '01a84a228a366aa4a4a797ba5fe898c08f9b76fc', inputid: "when", name: "when", type: "datetime-local", min: new Date().toISOString().split('T')[0], value: this.when })))), h("fieldset", { key: 'a8ece788f3cec4d6dfc92b9587984160832eeca8' }, h("div", { key: 'fd00f98a9aa2a7c0686835d4dd2252220e602fd2' }, h("pn-button", { key: 'f9642c6347c3831772219440ea14d319898da3c3', type: "submit" }, this.i18n.submitButtonText)))), this.response ? (h("div", { class: "pex-pricefinder-response" }, h("strong", null, this.response.data.value, " ", this.currency))) : null));
|
|
121
122
|
}
|
|
122
|
-
get hostElement() { return getElement(this); }
|
|
123
123
|
};
|
|
124
124
|
PnPexPricefinder.style = PnPexPricefinderStyle0;
|
|
125
125
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-pex-pricefinder.entry.js","mappings":";;AAAO,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE;QACF,OAAO,EAAE,4BAA4B;QACrC,SAAS,EAAE,cAAc;QACzB,OAAO,EAAE,cAAc;QACvB,cAAc,EAAE,WAAW;QAC3B,WAAW,EAAE,eAAe;QAC5B,iBAAiB,EAAE,UAAU;QAC7B,SAAS,EAAE,KAAK;Q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,IAAI,CAAC,IAAI,GAAuB,CACrJ,CACF,CACG,EACX,mEACE,8DACE,kEAAW,IAAI,EAAC,QAAQ,IAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAa,CAC7D,CACG,CACN,EACN,IAAI,CAAC,QAAQ,IACZ,WAAK,KAAK,EAAC,0BAA0B,IACnC,kBACG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,OAAG,IAAI,CAAC,QAAQ,CAClC,CACL,IACJ,IAAI,CACH,EACP;KACH;;;;;;;","names":[],"sources":["src/components/widgets/pn-pex-pricefinder/translations.ts","node_modules/pn-design-assets/pn-assets/illustrations/PEX_truck.js","src/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.scss?tag=pn-pex-pricefinder","src/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.tsx"],"sourcesContent":["export const translations = {\n sv: {\n heading: 'Prisindikation med PEX Bud',\n labelFrom: 'Från postkod',\n labelTo: 'Till postkod',\n zipPlaceholder: 'Ex. 12831',\n labelWeight: 'Vikt (i kilo)',\n weightPlaceholder: 'Ex. 1000',\n labelWhen: 'När',\n submitButtonText: 'Beräkna pris',\n },\n en: {\n heading: 'Calculate price with PEX Bud',\n labelFrom: 'From zip',\n labelTo: 'To zip',\n zipPlaceholder: 'Ex. 12831',\n labelWeight: 'Weight (in kilo)',\n weightPlaceholder: 'Ex. 1000',\n labelWhen: 'When',\n submitButtonText: 'Calculate price',\n },\n};\n","const illustration = '<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 120 120\"><g clip-path=\"url(#PEX-truck_svg__a)\"><path fill=\"#8EDDF9\" d=\"M0 60C0 26.863 26.863 0 60 0s60 26.863 60 60-26.863 60-60 60S0 93.137 0 60\"/><path fill=\"#0D234B\" fill-rule=\"evenodd\" d=\"M-8 114.461c0-.311.253-.564.564-.564h278.872a.565.565 0 0 1 0 1.128H-7.436a.564.564 0 0 1-.564-.564\" clip-rule=\"evenodd\"/><path fill=\"#000\" d=\"M95.087 114.912c6.804 0 12.319-5.515 12.319-12.319s-5.515-12.32-12.319-12.32c-6.803 0-12.319 5.516-12.319 12.32s5.516 12.319 12.32 12.319\"/><path fill=\"#D3CECB\" d=\"M174.689 105.436H65.757V22h98.463c5.776 0 10.469 4.693 10.469 10.469z\"/><path fill=\"#F3F2F2\" d=\"M133.67 105.436H25.416V32.469C25.416 26.693 30.108 22 35.885 22h97.83v83.436z\"/><path fill=\"#2D2013\" d=\"M65.983 105.436H25.416V32.469C25.416 26.693 30.108 22 35.885 22h94.672z\"/><path fill=\"#000\" d=\"M233.486 106.429H21.264v-4.242a3.235 3.235 0 0 1 3.249-3.249h205.769a3.235 3.235 0 0 1 3.249 3.249v4.242z\"/><path fill=\"#5E554A\" fill-rule=\"evenodd\" d=\"M30.56 88.763h-5.144v-1.128h5.144c1.906 0 3.316 1.715 3.316 3.632 0 1.968-1.415 3.633-3.316 3.633h-5.144v-1.128h5.144c1.167 0 2.188-1.043 2.188-2.505 0-1.422-1.026-2.504-2.188-2.504\" clip-rule=\"evenodd\"/><path fill=\"#00A0D6\" d=\"M63.995 98.848 123.334 22h9.431L73.381 98.938z\"/><path fill=\"#A7A6A6\" d=\"m62.597 22 9.521.045 21.795 28.203-4.783 6.137zM97.706 67.486l4.647-6.092 28.925 37.454-9.295.09z\"/><path fill=\"#000\" d=\"M70.764 105.436H39.493v-3.43c0-8.618 6.994-15.658 15.658-15.658 8.619 0 15.658 6.995 15.658 15.658v3.43z\"/><path fill=\"#000\" d=\"M55.108 114.912c6.804 0 12.32-5.515 12.32-12.319s-5.516-12.32-12.32-12.32c-6.803 0-12.319 5.516-12.319 12.32s5.515 12.319 12.32 12.319\"/><path fill=\"#5E554A\" d=\"M55.017 107.647a5.054 5.054 0 1 0 0-10.108 5.054 5.054 0 0 0 0 10.108\"/><path fill=\"#fff\" d=\"M58.583 58.595h-6.498v1.354h6.498z\"/><path fill=\"#fff\" d=\"M49.466 52.144v14.71h11.19v-1.353H51V53.497h9.386v-1.353zM36.154 66.854v-14.71h5.912c3.52 0 5.234 1.398 5.234 4.286 0 2.979-1.715 4.468-5.234 4.468h-3.294v-1.354h3.294c2.617 0 3.79-.948 3.79-3.068 0-2.076-1.173-2.979-3.79-2.979h-4.378v13.357z\"/><path fill=\"#1798D5\" d=\"m61.877 66.854 11.551-14.71h1.805l-11.506 14.71z\"/><path fill=\"#fff\" d=\"m61.605 52.099 1.85.045 4.241 5.37-.902 1.173zM68.42 60.808l.902-1.128 5.64 7.175h-1.805zM60.522 70.735c0 .586-.406.993-.948.993-.36 0-.496-.18-.496-.18l-.045-.046v.722h-.677v-2.437h.677v.226l.045-.045s.18-.226.587-.226c.496-.045.857.361.857.993m-.722 0c0-.27-.18-.406-.406-.406a.404.404 0 0 0-.406.406c0 .225.18.406.406.406s.406-.18.406-.406m3.068-.045c0 .722-.541.992-1.128.992-.496 0-1.083-.27-1.083-.992s.542-.993 1.129-.993c.541 0 1.082.316 1.082.993m-.676.045c0-.27-.18-.406-.407-.406a.404.404 0 0 0-.406.406c0 .225.18.406.407.406.225 0 .406-.18.406-.406m1.85-.27h-.09c-.181-.046-.271-.046-.271-.136 0-.136.18-.136.316-.136.27 0 .496.09.586.09l.09-.496c-.09 0-.36-.09-.676-.09-.632 0-.993.226-.993.677 0 .316.225.496.722.586.225.046.36.046.36.136 0 .135-.135.135-.27.135-.316 0-.587-.09-.677-.135l-.135.496c.09.045.36.09.722.09.677 0 1.038-.225 1.038-.676 0-.226-.09-.452-.722-.542m1.58-1.13h-.678v2.302h.677V70.33h.361l.316-.542h-.632v-.451zM74.466 69.2v2.482h-.677v-.226l-.045.046s-.18.225-.542.225c-.541 0-.902-.406-.902-.993 0-.586.406-.992.947-.992.361 0 .497.18.497.18l.045.045v-.631zm-.632 1.49a.404.404 0 0 0-.406-.407.404.404 0 0 0-.406.406c0 .271.18.406.406.406.27.046.406-.135.406-.406M70.72 70.69c0 .722-.54.992-1.127.992-.497 0-1.083-.27-1.083-.993 0-.721.541-.992 1.128-.992.541 0 1.083.316 1.083.992m-.676.045c0-.271-.18-.406-.406-.406a.404.404 0 0 0-.406.406c0 .225.18.406.406.406.225 0 .406-.18.406-.406M72.028 70.33c.09 0 .18 0 .226.044v-.586h-.136c-.36 0-.496.225-.496.225l-.045.09v-.315H70.9v1.895h.677v-.903c0-.316.18-.45.451-.45M67.607 69.697c-.406 0-.541.225-.541.225l-.045.09v-.27h-.677v1.895h.677v-.948c0-.27.09-.36.316-.36.27 0 .27.225.27.45v.903h.677V70.51q0-.812-.677-.812\"/></g><defs><clipPath id=\"PEX-truck_svg__a\"><path fill=\"#fff\" d=\"M0 60C0 26.863 26.863 0 60 0s60 26.863 60 60-26.863 60-60 60S0 93.137 0 60\"/></clipPath></defs></svg>';\nexport const PEX_truck = illustration;\nexport const pEXTruck = illustration;\n","@import '../../../globals/main.scss';\n\npn-pex-pricefinder {\n}\n\n.pex-pricefinder-top {\n display: flex;\n align-items: center;\n pn-illustration {\n width: 5.5rem;\n height: 5.5rem;\n margin-right: 1.6rem;\n }\n}\n\n.pex-pricefinder-form {\n margin: 1.6rem 0 0 0;\n padding: 0;\n border: 0;\n fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n & + fieldset {\n margin-top: 1.6rem;\n }\n > div {\n display: flex;\n align-items: center;\n gap: 1em;\n > * {\n flex-grow: 1;\n width: 100%;\n }\n }\n }\n pn-button {\n align-self: end;\n margin-left: auto;\n }\n .datepicker {\n display: inline-flex;\n flex-direction: column;\n label {\n margin-bottom: 0.4rem;\n color: $gray700;\n font-size: 0.875em;\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n cursor: pointer;\n transition: color 0.2s;\n }\n pn-date-picker {\n width: 100%;\n }\n }\n}\n\n.pex-pricefinder-response {\n margin-top: 2.4rem;\n text-align: center;\n font-size: 2.4em;\n}\n","import { Component, h, Host, Element, Prop, State, Listen } from '@stencil/core';\nimport { translations } from './translations';\nimport { PexPriceFinderi18n, PexPriceFinderResponse } from './types';\nimport { PEX_truck } from 'pn-design-assets/pn-assets/illustrations.js';\n\n@Component({\n tag: 'pn-pex-pricefinder',\n styleUrl: 'pn-pex-pricefinder.scss',\n})\nexport class PnPexPricefinder {\n @Element() hostElement: HTMLElement;\n /** Specifies which language we want to show component in (sv,da,fi,no,en) */\n @Prop() language: string = 'sv';\n /** Currency (Kr, €)*/\n @Prop() currency: string = 'Kr';\n /** API Url */\n @Prop() apiUrl: string = '/api/pex/order';\n\n @State() i18n: PexPriceFinderi18n = translations.sv;\n\n @State() fromzip: number = null;\n @State() tozip: number = null;\n @State() weight: number = 1;\n\n @State() when: string = '';\n\n @State() response: PexPriceFinderResponse = null;\n\n componentWillLoad() {\n this.init();\n }\n\n async init() {\n this.setInitialTime();\n this.checkParameters();\n this.setLanguage();\n }\n\n setInitialTime() {\n const initialTime = new Date();\n initialTime.setHours(initialTime.getHours() + 1);\n initialTime.setMinutes(0);\n const splitTime = initialTime.toLocaleString('sv', { timeZoneName: 'short' }).split(' ');\n this.when = `${splitTime[0]}T${splitTime[1].substring(0, 5)}`;\n }\n\n checkParameters() {\n const params = new URLSearchParams(window.location.href);\n if (!params) {\n return;\n }\n const paramKeys = ['fromzip', 'tozip', 'weight', 'when'];\n paramKeys.forEach(key => {\n if (params.get(key)) {\n this[key] = params.get(key);\n }\n });\n }\n\n @Listen('language')\n setLanguage() {\n if (translations[this.language]) {\n this.i18n = translations[this.language] as PexPriceFinderi18n;\n }\n }\n\n onSubmit(e) {\n e.preventDefault();\n const formData = new FormData(e.target);\n const requestQuery = this.compileRequestQuery(formData);\n this.fetchResult(requestQuery);\n }\n\n compileRequestQuery(formData: FormData) {\n let query = {\n from: formData.get('fromzip'),\n to: formData.get('tozip'),\n weight: formData.get('weight'),\n when: formData.get('when'),\n };\n if (!query.when) {\n query.when = (this.hostElement.querySelector('input.date-input') as HTMLInputElement).value;\n }\n if (!formData.get('fromzip') || !formData.get('tozip') || !formData.get('weight')) {\n console.error('Form data is not compliant');\n return;\n }\n return query;\n }\n\n async fetchResult(query: any) {\n this.response = null;\n const params = new URLSearchParams(query);\n const req = await fetch(`${this.apiUrl}?${params.toString()}`, {\n method: 'get',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).catch(this.onFetchError.bind(this));\n let response = await req.json().catch(this.onFetchError.bind(this));\n if (!response) {\n response = await (await import('./mockresponse.json')).default;\n }\n if (response) {\n this.response = response as PexPriceFinderResponse;\n }\n }\n\n onFetchError(error) {\n console.error('onFetchError(error', error);\n }\n\n render() {\n return (\n <Host>\n <div class=\"pex-pricefinder-top\">\n <pn-illustration illustration={PEX_truck} />\n <h2>{this.i18n.heading}</h2>\n </div>\n <form method=\"get\" action=\"\" class=\"pex-pricefinder-form\" onSubmit={this.onSubmit.bind(this)}>\n <fieldset>\n <div>\n <pn-input type=\"number\" label={this.i18n.labelFrom} inputid=\"fromzip\" name=\"fromzip\" placeholder={this.i18n.zipPlaceholder} required value={this.fromzip}></pn-input>\n <pn-input type=\"number\" label={this.i18n.labelTo} inputid=\"tozip\" name=\"tozip\" placeholder={this.i18n.zipPlaceholder} required value={this.tozip}></pn-input>\n </div>\n </fieldset>\n <fieldset>\n <div>\n <pn-input\n type=\"number\"\n label={this.i18n.labelWeight}\n inputid=\"weight\"\n name=\"weight\"\n placeholder={this.i18n.weightPlaceholder}\n required\n value={this.weight}\n ></pn-input>\n <div class=\"datepicker\">\n <label htmlFor=\"when\">{this.i18n.labelWhen}</label>\n <pn-marketweb-input inputid=\"when\" name=\"when\" type=\"datetime-local\" min={new Date().toISOString().split('T')[0]} value={this.when}></pn-marketweb-input>\n </div>\n </div>\n </fieldset>\n <fieldset>\n <div>\n <pn-button type=\"submit\">{this.i18n.submitButtonText}</pn-button>\n </div>\n </fieldset>\n </form>\n {this.response ? (\n <div class=\"pex-pricefinder-response\">\n <strong>\n {this.response.data.value} {this.currency}\n </strong>\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"pn-pex-pricefinder.entry.js","mappings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AAI,CAAC,SAAS,CAAS,EACnD,2EAAoB,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,gBAAgB,EAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,IAAI,GAAuB,CACrJ,CACF,CACG,EACX,mEACE,8DACE,kEAAW,IAAI,EAAC,QAAQ,IAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAa,CAC7D,CACG,CACN,EACN,IAAI,CAAC,QAAQ,IACZ,WAAK,KAAK,EAAC,0BAA0B,IACnC,kBACG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,OAAG,IAAI,CAAC,QAAQ,CAClC,CACL,IACJ,IAAI,CACH,EACP;KACH;;;;;;","names":[],"sources":["src/components/widgets/pn-pex-pricefinder/translations.ts","node_modules/pn-design-assets/pn-assets/illustrations/PEX_truck.js","src/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.scss?tag=pn-pex-pricefinder","src/components/widgets/pn-pex-pricefinder/pn-pex-pricefinder.tsx"],"sourcesContent":["export const translations = {\n sv: {\n heading: 'Prisindikation med PEX Bud',\n labelFrom: 'Från postkod',\n labelTo: 'Till postkod',\n zipPlaceholder: 'Ex. 12831',\n labelWeight: 'Vikt (i kilo)',\n weightPlaceholder: 'Ex. 1000',\n labelWhen: 'När',\n submitButtonText: 'Beräkna pris',\n },\n en: {\n heading: 'Calculate price with PEX Bud',\n labelFrom: 'From zip',\n labelTo: 'To zip',\n zipPlaceholder: 'Ex. 12831',\n labelWeight: 'Weight (in kilo)',\n weightPlaceholder: 'Ex. 1000',\n labelWhen: 'When',\n submitButtonText: 'Calculate price',\n },\n};\n","const illustration = '<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 120 120\"><g clip-path=\"url(#PEX-truck_svg__a)\"><path fill=\"#8EDDF9\" d=\"M0 60C0 26.863 26.863 0 60 0s60 26.863 60 60-26.863 60-60 60S0 93.137 0 60\"/><path fill=\"#0D234B\" fill-rule=\"evenodd\" d=\"M-8 114.461c0-.311.253-.564.564-.564h278.872a.565.565 0 0 1 0 1.128H-7.436a.564.564 0 0 1-.564-.564\" clip-rule=\"evenodd\"/><path fill=\"#000\" d=\"M95.087 114.912c6.804 0 12.319-5.515 12.319-12.319s-5.515-12.32-12.319-12.32c-6.803 0-12.319 5.516-12.319 12.32s5.516 12.319 12.32 12.319\"/><path fill=\"#D3CECB\" d=\"M174.689 105.436H65.757V22h98.463c5.776 0 10.469 4.693 10.469 10.469z\"/><path fill=\"#F3F2F2\" d=\"M133.67 105.436H25.416V32.469C25.416 26.693 30.108 22 35.885 22h97.83v83.436z\"/><path fill=\"#2D2013\" d=\"M65.983 105.436H25.416V32.469C25.416 26.693 30.108 22 35.885 22h94.672z\"/><path fill=\"#000\" d=\"M233.486 106.429H21.264v-4.242a3.235 3.235 0 0 1 3.249-3.249h205.769a3.235 3.235 0 0 1 3.249 3.249v4.242z\"/><path fill=\"#5E554A\" fill-rule=\"evenodd\" d=\"M30.56 88.763h-5.144v-1.128h5.144c1.906 0 3.316 1.715 3.316 3.632 0 1.968-1.415 3.633-3.316 3.633h-5.144v-1.128h5.144c1.167 0 2.188-1.043 2.188-2.505 0-1.422-1.026-2.504-2.188-2.504\" clip-rule=\"evenodd\"/><path fill=\"#00A0D6\" d=\"M63.995 98.848 123.334 22h9.431L73.381 98.938z\"/><path fill=\"#A7A6A6\" d=\"m62.597 22 9.521.045 21.795 28.203-4.783 6.137zM97.706 67.486l4.647-6.092 28.925 37.454-9.295.09z\"/><path fill=\"#000\" d=\"M70.764 105.436H39.493v-3.43c0-8.618 6.994-15.658 15.658-15.658 8.619 0 15.658 6.995 15.658 15.658v3.43z\"/><path fill=\"#000\" d=\"M55.108 114.912c6.804 0 12.32-5.515 12.32-12.319s-5.516-12.32-12.32-12.32c-6.803 0-12.319 5.516-12.319 12.32s5.515 12.319 12.32 12.319\"/><path fill=\"#5E554A\" d=\"M55.017 107.647a5.054 5.054 0 1 0 0-10.108 5.054 5.054 0 0 0 0 10.108\"/><path fill=\"#fff\" d=\"M58.583 58.595h-6.498v1.354h6.498z\"/><path fill=\"#fff\" d=\"M49.466 52.144v14.71h11.19v-1.353H51V53.497h9.386v-1.353zM36.154 66.854v-14.71h5.912c3.52 0 5.234 1.398 5.234 4.286 0 2.979-1.715 4.468-5.234 4.468h-3.294v-1.354h3.294c2.617 0 3.79-.948 3.79-3.068 0-2.076-1.173-2.979-3.79-2.979h-4.378v13.357z\"/><path fill=\"#1798D5\" d=\"m61.877 66.854 11.551-14.71h1.805l-11.506 14.71z\"/><path fill=\"#fff\" d=\"m61.605 52.099 1.85.045 4.241 5.37-.902 1.173zM68.42 60.808l.902-1.128 5.64 7.175h-1.805zM60.522 70.735c0 .586-.406.993-.948.993-.36 0-.496-.18-.496-.18l-.045-.046v.722h-.677v-2.437h.677v.226l.045-.045s.18-.226.587-.226c.496-.045.857.361.857.993m-.722 0c0-.27-.18-.406-.406-.406a.404.404 0 0 0-.406.406c0 .225.18.406.406.406s.406-.18.406-.406m3.068-.045c0 .722-.541.992-1.128.992-.496 0-1.083-.27-1.083-.992s.542-.993 1.129-.993c.541 0 1.082.316 1.082.993m-.676.045c0-.27-.18-.406-.407-.406a.404.404 0 0 0-.406.406c0 .225.18.406.407.406.225 0 .406-.18.406-.406m1.85-.27h-.09c-.181-.046-.271-.046-.271-.136 0-.136.18-.136.316-.136.27 0 .496.09.586.09l.09-.496c-.09 0-.36-.09-.676-.09-.632 0-.993.226-.993.677 0 .316.225.496.722.586.225.046.36.046.36.136 0 .135-.135.135-.27.135-.316 0-.587-.09-.677-.135l-.135.496c.09.045.36.09.722.09.677 0 1.038-.225 1.038-.676 0-.226-.09-.452-.722-.542m1.58-1.13h-.678v2.302h.677V70.33h.361l.316-.542h-.632v-.451zM74.466 69.2v2.482h-.677v-.226l-.045.046s-.18.225-.542.225c-.541 0-.902-.406-.902-.993 0-.586.406-.992.947-.992.361 0 .497.18.497.18l.045.045v-.631zm-.632 1.49a.404.404 0 0 0-.406-.407.404.404 0 0 0-.406.406c0 .271.18.406.406.406.27.046.406-.135.406-.406M70.72 70.69c0 .722-.54.992-1.127.992-.497 0-1.083-.27-1.083-.993 0-.721.541-.992 1.128-.992.541 0 1.083.316 1.083.992m-.676.045c0-.271-.18-.406-.406-.406a.404.404 0 0 0-.406.406c0 .225.18.406.406.406.225 0 .406-.18.406-.406M72.028 70.33c.09 0 .18 0 .226.044v-.586h-.136c-.36 0-.496.225-.496.225l-.045.09v-.315H70.9v1.895h.677v-.903c0-.316.18-.45.451-.45M67.607 69.697c-.406 0-.541.225-.541.225l-.045.09v-.27h-.677v1.895h.677v-.948c0-.27.09-.36.316-.36.27 0 .27.225.27.45v.903h.677V70.51q0-.812-.677-.812\"/></g><defs><clipPath id=\"PEX-truck_svg__a\"><path fill=\"#fff\" d=\"M0 60C0 26.863 26.863 0 60 0s60 26.863 60 60-26.863 60-60 60S0 93.137 0 60\"/></clipPath></defs></svg>';\nexport const PEX_truck = illustration;\nexport const pEXTruck = illustration;\n","@import '../../../globals/main.scss';\n\npn-pex-pricefinder {\n}\n\n.pex-pricefinder-top {\n display: flex;\n align-items: center;\n pn-illustration {\n width: 5.5rem;\n height: 5.5rem;\n margin-right: 1.6rem;\n }\n}\n\n.pex-pricefinder-form {\n margin: 1.6rem 0 0 0;\n padding: 0;\n border: 0;\n fieldset {\n margin: 0;\n padding: 0;\n border: 0;\n & + fieldset {\n margin-top: 1.6rem;\n }\n > div {\n display: flex;\n align-items: center;\n gap: 1em;\n > * {\n flex-grow: 1;\n width: 100%;\n }\n }\n }\n pn-button {\n align-self: end;\n margin-left: auto;\n }\n .datepicker {\n display: inline-flex;\n flex-direction: column;\n label {\n margin-bottom: 0.4rem;\n color: $gray700;\n font-size: 0.875em;\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n cursor: pointer;\n transition: color 0.2s;\n }\n pn-date-picker {\n width: 100%;\n }\n }\n}\n\n.pex-pricefinder-response {\n margin-top: 2.4rem;\n text-align: center;\n font-size: 2.4em;\n}\n","import { Component, h, Host, Element, Prop, State, Listen } from '@stencil/core';\nimport { translations } from './translations';\nimport { PexPriceFinderi18n, PexPriceFinderResponse } from './types';\nimport { PEX_truck } from 'pn-design-assets/pn-assets/illustrations.js';\n\n@Component({\n tag: 'pn-pex-pricefinder',\n styleUrl: 'pn-pex-pricefinder.scss',\n})\nexport class PnPexPricefinder {\n @Element() hostElement: HTMLElement;\n /** Specifies which language we want to show component in (sv,da,fi,no,en) */\n @Prop() language: string = 'sv';\n /** Currency (Kr, €)*/\n @Prop() currency: string = 'Kr';\n /** API Url */\n @Prop() apiUrl: string = '/api/pex/order';\n\n @State() i18n: PexPriceFinderi18n = translations.sv;\n\n @State() fromzip: number = null;\n @State() tozip: number = null;\n @State() weight: number = 1;\n\n @State() when: string = '';\n\n @State() response: PexPriceFinderResponse = null;\n\n componentWillLoad() {\n this.init();\n }\n\n async init() {\n this.setInitialTime();\n this.checkParameters();\n this.setLanguage();\n }\n\n setInitialTime() {\n const initialTime = new Date();\n initialTime.setHours(initialTime.getHours() + 1);\n initialTime.setMinutes(0);\n const splitTime = initialTime.toLocaleString('sv', { timeZoneName: 'short' }).split(' ');\n this.when = `${splitTime[0]}T${splitTime[1].substring(0, 5)}`;\n }\n\n checkParameters() {\n const params = new URLSearchParams(window.location.href);\n if (!params) {\n return;\n }\n const paramKeys = ['fromzip', 'tozip', 'weight', 'when'];\n paramKeys.forEach(key => {\n if (params.get(key)) {\n this[key] = params.get(key);\n }\n });\n }\n\n @Listen('language')\n setLanguage() {\n if (translations[this.language]) {\n this.i18n = translations[this.language] as PexPriceFinderi18n;\n }\n }\n\n onSubmit(e) {\n e.preventDefault();\n const formData = new FormData(e.target);\n const requestQuery = this.compileRequestQuery(formData);\n this.fetchResult(requestQuery);\n }\n\n compileRequestQuery(formData: FormData) {\n let query = {\n from: formData.get('fromzip'),\n to: formData.get('tozip'),\n weight: formData.get('weight'),\n when: formData.get('when'),\n };\n if (!query.when) {\n query.when = (this.hostElement.querySelector('input.date-input') as HTMLInputElement).value;\n }\n if (!formData.get('fromzip') || !formData.get('tozip') || !formData.get('weight')) {\n console.error('Form data is not compliant');\n return;\n }\n return query;\n }\n\n async fetchResult(query: any) {\n this.response = null;\n const params = new URLSearchParams(query);\n const req = await fetch(`${this.apiUrl}?${params.toString()}`, {\n method: 'get',\n headers: {\n 'Content-Type': 'application/json',\n },\n }).catch(this.onFetchError.bind(this));\n let response = await req.json().catch(this.onFetchError.bind(this));\n if (!response) {\n response = await (await import('./mockresponse.json')).default;\n }\n if (response) {\n this.response = response as PexPriceFinderResponse;\n }\n }\n\n onFetchError(error) {\n console.error('onFetchError(error', error);\n }\n\n render() {\n return (\n <Host>\n <div class=\"pex-pricefinder-top\">\n <pn-illustration illustration={PEX_truck} />\n <h2>{this.i18n.heading}</h2>\n </div>\n <form method=\"get\" action=\"\" class=\"pex-pricefinder-form\" onSubmit={this.onSubmit.bind(this)}>\n <fieldset>\n <div>\n <pn-input type=\"number\" label={this.i18n.labelFrom} inputid=\"fromzip\" name=\"fromzip\" placeholder={this.i18n.zipPlaceholder} required value={this.fromzip}></pn-input>\n <pn-input type=\"number\" label={this.i18n.labelTo} inputid=\"tozip\" name=\"tozip\" placeholder={this.i18n.zipPlaceholder} required value={this.tozip}></pn-input>\n </div>\n </fieldset>\n <fieldset>\n <div>\n <pn-input\n type=\"number\"\n label={this.i18n.labelWeight}\n inputid=\"weight\"\n name=\"weight\"\n placeholder={this.i18n.weightPlaceholder}\n required\n value={this.weight}\n ></pn-input>\n <div class=\"datepicker\">\n <label htmlFor=\"when\">{this.i18n.labelWhen}</label>\n <pn-marketweb-input inputid=\"when\" name=\"when\" type=\"datetime-local\" min={new Date().toISOString().split('T')[0]} value={this.when}></pn-marketweb-input>\n </div>\n </div>\n </fieldset>\n <fieldset>\n <div>\n <pn-button type=\"submit\">{this.i18n.submitButtonText}</pn-button>\n </div>\n </fieldset>\n </form>\n {this.response ? (\n <div class=\"pex-pricefinder-response\">\n <strong>\n {this.response.data.value} {this.currency}\n </strong>\n </div>\n ) : null}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, d as Host
|
|
1
|
+
import { r as registerInstance, g as getElement, h, d as Host } from './index-fa51bde4.js';
|
|
2
2
|
import { v as v4 } from './v4-964634d6.js';
|
|
3
3
|
|
|
4
4
|
const pnPlayOnScrollCss = "pn-play-on-scroll pn-scroll [slot=scroll-affected]{position:relative;display:flex}pn-play-on-scroll pn-scroll [slot=scroll-affected] video{width:100%}pn-play-on-scroll pn-scroll [slot=scroll-affected] video:hover{cursor:pointer}";
|
|
@@ -27,22 +27,6 @@ const onNotIntersecting = (video, togglePaused) => {
|
|
|
27
27
|
const PnPlayOnScroll = class {
|
|
28
28
|
constructor(hostRef) {
|
|
29
29
|
registerInstance(this, hostRef);
|
|
30
|
-
this.testAdditionalParamIntoCallback = true;
|
|
31
|
-
this.handlePlayPauseClicked = () => {
|
|
32
|
-
if (this.video.paused || this.video.ended) {
|
|
33
|
-
this.video.play();
|
|
34
|
-
this.isManuallyPaused = false;
|
|
35
|
-
this.isPaused = false;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.video.pause();
|
|
39
|
-
this.isManuallyPaused = true;
|
|
40
|
-
this.isPaused = true;
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
this.togglePaused = (paused) => {
|
|
44
|
-
this.isPaused = paused;
|
|
45
|
-
};
|
|
46
30
|
this.videoSrc = '';
|
|
47
31
|
this.observerOptions = defaultObserverOptions;
|
|
48
32
|
this.showOverlay = false;
|
|
@@ -50,6 +34,10 @@ const PnPlayOnScroll = class {
|
|
|
50
34
|
this.isManuallyPaused = false;
|
|
51
35
|
this.isPaused = false;
|
|
52
36
|
}
|
|
37
|
+
get hostElement() { return getElement(this); }
|
|
38
|
+
localObserverOptions;
|
|
39
|
+
testAdditionalParamIntoCallback = true;
|
|
40
|
+
video;
|
|
53
41
|
generateUniqueId() {
|
|
54
42
|
return v4();
|
|
55
43
|
}
|
|
@@ -61,10 +49,24 @@ const PnPlayOnScroll = class {
|
|
|
61
49
|
this.video.addEventListener('click', this.handlePlayPauseClicked);
|
|
62
50
|
this.localObserverOptions = this.observerOptions;
|
|
63
51
|
}
|
|
52
|
+
handlePlayPauseClicked = () => {
|
|
53
|
+
if (this.video.paused || this.video.ended) {
|
|
54
|
+
this.video.play();
|
|
55
|
+
this.isManuallyPaused = false;
|
|
56
|
+
this.isPaused = false;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.video.pause();
|
|
60
|
+
this.isManuallyPaused = true;
|
|
61
|
+
this.isPaused = true;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
togglePaused = (paused) => {
|
|
65
|
+
this.isPaused = paused;
|
|
66
|
+
};
|
|
64
67
|
render() {
|
|
65
68
|
return (h(Host, { key: 'b76be7833abdd0c16b2b865e343a764fb5762466' }, h("pn-scroll", { key: 'c3dbb68e12611706fb4a3cbbbad84287ac3c2e73', intersectFunc: () => onIntersecting(this.video, this.isManuallyPaused, this.togglePaused), notIntersectFunc: () => onNotIntersecting(this.video, this.togglePaused), shouldLoop: true, behaviourClasses: 'some-behaviour-class', observerOptions: this.localObserverOptions }, h("div", { key: '461df9fcf966d409345e945117418eb35d58f540', slot: "scroll-affected" }, h("video", { key: '1b23bfb0e5f2ad71d1bbe0740bc7823784ff80c0', playsinline: true, muted: true, autoPlay: true, id: `${this.videoId}` }, h("source", { key: '8bf03c50ae3d3245acaae0beb3b7fc7ee048c0d8', src: this.videoSrc, type: "video/mp4" })), h("pn-video-overlay", { key: '21a69fa7ed440704f2e9aa5017f4616322fe9a4b', showOverlay: this.showOverlay, isPaused: this.isManuallyPaused || this.isPaused, onPlayPauseClicked: this.handlePlayPauseClicked })))));
|
|
66
69
|
}
|
|
67
|
-
get hostElement() { return getElement(this); }
|
|
68
70
|
};
|
|
69
71
|
PnPlayOnScroll.style = PnPlayOnScrollStyle0;
|
|
70
72
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pn-play-on-scroll.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,sOAAsO,CAAC;AACjQ,6BAAe,iBAAiB;;ACGhC;;;AAIA,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAE,cAAuB,EAAE,YAAoC;;IAE5G,IAAI,CAAC,cAAc,EAAE;QACnB,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACtB,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;AACH,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAuB,EAAE,YAAoC;;IAEtF,KAAK,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,YAAY,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;MAMW,cAAc;;;
|
|
1
|
+
{"file":"pn-play-on-scroll.entry.js","mappings":";;;AAAA,MAAM,iBAAiB,GAAG,sOAAsO,CAAC;AACjQ,6BAAe,iBAAiB;;ACGhC;;;AAIA,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAuB,EAAE,cAAuB,EAAE,YAAoC;;IAE5G,IAAI,CAAC,cAAc,EAAE;QACnB,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QACtB,YAAY,CAAC,KAAK,CAAC,CAAC;KACrB;AACH,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,C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E,MAAM,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,EACzF,gBAAgB,EAAE,MAAM,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,CAAC,EACxE,UAAU,EAAE,IAAI,EAChB,gBAAgB,EAAE,sBAAsB,EACxC,eAAe,EAAE,IAAI,CAAC,oBAAoB,IAE1C,4DAAK,IAAI,EAAC,iBAAiB,IACzB,8DAAO,WAAW,QAAC,KAAK,QAAC,QAAQ,QAAC,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,IACrD,+DAAQ,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,WAAW,GAAG,CACzC,EACR,yEAAkB,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,QAAQ,EAAE,kBAAkB,EAAE,IAAI,CAAC,sBAAsB,GAAqB,CACnK,CACI,CACP,EACP;KACH;;;;;;","names":["uuidv4"],"sources":["src/components/animation/pn-play-on-scroll/pn-play-on-scroll.scss?tag=pn-play-on-scroll","src/components/animation/pn-play-on-scroll/pn-play-on-scroll.tsx"],"sourcesContent":["pn-play-on-scroll {\n pn-scroll {\n [slot='scroll-affected'] {\n position: relative;\n display: flex;\n\n video {\n width: 100%;\n\n &:hover {\n cursor: pointer;\n }\n }\n }\n }\n}\n","import { v4 as uuidv4 } from 'uuid';\n\nimport { Component, Element, h, Host, Prop, State } from '@stencil/core';\n\n/*\n play content when scoll observer sees content as inview\n*/\n\nconst defaultObserverOptions: IntersectionObserverInit = {\n root: null,\n threshold: 1,\n rootMargin: '0px 0px 0px 0px',\n};\n\nconst onIntersecting = (video: HTMLVideoElement, isManualPaused: boolean, togglePaused: (arg: boolean) => void) => {\n //what to do when intersecting, eg video.play()\n if (!isManualPaused) {\n video && video.play();\n togglePaused(false);\n }\n};\n\nconst onNotIntersecting = (video: HTMLVideoElement, togglePaused: (arg: boolean) => void) => {\n //what to do when not intersecting, eg video.pause()\n video && video.pause();\n togglePaused(true);\n};\n\n@Component({\n tag: 'pn-play-on-scroll',\n styleUrl: 'pn-play-on-scroll.scss',\n})\nexport class PnPlayOnScroll {\n @Element() hostElement: HTMLElement;\n @Prop() videoSrc: string = '';\n @Prop() observerOptions: IntersectionObserverInit = defaultObserverOptions;\n @Prop() showOverlay: boolean = false;\n @State() videoId: string = '';\n @State() isManuallyPaused: boolean = false;\n @State() isPaused: boolean = false;\n localObserverOptions: IntersectionObserverInit;\n\n testAdditionalParamIntoCallback: boolean = true;\n video: HTMLVideoElement;\n\n generateUniqueId() {\n return uuidv4();\n }\n\n componentWillLoad() {\n this.videoId = this.generateUniqueId();\n }\n\n componentDidLoad() {\n this.video = document.getElementById(this.videoId) as HTMLVideoElement;\n this.video.addEventListener('click', this.handlePlayPauseClicked);\n this.localObserverOptions = this.observerOptions;\n }\n\n handlePlayPauseClicked = () => {\n if (this.video.paused || this.video.ended) {\n this.video.play();\n this.isManuallyPaused = false;\n this.isPaused = false;\n } else {\n this.video.pause();\n this.isManuallyPaused = true;\n this.isPaused = true;\n }\n };\n\n togglePaused = (paused: boolean) => {\n this.isPaused = paused;\n };\n\n render() {\n return (\n <Host>\n <pn-scroll\n intersectFunc={() => onIntersecting(this.video, this.isManuallyPaused, this.togglePaused)}\n notIntersectFunc={() => onNotIntersecting(this.video, this.togglePaused)}\n shouldLoop={true}\n behaviourClasses={'some-behaviour-class'}\n observerOptions={this.localObserverOptions}\n >\n <div slot=\"scroll-affected\">\n <video playsinline muted autoPlay id={`${this.videoId}`}>\n <source src={this.videoSrc} type=\"video/mp4\" />\n </video>\n <pn-video-overlay showOverlay={this.showOverlay} isPaused={this.isManuallyPaused || this.isPaused} onPlayPauseClicked={this.handlePlayPauseClicked}></pn-video-overlay>\n </div>\n </pn-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -126,8 +126,7 @@ const PnFindProductPricelist = class {
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
filterItems() {
|
|
129
|
-
|
|
130
|
-
if (!((_a = this.sourceData) === null || _a === void 0 ? void 0 : _a.data)) {
|
|
129
|
+
if (!this.sourceData?.data) {
|
|
131
130
|
console.info('Data has not yet been loaded');
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
@@ -187,7 +186,7 @@ const PnFindProductPricelist = class {
|
|
|
187
186
|
if (weights[this.postagetype.value].length > 6) {
|
|
188
187
|
labelText = weightindex % 5 === 0 || weightindex === 0 || weightindex === weights[this.postagetype.value].length - 1 ? weight.name : '';
|
|
189
188
|
}
|
|
190
|
-
return h("option",
|
|
189
|
+
return h("option", { value: weightindex, ...(labelText ? { label: labelText } : {}) });
|
|
191
190
|
})))))) : null, h("div", { key: '127647cb62f60930cce591e009f1c19132857407', class: "resultlist", "data-list-count": this.filteredItems.length }, this.filteredItems.map((item) => (h("div", null, h("pn-find-price-result", { item: item })))))));
|
|
192
191
|
}
|
|
193
192
|
static get watchers() { return {
|