UNPKG

@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.

20 lines (19 loc) 812 B
import { jsx as n } from "react/jsx-runtime"; import { connect as c } from "react-redux"; import r from "./mobile.js"; import s from "./desktop.js"; import { useWindowDimensionsAndDevice as m } from "../../lib/hooks/window-dimensions.js"; const p = (o) => { const e = o.getIn(["data", "pageModuleProps"]), i = {}; return e && (i.pageModuleProps = e), i; }, a = {}, d = (o) => { const { pageModuleProps: e } = o, { deviceType: i, width: l, height: f } = m({ getDeviceType: !0, getHeight: !0 }); let t; return (e == null ? void 0 : e.editing) === !0 && (e != null && e.previewMode) ? (e == null ? void 0 : e.previewMode) === "Desktop" ? t = s : t = r : ["tablet", "mobile", "midTablet"].includes(i) ? t = r : t = s, /* @__PURE__ */ n(t, { ...o }); }, D = c(p, a)(d); export { D as default };