@devgateway/dvz-ui-react 1.6.19 → 1.6.20

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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(o,c,t=!1)=>new Promise((a,i)=>{fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(c)}).then(function(n){n.status!==200&&i(n),t&&a(n.blob()),n.json().then(function(e){a(e)}).catch(()=>a(n.status))}).catch(function(n){i(n)})}),p=async(o,c={})=>{try{const t=await fetch(o,{headers:{Accept:"application/json","Content-Type":"application/json"}});if(!t.ok)throw t;return await t.json()}catch(t){throw t}};exports.get=p;exports.post=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=(e,c,i=!1)=>new Promise((n,a)=>{fetch(e,{headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",body:JSON.stringify(c)}).then(function(t){t.status!==200&&a(t),i&&n(t.blob()),t.json().then(function(o){n(o)}).catch(()=>n(t.status))}).catch(function(t){a(t)})}),p=async(e,c={},i=!1)=>{try{const{headers:n,...a}=c,t=await fetch(e,{headers:{Accept:"application/json","Content-Type":"application/json",...n},...a});if(!t.ok)throw t;const o=await t.json();if(i){const s={};return t.headers.forEach((r,h)=>{s[h]=r}),{data:o,meta:s}}return o}catch(n){throw n}};exports.get=p;exports.post=f;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),j=require("react"),y=require("react-redux"),D=require("react-intl"),C=require("./DataContext.js"),m=require("../reducers/data.js"),g=require("semantic-ui-react");class k extends j.Component{constructor(){super(),this.state={showLoading:!1},this.checkLoadingTime=this.checkLoadingTime.bind(this)}componentDidMount(){const{app:t,source:i,store:a,params:e,csv:o,group:d,editing:n,waitForFilters:r=!1}=this.props;t==="csv"?this.props.onSetData({app:t,csv:o,store:a,params:e,group:d}):(this.setState({showLoading:!1}),!r||n?(console.log("loading -----"),this.props.onLoadData({app:t,source:i,store:a,params:e,group:d}),setTimeout(this.checkLoadingTime,100)):console.log("waiting for filters to be set before loading data",t,i,a,e,d)),!n&&r&&(this.fallbackTimeout=setTimeout(()=>{this.dataLoaded||(console.warn("Fallback loading triggered"),this.setState({showLoading:!1}),this.props.onLoadData({app:t,source:i,store:a,params:e,group:d}),setTimeout(this.checkLoadingTime,100))},1e3))}componentWillUnmount(){clearTimeout(this.fallbackTimeout),clearTimeout(this.debounceTimeout)}componentDidUpdate(t,i,a){const{app:e,filters:o,apply:d,source:n,store:r,params:c,csv:u,group:h,autoApply:f,editing:T,lastInitialFilterChange:L,lastUserFilterChange:b}=this.props,S=L!==t.lastInitialFilterChange,x=b!==t.lastUserFilterChange;let p=!1;d!=null&&d!=t.apply&&(p=!0),f!==!1?(o!=t.filters||JSON.stringify(c)!=JSON.stringify(t.params)||e!=t.app||JSON.stringify(t.source)!=JSON.stringify(n)||u!=t.csv)&&(e==="csv"?this.props.onSetData({app:e,csv:u,store:r,params:c,group:h}):(this.setState({showLoading:!0}),T&&this.props.onLoadData({app:e,source:n,store:r,params:c,group:h}),S&&this.props.waitForFilters?(console.log("initial filters has been updated",o,c),clearTimeout(this.debounceTimeout),clearTimeout(this.fallbackTimeout),this.debounceTimeout=setTimeout(()=>{this.dataLoaded=!0,this.setState({showLoading:!1}),console.log("Loading data "+e+" "+n),this.props.onLoadData({app:e,source:n,store:r,params:c,group:h}),setTimeout(this.checkLoadingTime,100)},100)):x?(console.log("filters has been updated",o,t.filters,c,t.params,e,n,r,h),this.setState({showLoading:!1}),console.log("filters has been updated",o),this.props.onLoadData({app:e,source:n,store:r,params:c,group:h}),setTimeout(this.checkLoadingTime,100)):console.log("no changes detected ............"))):p&&(console.log("reloading -----"),this.props.onLoadData({app:e,source:n,store:r,params:c,group:h}),this.setState({showLoading:!1}),setTimeout(this.checkLoadingTime,100))}checkLoadingTime(){const{data:t,loading:i,time:a,error:e}=this.props,o=Date.now()-a;i&&a&&o>1e3?this.setState({showLoading:!0}):i&&setTimeout(this.checkLoadingTime,100)}render(){const{data:t,style:i,loading:a,time:e,error:o,editing:d,isSvg:n}=this.props;if(a&&this.state.showLoading&&!d){const r={width:"100%",height:"100%",background:"transparent",verticalAlign:"middle",overflow:"hidden"},c=Object.assign({},i,{height:"90%",background:"transparent",textAlign:"center",margin:"30px"}),u=s.jsx(g.Segment,{basic:!0,padded:!0,style:c,children:s.jsx(g.Dimmer,{active:!0,inverted:!0,style:{background:"transparent"},children:s.jsx(g.Loader,{size:"medium",style:{background:"transparent"}})})});return n?s.jsx("foreignObject",{style:r,children:s.jsx(g.Container,{style:i,className:"loading",children:u})}):s.jsx(g.Container,{style:i,className:"loading",children:u})}else return o?o?s.jsxs(g.Segment,{color:"red",children:[s.jsx("h1",{children:"500"}),s.jsx("p",{children:"Wasn't able to load data"})]}):s.jsx(g.Container,{children:s.jsxs(g.Segment,{color:"red",children:[s.jsx("h1",{children:"404"}),s.jsx("p",{children:"Can't find this page"})]})}):s.jsx(C.DataContext.Provider,{value:t,children:this.props.children})}}const w=(l,t)=>{const{store:i,group:a,app:e}=t;return{lastUserFilterChange:l.getIn(["data","filters-settings",e,a,"lastUserFilterChange"]),lastInitialFilterChange:l.getIn(["data","filters-settings",e,a,"lastInitialFilterChange"]),data:l.getIn(["data",...i,"data"]),filters:l.getIn(["data","filters",e,a]),autoApply:l.getIn(["data","filters-settings",e,a,"autoApply"]),apply:l.getIn(["data","filters-settings",e,a,"apply"]),error:l.getIn(["data",...i,"error"]),loading:l.getIn(["data",...i,"loading"]),time:l.getIn(["data",...i,"time"])}},I={onSetData:m.setData,onLoadData:m.getData},F=y.connect(w,I)(D.injectIntl(k));exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),x=require("react"),D=require("react-redux"),j=require("react-intl"),k=require("./DataContext.js"),m=require("../reducers/data.js"),g=require("semantic-ui-react");class C extends x.Component{constructor(){super(),this.state={showLoading:!1},this.checkLoadingTime=this.checkLoadingTime.bind(this)}componentDidMount(){const{app:e,source:i,store:a,params:t,csv:l,group:c,editing:s,waitForFilters:o=!1}=this.props;e==="csv"?this.props.onSetData({app:e,csv:l,store:a,params:t,group:c}):(this.setState({showLoading:!1}),!o||s?(console.log("loading -----"),this.props.onLoadData({app:e,source:i,store:a,params:t,group:c}),setTimeout(this.checkLoadingTime,100)):console.log("waiting for filters to be set before loading data",e,i,a,t,c)),!s&&o&&(this.fallbackTimeout=setTimeout(()=>{this.dataLoaded||(console.warn("Fallback loading triggered"),this.setState({showLoading:!1}),this.props.onLoadData({app:e,source:i,store:a,params:t,group:c}),setTimeout(this.checkLoadingTime,100))},1e3))}componentWillUnmount(){clearTimeout(this.fallbackTimeout),clearTimeout(this.debounceTimeout)}componentDidUpdate(e,i,a){const{app:t,filters:l,apply:c,source:s,store:o,params:r,csv:u,group:h,autoApply:L,editing:p,lastInitialFilterChange:T,lastUserFilterChange:S}=this.props,b=T!==e.lastInitialFilterChange,y=S!==e.lastUserFilterChange;let f=!1;c!=null&&c!=e.apply&&(f=!0),L!==!1?(l!=e.filters||JSON.stringify(r)!=JSON.stringify(e.params)||t!=e.app||JSON.stringify(e.source)!=JSON.stringify(s)||u!=e.csv)&&(t==="csv"?this.props.onSetData({app:t,csv:u,store:o,params:r,group:h}):(this.setState({showLoading:!0}),p&&this.props.onLoadData({app:t,source:s,store:o,params:r,group:h}),b&&this.props.waitForFilters?(console.log("initial filters has been updated",l,r),clearTimeout(this.debounceTimeout),clearTimeout(this.fallbackTimeout),this.debounceTimeout=setTimeout(()=>{this.dataLoaded=!0,this.setState({showLoading:!1}),console.log("Loading data "+t+" "+s),this.props.onLoadData({app:t,source:s,store:o,params:r,group:h}),setTimeout(this.checkLoadingTime,100)},100)):y?(console.log("filters has been updated",l,e.filters,r,e.params,t,s,o,h),this.setState({showLoading:!1}),console.log("filters has been updated",l),this.props.onLoadData({app:t,source:s,store:o,params:r,group:h}),setTimeout(this.checkLoadingTime,100)):!p&&(JSON.stringify(r)!==JSON.stringify(e.params)||t!==e.app||JSON.stringify(s)!==JSON.stringify(e.source))?(this.setState({showLoading:!1}),this.props.onLoadData({app:t,source:s,store:o,params:r,group:h}),setTimeout(this.checkLoadingTime,100)):console.log("no changes detected ............"))):f&&(console.log("reloading -----"),this.props.onLoadData({app:t,source:s,store:o,params:r,group:h}),this.setState({showLoading:!1}),setTimeout(this.checkLoadingTime,100))}checkLoadingTime(){const{data:e,loading:i,time:a,error:t}=this.props,l=Date.now()-a;i&&a&&l>1e3?this.setState({showLoading:!0}):i&&setTimeout(this.checkLoadingTime,100)}render(){const{data:e,style:i,loading:a,time:t,error:l,editing:c,isSvg:s}=this.props;if(a&&this.state.showLoading&&!c){const o={width:"100%",height:"100%",background:"transparent",verticalAlign:"middle",overflow:"hidden"},r=Object.assign({},i,{height:"90%",background:"transparent",textAlign:"center",margin:"30px"}),u=n.jsx(g.Segment,{basic:!0,padded:!0,style:r,children:n.jsx(g.Dimmer,{active:!0,inverted:!0,style:{background:"transparent"},children:n.jsx(g.Loader,{size:"medium",style:{background:"transparent"}})})});return s?n.jsx("foreignObject",{style:o,children:n.jsx(g.Container,{style:i,className:"loading",children:u})}):n.jsx(g.Container,{style:i,className:"loading",children:u})}else return l?l?n.jsxs(g.Segment,{color:"red",children:[n.jsx("h1",{children:"500"}),n.jsx("p",{children:"Wasn't able to load data"})]}):n.jsx(g.Container,{children:n.jsxs(g.Segment,{color:"red",children:[n.jsx("h1",{children:"404"}),n.jsx("p",{children:"Can't find this page"})]})}):n.jsx(k.DataContext.Provider,{value:e,children:this.props.children})}}const w=(d,e)=>{const{store:i,group:a,app:t}=e;return{lastUserFilterChange:d.getIn(["data","filters-settings",t,a,"lastUserFilterChange"]),lastInitialFilterChange:d.getIn(["data","filters-settings",t,a,"lastInitialFilterChange"]),data:d.getIn(["data",...i,"data"]),filters:d.getIn(["data","filters",t,a]),autoApply:d.getIn(["data","filters-settings",t,a,"autoApply"]),apply:d.getIn(["data","filters-settings",t,a,"apply"]),error:d.getIn(["data",...i,"error"]),loading:d.getIn(["data",...i,"loading"]),time:d.getIn(["data",...i,"time"])}},I={onSetData:m.setData,onLoadData:m.getData},F=D.connect(w,I)(j.injectIntl(C));exports.default=F;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("react/jsx-runtime"),i=require("react"),q=require("./PostsFilterDropdown.js"),A=require("../../conf/index.js"),R=l=>{const{taxonomy:o,group:u,placeholder:c,allLabel:p,noneLabel:f,useSingleColumn:d,enableTextSearch:g,filterType:y,showNoDataOption:S,closeOnSelect:m,allNoneSameBehaviour:x,autoApply:O,alphabeticalSort:P,ascOrder:h,type:T,categories:n,onChange:b,...v}=l,[w,e]=i.useState([]),C=async()=>{if(!o||o==="none"){e([]);return}const a=await(await fetch(A.Config.REACT_APP_WP_API+"/wp/v2/"+o)).json();if(a){const r=a.map(t=>({key:t.id,value:t.id,text:t.name}));if(n){const t=r.filter(_=>n.indexOf(_.value.toString())>-1);e([]),e(t)}else e([]),e(r)}};return i.useEffect(()=>{let s=!1;return s||(e([]),C()),()=>{s=!0}},[T,o,n]),j.jsx(q.default,{...v,group:u,placeholder:c,allLabel:p,noneLabel:f,useSingleColumn:d,enableTextSearch:g,filterType:y,showNoDataOption:S,closeOnSelect:m,allNoneSameBehaviour:x,autoApply:O,alphabeticalSort:P,ascOrder:h,options:w,onChange:b})};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const j=require("react/jsx-runtime"),i=require("react"),q=require("./PostsFilterDropdown.js"),A=require("../../conf/index.js"),R=l=>{const{taxonomy:t,group:u,placeholder:c,allLabel:p,noneLabel:f,useSingleColumn:d,enableTextSearch:g,filterType:y,showNoDataOption:S,closeOnSelect:m,allNoneSameBehaviour:x,autoApply:O,alphabeticalSort:P,ascOrder:h,type:T,categories:s,onChange:b,...v}=l,[w,o]=i.useState([]),C=async()=>{if(!t||t==="none"){o([]);return}const a=await(await fetch(A.Config.REACT_APP_WP_API+"/wp/v2/"+t)).json();if(a){const r=a.map(e=>({key:e.id,value:e.id,text:e.name}));if(s){const e=r.filter(_=>s.indexOf(_.value.toString())>-1);o(e)}else o(r)}};return i.useEffect(()=>{let n=!1;return n||C(),()=>{n=!0}},[T,t]),j.jsx(q.default,{...v,group:u,placeholder:c,allLabel:p,noneLabel:f,useSingleColumn:d,enableTextSearch:g,filterType:y,showNoDataOption:S,closeOnSelect:m,allNoneSameBehaviour:x,autoApply:O,alphabeticalSort:P,ascOrder:h,options:w,onChange:b})};exports.default=R;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../conf/index.js"),C=require("../../api/commons.js");function p(n){return JSON.parse(JSON.stringify(n))}const l=process.env.VITE_REACT_APP_API_ROOT||A.Config.REACT_APP_API_ROOT||null,O=typeof window<"u"?window.location.origin:"",g={},f={},I=3*60*1e3;function h(n){return Object.keys(n).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(n[t])).join("&")}function y(n,t=!1){const e=n,i=Date.now();if(f[e]&&i-f[e].timestamp<I)return Promise.resolve(p(f[e].data));if(g[e])return g[e].then(p);const u=C.get(n,{}).then(a=>(f[e]={data:a,timestamp:Date.now()},t?{data:p(a),meta:f[e].meta}:p(a))).finally(()=>{delete g[e]});return g[e]=u,u}const E=({app:n,params:t})=>{const e=`${l||O}/api/${n}/categories${t?"?"+h(t):""}`;return y(e)},U=({source:n,app:t,params:e})=>{const i=`${l||O}/api/${t}/stats/${n}${e?"?"+h(e):""}`;return y(i)},b=({postType:n,taxonomy:t,category:e,taxonomyFilters:i,before:u,perPage:a,page:T,locale:_,after:P,ordering:w,orderingDirection:R})=>{const $=`${A.Config.REACT_APP_WP_API}/wp/v2/${n}`,r=new URLSearchParams,d=new Map,S=(s,o)=>{if(!s||o==null)return;const c=d.get(s)||[];Array.isArray(o)?o.forEach(m=>{m!=null&&c.push(String(m))}):c.push(String(o)),d.set(s,c)};i&&i instanceof Map&&i.forEach((s,o)=>{S(o,s)}),t&&e!=null&&S(t,e),d.forEach((s,o)=>{const c=Array.from(new Set(s));c.length!==0&&r.set(o,c.join(","))}),u&&r.append("before",u.toISOString()),a&&r.append("per_page",a.toString()),r.append("page",T.toString()),r.append("locale",_),P&&r.append("after",P.toISOString()),r.append("orderby",w),r.append("order",R);const q=r.toString().replace(/%2C/g,",");return C.get(`${$}?${q}`,{})};exports.getCategories=E;exports.getCustomPosts=b;exports.getData=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../../conf/index.js"),y=require("../../api/commons.js");function l(n){return JSON.parse(JSON.stringify(n))}const g=process.env.VITE_REACT_APP_API_ROOT||C.Config.REACT_APP_API_ROOT||null,A=typeof window<"u"?window.location.origin:"",f={},p={},I=3*60*1e3;function O(n){return Object.keys(n).map(t=>encodeURIComponent(t)+"="+encodeURIComponent(n[t])).join("&")}function T(n,t=!1){const e=n,i=Date.now();if(p[e]&&i-p[e].timestamp<I)return Promise.resolve(l(p[e].data));if(f[e])return f[e].then(l);const u=y.get(n,{},t).then(a=>(p[e]={data:a,timestamp:Date.now()},t?{data:l(a),meta:p[e].meta}:l(a))).finally(()=>{delete f[e]});return f[e]=u,u}const E=({app:n,params:t})=>{const e=`${g||A}/api/${n}/categories${t?"?"+O(t):""}`;return T(e)},U=({source:n,app:t,params:e})=>{const i=`${g||A}/api/${t}/stats/${n}${e?"?"+O(e):""}`;return T(i)},b=({postType:n,taxonomy:t,category:e,taxonomyFilters:i,before:u,perPage:a,page:h,locale:_,after:P,ordering:R,orderingDirection:$})=>{const q=`${C.Config.REACT_APP_WP_API}/wp/v2/${n}`,r=new URLSearchParams,d=new Map,S=(s,o)=>{if(!s||o==null)return;const c=d.get(s)||[];Array.isArray(o)?o.forEach(m=>{m!=null&&c.push(String(m))}):c.push(String(o)),d.set(s,c)};i&&i instanceof Map&&i.forEach((s,o)=>{S(o,s)}),t&&e!=null&&S(t,e),d.forEach((s,o)=>{const c=Array.from(new Set(s));c.length!==0&&r.set(o,c.join(","))}),u&&r.append("before",u.toISOString()),a&&r.append("per_page",a.toString()),r.append("page",h.toString()),r.append("locale",_),P&&r.append("after",P.toISOString()),r.append("orderby",R),r.append("order",$);const w=r.toString().replace(/%2C/g,",");return y.get(`${q}?${w}`,{headers:{"Content-Type":"application/json"},credentials:"include"},!0)};exports.getCategories=E;exports.getCustomPosts=b;exports.getData=U;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("react"),o=require("react-router"),u=require("semantic-ui-react"),g=require("@devgateway/wp-react-lib"),w=require("../embeddable/index.js"),f=()=>{const m=o.useParams();o.useLocation();const[a]=r.useState(()=>w.getComponentByNameIgnoreCase(m.name??""));let[n,d]=o.useSearchParams();const i=l=>{console.log("-------------------------------reading message ----------------------------------------");const t=l.data;if(t.messageType&&t.messageType=="component-attributes"){const c={...n};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]}),d(c)}};r.useEffect(()=>(window.addEventListener("message",i,!1),window.parent&&window.parent.postMessage({type:"componentReady",value:!0},"*"),window.top&&window.top.postMessage({type:"componentReady",value:!0},"*"),()=>{window.removeEventListener("message",i)}),[]);const p=r.useMemo(()=>Object.fromEntries(n.entries()),[n]);return e.jsx("div",{children:e.jsx(u.Container,{fluid:!0,className:"editing",children:a?e.jsx(a,{...p,editing:!0}):e.jsx(u.Segment.Group,{color:"red",textAlign:"center",children:e.jsx("h1",{children:"Wrong Component Name"})})})})},j=()=>e.jsx(g.SettingsConsumer,{children:e.jsx(f,{})});exports.default=j;
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,36 +1,45 @@
1
- const h = (a, c, t = !1) => new Promise((o, i) => {
2
- fetch(a, {
1
+ const f = (c, e, i = !1) => new Promise((n, a) => {
2
+ fetch(c, {
3
3
  headers: {
4
4
  Accept: "application/json",
5
5
  "Content-Type": "application/json"
6
6
  },
7
7
  method: "POST",
8
- body: JSON.stringify(c)
8
+ body: JSON.stringify(e)
9
9
  }).then(
10
- function(n) {
11
- n.status !== 200 && i(n), t && o(n.blob()), n.json().then(function(s) {
12
- o(s);
13
- }).catch(() => o(n.status));
10
+ function(t) {
11
+ t.status !== 200 && a(t), i && n(t.blob()), t.json().then(function(o) {
12
+ n(o);
13
+ }).catch(() => n(t.status));
14
14
  }
15
- ).catch(function(n) {
16
- i(n);
15
+ ).catch(function(t) {
16
+ a(t);
17
17
  });
18
- }), p = async (a, c = {}) => {
18
+ }), p = async (c, e = {}, i = !1) => {
19
19
  try {
20
- const t = await fetch(a, {
20
+ const { headers: n, ...a } = e, t = await fetch(c, {
21
21
  headers: {
22
22
  Accept: "application/json",
23
- "Content-Type": "application/json"
24
- }
23
+ "Content-Type": "application/json",
24
+ ...n
25
+ },
26
+ ...a
25
27
  });
26
28
  if (!t.ok)
27
29
  throw t;
28
- return await t.json();
29
- } catch (t) {
30
- throw t;
30
+ const o = await t.json();
31
+ if (i) {
32
+ const s = {};
33
+ return t.headers.forEach((r, h) => {
34
+ s[h] = r;
35
+ }), { data: o, meta: s };
36
+ }
37
+ return o;
38
+ } catch (n) {
39
+ throw n;
31
40
  }
32
41
  };
33
42
  export {
34
43
  p as get,
35
- h as post
44
+ f as post
36
45
  };
@@ -1,91 +1,91 @@
1
- import { jsx as s, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as L } from "react/jsx-runtime";
2
2
  import k from "react";
3
3
  import { connect as w } from "react-redux";
4
4
  import { injectIntl as C } from "react-intl";
5
5
  import { DataContext as I } from "./DataContext.js";
6
- import { getData as F, setData as v } from "../reducers/data.js";
7
- import { Container as p, Segment as m, Dimmer as x, Loader as A } from "semantic-ui-react";
8
- class O extends k.Component {
6
+ import { getData as F, setData as O } from "../reducers/data.js";
7
+ import { Container as p, Segment as m, Dimmer as N, Loader as J } from "semantic-ui-react";
8
+ class x extends k.Component {
9
9
  constructor() {
10
10
  super(), this.state = {
11
11
  showLoading: !1
12
12
  }, this.checkLoadingTime = this.checkLoadingTime.bind(this);
13
13
  }
14
14
  componentDidMount() {
15
- const { app: e, source: i, store: a, params: t, csv: n, group: d, editing: o, waitForFilters: r = !1 } = this.props;
16
- e === "csv" ? this.props.onSetData({ app: e, csv: n, store: a, params: t, group: d }) : (this.setState({ showLoading: !1 }), !r || o ? (console.log("loading -----"), this.props.onLoadData({ app: e, source: i, store: a, params: t, group: d }), setTimeout(this.checkLoadingTime, 100)) : console.log("waiting for filters to be set before loading data", e, i, a, t, d)), !o && r && (this.fallbackTimeout = setTimeout(() => {
17
- this.dataLoaded || (console.warn("Fallback loading triggered"), this.setState({ showLoading: !1 }), this.props.onLoadData({ app: e, source: i, store: a, params: t, group: d }), setTimeout(this.checkLoadingTime, 100));
15
+ const { app: t, source: i, store: a, params: e, csv: l, group: c, editing: s, waitForFilters: o = !1 } = this.props;
16
+ t === "csv" ? this.props.onSetData({ app: t, csv: l, store: a, params: e, group: c }) : (this.setState({ showLoading: !1 }), !o || s ? (console.log("loading -----"), this.props.onLoadData({ app: t, source: i, store: a, params: e, group: c }), setTimeout(this.checkLoadingTime, 100)) : console.log("waiting for filters to be set before loading data", t, i, a, e, c)), !s && o && (this.fallbackTimeout = setTimeout(() => {
17
+ this.dataLoaded || (console.warn("Fallback loading triggered"), this.setState({ showLoading: !1 }), this.props.onLoadData({ app: t, source: i, store: a, params: e, group: c }), setTimeout(this.checkLoadingTime, 100));
18
18
  }, 1e3));
19
19
  }
20
20
  componentWillUnmount() {
21
21
  clearTimeout(this.fallbackTimeout), clearTimeout(this.debounceTimeout);
22
22
  }
23
- componentDidUpdate(e, i, a) {
23
+ componentDidUpdate(t, i, a) {
24
24
  const {
25
- app: t,
26
- filters: n,
27
- apply: d,
28
- source: o,
29
- store: r,
30
- params: c,
25
+ app: e,
26
+ filters: l,
27
+ apply: c,
28
+ source: s,
29
+ store: o,
30
+ params: n,
31
31
  csv: g,
32
32
  group: h,
33
- autoApply: L,
34
- editing: T,
35
- lastInitialFilterChange: b,
36
- lastUserFilterChange: S
37
- } = this.props, y = b !== e.lastInitialFilterChange, D = S !== e.lastUserFilterChange;
38
- let f = !1;
39
- d != null && d != e.apply && (f = !0), L !== !1 ? (n != e.filters || JSON.stringify(c) != JSON.stringify(e.params) || t != e.app || JSON.stringify(e.source) != JSON.stringify(o) || g != e.csv) && (t === "csv" ? this.props.onSetData({ app: t, csv: g, store: r, params: c, group: h }) : (this.setState({ showLoading: !0 }), T && this.props.onLoadData({ app: t, source: o, store: r, params: c, group: h }), y && this.props.waitForFilters ? (console.log("initial filters has been updated", n, c), clearTimeout(this.debounceTimeout), clearTimeout(this.fallbackTimeout), this.debounceTimeout = setTimeout(() => {
40
- this.dataLoaded = !0, this.setState({ showLoading: !1 }), console.log("Loading data " + t + " " + o), this.props.onLoadData({ app: t, source: o, store: r, params: c, group: h }), setTimeout(this.checkLoadingTime, 100);
41
- }, 100)) : D ? (console.log("filters has been updated", n, e.filters, c, e.params, t, o, r, h), this.setState({ showLoading: !1 }), console.log("filters has been updated", n), this.props.onLoadData({ app: t, source: o, store: r, params: c, group: h }), setTimeout(this.checkLoadingTime, 100)) : console.log("no changes detected ............"))) : f && (console.log("reloading -----"), this.props.onLoadData({ app: t, source: o, store: r, params: c, group: h }), this.setState({ showLoading: !1 }), setTimeout(this.checkLoadingTime, 100));
33
+ autoApply: T,
34
+ editing: f,
35
+ lastInitialFilterChange: S,
36
+ lastUserFilterChange: y
37
+ } = this.props, b = S !== t.lastInitialFilterChange, D = y !== t.lastUserFilterChange;
38
+ let u = !1;
39
+ c != null && c != t.apply && (u = !0), T !== !1 ? (l != t.filters || JSON.stringify(n) != JSON.stringify(t.params) || e != t.app || JSON.stringify(t.source) != JSON.stringify(s) || g != t.csv) && (e === "csv" ? this.props.onSetData({ app: e, csv: g, store: o, params: n, group: h }) : (this.setState({ showLoading: !0 }), f && this.props.onLoadData({ app: e, source: s, store: o, params: n, group: h }), b && this.props.waitForFilters ? (console.log("initial filters has been updated", l, n), clearTimeout(this.debounceTimeout), clearTimeout(this.fallbackTimeout), this.debounceTimeout = setTimeout(() => {
40
+ this.dataLoaded = !0, this.setState({ showLoading: !1 }), console.log("Loading data " + e + " " + s), this.props.onLoadData({ app: e, source: s, store: o, params: n, group: h }), setTimeout(this.checkLoadingTime, 100);
41
+ }, 100)) : D ? (console.log("filters has been updated", l, t.filters, n, t.params, e, s, o, h), this.setState({ showLoading: !1 }), console.log("filters has been updated", l), this.props.onLoadData({ app: e, source: s, store: o, params: n, group: h }), setTimeout(this.checkLoadingTime, 100)) : !f && (JSON.stringify(n) !== JSON.stringify(t.params) || e !== t.app || JSON.stringify(s) !== JSON.stringify(t.source)) ? (this.setState({ showLoading: !1 }), this.props.onLoadData({ app: e, source: s, store: o, params: n, group: h }), setTimeout(this.checkLoadingTime, 100)) : console.log("no changes detected ............"))) : u && (console.log("reloading -----"), this.props.onLoadData({ app: e, source: s, store: o, params: n, group: h }), this.setState({ showLoading: !1 }), setTimeout(this.checkLoadingTime, 100));
42
42
  }
43
43
  checkLoadingTime() {
44
- const { data: e, loading: i, time: a, error: t } = this.props, n = Date.now() - a;
45
- i && a && n > 1e3 ? this.setState({ showLoading: !0 }) : i && setTimeout(this.checkLoadingTime, 100);
44
+ const { data: t, loading: i, time: a, error: e } = this.props, l = Date.now() - a;
45
+ i && a && l > 1e3 ? this.setState({ showLoading: !0 }) : i && setTimeout(this.checkLoadingTime, 100);
46
46
  }
47
47
  render() {
48
- const { data: e, style: i, loading: a, time: t, error: n, editing: d, isSvg: o } = this.props;
49
- if (a && this.state.showLoading && !d) {
50
- const r = {
48
+ const { data: t, style: i, loading: a, time: e, error: l, editing: c, isSvg: s } = this.props;
49
+ if (a && this.state.showLoading && !c) {
50
+ const o = {
51
51
  width: "100%",
52
52
  height: "100%",
53
53
  background: "transparent",
54
54
  verticalAlign: "middle",
55
55
  overflow: "hidden"
56
- }, c = Object.assign({}, i, {
56
+ }, n = Object.assign({}, i, {
57
57
  height: "90%",
58
58
  background: "transparent",
59
59
  textAlign: "center",
60
60
  margin: "30px"
61
- }), g = /* @__PURE__ */ s(m, { basic: !0, padded: !0, style: c, children: /* @__PURE__ */ s(x, { active: !0, inverted: !0, style: { background: "transparent" }, children: /* @__PURE__ */ s(A, { size: "medium", style: { background: "transparent" } }) }) });
62
- return o ? /* @__PURE__ */ s("foreignObject", { style: r, children: /* @__PURE__ */ s(p, { style: i, className: "loading", children: g }) }) : /* @__PURE__ */ s(p, { style: i, className: "loading", children: g });
63
- } else return n ? n ? /* @__PURE__ */ u(m, { color: "red", children: [
64
- /* @__PURE__ */ s("h1", { children: "500" }),
65
- /* @__PURE__ */ s("p", { children: "Wasn't able to load data" })
66
- ] }) : /* @__PURE__ */ s(p, { children: /* @__PURE__ */ u(m, { color: "red", children: [
67
- /* @__PURE__ */ s("h1", { children: "404" }),
68
- /* @__PURE__ */ s("p", { children: "Can't find this page" })
69
- ] }) }) : /* @__PURE__ */ s(I.Provider, { value: e, children: this.props.children });
61
+ }), g = /* @__PURE__ */ r(m, { basic: !0, padded: !0, style: n, children: /* @__PURE__ */ r(N, { active: !0, inverted: !0, style: { background: "transparent" }, children: /* @__PURE__ */ r(J, { size: "medium", style: { background: "transparent" } }) }) });
62
+ return s ? /* @__PURE__ */ r("foreignObject", { style: o, children: /* @__PURE__ */ r(p, { style: i, className: "loading", children: g }) }) : /* @__PURE__ */ r(p, { style: i, className: "loading", children: g });
63
+ } else return l ? l ? /* @__PURE__ */ L(m, { color: "red", children: [
64
+ /* @__PURE__ */ r("h1", { children: "500" }),
65
+ /* @__PURE__ */ r("p", { children: "Wasn't able to load data" })
66
+ ] }) : /* @__PURE__ */ r(p, { children: /* @__PURE__ */ L(m, { color: "red", children: [
67
+ /* @__PURE__ */ r("h1", { children: "404" }),
68
+ /* @__PURE__ */ r("p", { children: "Can't find this page" })
69
+ ] }) }) : /* @__PURE__ */ r(I.Provider, { value: t, children: this.props.children });
70
70
  }
71
71
  }
72
- const j = (l, e) => {
73
- const { store: i, group: a, app: t } = e;
72
+ const A = (d, t) => {
73
+ const { store: i, group: a, app: e } = t;
74
74
  return {
75
- lastUserFilterChange: l.getIn(["data", "filters-settings", t, a, "lastUserFilterChange"]),
76
- lastInitialFilterChange: l.getIn(["data", "filters-settings", t, a, "lastInitialFilterChange"]),
77
- data: l.getIn(["data", ...i, "data"]),
78
- filters: l.getIn(["data", "filters", t, a]),
79
- autoApply: l.getIn(["data", "filters-settings", t, a, "autoApply"]),
80
- apply: l.getIn(["data", "filters-settings", t, a, "apply"]),
81
- error: l.getIn(["data", ...i, "error"]),
82
- loading: l.getIn(["data", ...i, "loading"]),
83
- time: l.getIn(["data", ...i, "time"])
75
+ lastUserFilterChange: d.getIn(["data", "filters-settings", e, a, "lastUserFilterChange"]),
76
+ lastInitialFilterChange: d.getIn(["data", "filters-settings", e, a, "lastInitialFilterChange"]),
77
+ data: d.getIn(["data", ...i, "data"]),
78
+ filters: d.getIn(["data", "filters", e, a]),
79
+ autoApply: d.getIn(["data", "filters-settings", e, a, "autoApply"]),
80
+ apply: d.getIn(["data", "filters-settings", e, a, "apply"]),
81
+ error: d.getIn(["data", ...i, "error"]),
82
+ loading: d.getIn(["data", ...i, "loading"]),
83
+ time: d.getIn(["data", ...i, "time"])
84
84
  };
85
- }, N = {
86
- onSetData: v,
85
+ }, j = {
86
+ onSetData: O,
87
87
  onLoadData: F
88
- }, q = w(j, N)(C(O));
88
+ }, q = w(A, j)(C(x));
89
89
  export {
90
90
  q as default
91
91
  };
@@ -4,7 +4,7 @@ import B from "./PostsFilterDropdown.js";
4
4
  import { Config as D } from "../../conf/index.js";
5
5
  const k = (i) => {
6
6
  const {
7
- taxonomy: t,
7
+ taxonomy: o,
8
8
  group: l,
9
9
  placeholder: p,
10
10
  allLabel: c,
@@ -19,34 +19,34 @@ const k = (i) => {
19
19
  alphabeticalSort: S,
20
20
  ascOrder: h,
21
21
  type: P,
22
- categories: n,
22
+ categories: a,
23
23
  onChange: T,
24
24
  ...w
25
- } = i, [C, e] = _([]), b = async () => {
26
- if (!t || t === "none") {
27
- e([]);
25
+ } = i, [C, t] = _([]), b = async () => {
26
+ if (!o || o === "none") {
27
+ t([]);
28
28
  return;
29
29
  }
30
- const r = await (await fetch(D.REACT_APP_WP_API + "/wp/v2/" + t)).json();
30
+ const r = await (await fetch(D.REACT_APP_WP_API + "/wp/v2/" + o)).json();
31
31
  if (r) {
32
- const s = r.map((o) => ({
33
- key: o.id,
34
- value: o.id,
35
- text: o.name
32
+ const s = r.map((e) => ({
33
+ key: e.id,
34
+ value: e.id,
35
+ text: e.name
36
36
  }));
37
- if (n) {
38
- const o = s.filter((v) => n.indexOf(v.value.toString()) > -1);
39
- e([]), e(o);
37
+ if (a) {
38
+ const e = s.filter((v) => a.indexOf(v.value.toString()) > -1);
39
+ t(e);
40
40
  } else
41
- e([]), e(s);
41
+ t(s);
42
42
  }
43
43
  };
44
44
  return j(() => {
45
- let a = !1;
46
- return a || (e([]), b()), () => {
47
- a = !0;
45
+ let n = !1;
46
+ return n || b(), () => {
47
+ n = !0;
48
48
  };
49
- }, [P, t, n]), /* @__PURE__ */ A(
49
+ }, [P, o]), /* @__PURE__ */ A(
50
50
  B,
51
51
  {
52
52
  ...w,
@@ -4,28 +4,28 @@ function f(n) {
4
4
  return JSON.parse(JSON.stringify(n));
5
5
  }
6
6
  const d = process.env.VITE_REACT_APP_API_ROOT || A.REACT_APP_API_ROOT || null, O = typeof window < "u" ? window.location.origin : "", l = {}, u = {}, q = 3 * 60 * 1e3;
7
- function _(n) {
7
+ function T(n) {
8
8
  return Object.keys(n).map((t) => encodeURIComponent(t) + "=" + encodeURIComponent(n[t])).join("&");
9
9
  }
10
- function w(n, t = !1) {
10
+ function _(n, t = !1) {
11
11
  const e = n, i = Date.now();
12
12
  if (u[e] && i - u[e].timestamp < q)
13
13
  return Promise.resolve(f(u[e].data));
14
14
  if (l[e])
15
15
  return l[e].then(f);
16
- const p = h(n, {}).then((a) => (u[e] = { data: a, timestamp: Date.now() }, t ? { data: f(a), meta: u[e].meta } : f(a))).finally(() => {
16
+ const p = h(n, {}, t).then((a) => (u[e] = { data: a, timestamp: Date.now() }, t ? { data: f(a), meta: u[e].meta } : f(a))).finally(() => {
17
17
  delete l[e];
18
18
  });
19
19
  return l[e] = p, p;
20
20
  }
21
- const D = ({ app: n, params: t }) => {
22
- const e = `${d || O}/api/${n}/categories${t ? "?" + _(t) : ""}`;
23
- return w(e);
24
- }, b = ({ source: n, app: t, params: e }) => {
25
- const i = `${d || O}/api/${t}/stats/${n}${e ? "?" + _(e) : ""}`;
26
- return w(i);
27
- }, j = ({ postType: n, taxonomy: t, category: e, taxonomyFilters: i, before: p, perPage: a, page: R, locale: T, after: m, ordering: $, orderingDirection: y }) => {
28
- const C = `${A.REACT_APP_WP_API}/wp/v2/${n}`, r = new URLSearchParams(), g = /* @__PURE__ */ new Map(), P = (s, o) => {
21
+ const j = ({ app: n, params: t }) => {
22
+ const e = `${d || O}/api/${n}/categories${t ? "?" + T(t) : ""}`;
23
+ return _(e);
24
+ }, D = ({ source: n, app: t, params: e }) => {
25
+ const i = `${d || O}/api/${t}/stats/${n}${e ? "?" + T(e) : ""}`;
26
+ return _(i);
27
+ }, b = ({ postType: n, taxonomy: t, category: e, taxonomyFilters: i, before: p, perPage: a, page: y, locale: C, after: m, ordering: R, orderingDirection: $ }) => {
28
+ const w = `${A.REACT_APP_WP_API}/wp/v2/${n}`, r = new URLSearchParams(), g = /* @__PURE__ */ new Map(), P = (s, o) => {
29
29
  if (!s || o == null) return;
30
30
  const c = g.get(s) || [];
31
31
  Array.isArray(o) ? o.forEach((S) => {
@@ -37,12 +37,17 @@ const D = ({ app: n, params: t }) => {
37
37
  }), t && e != null && P(t, e), g.forEach((s, o) => {
38
38
  const c = Array.from(new Set(s));
39
39
  c.length !== 0 && r.set(o, c.join(","));
40
- }), p && r.append("before", p.toISOString()), a && r.append("per_page", a.toString()), r.append("page", R.toString()), r.append("locale", T), m && r.append("after", m.toISOString()), r.append("orderby", $), r.append("order", y);
40
+ }), p && r.append("before", p.toISOString()), a && r.append("per_page", a.toString()), r.append("page", y.toString()), r.append("locale", C), m && r.append("after", m.toISOString()), r.append("orderby", R), r.append("order", $);
41
41
  const I = r.toString().replace(/%2C/g, ",");
42
- return h(`${C}?${I}`, {});
42
+ return h(`${w}?${I}`, {
43
+ headers: {
44
+ "Content-Type": "application/json"
45
+ },
46
+ credentials: "include"
47
+ }, !0);
43
48
  };
44
49
  export {
45
- D as getCategories,
46
- j as getCustomPosts,
47
- b as getData
50
+ j as getCategories,
51
+ b as getCustomPosts,
52
+ D as getData
48
53
  };
@@ -1,30 +1,27 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import d, { useState as u, useEffect as g } from "react";
3
- import { useParams as f, useLocation as l, useSearchParams as w } from "react-router";
4
- import { Container as y, Segment as P } from "semantic-ui-react";
5
- import { SettingsConsumer as C } from "@devgateway/wp-react-lib";
6
- import { getComponentByNameIgnoreCase as h } from "../embeddable/index.js";
7
- const v = () => {
8
- const m = f();
9
- l();
10
- const [n] = u(() => h(m.name ?? ""));
11
- let [r, i] = w();
12
- const a = (c) => {
13
- console.log("-------------------------------reading message ----------------------------------------");
14
- const t = c.data;
15
- if (t.messageType && t.messageType == "component-attributes") {
16
- const s = { ...r };
17
- Object.keys(t).forEach((o) => {
18
- s["data-" + o.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()] = typeof t[o] == "object" ? JSON.stringify(t[o]) : t[o];
19
- }), i(s);
2
+ import { useState as i, useRef as f, useCallback as g, useEffect as l } from "react";
3
+ import { useParams as w, useSearchParams as P } from "react-router";
4
+ import { Container as y, Segment as C } from "semantic-ui-react";
5
+ import { SettingsConsumer as h } from "@devgateway/wp-react-lib";
6
+ import { getComponentByNameIgnoreCase as v } from "../embeddable/index.js";
7
+ const b = () => {
8
+ const p = w(), [c] = P(), [a] = i(() => v(p.name ?? "")), [o, d] = i(
9
+ () => Object.fromEntries(c.entries())
10
+ ), s = f(o);
11
+ s.current = o;
12
+ const n = g((u) => {
13
+ const t = u.data;
14
+ if (t.messageType && t.messageType === "component-attributes") {
15
+ const m = { ...s.current };
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
+ }), d(m);
20
19
  }
21
- };
22
- g(() => (window.addEventListener("message", a, !1), window.parent && window.parent.postMessage({ type: "componentReady", value: !0 }, "*"), window.top && window.top.postMessage({ type: "componentReady", value: !0 }, "*"), () => {
23
- window.removeEventListener("message", a);
24
- }), []);
25
- const p = d.useMemo(() => Object.fromEntries(r.entries()), [r]);
26
- return /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(y, { fluid: !0, className: "editing", children: n ? /* @__PURE__ */ e(n, { ...p, editing: !0 }) : /* @__PURE__ */ e(P.Group, { color: "red", textAlign: "center", children: /* @__PURE__ */ e("h1", { children: "Wrong Component Name" }) }) }) });
27
- }, N = () => /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(v, {}) });
20
+ }, []);
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
+ window.removeEventListener("message", n);
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, {}) });
28
25
  export {
29
- N as default
26
+ L as default
30
27
  };
@@ -1,4 +1,7 @@
1
1
  export declare const post: (url: string, params: Record<string, unknown>, isBlob?: boolean) => Promise<unknown>;
2
- export declare const get: <T extends any>(url: string, params?: {}) => Promise<T>;
2
+ export declare const get: <T extends any>(url: string, fetchOptions?: RequestInit, withHeaders?: boolean) => Promise<T | {
3
+ data: T;
4
+ meta: Record<string, string>;
5
+ }>;
3
6
  export declare const queryParams: (params: any) => string;
4
7
  export declare const getAnaliticUserCode: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devgateway/dvz-ui-react",
3
- "version": "1.6.19",
3
+ "version": "1.6.20",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -122,7 +122,7 @@
122
122
  "vite-plugin-env-compatible": "^2.0.1",
123
123
  "vite-plugin-eslint": "^1.8.1",
124
124
  "vite-tsconfig-paths": "^5.1.4",
125
- "@devgateway/wp-react-lib": "0.5.1"
125
+ "@devgateway/wp-react-lib": "0.6.1"
126
126
  },
127
127
  "peerDependencies": {
128
128
  "react": "^18.3.1",