@postnord/pn-marketweb-components 1.0.43 → 1.0.45
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/{MarketWebContextService-bdc46f40.js → FetchHelper-fb0de0d3.js} +85 -0
- package/cjs/{MarketWebLoginManager-1282a883.js → MarketWebLoginManager-3c2f4423.js} +16 -1
- package/cjs/{convert-57b3dd5e.js → convert-362ef5e6.js} +134 -24
- package/cjs/{index-cd08e313.js → index-0a6b1eef.js} +23 -0
- package/cjs/{index-31d574c5.js → index-9027dc96.js} +1 -1
- package/cjs/loader.cjs.js +3 -3
- package/cjs/pn-bonus-progressbar-level.cjs.entry.js +1 -1
- package/cjs/pn-bonus-progressbar.cjs.entry.js +1 -1
- package/cjs/pn-choice-button.cjs.entry.js +39 -0
- package/cjs/pn-filter-checkbox.cjs.entry.js +1 -1
- package/cjs/pn-filter-search.cjs.entry.js +1 -1
- package/cjs/pn-find-price-result.cjs.entry.js +34 -0
- package/cjs/pn-find-price-store-346abc1a.js +24 -0
- package/cjs/pn-find-price.cjs.entry.js +243 -0
- package/cjs/{pn-choice-button_2.cjs.entry.js → pn-find-service-and-price-result.cjs.entry.js} +3 -36
- package/cjs/{pn-find-service-and-price-store-bded912f.js → pn-find-service-and-price-store-914d170b.js} +1 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +4 -4
- package/cjs/pn-language-selector_9.cjs.entry.js +8 -5
- package/cjs/pn-mainnav-link.cjs.entry.js +3 -3
- package/cjs/{pn-mainnav-store-4a3492cd.js → pn-mainnav-store-f8bacb50.js} +1 -1
- package/cjs/pn-market-web-components.cjs.js +3 -3
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +3 -4
- package/cjs/pn-marketweb-siteheader.cjs.entry.js +4 -5
- package/cjs/pn-pex-pricefinder.cjs.entry.js +1 -1
- package/cjs/pn-product-card_3.cjs.entry.js +49 -0
- package/cjs/pn-product-pricelist-result.cjs.entry.js +3 -3
- package/cjs/{pn-product-pricelist-store-8dda97db.js → pn-product-pricelist-store-d101b50e.js} +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +4 -4
- package/cjs/pn-product-tile_3.cjs.entry.js +1 -1
- package/cjs/pn-profile-selector-option.cjs.entry.js +23 -0
- package/cjs/pn-profile-selector.cjs.entry.js +12 -65
- package/cjs/pn-sidenav-level.cjs.entry.js +3 -3
- package/cjs/pn-sidenav-link.cjs.entry.js +3 -3
- package/cjs/{pn-sidenav-store-044d6595.js → pn-sidenav-store-eed02285.js} +1 -1
- package/cjs/pn-sidenav.cjs.entry.js +3 -3
- package/cjs/pn-site-footer_2.cjs.entry.js +1 -1
- package/collection/collection-manifest.json +8 -2
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader-login.js +4 -1
- package/collection/components/layout-components/pn-marketweb-siteheader/pn-marketweb-siteheader.stories.js +1 -1
- package/collection/components/navigation/pn-profile-selector/pn-profile-selector-option.css +53 -0
- package/collection/components/navigation/pn-profile-selector/pn-profile-selector-option.js +80 -0
- package/collection/components/navigation/pn-profile-selector/pn-profile-selector.css +18 -7
- package/collection/components/navigation/pn-profile-selector/pn-profile-selector.js +12 -86
- package/collection/components/navigation/pn-profile-selector/pn-profile-selector.stories.js +5 -2
- package/collection/components/navigation/pn-profile-selector/translations.js +5 -5
- package/collection/components/widgets/pn-find-price/data.js +42 -0
- package/collection/components/widgets/pn-find-price/find-price.stories.js +27 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.css +9 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-result.js +94 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-store.js +21 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-translations.js +73 -0
- package/collection/components/widgets/pn-find-price/pn-find-price-types.js +1 -0
- package/collection/components/widgets/pn-find-price/pn-find-price.css +56 -0
- package/collection/components/widgets/pn-find-price/pn-find-price.js +217 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-info.css +30 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-info.js +92 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-price.css +37 -0
- package/collection/components/widgets/pn-product-card/pn-product-card-price.js +112 -0
- package/collection/components/widgets/pn-product-card/pn-product-card.css +86 -0
- package/collection/components/widgets/pn-product-card/pn-product-card.js +26 -0
- package/collection/components/widgets/pn-product-card/product-card.stories.js +50 -0
- package/collection/docs/no-webpack/no-webpack.stories.js +21 -0
- package/collection/docs/no-webpack/nowebpack-loader.js +16 -0
- package/collection/docs/no-webpack/test-loader.js +19 -0
- package/collection/globals/MarketWebLoginManager.js +16 -1
- package/collection/globals/shared/productprice/convert.js +55 -1
- package/custom-elements/index.d.ts +36 -0
- package/custom-elements/index.js +574 -147
- package/esm/{MarketWebContextService-ab7796c6.js → FetchHelper-41adaded.js} +85 -1
- package/esm/{MarketWebLoginManager-310d2552.js → MarketWebLoginManager-3bb0a307.js} +16 -1
- package/esm/{convert-b49a0857.js → convert-ae809f9c.js} +134 -25
- package/esm/{index-b26d0794.js → index-70b099b5.js} +23 -0
- package/esm/{index-94746173.js → index-d3007e8f.js} +1 -1
- package/esm/loader.js +3 -3
- package/esm/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm/pn-bonus-progressbar.entry.js +1 -1
- package/esm/{pn-choice-button_2.entry.js → pn-choice-button.entry.js} +2 -40
- package/esm/pn-filter-checkbox.entry.js +1 -1
- package/esm/pn-filter-search.entry.js +1 -1
- package/esm/pn-find-price-result.entry.js +30 -0
- package/esm/pn-find-price-store-24d31717.js +22 -0
- package/esm/pn-find-price.entry.js +239 -0
- package/esm/pn-find-service-and-price-result.entry.js +41 -0
- package/esm/{pn-find-service-and-price-store-2ddc6cfa.js → pn-find-service-and-price-store-012f2e49.js} +1 -1
- package/esm/pn-find-service-and-price.entry.js +4 -4
- package/esm/pn-language-selector_9.entry.js +8 -5
- package/esm/pn-mainnav-link.entry.js +3 -3
- package/esm/{pn-mainnav-store-c14ad7e8.js → pn-mainnav-store-395ee066.js} +1 -1
- package/esm/pn-market-web-components.js +3 -3
- package/esm/pn-marketweb-sitefooter.entry.js +2 -3
- package/esm/pn-marketweb-siteheader.entry.js +3 -4
- package/esm/pn-pex-pricefinder.entry.js +1 -1
- package/esm/pn-product-card_3.entry.js +43 -0
- package/esm/pn-product-pricelist-result.entry.js +3 -3
- package/esm/{pn-product-pricelist-store-a287a3f5.js → pn-product-pricelist-store-909c5238.js} +1 -1
- package/esm/pn-product-pricelist.entry.js +4 -4
- package/esm/pn-product-tile_3.entry.js +1 -1
- package/esm/pn-profile-selector-option.entry.js +19 -0
- package/esm/pn-profile-selector.entry.js +12 -65
- package/esm/pn-sidenav-level.entry.js +3 -3
- package/esm/pn-sidenav-link.entry.js +3 -3
- package/esm/{pn-sidenav-store-6f25eef9.js → pn-sidenav-store-f0db4a1f.js} +1 -1
- package/esm/pn-sidenav.entry.js +3 -3
- package/esm/pn-site-footer_2.entry.js +1 -1
- package/esm/polyfills/css-shim.js +1 -1
- package/esm-es5/{MarketWebContextService-ab7796c6.js → FetchHelper-41adaded.js} +1 -1
- package/esm-es5/MarketWebLoginManager-3bb0a307.js +1 -0
- package/esm-es5/{convert-b49a0857.js → convert-ae809f9c.js} +1 -1
- package/esm-es5/index-70b099b5.js +1 -0
- package/esm-es5/{index-94746173.js → index-d3007e8f.js} +1 -1
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-bonus-progressbar-level.entry.js +1 -1
- package/esm-es5/pn-bonus-progressbar.entry.js +1 -1
- package/esm-es5/pn-choice-button.entry.js +1 -0
- package/esm-es5/pn-filter-checkbox.entry.js +1 -1
- package/esm-es5/pn-filter-search.entry.js +1 -1
- package/esm-es5/pn-find-price-result.entry.js +1 -0
- package/esm-es5/pn-find-price-store-24d31717.js +1 -0
- package/esm-es5/pn-find-price.entry.js +1 -0
- package/esm-es5/pn-find-service-and-price-result.entry.js +1 -0
- package/esm-es5/{pn-find-service-and-price-store-2ddc6cfa.js → pn-find-service-and-price-store-012f2e49.js} +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-language-selector_9.entry.js +1 -1
- package/esm-es5/pn-mainnav-link.entry.js +1 -1
- package/esm-es5/{pn-mainnav-store-c14ad7e8.js → pn-mainnav-store-395ee066.js} +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm-es5/pn-marketweb-siteheader.entry.js +1 -1
- package/esm-es5/pn-pex-pricefinder.entry.js +1 -1
- package/esm-es5/pn-product-card_3.entry.js +1 -0
- package/esm-es5/pn-product-pricelist-result.entry.js +1 -1
- package/esm-es5/{pn-product-pricelist-store-a287a3f5.js → pn-product-pricelist-store-909c5238.js} +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/esm-es5/pn-product-tile_3.entry.js +1 -1
- package/esm-es5/pn-profile-selector-option.entry.js +1 -0
- package/esm-es5/pn-profile-selector.entry.js +1 -1
- package/esm-es5/pn-sidenav-level.entry.js +1 -1
- package/esm-es5/pn-sidenav-link.entry.js +1 -1
- package/esm-es5/{pn-sidenav-store-6f25eef9.js → pn-sidenav-store-f0db4a1f.js} +1 -1
- package/esm-es5/pn-sidenav.entry.js +1 -1
- package/esm-es5/pn-site-footer_2.entry.js +1 -1
- package/package.json +12 -10
- package/pn-market-web-components/{p-cce32042.entry.js → p-00d6033e.entry.js} +1 -1
- package/pn-market-web-components/{p-7d92e5c7.system.entry.js → p-0b796318.system.entry.js} +1 -1
- package/pn-market-web-components/{p-4d6fce0c.js → p-0d61dd29.js} +1 -1
- package/pn-market-web-components/{p-91624bd5.system.js → p-0ea97ca0.system.js} +2 -2
- package/pn-market-web-components/{p-0d975e39.entry.js → p-0eef21d9.entry.js} +1 -1
- package/pn-market-web-components/p-1060d686.system.entry.js +1 -0
- package/pn-market-web-components/p-15836764.js +1 -0
- package/pn-market-web-components/{p-942f590f.entry.js → p-1ccd3831.entry.js} +1 -1
- package/pn-market-web-components/p-23fc4303.system.entry.js +1 -0
- package/pn-market-web-components/{p-789e1b30.js → p-24df62a2.js} +1 -1
- package/pn-market-web-components/{p-043f460c.system.entry.js → p-2b120338.system.entry.js} +1 -1
- package/pn-market-web-components/{p-38ff23f5.entry.js → p-2b34c4bd.entry.js} +1 -1
- package/pn-market-web-components/p-2c361d9e.system.entry.js +1 -0
- package/pn-market-web-components/p-31ecebd2.system.js +1 -0
- package/pn-market-web-components/p-3552ae09.entry.js +1 -0
- package/pn-market-web-components/p-37e26384.system.entry.js +1 -0
- package/pn-market-web-components/p-3826548d.system.entry.js +1 -0
- package/pn-market-web-components/{p-21463fc1.system.entry.js → p-38e0dc75.system.entry.js} +1 -1
- package/pn-market-web-components/{p-478ac9b4.system.entry.js → p-39760c45.system.entry.js} +1 -1
- package/pn-market-web-components/{p-c127e22c.system.entry.js → p-3ae3eda4.system.entry.js} +1 -1
- package/pn-market-web-components/p-3ba257c5.entry.js +1 -0
- package/pn-market-web-components/{p-02a985d9.system.entry.js → p-3f8b459a.system.entry.js} +1 -1
- package/pn-market-web-components/{p-eb049e9d.system.entry.js → p-42da096a.system.entry.js} +1 -1
- package/pn-market-web-components/p-45bb8f15.entry.js +1 -0
- package/pn-market-web-components/{p-1611123a.system.entry.js → p-48d29c10.system.entry.js} +1 -1
- package/pn-market-web-components/p-4c9b1ae9.system.js +1 -0
- package/pn-market-web-components/{p-b8af690a.entry.js → p-4d5aa13e.entry.js} +1 -1
- package/pn-market-web-components/{p-1caf4231.system.entry.js → p-4f0f8e9f.system.entry.js} +1 -1
- package/pn-market-web-components/p-518b1864.entry.js +1 -0
- package/pn-market-web-components/{p-dde2cf1c.entry.js → p-544f8fb9.entry.js} +1 -1
- package/pn-market-web-components/p-55513980.system.js +1 -0
- package/pn-market-web-components/{p-77d43e30.entry.js → p-56ba3951.entry.js} +1 -1
- package/pn-market-web-components/p-5cfed9ad.js +1 -0
- package/pn-market-web-components/p-5d34bb8f.system.entry.js +1 -0
- package/pn-market-web-components/p-6423bacf.js +1 -0
- package/pn-market-web-components/{p-a25fc106.entry.js → p-66fb0f57.entry.js} +1 -1
- package/pn-market-web-components/p-69b751a8.system.entry.js +1 -0
- package/pn-market-web-components/{p-98bc5c17.system.js → p-6fea1ae6.system.js} +1 -1
- package/pn-market-web-components/{p-12297437.system.entry.js → p-702f06b7.system.entry.js} +1 -1
- package/pn-market-web-components/p-71a31b15.entry.js +1 -0
- package/pn-market-web-components/p-7a7f380b.system.js +1 -0
- package/pn-market-web-components/{p-26f72169.system.js → p-7ce21cb3.system.js} +1 -1
- package/pn-market-web-components/p-7fca7510.entry.js +1 -0
- package/pn-market-web-components/{p-b7fdc5cb.system.entry.js → p-802afa1f.system.entry.js} +1 -1
- package/pn-market-web-components/{p-52787ac9.entry.js → p-8325d608.entry.js} +1 -1
- package/pn-market-web-components/p-87a4810e.system.entry.js +1 -0
- package/pn-market-web-components/{p-020f1667.js → p-99e471b8.js} +1 -1
- package/pn-market-web-components/p-9aac6bd5.entry.js +1 -0
- package/pn-market-web-components/{p-21e0e386.js → p-9adc3940.js} +1 -1
- package/pn-market-web-components/{p-4832a520.js → p-9ae8e043.js} +1 -1
- package/pn-market-web-components/p-a439468a.system.entry.js +1 -0
- package/pn-market-web-components/{p-d1053abf.entry.js → p-ab699e09.entry.js} +1 -1
- package/pn-market-web-components/{p-a37ea453.entry.js → p-ac5a749b.entry.js} +1 -1
- package/pn-market-web-components/{p-9860fea8.system.js → p-ac917958.system.js} +1 -1
- package/pn-market-web-components/p-acd9d186.system.entry.js +1 -0
- package/pn-market-web-components/{p-3359dac6.js → p-ad5b20ce.js} +1 -1
- package/pn-market-web-components/{p-772c078c.entry.js → p-aea09ac6.entry.js} +1 -1
- package/pn-market-web-components/p-b425e079.system.entry.js +1 -0
- package/pn-market-web-components/{p-33cefc5e.system.entry.js → p-b4a0e5fd.system.entry.js} +1 -1
- package/pn-market-web-components/p-b4b6ab95.system.js +1 -0
- package/pn-market-web-components/{p-915cef83.system.js → p-b4f843da.system.js} +1 -1
- package/pn-market-web-components/p-c799bf36.entry.js +1 -0
- package/pn-market-web-components/{p-ec0adffe.js → p-cf516409.js} +0 -0
- package/pn-market-web-components/p-cfe1550c.entry.js +1 -0
- package/pn-market-web-components/{p-02c8dcd0.entry.js → p-d26967cb.entry.js} +1 -1
- package/pn-market-web-components/{p-53e14b27.entry.js → p-d546d0c3.entry.js} +1 -1
- package/pn-market-web-components/{p-0ba9ae69.system.entry.js → p-e732c60a.system.entry.js} +1 -1
- package/pn-market-web-components/p-f1c3003f.entry.js +1 -0
- package/pn-market-web-components/p-ff678bef.system.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/pn-market-web-components/pn-market-web-components.js +1 -1
- package/types/components/navigation/pn-profile-selector/pn-profile-selector-option.d.ts +7 -0
- package/types/components/navigation/pn-profile-selector/pn-profile-selector-types.d.ts +1 -1
- package/types/components/navigation/pn-profile-selector/pn-profile-selector.d.ts +1 -10
- package/types/components/navigation/pn-profile-selector/translations.d.ts +5 -5
- package/types/components/widgets/pn-find-price/pn-find-price-result.d.ts +9 -0
- package/types/components/widgets/pn-find-price/pn-find-price-store.d.ts +35 -0
- package/types/components/widgets/pn-find-price/pn-find-price-translations.d.ts +73 -0
- package/types/components/widgets/pn-find-price/pn-find-price-types.d.ts +51 -0
- package/types/components/widgets/pn-find-price/pn-find-price.d.ts +16 -0
- package/types/components/widgets/pn-product-card/pn-product-card-info.d.ts +7 -0
- package/types/components/widgets/pn-product-card/pn-product-card-price.d.ts +8 -0
- package/types/components/widgets/pn-product-card/pn-product-card.d.ts +3 -0
- package/types/components.d.ts +113 -2
- package/types/globals/MarketWebLoginManager.d.ts +3 -1
- package/types/stencil-public-runtime.d.ts +6 -4
- package/cjs/FetchHelper-f80943bf.js +0 -87
- package/esm/FetchHelper-a0c8aa54.js +0 -85
- package/esm-es5/FetchHelper-a0c8aa54.js +0 -1
- package/esm-es5/MarketWebLoginManager-310d2552.js +0 -1
- package/esm-es5/index-b26d0794.js +0 -1
- package/esm-es5/pn-choice-button_2.entry.js +0 -1
- package/pn-market-web-components/p-038b8060.system.js +0 -1
- package/pn-market-web-components/p-2456901a.js +0 -1
- package/pn-market-web-components/p-2e6644ea.system.entry.js +0 -1
- package/pn-market-web-components/p-37801e32.entry.js +0 -1
- package/pn-market-web-components/p-3cf489ac.js +0 -1
- package/pn-market-web-components/p-5510f188.system.js +0 -1
- package/pn-market-web-components/p-5f8ef634.entry.js +0 -1
- package/pn-market-web-components/p-861210ae.entry.js +0 -1
- package/pn-market-web-components/p-93d8620b.entry.js +0 -1
- package/pn-market-web-components/p-97dc5687.js +0 -1
- package/pn-market-web-components/p-a22df959.system.js +0 -1
- package/pn-market-web-components/p-a5284c78.entry.js +0 -1
- package/pn-market-web-components/p-cec6130e.system.js +0 -1
- package/pn-market-web-components/p-d133f30d.system.entry.js +0 -1
- package/pn-market-web-components/p-d6a17042.system.js +0 -1
- package/pn-market-web-components/p-da370548.system.entry.js +0 -1
- package/pn-market-web-components/p-e04f8d34.system.entry.js +0 -1
- package/pn-market-web-components/p-e6a209c6.system.entry.js +0 -1
- package/pn-market-web-components/p-ec1127de.system.entry.js +0 -1
- package/pn-market-web-components/p-f1311662.system.js +0 -1
|
@@ -167,4 +167,89 @@ class MarketWebContextService {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
class FetchHelper {
|
|
171
|
+
constructor(namespace = "") {
|
|
172
|
+
this.storagePrefix = "";
|
|
173
|
+
this.store = {
|
|
174
|
+
get: (key, permanentStorageFirst = false) => {
|
|
175
|
+
const firstProfider = permanentStorageFirst ? window.localStorage : window.sessionStorage;
|
|
176
|
+
const secondProvider = permanentStorageFirst ? window.sessionStorage : window.localStorage;
|
|
177
|
+
let value = firstProfider.getItem(`${this.storagePrefix}-${key}`);
|
|
178
|
+
if (!value) {
|
|
179
|
+
value = secondProvider.getItem(`${this.storagePrefix}-${key}`);
|
|
180
|
+
}
|
|
181
|
+
if (!value) {
|
|
182
|
+
return value;
|
|
183
|
+
}
|
|
184
|
+
if (value.indexOf('{') === 0) {
|
|
185
|
+
try {
|
|
186
|
+
return JSON.parse(value);
|
|
187
|
+
}
|
|
188
|
+
catch (e) {
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (value.indexOf(',') !== -1) {
|
|
192
|
+
return value.split(',');
|
|
193
|
+
}
|
|
194
|
+
return value;
|
|
195
|
+
},
|
|
196
|
+
set: (key, value, permanent = false) => {
|
|
197
|
+
const provider = permanent ? window.localStorage : window.sessionStorage;
|
|
198
|
+
if (typeof value === "object" && typeof value.length === "undefined") {
|
|
199
|
+
provider.setItem(`${this.storagePrefix}-${key}`, JSON.stringify(value));
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
provider.setItem(`${this.storagePrefix}-${key}`, value);
|
|
203
|
+
},
|
|
204
|
+
remove: (key) => {
|
|
205
|
+
window.sessionStorage.removeItem(`${this.storagePrefix}-${key}`);
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
this.storagePrefix = namespace;
|
|
209
|
+
}
|
|
210
|
+
async fetchJson(input, init = {}, useCache = false, onCacheUpdated = null) {
|
|
211
|
+
const requestPromise = new Promise(async (resolve) => {
|
|
212
|
+
let doFetchRequest = true;
|
|
213
|
+
const url = (typeof input === "string") ? input : input.url;
|
|
214
|
+
const cacheKey = url;
|
|
215
|
+
let jsonData = null;
|
|
216
|
+
let cachedData = null;
|
|
217
|
+
if (useCache) {
|
|
218
|
+
cachedData = this.store.get(cacheKey);
|
|
219
|
+
// If the data was stored in session storage, then we don't need to do a full request
|
|
220
|
+
if (cachedData && !cachedData.permanent) {
|
|
221
|
+
doFetchRequest = false;
|
|
222
|
+
}
|
|
223
|
+
if (cachedData && cachedData.data) {
|
|
224
|
+
jsonData = cachedData.data;
|
|
225
|
+
resolve(jsonData);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
if (doFetchRequest) {
|
|
229
|
+
const response = await window.fetch(input, init);
|
|
230
|
+
jsonData = await response.json();
|
|
231
|
+
resolve(jsonData);
|
|
232
|
+
if (useCache) {
|
|
233
|
+
if (typeof onCacheUpdated === "function" && cachedData != null) {
|
|
234
|
+
onCacheUpdated(jsonData);
|
|
235
|
+
}
|
|
236
|
+
this.store.set(cacheKey, this.wrapJson(jsonData, true), true);
|
|
237
|
+
this.store.set(cacheKey, this.wrapJson(jsonData, false), false);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
return requestPromise;
|
|
242
|
+
}
|
|
243
|
+
wrapJson(data, permanent = false) {
|
|
244
|
+
const now = new Date();
|
|
245
|
+
return {
|
|
246
|
+
timestamp: now.getTime(),
|
|
247
|
+
time: now.toISOString(),
|
|
248
|
+
data: data,
|
|
249
|
+
permanent: permanent
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
exports.FetchHelper = FetchHelper;
|
|
170
255
|
exports.MarketWebContextService = MarketWebContextService;
|
|
@@ -20,6 +20,7 @@ class MarketWebLoginManager {
|
|
|
20
20
|
logoutEndpoint: `/logout`,
|
|
21
21
|
};
|
|
22
22
|
this.keys = {
|
|
23
|
+
tokensource: 'tokensource',
|
|
23
24
|
token: 'token',
|
|
24
25
|
user: 'user',
|
|
25
26
|
expire: 'expire',
|
|
@@ -75,14 +76,27 @@ class MarketWebLoginManager {
|
|
|
75
76
|
const isLoggedIn = (this.store.get(this.keys.token) && this.store.get(this.keys.user)) ? true : false;
|
|
76
77
|
return isLoggedIn;
|
|
77
78
|
}
|
|
78
|
-
registerToken(token) {
|
|
79
|
+
registerToken(token = '', tokenSource = 'frontend') {
|
|
79
80
|
if (!token || token === this.getToken()) {
|
|
80
81
|
return;
|
|
81
82
|
}
|
|
82
83
|
this.clearUserData();
|
|
84
|
+
this.store.set(this.keys.tokensource, tokenSource);
|
|
83
85
|
this.store.set(this.keys.token, token);
|
|
84
86
|
this.fetchUserInfo();
|
|
85
87
|
}
|
|
88
|
+
invalidateTokenOfType(tokenSource = 'frontend') {
|
|
89
|
+
const currentToken = this.store.get(this.keys.token);
|
|
90
|
+
if (!currentToken) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const currentTokenSource = this.store.get(this.keys.tokensource);
|
|
94
|
+
if (currentTokenSource !== tokenSource) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
// If we have a token and the source is set then we will invalidate the user data
|
|
98
|
+
this.clearUserData();
|
|
99
|
+
}
|
|
86
100
|
getLoginUrl(redirectPage = "") {
|
|
87
101
|
const currentPage = window.location.href;
|
|
88
102
|
redirectPage = redirectPage ? redirectPage : currentPage;
|
|
@@ -156,6 +170,7 @@ class MarketWebLoginManager {
|
|
|
156
170
|
}
|
|
157
171
|
clearUserData() {
|
|
158
172
|
this.store.remove(this.keys.user);
|
|
173
|
+
this.store.remove(this.keys.tokensource);
|
|
159
174
|
this.store.remove(this.keys.token);
|
|
160
175
|
this.store.remove(this.keys.expire);
|
|
161
176
|
this.store.remove(this.keys.expireDate);
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const xml = {
|
|
4
4
|
createDocument: function createDocument(content) {
|
|
5
|
+
// if (!content) {
|
|
6
|
+
// throw new Error('No *.xml content')
|
|
7
|
+
// }
|
|
5
8
|
// A weird bug: it won't parse XML unless it's trimmed.
|
|
6
9
|
// https://github.com/catamphetamine/read-excel-file/issues/21
|
|
7
10
|
return new DOMParser().parseFromString(content.trim(), 'text/xml');
|
|
@@ -550,11 +553,13 @@ function getCellValue(value, type, _ref) {
|
|
|
550
553
|
}
|
|
551
554
|
|
|
552
555
|
value = parseFloat(value); // XLSX does have "d" type for dates, but it's not commonly used.
|
|
553
|
-
//
|
|
554
|
-
//
|
|
556
|
+
// Instead, spreadsheets prefer using "n" type for dates for some reason.
|
|
557
|
+
//
|
|
558
|
+
// In such cases, sometimes a "date" type could be heuristically detected
|
|
559
|
+
// by looking at such numeric value "format" and seeing if it's a date-specific one.
|
|
555
560
|
// https://github.com/catamphetamine/read-excel-file/issues/3#issuecomment-395770777
|
|
556
561
|
//
|
|
557
|
-
//
|
|
562
|
+
// The list of generic numeric value "formats":
|
|
558
563
|
// https://xlsxwriter.readthedocs.io/format.html#format-set-num-format
|
|
559
564
|
//
|
|
560
565
|
|
|
@@ -623,18 +628,40 @@ function decodeError(errorCode) {
|
|
|
623
628
|
}
|
|
624
629
|
|
|
625
630
|
function isDateTemplate(template) {
|
|
631
|
+
// Date format tokens could be in upper case or in lower case.
|
|
632
|
+
// There seems to be no single standard.
|
|
633
|
+
// So lowercase the template first.
|
|
634
|
+
template = template.toLowerCase();
|
|
626
635
|
var tokens = template.split(/\W+/);
|
|
627
636
|
|
|
628
637
|
for (var _iterator = _createForOfIteratorHelperLoose$5(tokens), _step; !(_step = _iterator()).done;) {
|
|
629
638
|
var token = _step.value;
|
|
630
639
|
|
|
631
|
-
if (
|
|
640
|
+
if (DATE_TEMPLATE_TOKENS.indexOf(token) < 0) {
|
|
632
641
|
return false;
|
|
633
642
|
}
|
|
634
643
|
}
|
|
635
644
|
|
|
636
645
|
return true;
|
|
637
|
-
}
|
|
646
|
+
} // These tokens could be in upper case or in lower case.
|
|
647
|
+
// There seems to be no single standard, so using lower case.
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
var DATE_TEMPLATE_TOKENS = [// Seconds (min two digits). Example: "05".
|
|
651
|
+
'ss', // Minutes (min two digits). Example: "05". Could also be "Months". Weird.
|
|
652
|
+
'mm', // Hours. Example: "1".
|
|
653
|
+
'h', // Hours (min two digits). Example: "01".
|
|
654
|
+
'hh', // "AM" part of "AM/PM". Lowercased just in case.
|
|
655
|
+
'am', // "PM" part of "AM/PM". Lowercased just in case.
|
|
656
|
+
'pm', // Day. Example: "1"
|
|
657
|
+
'd', // Day (min two digits). Example: "01"
|
|
658
|
+
'dd', // Month (numeric). Example: "1".
|
|
659
|
+
'm', // Month (numeric, min two digits). Example: "01". Could also be "Minutes". Weird.
|
|
660
|
+
'mm', // Month (shortened month name). Example: "Jan".
|
|
661
|
+
'mmm', // Month (full month name). Example: "January".
|
|
662
|
+
'mmmm', // Two-digit year. Example: "20".
|
|
663
|
+
'yy', // Full year. Example: "2020".
|
|
664
|
+
'yyyy'];
|
|
638
665
|
|
|
639
666
|
// Maps "A1"-like coordinates to `{ row, column }` numeric coordinates.
|
|
640
667
|
var LETTERS = ["", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
|
|
@@ -660,7 +687,8 @@ function calculateDimensions(cells) {
|
|
|
660
687
|
row: maxRow,
|
|
661
688
|
column: maxCol
|
|
662
689
|
}];
|
|
663
|
-
}
|
|
690
|
+
} // Converts a letter coordinate to a digit coordinate.
|
|
691
|
+
// Examples: "A" -> 1, "B" -> 2, "Z" -> 26, "AA" -> 27, etc.
|
|
664
692
|
|
|
665
693
|
function columnLettersToNumber(columnLetters) {
|
|
666
694
|
// `for ... of ...` would require Babel polyfill for iterating a string.
|
|
@@ -677,7 +705,7 @@ function columnLettersToNumber(columnLetters) {
|
|
|
677
705
|
}
|
|
678
706
|
|
|
679
707
|
function parseCellCoordinates(coords) {
|
|
680
|
-
//
|
|
708
|
+
// Coordinate examples: "AA2091", "R988", "B1".
|
|
681
709
|
coords = coords.split(/(\d+)/);
|
|
682
710
|
return [// Row.
|
|
683
711
|
parseInt(coords[1]), // Column.
|
|
@@ -768,6 +796,8 @@ function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) le
|
|
|
768
796
|
function _iterableToArrayLimit$2(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
769
797
|
|
|
770
798
|
function _arrayWithHoles$2(arr) { if (Array.isArray(arr)) return arr; }
|
|
799
|
+
// https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.sheetdimension?view=openxml-2.8.1
|
|
800
|
+
|
|
771
801
|
function parseDimensions(sheet) {
|
|
772
802
|
var dimensions = getDimensions(sheet);
|
|
773
803
|
|
|
@@ -781,8 +811,13 @@ function parseDimensions(sheet) {
|
|
|
781
811
|
row: row,
|
|
782
812
|
column: column
|
|
783
813
|
};
|
|
784
|
-
}); //
|
|
785
|
-
//
|
|
814
|
+
}); // Sometimes there can be just a single cell as a spreadsheet's "dimensions".
|
|
815
|
+
// For example, the default "dimensions" in Apache POI library is "A1",
|
|
816
|
+
// meaning that only the first cell in the spreadsheet is used.
|
|
817
|
+
//
|
|
818
|
+
// A quote from Apache POI library:
|
|
819
|
+
// "Single cell ranges are formatted like single cell references (e.g. 'A1' instead of 'A1:A1')."
|
|
820
|
+
//
|
|
786
821
|
|
|
787
822
|
if (dimensions.length === 1) {
|
|
788
823
|
dimensions = [dimensions[0], dimensions[0]];
|
|
@@ -794,7 +829,9 @@ function parseDimensions(sheet) {
|
|
|
794
829
|
|
|
795
830
|
function parseSheet(content, xml, values, styles, properties, options) {
|
|
796
831
|
var sheet = xml.createDocument(content);
|
|
797
|
-
var cells = parseCells(sheet, xml, values, styles, properties, options);
|
|
832
|
+
var cells = parseCells(sheet, xml, values, styles, properties, options); // `dimensions` defines the spreadsheet area containing all non-empty cells.
|
|
833
|
+
// https://docs.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.sheetdimension?view=openxml-2.8.1
|
|
834
|
+
|
|
798
835
|
var dimensions = parseDimensions(sheet) || calculateDimensions(cells);
|
|
799
836
|
return {
|
|
800
837
|
cells: cells,
|
|
@@ -917,11 +954,14 @@ function getData(sheet, options) {
|
|
|
917
954
|
}
|
|
918
955
|
|
|
919
956
|
var _dimensions = _slicedToArray$1(dimensions, 2),
|
|
920
|
-
|
|
921
|
-
|
|
957
|
+
rightBottom = _dimensions[1]; // Don't discard empty rows or columns at the start.
|
|
958
|
+
// https://github.com/catamphetamine/read-excel-file/issues/102
|
|
959
|
+
// const colsCount = (rightBottom.column - leftTop.column) + 1
|
|
960
|
+
// const rowsCount = (rightBottom.row - leftTop.row) + 1
|
|
961
|
+
|
|
922
962
|
|
|
923
|
-
var colsCount = rightBottom.column
|
|
924
|
-
var rowsCount = rightBottom.row
|
|
963
|
+
var colsCount = rightBottom.column;
|
|
964
|
+
var rowsCount = rightBottom.row; // Initialize spreadsheet data structure.
|
|
925
965
|
|
|
926
966
|
var data = new Array(rowsCount);
|
|
927
967
|
var i = 0;
|
|
@@ -936,7 +976,7 @@ function getData(sheet, options) {
|
|
|
936
976
|
}
|
|
937
977
|
|
|
938
978
|
i++;
|
|
939
|
-
} // Fill in spreadsheet data
|
|
979
|
+
} // Fill in spreadsheet `data`.
|
|
940
980
|
// (this code implies that `cells` aren't necessarily sorted by row and column:
|
|
941
981
|
// maybe that's not correct, this piece code was initially copy-pasted
|
|
942
982
|
// from some other library that used `XPath`)
|
|
@@ -944,9 +984,16 @@ function getData(sheet, options) {
|
|
|
944
984
|
|
|
945
985
|
for (var _iterator = _createForOfIteratorHelperLoose$2(cells), _step; !(_step = _iterator()).done;) {
|
|
946
986
|
var cell = _step.value;
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
987
|
+
// Don't discard empty rows or columns at the start.
|
|
988
|
+
// https://github.com/catamphetamine/read-excel-file/issues/102
|
|
989
|
+
// const rowIndex = cell.row - leftTop.row
|
|
990
|
+
// const columnIndex = cell.column - leftTop.column
|
|
991
|
+
var rowIndex = cell.row - 1;
|
|
992
|
+
var columnIndex = cell.column - 1; // Ignore the data in the cell if it's outside of the spreadsheet's "dimensions".
|
|
993
|
+
|
|
994
|
+
if (columnIndex < colsCount && rowIndex < rowsCount) {
|
|
995
|
+
data[rowIndex][columnIndex] = cell.value;
|
|
996
|
+
}
|
|
950
997
|
} // Fill in the row map.
|
|
951
998
|
|
|
952
999
|
|
|
@@ -1009,16 +1056,24 @@ function readXlsx(contents, xml) {
|
|
|
1009
1056
|
options = _objectSpread$2({
|
|
1010
1057
|
sheet: 1
|
|
1011
1058
|
}, options);
|
|
1012
|
-
}
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
var getXmlFileContent = function getXmlFileContent(filePath) {
|
|
1062
|
+
if (!contents[filePath]) {
|
|
1063
|
+
throw new Error("\"".concat(filePath, "\" file not found inside the *.xlsx file zip archive"));
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
return contents[filePath];
|
|
1067
|
+
}; // Some Excel editors don't want to use standard naming scheme for sheet files.
|
|
1013
1068
|
// https://github.com/tidyverse/readxl/issues/104
|
|
1014
1069
|
|
|
1015
1070
|
|
|
1016
|
-
var filePaths = parseFilePaths(
|
|
1071
|
+
var filePaths = parseFilePaths(getXmlFileContent('xl/_rels/workbook.xml.rels'), xml); // Default file path for "shared strings": "xl/sharedStrings.xml".
|
|
1017
1072
|
|
|
1018
|
-
var values = filePaths.sharedStrings ? parseSharedStrings(
|
|
1073
|
+
var values = filePaths.sharedStrings ? parseSharedStrings(getXmlFileContent(filePaths.sharedStrings), xml) : []; // Default file path for "styles": "xl/styles.xml".
|
|
1019
1074
|
|
|
1020
|
-
var styles = filePaths.styles ? parseStyles(
|
|
1021
|
-
var properties = parseProperties(
|
|
1075
|
+
var styles = filePaths.styles ? parseStyles(getXmlFileContent(filePaths.styles), xml) : {};
|
|
1076
|
+
var properties = parseProperties(getXmlFileContent('xl/workbook.xml'), xml); // A feature for getting the list of sheets in an Excel file.
|
|
1022
1077
|
// https://github.com/catamphetamine/read-excel-file/issues/14
|
|
1023
1078
|
|
|
1024
1079
|
if (options.getSheets) {
|
|
@@ -1039,7 +1094,7 @@ function readXlsx(contents, xml) {
|
|
|
1039
1094
|
} // Parse sheet data.
|
|
1040
1095
|
|
|
1041
1096
|
|
|
1042
|
-
var sheet = parseSheet(
|
|
1097
|
+
var sheet = parseSheet(getXmlFileContent(filePaths.sheets[sheetId]), xml, values, styles, properties, options); // Get spreadsheet data.
|
|
1043
1098
|
|
|
1044
1099
|
var data = getData(sheet, options); // Can return properties, if required.
|
|
1045
1100
|
|
|
@@ -1727,4 +1782,59 @@ async function convertFileFromStream(stream, filterColumnNames = ["what", "deliv
|
|
|
1727
1782
|
return fileData;
|
|
1728
1783
|
}
|
|
1729
1784
|
|
|
1785
|
+
async function convertFileForSizeCategogy(stream, filterColumnNames = ["sizecategory"]) {
|
|
1786
|
+
const toFilterValue = (x) => x.toLowerCase().replace(/\s+/g, '');
|
|
1787
|
+
const sheets = await readXlsxFile(stream, { getSheets: true });
|
|
1788
|
+
let dataRows = [];
|
|
1789
|
+
let sizecategoryColumn;
|
|
1790
|
+
let sheetsData = await Promise.all(sheets.map(async (sheet) => { return await readXlsxFile(stream, { sheet: sheet.name }) }));
|
|
1791
|
+
|
|
1792
|
+
let types = {};
|
|
1793
|
+
sheetsData.forEach(sheetData => {
|
|
1794
|
+
const firstRow = sheetData.shift().map(x => toFilterValue(x));
|
|
1795
|
+
// Set up column for adding options
|
|
1796
|
+
firstRow.forEach((col, i) => {
|
|
1797
|
+
if (typeof types[col] === "undefined" && filterColumnNames.includes(col)) {
|
|
1798
|
+
types[col] = [];
|
|
1799
|
+
}
|
|
1800
|
+
if(col === "sizecategory")
|
|
1801
|
+
sizecategoryColumn = i;
|
|
1802
|
+
});
|
|
1803
|
+
|
|
1804
|
+
sheetData.forEach((row, rowindex) => {
|
|
1805
|
+
// read sizeCategory column of each row and split it to save data for each item
|
|
1806
|
+
const firstColRow = row[sizecategoryColumn];
|
|
1807
|
+
const sizeCatColumnValue = firstColRow.split('/');
|
|
1808
|
+
|
|
1809
|
+
sizeCatColumnValue.forEach((value, j) => {
|
|
1810
|
+
const dataRow = {};
|
|
1811
|
+
|
|
1812
|
+
firstRow.forEach(async (col, i) => {
|
|
1813
|
+
const rowVal = (i === sizecategoryColumn) ? value : row[i];
|
|
1814
|
+
dataRow[col] = rowVal;
|
|
1815
|
+
|
|
1816
|
+
// Add to types options
|
|
1817
|
+
if (filterColumnNames.includes(col)) {
|
|
1818
|
+
const filterVal = toFilterValue(rowVal);
|
|
1819
|
+
dataRow[col] = filterVal;
|
|
1820
|
+
|
|
1821
|
+
if (!types[col].includes(filterVal)) {
|
|
1822
|
+
types[col].push(filterVal);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
});
|
|
1826
|
+
dataRows.push(dataRow);
|
|
1827
|
+
});
|
|
1828
|
+
});
|
|
1829
|
+
});
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
const fileData = {
|
|
1833
|
+
"types": types,
|
|
1834
|
+
"data": dataRows
|
|
1835
|
+
};
|
|
1836
|
+
return fileData;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
exports.convertFileForSizeCategogy = convertFileForSizeCategogy;
|
|
1730
1840
|
exports.convertFileFromStream = convertFileFromStream;
|
|
@@ -1271,6 +1271,29 @@ const then = (promise, thenFn) => {
|
|
|
1271
1271
|
};
|
|
1272
1272
|
const addHydratedFlag = (elm) => elm.classList.add('hydrated')
|
|
1273
1273
|
;
|
|
1274
|
+
/**
|
|
1275
|
+
* Parse a new property value for a given property type.
|
|
1276
|
+
*
|
|
1277
|
+
* While the prop value can reasonably be expected to be of `any` type as far as TypeScript's type checker is concerned,
|
|
1278
|
+
* it is not safe to assume that the string returned by evaluating `typeof propValue` matches:
|
|
1279
|
+
* 1. `any`, the type given to `propValue` in the function signature
|
|
1280
|
+
* 2. the type stored from `propType`.
|
|
1281
|
+
*
|
|
1282
|
+
* This function provides the capability to parse/coerce a property's value to potentially any other JavaScript type.
|
|
1283
|
+
*
|
|
1284
|
+
* Property values represented in TSX preserve their type information. In the example below, the number 0 is passed to
|
|
1285
|
+
* a component. This `propValue` will preserve its type information (`typeof propValue === 'number'`). Note that is
|
|
1286
|
+
* based on the type of the value being passed in, not the type declared of the class member decorated with `@Prop`.
|
|
1287
|
+
* ```tsx
|
|
1288
|
+
* <my-cmp prop-val={0}></my-cmp>
|
|
1289
|
+
* ```
|
|
1290
|
+
*
|
|
1291
|
+
* HTML prop values on the other hand, will always a string
|
|
1292
|
+
*
|
|
1293
|
+
* @param propValue the new value to coerce to some type
|
|
1294
|
+
* @param propType the type of the prop, expressed as a binary number
|
|
1295
|
+
* @returns the parsed/coerced value
|
|
1296
|
+
*/
|
|
1274
1297
|
const parsePropertyValue = (propValue, propType) => {
|
|
1275
1298
|
// ensure this value is of the correct prop type
|
|
1276
1299
|
if (propValue != null && !isComplexType(propValue)) {
|
package/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.14.0 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"token":[1],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-service-and-price.cjs",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["pn-product-pricelist.cjs",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["pn-marketweb-sitefooter.cjs",[[0,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["pn-bonus-progressbar.cjs",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["pn-filter-checkbox.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search.cjs",[[1,"pn-filter-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder.cjs",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector.cjs",[[
|
|
17
|
+
return index.bootstrapLazy([["pn-marketweb-siteheader.cjs",[[4,"pn-marketweb-siteheader",{"market":[1537],"language":[1537],"environment":[1537],"token":[1],"endpoint":[1],"hideSiteSelector":[1540,"hide-site-selector"],"hideLanguageSelector":[1540,"hide-language-selector"],"hideSearch":[1540,"hide-search"],"hideLogin":[1540,"hide-login"],"sessionForward":[4,"session-forward"],"cache":[4],"spaMode":[4,"spa-mode"],"i18n":[32],"gotData":[32],"fetchingData":[32],"homePageLink":[32],"menuItems":[32],"siteDefinition":[32],"search":[32],"siteSelector":[32],"languageSelector":[32],"languageOptions":[32],"loginDialog":[32],"minimizeSearch":[32],"loggedIn":[32],"loginManager":[32]},[[0,"setLanguage","onLanguageSelectorChange"],[0,"loginStateChange","onLoginStateChange"],[9,"resize","handleResize"]]]]],["pn-find-price.cjs",[[0,"pn-find-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"weight":[32],"weightvalue":[32],"sourceData":[32],"sizecategory":[32]}]]],["pn-find-service-and-price.cjs",[[0,"pn-find-service-and-price",{"source":[1],"language":[1025],"market":[1025],"filteredItems":[32],"postagetype":[32],"weight":[32],"weightvalue":[32],"deliveryscope":[32],"sourceData":[32]}]]],["pn-product-pricelist.cjs",[[4,"pn-product-pricelist",{"source":[1],"language":[1025],"market":[1025],"productid":[1],"filteredItems":[32],"sourceData":[32],"gotData":[32],"loading":[32],"postagetype":[32],"weight":[32],"weightvalue":[32]}]]],["pn-marketweb-sitefooter.cjs",[[0,"pn-marketweb-sitefooter",{"market":[1537],"language":[1537],"environment":[1537],"endpoint":[1],"cache":[4],"siteDefinition":[32],"footerContent":[32],"i18n":[32],"gotData":[32],"fetchingData":[32]}]]],["pn-bonus-progressbar.cjs",[[4,"pn-bonus-progressbar",{"icon":[1],"heading":[1],"theme":[513],"bonuspercentage":[1],"currency":[513],"value":[1538],"min":[1538],"max":[1538],"valuepercentage":[32],"progresspercentage":[32],"levelValues":[32],"currentLevelAdjustedValue":[32]}]]],["pn-filter-checkbox.cjs",[[1,"pn-filter-checkbox",{"value":[520],"name":[1],"checkboxid":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-filter-search.cjs",[[1,"pn-filter-search",{"disabled":[4],"placeholder":[1],"inputid":[1],"name":[1],"autocomplete":[1],"value":[1],"label":[1],"loading":[4],"button":[1],"light":[4]},[[0,"input","inputHandler"]]]]],["pn-pex-pricefinder.cjs",[[0,"pn-pex-pricefinder",{"language":[1],"currency":[1],"apiUrl":[1,"api-url"],"i18n":[32],"fromzip":[32],"tozip":[32],"weight":[32],"when":[32],"response":[32]},[[0,"language","setLanguage"]]]]],["pn-profile-selector.cjs",[[4,"pn-profile-selector",{"language":[1537],"returnUrl":[1,"return-url"],"i18n":[32],"isLoading":[32],"numberOfProfiles":[32]}]]],["pn-profile-selector-option.cjs",[[0,"pn-profile-selector-option",{"name":[1],"identifier":[1],"url":[1]}]]],["pn-sidenav.cjs",[[4,"pn-sidenav",{"language":[1],"navLabel":[1,"nav-label"],"i18n":[32]},[[0,"language","setLanguage"],[0,"openSubMenuLevelChange","onOpenSubMenuLevelChange"]]]]],["pn-sidenav-level.cjs",[[4,"pn-sidenav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"alignment":[32]}]]],["pn-sidenav-link.cjs",[[4,"pn-sidenav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"icon":[1],"current":[4],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-find-price-result.cjs",[[0,"pn-find-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-find-service-and-price-result.cjs",[[0,"pn-find-service-and-price-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-product-pricelist-result.cjs",[[0,"pn-product-pricelist-result",{"item":[1040],"shownitems":[16],"weightText":[32]}]]],["pn-bonus-progressbar-level.cjs",[[0,"pn-bonus-progressbar-level",{"current":[516],"value":[1538],"bonuspercentage":[1537],"visualpercentage":[1538],"percentage":[32],"max":[32],"min":[32],"currency":[32]}]]],["pn-site-footer_2.cjs",[[4,"pn-site-footer",{"url":[1]}],[4,"pn-site-footer-col"]]],["pn-choice-button.cjs",[[4,"pn-choice-button",{"value":[520],"name":[1],"choiceid":[1],"type":[1],"disabled":[4],"checked":[4],"indeterminate":[1028]},[[0,"change","handlechange"]]]]],["pn-mainnav-link.cjs",[[4,"pn-mainnav-link",{"name":[1],"href":[1],"target":[1],"linkid":[1],"levelId":[32],"open":[32],"hasChildren":[32]}]]],["pn-product-card_3.cjs",[[4,"pn-product-card"],[0,"pn-product-card-info",{"rulle":[1],"paket":[1],"label":[1],"text":[1]}],[0,"pn-product-card-price",{"label":[1],"amount":[1],"currency":[1],"note":[1],"url":[1]}]]],["pn-language-selector_9.cjs",[[4,"pn-mainnav-level",{"level":[32],"levelId":[32],"isOpen":[32],"parentName":[32],"parentHref":[32],"parentLinkId":[32],"listCount":[32],"alignment":[32]}],[4,"pn-language-selector",{"value":[1537],"selectedLanguageName":[32],"options":[32],"i18n":[32]}],[0,"pn-language-selector-option",{"name":[1],"code":[1],"url":[1],"selected":[4],"currentLanguage":[1,"current-language"]}],[4,"pn-mainnav",{"market":[1],"language":[1],"navigationId":[1,"navigation-id"],"openMenu":[1028,"open-menu"],"navLabel":[1,"nav-label"]},[[0,"language","setLanguage"],[0,"market","setMarket"],[0,"menuLanguageChange","onLanguageChange"],[0,"setmenuopenstate","setMenuOpenState"],[0,"openMenuLevelChange","onOpenMenuLevelChange"]]],[4,"pn-mainnav-list",{"heading":[1],"linkCount":[32]}],[0,"pn-marketweb-siteheader-login",{"endpoint":[1],"token":[1],"i18n":[8,"i-1-8n"],"emitEvents":[4,"emit-events"],"loginDialog":[1040],"loginManager":[32],"loggedIn":[32],"toggleButtonText":[32],"username":[32]}],[0,"pn-marketweb-siteheader-search",{"i18n":[8,"i-1-8n"],"showOnlyLink":[1028,"show-only-link"],"hideSearch":[1028,"hide-search"],"search":[1040]}],[4,"pn-site-selector",{"buttontext":[1537],"heading":[1537],"language":[1537],"i18n":[32]}],[0,"pn-site-selector-item",{"url":[1],"heading":[1],"description":[1],"newwindow":[4]}]]],["pn-product-tile_3.cjs",[[4,"pn-product-tile"],[0,"pn-product-tile-info",{"label":[1],"text":[1],"icon":[1]}],[0,"pn-product-tile-price",{"label":[1],"amount":[1],"currency":[1],"url":[1]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
6
|
|
|
7
7
|
const pnBonusProgressbarLevelCss = "pn-bonus-progressbar-level{position:absolute;width:0.1rem;left:50%}pn-bonus-progressbar-level::after{content:\"\";width:0.1rem;position:absolute;left:0;border-left:1px dashed #9B1C2E;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:3rem}pn-bonus-progressbar-level:not([current]):nth-child(even)::after{height:7rem;margin-top:0.6rem}.progressbar-level-percentage{font-size:0.75em;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:-3.2rem}[current]>.progressbar-level-percentage{display:none}pn-bonus-progressbar-level:not([current]):nth-child(even) .progressbar-level-percentage{top:-4.8rem}.progressbar-level-value{font-size:0.75em;white-space:nowrap;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);top:2.3rem}[current]>.progressbar-level-value{top:-3.2rem}pn-bonus-progressbar-level:not([current]):nth-child(even) .progressbar-level-value{top:4.2rem}";
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
6
|
|
|
7
7
|
const pnBonusProgressbarCss = "pn-bonus-progressbar{width:100%}.bonusprogressbar-top{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.bonusprogressbar-top-icon{border-radius:100%;height:5rem;width:5rem;padding:1rem;display:-ms-inline-flexbox;display:inline-flex;margin-right:1em;margin-left:0.5em;background-color:#E0F8FF}[theme=red] .bonusprogressbar-top-icon{background-color:#FBC2C1}.bonusprogressbar-top-icon pn-icon svg{width:100%;height:100%}.bonusprogressbar-top-percentage{margin-left:auto;padding:0.5em}.bonusprogressbar-wrapper{position:relative;display:-ms-flexbox;display:flex;min-height:5em;-ms-flex-align:center;align-items:center}.bonusprogressbar-currentlevel{position:absolute}.bonusprogressbar-progress[value]{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:1.7rem;border:0.1rem solid #00A0D6;border-radius:1.7rem;padding:0;margin:0;overflow:hidden}[theme=red] .bonusprogressbar-progress[value]{border-color:#F06365}.bonusprogressbar-progress[value]::-webkit-progress-bar{border:0;border-radius:1.7rem;margin:0;padding:0;background:#E0F8FF}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-bar{background:#FDEFEE}.bonusprogressbar-progress[value]::-webkit-progress-value{margin:0;padding:0;border-radius:1.7rem;background:#00A0D6}[theme=red] .bonusprogressbar-progress[value]::-webkit-progress-value{background:#F06365}";
|
|
8
8
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
|
+
|
|
7
|
+
const pnChoiceButtonCss = "pn-choice-button{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;display:inline-block;background:#fff;position:relative;margin:0.2em 0.4em}pn-choice-button input{opacity:0;position:absolute;top:0;left:0;pointer-events:none;margin:0;width:100%;height:100%}pn-choice-button label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0.4rem 0.8rem;border:0.1rem solid #D3CECB;color:#005D92;font-weight:500;border-radius:0.8rem;text-align:center;cursor:pointer;-webkit-transition:background 0.2s, -webkit-box-shadow 0.1s;transition:background 0.2s, -webkit-box-shadow 0.1s;transition:box-shadow 0.1s, background 0.2s;transition:box-shadow 0.1s, background 0.2s, -webkit-box-shadow 0.1s}pn-choice-button label pn-illustration{display:inline-block;width:3rem;height:3rem;margin-right:0.9rem}pn-choice-button>input:checked+label.pn-choice-button{background:#E0F8FF;color:#005D92;border-color:#005D92;-webkit-box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13);box-shadow:0px 0.6px 1.8px rgba(0, 0, 0, 0.1), 0px 3.2px 7.2px rgba(0, 0, 0, 0.13)}pn-choice-button>input:indeterminate+label.pn-choice-button{background:#FFFFFF;color:#005D92}pn-choice-button>input:hover+label.pn-choice-button{background:#E0F8FF}pn-choice-button>input:focus+label.pn-choice-button,pn-choice-button>input:active+label.pn-choice-button{-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}pn-choice-button>input:active+label.pn-choice-button{background:#8EDDF9}pn-choice-button>input:disabled+label.pn-choice-button{background-color:#D3CECB}pn-choice-button>input:checked+label.pn-choice-button:hover{background:#8EDDF9}pn-choice-button>input:checked+label.pn-choice-button:active{background:#8EDDF9;border:0.1rem solid #00A0D6}";
|
|
8
|
+
|
|
9
|
+
let PnChoiceButton = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.type = "checkbox";
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
this.checked = false;
|
|
15
|
+
this.indeterminate = false;
|
|
16
|
+
}
|
|
17
|
+
handlechange() {
|
|
18
|
+
this.indeterminate = false;
|
|
19
|
+
}
|
|
20
|
+
componentDidLoad() {
|
|
21
|
+
this.checkAndSetIndeterminateState();
|
|
22
|
+
}
|
|
23
|
+
componentDidUpdate() {
|
|
24
|
+
this.checkAndSetIndeterminateState();
|
|
25
|
+
}
|
|
26
|
+
checkAndSetIndeterminateState() {
|
|
27
|
+
let checkbox = this.hostElement.querySelector(`#${this.choiceid}`);
|
|
28
|
+
if (checkbox) {
|
|
29
|
+
checkbox.indeterminate = this.indeterminate;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return (index.h(index.Host, null, index.h("input", { type: this.type, id: this.choiceid, value: this.value, name: this.name || this.choiceid, disabled: this.disabled, checked: this.checked }), index.h("label", { htmlFor: this.choiceid, class: "pn-choice-button" }, index.h("slot", null))));
|
|
34
|
+
}
|
|
35
|
+
get hostElement() { return index.getElement(this); }
|
|
36
|
+
};
|
|
37
|
+
PnChoiceButton.style = pnChoiceButtonCss;
|
|
38
|
+
|
|
39
|
+
exports.pn_choice_button = PnChoiceButton;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
6
|
|
|
7
7
|
const pnFilterCheckboxCss = ":host{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host input{opacity:0;position:absolute}:host input[type=checkbox]+label.pn-checkbox{width:1.5em;min-width:1.5em;height:1.5em;min-height:1.5em;background:#fff;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;position:relative;border:0.1rem solid #969087;cursor:pointer;border-radius:0.4rem;cursor:pointer;-webkit-transition-duration:220ms;transition-duration:220ms;-webkit-transition-timing-function:cubic-bezier(0.79, 0.14, 0.15, 0.86);transition-timing-function:cubic-bezier(0.79, 0.14, 0.15, 0.86);-webkit-transition-property:border, background, -webkit-box-shadow;transition-property:border, background, -webkit-box-shadow;transition-property:border, background, box-shadow;transition-property:border, background, box-shadow, -webkit-box-shadow}:host input[type=checkbox]+label.pn-checkbox svg{width:80%;fill:none}:host input[type=checkbox]+label.pn-checkbox svg polyline{stroke:#FFF;-webkit-transform-origin:0 0;transform-origin:0 0;stroke-linecap:round;stroke-dasharray:23;stroke-dashoffset:23;-webkit-transition-delay:none;transition-delay:none;-webkit-transition:stroke-dashoffset 180ms cubic-bezier(0.79, 0.14, 0.15, 0.86);transition:stroke-dashoffset 180ms cubic-bezier(0.79, 0.14, 0.15, 0.86)}:host input[type=checkbox]:hover+label.pn-checkbox{border:0.1rem solid #005D92;background:#E0F8FF}:host input[type=checkbox]:checked+label.pn-checkbox,:host input[type=checkbox]:indeterminate+label.pn-checkbox{background:#005D92;border:0.1rem solid #005D92}:host input[type=checkbox]:checked+label.pn-checkbox svg polyline,:host input[type=checkbox]:indeterminate+label.pn-checkbox svg polyline{-webkit-transition-delay:220ms;transition-delay:220ms}:host input[type=checkbox]:checked+label.pn-checkbox svg polyline.checkmark-path{stroke-dashoffset:0}:host input[type=checkbox]:indeterminate+label.pn-checkbox svg polyline.indeterminate-path{stroke-dashoffset:0}:host input[type=checkbox]:focus+label.pn-checkbox,:host input[type=checkbox]:active+label.pn-checkbox{-webkit-box-shadow:0 0 0 0.1rem white, 0 0 0 0.3rem #005D92;box-shadow:0 0 0 0.1rem white, 0 0 0 0.3rem #005D92}:host input[type=checkbox]:disabled+label.pn-checkbox{background-color:#D3CECB;border:0.1rem solid #969087;cursor:not-allowed}:host input[type=checkbox]:disabled+label.pn-checkbox svg polyline{stroke:#969087}:host input[type=checkbox]:disabled:checked+label.pn-checkbox{border:0.1rem solid transparent}:host input[type=checkbox]:disabled:active+label.pn-checkbox{-webkit-box-shadow:none;box-shadow:none}";
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
6
|
|
|
7
7
|
const pnFilterSearchCss = ":host{display:-ms-inline-flexbox;display:inline-flex}:host>pn-button{margin-left:0.35em}:host>pn-button button .pn-button-bg{-webkit-transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, left 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, left 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, left 0.2s, transform 0.2s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, left 0.2s, transform 0.2s, -webkit-box-shadow 0.1s, -webkit-transform 0.2s}:host>pn-button[data-loading=true] .pn-button-bg{left:0;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, -webkit-box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, -webkit-box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s;transition:width 0.2s cubic-bezier(0.7, 0, 0.3, 1) 0.2s, background 0.1s, box-shadow 0.1s, -webkit-box-shadow 0.1s}:host>pn-button[data-loading=true] pn-spinner{left:0.75em}:host input{padding:0.75em;min-height:3em;font-size:1em;height:100%;font-weight:500;-webkit-font-smoothing:antialiased;outline:none;border-radius:3em;border:0.1rem solid #5E554A;-webkit-transition:border 0.15s, -webkit-box-shadow 0.15s;transition:border 0.15s, -webkit-box-shadow 0.15s;transition:box-shadow 0.15s, border 0.15s;transition:box-shadow 0.15s, border 0.15s, -webkit-box-shadow 0.15s;color:#000000;width:100%}:host input::-webkit-search-cancel-button{display:none}:host input::-webkit-input-placeholder{color:#969087;font-weight:normal}:host input::-moz-placeholder{color:#969087;font-weight:normal}:host input:-ms-input-placeholder{color:#969087;font-weight:normal}:host input::-ms-input-placeholder{color:#969087;font-weight:normal}:host input::placeholder{color:#969087;font-weight:normal}:host input:focus{border:0.1rem solid #005D92;-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92}:host input:hover{border:0.1rem solid #00A0D6}:host input:disabled{background:#F3F2F2;border:none}:host>.input-container{width:100%;position:relative}:host>.input-container .button-container{position:absolute;top:0;right:0;background:transparent;width:3em;height:100%;overflow:hidden;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}:host>.input-container button{position:absolute;left:50%;top:50%;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%);background:none;border:none;color:#005D92;padding:0.3rem;border-radius:50%;outline:none;-webkit-transition:border 0.1s, background 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:border 0.1s, background 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:border 0.1s, background 0.2s, box-shadow 0.1s, transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, opacity 0.2s;transition:border 0.1s, background 0.2s, box-shadow 0.1s, transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, opacity 0.2s, -webkit-box-shadow 0.1s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;border:0.1rem solid transparent}:host>.input-container button.clear,:host>.input-container button.search{cursor:pointer}:host>.input-container button:focus{-webkit-box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.2rem #fff, 0 0 0 0.4rem #005D92;background:#8EDDF9}:host>.input-container button:hover{background:#E0F8FF}:host>.input-container button:active{background:#005D92}:host>.input-container button:active pn-icon svg,:host>.input-container button:active pn-icon svg path{fill:white}:host.searching button.search{-webkit-transform:translate(150%, -50%);transform:translate(150%, -50%)}:host.searching button.clear{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none input,:host.button-icon-inline input{padding-right:3.3em}:host.button-none pn-spinner,:host.button-icon-inline pn-spinner{position:absolute;left:50%;top:50%;-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%);-webkit-transition:-webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:-webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s;transition:transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s, -webkit-transform cubic-bezier(0.7, 0, 0.3, 1) 0.2s}:host.button-none button.search,:host.button-icon-inline button.search{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none.loading button,:host.button-icon-inline.loading button{-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host.button-none.loading pn-spinner,:host.button-icon-inline.loading pn-spinner{-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}:host.button-none.searching button.search{-webkit-transform:translate(100%, -50%);transform:translate(100%, -50%)}:host.button-icon>pn-button[data-loading=true] .pn-button-bg{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}";
|
|
8
8
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-0a6b1eef.js');
|
|
6
|
+
const pnFindPriceStore = require('./pn-find-price-store-346abc1a.js');
|
|
7
|
+
require('./index-9027dc96.js');
|
|
8
|
+
|
|
9
|
+
const pnFindPriceResultCss = "pn-find-price-result .test{margin:3em 0}.resultcontent{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-positive:1;flex-grow:1}";
|
|
10
|
+
|
|
11
|
+
let PnfindPriceResult = class {
|
|
12
|
+
constructor(hostRef) {
|
|
13
|
+
index.registerInstance(this, hostRef);
|
|
14
|
+
this.item = null;
|
|
15
|
+
this.shownitems = [];
|
|
16
|
+
this.weightText = "";
|
|
17
|
+
}
|
|
18
|
+
componentWillLoad() {
|
|
19
|
+
this.composeItems();
|
|
20
|
+
}
|
|
21
|
+
composeItems() {
|
|
22
|
+
}
|
|
23
|
+
render() {
|
|
24
|
+
return (index.h(index.Host, null, index.h("pn-product-card", null, index.h("pn-illustration", { slot: "illustration", illustration: this.item.illustration }), index.h("div", { slot: "content" }, index.h("div", { class: "content" }, index.h("h3", null, this.item.name, (this.item.highestrankusp) ?
|
|
25
|
+
(this.item.highestrankusp === "Biligast") ?
|
|
26
|
+
(index.h("span", { slot: "Biligast" }, this.item.highestrankusp)) : (index.h("span", { slot: "Snabbast" }, this.item.highestrankusp)) : null), (this.item.description) ? (index.h("div", { class: "description" }, this.item.description)) : null, (this.item.info) ? (index.h("div", { class: "description" }, this.item.info)) : null)), this.item.note ? (index.h("small", { slot: "note" }, index.h("p", null, this.item.note))) : null, this.item.additionalusp ? (index.h("small", { slot: "additionalUSP" }, index.h("p", null, this.item.additionalusp))) : null, this.item.maximummeasurements ? (index.h("pn-product-card-info", { label: pnFindPriceStore.state.i18n.maxmeasurementlabel, text: this.item.maximummeasurements })) : null, this.item.paket ? (index.h("pn-product-card-info", { paket: this.item.paket, rulle: this.item.rulle })) : null, this.item.priceagent ? (index.h("pn-product-card-price", { slot: "price", label: "", amount: this.item.priceagent + '', currency: pnFindPriceStore.state.market.currency, url: "https://shop.postnord.se/ebutik/default.aspx" })) : null, this.item.pricesenddirect ? (index.h("pn-product-card-price", { slot: "sendDirectPrice", label: pnFindPriceStore.state.i18n.senddirectcta, amount: this.item.pricesenddirect + '', currency: pnFindPriceStore.state.market.currency, url: "https://portal.postnord.com/skickadirekt/" })) : null, this.item.pricestamps ? (index.h("pn-product-card-price", { slot: "stampPrice", label: pnFindPriceStore.state.i18n.stampshopcta, amount: this.item.pricestamps + '', currency: pnFindPriceStore.state.market.currency, url: "https://shop.postnord.se/ebutik/default.aspx", note: pnFindPriceStore.state.i18n.message })) : null)));
|
|
27
|
+
}
|
|
28
|
+
static get watchers() { return {
|
|
29
|
+
"item": ["composeItems"]
|
|
30
|
+
}; }
|
|
31
|
+
};
|
|
32
|
+
PnfindPriceResult.style = pnFindPriceResultCss;
|
|
33
|
+
|
|
34
|
+
exports.pn_find_price_result = PnfindPriceResult;
|