@m4l/components 0.1.13 → 0.1.15

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 (139) hide show
  1. package/assets/Logo/index.js +91 -0
  2. package/commonjs.js +9 -0
  3. package/components/CommonActions/components/ActionCancel/index.js +15 -0
  4. package/components/CommonActions/components/ActionFormCancel/index.js +62 -0
  5. package/components/CommonActions/components/ActionFormIntro/index.js +35 -0
  6. package/components/CommonActions/components/ActionIntro/index.js +16 -0
  7. package/components/CommonActions/components/Actions/index.js +859 -0
  8. package/components/CompanyLogo/{index.f81c179c.js → index.js} +48 -42
  9. package/components/DataGrid/index.js +1067 -0
  10. package/components/DynamicFilter/index.js +1573 -0
  11. package/components/ErrorLabel/index.js +18 -0
  12. package/components/Icon/index.js +80 -0
  13. package/components/Image/index.js +128 -0
  14. package/components/LanguagePopover/index.js +93 -0
  15. package/components/Loadable/index.js +13 -0
  16. package/components/ModalDialog/index.js +180 -0
  17. package/components/NoItemSelected/{index.12f0ca67.js → index.js} +50 -43
  18. package/components/ObjectLogs/index.js +284 -0
  19. package/components/Page/index.js +36 -0
  20. package/components/PaperForm/index.js +110 -0
  21. package/components/Period/index.js +230 -0
  22. package/components/PropertyValue/index.js +142 -0
  23. package/components/Resizeable/{index.45995d2b.js → index.js} +19 -21
  24. package/components/ScrollBar/index.js +52 -0
  25. package/components/ScrollToTop/index.js +10 -0
  26. package/components/SplitLayout/{index.4032673d.js → index.js} +35 -35
  27. package/components/animate/LoadingScreen/{index.f1cec7db.js → index.js} +27 -29
  28. package/components/animate/MotionContainer/index.js +31 -0
  29. package/components/animate/MotionLazyContainer/index.js +13 -0
  30. package/components/animate/features.js +2 -0
  31. package/components/animate/variants/{bounce.784aaaaa.js → bounce.js} +16 -15
  32. package/components/animate/variants/container.js +20 -0
  33. package/components/animate/variants/fade.js +61 -0
  34. package/components/animate/variants/{index.7a912140.js → index.js} +0 -0
  35. package/components/animate/variants/transition.js +16 -0
  36. package/components/formatters/BooleanFormatter/index.js +52 -0
  37. package/components/formatters/DateFormatter/index.js +66 -0
  38. package/components/formatters/index.js +112 -0
  39. package/components/hook-form/FormProvider/index.js +61 -0
  40. package/components/hook-form/RHFAutocomplete/index.js +144 -0
  41. package/components/hook-form/RHFAutocompleteAsync/index.js +191 -0
  42. package/components/hook-form/RHFCheckbox/index.js +65 -0
  43. package/components/hook-form/RHFDateTime/index.js +79 -0
  44. package/components/hook-form/RHFMultiCheckbox/index.js +32 -0
  45. package/components/hook-form/RHFPeriod/index.js +47 -0
  46. package/components/hook-form/RHFRadioGroup/index.js +41 -0
  47. package/components/hook-form/RHFSelect/index.js +34 -0
  48. package/components/hook-form/RHFTextField/index.js +87 -0
  49. package/components/hook-form/RHFUpload/index.js +255 -0
  50. package/components/mui_extended/Accordion/index.js +105 -0
  51. package/components/mui_extended/Avatar/index.js +33 -0
  52. package/components/mui_extended/BoxIcon/index.js +20 -0
  53. package/components/mui_extended/Breadcrumbs/index.js +92 -0
  54. package/components/mui_extended/Button/index.js +131 -0
  55. package/components/mui_extended/IconButton/index.js +108 -0
  56. package/components/mui_extended/LinkWithRoute/index.js +30 -0
  57. package/components/mui_extended/MenuPopover/index.js +135 -0
  58. package/components/mui_extended/Pager/index.js +137 -0
  59. package/components/mui_extended/Tab/index.js +30 -0
  60. package/components/mui_extended/Typography/index.js +21 -0
  61. package/contexts/ModalContext/index.js +165 -0
  62. package/hooks/useFormAddEdit/index.js +42 -0
  63. package/hooks/useModal/index.js +4 -0
  64. package/index.js +70 -162
  65. package/lodash.js +62 -0
  66. package/node_modules.js +54 -0
  67. package/package.json +2 -1
  68. package/react-data-grid.js +2652 -0
  69. package/react-draggable.js +960 -0
  70. package/react-json-view.js +2764 -0
  71. package/react-lazy-load-image-component.js +792 -0
  72. package/react-resizable.js +541 -0
  73. package/react-splitter-layout.js +165 -0
  74. package/utils/index.js +572 -0
  75. package/assets/Logo/index.228dcb5a.js +0 -86
  76. package/commonjs.565e6834.js +0 -12
  77. package/components/CommonActions/components/ActionCancel/index.cba1b460.js +0 -17
  78. package/components/CommonActions/components/ActionFormCancel/index.be2fe891.js +0 -49
  79. package/components/CommonActions/components/ActionFormIntro/index.ca4d2674.js +0 -31
  80. package/components/CommonActions/components/ActionIntro/index.cc4b1e0e.js +0 -18
  81. package/components/CommonActions/components/Actions/index.e8148d98.js +0 -743
  82. package/components/DataGrid/index.b688877d.js +0 -894
  83. package/components/DynamicFilter/index.82ce857e.js +0 -1158
  84. package/components/ErrorLabel/index.c8615f16.js +0 -19
  85. package/components/Icon/index.cbca79b0.js +0 -70
  86. package/components/Image/index.e790b50b.js +0 -122
  87. package/components/LanguagePopover/index.3d9611cb.js +0 -87
  88. package/components/Loadable/index.f5518558.js +0 -15
  89. package/components/ModalDialog/index.3850c053.js +0 -168
  90. package/components/ObjectLogs/index.27ef875d.js +0 -266
  91. package/components/Page/index.6d69977e.js +0 -35
  92. package/components/PaperForm/index.d7c74064.js +0 -105
  93. package/components/Period/index.5e68286a.js +0 -160
  94. package/components/PropertyValue/index.ab3dd7e9.js +0 -116
  95. package/components/ScrollBar/index.39eeb2de.js +0 -49
  96. package/components/ScrollToTop/index.e06f98f6.js +0 -11
  97. package/components/animate/MotionContainer/index.8d9f9d80.js +0 -30
  98. package/components/animate/MotionLazyContainer/index.572dd012.js +0 -15
  99. package/components/animate/features.0fbf41e1.js +0 -5
  100. package/components/animate/variants/container.11f82b76.js +0 -20
  101. package/components/animate/variants/fade.b561c0fc.js +0 -59
  102. package/components/animate/variants/transition.bd46b9ce.js +0 -15
  103. package/components/formatters/BooleanFormatter/index.cca53b7f.js +0 -42
  104. package/components/formatters/DateFormatter/index.ad8d9b8e.js +0 -57
  105. package/components/formatters/index.55856d65.js +0 -106
  106. package/components/hook-form/FormProvider/index.257acd9f.js +0 -55
  107. package/components/hook-form/RHFAutocomplete/index.6ed76d4c.js +0 -122
  108. package/components/hook-form/RHFAutocompleteAsync/index.8f2c97ea.js +0 -153
  109. package/components/hook-form/RHFCheckbox/index.f9ce6c39.js +0 -59
  110. package/components/hook-form/RHFDateTime/index.fc5cbafe.js +0 -68
  111. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +0 -34
  112. package/components/hook-form/RHFPeriod/index.23c254e9.js +0 -45
  113. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +0 -43
  114. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +0 -36
  115. package/components/hook-form/RHFTextField/index.4c455f75.js +0 -77
  116. package/components/hook-form/RHFUpload/index.ed3d739f.js +0 -244
  117. package/components/mui_extended/Accordion/index.2116e423.js +0 -103
  118. package/components/mui_extended/Avatar/index.0a2a4523.js +0 -32
  119. package/components/mui_extended/BoxIcon/index.e638ecc8.js +0 -22
  120. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +0 -89
  121. package/components/mui_extended/Button/index.84d8898c.js +0 -110
  122. package/components/mui_extended/IconButton/index.88f3aadb.js +0 -98
  123. package/components/mui_extended/LinkWithRoute/index.d4b263de.js +0 -28
  124. package/components/mui_extended/MenuPopover/index.488fc536.js +0 -131
  125. package/components/mui_extended/Pager/index.0576814f.js +0 -126
  126. package/components/mui_extended/Tab/index.e0653a0a.js +0 -28
  127. package/components/mui_extended/Typography/index.0c4604b3.js +0 -22
  128. package/contexts/ModalContext/index.2188b69e.js +0 -150
  129. package/hooks/useFormAddEdit/index.d4845f1a.js +0 -26
  130. package/hooks/useModal/index.6571d2d9.js +0 -6
  131. package/lodash.e09401f0.js +0 -32
  132. package/node_modules.168cb897.js +0 -55
  133. package/react-data-grid.d46d625e.js +0 -2115
  134. package/react-draggable.20e95c61.js +0 -714
  135. package/react-json-view.f56a7f8e.js +0 -2762
  136. package/react-lazy-load-image-component.45b56650.js +0 -784
  137. package/react-resizable.5277deaf.js +0 -371
  138. package/react-splitter-layout.7810ac1b.js +0 -165
  139. package/utils/index.214d9542.js +0 -435
@@ -1,28 +0,0 @@
1
- import { Link as p } from "react-router-dom";
2
- import { Skeleton as h, Link as a } from "@mui/material";
3
- import { jsx as t } from "react/jsx-runtime";
4
- const L = (o) => {
5
- const {
6
- to: e,
7
- children: n,
8
- skeletonProps: r = {},
9
- ...i
10
- } = o, {
11
- isSkeleton: s = !1,
12
- width: k = "100%",
13
- height: m = "14px"
14
- } = r;
15
- return s ? /* @__PURE__ */ t(h, {
16
- variant: "text",
17
- width: k,
18
- height: m
19
- }) : /* @__PURE__ */ t(a, {
20
- component: p,
21
- to: e,
22
- ...i,
23
- children: n
24
- });
25
- };
26
- export {
27
- L
28
- };
@@ -1,131 +0,0 @@
1
- import { styled as s } from "@mui/material/styles";
2
- import { Popover as d } from "@mui/material";
3
- import { jsxs as g, jsx as m } from "react/jsx-runtime";
4
- const h = s("span")(({
5
- arrow: t,
6
- theme: e
7
- }) => {
8
- const o = `solid 1px ${e.palette.grey[50012]}`, r = {
9
- borderRadius: "0 0 3px 0",
10
- top: -6,
11
- borderBottom: o,
12
- borderRight: o
13
- }, i = {
14
- borderRadius: "3px 0 0 0",
15
- bottom: -6,
16
- borderTop: o,
17
- borderLeft: o
18
- }, n = {
19
- borderRadius: "0 3px 0 0",
20
- left: -6,
21
- borderTop: o,
22
- borderRight: o
23
- }, p = {
24
- borderRadius: "0 0 0 3px",
25
- right: -6,
26
- borderBottom: o,
27
- borderLeft: o
28
- };
29
- return {
30
- display: "none",
31
- [e.breakpoints.up("sm")]: {
32
- zIndex: 1,
33
- width: 12,
34
- height: 12,
35
- content: "''",
36
- position: "absolute",
37
- display: "block",
38
- transform: "rotate(-135deg)",
39
- background: e.palette.background.paper
40
- },
41
- ...t === "top-left" && {
42
- ...r,
43
- left: 20
44
- },
45
- ...t === "top-center" && {
46
- ...r,
47
- left: 0,
48
- right: 0,
49
- margin: "auto"
50
- },
51
- ...t === "top-right" && {
52
- ...r,
53
- right: 20
54
- },
55
- ...t === "bottom-left" && {
56
- ...i,
57
- left: 20
58
- },
59
- ...t === "bottom-center" && {
60
- ...i,
61
- left: 0,
62
- right: 0,
63
- margin: "auto"
64
- },
65
- ...t === "bottom-right" && {
66
- ...i,
67
- right: 20
68
- },
69
- ...t === "left-top" && {
70
- ...n,
71
- top: 20
72
- },
73
- ...t === "left-center" && {
74
- ...n,
75
- top: 0,
76
- bottom: 0,
77
- margin: "auto"
78
- },
79
- ...t === "left-bottom" && {
80
- ...n,
81
- bottom: 20
82
- },
83
- ...t === "right-top" && {
84
- ...p,
85
- top: 20
86
- },
87
- ...t === "right-center" && {
88
- ...p,
89
- top: 0,
90
- bottom: 0,
91
- margin: "auto"
92
- },
93
- ...t === "right-bottom" && {
94
- ...p,
95
- bottom: 20
96
- }
97
- };
98
- });
99
- function u({
100
- children: t,
101
- arrow: e = "top-right",
102
- disabledArrow: l,
103
- sx: b,
104
- ...o
105
- }) {
106
- return /* @__PURE__ */ g(d, {
107
- anchorOrigin: {
108
- vertical: "bottom",
109
- horizontal: "right"
110
- },
111
- transformOrigin: {
112
- vertical: "top",
113
- horizontal: "right"
114
- },
115
- PaperProps: {
116
- sx: {
117
- p: 1,
118
- width: 200,
119
- overflow: "inherit",
120
- ...b
121
- }
122
- },
123
- ...o,
124
- children: [!l && /* @__PURE__ */ m(h, {
125
- arrow: e
126
- }), t]
127
- });
128
- }
129
- export {
130
- u as M
131
- };
@@ -1,126 +0,0 @@
1
- import { useMemo as y } from "react";
2
- import { Skeleton as i, TablePagination as R } from "@mui/material";
3
- import { P as S } from "../../CommonActions/components/Actions/index.e8148d98.js";
4
- import { styled as a } from "@mui/material/styles";
5
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
6
- a("div")(() => ({
7
- display: "flex",
8
- flexDirection: "column",
9
- height: "100%",
10
- overflow: "hidden"
11
- }));
12
- const b = a("div")(({ theme: t }) => ({
13
- width: "100%",
14
- display: "flex",
15
- justifyContent: "center",
16
- alignItems: "center",
17
- marginLeft: t.spacing(3)
18
- })), T = a("div")(({ theme: t }) => ({
19
- display: "flex",
20
- marginLeft: t.spacing(3)
21
- })), s = a("div")(({ theme: t }) => ({
22
- display: "flex",
23
- justifyContent: "center",
24
- alignItems: "center",
25
- width: t.spacing(3.75),
26
- height: t.spacing(3.75)
27
- })), D = a("div")(({ theme: t }) => ({
28
- display: "grid",
29
- gridTemplateColumns: "auto auto",
30
- gridGap: t.spacing(1),
31
- marginRight: t.spacing(3)
32
- }));
33
- function A(t) {
34
- const {
35
- totalRecords: n,
36
- rowsPerPageOptions: d = [5, 10, 2],
37
- rowsPerPage: r = 25,
38
- page: g,
39
- onPageChange: h,
40
- onRowsPerPageChange: f,
41
- labelRows: P = "Rows per page",
42
- labelOf: u = "Of",
43
- isSkeleton: m = "false",
44
- isDesktop: p
45
- } = t, v = y(() => r * g > n ? Math.floor(n / r) : g, [g, r, n]), w = (o) => {
46
- f(parseInt(o.target.value, 10)), h(0);
47
- }, x = (o, c) => {
48
- h(c);
49
- };
50
- return m ? /* @__PURE__ */ l(b, {
51
- children: [/* @__PURE__ */ l(D, {
52
- children: [/* @__PURE__ */ e(i, {
53
- variant: "text",
54
- width: "40px",
55
- height: "16px"
56
- }), /* @__PURE__ */ e(i, {
57
- variant: "text",
58
- width: "20px",
59
- height: "16px"
60
- })]
61
- }), /* @__PURE__ */ e(i, {
62
- variant: "text",
63
- width: "50px",
64
- height: "16px"
65
- }), /* @__PURE__ */ l(T, {
66
- children: [/* @__PURE__ */ e(s, {
67
- children: /* @__PURE__ */ e(i, {
68
- variant: "circular",
69
- width: 20,
70
- height: 20
71
- })
72
- }), /* @__PURE__ */ e(s, {
73
- children: /* @__PURE__ */ e(i, {
74
- variant: "circular",
75
- width: 20,
76
- height: 20
77
- })
78
- }), /* @__PURE__ */ e(s, {
79
- children: /* @__PURE__ */ e(i, {
80
- variant: "circular",
81
- width: 20,
82
- height: 20
83
- })
84
- }), /* @__PURE__ */ e(s, {
85
- children: /* @__PURE__ */ e(i, {
86
- variant: "circular",
87
- width: 20,
88
- height: 20
89
- })
90
- })]
91
- })]
92
- }) : /* @__PURE__ */ e(R, {
93
- id: "TablePagination",
94
- rowsPerPageOptions: d,
95
- component: "div",
96
- count: n,
97
- rowsPerPage: r,
98
- page: v,
99
- onPageChange: x,
100
- onRowsPerPageChange: w,
101
- labelDisplayedRows: p ? ({
102
- from: o,
103
- to: c,
104
- count: C
105
- }) => `${o}-${c} ${u} ${C}` : () => "",
106
- labelRowsPerPage: p ? P : "",
107
- ActionsComponent: S
108
- });
109
- }
110
- function B() {
111
- return ["pager"];
112
- }
113
- const L = {
114
- pager: {
115
- first: "First",
116
- previous: "Previous",
117
- before: "Before",
118
- last: "Last",
119
- of: "of"
120
- }
121
- };
122
- export {
123
- A as P,
124
- L as d,
125
- B as g
126
- };
@@ -1,28 +0,0 @@
1
- import { useModuleSkeleton as n } from "@m4l/core";
2
- import { Skeleton as a, Tab as s } from "@mui/material";
3
- import { styled as p } from "@mui/material/styles";
4
- import { jsx as e } from "react/jsx-runtime";
5
- const d = p("div")(({
6
- theme: t
7
- }) => ({
8
- padding: t.spacing(1.5, 2)
9
- }));
10
- function c(t) {
11
- const {
12
- SKTWidth: o,
13
- SKTHeight: r,
14
- ...i
15
- } = t;
16
- return n() ? /* @__PURE__ */ e(d, {
17
- children: /* @__PURE__ */ e(a, {
18
- variant: "text",
19
- width: o,
20
- height: r
21
- })
22
- }) : /* @__PURE__ */ e(s, {
23
- ...i
24
- });
25
- }
26
- export {
27
- c as T
28
- };
@@ -1,22 +0,0 @@
1
- import { Skeleton as a, Typography as h } from "@mui/material";
2
- import { jsx as o } from "react/jsx-runtime";
3
- function f(t) {
4
- const {
5
- skeletonProps: r = {},
6
- ...e
7
- } = t, {
8
- isSkeleton: p = "false",
9
- width: n = "100%",
10
- height: s = "14px"
11
- } = r;
12
- return p ? /* @__PURE__ */ o(a, {
13
- variant: "text",
14
- width: n,
15
- height: s
16
- }) : /* @__PURE__ */ o(h, {
17
- ...e
18
- });
19
- }
20
- export {
21
- f as T
22
- };
@@ -1,150 +0,0 @@
1
- import { createContext as M, useState as g } from "react";
2
- import { useEnvironment as w, voidFunction as i } from "@m4l/core";
3
- import { Typography as I } from "@mui/material";
4
- import { styled as c } from "@mui/material/styles";
5
- import { B as _ } from "../../components/mui_extended/BoxIcon/index.e638ecc8.js";
6
- import { jsx as t, jsxs as f, Fragment as k } from "react/jsx-runtime";
7
- import { M as $ } from "../../components/ModalDialog/index.3850c053.js";
8
- import { A as b } from "../../components/CommonActions/components/ActionIntro/index.cc4b1e0e.js";
9
- import { A } from "../../components/CommonActions/components/ActionCancel/index.cba1b460.js";
10
- import { b as j } from "../../utils/index.214d9542.js";
11
- const D = c("div")(() => ({
12
- display: "flex",
13
- flexDirection: "column",
14
- height: "100%"
15
- })), O = c("div")(({
16
- theme: n
17
- }) => ({
18
- display: "flex",
19
- flexDirection: "column",
20
- justifyContent: "center",
21
- alignItems: "center",
22
- gridGap: n.spacing(5),
23
- flexGrow: 1,
24
- [n.breakpoints.up("sm")]: {
25
- display: "grid",
26
- flexDirection: "row",
27
- gridTemplateColumns: "1fr 1fr"
28
- }
29
- })), W = c("div")(({
30
- theme: n,
31
- variant: o
32
- }) => ({
33
- display: "flex",
34
- justifyContent: "center",
35
- alignItems: "center",
36
- "& > span": {
37
- background: o === "warning" ? n.palette.warning.main : o === "delete" ? n.palette.error.main : o === "info" ? n.palette.info.main : "theme.palette.text.primary"
38
- }
39
- })), B = c("div")(() => ({
40
- display: "flex",
41
- alignItems: "center"
42
- })), E = (n) => {
43
- const {
44
- variant: o = "info",
45
- msg: s = "Are you sure you want to perform this action? Once complete, the information will be deleted."
46
- } = n, {
47
- host_static_assets: r,
48
- environment_assets: e
49
- } = w(), d = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_warning.svg`, p = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_danger.svg`, a = `${r}/${e}/frontend/components/dialog/assets/icons/illustration_confirm_info.svg`;
50
- return /* @__PURE__ */ t(D, {
51
- children: /* @__PURE__ */ f(O, {
52
- children: [/* @__PURE__ */ t(W, {
53
- variant: o,
54
- children: /* @__PURE__ */ t(_, {
55
- src: o === "warning" ? d : o === "delete" ? p : a,
56
- sx: {
57
- width: "230px",
58
- height: "194px"
59
- }
60
- })
61
- }), /* @__PURE__ */ t(B, {
62
- children: /* @__PURE__ */ t(I, {
63
- variant: "body1",
64
- children: s
65
- })
66
- })]
67
- })
68
- });
69
- }, u = {
70
- initialWidth: 600,
71
- initialHeigth: 400,
72
- open: !1,
73
- withClose: !0,
74
- onQueryClose: i,
75
- iconComponent: void 0,
76
- contentComponent: void 0,
77
- openModal: i,
78
- openModalConfirm: i,
79
- closeModal: i,
80
- hasChanges: !1,
81
- setChanges: i,
82
- title: ""
83
- }, F = M(u);
84
- function L({
85
- children: n
86
- }) {
87
- const [o, s] = g({
88
- open: u.open,
89
- withClose: !0,
90
- onQueryClose: i,
91
- title: "",
92
- iconComponent: void 0,
93
- contentComponent: void 0,
94
- variant: void 0
95
- }), [r, e] = g(!1), d = (l) => {
96
- s({
97
- open: !0,
98
- ...l
99
- });
100
- }, p = (l) => {
101
- const {
102
- variant: m = "warning",
103
- title: v,
104
- msg: x,
105
- onClickIntro: C,
106
- onClickCancel: y = a
107
- } = l;
108
- s({
109
- open: !0,
110
- title: v,
111
- variant: m,
112
- contentComponent: /* @__PURE__ */ t(E, {
113
- variant: m,
114
- msg: x
115
- }),
116
- actions: /* @__PURE__ */ f(k, {
117
- children: [/* @__PURE__ */ t(A, {
118
- onClick: y
119
- }), " ", /* @__PURE__ */ t(b, {
120
- onClick: () => {
121
- C && C(), a();
122
- },
123
- color: j(m)
124
- })]
125
- })
126
- });
127
- }, a = () => {
128
- s((l) => ({
129
- ...l,
130
- open: !1
131
- })), e(!1);
132
- }, h = () => {
133
- e(!0);
134
- };
135
- return /* @__PURE__ */ f(F.Provider, {
136
- value: {
137
- ...o,
138
- openModal: d,
139
- openModalConfirm: p,
140
- closeModal: a,
141
- hasChanges: r,
142
- setChanges: h
143
- },
144
- children: [n, /* @__PURE__ */ t($, {})]
145
- });
146
- }
147
- export {
148
- F as M,
149
- L as a
150
- };
@@ -1,26 +0,0 @@
1
- import { useNetwork as p, useFlags as v } from "@m4l/core";
2
- import { useState as n, useEffect as _ } from "react";
3
- const F = (i) => {
4
- const { initialValues: u, objectId: o, endPoint: l, formatDataEnpoint: r } = i, [f, a] = n(u), [e, t] = n(
5
- o === void 0 ? "new" : "edit"
6
- ), { networkOperation: m } = p(), { addFlag: c } = v();
7
- return _(() => {
8
- let s = !0;
9
- return e === "edit" ? m({
10
- method: "GET",
11
- endPoint: `${l}/${o}`
12
- }).then(
13
- (d) => {
14
- s && (a(r ? r(d) : d), t("reload_values_provider"));
15
- },
16
- () => {
17
- t("error");
18
- }
19
- ) : (e === "new" || e === "reload_values_provider") && (c("form_loaded"), t("ready")), () => {
20
- s = !1;
21
- };
22
- }, [e]), { formValues: f, statusLoad: e };
23
- };
24
- export {
25
- F as u
26
- };
@@ -1,6 +0,0 @@
1
- import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModalContext/index.2188b69e.js";
3
- const s = () => o(t);
4
- export {
5
- s as u
6
- };
@@ -1,32 +0,0 @@
1
- import { c as e } from "./commonjs.565e6834.js";
2
- var j = typeof e == "object" && e && e.Object === Object && e, l = j, y = l, v = typeof self == "object" && self && self.Object === Object && self, S = y || v || Function("return this")(), T = S, O = T, d = O.Symbol, i = d, o = i, c = Object.prototype, $ = c.hasOwnProperty, p = c.toString, t = o ? o.toStringTag : void 0;
3
- function m(r) {
4
- var b = $.call(r, t), g = r[t];
5
- try {
6
- r[t] = void 0;
7
- var s = !0;
8
- } catch {
9
- }
10
- var f = p.call(r);
11
- return s && (b ? r[t] = g : delete r[t]), f;
12
- }
13
- var u = m, _ = Object.prototype, G = _.toString;
14
- function w(r) {
15
- return G.call(r);
16
- }
17
- var A = w, a = i, h = u, P = A, k = "[object Null]", L = "[object Undefined]", n = a ? a.toStringTag : void 0;
18
- function R(r) {
19
- return r == null ? r === void 0 ? L : k : n && n in Object(r) ? h(r) : P(r);
20
- }
21
- var x = R, F = Array.isArray, N = F;
22
- function U(r) {
23
- return r != null && typeof r == "object";
24
- }
25
- var q = U, z = x, B = N, C = q, D = "[object String]";
26
- function E(r) {
27
- return typeof r == "string" || !B(r) && C(r) && z(r) == D;
28
- }
29
- var J = E;
30
- export {
31
- J as i
32
- };
@@ -1,55 +0,0 @@
1
- import { get as p, set as y, appendErrors as m } from "react-hook-form";
2
- var v = function(e, r, n) {
3
- if (e && "reportValidity" in e) {
4
- var o = p(n, r);
5
- e.setCustomValidity(o && o.message || ""), e.reportValidity();
6
- }
7
- }, h = function(e, r) {
8
- var n = function(s) {
9
- var t = r.fields[s];
10
- t && t.ref && "reportValidity" in t.ref ? v(t.ref, s, e) : t.refs && t.refs.forEach(function(u) {
11
- return v(u, s, e);
12
- });
13
- };
14
- for (var o in r.fields)
15
- n(o);
16
- }, V = function(e, r) {
17
- r.shouldUseNativeValidation && h(e, r);
18
- var n = {};
19
- for (var o in e) {
20
- var s = p(r.fields, o);
21
- y(n, o, Object.assign(e[o], { ref: s && s.ref }));
22
- }
23
- return n;
24
- }, x = function(e, r, n) {
25
- return r === void 0 && (r = {}), n === void 0 && (n = {}), function(o, s, t) {
26
- try {
27
- return Promise.resolve(function(u, f) {
28
- try {
29
- var c = (r.context && process.env.NODE_ENV === "development" && console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"), Promise.resolve(e[n.mode === "sync" ? "validateSync" : "validate"](o, Object.assign({ abortEarly: !1 }, r, { context: s }))).then(function(i) {
30
- return t.shouldUseNativeValidation && h({}, t), { values: n.rawValues ? o : i, errors: {} };
31
- }));
32
- } catch (i) {
33
- return f(i);
34
- }
35
- return c && c.then ? c.then(void 0, f) : c;
36
- }(0, function(u) {
37
- if (!u.inner)
38
- throw u;
39
- return { values: {}, errors: V((f = u, c = !t.shouldUseNativeValidation && t.criteriaMode === "all", (f.inner || []).reduce(function(i, a) {
40
- if (i[a.path] || (i[a.path] = { message: a.message, type: a.type }), c) {
41
- var l = i[a.path].types, d = l && l[a.type];
42
- i[a.path] = m(a.path, c, i, a.type, d ? [].concat(d, a.message) : a.message);
43
- }
44
- return i;
45
- }, {})), t) };
46
- var f, c;
47
- }));
48
- } catch (u) {
49
- return Promise.reject(u);
50
- }
51
- };
52
- };
53
- export {
54
- x as o
55
- };