@statisticsfinland/pxvisualizer 1.0.5-d.1 → 1.0.5-d.3
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/dist/pxv.cjs +1 -1
- package/dist/pxv.cjs.map +1 -1
- package/dist/pxv.modern.js +1 -1
- package/dist/pxv.modern.js.map +1 -1
- package/dist/pxv.module.js +1 -1
- package/dist/pxv.module.js.map +1 -1
- package/dist/pxv.umd.js +1 -1
- package/dist/pxv.umd.js.map +1 -1
- package/dist/types/react/components/burgerMenu/burgerMenu.d.ts +2 -4
- package/package.json +1 -1
package/dist/pxv.modern.js
CHANGED
|
@@ -85,7 +85,7 @@ import e,{useRef as t,useContext as n,useLayoutEffect as r,createElement as a,us
|
|
|
85
85
|
list-style-type: none;
|
|
86
86
|
margin: 0;
|
|
87
87
|
padding: 0;
|
|
88
|
-
`));function Hr(e
|
|
88
|
+
`));function Hr(e){const t=600,n=e.chart.chartWidth,r=e.chart.chartHeight;let a,i,s=Math.max(.5,Math.min(2,n/r));return s<1?(i=Math.max(t,Math.min(3e3,r)),a=i*s,a<t&&(a=t,i=a/s)):(a=Math.max(t,Math.min(3e3,n)),i=a/s,i<t&&(i=t,a=i*s)),{finalWidth:a,finalHeight:i}}const Wr=({viewData:t,currentChartRef:n,tableToggle:r,menuItemDefinitions:a,locale:i,menuIconInheritColor:s=!1})=>{const[o,l]=e.useState(!1),c=e.useRef(null);document.addEventListener("mousedown",e=>{c.current&&o&&!c.current.contains(e.target)&&l(!1)});const u=lr(t,i),m=hr(t,i),p=null==a?void 0:a.map((t,n)=>"onClick"in t?e.createElement(Dr,{isFirst:0===n,bottomSeparator:n+1===a.length,locale:i,prefixIcon:t.prefixIcon,suffixIcon:t.suffixIcon,key:`customfmenuitem-${n}`,text:t.text,onClick:t.onClick}):"url"in t?e.createElement(Dr,{isFirst:0===n,bottomSeparator:n+1===a.length,locale:i,prefixIcon:t.prefixIcon,suffixIcon:t.suffixIcon,isExternal:t.isExternal,key:`customlmenuitem-${n}`,text:`${t.text}`,url:t.url,openNewTab:t.openNewTab}):void 0);return e.createElement(Gr,{ref:c},e.createElement(_r,{"aria-label":`${zt.chartMenuLabel[i]}`,"aria-expanded":o,onClick:()=>{l(!o)}},e.createElement(vr,{inheritColor:s,icon:o?"Times":"Bars"})),e.createElement(qr,null,o&&e.createElement(Br,null,e.createElement(Fr,null,a&&p,e.createElement(Dr,{isFirst:!a,locale:i,prefixIcon:"Download",text:m.text,onClick:()=>m.onClick()}),e.createElement(Dr,{isLast:!n,bottomSeparator:!!n,locale:i,prefixIcon:"Download",text:u.text,onClick:()=>u.onClick()}),n&&e.createElement(e.Fragment,null,e.createElement(Dr,{locale:i,prefixIcon:"Download",text:zt.downloadSVG[i],onClick:()=>n.chart.exportChartLocal({filename:`${sr(t.tableReferenceName)}`,type:"image/svg+xml",sourceWidth:Hr(n).finalWidth,sourceHeight:Hr(n).finalHeight,scale:1},{})}),e.createElement(Dr,{isLast:!r,bottomSeparator:!!r,locale:i,prefixIcon:"Download",text:zt.downloadPNG[i],onClick:()=>n.chart.exportChartLocal({filename:`${sr(t.tableReferenceName)}`,sourceWidth:Hr(n).finalWidth,sourceHeight:Hr(n).finalHeight,scale:1},{})})),r&&e.createElement(Dr,{isLast:!0,locale:i,text:r.tableMode?zt.toggleTableModeOffText[i]:zt.toggleTableModeOnText[i],onClick:()=>r.toggleHandler()})))))},Ur=({view:t,locale:n,footnote:r,showTitles:a=!0,showUnits:s=!0,showSources:o=!0})=>{const l=i(()=>v(),[t,n]);return e.useEffect(()=>{var e;null==(e=document.getElementById(l))||e.replaceChildren(),nr(t,n,a,s,o,l,r)},[t,n,a,s,o,r]),e.createElement("div",{className:"tableChart",id:l})};let Yr;const Zr=function(a){for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];var l=mt.apply(void 0,[a].concat(s)),c="sc-global-"+bt(JSON.stringify(l)),u=new Pt(l,c);function m(a){var i=et(),s=tt(),o=n(At),m=t(i.allocateGSInstance(c)).current;return"production"!==process.env.NODE_ENV&&e.Children.count(a.children)&&console.warn("The global style component "+c+" was given child JSX. createGlobalStyle does not render children."),"production"!==process.env.NODE_ENV&&l.some(function(e){return"string"==typeof e&&-1!==e.indexOf("@import")})&&console.warn("Please do not use @import CSS syntax in createGlobalStyle at this time, as the CSSOM APIs we use in production do not handle it well. Instead, we recommend using a library such as react-helmet to inject a typical <link> meta tag to the stylesheet, or simply embedding it manually in your index.html <head> section for a simpler app."),i.server&&p(m,a,i,o,s),r(function(){if(!i.server)return p(m,a,i,o,s),function(){return u.removeStyles(m,i)}},[m,a,i,o,s]),null}function p(e,t,n,r,a){if(u.isStatic)u.renderStyles(e,ye,n,a);else{var i=oe({},t,{theme:ft(t,r,m.defaultProps)});u.renderStyles(e,i,n,a)}}return"production"!==process.env.NODE_ENV&&ht(c),e.memo(m)}(Yr||(Yr=(e=>e)`
|
|
89
89
|
/* @font-face {
|
|
90
90
|
font-family: 'Barlow Semi Condensed';
|
|
91
91
|
font-style: normal;
|