@m4l/components 0.2.21 → 0.2.24
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 +15 -1
- package/components/AccountPopover/classes/index.d.ts +9 -0
- package/components/AccountPopover/classes/types.d.ts +10 -0
- package/components/AccountPopover/{index.b00671fa.js → index.505e278a.js} +1 -1
- package/components/AccountPopover/subcomponents/MyAvatar/index.d.ts +7 -0
- package/components/AccountPopover/subcomponents/MyAvatar/types.d.ts +12 -0
- package/components/AccountPopover/subcomponents/PopOver/index.d.ts +1 -0
- package/components/AccountPopover/subcomponents/PopOver/types.d.ts +15 -0
- package/components/AppBar/classes/index.d.ts +17 -0
- package/components/AppBar/{index.3a694645.js → index.7106417d.js} +2 -2
- package/components/AppBar/types.d.ts +6 -0
- package/components/CommonActions/components/ActionCancel/{index.bd595785.js → index.de862adf.js} +2 -2
- package/components/CommonActions/components/ActionFormCancel/{index.6fd990b7.js → index.3fd5c858.js} +4 -4
- package/components/CommonActions/components/ActionFormIntro/{index.798cb977.js → index.07394f62.js} +2 -2
- package/components/CommonActions/components/ActionIntro/{index.64498081.js → index.79fc2386.js} +2 -2
- package/components/CommonActions/components/Actions/{index.b8a1d42a.js → index.2f6286eb.js} +1 -1
- package/components/DataGrid/formatters/ColumnBooleanFormatter/{index.6faecd3c.js → index.36270dd1.js} +1 -1
- package/components/DataGrid/formatters/ColumnConcatenatedValueFormatter/{index.3cabb920.js → index.8b008692.js} +1 -1
- package/components/DataGrid/formatters/ColumnInteractiveCheckFormatter/{index.fd1bea19.js → index.cb308086.js} +1 -1
- package/components/DataGrid/{index.660a6e7b.js → index.b1eafce1.js} +3 -3
- package/components/DataGrid/subcomponents/Actions/{index.e07a52bf.js → index.9af87fa1.js} +10 -10
- package/components/DragResizeWindow/{index.7c402375.js → index.62b6a916.js} +3 -3
- package/components/DynamicFilter/{index.0d1fcfa7.js → index.b93e5649.js} +10 -10
- package/components/GridLayout/{index.88b62a5d.js → index.0996cd19.js} +2 -2
- package/components/GridLayout/subcomponents/Griditem/{index.5256b153.js → index.ded0e80e.js} +3 -3
- package/components/GridLayout/subcomponents/Responsive/{index.dfed4e68.js → index.0fd1b7f8.js} +1 -1
- package/components/GridLayout/subcomponents/SizeProvider/{index.6b5de802.js → index.7669a2cd.js} +1 -1
- package/components/HamburgerMenu/index.25029e23.js +82 -0
- package/components/Icon/{index.770f86ae.js → index.b920baf8.js} +1 -1
- package/components/Image/{index.6dd3b128.js → index.d034ca68.js} +9 -13
- package/components/LanguagePopover/{index.b7f2816d.js → index.e54c5cc7.js} +2 -2
- package/components/LinearProgressIndeterminate/LinearProgressIndeterminate.d.ts +4 -0
- package/components/LinearProgressIndeterminate/{index.32caeee2.js → index.a0ad2d9e.js} +1 -1
- package/components/Loadable/index.d.ts +5 -0
- package/components/LoadingError/LoadingError.d.ts +12 -0
- package/components/LoadingError/classes/index.d.ts +12 -0
- package/components/LoadingError/{index.3a86956f.js → index.123e16f8.js} +3 -3
- package/components/LoadingError/types.d.ts +7 -0
- package/components/MFLoader/MFLoader.d.ts +11 -0
- package/components/MFLoader/{index.544940c7.js → index.52096ea5.js} +1 -1
- package/components/MFLoader/types.d.ts +12 -0
- package/components/ModalDialog/{index.9ac45602.js → index.2e931b5f.js} +4 -4
- package/components/NoItemSelected/{index.08ec6c48.js → index.1024b856.js} +1 -1
- package/components/ObjectLogs/{index.0d263f80.js → index.d10f4a2f.js} +5 -5
- package/components/PDFViewer/{index.de51408a.js → index.98852f91.js} +1 -1
- package/components/Page/{index.09e28ba1.js → index.def863f2.js} +1 -1
- package/components/PaperForm/{index.130ce6ad.js → index.8a617a66.js} +1 -1
- package/components/Period/{index.3c7e8590.js → index.d80dff10.js} +2 -2
- package/components/PrintingSystem/{index.9dcfb35d.js → index.2e17cae5.js} +13 -13
- package/components/PrintingSystem/subcomponents/BodyNode/{index.a3897785.js → index.c5ffe20a.js} +1 -1
- package/components/PrintingSystem/subcomponents/ChartNode/{index.ecd5e809.js → index.020c037c.js} +25 -9
- package/components/PrintingSystem/subcomponents/DividerNode/{index.6e177f94.js → index.78b023bb.js} +1 -1
- package/components/PrintingSystem/subcomponents/FooterNode/{index.82f1e38f.js → index.b29fc1e9.js} +1 -1
- package/components/PrintingSystem/subcomponents/GridNode/{index.2b8fef69.js → index.11626284.js} +4 -2
- package/components/PrintingSystem/subcomponents/HeaderNode/{index.a5d48adf.js → index.ef44c8ab.js} +1 -1
- package/components/PrintingSystem/subcomponents/PaperNode/{index.a4c5c3e6.js → index.d72d224b.js} +1 -1
- package/components/PrintingSystem/subcomponents/PropertyValueNode/{index.3764b312.js → index.8e53440c.js} +1 -1
- package/components/PrintingSystem/subcomponents/SectionNode/{index.4941ecf4.js → index.0b66458e.js} +1 -1
- package/components/PrintingSystem/subcomponents/TextBoxNode/{index.9cc3b262.js → index.b4c72fef.js} +1 -1
- package/components/PropertyValue/{index.d975c7f3.js → index.3b6670d4.js} +1 -1
- package/components/Resizeable/{index.14ab4804.js → index.0eb66c37.js} +1 -1
- package/components/SideBar/SideBar.d.ts +55 -0
- package/components/SideBar/classes/types.d.ts +2 -0
- package/components/SideBar/context/sideBarContext/index.d.ts +10 -0
- package/components/SideBar/context/sideBarContext/types.d.ts +12 -0
- package/components/SideBar/hooks/useSideBar/index.d.ts +3 -0
- package/components/SideBar/{index.e55c9b7c.js → index.cdb70977.js} +29 -18
- package/components/SideBar/subcomponents/ContentDesktop/index.d.ts +4 -0
- package/components/SideBar/subcomponents/ContentDesktop/subcomponents/CollapseButton/index.d.ts +9 -0
- package/components/SideBar/subcomponents/ContentGroups/index.d.ts +4 -0
- package/components/SideBar/subcomponents/ContentGroups/subcomponents/ItemListRoot/index.d.ts +7 -0
- package/components/SideBar/subcomponents/ContentMobile/index.d.ts +4 -0
- package/components/SideBar/types.d.ts +32 -1
- package/components/SplitLayout/SplitLayout.d.ts +12 -0
- package/components/SplitLayout/classes/index.d.ts +7 -0
- package/components/SplitLayout/types.d.ts +9 -0
- package/components/ToastContainer/{index.b5f27f85.js → index.97fdba82.js} +3 -3
- package/components/animate/AnimatedScroll/animatedScroll.d.ts +5 -0
- package/components/animate/AnimatedScroll/types.d.ts +9 -0
- package/components/animate/IconButtonAnimate/index.d.ts +9 -0
- package/components/animate/IconButtonAnimate/types.d.ts +5 -0
- package/components/animate/LoadingScreen/index.d.ts +5 -0
- package/components/animate/LoadingScreen/types.d.ts +12 -0
- package/components/animate/MotionContainer/index.d.ts +20 -0
- package/components/animate/MotionLazyContainer/index.d.ts +8 -0
- package/components/animate/PropagateLoader/index.d.ts +5 -0
- package/components/animate/type.d.ts +32 -0
- package/components/areas/components/AreasAdmin/classes/index.d.ts +6 -0
- package/components/areas/components/AreasAdmin/classes/types.d.ts +30 -0
- package/components/areas/components/AreasAdmin/index.d.ts +6 -0
- package/components/areas/components/AreasAdmin/{index.c802bb2f.js → index.e4f0ccc1.js} +10 -10
- package/components/areas/components/AreasAdmin/subcomponents/AreaChip/index.d.ts +3 -0
- package/components/areas/components/AreasViewer/{index.214d8c7d.js → index.f87c63ca.js} +14 -14
- package/components/areas/contexts/AreasContext/{index.055ab6e2.js → index.3e3d8c62.js} +4 -4
- package/components/areas/contexts/DynamicMFParmsContext/index.d.ts +11 -0
- package/components/areas/contexts/DynamicMFParmsContext/store.d.ts +14 -0
- package/components/areas/contexts/DynamicMFParmsContext/types.d.ts +12 -0
- package/components/areas/contexts/WindowToolsMFContext/index.d.ts +14 -0
- package/components/areas/contexts/WindowToolsMFContext/types.d.ts +51 -0
- package/components/areas/hooks/useAreas/{index.5da0bc90.js → index.b18fe111.js} +1 -1
- package/components/areas/types.d.ts +80 -0
- package/components/commercial/AppBarCommercial/classes/constants.d.ts +1 -0
- package/components/commercial/AppBarCommercial/classes/index.d.ts +4 -0
- package/components/commercial/AppBarCommercial/classes/types.d.ts +6 -0
- package/components/commercial/AppBarCommercial/index.c5022fdd.js +30 -0
- package/components/commercial/AppBarCommercial/index.d.ts +2 -0
- package/components/commercial/AppBarCommercial/types.d.ts +4 -0
- package/components/commercial/HamburgerMenu/HamburgerMenu.d.ts +29 -0
- package/components/commercial/HamburgerMenu/classes/constants.d.ts +1 -0
- package/components/commercial/HamburgerMenu/classes/index.d.ts +7 -0
- package/components/commercial/HamburgerMenu/classes/type.d.ts +7 -0
- package/components/commercial/HamburgerMenu/index.d.ts +2 -0
- package/components/commercial/HamburgerMenu/test/constants.d.ts +1 -0
- package/components/commercial/HamburgerMenu/test/utils.d.ts +2 -0
- package/components/commercial/HamburgerMenu/types.d.ts +5 -0
- package/components/commercial/SectionCommercial/classes/constants.d.ts +1 -0
- package/components/commercial/SectionCommercial/classes/index.d.ts +5 -0
- package/components/commercial/SectionCommercial/classes/types.d.ts +9 -0
- package/components/commercial/SectionCommercial/index.d.ts +2 -0
- package/components/commercial/SectionCommercial/types.d.ts +9 -0
- package/components/commercial/TopBar/TopBar.d.ts +16 -0
- package/components/commercial/TopBar/classes/constants.d.ts +1 -0
- package/components/commercial/TopBar/classes/index.d.ts +12 -0
- package/components/commercial/TopBar/classes/types.d.ts +12 -0
- package/components/commercial/TopBar/component/ConteinItem/index.d.ts +5 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/index.d.ts +12 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/index.d.ts +2 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/subcomponents/ArrowIcon/types.d.ts +4 -0
- package/components/commercial/TopBar/component/ConteinItem/subcomponets/NavItem/types.d.ts +4 -0
- package/components/commercial/TopBar/context/index.d.ts +16 -0
- package/components/commercial/TopBar/context/type.d.ts +12 -0
- package/components/commercial/TopBar/hook/topBarContext/index.d.ts +5 -0
- package/components/commercial/TopBar/index.1a73fecb.js +275 -0
- package/components/commercial/TopBar/index.d.ts +1 -0
- package/components/commercial/TopBar/type.d.ts +7 -0
- package/components/commercial/TopBar/utils/isActive/index.d.ts +12 -0
- package/components/commercial/index.d.ts +4 -0
- package/components/formatters/BooleanFormatter/{index.7a463493.js → index.b3052107.js} +2 -2
- package/components/formatters/{index.648cf3b0.js → index.95cc337e.js} +1 -1
- package/components/hook-form/RHFAutocomplete/{index.d05ae217.js → index.cf399b24.js} +6 -2
- package/components/hook-form/RHFAutocompleteAsync/{index.699b8aaf.js → index.b2b75475.js} +1 -1
- package/components/hook-form/RHFColorPicker/{index.c069ef4d.js → index.48a1ee1b.js} +3 -3
- package/components/hook-form/RHFDateTime/{index.97bd36d7.js → index.5a673a96.js} +1 -1
- package/components/hook-form/RHFPeriod/{index.4e10efa3.js → index.4205c8ab.js} +1 -1
- package/components/hook-form/RHFTextField/{index.78934e84.js → index.fbb29ee1.js} +2 -2
- package/components/hook-form/RHFUpload/{index.7178a50b.js → index.05d7e2a7.js} +2 -2
- package/components/index.d.ts +1 -0
- package/components/modal/WindowBase/index.d.ts +5 -0
- package/components/modal/WindowBase/types.d.ts +4 -0
- package/components/modal/{WindowBase.14255209.js → WindowBase.998b8a38.js} +3 -3
- package/components/modal/WindowConfirm/index.d.ts +6 -0
- package/components/modal/WindowConfirm/types.d.ts +33 -0
- package/components/modal/{WindowConfirm.f79ee169.js → WindowConfirm.55ac3c8f.js} +23 -20
- package/components/mui_extended/Accordion/{index.fb6849e8.js → index.fb4eb664.js} +2 -2
- package/components/mui_extended/Button/Button.d.ts +1 -2
- package/components/mui_extended/Button/{index.928f05b7.js → index.e520bd15.js} +1 -1
- package/components/mui_extended/IconButton/{index.023c369f.js → index.9ea23f87.js} +1 -1
- package/components/mui_extended/MenuActions/{index.34293162.js → index.fa7c26a5.js} +2 -2
- package/components/mui_extended/Pager/{index.212ee603.js → index.0c703574.js} +1 -1
- package/components/mui_extended/ToggleButton/{index.cb0fb441.js → index.bcaea74b.js} +1 -1
- package/components/mui_extended/ToggleIconButton/{index.49390b68.js → index.131772d7.js} +1 -1
- package/contexts/ModalContext/{index.e8f5ad3e.js → index.978a412d.js} +1 -1
- package/hooks/useFormAddEdit/{index.5e748884.js → index.4caddd24.js} +2 -2
- package/hooks/useModal/{index.50b23c06.js → index.786a4439.js} +1 -1
- package/index.js +85 -76
- package/{node_modules.448153f1.js → node_modules.71622512.js} +1 -1
- package/package.json +1 -1
- package/{react-draggable.38b6012b.js → react-draggable.ee21cb7e.js} +1 -1
- package/{react-resizable.3cdda6a7.js → react-resizable.ee028152.js} +2 -2
- package/utils/index.d.ts +7 -5
- package/vendor.2c881bac.js +162 -0
- package/utils/getComponentUtilityClass.d.ts +0 -1
- package/utils/getPaletteColor.d.ts +0 -2
- package/utils/getThemeVariantColor.d.ts +0 -3
- package/utils/getTransformXY.d.ts +0 -4
- package/utils/isValidDate.d.ts +0 -1
- package/vendor.daffbfe5.js +0 -114
- package/utils/{index.79b6a2c1.js → index.de903261.js} +3 -3
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { LoadingErrorClassesType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Clases de utilidad para el componente de carga de error.
|
|
4
|
+
*/
|
|
2
5
|
export declare const loadingErrorClasses: LoadingErrorClassesType;
|
|
6
|
+
/**
|
|
7
|
+
* Obtiene la clase de utilidad para un slot específico del componente de carga de error.
|
|
8
|
+
* @param slot El slot para el que se desea obtener la clase de utilidad.
|
|
9
|
+
* @returns La clase de utilidad correspondiente al slot especificado.
|
|
10
|
+
*/
|
|
3
11
|
export declare function getLoadingErrorUtilityClass(slot: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Función para generar todas las clases de utilidad del componente de carga de error.
|
|
14
|
+
* @returns Un objeto que contiene todas las clases de utilidad generadas.
|
|
15
|
+
*/
|
|
4
16
|
export declare const loadingErrorUtilityClasses: () => {
|
|
5
17
|
root: string;
|
|
6
18
|
loadingErrorLoading: string;
|
|
@@ -3,10 +3,10 @@ import { I as ICONS } from "../areas/icons.8266ccc8.js";
|
|
|
3
3
|
import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
|
|
4
4
|
import { unstable_composeClasses } from "@mui/base";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.
|
|
7
|
-
import { I as Icon } from "../Icon/index.
|
|
6
|
+
import { L as LinearProgressIndeterminate } from "../LinearProgressIndeterminate/index.a0ad2d9e.js";
|
|
7
|
+
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
8
8
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
9
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
9
|
+
import { B as Button } from "../mui_extended/Button/index.e520bd15.js";
|
|
10
10
|
const componentName = "M4LoadingError";
|
|
11
11
|
generateUtilityClasses(componentName, [
|
|
12
12
|
"root",
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { AreaStatus, AreasStatus } from "../areas/contexts/AreasContext/types";
|
|
2
2
|
export interface AreasLoadingErrorProps {
|
|
3
|
+
/**Indica el estado actual del componente. Puede tener valores como 'error', 'cargando' u otros estados definidos por la aplicación. */
|
|
3
4
|
status: AreasStatus | AreaStatus;
|
|
5
|
+
/** Es una función que se ejecutará cuando se presione el botón de error.*/
|
|
4
6
|
action: () => void;
|
|
7
|
+
/**Es una cadena de texto que representa el título del mensaje de error. Este título se mostrará en el componente cuando ocurra un error. */
|
|
5
8
|
title?: string;
|
|
9
|
+
/**Es una cadena de texto que proporciona una descripción detallada del error. */
|
|
6
10
|
description?: string;
|
|
11
|
+
/** Es una cadena de texto que proporciona una recomendación sobre cómo manejar el error o qué acciones tomar para resolverlo. */
|
|
7
12
|
recommendation?: string;
|
|
13
|
+
/** Es una cadena de texto que proporciona un mensaje introductorio adicional. */
|
|
8
14
|
introMessage?: string;
|
|
15
|
+
/**Es una cadena de texto que representa la ruta o el identificador del ícono que se mostrará junto al mensaje de error. */
|
|
9
16
|
errorIcon?: string;
|
|
10
17
|
}
|
|
@@ -4,6 +4,17 @@ declare global {
|
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {Object} MFType - Tipo que representa la estructura de un microfrontend.
|
|
9
|
+
* @property {string} divContainerId - El ID del contenedor DIV del microfrontend.
|
|
10
|
+
* @property {string} scriptId - El ID del script del microfrontend.
|
|
11
|
+
* @property {string} moduleId - El ID del módulo del microfrontend.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Componente para cargar microfrontends de manera dinámica.
|
|
15
|
+
* @param {MFLoaderProps} props - Props del componente MFLoader.
|
|
16
|
+
* @returns {JSX.Element} - El componente MFLoader.
|
|
17
|
+
*/
|
|
7
18
|
export declare function MFLoader(props: MFLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
8
19
|
export declare namespace MFLoader {
|
|
9
20
|
var defaultProps: {
|
|
@@ -12,7 +12,7 @@ import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/mater
|
|
|
12
12
|
import { unstable_composeClasses } from "@mui/base";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { L as LinearProgress } from "../mui_extended/LinearProgress/index.c92b9ba9.js";
|
|
15
|
-
import { L as LoadingError } from "../LoadingError/index.
|
|
15
|
+
import { L as LoadingError } from "../LoadingError/index.123e16f8.js";
|
|
16
16
|
const componentName = "M4LMFLoader";
|
|
17
17
|
const mfLoaderClasses = generateUtilityClasses(componentName, [
|
|
18
18
|
"root",
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { DynamicMFStore, WindowToolsMF } from "../areas";
|
|
2
2
|
import { MFBaseProps } from "../areas/types";
|
|
3
|
+
/**
|
|
4
|
+
* Propiedades para el componente MFLoader, utilizado para cargar microfrontends de manera dinámica.
|
|
5
|
+
*/
|
|
3
6
|
export interface MFLoaderProps extends MFBaseProps {
|
|
7
|
+
/**
|
|
8
|
+
* Identificador único del módulo del microfrontend.
|
|
9
|
+
*/
|
|
4
10
|
moduleId: string;
|
|
11
|
+
/**
|
|
12
|
+
* Almacén dinámico para el microfrontend.
|
|
13
|
+
*/
|
|
5
14
|
dynamicMFStore?: DynamicMFStore;
|
|
15
|
+
/**
|
|
16
|
+
* Herramientas de ventana para el microfrontend.
|
|
17
|
+
*/
|
|
6
18
|
windowTools: WindowToolsMF;
|
|
7
19
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useTheme, Dialog, Paper } from "@mui/material";
|
|
2
|
-
import { c as cjs } from "../../react-draggable.
|
|
3
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
4
|
-
import { R as ResizeableWindow } from "../Resizeable/index.
|
|
2
|
+
import { c as cjs } from "../../react-draggable.ee21cb7e.js";
|
|
3
|
+
import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
|
|
4
|
+
import { R as ResizeableWindow } from "../Resizeable/index.0eb66c37.js";
|
|
5
5
|
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
6
6
|
import { m as modalUtilityClasses } from "../modal/index.61389369.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
-
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
8
|
+
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.2f6286eb.js";
|
|
9
9
|
const DragabblePaperComponent = (props) => {
|
|
10
10
|
return /* @__PURE__ */ jsx(cjs.exports, {
|
|
11
11
|
handle: ".m4l_draggable_handle",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEnvironment, useModuleDictionary, useModuleSkeleton } from "@m4l/core";
|
|
2
2
|
import { styled } from "@mui/material/styles";
|
|
3
|
-
import { I as Image } from "../Image/index.
|
|
3
|
+
import { I as Image } from "../Image/index.d034ca68.js";
|
|
4
4
|
import { generateUtilityClasses, generateUtilityClass, Skeleton } from "@mui/material";
|
|
5
5
|
import { useMemo } from "react";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback, useMemo } from "react";
|
|
2
2
|
import { useNetwork, useModuleDictionary, useEnvironment, usePaginate } from "@m4l/core";
|
|
3
3
|
import { styled } from "@mui/material/styles";
|
|
4
|
-
import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.
|
|
4
|
+
import { c as DataGrid, g as getDataGridComponentsDictionary } from "../DataGrid/index.b1eafce1.js";
|
|
5
5
|
import { D as DateFormatter } from "../formatters/DateFormatter/index.578a9f53.js";
|
|
6
6
|
import { Tooltip, IconButton } from "@mui/material";
|
|
7
7
|
import { useHostTheme, useResponsiveDesktop } from "@m4l/graphics";
|
|
8
8
|
import { R as ReactJson } from "../../react-json-view.5636414a.js";
|
|
9
9
|
import { S as ScrollBar } from "../ScrollBar/index.010f1b9d.js";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
-
import { u as useModal } from "../../hooks/useModal/index.
|
|
12
|
-
import { I as Icon } from "../Icon/index.
|
|
11
|
+
import { u as useModal } from "../../hooks/useModal/index.786a4439.js";
|
|
12
|
+
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
13
13
|
import { S as Stack } from "../mui_extended/Stack/index.0e53197c.js";
|
|
14
|
-
import { W as WindowBase } from "../modal/WindowBase.
|
|
15
|
-
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.
|
|
14
|
+
import { W as WindowBase } from "../modal/WindowBase.998b8a38.js";
|
|
15
|
+
import { D as DynamicFilter, g as getDynamicFilterComponentsDictionary } from "../DynamicFilter/index.b93e5649.js";
|
|
16
16
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
17
17
|
const Container = styled("div")(() => ({
|
|
18
18
|
height: "100%",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
-
import { B as Button } from "../mui_extended/Button/index.
|
|
4
|
+
import { B as Button } from "../mui_extended/Button/index.e520bd15.js";
|
|
5
5
|
const PDFVeiwerRoot = styled("div")(({ theme }) => ({
|
|
6
6
|
...theme.components?.M4LPDFViewer?.styleOverrides
|
|
7
7
|
}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, BaseProvider, useModuleSkeleton } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.
|
|
2
|
+
import { c as classes, g as getSize, F as FactoryRender } from "../PrintingSystem/index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import React__default from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
2
|
import { useModuleSkeleton } from "@m4l/core";
|
|
3
3
|
import { Skeleton, generateUtilityClasses, generateUtilityClass } from "@mui/material";
|
|
4
|
-
import { I as Icon } from "../Icon/index.
|
|
4
|
+
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
const PaperFormRoot = styled("div")(({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useModuleDictionary, useModuleSkeleton, useEnvironment } from "@m4l/core";
|
|
2
2
|
import { styled, generateUtilityClasses, generateUtilityClass, Autocomplete, TextField, Skeleton } from "@mui/material";
|
|
3
3
|
import { useMemo } from "react";
|
|
4
|
-
import { I as Icon } from "../Icon/index.
|
|
5
|
-
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.
|
|
4
|
+
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
5
|
+
import { g as getCommonActionsDictionary } from "../CommonActions/components/Actions/index.2f6286eb.js";
|
|
6
6
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
7
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
8
8
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { generateUtilityClasses } from "@mui/material";
|
|
2
2
|
import { unstable_composeClasses } from "@mui/base";
|
|
3
|
-
import { g as getComponentUtilityClass } from "../../utils/index.
|
|
3
|
+
import { g as getComponentUtilityClass } from "../../utils/index.de903261.js";
|
|
4
4
|
import { styled, useTheme } from "@mui/material/styles";
|
|
5
5
|
import clsx from "clsx";
|
|
6
|
-
import { D as DividerNode } from "./subcomponents/DividerNode/index.
|
|
7
|
-
import { S as SectionNode } from "./subcomponents/SectionNode/index.
|
|
8
|
-
import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.
|
|
9
|
-
import { H as HeaderNode } from "./subcomponents/HeaderNode/index.
|
|
10
|
-
import { a as ImageNode, Q as QRImageNode } from "../Image/index.
|
|
11
|
-
import { B as BodyNode } from "./subcomponents/BodyNode/index.
|
|
12
|
-
import { F as FooterNode } from "./subcomponents/FooterNode/index.
|
|
13
|
-
import { P as PaperNode } from "./subcomponents/PaperNode/index.
|
|
14
|
-
import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.
|
|
15
|
-
import { G as GridNode } from "./subcomponents/GridNode/index.
|
|
16
|
-
import { C as ChartNode } from "./subcomponents/ChartNode/index.
|
|
17
|
-
import { P as PagerNode, a as PageRender } from "../Page/index.
|
|
6
|
+
import { D as DividerNode } from "./subcomponents/DividerNode/index.78b023bb.js";
|
|
7
|
+
import { S as SectionNode } from "./subcomponents/SectionNode/index.0b66458e.js";
|
|
8
|
+
import { T as TextBoxNode } from "./subcomponents/TextBoxNode/index.b4c72fef.js";
|
|
9
|
+
import { H as HeaderNode } from "./subcomponents/HeaderNode/index.ef44c8ab.js";
|
|
10
|
+
import { a as ImageNode, Q as QRImageNode } from "../Image/index.d034ca68.js";
|
|
11
|
+
import { B as BodyNode } from "./subcomponents/BodyNode/index.c5ffe20a.js";
|
|
12
|
+
import { F as FooterNode } from "./subcomponents/FooterNode/index.b29fc1e9.js";
|
|
13
|
+
import { P as PaperNode } from "./subcomponents/PaperNode/index.d72d224b.js";
|
|
14
|
+
import { P as PropertyValueNode } from "./subcomponents/PropertyValueNode/index.8e53440c.js";
|
|
15
|
+
import { G as GridNode } from "./subcomponents/GridNode/index.11626284.js";
|
|
16
|
+
import { C as ChartNode } from "./subcomponents/ChartNode/index.020c037c.js";
|
|
17
|
+
import { P as PagerNode, a as PageRender } from "../Page/index.def863f2.js";
|
|
18
18
|
import { useBase, evaluateWithContext } from "@m4l/core";
|
|
19
19
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
20
20
|
import { forwardRef, useRef, useImperativeHandle } from "react";
|
package/components/PrintingSystem/subcomponents/BodyNode/{index.a3897785.js → index.c5ffe20a.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const BodyNode = (props) => {
|
package/components/PrintingSystem/subcomponents/ChartNode/{index.ecd5e809.js → index.020c037c.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as classes } from "../../index.
|
|
1
|
+
import { c as classes } from "../../index.2e17cae5.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { createRef, useEffect } from "react";
|
|
4
4
|
import { Chart, registerables } from "chart.js";
|
|
@@ -21,14 +21,29 @@ const ChartNode = (props) => {
|
|
|
21
21
|
} = useBase();
|
|
22
22
|
const pointsMaybeString = typeof points === "string" && regexPattern.exec(points) || "";
|
|
23
23
|
const formatPoints = typeof points === "string" ? getPropertyByString(sourceData, pointsMaybeString[1]) : points;
|
|
24
|
-
const
|
|
24
|
+
const adjustedPoints = [];
|
|
25
|
+
if (Array.isArray(formatPoints) && formatPoints.length > 0) {
|
|
26
|
+
formatPoints.forEach((point, index) => {
|
|
27
|
+
adjustedPoints.push(point);
|
|
28
|
+
if (index < formatPoints.length - 1) {
|
|
29
|
+
const nextPoint = formatPoints[index + 1];
|
|
30
|
+
const step = 0.5;
|
|
31
|
+
for (let x = point.avg + step; x < nextPoint.avg; x += step) {
|
|
32
|
+
adjustedPoints.push({
|
|
33
|
+
avg: x,
|
|
34
|
+
correction: null,
|
|
35
|
+
uncertainty: null
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
const data = Array.isArray(adjustedPoints) && adjustedPoints.length > 0 ? adjustedPoints.map((point) => {
|
|
25
42
|
return {
|
|
26
|
-
x:
|
|
27
|
-
xMin: 0,
|
|
28
|
-
xMax: 0,
|
|
43
|
+
x: point.avg,
|
|
29
44
|
y: point.correction,
|
|
30
|
-
yMin: point.correction - point.uncertainty,
|
|
31
|
-
yMax: point.correction + point.uncertainty
|
|
45
|
+
yMin: point.correction !== null && point.uncertainty !== null ? point.correction - point.uncertainty : 0,
|
|
46
|
+
yMax: point.correction !== null && point.uncertainty !== null ? point.correction + point.uncertainty : 0
|
|
32
47
|
};
|
|
33
48
|
}) : [];
|
|
34
49
|
useEffect(() => {
|
|
@@ -38,7 +53,7 @@ const ChartNode = (props) => {
|
|
|
38
53
|
if (ctx != null) {
|
|
39
54
|
new LineWithErrorBarsChart(ctx, {
|
|
40
55
|
data: {
|
|
41
|
-
labels: Array.isArray(
|
|
56
|
+
labels: Array.isArray(adjustedPoints) && adjustedPoints.length > 0 ? adjustedPoints.map((point) => point.avg) : [],
|
|
42
57
|
datasets: [{
|
|
43
58
|
data,
|
|
44
59
|
borderWidth: 0,
|
|
@@ -62,7 +77,8 @@ const ChartNode = (props) => {
|
|
|
62
77
|
title: {
|
|
63
78
|
display: true,
|
|
64
79
|
text: evaluateWithContext(sourceData, messageX)
|
|
65
|
-
}
|
|
80
|
+
},
|
|
81
|
+
beginAtZero: false
|
|
66
82
|
},
|
|
67
83
|
y: {
|
|
68
84
|
title: {
|
package/components/PrintingSystem/subcomponents/FooterNode/{index.82f1e38f.js → index.b29fc1e9.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const FooterNode = (props) => {
|
package/components/PrintingSystem/subcomponents/GridNode/{index.2b8fef69.js → index.11626284.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, getPropertyByString, evaluateWithContext } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
5
|
const GridNode = (props) => {
|
|
@@ -54,7 +54,9 @@ const GridNode = (props) => {
|
|
|
54
54
|
minWidth: getSize(dataColumns[id].width || "auto", unitSize),
|
|
55
55
|
justifyContent: cell.alignX ? cell.alignX : "center"
|
|
56
56
|
},
|
|
57
|
-
children: isNested ?
|
|
57
|
+
children: isNested ? evaluateWithContext({
|
|
58
|
+
row
|
|
59
|
+
}, dataColumns[id].nestedValue || "") : row[dataColumns[id].key]
|
|
58
60
|
}, `td-${Math.random().toString(36).substring(7)}`);
|
|
59
61
|
})
|
|
60
62
|
}, `tr-${Math.random().toString(36).substring(7)}`);
|
package/components/PrintingSystem/subcomponents/HeaderNode/{index.a5d48adf.js → index.ef44c8ab.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const HeaderNode = (props) => {
|
package/components/PrintingSystem/subcomponents/PaperNode/{index.a4c5c3e6.js → index.d72d224b.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, evaluateWithContext } from "@m4l/core";
|
|
2
|
-
import { c as classes } from "../../index.
|
|
2
|
+
import { c as classes } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
5
|
const PaperNode = (props) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, evaluateWithContext } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
5
|
const PropertyValueNode = (props) => {
|
package/components/PrintingSystem/subcomponents/SectionNode/{index.4941ecf4.js → index.0b66458e.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase } from "@m4l/core";
|
|
2
|
-
import { c as classes, g as getSize } from "../../index.
|
|
2
|
+
import { c as classes, g as getSize } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const SectionNode = (props) => {
|
package/components/PrintingSystem/subcomponents/TextBoxNode/{index.9cc3b262.js → index.b4c72fef.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useBase, evaluateWithContext } from "@m4l/core";
|
|
2
|
-
import { c as classes } from "../../index.
|
|
2
|
+
import { c as classes } from "../../index.2e17cae5.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const TextBoxNode = (props) => {
|
|
@@ -7,7 +7,7 @@ import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
|
7
7
|
import { g as getNameDataTestId } from "../../test/getNameDataTestId.14875ec7.js";
|
|
8
8
|
import { useState } from "react";
|
|
9
9
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
10
|
-
import { I as Icon } from "../Icon/index.
|
|
10
|
+
import { I as Icon } from "../Icon/index.b920baf8.js";
|
|
11
11
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
12
12
|
const PropertyValueRoot = styled("div")(({
|
|
13
13
|
theme
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import { a as ResizableBox } from "../../react-resizable.
|
|
2
|
+
import { a as ResizableBox } from "../../react-resizable.ee028152.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
const WrapperResizeable = styled(ResizableBox)(({
|
|
5
5
|
theme
|
|
@@ -1,2 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Este módulo representa una barra lateral.
|
|
3
|
+
* @module SideBar
|
|
4
|
+
*/
|
|
1
5
|
import { SideBarProps } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Propiedades para el componente SideBar.
|
|
8
|
+
* @typedef {Object} SideBarProps
|
|
9
|
+
* @param {SideBarProps} props
|
|
10
|
+
* @property {boolean} collapsed - Indica si la barra lateral está colapsada.
|
|
11
|
+
* @property {boolean} visible - Indica si la barra lateral está visible.
|
|
12
|
+
* @property {function} onToggleCollapse - Función para alternar el estado colapsado de la barra lateral.
|
|
13
|
+
* @property {function} onToggleVisible - Función para alternar la visibilidad de la barra lateral.
|
|
14
|
+
* @property {Array} menuData - Datos del menú de la barra lateral.
|
|
15
|
+
* @property {function} onClick - Función manejadora del clic en un elemento de la barra lateral.
|
|
16
|
+
* @property {string} companyLogoNormalUrl - URL del logotipo de la empresa en tamaño normal.
|
|
17
|
+
* @property {string} companyLogoSmallUrl - URL del logotipo de la empresa en tamaño reducido.
|
|
18
|
+
* @property {function} isItemActive - Función para determinar si un elemento de la barra lateral está activo.
|
|
19
|
+
* @property {string} collapsedWidht - Ancho de la barra lateral cuando está colapsada (valor por defecto: '280px').
|
|
20
|
+
* @property {string} unCollapsedWidht - Ancho de la barra lateral cuando no está colapsada (valor por defecto: '52px').
|
|
21
|
+
* @property {string} companyName - Nombre de la empresa.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {SideBarProps} props - Propiedades del componente.
|
|
26
|
+
* @param {boolean} props.collapsed - Valor para abrir o cerrar la ventana del componente
|
|
27
|
+
* @param {boolean} props.visible - Valor para cambiar a modo movile para resolucion de 600px
|
|
28
|
+
* @param {VoidFunction} props.onToggleCollapse - Funcion para hacer el cambio de Valor de collapsed
|
|
29
|
+
* @param {VoidFunction} props.onToggleVisible - Funcion para hacer el cambio de Valor de visible
|
|
30
|
+
* @param {Array<MenuDataType>} props.menuData - Datos llenar el SideBar
|
|
31
|
+
* @param {Function} props.onClick - Manejador para hacer clic en el componente.
|
|
32
|
+
* @param {string} props.companyLogoNormalUrl - Renderiza logo o imagen entamaño normal.
|
|
33
|
+
* @param {string} props.companyLogoSmallUrl - Renderiza logo o imagen entamaño pequeño.
|
|
34
|
+
* @param {Function} props.isItemActive - Funcion para abrir item de la prop MenuData.
|
|
35
|
+
* @param {string} props.collapsedWidht - Valor que le puedes dar al tamaño de width cuando esta colapsado.
|
|
36
|
+
* @param {string} props.unCollapsedWidht - Valor que le puedes dar al tamaño de width cuando esta no esta colapsado.
|
|
37
|
+
* @param {string} props.companyName - Nombre que se le puede dar para llenar los campo de texto de la compañía.
|
|
38
|
+
*
|
|
39
|
+
*
|
|
40
|
+
* @returns - Elemento JSX que muestra el menu de navegación.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
*
|
|
44
|
+
*<SideBar
|
|
45
|
+
collapsed={false}
|
|
46
|
+
visible={true}
|
|
47
|
+
onToggleCollapse={() => {}}
|
|
48
|
+
onToggleVisible={() => {}}
|
|
49
|
+
menuData={[]}
|
|
50
|
+
onClick={() => {}}
|
|
51
|
+
companyLogoNormalUrl={''}
|
|
52
|
+
companyLogoSmallUrl={''}
|
|
53
|
+
isItemActive={(_item: MenuDataType) => false}
|
|
54
|
+
companyName=""
|
|
55
|
+
/>
|
|
56
|
+
*/
|
|
2
57
|
export declare const SideBar: (props: SideBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SideBarProviderProps, SideBarProviderValue } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Representa el contexto para el componente Sidebar.
|
|
5
|
+
* Establece un contexto llamado SideBarContext con un valor inicial initialState,
|
|
6
|
+
* que puede ser utilizado por los componentes dentro del árbol de componentes para acceder a datos específicos del sidebar sin necesidad de pasar props manualmente.
|
|
7
|
+
*/
|
|
3
8
|
declare const SideBarContext: import("react").Context<SideBarProviderValue>;
|
|
9
|
+
/**
|
|
10
|
+
* Componente que actúa como proveedor de contexto para el componente Sidebar y sus elementos secundarios.
|
|
11
|
+
* @param props Las propiedades para el proveedor del contexto Sidebar.
|
|
12
|
+
* @returns El proveedor de contexto Sidebar.
|
|
13
|
+
*/
|
|
4
14
|
declare const SideBarProvider: (props: SideBarProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
15
|
export { SideBarProvider, SideBarContext };
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Classes, SideBarProps } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Valor proporcionado por el proveedor del contexto Sidebar.
|
|
5
|
+
* @extends SideBarProps
|
|
6
|
+
*/
|
|
3
7
|
export interface SideBarProviderValue extends SideBarProps {
|
|
8
|
+
/**
|
|
9
|
+
* Las clases asociadas al proveedor del contexto Sidebar.
|
|
10
|
+
*/
|
|
4
11
|
classes: Classes;
|
|
5
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Propiedades para el proveedor del contexto Sidebar.
|
|
15
|
+
*/
|
|
6
16
|
export interface SideBarProviderProps {
|
|
17
|
+
/** value contendrá el valor que se proporcionará en el contexto*/
|
|
7
18
|
value: SideBarProviderValue;
|
|
19
|
+
/** children contendrá los elementos secundarios que estarán dentro del ámbito del proveedor del contexto.*/
|
|
8
20
|
children: ReactNode;
|
|
9
21
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
2
1
|
import { styled, alpha } from "@mui/material/styles";
|
|
3
2
|
import { styled as styled$1, generateUtilityClasses, ListItemText, Tooltip, ListItemButton, Collapse, useTheme, Skeleton, Drawer as Drawer$1 } from "@mui/material";
|
|
4
3
|
import { useEnvironment, useBase, BaseProvider } from "@m4l/core";
|
|
5
4
|
import { createContext, useContext, useState, useEffect } from "react";
|
|
6
5
|
import { unstable_composeClasses } from "@mui/base";
|
|
7
|
-
import { g as getComponentUtilityClass } from "../../utils/index.
|
|
6
|
+
import { g as getComponentUtilityClass } from "../../utils/index.de903261.js";
|
|
8
7
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
9
8
|
import { T as TEST_PROP_ID } from "../../test/constants_no_mock.86c553a9.js";
|
|
10
|
-
import { I as Image } from "../Image/index.
|
|
11
|
-
import { I as IconButton } from "../mui_extended/IconButton/index.
|
|
12
|
-
import {
|
|
9
|
+
import { I as Image } from "../Image/index.d034ca68.js";
|
|
10
|
+
import { I as IconButton } from "../mui_extended/IconButton/index.9ea23f87.js";
|
|
11
|
+
import { useResponsiveDesktop } from "@m4l/graphics";
|
|
12
|
+
import { I as Icon, A as ArrowIcon } from "../Icon/index.b920baf8.js";
|
|
13
13
|
import { T as Typography } from "../mui_extended/Typography/index.379dd374.js";
|
|
14
14
|
import clsx from "clsx";
|
|
15
15
|
import { useLocation } from "react-router-dom";
|
|
16
16
|
import { P as Popover } from "../mui_extended/Popover/index.b3eca6b1.js";
|
|
17
17
|
import { S as ScrollBar } from "../ScrollBar/index.010f1b9d.js";
|
|
18
|
+
import { useResponsive } from "@m4l/styles";
|
|
18
19
|
const SideBarRoot = styled("div")(({
|
|
19
20
|
theme
|
|
20
21
|
}) => ({
|
|
@@ -101,12 +102,14 @@ generateUtilityClasses(
|
|
|
101
102
|
"collapsed",
|
|
102
103
|
"visible",
|
|
103
104
|
"subItemActive",
|
|
104
|
-
"itemMainActive"
|
|
105
|
+
"itemMainActive",
|
|
106
|
+
"variantDefault",
|
|
107
|
+
"variantComercial"
|
|
105
108
|
]
|
|
106
109
|
);
|
|
107
110
|
const getSideBarClassesByState = (ownerState) => {
|
|
108
111
|
const slots = {
|
|
109
|
-
root: ["root", ownerState.collapsed && "collapsed", ownerState.visible && "visible"],
|
|
112
|
+
root: ["root", ownerState.collapsed && "collapsed", ownerState.visible && "visible", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"],
|
|
110
113
|
containerSideBarLogo: ["containerSideBarLogo"],
|
|
111
114
|
contentDesktop: ["contentDesktop"],
|
|
112
115
|
contentMobile: ["contentMobile"],
|
|
@@ -137,8 +140,8 @@ const getSideBarClassesByState = (ownerState) => {
|
|
|
137
140
|
collapseButtontriangleBottom: ["collapseButtontriangleBottom"],
|
|
138
141
|
subItemCollapseActive: ["subItemCollapseActive"],
|
|
139
142
|
contentGroupsLine: ["contentGroupsLine"],
|
|
140
|
-
drawer: ["drawer"],
|
|
141
|
-
popover: ["popover"]
|
|
143
|
+
drawer: ["drawer", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"],
|
|
144
|
+
popover: ["popover", ownerState.variantStyle === "variantDefault" && "variantDefault", ownerState.variantStyle === "variantComercial" && "variantComercial"]
|
|
142
145
|
};
|
|
143
146
|
const composedClasses = unstable_composeClasses(slots, getComponentUtilityClass(componentName), {});
|
|
144
147
|
return {
|
|
@@ -225,6 +228,9 @@ function CollapseButton(props) {
|
|
|
225
228
|
classes,
|
|
226
229
|
companyLogoNormalUrl
|
|
227
230
|
} = useSideBar$1();
|
|
231
|
+
const handleButtonClick = () => {
|
|
232
|
+
onToggleCollapse();
|
|
233
|
+
};
|
|
228
234
|
return /* @__PURE__ */ jsxs(CollapseButtonRoot, {
|
|
229
235
|
className: classes.collapseButton,
|
|
230
236
|
...process.env.NODE_ENV !== "production" ? {
|
|
@@ -243,10 +249,13 @@ function CollapseButton(props) {
|
|
|
243
249
|
style: {
|
|
244
250
|
transform: `rotate(${collapsed ? 0 : 180}deg)`
|
|
245
251
|
},
|
|
246
|
-
children: /* @__PURE__ */ jsx(
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
252
|
+
children: /* @__PURE__ */ jsx(
|
|
253
|
+
IconButton,
|
|
254
|
+
{
|
|
255
|
+
onClick: handleButtonClick,
|
|
256
|
+
src: `${host_static_assets}/${environment_assets}/frontend/components/sidebar/assets/icons/arrow_right.svg`
|
|
257
|
+
}
|
|
258
|
+
)
|
|
250
259
|
})]
|
|
251
260
|
});
|
|
252
261
|
}
|
|
@@ -469,7 +478,7 @@ const NavSubItemContent = (props) => {
|
|
|
469
478
|
...process.env.NODE_ENV !== "production" ? {
|
|
470
479
|
[TEST_PROP_ID]: getNameDataTestId("navSubItemContentRoot")
|
|
471
480
|
} : {},
|
|
472
|
-
children: [/* @__PURE__ */ jsx(Icon, {
|
|
481
|
+
children: [icon_url && /* @__PURE__ */ jsx(Icon, {
|
|
473
482
|
src: `${host_static_assets}/${environment_assets}/frontend/domain/microfrontends/${icon_url}`
|
|
474
483
|
}), /* @__PURE__ */ jsx(Typography, {
|
|
475
484
|
variant: "body",
|
|
@@ -1035,12 +1044,14 @@ const SideBar = (props) => {
|
|
|
1035
1044
|
isItemActive,
|
|
1036
1045
|
collapsedWidht = "280px",
|
|
1037
1046
|
unCollapsedWidht = "52px",
|
|
1038
|
-
companyName
|
|
1047
|
+
companyName,
|
|
1048
|
+
variantStyle = "variantDefault"
|
|
1039
1049
|
} = props;
|
|
1040
|
-
const
|
|
1050
|
+
const isMobile = useResponsive("down", "md");
|
|
1041
1051
|
const ownerState = {
|
|
1042
1052
|
collapsed,
|
|
1043
|
-
visible
|
|
1053
|
+
visible,
|
|
1054
|
+
variantStyle
|
|
1044
1055
|
};
|
|
1045
1056
|
const classes = getSideBarClassesByState(ownerState);
|
|
1046
1057
|
return /* @__PURE__ */ jsx(SideBarRoot, {
|
|
@@ -1068,7 +1079,7 @@ const SideBar = (props) => {
|
|
|
1068
1079
|
className: classes.wrapperSideBar,
|
|
1069
1080
|
width: !collapsed ? collapsedWidht : unCollapsedWidht,
|
|
1070
1081
|
visible,
|
|
1071
|
-
children:
|
|
1082
|
+
children: !isMobile ? /* @__PURE__ */ jsx(ContentDesktop, {}) : /* @__PURE__ */ jsx(ContentMobile, {})
|
|
1072
1083
|
})
|
|
1073
1084
|
})
|
|
1074
1085
|
});
|