@m4l/components 0.1.20 → 0.1.21

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 (31) hide show
  1. package/components/CommonActions/components/ActionCancel/{index.3775989f.js → index.6649cc3d.js} +1 -1
  2. package/components/CommonActions/components/ActionFormCancel/{index.d69d9e0f.js → index.91f6c07d.js} +2 -2
  3. package/components/CommonActions/components/ActionIntro/{index.ca7b6952.js → index.c794e2a1.js} +1 -1
  4. package/components/CommonActions/components/Actions/{index.a908e4b9.js → index.03412615.js} +7 -7
  5. package/components/DataGrid/{index.5cbf0dd8.js → index.f2f0bf6a.js} +3 -3
  6. package/components/DynamicFilter/{index.8a571617.js → index.f0b93aef.js} +12 -12
  7. package/components/ModalDialog/{index.16024a4e.js → index.180937f5.js} +2 -2
  8. package/components/ObjectLogs/{index.ac2bfa48.js → index.6cd7fcc9.js} +3 -3
  9. package/components/Period/{index.497b8df4.js → index.5493563f.js} +2 -2
  10. package/components/contexts/RHFormContext/{index.f8241292.js → index.33dba822.js} +12 -12
  11. package/components/hook-form/RHFAutocomplete/index.ee3d9b3c.js +171 -0
  12. package/components/hook-form/RHFAutocomplete/types.d.ts +3 -1
  13. package/components/hook-form/RHFAutocompleteAsync/index.64cff02c.js +73 -0
  14. package/components/hook-form/RHFAutocompleteAsync/types.d.ts +2 -1
  15. package/components/hook-form/RHFPeriod/{index.e17b1c72.js → index.6f6cde6d.js} +1 -1
  16. package/components/hook-form/RHFUpload/{index.cbf11b68.js → index.d055f3be.js} +1 -1
  17. package/components/mui_extended/Button/{index.16591787.js → index.fbd38cd1.js} +4 -4
  18. package/components/mui_extended/Pager/{index.80c2f8a0.js → index.fd2bca74.js} +1 -1
  19. package/components/mui_extended/Popover/{index.305f2ea5.js → index.cb3125b4.js} +3 -3
  20. package/contexts/ModalContext/index.8f76fbe4.js +136 -0
  21. package/contexts/ModalContext/index.d.ts +1 -1
  22. package/hooks/useModal/index.44c5993b.js +11 -0
  23. package/hooks/useModal/index.d.ts +2 -1
  24. package/index.js +23 -23
  25. package/lodash.727eb847.js +117 -0
  26. package/package.json +3 -3
  27. package/components/hook-form/RHFAutocomplete/index.b7f11146.js +0 -146
  28. package/components/hook-form/RHFAutocompleteAsync/index.97a5a66e.js +0 -51
  29. package/contexts/ModalContext/index.699767c7.js +0 -150
  30. package/hooks/useModal/index.8201ccec.js +0 -6
  31. package/lodash.e09401f0.js +0 -32
@@ -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.16024a4e.js";
8
- import { A as b } from "../../components/CommonActions/components/ActionIntro/index.ca7b6952.js";
9
- import { A } from "../../components/CommonActions/components/ActionCancel/index.3775989f.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,6 +0,0 @@
1
- import { useContext as o } from "react";
2
- import { M as t } from "../../contexts/ModalContext/index.699767c7.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
- };