@devgateway/dvz-ui-react
Version:
A modular, embeddable React component library for data visualization and UI, built with TypeScript. Provides reusable components for charts, maps, dashboards, and more, with built-in support for internationalization and Redux integration.
2 lines (1 loc) • 804 B
JavaScript
;const t=require("react/jsx-runtime");require("react");const m=require("react-redux"),s=require("@devgateway/wp-react-lib"),x=e=>t.jsx(s.SettingProvider,{locale:e.intl.locale,changeUUID:e.unique,children:t.jsx(s.SettingsConsumer,{children:t.jsx(g,{...e})})}),g=e=>{const{editing:a=!1,unique:n,intl:q,"data-csv":w="","data-selected-chart-data":c="{}","data-height":i,"data-width":o=100,"data-margin":d=0,settings:r}=e,u=r?r.apache_superset_url:"",h=decodeURIComponent(u),l=decodeURIComponent(c),p=`${h}/superset/explore/?form_data=${l}&standalone=1`;return t.jsx("div",{id:`superset-chart-${n}`,children:t.jsx("iframe",{src:p,seamless:"seamless",title:"superset-chart",style:{border:"none",width:o+"%",height:i+"px",margin:d+"px"}})})},C=(e,a)=>({}),S={},j=m.connect(C,S)(x);module.exports=j;