@postnord/pn-marketweb-components 2.0.142 → 2.0.144
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-chart.cjs.entry.js +15 -5
- package/cjs/pn-market-web-components.cjs.js +1 -1
- package/cjs/pn-stats-info-data.cjs.entry.js +1 -1
- package/cjs/pn-stats-info.cjs.entry.js +3 -3
- package/collection/components/charts/pn-chart/pn-chart.js +21 -8
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info-data/pn-stats-info-data.css +0 -3
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.css +313 -14
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.js +3 -3
- package/collection/components/data-visualization/pn-stats-info/pn-stats-info.stories.js +93 -7
- package/custom-elements/index.js +21 -11
- package/esm/loader.js +1 -1
- package/esm/pn-chart.entry.js +15 -5
- package/esm/pn-market-web-components.js +1 -1
- package/esm/pn-stats-info-data.entry.js +1 -1
- package/esm/pn-stats-info.entry.js +3 -3
- package/esm-es5/loader.js +1 -1
- package/esm-es5/pn-chart.entry.js +1 -1
- package/esm-es5/pn-market-web-components.js +1 -1
- package/esm-es5/pn-stats-info-data.entry.js +1 -1
- package/esm-es5/pn-stats-info.entry.js +1 -1
- package/package.json +1 -1
- package/pn-market-web-components/p-00165a55.system.entry.js +1 -0
- package/pn-market-web-components/{p-fdec849a.system.entry.js → p-05f6c442.system.entry.js} +1 -1
- package/pn-market-web-components/p-0fbcc2b8.entry.js +1 -0
- package/pn-market-web-components/{p-ccf891fc.entry.js → p-4d29f6a6.entry.js} +3 -3
- package/pn-market-web-components/p-80e58bf9.entry.js +1 -0
- package/pn-market-web-components/p-d295ef71.system.js +1 -1
- package/pn-market-web-components/p-fd040ac6.system.entry.js +1 -0
- package/pn-market-web-components/pn-market-web-components.esm.js +1 -1
- package/types/components/charts/pn-chart/pn-chart.d.ts +4 -4
- package/umd/pn-marketweb-init.js +1 -1
- package/umd/pn-marketweb-salesforce.js +2 -2
- package/pn-market-web-components/p-0ffa3353.entry.js +0 -1
- package/pn-market-web-components/p-19b622e7.entry.js +0 -1
- package/pn-market-web-components/p-488a5506.system.entry.js +0 -1
- package/pn-market-web-components/p-8879ac54.system.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as n,a}from"./p-7c1b31e8.js";const i=class{constructor(n){t(this,n),this.inViewPortCallback=t=>{t.isIntersecting&&(this.hasBeenShown=!0)},this.data=0,this.unit=null,this.preamble=null,this.compId=null,this.duration=1e3,this.hasBeenShown=!1}watchStateHandlder(t,n){const a=document.getElementById(`pn-stats-info-data-${this.compId}`);a.classList.contains("is-inViewport")&&t!==n&&((t,n=0,a=100,i=1e3)=>{let e=null;const s=o=>{e||(e=o);const d=Math.min((o-e)/i,1);t.innerHTML=i?(Math.round(10*(d*(a-n)+n))/10).toString():a.toString(),d<1&&window.requestAnimationFrame(s)};window.requestAnimationFrame(s)})(a,0,this.data,this.duration)}render(){return n(a,null,n("div",{class:"pn-stats-info-data__container"},n("div",{class:"pn-stats-info-data__container__content"},n("div",{class:"pn-stats-info-data__container__content__data",id:`pn-stats-info-data-${this.compId}`}),n("div",{class:"pn-stats-info-data__container__content__unit"},this.unit)),n("div",{class:"pn-stats-info-data__container__content__preamble"},this.preamble)))}componentDidRender(){const t=new IntersectionObserver((t=>((t,n,a)=>{t.forEach((t=>{t.target.classList.toggle("is-inViewport",t.isIntersecting),a(t)}))})(t,0,this.inViewPortCallback))),n=document.getElementById(`pn-stats-info-data-${this.compId}`);t.observe(n)}static get watchers(){return{hasBeenShown:["watchStateHandlder"]}}};i.style="pn-stats-info-data{width:50%}pn-stats-info-data .pn-stats-info-data__container{width:100%;background-color:transparent;color:#F06365;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;padding:2rem}@media screen and (min-width: 768px){pn-stats-info-data .pn-stats-info-data__container{-ms-flex-pack:center;justify-content:center;min-height:102px;padding:0 2rem}}@media screen and (min-width: 1200px){pn-stats-info-data .pn-stats-info-data__container{min-height:125px}}pn-stats-info-data .pn-stats-info-data__container__content{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}pn-stats-info-data .pn-stats-info-data__container__content__data{font-weight:700;font-size:3rem;line-height:110%}@media screen and (min-width: 1200px){pn-stats-info-data .pn-stats-info-data__container__content__data{font-size:5.6rem}}pn-stats-info-data .pn-stats-info-data__container__content__unit{font-weight:700;font-size:3rem;line-height:110%}@media screen and (min-width: 1200px){pn-stats-info-data .pn-stats-info-data__container__content__unit{font-size:5.6rem}}pn-stats-info-data .pn-stats-info-data__container__content__preamble{text-align:center;font-weight:400;font-size:1.4rem;line-height:110%;color:#FFFFFF}";export{i as pn_stats_info_data}
|