@m4l/layouts 9.3.12 → 9.3.13-JAEBeta.0
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/.storybook/utils/getStylesColorsByMode.d.ts +4 -0
- package/@types/types.d.ts +15 -12
- package/components/MFHostApp/MFHostApp.js +5 -2
- package/components/MFHostApp/constants.d.ts +1 -0
- package/components/MFHostApp/constants.js +4 -0
- package/components/MFHostApp/slots/MFHostAppSlots.d.ts +3 -0
- package/components/MFHostApp/slots/MFHostAppSlots.js +11 -0
- package/components/MFHostApp/slots/MFHostAppSlotsEnum.d.ts +3 -0
- package/components/MFHostApp/slots/MFHostAppSlotsEnum.js +7 -0
- package/components/MFHostApp/styles.d.ts +2 -0
- package/components/MFHostApp/styles.js +15 -0
- package/components/MFHostApp/types.d.ts +17 -1
- package/hooks/useNetworkActionConfirm/useNetworkActionConfirm.js +3 -1
- package/index.js +4 -5
- package/layouts/MasterDetailLayout/MasterDetailLayout.js +1 -1
- package/layouts/ModuleLayout/ModuleLayout.js +3 -3
- package/layouts/ModuleLayout/dicctionary.js +0 -4
- package/layouts/ModuleLayout/index.d.ts +2 -1
- package/layouts/ModuleLayout/index.js +1 -0
- package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.d.ts +2 -2
- package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.js +3 -3
- package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/types.d.ts +3 -2
- package/layouts/ModuleLayout/types.d.ts +8 -5
- package/layouts/index.d.ts +1 -2
- package/package.json +1 -1
- package/utils/createAppMF.d.ts +4 -1
- package/utils/createAppMF.js +2 -2
|
@@ -73,6 +73,7 @@ export declare const colorsLight: {
|
|
|
73
73
|
readonly candy: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
74
74
|
readonly persianGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
75
75
|
readonly aqua: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
76
|
+
readonly sheetGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
76
77
|
readonly disabled: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
77
78
|
readonly primary: {
|
|
78
79
|
readonly outlined: {
|
|
@@ -277,6 +278,7 @@ export declare const colorsLight: {
|
|
|
277
278
|
readonly candy: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
278
279
|
readonly persianGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
279
280
|
readonly aqua: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
281
|
+
readonly sheetGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
280
282
|
readonly disabled: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
281
283
|
readonly primary: {
|
|
282
284
|
readonly outlined: {
|
|
@@ -482,6 +484,7 @@ export declare const colorsDark: {
|
|
|
482
484
|
readonly candy: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
483
485
|
readonly persianGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
484
486
|
readonly aqua: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
487
|
+
readonly sheetGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
485
488
|
readonly disabled: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
486
489
|
readonly primary: {
|
|
487
490
|
readonly outlined: {
|
|
@@ -686,6 +689,7 @@ export declare const colorsDark: {
|
|
|
686
689
|
readonly candy: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
687
690
|
readonly persianGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
688
691
|
readonly aqua: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
692
|
+
readonly sheetGreen: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
689
693
|
readonly disabled: Record<import('@m4l/styles').ChipColorVariant, import('@m4l/styles').ChipColor>;
|
|
690
694
|
readonly primary: {
|
|
691
695
|
readonly outlined: {
|
package/@types/types.d.ts
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { MFHostAppOwnerState, MFHostAppSlotsType } from '../components/MFHostApp/types';
|
|
2
|
+
import { ComponentsOverrides, ComponentsVariants } from '@mui/material/styles';
|
|
3
|
+
import { Theme } from '@mui/material/styles';
|
|
4
|
+
import { MF_HOST_APP_KEY } from '../components/MFHostApp/constants';
|
|
5
|
+
|
|
6
|
+
declare module '@mui/material/styles' {
|
|
4
7
|
// Define the slots in the theme
|
|
5
8
|
interface ComponentNameToClassKey {
|
|
6
|
-
|
|
7
|
-
}
|
|
9
|
+
[MF_HOST_APP_KEY]: MFHostAppSlotsType;
|
|
8
10
|
|
|
11
|
+
}
|
|
9
12
|
interface ComponentsPropsList {
|
|
10
|
-
|
|
13
|
+
[MF_HOST_APP_KEY]: Partial<MFHostAppOwnerState>;
|
|
11
14
|
}
|
|
12
|
-
|
|
13
15
|
interface Components {
|
|
14
|
-
|
|
15
|
-
defaultProps?: ComponentsPropsList[
|
|
16
|
-
styleOverrides?: ComponentsOverrides<Theme>[
|
|
17
|
-
variants?: ComponentsVariants[
|
|
16
|
+
[MF_HOST_APP_KEY]?: {
|
|
17
|
+
defaultProps?: ComponentsPropsList[MF_HOST_APP_KEY];
|
|
18
|
+
styleOverrides?: ComponentsOverrides<Theme>[MF_HOST_APP_KEY];
|
|
19
|
+
variants?: ComponentsVariants[MF_HOST_APP_KEY];
|
|
18
20
|
};
|
|
21
|
+
|
|
19
22
|
}
|
|
20
|
-
}
|
|
23
|
+
}
|
|
@@ -3,6 +3,7 @@ import { unstable_HistoryRouter } from "react-router-dom";
|
|
|
3
3
|
import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
|
|
4
4
|
import { DeviceTypeProvider, LocalesProvider, HostThemeProvider, FormatterProvider } from "@m4l/graphics";
|
|
5
5
|
import { BaseModule, WindowToolsMFProvider, DynamicMFParmsProvider, AppearanceComponentProvider } from "@m4l/components";
|
|
6
|
+
import { M as MFHostAppContainerStyled } from "./slots/MFHostAppSlots.js";
|
|
6
7
|
function MFHostApp(props) {
|
|
7
8
|
const {
|
|
8
9
|
children,
|
|
@@ -19,7 +20,9 @@ function MFHostApp(props) {
|
|
|
19
20
|
privileges,
|
|
20
21
|
componentsDictionary,
|
|
21
22
|
dynamicMFStore,
|
|
22
|
-
windowTools
|
|
23
|
+
windowTools,
|
|
24
|
+
emergeType = "layout",
|
|
25
|
+
overrideContainerStyles
|
|
23
26
|
} = props;
|
|
24
27
|
return /* @__PURE__ */ jsx(EnvironmentProvider, { ...environment, children: /* @__PURE__ */ jsx(HostToolsProvider, { ...hostTools, children: /* @__PURE__ */ jsx(NetworkProvider, { axiosOperation, children: /* @__PURE__ */ jsx(DeviceTypeProvider, { children: /* @__PURE__ */ jsx(LocalesProvider, { isMicroFrontEnd: true, localeHost: currentLocale, children: /* @__PURE__ */ jsx(
|
|
25
28
|
HostThemeProvider,
|
|
@@ -44,7 +47,7 @@ function MFHostApp(props) {
|
|
|
44
47
|
componentsDictionary,
|
|
45
48
|
skeletonFlags,
|
|
46
49
|
privileges,
|
|
47
|
-
children: /* @__PURE__ */ jsx(FormatterProvider, { isMicroFrontEnd: true, ...formatters, children: /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(AppearanceComponentProvider, { children }) }) }) })
|
|
50
|
+
children: /* @__PURE__ */ jsx(FormatterProvider, { isMicroFrontEnd: true, ...formatters, children: /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(AppearanceComponentProvider, { children: /* @__PURE__ */ jsx(MFHostAppContainerStyled, { ownerState: { emergeType }, style: overrideContainerStyles, children }) }) }) }) })
|
|
48
51
|
}
|
|
49
52
|
)
|
|
50
53
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MF_HOST_APP_KEY = "MFHostApp";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const MFHostAppContainerStyled: import('@emotion/styled').StyledComponent<import('@mui/system').MUIStyledCommonProps<import('@mui/material/styles').Theme> & Record<string, unknown> & {
|
|
2
|
+
ownerState?: (Partial<import('../types').MFHostAppOwnerState> & Record<string, unknown>) | undefined;
|
|
3
|
+
}, Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof import('react').ClassAttributes<HTMLDivElement> | keyof import('react').HTMLAttributes<HTMLDivElement>>, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { styled } from "@mui/material/styles";
|
|
2
|
+
import { M as MF_HOST_APP_KEY } from "../constants.js";
|
|
3
|
+
import { M as MFHostAppSlots } from "./MFHostAppSlotsEnum.js";
|
|
4
|
+
import { m as mfHostAppStyles } from "../styles.js";
|
|
5
|
+
const MFHostAppContainerStyled = styled("div", {
|
|
6
|
+
name: MF_HOST_APP_KEY,
|
|
7
|
+
slot: MFHostAppSlots.container
|
|
8
|
+
})(mfHostAppStyles.container);
|
|
9
|
+
export {
|
|
10
|
+
MFHostAppContainerStyled as M
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const mfHostAppStyles = {
|
|
2
|
+
/**
|
|
3
|
+
* Estilos para el componente BaseModuleLayout.
|
|
4
|
+
*/
|
|
5
|
+
container: ({ theme, ownerState }) => ({
|
|
6
|
+
padding: ownerState?.emergeType === "layout" ? theme.vars.size?.baseSpacings?.sp5 : theme.vars.size?.baseSpacings?.sp4,
|
|
7
|
+
display: "flex",
|
|
8
|
+
width: "100%",
|
|
9
|
+
height: "100%",
|
|
10
|
+
overflow: "auto"
|
|
11
|
+
})
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
mfHostAppStyles as m
|
|
15
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
|
|
2
2
|
import { Formatters, LocaleType, HostThemeType } from '@m4l/graphics';
|
|
3
|
-
import { DynamicMFStore, WindowToolsMF, BaseModuleProps } from '@m4l/components';
|
|
3
|
+
import { DynamicMFStore, WindowToolsMF, BaseModuleProps, EmergeType, M4LOverridesStyleRules } from '@m4l/components';
|
|
4
|
+
import { MFHostAppSlots } from './slots/MFHostAppSlotsEnum';
|
|
5
|
+
import { MF_HOST_APP_KEY } from './constants';
|
|
6
|
+
import { Theme } from '@mui/material/styles';
|
|
4
7
|
export interface ByHostProps {
|
|
5
8
|
environment: EnvironmentType;
|
|
6
9
|
hostTools: HostToolsType;
|
|
@@ -20,5 +23,18 @@ export interface ByHostProps {
|
|
|
20
23
|
* @deprecated no usar, no tiene efecto. utilizar el hook useMFWindowsTitle
|
|
21
24
|
*/
|
|
22
25
|
isAddEditModule?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Estilos para el contenedor de la aplicación, que es el content del WindowBase.
|
|
28
|
+
*/
|
|
29
|
+
overrideContainerStyles?: React.CSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* EmergeType tipo de lanzamiento de la ventana, popup, layout, modal
|
|
32
|
+
*/
|
|
33
|
+
emergeType?: EmergeType;
|
|
23
34
|
}
|
|
24
35
|
export type MFHostAppProps = ByHostProps & BaseModuleProps;
|
|
36
|
+
export type MFHostAppOwnerState = {
|
|
37
|
+
emergeType?: EmergeType;
|
|
38
|
+
};
|
|
39
|
+
export type MFHostAppSlotsType = keyof typeof MFHostAppSlots;
|
|
40
|
+
export type MFHostAppStyles = M4LOverridesStyleRules<MFHostAppSlotsType, typeof MF_HOST_APP_KEY, Theme>;
|
|
@@ -14,7 +14,9 @@ function useNetworkActionConfirm(props) {
|
|
|
14
14
|
startProgress,
|
|
15
15
|
stopProgress
|
|
16
16
|
},
|
|
17
|
-
...getEndPoint(obj)
|
|
17
|
+
...getEndPoint(obj),
|
|
18
|
+
toastSuccess: false,
|
|
19
|
+
toastError: false
|
|
18
20
|
}).then((response) => {
|
|
19
21
|
if (customToastConfig) {
|
|
20
22
|
const toastConfig = customToastConfig(obj, response);
|
package/index.js
CHANGED
|
@@ -3,12 +3,12 @@ import { M } from "./components/MFNoAuthApp/index.js";
|
|
|
3
3
|
import { M as M2 } from "./components/MFHostApp/MFHostApp.js";
|
|
4
4
|
import { M as M3 } from "./components/ModuleDetailTabs/ModuleDetailTabs.js";
|
|
5
5
|
import { D } from "./components/DynamicTabs/DynamicTabs.js";
|
|
6
|
-
import { M as M4 } from "./layouts/ModuleLayout/ModuleLayout.js";
|
|
7
6
|
import { N } from "./layouts/NoAuthModuleLayout/index.js";
|
|
8
|
-
import {
|
|
7
|
+
import { M as M4 } from "./layouts/ModuleLayout/ModuleLayout.js";
|
|
8
|
+
import { g } from "./layouts/ModuleLayout/dicctionary.js";
|
|
9
9
|
import { M as M5 } from "./layouts/MasterDetailLayout/MasterDetailLayout.js";
|
|
10
10
|
import { g as g2 } from "./layouts/MasterDetailLayout/dicctionary.js";
|
|
11
|
-
import { d
|
|
11
|
+
import { d, g as g3 } from "./layouts/NoAuthModuleLayout/dicctionary.js";
|
|
12
12
|
import { u } from "./hooks/useMasterDetail/index.js";
|
|
13
13
|
import { u as u2 } from "./hooks/useModule/index.js";
|
|
14
14
|
import { u as u3 } from "./hooks/useDynamicAccordions/useDynamicAccordions.js";
|
|
@@ -27,8 +27,7 @@ export {
|
|
|
27
27
|
N as NoAuthModuleLayout,
|
|
28
28
|
c2 as createAppMF,
|
|
29
29
|
c as createComponentField,
|
|
30
|
-
d as
|
|
31
|
-
d2 as defaultNoAuthModuleLayoutDictionary,
|
|
30
|
+
d as defaultNoAuthModuleLayoutDictionary,
|
|
32
31
|
g2 as getMasterDetailLayoutComponentsDictionary,
|
|
33
32
|
g as getModuleLayoutComponentsDictionary,
|
|
34
33
|
g3 as getNoAuthModuleLayoutComponentsDictionary,
|
|
@@ -79,7 +79,7 @@ function MasterDetailLayout(props) {
|
|
|
79
79
|
onClose: () => {
|
|
80
80
|
moduleLayoutRef.current?.closeModal();
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
emergeType: "modal",
|
|
83
83
|
variant: "outlined",
|
|
84
84
|
children: typeof detailComponent === "function" ? detailComponent({}) : detailComponent
|
|
85
85
|
}
|
|
@@ -5,7 +5,7 @@ import { B as BaseModuleLayout } from "./subcomponents/BaseModuleLayout/index.js
|
|
|
5
5
|
import { a as ModuleProvider } from "./contexts/ModuleContext/index.js";
|
|
6
6
|
import { u as useUpdateWindowTitleAndEditionInfoMF } from "../../hooks/useUpdateWindowTitleAndEditionInfoMF/useUpdateWindowTitleAndEditionInfoMF.js";
|
|
7
7
|
const ModuleLayout = forwardRef((props, ref) => {
|
|
8
|
-
const { moduleId, moduleActions, version, children, buildTime, moduleNameField, subtitle, editionInfo } = props;
|
|
8
|
+
const { moduleId, moduleActions, version, children, buildTime, moduleNameField, subtitle, editionInfo, overrideContainerStyles } = props;
|
|
9
9
|
const moduleRef = useRef(null);
|
|
10
10
|
const closeModal = () => {
|
|
11
11
|
moduleRef.current?.closeModal();
|
|
@@ -16,7 +16,7 @@ const ModuleLayout = forwardRef((props, ref) => {
|
|
|
16
16
|
useImperativeHandle(ref, () => ({
|
|
17
17
|
openModal,
|
|
18
18
|
closeModal,
|
|
19
|
-
|
|
19
|
+
nodeElement: moduleRef.current?.nodeElement || null
|
|
20
20
|
}));
|
|
21
21
|
useUpdateWindowTitleAndEditionInfoMF({
|
|
22
22
|
moduleNameField,
|
|
@@ -30,7 +30,7 @@ const ModuleLayout = forwardRef((props, ref) => {
|
|
|
30
30
|
moduleActions,
|
|
31
31
|
version,
|
|
32
32
|
buildTime,
|
|
33
|
-
children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(BaseModuleLayout, { ref: moduleRef, children }) })
|
|
33
|
+
children: /* @__PURE__ */ jsx(ModalProvider, { children: /* @__PURE__ */ jsx(BaseModuleLayout, { ref: moduleRef, overrideContainerStyles, children }) })
|
|
34
34
|
}
|
|
35
35
|
);
|
|
36
36
|
});
|
|
@@ -2,10 +2,6 @@ import { getModalDialogComponentsDictionary } from "@m4l/components";
|
|
|
2
2
|
function getModuleLayoutComponentsDictionary() {
|
|
3
3
|
return ["module_layout"].concat(getModalDialogComponentsDictionary());
|
|
4
4
|
}
|
|
5
|
-
const defaultModuleLayoutDictionary = {
|
|
6
|
-
module_layout: {}
|
|
7
|
-
};
|
|
8
5
|
export {
|
|
9
|
-
defaultModuleLayoutDictionary as d,
|
|
10
6
|
getModuleLayoutComponentsDictionary as g
|
|
11
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const BaseModuleLayout: import('react').ForwardRefExoticComponent<
|
|
1
|
+
import { BaseModuleProps, ModuleRef } from './types';
|
|
2
|
+
export declare const BaseModuleLayout: import('react').ForwardRefExoticComponent<BaseModuleProps & import('react').RefAttributes<ModuleRef>>;
|
|
@@ -4,16 +4,16 @@ import { useModal, getComponentSlotRoot } from "@m4l/components";
|
|
|
4
4
|
import { M as ModuleLayoutRootStyled } from "../../slots/ModuleLayoutSlots.js";
|
|
5
5
|
import { a as MODULE_LAYOUT_KEY } from "../../constants.js";
|
|
6
6
|
const BaseModuleLayout = forwardRef((props, ref) => {
|
|
7
|
-
const { children } = props;
|
|
7
|
+
const { children, overrideContainerStyles } = props;
|
|
8
8
|
const { openModal, closeModal } = useModal();
|
|
9
9
|
const divRef = useRef(null);
|
|
10
10
|
useImperativeHandle(ref, () => ({
|
|
11
11
|
openModal,
|
|
12
12
|
closeModal,
|
|
13
|
-
|
|
13
|
+
nodeElement: divRef.current
|
|
14
14
|
}));
|
|
15
15
|
const classRoot = getComponentSlotRoot(MODULE_LAYOUT_KEY);
|
|
16
|
-
return /* @__PURE__ */ jsx(ModuleLayoutRootStyled, { className: classRoot, ref: divRef, children });
|
|
16
|
+
return /* @__PURE__ */ jsx(ModuleLayoutRootStyled, { className: classRoot, ref: divRef, style: overrideContainerStyles, children });
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
19
19
|
BaseModuleLayout as B
|
|
@@ -3,8 +3,9 @@ import { ModalOpenOptions } from '@m4l/components';
|
|
|
3
3
|
export type ModuleRef = {
|
|
4
4
|
openModal: (modalOpenProps: ModalOpenOptions) => void;
|
|
5
5
|
closeModal: () => void;
|
|
6
|
-
|
|
6
|
+
nodeElement: HTMLDivElement | null;
|
|
7
7
|
};
|
|
8
|
-
export interface
|
|
8
|
+
export interface BaseModuleProps {
|
|
9
9
|
children: ReactNode;
|
|
10
|
+
overrideContainerStyles?: React.CSSProperties;
|
|
10
11
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ModalOpenOptions, ModuleAction } from '@m4l/components';
|
|
3
|
-
import { ModuleRef } from './subcomponents/BaseModuleLayout/types';
|
|
2
|
+
import { M4LOverridesStyleRules, ModalOpenOptions, ModuleAction } from '@m4l/components';
|
|
4
3
|
import { ModuleLayoutSlots } from './slots/ModuleLayoutEnum';
|
|
5
|
-
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
4
|
import { MODULE_LAYOUT_KEY } from './constants';
|
|
7
5
|
import { Theme } from '@mui/material/styles';
|
|
8
6
|
import { ModuleNameField } from '../../hooks/useUpdateWindowTitleAndEditionInfoMF/types';
|
|
@@ -12,7 +10,7 @@ export interface ContainerProps {
|
|
|
12
10
|
export type ModuleLayoutRef = {
|
|
13
11
|
openModal: (modalOpenProps: ModalOpenOptions) => void;
|
|
14
12
|
closeModal: () => void;
|
|
15
|
-
|
|
13
|
+
nodeElement: HTMLDivElement | null;
|
|
16
14
|
};
|
|
17
15
|
export interface ModuleLayoutProps {
|
|
18
16
|
moduleId: string;
|
|
@@ -23,6 +21,11 @@ export interface ModuleLayoutProps {
|
|
|
23
21
|
moduleNameField?: ModuleNameField;
|
|
24
22
|
subtitle?: string;
|
|
25
23
|
editionInfo?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Estilos personalizados que van a reemplazar los estilos por defecto del contenedor del módulo. Para casos especiales.
|
|
26
|
+
* Donde se deb
|
|
27
|
+
*/
|
|
28
|
+
overrideContainerStyles?: React.CSSProperties;
|
|
26
29
|
}
|
|
27
30
|
export type ModuleLayoutSlotsType = keyof typeof ModuleLayoutSlots;
|
|
28
|
-
export type ModuleLayoutStyles =
|
|
31
|
+
export type ModuleLayoutStyles = M4LOverridesStyleRules<ModuleLayoutSlotsType, typeof MODULE_LAYOUT_KEY, Theme>;
|
package/layouts/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
export * from './ModuleLayout/dicctionary';
|
|
1
|
+
export * from './ModuleLayout';
|
|
3
2
|
export * from './MasterDetailLayout';
|
|
4
3
|
export { NoAuthModuleLayout } from './NoAuthModuleLayout';
|
|
5
4
|
export * from './NoAuthModuleLayout/dicctionary';
|
package/package.json
CHANGED
package/utils/createAppMF.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { EmergeType } from '@m4l/components';
|
|
1
2
|
export type CreateAppMFProps = {
|
|
2
3
|
prefixMF: string;
|
|
3
4
|
moduleId: string;
|
|
4
|
-
App: (
|
|
5
|
+
App: (props: {
|
|
6
|
+
emergeType?: EmergeType;
|
|
7
|
+
}) => JSX.Element;
|
|
5
8
|
privileges: string[];
|
|
6
9
|
appVersion: string;
|
|
7
10
|
componentsDictionary: string[];
|
package/utils/createAppMF.js
CHANGED
|
@@ -11,7 +11,7 @@ function createAppMF(props) {
|
|
|
11
11
|
componentsDictionary,
|
|
12
12
|
skeletonFlags
|
|
13
13
|
} = props;
|
|
14
|
-
window[`render_${prefixMF}_${moduleId}`] = (containerId, environment, hostTools, currentLocale, hostTheme, axiosOperation, formatters, dynamicMFStore, windowTools) => {
|
|
14
|
+
window[`render_${prefixMF}_${moduleId}`] = (containerId, environment, hostTools, currentLocale, hostTheme, axiosOperation, formatters, dynamicMFStore, windowTools, emergeType) => {
|
|
15
15
|
const container = document.getElementById(containerId);
|
|
16
16
|
if (container) {
|
|
17
17
|
const root = createRoot(container);
|
|
@@ -32,7 +32,7 @@ function createAppMF(props) {
|
|
|
32
32
|
skeletonFlags,
|
|
33
33
|
componentsDictionary,
|
|
34
34
|
windowTools,
|
|
35
|
-
children: /* @__PURE__ */ jsx(App, {})
|
|
35
|
+
children: /* @__PURE__ */ jsx(App, { emergeType })
|
|
36
36
|
}
|
|
37
37
|
)
|
|
38
38
|
);
|