@m4l/components 0.0.2 → 0.0.5

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 (82) hide show
  1. package/dist/commonjs.js +5 -1
  2. package/dist/components/DataGrid/components/Actions/components/Density/index.d.ts +2 -0
  3. package/dist/components/DataGrid/components/Actions/components/Density/styles.d.ts +3 -0
  4. package/dist/components/DataGrid/components/Actions/components/Filter/index.d.ts +2 -0
  5. package/dist/components/DataGrid/components/Actions/components/Filter/styles.d.ts +2 -0
  6. package/dist/components/DataGrid/components/Actions/components/RowsCount/index.d.ts +2 -0
  7. package/dist/components/DataGrid/components/Actions/components/RowsCount/styles.d.ts +4 -0
  8. package/dist/components/DataGrid/components/Actions/components/Settings/ColumnsConfig/components/FormatterColumn/index.d.ts +4 -0
  9. package/dist/components/DataGrid/components/Actions/components/Settings/ColumnsConfig/index.d.ts +3 -0
  10. package/dist/components/DataGrid/components/Actions/components/Settings/ColumnsConfig/styles.d.ts +8 -0
  11. package/dist/components/DataGrid/components/Actions/components/Settings/ColumnsConfig/types.d.ts +25 -0
  12. package/dist/components/DataGrid/components/Actions/components/Settings/index.d.ts +2 -0
  13. package/dist/components/DataGrid/components/Actions/components/Settings/styles.d.ts +2 -0
  14. package/dist/components/DataGrid/components/Actions/components/Settings/types.d.ts +2 -0
  15. package/dist/components/DataGrid/components/Actions/index.d.ts +3 -0
  16. package/dist/components/DataGrid/components/Actions/styles.d.ts +2 -0
  17. package/dist/components/DataGrid/components/Actions/types.d.ts +11 -0
  18. package/dist/components/DataGrid/components/Table/components/ActionsColumn.d.ts +4 -0
  19. package/dist/components/DataGrid/components/Table/components/CheckboxFormatter.d.ts +3 -0
  20. package/dist/components/DataGrid/components/Table/components/CustomIcons.d.ts +15 -0
  21. package/dist/components/DataGrid/components/Table/components/DraggableHeaderRenderer.d.ts +6 -0
  22. package/dist/components/DataGrid/components/Table/components/SelectColumn.d.ts +4 -0
  23. package/dist/components/DataGrid/components/Table/components/SkeletonFormatter/index.d.ts +2 -0
  24. package/dist/components/DataGrid/components/Table/components/SkeletonFormatter/styles.d.ts +2 -0
  25. package/dist/components/DataGrid/components/Table/hooks/getDragHeaderRenderer.d.ts +3 -0
  26. package/dist/components/DataGrid/components/Table/hooks/useFocusRef.d.ts +5 -0
  27. package/dist/components/DataGrid/components/Table/hooks/useSortColumnsRows.d.ts +8 -0
  28. package/dist/components/DataGrid/components/Table/index.d.ts +3 -0
  29. package/dist/components/DataGrid/components/Table/styles.d.ts +3 -0
  30. package/dist/components/DataGrid/contexts/BaseContext/index.d.ts +5 -0
  31. package/dist/components/DataGrid/contexts/BaseContext/types.d.ts +51 -0
  32. package/dist/components/DataGrid/contexts/FilterContext/index.d.ts +9 -0
  33. package/dist/components/DataGrid/contexts/FilterContext/types.d.ts +11 -0
  34. package/dist/components/DataGrid/formatters/DateFormatter/index.d.ts +3 -0
  35. package/dist/components/DataGrid/formatters/DateFormatter/types.d.ts +6 -0
  36. package/dist/components/DataGrid/hooks/useBase.d.ts +1 -0
  37. package/dist/components/DataGrid/hooks/useFilters.d.ts +1 -0
  38. package/dist/components/DataGrid/index.d.ts +3 -0
  39. package/dist/components/DataGrid/index.js +1623 -0
  40. package/dist/components/DataGrid/styles.d.ts +3 -0
  41. package/dist/components/DataGrid/types.d.ts +56 -0
  42. package/dist/components/FormActions/dictionary.d.ts +3 -0
  43. package/dist/components/FormActions/index.js +4 -1
  44. package/dist/components/ModalDialog/dictionary.d.ts +3 -0
  45. package/dist/components/ModalDialog/index.js +10 -3
  46. package/dist/components/ObjectLogs/components/DetailDialog/index.d.ts +3 -0
  47. package/dist/components/ObjectLogs/components/DetailDialog/styles.d.ts +3 -0
  48. package/dist/components/ObjectLogs/components/DetailDialog/types.d.ts +3 -0
  49. package/dist/components/ObjectLogs/components/DetailFormatter/index.d.ts +3 -0
  50. package/dist/components/ObjectLogs/components/DetailFormatter/types.d.ts +3 -0
  51. package/dist/components/ObjectLogs/index.d.ts +3 -0
  52. package/dist/components/ObjectLogs/index.js +283 -0
  53. package/dist/components/ObjectLogs/styles.d.ts +4 -0
  54. package/dist/components/ObjectLogs/types.d.ts +18 -0
  55. package/dist/components/index.d.ts +4 -0
  56. package/dist/components/mui_extended/IconButton/index.d.ts +5 -0
  57. package/dist/components/mui_extended/IconButton/index.js +37 -0
  58. package/dist/components/mui_extended/IconButton/types.d.ts +5 -0
  59. package/dist/components/mui_extended/MenuActions/index.d.ts +2 -1
  60. package/dist/components/mui_extended/MenuActions/styles.d.ts +2 -2
  61. package/dist/components/mui_extended/Pager/components/PagerActions/index.d.ts +3 -0
  62. package/dist/components/mui_extended/Pager/components/PagerActions/styles.d.ts +2 -0
  63. package/dist/components/mui_extended/Pager/components/PagerActions/types.d.ts +7 -0
  64. package/dist/components/mui_extended/Pager/dicctionary.d.ts +3 -0
  65. package/dist/components/mui_extended/Pager/index.d.ts +4 -0
  66. package/dist/components/mui_extended/Pager/index.js +201 -0
  67. package/dist/components/mui_extended/Pager/styles.d.ts +6 -0
  68. package/dist/components/mui_extended/Pager/types.d.ts +13 -0
  69. package/dist/components/mui_extended/index.d.ts +5 -1
  70. package/dist/contexts/ModalContext/index.js +113 -19
  71. package/dist/contexts/index.d.ts +2 -0
  72. package/dist/hooks/useModal/index.d.ts +1 -1
  73. package/dist/hooks/usePaginate.d.ts +15 -0
  74. package/dist/index.d.ts +2 -0
  75. package/dist/index.js +21 -9
  76. package/dist/react-data-grid.js +2652 -0
  77. package/dist/react-draggable.js +2 -2
  78. package/dist/react-json-view.js +2764 -0
  79. package/dist/vendor.js +79 -4
  80. package/package.json +15 -3
  81. package/dist/prop-types.js +0 -1
  82. package/dist/react.js +0 -2
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const WrapperGrid: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const OriginalGridWrapperStyled: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,56 @@
1
+ /// <reference types="react" />
2
+ import { MenuAction } from '@mui_extended/MenuActions/types';
3
+ import { Column } from 'react-data-grid';
4
+ import { ActionsProps } from './components/Actions/types';
5
+ export declare type ColumnType = 'text' | 'date' | 'number' | 'boolean' | 'custom';
6
+ export declare type ColumnAlign = 'left' | 'center' | 'right';
7
+ export declare interface GridRow {
8
+ id: number;
9
+ }
10
+ export declare type SortDirection = 'ASC' | 'DESC';
11
+ export interface SortColumn {
12
+ readonly columnKey: string;
13
+ readonly direction: SortDirection;
14
+ }
15
+ declare module 'react-data-grid' {
16
+ interface Column<TRow, TSummaryRow = unknown> {
17
+ visible?: boolean;
18
+ hidden?: boolean;
19
+ fixed?: boolean;
20
+ type: ColumnType;
21
+ align?: ColumnAlign;
22
+ isDraggable?: boolean;
23
+ withFilter?: boolean;
24
+ withinHeaderRenderer?: React.FunctionComponent<HeaderRendererProps<TRow, TSummaryRow>>;
25
+ }
26
+ }
27
+ export declare type RowKey = string | number;
28
+ export declare interface WithActionsProps {
29
+ withActions?: boolean;
30
+ }
31
+ export declare interface PagerState {
32
+ page: number;
33
+ rowsPerPage: number;
34
+ totalRecords: number;
35
+ }
36
+ export declare const initialPagerState: PagerState;
37
+ export declare type RowHeightVariants = 'standard' | 'compact' | 'confortable';
38
+ export declare type RowHeights = number | number[];
39
+ export declare interface GridProps<TRow, TSummaryRow> {
40
+ id: RowKey;
41
+ isSkeleton?: boolean;
42
+ withActions?: boolean;
43
+ columns: readonly Column<TRow, TSummaryRow>[];
44
+ rows: TRow[];
45
+ initialRowHeightVariant?: RowHeightVariants;
46
+ rowHeaderHeights?: RowHeights;
47
+ rowHeights?: RowHeights;
48
+ rowActionsGetter?: (row: TRow) => MenuAction[];
49
+ rowKeyGetter: (row: TRow) => RowKey;
50
+ isMultipleSelect?: boolean;
51
+ selectedRows?: Set<RowKey>;
52
+ onRowsSelectedChange?: (mapRowsSelected: ReadonlySet<RowKey>, rawRowsSelected: TRow[]) => void;
53
+ }
54
+ export declare interface DataGridProps<TRow, TSummaryRow> extends GridProps<TRow, TSummaryRow> {
55
+ actionsProps: ActionsProps;
56
+ }
@@ -0,0 +1,3 @@
1
+ import type { Dictionary } from '@m4l/core';
2
+ export declare function getActionnsComponentsDictionary(): string[];
3
+ export declare const defaultActionsDictionary: Dictionary;
@@ -38,4 +38,7 @@ const FormActions = (props) => {
38
38
  })]
39
39
  });
40
40
  };
41
- export { FormActions as F };
41
+ function getActionnsComponentsDictionary() {
42
+ return ["actions"];
43
+ }
44
+ export { FormActions as F, getActionnsComponentsDictionary as g };
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from "@m4l/core";
2
+ export declare function getModalDialogComponentsDictionary(): string[];
3
+ export declare const defaultModalDialogDictionary: Dictionary;
@@ -8,10 +8,11 @@ import { useEnvironment } from "@m4l/core";
8
8
  import { B as BoxIcon } from "../mui_extended/BoxIcon/index.js";
9
9
  import "../mui_extended/MenuPopover/index.js";
10
10
  import "react";
11
- import "react-router-dom";
12
11
  import { jsxs, jsx } from "react/jsx-runtime";
12
+ import "react-router-dom";
13
13
  import "../mui_extended/MenuActions/index.js";
14
- import { F as FormActions } from "../FormActions/index.js";
14
+ import "../mui_extended/Pager/index.js";
15
+ import { F as FormActions, g as getActionnsComponentsDictionary } from "../FormActions/index.js";
15
16
  const WrapperDialog = styled(Dialog)(() => ({}));
16
17
  const Container = styled("div")(({ theme }) => ({
17
18
  display: "flex",
@@ -171,4 +172,10 @@ const ModalDialog = () => {
171
172
  }), !isDesktop && contentComnponent]
172
173
  });
173
174
  };
174
- export { ModalDialog as M };
175
+ function getModalDialogComponentsDictionary() {
176
+ return ["modal_dialog"].concat(getActionnsComponentsDictionary());
177
+ }
178
+ const defaultModalDialogDictionary = {
179
+ modal_dialog: {}
180
+ };
181
+ export { ModalDialog as M, defaultModalDialogDictionary as d, getModalDialogComponentsDictionary as g };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import type { DetailDialogProps } from './types';
3
+ export declare function DetailDialog(props: DetailDialogProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const Text: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
@@ -0,0 +1,3 @@
1
+ export interface DetailDialogProps {
2
+ log_id: number;
3
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { DetailFormatterProps } from './types';
3
+ export declare function DetailFormatter(props: DetailFormatterProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export interface DetailFormatterProps {
2
+ log_id: number;
3
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { LogsProps } from './types';
3
+ export declare function ObjectLogs(props: LogsProps): JSX.Element;
@@ -0,0 +1,283 @@
1
+ import { useState, useEffect, useCallback, useMemo } from "react";
2
+ import { useNetwork, useModuleDictionary } from "@m4l/core";
3
+ import { Tooltip, IconButton, TextField } from "@mui/material";
4
+ import { LocalizationProvider, DateTimePicker } from "@mui/x-date-pickers";
5
+ import AdapterDateFns from "@mui/lab/AdapterDateFns";
6
+ import { styled, useTheme } from "@mui/material/styles";
7
+ import { startOfMonth, endOfDay } from "date-fns";
8
+ import { D as DateFormatter, a as DataGrid } from "../DataGrid/index.js";
9
+ import { I as IconButton$1 } from "../mui_extended/IconButton/index.js";
10
+ import { R as ReactJson } from "../../react-json-view.js";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ import { u as useModal } from "../../hooks/useModal/index.js";
13
+ import { a as usePaginate } from "../../vendor.js";
14
+ const Container$1 = styled("div")(() => ({
15
+ height: "100%",
16
+ width: "100%",
17
+ display: "flex",
18
+ flexDirection: "column",
19
+ justifyContent: "flex-start"
20
+ }));
21
+ const Actions = styled("div")(({
22
+ theme
23
+ }) => ({
24
+ position: "relative",
25
+ height: "60px",
26
+ display: "flex",
27
+ flexDirection: "row",
28
+ justifyContent: "flex-start",
29
+ alignItems: "center",
30
+ "& .MuiFormControl-root": {
31
+ flexGrow: 1
32
+ },
33
+ [theme.breakpoints.up("sm")]: {
34
+ "& .MuiFormControl-root:nth-of-type(1)": {
35
+ marginRight: theme.spacing(3)
36
+ }
37
+ }
38
+ }));
39
+ const GridWrapper = styled("div")(() => ({
40
+ position: "relative",
41
+ flexGrow: "1",
42
+ width: "100%"
43
+ }));
44
+ const Container = styled("div")(({ theme }) => ({
45
+ color: theme.palette.text.primary,
46
+ display: "flex",
47
+ flexDirection: "column",
48
+ height: "100%",
49
+ width: "100%"
50
+ }));
51
+ styled("span")(({ theme }) => ({
52
+ color: theme.palette.text.primary,
53
+ display: "flex",
54
+ flexDirection: "column",
55
+ height: "100%",
56
+ width: "100%"
57
+ }));
58
+ function DetailDialog(props) {
59
+ const {
60
+ log_id
61
+ } = props;
62
+ const {
63
+ networkOperation
64
+ } = useNetwork();
65
+ const [detail, setDetail] = useState({});
66
+ useEffect(() => {
67
+ let mounted = true;
68
+ networkOperation({
69
+ method: "GET",
70
+ endPoint: `logs/${log_id}`
71
+ }).then((response) => {
72
+ if (mounted) {
73
+ const parseData = JSON.parse(String(response.data.log_detail));
74
+ setDetail(parseData);
75
+ }
76
+ });
77
+ return function cleanUp() {
78
+ mounted = false;
79
+ };
80
+ }, []);
81
+ const detailTest = {
82
+ id: "id",
83
+ test: true,
84
+ number: 123
85
+ };
86
+ console.log("parseJson", detail, typeof detail);
87
+ console.log("parseJosnTest", detailTest, typeof detailTest);
88
+ return /* @__PURE__ */ jsx(Container, {
89
+ id: "objectLogsDetail",
90
+ children: /* @__PURE__ */ jsx(ReactJson, {
91
+ src: detail
92
+ })
93
+ });
94
+ }
95
+ function DetailFormatter(props) {
96
+ const {
97
+ log_id
98
+ } = props;
99
+ const {
100
+ openModal,
101
+ closeModal
102
+ } = useModal();
103
+ const {
104
+ getLabel
105
+ } = useModuleDictionary();
106
+ const onClickDetail = () => {
107
+ openModal({
108
+ onQueryClose: () => closeModal(),
109
+ title: getLabel("object_logs.modal_detail_title"),
110
+ iconComponent: /* @__PURE__ */ jsx("div", {
111
+ children: "Sin icono"
112
+ }),
113
+ contentComponent: /* @__PURE__ */ jsx(DetailDialog, {
114
+ log_id
115
+ })
116
+ });
117
+ };
118
+ return /* @__PURE__ */ jsx(Tooltip, {
119
+ title: "filtrar",
120
+ children: /* @__PURE__ */ jsx(IconButton, {
121
+ onClick: onClickDetail,
122
+ "aria-label": "filter",
123
+ children: /* @__PURE__ */ jsx("div", {
124
+ children: "Sin icono"
125
+ })
126
+ })
127
+ });
128
+ }
129
+ function ObjectLogs(props) {
130
+ const {
131
+ getLabel
132
+ } = useModuleDictionary();
133
+ const {
134
+ resource_id,
135
+ object_id
136
+ } = props;
137
+ const now = new Date();
138
+ const [startValue, setStartValue] = useState(startOfMonth(now));
139
+ const [endValue, setEndtValue] = useState(endOfDay(now));
140
+ const [queryParams, setQueryParams] = useState({
141
+ resource_id,
142
+ object_id,
143
+ init_date: startValue,
144
+ end_date: endValue
145
+ });
146
+ const [queryActive, setQueryActive] = useState(true);
147
+ const theme = useTheme();
148
+ const dateFormatterCreatedAt = useCallback((rowProps) => /* @__PURE__ */ jsx(DateFormatter, {
149
+ presentationType: "datetime",
150
+ dateTime: rowProps.row.created_at
151
+ }), []);
152
+ const DetailRowFormatter = useCallback((rowProps) => /* @__PURE__ */ jsx(DetailFormatter, {
153
+ log_id: rowProps.row.id
154
+ }), []);
155
+ const columns = useMemo(() => [
156
+ {
157
+ key: "created_at",
158
+ name: getLabel("object_logs.created_at"),
159
+ type: "date",
160
+ width: 300,
161
+ formatter: dateFormatterCreatedAt
162
+ },
163
+ {
164
+ key: "email",
165
+ name: getLabel("object_logs.email"),
166
+ type: "text",
167
+ width: 300
168
+ },
169
+ {
170
+ key: "resource_name",
171
+ name: getLabel("object_logs.resource_name"),
172
+ type: "text"
173
+ },
174
+ {
175
+ key: "preview",
176
+ name: getLabel("object_logs.preview"),
177
+ type: "text"
178
+ },
179
+ {
180
+ key: "Detail",
181
+ name: getLabel("object_logs.log_detail"),
182
+ type: "custom",
183
+ formatter: DetailRowFormatter
184
+ },
185
+ {
186
+ key: "ip",
187
+ name: getLabel("object_logs.ip"),
188
+ type: "text"
189
+ }
190
+ ], [getLabel]);
191
+ const {
192
+ pagerState,
193
+ rows,
194
+ onPageChange,
195
+ onRowsPerPageChange,
196
+ clearRows
197
+ } = usePaginate({
198
+ endPoint: "logs",
199
+ fireOnEnter: false,
200
+ queryParams
201
+ });
202
+ useEffect(() => {
203
+ setQueryActive(true);
204
+ clearRows();
205
+ }, [object_id]);
206
+ const onChangeDate = (date, which) => {
207
+ if (!date)
208
+ return;
209
+ if (which === "start") {
210
+ setStartValue(date);
211
+ } else {
212
+ setEndtValue(date);
213
+ }
214
+ setQueryActive(true);
215
+ };
216
+ const onClickFilter = () => {
217
+ setQueryParams({
218
+ resource_id,
219
+ object_id,
220
+ init_date: startValue,
221
+ end_date: endValue
222
+ });
223
+ setQueryActive(false);
224
+ };
225
+ return /* @__PURE__ */ jsxs(Container$1, {
226
+ children: [/* @__PURE__ */ jsxs(Actions, {
227
+ id: "objectLogsActions",
228
+ children: [/* @__PURE__ */ jsxs(LocalizationProvider, {
229
+ dateAdapter: AdapterDateFns,
230
+ children: [/* @__PURE__ */ jsx(DateTimePicker, {
231
+ value: startValue,
232
+ onChange: (newValue) => {
233
+ onChangeDate(newValue, "start");
234
+ },
235
+ renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
236
+ ...params
237
+ })
238
+ }), /* @__PURE__ */ jsx(DateTimePicker, {
239
+ value: endValue,
240
+ onChange: (newValue) => {
241
+ onChangeDate(newValue, "end");
242
+ },
243
+ renderInput: (params) => /* @__PURE__ */ jsx(TextField, {
244
+ ...params
245
+ })
246
+ })]
247
+ }), /* @__PURE__ */ jsx(IconButton$1, {
248
+ dictionaryTooltip: "object_logs.search",
249
+ onClick: onClickFilter,
250
+ sx: {
251
+ color: queryActive ? theme.palette.primary.main : theme.palette.text.primary
252
+ },
253
+ disabled: object_id === void 0,
254
+ "aria-label": "searc",
255
+ src: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/components/object_logs/assets/icons/search.svg"
256
+ })]
257
+ }), /* @__PURE__ */ jsx(GridWrapper, {
258
+ id: "GridWrapper",
259
+ children: /* @__PURE__ */ jsx(DataGrid, {
260
+ id: "users_logs_list",
261
+ columns,
262
+ rows,
263
+ rowKeyGetter: (row) => row.id,
264
+ isMultipleSelect: false,
265
+ withActions: true,
266
+ actionsProps: {
267
+ withPager: true,
268
+ withLocalFilters: true,
269
+ pagerOptions: {
270
+ records: rows.length,
271
+ totalRecords: pagerState.totalRecords,
272
+ rowsPerPageOptions: [1, 2, 3, 4, 5, 10, 25],
273
+ page: pagerState.page,
274
+ rowsPerPage: pagerState.rowsPerPage,
275
+ onPageChange,
276
+ onRowsPerPageChange
277
+ }
278
+ }
279
+ }, "users_list_logs")
280
+ })]
281
+ });
282
+ }
283
+ export { ObjectLogs as O };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
3
+ export declare const Actions: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
4
+ export declare const GridWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,18 @@
1
+ import { Maybe } from '@m4l/core';
2
+ export interface RowLog {
3
+ id: number;
4
+ created_at: string;
5
+ email: string;
6
+ resource_name: string;
7
+ privilege_name: string;
8
+ preview: string;
9
+ ip: string;
10
+ }
11
+ export interface LogsProps {
12
+ resource_id: number;
13
+ object_id: Maybe<number>;
14
+ }
15
+ export interface QueryParams extends LogsProps, Record<string, unknown> {
16
+ init_date: Date;
17
+ end_date: Date;
18
+ }
@@ -1,5 +1,9 @@
1
1
  export * from '../components/mui_extended';
2
+ export * from '../components/DataGrid';
3
+ export * from '../components/ObjectLogs';
2
4
  export * from '../components/FormActions';
3
5
  export * from '../components/ModalDialog';
6
+ export * from '../components/ModalDialog/dictionary';
4
7
  export * from '../components/Resizeable';
5
8
  export * from '../components/SplitLayout';
9
+ export type { SplitPosition } from '../components/SplitLayout/types';
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { IconButtonProps as MUIIconButtonProps } from '@mui/material';
3
+ import { IconButtonProps } from './types';
4
+ export declare function IconButton({ src, tooltip, size, dictionaryTooltip, ...other }: IconButtonProps & MUIIconButtonProps): JSX.Element;
5
+ export default IconButton;
@@ -0,0 +1,37 @@
1
+ import { useMemo } from "react";
2
+ import { useModuleDictionary } from "@m4l/core";
3
+ import { IconButton as IconButton$1, Tooltip } from "@mui/material";
4
+ import { B as BoxIcon } from "../BoxIcon/index.js";
5
+ import { jsx } from "react/jsx-runtime";
6
+ function IconButton({
7
+ src,
8
+ tooltip,
9
+ size = "small",
10
+ dictionaryTooltip,
11
+ ...other
12
+ }) {
13
+ const {
14
+ getLabel
15
+ } = useModuleDictionary();
16
+ const iconButton = useMemo(() => /* @__PURE__ */ jsx(IconButton$1, {
17
+ size,
18
+ ...other,
19
+ children: /* @__PURE__ */ jsx(BoxIcon, {
20
+ src
21
+ })
22
+ }), [size, other, src]);
23
+ const finalTooltip = useMemo(() => {
24
+ if (dictionaryTooltip && getLabel) {
25
+ return getLabel(dictionaryTooltip);
26
+ }
27
+ return tooltip;
28
+ }, [dictionaryTooltip, tooltip, getLabel]);
29
+ if (finalTooltip && !other.disabled) {
30
+ return /* @__PURE__ */ jsx(Tooltip, {
31
+ title: finalTooltip,
32
+ children: iconButton
33
+ });
34
+ }
35
+ return iconButton;
36
+ }
37
+ export { IconButton as I };
@@ -0,0 +1,5 @@
1
+ export interface IconButtonProps {
2
+ src: string;
3
+ tooltip?: string;
4
+ dictionaryTooltip?: string;
5
+ }
@@ -1,3 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { MenuActionsProps } from './types';
3
- export default function MenuActions(props: MenuActionsProps): JSX.Element;
3
+ export declare function MenuActions(props: MenuActionsProps): JSX.Element;
4
+ export default MenuActions;
@@ -6,7 +6,7 @@ export declare const WrapperMenuActions: import("@emotion/styled").StyledCompone
6
6
  disabled?: boolean | undefined;
7
7
  disableFocusRipple?: boolean | undefined;
8
8
  edge?: false | "end" | "start" | undefined;
9
- size?: "small" | "medium" | "large" | undefined;
9
+ size?: "small" | "large" | "medium" | undefined;
10
10
  sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
11
11
  } & Omit<{
12
12
  action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
@@ -26,5 +26,5 @@ export declare const WrapperMenuActions: import("@emotion/styled").StyledCompone
26
26
  touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
27
27
  }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
28
28
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
29
- }, "color" | "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
29
+ }, "color" | "children" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "tabIndex" | "action" | "centerRipple" | "disabled" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "size" | "edge"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
30
30
  export declare const LabelMemuItem: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { PagerActionsProps } from './types';
3
+ export declare function PagerActions(props: PagerActionsProps): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const WrapperPagerActions: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export interface PagerActionsProps {
3
+ count: number;
4
+ page: number;
5
+ rowsPerPage: number;
6
+ onPageChange: (event: React.MouseEvent<HTMLButtonElement>, newPage: number) => void;
7
+ }
@@ -0,0 +1,3 @@
1
+ import { Dictionary } from '@m4l/core';
2
+ export declare function getPagerComponentsDictionary(): string[];
3
+ export declare const defaultPagerDictionary: Dictionary;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PagerProps } from './types';
3
+ export declare function Pager(props: PagerProps): JSX.Element;
4
+ export default Pager;