@hybridcore/ui 1.6.12 → 1.6.13

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/assets/index.css +1 -1
  2. package/dist/assets/index2.css +1 -1
  3. package/dist/components/button/styled.js +1 -1
  4. package/dist/components/charts/_common/format.js +149 -41
  5. package/dist/components/charts/_common/utils.js +16 -11
  6. package/dist/components/collapsible-card/index.js +21 -30
  7. package/dist/components/collapsible-card/styled.js +16 -14
  8. package/dist/components/color-picker/index.js +2227 -3357
  9. package/dist/components/color-picker/styled.js +87 -7
  10. package/dist/components/confirm/dialog.js +89 -8
  11. package/dist/components/confirm/index.js +1 -1
  12. package/dist/components/data-map/index.js +1 -1
  13. package/dist/components/data-map/logic.js +20 -20
  14. package/dist/components/data-security-selectors/dissemination-list/index.js +32 -3117
  15. package/dist/components/date-picker-with-custom-range/index.js +86 -7
  16. package/dist/components/date-range-picker/index.js +464 -452
  17. package/dist/components/document-viewer/components/viewer/index.js +1 -1
  18. package/dist/components/duration-select/index.js +10 -10
  19. package/dist/components/duration-select/styled.js +1 -1
  20. package/dist/components/geometry-picker/coordinate/index.js +14 -14
  21. package/dist/components/geometry-picker/edit/index.js +1 -1
  22. package/dist/components/geometry-picker/geometry/index.js +1 -1
  23. package/dist/components/geometry-picker/kml/index.js +11 -11
  24. package/dist/components/geometry-picker/map/logic.js +145 -3656
  25. package/dist/components/geometry-picker/map/style.js +18 -17
  26. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +43 -1255
  27. package/dist/components/heat-map/index.js +1 -1
  28. package/dist/components/heat-map/logic.js +77 -1924
  29. package/dist/components/instance-hierarchy-table/styled.js +18 -16
  30. package/dist/components/map/helpers/mapbox.js +17 -15
  31. package/dist/components/map/helpers/ol.js +386 -27
  32. package/dist/components/map/index.js +11 -10
  33. package/dist/components/map/logic.js +22 -22
  34. package/dist/components/map/styled.js +31 -27
  35. package/dist/components/metric-card/logic.js +46 -49
  36. package/dist/components/phone-input/index.js +10 -9
  37. package/dist/components/property-mapping/index.js +1 -1
  38. package/dist/components/prr-map/index.js +1 -1
  39. package/dist/components/prr-map/logic.js +27 -26
  40. package/dist/components/range-selector/styled.js +65 -4228
  41. package/dist/components/raster-grid-map/index.js +1 -1
  42. package/dist/components/raster-grid-map/logic.js +60 -57
  43. package/dist/components/simple-pivot-table/index.js +17 -17
  44. package/dist/components/simple-pivot-table/logic.js +67 -76
  45. package/dist/components/sortable-list/index.js +1091 -1264
  46. package/dist/components/template-form/components/property-list/index.js +36 -33
  47. package/dist/components/template-form/components/property-list/property-list-columns.js +19 -18
  48. package/dist/components/template-form/components/property-list/property-list-form.js +137 -601
  49. package/dist/components/template-form/components/recognition-property-list/index.js +40 -37
  50. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +11 -10
  51. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +55 -63
  52. package/dist/components/tree-select/index.js +16 -16
  53. package/dist/index.esm-UfGMjYOL.js +197 -0
  54. package/dist/main.d.ts +54 -8
  55. package/dist/main.js +176 -175
  56. package/package.json +1 -1
  57. package/dist/AccordionSummary-CJppWeqF.js +0 -781
  58. package/dist/Add-CqcD1PWb.js +0 -403
  59. package/dist/Box-DqUMmZjL.js +0 -31
  60. package/dist/Button-C5yquWAB.js +0 -357
  61. package/dist/ButtonBase-BEF7oTOe.js +0 -887
  62. package/dist/Delete-BdyYpINH.js +0 -23
  63. package/dist/DialogContent-BvVjD9z3.js +0 -523
  64. package/dist/FormGroup-CpBsIyYR.js +0 -89
  65. package/dist/IconButton-BoGwbvrP.js +0 -184
  66. package/dist/InputLabel-Dd8RrneV.js +0 -341
  67. package/dist/MenuItem-DwqJqzuM.js +0 -233
  68. package/dist/Modal-MUZygjmQ.js +0 -1158
  69. package/dist/Paper-BkQLdsCI.js +0 -582
  70. package/dist/Select-DHUl_uG3.js +0 -3916
  71. package/dist/Source-BSZST_GH.js +0 -4410
  72. package/dist/SwitchBase-DTndTqI8.js +0 -235
  73. package/dist/Text-ChJRuaD8.js +0 -2197
  74. package/dist/TextField-e2oKaUN1.js +0 -669
  75. package/dist/TransitionGroupContext-BDAp2T0O.js +0 -96
  76. package/dist/Typography-DgsSLCFC.js +0 -178
  77. package/dist/Vector-BmuhQO4p.js +0 -3606
  78. package/dist/Vector-DfTqQEln.js +0 -1735
  79. package/dist/WKT-2wsDT-nq.js +0 -2310
  80. package/dist/assertThisInitialized-C1dAyb4j.js +0 -7
  81. package/dist/assets/index3.css +0 -1
  82. package/dist/assets/index4.css +0 -1
  83. package/dist/clsx-OuTLNxxd.js +0 -16
  84. package/dist/createChainedFunction-C0nujS3O.js +0 -9
  85. package/dist/createSvgIcon-Ch_cT8az.js +0 -185
  86. package/dist/createSvgIcon-DuDuASu1.js +0 -62
  87. package/dist/debounce-46wSf_lW.js +0 -15
  88. package/dist/dialog-BYRnCztH.js +0 -154
  89. package/dist/formControlState-vgaj2ksH.js +0 -10
  90. package/dist/generateUtilityClasses-C3ivN9Ie.js +0 -2973
  91. package/dist/index-DH6qsPBn.js +0 -153
  92. package/dist/index-e9xTIYWt.js +0 -1934
  93. package/dist/index.esm-BLLrbTzY.js +0 -318
  94. package/dist/math-Bvt2Ubuz.js +0 -704
  95. package/dist/objectWithoutPropertiesLoose-DJteAcBH.js +0 -22
  96. package/dist/ol-yOE-NV0X.js +0 -7465
  97. package/dist/ownerWindow-wg6foiOE.js +0 -10
  98. package/dist/setPrototypeOf-NPgp4cYc.js +0 -8
  99. package/dist/styled-SoqbyrkW.js +0 -350
  100. package/dist/unsupportedProp-DuqR2hj9.js +0 -36
  101. package/dist/useControlled-BYdyS7Pn.js +0 -31
  102. package/dist/useFormControl-CatNKXAi.js +0 -10
  103. package/dist/useId-BW-oWmul.js +0 -19
  104. package/dist/useMobilePicker-CY8ndYRL.js +0 -8279
  105. package/dist/useSlot-B_Q4vnX5.js +0 -42
@@ -1,493 +1,29 @@
1
- import de, { jsx as t, jsxs as f, Fragment as pe } from "react/jsx-runtime";
2
- import * as z from "react";
3
- import V from "react";
4
- import me from "lodash";
5
- import { g as te, a as ae, s as G, r as ue, b as _, f as fe, u as Q, c as le, i as be } from "../../../../generateUtilityClasses-C3ivN9Ie.js";
6
- import { r as he } from "../../../../createSvgIcon-DuDuASu1.js";
7
- import { DATA_TYPES as Y, COORDINATE_FORMAT as ye, PRIVACY_PRESERVATION_METHOD as ee } from "../../../../constants/index.js";
8
- import { LabeledField as I } from "../../helpers.js";
9
- import { T as B, F as A } from "../../../../TextField-e2oKaUN1.js";
10
- import { I as W } from "../../../../InputLabel-Dd8RrneV.js";
11
- import { S as H } from "../../../../Select-DHUl_uG3.js";
12
- import { M as U } from "../../../../MenuItem-DwqJqzuM.js";
13
- import { F as ve } from "../../../../FormGroup-CpBsIyYR.js";
14
- import { a as v, _ as ne } from "../../../../objectWithoutPropertiesLoose-DJteAcBH.js";
15
- import { P as e } from "../../../../index-C__OZmYy.js";
16
- import { c as J } from "../../../../clsx-OuTLNxxd.js";
17
- import { f as Te } from "../../../../formControlState-vgaj2ksH.js";
18
- import { u as Ce } from "../../../../useFormControl-CatNKXAi.js";
19
- import { T as oe } from "../../../../Typography-DgsSLCFC.js";
20
- import { createStack as xe } from "@mui/system";
21
- import { r as ie } from "../../../../TransitionGroupContext-BDAp2T0O.js";
22
- import { S as Ie } from "../../../../SwitchBase-DTndTqI8.js";
23
- import { c as X } from "../../../../createSvgIcon-Ch_cT8az.js";
24
- import { B as ge } from "../../../../Box-DqUMmZjL.js";
25
- import { B as re } from "../../../../Button-C5yquWAB.js";
26
- const ke = X(/* @__PURE__ */ t("path", {
27
- d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
28
- }), "CheckBoxOutlineBlank"), Oe = X(/* @__PURE__ */ t("path", {
29
- d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
30
- }), "CheckBox"), Pe = X(/* @__PURE__ */ t("path", {
31
- d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
32
- }), "IndeterminateCheckBox");
33
- function Re(r) {
34
- return ae("MuiCheckbox", r);
35
- }
36
- const K = te("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), Fe = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"], Me = (r) => {
37
- const {
38
- classes: o,
39
- indeterminate: i,
40
- color: p,
41
- size: d
42
- } = r, s = {
43
- root: ["root", i && "indeterminate", `color${_(p)}`, `size${_(d)}`]
44
- }, a = le(s, Re, o);
45
- return v({}, o, a);
46
- }, Se = G(Ie, {
47
- shouldForwardProp: (r) => ue(r) || r === "classes",
48
- name: "MuiCheckbox",
49
- slot: "Root",
50
- overridesResolver: (r, o) => {
51
- const {
52
- ownerState: i
53
- } = r;
54
- return [o.root, i.indeterminate && o.indeterminate, o[`size${_(i.size)}`], i.color !== "default" && o[`color${_(i.color)}`]];
55
- }
56
- })(({
57
- theme: r,
58
- ownerState: o
59
- }) => v({
60
- color: (r.vars || r).palette.text.secondary
61
- }, !o.disableRipple && {
62
- "&:hover": {
63
- backgroundColor: r.vars ? `rgba(${o.color === "default" ? r.vars.palette.action.activeChannel : r.vars.palette[o.color].mainChannel} / ${r.vars.palette.action.hoverOpacity})` : fe(o.color === "default" ? r.palette.action.active : r.palette[o.color].main, r.palette.action.hoverOpacity),
64
- // Reset on touch devices, it doesn't add specificity
65
- "@media (hover: none)": {
66
- backgroundColor: "transparent"
67
- }
68
- }
69
- }, o.color !== "default" && {
70
- [`&.${K.checked}, &.${K.indeterminate}`]: {
71
- color: (r.vars || r).palette[o.color].main
72
- },
73
- [`&.${K.disabled}`]: {
74
- color: (r.vars || r).palette.action.disabled
75
- }
76
- })), qe = /* @__PURE__ */ t(Oe, {}), _e = /* @__PURE__ */ t(ke, {}), $e = /* @__PURE__ */ t(Pe, {}), P = /* @__PURE__ */ z.forwardRef(function(o, i) {
77
- var p, d;
78
- const s = Q({
79
- props: o,
80
- name: "MuiCheckbox"
81
- }), {
82
- checkedIcon: a = qe,
83
- color: g = "primary",
84
- icon: m = _e,
85
- indeterminate: u = !1,
86
- indeterminateIcon: n = $e,
87
- inputProps: $,
88
- size: T = "medium",
89
- className: k
90
- } = s, F = ne(s, Fe), O = u ? n : m, b = u ? n : a, C = v({}, s, {
91
- color: g,
92
- indeterminate: u,
93
- size: T
94
- }), h = Me(C);
95
- return /* @__PURE__ */ t(Se, v({
96
- type: "checkbox",
97
- inputProps: v({
98
- "data-indeterminate": u
99
- }, $),
100
- icon: /* @__PURE__ */ z.cloneElement(O, {
101
- fontSize: (p = O.props.fontSize) != null ? p : T
102
- }),
103
- checkedIcon: /* @__PURE__ */ z.cloneElement(b, {
104
- fontSize: (d = b.props.fontSize) != null ? d : T
105
- }),
106
- ownerState: C,
107
- ref: i,
108
- className: J(h.root, k)
109
- }, F, {
110
- classes: h
111
- }));
112
- });
113
- process.env.NODE_ENV !== "production" && (P.propTypes = {
114
- // ┌────────────────────────────── Warning ──────────────────────────────┐
115
- // │ These PropTypes are generated from the TypeScript type definitions. │
116
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
117
- // └─────────────────────────────────────────────────────────────────────┘
118
- /**
119
- * If `true`, the component is checked.
120
- */
121
- checked: e.bool,
122
- /**
123
- * The icon to display when the component is checked.
124
- * @default <CheckBoxIcon />
125
- */
126
- checkedIcon: e.node,
127
- /**
128
- * Override or extend the styles applied to the component.
129
- */
130
- classes: e.object,
131
- /**
132
- * @ignore
133
- */
134
- className: e.string,
135
- /**
136
- * The color of the component.
137
- * It supports both default and custom theme colors, which can be added as shown in the
138
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
139
- * @default 'primary'
140
- */
141
- color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
142
- /**
143
- * The default checked state. Use when the component is not controlled.
144
- */
145
- defaultChecked: e.bool,
146
- /**
147
- * If `true`, the component is disabled.
148
- * @default false
149
- */
150
- disabled: e.bool,
151
- /**
152
- * If `true`, the ripple effect is disabled.
153
- * @default false
154
- */
155
- disableRipple: e.bool,
156
- /**
157
- * The icon to display when the component is unchecked.
158
- * @default <CheckBoxOutlineBlankIcon />
159
- */
160
- icon: e.node,
161
- /**
162
- * The id of the `input` element.
163
- */
164
- id: e.string,
165
- /**
166
- * If `true`, the component appears indeterminate.
167
- * This does not set the native input element to indeterminate due
168
- * to inconsistent behavior across browsers.
169
- * However, we set a `data-indeterminate` attribute on the `input`.
170
- * @default false
171
- */
172
- indeterminate: e.bool,
173
- /**
174
- * The icon to display when the component is indeterminate.
175
- * @default <IndeterminateCheckBoxIcon />
176
- */
177
- indeterminateIcon: e.node,
178
- /**
179
- * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
180
- */
181
- inputProps: e.object,
182
- /**
183
- * Pass a ref to the `input` element.
184
- */
185
- inputRef: ie,
186
- /**
187
- * Callback fired when the state is changed.
188
- *
189
- * @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
190
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
191
- */
192
- onChange: e.func,
193
- /**
194
- * If `true`, the `input` element is required.
195
- * @default false
196
- */
197
- required: e.bool,
198
- /**
199
- * The size of the component.
200
- * `small` is equivalent to the dense checkbox styling.
201
- * @default 'medium'
202
- */
203
- size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
204
- /**
205
- * The system prop that allows defining system overrides as well as additional CSS styles.
206
- */
207
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
208
- /**
209
- * The value of the component. The DOM API casts this to a string.
210
- * The browser uses "on" as the default value.
211
- */
212
- value: e.any
213
- });
214
- const se = xe({
215
- createStyledComponent: G("div", {
216
- name: "MuiStack",
217
- slot: "Root",
218
- overridesResolver: (r, o) => o.root
219
- }),
220
- useThemeProps: (r) => Q({
221
- props: r,
222
- name: "MuiStack"
223
- })
224
- });
225
- process.env.NODE_ENV !== "production" && (se.propTypes = {
226
- // ┌────────────────────────────── Warning ──────────────────────────────┐
227
- // │ These PropTypes are generated from the TypeScript type definitions. │
228
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
229
- // └─────────────────────────────────────────────────────────────────────┘
230
- /**
231
- * The content of the component.
232
- */
233
- children: e.node,
234
- /**
235
- * The component used for the root node.
236
- * Either a string to use a HTML element or a component.
237
- */
238
- component: e.elementType,
239
- /**
240
- * Defines the `flex-direction` style property.
241
- * It is applied for all screen sizes.
242
- * @default 'column'
243
- */
244
- direction: e.oneOfType([e.oneOf(["column-reverse", "column", "row-reverse", "row"]), e.arrayOf(e.oneOf(["column-reverse", "column", "row-reverse", "row"])), e.object]),
245
- /**
246
- * Add an element between each child.
247
- */
248
- divider: e.node,
249
- /**
250
- * Defines the space between immediate children.
251
- * @default 0
252
- */
253
- spacing: e.oneOfType([e.arrayOf(e.oneOfType([e.number, e.string])), e.number, e.object, e.string]),
254
- /**
255
- * The system prop, which allows defining system overrides as well as additional CSS styles.
256
- */
257
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
258
- /**
259
- * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
260
- *
261
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
262
- * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
263
- *
264
- * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
265
- * @default false
266
- */
267
- useFlexGap: e.bool
268
- });
269
- function je(r) {
270
- return ae("MuiFormControlLabel", r);
271
- }
272
- const E = te("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]), Ee = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"], ze = (r) => {
273
- const {
274
- classes: o,
275
- disabled: i,
276
- labelPlacement: p,
277
- error: d,
278
- required: s
279
- } = r, a = {
280
- root: ["root", i && "disabled", `labelPlacement${_(p)}`, d && "error", s && "required"],
281
- label: ["label", i && "disabled"],
282
- asterisk: ["asterisk", d && "error"]
283
- };
284
- return le(a, je, o);
285
- }, Ne = G("label", {
286
- name: "MuiFormControlLabel",
287
- slot: "Root",
288
- overridesResolver: (r, o) => {
289
- const {
290
- ownerState: i
291
- } = r;
292
- return [{
293
- [`& .${E.label}`]: o.label
294
- }, o.root, o[`labelPlacement${_(i.labelPlacement)}`]];
295
- }
296
- })(({
297
- theme: r,
298
- ownerState: o
299
- }) => v({
300
- display: "inline-flex",
301
- alignItems: "center",
302
- cursor: "pointer",
303
- // For correct alignment with the text.
304
- verticalAlign: "middle",
305
- WebkitTapHighlightColor: "transparent",
306
- marginLeft: -11,
307
- marginRight: 16,
308
- // used for row presentation of radio/checkbox
309
- [`&.${E.disabled}`]: {
310
- cursor: "default"
311
- }
312
- }, o.labelPlacement === "start" && {
313
- flexDirection: "row-reverse",
314
- marginLeft: 16,
315
- // used for row presentation of radio/checkbox
316
- marginRight: -11
317
- }, o.labelPlacement === "top" && {
318
- flexDirection: "column-reverse",
319
- marginLeft: 16
320
- }, o.labelPlacement === "bottom" && {
321
- flexDirection: "column",
322
- marginLeft: 16
323
- }, {
324
- [`& .${E.label}`]: {
325
- [`&.${E.disabled}`]: {
326
- color: (r.vars || r).palette.text.disabled
327
- }
328
- }
329
- })), Le = G("span", {
330
- name: "MuiFormControlLabel",
331
- slot: "Asterisk",
332
- overridesResolver: (r, o) => o.asterisk
333
- })(({
334
- theme: r
335
- }) => ({
336
- [`&.${E.error}`]: {
337
- color: (r.vars || r).palette.error.main
338
- }
339
- })), R = /* @__PURE__ */ z.forwardRef(function(o, i) {
340
- var p, d;
341
- const s = Q({
342
- props: o,
343
- name: "MuiFormControlLabel"
344
- }), {
345
- className: a,
346
- componentsProps: g = {},
347
- control: m,
348
- disabled: u,
349
- disableTypography: n,
350
- label: $,
351
- labelPlacement: T = "end",
352
- required: k,
353
- slotProps: F = {}
354
- } = s, O = ne(s, Ee), b = Ce(), C = (p = u ?? m.props.disabled) != null ? p : b == null ? void 0 : b.disabled, h = k ?? m.props.required, j = {
355
- disabled: C,
356
- required: h
357
- };
358
- ["checked", "name", "onChange", "value", "inputRef"].forEach((l) => {
359
- typeof m.props[l] > "u" && typeof s[l] < "u" && (j[l] = s[l]);
360
- });
361
- const N = Te({
362
- props: s,
363
- muiFormControl: b,
364
- states: ["error"]
365
- }), M = v({}, s, {
366
- disabled: C,
367
- labelPlacement: T,
368
- required: h,
369
- error: N.error
370
- }), S = ze(M), q = (d = F.typography) != null ? d : g.typography;
371
- let y = $;
372
- return y != null && y.type !== oe && !n && (y = /* @__PURE__ */ t(oe, v({
373
- component: "span"
374
- }, q, {
375
- className: J(S.label, q == null ? void 0 : q.className),
376
- children: y
377
- }))), /* @__PURE__ */ f(Ne, v({
378
- className: J(S.root, a),
379
- ownerState: M,
380
- ref: i
381
- }, O, {
382
- children: [/* @__PURE__ */ z.cloneElement(m, j), h ? /* @__PURE__ */ f(se, {
383
- display: "block",
384
- children: [y, /* @__PURE__ */ f(Le, {
385
- ownerState: M,
386
- "aria-hidden": !0,
387
- className: S.asterisk,
388
- children: [" ", "*"]
389
- })]
390
- }) : y]
391
- }));
392
- });
393
- process.env.NODE_ENV !== "production" && (R.propTypes = {
394
- // ┌────────────────────────────── Warning ──────────────────────────────┐
395
- // │ These PropTypes are generated from the TypeScript type definitions. │
396
- // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
397
- // └─────────────────────────────────────────────────────────────────────┘
398
- /**
399
- * If `true`, the component appears selected.
400
- */
401
- checked: e.bool,
402
- /**
403
- * Override or extend the styles applied to the component.
404
- */
405
- classes: e.object,
406
- /**
407
- * @ignore
408
- */
409
- className: e.string,
410
- /**
411
- * The props used for each slot inside.
412
- * @default {}
413
- */
414
- componentsProps: e.shape({
415
- typography: e.object
416
- }),
417
- /**
418
- * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
419
- */
420
- control: e.element.isRequired,
421
- /**
422
- * If `true`, the control is disabled.
423
- */
424
- disabled: e.bool,
425
- /**
426
- * If `true`, the label is rendered as it is passed without an additional typography node.
427
- */
428
- disableTypography: e.bool,
429
- /**
430
- * Pass a ref to the `input` element.
431
- */
432
- inputRef: ie,
433
- /**
434
- * A text or an element to be used in an enclosing label element.
435
- */
436
- label: e.node,
437
- /**
438
- * The position of the label.
439
- * @default 'end'
440
- */
441
- labelPlacement: e.oneOf(["bottom", "end", "start", "top"]),
442
- /**
443
- * @ignore
444
- */
445
- name: e.string,
446
- /**
447
- * Callback fired when the state is changed.
448
- *
449
- * @param {React.SyntheticEvent} event The event source of the callback.
450
- * You can pull out the new checked state by accessing `event.target.checked` (boolean).
451
- */
452
- onChange: e.func,
453
- /**
454
- * If `true`, the label will indicate that the `input` is required.
455
- */
456
- required: e.bool,
457
- /**
458
- * The props used for each slot inside.
459
- * @default {}
460
- */
461
- slotProps: e.shape({
462
- typography: e.object
463
- }),
464
- /**
465
- * The system prop that allows defining system overrides as well as additional CSS styles.
466
- */
467
- sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
468
- /**
469
- * The value of the component.
470
- */
471
- value: e.any
472
- });
473
- var Z = {}, we = be;
474
- Object.defineProperty(Z, "__esModule", {
475
- value: !0
476
- });
477
- var ce = Z.default = void 0, De = we(he()), Ve = de;
478
- ce = Z.default = (0, De.default)(/* @__PURE__ */ (0, Ve.jsx)("path", {
479
- d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
480
- }), "Check");
481
- function uo({
482
- inputVariant: r,
483
- labelPosition: o = "default",
484
- defaultValues: i = {
1
+ import { jsxs as m, Fragment as K, jsx as e } from "react/jsx-runtime";
2
+ import y from "react";
3
+ import U from "lodash";
4
+ import z from "@mui/material/Box";
5
+ import j from "@mui/material/Button";
6
+ import u from "@mui/material/Checkbox";
7
+ import v from "@mui/material/FormControl";
8
+ import c from "@mui/material/FormControlLabel";
9
+ import J from "@mui/material/FormGroup";
10
+ import T from "@mui/material/InputLabel";
11
+ import b from "@mui/material/MenuItem";
12
+ import I from "@mui/material/Select";
13
+ import x from "@mui/material/TextField";
14
+ import Q from "@mui/icons-material/Check";
15
+ import { DATA_TYPES as F, COORDINATE_FORMAT as X, PRIVACY_PRESERVATION_METHOD as N } from "../../../../constants/index.js";
16
+ import { LabeledField as o } from "../../helpers.js";
17
+ function fe({
18
+ inputVariant: d,
19
+ labelPosition: r = "default",
20
+ defaultValues: L = {
485
21
  name: "",
486
22
  propertyId: "",
487
- type: Y[0],
23
+ type: F[0],
488
24
  dataTypeInfo: {},
489
25
  defaultValue: "",
490
- privacyPreservationMethod: ee[0],
26
+ privacyPreservationMethod: N[0],
491
27
  required: !1,
492
28
  visible: !1,
493
29
  editable: !1,
@@ -495,245 +31,245 @@ function uo({
495
31
  temporal: !1,
496
32
  unique: !1
497
33
  },
498
- disablePropertyId: p,
499
- onSubmit: d,
500
- onCancel: s
34
+ disablePropertyId: B,
35
+ onSubmit: Y,
36
+ onCancel: G
501
37
  }) {
502
- var T, k, F, O, b, C, h, j, N, M, S, q, y;
503
- const [a, g] = V.useState(i), [m, u] = V.useState({
38
+ var q, E, D, V, g, w, M, R, W, A, O, _, S;
39
+ const [t, C] = y.useState(L), [p, k] = y.useState({
504
40
  name: !1
505
- }), n = (l) => {
506
- var L, w;
507
- const c = l.target.name;
508
- let x = l.target.type === "checkbox" ? l.target.checked : l.target.value;
509
- if (a.type === "enum" && c === "dataTypeInfo.enumValues" && (x = x.split(",")), ((w = (L = a.dataTypeInfo) == null ? void 0 : L.innerType) == null ? void 0 : w.type) === "enum" && c === "dataTypeInfo.innerType.enumValues" && (x = x.split(",")), c.includes(".")) {
510
- let D = { ...a };
511
- me.set(D, c, x), g(D);
41
+ }), n = (a) => {
42
+ var f, s;
43
+ const l = a.target.name;
44
+ let i = a.target.type === "checkbox" ? a.target.checked : a.target.value;
45
+ if (t.type === "enum" && l === "dataTypeInfo.enumValues" && (i = i.split(",")), ((s = (f = t.dataTypeInfo) == null ? void 0 : f.innerType) == null ? void 0 : s.type) === "enum" && l === "dataTypeInfo.innerType.enumValues" && (i = i.split(",")), l.includes(".")) {
46
+ let h = { ...t };
47
+ U.set(h, l, i), C(h);
512
48
  return;
513
49
  }
514
- g((D) => ({
515
- ...D,
516
- [c]: x
50
+ C((h) => ({
51
+ ...h,
52
+ [l]: i
517
53
  }));
518
- }, $ = () => {
519
- if (!a.name) {
520
- u({ ...m, name: !0 });
54
+ }, H = () => {
55
+ if (!t.name) {
56
+ k({ ...p, name: !0 });
521
57
  return;
522
58
  }
523
- d(a);
59
+ Y(t);
524
60
  };
525
- return V.useEffect(() => (m.name && a.name && u({ ...m, name: !1 }), () => {
526
- }), [a.name]), V.useEffect(() => {
61
+ return y.useEffect(() => (p.name && t.name && k({ ...p, name: !1 }), () => {
62
+ }), [t.name]), y.useEffect(() => {
527
63
  if (![
528
64
  "date",
529
65
  "coordinate",
530
66
  "composite-list",
531
67
  "enum",
532
68
  "composite-matrix"
533
- ].includes(a.type)) {
534
- if (a.dataTypeInfo) {
535
- const { coordinateFormat: l, datePattern: c, innerType: x, enumValues: L } = a.dataTypeInfo;
536
- (l || c || x || L) && g((w) => ({ ...w, dataTypeInfo: {} }));
69
+ ].includes(t.type)) {
70
+ if (t.dataTypeInfo) {
71
+ const { coordinateFormat: a, datePattern: l, innerType: i, enumValues: f } = t.dataTypeInfo;
72
+ (a || l || i || f) && C((s) => ({ ...s, dataTypeInfo: {} }));
537
73
  }
538
74
  return () => {
539
75
  };
540
76
  }
541
- }, [a.type]), /* @__PURE__ */ f(pe, { children: [
542
- /* @__PURE__ */ t(I, { label: "Name", required: !0, labelPosition: o, children: /* @__PURE__ */ t(
543
- B,
77
+ }, [t.type]), /* @__PURE__ */ m(K, { children: [
78
+ /* @__PURE__ */ e(o, { label: "Name", required: !0, labelPosition: r, children: /* @__PURE__ */ e(
79
+ x,
544
80
  {
545
- label: o === "default" ? "Name" : void 0,
81
+ label: r === "default" ? "Name" : void 0,
546
82
  name: "name",
547
- variant: r,
83
+ variant: d,
548
84
  fullWidth: !0,
549
85
  sx: { mb: 2, mt: 0.5 },
550
- value: a.name,
86
+ value: t.name,
551
87
  onChange: n,
552
88
  required: !0,
553
- ...m.name && {
89
+ ...p.name && {
554
90
  error: !0,
555
91
  helperText: "This field is required!"
556
92
  }
557
93
  }
558
94
  ) }),
559
- /* @__PURE__ */ t(I, { label: "Property ID", labelPosition: o, children: /* @__PURE__ */ t(
560
- B,
95
+ /* @__PURE__ */ e(o, { label: "Property ID", labelPosition: r, children: /* @__PURE__ */ e(
96
+ x,
561
97
  {
562
- label: o === "default" ? "Property ID" : void 0,
98
+ label: r === "default" ? "Property ID" : void 0,
563
99
  name: "propertyId",
564
- variant: r,
100
+ variant: d,
565
101
  fullWidth: !0,
566
- disabled: p,
102
+ disabled: B,
567
103
  sx: { mb: 2 },
568
- value: a.propertyId,
104
+ value: t.propertyId,
569
105
  onChange: n
570
106
  }
571
107
  ) }),
572
- /* @__PURE__ */ t(I, { label: "Type", labelPosition: o, children: /* @__PURE__ */ f(A, { fullWidth: !0, variant: r, sx: { mb: 2 }, children: [
573
- o === "default" && /* @__PURE__ */ t(W, { id: "type-select-label", children: "Type" }),
574
- /* @__PURE__ */ t(
575
- H,
108
+ /* @__PURE__ */ e(o, { label: "Type", labelPosition: r, children: /* @__PURE__ */ m(v, { fullWidth: !0, variant: d, sx: { mb: 2 }, children: [
109
+ r === "default" && /* @__PURE__ */ e(T, { id: "type-select-label", children: "Type" }),
110
+ /* @__PURE__ */ e(
111
+ I,
576
112
  {
577
- label: o === "default" ? "Type" : void 0,
113
+ label: r === "default" ? "Type" : void 0,
578
114
  name: "type",
579
115
  labelId: "type-select-label",
580
116
  id: "type-select",
581
- value: a.type,
117
+ value: t.type,
582
118
  onChange: n,
583
- children: Y.map((l, c) => /* @__PURE__ */ t(U, { value: l, children: l }, c))
119
+ children: F.map((a, l) => /* @__PURE__ */ e(b, { value: a, children: a }, l))
584
120
  }
585
121
  )
586
122
  ] }) }),
587
- a.type === "coordinate" && /* @__PURE__ */ t(I, { label: "Coordinate Format", labelPosition: o, children: /* @__PURE__ */ f(A, { fullWidth: !0, variant: r, sx: { mb: 2 }, children: [
588
- o === "default" && /* @__PURE__ */ t(W, { id: "coordinate-format-select-label", children: "Cordinate Format" }),
589
- /* @__PURE__ */ t(
590
- H,
123
+ t.type === "coordinate" && /* @__PURE__ */ e(o, { label: "Coordinate Format", labelPosition: r, children: /* @__PURE__ */ m(v, { fullWidth: !0, variant: d, sx: { mb: 2 }, children: [
124
+ r === "default" && /* @__PURE__ */ e(T, { id: "coordinate-format-select-label", children: "Cordinate Format" }),
125
+ /* @__PURE__ */ e(
126
+ I,
591
127
  {
592
- label: o === "default" ? "Coordinate Format" : void 0,
128
+ label: r === "default" ? "Coordinate Format" : void 0,
593
129
  name: "dataTypeInfo.coordinateFormat",
594
130
  labelId: "coordinate-format-select-label",
595
131
  id: "coordinate-format-select",
596
- value: (T = a.dataTypeInfo) == null ? void 0 : T.coordinateFormat,
132
+ value: (q = t.dataTypeInfo) == null ? void 0 : q.coordinateFormat,
597
133
  onChange: n,
598
- children: ye.map((l, c) => /* @__PURE__ */ t(U, { value: l, children: l }, c))
134
+ children: X.map((a, l) => /* @__PURE__ */ e(b, { value: a, children: a }, l))
599
135
  }
600
136
  )
601
137
  ] }) }),
602
- (a.type === "composite-list" || a.type === "composite-matrix") && /* @__PURE__ */ t(I, { label: "Inner Type", labelPosition: o, children: /* @__PURE__ */ f(A, { fullWidth: !0, variant: r, sx: { mb: 2 }, children: [
603
- o === "default" && /* @__PURE__ */ t(W, { id: "composite-list-select-label", children: "Inner Type" }),
604
- /* @__PURE__ */ t(
605
- H,
138
+ (t.type === "composite-list" || t.type === "composite-matrix") && /* @__PURE__ */ e(o, { label: "Inner Type", labelPosition: r, children: /* @__PURE__ */ m(v, { fullWidth: !0, variant: d, sx: { mb: 2 }, children: [
139
+ r === "default" && /* @__PURE__ */ e(T, { id: "composite-list-select-label", children: "Inner Type" }),
140
+ /* @__PURE__ */ e(
141
+ I,
606
142
  {
607
- label: o === "default" ? "Inner Type" : void 0,
143
+ label: r === "default" ? "Inner Type" : void 0,
608
144
  name: "dataTypeInfo.innerType.type",
609
145
  labelId: "composite-list-select-label",
610
146
  id: "composite-list-select",
611
- value: (F = (k = a.dataTypeInfo) == null ? void 0 : k.innerType) == null ? void 0 : F.type,
147
+ value: (D = (E = t.dataTypeInfo) == null ? void 0 : E.innerType) == null ? void 0 : D.type,
612
148
  onChange: n,
613
- children: Y.filter(
614
- (l) => l !== "composite-list" && l !== "list"
615
- ).map((l, c) => /* @__PURE__ */ t(U, { value: l, children: l }, c))
149
+ children: F.filter(
150
+ (a) => a !== "composite-list" && a !== "list"
151
+ ).map((a, l) => /* @__PURE__ */ e(b, { value: a, children: a }, l))
616
152
  }
617
153
  )
618
154
  ] }) }),
619
- (a.type === "enum" || ((b = (O = a.dataTypeInfo) == null ? void 0 : O.innerType) == null ? void 0 : b.type) === "enum") && /* @__PURE__ */ t(I, { label: "Enum Values", labelPosition: o, children: /* @__PURE__ */ t(
620
- B,
155
+ (t.type === "enum" || ((g = (V = t.dataTypeInfo) == null ? void 0 : V.innerType) == null ? void 0 : g.type) === "enum") && /* @__PURE__ */ e(o, { label: "Enum Values", labelPosition: r, children: /* @__PURE__ */ e(
156
+ x,
621
157
  {
622
- label: o === "default" ? "Enum Values" : void 0,
623
- name: ((h = (C = a.dataTypeInfo) == null ? void 0 : C.innerType) == null ? void 0 : h.type) === "enum" ? "dataTypeInfo.innerType.enumValues" : "dataTypeInfo.enumValues",
624
- variant: r,
158
+ label: r === "default" ? "Enum Values" : void 0,
159
+ name: ((M = (w = t.dataTypeInfo) == null ? void 0 : w.innerType) == null ? void 0 : M.type) === "enum" ? "dataTypeInfo.innerType.enumValues" : "dataTypeInfo.enumValues",
160
+ variant: d,
625
161
  fullWidth: !0,
626
162
  sx: { mb: 2 },
627
- value: ((N = (j = a.dataTypeInfo) == null ? void 0 : j.innerType) == null ? void 0 : N.type) === "enum" ? (S = (M = a.dataTypeInfo.innerType) == null ? void 0 : M.enumValues) == null ? void 0 : S.join(",") : (y = (q = a.dataTypeInfo) == null ? void 0 : q.enumValues) == null ? void 0 : y.join(","),
163
+ value: ((W = (R = t.dataTypeInfo) == null ? void 0 : R.innerType) == null ? void 0 : W.type) === "enum" ? (O = (A = t.dataTypeInfo.innerType) == null ? void 0 : A.enumValues) == null ? void 0 : O.join(",") : (S = (_ = t.dataTypeInfo) == null ? void 0 : _.enumValues) == null ? void 0 : S.join(","),
628
164
  onChange: n,
629
165
  helperText: "Add list values with the comma (,) separated string"
630
166
  }
631
167
  ) }),
632
- /* @__PURE__ */ t(I, { label: "Default Value", labelPosition: o, children: /* @__PURE__ */ t(
633
- B,
168
+ /* @__PURE__ */ e(o, { label: "Default Value", labelPosition: r, children: /* @__PURE__ */ e(
169
+ x,
634
170
  {
635
- label: o === "default" ? "Default Value" : void 0,
171
+ label: r === "default" ? "Default Value" : void 0,
636
172
  name: "defaultValue",
637
- variant: r,
173
+ variant: d,
638
174
  fullWidth: !0,
639
175
  sx: { mb: 2 },
640
- value: a.defaultValue,
176
+ value: t.defaultValue,
641
177
  onChange: n
642
178
  }
643
179
  ) }),
644
- /* @__PURE__ */ t(I, { label: "Privacy Preservation Method", labelPosition: o, children: /* @__PURE__ */ f(A, { fullWidth: !0, variant: r, sx: { mb: 2 }, children: [
645
- o === "default" && /* @__PURE__ */ t(W, { id: "privacy-method-label", children: "Privacy Preservation Method" }),
646
- /* @__PURE__ */ t(
647
- H,
180
+ /* @__PURE__ */ e(o, { label: "Privacy Preservation Method", labelPosition: r, children: /* @__PURE__ */ m(v, { fullWidth: !0, variant: d, sx: { mb: 2 }, children: [
181
+ r === "default" && /* @__PURE__ */ e(T, { id: "privacy-method-label", children: "Privacy Preservation Method" }),
182
+ /* @__PURE__ */ e(
183
+ I,
648
184
  {
649
- label: o === "default" ? "Privacy Preservation Method" : void 0,
185
+ label: r === "default" ? "Privacy Preservation Method" : void 0,
650
186
  name: "privacyPreservationMethod",
651
187
  labelId: "privacy-method-label",
652
188
  id: "privacy-method",
653
- value: a.privacyPreservationMethod,
189
+ value: t.privacyPreservationMethod,
654
190
  onChange: n,
655
- children: ee.map((l, c) => /* @__PURE__ */ t(U, { value: l, children: l }, c))
191
+ children: N.map((a, l) => /* @__PURE__ */ e(b, { value: a, children: a }, l))
656
192
  }
657
193
  )
658
194
  ] }) }),
659
- /* @__PURE__ */ f(ve, { row: !0, sx: { mb: 2 }, children: [
660
- /* @__PURE__ */ t(
661
- R,
195
+ /* @__PURE__ */ m(J, { row: !0, sx: { mb: 2 }, children: [
196
+ /* @__PURE__ */ e(
197
+ c,
662
198
  {
663
199
  label: "Required",
664
- control: /* @__PURE__ */ t(
665
- P,
200
+ control: /* @__PURE__ */ e(
201
+ u,
666
202
  {
667
203
  name: "required",
668
- checked: a.required,
204
+ checked: t.required,
669
205
  onChange: n
670
206
  }
671
207
  ),
672
208
  sx: { width: "30%" }
673
209
  }
674
210
  ),
675
- /* @__PURE__ */ t(
676
- R,
211
+ /* @__PURE__ */ e(
212
+ c,
677
213
  {
678
214
  label: "Editable",
679
- control: /* @__PURE__ */ t(
680
- P,
215
+ control: /* @__PURE__ */ e(
216
+ u,
681
217
  {
682
218
  name: "editable",
683
- checked: a.editable,
219
+ checked: t.editable,
684
220
  onChange: n
685
221
  }
686
222
  ),
687
223
  sx: { width: "30%" }
688
224
  }
689
225
  ),
690
- /* @__PURE__ */ t(
691
- R,
226
+ /* @__PURE__ */ e(
227
+ c,
692
228
  {
693
229
  label: "Visible",
694
- control: /* @__PURE__ */ t(
695
- P,
230
+ control: /* @__PURE__ */ e(
231
+ u,
696
232
  {
697
233
  name: "visible",
698
- checked: a.visible,
234
+ checked: t.visible,
699
235
  onChange: n
700
236
  }
701
237
  ),
702
238
  sx: { width: "30%" }
703
239
  }
704
240
  ),
705
- /* @__PURE__ */ t(
706
- R,
241
+ /* @__PURE__ */ e(
242
+ c,
707
243
  {
708
244
  label: "Unique",
709
- control: /* @__PURE__ */ t(P, { name: "unique", checked: a.unique, onChange: n }),
245
+ control: /* @__PURE__ */ e(u, { name: "unique", checked: t.unique, onChange: n }),
710
246
  sx: { width: "30%" }
711
247
  }
712
248
  ),
713
- /* @__PURE__ */ t(
714
- R,
249
+ /* @__PURE__ */ e(
250
+ c,
715
251
  {
716
252
  label: "Distinctive",
717
- control: /* @__PURE__ */ t(
718
- P,
253
+ control: /* @__PURE__ */ e(
254
+ u,
719
255
  {
720
256
  name: "distinctive",
721
- checked: a.distinctive,
257
+ checked: t.distinctive,
722
258
  onChange: n
723
259
  }
724
260
  ),
725
261
  sx: { width: "30%" }
726
262
  }
727
263
  ),
728
- /* @__PURE__ */ t(
729
- R,
264
+ /* @__PURE__ */ e(
265
+ c,
730
266
  {
731
267
  label: "Temporal",
732
- control: /* @__PURE__ */ t(
733
- P,
268
+ control: /* @__PURE__ */ e(
269
+ u,
734
270
  {
735
271
  name: "temporal",
736
- checked: a.temporal,
272
+ checked: t.temporal,
737
273
  onChange: n
738
274
  }
739
275
  ),
@@ -741,14 +277,14 @@ function uo({
741
277
  }
742
278
  )
743
279
  ] }),
744
- /* @__PURE__ */ f(ge, { display: "flex", justifyContent: "flex-end", children: [
745
- /* @__PURE__ */ t(re, { variant: "contained", onClick: s, sx: { marginRight: 2 }, children: "Cancel" }),
746
- /* @__PURE__ */ t(
747
- re,
280
+ /* @__PURE__ */ m(z, { display: "flex", justifyContent: "flex-end", children: [
281
+ /* @__PURE__ */ e(j, { variant: "contained", onClick: G, sx: { marginRight: 2 }, children: "Cancel" }),
282
+ /* @__PURE__ */ e(
283
+ j,
748
284
  {
749
285
  variant: "contained",
750
- startIcon: /* @__PURE__ */ t(ce, {}),
751
- onClick: $,
286
+ startIcon: /* @__PURE__ */ e(Q, {}),
287
+ onClick: H,
752
288
  children: "OK"
753
289
  }
754
290
  )
@@ -756,5 +292,5 @@ function uo({
756
292
  ] });
757
293
  }
758
294
  export {
759
- uo as default
295
+ fe as default
760
296
  };