@postnord/pn-marketweb-components 2.0.120 → 2.0.121
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/_commonjsHelpers-206db00d.js +37 -0
- package/cjs/convert-b219d02d.js +1826 -0
- package/cjs/loader.cjs.js +1 -1
- package/cjs/pn-chart.cjs.entry.js +21919 -0
- package/cjs/pn-charts-card.cjs.entry.js +21 -0
- package/cjs/pn-find-price.cjs.entry.js +2 -1
- package/cjs/pn-find-service-and-price.cjs.entry.js +2 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-product-pricelist.cjs.entry.js +2 -1
- package/collection/collection-manifest.json +2 -0
- package/collection/components/charts/pn-chart/pn-chart-helper.js +52 -0
- package/collection/components/charts/pn-chart/pn-chart.css +26 -0
- package/collection/components/charts/pn-chart/pn-chart.js +94 -0
- package/collection/components/charts/pn-chart/pn-chart.stories.js +0 -0
- package/collection/components/charts/pn-chart/types.js +1 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.css +106 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.js +156 -0
- package/collection/components/charts/pn-charts-card/pn-charts-card.stories.js +75 -0
- package/custom-elements/index.d.ts +12 -0
- package/custom-elements/index.js +21963 -17
- package/esm/_commonjsHelpers-27f122dd.js +32 -0
- package/esm/{convert-ae809f9c.js → convert-f6377d13.js} +2 -16
- package/esm/loader.js +1 -1
- package/esm/pn-chart.entry.js +21915 -0
- package/esm/pn-charts-card.entry.js +17 -0
- package/esm/pn-find-price.entry.js +2 -1
- package/esm/pn-find-service-and-price.entry.js +2 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-product-pricelist.entry.js +2 -1
- package/esm-es5/_commonjsHelpers-27f122dd.js +1 -0
- package/esm-es5/{convert-ae809f9c.js → convert-f6377d13.js} +2 -2
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-chart.entry.js +16 -0
- package/esm-es5/pn-charts-card.entry.js +1 -0
- package/esm-es5/pn-find-price.entry.js +1 -1
- package/esm-es5/pn-find-service-and-price.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-product-pricelist.entry.js +1 -1
- package/package.json +3 -1
- package/pn-market-web-components/p-1751415f.entry.js +16 -0
- package/pn-market-web-components/p-35fcd76c.system.entry.js +1 -0
- package/pn-market-web-components/p-3c0d63fb.system.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-736e5b84.system.entry.js +1 -0
- package/pn-market-web-components/p-77557da8.entry.js +1 -0
- package/pn-market-web-components/p-814af281.js +1 -0
- package/pn-market-web-components/{p-0ea97ca0.system.js → p-8766fa86.system.js} +2 -2
- package/pn-market-web-components/p-8e4d292f.entry.js +1 -0
- package/pn-market-web-components/p-aab2e28f.entry.js +1 -0
- package/pn-market-web-components/p-b97cb315.system.entry.js +16 -0
- package/pn-market-web-components/p-bfe239ca.js +13 -0
- package/pn-market-web-components/p-d3a0ed9b.system.entry.js +1 -0
- package/pn-market-web-components/p-effbbf45.entry.js +1 -0
- package/pn-market-web-components/p-fe1f76a3.system.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/charts/pn-chart/pn-chart-helper.d.ts +46 -0
- package/types/components/charts/pn-chart/pn-chart.d.ts +17 -0
- package/types/components/charts/pn-chart/types.d.ts +7 -0
- package/types/components/charts/pn-charts-card/pn-charts-card.d.ts +12 -0
- package/types/components.d.ts +46 -0
- package/umd/pn-marketweb-init.js +41 -37
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/cjs/convert-362ef5e6.js +0 -1840
- package/pn-market-web-components/p-513e3c62.entry.js +0 -1
- package/pn-market-web-components/p-774b7a9f.entry.js +0 -1
- package/pn-market-web-components/p-8144bcbc.system.entry.js +0 -1
- package/pn-market-web-components/p-9adc3940.js +0 -13
- package/pn-market-web-components/p-b32a8507.entry.js +0 -1
- package/pn-market-web-components/p-bc22baf1.system.entry.js +0 -1
- package/pn-market-web-components/p-fecc53bb.system.entry.js +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-e3e27c79.js');
|
|
6
|
+
|
|
7
|
+
const pnChartsCardCss = "pn-charts-card{width:100%;height:100%;display:-ms-flexbox;display:flex}pn-charts-card .pn-charts-card__wrapper{width:100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#EFFBFF;border-radius:2.4rem;padding:2.4rem}@media screen and (min-width: 1200px){pn-charts-card .pn-charts-card__wrapper{padding:3.2rem}}pn-charts-card .pn-charts-card__heading__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:space-evenly;justify-content:space-evenly}pn-charts-card .pn-charts-card__heading{font-weight:700;font-size:3.2rem;line-height:110%}pn-charts-card .pn-charts-card__heading__highlight{font-weight:700;font-size:3.2rem;line-height:110%;color:#005D92}pn-charts-card .pn-charts-card__text__wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between}pn-charts-card .pn-charts-card__text__wrapper span{display:block;margin-bottom:5.4rem}pn-charts-card .pn-charts-card__preamble{font-weight:400;font-size:2rem;line-height:140%;-ms-flex-positive:1;flex-grow:1;margin-bottom:1.6rem}pn-charts-card .pn-charts-card__source{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}pn-charts-card .pn-charts-card__source label{background-color:#00A0D6;color:#FFFFFF;border-radius:0.4rem;font-weight:400;font-size:1.2rem;line-height:140%;text-transform:uppercase;padding:0.4rem;margin-bottom:0.6rem;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}pn-charts-card .pn-charts-card__source h3{font-weight:400;font-size:2rem;line-height:140%;color:#005D92}pn-charts-card .pn-charts-card__source a{text-decoration:none;color:#005D92;font-weight:500;font-size:1.6rem;text-decoration:none;color:#005D92;font-weight:400}pn-charts-card .pn-charts-card__source a:hover{text-decoration:underline}pn-charts-card .pn-charts-card__source a pn-icon svg path{fill:#005D92}pn-charts-card .pn-charts-card__source a[target=_blank]:not(.pn-button):after{display:none}pn-charts-card[data-chart-color=coral]>.pn-charts-card__wrapper{background-color:#FDEFEE}pn-charts-card[data-chart-color=green]>.pn-charts-card__wrapper{background-color:#DCF6E7}pn-charts-card[data-chart-color=white]>.pn-charts-card__wrapper{background-color:#FFFFFF}pn-charts-card[data-chart-color=gray]>.pn-charts-card__wrapper{background-color:#F9F8F8}";
|
|
8
|
+
|
|
9
|
+
let PnChartsCard = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.openInNewWindow = false;
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
return (index.h(index.Host, null, index.h("slot", { name: "clickable-block-wrapper" }), index.h("div", { class: "pn-charts-card__wrapper" }, index.h("div", { class: "pn-charts-card__heading__wrapper" }, index.h("div", { class: "pn-charts-card__heading" }, this.header), index.h("div", { class: "pn-charts-card__heading__highlight" }, this.highlight)), index.h("slot", { name: "chart" }), index.h("span", { class: "pn-charts-card__preamble" }, this.preamble), index.h("div", { class: "pn-charts-card__text__wrapper" }, index.h("div", { class: "pn-charts-card__source" }, index.h("label", null, this.label), index.h("h3", null, this.source), index.h("a", { class: "link--animated", href: this.sourceUrl, rel: this.openInNewWindow ? 'noopener nofollower noreferrer' : null, target: this.openInNewWindow ? '_blank' : null }, "Read the report ", index.h("pn-icon", { symbol: "arrow-right" }, " ")))))));
|
|
16
|
+
}
|
|
17
|
+
get hostElement() { return index.getElement(this); }
|
|
18
|
+
};
|
|
19
|
+
PnChartsCard.style = pnChartsCardCss;
|
|
20
|
+
|
|
21
|
+
exports.pn_charts_card = PnChartsCard;
|
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e3e27c79.js');
|
|
6
6
|
const data = require('./data-b5ef4f7c.js');
|
|
7
|
-
const convert = require('./convert-
|
|
7
|
+
const convert = require('./convert-b219d02d.js');
|
|
8
8
|
const pnFindPriceStore = require('./pn-find-price-store-0b8c195c.js');
|
|
9
|
+
require('./_commonjsHelpers-206db00d.js');
|
|
9
10
|
require('./index-28bbc937.js');
|
|
10
11
|
|
|
11
12
|
const translations = {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e3e27c79.js');
|
|
6
|
-
const convert = require('./convert-
|
|
6
|
+
const convert = require('./convert-b219d02d.js');
|
|
7
7
|
const pnFindServiceAndPriceStore = require('./pn-find-service-and-price-store-16a7936c.js');
|
|
8
|
+
require('./_commonjsHelpers-206db00d.js');
|
|
8
9
|
require('./index-28bbc937.js');
|
|
9
10
|
|
|
10
11
|
const translations = {
|
|
@@ -55,5 +55,5 @@ const patchCloneNodeFix = (HTMLElementPrototype) => {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
patchBrowser().then(options => {
|
|
58
|
-
return index.bootstrapLazy(JSON.parse("[[\"pn-marketweb-siteheader.cjs\",[[4,\"pn-marketweb-siteheader\",{\"market\":[1537],\"language\":[1537],\"siteid\":[1],\"environment\":[1537],\"userToken\":[1,\"user-token\"],\"userFullname\":[1,\"user-fullname\"],\"userLoggedin\":[516,\"user-loggedin\"],\"endpoint\":[1],\"hideSiteSelector\":[1540,\"hide-site-selector\"],\"hideHomeMenuItem\":[1540,\"hide-home-menu-item\"],\"hideLanguageSelector\":[1540,\"hide-language-selector\"],\"hideSearch\":[1540,\"hide-search\"],\"hideLogin\":[1540,\"hide-login\"],\"showProfileSelection\":[1540,\"show-profile-selection\"],\"siteDomainInUrls\":[4,\"site-domain-in-urls\"],\"AutocompleteEndpoint\":[1,\"autocomplete-endpoint\"],\"sessionForward\":[4,\"session-forward\"],\"cache\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"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-proxio-pricegroup.cjs\",[[0,\"pn-proxio-pricegroup\",{\"endpoint\":[1025],\"language\":[1],\"market\":[1],\"tariffid\":[1],\"cache\":[4],\"activeWeightIndex\":[32],\"data\":[32],\"i18n\":[32]},[[0,\"activeWeightIndex\",\"setActiveWeightIndex\"],[0,\"language\",\"setLanguage\"]]]]],[\"pn-product-pricelist-result.cjs\",[[0,\"pn-product-pricelist-result\",{\"item\":[1040],\"description\":[16],\"shownitems\":[16],\"showMeasurement\":[4,\"show-measurement\"],\"weightText\":[32]}]]],[\"pn-marketweb-sitefooter.cjs\",[[4,\"pn-marketweb-sitefooter\",{\"market\":[1537],\"language\":[1537],\"environment\":[1537],\"endpoint\":[1],\"siteDomainInUrls\":[4,\"site-domain-in-urls\"],\"cache\":[4],\"theme\":[513],\"siteDefinition\":[32],\"footerContent\":[32],\"i18n\":[32],\"gotData\":[32],\"fetchingData\":[32]}]]],[\"pn-parcel-tracker.cjs\",[[0,\"pn-parcel-tracker\",{\"formActionUrl\":[1,\"form-action-url\"],\"heading\":[1],\"buttonLabel\":[1,\"button-label\"],\"locale\":[1],\"placeholder\":[1],\"inputName\":[1,\"input-name\"],\"currentWidth\":[32]},[[9,\"resize\",\"handleViewportSizeChange\"]]]]],[\"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-stats-info.cjs\",[[0,\"pn-stats-info\",{\"heading\":[1],\"dataArray\":[1,\"data-array\"],\"backgroundUrl\":[1,\"background-url\"],\"myParsedArray\":[32]}]]],[\"pn-bonus-progressbar.cjs\",[[4,\"pn-bonus-progressbar\",{\"icon\":[1],\"heading\":[1],\"sumtext\":[513],\"theme\":[513],\"bonuspercentage\":[1],\"currency\":[513],\"value\":[1538],\"min\":[1538],\"max\":[1538],\"valuepercentage\":[32],\"progresspercentage\":[32],\"levelValues\":[32],\"currentLevelAdjustedValue\":[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-breakpoints.cjs\",[[0,\"pn-breakpoints\",{\"breakPointClass\":[1,\"break-point-class\"],\"currentWidth\":[32]},[[9,\"resize\",\"handleViewportSizeChange\"]]]]],[\"pn-customernumber-selector.cjs\",[[4,\"pn-customernumber-selector\",{\"language\":[1537],\"open\":[1540],\"heading\":[1],\"description\":[1],\"i18n\":[32]}]]],[\"pn-customernumber-selector-option.cjs\",[[4,\"pn-customernumber-selector-option\",{\"heading\":[1],\"description\":[1],\"url\":[1]}]]],[\"pn-filter-checkbox.cjs\",[[1,\"pn-filter-checkbox\",{\"value\":[520],\"name\":[1],\"checkboxid\":[1],\"disabled\":[4],\"checked\":[4],\"indeterminate\":[1028]},[[0,\"change\",\"handlechange\"]]]]],[\"pn-line-shape.cjs\",[[0,\"pn-line-shape\"]]],[\"pn-marketweb-search.cjs\",[[1,\"pn-marketweb-search\",{\"disabled\":[4],\"placeholder\":[1],\"inputid\":[1],\"name\":[1],\"autocomplete\":[1],\"list\":[1],\"value\":[1],\"label\":[1],\"loading\":[4],\"button\":[1],\"light\":[4],\"suggestionObserver\":[32],\"hasClonedInput\":[32],\"listSuggestion\":[32]},[[0,\"input\",\"inputHandler\"]]]]],[\"pn-product-tile.cjs\",[[4,\"pn-product-tile\"]]],[\"pn-profile-modal.cjs\",[[4,\"pn-profile-modal\",{\"heading\":[1],\"continueCtaText\":[1,\"continue-cta-text\"],\"choosenCompanyText\":[1,\"choosen-company-text\"],\"toText\":[1,\"to-text\"],\"chooseCustomerNumberText\":[1,\"choose-customer-number-text\"],\"isLoading\":[32]},[[0,\"urlSelected\",\"onUrlSelected\"]]]]],[\"pn-profile-modal-customernumber.cjs\",[[4,\"pn-profile-modal-customernumber\",{\"url\":[513],\"customernumber\":[513],\"selected\":[516]}]]],[\"pn-profile-modal-profile.cjs\",[[4,\"pn-profile-modal-profile\",{\"heading\":[513],\"description\":[513],\"url\":[513],\"selected\":[1028],\"showCustomerNumbers\":[516,\"show-customer-numbers\"],\"pleaseSelectText\":[513,\"please-select-text\"],\"visible\":[1540],\"identifier\":[32]}]]],[\"pn-profile-modal-type.cjs\",[[4,\"pn-profile-modal-type\",{\"typeid\":[513],\"name\":[1025],\"selected\":[1028],\"selectedprofile\":[1025]}]]],[\"pn-profile-selector.cjs\",[[4,\"pn-profile-selector\",{\"language\":[1537],\"returnUrl\":[1,\"return-url\"],\"heading\":[1],\"i18n\":[32],\"isLoading\":[32],\"numberOfProfiles\":[32]}]]],[\"pn-profile-selector-option.cjs\",[[0,\"pn-profile-selector-option\",{\"heading\":[1],\"description\":[1],\"url\":[1]}]]],[\"pn-quick-cta.cjs\",[[4,\"pn-quick-cta\",{\"heading\":[1],\"preamble\":[1]}]]],[\"pn-quote-card.cjs\",[[4,\"pn-quote-card\",{\"quote\":[1],\"name\":[1],\"occupation\":[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-sidenav-togglebutton.cjs\",[[4,\"pn-sidenav-togglebutton\",{\"label\":[1],\"i18n\":[32]}]]],[\"pn-spotlight.cjs\",[[4,\"pn-spotlight\",{\"heading\":[1],\"preamble\":[1]}]]],[\"pn-teaser-card.cjs\",[[4,\"pn-teaser-card\",{\"text\":[1],\"heading\":[1],\"label\":[1],\"dataCardColor\":[513,\"data-card-color\"],\"dataCardAlignment\":[513,\"data-card-alignment\"],\"hasCtaSlotContent\":[32]}]]],[\"pn-find-service-and-price-result.cjs\",[[0,\"pn-find-service-and-price-result\",{\"item\":[1040],\"shownitems\":[16],\"weightText\":[32]}]]],[\"pn-stats-info-data.cjs\",[[0,\"pn-stats-info-data\",{\"data\":[2],\"unit\":[1],\"preamble\":[1],\"compId\":[1,\"comp-id\"],\"duration\":[2],\"hasBeenShown\":[32]}]]],[\"pn-find-price-result.cjs\",[[0,\"pn-find-price-result\",{\"item\":[1040],\"shownitems\":[16],\"Usp1\":[1,\"usp-1\"],\"Usp2\":[1,\"usp-2\"],\"Usp3\":[1,\"usp-3\"],\"description\":[16],\"showMeasurement\":[4,\"show-measurement\"],\"weightText\":[32],\"linkId\":[32],\"shopLabel\":[32],\"shopUrl\":[32],\"shopId\":[32]}]]],[\"pn-site-footer_2.cjs\",[[4,\"pn-site-footer\",{\"url\":[1],\"linktitle\":[1],\"theme\":[513]}],[4,\"pn-site-footer-col\",{\"theme\":[513]}]]],[\"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-marketweb-input.cjs\",[[0,\"pn-marketweb-input\",{\"disabled\":[4],\"error\":[1],\"invalid\":[4],\"helpertext\":[1],\"label\":[1],\"placeholder\":[1],\"inputid\":[1],\"name\":[1],\"required\":[4],\"type\":[1025],\"autocomplete\":[1],\"valid\":[4],\"value\":[1],\"maxlength\":[1],\"min\":[1],\"max\":[1],\"step\":[1],\"pattern\":[1],\"showText\":[32]}]]],[\"pn-marketweb-siteheader-login-links_2.cjs\",[[0,\"pn-marketweb-siteheader-login-links\",{\"loginDialog\":[1040],\"loginManager\":[16],\"idNamespace\":[1,\"id-namespace\"],\"loggedin\":[516],\"username\":[1]}],[0,\"pn-marketweb-siteheader-login-profileselection\",{\"loginDialog\":[1040],\"loginManager\":[16],\"endpoint\":[1],\"loggedin\":[4],\"idNamespace\":[1,\"id-namespace\"],\"heading\":[1],\"i18n\":[16],\"currentProfile\":[1040],\"profileoptions\":[1040],\"user\":[32],\"logoutLink\":[32],\"userName\":[32],\"userEmail\":[32]}]]],[\"pn-proxio-productcard_4.cjs\",[[4,\"pn-proxio-productcard\"],[0,\"pn-proxio-productcard-description\",{\"heading\":[1],\"highlight\":[1],\"description\":[1],\"list\":[1040]}],[0,\"pn-proxio-productcard-information\",{\"label\":[1],\"information\":[16]}],[0,\"pn-proxio-productcard-pricelink\",{\"price\":[1],\"link\":[1],\"linktext\":[1]}]]],[\"pn-product-tile-info_2.cjs\",[[0,\"pn-product-tile-info\",{\"label\":[1],\"text\":[1],\"icon\":[1]}],[0,\"pn-product-tile-price\",{\"label\":[1],\"amount\":[1],\"currency\":[1],\"url\":[1]}]]],[\"pn-marketweb-siteheader-login-linklist.cjs\",[[0,\"pn-marketweb-siteheader-login-linklist\",{\"heading\":[1],\"links\":[16],\"idNamespace\":[1,\"id-namespace\"],\"loginManager\":[16]}]]],[\"pn-language-selector_9.cjs\",[[0,\"pn-marketweb-siteheader-login\",{\"endpoint\":[1],\"token\":[1],\"i18n\":[16],\"siteUrl\":[1,\"site-url\"],\"emitEvents\":[4,\"emit-events\"],\"loginDialog\":[1040],\"fullname\":[1],\"loggedin\":[4],\"showProfileSelection\":[1028,\"show-profile-selection\"],\"loginManager\":[32],\"loginLinks\":[32],\"toggleButtonText\":[32],\"username\":[32]}],[4,\"pn-mainnav-level\",{\"label\":[1537],\"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-search\",{\"i18n\":[8,\"i-1-8n\"],\"showOnlyLink\":[1028,\"show-only-link\"],\"hideSearch\":[1028,\"hide-search\"],\"language\":[1537],\"siteid\":[1],\"search\":[1040],\"primary\":[4],\"icononly\":[4],\"autoCompleteOptions\":[32]}],[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-card_4.cjs\",[[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],\"service\":[1],\"linkid\":[1]}],[4,\"pn-titletag\",{\"icon\":[1],\"color\":[1537]}],[4,\"pn-product-card\"]]]]"), options);
|
|
58
|
+
return index.bootstrapLazy(JSON.parse("[[\"pn-marketweb-siteheader.cjs\",[[4,\"pn-marketweb-siteheader\",{\"market\":[1537],\"language\":[1537],\"siteid\":[1],\"environment\":[1537],\"userToken\":[1,\"user-token\"],\"userFullname\":[1,\"user-fullname\"],\"userLoggedin\":[516,\"user-loggedin\"],\"endpoint\":[1],\"hideSiteSelector\":[1540,\"hide-site-selector\"],\"hideHomeMenuItem\":[1540,\"hide-home-menu-item\"],\"hideLanguageSelector\":[1540,\"hide-language-selector\"],\"hideSearch\":[1540,\"hide-search\"],\"hideLogin\":[1540,\"hide-login\"],\"showProfileSelection\":[1540,\"show-profile-selection\"],\"siteDomainInUrls\":[4,\"site-domain-in-urls\"],\"AutocompleteEndpoint\":[1,\"autocomplete-endpoint\"],\"sessionForward\":[4,\"session-forward\"],\"cache\":[4],\"searchPlaceholder\":[1,\"search-placeholder\"],\"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-proxio-pricegroup.cjs\",[[0,\"pn-proxio-pricegroup\",{\"endpoint\":[1025],\"language\":[1],\"market\":[1],\"tariffid\":[1],\"cache\":[4],\"activeWeightIndex\":[32],\"data\":[32],\"i18n\":[32]},[[0,\"activeWeightIndex\",\"setActiveWeightIndex\"],[0,\"language\",\"setLanguage\"]]]]],[\"pn-product-pricelist-result.cjs\",[[0,\"pn-product-pricelist-result\",{\"item\":[1040],\"description\":[16],\"shownitems\":[16],\"showMeasurement\":[4,\"show-measurement\"],\"weightText\":[32]}]]],[\"pn-marketweb-sitefooter.cjs\",[[4,\"pn-marketweb-sitefooter\",{\"market\":[1537],\"language\":[1537],\"environment\":[1537],\"endpoint\":[1],\"siteDomainInUrls\":[4,\"site-domain-in-urls\"],\"cache\":[4],\"theme\":[513],\"siteDefinition\":[32],\"footerContent\":[32],\"i18n\":[32],\"gotData\":[32],\"fetchingData\":[32]}]]],[\"pn-parcel-tracker.cjs\",[[0,\"pn-parcel-tracker\",{\"formActionUrl\":[1,\"form-action-url\"],\"heading\":[1],\"buttonLabel\":[1,\"button-label\"],\"locale\":[1],\"placeholder\":[1],\"inputName\":[1,\"input-name\"],\"currentWidth\":[32]},[[9,\"resize\",\"handleViewportSizeChange\"]]]]],[\"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-stats-info.cjs\",[[0,\"pn-stats-info\",{\"heading\":[1],\"dataArray\":[1,\"data-array\"],\"backgroundUrl\":[1,\"background-url\"],\"myParsedArray\":[32]}]]],[\"pn-bonus-progressbar.cjs\",[[4,\"pn-bonus-progressbar\",{\"icon\":[1],\"heading\":[1],\"sumtext\":[513],\"theme\":[513],\"bonuspercentage\":[1],\"currency\":[513],\"value\":[1538],\"min\":[1538],\"max\":[1538],\"valuepercentage\":[32],\"progresspercentage\":[32],\"levelValues\":[32],\"currentLevelAdjustedValue\":[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-breakpoints.cjs\",[[0,\"pn-breakpoints\",{\"breakPointClass\":[1,\"break-point-class\"],\"currentWidth\":[32]},[[9,\"resize\",\"handleViewportSizeChange\"]]]]],[\"pn-chart.cjs\",[[0,\"pn-chart\",{\"labels\":[1],\"dataSets\":[1,\"data-sets\"],\"dataChartType\":[8,\"data-chart-type\"],\"parsedDataSets\":[32],\"parsedLabels\":[32]}]]],[\"pn-charts-card.cjs\",[[4,\"pn-charts-card\",{\"header\":[1],\"highlight\":[1],\"preamble\":[1],\"label\":[1],\"source\":[1],\"sourceUrl\":[1,\"source-url\"],\"openInNewWindow\":[4,\"open-in-new-window\"],\"someState\":[32]}]]],[\"pn-customernumber-selector.cjs\",[[4,\"pn-customernumber-selector\",{\"language\":[1537],\"open\":[1540],\"heading\":[1],\"description\":[1],\"i18n\":[32]}]]],[\"pn-customernumber-selector-option.cjs\",[[4,\"pn-customernumber-selector-option\",{\"heading\":[1],\"description\":[1],\"url\":[1]}]]],[\"pn-filter-checkbox.cjs\",[[1,\"pn-filter-checkbox\",{\"value\":[520],\"name\":[1],\"checkboxid\":[1],\"disabled\":[4],\"checked\":[4],\"indeterminate\":[1028]},[[0,\"change\",\"handlechange\"]]]]],[\"pn-line-shape.cjs\",[[0,\"pn-line-shape\"]]],[\"pn-marketweb-search.cjs\",[[1,\"pn-marketweb-search\",{\"disabled\":[4],\"placeholder\":[1],\"inputid\":[1],\"name\":[1],\"autocomplete\":[1],\"list\":[1],\"value\":[1],\"label\":[1],\"loading\":[4],\"button\":[1],\"light\":[4],\"suggestionObserver\":[32],\"hasClonedInput\":[32],\"listSuggestion\":[32]},[[0,\"input\",\"inputHandler\"]]]]],[\"pn-product-tile.cjs\",[[4,\"pn-product-tile\"]]],[\"pn-profile-modal.cjs\",[[4,\"pn-profile-modal\",{\"heading\":[1],\"continueCtaText\":[1,\"continue-cta-text\"],\"choosenCompanyText\":[1,\"choosen-company-text\"],\"toText\":[1,\"to-text\"],\"chooseCustomerNumberText\":[1,\"choose-customer-number-text\"],\"isLoading\":[32]},[[0,\"urlSelected\",\"onUrlSelected\"]]]]],[\"pn-profile-modal-customernumber.cjs\",[[4,\"pn-profile-modal-customernumber\",{\"url\":[513],\"customernumber\":[513],\"selected\":[516]}]]],[\"pn-profile-modal-profile.cjs\",[[4,\"pn-profile-modal-profile\",{\"heading\":[513],\"description\":[513],\"url\":[513],\"selected\":[1028],\"showCustomerNumbers\":[516,\"show-customer-numbers\"],\"pleaseSelectText\":[513,\"please-select-text\"],\"visible\":[1540],\"identifier\":[32]}]]],[\"pn-profile-modal-type.cjs\",[[4,\"pn-profile-modal-type\",{\"typeid\":[513],\"name\":[1025],\"selected\":[1028],\"selectedprofile\":[1025]}]]],[\"pn-profile-selector.cjs\",[[4,\"pn-profile-selector\",{\"language\":[1537],\"returnUrl\":[1,\"return-url\"],\"heading\":[1],\"i18n\":[32],\"isLoading\":[32],\"numberOfProfiles\":[32]}]]],[\"pn-profile-selector-option.cjs\",[[0,\"pn-profile-selector-option\",{\"heading\":[1],\"description\":[1],\"url\":[1]}]]],[\"pn-quick-cta.cjs\",[[4,\"pn-quick-cta\",{\"heading\":[1],\"preamble\":[1]}]]],[\"pn-quote-card.cjs\",[[4,\"pn-quote-card\",{\"quote\":[1],\"name\":[1],\"occupation\":[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-sidenav-togglebutton.cjs\",[[4,\"pn-sidenav-togglebutton\",{\"label\":[1],\"i18n\":[32]}]]],[\"pn-spotlight.cjs\",[[4,\"pn-spotlight\",{\"heading\":[1],\"preamble\":[1]}]]],[\"pn-teaser-card.cjs\",[[4,\"pn-teaser-card\",{\"text\":[1],\"heading\":[1],\"label\":[1],\"dataCardColor\":[513,\"data-card-color\"],\"dataCardAlignment\":[513,\"data-card-alignment\"],\"hasCtaSlotContent\":[32]}]]],[\"pn-product-card_4.cjs\",[[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],\"service\":[1],\"linkid\":[1]}],[4,\"pn-titletag\",{\"icon\":[1],\"color\":[1537]}],[4,\"pn-product-card\"]]],[\"pn-find-service-and-price-result.cjs\",[[0,\"pn-find-service-and-price-result\",{\"item\":[1040],\"shownitems\":[16],\"weightText\":[32]}]]],[\"pn-stats-info-data.cjs\",[[0,\"pn-stats-info-data\",{\"data\":[2],\"unit\":[1],\"preamble\":[1],\"compId\":[1,\"comp-id\"],\"duration\":[2],\"hasBeenShown\":[32]}]]],[\"pn-find-price-result.cjs\",[[0,\"pn-find-price-result\",{\"item\":[1040],\"shownitems\":[16],\"Usp1\":[1,\"usp-1\"],\"Usp2\":[1,\"usp-2\"],\"Usp3\":[1,\"usp-3\"],\"description\":[16],\"showMeasurement\":[4,\"show-measurement\"],\"weightText\":[32],\"linkId\":[32],\"shopLabel\":[32],\"shopUrl\":[32],\"shopId\":[32]}]]],[\"pn-site-footer_2.cjs\",[[4,\"pn-site-footer\",{\"url\":[1],\"linktitle\":[1],\"theme\":[513]}],[4,\"pn-site-footer-col\",{\"theme\":[513]}]]],[\"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-marketweb-input.cjs\",[[0,\"pn-marketweb-input\",{\"disabled\":[4],\"error\":[1],\"invalid\":[4],\"helpertext\":[1],\"label\":[1],\"placeholder\":[1],\"inputid\":[1],\"name\":[1],\"required\":[4],\"type\":[1025],\"autocomplete\":[1],\"valid\":[4],\"value\":[1],\"maxlength\":[1],\"min\":[1],\"max\":[1],\"step\":[1],\"pattern\":[1],\"showText\":[32]}]]],[\"pn-marketweb-siteheader-login-links_2.cjs\",[[0,\"pn-marketweb-siteheader-login-links\",{\"loginDialog\":[1040],\"loginManager\":[16],\"idNamespace\":[1,\"id-namespace\"],\"loggedin\":[516],\"username\":[1]}],[0,\"pn-marketweb-siteheader-login-profileselection\",{\"loginDialog\":[1040],\"loginManager\":[16],\"endpoint\":[1],\"loggedin\":[4],\"idNamespace\":[1,\"id-namespace\"],\"heading\":[1],\"i18n\":[16],\"currentProfile\":[1040],\"profileoptions\":[1040],\"user\":[32],\"logoutLink\":[32],\"userName\":[32],\"userEmail\":[32]}]]],[\"pn-proxio-productcard_4.cjs\",[[4,\"pn-proxio-productcard\"],[0,\"pn-proxio-productcard-description\",{\"heading\":[1],\"highlight\":[1],\"description\":[1],\"list\":[1040]}],[0,\"pn-proxio-productcard-information\",{\"label\":[1],\"information\":[16]}],[0,\"pn-proxio-productcard-pricelink\",{\"price\":[1],\"link\":[1],\"linktext\":[1]}]]],[\"pn-product-tile-info_2.cjs\",[[0,\"pn-product-tile-info\",{\"label\":[1],\"text\":[1],\"icon\":[1]}],[0,\"pn-product-tile-price\",{\"label\":[1],\"amount\":[1],\"currency\":[1],\"url\":[1]}]]],[\"pn-marketweb-siteheader-login-linklist.cjs\",[[0,\"pn-marketweb-siteheader-login-linklist\",{\"heading\":[1],\"links\":[16],\"idNamespace\":[1,\"id-namespace\"],\"loginManager\":[16]}]]],[\"pn-language-selector_9.cjs\",[[0,\"pn-marketweb-siteheader-login\",{\"endpoint\":[1],\"token\":[1],\"i18n\":[16],\"siteUrl\":[1,\"site-url\"],\"emitEvents\":[4,\"emit-events\"],\"loginDialog\":[1040],\"fullname\":[1],\"loggedin\":[4],\"showProfileSelection\":[1028,\"show-profile-selection\"],\"loginManager\":[32],\"loginLinks\":[32],\"toggleButtonText\":[32],\"username\":[32]}],[4,\"pn-mainnav-level\",{\"label\":[1537],\"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-search\",{\"i18n\":[8,\"i-1-8n\"],\"showOnlyLink\":[1028,\"show-only-link\"],\"hideSearch\":[1028,\"hide-search\"],\"language\":[1537],\"siteid\":[1],\"search\":[1040],\"primary\":[4],\"icononly\":[4],\"autoCompleteOptions\":[32]}],[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]}]]]]"), options);
|
|
59
59
|
});
|
|
@@ -4,8 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-e3e27c79.js');
|
|
6
6
|
const data = require('./data-e77c1ada.js');
|
|
7
|
-
const convert = require('./convert-
|
|
7
|
+
const convert = require('./convert-b219d02d.js');
|
|
8
8
|
const pnFindPriceStore = require('./pn-find-price-store-0b8c195c.js');
|
|
9
|
+
require('./_commonjsHelpers-206db00d.js');
|
|
9
10
|
require('./index-28bbc937.js');
|
|
10
11
|
|
|
11
12
|
const translations = {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
"./components/cards/pn-quote-card/pn-quote-card.js",
|
|
4
4
|
"./components/cards/pn-quote-card/pn-line-shape/pn-line-shape.js",
|
|
5
5
|
"./components/cards/pn-teaser-card/pn-teaser-card.js",
|
|
6
|
+
"./components/charts/pn-chart/pn-chart.js",
|
|
7
|
+
"./components/charts/pn-charts-card/pn-charts-card.js",
|
|
6
8
|
"./components/cta/pn-parcel-tracker/pn-parcel-tracker.js",
|
|
7
9
|
"./components/cta/pn-quick-cta/pn-quick-cta.js",
|
|
8
10
|
"./components/cta/pn-spotlight/pn-spotlight.js",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export const chartCfg = (dataChartType, data) => {
|
|
2
|
+
let cfg = {
|
|
3
|
+
type: dataChartType,
|
|
4
|
+
data: data,
|
|
5
|
+
options: {
|
|
6
|
+
responsive: true,
|
|
7
|
+
maintainAspectRatio: true,
|
|
8
|
+
legend: {
|
|
9
|
+
display: true,
|
|
10
|
+
position: 'bottom',
|
|
11
|
+
labels: { boxWidth: 20, fontFamily: 'PostNordSans' },
|
|
12
|
+
},
|
|
13
|
+
tooltip: {
|
|
14
|
+
enabled: true,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
if (dataChartType === 'bar') {
|
|
19
|
+
return Object.assign(Object.assign({}, cfg), { options: Object.assign(Object.assign({}, cfg.options), { scales: {
|
|
20
|
+
yAxes: [
|
|
21
|
+
{
|
|
22
|
+
ticks: {
|
|
23
|
+
beginAtZero: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
} }) });
|
|
28
|
+
}
|
|
29
|
+
return cfg;
|
|
30
|
+
};
|
|
31
|
+
export const dataSetProps = (set, dataChartType) => {
|
|
32
|
+
const dataSetProps = {
|
|
33
|
+
datalabels: {
|
|
34
|
+
color: '#FFF',
|
|
35
|
+
font: {
|
|
36
|
+
size: 22,
|
|
37
|
+
weight: 600,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
let variant = {};
|
|
42
|
+
if (dataChartType === 'doughnut' || dataChartType === 'pie') {
|
|
43
|
+
variant = Object.assign(Object.assign({}, dataSetProps), { borderColor: set.borderColor ? set.borderColor : 'transparent', datalabels: Object.assign(Object.assign({}, dataSetProps.datalabels), { color: '#000000' }) });
|
|
44
|
+
}
|
|
45
|
+
else if (dataChartType === 'line') {
|
|
46
|
+
variant = Object.assign(Object.assign({}, dataSetProps), { fill: false });
|
|
47
|
+
}
|
|
48
|
+
else if (dataChartType === 'bar') {
|
|
49
|
+
variant = Object.assign({}, dataSetProps);
|
|
50
|
+
}
|
|
51
|
+
return Object.assign(Object.assign({}, set), variant);
|
|
52
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
pn-chart {
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
}
|
|
5
|
+
pn-chart .chart-wrapper {
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
min-height: 300px;
|
|
13
|
+
}
|
|
14
|
+
pn-chart canvas.pnChart {
|
|
15
|
+
aspect-ratio: 1/1;
|
|
16
|
+
}
|
|
17
|
+
pn-chart[data-chart-type=bar] .chart-wrapper, pn-chart[data-chart-type=line] .chart-wrapper {
|
|
18
|
+
aspect-ratio: 16/9;
|
|
19
|
+
padding: 2.4rem 0;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
max-width: 100%;
|
|
22
|
+
min-width: 100%;
|
|
23
|
+
}
|
|
24
|
+
pn-chart[data-chart-type=bar] .pnChart, pn-chart[data-chart-type=line] .pnChart {
|
|
25
|
+
aspect-ratio: 16/9;
|
|
26
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Chart } from 'chart.js';
|
|
2
|
+
import { Component, Element, h, Host, Prop, State, } from '@stencil/core';
|
|
3
|
+
import { chartCfg, dataSetProps, } from './pn-chart-helper';
|
|
4
|
+
export class PnChart {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.labels = null;
|
|
7
|
+
this.dataSets = null;
|
|
8
|
+
this.dataChartType = 'doughnut';
|
|
9
|
+
this.parsedDataSets = JSON.parse(this.dataSets);
|
|
10
|
+
this.parsedLabels = JSON.parse(this.labels);
|
|
11
|
+
this.parsedDatasetWithDataParsed = this.parsedDataSets.map(set => dataSetProps(set, this.dataChartType));
|
|
12
|
+
this.data = {
|
|
13
|
+
labels: this.parsedLabels,
|
|
14
|
+
datasets: this.parsedDatasetWithDataParsed,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
componentDidLoad() {
|
|
18
|
+
this.myChartCtxRef = this.element.getElementsByClassName('pnChart');
|
|
19
|
+
this.myChart = new Chart(this.myChartCtxRef, chartCfg(this.dataChartType, this.data));
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (h(Host, null,
|
|
23
|
+
h("div", { class: "chart-wrapper" },
|
|
24
|
+
h("canvas", { class: "pnChart" }))));
|
|
25
|
+
}
|
|
26
|
+
static get is() { return "pn-chart"; }
|
|
27
|
+
static get originalStyleUrls() { return {
|
|
28
|
+
"$": ["pn-chart.scss"]
|
|
29
|
+
}; }
|
|
30
|
+
static get styleUrls() { return {
|
|
31
|
+
"$": ["pn-chart.css"]
|
|
32
|
+
}; }
|
|
33
|
+
static get properties() { return {
|
|
34
|
+
"labels": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "string",
|
|
39
|
+
"resolved": "string",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": ""
|
|
47
|
+
},
|
|
48
|
+
"attribute": "labels",
|
|
49
|
+
"reflect": false,
|
|
50
|
+
"defaultValue": "null"
|
|
51
|
+
},
|
|
52
|
+
"dataSets": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": ""
|
|
65
|
+
},
|
|
66
|
+
"attribute": "data-sets",
|
|
67
|
+
"reflect": false,
|
|
68
|
+
"defaultValue": "null"
|
|
69
|
+
},
|
|
70
|
+
"dataChartType": {
|
|
71
|
+
"type": "any",
|
|
72
|
+
"mutable": false,
|
|
73
|
+
"complexType": {
|
|
74
|
+
"original": "any",
|
|
75
|
+
"resolved": "any",
|
|
76
|
+
"references": {}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"optional": false,
|
|
80
|
+
"docs": {
|
|
81
|
+
"tags": [],
|
|
82
|
+
"text": ""
|
|
83
|
+
},
|
|
84
|
+
"attribute": "data-chart-type",
|
|
85
|
+
"reflect": false,
|
|
86
|
+
"defaultValue": "'doughnut'"
|
|
87
|
+
}
|
|
88
|
+
}; }
|
|
89
|
+
static get states() { return {
|
|
90
|
+
"parsedDataSets": {},
|
|
91
|
+
"parsedLabels": {}
|
|
92
|
+
}; }
|
|
93
|
+
static get elementRef() { return "element"; }
|
|
94
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
pn-charts-card {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
}
|
|
6
|
+
pn-charts-card .pn-charts-card__wrapper {
|
|
7
|
+
width: 100%;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
background-color: #EFFBFF;
|
|
11
|
+
border-radius: 2.4rem;
|
|
12
|
+
padding: 2.4rem;
|
|
13
|
+
}
|
|
14
|
+
@media screen and (min-width: 1200px) {
|
|
15
|
+
pn-charts-card .pn-charts-card__wrapper {
|
|
16
|
+
padding: 3.2rem;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
pn-charts-card .pn-charts-card__heading__wrapper {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: row;
|
|
22
|
+
justify-content: space-evenly;
|
|
23
|
+
}
|
|
24
|
+
pn-charts-card .pn-charts-card__heading {
|
|
25
|
+
font-weight: 700;
|
|
26
|
+
font-size: 3.2rem;
|
|
27
|
+
line-height: 110%;
|
|
28
|
+
}
|
|
29
|
+
pn-charts-card .pn-charts-card__heading__highlight {
|
|
30
|
+
font-weight: 700;
|
|
31
|
+
font-size: 3.2rem;
|
|
32
|
+
line-height: 110%;
|
|
33
|
+
color: #005D92;
|
|
34
|
+
}
|
|
35
|
+
pn-charts-card .pn-charts-card__text__wrapper {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
}
|
|
40
|
+
pn-charts-card .pn-charts-card__text__wrapper span {
|
|
41
|
+
display: block;
|
|
42
|
+
margin-bottom: 5.4rem;
|
|
43
|
+
}
|
|
44
|
+
pn-charts-card .pn-charts-card__preamble {
|
|
45
|
+
font-weight: 400;
|
|
46
|
+
font-size: 2rem;
|
|
47
|
+
line-height: 140%;
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
margin-bottom: 1.6rem;
|
|
50
|
+
}
|
|
51
|
+
pn-charts-card .pn-charts-card__source {
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
}
|
|
55
|
+
pn-charts-card .pn-charts-card__source label {
|
|
56
|
+
background-color: #00A0D6;
|
|
57
|
+
color: #FFFFFF;
|
|
58
|
+
border-radius: 0.4rem;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
font-size: 1.2rem;
|
|
61
|
+
line-height: 140%;
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
padding: 0.4rem;
|
|
64
|
+
margin-bottom: 0.6rem;
|
|
65
|
+
width: fit-content;
|
|
66
|
+
}
|
|
67
|
+
pn-charts-card .pn-charts-card__source h3 {
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
font-size: 2rem;
|
|
70
|
+
line-height: 140%;
|
|
71
|
+
color: #005D92;
|
|
72
|
+
}
|
|
73
|
+
pn-charts-card .pn-charts-card__source a {
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
color: #005D92;
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
font-size: 1.6rem;
|
|
78
|
+
text-decoration: none;
|
|
79
|
+
color: #005D92;
|
|
80
|
+
font-weight: 400;
|
|
81
|
+
}
|
|
82
|
+
pn-charts-card .pn-charts-card__source a:hover {
|
|
83
|
+
text-decoration: underline;
|
|
84
|
+
}
|
|
85
|
+
pn-charts-card .pn-charts-card__source a pn-icon svg path {
|
|
86
|
+
fill: #005D92;
|
|
87
|
+
}
|
|
88
|
+
pn-charts-card .pn-charts-card__source a[target=_blank]:not(.pn-button):after {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
pn-charts-card[data-chart-color=coral] > .pn-charts-card__wrapper {
|
|
93
|
+
background-color: #FDEFEE;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
pn-charts-card[data-chart-color=green] > .pn-charts-card__wrapper {
|
|
97
|
+
background-color: #DCF6E7;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
pn-charts-card[data-chart-color=white] > .pn-charts-card__wrapper {
|
|
101
|
+
background-color: #FFFFFF;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
pn-charts-card[data-chart-color=gray] > .pn-charts-card__wrapper {
|
|
105
|
+
background-color: #F9F8F8;
|
|
106
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { Component, Element, h, Host, Prop, State, } from '@stencil/core';
|
|
2
|
+
export class PnChartsCard {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.openInNewWindow = false;
|
|
5
|
+
}
|
|
6
|
+
render() {
|
|
7
|
+
return (h(Host, null,
|
|
8
|
+
h("slot", { name: "clickable-block-wrapper" }),
|
|
9
|
+
h("div", { class: "pn-charts-card__wrapper" },
|
|
10
|
+
h("div", { class: "pn-charts-card__heading__wrapper" },
|
|
11
|
+
h("div", { class: "pn-charts-card__heading" }, this.header),
|
|
12
|
+
h("div", { class: "pn-charts-card__heading__highlight" }, this.highlight)),
|
|
13
|
+
h("slot", { name: "chart" }),
|
|
14
|
+
h("span", { class: "pn-charts-card__preamble" }, this.preamble),
|
|
15
|
+
h("div", { class: "pn-charts-card__text__wrapper" },
|
|
16
|
+
h("div", { class: "pn-charts-card__source" },
|
|
17
|
+
h("label", null, this.label),
|
|
18
|
+
h("h3", null, this.source),
|
|
19
|
+
h("a", { class: "link--animated", href: this.sourceUrl, rel: this.openInNewWindow ? 'noopener nofollower noreferrer' : null, target: this.openInNewWindow ? '_blank' : null },
|
|
20
|
+
"Read the report ",
|
|
21
|
+
h("pn-icon", { symbol: "arrow-right" }, " ")))))));
|
|
22
|
+
}
|
|
23
|
+
static get is() { return "pn-charts-card"; }
|
|
24
|
+
static get originalStyleUrls() { return {
|
|
25
|
+
"$": ["pn-charts-card.scss"]
|
|
26
|
+
}; }
|
|
27
|
+
static get styleUrls() { return {
|
|
28
|
+
"$": ["pn-charts-card.css"]
|
|
29
|
+
}; }
|
|
30
|
+
static get properties() { return {
|
|
31
|
+
"header": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"mutable": false,
|
|
34
|
+
"complexType": {
|
|
35
|
+
"original": "string",
|
|
36
|
+
"resolved": "string",
|
|
37
|
+
"references": {}
|
|
38
|
+
},
|
|
39
|
+
"required": false,
|
|
40
|
+
"optional": false,
|
|
41
|
+
"docs": {
|
|
42
|
+
"tags": [],
|
|
43
|
+
"text": ""
|
|
44
|
+
},
|
|
45
|
+
"attribute": "header",
|
|
46
|
+
"reflect": false
|
|
47
|
+
},
|
|
48
|
+
"highlight": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "string",
|
|
53
|
+
"resolved": "string",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": ""
|
|
61
|
+
},
|
|
62
|
+
"attribute": "highlight",
|
|
63
|
+
"reflect": false
|
|
64
|
+
},
|
|
65
|
+
"preamble": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"mutable": false,
|
|
68
|
+
"complexType": {
|
|
69
|
+
"original": "string",
|
|
70
|
+
"resolved": "string",
|
|
71
|
+
"references": {}
|
|
72
|
+
},
|
|
73
|
+
"required": false,
|
|
74
|
+
"optional": false,
|
|
75
|
+
"docs": {
|
|
76
|
+
"tags": [],
|
|
77
|
+
"text": ""
|
|
78
|
+
},
|
|
79
|
+
"attribute": "preamble",
|
|
80
|
+
"reflect": false
|
|
81
|
+
},
|
|
82
|
+
"label": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "string",
|
|
87
|
+
"resolved": "string",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"attribute": "label",
|
|
97
|
+
"reflect": false
|
|
98
|
+
},
|
|
99
|
+
"source": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": ""
|
|
112
|
+
},
|
|
113
|
+
"attribute": "source",
|
|
114
|
+
"reflect": false
|
|
115
|
+
},
|
|
116
|
+
"sourceUrl": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"mutable": false,
|
|
119
|
+
"complexType": {
|
|
120
|
+
"original": "string",
|
|
121
|
+
"resolved": "string",
|
|
122
|
+
"references": {}
|
|
123
|
+
},
|
|
124
|
+
"required": false,
|
|
125
|
+
"optional": false,
|
|
126
|
+
"docs": {
|
|
127
|
+
"tags": [],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "source-url",
|
|
131
|
+
"reflect": false
|
|
132
|
+
},
|
|
133
|
+
"openInNewWindow": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "boolean",
|
|
138
|
+
"resolved": "boolean",
|
|
139
|
+
"references": {}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"attribute": "open-in-new-window",
|
|
148
|
+
"reflect": false,
|
|
149
|
+
"defaultValue": "false"
|
|
150
|
+
}
|
|
151
|
+
}; }
|
|
152
|
+
static get states() { return {
|
|
153
|
+
"someState": {}
|
|
154
|
+
}; }
|
|
155
|
+
static get elementRef() { return "hostElement"; }
|
|
156
|
+
}
|