@m4l/layouts 0.1.51 → 0.1.53

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.
@@ -0,0 +1,79 @@
1
+ import { unstable_HistoryRouter } from "react-router-dom";
2
+ import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
+ import { LocalesProvider, HostThemeProvider, ResponsiveContainerProvider, FormatterProvider } from "@m4l/graphics";
4
+ import { WindowToolsMFProvider, DynamicMFParmsProvider } from "@m4l/components";
5
+ import { B as BaseModule } from "../BaseModule/index.8ff0193e.js";
6
+ import { jsx } from "react/jsx-runtime";
7
+ function MFHostApp(props) {
8
+ const {
9
+ children,
10
+ currentLocale,
11
+ hostTheme,
12
+ environment,
13
+ hostTools,
14
+ axiosOperation,
15
+ formatters,
16
+ isAuth = true,
17
+ moduleId,
18
+ moduleNameField,
19
+ skeletonFlags,
20
+ privileges,
21
+ componentsDictionary,
22
+ dynamicMFStore,
23
+ windowTools,
24
+ observedDivRef
25
+ } = props;
26
+ return /* @__PURE__ */ jsx(EnvironmentProvider, {
27
+ ...environment,
28
+ children: /* @__PURE__ */ jsx(HostToolsProvider, {
29
+ ...hostTools,
30
+ children: /* @__PURE__ */ jsx(NetworkProvider, {
31
+ axiosOperation,
32
+ children: /* @__PURE__ */ jsx(LocalesProvider, {
33
+ isMicroFrontEnd: true,
34
+ localeHost: currentLocale,
35
+ children: /* @__PURE__ */ jsx(HostThemeProvider, {
36
+ isMicroFrontEnd: true,
37
+ ...hostTheme,
38
+ children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
39
+ observedDivRef,
40
+ children: /* @__PURE__ */ jsx(unstable_HistoryRouter, {
41
+ history: hostTools.history,
42
+ children: /* @__PURE__ */ jsx(DomainCountryProvider, {
43
+ isMicroFrontEnd: true,
44
+ id: dynamicMFStore?.getState().dynamicMFParameters?.id || 1,
45
+ currency: formatters.currencyFormatter.code,
46
+ currency_decimal_digits: formatters.currencyFormatter.decimalDigits,
47
+ decimal_symbol: formatters.numberFormatter.decimalSymbol,
48
+ thousands_symbol: formatters.numberFormatter.thousandsSymbol,
49
+ children: /* @__PURE__ */ jsx(BaseModule, {
50
+ isAuth,
51
+ moduleId,
52
+ moduleNameField,
53
+ componentsDictionary,
54
+ skeletonFlags,
55
+ privileges,
56
+ children: /* @__PURE__ */ jsx(FormatterProvider, {
57
+ isMicroFrontEnd: true,
58
+ ...formatters,
59
+ children: /* @__PURE__ */ jsx(WindowToolsMFProvider, {
60
+ ...windowTools,
61
+ children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
62
+ store: dynamicMFStore,
63
+ children
64
+ })
65
+ })
66
+ })
67
+ })
68
+ })
69
+ })
70
+ })
71
+ })
72
+ })
73
+ })
74
+ })
75
+ });
76
+ }
77
+ export {
78
+ MFHostApp as M
79
+ };
@@ -12,5 +12,6 @@ export interface ByHostProps {
12
12
  formatters: Formatters;
13
13
  dynamicMFStore: DynamicMFStore;
14
14
  windowTools: WindowToolsMF;
15
+ observedDivRef: Element | Text | null;
15
16
  }
16
17
  export declare type MFHostAppProps = ByHostProps & BaseModuleProps;
@@ -1,7 +1,7 @@
1
1
  import { useEffect, useMemo, useCallback } from "react";
2
2
  import { unstable_HistoryRouter } from "react-router-dom";
3
3
  import { ToastContainer, toast } from "react-toastify";
4
- import { HostThemeProvider, GlobalStyles, FormatterProvider, LocalesProvider, getLocaleFromNetwork } from "@m4l/graphics";
4
+ import { HostThemeProvider, GlobalStyles, FormatterProvider, LocalesProvider, getLocaleFromNetwork, ResponsiveContainerProvider } from "@m4l/graphics";
5
5
  import { A as AuthProvider } from "../../contexts/AuthContext/index.6f966215.js";
6
6
  import { DomainCountryProvider, EnvironmentProvider, HostToolsProvider, NetworkProvider, axiosOperation } from "@m4l/core";
7
7
  import { createBrowserHistory } from "history";
@@ -88,7 +88,8 @@ function MFIsolationApp(props) {
88
88
  componentsDictionary,
89
89
  onLoad,
90
90
  activeAreasNetwork = false,
91
- activeCookiesFromNetwork = false
91
+ activeCookiesFromNetwork = false,
92
+ observedDivRef
92
93
  } = props;
93
94
  const eventEmitter = useMemo(() => new EventEmitter(), []);
94
95
  const events_add_listener = useCallback((eventName, handler) => {
@@ -159,7 +160,10 @@ function MFIsolationApp(props) {
159
160
  onSelectLayout: (modId) => {
160
161
  console.log("onSelectLayout", modId);
161
162
  },
162
- children
163
+ children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
164
+ observedDivRef,
165
+ children
166
+ })
163
167
  })
164
168
  })
165
169
  })
@@ -9,4 +9,5 @@ export declare type MFIsolationAppProps = BaseModuleProps & {
9
9
  onLoad: () => void;
10
10
  activeAreasNetwork?: boolean;
11
11
  activeCookiesFromNetwork?: boolean;
12
+ observedDivRef: Element | Text | null;
12
13
  };
@@ -5,4 +5,6 @@ export interface ByHostProps {
5
5
  formatters: Formatters;
6
6
  windowTools: WindowToolsMF;
7
7
  }
8
- export declare type MFNoAuthAppProps = ByHostProps & BaseModuleProps;
8
+ export interface MFNoAuthAppProps extends ByHostProps, BaseModuleProps {
9
+ observedDivRef: Element | Text | null;
10
+ }
@@ -1,7 +1,10 @@
1
1
  import { DomainCountryProvider } from "@m4l/core";
2
- import { FormatterProvider } from "@m4l/graphics";
2
+ import { FormatterProvider, ResponsiveContainerProvider } from "@m4l/graphics";
3
3
  import { B as BaseModule } from "./BaseModule/index.8ff0193e.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
+ import "./MFIsolationApp/index.accbc94b.js";
6
+ import "@m4l/components";
7
+ import "react-router-dom";
5
8
  function MFNoAuthApp(props) {
6
9
  const {
7
10
  children,
@@ -11,7 +14,8 @@ function MFNoAuthApp(props) {
11
14
  skeletonFlags,
12
15
  privileges,
13
16
  componentsDictionary,
14
- isAuth
17
+ isAuth,
18
+ observedDivRef
15
19
  } = props;
16
20
  const domianCountry = {
17
21
  id: 1,
@@ -33,7 +37,10 @@ function MFNoAuthApp(props) {
33
37
  children: /* @__PURE__ */ jsx(FormatterProvider, {
34
38
  isMicroFrontEnd: true,
35
39
  ...formatters,
36
- children
40
+ children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
41
+ observedDivRef,
42
+ children
43
+ })
37
44
  })
38
45
  })
39
46
  });
@@ -0,0 +1 @@
1
+ import "./AuthContext/index.6f966215.js";
@@ -0,0 +1,4 @@
1
+ import "react";
2
+ import "../layouts/MasterDetailLayout/index.748f7ada.js";
3
+ import "../contexts/AuthContext/index.6f966215.js";
4
+ import "../layouts/ModuleLayout/index.e7218171.js";
package/index.js CHANGED
@@ -1,11 +1,11 @@
1
- import { M } from "./components/MFIsolationApp/index.a9aba4f3.js";
2
- import { M as M2 } from "./components/index.717728f9.js";
3
- import { M as M3 } from "./components/MFHostApp/index.f1572ad5.js";
1
+ import { M } from "./components/MFIsolationApp/index.accbc94b.js";
2
+ import { M as M2 } from "./components/index.8cbf6c63.js";
3
+ import { M as M3 } from "./components/MFHostApp/index.401a303e.js";
4
4
  import { B } from "./components/BaseModule/index.8ff0193e.js";
5
5
  import { a, A } from "./contexts/AuthContext/index.6f966215.js";
6
6
  import { a as a2, d, g } from "./layouts/ModuleLayout/index.e7218171.js";
7
7
  import { a as a3, d as d2, g as g2 } from "./layouts/MasterDetailLayout/index.748f7ada.js";
8
- import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index.debab3d6.js";
8
+ import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index.f831ed51.js";
9
9
  import { u } from "./hooks/useMasterDetail/index.d45f2a86.js";
10
10
  import { u as u2 } from "./hooks/useAuth/index.cb6a3420.js";
11
11
  import { u as u3 } from "./hooks/useModule/index.b5f598b1.js";
@@ -1,7 +1,8 @@
1
1
  import { useResponsiveDesktop, useLocales } from "@m4l/graphics";
2
2
  import { LanguagePopover, IconButton, Image, Typography, Stack, ScrollBar, HelmetPage } from "@m4l/components";
3
- import { styled, alpha } from "@mui/material/styles";
3
+ import { styled } from "@mui/material";
4
4
  import { useBase, useModuleDictionary, useDomain, useEnvironment, BaseProvider, FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider } from "@m4l/core";
5
+ import { styled as styled$1, alpha } from "@mui/material/styles";
5
6
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
6
7
  const InnerModuleRoot = styled("div")(({
7
8
  theme
@@ -16,7 +17,7 @@ const InnerModuleRoot = styled("div")(({
16
17
  padding: "0px"
17
18
  }
18
19
  }));
19
- const DesktopContentRoot = styled("div")(({ theme }) => ({
20
+ const DesktopContentRoot = styled$1("div")(({ theme }) => ({
20
21
  display: "flex",
21
22
  borderRadius: "16px",
22
23
  backgroundColor: theme.palette.background.neutral,
@@ -41,7 +42,7 @@ const DesktopContentRoot = styled("div")(({ theme }) => ({
41
42
  zIndex: 1
42
43
  }
43
44
  }));
44
- const DesktopBanner = styled("div")(({ theme }) => ({
45
+ const DesktopBanner = styled$1("div")(({ theme }) => ({
45
46
  display: "flex",
46
47
  flexDirection: "column",
47
48
  justifyContent: "center",
@@ -67,7 +68,7 @@ const DesktopBanner = styled("div")(({ theme }) => ({
67
68
  margin: "auto"
68
69
  }
69
70
  }));
70
- const ContainerLogo$1 = styled("div")(({ theme }) => ({
71
+ const ContainerLogo$1 = styled$1("div")(({ theme }) => ({
71
72
  display: "flex",
72
73
  width: "84px",
73
74
  height: "84px",
@@ -81,19 +82,19 @@ const ContainerLogo$1 = styled("div")(({ theme }) => ({
81
82
  borderRadius: "6px"
82
83
  }
83
84
  }));
84
- const CompanyName$1 = styled("div")(() => ({
85
+ const CompanyName$1 = styled$1("div")(() => ({
85
86
  display: "flex",
86
87
  flexDirection: "column",
87
88
  gap: "5px",
88
89
  width: "100%"
89
90
  }));
90
- const CompanyLeyend = styled("div")(() => ({
91
+ const CompanyLeyend = styled$1("div")(() => ({
91
92
  display: "flex",
92
93
  flexDirection: "column",
93
94
  gap: "5px",
94
95
  width: "100%"
95
96
  }));
96
- const FormContent$1 = styled("div")(() => ({
97
+ const FormContent$1 = styled$1("div")(() => ({
97
98
  display: "flex",
98
99
  flexDirection: "column",
99
100
  padding: "0 60px 0 80px",
@@ -102,18 +103,18 @@ const FormContent$1 = styled("div")(() => ({
102
103
  height: "auto",
103
104
  gap: "20px"
104
105
  }));
105
- const WrapperFormContent$1 = styled("div")(() => ({
106
+ const WrapperFormContent$1 = styled$1("div")(() => ({
106
107
  display: "flex",
107
108
  width: "100%",
108
109
  height: "100%"
109
110
  }));
110
- const ContainerModuleName$1 = styled("div")(() => ({
111
+ const ContainerModuleName$1 = styled$1("div")(() => ({
111
112
  display: "flex",
112
113
  flexDirection: "column",
113
114
  width: "100%",
114
115
  gap: "4px"
115
116
  }));
116
- styled("div")(() => ({
117
+ styled$1("div")(() => ({
117
118
  display: "flex",
118
119
  width: "100%",
119
120
  height: "100%",
@@ -202,7 +203,7 @@ const DesktopContent = () => {
202
203
  })]
203
204
  });
204
205
  };
205
- const MobileContentRoot = styled("div")(({ theme }) => ({
206
+ const MobileContentRoot = styled$1("div")(({ theme }) => ({
206
207
  display: "flex",
207
208
  flexDirection: "column",
208
209
  width: "100%",
@@ -211,7 +212,7 @@ const MobileContentRoot = styled("div")(({ theme }) => ({
211
212
  padding: "12px",
212
213
  gap: "32px"
213
214
  }));
214
- const MobileBanner = styled("div")(({ theme }) => ({
215
+ const MobileBanner = styled$1("div")(({ theme }) => ({
215
216
  display: "flex",
216
217
  flexDirection: "column",
217
218
  padding: "12px",
@@ -246,10 +247,10 @@ const MobileBanner = styled("div")(({ theme }) => ({
246
247
  margin: "auto"
247
248
  }
248
249
  }));
249
- styled("div")(() => ({
250
+ styled$1("div")(() => ({
250
251
  display: "flex"
251
252
  }));
252
- const ContainerLogo = styled("div")(({ theme }) => ({
253
+ const ContainerLogo = styled$1("div")(({ theme }) => ({
253
254
  display: "flex",
254
255
  width: "52px",
255
256
  height: "52px",
@@ -263,12 +264,12 @@ const ContainerLogo = styled("div")(({ theme }) => ({
263
264
  borderRadius: "6px"
264
265
  }
265
266
  }));
266
- const CompanyName = styled("div")(() => ({
267
+ const CompanyName = styled$1("div")(() => ({
267
268
  display: "flex",
268
269
  flexDirection: "column",
269
270
  width: "100%"
270
271
  }));
271
- const FormContent = styled("div")(() => ({
272
+ const FormContent = styled$1("div")(() => ({
272
273
  display: "flex",
273
274
  flexDirection: "column",
274
275
  padding: "12px",
@@ -276,13 +277,13 @@ const FormContent = styled("div")(() => ({
276
277
  width: "100%",
277
278
  gap: "20px"
278
279
  }));
279
- const WrapperFormContent = styled("div")(() => ({
280
+ const WrapperFormContent = styled$1("div")(() => ({
280
281
  display: "flex",
281
282
  width: "100%",
282
283
  height: "100%",
283
284
  overflow: "hidden"
284
285
  }));
285
- const ContainerModuleName = styled("div")(() => ({
286
+ const ContainerModuleName = styled$1("div")(() => ({
286
287
  display: "flex",
287
288
  flexDirection: "column",
288
289
  width: "100%",
@@ -0,0 +1,8 @@
1
+ import "./ModuleLayout/index.e7218171.js";
2
+ import "@m4l/components";
3
+ import "react";
4
+ import "@m4l/core";
5
+ import "./MasterDetailLayout/index.748f7ada.js";
6
+ import "@m4l/graphics";
7
+ import "react/jsx-runtime";
8
+ import "./NoAuthModuleLayout/index.f831ed51.js";
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
- "@m4l/components": "^0.2.16",
7
- "@m4l/core": "^0.1.52",
8
- "@m4l/graphics": "^0.1.46",
9
- "@m4l/styles": "^0.0.38",
6
+ "@m4l/components": "*",
7
+ "@m4l/core": "*",
8
+ "@m4l/graphics": "*",
9
+ "@m4l/styles": "*",
10
10
  "@mui/material": "5.10.4"
11
11
  },
12
12
  "peerDependencies": {
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" />
@@ -1,75 +0,0 @@
1
- import { unstable_HistoryRouter } from "react-router-dom";
2
- import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
- import { LocalesProvider, HostThemeProvider, FormatterProvider } from "@m4l/graphics";
4
- import { WindowToolsMFProvider, DynamicMFParmsProvider } from "@m4l/components";
5
- import { B as BaseModule } from "../BaseModule/index.8ff0193e.js";
6
- import { jsx } from "react/jsx-runtime";
7
- function MFHostApp(props) {
8
- const {
9
- children,
10
- currentLocale,
11
- hostTheme,
12
- environment,
13
- hostTools,
14
- axiosOperation,
15
- formatters,
16
- isAuth = true,
17
- moduleId,
18
- moduleNameField,
19
- skeletonFlags,
20
- privileges,
21
- componentsDictionary,
22
- dynamicMFStore,
23
- windowTools
24
- } = props;
25
- return /* @__PURE__ */ jsx(EnvironmentProvider, {
26
- ...environment,
27
- children: /* @__PURE__ */ jsx(HostToolsProvider, {
28
- ...hostTools,
29
- children: /* @__PURE__ */ jsx(NetworkProvider, {
30
- axiosOperation,
31
- children: /* @__PURE__ */ jsx(LocalesProvider, {
32
- isMicroFrontEnd: true,
33
- localeHost: currentLocale,
34
- children: /* @__PURE__ */ jsx(HostThemeProvider, {
35
- isMicroFrontEnd: true,
36
- ...hostTheme,
37
- children: /* @__PURE__ */ jsx(unstable_HistoryRouter, {
38
- history: hostTools.history,
39
- children: /* @__PURE__ */ jsx(DomainCountryProvider, {
40
- isMicroFrontEnd: true,
41
- id: dynamicMFStore?.getState().dynamicMFParameters?.id || 1,
42
- currency: formatters.currencyFormatter.code,
43
- currency_decimal_digits: formatters.currencyFormatter.decimalDigits,
44
- decimal_symbol: formatters.numberFormatter.decimalSymbol,
45
- thousands_symbol: formatters.numberFormatter.thousandsSymbol,
46
- children: /* @__PURE__ */ jsx(BaseModule, {
47
- isAuth,
48
- moduleId,
49
- moduleNameField,
50
- componentsDictionary,
51
- skeletonFlags,
52
- privileges,
53
- children: /* @__PURE__ */ jsx(FormatterProvider, {
54
- isMicroFrontEnd: true,
55
- ...formatters,
56
- children: /* @__PURE__ */ jsx(WindowToolsMFProvider, {
57
- ...windowTools,
58
- children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, {
59
- store: dynamicMFStore,
60
- children
61
- })
62
- })
63
- })
64
- })
65
- })
66
- })
67
- })
68
- })
69
- })
70
- })
71
- });
72
- }
73
- export {
74
- MFHostApp as M
75
- };
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-