@statisticsfinland/pxvisualizer 1.0.8-d.3 → 1.0.8-d.5
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/core/conversion/translations/index.d.ts +0 -1
- package/dist/types/react/components/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/dist/types/react/components/ErrorBoundary/index.d.ts +1 -0
- package/dist/types/react/components/burgerMenu/burgerMenu.d.ts +1 -1
- package/dist/types/react/components/burgerMenu/index.d.ts +2 -0
- package/dist/types/react/components/burgerMenu/menuItem/index.d.ts +1 -0
- package/dist/types/react/components/burgerMenu/menuItem/menuItem.d.ts +0 -1
- package/dist/types/react/components/chart/chart.d.ts +1 -2
- package/dist/types/react/components/chart/index.d.ts +1 -1
- package/dist/types/react/components/globalStyle/globalStyle.d.ts +1 -2
- package/dist/types/react/components/globalStyle/index.d.ts +1 -1
- package/dist/types/react/components/icon/icon.d.ts +2 -2
- package/dist/types/react/components/icon/index.d.ts +1 -0
- package/dist/types/react/components/index.d.ts +5 -1
- package/package.json +3 -2
package/dist/pxv.modern.js
CHANGED
|
@@ -161,5 +161,5 @@ import e,{useRef as t,useContext as n,useLayoutEffect as r,createElement as i,us
|
|
|
161
161
|
display: ${0};
|
|
162
162
|
`),e=>e.$tableMode?"none":"block"),oi=It.div(ti||(ti=ni`
|
|
163
163
|
display: ${0};
|
|
164
|
-
`),e=>e.$tableMode?"block":"none"),li=({pxGraphData:t,footnote:n,locale:r,menuItemDefinitions:i,selectedVariableCodes:s=null,showContextMenu:o=!0,menuIconInheritColor:c=!1,showTableTitles:u,showTableUnits:m,showTableSources:d})=>{const h=Wt(r);ri(h);const p=e.useRef(null),[f,v]=e.useState(p.current),[y,b]=e.useState(!1),[w,x]=e.useState(0),S=a(()=>{try{return Mn(t.selectableVariableCodes,t.metaData,t.visualizationSettings.defaultSelectableVariableCodes,s)}catch(e){return console.error(e),{}}},[s,t]),k=a(()=>{try{return _n(t,S)}catch(e){return console.error(e),null}},[S,t]);let C;function A(){w!==window.innerWidth&&x(window.innerWidth)}window&&window.addEventListener("resize",function(){clearTimeout(C),C=setTimeout(A,100)});const E=()=>{b(!y)};e.useEffect(()=>{p.current&&v(p.current)},[p.current]);try{if(k&&t.visualizationSettings.visualizationType!==jt.Table){const t=jn(h,k);return e.createElement(ii,null,o&&e.createElement(ai,null,e.createElement(Fr,{menuItemDefinitions:i,viewData:k,currentChartRef:f,locale:h,tableToggle:{tableMode:y,toggleHandler:E},menuIconInheritColor:c})),e.createElement(si,{$tableMode:y},e.createElement(g,{ref:p,immutable:!0,highcharts:l,options:t})),e.createElement(oi,{$tableMode:y},e.createElement(Hr,{showTitles:null==u||u,footnote:n,showUnits:!!m,showSources:!!d,view:k,locale:h})))}if(k&&t.visualizationSettings.visualizationType===jt.Table)return e.createElement(ii,null,o&&e.createElement(ai,null,e.createElement(Fr,{menuItemDefinitions:i,viewData:k,locale:h,menuIconInheritColor:c})),e.createElement(Hr,{showTitles:null!=u&&u,footnote:n,showUnits:!!m,showSources:!!d,view:k,locale:h}))}catch(t){return console.error(t),e.createElement(Xr,{locale:h})}return e.createElement(Xr,{locale:h})},ci=t=>{const n=Wt(t.locale);return e.createElement(Kr,{fallback:e.createElement(Xr,{locale:n})},e.createElement(Ur,null),e.createElement(li,y({},t)))};export{Gt as AddTranslations,ci as Chart,$t as ETimeVariableInterval,Mt as EVariableType,jt as EVisualizationType,hr as buildMinimalXlsxBlobAsync,_n as convertPxGrafResponseToView,jn as convertPxGraphDataToChartOptions,vn as defaultTheme,Xn as drawChart,Mn as extractSelectableVariableValues,ar as generateCsv,er as renderHtmlTable,sr as viewToDownloadCSVOption,dr as viewToDownloadXLSOption};
|
|
164
|
+
`),e=>e.$tableMode?"block":"none"),li=({pxGraphData:t,footnote:n,locale:r,menuItemDefinitions:i,selectedVariableCodes:s=null,showContextMenu:o=!0,menuIconInheritColor:c=!1,showTableTitles:u,showTableUnits:m,showTableSources:d})=>{const h=Wt(r);ri(h);const p=e.useRef(null),[f,v]=e.useState(p.current),[y,b]=e.useState(!1),[w,x]=e.useState(0),S=a(()=>{try{return Mn(t.selectableVariableCodes,t.metaData,t.visualizationSettings.defaultSelectableVariableCodes,s)}catch(e){return console.error(e),{}}},[s,t]),k=a(()=>{try{return _n(t,S)}catch(e){return console.error(e),null}},[S,t]);let C;function A(){w!==window.innerWidth&&x(window.innerWidth)}window&&window.addEventListener("resize",function(){clearTimeout(C),C=setTimeout(A,100)});const E=()=>{b(!y)};e.useEffect(()=>{p.current&&v(p.current)},[p.current]);try{if(k&&t.visualizationSettings.visualizationType!==jt.Table){const t=jn(h,k);return e.createElement(ii,null,o&&e.createElement(ai,null,e.createElement(Fr,{menuItemDefinitions:i,viewData:k,currentChartRef:f,locale:h,tableToggle:{tableMode:y,toggleHandler:E},menuIconInheritColor:c})),e.createElement(si,{$tableMode:y},e.createElement(g,{ref:p,immutable:!0,highcharts:l,options:t})),e.createElement(oi,{$tableMode:y},e.createElement(Hr,{showTitles:null==u||u,footnote:n,showUnits:!!m,showSources:!!d,view:k,locale:h})))}if(k&&t.visualizationSettings.visualizationType===jt.Table)return e.createElement(ii,null,o&&e.createElement(ai,null,e.createElement(Fr,{menuItemDefinitions:i,viewData:k,locale:h,menuIconInheritColor:c})),e.createElement(Hr,{showTitles:null!=u&&u,footnote:n,showUnits:!!m,showSources:!!d,view:k,locale:h}))}catch(t){return console.error(t),e.createElement(Xr,{locale:h})}return e.createElement(Xr,{locale:h})},ci=t=>{const n=Wt(t.locale);return e.createElement(Kr,{fallback:e.createElement(Xr,{locale:n})},e.createElement(Ur,null),e.createElement(li,y({},t)))};export{Gt as AddTranslations,Fr as BurgerMenu,ci as Chart,$t as ETimeVariableInterval,Mt as EVariableType,jt as EVisualizationType,Kr as ErrorBoundary,Ur as GlobalStyle,fr as Icon,Mr as MenuItem,hr as buildMinimalXlsxBlobAsync,Br as calculateExportDimensions,_n as convertPxGrafResponseToView,jn as convertPxGraphDataToChartOptions,vn as defaultTheme,Xn as drawChart,Mn as extractSelectableVariableValues,ar as generateCsv,er as renderHtmlTable,sr as viewToDownloadCSVOption,dr as viewToDownloadXLSOption};
|
|
165
165
|
//# sourceMappingURL=pxv.modern.js.map
|