@m4l/components 0.1.92 → 0.1.94
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.
- package/@types/export.d.ts +12 -15
- package/components/AccountPopover/AccountPopover.d.ts +2 -1
- package/components/AccountPopover/{index.eebea1c5.js → index.2ef0bf6d.js} +20 -31
- package/components/AccountPopover/index.d.ts +0 -1
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +4 -3
- package/components/AccountPopover/types.d.ts +50 -26
- package/components/AppBar/{index.90cceb7d.js → index.16fe42a1.js} +3 -22
- package/components/CommonActions/components/ActionCancel/{index.54588e5b.js → index.c3e23ad4.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.7907e6f4.js → index.6da52418.js} +4 -34
- package/components/CommonActions/components/ActionFormIntro/{index.f7cd515b.js → index.c3af6d1d.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.f20cffae.js → index.49631fcb.js} +2 -2
- package/components/CommonActions/components/Actions/{index.7a196c44.js → index.ccf731c1.js} +2 -38
- package/components/DataGrid/classes/index.d.ts +1 -0
- package/components/DataGrid/classes/types.d.ts +1 -0
- package/components/DataGrid/formatters/columnConcatenatedValueFormatter/index.d.ts +2 -2
- package/components/DataGrid/{index.95cea2ca.js → index.fefdb1af.js} +44 -14
- package/components/DataGrid/subcomponents/Actions/{index.5b0b1fbf.js → index.6b528d76.js} +9 -38
- package/components/DraggableWindow/{index.c702d3f2.js → index.8f423ed7.js} +1 -1
- package/components/DynamicFilter/{index.e9192ebd.js → index.62658ee6.js} +23 -56
- package/components/DynamicFilter/index.d.ts +1 -1
- package/components/GridLayout/classes/index.d.ts +1 -1
- package/components/GridLayout/{index.5e43414d.js → index.1421f0d4.js} +7 -7
- package/components/GridLayout/subcomponents/Griditem/{index.d6f326d2.js → index.b2342897.js} +4 -4
- package/components/GridLayout/subcomponents/Responsive/{index.d41e31ca.js → index.f459804c.js} +2 -2
- package/components/HelperText/{index.191348cc.js → index.7d2afdb3.js} +2 -23
- package/components/Icon/{index.a70c4729.js → index.3211023d.js} +8 -6
- package/components/Image/{index.c18ebf5a.js → index.611cd930.js} +43 -14
- package/components/LanguagePopover/{index.a74f2065.js → index.b6dc03d0.js} +4 -20
- package/components/LinearProgressIndeterminate/{index.60dabc06.js → index.c46da124.js} +1 -1
- package/components/LoadingError/LoadingError.d.ts +3 -0
- package/components/LoadingError/classes/constants.d.ts +1 -0
- package/components/LoadingError/classes/index.d.ts +14 -0
- package/components/LoadingError/classes/types.d.ts +14 -0
- package/components/LoadingError/dictionary.d.ts +1 -0
- package/components/LoadingError/index.96bdc803.js +106 -0
- package/components/LoadingError/index.d.ts +2 -0
- package/components/LoadingError/types.d.ts +10 -0
- package/components/MFLoader/classes/constants.d.ts +1 -0
- package/components/MFLoader/classes/index.d.ts +7 -0
- package/components/MFLoader/classes/types.d.ts +7 -0
- package/components/MFLoader/dictionary.d.ts +1 -0
- package/components/MFLoader/index.caee87dd.js +296 -0
- package/components/MFLoader/index.d.ts +2 -0
- package/components/MFLoader/types.d.ts +7 -0
- package/components/ModalDialog/{index.99745527.js → index.ec55087e.js} +5 -5
- package/components/NavLink/{index.f12bba32.js → index.b75c91e1.js} +2 -22
- package/components/NoItemSelected/{index.1eaf72d8.js → index.3e29c208.js} +1 -1
- package/components/ObjectLogs/{index.9bbac2a0.js → index.3024336f.js} +12 -38
- package/components/Page/index.c4642a29.js +127 -0
- package/components/PaperForm/{index.e02c772c.js → index.cce9ed39.js} +1 -1
- package/components/Period/{index.ebd5e3b7.js → index.c35c6a6c.js} +5 -37
- package/components/PrintingSystem/PrintingSystem.d.ts +3 -0
- package/components/PrintingSystem/classes/constants.d.ts +1 -0
- package/components/PrintingSystem/classes/index.d.ts +32 -0
- package/components/PrintingSystem/classes/types.d.ts +33 -0
- package/components/PrintingSystem/index.d.ts +2 -0
- package/components/PrintingSystem/index.e18a2fa8.js +634 -0
- package/components/PrintingSystem/subcomponents/BodyNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/BodyNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ChartNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ChartNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/DividerNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/FooterNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/GridNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/GridNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/HeaderNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/ImageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/ImageNode/types.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PageNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/Pager/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/Pager/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PaperNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PaperNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/PropertyValueNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/SectionNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/SectionNode/types.d.ts +5 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/index.d.ts +3 -0
- package/components/PrintingSystem/subcomponents/TextBoxNode/types.d.ts +3 -0
- package/components/PrintingSystem/types.d.ts +214 -0
- package/components/PrintingSystem/utils/FactoryRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/FactoryRender/types.d.ts +4 -0
- package/components/PrintingSystem/utils/PageRender/index.d.ts +3 -0
- package/components/PrintingSystem/utils/PageRender/types.d.ts +13 -0
- package/components/PrintingSystem/utils/getEvalValue/index.d.ts +1 -0
- package/components/PrintingSystem/utils/getSize/index.d.ts +1 -0
- package/components/PropertyValue/classes/index.d.ts +3 -2
- package/components/PropertyValue/classes/types.d.ts +2 -0
- package/components/PropertyValue/{index.76fa6a12.js → index.3efa059f.js} +25 -9
- package/components/PropertyValue/types.d.ts +4 -0
- package/components/Resizeable/{index.676c96fe.js → index.8c53c1fa.js} +1 -1
- package/components/SideBar/{index.2dfc5445.js → index.5fd648d2.js} +44 -39
- package/components/animate/{index.4e9774a6.js → index.5d4575bc.js} +2 -6
- package/components/areas/components/AreasAdmin/{index.cd054608.js → index.a00755e9.js} +29 -62
- package/components/areas/components/AreasViewer/classes/index.d.ts +1 -1
- package/components/areas/components/AreasViewer/classes/types.d.ts +2 -8
- package/components/areas/components/AreasViewer/{index.62abf0bb.js → index.653bb2d9.js} +68 -437
- package/components/areas/components/index.558684b3.js +1 -0
- package/components/areas/components/index.d.ts +0 -1
- package/components/areas/contexts/AreasContext/{index.d528f6e7.js → index.2b29c87a.js} +9 -7
- package/components/areas/contexts/index.24025b97.js +1 -0
- package/components/areas/contexts/index.d.ts +1 -0
- package/components/areas/hooks/index.d9dc1e21.js +1 -0
- package/components/areas/hooks/useAreas/{index.d417e4b2.js → index.52bffa4c.js} +1 -1
- package/components/areas/index.4cc6a221.js +22 -0
- package/components/areas/index.d.ts +1 -1
- package/components/formatters/BooleanFormatter/{index.a013b080.js → index.a495c91e.js} +11 -12
- package/components/formatters/FormatterRoot/index.d.ts +3 -0
- package/components/formatters/FormatterRoot/types.d.ts +4 -0
- package/components/formatters/classes/index.d.ts +4 -0
- package/components/formatters/classes/types.d.ts +6 -0
- package/components/formatters/constants.d.ts +1 -0
- package/components/formatters/dictionary.d.ts +0 -1
- package/components/formatters/{index.576922c9.js → index.c4ce2c83.js} +24 -17
- package/components/hook-form/RHFAutocomplete/{index.29a4c62c.js → index.52387f0f.js} +7 -22
- package/components/hook-form/RHFAutocompleteAsync/{index.647c3f9c.js → index.638bd2ae.js} +3 -2
- package/components/hook-form/RHFCheckbox/{index.0b89ea5c.js → index.a38715e3.js} +2 -22
- package/components/hook-form/RHFDateTime/{index.1adc88ad.js → index.66e334b0.js} +23 -23
- package/components/hook-form/RHFPeriod/{index.a4476d23.js → index.23099265.js} +2 -2
- package/components/hook-form/RHFTextField/{index.a1a240b1.js → index.25b3627e.js} +6 -8
- package/components/hook-form/RHFUpload/{index.a4582341.js → index.65588e08.js} +5 -22
- package/components/index.d.ts +3 -0
- package/components/modal/{WindowBase.a4752aa1.js → WindowBase.161ec78a.js} +5 -37
- package/components/modal/{WindowConfirm.7a9c12c0.js → WindowConfirm.7eed7c35.js} +8 -40
- package/components/modal/{index.b434146b.js → index.61389369.js} +0 -37
- package/components/mui_extended/Accordion/{index.cdedddba.js → index.eefbf4a1.js} +4 -4
- package/components/mui_extended/Button/{index.f79eb74e.js → index.94fec33c.js} +3 -3
- package/components/mui_extended/{CheckBox.38abccd8.js → CheckBox.e662d20c.js} +1 -1
- package/components/mui_extended/IconButton/{index.76624519.js → index.53cd6388.js} +2 -2
- package/components/mui_extended/MenuActions/{index.7669b8af.js → index.dd9f65a2.js} +5 -19
- package/components/mui_extended/Pager/{index.ac2a21f0.js → index.de0bd62c.js} +2 -2
- package/components/mui_extended/Tab/{index.5f09e16a.js → index.043bb084.js} +2 -2
- package/components/mui_extended/index.b606cd9d.js +1 -0
- package/contexts/ModalContext/{index.347f6738.js → index.436c2938.js} +1 -1
- package/contexts/RHFormContext/classes/index.d.ts +1 -1
- package/hooks/useFormAddEdit/{index.e8e7f758.js → index.3584a29f.js} +2 -26
- package/hooks/useModal/{index.fa6dfaa1.js → index.05d1821e.js} +1 -1
- package/index.js +195 -187
- package/node_modules.b55d04d9.js +15267 -0
- package/package.json +5 -1
- package/react-data-grid.d46d625e.js +2 -2
- package/react-draggable.e4725f3a.js +630 -0
- package/{react-resizable.ba08699a.js → react-resizable.c07d63fb.js} +2 -2
- package/utils/{index.c43a95f4.js → index.6469f148.js} +75 -107
- package/vendor.d0158973.js +104 -0
- package/components/Page/index.4237c241.js +0 -27
- package/components/areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/types.d.ts +0 -8
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/index.d.ts +0 -3
- package/components/areas/components/AreasViewer/subcomponents/AreasLoadingError/types.d.ts +0 -5
- package/components/areas/components/index.ea2f9914.js +0 -31
- package/components/areas/contexts/index.6e9bbc64.js +0 -2
- package/components/areas/hooks/index.0184c6f7.js +0 -4
- package/components/areas/index.8d6d8969.js +0 -54
- package/components/mui_extended/index.fe189e7d.js +0 -24
- package/node_modules.d73a220d.js +0 -363
- package/react-draggable.7abb5d0a.js +0 -962
- package/vendor.e14dec76.js +0 -128
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader/index.d.ts → MFLoader/MFLoader.d.ts} +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/helper.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/index.d.ts +0 -0
- package/components/{areas/components/AreasViewer/subcomponents/Area/subcomponents/Window/subcomponents/MicroFrontend/subcomponents/MFLoader → MFLoader}/subcomponents/ProggessLoadingMF/types.d.ts +0 -0
- package/components/mui_extended/Badge/{index.b09524fe.js → index.09f5aee5.js} +1 -1
- package/components/mui_extended/Popover/{index.9f35d0eb.js → index.b3eca6b1.js} +2 -2
- package/components/mui_extended/Tooltip/{index.5a795dcd.js → index.24a2bc3f.js} +1 -1
- package/components/mui_extended/Typography/{index.443590d6.js → index.379dd374.js} +1 -1
package/@types/export.d.ts
CHANGED
|
@@ -59,8 +59,8 @@ import { StackClassesKey } from '../components/mui_extended/Stack/classes/types'
|
|
|
59
59
|
import { TabsClassesKey } from '../components/mui_extended/Tabs/classes/types';
|
|
60
60
|
import { NoItemSelectedClassesKey } from '../components/NoItemSelected/classes/types';
|
|
61
61
|
import { ScrollBarClassesKey } from '../components/ScrollBar/classes/types';
|
|
62
|
-
import { ToolkitPageClassesKey } from '../components/
|
|
63
|
-
import { ToolkitSectionClassesKey } from '../components/
|
|
62
|
+
import { ToolkitPageClassesKey } from '../components/PrintingSystem/subcomponents/PageNode/classes/types';
|
|
63
|
+
import { ToolkitSectionClassesKey } from '../components/PrintingSystem/subcomponents/SectionNode/classes/types';
|
|
64
64
|
|
|
65
65
|
declare module '@mui/material/styles' {
|
|
66
66
|
/* ----------------------------- Augmentation overrides theme ----------------------------- */
|
|
@@ -360,21 +360,18 @@ declare module '@mui/material/styles' {
|
|
|
360
360
|
M4LMenuActions?: {
|
|
361
361
|
styleOverrides?: ComponentsOverrides<Theme>['M4LMenuActions'];
|
|
362
362
|
};
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
/* M4LToolkitPage?: {
|
|
367
|
-
styleOverrides?: ComponentsOverrides<Theme>['M4LToolkitPage'];
|
|
363
|
+
M4LPrintingSystem?: {
|
|
364
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LPrintingSystem'];
|
|
368
365
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
366
|
+
M4LFormatter?: {
|
|
367
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LFormatter'];
|
|
368
|
+
};
|
|
369
|
+
M4LoadingError?: {
|
|
370
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LoadingError'];
|
|
371
|
+
};
|
|
372
|
+
M4LMFLoader?: {
|
|
373
|
+
styleOverrides?: ComponentsOverrides<Theme>['M4LMFLoader'];
|
|
372
374
|
};
|
|
373
|
-
|
|
374
|
-
M4LToolkitDivider?: {
|
|
375
|
-
styleOverrides?: ComponentsOverrides<Theme>['M4LToolkitDivider'];
|
|
376
|
-
}; */
|
|
377
|
-
|
|
378
375
|
|
|
379
376
|
}
|
|
380
377
|
}
|
|
@@ -7,12 +7,13 @@ import { AccountPopoverProps } from './types';
|
|
|
7
7
|
* @param {Function} props.handleClick - Manejador para hacer clic en el componente.
|
|
8
8
|
* @param {string} props.version - Versión de la aplicación.
|
|
9
9
|
* @param {Function} props.handleLogOut - Manejador para cerrar la sesión del usuario.
|
|
10
|
-
* @param {
|
|
10
|
+
* @param {RightMenuData} props.userData - Datos del usuario.
|
|
11
11
|
* @param {string} props.className - Clases CSS adicionales para el componente.
|
|
12
12
|
* @returns {JSX.Element} Elemento JSX que representa el componente.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* // Ejemplo de uso:
|
|
16
|
+
*
|
|
16
17
|
* <AccountPopover
|
|
17
18
|
* handleClick={handleClick}
|
|
18
19
|
* version="1.0"
|
|
@@ -1,30 +1,14 @@
|
|
|
1
1
|
import { useEnvironment, useModuleDictionary, useNetwork } from "@m4l/core";
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
|
-
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
4
3
|
import { generateUtilityClasses, generateUtilityClass, styled, useTheme, ButtonBase } from "@mui/material";
|
|
5
|
-
import {
|
|
4
|
+
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
+
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import "../mui_extended/IconButton/index.76624519.js";
|
|
8
|
-
import clsx from "clsx";
|
|
9
|
-
import "@m4l/graphics";
|
|
10
|
-
import "../mui_extended/Accordion/index.cdedddba.js";
|
|
11
|
-
import "../mui_extended/Typography/index.443590d6.js";
|
|
12
7
|
import { A as Avatar } from "../mui_extended/Avatar/index.75e6ed57.js";
|
|
13
|
-
import "react-router-dom";
|
|
14
|
-
import "@mui/material/Button";
|
|
15
|
-
import "../mui_extended/Button/index.f79eb74e.js";
|
|
16
|
-
import "../mui_extended/CheckBox.38abccd8.js";
|
|
17
8
|
import { C as CircularProgress } from "../mui_extended/CircularProgress/index.ad569afd.js";
|
|
18
|
-
import "../mui_extended/
|
|
19
|
-
import "../
|
|
20
|
-
import "
|
|
21
|
-
import "../mui_extended/MenuActions/index.7669b8af.js";
|
|
22
|
-
import { P as Popover } from "../mui_extended/Popover/index.9f35d0eb.js";
|
|
23
|
-
import "../mui_extended/Stack/index.0e53197c.js";
|
|
24
|
-
import "../mui_extended/Tab/index.5f09e16a.js";
|
|
25
|
-
import "../mui_extended/Pager/index.ac2a21f0.js";
|
|
26
|
-
import "../mui_extended/Tooltip/index.5a795dcd.js";
|
|
27
|
-
import { unstable_composeClasses } from "@mui/base";
|
|
9
|
+
import { P as Popover } from "../mui_extended/Popover/index.b3eca6b1.js";
|
|
10
|
+
import { I as Icon } from "../Icon/index.3211023d.js";
|
|
11
|
+
import clsx from "clsx";
|
|
28
12
|
const componentName = "M4LAccountPopover";
|
|
29
13
|
generateUtilityClasses(componentName, [
|
|
30
14
|
"root",
|
|
@@ -103,17 +87,19 @@ function MyAvatar(props) {
|
|
|
103
87
|
const MenuPopOver = (props) => {
|
|
104
88
|
const {
|
|
105
89
|
data,
|
|
106
|
-
|
|
90
|
+
itemHandleClick,
|
|
107
91
|
version,
|
|
108
92
|
handleLogOut,
|
|
109
93
|
classes,
|
|
110
94
|
userData,
|
|
111
|
-
settingHandleOpen
|
|
95
|
+
settingsHandleOpen: settingHandleOpen,
|
|
96
|
+
asyncState
|
|
112
97
|
} = props;
|
|
113
98
|
const {
|
|
114
99
|
host_static_assets,
|
|
115
100
|
environment_assets
|
|
116
101
|
} = useEnvironment();
|
|
102
|
+
console.log("MenuPopOver", data);
|
|
117
103
|
const {
|
|
118
104
|
avatar_url,
|
|
119
105
|
first_name,
|
|
@@ -126,7 +112,7 @@ const MenuPopOver = (props) => {
|
|
|
126
112
|
const [open2, setOpen] = useState(null);
|
|
127
113
|
const theme = useTheme();
|
|
128
114
|
const handleClick = (item) => {
|
|
129
|
-
|
|
115
|
+
itemHandleClick(item);
|
|
130
116
|
handleClose();
|
|
131
117
|
};
|
|
132
118
|
const handleClose = () => {
|
|
@@ -135,6 +121,8 @@ const MenuPopOver = (props) => {
|
|
|
135
121
|
const handleOpen = (event) => {
|
|
136
122
|
setOpen(event.currentTarget);
|
|
137
123
|
};
|
|
124
|
+
const dataIsArray = Array.isArray(data) && data.length > 0;
|
|
125
|
+
console.log("dataIsArray", dataIsArray);
|
|
138
126
|
return /* @__PURE__ */ jsxs("div", {
|
|
139
127
|
role: "presentation",
|
|
140
128
|
className: classes.containerAvatarPopover,
|
|
@@ -220,7 +208,7 @@ const MenuPopOver = (props) => {
|
|
|
220
208
|
className: classes.menuItem,
|
|
221
209
|
children: getLabel("account_popover.label_settings")
|
|
222
210
|
})]
|
|
223
|
-
}),
|
|
211
|
+
}), asyncState === "loaded" ? data.map((option) => /* @__PURE__ */ jsx("div", {
|
|
224
212
|
role: "presentation",
|
|
225
213
|
onClick: () => handleClick(option),
|
|
226
214
|
className: classes.menuItem,
|
|
@@ -256,13 +244,12 @@ const MenuPopOver = (props) => {
|
|
|
256
244
|
};
|
|
257
245
|
const AccountPopover = (props) => {
|
|
258
246
|
const {
|
|
259
|
-
|
|
247
|
+
itemHandleClick,
|
|
260
248
|
version,
|
|
261
249
|
handleLogOut,
|
|
262
250
|
userData,
|
|
263
251
|
className,
|
|
264
|
-
|
|
265
|
-
settingHandleOpen
|
|
252
|
+
settingsHandleOpen: settingHandleOpen
|
|
266
253
|
} = props;
|
|
267
254
|
const [asyncState, setAsyncState] = useState("unLoad");
|
|
268
255
|
const [menuData, setMenuData] = useState([]);
|
|
@@ -286,6 +273,7 @@ const AccountPopover = (props) => {
|
|
|
286
273
|
}
|
|
287
274
|
}).catch((_error) => {
|
|
288
275
|
console.error("AccountData network request error - get menus", _error);
|
|
276
|
+
setMenuData([]);
|
|
289
277
|
});
|
|
290
278
|
}
|
|
291
279
|
return function cleanUp() {
|
|
@@ -293,6 +281,7 @@ const AccountPopover = (props) => {
|
|
|
293
281
|
};
|
|
294
282
|
}, [open]);
|
|
295
283
|
const accountPopoverClasses = useAccountPopoverUtilityClasses();
|
|
284
|
+
console.log("user data", userData);
|
|
296
285
|
return /* @__PURE__ */ jsx(AcountPopOverRoot, {
|
|
297
286
|
className: clsx(accountPopoverClasses.root, className),
|
|
298
287
|
...process.env.NODE_ENV !== "production" ? {
|
|
@@ -300,13 +289,13 @@ const AccountPopover = (props) => {
|
|
|
300
289
|
} : {},
|
|
301
290
|
children: /* @__PURE__ */ jsx(MenuPopOver, {
|
|
302
291
|
data: menuData,
|
|
303
|
-
|
|
292
|
+
asyncState,
|
|
293
|
+
itemHandleClick,
|
|
304
294
|
version,
|
|
305
295
|
handleLogOut,
|
|
306
296
|
classes: accountPopoverClasses,
|
|
307
297
|
userData,
|
|
308
|
-
|
|
309
|
-
settingHandleOpen
|
|
298
|
+
settingsHandleOpen: settingHandleOpen
|
|
310
299
|
})
|
|
311
300
|
});
|
|
312
301
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AccountPopoverClasses } from "../../classes/types";
|
|
2
|
-
import { AccountPopoverProps,
|
|
2
|
+
import { AccountPopoverProps, AsyncTypes, RightMenuData, UserAuth } from "../../types";
|
|
3
3
|
export interface PopOverProps extends Omit<AccountPopoverProps, 'userData'> {
|
|
4
|
-
data: Array<
|
|
4
|
+
data: Array<RightMenuData> | [];
|
|
5
5
|
classes: AccountPopoverClasses;
|
|
6
|
-
userData:
|
|
6
|
+
userData: UserAuth | null | undefined;
|
|
7
|
+
asyncState: AsyncTypes;
|
|
7
8
|
}
|
|
@@ -1,42 +1,66 @@
|
|
|
1
|
-
import { Maybe } from "@m4l/core";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { DomainCountry, Maybe } from "@m4l/core";
|
|
2
|
+
export interface RightMenuData {
|
|
3
|
+
/** Esta propiedad hace referencia al título del módulo.
|
|
4
|
+
* Tiene utilidades como:
|
|
5
|
+
* - Definir el nombre en el encabezado del modulo cuando se agrega en la interfaz de la aplicación web.
|
|
6
|
+
* ...
|
|
7
|
+
* */
|
|
5
8
|
title: string;
|
|
6
|
-
|
|
9
|
+
/** Esta propiedad define el identificador para el tipo de módulo.
|
|
10
|
+
* Tiene utiidades como:
|
|
11
|
+
* - Define a la aplicación web cual de todos los módulos disponibles debe agregar en la interfaz de la aplicación web.
|
|
12
|
+
* - Permite almacenar información del usuario basado en la interacción del módulo tomando en cuenta el identificador.
|
|
13
|
+
* ...
|
|
14
|
+
*/
|
|
7
15
|
module_id?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Esta propiedad define la ubicación del icono representativo del módulo.
|
|
18
|
+
* Tiene utiidades como:
|
|
19
|
+
* - Mostrar el icono representativo en el encabezado del módulo.
|
|
20
|
+
* ...
|
|
21
|
+
*/
|
|
8
22
|
icon_url?: string;
|
|
9
23
|
debug_port?: number;
|
|
10
24
|
}
|
|
25
|
+
/** Lista posibles valores usados para definr el estado actual en la solicitud de red para el endpoint GET Menus param 1 */
|
|
26
|
+
export declare type AsyncTypes = 'unLoad' | 'loading' | 'loaded';
|
|
27
|
+
/** Colección de datos que representa el valor del menú de administrativo propio del usuario.
|
|
28
|
+
* Para obtener el detalle de la información del tipo de dato RightMenuData, se debe validar en la documentación de la librería @m4l/core.
|
|
29
|
+
*/
|
|
11
30
|
export interface MenuDataProvider {
|
|
12
|
-
value:
|
|
31
|
+
value: RightMenuData;
|
|
13
32
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
33
|
+
/** Objeto de propiedades que puede recibir el componente AccountPopover. */
|
|
34
|
+
export interface AccountPopoverProps {
|
|
35
|
+
/** Procedimiento definido desde la instancia, va a ser activado por alguno de elementos del listado dinámico por medio del evento click. */
|
|
36
|
+
itemHandleClick: (item: RightMenuData) => void;
|
|
37
|
+
/** Procedimiento encargado finalizar la sesión del cliente autenticado. */
|
|
38
|
+
handleLogOut: VoidFunction;
|
|
39
|
+
/** Dato que representa la versión actual de la aplicación web. */
|
|
40
|
+
version: string;
|
|
41
|
+
/** Es una colección de datos relacionados al cliente autenticado, puede contener datos como: nombre, apellido, módulos activos entre otros. */
|
|
42
|
+
userData: UserAuth | null | undefined;
|
|
43
|
+
/** Es un texto que permite cambiar los estilos gráficos del componente. */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Procedimiento definido desde la instancia, el cual tiene como propósito permitir visualizar el configurador de apariencia en la aplicación web. */
|
|
46
|
+
settingsHandleOpen: () => void;
|
|
24
47
|
}
|
|
25
|
-
|
|
48
|
+
/** Colección de valores propios del usuario autenticado en la aplicación web.
|
|
49
|
+
* Consulta la información en detalle del endpoint en:
|
|
50
|
+
* @see {@link https://www.notion.so/made4labs/Validate-auth-a78c52d74dde49f3ac2be57f7e2639c2}
|
|
51
|
+
*/
|
|
52
|
+
export interface UserAuth {
|
|
53
|
+
/** Correo electrónico del usuario autenticado. */
|
|
26
54
|
email: string;
|
|
55
|
+
/** Identificador único del usuario autenticado. */
|
|
27
56
|
id: number;
|
|
57
|
+
/** Nombre del usuario autenticado. */
|
|
28
58
|
first_name: string;
|
|
59
|
+
/** Apellido del usuairo autenticado. */
|
|
29
60
|
last_name: string;
|
|
30
61
|
account_id: number;
|
|
62
|
+
/** Es una coleccion de datos determinada por el país del usuario autenticado. Esto permite datos como divisas y simbolos de puntuación numéricos. */
|
|
31
63
|
domain_country: DomainCountry;
|
|
64
|
+
/** Es un texto que representa la ubicación de la imagen representativa para el usuario autenticado. */
|
|
32
65
|
avatar_url?: Maybe<string>;
|
|
33
66
|
}
|
|
34
|
-
export interface AccountPopoverProps {
|
|
35
|
-
handleClick: (item: UserMenuData) => void;
|
|
36
|
-
handleLogOut: VoidFunction;
|
|
37
|
-
version: string;
|
|
38
|
-
userData: User | null | undefined;
|
|
39
|
-
className?: string;
|
|
40
|
-
settingOpen?: boolean;
|
|
41
|
-
settingHandleOpen: () => void;
|
|
42
|
-
}
|
|
@@ -1,30 +1,11 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
1
2
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
2
3
|
import { useEnvironment, useModuleDictionary } from "@m4l/core";
|
|
3
4
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
4
5
|
import { generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
5
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.76624519.js";
|
|
6
|
-
import "../mui_extended/Accordion/index.cdedddba.js";
|
|
7
|
-
import "../Icon/index.a70c4729.js";
|
|
8
|
-
import "react";
|
|
9
|
-
import "clsx";
|
|
10
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
11
|
-
import "../mui_extended/Typography/index.443590d6.js";
|
|
12
|
-
import "../mui_extended/Avatar/index.75e6ed57.js";
|
|
13
|
-
import "react-router-dom";
|
|
14
|
-
import "@mui/material/Button";
|
|
15
|
-
import "../mui_extended/Button/index.f79eb74e.js";
|
|
16
|
-
import "../mui_extended/CheckBox.38abccd8.js";
|
|
17
|
-
import "../mui_extended/Badge/index.b09524fe.js";
|
|
18
|
-
import "../Image/index.c18ebf5a.js";
|
|
19
|
-
import "@mui/lab";
|
|
20
|
-
import "../mui_extended/MenuActions/index.7669b8af.js";
|
|
21
|
-
import "../mui_extended/Popover/index.9f35d0eb.js";
|
|
22
|
-
import "../mui_extended/Stack/index.0e53197c.js";
|
|
23
|
-
import "../mui_extended/Tab/index.5f09e16a.js";
|
|
24
|
-
import "../mui_extended/Pager/index.ac2a21f0.js";
|
|
25
|
-
import "../mui_extended/Tooltip/index.5a795dcd.js";
|
|
26
|
-
import { styled } from "@mui/material/styles";
|
|
27
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
8
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.53cd6388.js";
|
|
28
9
|
const AppBarRoot = styled("header")(({
|
|
29
10
|
theme
|
|
30
11
|
}) => ({
|
package/components/CommonActions/components/ActionCancel/{index.54588e5b.js → index.c3e23ad4.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
3
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index.
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.94fec33c.js";
|
|
3
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.ccf731c1.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const ActionCancel = (props) => {
|
|
6
6
|
const {
|
package/components/CommonActions/components/ActionFormCancel/{index.7907e6f4.js → index.6da52418.js}
RENAMED
|
@@ -1,43 +1,13 @@
|
|
|
1
1
|
import { useFormContext, useFormState } from "react-hook-form";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton } from "@mui/material";
|
|
4
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
4
|
+
import { B as Button } from "../../../mui_extended/Button/index.94fec33c.js";
|
|
5
5
|
import { useCallback, useEffect } from "react";
|
|
6
|
-
import { u as useModal } from "../../../../hooks/useModal/index.
|
|
7
|
-
import "
|
|
8
|
-
import "../../../Resizeable/index.676c96fe.js";
|
|
6
|
+
import { u as useModal } from "../../../../hooks/useModal/index.05d1821e.js";
|
|
7
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.ccf731c1.js";
|
|
9
8
|
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
import "@m4l/graphics";
|
|
11
|
-
import "../../../modal/index.b434146b.js";
|
|
12
|
-
import { W as WindowConfirm } from "../../../modal/WindowConfirm.7a9c12c0.js";
|
|
13
|
-
import "../../../Icon/index.a70c4729.js";
|
|
14
|
-
import "clsx";
|
|
15
|
-
import "../../../mui_extended/IconButton/index.76624519.js";
|
|
16
|
-
import "../../../mui_extended/Accordion/index.cdedddba.js";
|
|
17
|
-
import "../../../mui_extended/Typography/index.443590d6.js";
|
|
18
|
-
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
19
|
-
import "react-router-dom";
|
|
20
|
-
import "../../../mui_extended/CheckBox.38abccd8.js";
|
|
21
|
-
import "../../../mui_extended/Badge/index.b09524fe.js";
|
|
22
|
-
import "../../../Image/index.c18ebf5a.js";
|
|
23
|
-
import "@mui/lab";
|
|
24
|
-
import "../../../mui_extended/MenuActions/index.7669b8af.js";
|
|
25
|
-
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
26
|
-
import "../../../mui_extended/Stack/index.0e53197c.js";
|
|
27
|
-
import "../../../mui_extended/Tab/index.5f09e16a.js";
|
|
28
|
-
import "../../../mui_extended/Pager/index.ac2a21f0.js";
|
|
29
|
-
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
30
|
-
import "zustand";
|
|
31
|
-
import "../../../areas/contexts/AreasContext/index.d528f6e7.js";
|
|
32
|
-
import "../../../areas/components/AreasAdmin/index.cd054608.js";
|
|
33
|
-
import "zustand/shallow";
|
|
34
|
-
import "../../../ScrollBar/index.65bb2930.js";
|
|
35
|
-
import "../../../areas/components/AreasViewer/index.62abf0bb.js";
|
|
36
|
-
import "../../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
37
|
-
import "../../../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
38
|
-
import "../../../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
39
9
|
import { u as useWindowToolsMF } from "../../../areas/hooks/useWindowToolsMF/index.b7afaf88.js";
|
|
40
|
-
import {
|
|
10
|
+
import { W as WindowConfirm } from "../../../modal/WindowConfirm.7eed7c35.js";
|
|
41
11
|
function ActionFormCancel() {
|
|
42
12
|
const {
|
|
43
13
|
getLabel
|
package/components/CommonActions/components/ActionFormIntro/{index.f7cd515b.js → index.c3af6d1d.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useFormContext, useFormState } from "react-hook-form";
|
|
2
2
|
import { useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton } from "@mui/material";
|
|
4
|
-
import { L as LoadingButton } from "../../../mui_extended/Button/index.
|
|
5
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index.
|
|
4
|
+
import { L as LoadingButton } from "../../../mui_extended/Button/index.94fec33c.js";
|
|
5
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.ccf731c1.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
function ActionFormIntro(props) {
|
|
8
8
|
const {
|
package/components/CommonActions/components/ActionIntro/{index.f20cffae.js → index.49631fcb.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useModuleDictionary } from "@m4l/core";
|
|
2
|
-
import { B as Button } from "../../../mui_extended/Button/index.
|
|
2
|
+
import { B as Button } from "../../../mui_extended/Button/index.94fec33c.js";
|
|
3
3
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
|
|
4
|
-
import { u as useCommonActionsUtilityClasses } from "../Actions/index.
|
|
4
|
+
import { u as useCommonActionsUtilityClasses } from "../Actions/index.ccf731c1.js";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
const ACTIONINTRO_TEST_ID = "m4lactions";
|
|
7
7
|
const ActionIntro = (props) => {
|
|
@@ -1,45 +1,9 @@
|
|
|
1
1
|
import { T as TEST_PROP_ID } from "../../../../test/constants_no_mock.86c553a9.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { generateUtilityClasses } from "@mui/material";
|
|
4
3
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
|
-
import { g as getComponentUtilityClass } from "../../../../utils/index.
|
|
4
|
+
import { g as getComponentUtilityClass } from "../../../../utils/index.6469f148.js";
|
|
6
5
|
import { styled } from "@mui/material/styles";
|
|
7
|
-
import "
|
|
8
|
-
import "@mui/material/Button";
|
|
9
|
-
import "../../../mui_extended/Button/index.f79eb74e.js";
|
|
10
|
-
import "clsx";
|
|
11
|
-
import "react-hook-form";
|
|
12
|
-
import "react";
|
|
13
|
-
import "../../../../contexts/ModalContext/index.347f6738.js";
|
|
14
|
-
import "../../../../react-draggable.7abb5d0a.js";
|
|
15
|
-
import "../../../Resizeable/index.676c96fe.js";
|
|
16
|
-
import "@m4l/graphics";
|
|
17
|
-
import "../../../modal/index.b434146b.js";
|
|
18
|
-
import "@mui/lab";
|
|
19
|
-
import "../../../mui_extended/Typography/index.443590d6.js";
|
|
20
|
-
import "../../../Image/index.c18ebf5a.js";
|
|
21
|
-
import "../../../Icon/index.a70c4729.js";
|
|
22
|
-
import "../../../mui_extended/IconButton/index.76624519.js";
|
|
23
|
-
import "../../../mui_extended/Accordion/index.cdedddba.js";
|
|
24
|
-
import "../../../mui_extended/Avatar/index.75e6ed57.js";
|
|
25
|
-
import "react-router-dom";
|
|
26
|
-
import "../../../mui_extended/CheckBox.38abccd8.js";
|
|
27
|
-
import "../../../mui_extended/Badge/index.b09524fe.js";
|
|
28
|
-
import "../../../mui_extended/MenuActions/index.7669b8af.js";
|
|
29
|
-
import "../../../mui_extended/Popover/index.9f35d0eb.js";
|
|
30
|
-
import "../../../mui_extended/Stack/index.0e53197c.js";
|
|
31
|
-
import "../../../mui_extended/Tab/index.5f09e16a.js";
|
|
32
|
-
import "../../../mui_extended/Pager/index.ac2a21f0.js";
|
|
33
|
-
import "../../../mui_extended/Tooltip/index.5a795dcd.js";
|
|
34
|
-
import "zustand";
|
|
35
|
-
import "../../../areas/contexts/AreasContext/index.d528f6e7.js";
|
|
36
|
-
import "../../../areas/components/AreasAdmin/index.cd054608.js";
|
|
37
|
-
import "zustand/shallow";
|
|
38
|
-
import "../../../ScrollBar/index.65bb2930.js";
|
|
39
|
-
import "../../../areas/components/AreasViewer/index.62abf0bb.js";
|
|
40
|
-
import "../../../LinearProgressIndeterminate/index.60dabc06.js";
|
|
41
|
-
import "../../../areas/contexts/WindowToolsMFContext/index.8f3e2a04.js";
|
|
42
|
-
import "../../../areas/contexts/DynamicMFParmsContext/index.1607c78e.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
43
7
|
const componentName = "M4LCommonActions";
|
|
44
8
|
generateUtilityClasses(componentName, [
|
|
45
9
|
"root",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { ColumnConcatenatedValuesFormatterProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Función especial para el DataGrid que concatena un array de strings
|
|
5
5
|
* @param props
|
|
6
6
|
* @returns
|
|
7
7
|
*/
|
|
8
|
-
export declare function columnConcatenatedValuesFormatter(props: ColumnConcatenatedValuesFormatterProps): (obProps: any) =>
|
|
8
|
+
export declare function columnConcatenatedValuesFormatter(props: ColumnConcatenatedValuesFormatterProps): (obProps: any) => import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.
|
|
2
|
-
import { g as getPagerComponentsDictionary } from "../mui_extended/Pager/index.
|
|
1
|
+
import { g as getModalDialogComponentsDictionary } from "../ModalDialog/index.ec55087e.js";
|
|
2
|
+
import { g as getPagerComponentsDictionary } from "../mui_extended/Pager/index.de0bd62c.js";
|
|
3
3
|
import { styled } from "@mui/material/styles";
|
|
4
4
|
import { forwardRef, createContext, useState, useMemo, useEffect, useCallback, useContext, useRef, useLayoutEffect } from "react";
|
|
5
5
|
import { S as SELECT_COLUMN_KEY, u as useRowSelection, a as SelectCellFormatter, H as HeaderRenderer, D as DataGrid$1 } from "../../react-data-grid.d46d625e.js";
|
|
@@ -8,16 +8,13 @@ import { HTML5Backend } from "react-dnd-html5-backend";
|
|
|
8
8
|
import { SvgIcon, Checkbox, InputBase, Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { voidFunction, useModuleDictionary, useModuleSkeleton, getPropertyByString } from "@m4l/core";
|
|
11
|
-
import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.
|
|
11
|
+
import { A as ActionsColumn, a as Actions } from "./subcomponents/Actions/index.6b528d76.js";
|
|
12
12
|
import { unstable_composeClasses } from "@mui/base";
|
|
13
13
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
14
|
-
import { g as getNameDataTestId } from "../../vendor.
|
|
15
|
-
import { B as BooleanFormatter } from "../formatters/BooleanFormatter/index.
|
|
16
|
-
import "@m4l/graphics";
|
|
17
|
-
import "../Icon/index.a70c4729.js";
|
|
18
|
-
import "clsx";
|
|
14
|
+
import { g as getNameDataTestId } from "../../vendor.d0158973.js";
|
|
15
|
+
import { B as BooleanFormatter } from "../formatters/BooleanFormatter/index.a495c91e.js";
|
|
19
16
|
import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
|
|
20
|
-
import { C as ConcatenatedFormatter } from "../formatters/index.
|
|
17
|
+
import { C as ConcatenatedFormatter } from "../formatters/index.c4ce2c83.js";
|
|
21
18
|
const DataGridRoot = styled("div")(({
|
|
22
19
|
theme
|
|
23
20
|
}) => ({
|
|
@@ -682,11 +679,18 @@ const useSortColumnsRows = (sourceColumns, sourceRows) => {
|
|
|
682
679
|
const columnKey = entry[0];
|
|
683
680
|
const columnFilter = entry[1];
|
|
684
681
|
let valCell;
|
|
682
|
+
const valueMaybeString = getPropertyByString(r, columnKey);
|
|
683
|
+
let fixedValue;
|
|
684
|
+
if (typeof valueMaybeString === "string") {
|
|
685
|
+
fixedValue = valueMaybeString;
|
|
686
|
+
} else {
|
|
687
|
+
fixedValue = "";
|
|
688
|
+
}
|
|
685
689
|
try {
|
|
686
690
|
if (columnFilter.customFilter) {
|
|
687
691
|
valReturn = valReturn && columnFilter.customFilter(r, columnFilter.value);
|
|
688
692
|
} else {
|
|
689
|
-
valCell =
|
|
693
|
+
valCell = fixedValue;
|
|
690
694
|
valReturn = valReturn && valCell.includes(columnFilter.value);
|
|
691
695
|
}
|
|
692
696
|
} catch (error) {
|
|
@@ -832,6 +836,7 @@ const dataGridClasses = generateUtilityClasses(componentName, [
|
|
|
832
836
|
"skeletonFormatter",
|
|
833
837
|
"actionsFormatter",
|
|
834
838
|
"actionsConfigContainer",
|
|
839
|
+
"booleanFormatter",
|
|
835
840
|
"withActions"
|
|
836
841
|
]);
|
|
837
842
|
function getDataGridUtilityClass(slot) {
|
|
@@ -860,7 +865,8 @@ const dataGridUtilityClasses = (ownerState) => {
|
|
|
860
865
|
formatterColumn: ["formatterColumn"],
|
|
861
866
|
skeletonFormatter: ["skeletonFormatter"],
|
|
862
867
|
actionsFormatter: ["actionsFormatter"],
|
|
863
|
-
actionsConfigContainer: ["actionsConfigContainer"]
|
|
868
|
+
actionsConfigContainer: ["actionsConfigContainer"],
|
|
869
|
+
booleanFormatter: ["booleanFormatter"]
|
|
864
870
|
};
|
|
865
871
|
const composedClasses = unstable_composeClasses(slots, getDataGridUtilityClass, {});
|
|
866
872
|
return {
|
|
@@ -898,6 +904,7 @@ function DataGrid(props) {
|
|
|
898
904
|
onCheckedRowsChange,
|
|
899
905
|
dataTestId = ""
|
|
900
906
|
} = props;
|
|
907
|
+
console.log("test columns", columns);
|
|
901
908
|
const ownerState = {
|
|
902
909
|
actionsProps,
|
|
903
910
|
withActions
|
|
@@ -948,9 +955,16 @@ function columnBooleanFormatter(props) {
|
|
|
948
955
|
Component
|
|
949
956
|
} = props;
|
|
950
957
|
return (obProps) => {
|
|
958
|
+
const valueMaybeString = getPropertyByString(obProps, fieldValue);
|
|
959
|
+
let fixedValue;
|
|
960
|
+
if (typeof valueMaybeString === "boolean") {
|
|
961
|
+
fixedValue = valueMaybeString;
|
|
962
|
+
} else {
|
|
963
|
+
fixedValue = void 0;
|
|
964
|
+
}
|
|
951
965
|
return /* @__PURE__ */ jsx(BooleanFormatter, {
|
|
952
966
|
presentationType,
|
|
953
|
-
value:
|
|
967
|
+
value: fixedValue,
|
|
954
968
|
Component
|
|
955
969
|
});
|
|
956
970
|
};
|
|
@@ -962,9 +976,16 @@ function columnDateFormatter(props) {
|
|
|
962
976
|
Component
|
|
963
977
|
} = props;
|
|
964
978
|
return (obProps) => {
|
|
979
|
+
const valueMaybeDateStringNumber = getPropertyByString(obProps, fieldValue);
|
|
980
|
+
let fixedValue;
|
|
981
|
+
if (typeof valueMaybeDateStringNumber === "string" || typeof valueMaybeDateStringNumber === "number" || valueMaybeDateStringNumber instanceof Date) {
|
|
982
|
+
fixedValue = valueMaybeDateStringNumber;
|
|
983
|
+
} else {
|
|
984
|
+
fixedValue = "";
|
|
985
|
+
}
|
|
965
986
|
return /* @__PURE__ */ jsx(DateFormatter, {
|
|
966
987
|
presentationType,
|
|
967
|
-
value:
|
|
988
|
+
value: fixedValue,
|
|
968
989
|
Component
|
|
969
990
|
});
|
|
970
991
|
};
|
|
@@ -976,7 +997,16 @@ function columnConcatenatedValuesFormatter(props) {
|
|
|
976
997
|
Component
|
|
977
998
|
} = props;
|
|
978
999
|
return (obProps) => {
|
|
979
|
-
const values = fieldValue.map((element) =>
|
|
1000
|
+
const values = fieldValue.map((element) => {
|
|
1001
|
+
const valueMaybeString = getPropertyByString(obProps, element);
|
|
1002
|
+
let fixedValue;
|
|
1003
|
+
if (typeof valueMaybeString === "string" || typeof valueMaybeString === "number") {
|
|
1004
|
+
fixedValue = valueMaybeString;
|
|
1005
|
+
} else {
|
|
1006
|
+
fixedValue = "";
|
|
1007
|
+
}
|
|
1008
|
+
return fixedValue;
|
|
1009
|
+
});
|
|
980
1010
|
return /* @__PURE__ */ jsx(ConcatenatedFormatter, {
|
|
981
1011
|
values,
|
|
982
1012
|
separator: fieldSeparator,
|