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.

53 lines (52 loc) 1.57 kB
import { jsx as t, jsxs as c } from "react/jsx-runtime"; import { PostProvider as p, PostConsumer as g, PostIntro as m } from "@devgateway/wp-react-lib"; import { Container as f } from "semantic-ui-react"; import { CarouselProvider as P, Slider as x, Slide as y, DotGroup as S } from "pure-react-carousel"; const v = (i) => { let r = 0; const { posts: e, height: o, interval: s, autoSwitch: a } = i; return ( // @ts-ignore /* @__PURE__ */ c( P, { interval: s, isPlaying: a, totalSlides: e.length, naturalSlideHeight: o, children: [ /* @__PURE__ */ t(x, { trayTag: "ul", children: e.map((l) => /* @__PURE__ */ t(y, { index: r++, tag: "li", children: /* @__PURE__ */ t(m, { post: l, fluid: !0 }) })) }), /* @__PURE__ */ t(S, {}) ] } ) ); }, $ = (i) => { const { "data-type": r, "data-taxonomy": e, "data-categories": o, "data-items": s, "data-height": a, "data-auto-switch": l = "false", "data-interval": n = 1e4, editing: d, parent: u, unique: h } = i; return /* @__PURE__ */ t(f, { style: { height: `${a}px` }, className: `viz post carousel ${d ? "editing" : ""}`, fluid: !0, children: /* @__PURE__ */ t( p, { type: r, taxonomy: e, categories: o, store: "carousel_" + u + "_" + h, page: 1, perPage: s, children: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(v, { height: a, interval: n, autoSwitch: l == "true" }) }) } ) }); }; export { $ as default };