@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,201 @@
1
+ import { useMemo } from "react";
2
+ import { Skeleton, TablePagination } from "@mui/material";
3
+ import { styled } from "@mui/material/styles";
4
+ import { I as IconButton } from "../IconButton/index.js";
5
+ import { useEnvironment } from "@m4l/core";
6
+ import { jsxs, jsx } from "react/jsx-runtime";
7
+ const WrapperPagerActions = styled("div")(({ theme }) => ({
8
+ width: "100%",
9
+ justifyContent: "center",
10
+ display: "flex",
11
+ marginLeft: 0,
12
+ [theme.breakpoints.up("sm")]: {
13
+ display: "flex",
14
+ alignItems: "center",
15
+ marginLeft: theme.spacing(3)
16
+ }
17
+ }));
18
+ function PagerActions(props) {
19
+ const {
20
+ count,
21
+ page,
22
+ rowsPerPage,
23
+ onPageChange
24
+ } = props;
25
+ const {
26
+ host_static_assets,
27
+ environment
28
+ } = useEnvironment();
29
+ const handleFirstPageButtonClick = (event) => {
30
+ onPageChange(event, 0);
31
+ };
32
+ const handleBackButtonClick = (event) => {
33
+ onPageChange(event, page - 1);
34
+ };
35
+ const handleNextButtonClick = (event) => {
36
+ onPageChange(event, page + 1);
37
+ };
38
+ const handleLastPageButtonClick = (event) => {
39
+ onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));
40
+ };
41
+ return /* @__PURE__ */ jsxs(WrapperPagerActions, {
42
+ id: "WrapperPagerActions",
43
+ children: [/* @__PURE__ */ jsx(IconButton, {
44
+ dictionaryTooltip: "pager.first",
45
+ onClick: handleFirstPageButtonClick,
46
+ disabled: page === 0,
47
+ "aria-label": "first page",
48
+ src: `${host_static_assets}/${environment}/frontend/components/pager/assets/icons/first.svg`
49
+ }), /* @__PURE__ */ jsx(IconButton, {
50
+ dictionaryTooltip: "pager.previous",
51
+ onClick: handleBackButtonClick,
52
+ disabled: page === 0,
53
+ "aria-label": "first page",
54
+ src: `${host_static_assets}/${environment}/frontend/components/pager/assets/icons/previous.svg`
55
+ }), /* @__PURE__ */ jsx(IconButton, {
56
+ dictionaryTooltip: "pager.next",
57
+ onClick: handleNextButtonClick,
58
+ disabled: page >= Math.ceil(count / rowsPerPage) - 1,
59
+ "aria-label": "next page",
60
+ src: `${host_static_assets}/${environment}/frontend/components/pager/assets/icons/next.svg`
61
+ }), /* @__PURE__ */ jsx(IconButton, {
62
+ dictionaryTooltip: "pager.last",
63
+ onClick: handleLastPageButtonClick,
64
+ disabled: page >= Math.ceil(count / rowsPerPage) - 1,
65
+ "aria-label": "last page",
66
+ src: `${host_static_assets}/${environment}/frontend/components/pager/assets/icons/last.svg`
67
+ })]
68
+ });
69
+ }
70
+ styled("div")(() => ({
71
+ display: "flex",
72
+ flexDirection: "column",
73
+ height: "100%",
74
+ overflow: "hidden"
75
+ }));
76
+ const SKTWrapperPagerActions = styled("div")(({ theme }) => ({
77
+ width: "100%",
78
+ display: "flex",
79
+ justifyContent: "center",
80
+ alignItems: "center",
81
+ marginLeft: theme.spacing(3)
82
+ }));
83
+ const SKTSvgIconButtonContainer = styled("div")(({ theme }) => ({
84
+ display: "flex",
85
+ marginLeft: theme.spacing(3)
86
+ }));
87
+ const SKTSvgIconButton = styled("div")(({ theme }) => ({
88
+ display: "flex",
89
+ justifyContent: "center",
90
+ alignItems: "center",
91
+ width: theme.spacing(3.75),
92
+ height: theme.spacing(3.75)
93
+ }));
94
+ const SKTWrapperRowsPerPage = styled("div")(({ theme }) => ({
95
+ display: "grid",
96
+ gridTemplateColumns: "auto auto",
97
+ gridGap: theme.spacing(1),
98
+ marginRight: theme.spacing(3)
99
+ }));
100
+ function Pager(props) {
101
+ const {
102
+ totalRecords,
103
+ rowsPerPageOptions = [5, 10, 2],
104
+ rowsPerPage = 25,
105
+ page,
106
+ onPageChange,
107
+ onRowsPerPageChange,
108
+ labelRows = "Rows per page",
109
+ labelOf = "Of",
110
+ isSkeleton = "false",
111
+ isDesktop
112
+ } = props;
113
+ const currentPage = useMemo(() => {
114
+ if (rowsPerPage * page > totalRecords) {
115
+ return Math.floor(totalRecords / rowsPerPage);
116
+ }
117
+ return page;
118
+ }, [page, rowsPerPage, totalRecords]);
119
+ const handleChangeRowsPerPage = (event) => {
120
+ onRowsPerPageChange(parseInt(event.target.value, 10));
121
+ onPageChange(0);
122
+ };
123
+ const handleChangePage = (_event, newPage) => {
124
+ onPageChange(newPage);
125
+ };
126
+ if (isSkeleton) {
127
+ return /* @__PURE__ */ jsxs(SKTWrapperPagerActions, {
128
+ children: [/* @__PURE__ */ jsxs(SKTWrapperRowsPerPage, {
129
+ children: [/* @__PURE__ */ jsx(Skeleton, {
130
+ variant: "text",
131
+ width: "40px",
132
+ height: "16px"
133
+ }), /* @__PURE__ */ jsx(Skeleton, {
134
+ variant: "text",
135
+ width: "20px",
136
+ height: "16px"
137
+ })]
138
+ }), /* @__PURE__ */ jsx(Skeleton, {
139
+ variant: "text",
140
+ width: "50px",
141
+ height: "16px"
142
+ }), /* @__PURE__ */ jsxs(SKTSvgIconButtonContainer, {
143
+ children: [/* @__PURE__ */ jsx(SKTSvgIconButton, {
144
+ children: /* @__PURE__ */ jsx(Skeleton, {
145
+ variant: "circular",
146
+ width: 20,
147
+ height: 20
148
+ })
149
+ }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
150
+ children: /* @__PURE__ */ jsx(Skeleton, {
151
+ variant: "circular",
152
+ width: 20,
153
+ height: 20
154
+ })
155
+ }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
156
+ children: /* @__PURE__ */ jsx(Skeleton, {
157
+ variant: "circular",
158
+ width: 20,
159
+ height: 20
160
+ })
161
+ }), /* @__PURE__ */ jsx(SKTSvgIconButton, {
162
+ children: /* @__PURE__ */ jsx(Skeleton, {
163
+ variant: "circular",
164
+ width: 20,
165
+ height: 20
166
+ })
167
+ })]
168
+ })]
169
+ });
170
+ }
171
+ return /* @__PURE__ */ jsx(TablePagination, {
172
+ id: "TablePagination",
173
+ rowsPerPageOptions,
174
+ component: "div",
175
+ count: totalRecords,
176
+ rowsPerPage,
177
+ page: currentPage,
178
+ onPageChange: handleChangePage,
179
+ onRowsPerPageChange: handleChangeRowsPerPage,
180
+ labelDisplayedRows: isDesktop ? ({
181
+ from,
182
+ to,
183
+ count
184
+ }) => `${from}-${to} ${labelOf} ${count}` : () => ``,
185
+ labelRowsPerPage: isDesktop ? labelRows : "",
186
+ ActionsComponent: PagerActions
187
+ });
188
+ }
189
+ function getPagerComponentsDictionary() {
190
+ return ["pager"];
191
+ }
192
+ const defaultPagerDictionary = {
193
+ pager: {
194
+ first: "First",
195
+ previous: "Previous",
196
+ before: "Before",
197
+ last: "Last",
198
+ of: "of"
199
+ }
200
+ };
201
+ export { Pager as P, defaultPagerDictionary as d, getPagerComponentsDictionary as g };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare const Pager: 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 SKTWrapperPagerActions: 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 SKTSvgIconButtonContainer: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
+ export declare const SKTSvgIconButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const SKTWrapperRowsPerPage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,13 @@
1
+ export interface PagerProps {
2
+ records: number;
3
+ totalRecords: number;
4
+ rowsPerPageOptions?: number[];
5
+ rowsPerPage?: number;
6
+ page: number;
7
+ onPageChange: (newPage: number) => void;
8
+ onRowsPerPageChange: (newRowsPerPage: number) => void;
9
+ labelRows?: string;
10
+ labelOf?: string;
11
+ isSkeleton?: boolean;
12
+ isDesktop?: boolean;
13
+ }
@@ -1,9 +1,13 @@
1
1
  export { BoxIcon } from './BoxIcon';
2
2
  export { default as MenuPopover } from './MenuPopover';
3
+ export { default as IconButton } from './IconButton';
3
4
  export { default as Breadcrumbs } from './Breadcrumbs';
4
5
  export type { TLink } from './Breadcrumbs/types';
5
6
  export { default as MenuActions } from './MenuActions';
6
- export type { MenuAction } from './MenuActions/types';
7
+ export type { MenuAction, ComponentActionProps } from './MenuActions/types';
8
+ export { default as Pager } from './Pager';
9
+ export { getPagerComponentsDictionary, defaultPagerDictionary } from './Pager/dicctionary';
10
+ export type { PagerProps } from './Pager/types';
7
11
  declare module '@mui/material/styles/createPalette' {
8
12
  interface TypeBackground {
9
13
  neutral: string;
@@ -1,24 +1,16 @@
1
- import "@mui/material/Typography";
2
- import { voidFunction } from "@m4l/core";
3
- import "@mui/material/Box";
4
- import "react/jsx-runtime";
5
- import { createContext } from "react";
1
+ import { createContext, useState } from "react";
2
+ import { useEnvironment, voidFunction } from "@m4l/core";
3
+ import Typography from "@mui/material/Typography";
6
4
  import { styled } from "@mui/material/styles";
7
- import "@mui/material";
8
- import "../../react-draggable.js";
9
- import "../../components/ModalDialog/index.js";
10
- import "../../components/Resizeable/index.js";
11
- import "@mui/material/useMediaQuery";
12
- import "../../components/mui_extended/MenuPopover/index.js";
13
- import "react-router-dom";
14
- import "../../components/mui_extended/MenuActions/index.js";
15
- import "../../components/FormActions/index.js";
16
- styled("div")(() => ({
5
+ import { B as BoxIcon } from "../../components/mui_extended/BoxIcon/index.js";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { M as ModalDialog } from "../../components/ModalDialog/index.js";
8
+ const WrapperContentConfirm = styled("div")(() => ({
17
9
  display: "flex",
18
10
  flexDirection: "column",
19
11
  height: "100%"
20
12
  }));
21
- styled("div")(({
13
+ const ModalContent = styled("div")(({
22
14
  theme
23
15
  }) => ({
24
16
  display: "flex",
@@ -33,7 +25,7 @@ styled("div")(({
33
25
  gridTemplateColumns: "1fr 1fr"
34
26
  }
35
27
  }));
36
- styled("div")(({
28
+ const IllustrationContainer = styled("div")(({
37
29
  theme,
38
30
  variant
39
31
  }) => ({
@@ -44,10 +36,42 @@ styled("div")(({
44
36
  background: variant === "warning" ? theme.palette.warning.main : variant === "delete" ? theme.palette.error.main : variant === "info" ? theme.palette.info.main : "theme.palette.text.primary"
45
37
  }
46
38
  }));
47
- styled("div")(() => ({
39
+ const MessageContainer = styled("div")(() => ({
48
40
  display: "flex",
49
41
  alignItems: "center"
50
42
  }));
43
+ const ContentConfirm = (props) => {
44
+ const {
45
+ variant = "info",
46
+ msg = "Are you sure you want to perform this action? Once complete, the information will be deleted."
47
+ } = props;
48
+ const {
49
+ host_static_assets,
50
+ environment
51
+ } = useEnvironment();
52
+ const illustrationWarning = `${host_static_assets}/${environment}/frontend/components/dialog/assets/icons/illustration_confirm_warning.svg`;
53
+ const illustrationError = `${host_static_assets}/${environment}/frontend/components/dialog/assets/icons/illustration_confirm_danger.svg`;
54
+ const illustrationInfo = `${host_static_assets}/${environment}/frontend/components/dialog/assets/icons/illustration_confirm_info.svg`;
55
+ return /* @__PURE__ */ jsx(WrapperContentConfirm, {
56
+ children: /* @__PURE__ */ jsxs(ModalContent, {
57
+ children: [/* @__PURE__ */ jsx(IllustrationContainer, {
58
+ variant,
59
+ children: /* @__PURE__ */ jsx(BoxIcon, {
60
+ src: variant === "warning" ? illustrationWarning : variant === "delete" ? illustrationError : illustrationInfo,
61
+ sx: {
62
+ width: "230px",
63
+ height: "194px"
64
+ }
65
+ })
66
+ }), /* @__PURE__ */ jsx(MessageContainer, {
67
+ children: /* @__PURE__ */ jsx(Typography, {
68
+ variant: "body1",
69
+ children: msg
70
+ })
71
+ })]
72
+ })
73
+ });
74
+ };
51
75
  const initialState = {
52
76
  initialWidth: 600,
53
77
  initialHeigth: 400,
@@ -65,4 +89,74 @@ const initialState = {
65
89
  title: ""
66
90
  };
67
91
  const ModalContext = createContext(initialState);
68
- export { ModalContext as M };
92
+ function ModalProvider({
93
+ children
94
+ }) {
95
+ const [modalOptions, setModalOptions] = useState({
96
+ open: initialState.open,
97
+ withClose: true,
98
+ onQueryClose: voidFunction,
99
+ title: "",
100
+ iconComponent: void 0,
101
+ contentComponent: void 0,
102
+ actionComponents: void 0,
103
+ standardActions: void 0,
104
+ variant: void 0
105
+ });
106
+ const [hasChanges, setHasChanges] = useState(false);
107
+ const openModal = (modalOpenProps) => {
108
+ setModalOptions({
109
+ open: true,
110
+ ...modalOpenProps
111
+ });
112
+ };
113
+ const openModalConfirm = (modalOpenConfirmProps) => {
114
+ const {
115
+ variant = "warning",
116
+ title,
117
+ msg,
118
+ onClickIntro,
119
+ onClickCancel
120
+ } = modalOpenConfirmProps;
121
+ const onClickIntroClose = () => {
122
+ onClickIntro && onClickIntro();
123
+ closeModal();
124
+ };
125
+ setModalOptions({
126
+ open: true,
127
+ title,
128
+ variant,
129
+ contentComponent: /* @__PURE__ */ jsx(ContentConfirm, {
130
+ variant,
131
+ msg
132
+ }),
133
+ standardActions: {
134
+ withCancel: true,
135
+ onClickIntro: onClickIntroClose,
136
+ onClickCancel
137
+ }
138
+ });
139
+ };
140
+ const closeModal = () => {
141
+ setModalOptions((last) => ({
142
+ ...last,
143
+ open: false
144
+ }));
145
+ setHasChanges(false);
146
+ };
147
+ const setChanges = () => {
148
+ setHasChanges(true);
149
+ };
150
+ return /* @__PURE__ */ jsxs(ModalContext.Provider, {
151
+ value: {
152
+ ...modalOptions,
153
+ openModal,
154
+ openModalConfirm,
155
+ closeModal,
156
+ hasChanges,
157
+ setChanges
158
+ },
159
+ children: [children, /* @__PURE__ */ jsx(ModalDialog, {})]
160
+ });
161
+ }
162
+ export { ModalContext as M, ModalProvider as a };
@@ -0,0 +1,2 @@
1
+ export * from './ModalContext/index';
2
+ export * from './ModalContext/types';
@@ -1 +1 @@
1
- export declare const useModal: () => import("../../contexts/ModalContext/types").ModalContextProps;
1
+ export declare const useModal: () => import("../..").ModalContextProps;
@@ -0,0 +1,15 @@
1
+ import type { PagerState } from '../components/DataGrid/types';
2
+ export interface propsUsePaginate {
3
+ endPoint: string;
4
+ timeout?: number;
5
+ fireOnEnter?: boolean;
6
+ queryParams?: Record<string, unknown>;
7
+ }
8
+ export declare const usePaginate: <TRow>(props: propsUsePaginate) => {
9
+ onPageChange: (newPage: number) => void;
10
+ onRowsPerPageChange: (newRowsPerPage: number) => void;
11
+ pagerState: PagerState;
12
+ rows: TRow[];
13
+ clearRows: () => void;
14
+ Refresh: () => void;
15
+ };
package/dist/index.d.ts CHANGED
@@ -1 +1,3 @@
1
1
  export * from './components';
2
+ export * from './contexts';
3
+ export * from './hooks/useModal';
package/dist/index.js CHANGED
@@ -1,11 +1,17 @@
1
1
  export { B as BoxIcon } from "./components/mui_extended/BoxIcon/index.js";
2
2
  export { M as MenuPopover } from "./components/mui_extended/MenuPopover/index.js";
3
+ export { I as IconButton } from "./components/mui_extended/IconButton/index.js";
3
4
  export { B as Breadcrumbs } from "./components/mui_extended/Breadcrumbs/index.js";
4
5
  export { M as MenuActions } from "./components/mui_extended/MenuActions/index.js";
6
+ export { P as Pager, d as defaultPagerDictionary, g as getPagerComponentsDictionary } from "./components/mui_extended/Pager/index.js";
7
+ export { a as DataGrid } from "./components/DataGrid/index.js";
8
+ export { O as ObjectLogs } from "./components/ObjectLogs/index.js";
5
9
  export { F as FormActions } from "./components/FormActions/index.js";
6
- export { M as ModalDialog } from "./components/ModalDialog/index.js";
10
+ export { M as ModalDialog, d as defaultModalDialogDictionary, g as getModalDialogComponentsDictionary } from "./components/ModalDialog/index.js";
7
11
  export { R as Resizeable } from "./components/Resizeable/index.js";
8
12
  export { S as SplitLayout } from "./components/SplitLayout/index.js";
13
+ export { M as ModalContext, a as ModalProvider } from "./contexts/ModalContext/index.js";
14
+ export { u as useModal } from "./hooks/useModal/index.js";
9
15
  import "@mui/material/Box";
10
16
  import "react/jsx-runtime";
11
17
  import "@mui/material/styles";
@@ -13,15 +19,21 @@ import "@mui/material";
13
19
  import "react";
14
20
  import "@m4l/core";
15
21
  import "react-router-dom";
16
- import "./react-draggable.js";
17
- import "prop-types";
18
- import "react-dom";
22
+ import "./react-data-grid.js";
19
23
  import "clsx";
20
- import "./hooks/useModal/index.js";
21
- import "./contexts/ModalContext/index.js";
22
- import "@mui/material/Typography";
23
- import "@mui/material/useMediaQuery";
24
+ import "react-dnd";
25
+ import "react-dnd-html5-backend";
26
+ import "@mui_extended";
24
27
  import "./vendor.js";
25
- import "./react-splitter-layout.js";
28
+ import "@mui/material/useMediaQuery";
29
+ import "@mui/x-date-pickers";
30
+ import "@mui/lab/AdapterDateFns";
31
+ import "date-fns";
32
+ import "./react-json-view.js";
26
33
  import "./commonjs.js";
34
+ import "prop-types";
35
+ import "react-dom";
36
+ import "./react-draggable.js";
37
+ import "./react-splitter-layout.js";
27
38
  import "./react-resizable.js";
39
+ import "@mui/material/Typography";