@devgateway/dvz-ui-react 1.3.3 → 1.3.5
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.
- package/dist/cjs/conf/index.js +1 -1
- package/dist/cjs/embeddable/time-line/mobile.js +1 -1
- package/dist/cjs/layout/ClassicHeader.js +1 -0
- package/dist/cjs/layout/FloatingMenuHeader.js +1 -0
- package/dist/cjs/layout/Layout.js +1 -1
- package/dist/cjs/layout/SearchControl.js +1 -1
- package/dist/cjs/layout/index.js +1 -1
- package/dist/cjs/lib/react-intl-redux/providers/Provider.js +1 -1
- package/dist/esm/conf/index.js +4 -4
- package/dist/esm/embeddable/time-line/mobile.js +50 -40
- package/dist/esm/layout/ClassicHeader.js +116 -0
- package/dist/esm/layout/FloatingMenuHeader.js +73 -0
- package/dist/esm/layout/Layout.js +29 -27
- package/dist/esm/layout/SearchControl.js +18 -19
- package/dist/esm/layout/index.js +39 -22
- package/dist/esm/lib/react-intl-redux/providers/Provider.js +4 -4
- package/dist/types/dvz-ui/src/conf/index.d.ts +4 -4
- package/dist/types/dvz-ui/src/layout/index.d.ts +10 -0
- package/package.json +3 -3
package/dist/cjs/conf/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _={REACT_APP_WP_API:process.env.VITE_REACT_APP_WP_API
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _={REACT_APP_WP_API:process.env.VITE_REACT_APP_WP_API??"/wp/wp-json",REACT_APP_API_ROOT:process.env.VITE_REACT_APP_API_ROOT??"",GA_CODE:process.env.VITE_REACT_APP_GA_CODE??"",DEFAULT_LOCALE:process.env.VITE_REACT_APP_DEFAULT_LOCALE??"en"};exports.Config=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),rt=require("@devgateway/wp-react-lib"),mt=require("../connected-templates/PostIntro.js"),d=require("react"),A=require("semantic-ui-react"),bt=require("d3"),yt=require("../../lib/hooks/window-dimensions.js"),xt=require("../../lib/hooks/screen-orientation.js");require("../../utils/AppMedia.js");require("../../layout/Footer.js");require("../../layout/Header.js");require("react-router");require("../../
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),rt=require("@devgateway/wp-react-lib"),mt=require("../connected-templates/PostIntro.js"),d=require("react"),A=require("semantic-ui-react"),bt=require("d3"),yt=require("../../lib/hooks/window-dimensions.js"),xt=require("../../lib/hooks/screen-orientation.js");require("../../utils/AppMedia.js");require("../../layout/Footer.js");require("../../layout/Header.js");require("react-router");require("../index.js");require("react-intl");require("react-redux");require("../../conf/index.js");require("../../lib/react-intl-redux/providers/IntlProvider.js");require("../../lib/react-intl-redux/providers/Provider.js");require("immutable");require("../../redux/store.js");require("../../layout/Favicon.js");const Ct=require("../../layout/Loading.js");require("../../layout/CustomSemanticSearch.js");require("../../layout/SearchControl.js");require("../../layout/ClassicHeader.js");require("../../layout/FloatingMenuHeader.js");function wt(s){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const c in s)if(c!=="default"){const g=Object.getOwnPropertyDescriptor(s,c);Object.defineProperty(l,c,g.get?g:{enumerable:!0,get:()=>s[c]})}}return l.default=s,Object.freeze(l)}const h=wt(bt),qt={visibility:"visible",position:"relative",height:"auto",width:"auto"},vt=0,Tt=s=>{let{posts:l,lineWidth:c,lineColor:g,config:p,marginLeft:L,marginTop:z,marginRight:G,marginBottom:E,fontSize:w,subtitleWidth:N,subtitleHeight:q,enableTitlePopup:j,enableCirclePopup:$,enableDefaultPopup:J,closePopupOnMouseOut:V,unique:m}=s;N=250;const v=d.useRef(),O=d.useRef(),[S,y]=d.useState(!1),[D,M]=d.useState(0),[k,B]=d.useState(null),{orientation:x}=xt.useScreenOrientation(),{width:X,deviceType:b,height:W}=yt.useWindowDimensionsAndDevice({getDeviceType:!0,getHeight:!0}),F=d.useCallback(t=>`circle${m}${t}`,[m]),st=d.useCallback(t=>`title${m}${t}`,[m]),at=t=>{var o;return((o=p[t])==null?void 0:o.size)||10},ct=({content:t,isOpen:o,style:n})=>{const C=a=>(a=a.replace(/<ul(.*?)>/g,'<ul class="has-white-color has-text-color has-standard-14-font-size" style="list-style-type:disc !important; list-style: initial !important; padding-left:20px; color:#fefefe;">'),a=a.replace(/<a(.*?)>/g,'<a$1 style="color:#fefefe;">'),a);return r.jsxs(A.Modal,{open:o,onClose:()=>y(!1),size:"fullscreen",closeIcon:!0,centered:!0,style:{maxHeight:"80vh",overflowY:"auto",padding:"0.5rem",...n},children:[r.jsx(A.Modal.Header,{style:{...n,borderBottom:"none"}}),r.jsx(A.Modal.Content,{className:"styled-list-content",style:{...n},dangerouslySetInnerHTML:{__html:C(t.props.children.props.post.content.rendered)}})]},`${t.props.children.key}modal`)},Y=t=>{var o;return(o=p[t])==null?void 0:o.circleColor},K=t=>p[t].titleColor,Q=t=>p[t].lineColor,Z=t=>p[t].tooltipFontColor||"#fff",dt=t=>p[t].readMoreLabel,tt=d.useCallback((t,o)=>{t.preventDefault();const n=260,C=50;let a=[0,0];if(t){const T=t.target.getBoundingClientRect(),H=t.target.closest(".time").getBoundingClientRect(),u=T.left-H.left,P=T.top+H.top;a=[u+n,P+C];const I=400;T.left+u+I+n>window.innerWidth&&(a[0]=u-I*.6)}y(!0),B({data:o,id:o.id,position:a}),ft(o.id)},[]),ut=()=>{y(!1)},pt=t=>{h.selectAll(`#${F(t)}`).style("stroke","none").style("fill",Y(t)),h.selectAll(`#label${t}`).style("font-weight","normal")},ft=t=>{pt(vt),h.selectAll(`#${F(t)}`).style("stroke",Y(t)).style("fill","#fff"),h.selectAll(`#label${t}`).style("font-weight","bold")};return d.useLayoutEffect(()=>{var lt;const t={top:z,bottom:E},o=v.current.clientWidth,n=O.current.clientWidth;n>0&&M(n);const C=W,a={mobile:"75",tablet:"150",midTablet:"150",laptop:"150"},T={mobile:"250",tablet:"350",midTablet:"350",laptop:"400"},H={mobile:20,tablet:30,midTablet:30,laptop:40},u=h.scaleLinear().domain([0,l.length-1]).range([t.top,C-t.bottom]),P=h.select(v.current);P.selectAll("*").remove(),P.attr("width",o).attr("height",C);const I=h.line(),ht=[[0,u(0)],[0,u(l.length-1)]],gt=I(ht);let et=`translate(${a[b]},0)`;((lt=process.env.REACT_APP_THEME)==null?void 0:lt.startsWith("cd"))&&(et=`translate(${a[b]},20)`);const R=P.append("g").attr("transform",et);g="#E4E5EA",c=6,R.append("path").attr("d",gt).attr("stroke-width",c).attr("stroke",g).attr("class","timeline-path"),R.selectAll(".circle").data(l).enter().append("circle").attr("id",(i,e)=>F(e)).attr("cx",0).attr("class","timeline-circle").attr("cy",(i,e)=>u(e)).attr("r",(i,e)=>at(e)).style("fill",(i,e)=>{var f;return((f=p[e])==null?void 0:f.circleColor)||"#000"}).style("cursor",$?"pointer":"default").on("click",(i,e)=>{i.preventDefault(),$&&tt(i,e)}),R.selectAll(".title").data(l).enter().append("foreignObject").attr("x",H[b]).attr("y",(i,e)=>u(e)-Number.parseInt(q)/2).attr("width",Number.parseInt(T[b])).attr("height",Number.parseInt(q)).attr("class","timeline-title").append("xhtml:div").attr("id",(i,e)=>st(e)).style("font-size",`${Number.parseInt(w)+1}px`).style("color",(i,e)=>K(e)).style("font-weight","bold").style("line-height","1.2rem").style("text-align","left").style("cursor",j?"pointer":"default").style("overflow","hidden").style("display","-webkit-box").style("-webkit-line-clamp","2").style("-webkit-box-orient","vertical").style("text-overflow","ellipsis").style("overflow-wrap","break-word").html((i,e)=>{const f=dt(e);let _=i.title.rendered;return f&&(_+=`<br><span style="font-size:${Number.parseInt(w)-3}px;color:${K(e)};text-decoration:underline;text-underline-offset:3px">${f}</span>`),_}).each(function(i,e){const f=h.select(this.parentNode);setTimeout(()=>{const _=this.getBoundingClientRect(),nt=Math.min(_.height,Number.parseInt(q)*2);f.attr("height",nt),f.attr("y",u(e)-nt/2)},0)}).on("click",(i,e,f)=>{i.preventDefault(),j&&tt(i,e)});const it=+w+1,ot=60,U=it*.9;R.selectAll(".year-fo").data(l).enter().append("foreignObject").attr("class","year-fo").attr("x",-70).attr("y",(i,e)=>u(e)-U/2).attr("width",ot).attr("height",U).append("xhtml:div").style("display","flex").style("align-items","center").style("justify-content","flex-end").style("width",`${ot}px`).style("height",`${U}px`).style("font-size",`${it}px`).style("line-height","1em").style("font-weight","400").style("color","#4C4D50").html(i=>i.meta_fields.subtitle)},[b,x]),r.jsxs("div",{className:"time line",style:{position:"relative"},ref:O,children:[l.filter(t=>k&&k.id===t.id).map(t=>{const o=t.slug||"unknown-slug",n=l.indexOf(t);return r.jsx(ct,{isOpen:S,content:r.jsx("div",{style:{backgroundColor:Q(n),color:Z(n)},children:r.jsx(mt.default,{post:t,style:qt},o)}),closeTooltip:ut,style:{backgroundColor:Q(n),color:Z(n)}},`${o}_modal`)}),r.jsx("svg",{height:W,width:D,ref:v})]},m+b+x)},Pt=s=>{const{"data-type":l,"data-taxonomy":c,"data-categories":g,"data-items":p,"data-height":L,"data-line-color":z="#000","data-config":G="{}","data-position":E="middle","data-line-width":w="1","data-margin-left":N=50,"data-margin-top":q=25,"data-margin-right":j=50,"data-margin-bottom":$=25,"data-font-size":J=14,"data-title-width":V=100,"data-title-height":m=50,"data-subtitle-width":v=250,"data-subtitle-height":O=60,"data-enable-title-popup":S="false","data-enable-circle-popup":y="true","data-enable-default-popup":D="false","data-close-popup-on-mouse-out":M="false",editing:k,parent:B,unique:x}=s,X=s.intl.locale,W={unique:x||Math.random().toString(36).substring(2,9),marginLeft:N,marginTop:q,marginRight:j,marginBottom:$,lineWidth:w,height:L,position:E,lineColor:decodeURIComponent(z),config:JSON.parse(decodeURIComponent(G)),fontSize:J,titleWidth:V,titleHeight:m,subtitleWidth:v,subtitleHeight:O,enableTitlePopup:S==!0||S=="true",enableCirclePopup:y==!0||y=="true",enableDefaultPopup:D==!0||D=="true",closePopupOnMouseOut:M==!0||M=="true"};return r.jsx(A.Container,{style:{height:`${L}px`},className:`viz time line ${k?"editing":""}`,fluid:!0,children:r.jsx(rt.PostProvider,{locale:X,type:l,taxonomy:c,categories:g,store:`carousel_${B}_${x}`,page:1,perPage:p,children:r.jsx(rt.PostConsumer,{children:r.jsx(Tt,{...W})})})})},jt=s=>{const[l,c]=d.useState(!1);return d.useEffect(()=>{c(!0)},[]),l?r.jsx(Pt,{...s}):r.jsx(Ct.default,{})};exports.default=jt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),a=require("semantic-ui-react"),o=require("react"),d=require("@devgateway/wp-react-lib"),f=require("react-intl"),m=require("react-router"),w=require("./SearchControl.js"),N=require("./LangSwitcher.js"),I=(s,i)=>{const l=[];return s.items.forEach(t=>{t.child_items?t.child_items.forEach(n=>{n.slug==i.slug&&(l.push(t),l.push(n))}):t.slug==i.slug&&t.url!="/"&&l.push(t)}),l},k=(s,i)=>s?s.substr(s.indexOf("/wp")+3).startsWith("/"+i)?s.substr(s.indexOf("/wp")+3):"/"+i+s.substr(s.indexOf("/wp")+3):"",L=f.injectIntl(({menu:s,intl:i})=>{const l=m.useParams(),t=I(s,l);return e.jsx(o.Fragment,{children:t.filter(n=>n.url!="#wpm-languages").map(n=>n.child_items?e.jsxs("span",{children:[n.post_title," "]}):e.jsxs("a",{className:n.slug==l.slug?"active":"",href:d.utils.replaceLink(n.url,i.locale),children:[" ",n.post_title]}))})}),p=f.injectIntl(({settings:s,withIcons:i,active:l,menu:t,onSetSelected:n,selected:h,intl:{locale:x}})=>{const v=m.useParams();o.useEffect(()=>{if(!h){const u=I(t,v).filter(c=>c.menu_item_parent==0);u&&n(u[0])}},[t,n,h]);const[j,_]=o.useState(null);return o.useEffect(()=>{_(t)},[t]),o.useEffect(()=>{if(s&&s.menu_settings&&j){const r=[],u=t.items.map(c=>(s.menu_settings&&s.menu_settings["nav_menu_item["+c.ID+"]"]===!1&&r.push(c.ID),s.menu_settings&&s.menu_settings["nav_menu_item["+c.ID+"]"]?(s.menu_settings["nav_menu_item["+c.ID+"]"],{...c,...s.menu_settings["nav_menu_item["+c.ID+"]"]}):c));Object.keys(s.menu_settings).map(c=>{const g=s.menu_settings[c];if(g.type=="nav_menu_item"){const M=/(-)?[0-9]+/g.exec(c),b=parseInt(M[0]);u.find(C=>C.ID==b)||u.push(g.value)}}),_({...t,items:u.filter(c=>r.indexOf(c.ID)===-1)})}},[s]),j&&e.jsx(o.Fragment,{children:j.items.filter(r=>r.url!="#wpm-languages").map(r=>e.jsx(a.Menu.Item,{as:m.Link,className:`divided ${r.child_items?"has-child-items":""} ${h&&h.ID==r.ID?"selected":""} ${l==r.slug?"active":""}`,children:r.child_items?e.jsx("span",{onClick:u=>n(r),children:r.title}):e.jsx(m.Link,{onClick:u=>n(r),to:r.type==="custom"?d.utils.replaceLink(r.url,x):k(r.url,x),children:r.title})}))})}),D=({intl:s,settings:i})=>{const[l,t]=o.useState(),{slug:n}=m.useParams(),h=({media:x})=>x?e.jsx(a.Image,{src:x.guid.rendered}):e.jsx("img",{className:"brand logo",size:"large",src:"/logo_full.png"});return e.jsx(o.Fragment,{children:e.jsxs(d.MenuProvider,{slug:"main",locale:s.locale,children:[e.jsxs(a.Container,{fluid:!0,className:"header classic",children:[e.jsx(a.Container,{fluid:!0,className:"background",children:e.jsxs(a.Menu,{className:"branding",text:!0,children:[e.jsx(a.Menu.Item,{children:e.jsxs(m.NavLink,{to:"/",children:[i.site_logo!=0&&e.jsx(d.MediaProvider,{id:i.site_logo,children:e.jsx(d.MediaConsumer,{children:e.jsx(h,{})})}),!window.isCustomizedPreview&&i.site_logo==0&&e.jsx("img",{className:"brand logo",size:"large",src:"/dc-logo_01.png"})]})}),e.jsx(a.Menu.Item,{className:"divider",children:e.jsx("div",{})}),e.jsx(a.Menu.Item,{as:m.Link,fitted:!0,href:"/",children:e.jsx("div",{className:"site name",children:i.name})}),e.jsx(a.Menu.Menu,{className:"pages",children:e.jsx(d.MenuConsumer,{children:e.jsx(p,{settings:i,active:n,selected:l,onSetSelected:t})})}),e.jsx(a.Menu.Item,{children:e.jsx(d.MenuConsumer,{children:e.jsx(N.default,{locale:s.locale})})}),e.jsx(a.Menu.Item,{fitted:!0,children:e.jsx(w.default,{})})]})}),e.jsx(a.Container,{fluid:!0,className:"child",children:l&&l.child_items&&e.jsx(a.Menu,{fluid:!0,text:!0,children:e.jsx(p,{active:n,locale:s.locale,withIcons:!0,onSetSelected:x=>null,menu:{items:l.child_items}})})})]}),e.jsx(a.Container,{className:"url breadcrumbs",children:e.jsx(d.MenuConsumer,{children:e.jsx(L,{})})})]})})},q=f.injectIntl(D);exports.default=q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),n=require("semantic-ui-react"),x=require("react"),l=require("@devgateway/wp-react-lib"),g=require("react-intl"),j=require("./SearchControl.js"),f=require("./LangSwitcher.js"),p=require("react-router"),h=(s,r)=>s?s.substr(s.indexOf("/wp")+3).startsWith("/"+r)?s.substr(s.indexOf("/wp")+3):"/"+r+s.substr(s.indexOf("/wp")+3):"",M=s=>{const{settings:r,withIcons:u,active:d,menu:o,onSetSelected:a,selected:i,locale:m}=s;return o.items.filter(t=>t.url!="#wpm-languages").map(t=>e.jsxs(n.Menu.Item,{className:`divided ${t.child_items?"has-child-items":""} ${i&&i.ID==t.ID?"selected":""} ${d==t.slug?"active":""}`,children:[!t.child_items&&e.jsx("a",{onClick:c=>a(t),href:h(t.url,m),children:t.title}),t.child_items&&e.jsx(n.Popup,{position:"top center",className:"floating child",positionFixed:!0,hoverable:!0,trigger:e.jsx("span",{children:t.title}),children:t.child_items.map(c=>e.jsxs(n.Menu.Item,{children:[c.icon&&e.jsx("img",{className:"child icon",src:c.icon.url}),e.jsxs("span",{children:[" ",e.jsx("a",{onClick:w=>a(t),href:h(c.url,m),children:c.title})]})]}))})]}))},I=({intl:{locale:s},settings:r})=>{const[u,d]=x.useState(),{slug:o}=p.useParams(),a=({media:i})=>i?e.jsx(n.Image,{src:i.guid.rendered}):e.jsx("img",{className:"brand logo",size:"large",src:"/logo_full.png"});return e.jsx(l.MenuProvider,{slug:"main",locale:s,children:e.jsxs(n.Menu,{className:"header floating branding",text:!0,children:[e.jsx(n.Menu.Item,{className:"logo",children:e.jsxs("a",{href:`/${s}`,children:[r.site_logo!=0&&e.jsx(l.MediaProvider,{id:r.site_logo,children:e.jsx(l.MediaConsumer,{children:e.jsx(a,{})})}),!window.isCustomizedPreview&&r.site_logo==0&&e.jsx("img",{className:"brand logo",size:"large",src:"/dc-logo_01.png"})]})}),e.jsx(n.Menu.Item,{className:"divider",children:e.jsx("div",{})}),e.jsx(n.Menu.Item,{className:"site name",fitted:!0,href:"/",children:r.name}),e.jsx(n.Menu.Item,{className:"pages",children:e.jsx(l.MenuConsumer,{children:e.jsx(M,{settings:r,active:o,selected:u,onSetSelected:d,locale:s})})}),e.jsx(n.Menu.Item,{className:"lang switcher",children:e.jsx(l.MenuConsumer,{children:e.jsx(f.default,{locale:s})})}),e.jsx(n.Menu.Item,{fitted:!0,children:e.jsx(j.default,{})})]})})},v=g.injectIntl(I);exports.default=v;
|
|
@@ -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 t=require("react/jsx-runtime"),s=require("react"),r=require("react-router"),f=require("../embeddable/index.js"),m=require("react-intl"),n=require("@devgateway/wp-react-lib"),g=require("react-redux");require("semantic-ui-react");require("../utils/AppMedia.js");require("./Footer.js");require("./Header.js");const p=require("./Customizer.js"),h=require("../conf/index.js"),x=require("../translations/en.json.js"),v=require("../translations/fr.json.js"),j=require("../translations/af.json.js"),C=require("../lib/react-intl-redux/index.js");require("immutable");const i=require("../redux/store.js");require("./Favicon.js");require("./CustomSemanticSearch.js");require("./SearchControl.js");require("./ClassicHeader.js");require("./FloatingMenuHeader.js");const c={en:x,fr:v,am:j},w=()=>{const u=r.useParams(),l=r.useLocation(),o=h.Config.DEFAULT_LOCALE,[I,d]=s.useState(!1);console.log("defaultLocale",o);const e=u.lan,q=l.pathname;return console.log("pathParams",JSON.stringify(u.lan)),s.useEffect(()=>{d(!0),process.env.NODE_ENV==="development"&&(console.log("----------.env-----------"),console.log(process.env),console.log("----------.env-----------")),typeof window<"u"&&window.setTimeout(()=>{if(window.location.hash){const a=document.getElementById(window.location.hash.substring(1));a&&a.scrollIntoView({behavior:"auto",block:"start"})}},2e3)},[]),s.useEffect(()=>{i.store.dispatch(C.updateIntl({locale:e,formats:{},messages:c[e??"en"]}))},[e]),e?Object.keys(c).includes(e)?t.jsx(g.Provider,{store:i.store,children:t.jsx(m.IntlProvider,{locale:e,messages:c[e],children:t.jsx(n.AppContextProvider,{getComponent:f.getComponentByNameIgnoreCase,store:i.store,locale:e,children:t.jsx(n.SettingProvider,{locale:e,changeUUID:null,children:t.jsxs(n.SettingsConsumer,{children:[t.jsx(p.CustomizerWrapper,{}),t.jsx(r.Outlet,{})]})})})},e)}):t.jsx(r.Navigate,{to:`/${o}${q}`,replace:!0}):t.jsx(r.Navigate,{to:o,replace:!0})};exports.default=w;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),m=require("@devgateway/wp-react-lib"),I=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("react"),m=require("@devgateway/wp-react-lib"),I=require("react-dom"),M=require("semantic-ui-react"),v=require("react-intl"),j=(n,r)=>{if(!r)return n;const a=new RegExp(`(${r})`,"gi");return n.replace(a,"<strong>$1</strong>")},w=v.injectIntl(({ID:n,title:r,slug:a,parent_title:i,parent_slug:t,parent_link:c,extract:o,type:h,link:l,terms:f,subtype:g,bread_crumbs:s=[],metadata:{redirect_url:p},intl:{locale:x},searchTerm:u})=>{let S=c?m.utils.replaceLink(c,x)+`#${a}`:m.utils.replaceLink(l,x);S=p?p+`#${a}`:S;const y=j(String(r),u),R=j(o,u);return e.jsx("div",{className:"search-results-wrapper searching-results",style:{display:"flex",flexDirection:"column"},children:e.jsxs("div",{className:"has-standard-12-font-size",onClick:T=>document.location.href=S,children:[e.jsx("h5",{className:"breadcrumbs-search",dangerouslySetInnerHTML:{__html:s&&s.length>0?j(s.join(" / "),u):""}}),e.jsx("div",{className:"has-standard-14-font-size",children:e.jsx("h4",{className:"search-title",dangerouslySetInnerHTML:{__html:y}})}),e.jsx("div",{className:"search-content",dangerouslySetInnerHTML:{__html:m.utils.replaceHTMLinks(R,x)}})]})})}),N=({results:n,meta:r,perPage:a,intl:i,searchTerm:t})=>{const c=r?r["x-wp-total"]:0;return r&&r["x-wp-totalpages"],e.jsxs("div",{id:"float-results-container",children:[e.jsx("span",{className:"float-results-header",children:i.formatMessage({id:"search.results.summary",defaultMessage:"{count} of {total} Results"},{count:c<a?c:a,total:c})}),n.map(o=>e.jsx(w,{...o,searchTerm:t},o.ID))]})},C=({onSearch:n,perPage:r,loading:a,results:i,meta:t,intl:c})=>(t&&t["x-wp-total"],t&&t["x-wp-totalpages"],e.jsx("input",{placeholder:c.formatMessage({id:"search.placeholder",defaultMessage:"Search..."}),type:"text",className:"input search",name:"search",onChange:o=>{n(o.target.value)}})),E=({onSearch:n,onSetSelected:r,perPage:a,loading:i,results:t,meta:c,locale:o,intl:h,searchTerm:l})=>{const[f,g]=d.useState(!1),s=d.useRef(null);d.useEffect(()=>{const u=document.createElement("div");u.setAttribute("id","float-input-container"),u.setAttribute("class","input container"),u.style.display="none";const S=document.getElementById("root");return S&&(S.appendChild(u),s.current=u),()=>{s.current&&s.current.parentNode&&s.current.parentNode.removeChild(s.current)}},[]),d.useEffect(()=>{s.current&&(s.current.style.display=f?"block":"none")},[f]);const p=()=>{r(null),g(!0)},x=()=>{g(!1)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{id:"ui-float-search",className:"ui float-search",onMouseOver:p,children:e.jsx(M.Icon,{name:"search",size:"small"})}),s.current&&I.createPortal(f?e.jsxs("div",{onMouseLeave:x,children:[e.jsx("div",{className:"float-search-container",children:e.jsx(C,{onSearch:n,perPage:a,loading:i,results:t,meta:c,intl:h,searchTerm:l})}),t&&t.length>0&&e.jsx(v.IntlProvider,{locale:o,children:e.jsx(N,{results:t,meta:c,perPage:a,intl:h,searchTerm:l})})]}):null,s.current)]})},L=({onSearch:n,perPage:r,loading:a,results:i,meta:t,intl:c})=>{const o=t?t["x-wp-total"]:0,h=t?t["x-wp-totalpages"]:0,[l,f]=d.useState("");d.useEffect(()=>{const s=setTimeout(()=>{n(l)},300);return()=>clearTimeout(s)},[l]);const g=s=>e.jsx(w,{...s,searchTerm:l});return e.jsx(CustomSemanticSearch,{value:l,loading:a,placeholder:c.formatMessage({id:"search.placeholder",defaultMessage:"Search..."}),onResultSelect:(s,p)=>null,total:o,perPage:r,totalPages:h,onSearchChange:(s,p)=>{f(p.value)},resultRenderer:g,results:i,showNoResults:!1,intl:c,searchTerm:l})},b=v.injectIntl(n=>{const{intl:r,onSetSelected:a}=n,[i,t]=d.useState(""),[c,o]=d.useState(!1);d.useEffect(()=>{const l=()=>{o(window.innerWidth<=1365)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]);const h=n.settings.react_search_type==="floating"||c?e.jsx(E,{onSetSelected:a,onSearch:t,perPage:5,...n,searchTerm:i}):e.jsx(L,{onSetSelected:a,onSearch:t,perPage:5,...n});return e.jsx(m.SearchProvider,{search:i,perPage:5,locale:r.locale,children:e.jsx(m.SearchConsumer,{children:h})})});exports.default=b;
|
package/dist/cjs/layout/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ResponsiveContainer.js"),r=require("./ScrollTop.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./ResponsiveContainer.js"),r=require("./ScrollTop.js"),t=require("./containers/PreviewPageContainer.js"),o=require("./containers/PreviewTypeContainer.js"),a=require("./containers/SlugContainer.js"),n=require("./containers/SlugPostContainer.js"),u=require("./Customizer.js"),i=require("./Layout.js"),l=require("./PreviewComponent.js"),c=require("./Favicon.js"),s=require("./SSRFavicon.js"),d=require("./Loading.js"),f=require("./CustomSemanticSearch.js"),C=require("./Header.js"),q=require("./SearchControl.js"),S=require("./LangSwitcher.js"),p=require("./Footer.js"),g=require("./ClassicHeader.js"),v=require("./FlexWrapDetector.js"),P=require("./FloatingMenuHeader.js");exports.ResponsiveContainer=e.default;exports.default=e.default;exports.ScrollToTop=r.default;exports.PreviewPageContainer=t.default;exports.PreviewTypeContainer=o.default;exports.SlugContainer=a.default;exports.SlugPostContainer=n.default;exports.CustomizerWrapper=u.CustomizerWrapper;exports.RootLayout=i.default;exports.PreviewComponent=l.default;exports.Favicon=c.default;exports.SSRFavicon=s.default;exports.Loading=d.default;exports.CustomSemanticSearch=f.default;exports.Header=C.default;exports.SearchControl=q.default;exports.LangSwitcher=S.default;exports.Footer=p.default;exports.ClassicHeader=g.default;exports.FlexWrapDetector=v.default;exports.FloatingMenuHeader=P.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react-redux"),i=require("prop-types"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react-redux"),i=require("prop-types"),n=require("./IntlProvider.js"),u=process.env.VITE_REACT_APP_DEFAULT_LOCALE??"en",r=({store:t,children:o})=>e.jsx(s.Provider,{store:t,children:e.jsx(n.default,{locale:u,children:o})});r.propTypes={children:i.element.isRequired};exports.default=r;
|
package/dist/esm/conf/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const _ = {
|
|
2
|
-
REACT_APP_WP_API: process.env.VITE_REACT_APP_WP_API
|
|
3
|
-
REACT_APP_API_ROOT: process.env.VITE_REACT_APP_API_ROOT,
|
|
4
|
-
GA_CODE: process.env.VITE_REACT_APP_GA_CODE,
|
|
5
|
-
DEFAULT_LOCALE: process.env.VITE_REACT_APP_DEFAULT_LOCALE
|
|
2
|
+
REACT_APP_WP_API: process.env.VITE_REACT_APP_WP_API ?? "/wp/wp-json",
|
|
3
|
+
REACT_APP_API_ROOT: process.env.VITE_REACT_APP_API_ROOT ?? "",
|
|
4
|
+
GA_CODE: process.env.VITE_REACT_APP_GA_CODE ?? "",
|
|
5
|
+
DEFAULT_LOCALE: process.env.VITE_REACT_APP_DEFAULT_LOCALE ?? "en"
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
_ as Config
|
|
@@ -3,26 +3,36 @@ import { PostProvider as bt, PostConsumer as Ct } from "@devgateway/wp-react-lib
|
|
|
3
3
|
import xt from "../connected-templates/PostIntro.js";
|
|
4
4
|
import { useState as z, useEffect as wt, useRef as st, useCallback as G, useLayoutEffect as Tt } from "react";
|
|
5
5
|
import { Container as vt, Modal as U } from "semantic-ui-react";
|
|
6
|
-
import * as
|
|
6
|
+
import * as d from "d3";
|
|
7
7
|
import { useWindowDimensionsAndDevice as Pt } from "../../lib/hooks/window-dimensions.js";
|
|
8
8
|
import { useScreenOrientation as $t } from "../../lib/hooks/screen-orientation.js";
|
|
9
9
|
import "../../utils/AppMedia.js";
|
|
10
10
|
import "../../layout/Footer.js";
|
|
11
11
|
import "../../layout/Header.js";
|
|
12
12
|
import "react-router";
|
|
13
|
-
import "../../layout/Layout.js";
|
|
14
13
|
import "../index.js";
|
|
14
|
+
import "react-intl";
|
|
15
|
+
import "react-redux";
|
|
16
|
+
import "../../conf/index.js";
|
|
17
|
+
import "../../lib/react-intl-redux/providers/IntlProvider.js";
|
|
18
|
+
import "../../lib/react-intl-redux/providers/Provider.js";
|
|
19
|
+
import "immutable";
|
|
20
|
+
import "../../redux/store.js";
|
|
15
21
|
import "../../layout/Favicon.js";
|
|
16
22
|
import Dt from "../../layout/Loading.js";
|
|
23
|
+
import "../../layout/CustomSemanticSearch.js";
|
|
24
|
+
import "../../layout/SearchControl.js";
|
|
25
|
+
import "../../layout/ClassicHeader.js";
|
|
26
|
+
import "../../layout/FloatingMenuHeader.js";
|
|
17
27
|
const Wt = {
|
|
18
28
|
visibility: "visible",
|
|
19
29
|
position: "relative",
|
|
20
30
|
height: "auto",
|
|
21
31
|
width: "auto"
|
|
22
|
-
}, Ht = 0, It = (
|
|
32
|
+
}, Ht = 0, It = (f) => {
|
|
23
33
|
let {
|
|
24
34
|
posts: a,
|
|
25
|
-
lineWidth:
|
|
35
|
+
lineWidth: h,
|
|
26
36
|
lineColor: P,
|
|
27
37
|
config: c,
|
|
28
38
|
marginLeft: N,
|
|
@@ -37,15 +47,15 @@ const Wt = {
|
|
|
37
47
|
enableDefaultPopup: V,
|
|
38
48
|
closePopupOnMouseOut: X,
|
|
39
49
|
unique: u
|
|
40
|
-
} =
|
|
50
|
+
} = f;
|
|
41
51
|
B = 250;
|
|
42
|
-
const w = st(), W = st(), [H, g] = z(!1), [I, O] = z(0), [S, j] = z(null), { orientation: y } = $t(), { width: Y, deviceType:
|
|
52
|
+
const w = st(), W = st(), [H, g] = z(!1), [I, O] = z(0), [S, j] = z(null), { orientation: y } = $t(), { width: Y, deviceType: m, height: k } = Pt({
|
|
43
53
|
getDeviceType: !0,
|
|
44
54
|
getHeight: !0
|
|
45
|
-
}), F = G((t) => `circle${u}${t}`, [u]), ct = G((t) => `title${u}${t}`, [u]),
|
|
55
|
+
}), F = G((t) => `circle${u}${t}`, [u]), ct = G((t) => `title${u}${t}`, [u]), pt = (t) => {
|
|
46
56
|
var i;
|
|
47
57
|
return ((i = c[t]) == null ? void 0 : i.size) || 10;
|
|
48
|
-
},
|
|
58
|
+
}, dt = ({ content: t, isOpen: i, style: l }) => {
|
|
49
59
|
const b = (n) => (n = n.replace(
|
|
50
60
|
/<ul(.*?)>/g,
|
|
51
61
|
'<ul class="has-white-color has-text-color has-standard-14-font-size" style="list-style-type:disc !important; list-style: initial !important; padding-left:20px; color:#fefefe;">'
|
|
@@ -95,13 +105,13 @@ const Wt = {
|
|
|
95
105
|
const M = 400;
|
|
96
106
|
T.left + s + M + l > window.innerWidth && (n[0] = s - M * 0.6);
|
|
97
107
|
}
|
|
98
|
-
g(!0), j({ data: i, id: i.id, position: n }),
|
|
99
|
-
}, []),
|
|
108
|
+
g(!0), j({ data: i, id: i.id, position: n }), ht(i.id);
|
|
109
|
+
}, []), mt = () => {
|
|
100
110
|
g(!1);
|
|
111
|
+
}, ft = (t) => {
|
|
112
|
+
d.selectAll(`#${F(t)}`).style("stroke", "none").style("fill", K(t)), d.selectAll(`#label${t}`).style("font-weight", "normal");
|
|
101
113
|
}, ht = (t) => {
|
|
102
|
-
|
|
103
|
-
}, mt = (t) => {
|
|
104
|
-
ht(Ht), p.selectAll(`#${F(t)}`).style("stroke", K(t)).style("fill", "#fff"), p.selectAll(`#label${t}`).style("font-weight", "bold");
|
|
114
|
+
ft(Ht), d.selectAll(`#${F(t)}`).style("stroke", K(t)).style("fill", "#fff"), d.selectAll(`#label${t}`).style("font-weight", "bold");
|
|
105
115
|
};
|
|
106
116
|
return Tt(() => {
|
|
107
117
|
var nt;
|
|
@@ -125,41 +135,41 @@ const Wt = {
|
|
|
125
135
|
tablet: 30,
|
|
126
136
|
midTablet: 30,
|
|
127
137
|
laptop: 40
|
|
128
|
-
}, s =
|
|
138
|
+
}, s = d.scaleLinear().domain([0, a.length - 1]).range([t.top, b - t.bottom]), v = d.select(w.current);
|
|
129
139
|
v.selectAll("*").remove(), v.attr("width", i).attr("height", b);
|
|
130
|
-
const M =
|
|
140
|
+
const M = d.line(), gt = [
|
|
131
141
|
[0, s(0)],
|
|
132
142
|
[0, s(a.length - 1)]
|
|
133
143
|
], yt = M(gt);
|
|
134
|
-
let ot = `translate(${n[
|
|
135
|
-
((nt = process.env.REACT_APP_THEME) == null ? void 0 : nt.startsWith("cd")) && (ot = `translate(${n[
|
|
144
|
+
let ot = `translate(${n[m]},0)`;
|
|
145
|
+
((nt = process.env.REACT_APP_THEME) == null ? void 0 : nt.startsWith("cd")) && (ot = `translate(${n[m]},20)`);
|
|
136
146
|
const E = v.append("g").attr("transform", ot);
|
|
137
|
-
P = "#E4E5EA",
|
|
138
|
-
var
|
|
139
|
-
return ((
|
|
147
|
+
P = "#E4E5EA", h = 6, E.append("path").attr("d", yt).attr("stroke-width", h).attr("stroke", P).attr("class", "timeline-path"), E.selectAll(".circle").data(a).enter().append("circle").attr("id", (o, e) => F(e)).attr("cx", 0).attr("class", "timeline-circle").attr("cy", (o, e) => s(e)).attr("r", (o, e) => pt(e)).style("fill", (o, e) => {
|
|
148
|
+
var p;
|
|
149
|
+
return ((p = c[e]) == null ? void 0 : p.circleColor) || "#000";
|
|
140
150
|
}).style("cursor", D ? "pointer" : "default").on("click", (o, e) => {
|
|
141
151
|
o.preventDefault(), D && et(o, e);
|
|
142
|
-
}), E.selectAll(".title").data(a).enter().append("foreignObject").attr("x", A[
|
|
143
|
-
const
|
|
152
|
+
}), E.selectAll(".title").data(a).enter().append("foreignObject").attr("x", A[m]).attr("y", (o, e) => s(e) - Number.parseInt(x) / 2).attr("width", Number.parseInt(T[m])).attr("height", Number.parseInt(x)).attr("class", "timeline-title").append("xhtml:div").attr("id", (o, e) => ct(e)).style("font-size", `${Number.parseInt(C) + 1}px`).style("color", (o, e) => Q(e)).style("font-weight", "bold").style("line-height", "1.2rem").style("text-align", "left").style("cursor", $ ? "pointer" : "default").style("overflow", "hidden").style("display", "-webkit-box").style("-webkit-line-clamp", "2").style("-webkit-box-orient", "vertical").style("text-overflow", "ellipsis").style("overflow-wrap", "break-word").html((o, e) => {
|
|
153
|
+
const p = ut(e);
|
|
144
154
|
let L = o.title.rendered;
|
|
145
|
-
return
|
|
155
|
+
return p && (L += `<br><span style="font-size:${Number.parseInt(C) - 3}px;color:${Q(
|
|
146
156
|
e
|
|
147
|
-
)};text-decoration:underline;text-underline-offset:3px">${
|
|
157
|
+
)};text-decoration:underline;text-underline-offset:3px">${p}</span>`), L;
|
|
148
158
|
}).each(function(o, e) {
|
|
149
|
-
const
|
|
159
|
+
const p = d.select(this.parentNode);
|
|
150
160
|
setTimeout(() => {
|
|
151
161
|
const L = this.getBoundingClientRect(), rt = Math.min(
|
|
152
162
|
L.height,
|
|
153
163
|
Number.parseInt(x) * 2
|
|
154
164
|
);
|
|
155
|
-
|
|
165
|
+
p.attr("height", rt), p.attr("y", s(e) - rt / 2);
|
|
156
166
|
}, 0);
|
|
157
|
-
}).on("click", (o, e,
|
|
167
|
+
}).on("click", (o, e, p) => {
|
|
158
168
|
o.preventDefault(), $ && et(o, e);
|
|
159
169
|
});
|
|
160
170
|
const it = +C + 1, lt = 60, q = it * 0.9;
|
|
161
171
|
E.selectAll(".year-fo").data(a).enter().append("foreignObject").attr("class", "year-fo").attr("x", -70).attr("y", (o, e) => s(e) - q / 2).attr("width", lt).attr("height", q).append("xhtml:div").style("display", "flex").style("align-items", "center").style("justify-content", "flex-end").style("width", `${lt}px`).style("height", `${q}px`).style("font-size", `${it}px`).style("line-height", "1em").style("font-weight", "400").style("color", "#4C4D50").html((o) => o.meta_fields.subtitle);
|
|
162
|
-
}, [
|
|
172
|
+
}, [m, y]), /* @__PURE__ */ at(
|
|
163
173
|
"div",
|
|
164
174
|
{
|
|
165
175
|
className: "time line",
|
|
@@ -169,7 +179,7 @@ const Wt = {
|
|
|
169
179
|
a.filter((t) => S && S.id === t.id).map((t) => {
|
|
170
180
|
const i = t.slug || "unknown-slug", l = a.indexOf(t);
|
|
171
181
|
return /* @__PURE__ */ r(
|
|
172
|
-
|
|
182
|
+
dt,
|
|
173
183
|
{
|
|
174
184
|
isOpen: H,
|
|
175
185
|
content: /* @__PURE__ */ r(
|
|
@@ -189,7 +199,7 @@ const Wt = {
|
|
|
189
199
|
)
|
|
190
200
|
}
|
|
191
201
|
),
|
|
192
|
-
closeTooltip:
|
|
202
|
+
closeTooltip: mt,
|
|
193
203
|
style: {
|
|
194
204
|
backgroundColor: Z(l),
|
|
195
205
|
color: tt(l)
|
|
@@ -201,12 +211,12 @@ const Wt = {
|
|
|
201
211
|
/* @__PURE__ */ r("svg", { height: k, width: I, ref: w })
|
|
202
212
|
]
|
|
203
213
|
},
|
|
204
|
-
u +
|
|
214
|
+
u + m + y
|
|
205
215
|
);
|
|
206
|
-
}, Ot = (
|
|
216
|
+
}, Ot = (f) => {
|
|
207
217
|
const {
|
|
208
218
|
"data-type": a,
|
|
209
|
-
"data-taxonomy":
|
|
219
|
+
"data-taxonomy": h,
|
|
210
220
|
"data-categories": P,
|
|
211
221
|
"data-items": c,
|
|
212
222
|
"data-height": N,
|
|
@@ -230,7 +240,7 @@ const Wt = {
|
|
|
230
240
|
editing: S,
|
|
231
241
|
parent: j,
|
|
232
242
|
unique: y
|
|
233
|
-
} =
|
|
243
|
+
} = f, Y = f.intl.locale, k = {
|
|
234
244
|
unique: y || Math.random().toString(36).substring(2, 9),
|
|
235
245
|
marginLeft: B,
|
|
236
246
|
marginTop: x,
|
|
@@ -262,7 +272,7 @@ const Wt = {
|
|
|
262
272
|
{
|
|
263
273
|
locale: Y,
|
|
264
274
|
type: a,
|
|
265
|
-
taxonomy:
|
|
275
|
+
taxonomy: h,
|
|
266
276
|
categories: P,
|
|
267
277
|
store: `carousel_${j}_${y}`,
|
|
268
278
|
page: 1,
|
|
@@ -272,12 +282,12 @@ const Wt = {
|
|
|
272
282
|
)
|
|
273
283
|
}
|
|
274
284
|
);
|
|
275
|
-
},
|
|
276
|
-
const [a,
|
|
285
|
+
}, ie = (f) => {
|
|
286
|
+
const [a, h] = z(!1);
|
|
277
287
|
return wt(() => {
|
|
278
|
-
|
|
279
|
-
}, []), a ? /* @__PURE__ */ r(Ot, { ...
|
|
288
|
+
h(!0);
|
|
289
|
+
}, []), a ? /* @__PURE__ */ r(Ot, { ...f }) : /* @__PURE__ */ r(Dt, {});
|
|
280
290
|
};
|
|
281
291
|
export {
|
|
282
|
-
|
|
292
|
+
ie as default
|
|
283
293
|
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as a, Container as h, Image as j } from "semantic-ui-react";
|
|
3
|
+
import I, { useEffect as p, useState as M } from "react";
|
|
4
|
+
import { utils as C, MenuProvider as S, MediaProvider as y, MediaConsumer as z, MenuConsumer as _ } from "@devgateway/wp-react-lib";
|
|
5
|
+
import { injectIntl as v } from "react-intl";
|
|
6
|
+
import { useParams as x, Link as g, NavLink as E } from "react-router";
|
|
7
|
+
import F from "./SearchControl.js";
|
|
8
|
+
import $ from "./LangSwitcher.js";
|
|
9
|
+
const D = (r, l) => {
|
|
10
|
+
const i = [];
|
|
11
|
+
return r.items.forEach((s) => {
|
|
12
|
+
s.child_items ? s.child_items.forEach((t) => {
|
|
13
|
+
t.slug == l.slug && (i.push(s), i.push(t));
|
|
14
|
+
}) : s.slug == l.slug && s.url != "/" && i.push(s);
|
|
15
|
+
}), i;
|
|
16
|
+
}, H = (r, l) => r ? r.substr(r.indexOf("/wp") + 3).startsWith("/" + l) ? r.substr(r.indexOf("/wp") + 3) : "/" + l + r.substr(r.indexOf("/wp") + 3) : "", R = v(({ menu: r, intl: l }) => {
|
|
17
|
+
const i = x(), s = D(r, i);
|
|
18
|
+
return /* @__PURE__ */ e(I.Fragment, { children: s.filter((t) => t.url != "#wpm-languages").map((t) => t.child_items ? /* @__PURE__ */ m("span", { children: [
|
|
19
|
+
t.post_title,
|
|
20
|
+
" "
|
|
21
|
+
] }) : /* @__PURE__ */ m(
|
|
22
|
+
"a",
|
|
23
|
+
{
|
|
24
|
+
className: t.slug == i.slug ? "active" : "",
|
|
25
|
+
href: C.replaceLink(t.url, l.locale),
|
|
26
|
+
children: [
|
|
27
|
+
" ",
|
|
28
|
+
t.post_title
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
)) });
|
|
32
|
+
}), w = v(({
|
|
33
|
+
settings: r,
|
|
34
|
+
withIcons: l,
|
|
35
|
+
active: i,
|
|
36
|
+
menu: s,
|
|
37
|
+
onSetSelected: t,
|
|
38
|
+
selected: u,
|
|
39
|
+
intl: { locale: d }
|
|
40
|
+
}) => {
|
|
41
|
+
const k = x();
|
|
42
|
+
p(() => {
|
|
43
|
+
if (!u) {
|
|
44
|
+
const o = D(s, k).filter((c) => c.menu_item_parent == 0);
|
|
45
|
+
o && t(o[0]);
|
|
46
|
+
}
|
|
47
|
+
}, [s, t, u]);
|
|
48
|
+
const [f, N] = M(null);
|
|
49
|
+
return p(() => {
|
|
50
|
+
N(s);
|
|
51
|
+
}, [s]), p(() => {
|
|
52
|
+
if (r && r.menu_settings && f) {
|
|
53
|
+
const n = [], o = s.items.map((c) => (r.menu_settings && r.menu_settings["nav_menu_item[" + c.ID + "]"] === !1 && n.push(c.ID), r.menu_settings && r.menu_settings["nav_menu_item[" + c.ID + "]"] ? (r.menu_settings["nav_menu_item[" + c.ID + "]"], { ...c, ...r.menu_settings["nav_menu_item[" + c.ID + "]"] }) : c));
|
|
54
|
+
Object.keys(r.menu_settings).map((c) => {
|
|
55
|
+
const b = r.menu_settings[c];
|
|
56
|
+
if (b.type == "nav_menu_item") {
|
|
57
|
+
const L = /(-)?[0-9]+/g.exec(c), O = parseInt(L[0]);
|
|
58
|
+
o.find((P) => P.ID == O) || o.push(b.value);
|
|
59
|
+
}
|
|
60
|
+
}), N({ ...s, items: o.filter((c) => n.indexOf(c.ID) === -1) });
|
|
61
|
+
}
|
|
62
|
+
}, [r]), f && /* @__PURE__ */ e(I.Fragment, { children: f.items.filter((n) => n.url != "#wpm-languages").map((n) => /* @__PURE__ */ e(
|
|
63
|
+
a.Item,
|
|
64
|
+
{
|
|
65
|
+
as: g,
|
|
66
|
+
className: `divided ${n.child_items ? "has-child-items" : ""} ${u && u.ID == n.ID ? "selected" : ""} ${i == n.slug ? "active" : ""}`,
|
|
67
|
+
children: n.child_items ? /* @__PURE__ */ e("span", { onClick: (o) => t(n), children: n.title }) : /* @__PURE__ */ e(
|
|
68
|
+
g,
|
|
69
|
+
{
|
|
70
|
+
onClick: (o) => t(n),
|
|
71
|
+
to: n.type === "custom" ? C.replaceLink(n.url, d) : H(n.url, d),
|
|
72
|
+
children: n.title
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
}
|
|
76
|
+
)) });
|
|
77
|
+
}), B = ({ intl: r, settings: l }) => {
|
|
78
|
+
const [i, s] = M(), { slug: t } = x(), u = ({ media: d }) => d ? /* @__PURE__ */ e(j, { src: d.guid.rendered }) : /* @__PURE__ */ e("img", { className: "brand logo", size: "large", src: "/logo_full.png" });
|
|
79
|
+
return /* @__PURE__ */ e(I.Fragment, { children: /* @__PURE__ */ m(S, { slug: "main", locale: r.locale, children: [
|
|
80
|
+
/* @__PURE__ */ m(h, { fluid: !0, className: "header classic", children: [
|
|
81
|
+
/* @__PURE__ */ e(h, { fluid: !0, className: "background", children: /* @__PURE__ */ m(a, { className: "branding", text: !0, children: [
|
|
82
|
+
/* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ m(E, { to: "/", children: [
|
|
83
|
+
l.site_logo != 0 && /* @__PURE__ */ e(y, { id: l.site_logo, children: /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(u, {}) }) }),
|
|
84
|
+
!window.isCustomizedPreview && l.site_logo == 0 && /* @__PURE__ */ e("img", { className: "brand logo", size: "large", src: "/dc-logo_01.png" })
|
|
85
|
+
] }) }),
|
|
86
|
+
/* @__PURE__ */ e(a.Item, { className: "divider", children: /* @__PURE__ */ e("div", {}) }),
|
|
87
|
+
/* @__PURE__ */ e(a.Item, { as: g, fitted: !0, href: "/", children: /* @__PURE__ */ e("div", { className: "site name", children: l.name }) }),
|
|
88
|
+
/* @__PURE__ */ e(a.Menu, { className: "pages", children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(
|
|
89
|
+
w,
|
|
90
|
+
{
|
|
91
|
+
settings: l,
|
|
92
|
+
active: t,
|
|
93
|
+
selected: i,
|
|
94
|
+
onSetSelected: s
|
|
95
|
+
}
|
|
96
|
+
) }) }),
|
|
97
|
+
/* @__PURE__ */ e(a.Item, { children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e($, { locale: r.locale }) }) }),
|
|
98
|
+
/* @__PURE__ */ e(a.Item, { fitted: !0, children: /* @__PURE__ */ e(F, {}) })
|
|
99
|
+
] }) }),
|
|
100
|
+
/* @__PURE__ */ e(h, { fluid: !0, className: "child", children: i && i.child_items && /* @__PURE__ */ e(a, { fluid: !0, text: !0, children: /* @__PURE__ */ e(
|
|
101
|
+
w,
|
|
102
|
+
{
|
|
103
|
+
active: t,
|
|
104
|
+
locale: r.locale,
|
|
105
|
+
withIcons: !0,
|
|
106
|
+
onSetSelected: (d) => null,
|
|
107
|
+
menu: { items: i.child_items }
|
|
108
|
+
}
|
|
109
|
+
) }) })
|
|
110
|
+
] }),
|
|
111
|
+
/* @__PURE__ */ e(h, { className: "url breadcrumbs", children: /* @__PURE__ */ e(_, { children: /* @__PURE__ */ e(R, {}) }) })
|
|
112
|
+
] }) });
|
|
113
|
+
}, X = v(B);
|
|
114
|
+
export {
|
|
115
|
+
X as default
|
|
116
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { Menu as n, Image as p, Popup as f } from "semantic-ui-react";
|
|
3
|
+
import { useState as I } from "react";
|
|
4
|
+
import { MenuProvider as N, MediaProvider as v, MediaConsumer as w, MenuConsumer as u } from "@devgateway/wp-react-lib";
|
|
5
|
+
import { injectIntl as _ } from "react-intl";
|
|
6
|
+
import x from "./SearchControl.js";
|
|
7
|
+
import M from "./LangSwitcher.js";
|
|
8
|
+
import { useParams as S } from "react-router";
|
|
9
|
+
const g = (r, i) => r ? r.substr(r.indexOf("/wp") + 3).startsWith("/" + i) ? r.substr(r.indexOf("/wp") + 3) : "/" + i + r.substr(r.indexOf("/wp") + 3) : "", b = (r) => {
|
|
10
|
+
const {
|
|
11
|
+
settings: i,
|
|
12
|
+
withIcons: m,
|
|
13
|
+
active: a,
|
|
14
|
+
menu: d,
|
|
15
|
+
onSetSelected: c,
|
|
16
|
+
selected: s,
|
|
17
|
+
locale: h
|
|
18
|
+
} = r;
|
|
19
|
+
return d.items.filter((t) => t.url != "#wpm-languages").map((t) => /* @__PURE__ */ o(
|
|
20
|
+
n.Item,
|
|
21
|
+
{
|
|
22
|
+
className: `divided ${t.child_items ? "has-child-items" : ""} ${s && s.ID == t.ID ? "selected" : ""} ${a == t.slug ? "active" : ""}`,
|
|
23
|
+
children: [
|
|
24
|
+
!t.child_items && /* @__PURE__ */ e("a", { onClick: (l) => c(t), href: g(t.url, h), children: t.title }),
|
|
25
|
+
t.child_items && /* @__PURE__ */ e(
|
|
26
|
+
f,
|
|
27
|
+
{
|
|
28
|
+
position: "top center",
|
|
29
|
+
className: "floating child",
|
|
30
|
+
positionFixed: !0,
|
|
31
|
+
hoverable: !0,
|
|
32
|
+
trigger: /* @__PURE__ */ e("span", { children: t.title }),
|
|
33
|
+
children: t.child_items.map((l) => /* @__PURE__ */ o(n.Item, { children: [
|
|
34
|
+
l.icon && /* @__PURE__ */ e("img", { className: "child icon", src: l.icon.url }),
|
|
35
|
+
/* @__PURE__ */ o("span", { children: [
|
|
36
|
+
" ",
|
|
37
|
+
/* @__PURE__ */ e("a", { onClick: (P) => c(t), href: g(l.url, h), children: l.title })
|
|
38
|
+
] })
|
|
39
|
+
] }))
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
));
|
|
45
|
+
}, C = ({
|
|
46
|
+
intl: { locale: r },
|
|
47
|
+
settings: i
|
|
48
|
+
}) => {
|
|
49
|
+
const [m, a] = I(), { slug: d } = S(), c = ({ media: s }) => s ? /* @__PURE__ */ e(p, { src: s.guid.rendered }) : /* @__PURE__ */ e("img", { className: "brand logo", size: "large", src: "/logo_full.png" });
|
|
50
|
+
return /* @__PURE__ */ e(N, { slug: "main", locale: r, children: /* @__PURE__ */ o(n, { className: "header floating branding", text: !0, children: [
|
|
51
|
+
/* @__PURE__ */ e(n.Item, { className: "logo", children: /* @__PURE__ */ o("a", { href: `/${r}`, children: [
|
|
52
|
+
i.site_logo != 0 && /* @__PURE__ */ e(v, { id: i.site_logo, children: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(c, {}) }) }),
|
|
53
|
+
!window.isCustomizedPreview && i.site_logo == 0 && /* @__PURE__ */ e("img", { className: "brand logo", size: "large", src: "/dc-logo_01.png" })
|
|
54
|
+
] }) }),
|
|
55
|
+
/* @__PURE__ */ e(n.Item, { className: "divider", children: /* @__PURE__ */ e("div", {}) }),
|
|
56
|
+
/* @__PURE__ */ e(n.Item, { className: "site name", fitted: !0, href: "/", children: i.name }),
|
|
57
|
+
/* @__PURE__ */ e(n.Item, { className: "pages", children: /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(
|
|
58
|
+
b,
|
|
59
|
+
{
|
|
60
|
+
settings: i,
|
|
61
|
+
active: d,
|
|
62
|
+
selected: m,
|
|
63
|
+
onSetSelected: a,
|
|
64
|
+
locale: r
|
|
65
|
+
}
|
|
66
|
+
) }) }),
|
|
67
|
+
/* @__PURE__ */ e(n.Item, { className: "lang switcher", children: /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(M, { locale: r }) }) }),
|
|
68
|
+
/* @__PURE__ */ e(n.Item, { fitted: !0, children: /* @__PURE__ */ e(x, {}) })
|
|
69
|
+
] }) });
|
|
70
|
+
}, L = _(C);
|
|
71
|
+
export {
|
|
72
|
+
L as default
|
|
73
|
+
};
|
|
@@ -1,47 +1,49 @@
|
|
|
1
|
-
import { jsx as e,
|
|
2
|
-
import { useEffect as m } from "react";
|
|
3
|
-
import { useParams as d, useLocation as
|
|
4
|
-
import { getComponentByNameIgnoreCase as
|
|
5
|
-
import {
|
|
6
|
-
import { AppContextProvider as
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useEffect as m } from "react";
|
|
3
|
+
import { useParams as d, useLocation as g, Navigate as a, Outlet as h } from "react-router";
|
|
4
|
+
import { getComponentByNameIgnoreCase as v } from "../embeddable/index.js";
|
|
5
|
+
import { IntlProvider as C } from "react-intl";
|
|
6
|
+
import { AppContextProvider as w, SettingProvider as I, SettingsConsumer as L } from "@devgateway/wp-react-lib";
|
|
7
7
|
import { Provider as P } from "react-redux";
|
|
8
8
|
import "semantic-ui-react";
|
|
9
9
|
import "../utils/AppMedia.js";
|
|
10
10
|
import "./Footer.js";
|
|
11
11
|
import "./Header.js";
|
|
12
|
-
import { CustomizerWrapper as
|
|
13
|
-
import "
|
|
14
|
-
import { Config as y } from "../conf/index.js";
|
|
12
|
+
import { CustomizerWrapper as y } from "./Customizer.js";
|
|
13
|
+
import { Config as E } from "../conf/index.js";
|
|
15
14
|
import * as N from "../translations/en.json.js";
|
|
16
15
|
import * as O from "../translations/fr.json.js";
|
|
17
16
|
import * as b from "../translations/af.json.js";
|
|
18
|
-
import { updateIntl as
|
|
17
|
+
import { updateIntl as x } from "../lib/react-intl-redux/index.js";
|
|
19
18
|
import "immutable";
|
|
20
|
-
import { store as
|
|
21
|
-
|
|
19
|
+
import { store as r } from "../redux/store.js";
|
|
20
|
+
import "./Favicon.js";
|
|
21
|
+
import "./CustomSemanticSearch.js";
|
|
22
|
+
import "./SearchControl.js";
|
|
23
|
+
import "./ClassicHeader.js";
|
|
24
|
+
import "./FloatingMenuHeader.js";
|
|
25
|
+
const n = {
|
|
22
26
|
en: N,
|
|
23
27
|
fr: O,
|
|
24
28
|
am: b
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
console.log("
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
process.env.NODE_ENV === "development" && (console.log("----------.env-----------"), console.log(process.env), console.log("----------.env-----------")), window && window.setTimeout(() => {
|
|
33
|
-
if (window && window.location.hash) {
|
|
29
|
+
}, X = () => {
|
|
30
|
+
const i = d(), l = g(), t = E.DEFAULT_LOCALE, [S, p] = u(!1);
|
|
31
|
+
console.log("defaultLocale", t);
|
|
32
|
+
const o = i.lan, c = l.pathname;
|
|
33
|
+
return console.log("pathParams", JSON.stringify(i.lan)), m(() => {
|
|
34
|
+
p(!0), process.env.NODE_ENV === "development" && (console.log("----------.env-----------"), console.log(process.env), console.log("----------.env-----------")), typeof window < "u" && window.setTimeout(() => {
|
|
35
|
+
if (window.location.hash) {
|
|
34
36
|
const s = document.getElementById(window.location.hash.substring(1));
|
|
35
37
|
s && s.scrollIntoView({ behavior: "auto", block: "start" });
|
|
36
38
|
}
|
|
37
39
|
}, 2e3);
|
|
38
40
|
}, []), m(() => {
|
|
39
|
-
|
|
40
|
-
}, [o]), o ? Object.keys(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
/* @__PURE__ */ e(
|
|
43
|
-
] }) }) }) }, o) }) : /* @__PURE__ */ e(a, { to: `/${
|
|
41
|
+
r.dispatch(x({ locale: o, formats: {}, messages: n[o ?? "en"] }));
|
|
42
|
+
}, [o]), o ? Object.keys(n).includes(o) ? /* @__PURE__ */ e(P, { store: r, children: /* @__PURE__ */ e(C, { locale: o, messages: n[o], children: /* @__PURE__ */ e(w, { getComponent: v, store: r, locale: o, children: /* @__PURE__ */ e(I, { locale: o, changeUUID: null, children: /* @__PURE__ */ f(L, { children: [
|
|
43
|
+
/* @__PURE__ */ e(y, {}),
|
|
44
|
+
/* @__PURE__ */ e(h, {})
|
|
45
|
+
] }) }) }) }, o) }) : /* @__PURE__ */ e(a, { to: `/${t}${c}`, replace: !0 }) : /* @__PURE__ */ e(a, { to: t, replace: !0 });
|
|
44
46
|
};
|
|
45
47
|
export {
|
|
46
|
-
|
|
48
|
+
X as default
|
|
47
49
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as t, jsxs as S, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useEffect as w, useRef as L } from "react";
|
|
3
3
|
import { utils as y, SearchProvider as E, SearchConsumer as T } from "@devgateway/wp-react-lib";
|
|
4
|
-
import b from "
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { injectIntl as I, IntlProvider as _ } from "react-intl";
|
|
4
|
+
import { createPortal as b } from "react-dom";
|
|
5
|
+
import { Icon as z } from "semantic-ui-react";
|
|
6
|
+
import { injectIntl as I, IntlProvider as P } from "react-intl";
|
|
8
7
|
const x = (r, a) => {
|
|
9
8
|
if (!a) return r;
|
|
10
9
|
const s = new RegExp(`(${a})`, "gi");
|
|
@@ -40,7 +39,7 @@ const x = (r, a) => {
|
|
|
40
39
|
"div",
|
|
41
40
|
{
|
|
42
41
|
className: "has-standard-12-font-size",
|
|
43
|
-
onClick: (
|
|
42
|
+
onClick: (D) => document.location.href = m,
|
|
44
43
|
children: [
|
|
45
44
|
/* @__PURE__ */ t(
|
|
46
45
|
"h5",
|
|
@@ -75,7 +74,7 @@ const x = (r, a) => {
|
|
|
75
74
|
}
|
|
76
75
|
);
|
|
77
76
|
}
|
|
78
|
-
),
|
|
77
|
+
), _ = ({ results: r, meta: a, perPage: s, intl: i, searchTerm: e }) => {
|
|
79
78
|
const o = a ? a["x-wp-total"] : 0;
|
|
80
79
|
return a && a["x-wp-totalpages"], /* @__PURE__ */ S("div", { id: "float-results-container", children: [
|
|
81
80
|
/* @__PURE__ */ t("span", { className: "float-results-header", children: i.formatMessage(
|
|
@@ -87,7 +86,7 @@ const x = (r, a) => {
|
|
|
87
86
|
) }),
|
|
88
87
|
r.map((c) => /* @__PURE__ */ t(N, { ...c, searchTerm: e }, c.ID))
|
|
89
88
|
] });
|
|
90
|
-
},
|
|
89
|
+
}, F = ({
|
|
91
90
|
onSearch: r,
|
|
92
91
|
perPage: a,
|
|
93
92
|
loading: s,
|
|
@@ -108,7 +107,7 @@ const x = (r, a) => {
|
|
|
108
107
|
r(c.target.value);
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
|
-
)),
|
|
110
|
+
)), j = ({
|
|
112
111
|
onSearch: r,
|
|
113
112
|
onSetSelected: a,
|
|
114
113
|
perPage: s,
|
|
@@ -143,13 +142,13 @@ const x = (r, a) => {
|
|
|
143
142
|
id: "ui-float-search",
|
|
144
143
|
className: "ui float-search",
|
|
145
144
|
onMouseOver: h,
|
|
146
|
-
children: /* @__PURE__ */ t(
|
|
145
|
+
children: /* @__PURE__ */ t(z, { name: "search", size: "small" })
|
|
147
146
|
}
|
|
148
147
|
),
|
|
149
|
-
n.current &&
|
|
148
|
+
n.current && b(
|
|
150
149
|
p ? /* @__PURE__ */ S("div", { onMouseLeave: g, children: [
|
|
151
150
|
/* @__PURE__ */ t("div", { className: "float-search-container", children: /* @__PURE__ */ t(
|
|
152
|
-
|
|
151
|
+
F,
|
|
153
152
|
{
|
|
154
153
|
onSearch: r,
|
|
155
154
|
perPage: s,
|
|
@@ -160,8 +159,8 @@ const x = (r, a) => {
|
|
|
160
159
|
searchTerm: l
|
|
161
160
|
}
|
|
162
161
|
) }),
|
|
163
|
-
e && e.length > 0 && /* @__PURE__ */ t(
|
|
164
|
-
|
|
162
|
+
e && e.length > 0 && /* @__PURE__ */ t(P, { locale: c, children: /* @__PURE__ */ t(
|
|
163
|
+
_,
|
|
165
164
|
{
|
|
166
165
|
results: e,
|
|
167
166
|
meta: o,
|
|
@@ -174,7 +173,7 @@ const x = (r, a) => {
|
|
|
174
173
|
n.current
|
|
175
174
|
)
|
|
176
175
|
] });
|
|
177
|
-
},
|
|
176
|
+
}, k = ({ onSearch: r, perPage: a, loading: s, results: i, meta: e, intl: o }) => {
|
|
178
177
|
const c = e ? e["x-wp-total"] : 0, u = e ? e["x-wp-totalpages"] : 0, [l, p] = v("");
|
|
179
178
|
w(() => {
|
|
180
179
|
const n = setTimeout(() => {
|
|
@@ -184,7 +183,7 @@ const x = (r, a) => {
|
|
|
184
183
|
}, [l]);
|
|
185
184
|
const f = (n) => /* @__PURE__ */ t(N, { ...n, searchTerm: l });
|
|
186
185
|
return /* @__PURE__ */ t(
|
|
187
|
-
|
|
186
|
+
CustomSemanticSearch,
|
|
188
187
|
{
|
|
189
188
|
value: l,
|
|
190
189
|
loading: s,
|
|
@@ -206,7 +205,7 @@ const x = (r, a) => {
|
|
|
206
205
|
searchTerm: l
|
|
207
206
|
}
|
|
208
207
|
);
|
|
209
|
-
},
|
|
208
|
+
}, Q = I((r) => {
|
|
210
209
|
const { intl: a, onSetSelected: s } = r, [i, e] = v(""), [o, c] = v(!1);
|
|
211
210
|
w(() => {
|
|
212
211
|
const l = () => {
|
|
@@ -215,7 +214,7 @@ const x = (r, a) => {
|
|
|
215
214
|
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
216
215
|
}, []);
|
|
217
216
|
const u = r.settings.react_search_type === "floating" || o ? /* @__PURE__ */ t(
|
|
218
|
-
|
|
217
|
+
j,
|
|
219
218
|
{
|
|
220
219
|
onSetSelected: s,
|
|
221
220
|
onSearch: e,
|
|
@@ -224,7 +223,7 @@ const x = (r, a) => {
|
|
|
224
223
|
searchTerm: i
|
|
225
224
|
}
|
|
226
225
|
) : /* @__PURE__ */ t(
|
|
227
|
-
|
|
226
|
+
k,
|
|
228
227
|
{
|
|
229
228
|
onSetSelected: s,
|
|
230
229
|
onSearch: e,
|
|
@@ -235,5 +234,5 @@ const x = (r, a) => {
|
|
|
235
234
|
return /* @__PURE__ */ t(E, { search: i, perPage: 5, locale: a.locale, children: /* @__PURE__ */ t(T, { children: u }) });
|
|
236
235
|
});
|
|
237
236
|
export {
|
|
238
|
-
|
|
237
|
+
Q as default
|
|
239
238
|
};
|
package/dist/esm/layout/index.js
CHANGED
|
@@ -1,26 +1,43 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default as
|
|
1
|
+
import o from "./ResponsiveContainer.js";
|
|
2
|
+
import { default as t } from "./ScrollTop.js";
|
|
3
3
|
import { default as p } from "./containers/PreviewPageContainer.js";
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
7
|
-
import { CustomizerWrapper as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
4
|
+
import { default as s } from "./containers/PreviewTypeContainer.js";
|
|
5
|
+
import { default as u } from "./containers/SlugContainer.js";
|
|
6
|
+
import { default as n } from "./containers/SlugPostContainer.js";
|
|
7
|
+
import { CustomizerWrapper as i } from "./Customizer.js";
|
|
8
|
+
import { default as c } from "./Layout.js";
|
|
9
|
+
import { default as g } from "./PreviewComponent.js";
|
|
10
|
+
import { default as F } from "./Favicon.js";
|
|
11
|
+
import { default as w } from "./SSRFavicon.js";
|
|
12
|
+
import { default as H } from "./Loading.js";
|
|
13
|
+
import { default as R } from "./CustomSemanticSearch.js";
|
|
14
|
+
import { default as y } from "./Header.js";
|
|
15
|
+
import { default as z } from "./SearchControl.js";
|
|
16
|
+
import { default as M } from "./LangSwitcher.js";
|
|
17
|
+
import { default as j } from "./Footer.js";
|
|
18
|
+
import { default as q } from "./ClassicHeader.js";
|
|
19
|
+
import { default as B } from "./FlexWrapDetector.js";
|
|
20
|
+
import { default as G } from "./FloatingMenuHeader.js";
|
|
13
21
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
q as ClassicHeader,
|
|
23
|
+
R as CustomSemanticSearch,
|
|
24
|
+
i as CustomizerWrapper,
|
|
25
|
+
F as Favicon,
|
|
26
|
+
B as FlexWrapDetector,
|
|
27
|
+
G as FloatingMenuHeader,
|
|
28
|
+
j as Footer,
|
|
29
|
+
y as Header,
|
|
30
|
+
M as LangSwitcher,
|
|
31
|
+
H as Loading,
|
|
32
|
+
g as PreviewComponent,
|
|
18
33
|
p as PreviewPageContainer,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
34
|
+
s as PreviewTypeContainer,
|
|
35
|
+
o as ResponsiveContainer,
|
|
36
|
+
c as RootLayout,
|
|
37
|
+
w as SSRFavicon,
|
|
38
|
+
t as ScrollToTop,
|
|
39
|
+
z as SearchControl,
|
|
40
|
+
u as SlugContainer,
|
|
41
|
+
n as SlugPostContainer,
|
|
42
|
+
o as default
|
|
26
43
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { Provider as i } from "react-redux";
|
|
3
3
|
import p from "prop-types";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
import s from "./IntlProvider.js";
|
|
5
|
+
const t = process.env.VITE_REACT_APP_DEFAULT_LOCALE ?? "en", m = ({ store: e, children: o }) => /* @__PURE__ */ r(i, { store: e, children: /* @__PURE__ */ r(s, { locale: t, children: o }) });
|
|
6
|
+
m.propTypes = {
|
|
7
7
|
children: p.element.isRequired
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
m as default
|
|
11
11
|
};
|
|
@@ -9,3 +9,13 @@ export { default as PreviewComponent } from './PreviewComponent';
|
|
|
9
9
|
export { default as Favicon } from './Favicon';
|
|
10
10
|
export { default as SSRFavicon } from './SSRFavicon';
|
|
11
11
|
export { default as Loading } from './Loading';
|
|
12
|
+
export { default as ResponsiveContainer } from './ResponsiveContainer';
|
|
13
|
+
export { default as CustomSemanticSearch } from './CustomSemanticSearch';
|
|
14
|
+
export { default as Header } from './Header';
|
|
15
|
+
export { default as SearchControl } from './SearchControl';
|
|
16
|
+
export { default as LangSwitcher } from './LangSwitcher';
|
|
17
|
+
export { default as Footer } from './Footer';
|
|
18
|
+
export { default as ClassicHeader } from './ClassicHeader';
|
|
19
|
+
export * from './Customizer';
|
|
20
|
+
export { default as FlexWrapDetector } from './FlexWrapDetector';
|
|
21
|
+
export { default as FloatingMenuHeader } from './FloatingMenuHeader';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devgateway/dvz-ui-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"react-intl": "^7.1.14",
|
|
69
69
|
"react-is": "^18.3.1",
|
|
70
70
|
"react-markdown": "^10.1.0",
|
|
71
|
-
"react-redux": "
|
|
71
|
+
"react-redux": "~9.2.0",
|
|
72
72
|
"react-router": "~7.7.1",
|
|
73
73
|
"redux": "^5.0.1",
|
|
74
74
|
"redux-thunk": "^3.1.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"string-template": "^1.0.0",
|
|
80
80
|
"topojson-client": "^3.1.0",
|
|
81
81
|
"uuid": "^11.1.0",
|
|
82
|
-
"@devgateway/wp-react-lib": "0.4.
|
|
82
|
+
"@devgateway/wp-react-lib": "0.4.7"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@eslint/js": "^9.37.0",
|