@hybridcore/ui 1.5.82 → 1.5.83

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 (87) hide show
  1. package/dist/{AccordionDetails-mpRYHtGq.js → AccordionDetails-DhriPVPP.js} +9 -9
  2. package/dist/{Add-Cjs72ewI.js → Add-CMz4N2zT.js} +36 -35
  3. package/dist/{Box-SSMZuKnS.js → Box-B1AVyJ_s.js} +17 -16
  4. package/dist/{Button-jy67CcTH.js → Button-eqWvpDuh.js} +12 -11
  5. package/dist/{ButtonBase-CgQC8DUB.js → ButtonBase-DsX-jMQJ.js} +4 -4
  6. package/dist/{CardContent-CCq4R1KS.js → CardContent-DsYqqPeJ.js} +4 -4
  7. package/dist/{Checkbox-B0P8LhCl.js → Checkbox-CrU2hpWB.js} +13 -12
  8. package/dist/{Delete-6rKk6pCT.js → Delete-86TO0fMo.js} +1 -1
  9. package/dist/{DialogContent-WDuguvBY.js → DialogContent-CqTojymQ.js} +10 -9
  10. package/dist/{FormControlLabel-BNT5EI0b.js → FormControlLabel-DzNokgFD.js} +8 -7
  11. package/dist/{IconButton-DekcZv4i.js → IconButton-DJ-31-Fd.js} +11 -10
  12. package/dist/{Input-BAbDr3Tk.js → Input-B7ry6o4t.js} +23 -22
  13. package/dist/{InputAdornment-BAVRrRts.js → InputAdornment-B7qEA4kN.js} +6 -5
  14. package/dist/{InputLabel-ClDXuWBr.js → InputLabel-rrSJo8M_.js} +10 -9
  15. package/dist/{List-CNeRnfGL.js → List-DOD5kSk3.js} +4 -4
  16. package/dist/{ListItem-N_dSd02S.js → ListItem-r8PbsvCz.js} +6 -6
  17. package/dist/{MenuItem-Lcjh1XlV.js → MenuItem-C6qlUyV3.js} +7 -7
  18. package/dist/{Modal-Csc9jNOg.js → Modal-CkcFEpHa.js} +8 -8
  19. package/dist/{OutlinedInput-De2keFJK.js → OutlinedInput-BDK6qOwW.js} +6 -6
  20. package/dist/{Paper-DRRYGupP.js → Paper-CjqLScHA.js} +5 -5
  21. package/dist/{Select-BQ4C15bt.js → Select-jjAc5JX1.js} +102 -101
  22. package/dist/{Tabs-DqdkJU6b.js → Tabs-Cn42Z5QI.js} +8 -8
  23. package/dist/{TextField-Db_pNPbv.js → TextField-Bf46COnQ.js} +24 -23
  24. package/dist/{Typography-CLq43OVQ.js → Typography-D1t7XuLN.js} +6 -5
  25. package/dist/components/card/index.js +6 -6
  26. package/dist/components/card/styled.js +1 -1
  27. package/dist/components/collapsible-card/style.js +3 -3
  28. package/dist/components/confirm/dialog.js +3 -3
  29. package/dist/components/confirm/index.js +1 -1
  30. package/dist/components/container/index.js +7 -7
  31. package/dist/components/context-menu/index.js +10 -10
  32. package/dist/components/flex-col/index.js +10 -0
  33. package/dist/components/flex-row/index.js +10 -0
  34. package/dist/components/geometry-picker/index.js +3 -3
  35. package/dist/components/icon-button/index.js +1 -1
  36. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  37. package/dist/components/instance-form/components/composite-matrix/components/editable-table/index.js +93 -0
  38. package/dist/components/instance-form/components/composite-matrix/components/editor/index.js +87 -0
  39. package/dist/components/instance-form/components/composite-matrix/components/editor/styled.js +1 -0
  40. package/dist/components/instance-form/components/composite-matrix/components/form/index.js +105 -0
  41. package/dist/components/instance-form/components/composite-matrix/components/json-editor/index.js +20551 -0
  42. package/dist/components/instance-form/components/composite-matrix/components/table/index.js +56 -0
  43. package/dist/components/instance-form/components/composite-matrix/index.js +52 -0
  44. package/dist/components/instance-form/components/composite-matrix/styled.js +69 -0
  45. package/dist/components/instance-form/components/variable/index.js +10 -9
  46. package/dist/components/instance-form/components/variables/index.js +1 -1
  47. package/dist/components/instance-hierarchy-table/styled.js +1 -1
  48. package/dist/components/map/styled.js +1 -1
  49. package/dist/components/property-mapping/index.js +1 -1
  50. package/dist/components/range-selector/components/composite-list-range/index.js +1 -1
  51. package/dist/components/range-selector/components/date-range/index.js +1 -1
  52. package/dist/components/range-selector/index.js +1 -1
  53. package/dist/components/search-input/index.js +4 -4
  54. package/dist/components/tabs/index.js +1 -1
  55. package/dist/components/template-filters/components/tab-panel/index.js +1 -1
  56. package/dist/components/template-form/components/property-list/index.js +7 -7
  57. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  58. package/dist/components/template-form/components/property-list/property-list-form.js +9 -9
  59. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  60. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  61. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +7 -7
  62. package/dist/components/template-form/index.js +5 -5
  63. package/dist/components/template-property-filters/property.js +5 -5
  64. package/dist/components/tree-select/index.js +5 -5
  65. package/dist/components/treeview-filter/item-label/index.js +3 -3
  66. package/dist/{createStyled-CUatW1r9.js → createStyled-BGx1I94c.js} +1 -1
  67. package/dist/{createSvgIcon-CsckVnG-.js → createSvgIcon-DLPYMuH1.js} +25 -24
  68. package/dist/{createSvgIcon-CBoAEepv.js → createSvgIcon-OuwzpcaC.js} +15 -14
  69. package/dist/{createTheme-DVoJnXAT.js → createTheme-CNnKNxwL.js} +1 -1
  70. package/dist/createTheme-CyC5HawC.js +879 -0
  71. package/dist/{dialog-D6oTCUrm.js → dialog-BE4D6swf.js} +6 -6
  72. package/dist/{exactProp-H1i70prd.js → exactProp-cjT0t_Pt.js} +2 -2
  73. package/dist/{extendSxProp-BmK2hLmq.js → extendSxProp-FEpqY5_S.js} +1 -1
  74. package/dist/index-DMSHuq6l.js +688 -0
  75. package/dist/{index-BmlSd3mA.js → index-MMaYBAn0.js} +138 -128
  76. package/dist/{index-R_b1ETBe.js → index-NNOChRJ7.js} +25 -24
  77. package/dist/{listItemTextClasses-CC7nbQWN.js → listItemTextClasses-CNjn41Of.js} +2 -2
  78. package/dist/main.d.ts +15 -0
  79. package/dist/main.js +47 -43
  80. package/dist/{property-list-form-B7SCqmD0.js → property-list-form-BvnaooEW.js} +13 -13
  81. package/dist/{styled-DkqItiLo.js → styled-B8ugzvji.js} +2 -2
  82. package/dist/{useTheme-GN5Dc3mG.js → useTheme-C15Eq8KG.js} +1 -1
  83. package/dist/{useTheme-B6oa3v5u.js → useTheme-D-uii9iX.js} +2 -2
  84. package/dist/{useThemeProps-BlXpIqSE.js → useThemeProps-DRP1dikX.js} +3 -3
  85. package/dist/{utils-BRsEqTye.js → utils-CsOZUsQj.js} +2 -2
  86. package/package.json +2 -1
  87. package/dist/createTheme-DrgvKMA_.js +0 -1563
@@ -1,21 +1,22 @@
1
1
  import { a as l, _ as H } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
2
  import * as M from "react";
3
- import { c as S, P as e } from "./createTheme-DrgvKMA_.js";
4
- import { g as _, u as L, c as $, a as E } from "./useThemeProps-BlXpIqSE.js";
5
- import { s as U } from "./styled-DkqItiLo.js";
6
- import { g as V } from "./createTheme-DVoJnXAT.js";
3
+ import { P as e } from "./index-DMSHuq6l.js";
4
+ import { g as S, u as _, c as L, a as $ } from "./useThemeProps-DRP1dikX.js";
5
+ import { s as E } from "./styled-B8ugzvji.js";
6
+ import { g as U } from "./createTheme-CNnKNxwL.js";
7
7
  import { jsx as p, jsxs as le } from "react/jsx-runtime";
8
- import { f as ie, F as ae, I as de } from "./InputLabel-ClDXuWBr.js";
8
+ import { f as ie, F as ae, I as de } from "./InputLabel-rrSJo8M_.js";
9
9
  import { u as ce } from "./useId-BHG98T5I.js";
10
- import { S as ue, F as pe } from "./Select-BQ4C15bt.js";
10
+ import { S as ue, F as pe } from "./Select-jjAc5JX1.js";
11
11
  import { u as fe } from "./useFormControl-CatNKXAi.js";
12
- import { r as me } from "./ButtonBase-CgQC8DUB.js";
13
- import { I as be } from "./Input-BAbDr3Tk.js";
14
- import { O as Te } from "./OutlinedInput-De2keFJK.js";
12
+ import { c as V } from "./createTheme-CyC5HawC.js";
13
+ import { r as me } from "./ButtonBase-DsX-jMQJ.js";
14
+ import { I as be } from "./Input-B7ry6o4t.js";
15
+ import { O as Te } from "./OutlinedInput-BDK6qOwW.js";
15
16
  function xe(o) {
16
- return V("MuiFormHelperText", o);
17
+ return U("MuiFormHelperText", o);
17
18
  }
18
- const z = _("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
19
+ const z = S("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
19
20
  var q;
20
21
  const ge = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"], he = (o) => {
21
22
  const {
@@ -28,17 +29,17 @@ const ge = ["children", "className", "component", "disabled", "error", "filled",
28
29
  focused: f,
29
30
  required: u
30
31
  } = o, t = {
31
- root: ["root", d && "disabled", c && "error", n && `size${S(n)}`, s && "contained", f && "focused", i && "filled", u && "required"]
32
+ root: ["root", d && "disabled", c && "error", n && `size${V(n)}`, s && "contained", f && "focused", i && "filled", u && "required"]
32
33
  };
33
- return E(t, xe, r);
34
- }, ye = U("p", {
34
+ return $(t, xe, r);
35
+ }, ye = E("p", {
35
36
  name: "MuiFormHelperText",
36
37
  slot: "Root",
37
38
  overridesResolver: (o, r) => {
38
39
  const {
39
40
  ownerState: s
40
41
  } = o;
41
- return [r.root, s.size && r[`size${S(s.size)}`], s.contained && r.contained, s.filled && r.filled];
42
+ return [r.root, s.size && r[`size${V(s.size)}`], s.contained && r.contained, s.filled && r.filled];
42
43
  }
43
44
  })(({
44
45
  theme: o,
@@ -63,7 +64,7 @@ const ge = ["children", "className", "component", "disabled", "error", "filled",
63
64
  marginLeft: 14,
64
65
  marginRight: 14
65
66
  })), B = /* @__PURE__ */ M.forwardRef(function(r, s) {
66
- const n = L({
67
+ const n = _({
67
68
  props: r,
68
69
  name: "MuiFormHelperText"
69
70
  }), {
@@ -88,7 +89,7 @@ const ge = ["children", "className", "component", "disabled", "error", "filled",
88
89
  return /* @__PURE__ */ p(ye, l({
89
90
  as: i,
90
91
  ownerState: m,
91
- className: $(x.root, c),
92
+ className: L(x.root, c),
92
93
  ref: s
93
94
  }, f, {
94
95
  children: d === " " ? (
@@ -159,9 +160,9 @@ process.env.NODE_ENV !== "production" && (B.propTypes = {
159
160
  variant: e.oneOfType([e.oneOf(["filled", "outlined", "standard"]), e.string])
160
161
  });
161
162
  function Fe(o) {
162
- return V("MuiTextField", o);
163
+ return U("MuiTextField", o);
163
164
  }
164
- _("MuiTextField", ["root"]);
165
+ S("MuiTextField", ["root"]);
165
166
  const ve = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"], Oe = {
166
167
  standard: be,
167
168
  filled: pe,
@@ -170,15 +171,15 @@ const ve = ["autoComplete", "autoFocus", "children", "className", "color", "defa
170
171
  const {
171
172
  classes: r
172
173
  } = o;
173
- return E({
174
+ return $({
174
175
  root: ["root"]
175
176
  }, Fe, r);
176
- }, Ce = U(ae, {
177
+ }, Ce = E(ae, {
177
178
  name: "MuiTextField",
178
179
  slot: "Root",
179
180
  overridesResolver: (o, r) => r.root
180
181
  })({}), we = /* @__PURE__ */ M.forwardRef(function(r, s) {
181
- const n = L({
182
+ const n = _({
182
183
  props: r,
183
184
  name: "MuiTextField"
184
185
  }), {
@@ -250,7 +251,7 @@ const ve = ["autoComplete", "autoFocus", "children", "className", "color", "defa
250
251
  inputProps: k
251
252
  }, T, A));
252
253
  return /* @__PURE__ */ le(Ce, l({
253
- className: $(se.root, f),
254
+ className: L(se.root, f),
254
255
  disabled: m,
255
256
  error: x,
256
257
  fullWidth: F,
@@ -1,11 +1,12 @@
1
1
  import { a as s, _ as B } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
2
  import * as W from "react";
3
- import { c as f, P as o } from "./createTheme-DrgvKMA_.js";
4
- import { g as C, u as M, c as O, a as j } from "./useThemeProps-BlXpIqSE.js";
5
- import { s as P } from "./styled-DkqItiLo.js";
6
- import { g as N } from "./createTheme-DVoJnXAT.js";
3
+ import { P as o } from "./index-DMSHuq6l.js";
4
+ import { g as C, u as M, c as O, a as j } from "./useThemeProps-DRP1dikX.js";
5
+ import { s as P } from "./styled-B8ugzvji.js";
6
+ import { g as N } from "./createTheme-CNnKNxwL.js";
7
7
  import { jsx as R } from "react/jsx-runtime";
8
- import { e as _ } from "./extendSxProp-BmK2hLmq.js";
8
+ import { c as f } from "./createTheme-CyC5HawC.js";
9
+ import { e as _ } from "./extendSxProp-FEpqY5_S.js";
9
10
  function U(r) {
10
11
  return N("MuiTypography", r);
11
12
  }
@@ -3,12 +3,12 @@ import { Skeleton as o, Box as u, Avatar as M } from "@mui/material";
3
3
  import { LandscapeCardRoot as A, LandscapeInfoBox as P, LandscapeCardExtraActions as _, PortraitCardRoot as L, PortraitCardExtraActions as U } from "./styled.js";
4
4
  import { a as x, _ as T } from "../../objectWithoutPropertiesLoose-DJteAcBH.js";
5
5
  import * as S from "react";
6
- import { P as i } from "../../createTheme-DrgvKMA_.js";
7
- import { g as N, u as k, c as B, a as j, b as H } from "../../useThemeProps-BlXpIqSE.js";
8
- import { s as R } from "../../styled-DkqItiLo.js";
9
- import { g as E } from "../../createTheme-DVoJnXAT.js";
10
- import { C as O } from "../../CardContent-CCq4R1KS.js";
11
- import { T as g } from "../../Typography-CLq43OVQ.js";
6
+ import { P as i } from "../../index-DMSHuq6l.js";
7
+ import { g as N, u as k, c as B, a as j, b as H } from "../../useThemeProps-DRP1dikX.js";
8
+ import { s as R } from "../../styled-B8ugzvji.js";
9
+ import { g as E } from "../../createTheme-CNnKNxwL.js";
10
+ import { C as O } from "../../CardContent-DsYqqPeJ.js";
11
+ import { T as g } from "../../Typography-D1t7XuLN.js";
12
12
  function D(t) {
13
13
  return E("MuiCardActions", t);
14
14
  }
@@ -1,5 +1,5 @@
1
1
  import { Card as t, Box as o } from "@mui/material";
2
- import { s as i } from "../../styled-DkqItiLo.js";
2
+ import { s as i } from "../../styled-B8ugzvji.js";
3
3
  const s = i(t, {
4
4
  name: "SNCard",
5
5
  // The component name
@@ -1,7 +1,7 @@
1
1
  import i, { jsx as r } from "react/jsx-runtime";
2
- import { r as n, i as s } from "../../createSvgIcon-CsckVnG-.js";
3
- import { s as o } from "../../styled-DkqItiLo.js";
4
- import { A as d, a as c, b as u } from "../../AccordionDetails-mpRYHtGq.js";
2
+ import { r as n, i as s } from "../../createSvgIcon-DLPYMuH1.js";
3
+ import { s as o } from "../../styled-B8ugzvji.js";
4
+ import { A as d, a as c, b as u } from "../../AccordionDetails-DhriPVPP.js";
5
5
  var t = {}, p = s;
6
6
  Object.defineProperty(t, "__esModule", {
7
7
  value: !0
@@ -2,9 +2,9 @@ import "react/jsx-runtime";
2
2
  import "react-confirm";
3
3
  import "@mui/material";
4
4
  import "@mui/icons-material";
5
- import "../../DialogContent-WDuguvBY.js";
6
- import { a as f } from "../../dialog-D6oTCUrm.js";
7
- import "../../Button-jy67CcTH.js";
5
+ import "../../DialogContent-CqTojymQ.js";
6
+ import { a as f } from "../../dialog-BE4D6swf.js";
7
+ import "../../Button-eqWvpDuh.js";
8
8
  export {
9
9
  f as default
10
10
  };
@@ -1,5 +1,5 @@
1
1
  import { createConfirmation as r } from "react-confirm";
2
- import { a as i } from "../../dialog-D6oTCUrm.js";
2
+ import { a as i } from "../../dialog-BE4D6swf.js";
3
3
  const o = r(i);
4
4
  function f(t, n, e = {
5
5
  cancelButtonText: "Cancel",
@@ -1,13 +1,13 @@
1
1
  import { jsx as n, jsxs as C } from "react/jsx-runtime";
2
2
  import { _ as g, a as i } from "../../objectWithoutPropertiesLoose-DJteAcBH.js";
3
3
  import * as T from "react";
4
- import { P as e } from "../../createTheme-DrgvKMA_.js";
5
- import { g as N, u as P, c as x, b as S, a as H } from "../../useThemeProps-BlXpIqSE.js";
6
- import { s as h } from "../../styled-DkqItiLo.js";
7
- import { g as R } from "../../createTheme-DVoJnXAT.js";
8
- import { P as E } from "../../Paper-DRRYGupP.js";
9
- import { T as b } from "../../Typography-CLq43OVQ.js";
10
- import { C as $ } from "../../CardContent-CCq4R1KS.js";
4
+ import { P as e } from "../../index-DMSHuq6l.js";
5
+ import { g as N, u as P, c as x, b as S, a as H } from "../../useThemeProps-DRP1dikX.js";
6
+ import { s as h } from "../../styled-B8ugzvji.js";
7
+ import { g as R } from "../../createTheme-CNnKNxwL.js";
8
+ import { P as E } from "../../Paper-CjqLScHA.js";
9
+ import { T as b } from "../../Typography-D1t7XuLN.js";
10
+ import { C as $ } from "../../CardContent-DsYqqPeJ.js";
11
11
  function k(r) {
12
12
  return R("MuiCard", r);
13
13
  }
@@ -1,17 +1,17 @@
1
1
  import { jsx as y, jsxs as V, Fragment as G } from "react/jsx-runtime";
2
2
  import * as d from "react";
3
- import { P as t } from "../../createTheme-DrgvKMA_.js";
4
- import { a as D, b as W, B as z, u as H } from "../../ButtonBase-CgQC8DUB.js";
3
+ import { P as t } from "../../index-DMSHuq6l.js";
4
+ import { a as D, b as W, B as z, u as H } from "../../ButtonBase-DsX-jMQJ.js";
5
5
  import { o as k } from "../../ownerDocument-CUrv0DIK.js";
6
- import { e as q, a as X } from "../../exactProp-H1i70prd.js";
7
- import { L, a as Y } from "../../List-CNeRnfGL.js";
8
- import { l as T, g as J, L as K } from "../../ListItem-N_dSd02S.js";
6
+ import { e as q, a as X } from "../../exactProp-cjT0t_Pt.js";
7
+ import { L, a as Y } from "../../List-DOD5kSk3.js";
8
+ import { l as T, g as J, L as K } from "../../ListItem-r8PbsvCz.js";
9
9
  import { a as b, _ as P } from "../../objectWithoutPropertiesLoose-DJteAcBH.js";
10
- import { u as $, c as R, a as w } from "../../useThemeProps-BlXpIqSE.js";
11
- import { s as B, r as Q } from "../../styled-DkqItiLo.js";
12
- import { a as C } from "../../createTheme-DVoJnXAT.js";
13
- import { g as Z, l as S, b as ee } from "../../listItemTextClasses-CC7nbQWN.js";
14
- import { T as E } from "../../Typography-CLq43OVQ.js";
10
+ import { u as $, c as R, a as w } from "../../useThemeProps-DRP1dikX.js";
11
+ import { s as B, r as Q } from "../../styled-B8ugzvji.js";
12
+ import { a as C } from "../../createTheme-CNnKNxwL.js";
13
+ import { g as Z, l as S, b as ee } from "../../listItemTextClasses-CNjn41Of.js";
14
+ import { T as E } from "../../Typography-D1t7XuLN.js";
15
15
  function M(e) {
16
16
  return e.substring(2).toLowerCase();
17
17
  }
@@ -0,0 +1,10 @@
1
+ import { styled as e, Box as o } from "@mui/material";
2
+ const x = e(o)(({ justifyContent: t, alignItems: l }) => ({
3
+ display: "flex",
4
+ flexDirection: "column",
5
+ alignItems: l ? String(l) : "flex-start",
6
+ justifyContent: t ? String(t) : "flex-start"
7
+ }));
8
+ export {
9
+ x as FlexCol
10
+ };
@@ -0,0 +1,10 @@
1
+ import { styled as r, Box as o } from "@mui/material";
2
+ const l = r(o)(({ justifyContent: t, alignItems: e }) => ({
3
+ display: "flex",
4
+ flexDirection: "row",
5
+ alignItems: e ? String(e) : "center",
6
+ justifyContent: t ? String(t) : "flex-start"
7
+ }));
8
+ export {
9
+ l as FlexRow
10
+ };
@@ -8,9 +8,9 @@ import E from "./geometry/index.js";
8
8
  import g from "./kml/index.js";
9
9
  import W from "./wkt/index.js";
10
10
  import { IconButton as u, OutlinedInput as K, FilledInput as L, Dialog as z, DialogTitle as B, DialogContent as F } from "@mui/material";
11
- import { I as G } from "../../InputAdornment-BAVRrRts.js";
12
- import { F as T, I as w } from "../../InputLabel-ClDXuWBr.js";
13
- import { I as M } from "../../Input-BAbDr3Tk.js";
11
+ import { I as G } from "../../InputAdornment-B7qEA4kN.js";
12
+ import { F as T, I as w } from "../../InputLabel-rrSJo8M_.js";
13
+ import { I as M } from "../../Input-B7ry6o4t.js";
14
14
  const Z = ({
15
15
  label: d,
16
16
  mapboxAccessToken: c,
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { VerticalButton as m, MiniButton as c } from "./styled.js";
3
- import { I as e } from "../../IconButton-DekcZv4i.js";
3
+ import { I as e } from "../../IconButton-DJ-31-Fd.js";
4
4
  const a = ({
5
5
  variant: i = "default",
6
6
  startIcon: f,
@@ -6,7 +6,7 @@ import "lodash";
6
6
  import "react";
7
7
  import "../../../../hooks/useToggle.js";
8
8
  import "../../../conditional-wrapper/index.js";
9
- import { C as s } from "../../../../index-BmlSd3mA.js";
9
+ import { C as s } from "../../../../index-MMaYBAn0.js";
10
10
  import "./styled.js";
11
11
  export {
12
12
  s as default
@@ -0,0 +1,93 @@
1
+ import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
+ import { Stack as x, Button as y, TableContainer as j, Paper as B, Table as $, TableHead as E, TableRow as A, TableCell as m, TextField as f, TableBody as F } from "@mui/material";
3
+ import * as b from "react";
4
+ const q = ({
5
+ initialRows: v = 3,
6
+ initialCols: C = 3,
7
+ initialState: l,
8
+ onChange: h
9
+ }) => {
10
+ const [s, L] = b.useState(
11
+ (l == null ? void 0 : l.rowLabels) ?? Array.from({ length: v }, () => "")
12
+ ), [n, w] = b.useState(
13
+ (l == null ? void 0 : l.columnLabels) ?? Array.from({ length: C }, () => "")
14
+ ), [t, g] = b.useState(
15
+ (l == null ? void 0 : l.data) ?? Array.from({ length: v }, () => Array.from({ length: C }, () => ""))
16
+ ), c = b.useCallback(
17
+ (o) => {
18
+ h == null || h(o);
19
+ },
20
+ [h]
21
+ ), R = (o, e) => {
22
+ const a = [...s];
23
+ a[o] = e, L(a), c({ rowLabels: a, columnLabels: n, data: t });
24
+ }, k = (o, e) => {
25
+ const a = [...n];
26
+ a[o] = e, w(a), c({ rowLabels: s, columnLabels: a, data: t });
27
+ }, T = (o, e, a) => {
28
+ const d = t.map(
29
+ (p, D) => p.map((W, z) => D === o && z === e ? a : W)
30
+ );
31
+ g(d), c({ rowLabels: s, columnLabels: n, data: d });
32
+ };
33
+ return /* @__PURE__ */ u(x, { spacing: 2, children: [
34
+ /* @__PURE__ */ u(x, { direction: "row", spacing: 1, children: [
35
+ /* @__PURE__ */ r(y, { variant: "outlined", size: "small", onClick: () => {
36
+ const o = Array.from({ length: n.length || 1 }, () => ""), e = [...s, ""], a = [...t, o];
37
+ L(e), g(a), c({ rowLabels: e, columnLabels: n, data: a });
38
+ }, children: "Add row" }),
39
+ /* @__PURE__ */ r(y, { variant: "outlined", size: "small", onClick: () => {
40
+ const o = [...n, ""], e = t.length ? t.map((a) => [...a, ""]) : [Array.from({ length: o.length }, () => "")];
41
+ w(o), g(e), c({ rowLabels: s, columnLabels: o, data: e });
42
+ }, children: "Add column" })
43
+ ] }),
44
+ /* @__PURE__ */ r(j, { component: B, elevation: 1, children: /* @__PURE__ */ u($, { size: "small", children: [
45
+ /* @__PURE__ */ r(E, { children: /* @__PURE__ */ u(A, { children: [
46
+ /* @__PURE__ */ r(
47
+ m,
48
+ {
49
+ sx: {
50
+ fontWeight: 600,
51
+ backgroundColor: "action.hover",
52
+ width: 120
53
+ }
54
+ }
55
+ ),
56
+ n.map((o, e) => /* @__PURE__ */ r(m, { align: "center", sx: { backgroundColor: "action.hover" }, children: /* @__PURE__ */ r(
57
+ f,
58
+ {
59
+ variant: "standard",
60
+ value: o,
61
+ onChange: (a) => k(e, a.target.value),
62
+ placeholder: `Col ${e + 1}`,
63
+ fullWidth: !0
64
+ }
65
+ ) }, e))
66
+ ] }) }),
67
+ /* @__PURE__ */ r(F, { children: t.map((o, e) => /* @__PURE__ */ u(A, { children: [
68
+ /* @__PURE__ */ r(m, { sx: { backgroundColor: "action.hover" }, children: /* @__PURE__ */ r(
69
+ f,
70
+ {
71
+ variant: "standard",
72
+ value: s[e] ?? "",
73
+ onChange: (a) => R(e, a.target.value),
74
+ placeholder: `Row ${e + 1}`,
75
+ fullWidth: !0
76
+ }
77
+ ) }),
78
+ o.map((a, d) => /* @__PURE__ */ r(m, { align: "center", children: /* @__PURE__ */ r(
79
+ f,
80
+ {
81
+ variant: "standard",
82
+ value: a,
83
+ onChange: (p) => T(e, d, p.target.value),
84
+ fullWidth: !0
85
+ }
86
+ ) }, d))
87
+ ] }, e)) })
88
+ ] }) })
89
+ ] });
90
+ };
91
+ export {
92
+ q as EditableMatrix
93
+ };
@@ -0,0 +1,87 @@
1
+ import { jsxs as o, jsx as e, Fragment as l } from "react/jsx-runtime";
2
+ import { Dialog as T, DialogTitle as C, Typography as A, Tabs as S, DialogContent as L, Box as a, FormControlLabel as y, Switch as D, Alert as F, DialogActions as P, Button as h, Tab as k } from "@mui/material";
3
+ import { useState as m } from "react";
4
+ import O from "../form/index.js";
5
+ import W from "../json-editor/index.js";
6
+ import { MatrixTable as j } from "../table/index.js";
7
+ import { FlexRow as B } from "../../../../../flex-row/index.js";
8
+ const p = (r) => /* @__PURE__ */ e(
9
+ k,
10
+ {
11
+ sx: { px: 0, minWidth: "auto", textTransform: "none", mr: 2 },
12
+ ...r
13
+ }
14
+ );
15
+ function X({
16
+ data: r,
17
+ open: b,
18
+ onChange: c,
19
+ onSubmit: v,
20
+ onClose: d
21
+ }) {
22
+ const [t, x] = m(0), [s, f] = m(!0), u = (i, n) => {
23
+ x(n);
24
+ }, g = (i, n) => {
25
+ f(n);
26
+ }, w = () => {
27
+ v(r);
28
+ };
29
+ return /* @__PURE__ */ o(T, { open: b, onClose: d, maxWidth: "lg", fullWidth: !0, children: [
30
+ /* @__PURE__ */ o(C, { component: "div", sx: { pb: 0 }, children: [
31
+ /* @__PURE__ */ e(A, { children: "MATRIX DATA" }),
32
+ /* @__PURE__ */ o(S, { value: t, onChange: u, children: [
33
+ /* @__PURE__ */ e(p, { label: "Form" }),
34
+ /* @__PURE__ */ e(p, { label: "JSON" })
35
+ ] })
36
+ ] }),
37
+ /* @__PURE__ */ e(L, { dividers: !0, sx: { p: 0 }, children: /* @__PURE__ */ o(B, { gap: 1, alignItems: "stretch", children: [
38
+ /* @__PURE__ */ e(a, { flex: 1, px: 2, py: 2, children: {
39
+ 0: /* @__PURE__ */ e(O, { data: r, onChange: c }),
40
+ // 1: <></>,
41
+ 1: /* @__PURE__ */ e(W, { data: r, onChange: c })
42
+ }[t] }),
43
+ t !== 2 ? /* @__PURE__ */ o(l, { children: [
44
+ /* @__PURE__ */ e(
45
+ a,
46
+ {
47
+ alignSelf: "stretch",
48
+ borderLeft: "1px solid",
49
+ borderColor: (i) => i.palette.divider
50
+ }
51
+ ),
52
+ /* @__PURE__ */ o(a, { flex: 2, px: 2, pt: 1, pb: 2, children: [
53
+ /* @__PURE__ */ e(
54
+ y,
55
+ {
56
+ control: /* @__PURE__ */ e(
57
+ D,
58
+ {
59
+ checked: s,
60
+ onChange: g
61
+ }
62
+ ),
63
+ label: "Preview",
64
+ labelPlacement: "start",
65
+ sx: { ml: 0, mb: 1 }
66
+ }
67
+ ),
68
+ s ? r && r.data.length > 0 ? /* @__PURE__ */ e(
69
+ j,
70
+ {
71
+ data: r.data,
72
+ colLabels: r.columnLabels ?? void 0,
73
+ rowLabels: r.rowLabels ?? void 0
74
+ }
75
+ ) : /* @__PURE__ */ e(F, { severity: "info", children: "Add data to see preview" }) : /* @__PURE__ */ e(l, {})
76
+ ] })
77
+ ] }) : /* @__PURE__ */ e(l, {})
78
+ ] }) }),
79
+ /* @__PURE__ */ o(P, { children: [
80
+ /* @__PURE__ */ e(h, { variant: "contained", color: "inherit", onClick: d, children: "Cancel" }),
81
+ /* @__PURE__ */ e(h, { variant: "contained", color: "primary", onClick: w, children: "Ok" })
82
+ ] })
83
+ ] });
84
+ }
85
+ export {
86
+ X as default
87
+ };
@@ -0,0 +1,105 @@
1
+ import { jsxs as l, jsx as r, Fragment as y } from "react/jsx-runtime";
2
+ import { Typography as b, Switch as j, OutlinedInput as v } from "@mui/material";
3
+ import { useState as C } from "react";
4
+ import { FlexCol as s } from "../../../../../flex-col/index.js";
5
+ import { FlexRow as A } from "../../../../../flex-row/index.js";
6
+ const i = ({ children: n, ...a }) => /* @__PURE__ */ r(b, { variant: "caption", fontWeight: 500, ...a, children: n }), u = (n) => /* @__PURE__ */ r(
7
+ v,
8
+ {
9
+ size: "small",
10
+ sx: { fontSize: 13, flex: 1 },
11
+ fullWidth: !0,
12
+ ...n
13
+ }
14
+ );
15
+ function z({ data: n, onChange: a }) {
16
+ var p;
17
+ const [m, L] = C(
18
+ !!((p = n.rowLabels) != null && p.length)
19
+ ), f = (t, e) => {
20
+ L(e), a({
21
+ ...n,
22
+ rowLabels: [],
23
+ columnLabels: []
24
+ });
25
+ }, c = (t) => {
26
+ var h;
27
+ const { name: e, value: o } = t.target;
28
+ if (e === "columnLabels" || e === "rowLabels") {
29
+ const w = (h = o.trim().split(",")) == null ? void 0 : h.map((x) => x.trim());
30
+ a({
31
+ ...n,
32
+ [e]: w
33
+ });
34
+ return;
35
+ }
36
+ e === "data" && a({
37
+ ...n,
38
+ data: g(o)
39
+ });
40
+ };
41
+ function g(t) {
42
+ try {
43
+ const e = JSON.parse(t.trim());
44
+ if (Array.isArray(e) && Array.isArray(e[0]))
45
+ return e;
46
+ } catch {
47
+ }
48
+ return t.split(`
49
+ `).map((e) => {
50
+ const o = e.includes(",") ? "," : /\s+/;
51
+ return e.split(o);
52
+ });
53
+ }
54
+ function d(t) {
55
+ return t.map((e) => e.join(" ")).join(`
56
+ `);
57
+ }
58
+ return /* @__PURE__ */ l(s, { alignItems: "stretch", gap: 1, children: [
59
+ /* @__PURE__ */ r(b, { children: "Matrix Data Input" }),
60
+ /* @__PURE__ */ l(A, { justifyContent: "space-between", children: [
61
+ /* @__PURE__ */ r(i, { children: "Use Labels" }),
62
+ /* @__PURE__ */ r(j, { checked: m, onChange: f })
63
+ ] }),
64
+ m && /* @__PURE__ */ l(y, { children: [
65
+ /* @__PURE__ */ l(s, { gap: 0.5, children: [
66
+ /* @__PURE__ */ r(i, { children: "Column Labels" }),
67
+ /* @__PURE__ */ r(
68
+ u,
69
+ {
70
+ name: "columnLabels",
71
+ value: n.columnLabels ? n.columnLabels.join(",") : "",
72
+ onChange: c
73
+ }
74
+ )
75
+ ] }),
76
+ /* @__PURE__ */ l(s, { gap: 0.5, children: [
77
+ /* @__PURE__ */ r(i, { children: "Row Labels" }),
78
+ /* @__PURE__ */ r(
79
+ u,
80
+ {
81
+ name: "rowLabels",
82
+ value: n.rowLabels ? n.rowLabels.join(",") : "",
83
+ onChange: c
84
+ }
85
+ )
86
+ ] })
87
+ ] }),
88
+ /* @__PURE__ */ l(s, { gap: 0.5, children: [
89
+ /* @__PURE__ */ r(i, { children: "Data" }),
90
+ /* @__PURE__ */ r(
91
+ u,
92
+ {
93
+ name: "data",
94
+ value: d(n.data),
95
+ onChange: c,
96
+ multiline: !0,
97
+ minRows: 3
98
+ }
99
+ )
100
+ ] })
101
+ ] });
102
+ }
103
+ export {
104
+ z as default
105
+ };