@devgateway/dvz-ui-react 1.9.14 → 1.9.15
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("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),r=require("semantic-ui-react"),h=require("@devgateway/wp-react-lib"),A=require("react-intl"),L=require("react-redux"),p=require("../connected-templates/PostIntro.js"),q=require("../../lib/hooks/window-dimensions.js"),$=({posts:t,activeItem:l,setActive:i,showLabels:n})=>t?t.map(s=>e.jsx(r.Menu.Item,{onClick:()=>i(s.slug),className:s.slug===l?"active":"",children:n?e.jsx(h.PostLabel,{post:s}):e.jsx(r.Label,{children:e.jsx("span",{dangerouslySetInnerHTML:{__html:s.title.rendered}})})},s.id)):null,k=({posts:t,activeItem:l,setActive:i,showIcons:n,showLabels:s})=>{const o=t.length;return t?t.map(a=>{var m,g;return(m=a._embedded)!=null&&m["wp:featuredmedia"]&&a._embedded["wp:featuredmedia"][0].source_url,e.jsx(r.Grid.Column,{className:(a.slug===l?"active":"")+(n?" has-icon":""),children:e.jsxs(r.Button,{onClick:()=>i(a.slug),className:`nav ${o===1?"one":""}`,children:[n&&e.jsx(h.MediaProvider,{id:(g=a.meta_fields)!=null&&g.icon?a.meta_fields.icon[0]:null,children:e.jsx(h.MediaConsumer,{children:e.jsx(h.PostIcon,{className:"icon"})})}),s?e.jsx(h.PostLabel,{post:a}):e.jsx(r.Label,{children:e.jsx("span",{dangerouslySetInnerHTML:{__html:a.title.rendered}})})]})},a.id)}):null},I=({posts:t,activeItem:l})=>(u.useEffect(()=>{const i=document.querySelector(".ui.container.content-tab");i&&(i.scrollTop=0)},[l]),t?t.map(i=>{let n={};return i.slug!==l?n={position:"absolute",left:"-3000px",width:"auto",height:"0px",overflow:"hidden",visibility:"hidden"}:n={visibility:"visible",position:"relative",width:"auto"},e.jsx(p.default,{as:r.Container,fluid:!0,post:i,style:n},i.slug)}):null),R=({posts:t,activeItem:l,setActive:i})=>{const[n,s]=u.useState(t.findIndex(d=>d.slug===l)),[o,a]=u.useState(null),m=u.useRef(null);u.useEffect(()=>{if(o){const d=o.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:d,behavior:"smooth"})}},[o]);const g=(d,x)=>{const{index:c}=x,j=n===c?-1:c;s(j),i(t[c].slug),j!==-1&&a(d.currentTarget)};return e.jsx(r.Accordion,{fluid:!0,styled:!0,children:t.map((d,x)=>{var j;const c=(j=d.meta_fields)!=null&&j.icon?d.meta_fields.icon[0]:null;return e.jsxs(u.Fragment,{children:[e.jsx(r.Accordion.Title,{active:n===x,index:x,onClick:g,children:e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[c&&e.jsx(h.MediaProvider,{id:c,children:e.jsx(h.MediaConsumer,{children:e.jsx(h.PostIcon,{className:"icon"})})}),e.jsx("span",{dangerouslySetInnerHTML:{__html:d.title.rendered},style:{marginLeft:c?"10px":"0"}})]}),e.jsx(r.Icon,{name:"chevron down"})]})}),e.jsx(r.Accordion.Content,{className:"accordion-post-content",active:n===x,children:e.jsx("div",{ref:m,children:e.jsx(p.default,{post:d,as:r.Container,fluid:!0})})})]},d.id)})})},D=({posts:t,showLabels:l,height:i})=>{const[n,s]=u.useState(t?t[0].slug:null);return u.useEffect(()=>{setTimeout(()=>{if(window.location.hash){const o=window.location.hash.substr(1),a=document.getElementById(o);a&&t.map(m=>m.slug).indexOf(o)>-1&&(s(o),a.scrollIntoView({behavior:"auto",block:"start"}))}},0)},[t]),e.jsxs(u.Fragment,{children:[t.map(o=>e.jsx("anchor",{id:o.slug},o.slug)),e.jsx(r.Menu,{className:"tabbed posts",text:!0,children:e.jsx($,{showLabels:l,posts:t,setActive:s,activeItem:n})}),e.jsx(r.Container,{className:"content-tab",style:{height:`${i}px`},children:e.jsx(I,{posts:t,activeItem:n})})]})},G=({posts:t,showLabels:l,showIcons:i,height:n})=>{const[s,o]=u.useState(t?t[0].slug:null);return e.jsx(u.Fragment,{children:e.jsxs(r.Grid,{stackable:!0,className:"tabbed posts",columns:t.length,style:{height:n+"px"},children:[e.jsx(k,{showIcons:i,showLabels:l,posts:t,activeItem:s,setActive:o}),e.jsx(r.Grid.Row,{style:{height:`${n}px`},children:e.jsx(r.Grid.Column,{width:16,className:"content",children:e.jsx(r.Container,{className:"content-tab",style:{height:`${n}px`},children:e.jsx(I,{className:"content-tab",posts:t,activeItem:s})})})})]})})},E=t=>{var C;let{"data-type":l,"data-taxonomy":i,"data-categories":n,"data-items":s,"data-theme":o="light","data-show-icons":a,"data-use-scrolls":m,"data-show-labels":g,"data-height":d,"data-preview-mode":x="Desktop",pageModuleProps:c,parent:j,editing:b,unique:M}=t;c!=null&&c.previewMode&&(c!=null&&c.editing)&&(x=c.previewMode,b=c.editing);const _=t.intl.locale;let f=n;if(Array.isArray(n))f=n.join(",");else if(typeof n=="string")try{const w=JSON.parse(n);Array.isArray(w)&&(f=w.join(","))}catch{}const v=m==="true",y=v?d:void 0,{width:N}=q.useWindowDimensionsAndDevice(),P=N<=1024,T=x!=="Desktop"&&b,S=P&&!b;return b&&!l?e.jsx(r.Container,{className:`viz tabbed posts ${b?"editing":""} ${v?"scrollable":""}`,fluid:!0}):e.jsx(r.Container,{className:`viz tabbed posts ${b?"editing":""} ${v?"scrollable":""}`,fluid:!0,children:e.jsx(h.PostProvider,{locale:_,type:l,taxonomy:i,categories:f,store:`tabbedposts_${j}_${M}`,page:1,perPage:s,children:e.jsx(h.PostConsumer,{children:e.jsx(h.PostConsumer,{children:S||T?e.jsx(R,{posts:s,activeItem:(C=s[0])==null?void 0:C.slug,setActive:()=>{}}):o==="light"?e.jsx(D,{height:y,showLabels:g==="true"}):e.jsx(G,{height:y,showLabels:g==="true",showIcons:a==="true"})})})})})},H=(t,l)=>{const i=t.getIn(["data","pageModuleProps"]),n={};return i&&(n.pageModuleProps=i),n},z={},B=L.connect(H,z)(A.injectIntl(E));exports.default=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("react"),u=require("react-router"),m=require("semantic-ui-react"),w=require("@devgateway/wp-react-lib"),f=require("../embeddable/index.js"),P=()=>{const d=u.useParams(),[p]=u.useSearchParams(),[o]=r.useState(()=>f.getComponentByNameIgnoreCase(d.name??"")),[n,l]=r.useState(()=>Object.fromEntries(p.entries())),i=r.useRef(n);i.current=n;const a=r.useCallback(g=>{const t=g.data;if(t.messageType&&t.messageType==="component-attributes"){const c={...i.current};Object.keys(t).forEach(s=>{c["data-"+s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()]=typeof t[s]=="object"?JSON.stringify(t[s]):t[s]}),l(c)}},[]);return r.useEffect(()=>(window.addEventListener("message",a,!1),window.parent&&window.parent.postMessage({type:"componentReady",value:!0},"*"),window.top&&window.top.postMessage({type:"componentReady",value:!0},"*"),()=>{window.removeEventListener("message",a)}),[a]),e.jsx("div",{children:e.jsx(m.Container,{fluid:!0,className:"editing",children:o?e.jsx(o,{...n,editing:!0}):e.jsx(m.Segment.Group,{color:"red",textAlign:"center",children:e.jsx("h1",{children:"Wrong Component Name"})})})})},j=()=>e.jsx(w.SettingsConsumer,{children:e.jsx(P,{})});exports.default=j;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Container as b, Accordion as
|
|
4
|
-
import { PostProvider as
|
|
5
|
-
import { injectIntl as
|
|
6
|
-
import { connect as
|
|
7
|
-
import
|
|
2
|
+
import C, { useState as w, useRef as V, useEffect as N } from "react";
|
|
3
|
+
import { Container as b, Accordion as x, Icon as W, Menu as A, Grid as v, Label as P, Button as q } from "semantic-ui-react";
|
|
4
|
+
import { PostProvider as E, PostConsumer as M, MediaProvider as S, MediaConsumer as $, PostIcon as k, PostLabel as L } from "@devgateway/wp-react-lib";
|
|
5
|
+
import { injectIntl as O } from "react-intl";
|
|
6
|
+
import { connect as J } from "react-redux";
|
|
7
|
+
import j from "../connected-templates/PostIntro.js";
|
|
8
8
|
import { useWindowDimensionsAndDevice as U } from "../../lib/hooks/window-dimensions.js";
|
|
9
|
-
const Y = ({ posts: t, activeItem:
|
|
10
|
-
|
|
9
|
+
const Y = ({ posts: t, activeItem: r, setActive: i, showLabels: n }) => t ? t.map((l) => /* @__PURE__ */ e(
|
|
10
|
+
A.Item,
|
|
11
11
|
{
|
|
12
12
|
onClick: () => i(l.slug),
|
|
13
|
-
className: l.slug ===
|
|
14
|
-
children: n ? /* @__PURE__ */ e(
|
|
13
|
+
className: l.slug === r ? "active" : "",
|
|
14
|
+
children: n ? /* @__PURE__ */ e(L, { post: l }) : /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e("span", { dangerouslySetInnerHTML: { __html: l.title.rendered } }) })
|
|
15
15
|
},
|
|
16
16
|
l.id
|
|
17
|
-
)) : null,
|
|
17
|
+
)) : null, K = ({
|
|
18
18
|
posts: t,
|
|
19
|
-
activeItem:
|
|
19
|
+
activeItem: r,
|
|
20
20
|
setActive: i,
|
|
21
21
|
showIcons: n,
|
|
22
22
|
showLabels: l
|
|
23
23
|
}) => {
|
|
24
|
-
const
|
|
24
|
+
const o = t.length;
|
|
25
25
|
return t ? t.map((a) => {
|
|
26
26
|
var d, m;
|
|
27
27
|
return (d = a._embedded) != null && d["wp:featuredmedia"] && a._embedded["wp:featuredmedia"][0].source_url, /* @__PURE__ */ e(
|
|
28
28
|
v.Column,
|
|
29
29
|
{
|
|
30
|
-
className: (a.slug ===
|
|
30
|
+
className: (a.slug === r ? "active" : "") + (n ? " has-icon" : ""),
|
|
31
31
|
children: /* @__PURE__ */ f(
|
|
32
|
-
|
|
32
|
+
q,
|
|
33
33
|
{
|
|
34
34
|
onClick: () => i(a.slug),
|
|
35
|
-
className: `nav ${
|
|
35
|
+
className: `nav ${o === 1 ? "one" : ""}`,
|
|
36
36
|
children: [
|
|
37
37
|
n && /* @__PURE__ */ e(
|
|
38
|
-
|
|
38
|
+
S,
|
|
39
39
|
{
|
|
40
40
|
id: (m = a.meta_fields) != null && m.icon ? a.meta_fields.icon[0] : null,
|
|
41
|
-
children: /* @__PURE__ */ e(
|
|
41
|
+
children: /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(k, { className: "icon" }) })
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
l ? /* @__PURE__ */ e(
|
|
44
|
+
l ? /* @__PURE__ */ e(L, { post: a }) : /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
45
45
|
"span",
|
|
46
46
|
{
|
|
47
47
|
dangerouslySetInnerHTML: { __html: a.title.rendered }
|
|
@@ -54,12 +54,12 @@ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
54
54
|
a.id
|
|
55
55
|
);
|
|
56
56
|
}) : null;
|
|
57
|
-
},
|
|
57
|
+
}, D = ({ posts: t, activeItem: r }) => (N(() => {
|
|
58
58
|
const i = document.querySelector(".ui.container.content-tab");
|
|
59
59
|
i && (i.scrollTop = 0);
|
|
60
|
-
}, [
|
|
60
|
+
}, [r]), t ? t.map((i) => {
|
|
61
61
|
let n = {};
|
|
62
|
-
return i.slug !==
|
|
62
|
+
return i.slug !== r ? n = {
|
|
63
63
|
position: "absolute",
|
|
64
64
|
left: "-3000px",
|
|
65
65
|
width: "auto",
|
|
@@ -70,30 +70,30 @@ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
70
70
|
visibility: "visible",
|
|
71
71
|
position: "relative",
|
|
72
72
|
width: "auto"
|
|
73
|
-
}, /* @__PURE__ */ e(
|
|
74
|
-
}) : null),
|
|
73
|
+
}, /* @__PURE__ */ e(j, { as: b, fluid: !0, post: i, style: n }, i.slug);
|
|
74
|
+
}) : null), Q = ({ posts: t, activeItem: r, setActive: i }) => {
|
|
75
75
|
const [n, l] = w(
|
|
76
|
-
t.findIndex((s) => s.slug ===
|
|
77
|
-
), [
|
|
78
|
-
|
|
79
|
-
if (
|
|
80
|
-
const s =
|
|
76
|
+
t.findIndex((s) => s.slug === r)
|
|
77
|
+
), [o, a] = w(null), d = V(null);
|
|
78
|
+
N(() => {
|
|
79
|
+
if (o) {
|
|
80
|
+
const s = o.getBoundingClientRect().top + window.scrollY;
|
|
81
81
|
window.scrollTo({
|
|
82
82
|
top: s,
|
|
83
83
|
behavior: "smooth"
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
}, [
|
|
86
|
+
}, [o]);
|
|
87
87
|
const m = (s, u) => {
|
|
88
88
|
const { index: c } = u, h = n === c ? -1 : c;
|
|
89
89
|
l(h), i(t[c].slug), h !== -1 && a(s.currentTarget);
|
|
90
90
|
};
|
|
91
|
-
return /* @__PURE__ */ e(
|
|
91
|
+
return /* @__PURE__ */ e(x, { fluid: !0, styled: !0, children: t.map((s, u) => {
|
|
92
92
|
var h;
|
|
93
93
|
const c = (h = s.meta_fields) != null && h.icon ? s.meta_fields.icon[0] : null;
|
|
94
|
-
return /* @__PURE__ */ f(
|
|
94
|
+
return /* @__PURE__ */ f(C.Fragment, { children: [
|
|
95
95
|
/* @__PURE__ */ e(
|
|
96
|
-
|
|
96
|
+
x.Title,
|
|
97
97
|
{
|
|
98
98
|
active: n === u,
|
|
99
99
|
index: u,
|
|
@@ -109,7 +109,7 @@ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
109
109
|
},
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ f("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
112
|
-
c && /* @__PURE__ */ e(
|
|
112
|
+
c && /* @__PURE__ */ e(S, { id: c, children: /* @__PURE__ */ e($, { children: /* @__PURE__ */ e(k, { className: "icon" }) }) }),
|
|
113
113
|
/* @__PURE__ */ e(
|
|
114
114
|
"span",
|
|
115
115
|
{
|
|
@@ -118,50 +118,50 @@ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
118
118
|
}
|
|
119
119
|
)
|
|
120
120
|
] }),
|
|
121
|
-
/* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e(W, { name: "chevron down" })
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
124
|
)
|
|
125
125
|
}
|
|
126
126
|
),
|
|
127
127
|
/* @__PURE__ */ e(
|
|
128
|
-
|
|
128
|
+
x.Content,
|
|
129
129
|
{
|
|
130
130
|
className: "accordion-post-content",
|
|
131
131
|
active: n === u,
|
|
132
|
-
children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(
|
|
132
|
+
children: /* @__PURE__ */ e("div", { ref: d, children: /* @__PURE__ */ e(j, { post: s, as: b, fluid: !0 }) })
|
|
133
133
|
}
|
|
134
134
|
)
|
|
135
135
|
] }, s.id);
|
|
136
136
|
}) });
|
|
137
|
-
},
|
|
137
|
+
}, X = ({ posts: t, showLabels: r, height: i }) => {
|
|
138
138
|
const [n, l] = w(t ? t[0].slug : null);
|
|
139
|
-
return
|
|
139
|
+
return N(() => {
|
|
140
140
|
setTimeout(() => {
|
|
141
141
|
if (window.location.hash) {
|
|
142
|
-
const
|
|
143
|
-
a && t.map((d) => d.slug).indexOf(
|
|
142
|
+
const o = window.location.hash.substr(1), a = document.getElementById(o);
|
|
143
|
+
a && t.map((d) => d.slug).indexOf(o) > -1 && (l(o), a.scrollIntoView({ behavior: "auto", block: "start" }));
|
|
144
144
|
}
|
|
145
145
|
}, 0);
|
|
146
|
-
}, [t]), /* @__PURE__ */ f(
|
|
147
|
-
t.map((
|
|
148
|
-
/* @__PURE__ */ e(
|
|
149
|
-
/* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e(
|
|
146
|
+
}, [t]), /* @__PURE__ */ f(C.Fragment, { children: [
|
|
147
|
+
t.map((o) => /* @__PURE__ */ e("anchor", { id: o.slug }, o.slug)),
|
|
148
|
+
/* @__PURE__ */ e(A, { className: "tabbed posts", text: !0, children: /* @__PURE__ */ e(Y, { showLabels: r, posts: t, setActive: l, activeItem: n }) }),
|
|
149
|
+
/* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${i}px` }, children: /* @__PURE__ */ e(D, { posts: t, activeItem: n }) })
|
|
150
150
|
] });
|
|
151
|
-
},
|
|
152
|
-
const [l,
|
|
153
|
-
return /* @__PURE__ */ e(
|
|
154
|
-
/* @__PURE__ */ e(
|
|
155
|
-
/* @__PURE__ */ e(v.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(v.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${n}px` }, children: /* @__PURE__ */ e(
|
|
151
|
+
}, Z = ({ posts: t, showLabels: r, showIcons: i, height: n }) => {
|
|
152
|
+
const [l, o] = w(t ? t[0].slug : null);
|
|
153
|
+
return /* @__PURE__ */ e(C.Fragment, { children: /* @__PURE__ */ f(v, { stackable: !0, className: "tabbed posts", columns: t.length, style: { height: n + "px" }, children: [
|
|
154
|
+
/* @__PURE__ */ e(K, { showIcons: i, showLabels: r, posts: t, activeItem: l, setActive: o }),
|
|
155
|
+
/* @__PURE__ */ e(v.Row, { style: { height: `${n}px` }, children: /* @__PURE__ */ e(v.Column, { width: 16, className: "content", children: /* @__PURE__ */ e(b, { className: "content-tab", style: { height: `${n}px` }, children: /* @__PURE__ */ e(D, { className: "content-tab", posts: t, activeItem: l }) }) }) })
|
|
156
156
|
] }) });
|
|
157
|
-
},
|
|
158
|
-
var
|
|
157
|
+
}, ee = (t) => {
|
|
158
|
+
var T;
|
|
159
159
|
let {
|
|
160
|
-
"data-type":
|
|
160
|
+
"data-type": r,
|
|
161
161
|
"data-taxonomy": i,
|
|
162
162
|
"data-categories": n,
|
|
163
163
|
"data-items": l,
|
|
164
|
-
"data-theme":
|
|
164
|
+
"data-theme": o = "light",
|
|
165
165
|
"data-show-icons": a,
|
|
166
166
|
"data-use-scrolls": d,
|
|
167
167
|
"data-show-labels": m,
|
|
@@ -170,38 +170,48 @@ const Y = ({ posts: t, activeItem: o, setActive: i, showLabels: n }) => t ? t.ma
|
|
|
170
170
|
pageModuleProps: c,
|
|
171
171
|
parent: h,
|
|
172
172
|
editing: g,
|
|
173
|
-
unique:
|
|
173
|
+
unique: R
|
|
174
174
|
} = t;
|
|
175
175
|
c != null && c.previewMode && (c != null && c.editing) && (u = c.previewMode, g = c.editing);
|
|
176
|
-
const
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
const H = t.intl.locale;
|
|
177
|
+
let p = n;
|
|
178
|
+
if (Array.isArray(n))
|
|
179
|
+
p = n.join(",");
|
|
180
|
+
else if (typeof n == "string")
|
|
181
|
+
try {
|
|
182
|
+
const I = JSON.parse(n);
|
|
183
|
+
Array.isArray(I) && (p = I.join(","));
|
|
184
|
+
} catch {
|
|
185
|
+
}
|
|
186
|
+
const y = d === "true", _ = y ? s : void 0, { width: z } = U(), B = z <= 1024, F = u !== "Desktop" && g, G = B && !g;
|
|
187
|
+
return g && !r ? /* @__PURE__ */ e(b, { className: `viz tabbed posts ${g ? "editing" : ""} ${y ? "scrollable" : ""}`, fluid: !0 }) : /* @__PURE__ */ e(b, { className: `viz tabbed posts ${g ? "editing" : ""} ${y ? "scrollable" : ""}`, fluid: !0, children: /* @__PURE__ */ e(
|
|
188
|
+
E,
|
|
179
189
|
{
|
|
180
|
-
locale:
|
|
181
|
-
type:
|
|
190
|
+
locale: H,
|
|
191
|
+
type: r,
|
|
182
192
|
taxonomy: i,
|
|
183
|
-
categories:
|
|
184
|
-
store: `tabbedposts_${h}_${
|
|
193
|
+
categories: p,
|
|
194
|
+
store: `tabbedposts_${h}_${R}`,
|
|
185
195
|
page: 1,
|
|
186
196
|
perPage: l,
|
|
187
|
-
children: /* @__PURE__ */ e(
|
|
188
|
-
} }) :
|
|
189
|
-
|
|
197
|
+
children: /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(M, { children: G || F ? /* @__PURE__ */ e(Q, { posts: l, activeItem: (T = l[0]) == null ? void 0 : T.slug, setActive: () => {
|
|
198
|
+
} }) : o === "light" ? /* @__PURE__ */ e(X, { height: _, showLabels: m === "true" }) : /* @__PURE__ */ e(
|
|
199
|
+
Z,
|
|
190
200
|
{
|
|
191
|
-
height:
|
|
201
|
+
height: _,
|
|
192
202
|
showLabels: m === "true",
|
|
193
203
|
showIcons: a === "true"
|
|
194
204
|
}
|
|
195
205
|
) }) })
|
|
196
206
|
}
|
|
197
207
|
) });
|
|
198
|
-
},
|
|
208
|
+
}, te = (t, r) => {
|
|
199
209
|
const i = t.getIn([
|
|
200
210
|
"data",
|
|
201
211
|
"pageModuleProps"
|
|
202
212
|
]), n = {};
|
|
203
213
|
return i && (n.pageModuleProps = i), n;
|
|
204
|
-
},
|
|
214
|
+
}, ne = {}, ue = J(te, ne)(O(ee));
|
|
205
215
|
export {
|
|
206
|
-
|
|
216
|
+
ue as default
|
|
207
217
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useState as i, useRef as f, useCallback as g, useEffect as l } from "react";
|
|
3
3
|
import { useParams as w, useSearchParams as P } from "react-router";
|
|
4
4
|
import { Container as y, Segment as C } from "semantic-ui-react";
|
|
@@ -10,18 +10,18 @@ const b = () => {
|
|
|
10
10
|
), s = f(o);
|
|
11
11
|
s.current = o;
|
|
12
12
|
const n = g((u) => {
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
13
|
+
const t = u.data;
|
|
14
|
+
if (t.messageType && t.messageType === "component-attributes") {
|
|
15
15
|
const m = { ...s.current };
|
|
16
|
-
Object.keys(
|
|
17
|
-
m["data-" +
|
|
16
|
+
Object.keys(t).forEach((r) => {
|
|
17
|
+
m["data-" + r.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()] = typeof t[r] == "object" ? JSON.stringify(t[r]) : t[r];
|
|
18
18
|
}), d(m);
|
|
19
19
|
}
|
|
20
20
|
}, []);
|
|
21
21
|
return l(() => (window.addEventListener("message", n, !1), window.parent && window.parent.postMessage({ type: "componentReady", value: !0 }, "*"), window.top && window.top.postMessage({ type: "componentReady", value: !0 }, "*"), () => {
|
|
22
22
|
window.removeEventListener("message", n);
|
|
23
|
-
}), [n]), /* @__PURE__ */
|
|
24
|
-
},
|
|
23
|
+
}), [n]), /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(y, { fluid: !0, className: "editing", children: a ? /* @__PURE__ */ e(a, { ...o, editing: !0 }) : /* @__PURE__ */ e(C.Group, { color: "red", textAlign: "center", children: /* @__PURE__ */ e("h1", { children: "Wrong Component Name" }) }) }) });
|
|
24
|
+
}, L = () => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(b, {}) });
|
|
25
25
|
export {
|
|
26
|
-
|
|
26
|
+
L as default
|
|
27
27
|
};
|