@devgateway/dvz-ui-react 1.7.9 → 1.7.11
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/measures/index.js +1 -1
- package/dist/cjs/embeddable/posts-filter/PostsFilterDropdown.js +1 -1
- package/dist/esm/embeddable/measures/index.js +33 -22
- package/dist/esm/embeddable/posts-filter/PostsFilterDropdown.js +127 -131
- package/dist/types/embeddable/filtered-posts/FilteredPostsContent.d.ts +3 -0
- package/dist/types/embeddable/filtered-posts/FilteredPostsIntro.d.ts +3 -0
- package/package.json +2 -2
|
@@ -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 r=require("react/jsx-runtime"),m=require("react"),d=require("semantic-ui-react"),p=require("../reducers/data.js"),f=require("../../redux/hooks.js"),g=h=>{const{parent:x,editing:j=!1,unique:C,"data-label":n,"data-group":o,"data-app":a,"data-measures-groups":u}=h;let s;const c=f.useAppDispatch(),i=f.useAppSelector(e=>e.getIn(["data","measures",a,o])),l={onReset:p.cleanMeasures,onChange:p.setMeasures};if(u instanceof String||typeof u=="string"){const e=u;let t;try{t=decodeURIComponent(e)}catch{t=e}s=JSON.parse(t)}else s=u;if(m.useEffect(()=>{s&&s[a]&&s[a].forEach(e=>{e.defaultSelected&&c(l.onChange({app:a,group:o,mGroup:e}))})},[]),s&&s[a]){const e=s[a];return r.jsxs(d.Container,{className:"measures group",fluid:!0,children:[n&&r.jsx("span",{children:n}),e.map(t=>r.jsxs("div",{className:"inputs lists",onClick:q=>c(l.onChange({app:a,group:o,mGroup:t})),children:[r.jsx("input",{readOnly:!0,checked:!!(i&&i.idx==t.idx),type:"radio"}),r.jsx("span",{children:t.label})]},t.idx))]})}else return r.jsx(d.Container,{className:"measures group",fluid:!0,children:n&&r.jsx("span",{children:n})})};exports.default=g;
|
|
@@ -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 l=require("react/jsx-runtime"),g=require("react"),s=require("semantic-ui-react"),k="multi-select",C="single-select",A=Number.MIN_SAFE_INTEGER,w=E=>E==null?null:String(E),ee=E=>{const{allLabel:K,noneLabel:Y,placeholder:N,options:h,current:_,onChange:i,useSingleColumn:D,enableTextSearch:y,filterType:a,allNoneSameBehaviour:$,hiddenFilters:j,autoApply:m,value:o,closeOnSelect:v=!0,noneFunction:q,alphabeticalSort:G,ascOrder:R,...z}=E,x=a===k,T=Array.isArray(o)?o:_||[],L=(Array.isArray(T)?T.some(e=>e===A):!1)?T.filter(e=>e!==A):T,[u,H]=g.useState(""),[f,b]=g.useState(null),S=m===!1&&f!==null?f:L,c=g.useMemo(()=>{if(!h)return[];const e=[...h];return G?e.sort((t,n)=>{const r=t.text?String(t.text).toLowerCase():"",p=n.text?String(n.text).toLowerCase():"";return R?r<p?-1:r>p?1:0:r<p?1:r>p?-1:0}):e.sort((t,n)=>{const r=t.position!==void 0?t.position:0,p=n.position!==void 0?n.position:0;return R?r-p:p-r}),e},[h,G,R]),O=(e,t)=>{if(a===k){const n=w(t),r=Array.isArray(S)?[...S]:[];let I=r.some(P=>w(P)===n)?r.filter(P=>w(P)!==n):[...r,t];!$&&I.length===0&&(I=[A]),m===!1?b(I):i&&i(e,I),v&&d.current&&d.current.close();return}if(a===C){m===!1?b([t]):i&&i(e,t),v&&d.current&&d.current.close();return}},J=()=>{const e=(c||[]).filter(t=>{var n;return y&&u&&u.trim().length>0&&t.text?(n=t.text)==null?void 0:n.toString().toLowerCase().includes(u.toLowerCase()):!0}).map(t=>t.value);x&&(m===!1?b(e):i&&i({},e)),v&&d.current&&d.current.close()},Q=e=>{if(q){q(e);return}else{if(!c)return;const t=c.filter(n=>{var r;return y&&u&&u.trim().length>0&&n.text?(r=n.text)==null?void 0:r.toString().toLowerCase().includes(u==null?void 0:u.toString().toLowerCase()):!0});if(x){const n=$?t.map(r=>r.value):[A];m===!1?b(n):i&&i({},n)}v&&d.current&&d.current.close()}},U=e=>{H(e)},V=g.useRef(!1);g.useEffect(()=>{if(!(!x||V.current)&&h&&h.length>0)if(!(Array.isArray(L)?L.length>0:!!L)&&i){V.current=!0;const t=h.map(n=>n.value);i({},t)}else V.current=!0},[x,h]),g.useEffect(()=>{if(x&&h&&h.length>0&&i){const e=h.map(t=>t.value);i({},e)}},[x]);const W=g.useMemo(()=>{if(a==C){const e=m===!1&&f!==null?f[0]:o,t=e!=null?c==null?void 0:c.filter(n=>n.value==e)[0]:null;return t?`${N?N+" ":""}${t.text}`:""}else{const e=S?S.filter(n=>n==Number.MIN_SAFE_INTEGER?!1:j&&j.length>0?j.indexOf(n)==-1:!0).length:0,t=(c==null?void 0:c.filter(n=>j&&j.length>0?j.indexOf(n.id)==-1:!0).length)||0;return`${N} (${e}/${t})`}},[c,S,a,m,f,o]),d=g.useRef(null),B=W,F=typeof B=="string"?B:"",X=F&&F.length>0?F:N||"",M=g.useRef(void 0);g.useEffect(()=>{a===C&&M.current===void 0&&o!==void 0&&(M.current=o)},[a,o]);const Z=a===C?o!=null&&o!==M.current:_&&_.length>0;return l.jsx(s.Dropdown,{...z,ref:d,fluid:!0,text:X,scrolling:!1,button:!0,icon:"angle down",multiple:x,search:!0,floating:!1,value:o,closeOnChange:v,...x?{renderLabel:()=>null}:{},className:`multiple ${Z?"applied ":""}`,children:l.jsxs(s.Dropdown.Menu,{children:[a!=C&&l.jsxs(l.Fragment,{children:[l.jsx(s.Segment,{children:l.jsxs(s.Dropdown.Item,{children:[l.jsx(s.Label,{basic:!0,onClick:J,children:K})," ","|"," ",l.jsx(s.Label,{basic:!0,onClick:Q,children:Y})]})}),y&&l.jsxs(l.Fragment,{children:[l.jsx(s.Container,{children:l.jsx(s.Dropdown.Item,{children:l.jsx("div",{className:"ui action input",children:l.jsxs("div",{className:"ui input",children:[l.jsx("input",{className:"filter-search",value:u,placeholder:"Search...",onChange:e=>U(e.target.value),onMouseDown:e=>e.stopPropagation(),onClick:e=>e.stopPropagation(),type:"text",autoComplete:"off"}),l.jsx(s.Icon,{name:"remove",link:!0,className:"clear-icon ignore",onClick:()=>U("")})]})})})}),l.jsx(s.Divider,{})]})]}),l.jsx("br",{}),l.jsx(s.Container,{className:D?"dropdown-single-column":"",children:c==null?void 0:c.filter(e=>{var t;return y&&u&&u.trim().length>0&&e.text?(t=e.text)==null?void 0:t.toString().toLowerCase().includes(u.toLowerCase()):!0}).map(({value:e,text:t},n)=>l.jsxs(s.Dropdown.Item,{className:D?"dropdown-item-single-column":"",children:[a===C&&l.jsx(s.Radio,{checked:(m===!1&&f!==null?f[0]:o)==e,onChange:r=>{O(r,e)},label:t}),a===k&&l.jsx(s.Checkbox,{checked:S&&S.some(r=>w(r)===w(e)),onChange:()=>O(null,e),label:t})]},n))}),m===!1&&l.jsx(s.Segment,{children:l.jsx(s.Dropdown.Item,{children:l.jsx(s.Label,{basic:!0,onClick:()=>{const e=a===C?f!==null?f[0]:o:f!==null?f:L;i&&i({},e),b(null),d.current&&d.current.close()},children:"Apply"})})})]})})};exports.default=ee;
|
|
@@ -1,45 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect as f } from "react";
|
|
3
|
-
import { Container as
|
|
3
|
+
import { Container as l } from "semantic-ui-react";
|
|
4
4
|
import { setMeasures as h, cleanMeasures as g } from "../reducers/data.js";
|
|
5
5
|
import { useAppDispatch as x, useAppSelector as C } from "../../redux/hooks.js";
|
|
6
6
|
const E = (m) => {
|
|
7
7
|
const {
|
|
8
|
-
parent:
|
|
9
|
-
editing:
|
|
10
|
-
unique:
|
|
11
|
-
"data-label":
|
|
8
|
+
parent: y,
|
|
9
|
+
editing: N = !1,
|
|
10
|
+
unique: S,
|
|
11
|
+
"data-label": n,
|
|
12
12
|
"data-group": p,
|
|
13
|
-
"data-app":
|
|
14
|
-
"data-measures-groups":
|
|
13
|
+
"data-app": t,
|
|
14
|
+
"data-measures-groups": o
|
|
15
15
|
} = m;
|
|
16
|
-
let
|
|
17
|
-
const i = x(), u = C((
|
|
16
|
+
let s;
|
|
17
|
+
const i = x(), u = C((e) => e.getIn(["data", "measures", t, p])), c = {
|
|
18
18
|
onReset: g,
|
|
19
19
|
onChange: h
|
|
20
20
|
};
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
if (o instanceof String || typeof o == "string") {
|
|
22
|
+
const e = o;
|
|
23
|
+
let a;
|
|
24
|
+
try {
|
|
25
|
+
a = decodeURIComponent(e);
|
|
26
|
+
} catch {
|
|
27
|
+
a = e;
|
|
28
|
+
}
|
|
29
|
+
s = JSON.parse(a);
|
|
30
|
+
} else
|
|
31
|
+
s = o;
|
|
32
|
+
if (f(() => {
|
|
33
|
+
s && s[t] && s[t].forEach((e) => {
|
|
34
|
+
e.defaultSelected && i(c.onChange({ app: t, group: p, mGroup: e }));
|
|
24
35
|
});
|
|
25
|
-
}, []),
|
|
26
|
-
const
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
36
|
+
}, []), s && s[t]) {
|
|
37
|
+
const e = s[t];
|
|
38
|
+
return /* @__PURE__ */ d(l, { className: "measures group", fluid: !0, children: [
|
|
39
|
+
n && /* @__PURE__ */ r("span", { children: n }),
|
|
40
|
+
e.map((a) => /* @__PURE__ */ d("div", { className: "inputs lists", onClick: (b) => i(c.onChange({ app: t, group: p, mGroup: a })), children: [
|
|
30
41
|
/* @__PURE__ */ r(
|
|
31
42
|
"input",
|
|
32
43
|
{
|
|
33
44
|
readOnly: !0,
|
|
34
|
-
checked: !!(u && u.idx ==
|
|
45
|
+
checked: !!(u && u.idx == a.idx),
|
|
35
46
|
type: "radio"
|
|
36
47
|
}
|
|
37
48
|
),
|
|
38
|
-
/* @__PURE__ */ r("span", { children:
|
|
39
|
-
] },
|
|
49
|
+
/* @__PURE__ */ r("span", { children: a.label })
|
|
50
|
+
] }, a.idx))
|
|
40
51
|
] });
|
|
41
52
|
} else
|
|
42
|
-
return /* @__PURE__ */ r(
|
|
53
|
+
return /* @__PURE__ */ r(l, { className: "measures group", fluid: !0, children: n && /* @__PURE__ */ r("span", { children: n }) });
|
|
43
54
|
};
|
|
44
55
|
export {
|
|
45
56
|
E as default
|
|
@@ -1,207 +1,203 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Dropdown as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as r, jsxs as x, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import { useState as J, useMemo as Q, useRef as $, useEffect as D } from "react";
|
|
3
|
+
import { Dropdown as E, Segment as W, Label as G, Container as X, Icon as ce, Divider as ae, Radio as ue, Checkbox as fe } from "semantic-ui-react";
|
|
4
|
+
const j = "multi-select", S = "single-select", V = Number.MIN_SAFE_INTEGER, y = (v) => v == null ? null : String(v), pe = (v) => {
|
|
5
5
|
const {
|
|
6
|
-
allLabel:
|
|
7
|
-
noneLabel:
|
|
8
|
-
placeholder:
|
|
9
|
-
options:
|
|
6
|
+
allLabel: Z,
|
|
7
|
+
noneLabel: ee,
|
|
8
|
+
placeholder: I,
|
|
9
|
+
options: d,
|
|
10
10
|
// group,
|
|
11
|
-
current:
|
|
11
|
+
current: _,
|
|
12
12
|
onChange: i,
|
|
13
|
-
useSingleColumn:
|
|
14
|
-
enableTextSearch:
|
|
13
|
+
useSingleColumn: B,
|
|
14
|
+
enableTextSearch: T,
|
|
15
15
|
filterType: c,
|
|
16
16
|
// defaultValues,
|
|
17
17
|
// showNoDataOption,
|
|
18
18
|
// defaultValueCriteria,
|
|
19
|
-
allNoneSameBehaviour:
|
|
20
|
-
hiddenFilters:
|
|
21
|
-
|
|
19
|
+
allNoneSameBehaviour: K,
|
|
20
|
+
hiddenFilters: C,
|
|
21
|
+
autoApply: h,
|
|
22
22
|
// taxonomy,
|
|
23
23
|
// type,
|
|
24
|
-
value:
|
|
25
|
-
closeOnSelect:
|
|
26
|
-
noneFunction:
|
|
27
|
-
alphabeticalSort:
|
|
28
|
-
ascOrder:
|
|
29
|
-
...
|
|
30
|
-
} =
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
value: s,
|
|
25
|
+
closeOnSelect: L = !0,
|
|
26
|
+
noneFunction: O,
|
|
27
|
+
alphabeticalSort: U,
|
|
28
|
+
ascOrder: k,
|
|
29
|
+
...te
|
|
30
|
+
} = v, m = c === j, w = Array.isArray(s) ? s : _ || [], N = (Array.isArray(w) ? w.some((e) => e === V) : !1) ? w.filter((e) => e !== V) : w, [a, ne] = J(""), [u, b] = J(null), p = h === !1 && u !== null ? u : N, o = Q(() => {
|
|
31
|
+
if (!d) return [];
|
|
32
|
+
const e = [...d];
|
|
33
|
+
return U ? e.sort((t, n) => {
|
|
34
|
+
const l = t.text ? String(t.text).toLowerCase() : "", g = n.text ? String(n.text).toLowerCase() : "";
|
|
35
|
+
return k ? l < g ? -1 : l > g ? 1 : 0 : l < g ? 1 : l > g ? -1 : 0;
|
|
36
|
+
}) : e.sort((t, n) => {
|
|
37
|
+
const l = t.position !== void 0 ? t.position : 0, g = n.position !== void 0 ? n.position : 0;
|
|
38
|
+
return k ? l - g : g - l;
|
|
39
|
+
}), e;
|
|
40
|
+
}, [d, U, k]), Y = (e, t) => {
|
|
41
|
+
if (c === j) {
|
|
42
|
+
const n = y(t), l = Array.isArray(p) ? [...p] : [];
|
|
43
|
+
let A = l.some((M) => y(M) === n) ? l.filter((M) => y(M) !== n) : [...l, t];
|
|
44
|
+
!K && A.length === 0 && (A = [V]), h === !1 ? b(A) : i && i(e, A), L && f.current && f.current.close();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (c === S) {
|
|
48
|
+
h === !1 ? b([t]) : i && i(e, t), L && f.current && f.current.close();
|
|
49
|
+
return;
|
|
35
50
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const e = (n || []).filter((t) => {
|
|
41
|
-
var r;
|
|
42
|
-
return C && a && a.trim().length > 0 && t.text ? (r = t.text) == null ? void 0 : r.toString().toLowerCase().includes(a.toLowerCase()) : !0;
|
|
51
|
+
}, le = () => {
|
|
52
|
+
const e = (o || []).filter((t) => {
|
|
53
|
+
var n;
|
|
54
|
+
return T && a && a.trim().length > 0 && t.text ? (n = t.text) == null ? void 0 : n.toString().toLowerCase().includes(a.toLowerCase()) : !0;
|
|
43
55
|
}).map((t) => t.value);
|
|
44
|
-
|
|
45
|
-
},
|
|
46
|
-
if (
|
|
47
|
-
|
|
56
|
+
m && (h === !1 ? b(e) : i && i({}, e)), L && f.current && f.current.close();
|
|
57
|
+
}, re = (e) => {
|
|
58
|
+
if (O) {
|
|
59
|
+
O(e);
|
|
48
60
|
return;
|
|
49
61
|
} else {
|
|
50
|
-
if (!
|
|
51
|
-
const t =
|
|
52
|
-
var
|
|
53
|
-
return
|
|
62
|
+
if (!o) return;
|
|
63
|
+
const t = o.filter((n) => {
|
|
64
|
+
var l;
|
|
65
|
+
return T && a && a.trim().length > 0 && n.text ? (l = n.text) == null ? void 0 : l.toString().toLowerCase().includes(a == null ? void 0 : a.toString().toLowerCase()) : !0;
|
|
54
66
|
});
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
i({},
|
|
67
|
+
if (m) {
|
|
68
|
+
const n = K ? t.map((l) => l.value) : [V];
|
|
69
|
+
h === !1 ? b(n) : i && i({}, n);
|
|
58
70
|
}
|
|
59
|
-
|
|
71
|
+
L && f.current && f.current.close();
|
|
60
72
|
}
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
if (!(!
|
|
66
|
-
if (!(Array.isArray(
|
|
67
|
-
|
|
68
|
-
const t =
|
|
73
|
+
}, q = (e) => {
|
|
74
|
+
ne(e);
|
|
75
|
+
}, F = $(!1);
|
|
76
|
+
D(() => {
|
|
77
|
+
if (!(!m || F.current) && d && d.length > 0)
|
|
78
|
+
if (!(Array.isArray(N) ? N.length > 0 : !!N) && i) {
|
|
79
|
+
F.current = !0;
|
|
80
|
+
const t = d.map((n) => n.value);
|
|
69
81
|
i({}, t);
|
|
70
82
|
} else
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
if (
|
|
74
|
-
const e =
|
|
83
|
+
F.current = !0;
|
|
84
|
+
}, [m, d]), D(() => {
|
|
85
|
+
if (m && d && d.length > 0 && i) {
|
|
86
|
+
const e = d.map((t) => t.value);
|
|
75
87
|
i({}, e);
|
|
76
88
|
}
|
|
77
|
-
}, [
|
|
78
|
-
const
|
|
79
|
-
if (c ==
|
|
80
|
-
const e =
|
|
81
|
-
return
|
|
89
|
+
}, [m]);
|
|
90
|
+
const ie = Q(() => {
|
|
91
|
+
if (c == S) {
|
|
92
|
+
const e = h === !1 && u !== null ? u[0] : s, t = e != null ? o == null ? void 0 : o.filter((n) => n.value == e)[0] : null;
|
|
93
|
+
return t ? `${I ? I + " " : ""}${t.text}` : "";
|
|
82
94
|
} else {
|
|
83
|
-
const e =
|
|
84
|
-
return `${
|
|
95
|
+
const e = p ? p.filter((n) => n == Number.MIN_SAFE_INTEGER ? !1 : C && C.length > 0 ? C.indexOf(n) == -1 : !0).length : 0, t = (o == null ? void 0 : o.filter((n) => C && C.length > 0 ? C.indexOf(n.id) == -1 : !0).length) || 0;
|
|
96
|
+
return `${I} (${e}/${t})`;
|
|
85
97
|
}
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
c ===
|
|
89
|
-
}, [c,
|
|
90
|
-
const
|
|
98
|
+
}, [o, p, c, h, u, s]), f = $(null), z = ie, P = typeof z == "string" ? z : "", se = P && P.length > 0 ? P : I || "", R = $(void 0);
|
|
99
|
+
D(() => {
|
|
100
|
+
c === S && R.current === void 0 && s !== void 0 && (R.current = s);
|
|
101
|
+
}, [c, s]);
|
|
102
|
+
const oe = c === S ? s != null && s !== R.current : _ && _.length > 0;
|
|
91
103
|
return (
|
|
92
104
|
// @ts-ignore
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
105
|
+
/* @__PURE__ */ r(
|
|
106
|
+
E,
|
|
95
107
|
{
|
|
96
|
-
...
|
|
108
|
+
...te,
|
|
97
109
|
ref: f,
|
|
98
110
|
fluid: !0,
|
|
99
|
-
text:
|
|
111
|
+
text: se,
|
|
100
112
|
scrolling: !1,
|
|
101
113
|
button: !0,
|
|
102
114
|
icon: "angle down",
|
|
103
|
-
multiple:
|
|
115
|
+
multiple: m,
|
|
104
116
|
search: !0,
|
|
105
117
|
floating: !1,
|
|
106
|
-
value:
|
|
107
|
-
closeOnChange:
|
|
108
|
-
...
|
|
109
|
-
className: `multiple ${
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
-
c !=
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
118
|
+
value: s,
|
|
119
|
+
closeOnChange: L,
|
|
120
|
+
...m ? { renderLabel: () => null } : {},
|
|
121
|
+
className: `multiple ${oe ? "applied " : ""}`,
|
|
122
|
+
children: /* @__PURE__ */ x(E.Menu, { children: [
|
|
123
|
+
c != S && /* @__PURE__ */ x(H, { children: [
|
|
124
|
+
/* @__PURE__ */ r(W, { children: /* @__PURE__ */ x(E.Item, { children: [
|
|
125
|
+
/* @__PURE__ */ r(G, { basic: !0, onClick: le, children: Z }),
|
|
114
126
|
" ",
|
|
115
127
|
"|",
|
|
116
128
|
" ",
|
|
117
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ r(G, { basic: !0, onClick: re, children: ee })
|
|
118
130
|
] }) }),
|
|
119
|
-
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
131
|
+
T && /* @__PURE__ */ x(H, { children: [
|
|
132
|
+
/* @__PURE__ */ r(X, { children: /* @__PURE__ */ r(E.Item, { children: /* @__PURE__ */ r("div", { className: "ui action input", children: /* @__PURE__ */ x("div", { className: "ui input", children: [
|
|
133
|
+
/* @__PURE__ */ r(
|
|
122
134
|
"input",
|
|
123
135
|
{
|
|
124
136
|
className: "filter-search",
|
|
125
137
|
value: a,
|
|
126
138
|
placeholder: "Search...",
|
|
127
|
-
onChange: (e) =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
onKeyDown: (e) => {
|
|
131
|
-
e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
132
|
-
},
|
|
133
|
-
onKeyUp: (e) => {
|
|
134
|
-
e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
135
|
-
},
|
|
136
|
-
onKeyPress: (e) => {
|
|
137
|
-
e && e.nativeEvent && e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
138
|
-
},
|
|
139
|
-
onMouseDown: (e) => {
|
|
140
|
-
e.stopPropagation();
|
|
141
|
-
},
|
|
142
|
-
onClick: (e) => {
|
|
143
|
-
e.stopPropagation();
|
|
144
|
-
},
|
|
145
|
-
onFocus: (e) => {
|
|
146
|
-
e.stopPropagation();
|
|
147
|
-
},
|
|
139
|
+
onChange: (e) => q(e.target.value),
|
|
140
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
141
|
+
onClick: (e) => e.stopPropagation(),
|
|
148
142
|
type: "text",
|
|
149
143
|
autoComplete: "off"
|
|
150
144
|
}
|
|
151
145
|
),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
|
|
146
|
+
/* @__PURE__ */ r(
|
|
147
|
+
ce,
|
|
154
148
|
{
|
|
155
149
|
name: "remove",
|
|
156
150
|
link: !0,
|
|
157
151
|
className: "clear-icon ignore",
|
|
158
|
-
onClick: (
|
|
159
|
-
O("");
|
|
160
|
-
}
|
|
152
|
+
onClick: () => q("")
|
|
161
153
|
}
|
|
162
154
|
)
|
|
163
155
|
] }) }) }) }),
|
|
164
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ r(ae, {})
|
|
165
157
|
] })
|
|
166
158
|
] }),
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ r("br", {}),
|
|
160
|
+
/* @__PURE__ */ r(X, { className: B ? "dropdown-single-column" : "", children: o == null ? void 0 : o.filter((e) => {
|
|
169
161
|
var t;
|
|
170
|
-
return
|
|
171
|
-
}).map(({ value: e, text: t },
|
|
172
|
-
|
|
162
|
+
return T && a && a.trim().length > 0 && e.text ? (t = e.text) == null ? void 0 : t.toString().toLowerCase().includes(a.toLowerCase()) : !0;
|
|
163
|
+
}).map(({ value: e, text: t }, n) => /* @__PURE__ */ x(
|
|
164
|
+
E.Item,
|
|
173
165
|
{
|
|
174
|
-
className:
|
|
166
|
+
className: B ? "dropdown-item-single-column" : "",
|
|
175
167
|
children: [
|
|
176
|
-
c ===
|
|
177
|
-
|
|
168
|
+
c === S && /* @__PURE__ */ r(
|
|
169
|
+
ue,
|
|
178
170
|
{
|
|
179
|
-
checked:
|
|
180
|
-
onChange: (
|
|
181
|
-
|
|
171
|
+
checked: (h === !1 && u !== null ? u[0] : s) == e,
|
|
172
|
+
onChange: (l) => {
|
|
173
|
+
Y(l, e);
|
|
182
174
|
},
|
|
183
175
|
label: t
|
|
184
176
|
}
|
|
185
177
|
),
|
|
186
|
-
c ===
|
|
187
|
-
|
|
178
|
+
c === j && /* @__PURE__ */ r(
|
|
179
|
+
fe,
|
|
188
180
|
{
|
|
189
|
-
checked:
|
|
190
|
-
(
|
|
181
|
+
checked: p && p.some(
|
|
182
|
+
(l) => y(l) === y(e)
|
|
191
183
|
),
|
|
192
|
-
onChange: () =>
|
|
184
|
+
onChange: () => Y(null, e),
|
|
193
185
|
label: t
|
|
194
186
|
}
|
|
195
187
|
)
|
|
196
188
|
]
|
|
197
189
|
},
|
|
198
|
-
|
|
199
|
-
)) })
|
|
190
|
+
n
|
|
191
|
+
)) }),
|
|
192
|
+
h === !1 && /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(E.Item, { children: /* @__PURE__ */ r(G, { basic: !0, onClick: () => {
|
|
193
|
+
const e = c === S ? u !== null ? u[0] : s : u !== null ? u : N;
|
|
194
|
+
i && i({}, e), b(null), f.current && f.current.close();
|
|
195
|
+
}, children: "Apply" }) }) })
|
|
200
196
|
] })
|
|
201
197
|
}
|
|
202
198
|
)
|
|
203
199
|
);
|
|
204
200
|
};
|
|
205
201
|
export {
|
|
206
|
-
|
|
202
|
+
pe as default
|
|
207
203
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devgateway/dvz-ui-react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.11",
|
|
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.6.
|
|
125
|
+
"@devgateway/wp-react-lib": "0.6.2"
|
|
126
126
|
},
|
|
127
127
|
"peerDependencies": {
|
|
128
128
|
"react": "^18.3.1",
|