@hybridcore/ui 1.3.7 → 1.4.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.
Files changed (126) hide show
  1. package/dist/AccordionDetails-CGs6GZQK.js +454 -0
  2. package/dist/Add-eepk2WTM.js +379 -0
  3. package/dist/Box-BPyg-Ybm.js +70 -0
  4. package/dist/Button-DLwB_sKd.js +354 -0
  5. package/dist/{ButtonBase-D6qhsxB0.js → ButtonBase-D0qccOVb.js} +6 -5
  6. package/dist/{CardContent-B8hqgH-I.js → CardContent-DFsCCOWk.js} +4 -4
  7. package/dist/{Checkbox-BFWhj3s-.js → Checkbox-qy3cjvnb.js} +134 -195
  8. package/dist/{Collapse-D_TjnyE5.js → Collapse-CL6LGGZw.js} +68 -75
  9. package/dist/Delete-OHEw9lDi.js +22 -0
  10. package/dist/DialogContent-CxOSq6h9.js +519 -0
  11. package/dist/FormControlLabel-D9KFjcIx.js +193 -0
  12. package/dist/{IconButton-D8bwME9t.js → IconButton-BaiyAtmS.js} +5 -5
  13. package/dist/{Input-Dxzguyp5.js → Input-CmCkXczh.js} +6 -6
  14. package/dist/{InputAdornment-B8ERE7Zv.js → InputAdornment-CZUPEeia.js} +5 -5
  15. package/dist/{FormControl-BMRUQKHh.js → InputLabel-CWkW8NtU.js} +316 -316
  16. package/dist/{List-DEWyK9IO.js → List-PpNAWJ_I.js} +4 -4
  17. package/dist/ListItem-CZbZ91vp.js +428 -0
  18. package/dist/{MenuItem-DstAFfik.js → MenuItem-D-INSvZa.js} +7 -7
  19. package/dist/{Modal-DNGEQJ1M.js → Modal-KrI5qFIq.js} +61 -57
  20. package/dist/{OutlinedInput-w2Cj9STF.js → OutlinedInput-DkIUD30e.js} +6 -6
  21. package/dist/{Paper-BseeergJ.js → Paper-btu3j72o.js} +5 -5
  22. package/dist/{Select-NDq3WyLt.js → Select-ClaBvSqf.js} +20 -18
  23. package/dist/Tabs-BzelDJKy.js +787 -0
  24. package/dist/TextField-D87qTh1k.js +457 -0
  25. package/dist/Typography-Bm7PFqUT.js +176 -0
  26. package/dist/assets/index.css +1 -1
  27. package/dist/assets/index2.css +1 -1
  28. package/dist/components/card/index.js +6 -6
  29. package/dist/components/card/styled.js +1 -1
  30. package/dist/components/collapsible-card/style.js +20 -466
  31. package/dist/components/confirm/dialog.js +8 -149
  32. package/dist/components/confirm/index.js +1 -1
  33. package/dist/components/container/index.js +7 -7
  34. package/dist/components/context-menu/index.js +191 -604
  35. package/dist/components/data-security-selectors/dissemination-list/index.js +1 -1
  36. package/dist/components/data-security-selectors/security-level/index.js +42 -40
  37. package/dist/components/date-time-picker/index.js +18 -19
  38. package/dist/components/geometry-picker/coordinate/index.js +1 -1
  39. package/dist/components/geometry-picker/edit/index.js +16 -16
  40. package/dist/components/geometry-picker/geometry/index.js +35 -35
  41. package/dist/components/geometry-picker/index.js +3 -3
  42. package/dist/components/geometry-picker/kml/index.js +14 -14
  43. package/dist/components/geometry-picker/map/index.js +1 -1
  44. package/dist/components/geometry-picker/map/logic.js +38 -37
  45. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +63 -59
  46. package/dist/components/geometry-picker/parser/logic.js +33 -32
  47. package/dist/components/icon-button/index.js +1 -1
  48. package/dist/components/icon-button/styled.js +0 -2
  49. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
  50. package/dist/components/instance-form/components/variable/index.js +19 -0
  51. package/dist/components/instance-form/components/variables/index.js +40 -0
  52. package/dist/components/{data-management/instance-form → instance-form}/index.js +106 -100
  53. package/dist/components/instance-hierarchy-table/index.js +58 -0
  54. package/dist/components/instance-hierarchy-table/styled.js +29 -0
  55. package/dist/components/instance-table/index.js +125 -0
  56. package/dist/components/instance-table/styled.js +13 -0
  57. package/dist/components/map/helpers/ol.js +1 -1
  58. package/dist/components/map/index.js +1 -1
  59. package/dist/components/map/logic.js +1 -1
  60. package/dist/components/map/styled.js +1 -1
  61. package/dist/components/phone-input/index.js +1 -1
  62. package/dist/components/property-mapping/index.js +558 -0
  63. package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
  64. package/dist/components/range-selector/components/date-range/index.js +9 -0
  65. package/dist/components/range-selector/components/geometry-range/index.js +26 -0
  66. package/dist/components/range-selector/components/number-range/index.js +86 -0
  67. package/dist/components/range-selector/components/string-range/index.js +31 -0
  68. package/dist/components/range-selector/index.js +59 -0
  69. package/dist/components/search-input/index.js +4 -4
  70. package/dist/components/tabs/appleTabs.style.js +55 -0
  71. package/dist/components/tabs/index.js +93 -0
  72. package/dist/components/tabs/tab-panel.js +18 -0
  73. package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
  74. package/dist/components/template-form/components/property-list/index.js +72 -0
  75. package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
  76. package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
  77. package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
  78. package/dist/components/template-form/components/property-list/types.js +8 -0
  79. package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
  80. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
  81. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
  82. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
  83. package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
  84. package/dist/components/template-form/components/select-icon/index.js +186 -0
  85. package/dist/components/template-form/components/select-icon/styled.js +76 -0
  86. package/dist/components/template-form/index.js +338 -0
  87. package/dist/components/template-property-filters/property.js +48 -46
  88. package/dist/components/tree-select/index.js +16 -15
  89. package/dist/components/tree-select/styled.js +2 -2
  90. package/dist/components/treeview-filter/index.js +8 -8
  91. package/dist/components/treeview-filter/item/index.js +1 -1
  92. package/dist/components/treeview-filter/item-label/index.js +18 -17
  93. package/dist/constants/index.js +41 -0
  94. package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
  95. package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
  96. package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
  97. package/dist/dialog-v5-nL5yy.js +153 -0
  98. package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
  99. package/dist/extendSxProp-qqdkfHzS.js +30 -0
  100. package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
  101. package/dist/index-C1fczHEW.js +11042 -0
  102. package/dist/{index-CJVcedWy.js → index-DPf5olog.js} +29 -27
  103. package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
  104. package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
  105. package/dist/main.d.ts +561 -78
  106. package/dist/main.js +157 -157
  107. package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
  108. package/dist/property-list-form-BfP9gzSo.js +391 -0
  109. package/dist/requirePropFactory-BjhhI-AW.js +18 -0
  110. package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
  111. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  112. package/dist/useControlled-BYdyS7Pn.js +31 -0
  113. package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
  114. package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
  115. package/dist/utils/ontology.js +52 -30
  116. package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
  117. package/package.json +2 -1
  118. package/dist/DialogContent-BCYm_d1s.js +0 -864
  119. package/dist/FormControlLabel-DENNVXWL.js +0 -639
  120. package/dist/Typography-Dg-ROiTA.js +0 -201
  121. package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
  122. package/dist/components/data-management/instance-form/components/variables/index.js +0 -41
  123. package/dist/createSvgIcon-B2WT0K4k.js +0 -87
  124. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +0 -0
  125. package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
  126. package/dist/{extends-Cyw62AD_.js → objectWithoutPropertiesLoose-BK36oJDi.js} +9 -9
@@ -2,7 +2,7 @@ import { jsxs as $t, jsx as ye } from "react/jsx-runtime";
2
2
  import * as V from "react";
3
3
  import { useLayoutEffect as _t, useContext as Kt, useRef as j, useState as te, createContext as qt, useMemo as ee, useCallback as P, Component as en, Fragment as Ne, useEffect as bt, forwardRef as tn } from "react";
4
4
  import { Box as nn, FormLabel as un, FormHelperText as on } from "@mui/material";
5
- import { a as an, _ as A } from "../../../extends-Cyw62AD_.js";
5
+ import { a as an, _ as A } from "../../../objectWithoutPropertiesLoose-BK36oJDi.js";
6
6
  import { _ as rn, a as ln } from "../../../assertThisInitialized-BUtkG-md.js";
7
7
  import { keyframes as sn, jsx as C, css as pt } from "@emotion/react";
8
8
  import { createPortal as cn } from "react-dom";
@@ -1,80 +1,82 @@
1
- import { jsxs as m, Fragment as A, jsx as n } from "react/jsx-runtime";
1
+ import { jsxs as a, Fragment as A, jsx as l } from "react/jsx-runtime";
2
2
  import { useMemo as C } from "react";
3
- import { FormControl as D, InputLabel as F, Select as I, MenuItem as $, FormHelperText as j } from "@mui/material";
4
- import { hasDataAccess as a } from "../../access/helpers.js";
5
- const p = ({
6
- ontologyId: g,
7
- appRoles: f,
3
+ import { FormControl as D, InputLabel as F, Select as $, MenuItem as j, FormHelperText as I } from "@mui/material";
4
+ import { hasDataAccess as g } from "../../access/helpers.js";
5
+ const q = ({
6
+ ontologyId: h,
7
+ appRoles: o,
8
8
  templateKeys: e,
9
- templateType: o,
10
- securityLevels: l,
11
- value: S,
9
+ templateType: c,
10
+ securityLevels: i,
11
+ value: s,
12
12
  minLevel: t = 99,
13
- minLevelId: c,
14
- minLevelRoles: i,
13
+ minLevelId: u,
14
+ minLevelRoles: n,
15
15
  showError: d,
16
- variant: h = "outlined",
17
- onChange: b
16
+ variant: m = "outlined",
17
+ onChange: S
18
18
  }) => {
19
- const s = C(() => {
20
- if (i && i.length > 0) {
21
- for (let r of i)
22
- if (a(r, "SUPER_ADMIN", f))
19
+ const b = C(() => {
20
+ if (n && n.length > 0) {
21
+ for (const r of n)
22
+ if (g(r, "SUPER_ADMIN", o))
23
23
  return t;
24
24
  }
25
- if (e && e.length > 0 && o) {
26
- for (let r of e)
27
- if (a(
28
- `${g}.${o}.${r}`,
25
+ if (e && e.length > 0 && c) {
26
+ for (const r of e)
27
+ if (g(
28
+ `${h}.${c}.${r}`,
29
29
  "SUPER_ADMIN",
30
- f
30
+ o
31
31
  ))
32
32
  return t;
33
33
  }
34
- if (c && l.length > 0) {
35
- const r = l.find(
36
- (u) => u.id === c
34
+ if (u && i.length > 0) {
35
+ const r = i.find(
36
+ (f) => f.id === u
37
37
  );
38
38
  if (r) return r.level;
39
39
  }
40
40
  return t;
41
41
  }, [
42
42
  t,
43
- c,
44
- l,
43
+ u,
45
44
  i,
45
+ n,
46
46
  e,
47
- o
47
+ c,
48
+ o,
49
+ h
48
50
  ]), x = (r) => {
49
- b(r.target.value);
51
+ S(r.target.value);
50
52
  };
51
- return /* @__PURE__ */ m(A, { children: [
52
- /* @__PURE__ */ m(
53
+ return /* @__PURE__ */ a(A, { children: [
54
+ /* @__PURE__ */ a(
53
55
  D,
54
56
  {
55
57
  fullWidth: !0,
56
- variant: h,
58
+ variant: m,
57
59
  error: d,
58
- sx: { ...h === "outlined" && { mt: 1 } },
60
+ sx: { ...m === "outlined" && { mt: 1 } },
59
61
  children: [
60
- /* @__PURE__ */ n(F, { id: "security-level-label", children: "Security Level *" }),
61
- /* @__PURE__ */ n(
62
- I,
62
+ /* @__PURE__ */ l(F, { id: "security-level-label", children: "Security Level *" }),
63
+ /* @__PURE__ */ l(
64
+ $,
63
65
  {
64
66
  label: "Security Level *",
65
67
  labelId: "security-level-label",
66
68
  id: "demo-simple-select",
67
- value: S,
69
+ value: s,
68
70
  onChange: x,
69
- children: l.filter((r) => r.level <= s).map((r, u) => /* @__PURE__ */ n($, { value: r.id, children: r.name }, u))
71
+ children: i.filter((r) => r.level <= b).map((r, f) => /* @__PURE__ */ l(j, { value: r.id, children: r.name }, f))
70
72
  }
71
73
  )
72
74
  ]
73
75
  }
74
76
  ),
75
- d && /* @__PURE__ */ n(j, { error: !0, children: "This field is required!" })
77
+ d && /* @__PURE__ */ l(I, { error: !0, children: "This field is required!" })
76
78
  ] });
77
79
  };
78
80
  export {
79
- p as SecurityLevel
81
+ q as SecurityLevel
80
82
  };
@@ -18,28 +18,27 @@ const Q = ({
18
18
  pattern: C = "##:##:##",
19
19
  onChange: p
20
20
  }) => {
21
- const n = z(), [o, u] = y(c ? g(c) : null), h = P(), H = F(() => {
22
- let t = [];
23
- for (let i = 0; i < 24; i++)
24
- for (let s = 0; s < 60 / a; s++) {
25
- const l = Y.padStart(i.toString(), 2, "0"), m = Y.padStart(
26
- (s * a).toString(),
21
+ const n = z(), [t, u] = y(c ? g(c) : null), h = P(), H = F(() => {
22
+ const o = [];
23
+ for (let s = 0; s < 24; s++)
24
+ for (let i = 0; i < 60 / a; i++) {
25
+ const l = Y.padStart(s.toString(), 2, "0"), m = Y.padStart(
26
+ (i * a).toString(),
27
27
  2,
28
28
  "0"
29
29
  ), k = `${l}:${m}`;
30
- t.push(k);
30
+ o.push(k);
31
31
  }
32
- return t;
33
- }, [a]), S = (t) => {
34
- t && (u(t), p(t.format("YYYY-MM-DDTHH:mm:ssZ")));
35
- }, f = (t) => {
36
- const [i, s, l] = t.target.value.split(":");
37
- let m = g(o).set("hour", i ?? 0).set("m", s ?? 0).set("s", l ?? 0);
32
+ return o;
33
+ }, [a]), S = (o) => {
34
+ o && (u(o), p(o.format("YYYY-MM-DDTHH:mm:ssZ")));
35
+ }, f = (o) => {
36
+ const [s, i, l] = o.target.value.split(":"), m = g(t).set("hour", s ?? 0).set("m", i ?? 0).set("s", l ?? 0);
38
37
  u(m), p(m.format("YYYY-MM-DDTHH:mm:ssZ"));
39
- }, T = (t) => () => {
38
+ }, T = (o) => () => {
40
39
  f({
41
40
  target: {
42
- value: t
41
+ value: o
43
42
  }
44
43
  }), n.action.close();
45
44
  };
@@ -49,7 +48,7 @@ const Q = ({
49
48
  $,
50
49
  {
51
50
  label: x,
52
- value: o,
51
+ value: t,
53
52
  format: "DD/MM/YYYY",
54
53
  minDate: M,
55
54
  onChange: S,
@@ -67,7 +66,7 @@ const Q = ({
67
66
  {
68
67
  format: C,
69
68
  allowEmptyFormatting: !0,
70
- value: o == null ? void 0 : o.format("HH:mm:ss"),
69
+ value: t == null ? void 0 : t.format("HH:mm:ss"),
71
70
  onChange: f,
72
71
  style: {
73
72
  fontSize: 16,
@@ -114,10 +113,10 @@ const Q = ({
114
113
  anchorEl: n.state.anchorEl,
115
114
  open: n.state.isOpen,
116
115
  onClose: n.action.close,
117
- children: H.map((t) => /* @__PURE__ */ e(Z, { onClick: T(t), children: t }, t))
116
+ children: H.map((o) => /* @__PURE__ */ e(Z, { onClick: T(o), children: o }, o))
118
117
  }
119
118
  ),
120
- /* @__PURE__ */ e("input", { type: "hidden", name: D, value: (o == null ? void 0 : o.format()) ?? "" })
119
+ /* @__PURE__ */ e("input", { type: "hidden", name: D, value: (t == null ? void 0 : t.format()) ?? "" })
121
120
  ] });
122
121
  };
123
122
  export {
@@ -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-BUKJ1urU.js";
5
+ import { g as y, c as g } from "../../../ol-CHaVTXvL.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";
@@ -1,42 +1,42 @@
1
1
  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
- import C from "../map/index.js";
5
- import { c as P, a as R } from "../../../ol-BUKJ1urU.js";
4
+ import g from "../map/index.js";
5
+ import { c as P, a as R } from "../../../ol-CHaVTXvL.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-Hf_SiWEW.js";
9
9
  function z({
10
- value: g,
11
- disableActions: y,
10
+ value: y,
11
+ disableActions: D,
12
12
  mapboxAccessToken: s,
13
- variant: D = "inline",
13
+ variant: W = "inline",
14
14
  mapId: f,
15
15
  onCancel: l,
16
16
  onSubmit: u,
17
17
  onChange: d
18
18
  }) {
19
- const r = E.useRef(null), [t, W] = F(g), m = () => {
19
+ const r = E.useRef(null), [t, k] = F(y), m = () => {
20
20
  u && u(t);
21
21
  }, p = (n) => {
22
22
  const o = P({ features: n });
23
- W(o), d && d(o);
24
- }, k = () => {
25
- var o, h, v;
23
+ k(o), d && d(o);
24
+ }, h = () => {
25
+ var o, v, C;
26
26
  const n = S(t);
27
27
  if (!_.isArray(n))
28
28
  if (n.type === "Point") {
29
29
  const i = B(n.coordinates, "EPSG:4326", "EPSG:3857");
30
- (o = r.current) == null || o.setCenter(i), (h = r.current) == null || h.setZoomLevel(10);
30
+ (o = r.current) == null || o.setCenter(i), (v = r.current) == null || v.setZoomLevel(10);
31
31
  } else {
32
32
  const i = R(t);
33
- i && ((v = r.current) == null || v.centerToFeature(i[0], [100, 100, 100, 100]));
33
+ i && ((C = r.current) == null || C.centerToFeature(i[0], [100, 100, 100, 100]));
34
34
  }
35
35
  };
36
- return T(() => (k(), () => {
37
- }), []), D === "dialog" ? /* @__PURE__ */ a(w, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: l, children: [
36
+ return T(() => (h(), () => {
37
+ }), [h]), W === "dialog" ? /* @__PURE__ */ a(w, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: l, children: [
38
38
  /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e(
39
- C,
39
+ g,
40
40
  {
41
41
  id: f,
42
42
  ref: r,
@@ -51,7 +51,7 @@ function z({
51
51
  ] })
52
52
  ] }) : /* @__PURE__ */ a(x, { children: [
53
53
  /* @__PURE__ */ e(
54
- C,
54
+ g,
55
55
  {
56
56
  id: f,
57
57
  ref: r,
@@ -60,7 +60,7 @@ function z({
60
60
  onDrawEnd: p
61
61
  }
62
62
  ),
63
- !y && /* @__PURE__ */ a(O, { display: "flex", justifyContent: "space-between", mt: 3, children: [
63
+ !D && /* @__PURE__ */ a(O, { display: "flex", justifyContent: "space-between", mt: 3, children: [
64
64
  /* @__PURE__ */ e(c, { color: "primary", onClick: l, children: "Cancel" }),
65
65
  /* @__PURE__ */ e(c, { color: "primary", variant: "contained", onClick: m, children: "Ok" })
66
66
  ] })
@@ -1,42 +1,42 @@
1
1
  import { jsxs as r, jsx as n, Fragment as M } from "react/jsx-runtime";
2
2
  import D, { useState as k } from "react";
3
- import { Dialog as R, DialogContent as K, Box as t, Typography as x, DialogActions as F, Button as d } from "@mui/material";
3
+ import { Dialog as R, DialogContent as K, Box as o, 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-BUKJ1urU.js";
6
+ import { c as _ } from "../../../ol-CHaVTXvL.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";
10
10
  function N({
11
- mapId: u,
12
- mapboxAccessToken: p,
11
+ mapId: p,
12
+ mapboxAccessToken: C,
13
13
  value: S,
14
14
  disableActions: T = !1,
15
15
  variant: W = "inline",
16
- defaultExtent: C,
16
+ defaultExtent: m,
17
17
  onCancel: s,
18
- onSubmit: m,
19
- onChange: v
18
+ onSubmit: v,
19
+ onChange: h
20
20
  }) {
21
- const h = D.useRef(null), [i, f] = k(S), [e, B] = k(), y = () => {
22
- m && i && m(i);
23
- }, g = (o) => {
24
- if (o.length > 0) {
25
- const c = _({ features: o });
26
- f(c);
27
- } else f(void 0);
28
- }, w = (o) => {
29
- f(o);
30
- }, a = (o) => () => {
21
+ const f = D.useRef(null), [i, u] = k(S), [e, B] = k(), y = () => {
22
+ v && i && v(i);
23
+ }, g = (t) => {
24
+ if (t.length > 0) {
25
+ const c = _({ features: t });
26
+ u(c);
27
+ } else u(void 0);
28
+ }, w = (t) => {
29
+ u(t);
30
+ }, a = (t) => () => {
31
31
  var c;
32
- B(o), (c = h.current) == null || c.addInteractions(o);
32
+ B(t), (c = f.current) == null || c.addInteractions(t);
33
33
  };
34
- return D.useEffect(() => (i !== void 0 && v !== void 0 && v(i), () => {
35
- }), [i]), W === "dialog" ? /* @__PURE__ */ r(R, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: s, children: [
34
+ return D.useEffect(() => (i !== void 0 && h !== void 0 && h(i), () => {
35
+ }), [i, h]), W === "dialog" ? /* @__PURE__ */ r(R, { open: !0, maxWidth: "sm", fullWidth: !0, onClose: s, children: [
36
36
  /* @__PURE__ */ r(K, { children: [
37
- /* @__PURE__ */ r(t, { display: "flex", justifyContent: "space-between", children: [
37
+ /* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", children: [
38
38
  /* @__PURE__ */ n(x, { variant: "subtitle2", children: "Draw On Map" }),
39
- /* @__PURE__ */ r(t, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
39
+ /* @__PURE__ */ r(o, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
40
40
  /* @__PURE__ */ n(
41
41
  l,
42
42
  {
@@ -69,15 +69,15 @@ function N({
69
69
  )
70
70
  ] })
71
71
  ] }),
72
- /* @__PURE__ */ r(t, { position: "relative", children: [
72
+ /* @__PURE__ */ r(o, { position: "relative", children: [
73
73
  /* @__PURE__ */ n(
74
74
  P,
75
75
  {
76
- id: u,
77
- ref: h,
78
- mapboxAccessToken: p,
76
+ id: p,
77
+ ref: f,
78
+ mapboxAccessToken: C,
79
79
  drawingWKTData: i,
80
- defaultExtent: C,
80
+ defaultExtent: m,
81
81
  onDrawEnd: g
82
82
  }
83
83
  ),
@@ -90,9 +90,9 @@ function N({
90
90
  /* @__PURE__ */ n(d, { variant: "contained", onClick: y, children: "Ok" })
91
91
  ] })
92
92
  ] }) : /* @__PURE__ */ r(M, { children: [
93
- /* @__PURE__ */ r(t, { display: "flex", justifyContent: "space-between", children: [
93
+ /* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", children: [
94
94
  /* @__PURE__ */ n(x, { variant: "subtitle2", children: "Draw On Map" }),
95
- /* @__PURE__ */ r(t, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
95
+ /* @__PURE__ */ r(o, { display: "flex", justifyContent: "flex-end", mb: 1, children: [
96
96
  /* @__PURE__ */ n(
97
97
  l,
98
98
  {
@@ -125,22 +125,22 @@ function N({
125
125
  )
126
126
  ] })
127
127
  ] }),
128
- /* @__PURE__ */ r(t, { position: "relative", children: [
128
+ /* @__PURE__ */ r(o, { position: "relative", children: [
129
129
  /* @__PURE__ */ n(
130
130
  P,
131
131
  {
132
- id: u,
133
- ref: h,
134
- mapboxAccessToken: p,
132
+ id: p,
133
+ ref: f,
134
+ mapboxAccessToken: C,
135
135
  drawingWKTData: i,
136
- defaultExtent: C,
136
+ defaultExtent: m,
137
137
  onDrawEnd: g
138
138
  }
139
139
  ),
140
140
  /* @__PURE__ */ n(L, { show: e === void 0 })
141
141
  ] }),
142
142
  i !== void 0 && /* @__PURE__ */ n(b, { value: i, onChange: w }),
143
- !T && /* @__PURE__ */ r(t, { display: "flex", justifyContent: "space-between", mt: 3, children: [
143
+ !T && /* @__PURE__ */ r(o, { display: "flex", justifyContent: "space-between", mt: 3, children: [
144
144
  /* @__PURE__ */ n(d, { color: "primary", onClick: s, children: "Cancel" }),
145
145
  /* @__PURE__ */ n(
146
146
  d,
@@ -8,9 +8,9 @@ import b from "./geometry/index.js";
8
8
  import g from "./kml/index.js";
9
9
  import W from "./wkt/index.js";
10
10
  import { IconButton as u, OutlinedInput as K, FilledInput as L, Dialog as z, DialogTitle as F, DialogContent as G } from "@mui/material";
11
- import { I as w } from "../../InputAdornment-B8ERE7Zv.js";
12
- import { F as B, I as M } from "../../FormControl-BMRUQKHh.js";
13
- import { I as T } from "../../Input-Dxzguyp5.js";
11
+ import { I as w } from "../../InputAdornment-CZUPEeia.js";
12
+ import { F as B, I as M } from "../../InputLabel-CWkW8NtU.js";
13
+ import { I as T } from "../../Input-CmCkXczh.js";
14
14
  const Z = ({
15
15
  label: c,
16
16
  mapboxAccessToken: l,
@@ -1,28 +1,28 @@
1
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as c } from "react/jsx-runtime";
2
2
  import { useState as i, useEffect as b } from "react";
3
3
  import k from "./select-input-method.js";
4
- import { Box as c, TextField as M, Button as d } from "@mui/material";
4
+ import { Box as d, TextField as M, Button as m } from "@mui/material";
5
5
  import { validate as C } from "../../map/helpers/kml.js";
6
- import { b as L, c as T } from "../../../ol-BUKJ1urU.js";
7
- function W({ onCancel: m, onSubmit: a }) {
8
- const [t, l] = i(), [o, f] = i(), [s, n] = i(), p = (e) => {
6
+ import { b as L, c as T } from "../../../ol-CHaVTXvL.js";
7
+ function W({ onCancel: f, onSubmit: a }) {
8
+ const [t, l] = i(), [o, p] = i(), [s, n] = i(), h = (e) => {
9
9
  l(e);
10
- }, h = (e) => {
10
+ }, v = (e) => {
11
11
  l(e.target.value);
12
- }, v = () => {
12
+ }, u = () => {
13
13
  if (t && t.trim().length > 0)
14
14
  if (C(t)) {
15
15
  const e = L(t);
16
16
  if (e) {
17
17
  const K = T({ features: e });
18
- f(K), n(void 0);
18
+ p(K), n(void 0);
19
19
  } else n("Error in KML data!");
20
20
  } else n("Error in KML data!");
21
21
  }, x = () => {
22
22
  a && o && a(o);
23
23
  };
24
- return b(() => (v(), () => {
25
- }), [t]), t === void 0 ? /* @__PURE__ */ r(k, { onSubmit: p }) : /* @__PURE__ */ u(c, { pt: 1, children: [
24
+ return b(() => (u(), () => {
25
+ }), [t, u]), t === void 0 ? /* @__PURE__ */ r(k, { onSubmit: h }) : /* @__PURE__ */ c(d, { pt: 1, children: [
26
26
  /* @__PURE__ */ r(
27
27
  M,
28
28
  {
@@ -35,17 +35,17 @@ function W({ onCancel: m, onSubmit: a }) {
35
35
  value: t,
36
36
  autoFocus: !0,
37
37
  InputLabelProps: { shrink: !0 },
38
- onChange: h,
38
+ onChange: v,
39
39
  ...s !== void 0 && {
40
40
  error: !0,
41
41
  helperText: s
42
42
  }
43
43
  }
44
44
  ),
45
- /* @__PURE__ */ u(c, { display: "flex", justifyContent: "space-between", mt: 3, children: [
46
- /* @__PURE__ */ r(d, { color: "primary", onClick: m, children: "Cancel" }),
45
+ /* @__PURE__ */ c(d, { display: "flex", justifyContent: "space-between", mt: 3, children: [
46
+ /* @__PURE__ */ r(m, { color: "primary", onClick: f, children: "Cancel" }),
47
47
  /* @__PURE__ */ r(
48
- d,
48
+ m,
49
49
  {
50
50
  color: "primary",
51
51
  variant: "contained",
@@ -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-JrtqxUdI.js";
3
+ import { O as u } from "../../../index-DlnzUkwe.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";