@m4l/components 0.1.27 → 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 (93) 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 +65 -53
  12. package/components/Image/index.93d5f37f.js +190 -0
  13. package/components/Loadable/index.f5518558.js +8 -8
  14. package/components/ModalDialog/index.9ea10764.js +184 -0
  15. package/components/NoItemSelected/{index.9609a7f7.js → index.46d2f632.js} +52 -41
  16. package/components/ObjectLogs/index.f941fb79.js +288 -0
  17. package/components/Page/index.4237c241.js +22 -20
  18. package/components/PaperForm/index.ec9cb8c9.js +66 -59
  19. package/components/Period/index.2941fbda.js +249 -0
  20. package/components/PropertyValue/index.dfcfe1ba.js +95 -65
  21. package/components/Resizeable/index.45995d2b.js +19 -19
  22. package/components/ScrollBar/index.39eeb2de.js +26 -21
  23. package/components/ScrollToTop/index.e06f98f6.js +8 -7
  24. package/components/SplitLayout/index.4032673d.js +35 -33
  25. package/components/animate/LoadingScreen/index.1d0c4307.js +33 -33
  26. package/components/animate/MotionContainer/index.8d9f9d80.js +25 -22
  27. package/components/animate/MotionLazyContainer/index.572dd012.js +10 -10
  28. package/components/animate/features.0fbf41e1.js +3 -3
  29. package/components/animate/variants/bounce.784aaaaa.js +16 -13
  30. package/components/animate/variants/container.11f82b76.js +8 -6
  31. package/components/animate/variants/fade.b561c0fc.js +32 -28
  32. package/components/animate/variants/transition.bd46b9ce.js +17 -12
  33. package/components/formatters/BooleanFormatter/index.8da35c9c.js +46 -33
  34. package/components/formatters/DateFormatter/index.1b9baacc.js +49 -37
  35. package/components/formatters/index.689a8086.js +119 -0
  36. package/components/hook-form/RHFAutocomplete/index.59a68f9f.js +224 -0
  37. package/components/hook-form/RHFAutocompleteAsync/index.c3083062.js +87 -0
  38. package/components/hook-form/RHFCheckbox/index.6dcec9e2.js +49 -39
  39. package/components/hook-form/RHFDateTime/index.9231a7c7.js +69 -56
  40. package/components/hook-form/RHFMultiCheckbox/index.2680b3b6.js +23 -23
  41. package/components/hook-form/RHFPeriod/index.64a228d5.js +55 -0
  42. package/components/hook-form/RHFRadioGroup/index.b3335e13.js +29 -29
  43. package/components/hook-form/RHFSelect/index.b6ca8bb2.js +24 -24
  44. package/components/hook-form/RHFTextField/index.f9aaaa90.js +110 -93
  45. package/components/hook-form/RHFUpload/{index.ec4d5326.js → index.d5cc7c13.js} +151 -130
  46. package/components/mui_extended/Accordion/index.a02ac6ae.js +73 -69
  47. package/components/mui_extended/Avatar/index.fe06afd7.js +44 -34
  48. package/components/mui_extended/BoxIcon/index.e638ecc8.js +10 -10
  49. package/components/mui_extended/Breadcrumbs/index.5e37d903.js +49 -44
  50. package/components/mui_extended/Button/index.53b56958.js +178 -0
  51. package/components/mui_extended/CircularProgress/index.ad569afd.js +8 -6
  52. package/components/mui_extended/IconButton/index.a321e5cb.js +82 -67
  53. package/components/mui_extended/LinkWithRoute/index.16436ab8.js +25 -21
  54. package/components/mui_extended/Pager/index.c0865b70.js +141 -0
  55. package/components/mui_extended/Popover/index.705275a4.js +278 -0
  56. package/components/mui_extended/Tab/index.e0653a0a.js +25 -21
  57. package/components/mui_extended/Typography/index.e5494696.js +25 -21
  58. package/contexts/ModalContext/index.b92fa565.js +153 -0
  59. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/index.d.ts +0 -0
  60. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/styles.d.ts +0 -0
  61. package/contexts/ModalContext/{components → subcomponents}/ContentConfirm/types.d.ts +0 -0
  62. package/contexts/RHFormContext/index.b142190a.js +63 -0
  63. package/hooks/useFormAddEdit/index.d4845f1a.js +40 -22
  64. package/hooks/useModal/index.5fee01a3.js +11 -0
  65. package/index.js +153 -153
  66. package/package.json +2 -1
  67. package/react-data-grid.d46d625e.js +2206 -1663
  68. package/react-draggable.20e95c61.js +800 -553
  69. package/react-json-view.f56a7f8e.js +2344 -2340
  70. package/react-resizable.5277deaf.js +470 -298
  71. package/react-splitter-layout.7810ac1b.js +130 -128
  72. package/utils/index.214d9542.js +500 -354
  73. package/components/CommonActions/components/ActionCancel/index.431160ba.js +0 -17
  74. package/components/CommonActions/components/ActionFormCancel/index.6a0f34aa.js +0 -49
  75. package/components/CommonActions/components/ActionIntro/index.85557b90.js +0 -18
  76. package/components/CommonActions/components/Actions/index.edeb05c2.js +0 -742
  77. package/components/DataGrid/index.2ce9da7d.js +0 -894
  78. package/components/DynamicFilter/index.e1d4a948.js +0 -1157
  79. package/components/Image/index.c9da2d5a.js +0 -152
  80. package/components/ModalDialog/index.ad61757f.js +0 -168
  81. package/components/ObjectLogs/index.6ebaec71.js +0 -266
  82. package/components/Period/index.81de7941.js +0 -175
  83. package/components/contexts/RHFormContext/index.33dba822.js +0 -56
  84. package/components/formatters/index.c2a9b55d.js +0 -106
  85. package/components/hook-form/RHFAutocomplete/index.5eee9d7c.js +0 -174
  86. package/components/hook-form/RHFAutocompleteAsync/index.757b5080.js +0 -65
  87. package/components/hook-form/RHFPeriod/index.e08fb1ab.js +0 -51
  88. package/components/mui_extended/Button/index.51dae0bb.js +0 -144
  89. package/components/mui_extended/Pager/index.1dc45f5e.js +0 -126
  90. package/components/mui_extended/Popover/index.cb2ccc66.js +0 -252
  91. package/contexts/ModalContext/index.9ebc793c.js +0 -136
  92. package/hooks/useModal/index.34f5978e.js +0 -11
  93. package/node_modules.168cb897.js +0 -55
@@ -1,11 +1,11 @@
1
- import { useEnvironment as r, useModuleDictionary as l, useModuleSkeleton as p } from "@m4l/core";
2
- import { styled as c } from "@mui/material/styles";
3
- import { I as d } from "../Image/index.c9da2d5a.js";
4
- import { Skeleton as m } from "@mui/material";
5
- import { useMemo as g } from "react";
6
- import { jsx as t, jsxs as x } from "react/jsx-runtime";
7
- const s = c("div")(({
8
- theme: e
1
+ import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
2
+ import { styled } from "@mui/material/styles";
3
+ import { I as Image } from "../Image/index.93d5f37f.js";
4
+ import { Skeleton } from "@mui/material";
5
+ import { useMemo } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ const WrapperNoItemSelected = styled("div")(({
8
+ theme
9
9
  }) => ({
10
10
  width: "100%",
11
11
  maxWidth: "400px",
@@ -14,16 +14,19 @@ const s = c("div")(({
14
14
  flexDirection: "column",
15
15
  alignItems: "center",
16
16
  justifyContent: "center",
17
- padding: e.spacing(3)
18
- })), w = c(d)(() => ({
17
+ padding: theme.spacing(3)
18
+ }));
19
+ const Img = styled(Image)(() => ({
19
20
  display: "flex"
20
- })), h = c("span")(({
21
- theme: e
21
+ }));
22
+ const Label = styled("span")(({
23
+ theme
22
24
  }) => ({
23
- ...e.typography.body2,
24
- padding: `${e.spacing(1.5)} ${e.spacing(1)} ${e.spacing(1)} ${e.spacing(1)}`,
25
- color: e.palette.text.primary
26
- })), u = c("div")(() => ({
25
+ ...theme.typography.body2,
26
+ padding: `${theme.spacing(1.5)} ${theme.spacing(1)} ${theme.spacing(1)} ${theme.spacing(1)}`,
27
+ color: theme.palette.text.primary
28
+ }));
29
+ const WrapperSKTNoItemSelected = styled("div")(() => ({
27
30
  display: "flex",
28
31
  width: "100%",
29
32
  minWidth: "100%",
@@ -31,44 +34,52 @@ const s = c("div")(({
31
34
  mask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`,
32
35
  WebkitMask: `url("data:image/svg+xml,%3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 70 70' style='enable-background:new 0 0 70 70%3B' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M45 8.7c1.4-1.5 3.4-2.3 5.4-2.3s3.9 0.8 5.4 2.3s2.4 3.5 2.5 5.7c0 2.2-0.9 4.2-2.4 5.7s-3.5 2.3-5.5 2.2c-2.1 0.1-4-0.7-5.5-2.2c-1.4-1.5-2.3-3.5-2.4-5.7C42.6 12.2 43.5 10.2 45 8.7z'/%3E%3Cpath d='M68.4 62.1c-0.3 0.5-0.7 0.8-1.2 1.1s-1 0.4-1.6 0.4H4.3c-0.6 0-1.1-0.1-1.6-0.4s-0.9-0.6-1.2-1.1c-0.2-0.5-0.4-1-0.4-1.5s0.1-1.1 0.4-1.5l23-36.4c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l11.5 18.2c0.2 0.3 0.5 0.5 0.8 0.7c0.3 0.2 0.6 0.3 1 0.3c0.3 0 0.7-0.1 1-0.3c0.3-0.2 0.6-0.4 0.8-0.7l3.1-4.9c0.3-0.5 0.7-0.8 1.2-1.1c0.5-0.3 1-0.4 1.6-0.4c0.6 0 1.1 0.1 1.6 0.4c0.5 0.3 0.9 0.6 1.2 1.1l14.6 23.1c0.3 0.5 0.3 1 0.3 1.5S68.7 61.7 68.4 62.1z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain`
33
36
  }));
34
- function E() {
37
+ function NoItemSelected() {
35
38
  const {
36
- host_static_assets: e,
37
- environment_assets: n
38
- } = r(), {
39
- getLabel: i
40
- } = l(), o = p(), a = g(() => `${e}/${n}/frontend/components/no_item_selected/assets/icons/no_selected.svg`, []);
41
- return o ? /* @__PURE__ */ t(s, {
42
- id: "WrapperNoItemSelected",
43
- children: /* @__PURE__ */ t(u, {
44
- id: "WrapperSKTNoItemSelected",
45
- children: /* @__PURE__ */ t(m, {
46
- variant: "rectangular",
47
- width: "100%",
48
- height: "100%"
39
+ host_static_assets,
40
+ environment_assets
41
+ } = useEnvironment();
42
+ const {
43
+ getLabel
44
+ } = useModuleDictionary();
45
+ const isSkeleton = useModuleSkeleton();
46
+ const src = useMemo(() => {
47
+ return `${host_static_assets}/${environment_assets}/frontend/components/no_item_selected/assets/icons/no_selected.svg`;
48
+ }, []);
49
+ if (isSkeleton) {
50
+ return /* @__PURE__ */ jsx(WrapperNoItemSelected, {
51
+ id: "WrapperNoItemSelected",
52
+ children: /* @__PURE__ */ jsx(WrapperSKTNoItemSelected, {
53
+ id: "WrapperSKTNoItemSelected",
54
+ children: /* @__PURE__ */ jsx(Skeleton, {
55
+ variant: "rectangular",
56
+ width: "100%",
57
+ height: "100%"
58
+ })
49
59
  })
50
- })
51
- }) : /* @__PURE__ */ x(s, {
60
+ });
61
+ }
62
+ return /* @__PURE__ */ jsxs(WrapperNoItemSelected, {
52
63
  id: "WrapperNoItemSelected",
53
- children: [/* @__PURE__ */ t(w, {
54
- src: a,
64
+ children: [/* @__PURE__ */ jsx(Img, {
65
+ src,
55
66
  width: "100%",
56
67
  height: "100%"
57
- }), /* @__PURE__ */ t(h, {
58
- children: i("no_item_selected.message")
68
+ }), /* @__PURE__ */ jsx(Label, {
69
+ children: getLabel("no_item_selected.message")
59
70
  })]
60
71
  });
61
72
  }
62
- function k() {
73
+ function getNoItemSelectedComponentsDictionary() {
63
74
  return ["no_item_selected"];
64
75
  }
65
- const I = {
76
+ const defaultNoItemSelectedDictionary = {
66
77
  no_item_selected: {
67
78
  message: "Please select a item to show detail"
68
79
  }
69
80
  };
70
81
  export {
71
- E as N,
72
- I as d,
73
- k as g
82
+ NoItemSelected as N,
83
+ defaultNoItemSelectedDictionary as d,
84
+ getNoItemSelectedComponentsDictionary as g
74
85
  };
@@ -0,0 +1,288 @@
1
+ import { useState, useEffect, useCallback, useMemo } from "react";
2
+ import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
3
+ import { styled } from "@mui/material/styles";
4
+ import { D as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.76d8fd25.js";
5
+ import { D as DateFormatter } from "../formatters/DateFormatter/index.1b9baacc.js";
6
+ import { Tooltip, IconButton } from "@mui/material";
7
+ import { R as ReactJson } from "../../react-json-view.f56a7f8e.js";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { u as useModal } from "../../hooks/useModal/index.5fee01a3.js";
10
+ import { I as Icon } from "../Icon/index.619c31c4.js";
11
+ import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.342ba5fe.js";
12
+ const Container$1 = styled("div")(() => ({
13
+ height: "100%",
14
+ width: "100%",
15
+ display: "flex",
16
+ flexDirection: "column",
17
+ justifyContent: "flex-start"
18
+ }));
19
+ const Actions = styled("div")(({
20
+ theme
21
+ }) => ({
22
+ position: "relative",
23
+ height: "auto",
24
+ display: "flex",
25
+ flexDirection: "row",
26
+ justifyContent: "flex-start",
27
+ alignItems: "center",
28
+ "& .MuiFormControl-root": {
29
+ flexGrow: 1
30
+ },
31
+ [theme.breakpoints.up("sm")]: {
32
+ "& .MuiFormControl-root:nth-of-type(1)": {
33
+ marginRight: theme.spacing(3)
34
+ }
35
+ }
36
+ }));
37
+ const GridWrapper = styled("div")(() => ({
38
+ position: "relative",
39
+ flexGrow: "1",
40
+ width: "100%"
41
+ }));
42
+ const Container = styled("div")(({ theme }) => ({
43
+ color: theme.palette.text.primary,
44
+ display: "flex",
45
+ flexDirection: "column",
46
+ height: "100%",
47
+ width: "100%"
48
+ }));
49
+ styled("span")(({ theme }) => ({
50
+ color: theme.palette.text.primary,
51
+ display: "flex",
52
+ flexDirection: "column",
53
+ height: "100%",
54
+ width: "100%"
55
+ }));
56
+ function DetailDialog(props) {
57
+ const {
58
+ log_id
59
+ } = props;
60
+ const {
61
+ networkOperation
62
+ } = useNetwork();
63
+ const [detail, setDetail] = useState({});
64
+ useEffect(() => {
65
+ let mounted = true;
66
+ networkOperation({
67
+ method: "GET",
68
+ endPoint: `logs/${log_id}`
69
+ }).then((response) => {
70
+ if (mounted) {
71
+ const parseData = JSON.parse(String(response.data.log_detail));
72
+ setDetail(parseData);
73
+ }
74
+ });
75
+ return function cleanUp() {
76
+ mounted = false;
77
+ };
78
+ }, []);
79
+ return /* @__PURE__ */ jsx(Container, {
80
+ id: "objectLogsDetail",
81
+ children: /* @__PURE__ */ jsx(ReactJson, {
82
+ name: null,
83
+ sortKeys: true,
84
+ displayDataTypes: false,
85
+ quotesOnKeys: false,
86
+ src: detail
87
+ })
88
+ });
89
+ }
90
+ function DetailFormatter(props) {
91
+ const {
92
+ log_id
93
+ } = props;
94
+ const {
95
+ openModal,
96
+ closeModal
97
+ } = useModal();
98
+ const {
99
+ getLabel
100
+ } = useModuleDictionary();
101
+ const {
102
+ host_static_assets,
103
+ environment_assets
104
+ } = useEnvironment();
105
+ const onClickDetail = () => {
106
+ openModal({
107
+ onQueryClose: () => closeModal(),
108
+ title: getLabel("object_logs.modal_detail_title"),
109
+ iconComponent: /* @__PURE__ */ jsx(Icon, {
110
+ src: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/search.svg`
111
+ }),
112
+ contentComponent: /* @__PURE__ */ jsx(DetailDialog, {
113
+ log_id
114
+ })
115
+ });
116
+ };
117
+ return /* @__PURE__ */ jsx(Tooltip, {
118
+ title: getLabel("object_logs.view_log_detail"),
119
+ children: /* @__PURE__ */ jsx(IconButton, {
120
+ onClick: onClickDetail,
121
+ "aria-label": "filter",
122
+ children: /* @__PURE__ */ jsx(Icon, {
123
+ src: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/search.svg`
124
+ })
125
+ })
126
+ });
127
+ }
128
+ function ObjectLogs(props) {
129
+ const {
130
+ resource_id,
131
+ object_id
132
+ } = props;
133
+ const {
134
+ getLabel
135
+ } = useModuleDictionary();
136
+ const {
137
+ host_static_assets,
138
+ environment_assets
139
+ } = useEnvironment();
140
+ const [queryParams, setQueryParams] = useState({
141
+ resource_id,
142
+ object_id
143
+ });
144
+ const dateFormatterCreatedAt = useCallback((rowProps) => /* @__PURE__ */ jsx(DateFormatter, {
145
+ presentationType: "datetime",
146
+ value: rowProps.row.created_at
147
+ }), []);
148
+ const DetailRowFormatter = useCallback((rowProps) => /* @__PURE__ */ jsx(DetailFormatter, {
149
+ log_id: rowProps.row.id
150
+ }), []);
151
+ const columns = useMemo(() => [{
152
+ key: "created_at",
153
+ name: getLabel("object_logs.created_at"),
154
+ type: "date",
155
+ width: 300,
156
+ formatter: dateFormatterCreatedAt
157
+ }, {
158
+ key: "email",
159
+ name: getLabel("object_logs.email"),
160
+ type: "string",
161
+ width: 300
162
+ }, {
163
+ key: "resource_name",
164
+ name: getLabel("object_logs.resource_name"),
165
+ type: "string"
166
+ }, {
167
+ key: "log_preview",
168
+ name: getLabel("object_logs.log_preview"),
169
+ type: "string"
170
+ }, {
171
+ key: "Detail",
172
+ name: getLabel("object_logs.log_detail"),
173
+ type: "custom",
174
+ formatter: DetailRowFormatter
175
+ }, {
176
+ key: "ip",
177
+ name: getLabel("object_logs.ip"),
178
+ type: "string"
179
+ }], [getLabel]);
180
+ const {
181
+ pagerState,
182
+ rows,
183
+ onPageChange,
184
+ onRowsPerPageChange,
185
+ clearRows,
186
+ Refresh
187
+ } = usePaginate({
188
+ endPoint: "logs",
189
+ fireOnChangeParms: false,
190
+ queryParams
191
+ });
192
+ useEffect(() => {
193
+ clearRows();
194
+ setQueryParams((oldParms) => ({
195
+ ...oldParms,
196
+ object_id
197
+ }));
198
+ }, [object_id]);
199
+ const onChangeFilter = (_initFilters, rawFilters) => {
200
+ setQueryParams((oldParms) => ({
201
+ ...oldParms,
202
+ f: rawFilters
203
+ }));
204
+ Refresh();
205
+ };
206
+ return /* @__PURE__ */ jsxs(Container$1, {
207
+ children: [/* @__PURE__ */ jsx(Actions, {
208
+ id: "objectLogsActions",
209
+ children: /* @__PURE__ */ jsx(DynamicFilter, {
210
+ withAllField: true,
211
+ onChangeFilter,
212
+ automatic: false,
213
+ fields: [{
214
+ name: "user_logs.created_at",
215
+ label: getLabel("object_logs.created_at"),
216
+ type: "datetime",
217
+ multiple: false,
218
+ presence: "fixed",
219
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
220
+ }, {
221
+ name: "users.email",
222
+ label: getLabel("object_logs.email"),
223
+ type: "string",
224
+ multiple: true,
225
+ presence: "optional",
226
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/email.svg`
227
+ }, {
228
+ name: "user_logs.log_preview",
229
+ label: getLabel("object_logs.log_preview"),
230
+ type: "string",
231
+ multiple: true,
232
+ presence: "optional",
233
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_preview.svg`
234
+ }, {
235
+ name: "user_logs.log_detail",
236
+ label: getLabel("object_logs.log_detail"),
237
+ type: "string",
238
+ multiple: true,
239
+ presence: "optional",
240
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/object_logs/assets/icons/log_detail.svg`
241
+ }],
242
+ initialFilters: []
243
+ })
244
+ }), /* @__PURE__ */ jsx(GridWrapper, {
245
+ id: "GridWrapper",
246
+ children: /* @__PURE__ */ jsx(DataGrid, {
247
+ id: "users_logs_list",
248
+ columns,
249
+ rows,
250
+ rowKeyGetter: (row) => row.id,
251
+ isMultipleSelect: false,
252
+ withActions: true,
253
+ actionsProps: {
254
+ withPager: true,
255
+ withLocalFilters: true,
256
+ pagerOptions: {
257
+ records: rows.length,
258
+ totalRecords: pagerState.totalRecords,
259
+ rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
260
+ page: pagerState.page,
261
+ rowsPerPage: pagerState.rowsPerPage,
262
+ onPageChange,
263
+ onRowsPerPageChange
264
+ }
265
+ }
266
+ }, "users_list_logs")
267
+ })]
268
+ });
269
+ }
270
+ function getObjectLogsComponentsDictionary() {
271
+ return ["object_logs"].concat(getDataGridComponentsDictionary()).concat(getDynamicFilterComponentsDictionary());
272
+ }
273
+ const defaultObjectLogDictionary = {
274
+ object_logs: {
275
+ created_at: "Start date",
276
+ user: "User/email",
277
+ resource_name: "Resource",
278
+ privilege_name: "Privilege",
279
+ log_preview: "Log",
280
+ log_detail: "Detail",
281
+ ip: "Ip"
282
+ }
283
+ };
284
+ export {
285
+ ObjectLogs as O,
286
+ defaultObjectLogDictionary as d,
287
+ getObjectLogsComponentsDictionary as g
288
+ };
@@ -1,25 +1,27 @@
1
- import { Helmet as c } from "react-helmet-async";
2
- import { useLocales as a } from "@m4l/graphics";
3
- import { useModuleSkeleton as d } from "@m4l/core";
4
- import { jsxs as t, Fragment as g, jsx as l } from "react/jsx-runtime";
5
- const p = (o) => {
1
+ import { Helmet } from "react-helmet-async";
2
+ import { useLocales } from "@m4l/graphics";
3
+ import { useModuleSkeleton } from "@m4l/core";
4
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
5
+ const HelmetPage = (props) => {
6
6
  const {
7
- children: r,
8
- title: n,
9
- meta: i,
10
- subtitle: e
11
- } = o, m = a().currentLocale?.localeString, s = d();
12
- return /* @__PURE__ */ t(g, {
13
- children: [!s && /* @__PURE__ */ t(c, {
14
- children: [/* @__PURE__ */ l("title", {
15
- children: `${n}${e ? ` | ${e}` : ""} `
16
- }), /* @__PURE__ */ l("html", {
17
- lang: m
18
- }), i]
19
- }), r]
7
+ children,
8
+ title,
9
+ meta,
10
+ subtitle
11
+ } = props;
12
+ const localeString = useLocales().currentLocale?.localeString;
13
+ const isSkeleton = useModuleSkeleton();
14
+ return /* @__PURE__ */ jsxs(Fragment, {
15
+ children: [!isSkeleton && /* @__PURE__ */ jsxs(Helmet, {
16
+ children: [/* @__PURE__ */ jsx("title", {
17
+ children: `${title}${subtitle ? ` | ${subtitle}` : ""} `
18
+ }), /* @__PURE__ */ jsx("html", {
19
+ lang: localeString
20
+ }), meta]
21
+ }), children]
20
22
  });
21
23
  };
22
- p.displayName = "Page";
24
+ HelmetPage.displayName = "Page";
23
25
  export {
24
- p as H
26
+ HelmetPage as H
25
27
  };
@@ -1,105 +1,112 @@
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.619c31c4.js";
5
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
6
- const c = r("div")(({
7
- theme: i
1
+ import { styled } from "@mui/material/styles";
2
+ import { useModuleSkeleton } from "@m4l/core";
3
+ import { Skeleton } from "@mui/material";
4
+ import { I as Icon } from "../Icon/index.619c31c4.js";
5
+ import { jsxs, jsx } from "react/jsx-runtime";
6
+ const WrapperPaper = styled("div")(({
7
+ theme
8
8
  }) => ({
9
9
  display: "flex",
10
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
11
+ padding: theme.spacing(1),
12
+ [theme.breakpoints.up("sm")]: {
13
+ margin: `${theme.spacing(1.5)} ${theme.spacing(1.5)} ${theme.spacing(3)} ${theme.spacing(1.5)}`,
14
+ borderRadius: theme.spacing(2),
15
+ boxShadow: theme.customShadows.z8,
16
+ padding: theme.spacing(3),
17
+ backgroundColor: theme.palette.background.paper
18
18
  }
19
- })), p = r("div")(({
20
- theme: i
19
+ }));
20
+ const HeaderContainer = styled("div")(({
21
+ theme
21
22
  }) => ({
22
23
  display: "flex",
23
24
  flexDirection: "row",
24
25
  alignItems: "center",
25
- borderBottom: `1px solid ${i.palette.divider}`,
26
- paddingBottom: i.spacing(3),
27
- marginBottom: i.spacing(2),
26
+ borderBottom: `1px solid ${theme.palette.divider}`,
27
+ paddingBottom: theme.spacing(3),
28
+ marginBottom: theme.spacing(2),
28
29
  overflow: "hidden"
29
- })), g = r("div")(({
30
- theme: i
30
+ }));
31
+ const IconTitleContainer = styled("div")(({
32
+ theme
31
33
  }) => ({
32
34
  display: "flex",
33
35
  flexDirection: "row",
34
36
  flexGrow: 1,
35
37
  alignItems: "center",
36
38
  cursor: "move",
37
- ...i.typography.subtitle1,
38
- color: i.palette.text.primary
39
- })), u = r("div")(({
40
- theme: i
39
+ ...theme.typography.subtitle1,
40
+ color: theme.palette.text.primary
41
+ }));
42
+ const IconHeader = styled("div")(({
43
+ theme
41
44
  }) => ({
42
45
  display: "flex",
43
46
  alignItems: "center",
44
47
  justifyContent: "center",
45
- marginRight: i.spacing(1.5)
46
- })), f = r("div")(() => ({
48
+ marginRight: theme.spacing(1.5)
49
+ }));
50
+ const Content = styled("div")(() => ({
47
51
  flexGrow: 1,
48
52
  position: "relative"
49
- })), m = r("div")(({
50
- theme: i
53
+ }));
54
+ const SkTPaperFormHeader = styled("div")(({
55
+ theme
51
56
  }) => ({
52
57
  width: "auto",
53
58
  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) => {
59
+ gridTemplateColumns: `${theme.spacing(2)} auto`,
60
+ gridGap: `${theme.spacing(1.5)}`,
61
+ paddingBottom: `${theme.spacing(3)}`,
62
+ borderBottom: `1px solid ${theme.palette.divider}`,
63
+ marginBottom: `${theme.spacing(3)}`
64
+ }));
65
+ const Header = (props) => {
60
66
  const {
61
- urlIcon: n,
62
- title: t
63
- } = i;
64
- return s() ? /* @__PURE__ */ a(m, {
65
- children: [/* @__PURE__ */ o(d, {
67
+ urlIcon,
68
+ title
69
+ } = props;
70
+ const isSkeleton = useModuleSkeleton();
71
+ return isSkeleton ? /* @__PURE__ */ jsxs(SkTPaperFormHeader, {
72
+ children: [/* @__PURE__ */ jsx(Skeleton, {
66
73
  variant: "circular",
67
74
  width: 16,
68
75
  height: 16
69
- }), /* @__PURE__ */ o(d, {
76
+ }), /* @__PURE__ */ jsx(Skeleton, {
70
77
  variant: "text",
71
78
  width: 68,
72
79
  height: 14
73
80
  })]
74
- }) : /* @__PURE__ */ o(p, {
81
+ }) : /* @__PURE__ */ jsx(HeaderContainer, {
75
82
  id: "Header",
76
- children: /* @__PURE__ */ a(g, {
83
+ children: /* @__PURE__ */ jsxs(IconTitleContainer, {
77
84
  className: "draggable-dialog-title",
78
- children: [/* @__PURE__ */ o(u, {
79
- children: /* @__PURE__ */ o(l, {
80
- src: n
85
+ children: [/* @__PURE__ */ jsx(IconHeader, {
86
+ children: /* @__PURE__ */ jsx(Icon, {
87
+ src: urlIcon
81
88
  })
82
- }), t]
89
+ }), title]
83
90
  })
84
91
  });
85
92
  };
86
- function I(i) {
93
+ function PaperForm(props) {
87
94
  const {
88
- urlIcon: n,
89
- title: t,
90
- children: e
91
- } = i;
92
- return /* @__PURE__ */ a(c, {
95
+ urlIcon,
96
+ title,
97
+ children
98
+ } = props;
99
+ return /* @__PURE__ */ jsxs(WrapperPaper, {
93
100
  id: "ContainerPropertyValue",
94
- children: [/* @__PURE__ */ o(x, {
95
- urlIcon: n,
96
- title: t
97
- }), /* @__PURE__ */ o(f, {
101
+ children: [/* @__PURE__ */ jsx(Header, {
102
+ urlIcon,
103
+ title
104
+ }), /* @__PURE__ */ jsx(Content, {
98
105
  id: "Content",
99
- children: e
106
+ children
100
107
  })]
101
108
  });
102
109
  }
103
110
  export {
104
- I as P
111
+ PaperForm as P
105
112
  };