@hybridcore/ui 1.1.2 → 1.2.0
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/{ButtonBase-BYmh3G5j.js → ButtonBase-C7CHOX3y.js} +8 -7
- package/dist/{CardContent-C8PxkJz4.js → CardContent-DDFwwGfd.js} +3 -3
- package/dist/Checkbox-DP6_qp1v.js +469 -0
- package/dist/Collapse-9egEADkh.js +296 -0
- package/dist/{DialogContent-2aPOjKE7.js → DialogContent-MMUsECN2.js} +746 -789
- package/dist/{FormControl-BiAFm76F.js → FormControl-Cj5nc-Nv.js} +151 -163
- package/dist/FormControlLabel-j_atSYQA.js +827 -0
- package/dist/{IconButton-CQJ8wZE8.js → IconButton-2FRFauye.js} +4 -4
- package/dist/{Input-Bf5G3tFN.js → Input-BY_yKOrF.js} +5 -5
- package/dist/{listItemTextClasses-BvXFz-Oc.js → List-CgBXAAKA.js} +50 -62
- package/dist/ListItem-BFDUUjHt.js +428 -0
- package/dist/MenuItem-BejUFNIP.js +233 -0
- package/dist/{OutlinedInput-BEVE8VZQ.js → OutlinedInput-CnzESIDi.js} +5 -5
- package/dist/{Paper-CaiWdndQ.js → Paper-k37cShvn.js} +4 -4
- package/dist/{Select-DxpxZbJp.js → Select-BGt6e73I.js} +804 -1025
- package/dist/{Typography-XIiVCSto.js → Typography-Bjo-B13o.js} +3 -3
- package/dist/{chainPropTypes-DtBfUj5o.js → chainPropTypes-BmidnkZm.js} +2 -2
- package/dist/components/card/index.js +5 -5
- package/dist/components/card/styled.js +1 -1
- package/dist/components/collapsible-card/index.js +34 -0
- package/dist/components/collapsible-card/style.js +575 -0
- package/dist/components/confirm/dialog.js +5 -5
- package/dist/components/container/index.js +6 -6
- package/dist/components/context-menu/index.js +191 -603
- package/dist/components/data-management/instance-form/components/composite-list/index.js +1 -1
- package/dist/components/data-management/instance-form/components/variable/index.js +7 -5
- package/dist/components/data-management/instance-form/components/variables/index.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +1 -1
- package/dist/components/geometry-picker/edit/index.js +1 -1
- package/dist/components/geometry-picker/geometry/index.js +1 -1
- package/dist/components/geometry-picker/index.js +2 -2
- package/dist/components/geometry-picker/kml/index.js +1 -1
- package/dist/components/geometry-picker/map/index.js +1 -1
- package/dist/components/geometry-picker/map/logic.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/map/helpers/ol.js +2 -2
- package/dist/components/map/index.js +2 -2
- package/dist/components/map/logic.js +1 -1
- package/dist/components/map/styled.js +89 -6
- package/dist/components/search-input/index.js +119 -48
- package/dist/components/template-property-filters/index.js +78 -0
- package/dist/components/template-property-filters/property.js +7019 -0
- package/dist/components/tree-select/index.js +14 -13
- package/dist/components/treeview-filter/index.js +263 -328
- package/dist/components/treeview-filter/item/index.js +1 -1
- package/dist/components/treeview-filter/item-label/index.js +2 -2
- package/dist/createSvgIcon-DAR6Hwv8.js +77 -0
- package/dist/createSvgIcon-R_PakhKf.js +213 -0
- package/dist/{createTheme-agWfFD64.js → createTheme-oOCi1S_n.js} +5 -5
- package/dist/debounce-46wSf_lW.js +15 -0
- package/dist/{exactProp-CI8dagM-.js → exactProp-DhXxfU8X.js} +2 -2
- package/dist/index-C7W2wuUG.js +609 -0
- package/dist/index-DHnXB0CB.js +287 -0
- package/dist/{index-IvOfmM1F.js → index-JrtqxUdI.js} +6 -6
- package/dist/listItemTextClasses-CaI8l2PD.js +16 -0
- package/dist/main.d.ts +140 -0
- package/dist/main.js +1 -1
- package/dist/{ol-DXmSLlWv.js → ol-q6vTiF_t.js} +1 -1
- package/dist/resolveComponentProps-BwtY1IP3.js +54 -0
- package/dist/styled-CHMAYxVs.js +142 -0
- package/dist/{styled-Iq9jsO4F.js → styled-Wx2vv4j8.js} +1 -1
- package/dist/unsupportedProp-BuVD30Gh.js +9 -0
- package/dist/{useTheme-C0Dky5rV.js → useTheme-BI40KZ7w.js} +2 -1
- package/dist/{useTheme-CeyGVuQP.js → useTheme-CD5DEi5n.js} +2 -2
- package/dist/useThemeProps-D4or2IlT.js +62 -0
- package/dist/{useThemeProps-CzAjOL6F.js → useThemeProps-DT5EdhcP.js} +5 -4
- package/dist/{utils-DLpkeyhZ.js → utils-BEaBPoDF.js} +10 -10
- package/package.json +1 -1
- package/dist/Checkbox-DostZSwR.js +0 -673
- package/dist/index-Bw_m9ult.js +0 -1105
- package/dist/index-wW2D1aTG.js +0 -957
- package/dist/styled-C43K9x7T.js +0 -229
|
@@ -3,7 +3,7 @@ import "@mui/material";
|
|
|
3
3
|
import "./styled.js";
|
|
4
4
|
import "@mui/icons-material";
|
|
5
5
|
import "../../../../../hooks/useToggle.js";
|
|
6
|
-
import { C as l } from "../../../../../index-
|
|
6
|
+
import { C as l } from "../../../../../index-DHnXB0CB.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import "lodash";
|
|
9
9
|
import "dayjs";
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "lodash";
|
|
3
3
|
import "dayjs";
|
|
4
|
-
import { V as
|
|
4
|
+
import { V as b } from "../../../../../index-DHnXB0CB.js";
|
|
5
5
|
import "@mui/material";
|
|
6
6
|
import "@mui/icons-material";
|
|
7
7
|
import "../../../../geometry-picker/index.js";
|
|
8
8
|
import "../../../../phone-input/index.js";
|
|
9
9
|
import "../../../../date-time-picker/index.js";
|
|
10
|
-
import "../../../../../
|
|
11
|
-
import "../../../../../
|
|
12
|
-
import "../../../../../
|
|
10
|
+
import "../../../../../FormControlLabel-j_atSYQA.js";
|
|
11
|
+
import "../../../../../Checkbox-DP6_qp1v.js";
|
|
12
|
+
import "../../../../../FormControl-Cj5nc-Nv.js";
|
|
13
|
+
import "../../../../../Select-BGt6e73I.js";
|
|
14
|
+
import "../../../../../MenuItem-BejUFNIP.js";
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
b as default
|
|
15
17
|
};
|
|
@@ -2,7 +2,7 @@ import { jsxs as l, Fragment as p, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { Button as a, Box as f } from "@mui/material";
|
|
3
3
|
import u from "../map/index.js";
|
|
4
4
|
import C from "../parser/index.js";
|
|
5
|
-
import { g as y, c as g } from "../../../ol-
|
|
5
|
+
import { g as y, c as g } from "../../../ol-q6vTiF_t.js";
|
|
6
6
|
import { useState as h } from "react";
|
|
7
7
|
import { Add as P } from "@mui/icons-material";
|
|
8
8
|
import { parse as v, convert as x } from "../../map/helpers/wkt.js";
|
|
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as e, Fragment as x } from "react/jsx-runtime";
|
|
|
2
2
|
import E, { useState as F, useEffect as T } from "react";
|
|
3
3
|
import { Dialog as w, DialogContent as K, DialogActions as j, Button as c, Box as O } from "@mui/material";
|
|
4
4
|
import C from "../map/index.js";
|
|
5
|
-
import { c as P, a as R } from "../../../ol-
|
|
5
|
+
import { c as P, a as R } from "../../../ol-q6vTiF_t.js";
|
|
6
6
|
import { parse as S } from "../../map/helpers/wkt.js";
|
|
7
7
|
import _ from "lodash";
|
|
8
8
|
import { t as B } from "../../../Source-CnCcu5UP.js";
|
|
@@ -3,7 +3,7 @@ import D, { useState as k } from "react";
|
|
|
3
3
|
import { Dialog as R, DialogContent as K, Box as t, Typography as x, DialogActions as F, Button as d } from "@mui/material";
|
|
4
4
|
import P from "../map/index.js";
|
|
5
5
|
import b from "../parser/index.js";
|
|
6
|
-
import { c as _ } from "../../../ol-
|
|
6
|
+
import { c as _ } from "../../../ol-q6vTiF_t.js";
|
|
7
7
|
import { Button as l } from "../styled.js";
|
|
8
8
|
import { HorizontalRule as j, ShowChart as O, CircleOutlined as I } from "@mui/icons-material";
|
|
9
9
|
import L from "./map-overlay.js";
|
|
@@ -8,8 +8,8 @@ import y from "./geometry/index.js";
|
|
|
8
8
|
import b from "./kml/index.js";
|
|
9
9
|
import g from "./wkt/index.js";
|
|
10
10
|
import { IconButton as s, Dialog as E, DialogTitle as W, DialogContent as K } from "@mui/material";
|
|
11
|
-
import { F as L, I as z, a as G } from "../../FormControl-
|
|
12
|
-
import { I as w } from "../../Input-
|
|
11
|
+
import { F as L, I as z, a as G } from "../../FormControl-Cj5nc-Nv.js";
|
|
12
|
+
import { I as w } from "../../Input-BY_yKOrF.js";
|
|
13
13
|
const J = ({
|
|
14
14
|
label: c,
|
|
15
15
|
mapboxAccessToken: r,
|
|
@@ -3,7 +3,7 @@ import { useState as i, useEffect as b } from "react";
|
|
|
3
3
|
import k from "./select-input-method.js";
|
|
4
4
|
import { Box as c, TextField as M, Button as d } from "@mui/material";
|
|
5
5
|
import { validate as C } from "../../map/helpers/kml.js";
|
|
6
|
-
import { b as L, c as T } from "../../../ol-
|
|
6
|
+
import { b as L, c as T } from "../../../ol-q6vTiF_t.js";
|
|
7
7
|
function W({ onCancel: m, onSubmit: a }) {
|
|
8
8
|
const [t, l] = i(), [o, f] = i(), [s, n] = i(), p = (e) => {
|
|
9
9
|
l(e);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import { O as u } from "../../../index-
|
|
3
|
+
import { O as u } from "../../../index-JrtqxUdI.js";
|
|
4
4
|
import d from "./logic.js";
|
|
5
5
|
import { Box as m } from "@mui/material";
|
|
6
6
|
import { ContextMenu as p } from "../../context-menu/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import k from "react";
|
|
2
2
|
import { createMapboxLayer as Xe } from "../../map/helpers/mapbox.js";
|
|
3
|
-
import { I as $e, s as ke, n as ge, e as ve, C as fe, f as v, V as se, F as L, P as me, p as Ze, h as ze, i as _e, R as Ge, j as ye, k as J, M as D, l as Je, m as Qe, o as et, q as tt, L as z, r as it, t as Ie, u as Re, G as st, v as nt, b as Fe, a as rt } from "../../../ol-
|
|
3
|
+
import { I as $e, s as ke, n as ge, e as ve, C as fe, f as v, V as se, F as L, P as me, p as Ze, h as ze, i as _e, R as Ge, j as ye, k as J, M as D, l as Je, m as Qe, o as et, q as tt, L as z, r as it, t as Ie, u as Re, G as st, v as nt, b as Fe, a as rt } from "../../../ol-q6vTiF_t.js";
|
|
4
4
|
import { T as Q, g as F, c as ot, e as Te, B as ne, E as ee, a as at, F as Ae, t as ht, s as be, b as ct, l as q, u as oe } from "../../../has-9_asnBxn.js";
|
|
5
5
|
import { c as xe } from "../../../Text-BT5kPHOo.js";
|
|
6
6
|
import { defaultStyle as lt, selectStyleFunction as dt, markerStyle as ut } from "./style.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { VerticalButton as m, MiniButton as c } from "./styled.js";
|
|
3
|
-
import { I as e } from "../../IconButton-
|
|
3
|
+
import { I as e } from "../../IconButton-2FRFauye.js";
|
|
4
4
|
const a = ({
|
|
5
5
|
variant: i = "default",
|
|
6
6
|
startIcon: f,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "lodash";
|
|
2
2
|
import "../../../Source-CnCcu5UP.js";
|
|
3
|
-
import { x as K, c as n, D as T, E as i, b as p, a as u, z as M, y as L, d as l, w as k, B as W, g as f, J as g, A as x, H as C } from "../../../ol-
|
|
3
|
+
import { x as K, c as n, D as T, E as i, b as p, a as u, z as M, y as L, d as l, w as k, B as W, g as f, J as g, A as x, H as C } from "../../../ol-q6vTiF_t.js";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "./kml.js";
|
|
6
|
-
import "
|
|
6
|
+
import "../styled.js";
|
|
7
7
|
import "./wkt.js";
|
|
8
8
|
import "../../../Text-BT5kPHOo.js";
|
|
9
9
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "./logic.js";
|
|
4
|
-
import "
|
|
5
|
-
import { O as a } from "../../index-
|
|
4
|
+
import "./styled.js";
|
|
5
|
+
import { O as a } from "../../index-JrtqxUdI.js";
|
|
6
6
|
export {
|
|
7
7
|
a as default
|
|
8
8
|
};
|
|
@@ -1,8 +1,91 @@
|
|
|
1
|
-
import "../../Text-BT5kPHOo.js";
|
|
2
|
-
import {
|
|
1
|
+
import { S as r, F as t, a, C as s, I as c, T as f } from "../../Text-BT5kPHOo.js";
|
|
2
|
+
import { s as d } from "../../styled-CHMAYxVs.js";
|
|
3
|
+
const i = 0.4, g = d("div")(
|
|
4
|
+
({ theme: o, cssPosition: n = "absolute" }) => ({
|
|
5
|
+
position: n,
|
|
6
|
+
width: "100%",
|
|
7
|
+
height: "100%",
|
|
8
|
+
// minHeight: 500,
|
|
9
|
+
backgroundColor: o.palette.background.paper,
|
|
10
|
+
"& .ol-zoom": {
|
|
11
|
+
backgroundColor: "transparent",
|
|
12
|
+
"& button": {
|
|
13
|
+
borderRadius: "50%",
|
|
14
|
+
fontSize: 20,
|
|
15
|
+
width: 34,
|
|
16
|
+
height: 34,
|
|
17
|
+
marginTop: 3
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
), p = new r({
|
|
22
|
+
fill: new t({
|
|
23
|
+
color: "rgba(255, 255, 255, 0.2)"
|
|
24
|
+
}),
|
|
25
|
+
stroke: new a({
|
|
26
|
+
color: "#2daae1",
|
|
27
|
+
width: 2
|
|
28
|
+
}),
|
|
29
|
+
image: new s({
|
|
30
|
+
radius: 7,
|
|
31
|
+
fill: new t({
|
|
32
|
+
color: "#2daae1"
|
|
33
|
+
})
|
|
34
|
+
})
|
|
35
|
+
}), w = new r({
|
|
36
|
+
fill: new t({
|
|
37
|
+
color: "rgba(255, 255, 255, 0.4)"
|
|
38
|
+
}),
|
|
39
|
+
stroke: new a({
|
|
40
|
+
color: "#0f70b7",
|
|
41
|
+
width: 2
|
|
42
|
+
}),
|
|
43
|
+
image: new s({
|
|
44
|
+
radius: 7,
|
|
45
|
+
fill: new t({
|
|
46
|
+
color: "#0f70b7"
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
}), b = (o) => {
|
|
50
|
+
const n = o.get("icon");
|
|
51
|
+
if (n)
|
|
52
|
+
return new r({
|
|
53
|
+
image: new c({
|
|
54
|
+
anchor: [0.5, 0.5],
|
|
55
|
+
src: n,
|
|
56
|
+
scale: i
|
|
57
|
+
}),
|
|
58
|
+
zIndex: 2
|
|
59
|
+
});
|
|
60
|
+
const e = o.get("features");
|
|
61
|
+
if (e) {
|
|
62
|
+
const l = e.length > 1 ? e[0].get("clusterIcon") : e[0].get("icon");
|
|
63
|
+
if (l)
|
|
64
|
+
return new r({
|
|
65
|
+
image: new c({
|
|
66
|
+
anchor: [0.5, 0.5],
|
|
67
|
+
src: l,
|
|
68
|
+
scale: i
|
|
69
|
+
}),
|
|
70
|
+
...e.length > 1 && {
|
|
71
|
+
text: new f({
|
|
72
|
+
text: e.length.toString(),
|
|
73
|
+
font: "14px sans-serif",
|
|
74
|
+
fill: new t({
|
|
75
|
+
color: "#fff"
|
|
76
|
+
})
|
|
77
|
+
})
|
|
78
|
+
},
|
|
79
|
+
zIndex: 2
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return w;
|
|
83
|
+
}, m = {
|
|
84
|
+
Container: g
|
|
85
|
+
};
|
|
3
86
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
87
|
+
m as default,
|
|
88
|
+
p as defaultStyle,
|
|
89
|
+
b as selectStyleFunction,
|
|
90
|
+
w as selectedStyle
|
|
8
91
|
};
|
|
@@ -1,76 +1,147 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Close as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import k, { useState as O } from "react";
|
|
3
|
+
import { Close as m, Search as u } from "@mui/icons-material";
|
|
4
|
+
import { FilledInput as b, Input as R } from "@mui/material";
|
|
5
|
+
import { F as _, I as j, a as g } from "../../FormControl-Cj5nc-Nv.js";
|
|
6
|
+
import { O as v } from "../../OutlinedInput-CnzESIDi.js";
|
|
7
|
+
import { I as t } from "../../IconButton-2FRFauye.js";
|
|
7
8
|
const z = ({
|
|
8
|
-
defaultValue:
|
|
9
|
-
label:
|
|
10
|
-
placeholder:
|
|
11
|
-
disableLabel:
|
|
12
|
-
fullWidth:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
o
|
|
9
|
+
defaultValue: x = "",
|
|
10
|
+
label: C = "Search",
|
|
11
|
+
placeholder: i,
|
|
12
|
+
disableLabel: I = !1,
|
|
13
|
+
fullWidth: w = !1,
|
|
14
|
+
variant: l = "outlined",
|
|
15
|
+
size: A = "small",
|
|
16
|
+
iconSize: n = "medium",
|
|
17
|
+
sx: D,
|
|
18
|
+
onChange: y,
|
|
19
|
+
onSubmit: a
|
|
20
|
+
}, F) => {
|
|
21
|
+
const [r, h] = O(x), c = (o) => {
|
|
22
|
+
h(o.target.value), y && y(o.target.value);
|
|
23
|
+
}, d = (o) => {
|
|
24
|
+
a && a(r);
|
|
25
|
+
}, p = (o) => {
|
|
26
|
+
o.key === "Enter" && d();
|
|
27
|
+
}, K = () => {
|
|
28
|
+
h("");
|
|
26
29
|
};
|
|
27
|
-
|
|
30
|
+
k.useImperativeHandle(F, () => ({
|
|
28
31
|
reset() {
|
|
29
|
-
|
|
32
|
+
K();
|
|
30
33
|
}
|
|
31
34
|
}));
|
|
32
|
-
const
|
|
33
|
-
|
|
35
|
+
const f = () => {
|
|
36
|
+
h(""), a && a("");
|
|
34
37
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
!
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
|
|
38
|
+
return /* @__PURE__ */ s(_, { sx: D, size: A, variant: l, fullWidth: w, children: [
|
|
39
|
+
!I && /* @__PURE__ */ e(j, { htmlFor: "search-input", children: C }),
|
|
40
|
+
l === "outlined" && /* @__PURE__ */ e(
|
|
41
|
+
v,
|
|
39
42
|
{
|
|
40
43
|
id: "search-input",
|
|
41
44
|
type: "text",
|
|
42
|
-
label:
|
|
43
|
-
value:
|
|
44
|
-
placeholder:
|
|
45
|
-
onChange:
|
|
46
|
-
onKeyDown:
|
|
47
|
-
endAdornment: /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
label: I ? "" : C,
|
|
46
|
+
value: r,
|
|
47
|
+
placeholder: i,
|
|
48
|
+
onChange: c,
|
|
49
|
+
onKeyDown: p,
|
|
50
|
+
endAdornment: /* @__PURE__ */ s(g, { position: "end", children: [
|
|
51
|
+
r.length > 0 && /* @__PURE__ */ e(
|
|
52
|
+
t,
|
|
50
53
|
{
|
|
51
54
|
"aria-label": "search",
|
|
52
|
-
onClick:
|
|
55
|
+
onClick: f,
|
|
53
56
|
edge: "end",
|
|
54
|
-
size:
|
|
57
|
+
size: n,
|
|
55
58
|
color: "error",
|
|
56
|
-
children: /* @__PURE__ */ e(
|
|
59
|
+
children: /* @__PURE__ */ e(m, { fontSize: n })
|
|
57
60
|
}
|
|
58
61
|
),
|
|
59
62
|
/* @__PURE__ */ e(
|
|
60
|
-
|
|
63
|
+
t,
|
|
61
64
|
{
|
|
62
65
|
"aria-label": "search",
|
|
63
66
|
onClick: d,
|
|
64
67
|
edge: "end",
|
|
65
|
-
size:
|
|
66
|
-
children: /* @__PURE__ */ e(
|
|
68
|
+
size: n,
|
|
69
|
+
children: /* @__PURE__ */ e(u, { fontSize: n })
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
] })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
l === "filled" && /* @__PURE__ */ e(
|
|
76
|
+
b,
|
|
77
|
+
{
|
|
78
|
+
id: "search-input",
|
|
79
|
+
type: "text",
|
|
80
|
+
value: r,
|
|
81
|
+
placeholder: i,
|
|
82
|
+
onChange: c,
|
|
83
|
+
onKeyDown: p,
|
|
84
|
+
endAdornment: /* @__PURE__ */ s(g, { position: "end", children: [
|
|
85
|
+
r.length > 0 && /* @__PURE__ */ e(
|
|
86
|
+
t,
|
|
87
|
+
{
|
|
88
|
+
"aria-label": "search",
|
|
89
|
+
onClick: f,
|
|
90
|
+
edge: "end",
|
|
91
|
+
size: n,
|
|
92
|
+
color: "error",
|
|
93
|
+
children: /* @__PURE__ */ e(m, { fontSize: n })
|
|
94
|
+
}
|
|
95
|
+
),
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
t,
|
|
98
|
+
{
|
|
99
|
+
"aria-label": "search",
|
|
100
|
+
onClick: d,
|
|
101
|
+
edge: "end",
|
|
102
|
+
size: n,
|
|
103
|
+
children: /* @__PURE__ */ e(u, { fontSize: n })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] })
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
l === "standard" && /* @__PURE__ */ e(
|
|
110
|
+
R,
|
|
111
|
+
{
|
|
112
|
+
id: "search-input",
|
|
113
|
+
type: "text",
|
|
114
|
+
value: r,
|
|
115
|
+
placeholder: i,
|
|
116
|
+
onChange: c,
|
|
117
|
+
onKeyDown: p,
|
|
118
|
+
endAdornment: /* @__PURE__ */ s(g, { position: "end", children: [
|
|
119
|
+
r.length > 0 && /* @__PURE__ */ e(
|
|
120
|
+
t,
|
|
121
|
+
{
|
|
122
|
+
"aria-label": "search",
|
|
123
|
+
onClick: f,
|
|
124
|
+
edge: "end",
|
|
125
|
+
size: n,
|
|
126
|
+
color: "error",
|
|
127
|
+
children: /* @__PURE__ */ e(m, { fontSize: n })
|
|
128
|
+
}
|
|
129
|
+
),
|
|
130
|
+
/* @__PURE__ */ e(
|
|
131
|
+
t,
|
|
132
|
+
{
|
|
133
|
+
"aria-label": "search",
|
|
134
|
+
onClick: d,
|
|
135
|
+
edge: "end",
|
|
136
|
+
size: n,
|
|
137
|
+
children: /* @__PURE__ */ e(u, { fontSize: n })
|
|
67
138
|
}
|
|
68
139
|
)
|
|
69
140
|
] })
|
|
70
141
|
}
|
|
71
142
|
)
|
|
72
143
|
] });
|
|
73
|
-
},
|
|
144
|
+
}, L = k.forwardRef(z);
|
|
74
145
|
export {
|
|
75
|
-
|
|
146
|
+
L as SearchInput
|
|
76
147
|
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import a from "lodash";
|
|
3
|
+
import { CollapsibleCard as g } from "../collapsible-card/index.js";
|
|
4
|
+
import p from "./property.js";
|
|
5
|
+
const K = ({
|
|
6
|
+
values: f,
|
|
7
|
+
templates: d,
|
|
8
|
+
onChange: u
|
|
9
|
+
}) => {
|
|
10
|
+
const m = (t) => (r) => {
|
|
11
|
+
if (t) {
|
|
12
|
+
let e = f.find((l) => l.templateKey === t);
|
|
13
|
+
if (e) {
|
|
14
|
+
const l = a.keys(r)[0];
|
|
15
|
+
let i = e.filters.findIndex(
|
|
16
|
+
(o) => o.fieldName === l
|
|
17
|
+
);
|
|
18
|
+
const n = a.get(r, l);
|
|
19
|
+
a.values(n).filter((o) => o !== "").length === 0 && i !== -1 ? e.filters.splice(i, 1) : i !== -1 ? e.filters[i] = {
|
|
20
|
+
fieldName: l,
|
|
21
|
+
value: n
|
|
22
|
+
} : e.filters.push({
|
|
23
|
+
fieldName: l,
|
|
24
|
+
value: n
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
u(f);
|
|
28
|
+
} else console.warn("Template could not be found!");
|
|
29
|
+
};
|
|
30
|
+
if (f.length === 1) {
|
|
31
|
+
const t = f[0], r = d.get(t.templateKey);
|
|
32
|
+
return /* @__PURE__ */ s(c, { children: r == null ? void 0 : r.properties.map((e, l) => {
|
|
33
|
+
let i = {};
|
|
34
|
+
const n = t.filters.find(
|
|
35
|
+
(o) => o.fieldName === e.propertyId
|
|
36
|
+
);
|
|
37
|
+
return n && (i = n.value), /* @__PURE__ */ s(
|
|
38
|
+
p,
|
|
39
|
+
{
|
|
40
|
+
property: e,
|
|
41
|
+
value: i,
|
|
42
|
+
size: "small",
|
|
43
|
+
onChange: m(r == null ? void 0 : r.templateKey)
|
|
44
|
+
},
|
|
45
|
+
l
|
|
46
|
+
);
|
|
47
|
+
}) });
|
|
48
|
+
}
|
|
49
|
+
return f.map((t, r) => {
|
|
50
|
+
const e = d.get(t.templateKey);
|
|
51
|
+
return /* @__PURE__ */ s(
|
|
52
|
+
g,
|
|
53
|
+
{
|
|
54
|
+
header: e == null ? void 0 : e.name,
|
|
55
|
+
content: /* @__PURE__ */ s(c, { children: e == null ? void 0 : e.properties.map((l, i) => {
|
|
56
|
+
let n = {};
|
|
57
|
+
const o = t.filters.find(
|
|
58
|
+
(h) => h.fieldName === l.propertyId
|
|
59
|
+
);
|
|
60
|
+
return o && (n = o.value), /* @__PURE__ */ s(
|
|
61
|
+
p,
|
|
62
|
+
{
|
|
63
|
+
property: l,
|
|
64
|
+
value: n,
|
|
65
|
+
size: "small",
|
|
66
|
+
onChange: m(e == null ? void 0 : e.templateKey)
|
|
67
|
+
},
|
|
68
|
+
i
|
|
69
|
+
);
|
|
70
|
+
}) })
|
|
71
|
+
},
|
|
72
|
+
r
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
K as TemplatePropertyFilters
|
|
78
|
+
};
|