@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
@@ -0,0 +1,186 @@
1
+ import { jsxs as n, Fragment as C, jsx as e } from "react/jsx-runtime";
2
+ import a from "react";
3
+ import { AddPhotoAlternate as I, Delete as W, Search as j, CheckBox as E, CloudUpload as P, Add as _ } from "@mui/icons-material";
4
+ import { IconButton as S, Dialog as N, DialogContent as O, Box as u, TextField as q, InputAdornment as z, Button as d, DialogActions as G } from "@mui/material";
5
+ import i from "./styled.js";
6
+ import H from "../../../../hooks/useToggle.js";
7
+ import J from "../../../tabs/index.js";
8
+ function Z({
9
+ value: s,
10
+ list: A,
11
+ newIcon: o,
12
+ loading: m,
13
+ onChange: f,
14
+ onFileUpload: y
15
+ }) {
16
+ const { state: b, action: g } = H(!1), [x, k] = a.useState(""), [l, r] = a.useState(null), [p, B] = a.useState();
17
+ a.useEffect(() => (o && r(o), () => {
18
+ }), [o]);
19
+ const F = (t) => {
20
+ k(t.target.value);
21
+ }, U = (t) => () => {
22
+ r(t);
23
+ }, v = () => {
24
+ l && (f(l), h());
25
+ }, D = () => {
26
+ r(null), f("");
27
+ }, h = () => {
28
+ g.close(), r(null);
29
+ }, R = (t) => {
30
+ t.target.files && B(t.target.files[0]);
31
+ }, T = () => {
32
+ p && y(p);
33
+ };
34
+ return /* @__PURE__ */ n(C, { children: [
35
+ /* @__PURE__ */ n(i.Container, { children: [
36
+ s ? /* @__PURE__ */ e(i.Img, { src: s }) : /* @__PURE__ */ e(I, { color: "action" }),
37
+ /* @__PURE__ */ n(i.Actions, { children: [
38
+ /* @__PURE__ */ e(
39
+ S,
40
+ {
41
+ title: "Add Icon",
42
+ color: "primary",
43
+ onClick: g.open,
44
+ children: /* @__PURE__ */ e(I, {})
45
+ }
46
+ ),
47
+ !!s && /* @__PURE__ */ e(
48
+ S,
49
+ {
50
+ title: "Remove Icon",
51
+ color: "primary",
52
+ onClick: D,
53
+ children: /* @__PURE__ */ e(W, {})
54
+ }
55
+ )
56
+ ] })
57
+ ] }),
58
+ /* @__PURE__ */ n(
59
+ N,
60
+ {
61
+ open: b.isOpen,
62
+ onClose: h,
63
+ maxWidth: "sm",
64
+ fullWidth: !0,
65
+ scroll: "paper",
66
+ children: [
67
+ /* @__PURE__ */ e(O, { sx: { padding: 0 }, children: /* @__PURE__ */ e(
68
+ J,
69
+ {
70
+ tabContents: [
71
+ {
72
+ label: "Choose Icon",
73
+ content: /* @__PURE__ */ n(u, { p: 1, children: [
74
+ /* @__PURE__ */ e(
75
+ q,
76
+ {
77
+ label: "Search",
78
+ id: "search-input",
79
+ fullWidth: !0,
80
+ sx: { mb: 1 },
81
+ onChange: F,
82
+ InputProps: {
83
+ startAdornment: /* @__PURE__ */ e(z, { position: "start", children: /* @__PURE__ */ e(j, {}) })
84
+ }
85
+ }
86
+ ),
87
+ A.filter((t) => {
88
+ const c = t.split("/ontology-icon/");
89
+ return !(c[1] && c[1].includes("/"));
90
+ }).filter((t) => {
91
+ if (x) {
92
+ if (t.search(new RegExp(x, "i")) !== -1)
93
+ return !0;
94
+ } else return !0;
95
+ return !1;
96
+ }).map((t, c) => /* @__PURE__ */ n(
97
+ i.SelectButton,
98
+ {
99
+ variant: l === t ? "outlined" : "text",
100
+ onClick: U(t),
101
+ sx: { padding: 1 },
102
+ children: [
103
+ /* @__PURE__ */ e("img", { src: t, alt: "icon", width: "auto", height: 64 }),
104
+ l === t ? /* @__PURE__ */ e(E, {}) : null
105
+ ]
106
+ },
107
+ c
108
+ ))
109
+ ] })
110
+ },
111
+ {
112
+ label: "Upload Icon",
113
+ content: /* @__PURE__ */ n(C, { children: [
114
+ o && /* @__PURE__ */ e(
115
+ u,
116
+ {
117
+ p: 1,
118
+ display: "inline-block",
119
+ className: "iconSelection",
120
+ children: /* @__PURE__ */ e(d, { variant: "outlined", color: "secondary", children: /* @__PURE__ */ e(
121
+ "img",
122
+ {
123
+ src: o,
124
+ alt: "icon",
125
+ width: "auto",
126
+ height: 64
127
+ }
128
+ ) })
129
+ }
130
+ ),
131
+ /* @__PURE__ */ n(
132
+ u,
133
+ {
134
+ p: 1,
135
+ paddingTop: 2,
136
+ display: "flex",
137
+ alignItems: "center",
138
+ children: [
139
+ /* @__PURE__ */ e(
140
+ i.FileUploadInput,
141
+ {
142
+ type: "file",
143
+ onChange: R
144
+ }
145
+ ),
146
+ /* @__PURE__ */ e(
147
+ d,
148
+ {
149
+ onClick: T,
150
+ variant: "contained",
151
+ color: "primary",
152
+ startIcon: /* @__PURE__ */ e(P, {}),
153
+ disabled: m || p === null,
154
+ children: m ? "Uploading..." : "Upload!"
155
+ }
156
+ )
157
+ ]
158
+ }
159
+ )
160
+ ] })
161
+ }
162
+ ]
163
+ }
164
+ ) }),
165
+ /* @__PURE__ */ n(G, { style: { padding: "5px 15px 15px 15px" }, children: [
166
+ /* @__PURE__ */ e(d, { onClick: h, variant: "contained", children: "Cancel" }),
167
+ /* @__PURE__ */ e(
168
+ d,
169
+ {
170
+ onClick: v,
171
+ color: "primary",
172
+ variant: "contained",
173
+ disabled: l === null,
174
+ startIcon: /* @__PURE__ */ e(_, {}),
175
+ children: "Add Icon"
176
+ }
177
+ )
178
+ ] })
179
+ ]
180
+ }
181
+ )
182
+ ] });
183
+ }
184
+ export {
185
+ Z as default
186
+ };
@@ -0,0 +1,76 @@
1
+ import { styled as o, Button as i } from "@mui/material";
2
+ const e = o("div")(({ theme: t }) => ({
3
+ position: "relative",
4
+ display: "flex",
5
+ width: 150,
6
+ height: 150,
7
+ justifyContent: "center",
8
+ alignItems: "center",
9
+ border: `1px solid ${t.palette.text.disabled}`,
10
+ marginTop: 10,
11
+ padding: 10,
12
+ borderRadius: 5,
13
+ overflow: "hidden",
14
+ "&:hover": {
15
+ "& > img": {
16
+ opacity: 0.2
17
+ },
18
+ "& > div": {
19
+ display: "flex",
20
+ opacity: 1
21
+ }
22
+ }
23
+ })), r = o("img")({
24
+ width: "100%",
25
+ transition: "all 0.3s",
26
+ opacity: 1
27
+ }), n = o("div")({
28
+ position: "absolute",
29
+ display: "none",
30
+ top: 0,
31
+ left: 0,
32
+ right: 0,
33
+ bottom: 0,
34
+ zIndex: 9,
35
+ transition: "all 0.3s",
36
+ justifyContent: "center",
37
+ alignItems: "center",
38
+ opacity: 0
39
+ }), a = o(i)(({ theme: t }) => ({
40
+ position: "relative",
41
+ ...t.palette.mode === "light" ? {
42
+ color: t.palette.primary.main,
43
+ borderColor: t.palette.primary.main
44
+ } : {
45
+ color: t.palette.text.primary,
46
+ borderColor: t.palette.text.primary
47
+ },
48
+ "&.MuiButton-textPrimary": {
49
+ border: "1px solid transparent"
50
+ },
51
+ ".MuiSvgIcon-root": {
52
+ position: "absolute",
53
+ top: 0,
54
+ right: 1,
55
+ width: 20,
56
+ height: 20,
57
+ zIndex: 9
58
+ }
59
+ })), l = o("input")(({ theme: t }) => ({
60
+ flex: 1,
61
+ border: "1px solid",
62
+ borderColor: t.palette.text.disabled,
63
+ //var(--bg-grid);
64
+ padding: 6,
65
+ marginRight: 5,
66
+ borderRadius: 5
67
+ })), p = {
68
+ Container: e,
69
+ Img: r,
70
+ Actions: n,
71
+ SelectButton: a,
72
+ FileUploadInput: l
73
+ };
74
+ export {
75
+ p as default
76
+ };
@@ -0,0 +1,338 @@
1
+ import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
+ import f from "react";
3
+ import P from "lodash";
4
+ import { useForm as M, Controller as l } from "react-hook-form";
5
+ import j from "./components/property-list/index.js";
6
+ import O from "./components/recognition-property-list/index.js";
7
+ import { CatalogueInstanceSelector as K } from "./components/catalogue-instance-selector/index.js";
8
+ import { getNestedChildrenFromMap as L } from "../../utils/ontology.js";
9
+ import { Container as _ } from "../container/index.js";
10
+ import { TreeSelect as w } from "../tree-select/index.js";
11
+ import { FormLabel as A, Button as b } from "@mui/material";
12
+ import B from "./components/select-icon/index.js";
13
+ import { T as m } from "../../TextField-D87qTh1k.js";
14
+ import { F as g } from "../../property-list-form-BfP9gzSo.js";
15
+ import { F as d } from "../../FormControlLabel-D9KFjcIx.js";
16
+ import { C as c } from "../../Checkbox-qy3cjvnb.js";
17
+ import { B as x } from "../../Box-BPyg-Ybm.js";
18
+ function D(e, p) {
19
+ const {
20
+ register: s,
21
+ handleSubmit: T,
22
+ control: i,
23
+ formState: { errors: v },
24
+ getValues: h,
25
+ reset: C
26
+ } = M({
27
+ defaultValues: e.defaultValues
28
+ }), [V, F] = f.useState([]), I = (n) => {
29
+ const a = new Map(n);
30
+ for (const [r, o] of a)
31
+ a.set(r, {
32
+ ...o,
33
+ label: o.name,
34
+ value: o.templateKey,
35
+ checked: h("parent") === o.templateKey
36
+ });
37
+ return L(a);
38
+ }, S = () => {
39
+ const n = I(e.mappedTemplates);
40
+ F(n);
41
+ }, k = () => {
42
+ if (e.onCancel) {
43
+ e.onCancel();
44
+ return;
45
+ }
46
+ };
47
+ return f.useImperativeHandle(p, () => ({
48
+ resetForm() {
49
+ C();
50
+ }
51
+ })), f.useEffect(() => (S(), () => {
52
+ }), [e.mappedTemplates]), /* @__PURE__ */ t(_, { disableHeader: !0, children: /* @__PURE__ */ u("form", { onSubmit: (n, a) => {
53
+ n == null || n.preventDefault(), T(((o) => (y) => {
54
+ e.onSubmit(y, o);
55
+ })(a))();
56
+ }, children: [
57
+ /* @__PURE__ */ t(
58
+ m,
59
+ {
60
+ label: "Name *",
61
+ variant: e.inputVariant,
62
+ fullWidth: !0,
63
+ sx: { mb: 2 },
64
+ ...s("name", { required: !0 }),
65
+ ...v.name && {
66
+ helperText: "This field is required!",
67
+ error: !0
68
+ }
69
+ }
70
+ ),
71
+ /* @__PURE__ */ t(
72
+ m,
73
+ {
74
+ label: "Template Key",
75
+ variant: e.inputVariant,
76
+ fullWidth: !0,
77
+ disabled: e.disableTemlateKey,
78
+ sx: { mb: 2 },
79
+ ...s("templateKey")
80
+ }
81
+ ),
82
+ /* @__PURE__ */ t(
83
+ m,
84
+ {
85
+ label: "Description",
86
+ variant: e.inputVariant,
87
+ fullWidth: !0,
88
+ sx: { mb: 2 },
89
+ ...s("description")
90
+ }
91
+ ),
92
+ /* @__PURE__ */ t(
93
+ m,
94
+ {
95
+ label: "Version",
96
+ variant: e.inputVariant,
97
+ fullWidth: !0,
98
+ sx: { mb: 2 },
99
+ ...s("version")
100
+ }
101
+ ),
102
+ /* @__PURE__ */ t(g, { sx: { mb: 2 }, children: /* @__PURE__ */ t(
103
+ l,
104
+ {
105
+ name: "parent",
106
+ control: i,
107
+ render: ({ field: { value: n, onChange: a } }) => {
108
+ if (e.disableParent) {
109
+ const r = n ? e.mappedTemplates.get(n) : void 0;
110
+ return /* @__PURE__ */ t(
111
+ m,
112
+ {
113
+ label: "Parent",
114
+ variant: e.inputVariant,
115
+ fullWidth: !0,
116
+ disabled: !0,
117
+ value: (r == null ? void 0 : r.name) || "-"
118
+ }
119
+ );
120
+ }
121
+ return /* @__PURE__ */ t(
122
+ w,
123
+ {
124
+ label: "Parent",
125
+ idKey: "templateKey",
126
+ data: V,
127
+ selected: n ? [n] : "",
128
+ onChange: (r, o) => {
129
+ a({
130
+ target: {
131
+ value: o ? r : ""
132
+ }
133
+ }), S();
134
+ }
135
+ }
136
+ );
137
+ }
138
+ }
139
+ ) }),
140
+ "agentReferenceIds" in e.defaultValues && /* @__PURE__ */ t(
141
+ l,
142
+ {
143
+ name: "agentReferenceIds",
144
+ control: i,
145
+ render: ({ field: { onChange: n } }) => /* @__PURE__ */ t(
146
+ K,
147
+ {
148
+ templates: e.agentTemplates,
149
+ data: e.agentsData,
150
+ inputVariant: e.inputVariant,
151
+ selectedInstances: e.selectedAgentInstances,
152
+ onSelect: (a) => {
153
+ n({
154
+ target: {
155
+ value: a
156
+ }
157
+ }), e.onAgentSelect && e.onAgentSelect(a);
158
+ },
159
+ onSearchSubmit: e.onCatalogueInstanceSearchSubmit,
160
+ openMapping: e.openMapping,
161
+ mappingData: e.mappingData,
162
+ objectTemplate: e.objectTemplate,
163
+ mapboxAccessToken: e.mapboxAccessToken,
164
+ onMappingSubmit: e.onMappingSubmit,
165
+ onMappingOpen: e.onMappingOpen,
166
+ onMappingClose: e.onMappingClose
167
+ }
168
+ )
169
+ }
170
+ ),
171
+ /* @__PURE__ */ u(g, { row: !0, sx: { mb: 2 }, children: [
172
+ /* @__PURE__ */ t(
173
+ d,
174
+ {
175
+ control: /* @__PURE__ */ t(
176
+ l,
177
+ {
178
+ name: "creatable",
179
+ control: i,
180
+ render: ({ field: { value: n, ...a } }) => /* @__PURE__ */ t(c, { checked: n, ...a })
181
+ }
182
+ ),
183
+ label: "Creatable"
184
+ }
185
+ ),
186
+ /* @__PURE__ */ t(
187
+ d,
188
+ {
189
+ control: /* @__PURE__ */ t(
190
+ l,
191
+ {
192
+ name: "editable",
193
+ control: i,
194
+ render: ({ field: { value: n, ...a } }) => /* @__PURE__ */ t(c, { checked: n, ...a })
195
+ }
196
+ ),
197
+ label: "Editable"
198
+ }
199
+ ),
200
+ "stationary" in e.defaultValues && /* @__PURE__ */ t(
201
+ d,
202
+ {
203
+ control: /* @__PURE__ */ t(
204
+ l,
205
+ {
206
+ name: "stationary",
207
+ control: i,
208
+ render: ({ field: { value: n, ...a } }) => /* @__PURE__ */ t(c, { checked: n, ...a })
209
+ }
210
+ ),
211
+ label: "Stationary"
212
+ }
213
+ ),
214
+ "livingObject" in e.defaultValues && /* @__PURE__ */ t(
215
+ d,
216
+ {
217
+ control: /* @__PURE__ */ t(
218
+ l,
219
+ {
220
+ name: "livingObject",
221
+ control: i,
222
+ render: ({ field: { value: n, ...a } }) => /* @__PURE__ */ t(c, { checked: n, ...a })
223
+ }
224
+ ),
225
+ label: "Living Object"
226
+ }
227
+ ),
228
+ "storeFile" in e.defaultValues && /* @__PURE__ */ t(
229
+ d,
230
+ {
231
+ control: /* @__PURE__ */ t(
232
+ l,
233
+ {
234
+ name: "storeFile",
235
+ control: i,
236
+ render: ({ field: { value: n, ...a } }) => /* @__PURE__ */ t(c, { checked: n, ...a })
237
+ }
238
+ ),
239
+ label: "Store File"
240
+ }
241
+ )
242
+ ] }),
243
+ /* @__PURE__ */ u(g, { children: [
244
+ /* @__PURE__ */ t(A, { children: "Icon" }),
245
+ /* @__PURE__ */ t(
246
+ l,
247
+ {
248
+ name: "icon",
249
+ control: i,
250
+ render: ({ field: { value: n, onChange: a } }) => /* @__PURE__ */ t(
251
+ B,
252
+ {
253
+ list: [],
254
+ value: n ?? "",
255
+ newIcon: "",
256
+ onFileUpload: () => {
257
+ },
258
+ onChange: a
259
+ }
260
+ )
261
+ }
262
+ )
263
+ ] }),
264
+ /* @__PURE__ */ t(
265
+ l,
266
+ {
267
+ name: "properties",
268
+ control: i,
269
+ render: ({ field: { value: n, onChange: a } }) => /* @__PURE__ */ t(
270
+ j,
271
+ {
272
+ list: n || [],
273
+ inputVariant: e.inputVariant,
274
+ templateId: P.get(e.defaultValues, "id"),
275
+ disablePropertyId: e.disablePropertyId,
276
+ onChange: a
277
+ }
278
+ )
279
+ }
280
+ ),
281
+ "recognitionPropertyList" in e.defaultValues && /* @__PURE__ */ t(
282
+ l,
283
+ {
284
+ name: "recognitionPropertyList",
285
+ control: i,
286
+ render: ({ field: { value: n, onChange: a } }) => /* @__PURE__ */ t(
287
+ O,
288
+ {
289
+ list: n || [],
290
+ getFormValues: h,
291
+ onChange: a
292
+ }
293
+ )
294
+ }
295
+ ),
296
+ /* @__PURE__ */ u(x, { display: "flex", justifyContent: "space-between", mt: 3, children: [
297
+ /* @__PURE__ */ t(
298
+ b,
299
+ {
300
+ color: "primary",
301
+ variant: "text",
302
+ disabled: e.loading,
303
+ sx: { textTransform: "none" },
304
+ onClick: k,
305
+ children: "Cancel"
306
+ }
307
+ ),
308
+ /* @__PURE__ */ t(x, { children: e.saveButtons ? e.saveButtons.map((n, a) => /* @__PURE__ */ t(
309
+ b,
310
+ {
311
+ type: "submit",
312
+ color: "primary",
313
+ variant: "contained",
314
+ disabled: e.loading,
315
+ startIcon: n.icon,
316
+ sx: { ml: 1, textTransform: "none" },
317
+ onClick: n.onClick,
318
+ children: n.label
319
+ },
320
+ a
321
+ )) : /* @__PURE__ */ t(
322
+ b,
323
+ {
324
+ type: "submit",
325
+ color: "primary",
326
+ variant: "contained",
327
+ disabled: e.loading,
328
+ sx: { textTransform: "none" },
329
+ children: e.loading ? "Saving..." : "Save"
330
+ }
331
+ ) })
332
+ ] })
333
+ ] }) });
334
+ }
335
+ const ae = f.forwardRef(D);
336
+ export {
337
+ ae as TemplateForm
338
+ };