@hybridcore/ui 1.6.11 → 1.6.13
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/{AnimatedTheme-D3VZKKNV.js → AnimatedTheme-ktdO3Bel.js} +6 -6
- package/dist/{AxisRenderer-Doyw-FTI.js → AxisRenderer-BCQoUJw6.js} +6 -6
- package/dist/{AxisRendererY-BylCU67e.js → AxisRendererY-AXWvGU6r.js} +3 -3
- package/dist/{Bullet-C6357hTv.js → Bullet-Djj7Vs9T.js} +1 -1
- package/dist/{Button-DGOT8RcT.js → Button-BLY4PVJC.js} +3 -3
- package/dist/{CategoryAxis-B5uTZjhL.js → CategoryAxis-B6NqW8qd.js} +3 -3
- package/dist/{Circle-DhzVdFBd.js → Circle-BnfBNKBD.js} +1 -1
- package/dist/{ColorSet-DGLMpbL3.js → ColorSet-cyPmWGwh.js} +1 -1
- package/dist/{ColumnSeries-CqJ-563p.js → ColumnSeries-CtRTsn-E.js} +28 -28
- package/dist/{DateAxis-lJZjbAS-.js → DateAxis-DEXKps1S.js} +4 -4
- package/dist/{Entity-4Lr2piVN.js → Entity-BJCuhdq_.js} +14 -14
- package/dist/GaplessDateAxis-B2g2jgSG.js +376 -0
- package/dist/{Hierarchy-DPEcTr0v.js → Hierarchy-CEOK8Gzh.js} +4 -4
- package/dist/{Legend-CTb6rZz_.js → Legend-CFvQiIfn.js} +4 -4
- package/dist/{LineSeries-Dg1aytHA.js → LineSeries-D_IL2qGF.js} +4 -4
- package/dist/{LinearGradient-D1hzMjaW.js → LinearGradient-CxQyCSEB.js} +2 -2
- package/dist/{PieSeries-C9YUWMnA.js → PieSeries-CMH0Z7pz.js} +8 -8
- package/dist/{RoundedRectangle-B23Oh_r6.js → RoundedRectangle-BKLX1LKM.js} +2 -2
- package/dist/{Scrollbar-CSoXoZSe.js → Scrollbar-CTI7_8Qw.js} +4 -4
- package/dist/{Slice-CIP7Vmzu.js → Slice-BUncQh1B.js} +11 -11
- package/dist/{Tick-CRu6rQQy.js → Tick--VhF0xlz.js} +2 -2
- package/dist/{Tooltip-RhAldW7s.js → Tooltip-vyZRZWih.js} +1 -1
- package/dist/{XYCursor-Z-Ral42q.js → XYCursor-CVUSpqb9.js} +3 -3
- package/dist/{ZoomableContainer-D1laxHnA.js → ZoomableContainer-Ca_pDVYQ.js} +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/components/button/styled.js +1 -1
- package/dist/components/charts/_common/format.js +149 -41
- package/dist/components/charts/_common/tooltip.js +2 -2
- package/dist/components/charts/_common/utils.js +16 -11
- package/dist/components/charts/candlestick/logic.js +34 -35
- package/dist/components/charts/column-line-mix/logic.js +40 -41
- package/dist/components/charts/donut-chart/logic.js +4 -4
- package/dist/components/charts/drill-down-treemap/logic.js +5 -5
- package/dist/components/charts/drill-down-voronoi-treemap/logic.js +5 -5
- package/dist/components/charts/forecast-cone/logic.js +134 -120
- package/dist/components/charts/heatmap/logic.js +9 -9
- package/dist/components/charts/highlighting-line-data/logic.js +10 -10
- package/dist/components/charts/line/logic.js +19 -20
- package/dist/components/charts/logaritmic-scale/logic.js +30 -31
- package/dist/components/charts/multiple-value-axes/logic.js +18 -19
- package/dist/components/charts/nested-pie/logic.js +3 -3
- package/dist/components/charts/packed-circles/logic.js +7 -7
- package/dist/components/charts/pie-chart/logic.js +4 -4
- package/dist/components/charts/stacked-area-radar/logic.js +9 -9
- package/dist/components/charts/stacked-column-chart/logic.js +10 -10
- package/dist/components/charts/xy-chart/logic.js +28 -29
- package/dist/components/collapsible-card/index.js +21 -30
- package/dist/components/collapsible-card/styled.js +16 -14
- package/dist/components/color-picker/index.js +2227 -3357
- package/dist/components/color-picker/styled.js +87 -7
- package/dist/components/confirm/dialog.js +89 -8
- package/dist/components/confirm/index.js +1 -1
- package/dist/components/data-map/index.js +1 -1
- package/dist/components/data-map/logic.js +20 -20
- package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
- package/dist/components/date-picker-with-custom-range/index.js +86 -7
- package/dist/components/date-range-picker/index.js +464 -452
- package/dist/components/document-viewer/components/viewer/index.js +1 -1
- package/dist/components/duration-select/index.js +10 -10
- package/dist/components/duration-select/styled.js +1 -1
- package/dist/components/geometry-picker/coordinate/index.js +14 -14
- 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/kml/index.js +11 -11
- package/dist/components/geometry-picker/map/logic.js +145 -3656
- package/dist/components/geometry-picker/map/style.js +18 -17
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
- package/dist/components/heat-map/index.js +1 -1
- package/dist/components/heat-map/logic.js +77 -1924
- package/dist/components/instance-hierarchy-table/styled.js +18 -16
- package/dist/components/map/helpers/mapbox.js +17 -15
- package/dist/components/map/helpers/ol.js +386 -27
- package/dist/components/map/index.js +11 -10
- package/dist/components/map/logic.js +22 -22
- package/dist/components/map/styled.js +31 -27
- package/dist/components/metric-card/MetricChart.js +9 -9
- package/dist/components/metric-card/logic.js +46 -49
- package/dist/components/phone-input/index.js +10 -9
- package/dist/components/property-mapping/index.js +1 -1
- package/dist/components/prr-map/index.js +1 -1
- package/dist/components/prr-map/logic.js +27 -26
- package/dist/components/range-selector/styled.js +65 -4228
- package/dist/components/raster-grid-map/index.js +1 -1
- package/dist/components/raster-grid-map/logic.js +60 -57
- package/dist/components/simple-pivot-table/index.js +17 -17
- package/dist/components/simple-pivot-table/logic.js +67 -76
- package/dist/components/sortable-list/index.js +1091 -1264
- package/dist/components/template-form/components/property-list/index.js +36 -33
- package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
- package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
- package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
- package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
- package/dist/components/tree-select/index.js +16 -16
- package/dist/index.esm-UfGMjYOL.js +197 -0
- package/dist/main.d.ts +67 -8
- package/dist/main.js +176 -175
- package/package.json +1 -1
- package/dist/AccordionSummary-CJppWeqF.js +0 -781
- package/dist/Add-CqcD1PWb.js +0 -403
- package/dist/Box-DqUMmZjL.js +0 -31
- package/dist/Button-C5yquWAB.js +0 -357
- package/dist/ButtonBase-BEF7oTOe.js +0 -887
- package/dist/DataProcessor-WXzhvIg6.js +0 -83
- package/dist/Delete-BdyYpINH.js +0 -23
- package/dist/DialogContent-BvVjD9z3.js +0 -523
- package/dist/FormGroup-CpBsIyYR.js +0 -89
- package/dist/GaplessDateAxis-DowssQ6y.js +0 -296
- package/dist/IconButton-BoGwbvrP.js +0 -184
- package/dist/InputLabel-Dd8RrneV.js +0 -341
- package/dist/MenuItem-DwqJqzuM.js +0 -233
- package/dist/Modal-MUZygjmQ.js +0 -1158
- package/dist/Paper-BkQLdsCI.js +0 -582
- package/dist/Select-DHUl_uG3.js +0 -3916
- package/dist/Source-BSZST_GH.js +0 -4410
- package/dist/SwitchBase-DTndTqI8.js +0 -235
- package/dist/Text-ChJRuaD8.js +0 -2197
- package/dist/TextField-e2oKaUN1.js +0 -669
- package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
- package/dist/Typography-DgsSLCFC.js +0 -178
- package/dist/Vector-BmuhQO4p.js +0 -3606
- package/dist/Vector-DfTqQEln.js +0 -1735
- package/dist/WKT-2wsDT-nq.js +0 -2310
- package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
- package/dist/assets/index3.css +0 -1
- package/dist/assets/index4.css +0 -1
- package/dist/clsx-OuTLNxxd.js +0 -16
- package/dist/createChainedFunction-C0nujS3O.js +0 -9
- package/dist/createSvgIcon-Ch_cT8az.js +0 -185
- package/dist/createSvgIcon-DuDuASu1.js +0 -62
- package/dist/debounce-46wSf_lW.js +0 -15
- package/dist/dialog-BYRnCztH.js +0 -154
- package/dist/formControlState-vgaj2ksH.js +0 -10
- package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
- package/dist/index-DH6qsPBn.js +0 -153
- package/dist/index-e9xTIYWt.js +0 -1934
- package/dist/index.esm-BLLrbTzY.js +0 -318
- package/dist/math-Bvt2Ubuz.js +0 -704
- package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
- package/dist/ol-yOE-NV0X.js +0 -7465
- package/dist/ownerWindow-wg6foiOE.js +0 -10
- package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
- package/dist/styled-SoqbyrkW.js +0 -350
- package/dist/unsupportedProp-DuqR2hj9.js +0 -36
- package/dist/useControlled-BYdyS7Pn.js +0 -31
- package/dist/useFormControl-CatNKXAi.js +0 -10
- package/dist/useId-BW-oWmul.js +0 -19
- package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
- package/dist/useSlot-B_Q4vnX5.js +0 -42
|
@@ -1,62 +1,65 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import n from "@mui/material/Alert";
|
|
3
|
+
import a from "@mui/material/AlertTitle";
|
|
4
|
+
import d from "@mui/material/Box";
|
|
5
|
+
import m from "@mui/material/Button";
|
|
6
|
+
import c from "@mui/material/Dialog";
|
|
7
|
+
import s from "@mui/material/DialogContent";
|
|
8
|
+
import p from "@mui/material/DialogTitle";
|
|
9
|
+
import g from "@mui/material/Typography";
|
|
10
|
+
import { DataGrid as h } from "@mui/x-data-grid";
|
|
11
|
+
import f from "@mui/icons-material/Add";
|
|
12
|
+
import u from "./recognition-property-list-columns.js";
|
|
13
|
+
import y from "./recognition-property-list-form.js";
|
|
14
|
+
import b from "./recognition-property-list-logic.js";
|
|
15
|
+
const j = (r) => {
|
|
16
|
+
const { state: l, action: o } = b(r);
|
|
17
|
+
return /* @__PURE__ */ i(d, { children: [
|
|
18
|
+
/* @__PURE__ */ e(g, { variant: "h6", marginY: 2, children: "Recognition Property List" }),
|
|
19
|
+
r.list.length > 0 ? /* @__PURE__ */ e(
|
|
20
|
+
h,
|
|
18
21
|
{
|
|
19
|
-
rows:
|
|
20
|
-
columns:
|
|
21
|
-
onEdit:
|
|
22
|
-
onDelete:
|
|
22
|
+
rows: r.list,
|
|
23
|
+
columns: u({
|
|
24
|
+
onEdit: o.handleOnEditClick,
|
|
25
|
+
onDelete: o.handleOnDeleteClick
|
|
23
26
|
}),
|
|
24
|
-
getRowId: (
|
|
27
|
+
getRowId: (t) => `${t.owner}-${t.termValue}-${t.termMatch}-${t.score}-${t.type}`,
|
|
25
28
|
autoHeight: !0
|
|
26
29
|
}
|
|
27
|
-
) : /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */ e(
|
|
30
|
+
) : /* @__PURE__ */ i(n, { severity: "info", children: [
|
|
31
|
+
/* @__PURE__ */ e(a, { children: "No Recognition Property Added!" }),
|
|
29
32
|
"Add least one recognition property before save the template!"
|
|
30
33
|
] }),
|
|
31
34
|
/* @__PURE__ */ e(
|
|
32
|
-
|
|
35
|
+
m,
|
|
33
36
|
{
|
|
34
37
|
color: "primary",
|
|
35
|
-
onClick:
|
|
38
|
+
onClick: o.handleOnAddClick,
|
|
36
39
|
sx: { mt: 2 },
|
|
37
|
-
startIcon: /* @__PURE__ */ e(
|
|
40
|
+
startIcon: /* @__PURE__ */ e(f, {}),
|
|
38
41
|
children: "Add Recognition Property"
|
|
39
42
|
}
|
|
40
43
|
),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
|
|
44
|
+
/* @__PURE__ */ i(
|
|
45
|
+
c,
|
|
43
46
|
{
|
|
44
47
|
open: l.dialog.isOpen,
|
|
45
|
-
onClose:
|
|
48
|
+
onClose: o.dialog.close,
|
|
46
49
|
"aria-labelledby": "alert-dialog-title",
|
|
47
50
|
"aria-describedby": "alert-dialog-description",
|
|
48
51
|
fullWidth: !0,
|
|
49
52
|
maxWidth: "sm",
|
|
50
53
|
scroll: "body",
|
|
51
54
|
children: [
|
|
52
|
-
/* @__PURE__ */ e(
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
-
|
|
55
|
+
/* @__PURE__ */ e(p, { id: "alert-dialog-title", children: "Add Recognition Property" }),
|
|
56
|
+
/* @__PURE__ */ e(s, { className: "pb-30", children: /* @__PURE__ */ e(
|
|
57
|
+
y,
|
|
55
58
|
{
|
|
56
59
|
defaultValues: l.recPropertyForm.defaultValues,
|
|
57
|
-
getFormValues:
|
|
58
|
-
onSubmit:
|
|
59
|
-
onCancel:
|
|
60
|
+
getFormValues: r.getFormValues,
|
|
61
|
+
onSubmit: o.handleSubmit,
|
|
62
|
+
onCancel: o.dialog.close
|
|
60
63
|
}
|
|
61
64
|
) })
|
|
62
65
|
]
|
|
@@ -65,5 +68,5 @@ const L = (i) => {
|
|
|
65
68
|
] });
|
|
66
69
|
};
|
|
67
70
|
export {
|
|
68
|
-
|
|
71
|
+
j as RecognitionPropertyList
|
|
69
72
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsxs as o, Fragment as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import d from "@mui/material/IconButton";
|
|
3
|
+
import m from "@mui/icons-material/Edit";
|
|
4
|
+
import a from "@mui/icons-material/Delete";
|
|
5
|
+
const c = (r) => [
|
|
5
6
|
{ field: "ownerType", headerName: "Owner Type", width: 120 },
|
|
6
7
|
{ field: "owner", headerName: "Owner", width: 120 },
|
|
7
8
|
{
|
|
@@ -25,26 +26,26 @@ const h = (r) => [
|
|
|
25
26
|
width: 120,
|
|
26
27
|
sortable: !1,
|
|
27
28
|
filterable: !1,
|
|
28
|
-
renderCell: (
|
|
29
|
+
renderCell: (i) => /* @__PURE__ */ o(t, { children: [
|
|
29
30
|
/* @__PURE__ */ e(
|
|
30
31
|
d,
|
|
31
32
|
{
|
|
32
33
|
size: "medium",
|
|
33
|
-
onClick: () => r.onEdit(
|
|
34
|
-
children: /* @__PURE__ */ e(
|
|
34
|
+
onClick: () => r.onEdit(i.row),
|
|
35
|
+
children: /* @__PURE__ */ e(m, { color: "secondary" })
|
|
35
36
|
}
|
|
36
37
|
),
|
|
37
38
|
/* @__PURE__ */ e(
|
|
38
39
|
d,
|
|
39
40
|
{
|
|
40
41
|
size: "medium",
|
|
41
|
-
onClick: () => r.onDelete(
|
|
42
|
-
children: /* @__PURE__ */ e(
|
|
42
|
+
onClick: () => r.onDelete(i.row),
|
|
43
|
+
children: /* @__PURE__ */ e(a, {})
|
|
43
44
|
}
|
|
44
45
|
)
|
|
45
46
|
] })
|
|
46
47
|
}
|
|
47
48
|
];
|
|
48
49
|
export {
|
|
49
|
-
|
|
50
|
+
c as default
|
|
50
51
|
};
|
|
@@ -1,71 +1,63 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs as o, Fragment as P, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import i from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value: !0
|
|
15
|
-
});
|
|
16
|
-
var w = p.default = void 0, N = q(g()), W = V;
|
|
17
|
-
w = p.default = (0, N.default)(/* @__PURE__ */ (0, W.jsx)("path", {
|
|
18
|
-
d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"
|
|
19
|
-
}), "Save");
|
|
20
|
-
function L({
|
|
21
|
-
defaultValues: x = {
|
|
3
|
+
import V from "@mui/material/Box";
|
|
4
|
+
import h from "@mui/material/Button";
|
|
5
|
+
import s from "@mui/material/FormControl";
|
|
6
|
+
import d from "@mui/material/InputLabel";
|
|
7
|
+
import m from "@mui/material/MenuItem";
|
|
8
|
+
import u from "@mui/material/Select";
|
|
9
|
+
import f from "@mui/material/TextField";
|
|
10
|
+
import _ from "@mui/icons-material/Save";
|
|
11
|
+
import { RECOGNITION_PROPERTY_OWNER_TYPE as T, RECOGNITION_PROPERTY_TYPE as b, RECOGNITION_PROPERTY_TERM_MATCH as y } from "../../../../constants/index.js";
|
|
12
|
+
function G({
|
|
13
|
+
defaultValues: w = {
|
|
22
14
|
owner: "",
|
|
23
|
-
ownerType:
|
|
24
|
-
type:
|
|
15
|
+
ownerType: T[0],
|
|
16
|
+
type: b[0],
|
|
25
17
|
termValue: "",
|
|
26
|
-
termMatch:
|
|
18
|
+
termMatch: y[0],
|
|
27
19
|
score: 0
|
|
28
20
|
},
|
|
29
|
-
getFormValues:
|
|
21
|
+
getFormValues: v,
|
|
30
22
|
onSubmit: E,
|
|
31
|
-
onCancel:
|
|
23
|
+
onCancel: x
|
|
32
24
|
}) {
|
|
33
|
-
const [r,
|
|
25
|
+
const [r, p] = i.useState(w), [O, R] = i.useState([]), [a, c] = i.useState({
|
|
34
26
|
termValue: !1,
|
|
35
27
|
score: !1
|
|
36
28
|
}), n = (e) => {
|
|
37
|
-
|
|
38
|
-
...
|
|
29
|
+
p((l) => ({
|
|
30
|
+
...l,
|
|
39
31
|
[e.target.name]: e.target.type === "checkbox" ? e.target.checked : e.target.value
|
|
40
32
|
}));
|
|
41
|
-
},
|
|
33
|
+
}, I = () => {
|
|
42
34
|
if (!r.termValue) {
|
|
43
|
-
|
|
35
|
+
c({ ...a, termValue: !0 });
|
|
44
36
|
return;
|
|
45
37
|
}
|
|
46
38
|
if (!r.score) {
|
|
47
|
-
|
|
39
|
+
c({ ...a, score: !0 });
|
|
48
40
|
return;
|
|
49
41
|
}
|
|
50
42
|
E(r);
|
|
51
43
|
};
|
|
52
|
-
return i.useEffect(() => (
|
|
53
|
-
}), [r.termValue]), i.useEffect(() => (
|
|
44
|
+
return i.useEffect(() => (a.termValue && r.termValue && c({ ...a, termValue: !1 }), () => {
|
|
45
|
+
}), [r.termValue]), i.useEffect(() => (a.score && r.score && c({ ...a, score: !1 }), () => {
|
|
54
46
|
}), [r.score]), i.useEffect(() => {
|
|
55
47
|
if (r.ownerType === "PROPERTY") {
|
|
56
|
-
const e =
|
|
57
|
-
|
|
48
|
+
const e = v("properties");
|
|
49
|
+
R(e);
|
|
58
50
|
}
|
|
59
|
-
return r.ownerType === "EVENT" && r.owner !== "" &&
|
|
51
|
+
return r.ownerType === "EVENT" && r.owner !== "" && p((e) => ({
|
|
60
52
|
...e,
|
|
61
53
|
owner: ""
|
|
62
54
|
})), () => {
|
|
63
55
|
};
|
|
64
|
-
}, [r.ownerType]), /* @__PURE__ */ o(
|
|
65
|
-
/* @__PURE__ */ o(
|
|
66
|
-
/* @__PURE__ */ t(
|
|
56
|
+
}, [r.ownerType]), /* @__PURE__ */ o(P, { children: [
|
|
57
|
+
/* @__PURE__ */ o(s, { fullWidth: !0, variant: "standard", sx: { mb: 2 }, children: [
|
|
58
|
+
/* @__PURE__ */ t(d, { id: "owner-type-select-label", children: "Owner Type" }),
|
|
67
59
|
/* @__PURE__ */ t(
|
|
68
|
-
|
|
60
|
+
u,
|
|
69
61
|
{
|
|
70
62
|
label: "Owner Type",
|
|
71
63
|
name: "ownerType",
|
|
@@ -73,14 +65,14 @@ function L({
|
|
|
73
65
|
id: "owner-type-select",
|
|
74
66
|
value: r.ownerType,
|
|
75
67
|
onChange: n,
|
|
76
|
-
children:
|
|
68
|
+
children: T.map((e, l) => /* @__PURE__ */ t(m, { value: e, children: e }, l))
|
|
77
69
|
}
|
|
78
70
|
)
|
|
79
71
|
] }),
|
|
80
|
-
r.ownerType === "PROPERTY" && /* @__PURE__ */ o(
|
|
81
|
-
/* @__PURE__ */ t(
|
|
72
|
+
r.ownerType === "PROPERTY" && /* @__PURE__ */ o(s, { fullWidth: !0, variant: "standard", sx: { mb: 2 }, children: [
|
|
73
|
+
/* @__PURE__ */ t(d, { id: "owner-select-label", children: "Owner" }),
|
|
82
74
|
/* @__PURE__ */ t(
|
|
83
|
-
|
|
75
|
+
u,
|
|
84
76
|
{
|
|
85
77
|
label: "Owner",
|
|
86
78
|
name: "owner",
|
|
@@ -88,14 +80,14 @@ function L({
|
|
|
88
80
|
id: "owner-select",
|
|
89
81
|
value: r.owner,
|
|
90
82
|
onChange: n,
|
|
91
|
-
children:
|
|
83
|
+
children: O.map((e, l) => /* @__PURE__ */ t(m, { value: e.propertyId, children: e.name }, l))
|
|
92
84
|
}
|
|
93
85
|
)
|
|
94
86
|
] }),
|
|
95
|
-
/* @__PURE__ */ o(
|
|
96
|
-
/* @__PURE__ */ t(
|
|
87
|
+
/* @__PURE__ */ o(s, { fullWidth: !0, variant: "standard", sx: { mb: 2 }, children: [
|
|
88
|
+
/* @__PURE__ */ t(d, { id: "type-select-label", children: "Type" }),
|
|
97
89
|
/* @__PURE__ */ t(
|
|
98
|
-
|
|
90
|
+
u,
|
|
99
91
|
{
|
|
100
92
|
label: "Type",
|
|
101
93
|
name: "type",
|
|
@@ -103,14 +95,14 @@ function L({
|
|
|
103
95
|
id: "type-select",
|
|
104
96
|
value: r.type,
|
|
105
97
|
onChange: n,
|
|
106
|
-
children:
|
|
98
|
+
children: b.map((e, l) => /* @__PURE__ */ t(m, { value: e, children: e }, l))
|
|
107
99
|
}
|
|
108
100
|
)
|
|
109
101
|
] }),
|
|
110
|
-
/* @__PURE__ */ o(
|
|
111
|
-
/* @__PURE__ */ t(
|
|
102
|
+
/* @__PURE__ */ o(s, { fullWidth: !0, variant: "standard", sx: { mb: 2 }, children: [
|
|
103
|
+
/* @__PURE__ */ t(d, { id: "term-match-select-label", children: "Term Match" }),
|
|
112
104
|
/* @__PURE__ */ t(
|
|
113
|
-
|
|
105
|
+
u,
|
|
114
106
|
{
|
|
115
107
|
label: "Type",
|
|
116
108
|
name: "termMatch",
|
|
@@ -118,12 +110,12 @@ function L({
|
|
|
118
110
|
id: "term-match-select",
|
|
119
111
|
value: r.termMatch,
|
|
120
112
|
onChange: n,
|
|
121
|
-
children:
|
|
113
|
+
children: y.map((e, l) => /* @__PURE__ */ t(m, { value: e, children: e }, l))
|
|
122
114
|
}
|
|
123
115
|
)
|
|
124
116
|
] }),
|
|
125
117
|
/* @__PURE__ */ t(
|
|
126
|
-
|
|
118
|
+
f,
|
|
127
119
|
{
|
|
128
120
|
label: "Term",
|
|
129
121
|
name: "termValue",
|
|
@@ -133,14 +125,14 @@ function L({
|
|
|
133
125
|
value: r.termValue,
|
|
134
126
|
onChange: n,
|
|
135
127
|
required: !0,
|
|
136
|
-
...
|
|
128
|
+
...a.termValue && {
|
|
137
129
|
error: !0,
|
|
138
130
|
helperText: "This field is required!"
|
|
139
131
|
}
|
|
140
132
|
}
|
|
141
133
|
),
|
|
142
134
|
/* @__PURE__ */ t(
|
|
143
|
-
|
|
135
|
+
f,
|
|
144
136
|
{
|
|
145
137
|
label: "Score",
|
|
146
138
|
name: "score",
|
|
@@ -150,20 +142,20 @@ function L({
|
|
|
150
142
|
value: r.score,
|
|
151
143
|
onChange: n,
|
|
152
144
|
required: !0,
|
|
153
|
-
...
|
|
145
|
+
...a.score && {
|
|
154
146
|
error: !0,
|
|
155
147
|
helperText: "This field is required!"
|
|
156
148
|
}
|
|
157
149
|
}
|
|
158
150
|
),
|
|
159
|
-
/* @__PURE__ */ o(
|
|
160
|
-
/* @__PURE__ */ t(
|
|
151
|
+
/* @__PURE__ */ o(V, { display: "flex", justifyContent: "flex-end", children: [
|
|
152
|
+
/* @__PURE__ */ t(h, { variant: "contained", onClick: x, sx: { marginRight: 2 }, children: "Cancel" }),
|
|
161
153
|
/* @__PURE__ */ t(
|
|
162
|
-
|
|
154
|
+
h,
|
|
163
155
|
{
|
|
164
156
|
variant: "contained",
|
|
165
|
-
startIcon: /* @__PURE__ */ t(
|
|
166
|
-
onClick:
|
|
157
|
+
startIcon: /* @__PURE__ */ t(_, {}),
|
|
158
|
+
onClick: I,
|
|
167
159
|
children: "Save"
|
|
168
160
|
}
|
|
169
161
|
)
|
|
@@ -171,5 +163,5 @@ function L({
|
|
|
171
163
|
] });
|
|
172
164
|
}
|
|
173
165
|
export {
|
|
174
|
-
|
|
166
|
+
G as default
|
|
175
167
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import T from "@mui/material/InputLabel";
|
|
2
3
|
import c from "lodash";
|
|
3
|
-
import { TreeViewFilter as
|
|
4
|
-
import { useTreeSelectLogic as
|
|
5
|
-
import { TreeSelectRoot as
|
|
6
|
-
import { I as O } from "../../InputLabel-Dd8RrneV.js";
|
|
4
|
+
import { TreeViewFilter as f } from "../treeview-filter/index.js";
|
|
5
|
+
import { useTreeSelectLogic as g } from "./logic.js";
|
|
6
|
+
import { TreeSelectRoot as S, TreeSelectLabel as x, TreeSelectFormControl as C, TreeSelectInput as v, TreeSelectMenuItem as I, TreeSelectDialog as W, TreeSelectDialogContent as D, TreeSelectDialogActions as L, TreeSelectConfirmButton as O } from "./styled.js";
|
|
7
7
|
const K = (e) => {
|
|
8
|
-
const { state: h, actions: t } =
|
|
9
|
-
return /* @__PURE__ */ d(
|
|
10
|
-
a === "top" && e.label !== void 0 && /* @__PURE__ */ l(
|
|
11
|
-
/* @__PURE__ */ d(
|
|
12
|
-
a === "default" && e.label !== void 0 && /* @__PURE__ */ l(
|
|
8
|
+
const { state: h, actions: t } = g(e), { ownerState: s, open: u, expanded: m, selectedItems: i, idKey: o, variant: r, labelPosition: a } = h;
|
|
9
|
+
return /* @__PURE__ */ d(S, { ownerState: s, sx: e.sx, children: [
|
|
10
|
+
a === "top" && e.label !== void 0 && /* @__PURE__ */ l(x, { children: e.label }),
|
|
11
|
+
/* @__PURE__ */ d(C, { variant: r, fullWidth: !0, children: [
|
|
12
|
+
a === "default" && e.label !== void 0 && /* @__PURE__ */ l(T, { id: "select-label", children: e.label }),
|
|
13
13
|
/* @__PURE__ */ l(
|
|
14
|
-
|
|
14
|
+
v,
|
|
15
15
|
{
|
|
16
16
|
label: a === "default" ? e.label : void 0,
|
|
17
17
|
variant: r,
|
|
@@ -20,20 +20,20 @@ const K = (e) => {
|
|
|
20
20
|
value: e.selected,
|
|
21
21
|
open: !1,
|
|
22
22
|
onOpen: t.handleOpen,
|
|
23
|
-
children: i.length > 0 && i.map((n, b) => /* @__PURE__ */ l(
|
|
23
|
+
children: i.length > 0 && i.map((n, b) => /* @__PURE__ */ l(I, { value: c.get(n, o) ?? "", children: n == null ? void 0 : n.name }, b))
|
|
24
24
|
}
|
|
25
25
|
)
|
|
26
26
|
] }),
|
|
27
27
|
/* @__PURE__ */ d(
|
|
28
|
-
|
|
28
|
+
W,
|
|
29
29
|
{
|
|
30
30
|
open: u,
|
|
31
31
|
onClose: t.handleClose,
|
|
32
32
|
fullWidth: !0,
|
|
33
33
|
maxWidth: "sm",
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ l(
|
|
36
|
-
|
|
35
|
+
/* @__PURE__ */ l(D, { children: /* @__PURE__ */ l(
|
|
36
|
+
f,
|
|
37
37
|
{
|
|
38
38
|
data: e.data,
|
|
39
39
|
selected: c.isArray(e.selected) ? e.selected : void 0,
|
|
@@ -44,8 +44,8 @@ const K = (e) => {
|
|
|
44
44
|
onChange: t.handleChange
|
|
45
45
|
}
|
|
46
46
|
) }),
|
|
47
|
-
/* @__PURE__ */ l(
|
|
48
|
-
|
|
47
|
+
/* @__PURE__ */ l(L, { children: /* @__PURE__ */ l(
|
|
48
|
+
O,
|
|
49
49
|
{
|
|
50
50
|
onClick: t.handleClose,
|
|
51
51
|
variant: "contained",
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import L, { useRef as N, useState as q, useCallback as M, useEffect as x, isValidElement as V, createRef as B, cloneElement as P, PureComponent as G } from "react";
|
|
2
|
+
import { findDOMNode as J } from "react-dom";
|
|
3
|
+
import K from "lodash/debounce";
|
|
4
|
+
import Q from "lodash/throttle";
|
|
5
|
+
var T = function(n, t) {
|
|
6
|
+
return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, e) {
|
|
7
|
+
r.__proto__ = e;
|
|
8
|
+
} || function(r, e) {
|
|
9
|
+
for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && (r[a] = e[a]);
|
|
10
|
+
}, T(n, t);
|
|
11
|
+
};
|
|
12
|
+
function X(n, t) {
|
|
13
|
+
if (typeof t != "function" && t !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
|
|
15
|
+
T(n, t);
|
|
16
|
+
function r() {
|
|
17
|
+
this.constructor = n;
|
|
18
|
+
}
|
|
19
|
+
n.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
|
|
20
|
+
}
|
|
21
|
+
var j = function() {
|
|
22
|
+
return j = Object.assign || function(t) {
|
|
23
|
+
for (var r, e = 1, a = arguments.length; e < a; e++) {
|
|
24
|
+
r = arguments[e];
|
|
25
|
+
for (var d in r) Object.prototype.hasOwnProperty.call(r, d) && (t[d] = r[d]);
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}, j.apply(this, arguments);
|
|
29
|
+
};
|
|
30
|
+
function Y(n, t) {
|
|
31
|
+
var r = {};
|
|
32
|
+
for (var e in n) Object.prototype.hasOwnProperty.call(n, e) && t.indexOf(e) < 0 && (r[e] = n[e]);
|
|
33
|
+
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
34
|
+
for (var a = 0, e = Object.getOwnPropertySymbols(n); a < e.length; a++)
|
|
35
|
+
t.indexOf(e[a]) < 0 && Object.prototype.propertyIsEnumerable.call(n, e[a]) && (r[e[a]] = n[e[a]]);
|
|
36
|
+
return r;
|
|
37
|
+
}
|
|
38
|
+
var I = function(n, t, r, e) {
|
|
39
|
+
switch (t) {
|
|
40
|
+
case "debounce":
|
|
41
|
+
return K(n, r, e);
|
|
42
|
+
case "throttle":
|
|
43
|
+
return Q(n, r, e);
|
|
44
|
+
default:
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
}, F = function(n) {
|
|
48
|
+
return typeof n == "function";
|
|
49
|
+
}, z = function() {
|
|
50
|
+
return typeof window > "u";
|
|
51
|
+
}, U = function(n) {
|
|
52
|
+
return n instanceof Element || n instanceof HTMLDocument;
|
|
53
|
+
};
|
|
54
|
+
(function(n) {
|
|
55
|
+
X(t, n);
|
|
56
|
+
function t(r) {
|
|
57
|
+
var e = n.call(this, r) || this;
|
|
58
|
+
e.cancelHandler = function() {
|
|
59
|
+
e.resizeHandler && e.resizeHandler.cancel && (e.resizeHandler.cancel(), e.resizeHandler = null);
|
|
60
|
+
}, e.attachObserver = function() {
|
|
61
|
+
var s = e.props, o = s.targetRef, u = s.observerOptions;
|
|
62
|
+
if (!z()) {
|
|
63
|
+
o && o.current && (e.targetRef.current = o.current);
|
|
64
|
+
var i = e.getElement();
|
|
65
|
+
i && (e.observableElement && e.observableElement === i || (e.observableElement = i, e.resizeObserver.observe(i, u)));
|
|
66
|
+
}
|
|
67
|
+
}, e.getElement = function() {
|
|
68
|
+
var s = e.props, o = s.querySelector, u = s.targetDomEl;
|
|
69
|
+
if (z())
|
|
70
|
+
return null;
|
|
71
|
+
if (o)
|
|
72
|
+
return document.querySelector(o);
|
|
73
|
+
if (u && U(u))
|
|
74
|
+
return u;
|
|
75
|
+
if (e.targetRef && U(e.targetRef.current))
|
|
76
|
+
return e.targetRef.current;
|
|
77
|
+
var i = J(e);
|
|
78
|
+
if (!i)
|
|
79
|
+
return null;
|
|
80
|
+
var l = e.getRenderType();
|
|
81
|
+
switch (l) {
|
|
82
|
+
case "renderProp":
|
|
83
|
+
return i;
|
|
84
|
+
case "childFunction":
|
|
85
|
+
return i;
|
|
86
|
+
case "child":
|
|
87
|
+
return i;
|
|
88
|
+
case "childArray":
|
|
89
|
+
return i;
|
|
90
|
+
default:
|
|
91
|
+
return i.parentElement;
|
|
92
|
+
}
|
|
93
|
+
}, e.createResizeHandler = function(s) {
|
|
94
|
+
var o = e.props, u = o.handleWidth, i = u === void 0 ? !0 : u, l = o.handleHeight, y = l === void 0 ? !0 : l, p = o.onResize;
|
|
95
|
+
if (!(!i && !y)) {
|
|
96
|
+
var R = function(c) {
|
|
97
|
+
var v = c.width, g = c.height;
|
|
98
|
+
e.state.width === v && e.state.height === g || e.state.width === v && !y || e.state.height === g && !i || (p == null || p(v, g), e.setState({ width: v, height: g }));
|
|
99
|
+
};
|
|
100
|
+
s.forEach(function(c) {
|
|
101
|
+
var v = c && c.contentRect || {}, g = v.width, w = v.height, H = !e.skipOnMount && !z();
|
|
102
|
+
H && R({ width: g, height: w }), e.skipOnMount = !1;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}, e.getRenderType = function() {
|
|
106
|
+
var s = e.props, o = s.render, u = s.children;
|
|
107
|
+
return F(o) ? "renderProp" : F(u) ? "childFunction" : V(u) ? "child" : Array.isArray(u) ? "childArray" : "parent";
|
|
108
|
+
};
|
|
109
|
+
var a = r.skipOnMount, d = r.refreshMode, m = r.refreshRate, O = m === void 0 ? 1e3 : m, _ = r.refreshOptions;
|
|
110
|
+
return e.state = {
|
|
111
|
+
width: void 0,
|
|
112
|
+
height: void 0
|
|
113
|
+
}, e.sizeRef = {
|
|
114
|
+
current: e.state
|
|
115
|
+
}, e.skipOnMount = a, e.targetRef = B(), e.observableElement = null, z() || (e.resizeHandler = I(e.createResizeHandler, d, O, _), e.resizeObserver = new window.ResizeObserver(e.resizeHandler)), e;
|
|
116
|
+
}
|
|
117
|
+
return t.prototype.componentDidMount = function() {
|
|
118
|
+
this.attachObserver();
|
|
119
|
+
}, t.prototype.componentDidUpdate = function() {
|
|
120
|
+
this.attachObserver(), this.sizeRef.current = this.state;
|
|
121
|
+
}, t.prototype.componentWillUnmount = function() {
|
|
122
|
+
z() || (this.observableElement = null, this.resizeObserver.disconnect(), this.cancelHandler());
|
|
123
|
+
}, t.prototype.render = function() {
|
|
124
|
+
var r = this.props, e = r.render, a = r.children, d = r.nodeType, m = d === void 0 ? "div" : d, O = this.state, _ = O.width, s = O.height, o = { width: _, height: s, targetRef: this.targetRef }, u = this.getRenderType();
|
|
125
|
+
switch (u) {
|
|
126
|
+
case "renderProp":
|
|
127
|
+
return e == null ? void 0 : e(o);
|
|
128
|
+
case "childFunction": {
|
|
129
|
+
var i = a;
|
|
130
|
+
return i == null ? void 0 : i(o);
|
|
131
|
+
}
|
|
132
|
+
case "child": {
|
|
133
|
+
var l = a;
|
|
134
|
+
if (l.type && typeof l.type == "string") {
|
|
135
|
+
o.targetRef;
|
|
136
|
+
var y = Y(o, ["targetRef"]);
|
|
137
|
+
return P(l, y);
|
|
138
|
+
}
|
|
139
|
+
return P(l, o);
|
|
140
|
+
}
|
|
141
|
+
case "childArray": {
|
|
142
|
+
var p = a;
|
|
143
|
+
return p.map(function(R) {
|
|
144
|
+
return !!R && P(R, o);
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
default:
|
|
148
|
+
return L.createElement(m, null);
|
|
149
|
+
}
|
|
150
|
+
}, t;
|
|
151
|
+
})(G);
|
|
152
|
+
function re(n) {
|
|
153
|
+
var t = {}, r = t.skipOnMount, e = r === void 0 ? !1 : r, a = t.refreshMode, d = t.refreshRate, m = d === void 0 ? 1e3 : d, O = t.refreshOptions, _ = t.handleWidth, s = _ === void 0 ? !0 : _, o = t.handleHeight, u = o === void 0 ? !0 : o, i = t.targetRef, l = t.observerOptions, y = t.onResize, p = N(e), R = q({
|
|
154
|
+
width: void 0,
|
|
155
|
+
height: void 0
|
|
156
|
+
}), c = R[0], v = R[1], g = q((i == null ? void 0 : i.current) || null), w = g[0], H = g[1];
|
|
157
|
+
i && setTimeout(function() {
|
|
158
|
+
i.current !== w && H(i.current);
|
|
159
|
+
}, 0);
|
|
160
|
+
var k = M(function(f) {
|
|
161
|
+
f !== w && H(f);
|
|
162
|
+
}, [w]);
|
|
163
|
+
k.current = w;
|
|
164
|
+
var D = M(function(f, h) {
|
|
165
|
+
return !(f.width === h.width && f.height === h.height || f.width === h.width && !u || f.height === h.height && !s);
|
|
166
|
+
}, [s, u]), A = M(function(f) {
|
|
167
|
+
if (!(!s && !u)) {
|
|
168
|
+
if (p.current) {
|
|
169
|
+
p.current = !1;
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
f.forEach(function(h) {
|
|
173
|
+
var E = (h == null ? void 0 : h.contentRect) || {}, b = E.width, W = E.height;
|
|
174
|
+
v(function(C) {
|
|
175
|
+
return D(C, { width: b, height: W }) ? { width: b, height: W } : C;
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}, [s, u, p, D]), S = M(I(A, a, m, O), [
|
|
180
|
+
A,
|
|
181
|
+
a,
|
|
182
|
+
m,
|
|
183
|
+
O
|
|
184
|
+
]);
|
|
185
|
+
return x(function() {
|
|
186
|
+
var f;
|
|
187
|
+
return w ? (f = new window.ResizeObserver(S), f.observe(w, l)) : (c.width || c.height) && v({ width: void 0, height: void 0 }), function() {
|
|
188
|
+
var h, E, b;
|
|
189
|
+
(h = f == null ? void 0 : f.disconnect) === null || h === void 0 || h.call(f), (b = (E = S).cancel) === null || b === void 0 || b.call(E);
|
|
190
|
+
};
|
|
191
|
+
}, [S, w]), x(function() {
|
|
192
|
+
y == null || y(c.width, c.height);
|
|
193
|
+
}, [c]), j({ ref: k }, c);
|
|
194
|
+
}
|
|
195
|
+
export {
|
|
196
|
+
re as u
|
|
197
|
+
};
|