@devgateway/dvz-ui-react 1.6.11 → 1.6.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "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"),r=require("pure-react-carousel"),x=s=>{let o=0;const{posts:t,height:i,interval:l,autoSwitch:a}=s;return e.jsxs(r.CarouselProvider,{interval:l,isPlaying:a,totalSlides:t.length,naturalSlideHeight:i,children:[e.jsx(r.Slider,{style:{height:`${i}px`},trayTag:"ul",children:t.map(n=>e.jsx(r.Slide,{index:o++,tag:"li",children:e.jsx(u.PostIntro,{post:n,fluid:!0})}))}),e.jsx(r.DotGroup,{})]})},j=s=>{const{"data-type":o,"data-taxonomy":t,"data-categories":i,"data-items":l,"data-height":a,"data-auto-switch":n="false","data-interval":c=1e4,editing:d,parent:h,unique:g}=s;return e.jsx(p.Container,{style:{height:`${a}px`},className:`viz post carousel ${d?"editing":""}`,fluid:!0,children:e.jsx(u.PostProvider,{type:o,taxonomy:t,categories:i,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;
1
+ "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;
@@ -1,52 +1,52 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
2
  import { PostProvider as p, PostConsumer as g, PostIntro as m } from "@devgateway/wp-react-lib";
3
3
  import { Container as f } from "semantic-ui-react";
4
- import { CarouselProvider as x, Slider as y, Slide as P, DotGroup as S } from "pure-react-carousel";
5
- const v = (r) => {
6
- let o = 0;
7
- const { posts: e, height: a, interval: s, autoSwitch: i } = r;
4
+ import { CarouselProvider as P, Slider as x, Slide as y, DotGroup as S } from "pure-react-carousel";
5
+ const v = (i) => {
6
+ let r = 0;
7
+ const { posts: e, height: o, interval: s, autoSwitch: a } = i;
8
8
  return (
9
9
  // @ts-ignore
10
10
  /* @__PURE__ */ c(
11
- x,
11
+ P,
12
12
  {
13
13
  interval: s,
14
- isPlaying: i,
14
+ isPlaying: a,
15
15
  totalSlides: e.length,
16
- naturalSlideHeight: a,
16
+ naturalSlideHeight: o,
17
17
  children: [
18
- /* @__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 }) })) }),
18
+ /* @__PURE__ */ t(x, { trayTag: "ul", children: e.map((l) => /* @__PURE__ */ t(y, { index: r++, tag: "li", children: /* @__PURE__ */ t(m, { post: l, fluid: !0 }) })) }),
19
19
  /* @__PURE__ */ t(S, {})
20
20
  ]
21
21
  }
22
22
  )
23
23
  );
24
- }, _ = (r) => {
24
+ }, $ = (i) => {
25
25
  const {
26
- "data-type": o,
26
+ "data-type": r,
27
27
  "data-taxonomy": e,
28
- "data-categories": a,
28
+ "data-categories": o,
29
29
  "data-items": s,
30
- "data-height": i,
30
+ "data-height": a,
31
31
  "data-auto-switch": l = "false",
32
32
  "data-interval": n = 1e4,
33
33
  editing: d,
34
34
  parent: u,
35
35
  unique: h
36
- } = r;
37
- return /* @__PURE__ */ t(f, { style: { height: `${i}px` }, className: `viz post carousel ${d ? "editing" : ""}`, fluid: !0, children: /* @__PURE__ */ t(
36
+ } = i;
37
+ return /* @__PURE__ */ t(f, { style: { height: `${a}px` }, className: `viz post carousel ${d ? "editing" : ""}`, fluid: !0, children: /* @__PURE__ */ t(
38
38
  p,
39
39
  {
40
- type: o,
40
+ type: r,
41
41
  taxonomy: e,
42
- categories: a,
42
+ categories: o,
43
43
  store: "carousel_" + u + "_" + h,
44
44
  page: 1,
45
45
  perPage: s,
46
- children: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(v, { height: i, interval: n, autoSwitch: l == "true" }) })
46
+ children: /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(v, { height: a, interval: n, autoSwitch: l == "true" }) })
47
47
  }
48
48
  ) });
49
49
  };
50
50
  export {
51
- _ as default
51
+ $ as default
52
52
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devgateway/dvz-ui-react",
3
- "version": "1.6.11",
3
+ "version": "1.6.12",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",