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.6 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 x, Slider as y, Slide as P, DotGroup as S } from "pure-react-carousel"; const v = (r) => { let o = 0; const { posts: e, height: a, interval: s, autoSwitch: i } = r; return ( // @ts-ignore /* @__PURE__ */ c( x, { interval: s, isPlaying: i, totalSlides: e.length, naturalSlideHeight: a, children: [ /* @__PURE__ */ t(y, { style: { height: `${a}px` }, trayTag: "ul", children: e.map((l) => /* @__PURE__ */ t(P, { index: o++, tag: "li", children: /* @__PURE__ */ t(m, { post: l, fluid: !0 }) })) }), /* @__PURE__ */ t(S, {}) ] } ) ); }, _ = (r) => { const { "data-type": o, "data-taxonomy": e, "data-categories": a, "data-items": s, "data-height": i, "data-auto-switch": l = "false", "data-interval": n = 1e4, editing: d, parent: u, unique: h } = r; return /* @__PURE__ */ t(f, { style: { height: `${i}px` }, className: `viz post carousel ${d ? "editing" : ""}`, fluid: !0, children: /* @__PURE__ */ t( p, { type: o, taxonomy: e, categories: a, store: "carousel_" + u + "_" + h, page: 1, perPage: s, children: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(v, { height: i, interval: n, autoSwitch: l == "true" }) }) } ) }); }; export { _ as default };