@devgateway/dvz-ui-react 1.6.6 → 1.6.7
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/embeddable/download/index.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/utils/AppMedia.js +1 -1
- package/dist/cjs/utils/data.js +1 -1
- package/dist/cjs/utils/index.js +1 -0
- package/dist/cjs/utils/semanticUtils.js +1 -1
- package/dist/esm/embeddable/download/index.js +1 -1
- package/dist/esm/index.js +75 -55
- package/dist/esm/utils/AppMedia.js +4 -5
- package/dist/esm/utils/data.js +22 -4
- package/dist/esm/utils/index.js +22 -0
- package/dist/esm/utils/semanticUtils.js +12 -11
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/data.d.ts +0 -1
- package/dist/types/utils/index.d.ts +4 -0
- package/package.json +7 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
${d||u?"has-formats":""}
|
|
3
3
|
${s||c!=null&&c.editing?"editing":""}
|
|
4
4
|
${d&&u?"multi-format":""}
|
|
5
|
-
${d&&!u||!d&&u?"single-format":""}`,fluid:!0,children:t.jsxs(z,{ref:r,children:[t.jsxs(o.Grid,{stackable:!0,reversed:"mobile",className:"download-header",children:[!s&&w==="true"&&t.jsx(o.Grid.Column,{width:12,children:t.jsx(G.PostContent,{parentUnique:i.unique,post:{content:{rendered:decodeURIComponent(J)}}})}),t.jsx(o.Grid.Column,{className:s?"editing ignore":"ignore",width:s||w!=="true"?16:4,textAlign:"right",children:t.jsxs("div",{className:"wrapper",children:[t.jsxs(o.Button,{className:"download",onClick:()=>j(p),children:[R," ",p==="PNG"?"PNG":"JPG"]}),t.jsx(o.Dropdown,{className:"download","data-tooltip":decodeURIComponent(A),trigger:u
|
|
5
|
+
${d&&!u||!d&&u?"single-format":""}`,fluid:!0,children:t.jsxs(z,{ref:r,children:[t.jsxs(o.Grid,{stackable:!0,reversed:"mobile",className:"download-header",children:[!s&&w==="true"&&t.jsx(o.Grid.Column,{width:12,children:t.jsx(G.PostContent,{parentUnique:i.unique,post:{content:{rendered:decodeURIComponent(J)}}})}),t.jsx(o.Grid.Column,{className:s?"editing ignore":"ignore",width:s||w!=="true"?16:4,textAlign:"right",children:t.jsxs("div",{className:"wrapper",children:[t.jsxs(o.Button,{className:"download",onClick:()=>j(p),children:[R," ",p==="PNG"?"PNG":"JPG"]}),t.jsx(o.Dropdown,{className:"download","data-tooltip":decodeURIComponent(A),trigger:u&&d?t.jsx(o.Icon,{name:"download",className:"download-icon"}):null,children:t.jsxs(o.Dropdown.Menu,{children:[S,d===!0&&t.jsxs(o.Dropdown.Item,{onClick:()=>{g("PNG"),j("PNG")},children:[t.jsx("input",{type:"radio",value:"PNG",checked:p==="PNG",onChange:C}),t.jsx("label",{children:T})]}),u===!0&&t.jsxs(o.Dropdown.Item,{onClick:()=>{g("JPG"),j("JPG")},children:[t.jsx("input",{type:"radio",value:"JPG",checked:p==="JPG",onChange:C}),t.jsx("label",{children:q})]})]})})]})})]}),!s&&t.jsx(o.Container,{fluid:!0,className:`download area ${s||c!=null&&c.editing?"editing":""}`,children:t.jsx(G.PostContent,{parentUnique:i.unique,post:{content:{rendered:h}}})})]})})},_=i=>{const r=i.getIn(["data","pageModuleProps"]),h={};return r&&(h.pageModuleProps=r),h},B={},O=W.connect(_,B)(H);exports.default=O;
|
package/dist/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./embeddable/index.js"),a=require("./conf/index.js"),s=require("./layout/ResponsiveContainer.js"),u=require("./layout/ScrollTop.js"),c=require("./layout/containers/PreviewPageContainer.js"),l=require("./layout/containers/PreviewTypeContainer.js"),d=require("./layout/containers/SlugContainer.js"),p=require("./layout/containers/SlugPostContainer.js"),m=require("./layout/Customizer.js"),q=require("./layout/Layout.js"),C=require("./layout/PreviewComponent.js"),g=require("./layout/Favicon.js"),S=require("./layout/SSRFavicon.js"),T=require("./layout/Loading.js"),P=require("./layout/CustomSemanticSearch.js"),f=require("./layout/Header.js"),h=require("./layout/SearchControl.js"),v=require("./layout/LangSwitcher.js"),y=require("./layout/Footer.js"),A=require("./layout/ClassicHeader.js"),I=require("./layout/FlexWrapDetector.js"),H=require("./layout/FloatingMenuHeader.js"),w=require("./tracker/withGoogleAnalytics.js"),R=require("./redux/store.js"),i=require("./redux/hooks.js"),o=require("./lib/react-intl-redux/index.js"),x=require("./lib/redux-immutable/index.js"),F=require("./translations/en.json.js"),M=require("./translations/fr.json.js"),O=require("./translations/af.json.js"),E=require("./translations/am.json.js"),L=require("./countries.js"),t=require("./utils/data.js"),n=require("./utils/AppMedia.js"),e=require("./utils/semanticUtils.js"),N=require("./lib/react-intl-redux/providers/Provider.js"),U=require("./lib/react-intl-redux/providers/IntlProvider.js");exports.components=r.components;exports.customizer=r.customizer;exports.getComponentByNameIgnoreCase=r.getComponentByNameIgnoreCase;exports.reducers=r.reducers;exports.Config=a.Config;exports.ResponsiveContainer=s.default;exports.ScrollToTop=u.default;exports.PreviewPageContainer=c.default;exports.PreviewTypeContainer=l.default;exports.SlugContainer=d.default;exports.SlugPostContainer=p.default;exports.CustomizerWrapper=m.CustomizerWrapper;exports.RootLayout=q.default;exports.PreviewComponent=C.default;exports.Favicon=g.default;exports.SSRFavicon=S.default;exports.Loading=T.default;exports.CustomSemanticSearch=P.default;exports.Header=f.default;exports.SearchControl=h.default;exports.LangSwitcher=v.default;exports.Footer=y.default;exports.ClassicHeader=A.default;exports.FlexWrapDetector=I.default;exports.FloatingMenuHeader=H.default;exports.withTracker=w.withTracker;exports.store=R.store;exports.useAppDispatch=i.useAppDispatch;exports.useAppSelector=i.useAppSelector;exports.UPDATE=o.UPDATE;exports.initialState=o.initialState;exports.intlReducer=o.intlReducer;exports.updateIntl=o.updateIntl;exports.combineReducers=x.combineReducers;exports.englishTranslations=F;exports.frenchTranslations=M;exports.afrikaansTranslations=O;exports.amharicTranslations=E;exports.COUNTRY_OPTIONS=L.COUNTRY_OPTIONS;exports.decodeHtmlEntitiesToHtml=t.decodeHtmlEntitiesToHtml;exports.decodeHtmlEntitiesToText=t.decodeHtmlEntitiesToText;exports.stringToArray=t.stringToArray;exports.toBoolean=t.toBoolean;exports.toNumber=t.toNumber;exports.uriStringToArray=t.uriStringToArray;exports.Media=n.Media;exports.MediaContextProvider=n.MediaContextProvider;exports.mediaStyle=n.mediaStyle;exports.getUnhandledProps=e.getUnhandledProps;exports.htmlImageProps=e.htmlImageProps;exports.htmlInputAttrs=e.htmlInputAttrs;exports.htmlInputEvents=e.htmlInputEvents;exports.htmlInputProps=e.htmlInputProps;exports.partitionHTMLProps=e.partitionHTMLProps;exports.useKeyOnly=e.useKeyOnly;exports.useValueAndKey=e.useValueAndKey;exports.Provider=N.default;exports.IntlProvider=U.default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@artsy/fresnel"),e=t.createMedia({breakpoints:{mobile:320,tablet:768,computer:992,largeScreen:1200,widescreen:1920}})
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@artsy/fresnel"),e=t.createMedia({breakpoints:{mobile:320,tablet:768,computer:992,largeScreen:1200,widescreen:1920}}),i=e.createMediaStyle(),{Media:r,MediaContextProvider:a}=e;exports.Media=r;exports.MediaContextProvider=a;exports.mediaStyle=i;
|
package/dist/cjs/utils/data.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("html-entities"),i=t=>typeof t=="boolean"?t:typeof t=="string"?t==="true":!1,s=t=>typeof t=="number"?t:typeof t=="string"&&parseInt(t)||0,d=t=>{if(Array.isArray(t))return t;if(typeof t=="string"){const r=decodeURIComponent(t);if(r&&r!=="undefined")return JSON.parse(r)}return[]},c=t=>t?o.decode(t):"",u=t=>t?o.decode(t):"";function f(t){return t.replace(/^\[|\]$/g,"").split(",").map(r=>{const e=r.trim(),n=Number(e);return isNaN(n)?e:n})}exports.decodeHtmlEntitiesToHtml=u;exports.decodeHtmlEntitiesToText=c;exports.stringToArray=f;exports.toBoolean=i;exports.toNumber=s;exports.uriStringToArray=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./data.js"),r=require("./AppMedia.js"),t=require("./semanticUtils.js");exports.decodeHtmlEntitiesToHtml=e.decodeHtmlEntitiesToHtml;exports.decodeHtmlEntitiesToText=e.decodeHtmlEntitiesToText;exports.stringToArray=e.stringToArray;exports.toBoolean=e.toBoolean;exports.toNumber=e.toNumber;exports.uriStringToArray=e.uriStringToArray;exports.Media=r.Media;exports.MediaContextProvider=r.MediaContextProvider;exports.mediaStyle=r.mediaStyle;exports.getUnhandledProps=t.getUnhandledProps;exports.htmlImageProps=t.htmlImageProps;exports.htmlInputAttrs=t.htmlInputAttrs;exports.htmlInputEvents=t.htmlInputEvents;exports.htmlInputProps=t.htmlInputProps;exports.partitionHTMLProps=t.partitionHTMLProps;exports.useKeyOnly=t.useKeyOnly;exports.useValueAndKey=t.useValueAndKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lodash"),l=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],c=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],i=[...l,...c],
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("lodash"),l=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],c=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],i=[...l,...c],m=["alt","height","src","srcSet","width","loading"],p=(e,t={})=>{const{htmlProps:s=i,includeAria:o=!0}=t,n={},u={};return a.forEach(e,(d,r)=>{const h=o&&(/^aria-.*$/.test(r)||r==="role"),g=a.includes(s,r)||h?n:u;g[r]=d}),[n,u]},y=(e,t)=>e&&t,M=(e,t)=>e&&e!==!0&&`${e} ${t}`,P=(e,t)=>{const{handledProps:s=[]}=e;return Object.keys(t).reduce((o,n)=>(n==="childKey"||n==="innerRef"||s.indexOf(n)===-1&&(o[n]=t[n]),o),{})};exports.getUnhandledProps=P;exports.htmlImageProps=m;exports.htmlInputAttrs=l;exports.htmlInputEvents=c;exports.htmlInputProps=i;exports.partitionHTMLProps=p;exports.useKeyOnly=y;exports.useValueAndKey=M;
|
|
@@ -100,7 +100,7 @@ const X = H.forwardRef((r, a) => /* @__PURE__ */ t("div", { ref: a, children: r.
|
|
|
100
100
|
{
|
|
101
101
|
className: "download",
|
|
102
102
|
"data-tooltip": decodeURIComponent(A),
|
|
103
|
-
trigger: u
|
|
103
|
+
trigger: u && d ? /* @__PURE__ */ t(Q, { name: "download", className: "download-icon" }) : null,
|
|
104
104
|
children: /* @__PURE__ */ c(g.Menu, { children: [
|
|
105
105
|
q,
|
|
106
106
|
d === !0 && /* @__PURE__ */ c(g.Item, { onClick: () => {
|
package/dist/esm/index.js
CHANGED
|
@@ -1,77 +1,97 @@
|
|
|
1
|
-
import { components as
|
|
1
|
+
import { components as p, customizer as f, getComponentByNameIgnoreCase as m, reducers as n } from "./embeddable/index.js";
|
|
2
2
|
import { Config as l } from "./conf/index.js";
|
|
3
3
|
import { default as u } from "./layout/ResponsiveContainer.js";
|
|
4
4
|
import { default as c } from "./layout/ScrollTop.js";
|
|
5
|
-
import { default as
|
|
6
|
-
import { default as
|
|
5
|
+
import { default as C } from "./layout/containers/PreviewPageContainer.js";
|
|
6
|
+
import { default as P } from "./layout/containers/PreviewTypeContainer.js";
|
|
7
7
|
import { default as h } from "./layout/containers/SlugContainer.js";
|
|
8
|
-
import { default as
|
|
9
|
-
import { CustomizerWrapper as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
8
|
+
import { default as y } from "./layout/containers/SlugPostContainer.js";
|
|
9
|
+
import { CustomizerWrapper as A } from "./layout/Customizer.js";
|
|
10
|
+
import { default as R } from "./layout/Layout.js";
|
|
11
|
+
import { default as F } from "./layout/PreviewComponent.js";
|
|
12
12
|
import { default as L } from "./layout/Favicon.js";
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
import { default as
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
19
|
-
import { default as
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
13
|
+
import { default as N } from "./layout/SSRFavicon.js";
|
|
14
|
+
import { default as D } from "./layout/Loading.js";
|
|
15
|
+
import { default as b } from "./layout/CustomSemanticSearch.js";
|
|
16
|
+
import { default as z } from "./layout/Header.js";
|
|
17
|
+
import { default as K } from "./layout/SearchControl.js";
|
|
18
|
+
import { default as V } from "./layout/LangSwitcher.js";
|
|
19
|
+
import { default as _ } from "./layout/Footer.js";
|
|
20
|
+
import { default as q } from "./layout/ClassicHeader.js";
|
|
21
|
+
import { default as J } from "./layout/FlexWrapDetector.js";
|
|
22
22
|
import { default as X } from "./layout/FloatingMenuHeader.js";
|
|
23
23
|
import { withTracker as $ } from "./tracker/withGoogleAnalytics.js";
|
|
24
|
-
import { store as
|
|
25
|
-
import { useAppDispatch as
|
|
26
|
-
import { UPDATE as
|
|
27
|
-
import { combineReducers as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
24
|
+
import { store as re } from "./redux/store.js";
|
|
25
|
+
import { useAppDispatch as te, useAppSelector as ae } from "./redux/hooks.js";
|
|
26
|
+
import { UPDATE as pe, initialState as fe, intlReducer as me, updateIntl as ne } from "./lib/react-intl-redux/index.js";
|
|
27
|
+
import { combineReducers as le } from "./lib/redux-immutable/index.js";
|
|
28
|
+
import * as e from "./translations/en.json.js";
|
|
29
|
+
import * as r from "./translations/fr.json.js";
|
|
30
30
|
import * as o from "./translations/af.json.js";
|
|
31
31
|
import * as t from "./translations/am.json.js";
|
|
32
|
-
import { COUNTRY_OPTIONS as
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
32
|
+
import { COUNTRY_OPTIONS as ue } from "./countries.js";
|
|
33
|
+
import { decodeHtmlEntitiesToHtml as ce, decodeHtmlEntitiesToText as Te, stringToArray as Ce, toBoolean as ge, toNumber as Pe, uriStringToArray as Se } from "./utils/data.js";
|
|
34
|
+
import { Media as ve, MediaContextProvider as ye, mediaStyle as Ie } from "./utils/AppMedia.js";
|
|
35
|
+
import { getUnhandledProps as He, htmlImageProps as Re, htmlInputAttrs as we, htmlInputEvents as Fe, htmlInputProps as Ee, partitionHTMLProps as Le, useKeyOnly as Me, useValueAndKey as Ne } from "./utils/semanticUtils.js";
|
|
36
|
+
import { default as De } from "./lib/react-intl-redux/providers/Provider.js";
|
|
37
|
+
import { default as be } from "./lib/react-intl-redux/providers/IntlProvider.js";
|
|
35
38
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
ue as COUNTRY_OPTIONS,
|
|
40
|
+
q as ClassicHeader,
|
|
38
41
|
l as Config,
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
b as CustomSemanticSearch,
|
|
43
|
+
A as CustomizerWrapper,
|
|
41
44
|
L as Favicon,
|
|
42
|
-
|
|
45
|
+
J as FlexWrapDetector,
|
|
43
46
|
X as FloatingMenuHeader,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
_ as Footer,
|
|
48
|
+
z as Header,
|
|
49
|
+
be as IntlProvider,
|
|
50
|
+
V as LangSwitcher,
|
|
51
|
+
D as Loading,
|
|
52
|
+
ve as Media,
|
|
53
|
+
ye as MediaContextProvider,
|
|
54
|
+
F as PreviewComponent,
|
|
55
|
+
C as PreviewPageContainer,
|
|
56
|
+
P as PreviewTypeContainer,
|
|
57
|
+
De as Provider,
|
|
53
58
|
u as ResponsiveContainer,
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
R as RootLayout,
|
|
60
|
+
N as SSRFavicon,
|
|
56
61
|
c as ScrollToTop,
|
|
57
|
-
|
|
62
|
+
K as SearchControl,
|
|
58
63
|
h as SlugContainer,
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
y as SlugPostContainer,
|
|
65
|
+
pe as UPDATE,
|
|
61
66
|
o as afrikaansTranslations,
|
|
62
67
|
t as amharicTranslations,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
le as combineReducers,
|
|
69
|
+
p as components,
|
|
70
|
+
f as customizer,
|
|
71
|
+
ce as decodeHtmlEntitiesToHtml,
|
|
72
|
+
Te as decodeHtmlEntitiesToText,
|
|
73
|
+
e as englishTranslations,
|
|
74
|
+
r as frenchTranslations,
|
|
68
75
|
m as getComponentByNameIgnoreCase,
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
He as getUnhandledProps,
|
|
77
|
+
Re as htmlImageProps,
|
|
78
|
+
we as htmlInputAttrs,
|
|
79
|
+
Fe as htmlInputEvents,
|
|
80
|
+
Ee as htmlInputProps,
|
|
81
|
+
fe as initialState,
|
|
82
|
+
me as intlReducer,
|
|
83
|
+
Ie as mediaStyle,
|
|
84
|
+
Le as partitionHTMLProps,
|
|
71
85
|
n as reducers,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
86
|
+
re as store,
|
|
87
|
+
Ce as stringToArray,
|
|
88
|
+
ge as toBoolean,
|
|
89
|
+
Pe as toNumber,
|
|
90
|
+
ne as updateIntl,
|
|
91
|
+
Se as uriStringToArray,
|
|
92
|
+
te as useAppDispatch,
|
|
93
|
+
ae as useAppSelector,
|
|
94
|
+
Me as useKeyOnly,
|
|
95
|
+
Ne as useValueAndKey,
|
|
76
96
|
$ as withTracker
|
|
77
97
|
};
|
|
@@ -7,10 +7,9 @@ const e = t({
|
|
|
7
7
|
largeScreen: 1200,
|
|
8
8
|
widescreen: 1920
|
|
9
9
|
}
|
|
10
|
-
});
|
|
11
|
-
e.createMediaStyle();
|
|
12
|
-
const { Media: a, MediaContextProvider: i } = e;
|
|
10
|
+
}), a = e.createMediaStyle(), { Media: i, MediaContextProvider: o } = e;
|
|
13
11
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
i as Media,
|
|
13
|
+
o as MediaContextProvider,
|
|
14
|
+
a as mediaStyle
|
|
16
15
|
};
|
package/dist/esm/utils/data.js
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
|
-
import "
|
|
2
|
-
const
|
|
1
|
+
import { decode as o } from "html-entities";
|
|
2
|
+
const s = (r) => typeof r == "boolean" ? r : typeof r == "string" ? r === "true" : !1, f = (r) => typeof r == "number" ? r : typeof r == "string" && parseInt(r) || 0, c = (r) => {
|
|
3
|
+
if (Array.isArray(r)) return r;
|
|
4
|
+
if (typeof r == "string") {
|
|
5
|
+
const t = decodeURIComponent(r);
|
|
6
|
+
if (t && t !== "undefined")
|
|
7
|
+
return JSON.parse(t);
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
10
|
+
}, d = (r) => r ? o(r) : "", u = (r) => r ? o(r) : "";
|
|
11
|
+
function p(r) {
|
|
12
|
+
return r.replace(/^\[|\]$/g, "").split(",").map((t) => {
|
|
13
|
+
const n = t.trim(), e = Number(n);
|
|
14
|
+
return isNaN(e) ? n : e;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
3
17
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
18
|
+
u as decodeHtmlEntitiesToHtml,
|
|
19
|
+
d as decodeHtmlEntitiesToText,
|
|
20
|
+
p as stringToArray,
|
|
21
|
+
s as toBoolean,
|
|
22
|
+
f as toNumber,
|
|
23
|
+
c as uriStringToArray
|
|
6
24
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { decodeHtmlEntitiesToHtml as o, decodeHtmlEntitiesToText as r, stringToArray as n, toBoolean as i, toNumber as m, uriStringToArray as l } from "./data.js";
|
|
2
|
+
import { Media as p, MediaContextProvider as s, mediaStyle as a } from "./AppMedia.js";
|
|
3
|
+
import { getUnhandledProps as y, htmlImageProps as T, htmlInputAttrs as h, htmlInputEvents as x, htmlInputProps as P, partitionHTMLProps as g, useKeyOnly as A, useValueAndKey as H } from "./semanticUtils.js";
|
|
4
|
+
export {
|
|
5
|
+
p as Media,
|
|
6
|
+
s as MediaContextProvider,
|
|
7
|
+
o as decodeHtmlEntitiesToHtml,
|
|
8
|
+
r as decodeHtmlEntitiesToText,
|
|
9
|
+
y as getUnhandledProps,
|
|
10
|
+
T as htmlImageProps,
|
|
11
|
+
h as htmlInputAttrs,
|
|
12
|
+
x as htmlInputEvents,
|
|
13
|
+
P as htmlInputProps,
|
|
14
|
+
a as mediaStyle,
|
|
15
|
+
g as partitionHTMLProps,
|
|
16
|
+
n as stringToArray,
|
|
17
|
+
i as toBoolean,
|
|
18
|
+
m as toNumber,
|
|
19
|
+
l as uriStringToArray,
|
|
20
|
+
A as useKeyOnly,
|
|
21
|
+
H as useValueAndKey
|
|
22
|
+
};
|
|
@@ -69,22 +69,23 @@ const d = [
|
|
|
69
69
|
"onTouchEnd",
|
|
70
70
|
"onTouchMove",
|
|
71
71
|
"onTouchStart"
|
|
72
|
-
],
|
|
73
|
-
const { htmlProps:
|
|
72
|
+
], g = [...d, ...h], p = ["alt", "height", "src", "srcSet", "width", "loading"], M = (e, n = {}) => {
|
|
73
|
+
const { htmlProps: s = g, includeAria: o = !0 } = n, t = {}, u = {};
|
|
74
74
|
return a.forEach(e, (c, r) => {
|
|
75
|
-
const l = o && (/^aria-.*$/.test(r) || r === "role"), i = a.includes(
|
|
75
|
+
const l = o && (/^aria-.*$/.test(r) || r === "role"), i = a.includes(s, r) || l ? t : u;
|
|
76
76
|
i[r] = c;
|
|
77
|
-
}), [t,
|
|
78
|
-
},
|
|
79
|
-
const { handledProps:
|
|
80
|
-
return Object.keys(n).reduce((o, t) => (t === "childKey" || t === "innerRef" ||
|
|
77
|
+
}), [t, u];
|
|
78
|
+
}, y = (e, n) => e && n, D = (e, n) => e && e !== !0 && `${e} ${n}`, f = (e, n) => {
|
|
79
|
+
const { handledProps: s = [] } = e;
|
|
80
|
+
return Object.keys(n).reduce((o, t) => (t === "childKey" || t === "innerRef" || s.indexOf(t) === -1 && (o[t] = n[t]), o), {});
|
|
81
81
|
};
|
|
82
82
|
export {
|
|
83
|
-
|
|
83
|
+
f as getUnhandledProps,
|
|
84
|
+
p as htmlImageProps,
|
|
84
85
|
d as htmlInputAttrs,
|
|
85
86
|
h as htmlInputEvents,
|
|
86
|
-
|
|
87
|
+
g as htmlInputProps,
|
|
87
88
|
M as partitionHTMLProps,
|
|
88
|
-
|
|
89
|
-
|
|
89
|
+
y as useKeyOnly,
|
|
90
|
+
D as useValueAndKey
|
|
90
91
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,5 +3,4 @@ export declare const toNumber: (value: any) => number;
|
|
|
3
3
|
export declare const uriStringToArray: (value: string | string[]) => any[];
|
|
4
4
|
export declare const decodeHtmlEntitiesToText: (html: string) => string;
|
|
5
5
|
export declare const decodeHtmlEntitiesToHtml: (html: string) => string;
|
|
6
|
-
export declare const toTitleCase: (str: string) => string;
|
|
7
6
|
export declare function stringToArray(str: string): (string | number)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devgateway/dvz-ui-react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"file-saver": "^2.0.5",
|
|
58
58
|
"geostats": "^2.1.0",
|
|
59
59
|
"history": "^5.3.0",
|
|
60
|
+
"html-entities": "^2.6.0",
|
|
60
61
|
"html-react-parser": "^5.2.6",
|
|
61
62
|
"immutable": "^5.1.3",
|
|
62
63
|
"lodash": "^4.17.21",
|
|
@@ -157,6 +158,11 @@
|
|
|
157
158
|
"types": "./dist/types/layout/index.d.ts",
|
|
158
159
|
"require": "./dist/cjs/layout/index.js",
|
|
159
160
|
"import": "./dist/esm/layout/index.js"
|
|
161
|
+
},
|
|
162
|
+
"./utils": {
|
|
163
|
+
"types": "./dist/types/utils/index.d.ts",
|
|
164
|
+
"require": "./dist/cjs/utils/index.js",
|
|
165
|
+
"import": "./dist/esm/utils/index.js"
|
|
160
166
|
}
|
|
161
167
|
},
|
|
162
168
|
"scripts": {
|