@postnord/pn-marketweb-components 2.0.93 → 2.0.95
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/loader.cjs.js +1 -1
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-marketweb-sitefooter.cjs.entry.js +1 -1
- package/cjs/pn-proxio-pricegroup.cjs.entry.js +3 -6
- package/cjs/pn-teaser-card.cjs.entry.js +5 -2
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.css +44 -15
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.js +23 -0
- package/collection/components/cards/pn-teaser-card/pn-teaser-card.stories.js +11 -9
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.css +11 -1
- package/collection/components/layout-components/pn-marketweb-sitefooter/pn-marketweb-sitefooter.stories.js +3 -3
- package/collection/components/widgets/pn-proxio-pricegroup/translations.js +3 -6
- package/collection/components/widgets/pn-proxio-productcard/pn-proxio-productcard.stories.js +0 -4
- package/custom-elements/index.js +10 -10
- package/esm/loader.js +1 -1
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-marketweb-sitefooter.entry.js +1 -1
- package/esm/pn-proxio-pricegroup.entry.js +3 -6
- package/esm/pn-teaser-card.entry.js +5 -2
- package/esm-es5/loader.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-proxio-pricegroup.entry.js +1 -1
- package/esm-es5/pn-teaser-card.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-4dfe46d9.system.entry.js +1 -0
- package/pn-market-web-components/p-67887512.system.js +1 -1
- package/pn-market-web-components/p-77b4b04c.entry.js +1 -0
- package/pn-market-web-components/p-7abbf3f7.system.entry.js +1 -0
- package/pn-market-web-components/p-81b63bcc.entry.js +1 -0
- package/pn-market-web-components/{p-4c9c064b.system.entry.js → p-bd898af8.system.entry.js} +1 -1
- package/pn-market-web-components/{p-c4afa184.entry.js → p-d99e3cd6.entry.js} +1 -1
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/cards/pn-teaser-card/pn-teaser-card.d.ts +2 -0
- package/types/components/widgets/pn-proxio-pricegroup/translations.d.ts +0 -3
- package/types/components/widgets/pn-proxio-pricegroup/types.d.ts +0 -1
- package/types/components.d.ts +2 -0
- package/umd/pn-marketweb-salesforce.js +83 -85
- package/pn-market-web-components/p-34d52550.system.entry.js +0 -1
- package/pn-market-web-components/p-64625da3.entry.js +0 -1
- package/pn-market-web-components/p-c49db008.entry.js +0 -1
- package/pn-market-web-components/p-f80555dc.system.entry.js +0 -1
|
@@ -1,96 +1,94 @@
|
|
|
1
|
-
(function() {
|
|
1
|
+
(function () {
|
|
2
|
+
if (document.body.dataset['marketwebComponentsSalesforceInit']) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
document.body.dataset['marketwebComponentsSalesforceInit'] = true;
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const footer = document.createElement('pn-marketweb-sitefooter');
|
|
10
|
-
let currentLanguage = document.querySelector('html').getAttribute("lang");
|
|
11
|
-
if (currentLanguage === "en-US" || currentLanguage === "en_US") {
|
|
12
|
-
currentLanguage = "en";
|
|
13
|
-
}
|
|
7
|
+
const header = document.createElement('pn-marketweb-siteheader');
|
|
8
|
+
const footer = document.createElement('pn-marketweb-sitefooter');
|
|
9
|
+
let currentLanguage = document.querySelector('html').getAttribute('lang');
|
|
10
|
+
if (currentLanguage === 'en-US' || currentLanguage === 'en_US') {
|
|
11
|
+
currentLanguage = 'en';
|
|
12
|
+
}
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
document.body.appendChild(footer);
|
|
14
|
+
[header, footer].forEach(comp => {
|
|
15
|
+
comp.setAttribute('market', 'dk');
|
|
16
|
+
comp.setAttribute('language', currentLanguage);
|
|
17
|
+
comp.setAttribute('site-domain-in-urls', 'true');
|
|
18
|
+
comp.setAttribute('spa-mode', 'true');
|
|
19
|
+
const environment = window.location.href.indexOf('kundeservice.postnord.dk') !== -1 ? 'production' : 'preproduction';
|
|
20
|
+
comp.setAttribute('environment', environment);
|
|
21
|
+
});
|
|
22
|
+
document.body.insertBefore(header, document.body.firstElementChild);
|
|
23
|
+
document.body.appendChild(footer);
|
|
26
24
|
|
|
25
|
+
const s = document.createElement('script');
|
|
26
|
+
s.setAttribute('type', 'module');
|
|
27
|
+
s.setAttribute('src', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.95/umd/standalone-loader-salesforce.js');
|
|
28
|
+
document.querySelector('head').appendChild(s);
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const style = document.createElement('link');
|
|
31
|
+
style.setAttribute('rel', 'stylesheet');
|
|
32
|
+
style.setAttribute('href', 'https://cdn.jsdelivr.net/npm/@postnord/pn-marketweb-components@2.0.95/umd/pn-marketweb-wrongrembase.css');
|
|
33
|
+
document.querySelector('head').appendChild(style);
|
|
32
34
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (lang === "en") {
|
|
45
|
-
lang = "en_US";
|
|
46
|
-
}
|
|
47
|
-
const queryParams = new URLSearchParams(window.location.search);
|
|
48
|
-
const currentLanguageValue = queryParams.get("language");
|
|
35
|
+
window['bindLanguageSelector'] = function () {
|
|
36
|
+
if (window['haslangchange']) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
window.addEventListener('marketweb-languagechange', e => {
|
|
40
|
+
let lang = e.detail;
|
|
41
|
+
if (lang === 'en') {
|
|
42
|
+
lang = 'en_US';
|
|
43
|
+
}
|
|
44
|
+
const queryParams = new URLSearchParams(window.location.search);
|
|
45
|
+
const currentLanguageValue = queryParams.get('language');
|
|
49
46
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
// if (currentLanguageValue === lang) {
|
|
55
|
-
// return;
|
|
56
|
-
// }
|
|
57
|
-
// queryParams.set("language", lang);
|
|
58
|
-
// let newUrl = window.location.origin + window.location.pathname + '?'+ queryParams.toString();
|
|
59
|
-
// if (newUrl.indexOf("/article/") !== -1) {
|
|
60
|
-
// if (lang === "en_US" && newUrl.indexOf("-da-") !== -1) {
|
|
61
|
-
// newUrl = newUrl.replace("-da-", "-en-");
|
|
62
|
-
// }
|
|
63
|
-
// if (lang === "da" && newUrl.indexOf("-en-") !== -1) {
|
|
64
|
-
// newUrl = newUrl.replace("-en-", "-da-");
|
|
65
|
-
// }
|
|
66
|
-
// }
|
|
67
|
-
|
|
68
|
-
window.location.href = newUrl;
|
|
69
|
-
});
|
|
70
|
-
window["haslangchange"] = true;
|
|
71
|
-
};
|
|
72
|
-
document.addEventListener('DOMContentLoaded', () => {
|
|
73
|
-
window["bindLanguageSelector"]();
|
|
47
|
+
if (lang.indexOf('en') !== -1) {
|
|
48
|
+
const rootUrl = window.location.href.indexOf('kundeservice-test.postnord.dk' !== -1) ? 'https://www.postnord.dk' : 'https://dk-preproduction.postnord.com';
|
|
49
|
+
window.location.href = `${rootUrl}/en/help-and-support/private`;
|
|
74
50
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
51
|
+
// if (currentLanguageValue === lang) {
|
|
52
|
+
// return;
|
|
53
|
+
// }
|
|
54
|
+
// queryParams.set("language", lang);
|
|
55
|
+
// let newUrl = window.location.origin + window.location.pathname + '?'+ queryParams.toString();
|
|
56
|
+
// if (newUrl.indexOf("/article/") !== -1) {
|
|
57
|
+
// if (lang === "en_US" && newUrl.indexOf("-da-") !== -1) {
|
|
58
|
+
// newUrl = newUrl.replace("-da-", "-en-");
|
|
59
|
+
// }
|
|
60
|
+
// if (lang === "da" && newUrl.indexOf("-en-") !== -1) {
|
|
61
|
+
// newUrl = newUrl.replace("-en-", "-da-");
|
|
62
|
+
// }
|
|
63
|
+
// }
|
|
64
|
+
|
|
65
|
+
window.location.href = newUrl;
|
|
66
|
+
});
|
|
67
|
+
window['haslangchange'] = true;
|
|
68
|
+
};
|
|
69
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
70
|
+
window['bindLanguageSelector']();
|
|
71
|
+
});
|
|
72
|
+
window.setTimeout(() => {
|
|
73
|
+
window['bindLanguageSelector']();
|
|
74
|
+
}, 200);
|
|
75
|
+
window['renderpncomponent-interval'] = window.setInterval(renderPNComponents, 150);
|
|
76
|
+
renderPNComponents();
|
|
79
77
|
})();
|
|
80
78
|
|
|
81
79
|
function renderPNComponents() {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
});
|
|
91
|
-
component.innerHTML = componentDiv.innerHTML;
|
|
92
|
-
componentDiv.innerHTML = "";
|
|
93
|
-
componentDiv.appendChild(component);
|
|
94
|
-
componentDiv.setAttribute("data-component-rendered","");
|
|
80
|
+
const componentsDivs = [...document.querySelectorAll('[data-component]:not([data-component-rendered])')];
|
|
81
|
+
componentsDivs.forEach(componentDiv => {
|
|
82
|
+
const component = document.createElement(componentDiv.getAttribute('data-component'));
|
|
83
|
+
[...componentDiv.attributes].map(dataAttribute => {
|
|
84
|
+
if (dataAttribute.name.indexOf('data-component-') === -1) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
component.setAttribute(dataAttribute.name.replace('data-component-', ''), dataAttribute.value);
|
|
95
88
|
});
|
|
96
|
-
|
|
89
|
+
component.innerHTML = componentDiv.innerHTML;
|
|
90
|
+
componentDiv.innerHTML = '';
|
|
91
|
+
componentDiv.appendChild(component);
|
|
92
|
+
componentDiv.setAttribute('data-component-rendered', '');
|
|
93
|
+
});
|
|
94
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,r){function o(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,n){function a(t){try{c(r.next(t))}catch(i){n(i)}}function s(t){try{c(r["throw"](t))}catch(i){n(i)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(i){return c([t,i])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(n=a[0]&2?o["return"]:a[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;if(o=0,n)a=[a[0]&2,n.value];switch(a[0]){case 0:case 1:n=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!n||a[1]>n[0]&&a[1]<n[3])){e.label=a[1];break}if(a[0]===6&&e.label<n[1]){e.label=n[1];n=a;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(a);break}if(n[2])e.ops.pop();e.trys.pop();continue}a=i.call(t,e)}catch(s){a=[6,s];o=0}finally{r=n=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-36654f2a.system.js","./p-31fd7a95.system.js"],(function(t){"use strict";var i,e,r,o,n;return{setters:[function(t){i=t.r;e=t.h;r=t.a},function(t){o=t.F;n=t.M}],execute:function(){var a={"sv-SE":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",Creapest:"Billigast"},"en-GB":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"},"en-US":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"}};var s='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';var c=t("pn_proxio_pricegroup",function(){function t(t){i(this,t);this.endpoint=null;this.culture="sv-SE";this.tariffid="";this.cache=true;this.activeWeightIndex=0;this.data=null;this.i18n=a["sv-SE"];this.fetchHelper=new o("proxiopricegroup")}t.prototype.componentWillLoad=function(){var t=this;this.setInitialValues().then((function(){t.init()}))};t.prototype.setInitialValues=function(t){if(t===void 0){t=window.location.href}return __awaiter(this,void 0,void 0,(function(){var i,e,r,o;return __generator(this,(function(a){switch(a.label){case 0:i=new n(t);return[4,i.getEnvironmentName()];case 1:e=a.sent();if(!(!this.endpoint&&(e===null||e===void 0?void 0:e.indexOf("local"))===-1))return[3,4];return[4,i.getMarket()];case 2:r=a.sent();o=this;return[4,i.getEndpoint(e,r)];case 3:o.endpoint=a.sent();a.label=4;case 4:if(!this.endpoint){this.endpoint=""}return[2]}}))}))};t.prototype.init=function(){this.setCulture();this.fetchData()};t.prototype.fetchData=function(){return __awaiter(this,void 0,void 0,(function(){var t,i,e;return __generator(this,(function(r){switch(r.label){case 0:if(!this.culture||!this.tariffid){return[2]}t=this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint;i="".concat(t,"/api/proxio/price-list-group?tariffId=").concat(this.tariffid,"&culture=").concat(this.culture,"&cached=").concat(this.cache);return[4,this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this))];case 1:e=r.sent();if(e===null||e===void 0?void 0:e.proxioProduct){this.data=e}return[2]}}))}))};t.prototype.onFetchData=function(t){this.data=t};t.prototype.setActiveWeightIndex=function(t){var i,e,r;var o=0;var n=(r=((e=(i=this.data.proxioProduct)===null||i===void 0?void 0:i.weightAndPriceList)===null||e===void 0?void 0:e.length)-1)!==null&&r!==void 0?r:o;t=t>n?n:t;t=t<o?o:t;this.activeWeightIndex=t};t.prototype.setCulture=function(){if(a[this.culture]){this.i18n=a[this.culture]}};t.prototype.getPriceString=function(t){var i;var e=t.weightAndPriceList?(i=t===null||t===void 0?void 0:t.weightAndPriceList[this.activeWeightIndex])===null||i===void 0?void 0:i.item2:"";return e?this.i18n.from+e:""};t.prototype.isActive=function(t){return t===this.activeWeightIndex};t.prototype.getCarouselPosition=function(t){switch(t){case this.activeWeightIndex-2:{return-2}case this.activeWeightIndex-1:{return-1}case this.activeWeightIndex:{return 0}case this.activeWeightIndex+1:{return 1}case this.activeWeightIndex+2:{return 2}default:return"outside"}};t.prototype.getContainerPosition=function(){var t=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:{return"end50"}case 1:{return"end75"}case t-1:{return"start75"}case t:{return"start50"}default:{return"default"}}};t.prototype.render=function(){var t=this;var i,o,n;return e(r,null,((i=this.data)===null||i===void 0?void 0:i.proxioProduct)?e("div",{class:"proxio-pricegroup-container"},e("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?e("div",{class:"weightvaluecontainer"},e("pn-button",{disabled:this.activeWeightIndex===0?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex-1)}}),e("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},e("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map((function(i,r){return t.getCarouselPosition(r)!==null?e("div",{class:"weightdata","data-carousel-position":t.getCarouselPosition(r),onClick:function(){return t.setActiveWeightIndex(r)}},e("input",{type:"radio",id:"weightradio"+r,name:"weightradio",value:r,checked:t.isActive(r)}),e("label",{htmlFor:"weightradio"+r},i.item1)):null}))),e("pn-button",{disabled:this.activeWeightIndex===((n=(o=this.data.proxioProduct)===null||o===void 0?void 0:o.weightAndPriceList)===null||n===void 0?void 0:n.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:function(){return t.setActiveWeightIndex(t.activeWeightIndex+1)}})):null),e("pn-proxio-productcard",null,e("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),e("h2",{slot:"title"},this.data.proxioProduct.productTitle),e("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),e("div",{slot:"information"},e("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),e("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),e("div",{slot:"bottomtags"},this.data.proxioProduct.usp1?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?e("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),e("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),e("div",{slot:"pricelink"},e("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((function(i){return e("pn-proxio-productcard-pricelink",{price:t.getPriceString(i),link:i.productLink,linktext:i.productLinkText})})):null))):null)};return t}());c.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,a as n,g as r}from"./p-58e8d7d5.js";let a=class{constructor(t){e(this,t),this.text="some short text describing whatever",this.heading="some heading",this.dataCardColor="coral",this.dataCardAlignment="left"}render(){return t(n,null,t("div",{class:"pn-teaser-card__container"},t("div",{class:"pn-teaser-card__container__image__container"},t("slot",{name:"illustration"})),t("div",{class:"pn-teaser-card__container__content"},t("div",{class:"pn-teaser-card__container__content__text__container"},t("h1",null,this.heading),t("p",null,this.text)),t("div",{class:"pn-teaser-card__container__content__cta"},t("slot",{name:"cta"})))))}get hostElement(){return r(this)}};a.style="pn-teaser-card{width:100%;height:100%;display:-ms-flexbox;display:flex}pn-teaser-card .pn-teaser-card__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start;border-radius:2.4rem}pn-teaser-card .pn-teaser-card__container__image__container{width:100%;position:relative}pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]{height:100%}pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{width:100%;height:auto;border-top-left-radius:2.4rem;border-top-right-radius:2.4rem;-webkit-clip-path:ellipse(100% 90% at 50% 0%);clip-path:ellipse(100% 90% at 50% 0%);aspect-ratio:16/9}pn-teaser-card .pn-teaser-card__container__content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex:1 1 100%;flex:1 1 100%;gap:32px;padding:2.4rem 2.4rem;padding-top:0}pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:2.4rem;line-height:2.64rem}pn-teaser-card .pn-teaser-card__container__content__text__container>p{padding-top:1.6rem;font-weight:400;font-size:1.6rem;line-height:2.24rem}pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{-ms-flex-item-align:end;align-self:flex-end;width:100%}pn-teaser-card[data-card-color=coral]>.pn-teaser-card__container{background-color:#FDEFEE}pn-teaser-card[data-card-color=green]>.pn-teaser-card__container{background-color:#DCF6E7}@media screen and (min-width: 1200px){.halfwidth pn-teaser-card .pn-teaser-card__container__content{padding:0 5.6rem 5.6rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:3.2rem;line-height:3.52rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__text__container>p{font-weight:400;font-size:2rem;line-height:2.8rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}@media screen and (min-width: 768px){.fullwidth pn-teaser-card{min-height:350px}.fullwidth pn-teaser-card .pn-teaser-card__container{-ms-flex-direction:row;flex-direction:row}.fullwidth pn-teaser-card .pn-teaser-card__container__content{-ms-flex-item-align:center;align-self:center;gap:2.4rem;padding-top:2.4rem}.fullwidth pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{height:100%;border-top-left-radius:2.4rem;border-bottom-left-radius:2.4rem;-webkit-clip-path:ellipse(100% 100% at 0% 50%);clip-path:ellipse(100% 100% at 0% 50%);-o-object-fit:cover;object-fit:cover}.fullwidth pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}@media screen and (min-width: 1200px){.fullwidth pn-teaser-card{min-height:450px}.fullwidth pn-teaser-card .pn-teaser-card__container__content{padding:3.6rem}.fullwidth pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:4.8rem;line-height:5.28rem}.fullwidth pn-teaser-card .pn-teaser-card__container__content__text__container>p{font-size:2rem;line-height:2.8rem}}@media screen and (min-width: 768px){.fullwidth pn-teaser-card[data-card-alignment=right] .pn-teaser-card__container{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fullwidth pn-teaser-card[data-card-alignment=right] .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{border-bottom-right-radius:2.4rem;-webkit-clip-path:ellipse(100% 100% at 100% 50%);clip-path:ellipse(100% 100% at 100% 50%)}}";export{a as pn_teaser_card}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,h as t,a as e}from"./p-58e8d7d5.js";import{F as r,M as o}from"./p-74120b9b.js";const a={"sv-SE":{from:"Från ",labelRoll:"Rulle",labelPackage:"Paket",Creapest:"Billigast"},"en-GB":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"},"en-US":{from:"From ",labelRoll:"Roll",labelPackage:"Package",Creapest:"Cheapest"}};let n=class{constructor(t){i(this,t),this.endpoint=null,this.culture="sv-SE",this.tariffid="",this.cache=!0,this.activeWeightIndex=0,this.data=null,this.i18n=a["sv-SE"],this.fetchHelper=new r("proxiopricegroup")}componentWillLoad(){this.setInitialValues().then((()=>{this.init()}))}async setInitialValues(i=window.location.href){const t=new o(i),e=await t.getEnvironmentName();if(!this.endpoint&&-1===(null==e?void 0:e.indexOf("local"))){const i=await t.getMarket();this.endpoint=await t.getEndpoint(e,i)}this.endpoint||(this.endpoint="")}init(){this.setCulture(),this.fetchData()}async fetchData(){if(!this.culture||!this.tariffid)return;const i=`${this.endpoint.lastIndexOf("/")===this.endpoint.length-1?this.endpoint.substring(0,this.endpoint.length-1):this.endpoint}/api/proxio/price-list-group?tariffId=${this.tariffid}&culture=${this.culture}&cached=${this.cache}`,t=await this.fetchHelper.fetchJson(i,{mode:"cors"},this.cache,this.onFetchData.bind(this));(null==t?void 0:t.proxioProduct)&&(this.data=t)}onFetchData(i){this.data=i}setActiveWeightIndex(i){var t,e,r;let o=null!==(r=(null===(e=null===(t=this.data.proxioProduct)||void 0===t?void 0:t.weightAndPriceList)||void 0===e?void 0:e.length)-1)&&void 0!==r?r:0;this.activeWeightIndex=i=(i=i>o?o:i)<0?0:i}setCulture(){a[this.culture]&&(this.i18n=a[this.culture])}getPriceString(i){var t;let e=i.weightAndPriceList?null===(t=null==i?void 0:i.weightAndPriceList[this.activeWeightIndex])||void 0===t?void 0:t.item2:"";return e?this.i18n.from+e:""}isActive(i){return i===this.activeWeightIndex}getCarouselPosition(i){switch(i){case this.activeWeightIndex-2:return-2;case this.activeWeightIndex-1:return-1;case this.activeWeightIndex:return 0;case this.activeWeightIndex+1:return 1;case this.activeWeightIndex+2:return 2;default:return"outside"}}getContainerPosition(){let i=this.data.proxioProduct.weightAndPriceList.length-1;switch(this.activeWeightIndex){case 0:return"end50";case 1:return"end75";case i-1:return"start75";case i:return"start50";default:return"default"}}render(){var i,r,o;return t(e,null,(null===(i=this.data)||void 0===i?void 0:i.proxioProduct)?t("div",{class:"proxio-pricegroup-container"},t("div",{class:"weightcontainer"},this.data.proxioProduct.weightAndPriceList?t("div",{class:"weightvaluecontainer"},t("pn-button",{disabled:0===this.activeWeightIndex?"disabled":null,"icon-only":"true",icon:"arrow-left",appearance:"light",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex-1)}),t("div",{class:"weightradios ","data-carousel-container-position":this.getContainerPosition()},t("div",{class:"weightline"}),this.data.proxioProduct.weightAndPriceList.map(((i,e)=>null!==this.getCarouselPosition(e)?t("div",{class:"weightdata","data-carousel-position":this.getCarouselPosition(e),onClick:()=>this.setActiveWeightIndex(e)},t("input",{type:"radio",id:"weightradio"+e,name:"weightradio",value:e,checked:this.isActive(e)}),t("label",{htmlFor:"weightradio"+e},i.item1)):null))),t("pn-button",{disabled:this.activeWeightIndex===(null===(o=null===(r=this.data.proxioProduct)||void 0===r?void 0:r.weightAndPriceList)||void 0===o?void 0:o.length)-1?"disabled":null,icon:"arrow-right",appearance:"light","icon-only":"true",small:"true",onClick:()=>this.setActiveWeightIndex(this.activeWeightIndex+1)})):null),t("pn-proxio-productcard",null,t("pn-illustration",{slot:"illustrationmobile",illustration:this.data.proxioProduct.productIcon}),t("h2",{slot:"title"},this.data.proxioProduct.productTitle),t("pn-proxio-productcard-description",{slot:"description",heading:this.data.proxioProduct.productPreamble,highlight:this.data.proxioProduct.deliveryDateInformation,list:this.data.proxioProduct.productDescriptionBulletListItems}),t("div",{slot:"information"},t("pn-proxio-productcard-information",{label:this.i18n.labelPackage,information:this.data.proxioProduct.productPackageDimensionsList}),t("pn-proxio-productcard-information",{label:this.i18n.labelRoll,information:this.data.proxioProduct.productRollDimensionsList})),t("div",{slot:"bottomtags"},this.data.proxioProduct.usp1?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp1):null,this.data.proxioProduct.usp2?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp2):null,this.data.proxioProduct.usp3?t("pn-titletag",{color:"gray50"},this.data.proxioProduct.usp3):null),t("pn-illustration",{slot:"illustration",illustration:this.data.proxioProduct.productIcon}),t("div",{slot:"pricelink"},t("pn-proxio-productcard-pricelink",{price:this.getPriceString(this.data.proxioProduct),link:this.data.proxioProduct.productLink,linktext:this.data.proxioProduct.productLinkText}),this.data.relatedProxioProducts?this.data.relatedProxioProducts.map((i=>t("pn-proxio-productcard-pricelink",{price:this.getPriceString(i),link:i.productLink,linktext:i.productLinkText}))):null))):null)}};n.style='pn-proxio-pricegroup div.proxio-pricegroup-container{max-width:99.4rem}pn-proxio-pricegroup div.weightcontainer{margin:2.8rem 0}pn-proxio-pricegroup div.weightvaluecontainer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:start;align-items:flex-start}pn-proxio-pricegroup div.weightvaluecontainer pn-button{-webkit-transform:translateY(-0.4rem);transform:translateY(-0.4rem)}pn-proxio-pricegroup div.weightradios{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;color:#005D92;width:80%;margin:0 3.6rem;position:relative;width:0%}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:45%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{width:65%;margin-left:auto;margin-right:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=end75]{margin-right:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:45%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start50]{width:40%}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{width:65%;margin-right:auto;margin-left:3.6rem}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=start75]{margin-left:auto}}pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{-ms-flex:0 0 auto;flex:0 0 auto;width:80%}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightradios[data-carousel-container-position=default]{width:65%}}pn-proxio-pricegroup div.weightdata{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:justify;justify-content:space-between;gap:1.2rem;min-width:4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata label{font-size:1.4rem;cursor:pointer}pn-proxio-pricegroup div.weightdata[data-carousel-position="0"]{font-size:2rem;font-weight:700}@media screen and (max-width: 48em){pn-proxio-pricegroup div.weightdata[data-carousel-position="2"],pn-proxio-pricegroup div.weightdata[data-carousel-position="-2"]{display:none}}pn-proxio-pricegroup div.weightdata[data-carousel-position=outside]{display:none}pn-proxio-pricegroup div.weightdata input[type=radio]{-webkit-appearance:none;-moz-appearance:none;width:1.2rem;height:1.2rem;background-color:#005D92;border-radius:50%;margin:0;cursor:pointer}pn-proxio-pricegroup div.weightdata input[type=radio]:checked{z-index:1;-webkit-transform:translateY(-0.1rem);transform:translateY(-0.1rem);height:1.4rem;width:1.4rem;-webkit-box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92;box-shadow:0 0 0 0.3rem #FFFFFF, 0 0 0 0.4rem #005D92}pn-proxio-pricegroup div.weightline{width:100%;background-color:#F3F2F2;z-index:-1;height:0.8rem;-webkit-transform:translateX(2.1rem) translateY(1.32rem);transform:translateX(2.1rem) translateY(1rem);border-radius:2rem;margin-right:3.5rem}pn-proxio-pricegroup pn-button[disabled=disabled]{opacity:0.2}pn-proxio-pricegroup pn-button[disabled=disabled] button{cursor:default}pn-proxio-pricegroup pn-button[disabled=disabled] button.pn-button-light .pn-button-bg:after{background-color:#FFFFFF}pn-proxio-pricegroup pn-button[disabled=disabled] button[data-tooltip-open]:before{display:none}pn-proxio-pricegroup pn-button button div.button-tooltip{display:none}pn-proxio-pricegroup pn-button button:focus .pn-button-bg{-webkit-box-shadow:none;box-shadow:none}';export{n as pn_proxio_pricegroup}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-36654f2a.system.js"],(function(e){"use strict";var t,n,r,a;return{setters:[function(e){t=e.r;n=e.h;r=e.a;a=e.g}],execute:function(){var i="pn-teaser-card{width:100%;height:100%;display:-ms-flexbox;display:flex}pn-teaser-card .pn-teaser-card__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:start;justify-content:flex-start;border-radius:2.4rem}pn-teaser-card .pn-teaser-card__container__image__container{width:100%;position:relative}pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]{height:100%}pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{width:100%;height:auto;border-top-left-radius:2.4rem;border-top-right-radius:2.4rem;-webkit-clip-path:ellipse(100% 90% at 50% 0%);clip-path:ellipse(100% 90% at 50% 0%);aspect-ratio:16/9}pn-teaser-card .pn-teaser-card__container__content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;-ms-flex:1 1 100%;flex:1 1 100%;gap:32px;padding:2.4rem 2.4rem;padding-top:0}pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:2.4rem;line-height:2.64rem}pn-teaser-card .pn-teaser-card__container__content__text__container>p{padding-top:1.6rem;font-weight:400;font-size:1.6rem;line-height:2.24rem}pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{-ms-flex-item-align:end;align-self:flex-end;width:100%}pn-teaser-card[data-card-color=coral]>.pn-teaser-card__container{background-color:#FDEFEE}pn-teaser-card[data-card-color=green]>.pn-teaser-card__container{background-color:#DCF6E7}@media screen and (min-width: 1200px){.halfwidth pn-teaser-card .pn-teaser-card__container__content{padding:0 5.6rem 5.6rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:3.2rem;line-height:3.52rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__text__container>p{font-weight:400;font-size:2rem;line-height:2.8rem}.halfwidth pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}@media screen and (min-width: 768px){.fullwidth pn-teaser-card{min-height:350px}.fullwidth pn-teaser-card .pn-teaser-card__container{-ms-flex-direction:row;flex-direction:row}.fullwidth pn-teaser-card .pn-teaser-card__container__content{-ms-flex-item-align:center;align-self:center;gap:2.4rem;padding-top:2.4rem}.fullwidth pn-teaser-card .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{height:100%;border-top-left-radius:2.4rem;border-bottom-left-radius:2.4rem;-webkit-clip-path:ellipse(100% 100% at 0% 50%);clip-path:ellipse(100% 100% at 0% 50%);-o-object-fit:cover;object-fit:cover}.fullwidth pn-teaser-card .pn-teaser-card__container__content__cta>pn-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}@media screen and (min-width: 1200px){.fullwidth pn-teaser-card{min-height:450px}.fullwidth pn-teaser-card .pn-teaser-card__container__content{padding:3.6rem}.fullwidth pn-teaser-card .pn-teaser-card__container__content__text__container>h1{font-weight:700;font-size:4.8rem;line-height:5.28rem}.fullwidth pn-teaser-card .pn-teaser-card__container__content__text__container>p{font-size:2rem;line-height:2.8rem}}@media screen and (min-width: 768px){.fullwidth pn-teaser-card[data-card-alignment=right] .pn-teaser-card__container{-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fullwidth pn-teaser-card[data-card-alignment=right] .pn-teaser-card__container__image__container>[slot=illustration]>picture>img{border-bottom-right-radius:2.4rem;-webkit-clip-path:ellipse(100% 100% at 100% 50%);clip-path:ellipse(100% 100% at 100% 50%)}}";var c=e("pn_teaser_card",function(){function e(e){t(this,e);this.text="some short text describing whatever";this.heading="some heading";this.dataCardColor="coral";this.dataCardAlignment="left"}e.prototype.render=function(){return n(r,null,n("div",{class:"pn-teaser-card__container"},n("div",{class:"pn-teaser-card__container__image__container"},n("slot",{name:"illustration"})),n("div",{class:"pn-teaser-card__container__content"},n("div",{class:"pn-teaser-card__container__content__text__container"},n("h1",null,this.heading),n("p",null,this.text)),n("div",{class:"pn-teaser-card__container__content__cta"},n("slot",{name:"cta"})))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());c.style=i}}}));
|