@hybridcore/ui 1.0.2 → 1.1.2

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 (105) hide show
  1. package/dist/ButtonBase-BYmh3G5j.js +967 -0
  2. package/dist/CardContent-C8PxkJz4.js +73 -0
  3. package/dist/Checkbox-DostZSwR.js +673 -0
  4. package/dist/DialogContent-2aPOjKE7.js +2025 -0
  5. package/dist/FormControl-BiAFm76F.js +1491 -0
  6. package/dist/IconButton-CQJ8wZE8.js +183 -0
  7. package/dist/Input-Bf5G3tFN.js +324 -0
  8. package/dist/OutlinedInput-BEVE8VZQ.js +452 -0
  9. package/dist/Paper-CaiWdndQ.js +162 -0
  10. package/dist/Select-DxpxZbJp.js +2526 -0
  11. package/dist/Source-CnCcu5UP.js +4374 -0
  12. package/dist/Text-BT5kPHOo.js +2192 -0
  13. package/dist/Typography-XIiVCSto.js +178 -0
  14. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  15. package/dist/assets/index.css +1 -0
  16. package/dist/assets/index2.css +1 -0
  17. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  18. package/dist/components/access/helpers.js +32 -0
  19. package/dist/components/access/index.js +15 -0
  20. package/dist/components/card/index.js +159 -469
  21. package/dist/components/card/styled.js +75 -7
  22. package/dist/components/conditional-wrapper/index.js +9 -0
  23. package/dist/components/confirm/dialog.js +151 -0
  24. package/dist/components/confirm/index.js +23 -0
  25. package/dist/components/container/index.js +270 -0
  26. package/dist/components/context-menu/index.js +973 -0
  27. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  28. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  29. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  30. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  31. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  32. package/dist/components/data-management/instance-form/index.js +437 -0
  33. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  34. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  35. package/dist/components/date-time-picker/index.js +103 -0
  36. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  37. package/dist/components/geometry-picker/edit/index.js +71 -0
  38. package/dist/components/geometry-picker/geometry/index.js +160 -0
  39. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  40. package/dist/components/geometry-picker/index.js +140 -0
  41. package/dist/components/geometry-picker/kml/index.js +62 -0
  42. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  43. package/dist/components/geometry-picker/logic.js +69 -0
  44. package/dist/components/geometry-picker/map/index.js +42 -0
  45. package/dist/components/geometry-picker/map/logic.js +2360 -0
  46. package/dist/components/geometry-picker/map/style.js +88 -0
  47. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  48. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  49. package/dist/components/geometry-picker/parser/index.js +179 -0
  50. package/dist/components/geometry-picker/parser/logic.js +84 -0
  51. package/dist/components/geometry-picker/parser/styled.js +25 -0
  52. package/dist/components/geometry-picker/styled.js +48 -0
  53. package/dist/components/geometry-picker/wkt/index.js +59 -0
  54. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  55. package/dist/components/icon-button/index.js +18 -0
  56. package/dist/components/icon-button/styled.js +51 -0
  57. package/dist/components/key-protection/index.js +4 -0
  58. package/dist/components/key-protection/menu.js +85 -0
  59. package/dist/components/key-protection/utils.js +10 -0
  60. package/dist/components/loading/index.js +7 -0
  61. package/dist/components/loading/styled.js +16 -0
  62. package/dist/components/map/helpers/kml.js +45 -0
  63. package/dist/components/map/helpers/mapbox.js +48 -0
  64. package/dist/components/map/helpers/ol.js +25 -0
  65. package/dist/components/map/helpers/wkt.js +29 -0
  66. package/dist/components/map/index.js +8 -0
  67. package/dist/components/map/logic.js +140 -0
  68. package/dist/components/map/styled.js +8 -0
  69. package/dist/components/phone-input/index.js +25 -0
  70. package/dist/components/phone-input/styled.js +26 -0
  71. package/dist/components/search-input/index.js +76 -0
  72. package/dist/components/tree-select/index.js +70 -0
  73. package/dist/components/tree-select/styled.js +64 -0
  74. package/dist/components/treeview-filter/index.js +621 -0
  75. package/dist/components/treeview-filter/item/index.js +7 -0
  76. package/dist/components/treeview-filter/item-label/index.js +44 -0
  77. package/dist/createTheme-agWfFD64.js +2392 -0
  78. package/dist/exactProp-CI8dagM-.js +36 -0
  79. package/dist/extends-C3382pL0.js +22 -0
  80. package/dist/has-9_asnBxn.js +688 -0
  81. package/dist/hooks/useMenuLogic.js +21 -0
  82. package/dist/hooks/useToggle.js +23 -0
  83. package/dist/index-Bw_m9ult.js +1105 -0
  84. package/dist/index-IvOfmM1F.js +34 -0
  85. package/dist/index-wW2D1aTG.js +957 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/listItemTextClasses-BvXFz-Oc.js +132 -0
  89. package/dist/main.d.ts +1317 -0
  90. package/dist/main.js +41 -2
  91. package/dist/ol-DXmSLlWv.js +15041 -0
  92. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  93. package/dist/ownerWindow-niciwP7I.js +7 -0
  94. package/dist/styled-C43K9x7T.js +229 -0
  95. package/dist/styled-Iq9jsO4F.js +1033 -0
  96. package/dist/useFormControl-CatNKXAi.js +10 -0
  97. package/dist/useId-BHG98T5I.js +26 -0
  98. package/dist/useTheme-C0Dky5rV.js +17 -0
  99. package/dist/useTheme-CeyGVuQP.js +10 -0
  100. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  101. package/dist/utils/ontology.js +37 -0
  102. package/dist/utils-Bq0ye5vf.js +115 -0
  103. package/dist/utils-DLpkeyhZ.js +365 -0
  104. package/package.json +26 -5
  105. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,62 @@
1
+ import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
+ import { useState as i, useEffect as b } from "react";
3
+ import k from "./select-input-method.js";
4
+ import { Box as c, TextField as M, Button as d } from "@mui/material";
5
+ import { validate as C } from "../../map/helpers/kml.js";
6
+ import { b as L, c as T } from "../../../ol-DXmSLlWv.js";
7
+ function W({ onCancel: m, onSubmit: a }) {
8
+ const [t, l] = i(), [o, f] = i(), [s, n] = i(), p = (e) => {
9
+ l(e);
10
+ }, h = (e) => {
11
+ l(e.target.value);
12
+ }, v = () => {
13
+ if (t && t.trim().length > 0)
14
+ if (C(t)) {
15
+ const e = L(t);
16
+ if (e) {
17
+ const K = T({ features: e });
18
+ f(K), n(void 0);
19
+ } else n("Error in KML data!");
20
+ } else n("Error in KML data!");
21
+ }, x = () => {
22
+ a && o && a(o);
23
+ };
24
+ return b(() => (v(), () => {
25
+ }), [t]), t === void 0 ? /* @__PURE__ */ r(k, { onSubmit: p }) : /* @__PURE__ */ u(c, { pt: 1, children: [
26
+ /* @__PURE__ */ r(
27
+ M,
28
+ {
29
+ label: "KML Text",
30
+ multiline: !0,
31
+ maxRows: 15,
32
+ minRows: 8,
33
+ variant: "outlined",
34
+ fullWidth: !0,
35
+ value: t,
36
+ autoFocus: !0,
37
+ InputLabelProps: { shrink: !0 },
38
+ onChange: h,
39
+ ...s !== void 0 && {
40
+ error: !0,
41
+ helperText: s
42
+ }
43
+ }
44
+ ),
45
+ /* @__PURE__ */ u(c, { display: "flex", justifyContent: "space-between", mt: 3, children: [
46
+ /* @__PURE__ */ r(d, { color: "primary", onClick: m, children: "Cancel" }),
47
+ /* @__PURE__ */ r(
48
+ d,
49
+ {
50
+ color: "primary",
51
+ variant: "contained",
52
+ disabled: o === void 0,
53
+ onClick: x,
54
+ children: "Ok"
55
+ }
56
+ )
57
+ ] })
58
+ ] });
59
+ }
60
+ export {
61
+ W as default
62
+ };
@@ -0,0 +1,75 @@
1
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
+ import m from "react";
3
+ import { Box as d, Typography as r } from "@mui/material";
4
+ import { EditNote as f, UploadFile as p } from "@mui/icons-material";
5
+ import { IconButton as o } from "../../icon-button/index.js";
6
+ const P = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='169.604'%20height='151.513'%20viewBox='0%200%20169.604%20151.513'%3e%3cg%20id='gps-navigation'%20transform='translate(-4%20-3.09)'%3e%3cpath%20id='Path_84306'%20data-name='Path%2084306'%20d='M72.706,17A35.735,35.735,0,0,0,37,52.706c0,27.434,31.957,71.323,33.3,73.168a2.991,2.991,0,0,0,4.82,0c1.369-1.845,33.3-45.734,33.3-73.168A35.735,35.735,0,0,0,72.706,17Zm0,101.941c-7.469-10.831-29.755-44.9-29.755-66.235a29.755,29.755,0,0,1,59.51,0C102.461,74.041,80.175,108.14,72.706,118.941Z'%20transform='translate(65.192%2027.479)'%20fill='%23043991'/%3e%3cpath%20id='Path_84307'%20data-name='Path%2084307'%20d='M56.9,25A11.9,11.9,0,1,0,68.8,36.9,11.9,11.9,0,0,0,56.9,25Zm0,17.853A5.951,5.951,0,1,1,62.853,36.9,5.969,5.969,0,0,1,56.9,42.853Z'%20transform='translate(80.996%2043.284)'%20fill='%23043991'/%3e%3cpath%20id='Path_84308'%20data-name='Path%2084308'%20d='M21.853,56.382a2.974,2.974,0,0,0,2.41-1.22c.625-.863,15.443-21.215,15.443-34.218A17.853,17.853,0,0,0,4,20.943c0,13,14.818,33.356,15.443,34.218a2.974,2.974,0,0,0,2.41,1.22Zm0-47.34a11.9,11.9,0,0,1,11.9,11.9c0,7.677-7.2,20.174-11.9,27.256-4.7-7.052-11.9-19.579-11.9-27.256A11.9,11.9,0,0,1,21.853,9.041Z'%20fill='%23043991'/%3e%3cpath%20id='Path_84309'%20data-name='Path%2084309'%20d='M23.117,34.954c-7.171-.446-10.5-1.012-12.051-1.428a2.976,2.976,0,0,0-5.118-2.351A4.724,4.724,0,0,0,4.52,34.448c0,4.553,5.624,5.683,18.24,6.457h.179a2.978,2.978,0,0,0,.179-5.951Z'%20transform='translate(1.027%2053.622)'%20fill='%23043991'/%3e%3cpath%20id='Path_84310'%20data-name='Path%2084310'%20d='M30.095,26.806l-2.529.536c-5.058,1.071-10.3,2.172-15.056,3.362a2.975,2.975,0,0,0,.714,5.862,2.211,2.211,0,0,0,.744-.089c4.642-1.16,9.819-2.261,14.818-3.333l2.529-.536a2.982,2.982,0,0,0-1.25-5.832Z'%20transform='translate(12.349%2046.655)'%20fill='%23043991'/%3e%3cpath%20id='Path_84311'%20data-name='Path%2084311'%20d='M10,25.707a2.983,2.983,0,0,0,2.976,2.737h.238s8.48-.684,17.615-.744a2.976,2.976,0,0,0,0-5.951c-9.4.03-17.734.714-18.091.744a2.969,2.969,0,0,0-2.708,3.214Z'%20transform='translate(11.853%2036.863)'%20fill='%23043991'/%3e%3cpath%20id='Path_84312'%20data-name='Path%2084312'%20d='M58.689,52.158c-5.088,0-11.426-.089-17.823-.238a3.023,3.023,0,0,0-3.035,2.916,2.947,2.947,0,0,0,2.916,3.035c6.427.149,12.824.238,17.972.268a2.976,2.976,0,1,0,0-5.951Z'%20transform='translate(66.831%2096.465)'%20fill='%23043991'/%3e%3cpath%20id='Path_84313'%20data-name='Path%2084313'%20d='M22.1,35.342a2.965,2.965,0,0,0,2.827,2.023,3.715,3.715,0,0,0,.952-.149c4.493-1.488,9.105-3.571,9.105-7.647a5.641,5.641,0,0,0-1.875-4.047c-1.488-1.488-3.9-2.529-7.528-3.3a2.976,2.976,0,1,0-1.19,5.832,12.588,12.588,0,0,1,4.255,1.458A17.992,17.992,0,0,1,24,31.563a2.972,2.972,0,0,0-1.875,3.779Z'%20transform='translate(35.493%2037.673)'%20fill='%23043991'/%3e%3cpath%20id='Path_84314'%20data-name='Path%2084314'%20d='M18.816,32.091a2.985,2.985,0,0,0-3.095,2.856,2.949,2.949,0,0,0,2.856,3.095c5.415.238,11.753.536,17.764.982h.238a2.965,2.965,0,0,0,.238-5.921c-6.1-.476-12.5-.774-17.942-.982Z'%20transform='translate(23.152%2057.289)'%20fill='%23043991'/%3e%3cpath%20id='Path_84315'%20data-name='Path%2084315'%20d='M34.868,52.334c-6.516-.625-12.438-1.309-17.615-2.083a2.962,2.962,0,1,0-.863,5.862c5.3.774,11.307,1.488,17.913,2.113h.3a2.983,2.983,0,0,0,.268-5.951Z'%20transform='translate(19.477%2093.105)'%20fill='%23043991'/%3e%3cpath%20id='Path_84316'%20data-name='Path%2084316'%20d='M46.773,52.345C41,52.107,34.99,51.78,28.979,51.393a2.967,2.967,0,0,0-.387,5.921c6.07.387,12.11.714,17.913.952h.119a2.977,2.977,0,0,0,.119-5.951Z'%20transform='translate(43.101%2095.414)'%20fill='%23043991'/%3e%3cpath%20id='Path_84317'%20data-name='Path%2084317'%20d='M44.447,40.177a2.958,2.958,0,0,0-3.69-2.023c-5.207,1.488-11.337,3.065-17.2,4.523a2.975,2.975,0,0,0,.714,5.862,1.966,1.966,0,0,0,.714-.089c5.892-1.488,12.11-3.035,17.407-4.582a2.958,2.958,0,0,0,2.023-3.69Z'%20transform='translate(34.179%2069.02)'%20fill='%23043991'/%3e%3cpath%20id='Path_84318'%20data-name='Path%2084318'%20d='M32.7,43.258a2.982,2.982,0,0,0-3.63-2.113c-7.231,1.9-12.765,3.541-17.347,5.118a2.984,2.984,0,0,0,.982,5.8,3.741,3.741,0,0,0,.982-.149c4.463-1.547,9.849-3.124,16.96-5a2.982,2.982,0,0,0,2.113-3.63Z'%20transform='translate(11.291%2074.985)'%20fill='%23043991'/%3e%3cpath%20id='Path_84319'%20data-name='Path%2084319'%20d='M19.463,56.08c-9.016-2.589-9.432-4.731-9.432-4.731,0-.03,0-.327.506-.952a2.983,2.983,0,1,0-4.642-3.749,7.477,7.477,0,0,0-1.845,4.7c0,5.862,7.855,8.778,13.747,10.474a2.506,2.506,0,0,0,.8.119,2.956,2.956,0,0,0,2.856-2.172A3.012,3.012,0,0,0,19.4,56.08Z'%20transform='translate(0.099%2083.854)'%20fill='%23043991'/%3e%3cpath%20id='Path_84320'%20data-name='Path%2084320'%20d='M41.569,35.891a61.021,61.021,0,0,0-10.385-2.708,2.965,2.965,0,1,0-1.071,5.832,56.208,56.208,0,0,1,9.373,2.44,12.212,12.212,0,0,1,2.737,1.309,2.965,2.965,0,0,0,5.386,2.321,4.941,4.941,0,0,0,.774-2.589c0-4.017-4.969-5.892-6.814-6.576Z'%20transform='translate(46.787%2059.351)'%20fill='%23043991'/%3e%3c/g%3e%3c/svg%3e";
7
+ function v({ onSubmit: n }) {
8
+ const l = m.useRef(null), i = (a) => {
9
+ n && n(a);
10
+ };
11
+ return /* @__PURE__ */ e(
12
+ d,
13
+ {
14
+ display: "flex",
15
+ alignItems: "center",
16
+ justifyContent: "center",
17
+ flexDirection: "column",
18
+ py: 8,
19
+ children: [
20
+ /* @__PURE__ */ t("img", { src: P, width: 180, height: 160 }),
21
+ /* @__PURE__ */ t(r, { my: 8, mx: 10, textAlign: "center", children: "You can add KML data by importing a KML file from your computer or you can create KML data" }),
22
+ /* @__PURE__ */ e(d, { display: "flex", justifyContent: "space-between", width: 300, children: [
23
+ /* @__PURE__ */ e(
24
+ o,
25
+ {
26
+ variant: "vertical",
27
+ color: "primary",
28
+ onClick: () => i(""),
29
+ children: [
30
+ /* @__PURE__ */ t(f, {}),
31
+ /* @__PURE__ */ t(r, { variant: "body2", mt: 0.5, children: "Create KML data" })
32
+ ]
33
+ }
34
+ ),
35
+ /* @__PURE__ */ e(
36
+ o,
37
+ {
38
+ variant: "vertical",
39
+ color: "primary",
40
+ onClick: () => {
41
+ var a;
42
+ (a = l.current) == null || a.click();
43
+ },
44
+ children: [
45
+ /* @__PURE__ */ t(p, {}),
46
+ /* @__PURE__ */ t(r, { variant: "body2", mt: 0.5, children: "Import KML file from computer" })
47
+ ]
48
+ }
49
+ )
50
+ ] }),
51
+ /* @__PURE__ */ t(
52
+ "input",
53
+ {
54
+ ref: l,
55
+ type: "file",
56
+ accept: ".kml",
57
+ style: { display: "none" },
58
+ onChange: (a) => {
59
+ if (a.target.files) {
60
+ const c = new FileReader();
61
+ c.onload = async (h) => {
62
+ const s = h.target.result;
63
+ i(s);
64
+ }, c.readAsText(a.target.files[0]);
65
+ }
66
+ }
67
+ }
68
+ )
69
+ ]
70
+ }
71
+ );
72
+ }
73
+ export {
74
+ v as default
75
+ };
@@ -0,0 +1,69 @@
1
+ import { useState as m } from "react";
2
+ import y from "../../hooks/useToggle.js";
3
+ function E({
4
+ value: c,
5
+ disableAddCoordinate: d,
6
+ onChange: n
7
+ }) {
8
+ const o = y(!1), [e, i] = m({
9
+ title: "",
10
+ type: "COORDINATE",
11
+ action: "ADD"
12
+ }), s = () => {
13
+ i({
14
+ title: "Add Coordinate",
15
+ type: "COORDINATE",
16
+ action: "ADD"
17
+ }), o.action.open();
18
+ }, l = () => {
19
+ i({
20
+ title: "Add KML",
21
+ type: "KML",
22
+ action: "ADD"
23
+ }), o.action.open();
24
+ }, D = () => {
25
+ i({
26
+ title: "Add WKT",
27
+ type: "WKT",
28
+ action: "ADD"
29
+ }), o.action.open();
30
+ }, a = (t) => {
31
+ t && t.stopPropagation(), i({
32
+ title: "Edit",
33
+ type: "WKT",
34
+ action: "EDIT"
35
+ }), o.action.open();
36
+ }, p = (t) => {
37
+ t && t.stopPropagation(), i({
38
+ title: "Draw Geometry",
39
+ type: "GEOMETRY",
40
+ action: "ADD"
41
+ }), o.action.open();
42
+ }, r = (t) => {
43
+ o.action.close(), n && n(t), e.action === "ADD" && (e.type === "KML" || e.type === "WKT") && a();
44
+ }, A = () => {
45
+ c !== void 0 && c !== "" ? a() : d === !1 ? s() : p();
46
+ }, f = (t) => {
47
+ t.stopPropagation(), n && n("");
48
+ };
49
+ return {
50
+ state: {
51
+ content: e,
52
+ modal: o.state
53
+ },
54
+ action: {
55
+ onAddCoordinate: s,
56
+ onSubmit: r,
57
+ onClick: A,
58
+ onDelete: f,
59
+ onEdit: a,
60
+ onDraw: p,
61
+ onAddKml: l,
62
+ onAddWkt: D,
63
+ modal: o.action
64
+ }
65
+ };
66
+ }
67
+ export {
68
+ E as default
69
+ };
@@ -0,0 +1,42 @@
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
+ import n from "react";
3
+ import { O as u } from "../../../index-IvOfmM1F.js";
4
+ import d from "./logic.js";
5
+ import { Box as m } from "@mui/material";
6
+ import { ContextMenu as p } from "../../context-menu/index.js";
7
+ const f = (t, r) => {
8
+ const { refs: i, state: o, action: e } = d(t);
9
+ return n.useImperativeHandle(r, () => ({
10
+ addInteractions: e.addInteractions,
11
+ clearDrawingSource: e.clearDrawingSource,
12
+ addDrawingSourceKMLData: e.addDrawingSourceKMLData,
13
+ addDrawingSourceWKTData: e.addDrawingSourceWKTData,
14
+ centerToExtent: e.centerToExtent,
15
+ centerToFeature: e.centerToFeature,
16
+ setCenter: e.setCenter,
17
+ setZoomLevel: e.setZoomLevel
18
+ })), /* @__PURE__ */ s(m, { position: "relative", height: 500, children: [
19
+ /* @__PURE__ */ a(
20
+ u,
21
+ {
22
+ id: t.id,
23
+ ref: i.mapRef,
24
+ center: { latitude: 0, longitude: 0 },
25
+ zoom: 3,
26
+ onInit: e.onMapInit
27
+ }
28
+ ),
29
+ !t.disableContextMenu && /* @__PURE__ */ a(
30
+ p,
31
+ {
32
+ open: o.contextMenu.open,
33
+ buttons: o.contextMenu.buttons,
34
+ position: o.contextMenu.position,
35
+ onClose: () => e.setContextMenu((c) => ({ ...c, open: !1 }))
36
+ }
37
+ )
38
+ ] });
39
+ }, C = n.memo(n.forwardRef(f));
40
+ export {
41
+ C as default
42
+ };