@m4l/layouts 2.0.1 → 2.0.2
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/{index-CKsHsRY8.js → index-_3WAKrrA.js} +7 -2
- package/components/MFHostApp/index.d.ts +1 -1
- package/components/MFHostApp/types.d.ts +5 -0
- package/components/MFWindowsTitle/MFWindowsTitle.d.ts +3 -0
- package/components/MFWindowsTitle/index.d.ts +1 -0
- package/components/MFWindowsTitle/types.d.ts +5 -0
- package/components/{index-BydiHRF0.js → index-uQ5qk7MJ.js} +15 -2
- package/index.js +10 -10
- package/m4l_layouts/types.d.ts +0 -1
- package/package.json +1 -1
- package/vite-env.d.ts +3 -3
|
@@ -3,6 +3,7 @@ import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryP
|
|
|
3
3
|
import { LocalesProvider, HostThemeProvider, ResponsiveContainerProvider, FormatterProvider } from "@m4l/graphics";
|
|
4
4
|
import { BaseModule, WindowToolsMFProvider, DynamicMFParmsProvider } from "@m4l/components";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { M as MFWindowsTitle } from "../index-uQ5qk7MJ.js";
|
|
6
7
|
function MFHostApp(props) {
|
|
7
8
|
const {
|
|
8
9
|
children,
|
|
@@ -20,7 +21,8 @@ function MFHostApp(props) {
|
|
|
20
21
|
componentsDictionary,
|
|
21
22
|
dynamicMFStore,
|
|
22
23
|
windowTools,
|
|
23
|
-
observedDivRef
|
|
24
|
+
observedDivRef,
|
|
25
|
+
isAddEditModule = false
|
|
24
26
|
} = props;
|
|
25
27
|
return /* @__PURE__ */ jsx(EnvironmentProvider, {
|
|
26
28
|
...environment,
|
|
@@ -59,7 +61,10 @@ function MFHostApp(props) {
|
|
|
59
61
|
...windowTools,
|
|
60
62
|
children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
|
|
61
63
|
store: dynamicMFStore,
|
|
62
|
-
children
|
|
64
|
+
children: /* @__PURE__ */ jsx(MFWindowsTitle, {
|
|
65
|
+
isAddEditModule,
|
|
66
|
+
children
|
|
67
|
+
})
|
|
63
68
|
})
|
|
64
69
|
})
|
|
65
70
|
})
|
|
@@ -12,5 +12,10 @@ export interface ByHostProps {
|
|
|
12
12
|
dynamicMFStore: DynamicMFStore;
|
|
13
13
|
windowTools: WindowToolsMF;
|
|
14
14
|
observedDivRef: Element | Text | null;
|
|
15
|
+
/**
|
|
16
|
+
* isAddEditModule saber si el módulo es tipo add/edit, para poder asignar el title automáticamente
|
|
17
|
+
* cuando se cambia el idioma, desde MFHostApp/MFWindowsTitle
|
|
18
|
+
*/
|
|
19
|
+
isAddEditModule?: boolean;
|
|
15
20
|
}
|
|
16
21
|
export declare type MFHostAppProps = ByHostProps & BaseModuleProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MFWindowsTitle';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DomainCountryProvider } from "@m4l/core";
|
|
2
2
|
import { FormatterProvider, ResponsiveContainerProvider } from "@m4l/graphics";
|
|
3
|
-
import { BaseModule } from "@m4l/components";
|
|
3
|
+
import { BaseModule, useSetWindowsTitle } from "@m4l/components";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Fragment } from "react";
|
|
5
6
|
function MFNoAuthApp(props) {
|
|
6
7
|
const {
|
|
7
8
|
children,
|
|
@@ -42,6 +43,18 @@ function MFNoAuthApp(props) {
|
|
|
42
43
|
})
|
|
43
44
|
});
|
|
44
45
|
}
|
|
46
|
+
function MFWindowsTitle({
|
|
47
|
+
isAddEditModule = false,
|
|
48
|
+
children
|
|
49
|
+
}) {
|
|
50
|
+
useSetWindowsTitle({
|
|
51
|
+
isAddEditModule
|
|
52
|
+
});
|
|
53
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
54
|
+
children
|
|
55
|
+
});
|
|
56
|
+
}
|
|
45
57
|
export {
|
|
46
|
-
|
|
58
|
+
MFWindowsTitle as M,
|
|
59
|
+
MFNoAuthApp as a
|
|
47
60
|
};
|
package/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { M
|
|
3
|
-
import { A, a } from "./contexts/AuthContext/index-DARkRRM4.js";
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as
|
|
1
|
+
import { a } from "./components/index-uQ5qk7MJ.js";
|
|
2
|
+
import { M } from "./components/MFHostApp/index-_3WAKrrA.js";
|
|
3
|
+
import { A, a as a2 } from "./contexts/AuthContext/index-DARkRRM4.js";
|
|
4
|
+
import { a as a3, d, g } from "./layouts/ModuleLayout/index-DAtDuh6s.js";
|
|
5
|
+
import { a as a4, d as d2, g as g2 } from "./layouts/MasterDetailLayout/index-DeC4RoBs.js";
|
|
6
6
|
import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index-BxJ0vCUq.js";
|
|
7
7
|
import { u } from "./hooks/useMasterDetail/index-D4QUQYYc.js";
|
|
8
8
|
import { u as u2 } from "./hooks/useAuth/index-8hAi3guc.js";
|
|
9
9
|
import { u as u3 } from "./hooks/useModule/index-FY5nsBmE.js";
|
|
10
10
|
export {
|
|
11
11
|
A as AuthContext,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
a2 as AuthProvider,
|
|
13
|
+
M as MFHostApp,
|
|
14
|
+
a as MFNoAuthApp,
|
|
15
|
+
a4 as MasterDetailLayout,
|
|
16
|
+
a3 as ModuleLayout,
|
|
17
17
|
N as NoAuthModuleLayout,
|
|
18
18
|
d2 as defaultMasterDetailDictionary,
|
|
19
19
|
d as defaultModuleLayoutDictionary,
|
package/m4l_layouts/types.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/package.json
CHANGED
package/vite-env.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
/// <reference types="vitest" />
|
|
3
|
-
/// <reference types="vitest/importMeta" />
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
/// <reference types="vitest" />
|
|
3
|
+
/// <reference types="vitest/importMeta" />
|