@m4l/components 0.1.26 → 0.1.28

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 (112) hide show
  1. package/assets/Logo/index.228dcb5a.js +42 -35
  2. package/commonjs.565e6834.js +5 -5
  3. package/components/CommonActions/components/ActionCancel/index.e498eeb2.js +17 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.4ff0ad73.js +64 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +28 -22
  6. package/components/CommonActions/components/ActionIntro/index.60ef7bd7.js +18 -0
  7. package/components/CommonActions/components/Actions/index.0645e30f.js +867 -0
  8. package/components/DataGrid/index.76d8fd25.js +1075 -0
  9. package/components/DynamicFilter/index.342ba5fe.js +1577 -0
  10. package/components/ErrorLabel/index.c8615f16.js +13 -12
  11. package/components/Icon/index.619c31c4.js +96 -0
  12. package/components/Icon/types.d.ts +2 -1
  13. package/components/Image/index.93d5f37f.js +190 -0
  14. package/components/Loadable/index.f5518558.js +8 -8
  15. package/components/ModalDialog/index.9ea10764.js +184 -0
  16. package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
  17. package/components/ObjectLogs/index.f941fb79.js +288 -0
  18. package/components/Page/index.4237c241.js +22 -20
  19. package/components/PaperForm/index.ec9cb8c9.js +112 -0
  20. package/components/Period/index.2941fbda.js +249 -0
  21. package/components/PropertyValue/index.dfcfe1ba.js +147 -0
  22. package/components/PropertyValue/styles.d.ts +2 -1
  23. package/components/PropertyValue/types.d.ts +3 -3
  24. package/components/Resizeable/index.45995d2b.js +19 -19
  25. package/components/ScrollBar/index.39eeb2de.js +26 -21
  26. package/components/ScrollToTop/index.e06f98f6.js +8 -7
  27. package/components/SplitLayout/index.4032673d.js +35 -33
  28. package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
  29. package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
  30. package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
  31. package/components/animate/features.0fbf41e1.js +3 -3
  32. package/components/animate/variants/bounce.784aaaaa.js +16 -13
  33. package/components/animate/variants/container.11f82b76.js +8 -6
  34. package/components/animate/variants/fade.b561c0fc.js +32 -28
  35. package/components/animate/variants/transition.bd46b9ce.js +17 -12
  36. package/components/formatters/BooleanFormatter/index.8da35c9c.js +55 -0
  37. package/components/formatters/DateFormatter/index.1b9baacc.js +69 -0
  38. package/components/formatters/index.689a8086.js +119 -0
  39. package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
  40. package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
  41. package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
  42. package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
  43. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
  44. package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
  45. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
  46. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
  47. package/components/hook-form/RHFTextField/index.f9aaaa90.js +146 -0
  48. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/index.d.ts +0 -0
  49. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/styles.d.ts +4 -3
  50. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/index.d.ts +0 -0
  51. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/subcomponents/Skeleton/styles.d.ts +0 -0
  52. package/components/hook-form/RHFUpload/RHFUploadImage/{components → subcomponents}/UploadImage/types.d.ts +0 -0
  53. package/components/hook-form/RHFUpload/index.d5cc7c13.js +285 -0
  54. package/components/mui_extended/Accordion/index.a02ac6ae.js +107 -0
  55. package/components/mui_extended/Avatar/index.fe06afd7.js +51 -0
  56. package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
  57. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
  58. package/components/mui_extended/Button/index.53b56958.js +178 -0
  59. package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
  60. package/components/mui_extended/IconButton/index.a321e5cb.js +120 -0
  61. package/components/mui_extended/IconButton/index.d.ts +1 -1
  62. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
  63. package/components/mui_extended/Pager/index.c0865b70.js +141 -0
  64. package/components/mui_extended/Popover/index.705275a4.js +278 -0
  65. package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
  66. package/components/mui_extended/Typography/index.e5494696.js +25 -21
  67. package/contexts/ModalContext/index.b92fa565.js +153 -0
  68. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
  69. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
  70. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
  71. package/contexts/RHFormContext/index.b142190a.js +63 -0
  72. package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
  73. package/hooks/useModal/index.5fee01a3.js +11 -0
  74. package/index.js +153 -153
  75. package/package.json +2 -1
  76. package/react-data-grid.d46d625e.js +2206 -1663
  77. package/react-draggable.20e95c61.js +800 -553
  78. package/react-json-view.f56a7f8e.js +2344 -2340
  79. package/react-resizable.5277deaf.js +470 -298
  80. package/react-splitter-layout.7810ac1b.js +130 -128
  81. package/utils/index.214d9542.js +500 -354
  82. package/components/CommonActions/components/ActionCancel/index.6736b782.js +0 -17
  83. package/components/CommonActions/components/ActionFormCancel/index.281ee166.js +0 -49
  84. package/components/CommonActions/components/ActionIntro/index.4665a611.js +0 -18
  85. package/components/CommonActions/components/Actions/index.cd7b2671.js +0 -742
  86. package/components/DataGrid/index.2caf6231.js +0 -894
  87. package/components/DynamicFilter/index.f2377369.js +0 -1157
  88. package/components/Icon/index.f569765b.js +0 -82
  89. package/components/Image/index.c9da2d5a.js +0 -152
  90. package/components/ModalDialog/index.bee344a5.js +0 -168
  91. package/components/ObjectLogs/index.6b6f95e6.js +0 -266
  92. package/components/PaperForm/index.3f8c7ef2.js +0 -105
  93. package/components/Period/index.a112ce37.js +0 -175
  94. package/components/PropertyValue/index.ab3dd7e9.js +0 -116
  95. package/components/contexts/RHFormContext/index.33dba822.js +0 -56
  96. package/components/formatters/BooleanFormatter/index.3ec56305.js +0 -42
  97. package/components/formatters/DateFormatter/index.08d8823b.js +0 -57
  98. package/components/formatters/index.6959c2de.js +0 -106
  99. package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
  100. package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
  101. package/components/hook-form/RHFPeriod/index.979d0898.js +0 -51
  102. package/components/hook-form/RHFTextField/index.ba2a8f67.js +0 -129
  103. package/components/hook-form/RHFUpload/index.6347159a.js +0 -258
  104. package/components/mui_extended/Accordion/index.49f5df8e.js +0 -103
  105. package/components/mui_extended/Avatar/index.dadb0528.js +0 -37
  106. package/components/mui_extended/Button/index.52d18aea.js +0 -144
  107. package/components/mui_extended/IconButton/index.4b5ce8b5.js +0 -103
  108. package/components/mui_extended/Pager/index.951b6975.js +0 -126
  109. package/components/mui_extended/Popover/index.4da8587a.js +0 -252
  110. package/contexts/ModalContext/index.5388dfd5.js +0 -136
  111. package/hooks/useModal/index.3b1ff084.js +0 -11
  112. package/node_modules.168cb897.js +0 -55
@@ -1,105 +0,0 @@
1
- import { styled as r } from "@mui/material/styles";
2
- import { useModuleSkeleton as s } from "@m4l/core";
3
- import { Skeleton as d } from "@mui/material";
4
- import { I as l } from "../Icon/index.f569765b.js";
5
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
6
- const c = r("div")(({
7
- theme: i
8
- }) => ({
9
- display: "flex",
10
- flexDirection: "column",
11
- padding: i.spacing(1),
12
- [i.breakpoints.up("sm")]: {
13
- margin: `${i.spacing(1.5)} ${i.spacing(1.5)} ${i.spacing(3)} ${i.spacing(1.5)}`,
14
- borderRadius: i.spacing(2),
15
- boxShadow: i.customShadows.z8,
16
- padding: i.spacing(3),
17
- backgroundColor: i.palette.background.paper
18
- }
19
- })), p = r("div")(({
20
- theme: i
21
- }) => ({
22
- display: "flex",
23
- flexDirection: "row",
24
- alignItems: "center",
25
- borderBottom: `1px solid ${i.palette.divider}`,
26
- paddingBottom: i.spacing(3),
27
- marginBottom: i.spacing(2),
28
- overflow: "hidden"
29
- })), g = r("div")(({
30
- theme: i
31
- }) => ({
32
- display: "flex",
33
- flexDirection: "row",
34
- flexGrow: 1,
35
- alignItems: "center",
36
- cursor: "move",
37
- ...i.typography.subtitle1,
38
- color: i.palette.text.primary
39
- })), u = r("div")(({
40
- theme: i
41
- }) => ({
42
- display: "flex",
43
- alignItems: "center",
44
- justifyContent: "center",
45
- marginRight: i.spacing(1.5)
46
- })), f = r("div")(() => ({
47
- flexGrow: 1,
48
- position: "relative"
49
- })), m = r("div")(({
50
- theme: i
51
- }) => ({
52
- width: "auto",
53
- display: "grid",
54
- gridTemplateColumns: `${i.spacing(2)} auto`,
55
- gridGap: `${i.spacing(1.5)}`,
56
- paddingBottom: `${i.spacing(3)}`,
57
- borderBottom: `1px solid ${i.palette.divider}`,
58
- marginBottom: `${i.spacing(3)}`
59
- })), x = (i) => {
60
- const {
61
- urlIcon: n,
62
- title: t
63
- } = i;
64
- return s() ? /* @__PURE__ */ a(m, {
65
- children: [/* @__PURE__ */ o(d, {
66
- variant: "circular",
67
- width: 16,
68
- height: 16
69
- }), /* @__PURE__ */ o(d, {
70
- variant: "text",
71
- width: 68,
72
- height: 14
73
- })]
74
- }) : /* @__PURE__ */ o(p, {
75
- id: "Header",
76
- children: /* @__PURE__ */ a(g, {
77
- className: "draggable-dialog-title",
78
- children: [/* @__PURE__ */ o(u, {
79
- children: /* @__PURE__ */ o(l, {
80
- src: n
81
- })
82
- }), t]
83
- })
84
- });
85
- };
86
- function I(i) {
87
- const {
88
- urlIcon: n,
89
- title: t,
90
- children: e
91
- } = i;
92
- return /* @__PURE__ */ a(c, {
93
- id: "ContainerPropertyValue",
94
- children: [/* @__PURE__ */ o(x, {
95
- urlIcon: n,
96
- title: t
97
- }), /* @__PURE__ */ o(f, {
98
- id: "Content",
99
- children: e
100
- })]
101
- });
102
- }
103
- export {
104
- I as P
105
- };
@@ -1,175 +0,0 @@
1
- import { useModuleDictionary as O, useModuleSkeleton as P, useEnvironment as R } from "@m4l/core";
2
- import { styled as a, Skeleton as u, Autocomplete as T, TextField as b } from "@mui/material";
3
- import { useMemo as $ } from "react";
4
- import { I as A } from "../Icon/index.f569765b.js";
5
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
6
- import { g as w } from "../CommonActions/components/Actions/index.cd7b2671.js";
7
- import "@mui/material/Button";
8
- import "react-hook-form";
9
- import "react-router-dom";
10
- import "../../contexts/ModalContext/index.5388dfd5.js";
11
- import "@mui/lab";
12
- const M = a("div")(({
13
- theme: t,
14
- error: i,
15
- readOnly: p
16
- }) => ({
17
- display: "flex",
18
- width: "100%",
19
- height: "auto",
20
- alignItems: "center",
21
- gap: t.spacing(1),
22
- border: i ? `1px solid ${t.palette.error.main}` : `1px solid ${t.palette.divider}`,
23
- padding: t.spacing(0.5, 1),
24
- borderRadius: "4px",
25
- ...p && {
26
- border: "0px"
27
- },
28
- "& .MuiAutocomplete-root, & .MuiTextField-root": {
29
- width: "100%"
30
- },
31
- "& .MuiAutocomplete-root .MuiTextField-root": {
32
- width: "100%"
33
- },
34
- "& .MuiTextField-root .MuiInput-input": {
35
- padding: "5px!important"
36
- }
37
- })), g = a("div")(({
38
- theme: t
39
- }) => ({
40
- width: "1px",
41
- height: "20px",
42
- backgroundColor: t.palette.divider
43
- })), D = a("div", {
44
- shouldForwardProp: (t) => t !== "readOnly"
45
- })(({
46
- theme: t,
47
- readOnly: i
48
- }) => ({
49
- display: "flex",
50
- width: "100%",
51
- height: "37.5px",
52
- alignItems: "center",
53
- gap: t.spacing(1),
54
- border: `1px solid ${t.palette.divider}`,
55
- ...i && {
56
- border: "0px"
57
- },
58
- padding: t.spacing(0.5, 1),
59
- borderRadius: "4px"
60
- })), F = a("div")(({
61
- theme: t
62
- }) => ({
63
- ...t.typography.body2,
64
- width: "100%",
65
- display: "flex",
66
- textOverflow: "elipsis",
67
- overflow: "hidden",
68
- padding: "5px",
69
- textAlign: "left"
70
- })), H = a("div")(({
71
- theme: t
72
- }) => ({
73
- ...t.typography.body2,
74
- width: "70px",
75
- display: "flex",
76
- textOverflow: "elipsis",
77
- overflow: "hidden",
78
- padding: "5px",
79
- textAlign: "left"
80
- }));
81
- var r = /* @__PURE__ */ ((t) => (t[t.YEARS = 0] = "YEARS", t[t.MONTHS = 1] = "MONTHS", t[t.DAYS = 2] = "DAYS", t))(r || {});
82
- const _ = (t) => t ? t.selPeriodTime ? t.selPeriodTime : t.years && t.years > 0 ? r.YEARS : t.months && t.months > 0 ? r.MONTHS : t.days && t.days > 0 ? r.DAYS : r.YEARS : r.YEARS, N = (t) => t ? t.singleValue !== void 0 ? t.singleValue : t.years && t.years > 0 ? t.years : t.months && t.months > 0 ? t.months : t.days && t.days > 0 ? t.days : "" : "", J = (t) => {
83
- const {
84
- value: i,
85
- onChange: p,
86
- error: C = !1,
87
- readOnly: l = !1,
88
- skeletonWidth: I = "100%",
89
- skeletonHeight: h = "18px"
90
- } = t, {
91
- getLabel: d
92
- } = O(), Y = P(), f = _(i), x = N(i), m = (e, o) => {
93
- const s = {
94
- selPeriodTime: e,
95
- singleValue: o
96
- };
97
- o !== "" && o > 0 && (s.years = 0, s.months = 0, s.days = 0, e === r.YEARS && (s.years = o), e === r.MONTHS && (s.months = o), e === r.DAYS && (s.days = o)), p(s);
98
- }, k = (e) => {
99
- e && m(e.id, x);
100
- }, {
101
- host_static_assets: y,
102
- environment_assets: v
103
- } = R(), S = $(() => [{
104
- id: 0,
105
- label: d("period.years")
106
- }, {
107
- id: 1,
108
- label: d("period.months")
109
- }, {
110
- id: 2,
111
- label: d("period.days")
112
- }], [d]);
113
- return Y ? /* @__PURE__ */ c(D, {
114
- readOnly: l,
115
- children: [/* @__PURE__ */ n(u, {
116
- variant: "text",
117
- width: "50%",
118
- height: h
119
- }), /* @__PURE__ */ n(g, {}), /* @__PURE__ */ n(u, {
120
- variant: "text",
121
- width: I,
122
- height: h
123
- }), /* @__PURE__ */ n(u, {
124
- variant: "circular",
125
- width: 20,
126
- sx: {
127
- minWidth: "20px",
128
- minHeight: "20px"
129
- }
130
- })]
131
- }) : (l && (i.selPeriodTime, i.singleValue, A, `${y}${v}`), /* @__PURE__ */ c(M, {
132
- error: C,
133
- readOnly: l,
134
- children: [/* @__PURE__ */ n(T, {
135
- options: S,
136
- value: S[f],
137
- disableClearable: !0,
138
- onChange: (e, o) => {
139
- k(o);
140
- },
141
- renderInput: (e) => /* @__PURE__ */ n(b, {
142
- ...e,
143
- fullWidth: !0,
144
- variant: "standard",
145
- SelectProps: {
146
- native: !0
147
- },
148
- InputProps: {
149
- disableUnderline: !0,
150
- ...e.InputProps
151
- },
152
- autoComplete: "off"
153
- }, `tx_async_${e.id}`)
154
- }), /* @__PURE__ */ n(g, {}), /* @__PURE__ */ n(b, {
155
- type: "number",
156
- variant: "standard",
157
- value: x,
158
- InputProps: {
159
- disableUnderline: !0
160
- },
161
- onChange: (e) => {
162
- m(f, e.target.value === "" ? "" : parseInt(e.target.value));
163
- }
164
- }), /* @__PURE__ */ n(A, {
165
- src: `${y}/${v}/frontend/components/period/assets/icons/clock.svg`
166
- })]
167
- }));
168
- };
169
- function Q() {
170
- return ["period"].concat(w());
171
- }
172
- export {
173
- J as P,
174
- Q as g
175
- };
@@ -1,116 +0,0 @@
1
- import { styled as p } from "@mui/material/styles";
2
- import { Skeleton as g } from "@mui/material";
3
- import { jsx as n, jsxs as f } from "react/jsx-runtime";
4
- import { useResponsiveDesktop as c } from "@m4l/graphics";
5
- import { useModuleSkeleton as h } from "@m4l/core";
6
- const y = p("div", {
7
- shouldForwardProp: (r) => r !== "propertyWidth" && r !== "propertyHeight" && r !== "isForm"
8
- })(({
9
- propertyWidth: r,
10
- isForm: i,
11
- theme: t
12
- }) => ({
13
- display: "grid",
14
- gridTemplateColumns: "1fr",
15
- alignItems: "flex-start",
16
- width: "100%",
17
- padding: `${t.spacing(1)} ${t.spacing(2)}`,
18
- ":hover": {
19
- backgroundColor: i ? "unset" : t.palette.grid?.rowHover
20
- },
21
- borderBottom: i ? "none" : `1px solid ${t.palette.divider}`,
22
- flexDirection: "column",
23
- [t.breakpoints.up("sm")]: {
24
- gridTemplateColumns: r ? `${r}px 1fr` : "150px 1fr",
25
- gap: t.spacing(2),
26
- alignItems: "center"
27
- }
28
- })), x = p("div", {
29
- shouldForwardProp: (r) => r !== "propertyWidth" && r !== "propertyHeight" && r !== "isForm"
30
- })(({
31
- propertyWidth: r,
32
- isForm: i,
33
- theme: t
34
- }) => ({
35
- width: "100%",
36
- minWidth: "100%",
37
- ...t.typography.subtitle2,
38
- color: t.palette.text.primary,
39
- height: "100%",
40
- display: "flex",
41
- alignItems: "center",
42
- justifyContent: "flex-start",
43
- position: "relative",
44
- [t.breakpoints.up("sm")]: {
45
- borderRight: i ? "none" : `1px solid ${t.palette.divider}`,
46
- paddingRight: t.spacing(2),
47
- textAlign: "right",
48
- width: r || "150px",
49
- minWidth: r || "150px",
50
- justifyContent: "flex-end"
51
- },
52
- overflow: "hidden",
53
- overflowWrap: "break-word"
54
- })), v = p("div", {
55
- shouldForwardProp: (r) => r !== "valueWidth" && r !== "valueHeight" && r !== "withGrid"
56
- })(({
57
- valueWidth: r,
58
- valueHeight: i,
59
- theme: t
60
- }) => ({
61
- flexGrow: "1",
62
- ...t.typography.body2,
63
- color: t.palette.text.secondary,
64
- position: "relative",
65
- padding: "1px",
66
- maxWidth: `${r}%`,
67
- width: `${r}%`,
68
- height: i,
69
- marginTop: t.spacing(1),
70
- [t.breakpoints.up("sm")]: {
71
- marginTop: "0px"
72
- },
73
- overflow: "hidden",
74
- overflowWrap: "break-word"
75
- })), m = p("div")(() => ({
76
- display: "flex",
77
- justifyContent: "flex-end"
78
- }));
79
- function w() {
80
- return /* @__PURE__ */ n(m, {
81
- children: /* @__PURE__ */ n(g, {
82
- variant: "text",
83
- width: 68,
84
- height: 14
85
- })
86
- });
87
- }
88
- function C(r) {
89
- const {
90
- property: i,
91
- value: t,
92
- propertyWidth: a = 200,
93
- valueHeight: d = "auto",
94
- valueWidth: e = "100",
95
- isForm: l
96
- } = r, o = c(), s = h(), u = (() => e === "75" && o ? "75" : e === "75" && !o ? "100" : e === "50" && o ? "50" : e === "50" && !o ? "100" : e === "25" && o || e === "12.5" && o ? `${e}` : e === "25" && !o ? "50" : e === "12.5" && !o ? "25" : "100")();
97
- return /* @__PURE__ */ f(y, {
98
- id: "WrapperPropertyValue",
99
- isForm: l,
100
- propertyWidth: a,
101
- children: [/* @__PURE__ */ n(x, {
102
- id: "Property",
103
- isForm: l,
104
- propertyWidth: a,
105
- children: s ? /* @__PURE__ */ n(w, {}) : i
106
- }), /* @__PURE__ */ n(v, {
107
- id: "Value",
108
- valueWidth: u,
109
- valueHeight: d,
110
- children: t
111
- })]
112
- });
113
- }
114
- export {
115
- C as P
116
- };
@@ -1,56 +0,0 @@
1
- import { useEffect as t } from "react";
2
- import { useForm as f, FormProvider as m } from "react-hook-form";
3
- import { o as n } from "../../../node_modules.168cb897.js";
4
- import { styled as c } from "@mui/material/styles";
5
- import { jsx as l } from "react/jsx-runtime";
6
- const h = c("form")(({
7
- theme: r
8
- }) => ({
9
- display: "flex",
10
- marginBottom: r.spacing(1),
11
- flexDirection: "column",
12
- width: "100%",
13
- overflow: "auto",
14
- maxWidth: r.stretch ? "unset" : "900px",
15
- padding: r.spacing(3)
16
- }));
17
- function P(r) {
18
- const {
19
- children: d,
20
- onSubmit: i,
21
- values: s,
22
- validationSchema: u,
23
- statusLoad: o = "ready"
24
- } = r, e = f({
25
- resolver: n(u),
26
- defaultValues: s
27
- });
28
- return t(() => {
29
- if (console.log("useEffect FormProvider reload_values_provider===", o, s, e), o === "reload_values_provider") {
30
- Object.keys(s).forEach((a) => {
31
- e.setValue(a, s[a], {
32
- shouldValidate: !1,
33
- shouldDirty: !1,
34
- shouldTouch: !1
35
- });
36
- });
37
- return;
38
- }
39
- }, [e, o, s]), t(() => {
40
- o === "ready" && (console.log("useEffect FormProvider Ready", o), e.setValue("statusLoad", "ready", {
41
- shouldValidate: !1,
42
- shouldDirty: !1,
43
- shouldTouch: !1
44
- }));
45
- }, [o]), /* @__PURE__ */ l(m, {
46
- ...e,
47
- children: /* @__PURE__ */ l(h, {
48
- id: "formProvider",
49
- onSubmit: e.handleSubmit(i),
50
- children: d
51
- })
52
- });
53
- }
54
- export {
55
- P as R
56
- };
@@ -1,42 +0,0 @@
1
- import { useModuleDictionary as u, useEnvironment as _, getPropertyByString as p } from "@m4l/core";
2
- import l from "react";
3
- import { I as d } from "../../Icon/index.f569765b.js";
4
- import { jsx as t } from "react/jsx-runtime";
5
- function g(r) {
6
- const {
7
- presentationType: n,
8
- value: s,
9
- Component: o = l.Fragment
10
- } = r, {
11
- getLabel: e
12
- } = u(), {
13
- host_static_assets: c,
14
- environment_assets: i
15
- } = _(), a = s ?? !1, m = `${c}/${i}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_true.svg`, f = `${c}/${i}/frontend/components/data_grid/components/boolean_formatter/assets/icons/check_false.svg`;
16
- return n === "string_yes_no" ? /* @__PURE__ */ t(o, {
17
- children: e(a ? "formatters.boolean_yes" : "formatters.boolean_no")
18
- }) : n === "string_true_false" ? /* @__PURE__ */ t(o, {
19
- children: e(a ? "formatters.boolean_true" : "formatters.boolean_false")
20
- }) : /* @__PURE__ */ t(o, {
21
- children: /* @__PURE__ */ t(d, {
22
- src: a ? m : f,
23
- bgColor: "action.disabled"
24
- })
25
- });
26
- }
27
- function C(r) {
28
- const {
29
- fieldValue: n,
30
- presentationType: s,
31
- Component: o = l.Fragment
32
- } = r;
33
- return (e) => /* @__PURE__ */ t(g, {
34
- presentationType: s,
35
- value: p(e, n),
36
- Component: o
37
- });
38
- }
39
- export {
40
- g as B,
41
- C as c
42
- };
@@ -1,57 +0,0 @@
1
- import c from "react";
2
- import { useEnvironment as p, useHostTools as u, getPropertyByString as d } from "@m4l/core";
3
- import "../../Icon/index.f569765b.js";
4
- import "@mui/material/styles";
5
- import { jsx as f, Fragment as y } from "react/jsx-runtime";
6
- function g(a) {
7
- const {
8
- presentationType: n,
9
- value: t,
10
- format: e,
11
- Component: m = c.Fragment
12
- } = a, {
13
- dfnsFormat: r
14
- } = p(), {
15
- formatDate: l
16
- } = u();
17
- let o = e || r.datetime_format, i, s;
18
- if (t == null)
19
- return /* @__PURE__ */ f(y, {
20
- children: "-"
21
- });
22
- switch (n) {
23
- case "datetime":
24
- o = e || r.datetime_format;
25
- break;
26
- case "date":
27
- o = e || r.date_format;
28
- break;
29
- case "time":
30
- o = e || r.time_format;
31
- break;
32
- }
33
- try {
34
- typeof t == "number" || typeof t == "string" ? s = new Date(t) : s = t, i = l(s, o);
35
- } catch {
36
- i = "err_typing";
37
- }
38
- return /* @__PURE__ */ f(m, {
39
- children: i
40
- });
41
- }
42
- function k(a) {
43
- const {
44
- fieldValue: n,
45
- presentationType: t,
46
- Component: e = c.Fragment
47
- } = a;
48
- return (m) => /* @__PURE__ */ f(g, {
49
- presentationType: t,
50
- value: d(m, n),
51
- Component: e
52
- });
53
- }
54
- export {
55
- g as D,
56
- k as c
57
- };
@@ -1,106 +0,0 @@
1
- import l from "react";
2
- import { jsx as m, Fragment as u } from "react/jsx-runtime";
3
- import { getPropertyByString as i } from "@m4l/core";
4
- import "../Icon/index.f569765b.js";
5
- import "@mui/material/styles";
6
- function _(e) {
7
- const {
8
- value: n,
9
- unit: t,
10
- symbol: c,
11
- Component: o = l.Fragment
12
- } = e;
13
- if (n == null || !Array.isArray(n))
14
- return /* @__PURE__ */ m(u, {
15
- children: ""
16
- });
17
- let r = "";
18
- return n.map((a, s) => {
19
- const f = a.cmc_min_closed != !0 ? "<" : "\u2264", d = a.cmc_max_closed != !0 ? "<" : "\u2264";
20
- r = r.concat(`${s > 0 ? " " : ""}`, a.cmc_min !== a.cmc_max ? `[${a.cmc_min}${t} ${f} ${c} ${d} ${a.cmc_max}${t} \xB1 ${a.cmc_uncertainty}]` : `[${a.cmc_min}${t} \xB1 ${a.cmc_uncertainty}]`);
21
- }), /* @__PURE__ */ m(o, {
22
- children: r
23
- });
24
- }
25
- function y(e) {
26
- const {
27
- value: n,
28
- unit: t,
29
- Component: c = l.Fragment
30
- } = e;
31
- if (console.log("points", n), n == null || !Array.isArray(n))
32
- return /* @__PURE__ */ m(u, {
33
- children: "[]"
34
- });
35
- let o = "";
36
- return n.map((r) => {
37
- r && (console.log("point", r), o = o.concat(`[${r}${t}]`));
38
- }), /* @__PURE__ */ m(c, {
39
- children: o
40
- });
41
- }
42
- function C(e) {
43
- const {
44
- value: n,
45
- Component: t = l.Fragment
46
- } = e;
47
- return /* @__PURE__ */ m(t, {
48
- children: `${n}$Cop`
49
- });
50
- }
51
- function v() {
52
- return ["formatters"];
53
- }
54
- const h = {
55
- pager: {
56
- boolean_yes: "Yes",
57
- boolean_no: "No",
58
- boolean_true: "True",
59
- boolean_false: "False"
60
- }
61
- };
62
- function U(e) {
63
- const {
64
- fieldUnit: n,
65
- fieldValue: t,
66
- fieldSymbol: c,
67
- Component: o
68
- } = e;
69
- return (r) => /* @__PURE__ */ m(_, {
70
- Component: o,
71
- value: i(r, t),
72
- unit: i(r, n),
73
- symbol: i(r, c)
74
- });
75
- }
76
- function A(e) {
77
- const {
78
- fieldUnit: n,
79
- fieldValue: t,
80
- Component: c
81
- } = e;
82
- return (o) => /* @__PURE__ */ m(y, {
83
- Component: c,
84
- value: i(o, t),
85
- unit: i(o, n)
86
- });
87
- }
88
- function V(e) {
89
- const {
90
- fieldValue: n,
91
- Component: t = l.Fragment
92
- } = e;
93
- return (c) => /* @__PURE__ */ m(t, {
94
- children: i(c, n) + ""
95
- });
96
- }
97
- export {
98
- y as P,
99
- _ as U,
100
- C as a,
101
- A as b,
102
- U as c,
103
- h as d,
104
- V as e,
105
- v as g
106
- };