@m4l/layouts 9.3.3 → 9.3.4
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/components/MFHostApp/MFHostApp.js +2 -4
- package/components/MFHostApp/types.d.ts +1 -0
- package/components/ModuleDetailTabs/useModuleDatailTabs.d.ts +85 -85
- package/hooks/useDynamicPaperForm/types.d.ts +2 -2
- package/hooks/useDynamicPaperForm/useDynamicPaperForm.js +2 -0
- package/hooks/useUpdateWindowTitleAndEditionInfoMF/index.d.ts +1 -0
- package/hooks/useUpdateWindowTitleAndEditionInfoMF/types.d.ts +6 -0
- package/hooks/useUpdateWindowTitleAndEditionInfoMF/useUpdateWindowTitleAndEditionInfoMF.d.ts +6 -0
- package/hooks/useUpdateWindowTitleAndEditionInfoMF/useUpdateWindowTitleAndEditionInfoMF.js +23 -0
- package/layouts/MasterDetailLayout/MasterDetailLayout.js +7 -1
- package/layouts/ModuleLayout/ModuleLayout.js +7 -1
- package/layouts/ModuleLayout/types.d.ts +4 -0
- package/package.json +10 -10
- package/components/MFWindowsTitle/MFWindowsTitle.d.ts +0 -5
- package/components/MFWindowsTitle/MFWindowsTitle.js +0 -10
- package/components/MFWindowsTitle/index.d.ts +0 -1
- package/components/MFWindowsTitle/types.d.ts +0 -5
- /package/{components/MFWindowsTitle → hooks/useUpdateWindowTitleAndEditionInfoMF}/index.js +0 -0
|
@@ -3,7 +3,6 @@ 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 MFWindowsTitle } from "../MFWindowsTitle/MFWindowsTitle.js";
|
|
7
6
|
function MFHostApp(props) {
|
|
8
7
|
const {
|
|
9
8
|
children,
|
|
@@ -20,8 +19,7 @@ function MFHostApp(props) {
|
|
|
20
19
|
privileges,
|
|
21
20
|
componentsDictionary,
|
|
22
21
|
dynamicMFStore,
|
|
23
|
-
windowTools
|
|
24
|
-
isAddEditModule = false
|
|
22
|
+
windowTools
|
|
25
23
|
} = props;
|
|
26
24
|
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(
|
|
27
25
|
HostThemeProvider,
|
|
@@ -46,7 +44,7 @@ function MFHostApp(props) {
|
|
|
46
44
|
componentsDictionary,
|
|
47
45
|
skeletonFlags,
|
|
48
46
|
privileges,
|
|
49
|
-
children: /* @__PURE__ */ jsx(FormatterProvider, { isMicroFrontEnd: true, ...formatters, children: /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(
|
|
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
48
|
}
|
|
51
49
|
)
|
|
52
50
|
}
|
|
@@ -17,6 +17,7 @@ export interface ByHostProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* isAddEditModule saber si el módulo es tipo add/edit, para poder asignar el title automáticamente
|
|
19
19
|
* cuando se cambia el idioma, desde MFHostApp/MFWindowsTitle
|
|
20
|
+
* @deprecated no usar, no tiene efecto. utilizar el hook useMFWindowsTitle
|
|
20
21
|
*/
|
|
21
22
|
isAddEditModule?: boolean;
|
|
22
23
|
}
|
|
@@ -20,120 +20,120 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
|
|
|
20
20
|
size?: Extract<import('@m4l/styles').Sizes, "small" | "medium"> | undefined;
|
|
21
21
|
children?: null | undefined;
|
|
22
22
|
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;
|
|
23
|
-
title?: string | undefined
|
|
23
|
+
title?: string | undefined;
|
|
24
24
|
component?: React.ElementType | undefined;
|
|
25
|
-
id?: string | undefined
|
|
25
|
+
id?: string | undefined;
|
|
26
26
|
disabled?: boolean | undefined;
|
|
27
27
|
action?: React.Ref<import('@mui/material').ButtonBaseActions> | undefined;
|
|
28
|
-
hidden?: boolean | undefined
|
|
28
|
+
hidden?: boolean | undefined;
|
|
29
29
|
color?: Extract<import('@m4l/styles').ComponentPalletColor, "default"> | undefined;
|
|
30
|
-
content?: string | undefined
|
|
30
|
+
content?: string | undefined;
|
|
31
31
|
style?: React.CSSProperties | undefined;
|
|
32
|
-
translate?: "yes" | "no" | undefined
|
|
32
|
+
translate?: "yes" | "no" | undefined;
|
|
33
33
|
urlIcon?: string | undefined;
|
|
34
|
-
lang?: string | undefined
|
|
35
|
-
slot?: string | undefined
|
|
36
|
-
dir?: string | undefined
|
|
34
|
+
lang?: string | undefined;
|
|
35
|
+
slot?: string | undefined;
|
|
36
|
+
dir?: string | undefined;
|
|
37
37
|
className?: string | undefined;
|
|
38
38
|
classes?: (Partial<import('@mui/material').TabClasses> & Partial<import('@mui/material').ClassNameMap<never>>) | undefined;
|
|
39
39
|
sx?: import('@mui/system').SxProps<import('@mui/material').Theme> | undefined;
|
|
40
40
|
key?: import('react').Key | null | undefined;
|
|
41
|
-
defaultChecked?: boolean | undefined
|
|
41
|
+
defaultChecked?: boolean | undefined;
|
|
42
42
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
43
|
-
suppressContentEditableWarning?: boolean | undefined
|
|
44
|
-
suppressHydrationWarning?: boolean | undefined
|
|
45
|
-
accessKey?: string | undefined
|
|
46
|
-
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {})
|
|
47
|
-
autoFocus?: boolean | undefined
|
|
48
|
-
contentEditable?:
|
|
49
|
-
contextMenu?: string | undefined
|
|
43
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
44
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
45
|
+
accessKey?: string | undefined;
|
|
46
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
|
|
47
|
+
autoFocus?: boolean | undefined;
|
|
48
|
+
contentEditable?: (boolean | "false" | "true") | "inherit" | "plaintext-only" | undefined;
|
|
49
|
+
contextMenu?: string | undefined;
|
|
50
50
|
draggable?: (boolean | "false" | "true") | undefined;
|
|
51
|
-
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined
|
|
52
|
-
nonce?: string | undefined
|
|
51
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
|
|
52
|
+
nonce?: string | undefined;
|
|
53
53
|
spellCheck?: (boolean | "false" | "true") | undefined;
|
|
54
54
|
tabIndex?: NonNullable<React.HTMLAttributes<any>["tabIndex"]> | undefined;
|
|
55
|
-
radioGroup?: string | undefined
|
|
55
|
+
radioGroup?: string | undefined;
|
|
56
56
|
role?: import('react').AriaRole | undefined;
|
|
57
|
-
about?: string | undefined
|
|
58
|
-
datatype?: string | undefined
|
|
57
|
+
about?: string | undefined;
|
|
58
|
+
datatype?: string | undefined;
|
|
59
59
|
inlist?: any;
|
|
60
|
-
prefix?: string | undefined
|
|
61
|
-
property?: string | undefined
|
|
62
|
-
rel?: string | undefined
|
|
63
|
-
resource?: string | undefined
|
|
64
|
-
rev?: string | undefined
|
|
65
|
-
typeof?: string | undefined
|
|
66
|
-
vocab?: string | undefined
|
|
67
|
-
autoCorrect?: string | undefined
|
|
68
|
-
autoSave?: string | undefined
|
|
69
|
-
itemProp?: string | undefined
|
|
70
|
-
itemScope?: boolean | undefined
|
|
71
|
-
itemType?: string | undefined
|
|
72
|
-
itemID?: string | undefined
|
|
73
|
-
itemRef?: string | undefined
|
|
74
|
-
results?: number | undefined
|
|
75
|
-
security?: string | undefined
|
|
76
|
-
unselectable?: "on" | "off" | undefined
|
|
77
|
-
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined
|
|
78
|
-
is?: string | undefined
|
|
79
|
-
exportparts?: string | undefined
|
|
80
|
-
part?: string | undefined
|
|
81
|
-
"aria-activedescendant"?: string | undefined
|
|
60
|
+
prefix?: string | undefined;
|
|
61
|
+
property?: string | undefined;
|
|
62
|
+
rel?: string | undefined;
|
|
63
|
+
resource?: string | undefined;
|
|
64
|
+
rev?: string | undefined;
|
|
65
|
+
typeof?: string | undefined;
|
|
66
|
+
vocab?: string | undefined;
|
|
67
|
+
autoCorrect?: string | undefined;
|
|
68
|
+
autoSave?: string | undefined;
|
|
69
|
+
itemProp?: string | undefined;
|
|
70
|
+
itemScope?: boolean | undefined;
|
|
71
|
+
itemType?: string | undefined;
|
|
72
|
+
itemID?: string | undefined;
|
|
73
|
+
itemRef?: string | undefined;
|
|
74
|
+
results?: number | undefined;
|
|
75
|
+
security?: string | undefined;
|
|
76
|
+
unselectable?: "on" | "off" | undefined;
|
|
77
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
|
|
78
|
+
is?: string | undefined;
|
|
79
|
+
exportparts?: string | undefined;
|
|
80
|
+
part?: string | undefined;
|
|
81
|
+
"aria-activedescendant"?: string | undefined;
|
|
82
82
|
"aria-atomic"?: (boolean | "false" | "true") | undefined;
|
|
83
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined
|
|
84
|
-
"aria-braillelabel"?: string | undefined
|
|
85
|
-
"aria-brailleroledescription"?: string | undefined
|
|
83
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
84
|
+
"aria-braillelabel"?: string | undefined;
|
|
85
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
86
86
|
"aria-busy"?: (boolean | "false" | "true") | undefined;
|
|
87
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined
|
|
88
|
-
"aria-colcount"?: number | undefined
|
|
89
|
-
"aria-colindex"?: number | undefined
|
|
90
|
-
"aria-colindextext"?: string | undefined
|
|
91
|
-
"aria-colspan"?: number | undefined
|
|
92
|
-
"aria-controls"?: string | undefined
|
|
93
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined
|
|
94
|
-
"aria-describedby"?: string | undefined
|
|
95
|
-
"aria-description"?: string | undefined
|
|
96
|
-
"aria-details"?: string | undefined
|
|
87
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
88
|
+
"aria-colcount"?: number | undefined;
|
|
89
|
+
"aria-colindex"?: number | undefined;
|
|
90
|
+
"aria-colindextext"?: string | undefined;
|
|
91
|
+
"aria-colspan"?: number | undefined;
|
|
92
|
+
"aria-controls"?: string | undefined;
|
|
93
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
94
|
+
"aria-describedby"?: string | undefined;
|
|
95
|
+
"aria-description"?: string | undefined;
|
|
96
|
+
"aria-details"?: string | undefined;
|
|
97
97
|
"aria-disabled"?: (boolean | "false" | "true") | undefined;
|
|
98
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined
|
|
99
|
-
"aria-errormessage"?: string | undefined
|
|
98
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
99
|
+
"aria-errormessage"?: string | undefined;
|
|
100
100
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
101
|
-
"aria-flowto"?: string | undefined
|
|
101
|
+
"aria-flowto"?: string | undefined;
|
|
102
102
|
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
103
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined
|
|
103
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
104
104
|
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
105
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined
|
|
106
|
-
"aria-keyshortcuts"?: string | undefined
|
|
107
|
-
"aria-label"?: string | undefined
|
|
108
|
-
"aria-labelledby"?: string | undefined
|
|
109
|
-
"aria-level"?: number | undefined
|
|
110
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined
|
|
105
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
106
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
107
|
+
"aria-label"?: string | undefined;
|
|
108
|
+
"aria-labelledby"?: string | undefined;
|
|
109
|
+
"aria-level"?: number | undefined;
|
|
110
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
111
111
|
"aria-modal"?: (boolean | "false" | "true") | undefined;
|
|
112
112
|
"aria-multiline"?: (boolean | "false" | "true") | undefined;
|
|
113
113
|
"aria-multiselectable"?: (boolean | "false" | "true") | undefined;
|
|
114
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined
|
|
115
|
-
"aria-owns"?: string | undefined
|
|
116
|
-
"aria-placeholder"?: string | undefined
|
|
117
|
-
"aria-posinset"?: number | undefined
|
|
118
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined
|
|
114
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
115
|
+
"aria-owns"?: string | undefined;
|
|
116
|
+
"aria-placeholder"?: string | undefined;
|
|
117
|
+
"aria-posinset"?: number | undefined;
|
|
118
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
119
119
|
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
120
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined
|
|
120
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
121
121
|
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
122
|
-
"aria-roledescription"?: string | undefined
|
|
123
|
-
"aria-rowcount"?: number | undefined
|
|
124
|
-
"aria-rowindex"?: number | undefined
|
|
125
|
-
"aria-rowindextext"?: string | undefined
|
|
126
|
-
"aria-rowspan"?: number | undefined
|
|
122
|
+
"aria-roledescription"?: string | undefined;
|
|
123
|
+
"aria-rowcount"?: number | undefined;
|
|
124
|
+
"aria-rowindex"?: number | undefined;
|
|
125
|
+
"aria-rowindextext"?: string | undefined;
|
|
126
|
+
"aria-rowspan"?: number | undefined;
|
|
127
127
|
"aria-selected"?: (boolean | "false" | "true") | undefined;
|
|
128
|
-
"aria-setsize"?: number | undefined
|
|
129
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined
|
|
130
|
-
"aria-valuemax"?: number | undefined
|
|
131
|
-
"aria-valuemin"?: number | undefined
|
|
132
|
-
"aria-valuenow"?: number | undefined
|
|
133
|
-
"aria-valuetext"?: string | undefined
|
|
128
|
+
"aria-setsize"?: number | undefined;
|
|
129
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
130
|
+
"aria-valuemax"?: number | undefined;
|
|
131
|
+
"aria-valuemin"?: number | undefined;
|
|
132
|
+
"aria-valuenow"?: number | undefined;
|
|
133
|
+
"aria-valuetext"?: string | undefined;
|
|
134
134
|
dangerouslySetInnerHTML?: {
|
|
135
135
|
__html: string | TrustedHTML;
|
|
136
|
-
} | undefined
|
|
136
|
+
} | undefined;
|
|
137
137
|
onCopy?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
138
138
|
onCopyCapture?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
139
139
|
onCut?: import('react').ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -304,7 +304,7 @@ export declare function useModuleDetailTabs<T extends Record<string, any> = Reco
|
|
|
304
304
|
touchRippleRef?: React.Ref<import('@mui/material/ButtonBase/TouchRipple').TouchRippleActions> | undefined;
|
|
305
305
|
disableFocusRipple?: boolean | undefined;
|
|
306
306
|
ariaLabel?: string | undefined;
|
|
307
|
-
iconPosition?: "top" | "bottom" | "start" | "end" | undefined;
|
|
307
|
+
iconPosition?: ("top" | "bottom" | "start" | "end") | undefined;
|
|
308
308
|
wrapped?: boolean | undefined;
|
|
309
309
|
}[];
|
|
310
310
|
handleChangeTab: (newValue: string) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { PropertyValueProps } from '@m4l/components';
|
|
1
|
+
import { PropertyValueProps, RHFTextFieldProps } from '@m4l/components';
|
|
2
2
|
interface PropertyValueFieldBase extends Pick<PropertyValueProps, 'semanticWidth'> {
|
|
3
3
|
name: string;
|
|
4
4
|
type: 'RHFTexfField' | 'component';
|
|
5
5
|
label: string;
|
|
6
6
|
mandatory?: boolean;
|
|
7
7
|
}
|
|
8
|
-
interface PropertyValueRHFTexfField extends PropertyValueFieldBase {
|
|
8
|
+
interface PropertyValueRHFTexfField extends PropertyValueFieldBase, Pick<RHFTextFieldProps, 'multiline' | 'rows'> {
|
|
9
9
|
type: 'RHFTexfField';
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useUpdateWindowTitleAndEditionInfoMF';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UseSetWindowPropsMFProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook para actualizar el titulo y el subtitulo de la ventana del microfrontend
|
|
4
|
+
* Cuando se actualiza o carga el diccionario
|
|
5
|
+
*/
|
|
6
|
+
export declare function useUpdateWindowTitleAndEditionInfoMF(props?: UseSetWindowPropsMFProps): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
import { useFlagsPresent, CommonFlags, useModuleDictionary } from "@m4l/core";
|
|
3
|
+
import { useWindowToolsMF } from "@m4l/components";
|
|
4
|
+
function useUpdateWindowTitleAndEditionInfoMF(props) {
|
|
5
|
+
const { moduleNameField: dictionaryIdForName = "module_name", subtitle, editionInfo } = props || {};
|
|
6
|
+
const isFlagPresent = useFlagsPresent([CommonFlags.FLAG_DICTIONARY_LOADED]);
|
|
7
|
+
const { getLabel } = useModuleDictionary();
|
|
8
|
+
const { setWindowTitle, setWindowSubTitle, setWindowEditionInfo } = useWindowToolsMF();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (isFlagPresent) {
|
|
11
|
+
setWindowTitle(getLabel(dictionaryIdForName));
|
|
12
|
+
if (subtitle) {
|
|
13
|
+
setWindowSubTitle(subtitle);
|
|
14
|
+
}
|
|
15
|
+
if (editionInfo) {
|
|
16
|
+
setWindowEditionInfo(editionInfo);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}, [getLabel, isFlagPresent, subtitle, editionInfo]);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
useUpdateWindowTitleAndEditionInfoMF as u
|
|
23
|
+
};
|
|
@@ -18,7 +18,10 @@ function MasterDetailLayout(props) {
|
|
|
18
18
|
moduleActions,
|
|
19
19
|
version,
|
|
20
20
|
buildTime,
|
|
21
|
-
splitPosition
|
|
21
|
+
splitPosition,
|
|
22
|
+
moduleNameField,
|
|
23
|
+
subtitle,
|
|
24
|
+
editionInfo
|
|
22
25
|
} = props;
|
|
23
26
|
const { host_static_assets, environment_assets } = useEnvironment();
|
|
24
27
|
const [splitPositionState, setSplitPositionState] = useState(splitPosition ?? "vertical");
|
|
@@ -100,6 +103,9 @@ function MasterDetailLayout(props) {
|
|
|
100
103
|
moduleActions: finalModuleActions,
|
|
101
104
|
version,
|
|
102
105
|
buildTime,
|
|
106
|
+
moduleNameField,
|
|
107
|
+
subtitle,
|
|
108
|
+
editionInfo,
|
|
103
109
|
children: /* @__PURE__ */ jsx(
|
|
104
110
|
SplitLayout,
|
|
105
111
|
{
|
|
@@ -3,8 +3,9 @@ import { ModalProvider } from "@m4l/components";
|
|
|
3
3
|
import { forwardRef, useRef, useImperativeHandle } from "react";
|
|
4
4
|
import { B as BaseModuleLayout } from "./subcomponents/BaseModuleLayout/index.js";
|
|
5
5
|
import { a as ModuleProvider } from "./contexts/ModuleContext/index.js";
|
|
6
|
+
import { u as useUpdateWindowTitleAndEditionInfoMF } from "../../hooks/useUpdateWindowTitleAndEditionInfoMF/useUpdateWindowTitleAndEditionInfoMF.js";
|
|
6
7
|
const ModuleLayout = forwardRef((props, ref) => {
|
|
7
|
-
const { moduleId, moduleActions, version, children, buildTime } = props;
|
|
8
|
+
const { moduleId, moduleActions, version, children, buildTime, moduleNameField, subtitle, editionInfo } = props;
|
|
8
9
|
const moduleRef = useRef(null);
|
|
9
10
|
const closeModal = () => {
|
|
10
11
|
moduleRef.current?.closeModal();
|
|
@@ -17,6 +18,11 @@ const ModuleLayout = forwardRef((props, ref) => {
|
|
|
17
18
|
closeModal,
|
|
18
19
|
current: moduleRef.current
|
|
19
20
|
}));
|
|
21
|
+
useUpdateWindowTitleAndEditionInfoMF({
|
|
22
|
+
moduleNameField,
|
|
23
|
+
subtitle,
|
|
24
|
+
editionInfo
|
|
25
|
+
});
|
|
20
26
|
return /* @__PURE__ */ jsx(
|
|
21
27
|
ModuleProvider,
|
|
22
28
|
{
|
|
@@ -5,6 +5,7 @@ import { ModuleLayoutSlots } from './slots/ModuleLayoutEnum';
|
|
|
5
5
|
import { OverridesStyleRules } from '@mui/material/styles/overrides';
|
|
6
6
|
import { MODULE_LAYOUT_KEY } from './constants';
|
|
7
7
|
import { Theme } from '@mui/material/styles';
|
|
8
|
+
import { ModuleNameField } from '../../hooks/useUpdateWindowTitleAndEditionInfoMF/types';
|
|
8
9
|
export interface ContainerProps {
|
|
9
10
|
vertical: boolean;
|
|
10
11
|
}
|
|
@@ -19,6 +20,9 @@ export interface ModuleLayoutProps {
|
|
|
19
20
|
children: ReactNode;
|
|
20
21
|
version: string;
|
|
21
22
|
buildTime?: string;
|
|
23
|
+
moduleNameField?: ModuleNameField;
|
|
24
|
+
subtitle?: string;
|
|
25
|
+
editionInfo?: string;
|
|
22
26
|
}
|
|
23
27
|
export type ModuleLayoutSlotsType = keyof typeof ModuleLayoutSlots;
|
|
24
28
|
export type ModuleLayoutStyles = OverridesStyleRules<ModuleLayoutSlotsType, typeof MODULE_LAYOUT_KEY, Theme>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m4l/layouts",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.4",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": "M4L Team ",
|
|
6
6
|
"lint-staged": {
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
},
|
|
15
15
|
"resolutions": {
|
|
16
16
|
"glob": "^10.4.5",
|
|
17
|
-
"react": "
|
|
18
|
-
"@types/react": "
|
|
19
|
-
"@types/react-dom": "
|
|
20
|
-
"react-dom": "
|
|
17
|
+
"react": "18.3.1",
|
|
18
|
+
"@types/react": "18.3.23",
|
|
19
|
+
"@types/react-dom": "18.3.7",
|
|
20
|
+
"react-dom": "18.3.1",
|
|
21
21
|
"@vitejs/plugin-react": "^4.0.0",
|
|
22
22
|
"storybook": "^8.3.4"
|
|
23
23
|
},
|
|
24
24
|
"overrides": {
|
|
25
25
|
"glob": "^10.4.5",
|
|
26
|
-
"eslint": "
|
|
27
|
-
"react": "
|
|
28
|
-
"@types/react": "
|
|
29
|
-
"@types/react-dom": "
|
|
30
|
-
"react-dom": "
|
|
26
|
+
"eslint": "9.28.0",
|
|
27
|
+
"react": "18.3.1",
|
|
28
|
+
"@types/react": "18.3.23",
|
|
29
|
+
"@types/react-dom": "18.3.7",
|
|
30
|
+
"react-dom": "18.3.1"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"*"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from "react";
|
|
3
|
-
import { useSetWindowsTitle } from "@m4l/components";
|
|
4
|
-
function MFWindowsTitle({ isAddEditModule = false, children }) {
|
|
5
|
-
useSetWindowsTitle({ isAddEditModule });
|
|
6
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
MFWindowsTitle as M
|
|
10
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './MFWindowsTitle';
|
|
File without changes
|