@devgateway/dvz-ui-react 1.0.3 → 1.0.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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2025-present Development Gateway
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),a=require("../ResponsiveContainer.js"),r=require("@devgateway/wp-react-lib"),n=require("react-router"),u=()=>{const t=n.useLocation(),{id:i}=n.useParams(),s=new URLSearchParams(t.search),o=s.get("preview"),c=s.get("_wpnonce");return e.jsx(a,{children:e.jsx(r.PageProvider,{store:"preview",perPage:1,view:o,previewNonce:c,previewId:i,children:e.jsx(r.PageConsumer,{children:e.jsx(r.Page,{preview:!0})})})})};module.exports=u;
1
+ "use strict";const e=require("react/jsx-runtime"),p=require("../ResponsiveContainer.js"),r=require("@devgateway/wp-react-lib"),n=require("react-router"),w=({header:t,footer:i})=>{const o=n.useLocation(),{id:c}=n.useParams(),s=new URLSearchParams(o.search),a=s.get("preview"),u=s.get("_wpnonce");return e.jsx(p,{header:t,footer:i,children:e.jsx(r.PageProvider,{store:"preview",perPage:1,view:a,previewNonce:u,previewId:c,children:e.jsx(r.PageConsumer,{children:e.jsx(r.Page,{preview:!0})})})})};module.exports=w;
@@ -1 +1 @@
1
- "use strict";const r=require("react/jsx-runtime"),a=require("../ResponsiveContainer.js"),s=require("@devgateway/wp-react-lib"),o=require("react-router"),u=()=>{const n=o.useLocation(),e=o.useParams(),t=new URLSearchParams(n.search),c=t.get("preview"),i=e.type=="post"?"posts":e.type,p=t.get("_wpnonce");return r.jsx(a,{children:r.jsx(s.PostProvider,{type:i,store:"preview",perPage:1,view:c,locale:e.lan,previewNonce:p,previewId:e.id,children:r.jsx(s.PostConsumer,{children:r.jsx(s.Post,{preview:!0,showIntro:!0})})})})};module.exports=u;
1
+ "use strict";const r=require("react/jsx-runtime"),w=require("../ResponsiveContainer.js"),s=require("@devgateway/wp-react-lib"),o=require("react-router"),v=({header:n,footer:c})=>{const i=o.useLocation(),e=o.useParams(),t=new URLSearchParams(i.search),p=t.get("preview"),a=e.type=="post"?"posts":e.type,u=t.get("_wpnonce");return r.jsx(w,{header:n,footer:c,children:r.jsx(s.PostProvider,{type:a,store:"preview",perPage:1,view:p,locale:e.lan,previewNonce:u,previewId:e.id,children:r.jsx(s.PostConsumer,{children:r.jsx(s.Post,{preview:!0,showIntro:!0})})})})};module.exports=v;
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),r=require("@devgateway/wp-react-lib"),t=require("react-router"),o=require("../ResponsiveContainer.js"),i=()=>{const{lan:n,slug:s}=t.useParams();return e.jsx(r.PageProvider,{locale:n,slug:s,store:s,children:e.jsx(o,{children:e.jsx(r.PageConsumer,{children:e.jsx(r.Page,{})})})})};module.exports=i;
1
+ "use strict";const e=require("react/jsx-runtime"),r=require("@devgateway/wp-react-lib"),i=require("react-router"),c=require("../ResponsiveContainer.js"),u=({header:n,footer:t})=>{const{lan:o,slug:s}=i.useParams();return e.jsx(r.PageProvider,{locale:o,slug:s,store:s,children:e.jsx(c,{header:n,footer:t,children:e.jsx(r.PageConsumer,{children:e.jsx(r.Page,{})})})})};module.exports=u;
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),o=require("react-router"),n=require("../ResponsiveContainer.js"),s=require("@devgateway/wp-react-lib"),i=()=>{const{lan:t,slug:r}=o.useParams();return e.jsx(n,{children:e.jsx(s.PostProvider,{slug:r,store:r,locale:t,children:e.jsx(s.PostConsumer,{children:e.jsx(s.Post,{})})})})};module.exports=i;
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("react-router"),c=require("../ResponsiveContainer.js"),s=require("@devgateway/wp-react-lib"),u=({header:t,footer:o})=>{const{lan:n,slug:r}=i.useParams();return e.jsx(c,{header:t,footer:o,children:e.jsx(s.PostProvider,{slug:r,store:r,locale:n,children:e.jsx(s.PostConsumer,{children:e.jsx(s.Post,{})})})})};module.exports=u;
@@ -1,21 +1,21 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import a from "../ResponsiveContainer.js";
3
- import { PageProvider as s, PageConsumer as c, Page as p } from "@devgateway/wp-react-lib";
4
- import { useLocation as m, useParams as v } from "react-router";
5
- const h = () => {
6
- const o = m(), { id: i } = v(), r = new URLSearchParams(o.search), n = r.get("preview"), t = r.get("_wpnonce");
7
- return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
8
- s,
2
+ import c from "../ResponsiveContainer.js";
3
+ import { PageProvider as p, PageConsumer as m, Page as v } from "@devgateway/wp-react-lib";
4
+ import { useLocation as w, useParams as P } from "react-router";
5
+ const f = ({ header: o, footer: i }) => {
6
+ const n = w(), { id: t } = P(), r = new URLSearchParams(n.search), a = r.get("preview"), s = r.get("_wpnonce");
7
+ return /* @__PURE__ */ e(c, { header: o, footer: i, children: /* @__PURE__ */ e(
8
+ p,
9
9
  {
10
10
  store: "preview",
11
11
  perPage: 1,
12
- view: n,
13
- previewNonce: t,
14
- previewId: i,
15
- children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(p, { preview: !0 }) })
12
+ view: a,
13
+ previewNonce: s,
14
+ previewId: t,
15
+ children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(v, { preview: !0 }) })
16
16
  }
17
17
  ) });
18
18
  };
19
19
  export {
20
- h as default
20
+ f as default
21
21
  };
@@ -1,23 +1,23 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import p from "../ResponsiveContainer.js";
3
- import { PostProvider as a, PostConsumer as c, Post as m } from "@devgateway/wp-react-lib";
4
- import { useLocation as w, useParams as v } from "react-router";
5
- const u = () => {
6
- const t = w(), e = v(), o = new URLSearchParams(t.search), s = o.get("preview"), n = e.type == "post" ? "posts" : e.type, i = o.get("_wpnonce");
7
- return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
8
- a,
2
+ import c from "../ResponsiveContainer.js";
3
+ import { PostProvider as m, PostConsumer as w, Post as v } from "@devgateway/wp-react-lib";
4
+ import { useLocation as P, useParams as l } from "react-router";
5
+ const y = ({ header: t, footer: s }) => {
6
+ const n = P(), e = l(), o = new URLSearchParams(n.search), i = o.get("preview"), p = e.type == "post" ? "posts" : e.type, a = o.get("_wpnonce");
7
+ return /* @__PURE__ */ r(c, { header: t, footer: s, children: /* @__PURE__ */ r(
8
+ m,
9
9
  {
10
- type: n,
10
+ type: p,
11
11
  store: "preview",
12
12
  perPage: 1,
13
- view: s,
13
+ view: i,
14
14
  locale: e.lan,
15
- previewNonce: i,
15
+ previewNonce: a,
16
16
  previewId: e.id,
17
- children: /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(m, { preview: !0, showIntro: !0 }) })
17
+ children: /* @__PURE__ */ r(w, { children: /* @__PURE__ */ r(v, { preview: !0, showIntro: !0 }) })
18
18
  }
19
19
  ) });
20
20
  };
21
21
  export {
22
- u as default
22
+ y as default
23
23
  };
@@ -1,19 +1,19 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { PageProvider as n, PageConsumer as t, Page as a } from "@devgateway/wp-react-lib";
3
- import { useParams as i } from "react-router";
4
- import s from "../ResponsiveContainer.js";
5
- const u = () => {
6
- const { lan: o, slug: e } = i();
2
+ import { PageProvider as a, PageConsumer as i, Page as s } from "@devgateway/wp-react-lib";
3
+ import { useParams as m } from "react-router";
4
+ import l from "../ResponsiveContainer.js";
5
+ const f = ({ header: o, footer: n }) => {
6
+ const { lan: t, slug: e } = m();
7
7
  return /* @__PURE__ */ r(
8
- n,
8
+ a,
9
9
  {
10
- locale: o,
10
+ locale: t,
11
11
  slug: e,
12
12
  store: e,
13
- children: /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(a, {}) }) })
13
+ children: /* @__PURE__ */ r(l, { header: o, footer: n, children: /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(s, {}) }) })
14
14
  }
15
15
  );
16
16
  };
17
17
  export {
18
- u as default
18
+ f as default
19
19
  };
@@ -1,19 +1,19 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { useParams as e } from "react-router";
3
- import s from "../ResponsiveContainer.js";
4
- import { PostProvider as n, PostConsumer as i, Post as m } from "@devgateway/wp-react-lib";
5
- const u = () => {
6
- const { lan: t, slug: r } = e();
7
- return /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(
8
- n,
2
+ import { useParams as n } from "react-router";
3
+ import i from "../ResponsiveContainer.js";
4
+ import { PostProvider as m, PostConsumer as l, Post as a } from "@devgateway/wp-react-lib";
5
+ const d = ({ header: t, footer: e }) => {
6
+ const { lan: s, slug: r } = n();
7
+ return /* @__PURE__ */ o(i, { header: t, footer: e, children: /* @__PURE__ */ o(
8
+ m,
9
9
  {
10
10
  slug: r,
11
11
  store: r,
12
- locale: t,
13
- children: /* @__PURE__ */ o(i, { children: /* @__PURE__ */ o(m, {}) })
12
+ locale: s,
13
+ children: /* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(a, {}) })
14
14
  }
15
15
  ) });
16
16
  };
17
17
  export {
18
- u as default
18
+ d as default
19
19
  };
@@ -1,3 +1,7 @@
1
1
  import { default as React } from 'react';
2
- declare const PreviewPageContainer: () => React.JSX.Element;
2
+ interface PreviewPageContainerProps {
3
+ header?: React.ReactNode;
4
+ footer?: React.ReactNode;
5
+ }
6
+ declare const PreviewPageContainer: ({ header, footer }: PreviewPageContainerProps) => React.JSX.Element;
3
7
  export default PreviewPageContainer;
@@ -1,3 +1,7 @@
1
1
  import { default as React } from 'react';
2
- declare const PreviewTypeContainer: () => React.JSX.Element;
2
+ interface PreviewTypeContainerProps {
3
+ header?: React.ReactNode;
4
+ footer?: React.ReactNode;
5
+ }
6
+ declare const PreviewTypeContainer: ({ header, footer }: PreviewTypeContainerProps) => React.JSX.Element;
3
7
  export default PreviewTypeContainer;
@@ -1,3 +1,7 @@
1
1
  import { default as React } from 'react';
2
- declare const SlugContainer: () => React.JSX.Element;
2
+ interface SlugContainerProps {
3
+ header?: React.ReactNode;
4
+ footer?: React.ReactNode;
5
+ }
6
+ declare const SlugContainer: ({ header, footer }: SlugContainerProps) => React.JSX.Element;
3
7
  export default SlugContainer;
@@ -1,3 +1,7 @@
1
1
  import { default as React } from 'react';
2
- declare const SlugPostContainer: () => React.JSX.Element;
2
+ interface SlugPostContainerProps {
3
+ header?: React.ReactNode;
4
+ footer?: React.ReactNode;
5
+ }
6
+ declare const SlugPostContainer: ({ header, footer }: SlugPostContainerProps) => React.JSX.Element;
3
7
  export default SlugPostContainer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devgateway/dvz-ui-react",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -77,7 +77,7 @@
77
77
  "string-template": "^1.0.0",
78
78
  "topojson-client": "^3.1.0",
79
79
  "uuid": "^11.1.0",
80
- "@devgateway/wp-react-lib": "0.3.2"
80
+ "@devgateway/wp-react-lib": "0.4.0"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@eslint/js": "^9.26.0",