@m4l/layouts 9.1.11 → 9.1.13
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/commonjs/index.js +7 -0
- package/components/ModuleDetailTabs/useModuleDatailTabs.d.ts +83 -82
- package/layouts/MasterDetailLayout/MasterDetailLayout.js +0 -1
- package/layouts/ModuleLayout/constants.d.ts +1 -0
- package/layouts/ModuleLayout/constants.js +3 -1
- package/layouts/ModuleLayout/contexts/ModuleContext/index.js +19 -13
- package/layouts/ModuleLayout/contexts/ModuleContext/store.d.ts +16 -0
- package/layouts/ModuleLayout/contexts/ModuleContext/store.js +62 -0
- package/layouts/ModuleLayout/contexts/ModuleContext/types.d.ts +46 -1
- package/layouts/ModuleLayout/slots/ModuleLayoutSlots.js +1 -1
- package/layouts/ModuleLayout/subcomponents/BaseModuleLayout/index.js +1 -1
- package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/DesktopContent/index.js +3 -3
- package/layouts/NoAuthModuleLayout/subcomponents/BaseNoAuthModuleLayout/subcomponents/MobileContent/index.js +3 -3
- package/not_recognized/index.js +963 -0
- package/package.json +1 -1
|
@@ -19,117 +19,118 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
|
|
|
19
19
|
size?: Extract<import('@m4l/styles').Sizes, "small" | "medium"> | undefined;
|
|
20
20
|
children?: null | undefined;
|
|
21
21
|
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
22
|
-
title?: string | undefined;
|
|
22
|
+
title?: string | undefined | undefined;
|
|
23
23
|
component?: React.ElementType | undefined;
|
|
24
|
-
id?: string | undefined;
|
|
24
|
+
id?: string | undefined | undefined;
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
26
|
action?: React.Ref<import('@mui/material').ButtonBaseActions> | undefined;
|
|
27
|
-
hidden?: boolean | undefined;
|
|
27
|
+
hidden?: boolean | undefined | undefined;
|
|
28
28
|
color?: Extract<import('@m4l/styles').ComponentPalletColor, "default"> | undefined;
|
|
29
|
-
content?: string | undefined;
|
|
29
|
+
content?: string | undefined | undefined;
|
|
30
30
|
style?: React.CSSProperties | undefined;
|
|
31
|
-
translate?: "yes" | "no" | undefined;
|
|
31
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
32
32
|
urlIcon?: string | undefined;
|
|
33
|
-
lang?: string | undefined;
|
|
34
|
-
slot?: string | undefined;
|
|
35
|
-
dir?: string | undefined;
|
|
33
|
+
lang?: string | undefined | undefined;
|
|
34
|
+
slot?: string | undefined | undefined;
|
|
35
|
+
dir?: string | undefined | undefined;
|
|
36
36
|
className?: string | undefined;
|
|
37
37
|
classes?: (Partial<import('@mui/material').TabClasses> & Partial<import('@mui/material').ClassNameMap<never>>) | undefined;
|
|
38
38
|
sx?: import('@mui/system').SxProps<import('@mui/material').Theme> | undefined;
|
|
39
39
|
key?: import('react').Key | null | undefined;
|
|
40
|
-
defaultChecked?: boolean | undefined;
|
|
40
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
41
41
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
42
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
43
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
44
|
-
accessKey?: string | undefined;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
43
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
44
|
+
accessKey?: string | undefined | undefined;
|
|
45
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
46
|
+
autoFocus?: boolean | undefined | undefined;
|
|
47
|
+
contentEditable?: "inherit" | (boolean | "false" | "true") | "plaintext-only" | undefined;
|
|
48
|
+
contextMenu?: string | undefined | undefined;
|
|
48
49
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
49
|
-
|
|
50
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
51
|
+
nonce?: string | undefined | undefined;
|
|
50
52
|
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
51
53
|
tabIndex?: NonNullable<React.HTMLAttributes<any>["tabIndex"]> | undefined;
|
|
52
|
-
radioGroup?: string | undefined;
|
|
54
|
+
radioGroup?: string | undefined | undefined;
|
|
53
55
|
role?: import('react').AriaRole | undefined;
|
|
54
|
-
about?: string | undefined;
|
|
55
|
-
datatype?: string | undefined;
|
|
56
|
+
about?: string | undefined | undefined;
|
|
57
|
+
datatype?: string | undefined | undefined;
|
|
56
58
|
inlist?: any;
|
|
57
|
-
prefix?: string | undefined;
|
|
58
|
-
property?: string | undefined;
|
|
59
|
-
rel?: string | undefined;
|
|
60
|
-
resource?: string | undefined;
|
|
61
|
-
rev?: string | undefined;
|
|
62
|
-
typeof?: string | undefined;
|
|
63
|
-
vocab?: string | undefined;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"aria-activedescendant"?: string | undefined;
|
|
59
|
+
prefix?: string | undefined | undefined;
|
|
60
|
+
property?: string | undefined | undefined;
|
|
61
|
+
rel?: string | undefined | undefined;
|
|
62
|
+
resource?: string | undefined | undefined;
|
|
63
|
+
rev?: string | undefined | undefined;
|
|
64
|
+
typeof?: string | undefined | undefined;
|
|
65
|
+
vocab?: string | undefined | undefined;
|
|
66
|
+
autoCorrect?: string | undefined | undefined;
|
|
67
|
+
autoSave?: string | undefined | undefined;
|
|
68
|
+
itemProp?: string | undefined | undefined;
|
|
69
|
+
itemScope?: boolean | undefined | undefined;
|
|
70
|
+
itemType?: string | undefined | undefined;
|
|
71
|
+
itemID?: string | undefined | undefined;
|
|
72
|
+
itemRef?: string | undefined | undefined;
|
|
73
|
+
results?: number | undefined | undefined;
|
|
74
|
+
security?: string | undefined | undefined;
|
|
75
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
76
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
77
|
+
is?: string | undefined | undefined;
|
|
78
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
78
79
|
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
79
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
80
|
-
"aria-braillelabel"?: string | undefined;
|
|
81
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
80
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
81
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
82
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
82
83
|
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
83
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
84
|
-
"aria-colcount"?: number | undefined;
|
|
85
|
-
"aria-colindex"?: number | undefined;
|
|
86
|
-
"aria-colindextext"?: string | undefined;
|
|
87
|
-
"aria-colspan"?: number | undefined;
|
|
88
|
-
"aria-controls"?: string | undefined;
|
|
89
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
90
|
-
"aria-describedby"?: string | undefined;
|
|
91
|
-
"aria-description"?: string | undefined;
|
|
92
|
-
"aria-details"?: string | undefined;
|
|
84
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
85
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
86
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
87
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
88
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
89
|
+
"aria-controls"?: string | undefined | undefined;
|
|
90
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
91
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
92
|
+
"aria-description"?: string | undefined | undefined;
|
|
93
|
+
"aria-details"?: string | undefined | undefined;
|
|
93
94
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
94
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
95
|
-
"aria-errormessage"?: string | undefined;
|
|
95
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
96
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
96
97
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
97
|
-
"aria-flowto"?: string | undefined;
|
|
98
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
98
99
|
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
99
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
100
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
100
101
|
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
101
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
102
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
103
|
-
"aria-label"?: string | undefined;
|
|
104
|
-
"aria-labelledby"?: string | undefined;
|
|
105
|
-
"aria-level"?: number | undefined;
|
|
106
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
102
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
103
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
104
|
+
"aria-label"?: string | undefined | undefined;
|
|
105
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
106
|
+
"aria-level"?: number | undefined | undefined;
|
|
107
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
107
108
|
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
108
109
|
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
109
110
|
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
110
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
111
|
-
"aria-owns"?: string | undefined;
|
|
112
|
-
"aria-placeholder"?: string | undefined;
|
|
113
|
-
"aria-posinset"?: number | undefined;
|
|
114
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
111
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
112
|
+
"aria-owns"?: string | undefined | undefined;
|
|
113
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
114
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
115
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
115
116
|
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
116
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
117
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
117
118
|
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
118
|
-
"aria-roledescription"?: string | undefined;
|
|
119
|
-
"aria-rowcount"?: number | undefined;
|
|
120
|
-
"aria-rowindex"?: number | undefined;
|
|
121
|
-
"aria-rowindextext"?: string | undefined;
|
|
122
|
-
"aria-rowspan"?: number | undefined;
|
|
119
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
120
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
121
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
122
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
123
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
123
124
|
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
124
|
-
"aria-setsize"?: number | undefined;
|
|
125
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
126
|
-
"aria-valuemax"?: number | undefined;
|
|
127
|
-
"aria-valuemin"?: number | undefined;
|
|
128
|
-
"aria-valuenow"?: number | undefined;
|
|
129
|
-
"aria-valuetext"?: string | undefined;
|
|
125
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
126
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
127
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
128
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
129
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
130
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
130
131
|
dangerouslySetInnerHTML?: {
|
|
131
132
|
__html: string | TrustedHTML;
|
|
132
|
-
} | undefined;
|
|
133
|
+
} | undefined | undefined;
|
|
133
134
|
onCopy?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
134
135
|
onCopyCapture?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
135
136
|
onCut?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -301,7 +302,7 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
|
|
|
301
302
|
touchRippleRef?: React.Ref<import('@mui/material/ButtonBase/TouchRipple').TouchRippleActions> | undefined;
|
|
302
303
|
disableFocusRipple?: boolean | undefined;
|
|
303
304
|
dataTestId?: string | undefined;
|
|
304
|
-
iconPosition?:
|
|
305
|
+
iconPosition?: "top" | "bottom" | "start" | "end" | undefined;
|
|
305
306
|
wrapped?: boolean | undefined;
|
|
306
307
|
}[];
|
|
307
308
|
handleChangeTab: (newValue: string) => void;
|
|
@@ -1,27 +1,33 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useWindowToolsMF } from "@m4l/components";
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, useRef, useEffect } from "react";
|
|
4
|
+
import { c as createModuleLayoutStore } from "./store.js";
|
|
4
5
|
const ModuleContext = createContext(null);
|
|
5
6
|
function ModuleProvider(props) {
|
|
6
7
|
const { children, moduleActions, moduleId, version } = props;
|
|
7
|
-
const [configOptions] = useState(() => ({
|
|
8
|
-
moduleId,
|
|
9
|
-
dictionary: void 0
|
|
10
|
-
}));
|
|
11
8
|
const { setActions } = useWindowToolsMF();
|
|
12
|
-
const
|
|
13
|
-
const finalModuleActions = useMemo(() => {
|
|
14
|
-
return (moduleActions || []).concat(dynamicActions);
|
|
15
|
-
}, [moduleActions, dynamicActions]);
|
|
9
|
+
const moduleLayoutStoreRef = useRef();
|
|
16
10
|
useEffect(() => {
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
if (moduleLayoutStoreRef.current) {
|
|
12
|
+
moduleLayoutStoreRef.current.getState().updateModuleActions(moduleActions || []);
|
|
13
|
+
}
|
|
14
|
+
}, [moduleActions]);
|
|
15
|
+
if (!moduleLayoutStoreRef.current) {
|
|
16
|
+
moduleLayoutStoreRef.current = createModuleLayoutStore({
|
|
17
|
+
moduleActions,
|
|
18
|
+
moduleId,
|
|
19
|
+
version,
|
|
20
|
+
setActions
|
|
21
|
+
});
|
|
22
|
+
moduleLayoutStoreRef.current.getState().init();
|
|
23
|
+
}
|
|
24
|
+
const store = moduleLayoutStoreRef.current.getState();
|
|
19
25
|
return /* @__PURE__ */ jsx(
|
|
20
26
|
ModuleContext.Provider,
|
|
21
27
|
{
|
|
22
28
|
value: {
|
|
23
|
-
setDynamicActions,
|
|
24
|
-
moduleId: configOptions.moduleId
|
|
29
|
+
setDynamicActions: store.updateDynamicActions,
|
|
30
|
+
moduleId: store.configOptions.moduleId
|
|
25
31
|
},
|
|
26
32
|
children
|
|
27
33
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InitialModuleLayoutStoreProps, ModuleLayoutStateWithActions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Crea el Store para ModuleLayout.
|
|
4
|
+
* Este store se encarga de manejar el estado del layout de módulo.
|
|
5
|
+
* @param props Las props iniciales del store.
|
|
6
|
+
*/
|
|
7
|
+
export declare const createModuleLayoutStore: (initProps: InitialModuleLayoutStoreProps, storeDevtoolsEnabled?: boolean) => import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<ModuleLayoutStateWithActions>, "setState"> & {
|
|
8
|
+
setState<A extends string | {
|
|
9
|
+
type: unknown;
|
|
10
|
+
}>(partial: ModuleLayoutStateWithActions | Partial<ModuleLayoutStateWithActions> | ((state: ModuleLayoutStateWithActions) => ModuleLayoutStateWithActions | Partial<ModuleLayoutStateWithActions>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
11
|
+
}, "setState"> & {
|
|
12
|
+
setState(nextStateOrUpdater: ModuleLayoutStateWithActions | Partial<ModuleLayoutStateWithActions> | ((state: import('immer/dist/internal').WritableDraft<ModuleLayoutStateWithActions>) => void), shouldReplace?: boolean | undefined, action?: string | {
|
|
13
|
+
type: unknown;
|
|
14
|
+
} | undefined): void;
|
|
15
|
+
}>;
|
|
16
|
+
export type ModuleLayoutStore = ReturnType<typeof createModuleLayoutStore>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { c as create, i as immer, d as devtools } from "../../../../not_recognized/index.js";
|
|
2
|
+
import { M as MODULE_LAYOUT_STORE_ID } from "../../constants.js";
|
|
3
|
+
const createDevtools = (immerMiddlewere, config) => {
|
|
4
|
+
const { enabled = false } = config;
|
|
5
|
+
if (enabled && process.env.NODE_ENV === "development") {
|
|
6
|
+
return devtools(immerMiddlewere, config);
|
|
7
|
+
}
|
|
8
|
+
return immerMiddlewere;
|
|
9
|
+
};
|
|
10
|
+
const createModuleLayoutStore = (initProps, storeDevtoolsEnabled = false) => {
|
|
11
|
+
const { moduleActions, moduleId, version, setActions } = initProps;
|
|
12
|
+
const startProps = {
|
|
13
|
+
configOptions: {
|
|
14
|
+
moduleId
|
|
15
|
+
},
|
|
16
|
+
dynamicActions: [],
|
|
17
|
+
finalModuleActions: [],
|
|
18
|
+
moduleActions: [],
|
|
19
|
+
version
|
|
20
|
+
};
|
|
21
|
+
return create(
|
|
22
|
+
createDevtools(
|
|
23
|
+
immer((set) => ({
|
|
24
|
+
...startProps,
|
|
25
|
+
/**
|
|
26
|
+
* Inicializa el store de ModuleLayout.
|
|
27
|
+
*/
|
|
28
|
+
init: () => {
|
|
29
|
+
set((state) => {
|
|
30
|
+
state.finalModuleActions = (moduleActions || []).concat(state.dynamicActions);
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Actualiza las acciones dinámicas del módulo.
|
|
35
|
+
*/
|
|
36
|
+
updateDynamicActions: (dynamicActions) => {
|
|
37
|
+
set((state) => {
|
|
38
|
+
const actionsConcatenated = (moduleActions || []).concat(dynamicActions);
|
|
39
|
+
state.dynamicActions = dynamicActions;
|
|
40
|
+
state.finalModuleActions = actionsConcatenated;
|
|
41
|
+
setActions(actionsConcatenated, state.version);
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* Actualiza module actions en el store cuando moduleActions cambia.
|
|
46
|
+
*/
|
|
47
|
+
updateModuleActions: (newModuleActions) => {
|
|
48
|
+
set((state) => {
|
|
49
|
+
const actionsConcatenated = newModuleActions.concat(state.dynamicActions);
|
|
50
|
+
state.moduleActions = moduleActions;
|
|
51
|
+
state.finalModuleActions = actionsConcatenated;
|
|
52
|
+
setActions(actionsConcatenated, state.version);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
})),
|
|
56
|
+
{ name: `${MODULE_LAYOUT_STORE_ID}: ${initProps.storeId}`, enabled: storeDevtoolsEnabled }
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
createModuleLayoutStore as c
|
|
62
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleAction } from '@m4l/components';
|
|
1
|
+
import { ModuleAction, WindowToolsMF } from '@m4l/components';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
export interface ModuleLayoutContextStateProps {
|
|
4
4
|
moduleId: string;
|
|
@@ -7,7 +7,52 @@ export interface ModuleLayoutProviderProps extends Omit<ModuleLayoutContextState
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
version: string;
|
|
9
9
|
moduleActions?: ModuleAction[];
|
|
10
|
+
/**
|
|
11
|
+
* "storeId" identificador del store
|
|
12
|
+
*/
|
|
13
|
+
storeId?: string;
|
|
14
|
+
/**
|
|
15
|
+
* "storeDevtoolsEnabled" determina si se debe usar devtools para el store
|
|
16
|
+
*/
|
|
17
|
+
storeDevtoolsEnabled?: boolean;
|
|
10
18
|
}
|
|
11
19
|
export interface ModuleLayoutContextProps extends ModuleLayoutContextStateProps {
|
|
12
20
|
setDynamicActions: (dynamicActions: ModuleAction[]) => void;
|
|
13
21
|
}
|
|
22
|
+
export interface ModuleLayoutState extends Pick<ModuleLayoutProviderProps, 'storeId'> {
|
|
23
|
+
/**
|
|
24
|
+
* "dynamicActions" Acciones dinámicas del módulo
|
|
25
|
+
*/
|
|
26
|
+
dynamicActions: ModuleAction[];
|
|
27
|
+
/**
|
|
28
|
+
* "finalModuleActions" Acciones con moduleActions y dynamicActions
|
|
29
|
+
*/
|
|
30
|
+
finalModuleActions: ModuleAction[];
|
|
31
|
+
/**
|
|
32
|
+
* "moduleActions" Acciones iniciales del módulo
|
|
33
|
+
*/
|
|
34
|
+
moduleActions?: ModuleAction[];
|
|
35
|
+
/**
|
|
36
|
+
* "configOptions" Propiedades de configuración del módulo
|
|
37
|
+
*/
|
|
38
|
+
configOptions: ModuleLayoutContextStateProps;
|
|
39
|
+
/**
|
|
40
|
+
* "version" Versión del módulo
|
|
41
|
+
*/
|
|
42
|
+
version: string;
|
|
43
|
+
}
|
|
44
|
+
export interface ModuleLayoutStateWithActions extends ModuleLayoutState {
|
|
45
|
+
/**
|
|
46
|
+
* Inicializa el store de ModuleLayout.
|
|
47
|
+
*/
|
|
48
|
+
init: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Actualiza las acciones dinámicas del módulo.
|
|
51
|
+
*/
|
|
52
|
+
updateDynamicActions: (dynamicActions: ModuleAction[]) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Actualiza module actions en el store cuando moduleActions cambia.
|
|
55
|
+
*/
|
|
56
|
+
updateModuleActions: (moduleActions: ModuleAction[]) => void;
|
|
57
|
+
}
|
|
58
|
+
export type InitialModuleLayoutStoreProps = Pick<ModuleLayoutState, 'moduleActions' | 'version' | 'storeId'> & Pick<WindowToolsMF, 'setActions'> & ModuleLayoutContextStateProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { styled } from "@mui/material/styles";
|
|
2
|
-
import {
|
|
2
|
+
import { a as MODULE_LAYOUT_KEY } from "../constants.js";
|
|
3
3
|
import { M as ModuleLayoutSlots } from "./ModuleLayoutEnum.js";
|
|
4
4
|
import { m as moduleLayoutStyles } from "../styles.js";
|
|
5
5
|
const ModuleLayoutRootStyled = styled("div", {
|
|
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef, useRef, useImperativeHandle } from "react";
|
|
3
3
|
import { useModal, getComponentSlotRoot } from "@m4l/components";
|
|
4
4
|
import { M as ModuleLayoutRootStyled } from "../../slots/ModuleLayoutSlots.js";
|
|
5
|
-
import {
|
|
5
|
+
import { a as MODULE_LAYOUT_KEY } from "../../constants.js";
|
|
6
6
|
const BaseModuleLayout = forwardRef((props, ref) => {
|
|
7
7
|
const { children } = props;
|
|
8
8
|
const { openModal, closeModal } = useModal();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs, jsx
|
|
2
|
-
import { LanguagePopover, Image, Typography, Stack
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { LanguagePopover, Image, Typography, Stack } from "@m4l/components";
|
|
3
3
|
import { D as DesktopContentRootStyled, a as DesktopBannerStyled, C as ContainerLogoDesktopStyled, b as CompanyNameDesktopStyled, T as TypographyBannerStyled, c as CompanyLeyendDesktopStyled, W as WrapperFormContentDesktopStyled, F as FormContentDesktopStyled, d as ContainerModuleNameDesktopStyled } from "../../../../slots/NoAuthModuleLayoutSlots.js";
|
|
4
4
|
import { useBase, useModuleDictionary, useDomain } from "@m4l/core";
|
|
5
5
|
const DesktopContent = (props) => {
|
|
@@ -39,7 +39,7 @@ const DesktopContent = (props) => {
|
|
|
39
39
|
}
|
|
40
40
|
)
|
|
41
41
|
] }),
|
|
42
|
-
/* @__PURE__ */ jsx(Stack, { direction: "column", height: "auto",
|
|
42
|
+
/* @__PURE__ */ jsx(Stack, { direction: "column", height: "auto", style: { overflow: "auto", position: "relative" }, children })
|
|
43
43
|
] }) })
|
|
44
44
|
] });
|
|
45
45
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Image, LanguagePopover,
|
|
2
|
+
import { Image, LanguagePopover, Typography } from "@m4l/components";
|
|
3
3
|
import { M as MobileContentRootStyled, e as MobileBannerStyled, f as ContainerLogoStyled, g as CompanyNameStyled, T as TypographyBannerStyled, h as WrapperFormContentStyled, i as FormContentStyled, j as ContainerModuleNameStyled } from "../../../../slots/NoAuthModuleLayoutSlots.js";
|
|
4
4
|
import { useBase, useModuleDictionary, useDomain } from "@m4l/core";
|
|
5
5
|
const MobileContent = (props) => {
|
|
@@ -23,7 +23,7 @@ const MobileContent = (props) => {
|
|
|
23
23
|
] }),
|
|
24
24
|
/* @__PURE__ */ jsx(LanguagePopover, {})
|
|
25
25
|
] }),
|
|
26
|
-
/* @__PURE__ */ jsx(WrapperFormContentStyled, { children: /* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ jsx(WrapperFormContentStyled, { children: /* @__PURE__ */ jsxs(FormContentStyled, { style: { overflow: "auto", position: "relative" }, children: [
|
|
27
27
|
/* @__PURE__ */ jsxs(ContainerModuleNameStyled, { children: [
|
|
28
28
|
/* @__PURE__ */ jsx(Typography, { variant: "h3", skeletonWidth: "20%", children: getLabel("module_name") }),
|
|
29
29
|
/* @__PURE__ */ jsx(
|
|
@@ -36,7 +36,7 @@ const MobileContent = (props) => {
|
|
|
36
36
|
)
|
|
37
37
|
] }),
|
|
38
38
|
children
|
|
39
|
-
] }) })
|
|
39
|
+
] }) })
|
|
40
40
|
] });
|
|
41
41
|
};
|
|
42
42
|
export {
|