@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.
2 lines (1 loc) • 1.08 kB
JavaScript
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("@devgateway/wp-react-lib"),p=require("semantic-ui-react"),i=require("pure-react-carousel"),x=r=>{let s=0;const{posts:t,height:o,interval:l,autoSwitch:a}=r;return e.jsxs(i.CarouselProvider,{interval:l,isPlaying:a,totalSlides:t.length,naturalSlideHeight:o,children:[e.jsx(i.Slider,{trayTag:"ul",children:t.map(n=>e.jsx(i.Slide,{index:s++,tag:"li",children:e.jsx(u.PostIntro,{post:n,fluid:!0})}))}),e.jsx(i.DotGroup,{})]})},j=r=>{const{"data-type":s,"data-taxonomy":t,"data-categories":o,"data-items":l,"data-height":a,"data-auto-switch":n="false","data-interval":c=1e4,editing:d,parent:h,unique:g}=r;return e.jsx(p.Container,{style:{height:`${a}px`},className:`viz post carousel ${d?"editing":""}`,fluid:!0,children:e.jsx(u.PostProvider,{type:s,taxonomy:t,categories:o,store:"carousel_"+h+"_"+g,page:1,perPage:l,children:e.jsx(u.PostConsumer,{children:e.jsx(x,{height:a,interval:c,autoSwitch:n=="true"})})})})};exports.default=j;