@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.
30 lines (29 loc) • 1.1 kB
JavaScript
import { jsx as e } from "react/jsx-runtime";
import "react";
import { connect as m } from "react-redux";
import { SettingProvider as u, SettingsConsumer as g } from "@devgateway/wp-react-lib";
const f = (t) => /* @__PURE__ */ e(u, { locale: t.intl.locale, changeUUID: t.unique, children: /* @__PURE__ */ e(g, { children: /* @__PURE__ */ e(C, { ...t }) }) }), C = (t) => {
const {
editing: a = !1,
unique: s,
intl: U,
"data-csv": v = "",
"data-selected-chart-data": n = "{}",
"data-height": o,
"data-width": c = 100,
"data-margin": i = 0,
settings: r
} = t, d = r ? r.apache_superset_url : "", h = decodeURIComponent(d), l = decodeURIComponent(n), p = `${h}/superset/explore/?form_data=${l}&standalone=1`;
return /* @__PURE__ */ e("div", { id: `superset-chart-${s}`, children: /* @__PURE__ */ e(
"iframe",
{
src: p,
seamless: "seamless",
title: "superset-chart",
style: { border: "none", width: c + "%", height: o + "px", margin: i + "px" }
}
) });
}, S = (t, a) => ({}), x = {}, $ = m(S, x)(f);
export {
$ as default
};