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.

18 lines (17 loc) 556 B
import { Config as s } from "../../conf/index.js"; import { get as n } from "../../api/commons.js"; const r = s.REACT_APP_API_ROOT; function i(o) { return Object.keys(o).map((t) => encodeURIComponent(t) + "=" + encodeURIComponent(o[t])).join("&"); } const f = ({ app: o, params: t }) => { const e = `${r ?? ""}/api/${o}/categories${t ? "?" + i(t) : ""}`; return n(e); }, g = ({ source: o, app: t, params: e }) => { const c = `${r ?? ""}/api/${t}/stats/${o}${e ? "?" + i(e) : ""}`; return n(c); }; export { f as getCategories, g as getData };