@hybridcore/ui 1.3.6 → 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 (128) 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 +12 -6
  36. package/dist/components/data-security-selectors/security-level/index.js +46 -45
  37. package/dist/components/date-time-picker/index.js +85 -64
  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 +60 -56
  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/geometry-picker/styled.js +22 -14
  48. package/dist/components/icon-button/index.js +1 -1
  49. package/dist/components/icon-button/styled.js +0 -2
  50. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/index.js +2 -2
  51. package/dist/components/{data-management/instance-form → instance-form}/components/composite-list/styled.js +15 -6
  52. package/dist/components/instance-form/components/variable/index.js +19 -0
  53. package/dist/components/instance-form/components/variables/index.js +40 -0
  54. package/dist/components/{data-management/instance-form → instance-form}/index.js +174 -155
  55. package/dist/components/instance-hierarchy-table/index.js +58 -0
  56. package/dist/components/instance-hierarchy-table/styled.js +29 -0
  57. package/dist/components/instance-table/index.js +125 -0
  58. package/dist/components/instance-table/styled.js +13 -0
  59. package/dist/components/map/helpers/ol.js +1 -1
  60. package/dist/components/map/index.js +1 -1
  61. package/dist/components/map/logic.js +1 -1
  62. package/dist/components/map/styled.js +1 -1
  63. package/dist/components/phone-input/index.js +1 -1
  64. package/dist/components/property-mapping/index.js +558 -0
  65. package/dist/components/range-selector/components/composite-list-range/index.js +81 -0
  66. package/dist/components/range-selector/components/date-range/index.js +9 -0
  67. package/dist/components/range-selector/components/geometry-range/index.js +26 -0
  68. package/dist/components/range-selector/components/number-range/index.js +86 -0
  69. package/dist/components/range-selector/components/string-range/index.js +31 -0
  70. package/dist/components/range-selector/index.js +59 -0
  71. package/dist/components/search-input/index.js +4 -4
  72. package/dist/components/tabs/appleTabs.style.js +55 -0
  73. package/dist/components/tabs/index.js +93 -0
  74. package/dist/components/tabs/tab-panel.js +18 -0
  75. package/dist/components/template-form/components/catalogue-instance-selector/index.js +158 -0
  76. package/dist/components/template-form/components/property-list/index.js +72 -0
  77. package/dist/components/template-form/components/property-list/property-list-columns.js +125 -0
  78. package/dist/components/template-form/components/property-list/property-list-form.js +16 -0
  79. package/dist/components/template-form/components/property-list/property-list-logic.js +66 -0
  80. package/dist/components/template-form/components/property-list/types.js +8 -0
  81. package/dist/components/template-form/components/recognition-property-list/index.js +69 -0
  82. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +50 -0
  83. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +174 -0
  84. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-logic.js +64 -0
  85. package/dist/components/template-form/components/recognition-property-list/types.js +8 -0
  86. package/dist/components/template-form/components/select-icon/index.js +186 -0
  87. package/dist/components/template-form/components/select-icon/styled.js +76 -0
  88. package/dist/components/template-form/index.js +338 -0
  89. package/dist/components/template-property-filters/property.js +48 -46
  90. package/dist/components/tree-select/index.js +51 -49
  91. package/dist/components/tree-select/styled.js +2 -2
  92. package/dist/components/treeview-filter/index.js +8 -8
  93. package/dist/components/treeview-filter/item/index.js +1 -1
  94. package/dist/components/treeview-filter/item-label/index.js +18 -17
  95. package/dist/constants/index.js +41 -0
  96. package/dist/{createStyled-B96gjom1.js → createStyled-BzvgQjjR.js} +487 -464
  97. package/dist/createSvgIcon-Cfm1LkEe.js +73 -0
  98. package/dist/{createSvgIcon-BNrb7rDY.js → createSvgIcon-DEXLbMwp.js} +62 -90
  99. package/dist/dialog-v5-nL5yy.js +153 -0
  100. package/dist/{exactProp-CI_rjX83.js → exactProp-DkmnwNVS.js} +3 -3
  101. package/dist/extendSxProp-qqdkfHzS.js +30 -0
  102. package/dist/{index-CSfSVkKj.js → index-B0JPwFI9.js} +6 -5
  103. package/dist/index-C1fczHEW.js +11042 -0
  104. package/dist/index-DPf5olog.js +288 -0
  105. package/dist/{index-JrtqxUdI.js → index-DlnzUkwe.js} +1 -1
  106. package/dist/{listItemTextClasses-CFiI_U7B.js → listItemTextClasses-DsHGzpPM.js} +2 -2
  107. package/dist/main.d.ts +569 -81
  108. package/dist/main.js +157 -157
  109. package/dist/{ol-BUKJ1urU.js → ol-CHaVTXvL.js} +24 -24
  110. package/dist/property-list-form-BfP9gzSo.js +391 -0
  111. package/dist/requirePropFactory-BjhhI-AW.js +18 -0
  112. package/dist/{styled-cPJbqF0E.js → styled-LNCprp4n.js} +24 -22
  113. package/dist/unsupportedProp-BuVD30Gh.js +9 -0
  114. package/dist/useControlled-BYdyS7Pn.js +31 -0
  115. package/dist/{useTheme-C-T6Qisa.js → useTheme-DBiahn6p.js} +2 -2
  116. package/dist/{useThemeProps-DeftUmqJ.js → useThemeProps-uYx_RkOH.js} +16 -14
  117. package/dist/utils/ontology.js +52 -30
  118. package/dist/{utils-CCkxV0lZ.js → utils-DNe_YYjm.js} +16 -16
  119. package/package.json +2 -1
  120. package/dist/DialogContent-BCYm_d1s.js +0 -864
  121. package/dist/FormControlLabel-DENNVXWL.js +0 -639
  122. package/dist/Typography-Dg-ROiTA.js +0 -201
  123. package/dist/components/data-management/instance-form/components/variable/index.js +0 -17
  124. package/dist/components/data-management/instance-form/components/variables/index.js +0 -39
  125. package/dist/createSvgIcon-B2WT0K4k.js +0 -87
  126. package/dist/index-B3Oj04nl.js +0 -287
  127. package/dist/components/{data-management/instance-form → instance-form}/components/policy-list/index.js +0 -0
  128. 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";
@@ -3089,7 +3089,7 @@ const po = ({
3089
3089
  memberedGroups: n,
3090
3090
  selectedIds: e,
3091
3091
  showError: i = !1,
3092
- variant: u = "standart",
3092
+ variant: u = "outlined",
3093
3093
  onChange: t
3094
3094
  }) => {
3095
3095
  const [a, r] = te(
@@ -3171,7 +3171,7 @@ const po = ({
3171
3171
  control: (l) => ({
3172
3172
  ...l,
3173
3173
  boxShadow: "none",
3174
- ...u === "standart" && {
3174
+ ...u === "standard" && {
3175
3175
  border: "none",
3176
3176
  borderBottom: "1px solid",
3177
3177
  borderRadius: 0,
@@ -3182,12 +3182,18 @@ const po = ({
3182
3182
  valueContainer: (l) => ({
3183
3183
  ...l,
3184
3184
  fontSize: "1rem",
3185
- ...u === "standart" ? { paddingLeft: 0 } : {
3186
- padding: "6px 0px 3px 8px"
3185
+ ...u === "standard" ? { paddingLeft: 0 } : {
3186
+ // padding: "6px 0px 3px 8px",
3187
+ padding: "9px 14px",
3188
+ minHeight: 55
3187
3189
  },
3188
3190
  ...i && { color: "#c00" }
3189
3191
  }),
3190
- multiValueRemove: (l, c) => c.data.isFixed ? { ...l, display: "none" } : l
3192
+ multiValueRemove: (l, c) => c.data.isFixed ? { ...l, display: "none" } : l,
3193
+ multiValue: (l) => ({
3194
+ ...l,
3195
+ padding: 5
3196
+ })
3191
3197
  }
3192
3198
  }
3193
3199
  ),
@@ -1,81 +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: s,
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: g,
12
- minLevel: i = 99,
13
- minLevelId: c,
14
- minLevelRoles: t,
15
- showError: h,
16
- variant: d = "standard",
9
+ templateType: c,
10
+ securityLevels: i,
11
+ value: s,
12
+ minLevel: t = 99,
13
+ minLevelId: u,
14
+ minLevelRoles: n,
15
+ showError: d,
16
+ variant: m = "outlined",
17
17
  onChange: S
18
18
  }) => {
19
19
  const b = C(() => {
20
- if (t && t.length > 0) {
21
- for (let r of t)
22
- if (a(r, "SUPER_ADMIN", f))
23
- return i;
20
+ if (n && n.length > 0) {
21
+ for (const r of n)
22
+ if (g(r, "SUPER_ADMIN", o))
23
+ return t;
24
24
  }
25
- if (e && e.length > 0 && o) {
26
- for (let r of e)
27
- if (a(
28
- `${s}.${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
- return i;
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
- return i;
40
+ return t;
41
41
  }, [
42
- i,
43
- c,
44
- l,
45
42
  t,
43
+ u,
44
+ i,
45
+ n,
46
46
  e,
47
- o
47
+ c,
48
+ o,
49
+ h
48
50
  ]), x = (r) => {
49
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: d,
57
- error: h,
58
- size: d === "outlined" ? "small" : "medium",
59
- sx: { ...d === "outlined" && { mt: 1 } },
58
+ variant: m,
59
+ error: d,
60
+ sx: { ...m === "outlined" && { mt: 1 } },
60
61
  children: [
61
- /* @__PURE__ */ n(F, { id: "security-level-label", children: "Security Level *" }),
62
- /* @__PURE__ */ n(
63
- I,
62
+ /* @__PURE__ */ l(F, { id: "security-level-label", children: "Security Level *" }),
63
+ /* @__PURE__ */ l(
64
+ $,
64
65
  {
65
66
  label: "Security Level *",
66
67
  labelId: "security-level-label",
67
68
  id: "demo-simple-select",
68
- value: g,
69
+ value: s,
69
70
  onChange: x,
70
- children: l.filter((r) => r.level <= b).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))
71
72
  }
72
73
  )
73
74
  ]
74
75
  }
75
76
  ),
76
- h && /* @__PURE__ */ n(j, { error: !0, children: "This field is required!" })
77
+ d && /* @__PURE__ */ l(I, { error: !0, children: "This field is required!" })
77
78
  ] });
78
79
  };
79
80
  export {
80
- p as SecurityLevel
81
+ q as SecurityLevel
81
82
  };
@@ -1,103 +1,124 @@
1
- import { jsxs as l, Fragment as w, jsx as e } from "react/jsx-runtime";
2
- import { useState as T, useMemo as y } from "react";
3
- import { Stack as d, IconButton as F, Menu as P, MenuItem as E } from "@mui/material";
4
- import { DatePicker as B } from "@mui/x-date-pickers";
5
- import h from "dayjs";
6
- import f from "lodash";
7
- import { PatternFormat as I } from "react-number-format";
8
- import { Schedule as Z } from "@mui/icons-material";
9
- import $ from "../../hooks/useMenuLogic.js";
10
- const K = ({
11
- value: g,
12
- name: Y,
13
- minDate: D,
14
- variant: M,
15
- size: H = "small",
16
- minuteStep: m = 30,
17
- pattern: S = "##:##:##",
18
- onChange: c
1
+ import { jsxs as d, Fragment as w, jsx as e } from "react/jsx-runtime";
2
+ import { useState as y, useMemo as F } from "react";
3
+ import { useTheme as P, Stack as B, Box as E, IconButton as I, Menu as R, MenuItem as Z } from "@mui/material";
4
+ import { DatePicker as $ } from "@mui/x-date-pickers";
5
+ import g from "dayjs";
6
+ import Y from "lodash";
7
+ import { PatternFormat as j } from "react-number-format";
8
+ import { Schedule as v } from "@mui/icons-material";
9
+ import z from "../../hooks/useMenuLogic.js";
10
+ const Q = ({
11
+ value: c,
12
+ name: D,
13
+ minDate: M,
14
+ variant: r,
15
+ label: x,
16
+ size: b = "small",
17
+ minuteStep: a = 30,
18
+ pattern: C = "##:##:##",
19
+ onChange: p
19
20
  }) => {
20
- const r = $(), [o, p] = T(h(g)), v = y(() => {
21
- let t = [];
22
- for (let n = 0; n < 24; n++)
23
- for (let i = 0; i < 60 / m; i++) {
24
- const a = f.padStart(n.toString(), 2, "0"), s = f.padStart(
25
- (i * m).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(),
26
27
  2,
27
28
  "0"
28
- ), k = `${a}:${s}`;
29
- t.push(k);
29
+ ), k = `${l}:${m}`;
30
+ o.push(k);
30
31
  }
31
- return t;
32
- }, [m]), x = (t) => {
33
- t && (p(t), c(t.format("YYYY-MM-DDTHH:mm:ssZ")));
34
- }, u = (t) => {
35
- const [n, i, a] = t.target.value.split(":");
36
- let s = h(o).set("hour", n ?? 0).set("m", i ?? 0).set("s", a ?? 0);
37
- p(s), c(s.format("YYYY-MM-DDTHH:mm:ssZ"));
38
- }, C = (t) => () => {
39
- u({
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);
37
+ u(m), p(m.format("YYYY-MM-DDTHH:mm:ssZ"));
38
+ }, T = (o) => () => {
39
+ f({
40
40
  target: {
41
- value: t
41
+ value: o
42
42
  }
43
- }), r.action.close();
43
+ }), n.action.close();
44
44
  };
45
- return /* @__PURE__ */ l(w, { children: [
46
- /* @__PURE__ */ l(d, { direction: "row", spacing: 2, children: [
45
+ return /* @__PURE__ */ d(w, { children: [
46
+ /* @__PURE__ */ d(B, { direction: "row", spacing: 2, mb: 1, alignItems: "flex-end", children: [
47
47
  /* @__PURE__ */ e(
48
- B,
48
+ $,
49
49
  {
50
- value: o,
50
+ label: x,
51
+ value: t,
51
52
  format: "DD/MM/YYYY",
52
- minDate: D,
53
- onChange: x,
53
+ minDate: M,
54
+ onChange: S,
54
55
  slotProps: {
55
56
  textField: {
56
- variant: M,
57
- size: H
57
+ variant: r,
58
+ size: b
58
59
  }
59
60
  }
60
61
  }
61
62
  ),
62
- /* @__PURE__ */ l(d, { direction: "row", position: "relative", children: [
63
+ /* @__PURE__ */ d(E, { position: "relative", children: [
63
64
  /* @__PURE__ */ e(
64
- I,
65
+ j,
65
66
  {
66
- format: S,
67
+ format: C,
67
68
  allowEmptyFormatting: !0,
68
- value: o == null ? void 0 : o.format("HH:mm:ss"),
69
- onChange: u,
69
+ value: t == null ? void 0 : t.format("HH:mm:ss"),
70
+ onChange: f,
70
71
  style: {
71
- border: 0,
72
- borderBottom: "1px solid #333",
73
72
  fontSize: 16,
74
- width: 120
73
+ width: 120,
74
+ ...r === "standard" && {
75
+ height: 32,
76
+ border: 0,
77
+ borderBottom: "1px solid",
78
+ padding: "0"
79
+ },
80
+ ...r === "outlined" && {
81
+ height: 54,
82
+ border: "1px solid",
83
+ borderRadius: h.shape.borderRadius,
84
+ padding: "0 10px"
85
+ },
86
+ borderColor: h.palette.action.disabled
75
87
  }
76
88
  }
77
89
  ),
78
90
  /* @__PURE__ */ e(
79
- F,
91
+ I,
80
92
  {
81
- onClick: r.action.open,
82
- sx: { position: "absolute", top: -4, right: 0 },
83
- children: /* @__PURE__ */ e(Z, {})
93
+ onClick: n.action.open,
94
+ sx: {
95
+ position: "absolute",
96
+ right: 0,
97
+ ...r === "standard" && {
98
+ top: -4
99
+ },
100
+ ...r === "outlined" && {
101
+ top: 8
102
+ }
103
+ },
104
+ children: /* @__PURE__ */ e(v, {})
84
105
  }
85
106
  )
86
107
  ] })
87
108
  ] }),
88
109
  /* @__PURE__ */ e(
89
- P,
110
+ R,
90
111
  {
91
112
  id: "time-menu",
92
- anchorEl: r.state.anchorEl,
93
- open: r.state.isOpen,
94
- onClose: r.action.close,
95
- children: v.map((t) => /* @__PURE__ */ e(E, { onClick: C(t), children: t }, t))
113
+ anchorEl: n.state.anchorEl,
114
+ open: n.state.isOpen,
115
+ onClose: n.action.close,
116
+ children: H.map((o) => /* @__PURE__ */ e(Z, { onClick: T(o), children: o }, o))
96
117
  }
97
118
  ),
98
- /* @__PURE__ */ e("input", { type: "hidden", name: Y, value: (o == null ? void 0 : o.format()) ?? "" })
119
+ /* @__PURE__ */ e("input", { type: "hidden", name: D, value: (t == null ? void 0 : t.format()) ?? "" })
99
120
  ] });
100
121
  };
101
122
  export {
102
- K as DateTimePicker
123
+ Q as DateTimePicker
103
124
  };
@@ -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,