@m4l/layouts 0.1.46 → 0.1.48

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.
Files changed (58) hide show
  1. package/components/BaseModule/{index.6659c50e.js → index.8ff0193e.js} +5 -2
  2. package/components/MFHostApp/{index.dbfb66ee.js → index.f1572ad5.js} +3 -1
  3. package/components/MFIsolationApp/{index.43c26757.js → index.a9aba4f3.js} +5 -7
  4. package/components/{index.2a8eff7c.js → index.266accff.js} +7 -2
  5. package/contexts/index.b46a2699.js +1 -0
  6. package/hooks/index.a4c94ade.js +4 -0
  7. package/index.js +6 -6
  8. package/layouts/NoAuthModuleLayout/{index.7ba635bb.js → index.debab3d6.js} +3 -3
  9. package/layouts/index.6b2834e6.js +8 -0
  10. package/{components → m4l_layouts/src/components}/BaseModule/types.d.ts +1 -0
  11. package/m4l_layouts/src/vite-env.d.ts +3 -0
  12. package/package.json +1 -1
  13. package/contexts/index.ee173661.js +0 -1
  14. package/hooks/index.77acdde7.js +0 -1
  15. package/layouts/index.417b6868.js +0 -1
  16. /package/{components → m4l_layouts/src/components}/BaseModule/index.d.ts +0 -0
  17. /package/{components → m4l_layouts/src/components}/MFHostApp/index.d.ts +0 -0
  18. /package/{components → m4l_layouts/src/components}/MFHostApp/types.d.ts +0 -0
  19. /package/{components → m4l_layouts/src/components}/MFIsolationApp/index.d.ts +0 -0
  20. /package/{components → m4l_layouts/src/components}/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -0
  21. /package/{components → m4l_layouts/src/components}/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -0
  22. /package/{components → m4l_layouts/src/components}/MFIsolationApp/types.d.ts +0 -0
  23. /package/{components → m4l_layouts/src/components}/MFNoAuthApp/index.d.ts +0 -0
  24. /package/{components → m4l_layouts/src/components}/MFNoAuthApp/types.d.ts +0 -0
  25. /package/{components → m4l_layouts/src/components}/index.d.ts +0 -0
  26. /package/{contexts → m4l_layouts/src/contexts}/AuthContext/index.d.ts +0 -0
  27. /package/{contexts → m4l_layouts/src/contexts}/AuthContext/types.d.ts +0 -0
  28. /package/{contexts → m4l_layouts/src/contexts}/index.d.ts +0 -0
  29. /package/{hooks → m4l_layouts/src/hooks}/index.d.ts +0 -0
  30. /package/{hooks → m4l_layouts/src/hooks}/useAuth/index.d.ts +0 -0
  31. /package/{hooks → m4l_layouts/src/hooks}/useMasterDetail/index.d.ts +0 -0
  32. /package/{hooks → m4l_layouts/src/hooks}/useModule/index.d.ts +0 -0
  33. /package/{index.d.ts → m4l_layouts/src/index.d.ts} +0 -0
  34. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/MasterDetailLayout.d.ts +0 -0
  35. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/classes/constants.d.ts +0 -0
  36. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/classes/index.d.ts +0 -0
  37. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/classes/types.d.ts +0 -0
  38. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/contexts/MasterDetailContext/index.d.ts +0 -0
  39. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/contexts/MasterDetailContext/types.d.ts +0 -0
  40. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/dicctionary.d.ts +0 -0
  41. /package/{layouts → m4l_layouts/src/layouts}/MasterDetailLayout/types.d.ts +0 -0
  42. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/ModuleLayout.d.ts +0 -0
  43. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/classes/constants.d.ts +0 -0
  44. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/classes/index.d.ts +0 -0
  45. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/classes/types.d.ts +0 -0
  46. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/contexts/ModuleContext/index.d.ts +0 -0
  47. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/contexts/ModuleContext/types.d.ts +0 -0
  48. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/dicctionary.d.ts +0 -0
  49. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  50. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/subcomponents/InnerModule/types.d.ts +0 -0
  51. /package/{layouts → m4l_layouts/src/layouts}/ModuleLayout/types.d.ts +0 -0
  52. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/dicctionary.d.ts +0 -0
  53. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/index.d.ts +0 -0
  54. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/index.d.ts +0 -0
  55. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/DesktopContent/index.d.ts +0 -0
  56. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/subcomponents/InnerModule/subcomponents/MobileContent/index.d.ts +0 -0
  57. /package/{layouts → m4l_layouts/src/layouts}/NoAuthModuleLayout/types.d.ts +0 -0
  58. /package/{layouts → m4l_layouts/src/layouts}/index.d.ts +0 -0
@@ -5,6 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  function BaseModule(props) {
6
6
  const {
7
7
  children,
8
+ isAuth = true,
8
9
  moduleId,
9
10
  moduleNameField,
10
11
  skeletonFlags,
@@ -14,18 +15,20 @@ function BaseModule(props) {
14
15
  const localeString = useLocales().currentLocale?.localeString;
15
16
  return /* @__PURE__ */ jsx(FlagsProvider, {
16
17
  children: /* @__PURE__ */ jsx(ModuleDictionaryProvider, {
17
- isAuth: true,
18
+ isAuth,
18
19
  moduleId,
19
20
  moduleNameField,
20
21
  componentsDictionary,
21
22
  currentLang: localeString,
22
23
  children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, {
23
24
  flags: skeletonFlags,
24
- children: /* @__PURE__ */ jsx(ModulePrivilegesProvider, {
25
+ children: isAuth ? /* @__PURE__ */ jsx(ModulePrivilegesProvider, {
25
26
  queryPrivileges: privileges,
26
27
  children: /* @__PURE__ */ jsx(ModalProvider, {
27
28
  children
28
29
  })
30
+ }) : /* @__PURE__ */ jsx(ModalProvider, {
31
+ children
29
32
  })
30
33
  })
31
34
  })
@@ -2,7 +2,7 @@ import { unstable_HistoryRouter } from "react-router-dom";
2
2
  import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
3
  import { LocalesProvider, HostThemeProvider, FormatterProvider } from "@m4l/graphics";
4
4
  import { WindowToolsMFProvider, DynamicMFParmsProvider } from "@m4l/components";
5
- import { B as BaseModule } from "../BaseModule/index.6659c50e.js";
5
+ import { B as BaseModule } from "../BaseModule/index.8ff0193e.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  function MFHostApp(props) {
8
8
  const {
@@ -13,6 +13,7 @@ function MFHostApp(props) {
13
13
  hostTools,
14
14
  axiosOperation,
15
15
  formatters,
16
+ isAuth = true,
16
17
  moduleId,
17
18
  moduleNameField,
18
19
  skeletonFlags,
@@ -43,6 +44,7 @@ function MFHostApp(props) {
43
44
  decimal_symbol: formatters.numberFormatter.decimalSymbol,
44
45
  thousands_symbol: formatters.numberFormatter.thousandsSymbol,
45
46
  children: /* @__PURE__ */ jsx(BaseModule, {
47
+ isAuth,
46
48
  moduleId,
47
49
  moduleNameField,
48
50
  componentsDictionary,
@@ -1,6 +1,6 @@
1
1
  import { useEffect, useMemo, useCallback } from "react";
2
2
  import { unstable_HistoryRouter } from "react-router-dom";
3
- import { toast } from "react-toastify";
3
+ import { ToastContainer, toast } from "react-toastify";
4
4
  import { HostThemeProvider, GlobalStyles, FormatterProvider, LocalesProvider, getLocaleFromNetwork } 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";
@@ -9,10 +9,10 @@ import EventEmitter from "eventemitter3";
9
9
  import { format } from "date-fns";
10
10
  import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
11
11
  import { u as useAuth } from "../../hooks/useAuth/index.cb6a3420.js";
12
- import { ToastContainer, AreasProvider } from "@m4l/components";
13
12
  import { jsx, jsxs } from "react/jsx-runtime";
14
13
  import NProgress from "nprogress";
15
- import { B as BaseModule } from "../BaseModule/index.6659c50e.js";
14
+ import { B as BaseModule } from "../BaseModule/index.8ff0193e.js";
15
+ import { AreasProvider } from "@m4l/components";
16
16
  function MFAuthApp(props) {
17
17
  const {
18
18
  children,
@@ -52,7 +52,7 @@ function MFAuthApp(props) {
52
52
  hostThemeOptions: defaultThemeOptions,
53
53
  fnComponentsOverrides,
54
54
  isMicroFrontEnd: true,
55
- children: [/* @__PURE__ */ jsx(GlobalStyles, {}), /* @__PURE__ */ jsx(DomainCountryProvider, {
55
+ children: [/* @__PURE__ */ jsx(ToastContainer, {}), /* @__PURE__ */ jsx(GlobalStyles, {}), /* @__PURE__ */ jsx(DomainCountryProvider, {
56
56
  ...domianCountry,
57
57
  isMicroFrontEnd: false,
58
58
  children: /* @__PURE__ */ jsx(FormatterProvider, {
@@ -64,9 +64,7 @@ function MFAuthApp(props) {
64
64
  code: domianCountry.currency,
65
65
  decimalDigits: domianCountry.currency_decimal_digits
66
66
  },
67
- children: /* @__PURE__ */ jsx(ToastContainer, {
68
- children
69
- })
67
+ children
70
68
  })
71
69
  })]
72
70
  });
@@ -1,7 +1,10 @@
1
1
  import { DomainCountryProvider } from "@m4l/core";
2
2
  import { FormatterProvider } from "@m4l/graphics";
3
- import { B as BaseModule } from "./BaseModule/index.6659c50e.js";
3
+ import { B as BaseModule } from "./BaseModule/index.8ff0193e.js";
4
4
  import { jsx } from "react/jsx-runtime";
5
+ import "./MFIsolationApp/index.a9aba4f3.js";
6
+ import "@m4l/components";
7
+ import "react-router-dom";
5
8
  function MFNoAuthApp(props) {
6
9
  const {
7
10
  children,
@@ -10,7 +13,8 @@ function MFNoAuthApp(props) {
10
13
  moduleNameField,
11
14
  skeletonFlags,
12
15
  privileges,
13
- componentsDictionary
16
+ componentsDictionary,
17
+ isAuth
14
18
  } = props;
15
19
  const domianCountry = {
16
20
  id: 1,
@@ -23,6 +27,7 @@ function MFNoAuthApp(props) {
23
27
  isMicroFrontEnd: true,
24
28
  ...domianCountry,
25
29
  children: /* @__PURE__ */ jsx(BaseModule, {
30
+ isAuth,
26
31
  moduleId,
27
32
  moduleNameField,
28
33
  componentsDictionary,
@@ -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.43c26757.js";
2
- import { M as M2 } from "./components/index.2a8eff7c.js";
3
- import { M as M3 } from "./components/MFHostApp/index.dbfb66ee.js";
4
- import { B } from "./components/BaseModule/index.6659c50e.js";
1
+ import { M } from "./components/MFIsolationApp/index.a9aba4f3.js";
2
+ import { M as M2 } from "./components/index.266accff.js";
3
+ import { M as M3 } from "./components/MFHostApp/index.f1572ad5.js";
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.7ba635bb.js";
8
+ import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index.debab3d6.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";
@@ -18,9 +18,9 @@ import "history";
18
18
  import "eventemitter3";
19
19
  import "date-fns";
20
20
  import "@m4l/styles";
21
- import "@m4l/components";
22
21
  import "react/jsx-runtime";
23
22
  import "nprogress";
23
+ import "@m4l/components";
24
24
  import "@mui/material/styles";
25
25
  import "@mui/material";
26
26
  import "@mui/base";
@@ -36,7 +36,7 @@ const DesktopContentRoot = styled("div")(({ theme }) => ({
36
36
  },
37
37
  "& .M4LIconButton-root.config-icon": {
38
38
  position: "absolute",
39
- top: "22px",
39
+ top: "25px",
40
40
  right: "56px",
41
41
  zIndex: 1
42
42
  }
@@ -46,7 +46,7 @@ const DesktopBanner = styled("div")(({ theme }) => ({
46
46
  flexDirection: "column",
47
47
  justifyContent: "center",
48
48
  alignItems: "center",
49
- borderRadius: "16px",
49
+ borderRadius: "12px",
50
50
  width: "100%",
51
51
  maxWidth: "400px",
52
52
  height: "100%",
@@ -229,7 +229,7 @@ const MobileBanner = styled("div")(({ theme }) => ({
229
229
  },
230
230
  "& .M4LIconButton-root.config-icon": {
231
231
  position: "absolute",
232
- top: "8px",
232
+ top: "13px",
233
233
  right: "40px",
234
234
  zIndex: 1,
235
235
  "& .M4LIcon-root .M4LIcon-icon": {
@@ -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.debab3d6.js";
@@ -5,5 +5,6 @@ export declare type BaseModuleProps = {
5
5
  moduleNameField?: string;
6
6
  privileges: string[];
7
7
  componentsDictionary: string[];
8
+ isAuth?: boolean;
8
9
  children: ReactNode;
9
10
  };
@@ -0,0 +1,3 @@
1
+ /// <reference types="vite/client" />
2
+ /// <reference types="vitest" />
3
+ /// <reference types="vitest/importMeta" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "0.1.46",
3
+ "version": "0.1.48",
4
4
  "license": "UNLICENSED",
5
5
  "dependencies": {
6
6
  "@m4l/components": "*",
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
File without changes
File without changes
File without changes