@postnord/pn-marketweb-components 3.0.3 → 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 +39 -33
- 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 +39 -32
- 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 +39 -33
- 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 +40 -34
- 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-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-3ae1657a.entry.js +0 -2
- package/pn-market-web-components/p-3ae1657a.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-5ff663be.entry.js +0 -2
- package/pn-market-web-components/p-5ff663be.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-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-af16f7e3.entry.js +0 -2
- package/pn-market-web-components/p-af16f7e3.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-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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-dropdown-with-multi-input-rows-row.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAwB,MAAM,eAAe,CAAC;AAE7G,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAM5D,MAAM,OAAO,+BAA+B;;QAG1C,sBAAiB,GAAgB,IAAI,CAAC;QACtC,uBAAkB,GAAgB,IAAI,CAAC;QACvC,iBAAY,GAAgB,IAAI,CAAC;QACjC,sBAAiB,GAAgB,IAAI,CAAC;4BAEP,IAAI;qCAC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,SAAS,CAAC,CAAC,CAAC,IAAI,GACrC,CACd;gBAEL,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CACnC,WAAK,KAAK,EAAC,yBAAyB;oBAClC,iBACE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,EAAiB,CAAC,EACvD,KAAK,EAAC,MAAM,EACZ,IAAI,EAAE,KAAK,EACX,UAAU,EAAC,SAAS,EACpB,KAAK,EAAE,IAAI,CAAC,QAAQ,EACpB,OAAO,EAAE,GAAG,EAAE;4BACZ,IAAI,CAAC,SAAS,EAAE,CAAC;wBACnB,CAAC,aAGS,CACR,CACP,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { FormValue, RowValue, Root, PredefinedValues } from './types';\nimport debounce from 'debounce';\nimport { minus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-with-multi-input-rows-row',\n styleUrl: 'pn-dropdown-with-multi-input-rows-row.scss',\n})\nexport class PnDropdownWithMultiInputRowsRow {\n @Element() hostElement: Element;\n private _predefinedValue: PredefinedValues;\n pnFirstInputField: HTMLElement = null;\n pnSecondInputField: HTMLElement = null;\n pnDatePicker: HTMLElement = null;\n pnDeleteRowButton: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() fristInputPlaceholder: string = null;\n @Prop() firstInputMin: number = null;\n @Prop() firstInputMax: number = null;\n @Prop() firstInputWarning: number = null;\n @Prop() firstInputWarningText: string = null;\n @Prop() firstInputLowErrorText: string = null;\n @Prop() firstInputHighErrorText: string = null;\n @Prop() secondInputPlaceholder: string = null;\n @Prop() secondInputMin: number = null;\n @Prop() secondInputMax: number = null;\n @Prop() secondInputWarning: number = null;\n @Prop() secondInputWarningText: string = null;\n @Prop() secondInputLowErrorText: string = null;\n @Prop() secondInputHighErrorText: string = null;\n @Prop() dateLabel: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() firstValidDate: string = null;\n @Prop() lastValidDate: string = null;\n @Prop() predefinedValue: string = null;\n @Prop() rowIndex: number = null;\n @Prop() minRowCount: number = null;\n\n @State() showFirstInputWarning: boolean = false;\n @State() showFirstInputLowError: boolean = false;\n @State() showFirstInputHighError: boolean = false;\n @State() showSecondInputWarning: boolean = false;\n @State() showSecondInputLowError: boolean = false;\n @State() showSecondInputHighError: boolean = false;\n\n @State() firstInputValue: string = '';\n @State() secondInputValue: string = '';\n @State() dateValue: string = '';\n\n @Event() rowValueChange: EventEmitter<PredefinedValues>;\n @Event() deleteRowEvent: EventEmitter<string>;\n @Event() firstInputChange: EventEmitter<PredefinedValues>;\n @Event() secondInputChange: EventEmitter<PredefinedValues>;\n\n componentWillLoad() {\n this.getPredefinedValues();\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.addEventHandlers();\n }\n\n getPredefinedValues() {\n this._predefinedValue = JSON.parse(this.predefinedValue);\n }\n\n @Watch('predefinedValue')\n applyPredefinedValue() {\n this.getPredefinedValues();\n this.setInitialValues();\n\n if (this.firstInputValue?.length) {\n this.validateFirstInput(parseInt(this.firstInputValue));\n }\n\n if (this.secondInputValue?.length) {\n this.validateSecondInput(parseInt(this.secondInputValue));\n }\n\n if (this.rowIndex >= this.minRowCount) {\n this.pnDeleteRowButton.addEventListener('click', this.deleteRow.bind(this));\n }\n }\n\n setInitialValues() {\n this.firstInputValue = this._predefinedValue.firstInput;\n this.secondInputValue = this._predefinedValue.secondInput;\n this.dateValue = this._predefinedValue.date;\n }\n\n addEventHandlers() {\n const emmitValues = debounce(this.emitRowValues.bind(this), 500);\n this.pnFirstInputField.addEventListener('keyup', debounce(this.handleFirstInput.bind(this), 500));\n this.pnSecondInputField.addEventListener('keyup', debounce(this.handleSecondInput.bind(this), 500));\n this.pnDatePicker.addEventListener('dateselection', this.handleDateChange.bind(this));\n this.pnDatePicker.addEventListener('dateselection', emmitValues);\n }\n\n handleFirstInput(e) {\n const elm = e.target;\n const value = parseInt(elm.value);\n\n if (value > 0) {\n this.firstInputValue = elm.value;\n this.firstInputChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n this.validateFirstInput(value);\n this.emitRowValues();\n }\n\n handleSecondInput(e) {\n const elm = e.target;\n const value = parseInt(elm.value);\n\n if (value > 0) {\n this.secondInputValue = elm.value;\n this.secondInputChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n this.validateSecondInput(value);\n this.emitRowValues();\n }\n\n validateFirstInput(input: number) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = false;\n this.showFirstInputHighError = false;\n\n if (input < this.firstInputWarning) {\n this.showFirstInputWarning = true;\n }\n\n if (input < this.firstInputMin) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = true;\n }\n\n if (input > this.firstInputMax) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = false;\n this.showFirstInputHighError = true;\n }\n }\n\n validateSecondInput(input: number) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = false;\n this.showSecondInputHighError = false;\n\n if (input < this.secondInputWarning) {\n this.showSecondInputWarning = true;\n }\n\n if (input < this.secondInputMin) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = true;\n }\n\n if (input > this.secondInputMax) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = false;\n this.showSecondInputHighError = true;\n }\n }\n\n handleDateChange(e) {\n const elm = e.target;\n if (elm === this.pnDatePicker) {\n this.dateValue = e.detail;\n }\n }\n\n emitRowValues() {\n this.rowValueChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n deleteRow() {\n this.deleteRowEvent.emit(this._predefinedValue.id);\n }\n\n render() {\n return (\n <Host>\n <div class=\"input-element-row\">\n <div class=\"input-container\">\n <pn-marketweb-input\n ref={el => (this.pnFirstInputField = el as HTMLElement)}\n type=\"number\"\n placeholder={this.fristInputPlaceholder}\n value={this.firstInputValue}\n min=\"1\"\n ></pn-marketweb-input>\n {this.showFirstInputLowError || this.showFirstInputHighError || this.showFirstInputWarning ? (\n <div class=\"input-element-message-container\">\n {this.showFirstInputLowError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.firstInputLowErrorText}</small>\n </div>\n ) : null}\n\n {this.showFirstInputHighError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.firstInputHighErrorText}</small>\n </div>\n ) : null}\n\n {this.showFirstInputWarning ? (\n <div class=\"input-element-message-container__warning\">\n <small>{this.firstInputWarningText}</small>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n\n <div class=\"input-container\">\n <pn-marketweb-input\n ref={el => (this.pnSecondInputField = el as HTMLElement)}\n type=\"number\"\n placeholder={this.secondInputPlaceholder}\n value={this.secondInputValue}\n min=\"1\"\n ></pn-marketweb-input>\n {this.showSecondInputLowError || this.showSecondInputHighError || this.showSecondInputWarning ? (\n <div class=\"input-element-message-container\">\n {this.showSecondInputLowError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.secondInputLowErrorText}</small>\n </div>\n ) : null}\n\n {this.showSecondInputHighError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.secondInputHighErrorText}</small>\n </div>\n ) : null}\n\n {this.showSecondInputWarning ? (\n <div class=\"input-element-message-container__warning\">\n <small>{this.secondInputWarningText}</small>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n\n <div class=\"input-container\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={true}\n min-date={this.firstValidDate}\n max-date={this.lastValidDate}\n language={this.languageCode}\n placeholder={this.datePlaceholder}\n start={this.dateValue?.length ? this.dateValue : null}\n ></pn-date-picker>\n </div>\n\n {this.rowIndex >= this.minRowCount ? (\n <div class=\"delete-button-contianer\">\n <pn-button\n ref={el => (this.pnDeleteRowButton = el as HTMLElement)}\n small=\"true\"\n icon={minus}\n appearance=\"warning\"\n index={this.rowIndex}\n onClick={() => {\n this.deleteRow();\n }}\n >\n Delete\n </pn-button>\n </div>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pn-dropdown-with-multi-input-rows-row.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAwB,MAAM,eAAe,CAAC;AAE7G,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAM5D,MAAM,O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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { FormValue, RowValue, Root, PredefinedValues } from './types';\nimport debounce from 'debounce';\nimport { minus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-with-multi-input-rows-row',\n styleUrl: 'pn-dropdown-with-multi-input-rows-row.scss',\n})\nexport class PnDropdownWithMultiInputRowsRow {\n @Element() hostElement: Element;\n private _predefinedValue: PredefinedValues;\n pnFirstInputField: HTMLElement = null;\n pnSecondInputField: HTMLElement = null;\n pnDatePicker: HTMLElement = null;\n pnDeleteRowButton: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() fristInputPlaceholder: string = null;\n @Prop() firstInputMin: number = null;\n @Prop() firstInputMax: number = null;\n @Prop() firstInputWarning: number = null;\n @Prop() firstInputWarningText: string = null;\n @Prop() firstInputLowErrorText: string = null;\n @Prop() firstInputHighErrorText: string = null;\n @Prop() secondInputPlaceholder: string = null;\n @Prop() secondInputMin: number = null;\n @Prop() secondInputMax: number = null;\n @Prop() secondInputWarning: number = null;\n @Prop() secondInputWarningText: string = null;\n @Prop() secondInputLowErrorText: string = null;\n @Prop() secondInputHighErrorText: string = null;\n @Prop() dateLabel: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() firstValidDate: string = null;\n @Prop() lastValidDate: string = null;\n @Prop() predefinedValue: string = null;\n @Prop() rowIndex: number = null;\n @Prop() minRowCount: number = null;\n\n @State() showFirstInputWarning: boolean = false;\n @State() showFirstInputLowError: boolean = false;\n @State() showFirstInputHighError: boolean = false;\n @State() showSecondInputWarning: boolean = false;\n @State() showSecondInputLowError: boolean = false;\n @State() showSecondInputHighError: boolean = false;\n\n @State() firstInputValue: string = '';\n @State() secondInputValue: string = '';\n @State() dateValue: string = '';\n\n @Event() rowValueChange: EventEmitter<PredefinedValues>;\n @Event() deleteRowEvent: EventEmitter<string>;\n @Event() firstInputChange: EventEmitter<PredefinedValues>;\n @Event() secondInputChange: EventEmitter<PredefinedValues>;\n\n componentWillLoad() {\n this.getPredefinedValues();\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.addEventHandlers();\n }\n\n getPredefinedValues() {\n this._predefinedValue = JSON.parse(this.predefinedValue);\n }\n\n @Watch('predefinedValue')\n applyPredefinedValue() {\n this.getPredefinedValues();\n this.setInitialValues();\n\n if (this.firstInputValue?.length) {\n this.validateFirstInput(parseInt(this.firstInputValue));\n }\n\n if (this.secondInputValue?.length) {\n this.validateSecondInput(parseInt(this.secondInputValue));\n }\n\n if (this.rowIndex >= this.minRowCount) {\n this.pnDeleteRowButton.addEventListener('click', this.deleteRow.bind(this));\n }\n }\n\n setInitialValues() {\n this.firstInputValue = this._predefinedValue.firstInput;\n this.secondInputValue = this._predefinedValue.secondInput;\n this.dateValue = this._predefinedValue.date;\n }\n\n addEventHandlers() {\n const emmitValues = debounce(this.emitRowValues.bind(this), 500);\n this.pnFirstInputField.addEventListener('keyup', debounce(this.handleFirstInput.bind(this), 500));\n this.pnSecondInputField.addEventListener('keyup', debounce(this.handleSecondInput.bind(this), 500));\n this.pnDatePicker.addEventListener('dateselection', this.handleDateChange.bind(this));\n this.pnDatePicker.addEventListener('dateselection', emmitValues);\n }\n\n handleFirstInput(e) {\n const elm = e.target;\n const value = parseInt(elm.value);\n\n if (value > 0) {\n this.firstInputValue = elm.value;\n this.firstInputChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n this.validateFirstInput(value);\n this.emitRowValues();\n }\n\n handleSecondInput(e) {\n const elm = e.target;\n const value = parseInt(elm.value);\n\n if (value > 0) {\n this.secondInputValue = elm.value;\n this.secondInputChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n this.validateSecondInput(value);\n this.emitRowValues();\n }\n\n validateFirstInput(input: number) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = false;\n this.showFirstInputHighError = false;\n\n if (input < this.firstInputWarning) {\n this.showFirstInputWarning = true;\n }\n\n if (input < this.firstInputMin) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = true;\n }\n\n if (input > this.firstInputMax) {\n this.showFirstInputWarning = false;\n this.showFirstInputLowError = false;\n this.showFirstInputHighError = true;\n }\n }\n\n validateSecondInput(input: number) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = false;\n this.showSecondInputHighError = false;\n\n if (input < this.secondInputWarning) {\n this.showSecondInputWarning = true;\n }\n\n if (input < this.secondInputMin) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = true;\n }\n\n if (input > this.secondInputMax) {\n this.showSecondInputWarning = false;\n this.showSecondInputLowError = false;\n this.showSecondInputHighError = true;\n }\n }\n\n handleDateChange(e) {\n const elm = e.target;\n if (elm === this.pnDatePicker) {\n this.dateValue = e.detail;\n }\n }\n\n emitRowValues() {\n this.rowValueChange.emit({\n id: this._predefinedValue.id,\n firstInput: this.firstInputValue,\n secondInput: this.secondInputValue,\n date: this.dateValue,\n });\n }\n\n deleteRow() {\n this.deleteRowEvent.emit(this._predefinedValue.id);\n }\n\n render() {\n return (\n <Host>\n <div class=\"input-element-row\">\n <div class=\"input-container\">\n <pn-marketweb-input\n ref={el => (this.pnFirstInputField = el as HTMLElement)}\n type=\"number\"\n placeholder={this.fristInputPlaceholder}\n value={this.firstInputValue}\n min=\"1\"\n ></pn-marketweb-input>\n {this.showFirstInputLowError || this.showFirstInputHighError || this.showFirstInputWarning ? (\n <div class=\"input-element-message-container\">\n {this.showFirstInputLowError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.firstInputLowErrorText}</small>\n </div>\n ) : null}\n\n {this.showFirstInputHighError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.firstInputHighErrorText}</small>\n </div>\n ) : null}\n\n {this.showFirstInputWarning ? (\n <div class=\"input-element-message-container__warning\">\n <small>{this.firstInputWarningText}</small>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n\n <div class=\"input-container\">\n <pn-marketweb-input\n ref={el => (this.pnSecondInputField = el as HTMLElement)}\n type=\"number\"\n placeholder={this.secondInputPlaceholder}\n value={this.secondInputValue}\n min=\"1\"\n ></pn-marketweb-input>\n {this.showSecondInputLowError || this.showSecondInputHighError || this.showSecondInputWarning ? (\n <div class=\"input-element-message-container\">\n {this.showSecondInputLowError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.secondInputLowErrorText}</small>\n </div>\n ) : null}\n\n {this.showSecondInputHighError ? (\n <div class=\"input-element-message-container__error\">\n <small>{this.secondInputHighErrorText}</small>\n </div>\n ) : null}\n\n {this.showSecondInputWarning ? (\n <div class=\"input-element-message-container__warning\">\n <small>{this.secondInputWarningText}</small>\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n\n <div class=\"input-container\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={true}\n min-date={this.firstValidDate}\n max-date={this.lastValidDate}\n language={this.languageCode}\n placeholder={this.datePlaceholder}\n start={this.dateValue?.length ? this.dateValue : null}\n ></pn-date-picker>\n </div>\n\n {this.rowIndex >= this.minRowCount ? (\n <div class=\"delete-button-contianer\">\n <pn-button\n ref={el => (this.pnDeleteRowButton = el as HTMLElement)}\n small=\"true\"\n icon={minus}\n appearance=\"warning\"\n index={this.rowIndex}\n onClick={() => {\n this.deleteRow();\n }}\n >\n Delete\n </pn-button>\n </div>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,19 +4,6 @@ import debounce from "debounce";
|
|
|
4
4
|
import { plus } from "pn-design-assets/pn-assets/icons.js";
|
|
5
5
|
export class PnDropdownWithMultiInputRows {
|
|
6
6
|
constructor() {
|
|
7
|
-
this.pnFirstDropdown = null;
|
|
8
|
-
this.pnSecondDropdown = null;
|
|
9
|
-
this.pnSumField = null;
|
|
10
|
-
this.pnConfirmDeleteButton = null;
|
|
11
|
-
this.pnAbortDeleteButton = null;
|
|
12
|
-
this._firstDropdownSelection = null;
|
|
13
|
-
this._secondDropdownSelection = null;
|
|
14
|
-
this._defaultRow = {
|
|
15
|
-
id: this.generateUniqueId(),
|
|
16
|
-
firstInput: '',
|
|
17
|
-
secondInput: this.secondInputWarning.toString(),
|
|
18
|
-
date: '',
|
|
19
|
-
};
|
|
20
7
|
this.dropdownData = null;
|
|
21
8
|
this.languageCode = null;
|
|
22
9
|
this.firstDropdownLabel = null;
|
|
@@ -61,6 +48,21 @@ export class PnDropdownWithMultiInputRows {
|
|
|
61
48
|
this.minRowCount = null;
|
|
62
49
|
this.showDelteConfirm = false;
|
|
63
50
|
}
|
|
51
|
+
hostElement;
|
|
52
|
+
pnFirstDropdown = null;
|
|
53
|
+
pnSecondDropdown = null;
|
|
54
|
+
pnSumField = null;
|
|
55
|
+
pnConfirmDeleteButton = null;
|
|
56
|
+
pnAbortDeleteButton = null;
|
|
57
|
+
allFormValues;
|
|
58
|
+
_firstDropdownSelection = null;
|
|
59
|
+
_secondDropdownSelection = null;
|
|
60
|
+
_defaultRow = {
|
|
61
|
+
id: this.generateUniqueId(),
|
|
62
|
+
firstInput: '',
|
|
63
|
+
secondInput: this.secondInputWarning.toString(),
|
|
64
|
+
date: '',
|
|
65
|
+
};
|
|
64
66
|
componentWillLoad() {
|
|
65
67
|
this.formValues = [];
|
|
66
68
|
this.setDropDownData();
|
|
@@ -72,14 +74,13 @@ export class PnDropdownWithMultiInputRows {
|
|
|
72
74
|
this.updateSum();
|
|
73
75
|
}
|
|
74
76
|
setDropDownData() {
|
|
75
|
-
var _a;
|
|
76
77
|
if (typeof this.dropdownData === 'string') {
|
|
77
78
|
this.dropdownDataRoot = JSON.parse(this.dropdownData);
|
|
78
79
|
}
|
|
79
80
|
else {
|
|
80
81
|
this.dropdownDataRoot = this.dropdownData;
|
|
81
82
|
}
|
|
82
|
-
if (
|
|
83
|
+
if (this.dropdownDataRoot?.length) {
|
|
83
84
|
this.dropdownDataRoot.forEach(element => {
|
|
84
85
|
if (!element.value) {
|
|
85
86
|
element.value = 0;
|
|
@@ -124,10 +125,9 @@ export class PnDropdownWithMultiInputRows {
|
|
|
124
125
|
return uuidv4();
|
|
125
126
|
}
|
|
126
127
|
setFirstValidDate() {
|
|
127
|
-
var _a;
|
|
128
128
|
const yearsToadd = this.yearsToAddToEndDate ? this.yearsToAddToEndDate : 2;
|
|
129
129
|
const date = new Date();
|
|
130
|
-
date.setDate(
|
|
130
|
+
date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);
|
|
131
131
|
const year = date.getFullYear();
|
|
132
132
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
133
133
|
const day = date.getDate().toString().padStart(2, '0');
|
|
@@ -148,8 +148,8 @@ export class PnDropdownWithMultiInputRows {
|
|
|
148
148
|
}
|
|
149
149
|
handleFirstDropdown() {
|
|
150
150
|
const selected = this.pnFirstDropdown.querySelector('[aria-selected=true]');
|
|
151
|
-
const selectedValue = selected
|
|
152
|
-
if (!
|
|
151
|
+
const selectedValue = selected?.textContent;
|
|
152
|
+
if (!selectedValue?.length) {
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
this.dropdownDataRoot.forEach(element => {
|
|
@@ -171,8 +171,8 @@ export class PnDropdownWithMultiInputRows {
|
|
|
171
171
|
}
|
|
172
172
|
handleSecondDropdown() {
|
|
173
173
|
const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');
|
|
174
|
-
const selectedValue = selected
|
|
175
|
-
if (!
|
|
174
|
+
const selectedValue = selected?.textContent;
|
|
175
|
+
if (!selectedValue?.length) {
|
|
176
176
|
return;
|
|
177
177
|
}
|
|
178
178
|
const value = parseInt(selectedValue);
|
|
@@ -190,7 +190,12 @@ export class PnDropdownWithMultiInputRows {
|
|
|
190
190
|
predefinedValueChange(e) {
|
|
191
191
|
const indexToUpdate = this.rowData.findIndex(data => data.id === e.detail.id);
|
|
192
192
|
const val = e.detail;
|
|
193
|
-
this.rowData[indexToUpdate] =
|
|
193
|
+
this.rowData[indexToUpdate] = {
|
|
194
|
+
...this.rowData[indexToUpdate],
|
|
195
|
+
firstInput: val.firstInput,
|
|
196
|
+
secondInput: val.secondInput,
|
|
197
|
+
date: val.date,
|
|
198
|
+
};
|
|
194
199
|
if (e.type === 'firstInputChange' && indexToUpdate === 0) {
|
|
195
200
|
this.updateFirstInputOfRows(val.firstInput);
|
|
196
201
|
}
|
|
@@ -203,12 +208,18 @@ export class PnDropdownWithMultiInputRows {
|
|
|
203
208
|
}
|
|
204
209
|
updateFirstInputOfRows(value) {
|
|
205
210
|
for (let index = 1; index < this.rowCount; index++) {
|
|
206
|
-
this.rowData[index] =
|
|
211
|
+
this.rowData[index] = {
|
|
212
|
+
...this.rowData[index],
|
|
213
|
+
firstInput: value,
|
|
214
|
+
};
|
|
207
215
|
}
|
|
208
216
|
}
|
|
209
217
|
updateSecondInputOfRows(value) {
|
|
210
218
|
for (let index = 1; index < this.rowCount; index++) {
|
|
211
|
-
this.rowData[index] =
|
|
219
|
+
this.rowData[index] = {
|
|
220
|
+
...this.rowData[index],
|
|
221
|
+
secondInput: value,
|
|
222
|
+
};
|
|
212
223
|
}
|
|
213
224
|
}
|
|
214
225
|
deleteRowEvent(e) {
|
|
@@ -228,8 +239,7 @@ export class PnDropdownWithMultiInputRows {
|
|
|
228
239
|
this.rowSum = '';
|
|
229
240
|
let sum = 0;
|
|
230
241
|
this.rowData.forEach(element => {
|
|
231
|
-
|
|
232
|
-
if ((_a = element === null || element === void 0 ? void 0 : element.firstInput) === null || _a === void 0 ? void 0 : _a.length) {
|
|
242
|
+
if (element?.firstInput?.length) {
|
|
233
243
|
sum += parseInt(element.firstInput);
|
|
234
244
|
}
|
|
235
245
|
});
|
|
@@ -237,8 +247,8 @@ export class PnDropdownWithMultiInputRows {
|
|
|
237
247
|
}
|
|
238
248
|
deleteExcessRows() {
|
|
239
249
|
const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');
|
|
240
|
-
const selectedValue = selected
|
|
241
|
-
if (!
|
|
250
|
+
const selectedValue = selected?.textContent;
|
|
251
|
+
if (!selectedValue?.length) {
|
|
242
252
|
return;
|
|
243
253
|
}
|
|
244
254
|
const rowsToDelete = this.rowCount - parseInt(selectedValue);
|
|
@@ -255,21 +265,20 @@ export class PnDropdownWithMultiInputRows {
|
|
|
255
265
|
emitValuesIfValid() {
|
|
256
266
|
this.formValues = [];
|
|
257
267
|
this.rowData.forEach(item => {
|
|
258
|
-
var _a, _b, _c, _d;
|
|
259
268
|
const rowValue = { row: [] };
|
|
260
|
-
if (
|
|
269
|
+
if (this._firstDropdownSelection?.length) {
|
|
261
270
|
const dropDownValue = { name: this.firstDropdownLabel, value: this._firstDropdownSelection };
|
|
262
271
|
rowValue.row.push(dropDownValue);
|
|
263
272
|
}
|
|
264
|
-
if (
|
|
273
|
+
if (item.firstInput?.length) {
|
|
265
274
|
const firstInputValue = { name: this.fristInputLabel, value: item.firstInput };
|
|
266
275
|
rowValue.row.push(firstInputValue);
|
|
267
276
|
}
|
|
268
|
-
if (
|
|
277
|
+
if (item.secondInput?.length) {
|
|
269
278
|
const secondInputValue = { name: this.secondInputLabel, value: item.secondInput };
|
|
270
279
|
rowValue.row.push(secondInputValue);
|
|
271
280
|
}
|
|
272
|
-
if (
|
|
281
|
+
if (item.date?.length) {
|
|
273
282
|
const dateValue = { name: this.dateLabel, value: item.date };
|
|
274
283
|
rowValue.row.push(dateValue);
|
|
275
284
|
}
|
|
@@ -286,13 +295,11 @@ export class PnDropdownWithMultiInputRows {
|
|
|
286
295
|
}
|
|
287
296
|
}
|
|
288
297
|
render() {
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return (h("div", { class: 'dropdown-with-multi-input-elemet__row generated-row-' + i, id: 'generated-row-' + i }, h("pn-dropdown-with-multi-input-rows-row", { "language-code": this.languageCode, "frist-input-placeholder": this.fristInputPlaceholder, "first-input-min": this.firstInputMin, "first-input-max": this.firstInputMax, "first-input-warning": this.firstInputWarning, "first-input-warning-text": this.firstInputWarningText, "first-input-low-error-text": this.firstInputLowErrorText, "first-input-high-error-text": this.firstInputHighErrorText, "second-input-placeholder": this.secondInputPlaceholder, "second-input-min": this.secondInputMin, "second-input-max": this.secondInputMax, "second-input-warning": this.secondInputWarning, "second-input-warning-text": this.secondInputWarningText, "second-input-low-error-text": this.secondInputLowErrorText, "second-input-high-error-text": this.secondInputHighErrorText, datePlaceholder: this.datePlaceholder, firstValidDate: this.firstValidDateString, lastValidDate: this.lastValidDateString, "predefined-value": JSON.stringify(data), "min-row-count": this.minRowCount, "row-index": i })));
|
|
293
|
-
}), h("div", { key: 'f82a77eb8e120440084210f5cdec604a5dd05172', class: "dropdown-with-multi-input-elemet__row sum-row" }, h("pn-marketweb-input", { key: '8197ba89d43c00fa04bd81c33a5e36dbca40b255', disabled: true, ref: el => (this.pnSumField = el), type: "number", value: this.rowSum, label: this.sumFieldLabel }), h("pn-button", { key: '6c11671b82b65dbf541d2b85c5dc79f437a62d67', tooltip: this.addRowText ? this.addRowText : null, "left-icon": "true", arialabel: "Add", icon: plus, appearance: "light", variant: "borderless", class: "connected-dropdown__button-right", onClick: () => {
|
|
298
|
+
return (h(Host, { key: 'db917d14641b4a13e6ed4d3a56f4b9ea52a8e0c1', class: "dropdown-with-multi-input-elemet" }, h("div", { key: 'bdc73044cdb1e6a791b9965086971ecbb796719d', class: "dropdown-with-multi-input-elemet__row" }, h("div", { key: 'b605ca3179d5884577c78abddf1b9a572a78b927' }, h("pn-select", { key: '285e9e9af4ed230b3f854b565ff7e56ef0b6dafe', ref: el => (this.pnFirstDropdown = el), class: "pn-row-select-dropdown dropDown1-dropdown", label: this.firstDropdownLabel, "empty-option": "true", language: this.languageCode }, this.dropdownDataRoot?.map((item, i) => (h("pn-option", { index: i, label: item.value, value: item.value, selected: item.checked, onClick: debounce(this.handleFirstDropdown.bind(this), 500) })))), this.firstDropdownHelperText?.length ? h("small", null, this.firstDropdownHelperText) : null)), h("div", { key: '5f3e0a81ac3d2588d5ed1f00626459f24c0ef935', class: "dropdown-with-multi-input-elemet__row" }, h("div", { key: 'f6294437827f047a391ff6d9270108510030aba7' }, h("pn-select", { key: '145d9f5a698a03ff3334752446f0b5d6d4d7f7b9', ref: el => (this.pnSecondDropdown = el), class: "pn-row-select-dropdown dropDown2-dropdown", label: this.secondDropdownLabel, "empty-option": "true", language: this.languageCode }, this.secondDropdownArr?.map((item, i) => (h("pn-option", { index: i, label: item, value: item, selected: item === this._secondDropdownSelection, onClick: debounce(this.handleSecondDropdown.bind(this), 500) })))), this.secondDropdownHelperText?.length ? h("small", null, this.secondDropdownHelperText) : null)), this.showDelteConfirm ? (h("div", { class: "dropdown-with-multi-input-elemet__delete" }, h("p", null, this.deleteMultipleRowsWarningText), h("pn-button", { ref: el => (this.pnConfirmDeleteButton = el), small: "true", appearance: "warning", onClick: this.deleteExcessRows.bind(this) }, this.confirmDeleteButtonText), h("pn-button", { ref: el => (this.pnAbortDeleteButton = el), small: "true", appearance: "light", onClick: this.abortDeleteRows.bind(this) }, this.abortDeleteButtonText))) : null, h("div", { key: '47bf41463c9cc5610af5b0b55b359fa999f5e310', class: "dropdown-with-multi-input-elemet__label-row" }, h("div", { key: '042ca6ea6e592855d2bad4a0c4b5805b7558615f', class: "dropdown-with-multi-input-elemet__label" }, h("label", { key: 'c83575c3261780ae981bcc4a258a1a32e929e22a' }, this.fristInputLabel)), h("div", { key: '08cb056b391c65a347f35b813c12b8b79c46376d', class: "dropdown-with-multi-input-elemet__label" }, h("label", { key: '595f9d11e057363dbe21ed9bcdee704554d5b989' }, this.secondInputLabel)), h("div", { key: 'd41c98201f1c3c8d758e9ee89517b56a15c968ad', class: "dropdown-with-multi-input-elemet__label" }, h("label", { key: '9bab0729cad8b23b599bcafd3e71659bdb7b23ed' }, this.dateLabel))), this.rowData?.map((data, i) => {
|
|
299
|
+
return (h("div", { class: 'dropdown-with-multi-input-elemet__row generated-row-' + i, id: 'generated-row-' + i }, h("pn-dropdown-with-multi-input-rows-row", { "language-code": this.languageCode, "frist-input-placeholder": this.fristInputPlaceholder, "first-input-min": this.firstInputMin, "first-input-max": this.firstInputMax, "first-input-warning": this.firstInputWarning, "first-input-warning-text": this.firstInputWarningText, "first-input-low-error-text": this.firstInputLowErrorText, "first-input-high-error-text": this.firstInputHighErrorText, "second-input-placeholder": this.secondInputPlaceholder, "second-input-min": this.secondInputMin, "second-input-max": this.secondInputMax, "second-input-warning": this.secondInputWarning, "second-input-warning-text": this.secondInputWarningText, "second-input-low-error-text": this.secondInputLowErrorText, "second-input-high-error-text": this.secondInputHighErrorText, datePlaceholder: this.datePlaceholder, firstValidDate: this.firstValidDateString, lastValidDate: this.lastValidDateString, "predefined-value": JSON.stringify(data), "min-row-count": this.minRowCount, "row-index": i })));
|
|
300
|
+
}), h("div", { key: '42c184b29e1bad6f15ebc5fe3d68f67d9a5ad8d1', class: "dropdown-with-multi-input-elemet__row sum-row" }, h("pn-marketweb-input", { key: '225bb8ad477257903a6fcc18b2d72824536f0609', disabled: true, ref: el => (this.pnSumField = el), type: "number", value: this.rowSum, label: this.sumFieldLabel }), h("pn-button", { key: '4ecc69b7350ddc7792160c46ec9acff12c4c8482', tooltip: this.addRowText ? this.addRowText : null, "left-icon": "true", arialabel: "Add", icon: plus, appearance: "light", variant: "borderless", class: "connected-dropdown__button-right", onClick: () => {
|
|
294
301
|
this.addRow(this.generateUniqueId());
|
|
295
|
-
} }, this.addRowText)),
|
|
302
|
+
} }, this.addRowText)), this.elementHelperText?.length ? h("div", { class: "dropdown-with-multi-input-elemet__row" }, this.elementHelperText) : null));
|
|
296
303
|
}
|
|
297
304
|
static get is() { return "pn-dropdown-with-multi-input-rows"; }
|
|
298
305
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-dropdown-with-multi-input-rows.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAS,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAE7G,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAM3D,MAAM,OAAO,4BAA4B;;QAEvC,oBAAe,GAAgB,IAAI,CAAC;QACpC,qBAAgB,GAAgB,IAAI,CAAC;QACrC,eAAU,GAAgB,IAAI,CAAC;QAC/B,0BAAqB,GAAgB,IAAI,CAAC;QAC1C,wBAAmB,GAAgB,IAAI,CAAC;QAiDhC,4BAAuB,GAAW,IAAI,CAAC;QACvC,6BAAwB,GAAW,IAAI,CAAC;QAExC,gBAAW,GAAqB;YACtC,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAE;YAC3B,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE;YAC/C,IAAI,EAAE,EAAE;SACT,CAAC;4BAvDsC,IAAI;4BACb,IAAI;kCACE,IAAI;uCACC,IAAI;mCACR,IAAI;wCACC,IAAI;iCACX,IAAI;6CACQ,IAAI;uCACV,IAAI;qCACN,IAAI;+BACV,IAAI;qCACE,IAAI;6BACZ,IAAI;6BACJ,IAAI;iCACA,IAAI;qCACA,IAAI;sCACH,IAAI;uCACH,IAAI;gCACX,IAAI;sCACE,IAAI;8BACZ,IAAI;8BACJ,IAAI;kCACA,IAAI;sCACA,IAAI;uCACH,IAAI;wCACH,IAAI;yBACnB,IAAI;+BACE,IAA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port { FormValue, RowValue, Root, PredefinedValues } from './types';\nimport { v4 as uuidv4 } from 'uuid';\nimport debounce from 'debounce';\nimport { plus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-with-multi-input-rows',\n styleUrl: 'pn-dropdown-with-multi-input-rows.scss',\n})\nexport class PnDropdownWithMultiInputRows {\n @Element() hostElement: Element;\n pnFirstDropdown: HTMLElement = null;\n pnSecondDropdown: HTMLElement = null;\n pnSumField: HTMLElement = null;\n pnConfirmDeleteButton: HTMLElement = null;\n pnAbortDeleteButton: HTMLElement = null;\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() languageCode: string = null;\n @Prop() firstDropdownLabel: string = null;\n @Prop() firstDropdownHelperText: string = null;\n @Prop() secondDropdownLabel: string = null;\n @Prop() secondDropdownHelperText: string = null;\n @Prop() secondDropdownMax: number = null;\n @Prop() deleteMultipleRowsWarningText: string = null;\n @Prop() confirmDeleteButtonText: string = null;\n @Prop() abortDeleteButtonText: string = null;\n @Prop() fristInputLabel: string = null;\n @Prop() fristInputPlaceholder: string = null;\n @Prop() firstInputMin: number = null;\n @Prop() firstInputMax: number = null;\n @Prop() firstInputWarning: number = null;\n @Prop() firstInputWarningText: string = null;\n @Prop() firstInputLowErrorText: string = null;\n @Prop() firstInputHighErrorText: string = null;\n @Prop() secondInputLabel: string = null;\n @Prop() secondInputPlaceholder: string = null;\n @Prop() secondInputMin: number = null;\n @Prop() secondInputMax: number = null;\n @Prop() secondInputWarning: number = null;\n @Prop() secondInputWarningText: string = null;\n @Prop() secondInputLowErrorText: string = null;\n @Prop() secondInputHighErrorText: string = null;\n @Prop() dateLabel: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() dateDaysFromToday: number = 1;\n @Prop() yearsToAddToEndDate: number = null;\n @Prop() sumFieldLabel: string = null;\n @Prop() addRowText: string = null;\n @Prop() elementHelperText: string = null;\n\n @State() dropdownDataRoot: Root[] = null;\n @State() secondDropdownArr: number[] = [];\n @State() rowCount: number = null;\n @State() rowData: PredefinedValues[] = null;\n @State() formValues: FormValue[] = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n @State() rowSum: string = null;\n @State() minRowCount: number = null;\n @State() showDelteConfirm: boolean = false;\n\n @Event() allFormValues: EventEmitter<string>;\n\n private _firstDropdownSelection: string = null;\n private _secondDropdownSelection: number = null;\n\n private _defaultRow: PredefinedValues = {\n id: this.generateUniqueId(),\n firstInput: '',\n secondInput: this.secondInputWarning.toString(),\n date: '',\n };\n\n componentWillLoad() {\n this.formValues = [];\n this.setDropDownData();\n this.updateSecondDropdown();\n this.setRowData();\n this.setFirstValidDate();\n }\n\n componentDidLoad() {\n this.updateSum();\n }\n\n setDropDownData() {\n if (typeof this.dropdownData === 'string') {\n this.dropdownDataRoot = JSON.parse(this.dropdownData);\n } else {\n this.dropdownDataRoot = this.dropdownData;\n }\n\n if (this.dropdownDataRoot?.length) {\n this.dropdownDataRoot.forEach(element => {\n if (!element.value) {\n element.value = 0;\n }\n });\n }\n\n if (this.dropdownDataRoot.length > 0) {\n this.dropdownDataRoot[0].checked = true;\n this._firstDropdownSelection = this.dropdownDataRoot[0].label;\n this._secondDropdownSelection = this.dropdownDataRoot[0].value;\n this.minRowCount = this.dropdownDataRoot[0].value;\n }\n }\n\n updateSecondDropdown() {\n const selectedItem = this.dropdownDataRoot.find(arr => arr.checked === true);\n this.secondDropdownArr = [];\n\n for (let index = selectedItem.value; index <= this.secondDropdownMax; index++) {\n this.secondDropdownArr.push(index);\n }\n }\n\n updateSelectItemArr(arr: Root[], caption: string) {\n arr.forEach(item => {\n if (item.label === caption) {\n item.checked = !item.checked;\n } else {\n item.checked = false;\n }\n });\n return arr;\n }\n\n setRowData() {\n this.rowData = [];\n for (let index = 0; index < this._secondDropdownSelection; index++) {\n const row = Object.assign({}, this._defaultRow);\n row.id = this.generateUniqueId();\n this.rowData = [...this.rowData, row];\n }\n\n this.rowCount = this.rowData.length;\n }\n\n generateUniqueId() {\n return uuidv4();\n }\n\n setFirstValidDate() {\n const yearsToadd = this.yearsToAddToEndDate ? this.yearsToAddToEndDate : 2;\n const date = new Date();\n date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);\n\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n const endYear = year + yearsToadd;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n addRow(newRowId: string) {\n const newRow = Object.assign({}, this.rowData[0]);\n newRow.id = newRowId ? newRowId : this.generateUniqueId();\n newRow.date = '';\n this.rowData = [...this.rowData, newRow];\n this.rowCount = this.rowData.length;\n\n this._secondDropdownSelection = this.rowCount;\n this.secondDropdownArr = [...this.secondDropdownArr];\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n handleFirstDropdown() {\n const selected = this.pnFirstDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n\n this.dropdownDataRoot.forEach(element => {\n element.checked = false;\n });\n\n const selectionRoot = this.dropdownDataRoot.find(x => x.label === selectedValue);\n selectionRoot.checked = true;\n this._firstDropdownSelection = selectionRoot.label;\n this.minRowCount = selectionRoot.value;\n\n if (selectionRoot.value > this._secondDropdownSelection) {\n this.dropdownDataRoot = [...this.dropdownDataRoot];\n\n for (let index = this.rowCount; index < selectionRoot.value; index++) {\n this.addRow(this.generateUniqueId());\n }\n }\n\n this.updateSecondDropdown();\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n handleSecondDropdown() {\n const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n\n const value = parseInt(selectedValue);\n if (value < this._secondDropdownSelection) {\n this.showDelteConfirm = true;\n } else {\n for (let index = this.rowCount; index < value; index++) {\n this.addRow(this.generateUniqueId());\n }\n }\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n @Listen('rowValueChange')\n @Listen('firstInputChange')\n @Listen('secondInputChange')\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 firstInput: val.firstInput,\n secondInput: val.secondInput,\n date: val.date,\n };\n\n if (e.type === 'firstInputChange' && indexToUpdate === 0) {\n this.updateFirstInputOfRows(val.firstInput);\n }\n\n if (e.type === 'secondInputChange' && indexToUpdate === 0) {\n this.updateSecondInputOfRows(val.secondInput);\n }\n\n this.rowData = [...this.rowData];\n this.emitValuesIfValid();\n this.updateSum();\n }\n\n updateFirstInputOfRows(value: string) {\n for (let index = 1; index < this.rowCount; index++) {\n this.rowData[index] = {\n ...this.rowData[index],\n firstInput: value,\n };\n }\n }\n\n updateSecondInputOfRows(value: string) {\n for (let index = 1; index < this.rowCount; index++) {\n this.rowData[index] = {\n ...this.rowData[index],\n secondInput: value,\n };\n }\n }\n\n @Listen('deleteRowEvent')\n deleteRowEvent(e) {\n const indexToRemove = this.rowData.findIndex(data => data.id === e.detail);\n if (indexToRemove < 0) {\n return;\n }\n\n this.rowData.splice(indexToRemove, 1);\n this.rowData = [...this.rowData];\n this.rowCount = this.rowData.length;\n\n this._secondDropdownSelection = this.rowCount;\n this.secondDropdownArr = [...this.secondDropdownArr];\n this.emitValuesIfValid();\n this.updateSum();\n }\n\n updateSum() {\n this.rowSum = '';\n let sum = 0;\n this.rowData.forEach(element => {\n if (element?.firstInput?.length) {\n sum += parseInt(element.firstInput);\n }\n });\n\n this.rowSum = sum.toString();\n }\n\n deleteExcessRows() {\n const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n const rowsToDelete = this.rowCount - parseInt(selectedValue);\n for (let index = 0; index < rowsToDelete; index++) {\n this.rowData.pop();\n }\n this.rowData = [...this.rowData];\n this.showDelteConfirm = false;\n this.updateSum();\n }\n\n abortDeleteRows() {\n this.showDelteConfirm = false;\n }\n\n emitValuesIfValid() {\n this.formValues = [];\n this.rowData.forEach(item => {\n const rowValue: FormValue = { row: [] };\n\n if (this._firstDropdownSelection?.length) {\n const dropDownValue: RowValue = { name: this.firstDropdownLabel, value: this._firstDropdownSelection };\n rowValue.row.push(dropDownValue);\n }\n\n if (item.firstInput?.length) {\n const firstInputValue: RowValue = { name: this.fristInputLabel, value: item.firstInput };\n rowValue.row.push(firstInputValue);\n }\n\n if (item.secondInput?.length) {\n const secondInputValue: RowValue = { name: this.secondInputLabel, value: item.secondInput };\n rowValue.row.push(secondInputValue);\n }\n\n if (item.date?.length) {\n const dateValue: RowValue = { name: this.dateLabel, value: item.date };\n rowValue.row.push(dateValue);\n }\n\n if (rowValue.row.length === 4) {\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 class=\"dropdown-with-multi-input-elemet\">\n <div class=\"dropdown-with-multi-input-elemet__row\">\n <div>\n <pn-select ref={el => (this.pnFirstDropdown = el as HTMLElement)} class=\"pn-row-select-dropdown dropDown1-dropdown\" label={this.firstDropdownLabel} empty-option=\"true\">\n {this.dropdownDataRoot?.map((item, i) => (\n <pn-option index={i} label={item.value} value={item.value} selected={item.checked} onClick={debounce(this.handleFirstDropdown.bind(this), 500)}></pn-option>\n ))}\n </pn-select>\n {this.firstDropdownHelperText?.length ? <small>{this.firstDropdownHelperText}</small> : null}\n </div>\n </div>\n\n <div class=\"dropdown-with-multi-input-elemet__row\">\n <div>\n <pn-select ref={el => (this.pnSecondDropdown = el as HTMLElement)} class=\"pn-row-select-dropdown dropDown2-dropdown\" label={this.secondDropdownLabel} empty-option=\"true\">\n {this.secondDropdownArr?.map((item, i) => (\n <pn-option index={i} label={item} value={item} selected={item === this._secondDropdownSelection} onClick={debounce(this.handleSecondDropdown.bind(this), 500)}></pn-option>\n ))}\n </pn-select>\n {this.secondDropdownHelperText?.length ? <small>{this.secondDropdownHelperText}</small> : null}\n </div>\n </div>\n\n {this.showDelteConfirm ? (\n <div class=\"dropdown-with-multi-input-elemet__delete\">\n <p>{this.deleteMultipleRowsWarningText}</p>\n <pn-button ref={el => (this.pnConfirmDeleteButton = el as HTMLElement)} small=\"true\" appearance=\"warning\" onClick={this.deleteExcessRows.bind(this)}>\n {this.confirmDeleteButtonText}\n </pn-button>\n <pn-button ref={el => (this.pnAbortDeleteButton = el as HTMLElement)} small=\"true\" appearance=\"light\" onClick={this.abortDeleteRows.bind(this)}>\n {this.abortDeleteButtonText}\n </pn-button>\n </div>\n ) : null}\n\n <div class=\"dropdown-with-multi-input-elemet__label-row\">\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.fristInputLabel}</label>\n </div>\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.secondInputLabel}</label>\n </div>\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.dateLabel}</label>\n </div>\n </div>\n\n {this.rowData?.map((data, i) => {\n return (\n <div class={'dropdown-with-multi-input-elemet__row generated-row-' + i} id={'generated-row-' + i}>\n <pn-dropdown-with-multi-input-rows-row\n language-code={this.languageCode}\n frist-input-placeholder={this.fristInputPlaceholder}\n first-input-min={this.firstInputMin}\n first-input-max={this.firstInputMax}\n first-input-warning={this.firstInputWarning}\n first-input-warning-text={this.firstInputWarningText}\n first-input-low-error-text={this.firstInputLowErrorText}\n first-input-high-error-text={this.firstInputHighErrorText}\n second-input-placeholder={this.secondInputPlaceholder}\n second-input-min={this.secondInputMin}\n second-input-max={this.secondInputMax}\n second-input-warning={this.secondInputWarning}\n second-input-warning-text={this.secondInputWarningText}\n second-input-low-error-text={this.secondInputLowErrorText}\n second-input-high-error-text={this.secondInputHighErrorText}\n datePlaceholder={this.datePlaceholder}\n firstValidDate={this.firstValidDateString}\n lastValidDate={this.lastValidDateString}\n predefined-value={JSON.stringify(data)}\n min-row-count={this.minRowCount}\n row-index={i}\n ></pn-dropdown-with-multi-input-rows-row>\n </div>\n );\n })}\n\n <div class=\"dropdown-with-multi-input-elemet__row sum-row\">\n <pn-marketweb-input disabled={true} ref={el => (this.pnSumField = el as HTMLElement)} type=\"number\" value={this.rowSum} label={this.sumFieldLabel}></pn-marketweb-input>\n\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(this.generateUniqueId());\n }}\n >\n {this.addRowText}\n </pn-button>\n </div>\n\n {this.elementHelperText?.length ? <div class=\"dropdown-with-multi-input-elemet__row\">{this.elementHelperText}</div> : null}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pn-dropdown-with-multi-input-rows.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-with-multi-input-rows/pn-dropdown-with-multi-input-rows.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAS,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAE7G,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAM3D,MAAM,OAAO,4BAA4B;;4BAQC,IAAI;4BACb,IAAI;kCACE,IAAI;uCACC,IAAI;mCACR,IAAI;wCACC,IAAI;iCACX,IAAI;6CACQ,IAAI;uCACV,IAAI;qCACN,IAAI;+BACV,IAAI;qCACE,IAAI;6BACZ,IAAI;6BACJ,IAAI;iCACA,IAAI;qCACA,IAAI;sCACH,IAAI;uCACH,IAAI;gCACX,IAAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { FormValue, RowValue, Root, PredefinedValues } from './types';\nimport { v4 as uuidv4 } from 'uuid';\nimport debounce from 'debounce';\nimport { plus } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-with-multi-input-rows',\n styleUrl: 'pn-dropdown-with-multi-input-rows.scss',\n})\nexport class PnDropdownWithMultiInputRows {\n @Element() hostElement: Element;\n pnFirstDropdown: HTMLElement = null;\n pnSecondDropdown: HTMLElement = null;\n pnSumField: HTMLElement = null;\n pnConfirmDeleteButton: HTMLElement = null;\n pnAbortDeleteButton: HTMLElement = null;\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() languageCode: string = null;\n @Prop() firstDropdownLabel: string = null;\n @Prop() firstDropdownHelperText: string = null;\n @Prop() secondDropdownLabel: string = null;\n @Prop() secondDropdownHelperText: string = null;\n @Prop() secondDropdownMax: number = null;\n @Prop() deleteMultipleRowsWarningText: string = null;\n @Prop() confirmDeleteButtonText: string = null;\n @Prop() abortDeleteButtonText: string = null;\n @Prop() fristInputLabel: string = null;\n @Prop() fristInputPlaceholder: string = null;\n @Prop() firstInputMin: number = null;\n @Prop() firstInputMax: number = null;\n @Prop() firstInputWarning: number = null;\n @Prop() firstInputWarningText: string = null;\n @Prop() firstInputLowErrorText: string = null;\n @Prop() firstInputHighErrorText: string = null;\n @Prop() secondInputLabel: string = null;\n @Prop() secondInputPlaceholder: string = null;\n @Prop() secondInputMin: number = null;\n @Prop() secondInputMax: number = null;\n @Prop() secondInputWarning: number = null;\n @Prop() secondInputWarningText: string = null;\n @Prop() secondInputLowErrorText: string = null;\n @Prop() secondInputHighErrorText: string = null;\n @Prop() dateLabel: string = null;\n @Prop() datePlaceholder: string = null;\n @Prop() dateDaysFromToday: number = 1;\n @Prop() yearsToAddToEndDate: number = null;\n @Prop() sumFieldLabel: string = null;\n @Prop() addRowText: string = null;\n @Prop() elementHelperText: string = null;\n\n @State() dropdownDataRoot: Root[] = null;\n @State() secondDropdownArr: number[] = [];\n @State() rowCount: number = null;\n @State() rowData: PredefinedValues[] = null;\n @State() formValues: FormValue[] = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n @State() rowSum: string = null;\n @State() minRowCount: number = null;\n @State() showDelteConfirm: boolean = false;\n\n @Event() allFormValues: EventEmitter<string>;\n\n private _firstDropdownSelection: string = null;\n private _secondDropdownSelection: number = null;\n\n private _defaultRow: PredefinedValues = {\n id: this.generateUniqueId(),\n firstInput: '',\n secondInput: this.secondInputWarning.toString(),\n date: '',\n };\n\n componentWillLoad() {\n this.formValues = [];\n this.setDropDownData();\n this.updateSecondDropdown();\n this.setRowData();\n this.setFirstValidDate();\n }\n\n componentDidLoad() {\n this.updateSum();\n }\n\n setDropDownData() {\n if (typeof this.dropdownData === 'string') {\n this.dropdownDataRoot = JSON.parse(this.dropdownData);\n } else {\n this.dropdownDataRoot = this.dropdownData;\n }\n\n if (this.dropdownDataRoot?.length) {\n this.dropdownDataRoot.forEach(element => {\n if (!element.value) {\n element.value = 0;\n }\n });\n }\n\n if (this.dropdownDataRoot.length > 0) {\n this.dropdownDataRoot[0].checked = true;\n this._firstDropdownSelection = this.dropdownDataRoot[0].label;\n this._secondDropdownSelection = this.dropdownDataRoot[0].value;\n this.minRowCount = this.dropdownDataRoot[0].value;\n }\n }\n\n updateSecondDropdown() {\n const selectedItem = this.dropdownDataRoot.find(arr => arr.checked === true);\n this.secondDropdownArr = [];\n\n for (let index = selectedItem.value; index <= this.secondDropdownMax; index++) {\n this.secondDropdownArr.push(index);\n }\n }\n\n updateSelectItemArr(arr: Root[], caption: string) {\n arr.forEach(item => {\n if (item.label === caption) {\n item.checked = !item.checked;\n } else {\n item.checked = false;\n }\n });\n return arr;\n }\n\n setRowData() {\n this.rowData = [];\n for (let index = 0; index < this._secondDropdownSelection; index++) {\n const row = Object.assign({}, this._defaultRow);\n row.id = this.generateUniqueId();\n this.rowData = [...this.rowData, row];\n }\n\n this.rowCount = this.rowData.length;\n }\n\n generateUniqueId() {\n return uuidv4();\n }\n\n setFirstValidDate() {\n const yearsToadd = this.yearsToAddToEndDate ? this.yearsToAddToEndDate : 2;\n const date = new Date();\n date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);\n\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n const endYear = year + yearsToadd;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n addRow(newRowId: string) {\n const newRow = Object.assign({}, this.rowData[0]);\n newRow.id = newRowId ? newRowId : this.generateUniqueId();\n newRow.date = '';\n this.rowData = [...this.rowData, newRow];\n this.rowCount = this.rowData.length;\n\n this._secondDropdownSelection = this.rowCount;\n this.secondDropdownArr = [...this.secondDropdownArr];\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n handleFirstDropdown() {\n const selected = this.pnFirstDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n\n this.dropdownDataRoot.forEach(element => {\n element.checked = false;\n });\n\n const selectionRoot = this.dropdownDataRoot.find(x => x.label === selectedValue);\n selectionRoot.checked = true;\n this._firstDropdownSelection = selectionRoot.label;\n this.minRowCount = selectionRoot.value;\n\n if (selectionRoot.value > this._secondDropdownSelection) {\n this.dropdownDataRoot = [...this.dropdownDataRoot];\n\n for (let index = this.rowCount; index < selectionRoot.value; index++) {\n this.addRow(this.generateUniqueId());\n }\n }\n\n this.updateSecondDropdown();\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n handleSecondDropdown() {\n const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n\n const value = parseInt(selectedValue);\n if (value < this._secondDropdownSelection) {\n this.showDelteConfirm = true;\n } else {\n for (let index = this.rowCount; index < value; index++) {\n this.addRow(this.generateUniqueId());\n }\n }\n this.updateSum();\n this.emitValuesIfValid();\n }\n\n @Listen('rowValueChange')\n @Listen('firstInputChange')\n @Listen('secondInputChange')\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 firstInput: val.firstInput,\n secondInput: val.secondInput,\n date: val.date,\n };\n\n if (e.type === 'firstInputChange' && indexToUpdate === 0) {\n this.updateFirstInputOfRows(val.firstInput);\n }\n\n if (e.type === 'secondInputChange' && indexToUpdate === 0) {\n this.updateSecondInputOfRows(val.secondInput);\n }\n\n this.rowData = [...this.rowData];\n this.emitValuesIfValid();\n this.updateSum();\n }\n\n updateFirstInputOfRows(value: string) {\n for (let index = 1; index < this.rowCount; index++) {\n this.rowData[index] = {\n ...this.rowData[index],\n firstInput: value,\n };\n }\n }\n\n updateSecondInputOfRows(value: string) {\n for (let index = 1; index < this.rowCount; index++) {\n this.rowData[index] = {\n ...this.rowData[index],\n secondInput: value,\n };\n }\n }\n\n @Listen('deleteRowEvent')\n deleteRowEvent(e) {\n const indexToRemove = this.rowData.findIndex(data => data.id === e.detail);\n if (indexToRemove < 0) {\n return;\n }\n\n this.rowData.splice(indexToRemove, 1);\n this.rowData = [...this.rowData];\n this.rowCount = this.rowData.length;\n\n this._secondDropdownSelection = this.rowCount;\n this.secondDropdownArr = [...this.secondDropdownArr];\n this.emitValuesIfValid();\n this.updateSum();\n }\n\n updateSum() {\n this.rowSum = '';\n let sum = 0;\n this.rowData.forEach(element => {\n if (element?.firstInput?.length) {\n sum += parseInt(element.firstInput);\n }\n });\n\n this.rowSum = sum.toString();\n }\n\n deleteExcessRows() {\n const selected = this.pnSecondDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n if (!selectedValue?.length) {\n return;\n }\n const rowsToDelete = this.rowCount - parseInt(selectedValue);\n for (let index = 0; index < rowsToDelete; index++) {\n this.rowData.pop();\n }\n this.rowData = [...this.rowData];\n this.showDelteConfirm = false;\n this.updateSum();\n }\n\n abortDeleteRows() {\n this.showDelteConfirm = false;\n }\n\n emitValuesIfValid() {\n this.formValues = [];\n this.rowData.forEach(item => {\n const rowValue: FormValue = { row: [] };\n\n if (this._firstDropdownSelection?.length) {\n const dropDownValue: RowValue = { name: this.firstDropdownLabel, value: this._firstDropdownSelection };\n rowValue.row.push(dropDownValue);\n }\n\n if (item.firstInput?.length) {\n const firstInputValue: RowValue = { name: this.fristInputLabel, value: item.firstInput };\n rowValue.row.push(firstInputValue);\n }\n\n if (item.secondInput?.length) {\n const secondInputValue: RowValue = { name: this.secondInputLabel, value: item.secondInput };\n rowValue.row.push(secondInputValue);\n }\n\n if (item.date?.length) {\n const dateValue: RowValue = { name: this.dateLabel, value: item.date };\n rowValue.row.push(dateValue);\n }\n\n if (rowValue.row.length === 4) {\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 class=\"dropdown-with-multi-input-elemet\">\n <div class=\"dropdown-with-multi-input-elemet__row\">\n <div>\n <pn-select ref={el => (this.pnFirstDropdown = el as HTMLElement)} class=\"pn-row-select-dropdown dropDown1-dropdown\" label={this.firstDropdownLabel} empty-option=\"true\" language={this.languageCode}>\n {this.dropdownDataRoot?.map((item, i) => (\n <pn-option index={i} label={item.value} value={item.value} selected={item.checked} onClick={debounce(this.handleFirstDropdown.bind(this), 500)}></pn-option>\n ))}\n </pn-select>\n {this.firstDropdownHelperText?.length ? <small>{this.firstDropdownHelperText}</small> : null}\n </div>\n </div>\n\n <div class=\"dropdown-with-multi-input-elemet__row\">\n <div>\n <pn-select ref={el => (this.pnSecondDropdown = el as HTMLElement)} class=\"pn-row-select-dropdown dropDown2-dropdown\" label={this.secondDropdownLabel} empty-option=\"true\" language={this.languageCode}>\n {this.secondDropdownArr?.map((item, i) => (\n <pn-option index={i} label={item} value={item} selected={item === this._secondDropdownSelection} onClick={debounce(this.handleSecondDropdown.bind(this), 500)}></pn-option>\n ))}\n </pn-select>\n {this.secondDropdownHelperText?.length ? <small>{this.secondDropdownHelperText}</small> : null}\n </div>\n </div>\n\n {this.showDelteConfirm ? (\n <div class=\"dropdown-with-multi-input-elemet__delete\">\n <p>{this.deleteMultipleRowsWarningText}</p>\n <pn-button ref={el => (this.pnConfirmDeleteButton = el as HTMLElement)} small=\"true\" appearance=\"warning\" onClick={this.deleteExcessRows.bind(this)}>\n {this.confirmDeleteButtonText}\n </pn-button>\n <pn-button ref={el => (this.pnAbortDeleteButton = el as HTMLElement)} small=\"true\" appearance=\"light\" onClick={this.abortDeleteRows.bind(this)}>\n {this.abortDeleteButtonText}\n </pn-button>\n </div>\n ) : null}\n\n <div class=\"dropdown-with-multi-input-elemet__label-row\">\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.fristInputLabel}</label>\n </div>\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.secondInputLabel}</label>\n </div>\n <div class=\"dropdown-with-multi-input-elemet__label\">\n <label>{this.dateLabel}</label>\n </div>\n </div>\n\n {this.rowData?.map((data, i) => {\n return (\n <div class={'dropdown-with-multi-input-elemet__row generated-row-' + i} id={'generated-row-' + i}>\n <pn-dropdown-with-multi-input-rows-row\n language-code={this.languageCode}\n frist-input-placeholder={this.fristInputPlaceholder}\n first-input-min={this.firstInputMin}\n first-input-max={this.firstInputMax}\n first-input-warning={this.firstInputWarning}\n first-input-warning-text={this.firstInputWarningText}\n first-input-low-error-text={this.firstInputLowErrorText}\n first-input-high-error-text={this.firstInputHighErrorText}\n second-input-placeholder={this.secondInputPlaceholder}\n second-input-min={this.secondInputMin}\n second-input-max={this.secondInputMax}\n second-input-warning={this.secondInputWarning}\n second-input-warning-text={this.secondInputWarningText}\n second-input-low-error-text={this.secondInputLowErrorText}\n second-input-high-error-text={this.secondInputHighErrorText}\n datePlaceholder={this.datePlaceholder}\n firstValidDate={this.firstValidDateString}\n lastValidDate={this.lastValidDateString}\n predefined-value={JSON.stringify(data)}\n min-row-count={this.minRowCount}\n row-index={i}\n ></pn-dropdown-with-multi-input-rows-row>\n </div>\n );\n })}\n\n <div class=\"dropdown-with-multi-input-elemet__row sum-row\">\n <pn-marketweb-input disabled={true} ref={el => (this.pnSumField = el as HTMLElement)} type=\"number\" value={this.rowSum} label={this.sumFieldLabel}></pn-marketweb-input>\n\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(this.generateUniqueId());\n }}\n >\n {this.addRowText}\n </pn-button>\n </div>\n\n {this.elementHelperText?.length ? <div class=\"dropdown-with-multi-input-elemet__row\">{this.elementHelperText}</div> : null}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -8,6 +8,7 @@ export class PnFilterCheckbox {
|
|
|
8
8
|
this.checked = false;
|
|
9
9
|
this.indeterminate = false;
|
|
10
10
|
}
|
|
11
|
+
hostElement;
|
|
11
12
|
handlechange() {
|
|
12
13
|
this.indeterminate = false;
|
|
13
14
|
}
|
|
@@ -42,7 +43,6 @@ export class PnFilterCheckbox {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
renderInputOutsideShadowRoot() {
|
|
45
|
-
var _a;
|
|
46
46
|
let input = this.hostElement.querySelector('input.hidden-' + this.checkboxid);
|
|
47
47
|
if (!input) {
|
|
48
48
|
input = this.hostElement.ownerDocument.createElement('input');
|
|
@@ -50,7 +50,7 @@ export class PnFilterCheckbox {
|
|
|
50
50
|
input.classList.add('hidden-' + this.checkboxid);
|
|
51
51
|
this.hostElement.appendChild(input);
|
|
52
52
|
}
|
|
53
|
-
input.name =
|
|
53
|
+
input.name = this.name ?? this.checkboxid;
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
56
|
this.renderInputOutsideShadowRoot();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-filter-checkbox.js","sourceRoot":"","sources":["../../../../src/components/input/pn-filter-checkbox/pn-filter-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO1E,MAAM,OAAO,gBAAgB;;;;;wBASE,KAAK;uBACN,KAAK;6BACkB,KAAK;;
|
|
1
|
+
{"version":3,"file":"pn-filter-checkbox.js","sourceRoot":"","sources":["../../../../src/components/input/pn-filter-checkbox/pn-filter-checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO1E,MAAM,OAAO,gBAAgB;;;;;wBASE,KAAK;uBACN,KAAK;6BACkB,KAAK;;IAE7C,WAAW,CAAc;IAGpC,YAAY;QACV,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACrC,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED,UAAU;QACR,MAAM,MAAM,G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J,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pn-filter-checkbox',\n styleUrl: 'pn-filter-checkbox.scss',\n shadow: true,\n})\nexport class PnFilterCheckbox {\n /** This will be emitted on change and input, like a native checkbox */\n @Prop({ reflect: true }) value: any;\n /** The name of the checkbox group */\n @Prop() name: string;\n /** The string you put here will be what you'd make the ID of a native radio button, you can't name props \"id\" because it's reserved\n * so we went with the more descriptive name \"checkboxid\", if you want to create labels for your checkbox, you will bind it to this ID\n */\n @Prop() checkboxid: string;\n @Prop() disabled?: boolean = false;\n @Prop() checked?: boolean = false;\n @Prop({ mutable: true }) indeterminate?: boolean = false;\n\n @Element() hostElement: HTMLElement;\n\n @Listen('change')\n handlechange() {\n this.indeterminate = false;\n }\n\n componentDidLoad() {\n this.checkAndSetIndeterminateState();\n this.bindEvents();\n }\n\n componentDidUpdate() {\n this.checkAndSetIndeterminateState();\n }\n\n bindEvents() {\n const labels = document.querySelectorAll('label[for=\"' + this.checkboxid + '\"]');\n labels.forEach(label => {\n label.addEventListener('click', () => {\n this.hostElement.shadowRoot.querySelector('label').click();\n });\n });\n\n const checkboxInput = this.hostElement.shadowRoot.querySelector('input');\n checkboxInput.addEventListener('change', this.onCheckboxChange.bind(this, checkboxInput));\n }\n\n onCheckboxChange(checkboxInput: HTMLInputElement) {\n let outsideInput: HTMLInputElement = this.hostElement.querySelector('input.hidden-' + this.checkboxid) as HTMLInputElement | null;\n if (outsideInput) {\n outsideInput.value = checkboxInput.checked ? this.value : '';\n outsideInput.dispatchEvent(new CustomEvent('change', { detail: outsideInput }));\n }\n }\n\n checkAndSetIndeterminateState() {\n let checkbox = this.hostElement.querySelector(`#${this.checkboxid}`) as HTMLInputElement;\n\n if (checkbox) {\n checkbox.indeterminate = this.indeterminate;\n }\n }\n\n private renderInputOutsideShadowRoot() {\n let input: HTMLInputElement = this.hostElement.querySelector('input.hidden-' + this.checkboxid) as HTMLInputElement | null;\n if (!input) {\n input = this.hostElement.ownerDocument.createElement('input');\n input.type = 'hidden';\n input.classList.add('hidden-' + this.checkboxid);\n this.hostElement.appendChild(input);\n }\n\n input.name = this.name ?? this.checkboxid;\n }\n\n render() {\n this.renderInputOutsideShadowRoot();\n\n return (\n <Host checked={this.checked} id={this.checkboxid}>\n <input type=\"checkbox\" id={this.checkboxid} value={this.value} name={this.name || this.checkboxid} disabled={this.disabled} checked={this.checked} />\n <label htmlFor={this.checkboxid} class=\"pn-checkbox\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <polyline class=\"checkmark-path\" points=\"4,12 9,17 20,6\" stroke-width=\"3\" />\n <polyline class=\"indeterminate-path\" points=\"4,12 20,12\" stroke-width=\"3\" />\n </svg>\n </label>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -37,8 +37,7 @@ export class PnMarketwebInput {
|
|
|
37
37
|
return types.includes(this.type) && !this.showText ? this.type : 'text';
|
|
38
38
|
}
|
|
39
39
|
setVal(e) {
|
|
40
|
-
|
|
41
|
-
const target = (_a = e.composedPath) === null || _a === void 0 ? void 0 : _a.call(e)[0];
|
|
40
|
+
const target = e.composedPath?.()[0];
|
|
42
41
|
this.value = target.value;
|
|
43
42
|
}
|
|
44
43
|
getClassNames() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-marketweb-input.js","sourceRoot":"","sources":["../../../../src/components/input/pn-marketweb-input/pn-marketweb-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,MAAM,OAAO,gBAAgB;;wBACC,KAAK;qBAET,EAAE;uBAEC,KAAK;0BAEH,EAAE;qBAEP,EAAE;2BACI,EAAE;uBACN,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE;oBACrB,EAAE;wBACG,KAAK;oBACO,MAAM;4BACf,EAAE;qBACR,IAAI;qBACL,EAAE;yBAEE,EAAE;mBACR,EAAE;mBACF,EAAE;oBACD,EAAE;uBACC,EAAE;wBASC,KAAK;;IAPlC,cAAc;QACZ,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC;QAClC,IAAI,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC,UAAU,CAAC;QAE5C,OAAO,IAAI,CAAC;IACd,CAAC;IAGD,oBAAoB;QAClB,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjC,CAAC;IAED,YAAY;QACV,IAAI,KAAK,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAE/H,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1E,CAAC;IAED,MAAM,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"pn-marketweb-input.js","sourceRoot":"","sources":["../../../../src/components/input/pn-marketweb-input/pn-marketweb-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host, State } from '@stencil/core';\nimport { alert_exclamation_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-marketweb-input',\n styleUrl: 'pn-marketweb-input.scss',\n})\nexport class PnMarketwebInput {\n @Prop() disabled: boolean = false;\n /** Error message; will take precedence over helpertext if both are provided (applies invalid styles automatically) */\n @Prop() error: string = '';\n /** Error state without message (If you want to control the error messaging on your own) */\n @Prop() invalid: boolean = false;\n /** Text message placed underneath the input field */\n @Prop() helpertext: string = '';\n /** Text label placed above the input field */\n @Prop() label: string = '';\n @Prop() placeholder: string = '';\n @Prop() inputid: string = `${Math.random()}`;\n @Prop() name: string = '';\n @Prop() required: boolean = false;\n @Prop({ mutable: true }) type: string = 'text';\n @Prop() autocomplete: string = '';\n @Prop() valid: boolean = null;\n @Prop() value: string = '';\n /** The maximum number of characters the user should be able to add, also adds a visible counter */\n @Prop() maxlength: string = '';\n @Prop() min: string = '';\n @Prop() max: string = '';\n @Prop() step: string = '';\n @Prop() pattern: string = '';\n\n getTextMessage() {\n if (this.error) return this.error;\n if (this.helpertext) return this.helpertext;\n\n return null;\n }\n\n @State() showText: boolean = false;\n toggleTextVisibility() {\n this.showText = !this.showText;\n }\n\n getInputType() {\n let types = ['text', 'password', 'url', 'tel', 'search', 'number', 'email', 'date', 'datetime-local', 'month', 'week', 'time'];\n\n return types.includes(this.type) && !this.showText ? this.type : 'text';\n }\n\n setVal(e) {\n const target: HTMLInputElement = e.composedPath?.()[0] as HTMLInputElement;\n this.value = target.value;\n }\n\n getClassNames() {\n let classNames = 'pn-input ';\n if (this.error.length > 0 || this.invalid) classNames += 'error ';\n if (this.valid) classNames += 'valid ';\n if (this.type === 'password') classNames += 'password ';\n if (this.error || this.invalid || this.valid) classNames += 'icon ';\n\n return classNames;\n }\n\n render() {\n return (\n <Host class={this.getClassNames()}>\n {(this.label || this.maxlength) && (\n <div class=\"label-container\">\n {this.label && <label htmlFor={this.inputid}>{this.label}</label>}\n {parseInt(this.maxlength) > 0 && (\n <label class=\"char-count\" htmlFor={this.inputid}>\n {`${this.value.length}/${this.maxlength}`}\n </label>\n )}\n </div>\n )}\n <div class=\"input-container\">\n <input\n type={this.getInputType()}\n value={this.value}\n id={this.inputid}\n name={this.name}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n autocomplete={this.autocomplete}\n onInput={e => this.setVal(e)}\n maxlength={this.maxlength ? this.maxlength : null}\n min={this.min ? this.min : null}\n max={this.max ? this.max : null}\n step={this.step ? this.step : null}\n pattern={this.pattern ? this.pattern : null}\n />\n <svg class=\"pn-input-checkmark\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <polyline class=\"checkmark-path\" points=\"4,12 9,17 20,6\" stroke-width=\"3\" />\n </svg>\n\n {this.type === 'password' && !this.disabled && <button onClick={() => this.toggleTextVisibility()}>Show</button>}\n </div>\n\n {this.getTextMessage() && (\n <small>\n {this.error && <pn-icon icon={alert_exclamation_circle} small color=\"warning\"></pn-icon>}\n {this.getTextMessage()}\n </small>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -17,6 +17,11 @@ export class PnMarketwebSearch {
|
|
|
17
17
|
this.hasClonedInput = false;
|
|
18
18
|
this.listSuggestion = [];
|
|
19
19
|
}
|
|
20
|
+
hostElement;
|
|
21
|
+
/** This is emitted on search submission both with keyboard and mouse */
|
|
22
|
+
search;
|
|
23
|
+
/** custom event that handles both clearing and input to have the option of just binding listeners to one event instead of two. */
|
|
24
|
+
update;
|
|
20
25
|
inputHandler() {
|
|
21
26
|
this.update.emit(this.value);
|
|
22
27
|
}
|