@postnord/pn-marketweb-components 3.0.3 → 3.1.0
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/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +1 -1
- 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-choice-button.js","sourceRoot":"","sources":["../../../../src/components/input/pn-choice-button/pn-choice-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAM1E,MAAM,OAAO,cAAc;;;;;oBASF,UAAU;wBACJ,KAAK;uBACN,KAAK;6BACkB,KAAK;;
|
|
1
|
+
{"version":3,"file":"pn-choice-button.js","sourceRoot":"","sources":["../../../../src/components/input/pn-choice-button/pn-choice-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAM1E,MAAM,OAAO,cAAc;;;;;oBASF,UAAU;wBACJ,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;IACvC,CAAC;IAED,kBAAkB;QAChB,IAAI,CAAC,6BAA6B,EAAE,CAAC;IACvC,CAAC;IAED,6BAA6B;QAC3B,IAAI,QAAQ,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAqB,CAAC;QAEvF,IAAI,QAAQ,EAAE,CAAC;YACb,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAO,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,GAAI;YAClJ,8DAAO,OAAO,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAC,kBAAkB;gBACrD,8DAAQ,CACF,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Host, Element, Listen } from '@stencil/core';\n\n@Component({\n tag: 'pn-choice-button',\n styleUrl: 'pn-choice-button.scss',\n})\nexport class PnChoiceButton {\n /** This will be emitted on change and input */\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 checkbox, you can't name props \"id\" because it's reserved\n * so we went with the more descriptive name \"choice\", if you want to create labels for your checkbox, you will bind it to this ID\n */\n @Prop() choiceid: string;\n @Prop() type: string = 'checkbox';\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 }\n\n componentDidUpdate() {\n this.checkAndSetIndeterminateState();\n }\n\n checkAndSetIndeterminateState() {\n let checkbox = this.hostElement.querySelector(`#${this.choiceid}`) as HTMLInputElement;\n\n if (checkbox) {\n checkbox.indeterminate = this.indeterminate;\n }\n }\n\n render() {\n return (\n <Host>\n <input type={this.type} id={this.choiceid} value={this.value} name={this.name || this.choiceid} disabled={this.disabled} checked={this.checked} />\n <label htmlFor={this.choiceid} class=\"pn-choice-button\">\n <slot />\n </label>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -2,11 +2,6 @@ import { h, Host } from "@stencil/core";
|
|
|
2
2
|
import { alert_info_circle } from "pn-design-assets/pn-assets/icons.js";
|
|
3
3
|
export class PnDateAndTime {
|
|
4
4
|
constructor() {
|
|
5
|
-
this.pnDatePicker = null;
|
|
6
|
-
this.pnTimeFromHourDropdown = null;
|
|
7
|
-
this.pnTimeFromMinuteDropdown = null;
|
|
8
|
-
this.pnTimeToHourDropdown = null;
|
|
9
|
-
this.pnTimeToMinuteDropdown = null;
|
|
10
5
|
this.languageCode = null;
|
|
11
6
|
this.dateAndTimeLabel = '';
|
|
12
7
|
this.dateDaysFromToday = 0;
|
|
@@ -29,6 +24,13 @@ export class PnDateAndTime {
|
|
|
29
24
|
this.firstValidDateString = '';
|
|
30
25
|
this.lastValidDateString = '';
|
|
31
26
|
}
|
|
27
|
+
hostElement;
|
|
28
|
+
pnDatePicker = null;
|
|
29
|
+
pnTimeFromHourDropdown = null;
|
|
30
|
+
pnTimeFromMinuteDropdown = null;
|
|
31
|
+
pnTimeToHourDropdown = null;
|
|
32
|
+
pnTimeToMinuteDropdown = null;
|
|
33
|
+
dateandtimerange;
|
|
32
34
|
componentWillLoad() {
|
|
33
35
|
this.setInitialValues();
|
|
34
36
|
}
|
|
@@ -43,9 +45,8 @@ export class PnDateAndTime {
|
|
|
43
45
|
this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);
|
|
44
46
|
}
|
|
45
47
|
setFirstValidDate() {
|
|
46
|
-
var _a;
|
|
47
48
|
const date = new Date();
|
|
48
|
-
date.setDate(
|
|
49
|
+
date.setDate(date.getDate() + this.dateDaysFromToday ?? 0);
|
|
49
50
|
const year = date.getFullYear();
|
|
50
51
|
const month = (date.getMonth() + 1).toString().padStart(2, '0');
|
|
51
52
|
const day = date.getDate().toString().padStart(2, '0');
|
|
@@ -86,11 +87,10 @@ export class PnDateAndTime {
|
|
|
86
87
|
this.updateHiddenValue();
|
|
87
88
|
}
|
|
88
89
|
handleTimeChange() {
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
const toMinString = (_d = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')) === null || _d === void 0 ? void 0 : _d.textContent;
|
|
90
|
+
const fromHourString = this.pnTimeFromHourDropdown.querySelector('[aria-selected=true]')?.textContent;
|
|
91
|
+
const fromMinString = this.pnTimeFromMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;
|
|
92
|
+
const toHourString = this.pnTimeToHourDropdown.querySelector('[aria-selected=true]')?.textContent;
|
|
93
|
+
const toMinString = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;
|
|
94
94
|
this.selectedFromHour = parseInt(fromHourString);
|
|
95
95
|
this.selectedFromMin = parseInt(fromMinString);
|
|
96
96
|
this.selectedToHour = parseInt(toHourString);
|
|
@@ -132,8 +132,7 @@ export class PnDateAndTime {
|
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
render() {
|
|
135
|
-
|
|
136
|
-
return (h(Host, { key: '6f7c0f1c403a98ceaadef017f6dfe94e4d09ab06' }, h("div", { key: 'c4f95d2e042277cd090fa8a8ce4dd6cd357943ad', class: "date-and-time-group" }, this.dateAndTimeLabel ? (h("div", { class: "date-and-time-row" }, h("label", null, this.dateAndTimeLabel))) : null, h("div", { key: '2c772ab7b24783c634a06879cfede0eaf05952d6', class: "date-and-time-row" }, h("pn-date-picker", { key: '6a427ea028bf55b067b0885e2d3b97a0349acdd3', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": this.disableWeekends, "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.language, placeholder: this.datePlacehodler })), this.dateHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.dateHelperText) : null), h("div", { key: '7f74f041493bb4da72d070e90d24d38441c5ebb9', class: "date-and-time-group" }, h("div", { key: '7b7b4b4ba67f36cf03c4ee6b80a3cdd55a5c8380', class: "date-and-time-row" }, h("pn-select", { key: 'd5d6fe2b881a8770fc1aec24bce38754b6a17db0', ref: el => (this.pnTimeFromHourDropdown = el), name: "date-and-time-from-houre", placeholder: this.hourArr[8], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, (_a = this.hourArr) === null || _a === void 0 ? void 0 : _a.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: 'bb8dafe866a95e94e0e8a1e53ccff80d0729ec48', ref: el => (this.pnTimeFromMinuteDropdown = el), name: "date-and-time-from-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, (_b = this.minuteArr) === null || _b === void 0 ? void 0 : _b.map((minute) => h("pn-option", { label: minute, value: minute }))), h("div", { key: '8281bbfae49ca8ec35a1d651d61a1bd478b70c0a', class: "time-separator" }, h("span", { key: 'd7c895902ce3efac4816f21510444914012fca29' }, "-")), h("pn-select", { key: '5fa29d4fc4d01a804427bd2119969ec0d6346df6', ref: el => (this.pnTimeToHourDropdown = el), name: "date-and-time-to-hour", placeholder: this.hourArr[12], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, (_c = this.hourArr) === null || _c === void 0 ? void 0 : _c.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: '968f33b37cad6d2528a789abd63a89c163642c53', ref: el => (this.pnTimeToMinuteDropdown = el), name: "date-and-time-to-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, (_d = this.minuteArr) === null || _d === void 0 ? void 0 : _d.map((minute) => h("pn-option", { label: minute, value: minute })))), this.timeHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.timeHelperText) : null, this.invalidTimespan && this.errorMessage ? (h("small", { class: "date-and-time-row error-message" }, h("pn-icon", { icon: alert_info_circle, small: "false", color: "warning" }), this.errorMessage)) : null)));
|
|
135
|
+
return (h(Host, { key: '6f7c0f1c403a98ceaadef017f6dfe94e4d09ab06' }, h("div", { key: 'c4f95d2e042277cd090fa8a8ce4dd6cd357943ad', class: "date-and-time-group" }, this.dateAndTimeLabel ? (h("div", { class: "date-and-time-row" }, h("label", null, this.dateAndTimeLabel))) : null, h("div", { key: '2c772ab7b24783c634a06879cfede0eaf05952d6', class: "date-and-time-row" }, h("pn-date-picker", { key: '6a427ea028bf55b067b0885e2d3b97a0349acdd3', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": this.disableWeekends, "min-date": this.firstValidDateString, "max-date": this.lastValidDateString, language: this.language, placeholder: this.datePlacehodler })), this.dateHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.dateHelperText) : null), h("div", { key: '7f74f041493bb4da72d070e90d24d38441c5ebb9', class: "date-and-time-group" }, h("div", { key: '7b7b4b4ba67f36cf03c4ee6b80a3cdd55a5c8380', class: "date-and-time-row" }, h("pn-select", { key: 'd5d6fe2b881a8770fc1aec24bce38754b6a17db0', ref: el => (this.pnTimeFromHourDropdown = el), name: "date-and-time-from-houre", placeholder: this.hourArr[8], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: 'bb8dafe866a95e94e0e8a1e53ccff80d0729ec48', ref: el => (this.pnTimeFromMinuteDropdown = el), name: "date-and-time-from-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute }))), h("div", { key: '8281bbfae49ca8ec35a1d651d61a1bd478b70c0a', class: "time-separator" }, h("span", { key: 'd7c895902ce3efac4816f21510444914012fca29' }, "-")), h("pn-select", { key: '5fa29d4fc4d01a804427bd2119969ec0d6346df6', ref: el => (this.pnTimeToHourDropdown = el), name: "date-and-time-to-hour", placeholder: this.hourArr[12], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.hourArr?.map((hour) => h("pn-option", { label: hour, value: hour }))), h("pn-select", { key: '968f33b37cad6d2528a789abd63a89c163642c53', ref: el => (this.pnTimeToMinuteDropdown = el), name: "date-and-time-to-minute", placeholder: this.minuteArr[0], class: "date-and-time-dropdown--time", invalid: this.invalidTimespan }, this.minuteArr?.map((minute) => h("pn-option", { label: minute, value: minute })))), this.timeHelperText ? h("small", { class: "date-and-time-row helper-text" }, this.timeHelperText) : null, this.invalidTimespan && this.errorMessage ? (h("small", { class: "date-and-time-row error-message" }, h("pn-icon", { icon: alert_info_circle, small: "false", color: "warning" }), this.errorMessage)) : null)));
|
|
137
136
|
}
|
|
138
137
|
static get is() { return "pn-date-and-time"; }
|
|
139
138
|
static get originalStyleUrls() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-date-and-time.js","sourceRoot":"","sources":["../../../../src/components/input/pn-date-and-time/pn-date-and-time.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,E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,SAAS,CAAC,CAAC,CAAC,EAC9B,KAAK,EAAC,8BAA8B,EACpC,OAAO,EAAE,IAAI,CAAC,eAAe,IAE5B,MAAA,IAAI,CAAC,SAAS,0CAAE,GAAG,CAAC,CAAC,MAAc,EAAE,EAAE,CAAC,iBAAW,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAc,CAAC,CACrF,CACR;gBACL,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,aAAO,KAAK,EAAC,+BAA+B,IAAE,IAAI,CAAC,cAAc,CAAS,CAAC,CAAC,CAAC,IAAI;gBAEvG,IAAI,CAAC,eAAe,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAC3C,aAAO,KAAK,EAAC,iCAAiC;oBAC5C,eAAS,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,GAAG;oBACjE,IAAI,CAAC,YAAY,CACZ,CACT,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { alert_info_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-date-and-time',\n styleUrl: 'pn-date-and-time.scss',\n})\nexport class PnDateAndTime {\n @Element() hostElement: Element;\n pnDatePicker: HTMLElement = null;\n pnTimeFromHourDropdown: HTMLElement = null;\n pnTimeFromMinuteDropdown: HTMLElement = null;\n pnTimeToHourDropdown: HTMLElement = null;\n pnTimeToMinuteDropdown: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() dateAndTimeLabel: string = '';\n @Prop() dateDaysFromToday: number = 0;\n @Prop() validTimeRangeMinutes: number = 0;\n @Prop() errorMessage: string = '';\n @Prop() dateHelperText: string = '';\n @Prop() timeHelperText: string = '';\n @Prop() disableWeekends: boolean = false;\n @Prop() datePlacehodler: string = '';\n\n @State() language: string = null;\n @State() hourArr: string[] = null;\n @State() minuteArr: string[] = null;\n @State() formValue: string = null;\n @State() invalidTimespan: boolean = false;\n @State() selectedDate: string = null;\n @State() selectedFromHour: number = null;\n @State() selectedFromMin: number = null;\n @State() selectedToHour: number = null;\n @State() selectedToMin: number = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n\n @Event() dateandtimerange: EventEmitter<string>;\n\n componentWillLoad() {\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.setDefaultHiddenValue();\n this.addEventHandlers();\n }\n\n async setInitialValues() {\n this.setLangugaeCode();\n this.setFirstValidDate();\n\n this.hourArr = this.getNumbersAsStringArr(6, 22, 1);\n this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);\n }\n\n setFirstValidDate() {\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 + 2;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n setLangugaeCode() {\n if (typeof this.languageCode === 'string' && this.languageCode.trim() === '') {\n this.language = document.querySelector('html').lang;\n } else {\n this.language = this.languageCode;\n }\n }\n\n setDefaultHiddenValue() {\n this.selectedFromHour = parseInt(this.hourArr[8]);\n this.selectedFromMin = 0;\n this.selectedToHour = parseInt(this.hourArr[12]);\n this.selectedToMin = 0;\n\n this.updateHiddenValue();\n }\n\n addEventHandlers() {\n this.pnDatePicker.addEventListener('dateselection', this.handleChange.bind(this));\n\n this.pnTimeFromHourDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeFromMinuteDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeToHourDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeToMinuteDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n }\n\n handleChange(e) {\n const target = e.target;\n\n if (target === this.pnDatePicker) {\n this.selectedDate = e.detail;\n }\n\n if (target === this.pnTimeFromHourDropdown || target === this.pnTimeFromMinuteDropdown || target === this.pnTimeToHourDropdown || target === this.pnTimeToMinuteDropdown) {\n this.handleTimeChange();\n }\n\n this.updateHiddenValue();\n }\n\n handleTimeChange() {\n const fromHourString = this.pnTimeFromHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const fromMinString = this.pnTimeFromMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toHourString = this.pnTimeToHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toMinString = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n\n this.selectedFromHour = parseInt(fromHourString);\n this.selectedFromMin = parseInt(fromMinString);\n this.selectedToHour = parseInt(toHourString);\n this.selectedToMin = parseInt(toMinString);\n }\n\n updateHiddenValue() {\n const date = new Date();\n const dateFrom = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedFromHour, this.selectedFromMin, 0, 0);\n const dateTo = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedToHour, this.selectedToMin, 0, 0);\n this.validateTimeRange(dateFrom.getTime(), dateTo.getTime());\n\n if (this.invalidTimespan || !this.selectedDate) {\n this.formValue = '';\n } else {\n const fromMin = this.selectedFromMin.toString().padStart(2, '0');\n const toMin = this.selectedToMin.toString().padStart(2, '0');\n\n this.formValue = `${this.selectedDate}, ${this.selectedFromHour}:${fromMin}-${this.selectedToHour}:${toMin}`;\n }\n\n this.dateandtimerange.emit(this.formValue);\n }\n\n validateTimeRange(from: number, to: number) {\n let differenceValue = (to - from) / 1000;\n differenceValue /= 60;\n this.invalidTimespan = differenceValue < this.validTimeRangeMinutes ? true : false;\n }\n\n getNumbersAsStringArr(start: number, stop: number, step: number) {\n const arr = Array.from({ length: (stop - start) / step + 1 }, (_, index: number) => start + index * step);\n const result: string[] = [];\n\n arr.forEach(item => {\n const itemAsString = item.toString().padStart(2, '0');\n result.push(itemAsString);\n });\n\n return result;\n }\n\n removePnOptionSelected() {\n const selectOptions = this.hostElement.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"date-and-time-group\">\n {this.dateAndTimeLabel ? (\n <div class=\"date-and-time-row\">\n <label>{this.dateAndTimeLabel}</label>\n </div>\n ) : null}\n <div class=\"date-and-time-row\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={this.disableWeekends}\n min-date={this.firstValidDateString}\n max-date={this.lastValidDateString}\n language={this.language}\n placeholder={this.datePlacehodler}\n ></pn-date-picker>\n </div>\n\n {this.dateHelperText ? <small class=\"date-and-time-row helper-text\">{this.dateHelperText}</small> : null}\n </div>\n <div class=\"date-and-time-group\">\n <div class=\"date-and-time-row\">\n <pn-select\n ref={el => (this.pnTimeFromHourDropdown = el as HTMLElement)}\n name=\"date-and-time-from-houre\"\n placeholder={this.hourArr[8]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeFromMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-from-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n <div class=\"time-separator\">\n <span>-</span>\n </div>\n <pn-select\n ref={el => (this.pnTimeToHourDropdown = el as HTMLElement)}\n name=\"date-and-time-to-hour\"\n placeholder={this.hourArr[12]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeToMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-to-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n </div>\n {this.timeHelperText ? <small class=\"date-and-time-row helper-text\">{this.timeHelperText}</small> : null}\n\n {this.invalidTimespan && this.errorMessage ? (\n <small class=\"date-and-time-row error-message\">\n <pn-icon icon={alert_info_circle} small=\"false\" color=\"warning\" />\n {this.errorMessage}\n </small>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pn-date-and-time.js","sourceRoot":"","sources":["../../../../src/components/input/pn-date-and-time/pn-date-and-time.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAC9F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAMxE,MAAM,OAAO,aAAa;;4BAQO,IAAI;gCACA,EAAE;iCACD,CAAC;qCACG,CAAC;4BACV,EAAE;8BACA,EAAE;8BACF,EAAE;+BACA,KAAK;+BACN,EAAE;wBAER,IAAI;uBACH,IAAI;yBACF,IAAI;yBACN,IAAI;+BACG,KAAK;4BACT,IAAI;gCACA,IAAI;+BACL,IAAI;8BACL,IAAI;6BACL,IAAI;oCACG,EAAE;mCACH,EAAE;;IA5B9B,WAAW,CAAU;IAChC,YAAY,GAAgB,IAAI,CAAC;IACjC,sBAAsB,GA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AAC,KAAK,EAAC,SAAS,GAAG;oBACjE,IAAI,CAAC,YAAY,CACZ,CACT,CAAC,CAAC,CAAC,IAAI,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Event, EventEmitter } from '@stencil/core';\nimport { alert_info_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-date-and-time',\n styleUrl: 'pn-date-and-time.scss',\n})\nexport class PnDateAndTime {\n @Element() hostElement: Element;\n pnDatePicker: HTMLElement = null;\n pnTimeFromHourDropdown: HTMLElement = null;\n pnTimeFromMinuteDropdown: HTMLElement = null;\n pnTimeToHourDropdown: HTMLElement = null;\n pnTimeToMinuteDropdown: HTMLElement = null;\n\n @Prop() languageCode: string = null;\n @Prop() dateAndTimeLabel: string = '';\n @Prop() dateDaysFromToday: number = 0;\n @Prop() validTimeRangeMinutes: number = 0;\n @Prop() errorMessage: string = '';\n @Prop() dateHelperText: string = '';\n @Prop() timeHelperText: string = '';\n @Prop() disableWeekends: boolean = false;\n @Prop() datePlacehodler: string = '';\n\n @State() language: string = null;\n @State() hourArr: string[] = null;\n @State() minuteArr: string[] = null;\n @State() formValue: string = null;\n @State() invalidTimespan: boolean = false;\n @State() selectedDate: string = null;\n @State() selectedFromHour: number = null;\n @State() selectedFromMin: number = null;\n @State() selectedToHour: number = null;\n @State() selectedToMin: number = null;\n @State() firstValidDateString: string = '';\n @State() lastValidDateString: string = '';\n\n @Event() dateandtimerange: EventEmitter<string>;\n\n componentWillLoad() {\n this.setInitialValues();\n }\n\n componentDidLoad() {\n this.setDefaultHiddenValue();\n this.addEventHandlers();\n }\n\n async setInitialValues() {\n this.setLangugaeCode();\n this.setFirstValidDate();\n\n this.hourArr = this.getNumbersAsStringArr(6, 22, 1);\n this.minuteArr = this.getNumbersAsStringArr(0, 50, 10);\n }\n\n setFirstValidDate() {\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 + 2;\n\n this.firstValidDateString = `${year.toString()}-${month}-${day}`;\n this.lastValidDateString = `${endYear.toString()}-${month}-${day}`;\n }\n\n setLangugaeCode() {\n if (typeof this.languageCode === 'string' && this.languageCode.trim() === '') {\n this.language = document.querySelector('html').lang;\n } else {\n this.language = this.languageCode;\n }\n }\n\n setDefaultHiddenValue() {\n this.selectedFromHour = parseInt(this.hourArr[8]);\n this.selectedFromMin = 0;\n this.selectedToHour = parseInt(this.hourArr[12]);\n this.selectedToMin = 0;\n\n this.updateHiddenValue();\n }\n\n addEventHandlers() {\n this.pnDatePicker.addEventListener('dateselection', this.handleChange.bind(this));\n\n this.pnTimeFromHourDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeFromMinuteDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeToHourDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n this.pnTimeToMinuteDropdown.addEventListener('selectchange', this.handleChange.bind(this));\n }\n\n handleChange(e) {\n const target = e.target;\n\n if (target === this.pnDatePicker) {\n this.selectedDate = e.detail;\n }\n\n if (target === this.pnTimeFromHourDropdown || target === this.pnTimeFromMinuteDropdown || target === this.pnTimeToHourDropdown || target === this.pnTimeToMinuteDropdown) {\n this.handleTimeChange();\n }\n\n this.updateHiddenValue();\n }\n\n handleTimeChange() {\n const fromHourString = this.pnTimeFromHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const fromMinString = this.pnTimeFromMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toHourString = this.pnTimeToHourDropdown.querySelector('[aria-selected=true]')?.textContent;\n const toMinString = this.pnTimeToMinuteDropdown.querySelector('[aria-selected=true]')?.textContent;\n\n this.selectedFromHour = parseInt(fromHourString);\n this.selectedFromMin = parseInt(fromMinString);\n this.selectedToHour = parseInt(toHourString);\n this.selectedToMin = parseInt(toMinString);\n }\n\n updateHiddenValue() {\n const date = new Date();\n const dateFrom = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedFromHour, this.selectedFromMin, 0, 0);\n const dateTo = new Date(date.getFullYear(), date.getMonth(), date.getDate(), this.selectedToHour, this.selectedToMin, 0, 0);\n this.validateTimeRange(dateFrom.getTime(), dateTo.getTime());\n\n if (this.invalidTimespan || !this.selectedDate) {\n this.formValue = '';\n } else {\n const fromMin = this.selectedFromMin.toString().padStart(2, '0');\n const toMin = this.selectedToMin.toString().padStart(2, '0');\n\n this.formValue = `${this.selectedDate}, ${this.selectedFromHour}:${fromMin}-${this.selectedToHour}:${toMin}`;\n }\n\n this.dateandtimerange.emit(this.formValue);\n }\n\n validateTimeRange(from: number, to: number) {\n let differenceValue = (to - from) / 1000;\n differenceValue /= 60;\n this.invalidTimespan = differenceValue < this.validTimeRangeMinutes ? true : false;\n }\n\n getNumbersAsStringArr(start: number, stop: number, step: number) {\n const arr = Array.from({ length: (stop - start) / step + 1 }, (_, index: number) => start + index * step);\n const result: string[] = [];\n\n arr.forEach(item => {\n const itemAsString = item.toString().padStart(2, '0');\n result.push(itemAsString);\n });\n\n return result;\n }\n\n removePnOptionSelected() {\n const selectOptions = this.hostElement.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n }\n\n render() {\n return (\n <Host>\n <div class=\"date-and-time-group\">\n {this.dateAndTimeLabel ? (\n <div class=\"date-and-time-row\">\n <label>{this.dateAndTimeLabel}</label>\n </div>\n ) : null}\n <div class=\"date-and-time-row\">\n <pn-date-picker\n ref={el => (this.pnDatePicker = el as HTMLElement)}\n range=\"false\"\n disable-weekends={this.disableWeekends}\n min-date={this.firstValidDateString}\n max-date={this.lastValidDateString}\n language={this.language}\n placeholder={this.datePlacehodler}\n ></pn-date-picker>\n </div>\n\n {this.dateHelperText ? <small class=\"date-and-time-row helper-text\">{this.dateHelperText}</small> : null}\n </div>\n <div class=\"date-and-time-group\">\n <div class=\"date-and-time-row\">\n <pn-select\n ref={el => (this.pnTimeFromHourDropdown = el as HTMLElement)}\n name=\"date-and-time-from-houre\"\n placeholder={this.hourArr[8]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeFromMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-from-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n <div class=\"time-separator\">\n <span>-</span>\n </div>\n <pn-select\n ref={el => (this.pnTimeToHourDropdown = el as HTMLElement)}\n name=\"date-and-time-to-hour\"\n placeholder={this.hourArr[12]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.hourArr?.map((hour: string) => <pn-option label={hour} value={hour}></pn-option>)}\n </pn-select>\n <pn-select\n ref={el => (this.pnTimeToMinuteDropdown = el as HTMLElement)}\n name=\"date-and-time-to-minute\"\n placeholder={this.minuteArr[0]}\n class=\"date-and-time-dropdown--time\"\n invalid={this.invalidTimespan}\n >\n {this.minuteArr?.map((minute: string) => <pn-option label={minute} value={minute}></pn-option>)}\n </pn-select>\n </div>\n {this.timeHelperText ? <small class=\"date-and-time-row helper-text\">{this.timeHelperText}</small> : null}\n\n {this.invalidTimespan && this.errorMessage ? (\n <small class=\"date-and-time-row error-message\">\n <pn-icon icon={alert_info_circle} small=\"false\" color=\"warning\" />\n {this.errorMessage}\n </small>\n ) : null}\n </div>\n </Host>\n );\n }\n}\n"]}
|
package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js
CHANGED
|
@@ -3,25 +3,8 @@ import debounce from "debounce";
|
|
|
3
3
|
import { alert_exclamation_circle } from "pn-design-assets/pn-assets/icons.js";
|
|
4
4
|
export class pnDropdownChoiceAddsRow {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.pnRowSelectDropdown = null;
|
|
7
|
-
this.tableHead = null;
|
|
8
|
-
this.tableBody = null;
|
|
9
|
-
this.formRowEvent = e => {
|
|
10
|
-
var _a;
|
|
11
|
-
const debouncedAddValue = debounce(this.updateHiddenFieldValue.bind(this), 500);
|
|
12
|
-
if (e.target.matches('input')) {
|
|
13
|
-
['change', 'keyup'].forEach(eventName => {
|
|
14
|
-
e.target.addEventListener(eventName, debouncedAddValue);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
const rowDropdown = (_a = e.target.closest('.generated-table-row')) === null || _a === void 0 ? void 0 : _a.querySelector('pn-select');
|
|
19
|
-
if (rowDropdown) {
|
|
20
|
-
rowDropdown.addEventListener('selectOption', debouncedAddValue);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
6
|
this.dropdownData = null;
|
|
7
|
+
this.languageCode = null;
|
|
25
8
|
this.addRowDropdownName = '';
|
|
26
9
|
this.addRowDropdownPlaceholder = '';
|
|
27
10
|
this.addRowDropdownLabel = '';
|
|
@@ -39,6 +22,12 @@ export class pnDropdownChoiceAddsRow {
|
|
|
39
22
|
this.showWarning = false;
|
|
40
23
|
this.formValue = null;
|
|
41
24
|
}
|
|
25
|
+
hostElement;
|
|
26
|
+
pnRowSelectDropdown = null;
|
|
27
|
+
tableHead = null;
|
|
28
|
+
tableBody = null;
|
|
29
|
+
_dropdownData;
|
|
30
|
+
rowvalues;
|
|
42
31
|
dropdownDataWatcher() {
|
|
43
32
|
if (typeof this.dropdownData === 'string') {
|
|
44
33
|
this._dropdownData = JSON.parse(this.dropdownData);
|
|
@@ -68,22 +57,35 @@ export class pnDropdownChoiceAddsRow {
|
|
|
68
57
|
this.rowSelectDropdownArr.push(element.label);
|
|
69
58
|
});
|
|
70
59
|
}
|
|
60
|
+
formRowEvent = e => {
|
|
61
|
+
const debouncedAddValue = debounce(this.updateHiddenFieldValue.bind(this), 500);
|
|
62
|
+
if (e.target.matches('input')) {
|
|
63
|
+
['change', 'keyup'].forEach(eventName => {
|
|
64
|
+
e.target.addEventListener(eventName, debouncedAddValue);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
const rowDropdown = e.target.closest('.generated-table-row')?.querySelector('pn-select');
|
|
69
|
+
if (rowDropdown) {
|
|
70
|
+
rowDropdown.addEventListener('selectOption', debouncedAddValue);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
71
74
|
updateHiddenFieldValue() {
|
|
72
75
|
const allRows = [...this.tableBody.querySelectorAll('tr')];
|
|
73
76
|
const columnValueCount = this.rowHasDropdown ? 3 : 2;
|
|
74
77
|
const formValues = [];
|
|
75
78
|
if (allRows.length) {
|
|
76
79
|
allRows.forEach(elm => {
|
|
77
|
-
var _a, _b, _c;
|
|
78
80
|
const row = { row: [] };
|
|
79
81
|
const nameElm = elm.querySelector('.tr-name');
|
|
80
82
|
const dropdownElm = elm.querySelector('.tr-dropdown');
|
|
81
83
|
const inputElm = elm.querySelector('.tr-input');
|
|
82
|
-
const nameValue = { name: this.rowNameLabel, value: nameElm
|
|
84
|
+
const nameValue = { name: this.rowNameLabel, value: nameElm?.innerHTML };
|
|
83
85
|
row.row.push(nameValue);
|
|
84
86
|
const dropdown = dropdownElm.querySelector('.current-selection');
|
|
85
87
|
if (dropdown) {
|
|
86
|
-
const dropdownSelection =
|
|
88
|
+
const dropdownSelection = dropdown.textContent ?? '';
|
|
87
89
|
if (dropdownSelection.length) {
|
|
88
90
|
const dropdownValue = {
|
|
89
91
|
name: this.rowDropdownLabel,
|
|
@@ -99,7 +101,7 @@ export class pnDropdownChoiceAddsRow {
|
|
|
99
101
|
};
|
|
100
102
|
row.row.push(dropdownValue);
|
|
101
103
|
}
|
|
102
|
-
const inputValue = parseInt(
|
|
104
|
+
const inputValue = parseInt(inputElm.querySelector('input')?.value ?? '0');
|
|
103
105
|
if (inputValue > 0) {
|
|
104
106
|
const inputColumnValue = { name: this.rowInputLabel, value: inputValue.toString() };
|
|
105
107
|
row.row.push(inputColumnValue);
|
|
@@ -121,7 +123,7 @@ export class pnDropdownChoiceAddsRow {
|
|
|
121
123
|
}
|
|
122
124
|
addRowElement() {
|
|
123
125
|
const selected = this.pnRowSelectDropdown.querySelector('[aria-selected=true]');
|
|
124
|
-
const selectedValue = selected
|
|
126
|
+
const selectedValue = selected?.textContent;
|
|
125
127
|
const slotElm = this.tableBody;
|
|
126
128
|
const newRow = document.createElement('tr');
|
|
127
129
|
newRow.setAttribute('index', `${this.nextRowIndex}`);
|
|
@@ -154,14 +156,13 @@ export class pnDropdownChoiceAddsRow {
|
|
|
154
156
|
const selectedOptionValues = [];
|
|
155
157
|
const currentRow = this.getCurrentRow(selectedValue);
|
|
156
158
|
currentRow.forEach(row => {
|
|
157
|
-
|
|
158
|
-
selectedOptionValues.push((_b = (_a = row.parentElement) === null || _a === void 0 ? void 0 : _a.querySelector('.tr-dropdown [aria-selected=true]')) === null || _b === void 0 ? void 0 : _b.textContent);
|
|
159
|
+
selectedOptionValues.push(row.parentElement?.querySelector('.tr-dropdown [aria-selected=true]')?.textContent);
|
|
159
160
|
});
|
|
160
161
|
if (Array.isArray(selectedItem.values) && selectedItem.values.length) {
|
|
161
162
|
const dropdown = document.createElement('pn-select');
|
|
162
163
|
dropdown.setAttribute('name', `${selectedValue}-dropdown`);
|
|
163
164
|
dropdown.setAttribute('placeholder', this.rowDropdownPlaceholder);
|
|
164
|
-
const filtereredValues = selectedItem.values.filter(item => !
|
|
165
|
+
const filtereredValues = selectedItem.values.filter(item => !selectedOptionValues?.includes(item.value));
|
|
165
166
|
filtereredValues.forEach(childItem => {
|
|
166
167
|
const childOption = document.createElement('pn-option');
|
|
167
168
|
childOption.setAttribute("label", childItem.label);
|
|
@@ -195,12 +196,11 @@ export class pnDropdownChoiceAddsRow {
|
|
|
195
196
|
}
|
|
196
197
|
updateRowSelectDropdown() {
|
|
197
198
|
const rows = [].map.call(this.tableBody.querySelectorAll('.tr-name'), el => {
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
const dropdownPlaceholder = (_b = dropdownColumn === null || dropdownColumn === void 0 ? void 0 : dropdownColumn.querySelector('.pn-select-content span')) === null || _b === void 0 ? void 0 : _b.textContent;
|
|
199
|
+
const dropdownColumn = el?.parentElement?.querySelector('.tr-dropdown');
|
|
200
|
+
const dropdownPlaceholder = dropdownColumn?.querySelector('.pn-select-content span')?.textContent;
|
|
201
201
|
const row = {
|
|
202
|
-
rowName: el
|
|
203
|
-
selectedValue:
|
|
202
|
+
rowName: el?.innerHTML,
|
|
203
|
+
selectedValue: dropdownColumn?.querySelector('[aria-selected=true]')?.textContent,
|
|
204
204
|
placeholder: dropdownPlaceholder,
|
|
205
205
|
};
|
|
206
206
|
return row;
|
|
@@ -246,17 +246,15 @@ export class pnDropdownChoiceAddsRow {
|
|
|
246
246
|
}
|
|
247
247
|
let totalInput = 0;
|
|
248
248
|
allRows.forEach(element => {
|
|
249
|
-
var _a;
|
|
250
249
|
const inputField = element.querySelector('pn-marketweb-input');
|
|
251
250
|
if (inputField.value) {
|
|
252
|
-
totalInput +=
|
|
251
|
+
totalInput += parseInt(inputField.value) ?? 0;
|
|
253
252
|
}
|
|
254
253
|
});
|
|
255
254
|
this.showWarning = totalInput > this.totalInputLimit ? true : false;
|
|
256
255
|
}
|
|
257
256
|
render() {
|
|
258
|
-
|
|
259
|
-
return (h(Host, { key: 'e42637fdfbc059fe081da8fb8af2a2469f357d15' }, h("div", { key: 'da4240a50ed0be9b937bbcb998ca26569c1ffd8c', class: "dropdown-choice-form-row" }, h("pn-select", { key: '7b57bbef46778d4ce63b937e80b2df10501e36c5', ref: el => (this.pnRowSelectDropdown = el), name: this.addRowDropdownName, placeholder: this.addRowDropdownPlaceholder, label: this.addRowDropdownLabel, class: "pn-row-select-dropdown", "empty-option": "true" }, (_a = this.rowSelectDropdownArr) === null || _a === void 0 ? void 0 : _a.map((value) => h("pn-option", { label: value, value: value })))), h("div", { key: 'ae290b0a39886fead6a6cf6cff9e7ff0329b0cf2', class: "dropdown-choice-form-row" }, h("table", { key: '1fac0a253d5ea42876bda4a32dd43db1223bd650', class: "pn-dropdown-choice-table" }, h("thead", { key: 'dc119ee9a215b433e480d3ace1a04fc4c093fe5a', ref: el => (this.tableHead = el) }, this.nextRowIndex === 0 ? null : (h("tr", null, h("th", { class: "table-header--name" }, h("label", null, this.rowNameLabel)), this.rowHasDropdown ? (h("th", { class: "table-header--dropdown" }, h("label", null, this.rowDropdownLabel))) : null, h("th", { class: "table-header--input" }, h("label", null, this.rowInputLabel)), h("th", { class: "table-header--delete" })))), h("tbody", { key: '334d8505ff7214e80cf26ae638134b8efedf1c6e', ref: el => (this.tableBody = el), class: "pn-dropdown-choice-table-slot" }, h("slot", { key: '40463ee8d5959bb3c2fbf10d7256883699eaf5ca' })), h("tfoot", { key: '8bc7637282d2e5656096233a7b431ae6d9961972' }, this.showWarning ? (h("tr", null, h("td", { colSpan: this.columnCount }, h("pn-icon", { icon: alert_exclamation_circle, small: true, color: "warning" }), h("small", { class: "dropdown-choice-error-message" }, this.inputLimitWarning)))) : null)))));
|
|
257
|
+
return (h(Host, { key: 'a89919e962a274e3ad61e52821081cb3cc30e7d2' }, h("div", { key: 'a0c2b1338c64590db11bcdb550993dbecef5d3bb', class: "dropdown-choice-form-row" }, h("pn-select", { key: '3907fa6ea69ccb68462626a06804c5b72b6c44d8', ref: el => (this.pnRowSelectDropdown = el), name: this.addRowDropdownName, placeholder: this.addRowDropdownPlaceholder, label: this.addRowDropdownLabel, class: "pn-row-select-dropdown", "empty-option": "true", language: this.languageCode }, this.rowSelectDropdownArr?.map((value) => h("pn-option", { label: value, value: value })))), h("div", { key: '85b44d5c44bf07ad9a775f052929b32803725e77', class: "dropdown-choice-form-row" }, h("table", { key: '4910bda32683fd621c9d78f3a24a206bb7f079a5', class: "pn-dropdown-choice-table" }, h("thead", { key: '7dea2804e6a1a1cb40be105a65cc3368e1e17ba6', ref: el => (this.tableHead = el) }, this.nextRowIndex === 0 ? null : (h("tr", null, h("th", { class: "table-header--name" }, h("label", null, this.rowNameLabel)), this.rowHasDropdown ? (h("th", { class: "table-header--dropdown" }, h("label", null, this.rowDropdownLabel))) : null, h("th", { class: "table-header--input" }, h("label", null, this.rowInputLabel)), h("th", { class: "table-header--delete" })))), h("tbody", { key: '71b7e0e23703179e3d922ad0045e9a0264b3253a', ref: el => (this.tableBody = el), class: "pn-dropdown-choice-table-slot" }, h("slot", { key: '93b5dd3bfc2907bef2c68a48b4e8364088196f8b' })), h("tfoot", { key: '403dbbc82f349d5e3ece295f36ccc3e6242a968c' }, this.showWarning ? (h("tr", null, h("td", { colSpan: this.columnCount }, h("pn-icon", { icon: alert_exclamation_circle, small: true, color: "warning" }), h("small", { class: "dropdown-choice-error-message" }, this.inputLimitWarning)))) : null)))));
|
|
260
258
|
}
|
|
261
259
|
static get is() { return "pn-dropdown-choice-adds-row"; }
|
|
262
260
|
static get originalStyleUrls() {
|
|
@@ -295,6 +293,24 @@ export class pnDropdownChoiceAddsRow {
|
|
|
295
293
|
"reflect": false,
|
|
296
294
|
"defaultValue": "null"
|
|
297
295
|
},
|
|
296
|
+
"languageCode": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "string",
|
|
301
|
+
"resolved": "string",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": ""
|
|
309
|
+
},
|
|
310
|
+
"attribute": "language-code",
|
|
311
|
+
"reflect": false,
|
|
312
|
+
"defaultValue": "null"
|
|
313
|
+
},
|
|
298
314
|
"addRowDropdownName": {
|
|
299
315
|
"type": "string",
|
|
300
316
|
"mutable": false,
|
package/collection/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pn-dropdown-choice-adds-row.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAErG,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,MAAM,OAAO,uBAAuB;;QAElC,wBAAmB,GAAgB,IAAI,CAAC;QACxC,cAAS,GAAgB,IAAI,CAAC;QAC9B,cAAS,GAAgB,IAAI,CAAC;QA2D9B,iBAAY,GAAG,CAAC,CAAC,EAAE;;YACjB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YAEhF,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC9B,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;oBACtC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;gBAC1D,CAAC,CAAC,CAAC;YACL,CAAC;iBAAM,CAAC;gBACN,MAAM,WAAW,GAAG,MAAA,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CAAC,CAClB;wBACE,UAAI,OAAO,EAAE,IAAI,CAAC,WAAW;4BAC3B,eAAS,IAAI,EAAE,wBAAwB,EAAE,KAAK,QAAC,KAAK,EAAC,SAAS,GAAW;4BACzE,aAAO,KAAK,EAAC,+BAA+B,IAAE,IAAI,CAAC,iBAAiB,CAAS,CAC1E,CACF,CACN,CAAC,CAAC,CAAC,IAAI,CACF,CACF,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter } from '@stencil/core';\nimport { FormValue, RowValue, Root } from './types';\nimport debounce from 'debounce';\nimport { alert_exclamation_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-choice-adds-row',\n styleUrl: 'pn-dropdown-choice-adds-row.scss',\n})\nexport class pnDropdownChoiceAddsRow {\n @Element() hostElement: Element;\n pnRowSelectDropdown: HTMLElement = null;\n tableHead: HTMLElement = null;\n tableBody: HTMLElement = null;\n private _dropdownData: Root[];\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() addRowDropdownName: string = '';\n @Prop() addRowDropdownPlaceholder: string = '';\n @Prop() addRowDropdownLabel: string = '';\n @Prop() rowNameLabel: string = '';\n @Prop() rowHasDropdown: boolean = true;\n @Prop() rowDropdownLabel: string = '';\n @Prop() rowDropdownPlaceholder: string = '';\n @Prop() rowInputLabel: string = '';\n @Prop() rowDeleteButtonText: string = '';\n @Prop() totalInputLimit: number = 0;\n @Prop() inputLimitWarning: string = null;\n\n @State() nextRowIndex: number = null;\n @State() rowSelectDropdownArr: string[] = null;\n @State() columnCount: number = null;\n @State() showWarning: boolean = false;\n @State() formValue: string = null;\n\n @Event() rowvalues: EventEmitter<string>;\n\n @Watch('dropdownData')\n dropdownDataWatcher() {\n if (typeof this.dropdownData === 'string') {\n this._dropdownData = JSON.parse(this.dropdownData);\n } else {\n this._dropdownData = this.dropdownData;\n }\n }\n\n componentWillLoad() {\n this.dropdownDataWatcher();\n }\n\n componentDidLoad() {\n this.setInitialValues();\n this.addEventHandlers();\n }\n\n addEventHandlers() {\n this.pnRowSelectDropdown.addEventListener('selectOption', debounce(this.addRowElement.bind(this), 500));\n }\n\n setInitialValues() {\n this.nextRowIndex = 0;\n this.columnCount = this.rowHasDropdown ? 4 : 3;\n this.setRowSelectDropdownArr();\n }\n\n setRowSelectDropdownArr() {\n this.rowSelectDropdownArr = [];\n this._dropdownData.forEach(element => {\n this.rowSelectDropdownArr.push(element.label);\n });\n }\n\n formRowEvent = e => {\n const debouncedAddValue = debounce(this.updateHiddenFieldValue.bind(this), 500);\n\n if (e.target.matches('input')) {\n ['change', 'keyup'].forEach(eventName => {\n e.target.addEventListener(eventName, debouncedAddValue);\n });\n } else {\n const rowDropdown = e.target.closest('.generated-table-row')?.querySelector('pn-select') as HTMLElement;\n if (rowDropdown) {\n rowDropdown.addEventListener('selectOption', debouncedAddValue);\n }\n }\n };\n\n updateHiddenFieldValue() {\n const allRows = [...this.tableBody.querySelectorAll('tr')];\n const columnValueCount = this.rowHasDropdown ? 3 : 2;\n const formValues: FormValue[] = [];\n\n if (allRows.length) {\n allRows.forEach(elm => {\n const row: FormValue = { row: [] };\n const nameElm = elm.querySelector('.tr-name');\n const dropdownElm = elm.querySelector('.tr-dropdown');\n const inputElm = elm.querySelector('.tr-input');\n\n const nameValue: RowValue = { name: this.rowNameLabel, value: nameElm?.innerHTML };\n row.row.push(nameValue);\n\n const dropdown = dropdownElm.querySelector('.current-selection');\n if (dropdown) {\n const dropdownSelection = dropdown.textContent ?? '';\n\n if (dropdownSelection.length) {\n const dropdownValue: RowValue = {\n name: this.rowDropdownLabel,\n value: dropdownSelection,\n };\n row.row.push(dropdownValue);\n }\n }\n if (!dropdown && columnValueCount === 3) {\n const dropdownValue: RowValue = {\n name: this.rowDropdownLabel,\n value: '',\n };\n row.row.push(dropdownValue);\n }\n\n const inputValue = parseInt(inputElm.querySelector('input')?.value ?? '0');\n if (inputValue > 0) {\n const inputColumnValue: RowValue = { name: this.rowInputLabel, value: inputValue.toString() };\n row.row.push(inputColumnValue);\n }\n\n if (row.row.length === columnValueCount) {\n formValues.push(row);\n }\n });\n }\n\n if (formValues.length && formValues.length === allRows.length) {\n const valueJsonString = JSON.stringify(formValues);\n this.formValue = `PN-JSON|${valueJsonString}`;\n } else {\n this.formValue = '';\n }\n\n this.rowvalues.emit(this.formValue);\n this.checkInputTotal();\n }\n\n addRowElement() {\n const selected = this.pnRowSelectDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n const slotElm = this.tableBody;\n const newRow = document.createElement('tr');\n newRow.setAttribute('index', `${this.nextRowIndex}`);\n newRow.setAttribute('class', 'generated-table-row');\n newRow.onclick = e => this.formRowEvent(e);\n const rowNameColumn = document.createElement('td');\n rowNameColumn.setAttribute('class', 'tr-name');\n rowNameColumn.innerHTML = selectedValue;\n rowNameColumn.dataset.name = selectedValue;\n newRow.appendChild(rowNameColumn);\n\n if (this.rowHasDropdown) {\n const rowDropdownColumn = this.createDropdownColumn(selectedValue);\n newRow.appendChild(rowDropdownColumn);\n }\n\n const rowInputColumn = this.createInputColumn(selectedValue);\n newRow.appendChild(rowInputColumn);\n const deleteButton = this.createDeleteButtonColumn();\n newRow.appendChild(deleteButton);\n\n slotElm.appendChild(newRow);\n this.updateRowSelectDropdown();\n this.nextRowIndex++;\n }\n\n getCurrentRow(selectedValue: string) {\n return this.hostElement.querySelectorAll(`.tr-name[data-name='${selectedValue}'`);\n }\n\n createDropdownColumn(selectedValue: string) {\n const dropdownColumn = document.createElement('td');\n dropdownColumn.setAttribute('class', 'tr-dropdown');\n const selectedItem = this._dropdownData.find(arr => arr.label === selectedValue);\n const selectedOptionValues = [];\n const currentRow = this.getCurrentRow(selectedValue);\n\n currentRow.forEach(row => {\n selectedOptionValues.push(row.parentElement?.querySelector('.tr-dropdown [aria-selected=true]')?.textContent);\n });\n\n if (Array.isArray(selectedItem.values) && selectedItem.values.length) {\n const dropdown = document.createElement('pn-select');\n dropdown.setAttribute('name', `${selectedValue}-dropdown`);\n dropdown.setAttribute('placeholder', this.rowDropdownPlaceholder);\n\n const filtereredValues = selectedItem.values.filter(item => !selectedOptionValues?.includes(item.value));\n\n filtereredValues.forEach(childItem => {\n const childOption = document.createElement('pn-option');\n childOption.setAttribute(\"label\", childItem.label);\n childOption.setAttribute(\"value\", childItem.label)\n dropdown.appendChild(childOption);\n });\n\n dropdownColumn.appendChild(dropdown);\n }\n\n return dropdownColumn;\n }\n\n createInputColumn(selectedValue: string) {\n const inputColumn = document.createElement('td');\n inputColumn.setAttribute('class', 'tr-input');\n const inputElm = document.createElement('pn-marketweb-input');\n inputElm.setAttribute('type', 'number');\n inputElm.setAttribute('name', `${selectedValue}-input`);\n inputElm.setAttribute('placeholder', '0');\n inputColumn.appendChild(inputElm);\n return inputColumn;\n }\n\n createDeleteButtonColumn() {\n const buttonColumn = document.createElement('td');\n buttonColumn.setAttribute('class', 'tr-delete');\n const buttonElm = document.createElement('pn-button');\n buttonElm.onclick = e => this.deleteRow(e);\n buttonElm.setAttribute('appearance', 'warning');\n buttonElm.setAttribute('small', 'true');\n buttonElm.appendChild(document.createTextNode(this.rowDeleteButtonText));\n buttonColumn.appendChild(buttonElm);\n return buttonColumn;\n }\n\n updateRowSelectDropdown() {\n type Row = { rowName: string; selectedValue: string; placeholder: string };\n\n const rows: Row[] = [].map.call(this.tableBody.querySelectorAll('.tr-name'), el => {\n const dropdownColumn = el?.parentElement?.querySelector('.tr-dropdown');\n const dropdownPlaceholder = dropdownColumn?.querySelector('.pn-select-content span')?.textContent;\n const row: Row = {\n rowName: el?.innerHTML,\n selectedValue: dropdownColumn?.querySelector('[aria-selected=true]')?.textContent,\n placeholder: dropdownPlaceholder,\n };\n return row;\n });\n\n if (rows.length) {\n this.rowSelectDropdownArr = [];\n\n this._dropdownData.forEach(element => {\n const filteredRows = rows.filter(row => row.rowName === element.label);\n const mainOptionReachedMaxPossibleRows =\n (element.values.length > 0 && filteredRows.length >= element.values.length) || (element.values.length === 0 && filteredRows.length === 1);\n if (!mainOptionReachedMaxPossibleRows) {\n this.rowSelectDropdownArr.push(element.label);\n }\n });\n } else {\n this.setRowSelectDropdownArr();\n }\n\n const selectOptions = this.pnRowSelectDropdown.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n\n const placeholder = this.pnRowSelectDropdown.querySelector('.pn-select-content span');\n placeholder.innerHTML = this.addRowDropdownPlaceholder;\n\n this.updateHiddenFieldValue();\n }\n\n deleteRow(e: Event) {\n e.preventDefault();\n this.nextRowIndex--;\n const targetElm = e.currentTarget as HTMLButtonElement;\n const targetRow = targetElm.closest('tr');\n targetRow.remove();\n const allRows = [...this.tableBody.querySelectorAll('tr')];\n\n allRows.map((elm, index) => {\n elm.setAttribute('index', `${index}`);\n });\n\n this.updateRowSelectDropdown();\n }\n\n checkInputTotal() {\n const allRows = this.tableBody.querySelectorAll('tr');\n\n if (this.totalInputLimit === 0 || allRows.length < 1) {\n this.showWarning = false;\n return;\n }\n\n let totalInput = 0;\n\n allRows.forEach(element => {\n const inputField = element.querySelector('pn-marketweb-input');\n if (inputField.value) {\n totalInput += parseInt(inputField.value) ?? 0;\n }\n });\n this.showWarning = totalInput > this.totalInputLimit ? true : false;\n }\n\n render() {\n return (\n <Host>\n <div class=\"dropdown-choice-form-row\">\n <pn-select\n ref={el => (this.pnRowSelectDropdown = el as HTMLElement)}\n name={this.addRowDropdownName}\n placeholder={this.addRowDropdownPlaceholder}\n label={this.addRowDropdownLabel}\n class=\"pn-row-select-dropdown\"\n empty-option=\"true\"\n >\n {this.rowSelectDropdownArr?.map((value: string) => <pn-option label={value} value={value}></pn-option>)}\n </pn-select>\n </div>\n <div class=\"dropdown-choice-form-row\">\n <table class=\"pn-dropdown-choice-table\">\n <thead ref={el => (this.tableHead = el as HTMLElement)}>\n {this.nextRowIndex === 0 ? null : (\n <tr>\n <th class=\"table-header--name\">\n <label>{this.rowNameLabel}</label>\n </th>\n {this.rowHasDropdown ? (\n <th class=\"table-header--dropdown\">\n <label>{this.rowDropdownLabel}</label>\n </th>\n ) : null}\n <th class=\"table-header--input\">\n <label>{this.rowInputLabel}</label>\n </th>\n <th class=\"table-header--delete\"></th>\n </tr>\n )}\n </thead>\n <tbody ref={el => (this.tableBody = el as HTMLElement)} class=\"pn-dropdown-choice-table-slot\">\n <slot></slot>\n </tbody>\n <tfoot>\n {this.showWarning ? (\n <tr>\n <td colSpan={this.columnCount}>\n <pn-icon icon={alert_exclamation_circle} small color=\"warning\"></pn-icon>\n <small class=\"dropdown-choice-error-message\">{this.inputLimitWarning}</small>\n </td>\n </tr>\n ) : null}\n </tfoot>\n </table>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pn-dropdown-choice-adds-row.js","sourceRoot":"","sources":["../../../../src/components/input/pn-dropdown-choice-adds-row/pn-dropdown-choice-adds-row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAErG,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAM/E,MAAM,OAAO,uBAAuB;;4BAOM,IAAI;4BACb,IAAI;kCACE,EAAE;yCACK,EAAE;mCACR,EAAE;4BACT,EAAE;8BACC,I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C,qBAAqB;4BAC7B,iBAAQ,IAAI,CAAC,aAAa,CAAS,CAChC;wBACL,UAAI,KAAK,EAAC,sBAAsB,GAAM,CACnC,CACN,CACK;oBACR,8DAAO,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,EAAiB,CAAC,EAAE,KAAK,EAAC,+BAA+B;wBAC3F,8DAAa,CACP;oBACR,gEACG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAClB;wBACE,UAAI,OAAO,EAAE,IAAI,CAAC,WAAW;4BAC3B,eAAS,IAAI,EAAE,wBAAwB,EAAE,KAAK,QAAC,KAAK,EAAC,SAAS,GAAW;4BACzE,aAAO,KAAK,EAAC,+BAA+B,IAAE,IAAI,CAAC,iBAAiB,CAAS,CAC1E,CACF,CACN,CAAC,CAAC,CAAC,IAAI,CACF,CACF,CACJ,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, h, Element, State, Host, Watch, Event, EventEmitter } from '@stencil/core';\nimport { FormValue, RowValue, Root } from './types';\nimport debounce from 'debounce';\nimport { alert_exclamation_circle } from 'pn-design-assets/pn-assets/icons.js';\n\n@Component({\n tag: 'pn-dropdown-choice-adds-row',\n styleUrl: 'pn-dropdown-choice-adds-row.scss',\n})\nexport class pnDropdownChoiceAddsRow {\n @Element() hostElement: Element;\n pnRowSelectDropdown: HTMLElement = null;\n tableHead: HTMLElement = null;\n tableBody: HTMLElement = null;\n private _dropdownData: Root[];\n\n @Prop() dropdownData: string | Root[] = null;\n @Prop() languageCode: string = null;\n @Prop() addRowDropdownName: string = '';\n @Prop() addRowDropdownPlaceholder: string = '';\n @Prop() addRowDropdownLabel: string = '';\n @Prop() rowNameLabel: string = '';\n @Prop() rowHasDropdown: boolean = true;\n @Prop() rowDropdownLabel: string = '';\n @Prop() rowDropdownPlaceholder: string = '';\n @Prop() rowInputLabel: string = '';\n @Prop() rowDeleteButtonText: string = '';\n @Prop() totalInputLimit: number = 0;\n @Prop() inputLimitWarning: string = null;\n\n @State() nextRowIndex: number = null;\n @State() rowSelectDropdownArr: string[] = null;\n @State() columnCount: number = null;\n @State() showWarning: boolean = false;\n @State() formValue: string = null;\n\n @Event() rowvalues: EventEmitter<string>;\n\n @Watch('dropdownData')\n dropdownDataWatcher() {\n if (typeof this.dropdownData === 'string') {\n this._dropdownData = JSON.parse(this.dropdownData);\n } else {\n this._dropdownData = this.dropdownData;\n }\n }\n\n componentWillLoad() {\n this.dropdownDataWatcher();\n }\n\n componentDidLoad() {\n this.setInitialValues();\n this.addEventHandlers();\n }\n\n addEventHandlers() {\n this.pnRowSelectDropdown.addEventListener('selectOption', debounce(this.addRowElement.bind(this), 500));\n }\n\n setInitialValues() {\n this.nextRowIndex = 0;\n this.columnCount = this.rowHasDropdown ? 4 : 3;\n this.setRowSelectDropdownArr();\n }\n\n setRowSelectDropdownArr() {\n this.rowSelectDropdownArr = [];\n this._dropdownData.forEach(element => {\n this.rowSelectDropdownArr.push(element.label);\n });\n }\n\n formRowEvent = e => {\n const debouncedAddValue = debounce(this.updateHiddenFieldValue.bind(this), 500);\n\n if (e.target.matches('input')) {\n ['change', 'keyup'].forEach(eventName => {\n e.target.addEventListener(eventName, debouncedAddValue);\n });\n } else {\n const rowDropdown = e.target.closest('.generated-table-row')?.querySelector('pn-select') as HTMLElement;\n if (rowDropdown) {\n rowDropdown.addEventListener('selectOption', debouncedAddValue);\n }\n }\n };\n\n updateHiddenFieldValue() {\n const allRows = [...this.tableBody.querySelectorAll('tr')];\n const columnValueCount = this.rowHasDropdown ? 3 : 2;\n const formValues: FormValue[] = [];\n\n if (allRows.length) {\n allRows.forEach(elm => {\n const row: FormValue = { row: [] };\n const nameElm = elm.querySelector('.tr-name');\n const dropdownElm = elm.querySelector('.tr-dropdown');\n const inputElm = elm.querySelector('.tr-input');\n\n const nameValue: RowValue = { name: this.rowNameLabel, value: nameElm?.innerHTML };\n row.row.push(nameValue);\n\n const dropdown = dropdownElm.querySelector('.current-selection');\n if (dropdown) {\n const dropdownSelection = dropdown.textContent ?? '';\n\n if (dropdownSelection.length) {\n const dropdownValue: RowValue = {\n name: this.rowDropdownLabel,\n value: dropdownSelection,\n };\n row.row.push(dropdownValue);\n }\n }\n if (!dropdown && columnValueCount === 3) {\n const dropdownValue: RowValue = {\n name: this.rowDropdownLabel,\n value: '',\n };\n row.row.push(dropdownValue);\n }\n\n const inputValue = parseInt(inputElm.querySelector('input')?.value ?? '0');\n if (inputValue > 0) {\n const inputColumnValue: RowValue = { name: this.rowInputLabel, value: inputValue.toString() };\n row.row.push(inputColumnValue);\n }\n\n if (row.row.length === columnValueCount) {\n formValues.push(row);\n }\n });\n }\n\n if (formValues.length && formValues.length === allRows.length) {\n const valueJsonString = JSON.stringify(formValues);\n this.formValue = `PN-JSON|${valueJsonString}`;\n } else {\n this.formValue = '';\n }\n\n this.rowvalues.emit(this.formValue);\n this.checkInputTotal();\n }\n\n addRowElement() {\n const selected = this.pnRowSelectDropdown.querySelector('[aria-selected=true]');\n const selectedValue = selected?.textContent;\n const slotElm = this.tableBody;\n const newRow = document.createElement('tr');\n newRow.setAttribute('index', `${this.nextRowIndex}`);\n newRow.setAttribute('class', 'generated-table-row');\n newRow.onclick = e => this.formRowEvent(e);\n const rowNameColumn = document.createElement('td');\n rowNameColumn.setAttribute('class', 'tr-name');\n rowNameColumn.innerHTML = selectedValue;\n rowNameColumn.dataset.name = selectedValue;\n newRow.appendChild(rowNameColumn);\n\n if (this.rowHasDropdown) {\n const rowDropdownColumn = this.createDropdownColumn(selectedValue);\n newRow.appendChild(rowDropdownColumn);\n }\n\n const rowInputColumn = this.createInputColumn(selectedValue);\n newRow.appendChild(rowInputColumn);\n const deleteButton = this.createDeleteButtonColumn();\n newRow.appendChild(deleteButton);\n\n slotElm.appendChild(newRow);\n this.updateRowSelectDropdown();\n this.nextRowIndex++;\n }\n\n getCurrentRow(selectedValue: string) {\n return this.hostElement.querySelectorAll(`.tr-name[data-name='${selectedValue}'`);\n }\n\n createDropdownColumn(selectedValue: string) {\n const dropdownColumn = document.createElement('td');\n dropdownColumn.setAttribute('class', 'tr-dropdown');\n const selectedItem = this._dropdownData.find(arr => arr.label === selectedValue);\n const selectedOptionValues = [];\n const currentRow = this.getCurrentRow(selectedValue);\n\n currentRow.forEach(row => {\n selectedOptionValues.push(row.parentElement?.querySelector('.tr-dropdown [aria-selected=true]')?.textContent);\n });\n\n if (Array.isArray(selectedItem.values) && selectedItem.values.length) {\n const dropdown = document.createElement('pn-select');\n dropdown.setAttribute('name', `${selectedValue}-dropdown`);\n dropdown.setAttribute('placeholder', this.rowDropdownPlaceholder);\n\n const filtereredValues = selectedItem.values.filter(item => !selectedOptionValues?.includes(item.value));\n\n filtereredValues.forEach(childItem => {\n const childOption = document.createElement('pn-option');\n childOption.setAttribute(\"label\", childItem.label);\n childOption.setAttribute(\"value\", childItem.label)\n dropdown.appendChild(childOption);\n });\n\n dropdownColumn.appendChild(dropdown);\n }\n\n return dropdownColumn;\n }\n\n createInputColumn(selectedValue: string) {\n const inputColumn = document.createElement('td');\n inputColumn.setAttribute('class', 'tr-input');\n const inputElm = document.createElement('pn-marketweb-input');\n inputElm.setAttribute('type', 'number');\n inputElm.setAttribute('name', `${selectedValue}-input`);\n inputElm.setAttribute('placeholder', '0');\n inputColumn.appendChild(inputElm);\n return inputColumn;\n }\n\n createDeleteButtonColumn() {\n const buttonColumn = document.createElement('td');\n buttonColumn.setAttribute('class', 'tr-delete');\n const buttonElm = document.createElement('pn-button');\n buttonElm.onclick = e => this.deleteRow(e);\n buttonElm.setAttribute('appearance', 'warning');\n buttonElm.setAttribute('small', 'true');\n buttonElm.appendChild(document.createTextNode(this.rowDeleteButtonText));\n buttonColumn.appendChild(buttonElm);\n return buttonColumn;\n }\n\n updateRowSelectDropdown() {\n type Row = { rowName: string; selectedValue: string; placeholder: string };\n\n const rows: Row[] = [].map.call(this.tableBody.querySelectorAll('.tr-name'), el => {\n const dropdownColumn = el?.parentElement?.querySelector('.tr-dropdown');\n const dropdownPlaceholder = dropdownColumn?.querySelector('.pn-select-content span')?.textContent;\n const row: Row = {\n rowName: el?.innerHTML,\n selectedValue: dropdownColumn?.querySelector('[aria-selected=true]')?.textContent,\n placeholder: dropdownPlaceholder,\n };\n return row;\n });\n\n if (rows.length) {\n this.rowSelectDropdownArr = [];\n\n this._dropdownData.forEach(element => {\n const filteredRows = rows.filter(row => row.rowName === element.label);\n const mainOptionReachedMaxPossibleRows =\n (element.values.length > 0 && filteredRows.length >= element.values.length) || (element.values.length === 0 && filteredRows.length === 1);\n if (!mainOptionReachedMaxPossibleRows) {\n this.rowSelectDropdownArr.push(element.label);\n }\n });\n } else {\n this.setRowSelectDropdownArr();\n }\n\n const selectOptions = this.pnRowSelectDropdown.querySelectorAll('pn-option');\n selectOptions.forEach(elm => {\n elm.removeAttribute('selected');\n });\n\n const placeholder = this.pnRowSelectDropdown.querySelector('.pn-select-content span');\n placeholder.innerHTML = this.addRowDropdownPlaceholder;\n\n this.updateHiddenFieldValue();\n }\n\n deleteRow(e: Event) {\n e.preventDefault();\n this.nextRowIndex--;\n const targetElm = e.currentTarget as HTMLButtonElement;\n const targetRow = targetElm.closest('tr');\n targetRow.remove();\n const allRows = [...this.tableBody.querySelectorAll('tr')];\n\n allRows.map((elm, index) => {\n elm.setAttribute('index', `${index}`);\n });\n\n this.updateRowSelectDropdown();\n }\n\n checkInputTotal() {\n const allRows = this.tableBody.querySelectorAll('tr');\n\n if (this.totalInputLimit === 0 || allRows.length < 1) {\n this.showWarning = false;\n return;\n }\n\n let totalInput = 0;\n\n allRows.forEach(element => {\n const inputField = element.querySelector('pn-marketweb-input');\n if (inputField.value) {\n totalInput += parseInt(inputField.value) ?? 0;\n }\n });\n this.showWarning = totalInput > this.totalInputLimit ? true : false;\n }\n\n render() {\n return (\n <Host>\n <div class=\"dropdown-choice-form-row\">\n <pn-select\n ref={el => (this.pnRowSelectDropdown = el as HTMLElement)}\n name={this.addRowDropdownName}\n placeholder={this.addRowDropdownPlaceholder}\n label={this.addRowDropdownLabel}\n class=\"pn-row-select-dropdown\"\n empty-option=\"true\"\n language={this.languageCode}\n >\n {this.rowSelectDropdownArr?.map((value: string) => <pn-option label={value} value={value}></pn-option>)}\n </pn-select>\n </div>\n <div class=\"dropdown-choice-form-row\">\n <table class=\"pn-dropdown-choice-table\">\n <thead ref={el => (this.tableHead = el as HTMLElement)}>\n {this.nextRowIndex === 0 ? null : (\n <tr>\n <th class=\"table-header--name\">\n <label>{this.rowNameLabel}</label>\n </th>\n {this.rowHasDropdown ? (\n <th class=\"table-header--dropdown\">\n <label>{this.rowDropdownLabel}</label>\n </th>\n ) : null}\n <th class=\"table-header--input\">\n <label>{this.rowInputLabel}</label>\n </th>\n <th class=\"table-header--delete\"></th>\n </tr>\n )}\n </thead>\n <tbody ref={el => (this.tableBody = el as HTMLElement)} class=\"pn-dropdown-choice-table-slot\">\n <slot></slot>\n </tbody>\n <tfoot>\n {this.showWarning ? (\n <tr>\n <td colSpan={this.columnCount}>\n <pn-icon icon={alert_exclamation_circle} small color=\"warning\"></pn-icon>\n <small class=\"dropdown-choice-error-message\">{this.inputLimitWarning}</small>\n </td>\n </tr>\n ) : null}\n </tfoot>\n </table>\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -3,10 +3,6 @@ import debounce from "debounce";
|
|
|
3
3
|
import { minus } from "pn-design-assets/pn-assets/icons.js";
|
|
4
4
|
export class PnDropdownWithMultiInputRowsRow {
|
|
5
5
|
constructor() {
|
|
6
|
-
this.pnFirstInputField = null;
|
|
7
|
-
this.pnSecondInputField = null;
|
|
8
|
-
this.pnDatePicker = null;
|
|
9
|
-
this.pnDeleteRowButton = null;
|
|
10
6
|
this.languageCode = null;
|
|
11
7
|
this.fristInputPlaceholder = null;
|
|
12
8
|
this.firstInputMin = null;
|
|
@@ -39,6 +35,16 @@ export class PnDropdownWithMultiInputRowsRow {
|
|
|
39
35
|
this.secondInputValue = '';
|
|
40
36
|
this.dateValue = '';
|
|
41
37
|
}
|
|
38
|
+
hostElement;
|
|
39
|
+
_predefinedValue;
|
|
40
|
+
pnFirstInputField = null;
|
|
41
|
+
pnSecondInputField = null;
|
|
42
|
+
pnDatePicker = null;
|
|
43
|
+
pnDeleteRowButton = null;
|
|
44
|
+
rowValueChange;
|
|
45
|
+
deleteRowEvent;
|
|
46
|
+
firstInputChange;
|
|
47
|
+
secondInputChange;
|
|
42
48
|
componentWillLoad() {
|
|
43
49
|
this.getPredefinedValues();
|
|
44
50
|
this.setInitialValues();
|
|
@@ -50,13 +56,12 @@ export class PnDropdownWithMultiInputRowsRow {
|
|
|
50
56
|
this._predefinedValue = JSON.parse(this.predefinedValue);
|
|
51
57
|
}
|
|
52
58
|
applyPredefinedValue() {
|
|
53
|
-
var _a, _b;
|
|
54
59
|
this.getPredefinedValues();
|
|
55
60
|
this.setInitialValues();
|
|
56
|
-
if (
|
|
61
|
+
if (this.firstInputValue?.length) {
|
|
57
62
|
this.validateFirstInput(parseInt(this.firstInputValue));
|
|
58
63
|
}
|
|
59
|
-
if (
|
|
64
|
+
if (this.secondInputValue?.length) {
|
|
60
65
|
this.validateSecondInput(parseInt(this.secondInputValue));
|
|
61
66
|
}
|
|
62
67
|
if (this.rowIndex >= this.minRowCount) {
|
|
@@ -157,8 +162,7 @@ export class PnDropdownWithMultiInputRowsRow {
|
|
|
157
162
|
this.deleteRowEvent.emit(this._predefinedValue.id);
|
|
158
163
|
}
|
|
159
164
|
render() {
|
|
160
|
-
|
|
161
|
-
return (h(Host, { key: '101265b9e24ada0da3199690b2c2f56cfd7d6a00' }, h("div", { key: 'fed264cfb3a052b3b2b5b26d2484e9787eaa3d36', class: "input-element-row" }, h("div", { key: '6161953b428a44b37defc7c3e2d6a95d79845c36', class: "input-container" }, h("pn-marketweb-input", { key: '7e155be4887029e727ac78380ab5783ce50301d4', ref: el => (this.pnFirstInputField = el), type: "number", placeholder: this.fristInputPlaceholder, value: this.firstInputValue, min: "1" }), this.showFirstInputLowError || this.showFirstInputHighError || this.showFirstInputWarning ? (h("div", { class: "input-element-message-container" }, this.showFirstInputLowError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.firstInputLowErrorText))) : null, this.showFirstInputHighError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.firstInputHighErrorText))) : null, this.showFirstInputWarning ? (h("div", { class: "input-element-message-container__warning" }, h("small", null, this.firstInputWarningText))) : null)) : null), h("div", { key: '1bad690de5ffe9e79c18614bcd3224d9fb5940fe', class: "input-container" }, h("pn-marketweb-input", { key: '7894824d20d159e2a03f131d3e348f06e7ce67a4', ref: el => (this.pnSecondInputField = el), type: "number", placeholder: this.secondInputPlaceholder, value: this.secondInputValue, min: "1" }), this.showSecondInputLowError || this.showSecondInputHighError || this.showSecondInputWarning ? (h("div", { class: "input-element-message-container" }, this.showSecondInputLowError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.secondInputLowErrorText))) : null, this.showSecondInputHighError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.secondInputHighErrorText))) : null, this.showSecondInputWarning ? (h("div", { class: "input-element-message-container__warning" }, h("small", null, this.secondInputWarningText))) : null)) : null), h("div", { key: '209e5aa157272445cb02f7634d7b503b8be34a48', class: "input-container" }, h("pn-date-picker", { key: 'e284c5c8ef3eebed689d9bd3f7ec29c11d51190d', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": true, "min-date": this.firstValidDate, "max-date": this.lastValidDate, language: this.languageCode, placeholder: this.datePlaceholder, start: ((_a = this.dateValue) === null || _a === void 0 ? void 0 : _a.length) ? this.dateValue : null })), this.rowIndex >= this.minRowCount ? (h("div", { class: "delete-button-contianer" }, h("pn-button", { ref: el => (this.pnDeleteRowButton = el), small: "true", icon: minus, appearance: "warning", index: this.rowIndex, onClick: () => {
|
|
165
|
+
return (h(Host, { key: '101265b9e24ada0da3199690b2c2f56cfd7d6a00' }, h("div", { key: 'fed264cfb3a052b3b2b5b26d2484e9787eaa3d36', class: "input-element-row" }, h("div", { key: '6161953b428a44b37defc7c3e2d6a95d79845c36', class: "input-container" }, h("pn-marketweb-input", { key: '7e155be4887029e727ac78380ab5783ce50301d4', ref: el => (this.pnFirstInputField = el), type: "number", placeholder: this.fristInputPlaceholder, value: this.firstInputValue, min: "1" }), this.showFirstInputLowError || this.showFirstInputHighError || this.showFirstInputWarning ? (h("div", { class: "input-element-message-container" }, this.showFirstInputLowError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.firstInputLowErrorText))) : null, this.showFirstInputHighError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.firstInputHighErrorText))) : null, this.showFirstInputWarning ? (h("div", { class: "input-element-message-container__warning" }, h("small", null, this.firstInputWarningText))) : null)) : null), h("div", { key: '1bad690de5ffe9e79c18614bcd3224d9fb5940fe', class: "input-container" }, h("pn-marketweb-input", { key: '7894824d20d159e2a03f131d3e348f06e7ce67a4', ref: el => (this.pnSecondInputField = el), type: "number", placeholder: this.secondInputPlaceholder, value: this.secondInputValue, min: "1" }), this.showSecondInputLowError || this.showSecondInputHighError || this.showSecondInputWarning ? (h("div", { class: "input-element-message-container" }, this.showSecondInputLowError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.secondInputLowErrorText))) : null, this.showSecondInputHighError ? (h("div", { class: "input-element-message-container__error" }, h("small", null, this.secondInputHighErrorText))) : null, this.showSecondInputWarning ? (h("div", { class: "input-element-message-container__warning" }, h("small", null, this.secondInputWarningText))) : null)) : null), h("div", { key: '209e5aa157272445cb02f7634d7b503b8be34a48', class: "input-container" }, h("pn-date-picker", { key: 'e284c5c8ef3eebed689d9bd3f7ec29c11d51190d', ref: el => (this.pnDatePicker = el), range: "false", "disable-weekends": true, "min-date": this.firstValidDate, "max-date": this.lastValidDate, language: this.languageCode, placeholder: this.datePlaceholder, start: this.dateValue?.length ? this.dateValue : null })), this.rowIndex >= this.minRowCount ? (h("div", { class: "delete-button-contianer" }, h("pn-button", { ref: el => (this.pnDeleteRowButton = el), small: "true", icon: minus, appearance: "warning", index: this.rowIndex, onClick: () => {
|
|
162
166
|
this.deleteRow();
|
|
163
167
|
} }, "Delete"))) : null)));
|
|
164
168
|
}
|