@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
@@ -1,201 +0,0 @@
1
- import { a as f, _ as p } from "./extends-Cyw62AD_.js";
2
- import * as B from "react";
3
- import { d as C, i as O, a as d, P as r } from "./createStyled-B96gjom1.js";
4
- import { g as W, u as j, c as _, a as M } from "./useThemeProps-DeftUmqJ.js";
5
- import { g as N, s as R } from "./styled-cPJbqF0E.js";
6
- import { jsx as $ } from "react/jsx-runtime";
7
- const U = ["sx"], A = (o) => {
8
- var t, a;
9
- const n = {
10
- systemProps: {},
11
- otherProps: {}
12
- }, s = (t = o == null || (a = o.theme) == null ? void 0 : a.unstable_sxConfig) != null ? t : C;
13
- return Object.keys(o).forEach((e) => {
14
- s[e] ? n.systemProps[e] = o[e] : n.otherProps[e] = o[e];
15
- }), n;
16
- };
17
- function E(o) {
18
- const {
19
- sx: t
20
- } = o, a = f(o, U), {
21
- systemProps: n,
22
- otherProps: s
23
- } = A(a);
24
- let e;
25
- return Array.isArray(t) ? e = [n, ...t] : typeof t == "function" ? e = (...l) => {
26
- const i = t(...l);
27
- return O(i) ? p({}, n, i) : n;
28
- } : e = p({}, n, t), p({}, s, {
29
- sx: e
30
- });
31
- }
32
- function D(o) {
33
- return N("MuiTypography", o);
34
- }
35
- W("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
36
- const L = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"], S = (o) => {
37
- const {
38
- align: t,
39
- gutterBottom: a,
40
- noWrap: n,
41
- paragraph: s,
42
- variant: e,
43
- classes: l
44
- } = o, i = {
45
- root: ["root", e, o.align !== "inherit" && `align${d(t)}`, a && "gutterBottom", n && "noWrap", s && "paragraph"]
46
- };
47
- return M(i, D, l);
48
- }, V = R("span", {
49
- name: "MuiTypography",
50
- slot: "Root",
51
- overridesResolver: (o, t) => {
52
- const {
53
- ownerState: a
54
- } = o;
55
- return [t.root, a.variant && t[a.variant], a.align !== "inherit" && t[`align${d(a.align)}`], a.noWrap && t.noWrap, a.gutterBottom && t.gutterBottom, a.paragraph && t.paragraph];
56
- }
57
- })(({
58
- theme: o,
59
- ownerState: t
60
- }) => p({
61
- margin: 0
62
- }, t.variant && o.typography[t.variant], t.align !== "inherit" && {
63
- textAlign: t.align
64
- }, t.noWrap && {
65
- overflow: "hidden",
66
- textOverflow: "ellipsis",
67
- whiteSpace: "nowrap"
68
- }, t.gutterBottom && {
69
- marginBottom: "0.35em"
70
- }, t.paragraph && {
71
- marginBottom: 16
72
- })), y = {
73
- h1: "h1",
74
- h2: "h2",
75
- h3: "h3",
76
- h4: "h4",
77
- h5: "h5",
78
- h6: "h6",
79
- subtitle1: "h6",
80
- subtitle2: "h6",
81
- body1: "p",
82
- body2: "p",
83
- inherit: "p"
84
- }, k = {
85
- primary: "primary.main",
86
- textPrimary: "text.primary",
87
- secondary: "secondary.main",
88
- textSecondary: "text.secondary",
89
- error: "error.main"
90
- }, w = (o) => k[o] || o, z = /* @__PURE__ */ B.forwardRef(function(t, a) {
91
- const n = j({
92
- props: t,
93
- name: "MuiTypography"
94
- }), s = w(n.color), e = E(p({}, n, {
95
- color: s
96
- })), {
97
- align: l = "inherit",
98
- className: i,
99
- component: h,
100
- gutterBottom: b = !1,
101
- noWrap: x = !1,
102
- paragraph: g = !1,
103
- variant: c = "body1",
104
- variantMapping: m = y
105
- } = e, v = f(e, L), u = p({}, e, {
106
- align: l,
107
- color: s,
108
- className: i,
109
- component: h,
110
- gutterBottom: b,
111
- noWrap: x,
112
- paragraph: g,
113
- variant: c,
114
- variantMapping: m
115
- }), T = h || (g ? "p" : m[c] || y[c]) || "span", P = S(u);
116
- return /* @__PURE__ */ $(V, p({
117
- as: T,
118
- ref: a,
119
- ownerState: u,
120
- className: _(P.root, i)
121
- }, v));
122
- });
123
- process.env.NODE_ENV !== "production" && (z.propTypes = {
124
- // ----------------------------- Warning --------------------------------
125
- // | These PropTypes are generated from the TypeScript type definitions |
126
- // | To update them edit the d.ts file and run "yarn proptypes" |
127
- // ----------------------------------------------------------------------
128
- /**
129
- * Set the text-align on the component.
130
- * @default 'inherit'
131
- */
132
- align: r.oneOf(["center", "inherit", "justify", "left", "right"]),
133
- /**
134
- * The content of the component.
135
- */
136
- children: r.node,
137
- /**
138
- * Override or extend the styles applied to the component.
139
- */
140
- classes: r.object,
141
- /**
142
- * @ignore
143
- */
144
- className: r.string,
145
- /**
146
- * The component used for the root node.
147
- * Either a string to use a HTML element or a component.
148
- */
149
- component: r.elementType,
150
- /**
151
- * If `true`, the text will have a bottom margin.
152
- * @default false
153
- */
154
- gutterBottom: r.bool,
155
- /**
156
- * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
157
- *
158
- * Note that text overflow can only happen with block or inline-block level elements
159
- * (the element needs to have a width in order to overflow).
160
- * @default false
161
- */
162
- noWrap: r.bool,
163
- /**
164
- * If `true`, the element will be a paragraph element.
165
- * @default false
166
- */
167
- paragraph: r.bool,
168
- /**
169
- * The system prop that allows defining system overrides as well as additional CSS styles.
170
- */
171
- sx: r.oneOfType([r.arrayOf(r.oneOfType([r.func, r.object, r.bool])), r.func, r.object]),
172
- /**
173
- * Applies the theme typography styles.
174
- * @default 'body1'
175
- */
176
- variant: r.oneOfType([r.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), r.string]),
177
- /**
178
- * The component maps the variant prop to a range of different HTML element types.
179
- * For instance, subtitle1 to `<h6>`.
180
- * If you wish to change that mapping, you can provide your own.
181
- * Alternatively, you can use the `component` prop.
182
- * @default {
183
- * h1: 'h1',
184
- * h2: 'h2',
185
- * h3: 'h3',
186
- * h4: 'h4',
187
- * h5: 'h5',
188
- * h6: 'h6',
189
- * subtitle1: 'h6',
190
- * subtitle2: 'h6',
191
- * body1: 'p',
192
- * body2: 'p',
193
- * inherit: 'p',
194
- * }
195
- */
196
- variantMapping: r.object
197
- });
198
- export {
199
- z as T,
200
- E as e
201
- };
@@ -1,17 +0,0 @@
1
- import "react/jsx-runtime";
2
- import "lodash";
3
- import "dayjs";
4
- import { V as b } from "../../../../../index-B3Oj04nl.js";
5
- import "@mui/material";
6
- import "@mui/icons-material";
7
- import "../../../../geometry-picker/index.js";
8
- import "../../../../phone-input/index.js";
9
- import "../../../../date-time-picker/index.js";
10
- import "../../../../../FormControlLabel-DENNVXWL.js";
11
- import "../../../../../Checkbox-BFWhj3s-.js";
12
- import "../../../../../FormControl-BMRUQKHh.js";
13
- import "../../../../../Select-NDq3WyLt.js";
14
- import "../../../../../MenuItem-DstAFfik.js";
15
- export {
16
- b as default
17
- };
@@ -1,39 +0,0 @@
1
- import { jsx as t, Fragment as i } from "react/jsx-runtime";
2
- import l from "react";
3
- import { V as m } from "../../../../../index-B3Oj04nl.js";
4
- import d from "lodash";
5
- function h({
6
- template: o,
7
- value: n,
8
- mapboxAccessToken: a,
9
- onChange: s
10
- }) {
11
- if (o === void 0) return /* @__PURE__ */ t(i, {});
12
- const p = l.useMemo(() => {
13
- let r = o.properties.filter((e) => e.visible);
14
- return r = d.orderBy(r, "id"), r;
15
- }, [o]), u = (r) => {
16
- const e = {
17
- target: {
18
- value: { ...n, ...r }
19
- }
20
- };
21
- s(e);
22
- };
23
- return /* @__PURE__ */ t(i, { children: p.map((r, e) => {
24
- const f = n[r.propertyId];
25
- return /* @__PURE__ */ t(
26
- m,
27
- {
28
- property: r,
29
- value: f,
30
- mapboxAccessToken: a,
31
- onChange: u
32
- },
33
- e
34
- );
35
- }) });
36
- }
37
- export {
38
- h as default
39
- };
@@ -1,87 +0,0 @@
1
- import { a as h, k as g } from "./createStyled-B96gjom1.js";
2
- import { c as b, u as E } from "./createSvgIcon-BNrb7rDY.js";
3
- import { C as y } from "./styled-cPJbqF0E.js";
4
- import { c as C, u as N } from "./useId-BHG98T5I.js";
5
- import { d as S } from "./debounce-46wSf_lW.js";
6
- import { o as I } from "./ownerWindow-niciwP7I.js";
7
- import { _ as $ } from "./extends-Cyw62AD_.js";
8
- import { s as x, u as T, b as q, a as P, c as w } from "./ButtonBase-D6qhsxB0.js";
9
- import { i as D } from "./isMuiElement-CxT3_ACP.js";
10
- import { o as O } from "./ownerDocument-CUrv0DIK.js";
11
- import { u as R } from "./Collapse-D_TjnyE5.js";
12
- function M(e, t) {
13
- return process.env.NODE_ENV === "production" ? () => null : (r, s, u, o, n) => {
14
- const a = u || "<<anonymous>>", i = n || s;
15
- return typeof r[s] < "u" ? new Error(`The ${o} \`${i}\` of \`${a}\` is deprecated. ${t}`) : null;
16
- };
17
- }
18
- function j(e, t) {
19
- if (process.env.NODE_ENV === "production")
20
- return () => null;
21
- const r = t ? $({}, t.propTypes) : null;
22
- return (u) => (o, n, a, i, l, ...v) => {
23
- const f = l || n, p = r == null ? void 0 : r[f];
24
- if (p) {
25
- const m = p(o, n, a, i, l, ...v);
26
- if (m)
27
- return m;
28
- }
29
- return typeof o[n] < "u" && !o[u] ? new Error(`The prop \`${f}\` of \`${e}\` can only be used together with the \`${u}\` prop.`) : null;
30
- };
31
- }
32
- const k = {
33
- configure: (e) => {
34
- process.env.NODE_ENV !== "production" && console.warn(["MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.", "", "You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead", "", "The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401", "", "The updated documentation: https://mui.com/guides/classname-generator/"].join(`
35
- `)), y.configure(e);
36
- }
37
- }, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38
- __proto__: null,
39
- capitalize: h,
40
- createChainedFunction: C,
41
- createSvgIcon: b,
42
- debounce: S,
43
- deprecatedPropType: M,
44
- isMuiElement: D,
45
- ownerDocument: O,
46
- ownerWindow: I,
47
- requirePropFactory: j,
48
- setRef: x,
49
- unstable_ClassNameGenerator: k,
50
- unstable_useEnhancedEffect: T,
51
- unstable_useId: N,
52
- unsupportedProp: R,
53
- useControlled: E,
54
- useEventCallback: q,
55
- useForkRef: P,
56
- useIsFocusVisible: w
57
- }, Symbol.toStringTag, { value: "Module" }));
58
- var _ = { exports: {} };
59
- (function(e) {
60
- function t(r) {
61
- return r && r.__esModule ? r : {
62
- default: r
63
- };
64
- }
65
- e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
66
- })(_);
67
- var Q = _.exports, c = {};
68
- const G = /* @__PURE__ */ g(F);
69
- var d;
70
- function X() {
71
- return d || (d = 1, function(e) {
72
- "use client";
73
- Object.defineProperty(e, "__esModule", {
74
- value: !0
75
- }), Object.defineProperty(e, "default", {
76
- enumerable: !0,
77
- get: function() {
78
- return t.createSvgIcon;
79
- }
80
- });
81
- var t = G;
82
- }(c)), c;
83
- }
84
- export {
85
- Q as i,
86
- X as r
87
- };
@@ -1,287 +0,0 @@
1
- import { jsxs as h, Fragment as P, jsx as n } from "react/jsx-runtime";
2
- import T from "lodash";
3
- import v from "dayjs";
4
- import { Typography as F, Chip as B, Dialog as S, DialogTitle as j, DialogContent as N, DialogActions as W, Button as w, InputAdornment as Y, Tooltip as O, Stack as _ } from "@mui/material";
5
- import { Container as y, Values as E, MiniButton as G } from "./components/data-management/instance-form/components/composite-list/styled.js";
6
- import { Add as H, LockOutlined as R } from "@mui/icons-material";
7
- import $ from "./hooks/useToggle.js";
8
- import { GeometryPicker as q } from "./components/geometry-picker/index.js";
9
- import { PhoneInput as J } from "./components/phone-input/index.js";
10
- import { DateTimePicker as K } from "./components/date-time-picker/index.js";
11
- import { T as D, F as Q } from "./FormControlLabel-DENNVXWL.js";
12
- import { B as x, C as U } from "./Checkbox-BFWhj3s-.js";
13
- import { F as X, I as Z } from "./FormControl-BMRUQKHh.js";
14
- import { S as M } from "./Select-NDq3WyLt.js";
15
- import { M as z } from "./MenuItem-DstAFfik.js";
16
- import { useState as ee } from "react";
17
- function ne({
18
- property: m,
19
- mapboxAccessToken: e,
20
- value: l,
21
- variant: u = "standard",
22
- size: o = "medium",
23
- onChange: a
24
- }) {
25
- var V;
26
- const s = $(!1), [d, C] = ee(), g = (c) => {
27
- C(T.get(c, m.propertyId));
28
- }, k = () => {
29
- a([...l || [], d]), C(""), s.action.close();
30
- }, A = (c) => () => {
31
- if (l) {
32
- let r = [...l];
33
- r.splice(c, 1), a(r);
34
- }
35
- };
36
- return /* @__PURE__ */ h(P, { children: [
37
- /* @__PURE__ */ h(y, { variant: u, children: [
38
- /* @__PURE__ */ n(F, { children: m.name }),
39
- /* @__PURE__ */ n(E, { children: T.isArray(l) && l.map((c, r) => {
40
- var f, t;
41
- return /* @__PURE__ */ n(
42
- B,
43
- {
44
- label: ((t = (f = m.dataTypeInfo) == null ? void 0 : f.innerType) == null ? void 0 : t.type) === "date" ? v(c).format("DD/MM/YYYY HH:mm:ss") : c,
45
- size: o,
46
- onDelete: A(r)
47
- },
48
- r
49
- );
50
- }) }),
51
- /* @__PURE__ */ n(
52
- G,
53
- {
54
- startIcon: /* @__PURE__ */ n(H, {}),
55
- variant: "text",
56
- onClick: s.action.open,
57
- children: "Add"
58
- }
59
- )
60
- ] }),
61
- /* @__PURE__ */ h(
62
- S,
63
- {
64
- open: s.state.isOpen,
65
- onClose: s.action.close,
66
- maxWidth: "sm",
67
- fullWidth: !0,
68
- children: [
69
- /* @__PURE__ */ n(j, { children: "Add List Value" }),
70
- /* @__PURE__ */ n(N, { children: (V = m.dataTypeInfo) != null && V.innerType ? /* @__PURE__ */ n(
71
- te,
72
- {
73
- mapboxAccessToken: e,
74
- property: {
75
- ...m,
76
- name: "Value",
77
- type: m.dataTypeInfo.innerType.type
78
- },
79
- value: d,
80
- onChange: g
81
- }
82
- ) : null }),
83
- /* @__PURE__ */ h(W, { children: [
84
- /* @__PURE__ */ n(
85
- w,
86
- {
87
- variant: "contained",
88
- color: "inherit",
89
- onClick: s.action.close,
90
- children: "Cancel"
91
- }
92
- ),
93
- /* @__PURE__ */ n(w, { variant: "contained", color: "primary", onClick: k, children: "Ok" })
94
- ] })
95
- ]
96
- }
97
- )
98
- ] });
99
- }
100
- function te({
101
- mapboxAccessToken: m,
102
- property: e,
103
- value: l,
104
- variant: u = "standard",
105
- size: o = "medium",
106
- disableMargin: a = !1,
107
- defaultExtent: s,
108
- // keyAuth,
109
- onChange: d
110
- }) {
111
- var f;
112
- const C = (t) => {
113
- const I = t.target.value.split(",").map((p) => p.trimStart());
114
- d({
115
- [e.propertyId]: I
116
- });
117
- }, g = (t) => {
118
- const { name: i, type: I, checked: p, value: L } = t.target;
119
- let b = L;
120
- e.type === "double" && (b = b.replace(",", "."), b = b.replace(/[^\d.-]+/g, "")), d({
121
- [i]: I === "checkbox" ? p : b
122
- });
123
- }, k = (t) => {
124
- d({
125
- [e.propertyId]: t
126
- });
127
- }, A = (t) => {
128
- d({
129
- [e.propertyId]: t.target.value
130
- });
131
- }, V = (t) => (i) => {
132
- d({
133
- [t]: i
134
- });
135
- }, c = (t) => (i) => {
136
- d({
137
- [t]: i
138
- });
139
- }, r = (t) => (i) => {
140
- d({
141
- [t]: i
142
- });
143
- };
144
- if ([
145
- "string",
146
- "integer",
147
- "double",
148
- "text",
149
- "long",
150
- "byte",
151
- "bank-account"
152
- ].includes(e.type))
153
- return /* @__PURE__ */ n(
154
- D,
155
- {
156
- label: e.name,
157
- name: e.propertyId,
158
- value: l ?? e.defaultValue ?? "",
159
- defaultValue: l,
160
- onChange: g,
161
- variant: u,
162
- type: "text",
163
- multiline: e.type === "text",
164
- disabled: !e.editable,
165
- fullWidth: !0,
166
- sx: { mb: a ? 0 : 2 },
167
- InputProps: {
168
- size: o,
169
- ...e.privacyPreservationMethod === "ENCRYPTION" ? {
170
- endAdornment: /* @__PURE__ */ n(Y, { position: "end", children: /* @__PURE__ */ n(O, { title: "Encrypted Field", children: /* @__PURE__ */ n(R, {}) }) })
171
- } : {}
172
- }
173
- }
174
- );
175
- if (e.type === "date") {
176
- const t = l !== void 0 ? v(l).format() : "";
177
- return /* @__PURE__ */ h(_, { mb: a ? 0 : 2, children: [
178
- /* @__PURE__ */ n(F, { variant: "subtitle2", children: e.name }),
179
- /* @__PURE__ */ n(
180
- K,
181
- {
182
- value: t,
183
- variant: u,
184
- size: o,
185
- name: e.propertyId,
186
- onChange: k
187
- }
188
- )
189
- ] });
190
- }
191
- if (e.type === "list") {
192
- let t = "";
193
- return e.defaultValue && (t = T.isArray(e.defaultValue) ? l.join(", ") : e.defaultValue), l && (t = T.isArray(l) ? l.join(",") : l), /* @__PURE__ */ n(
194
- D,
195
- {
196
- label: e.name,
197
- name: e.propertyId,
198
- value: t,
199
- onChange: C,
200
- variant: u,
201
- disabled: !e.editable,
202
- fullWidth: !0,
203
- helperText: o === "small" ? null : "Add list values with the comma (,) separated string",
204
- sx: { mb: a ? 0 : 2 },
205
- InputProps: {
206
- size: o,
207
- placeholder: o === "small" ? "Add list values with the comma (,) separated string" : ""
208
- }
209
- }
210
- );
211
- }
212
- if (e.type === "boolean")
213
- return /* @__PURE__ */ n(x, { mb: a ? 0 : 2, children: /* @__PURE__ */ n(
214
- Q,
215
- {
216
- control: /* @__PURE__ */ n(
217
- U,
218
- {
219
- name: e.propertyId,
220
- checked: !!l,
221
- onChange: g,
222
- size: o
223
- }
224
- ),
225
- label: e.name
226
- }
227
- ) });
228
- if (e.type === "enum") {
229
- let t = [];
230
- return (f = e.dataTypeInfo) != null && f.enumValues && (t = e.dataTypeInfo.enumValues), /* @__PURE__ */ h(
231
- X,
232
- {
233
- fullWidth: !0,
234
- variant: u,
235
- sx: { mb: a ? 0 : 2 },
236
- size: o,
237
- children: [
238
- /* @__PURE__ */ n(Z, { id: `${e.propertyId}-label`, children: e.name }),
239
- /* @__PURE__ */ n(
240
- M,
241
- {
242
- label: e.name,
243
- name: e.name,
244
- labelId: `${e.propertyId}-label`,
245
- id: e.propertyId,
246
- value: l ?? "",
247
- onChange: A,
248
- children: t.map((i, I) => /* @__PURE__ */ n(z, { value: i, children: i }, I))
249
- }
250
- )
251
- ]
252
- }
253
- );
254
- }
255
- return e.type === "geometry" ? /* @__PURE__ */ n(x, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
256
- q,
257
- {
258
- mapboxAccessToken: m,
259
- label: e.name,
260
- value: l ?? e.defaultValue ?? "",
261
- defaultExtent: s,
262
- onChange: V(e.propertyId)
263
- }
264
- ) }) : e.type === "phone-number" ? /* @__PURE__ */ n(x, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
265
- J,
266
- {
267
- label: e.name,
268
- placeholder: "Enter phone number",
269
- value: l ?? e.defaultValue ?? "",
270
- onChange: c(e.propertyId)
271
- }
272
- ) }) : e.type === "composite-list" ? /* @__PURE__ */ n(x, { sx: { mb: a ? 0 : 2, width: "100%" }, children: /* @__PURE__ */ n(
273
- ne,
274
- {
275
- property: e,
276
- value: l ?? e.defaultValue ?? "",
277
- variant: u,
278
- size: o,
279
- mapboxAccessToken: m,
280
- onChange: r(e.propertyId)
281
- }
282
- ) }) : /* @__PURE__ */ n(P, {});
283
- }
284
- export {
285
- ne as C,
286
- te as V
287
- };
@@ -1,12 +1,3 @@
1
- function i(r, e) {
2
- if (r == null) return {};
3
- var t = {};
4
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
5
- if (e.includes(n)) continue;
6
- t[n] = r[n];
7
- }
8
- return t;
9
- }
10
1
  function a() {
11
2
  return a = Object.assign ? Object.assign.bind() : function(r) {
12
3
  for (var e = 1; e < arguments.length; e++) {
@@ -16,6 +7,15 @@ function a() {
16
7
  return r;
17
8
  }, a.apply(null, arguments);
18
9
  }
10
+ function i(r, e) {
11
+ if (r == null) return {};
12
+ var t = {};
13
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
14
+ if (e.includes(n)) continue;
15
+ t[n] = r[n];
16
+ }
17
+ return t;
18
+ }
19
19
  export {
20
20
  a as _,
21
21
  i as a