@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"),
|
|
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
|
|
5
|
-
const v = (
|
|
6
|
-
let
|
|
7
|
-
const { posts: e, height:
|
|
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
|
-
|
|
11
|
+
P,
|
|
12
12
|
{
|
|
13
13
|
interval: s,
|
|
14
|
-
isPlaying:
|
|
14
|
+
isPlaying: a,
|
|
15
15
|
totalSlides: e.length,
|
|
16
|
-
naturalSlideHeight:
|
|
16
|
+
naturalSlideHeight: o,
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */ t(
|
|
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
|
-
},
|
|
24
|
+
}, $ = (i) => {
|
|
25
25
|
const {
|
|
26
|
-
"data-type":
|
|
26
|
+
"data-type": r,
|
|
27
27
|
"data-taxonomy": e,
|
|
28
|
-
"data-categories":
|
|
28
|
+
"data-categories": o,
|
|
29
29
|
"data-items": s,
|
|
30
|
-
"data-height":
|
|
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
|
-
} =
|
|
37
|
-
return /* @__PURE__ */ t(f, { style: { height: `${
|
|
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:
|
|
40
|
+
type: r,
|
|
41
41
|
taxonomy: e,
|
|
42
|
-
categories:
|
|
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:
|
|
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
|
-
|
|
51
|
+
$ as default
|
|
52
52
|
};
|