@m4l/layouts 0.1.44 → 0.1.45
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/BaseModule/{index.6309486a.js → index.6659c50e.js} +3 -0
- package/components/MFHostApp/{index.420c2626.js → index.dbfb66ee.js} +1 -1
- package/components/MFIsolationApp/{index.e36cf308.js → index.c5ce8b36.js} +1 -1
- package/components/MFNoAuthApp/index.d.ts +4 -0
- package/components/MFNoAuthApp/types.d.ts +8 -0
- package/components/index.2a8eff7c.js +41 -0
- package/components/index.d.ts +1 -0
- package/contexts/index.ee173661.js +1 -0
- package/hooks/index.77acdde7.js +1 -0
- package/hooks/useMasterDetail/{index.4ab110ce.js → index.d45f2a86.js} +1 -1
- package/index.js +8 -6
- package/layouts/MasterDetailLayout/{index.f91d39eb.js → index.748f7ada.js} +4 -16
- package/layouts/index.417b6868.js +1 -0
- package/package.json +1 -1
- package/components/index.aeb3cf83.js +0 -6
- package/contexts/index.b46a2699.js +0 -1
- package/hooks/index.850e8ae2.js +0 -4
- package/layouts/index.de697dc9.js +0 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ModalProvider } from "@m4l/components";
|
|
2
2
|
import { FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, ModulePrivilegesProvider } from "@m4l/core";
|
|
3
|
+
import { useLocales } from "@m4l/graphics";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
function BaseModule(props) {
|
|
5
6
|
const {
|
|
@@ -10,12 +11,14 @@ function BaseModule(props) {
|
|
|
10
11
|
privileges,
|
|
11
12
|
componentsDictionary
|
|
12
13
|
} = props;
|
|
14
|
+
const localeString = useLocales().currentLocale?.localeString;
|
|
13
15
|
return /* @__PURE__ */ jsx(FlagsProvider, {
|
|
14
16
|
children: /* @__PURE__ */ jsx(ModuleDictionaryProvider, {
|
|
15
17
|
isAuth: true,
|
|
16
18
|
moduleId,
|
|
17
19
|
moduleNameField,
|
|
18
20
|
componentsDictionary,
|
|
21
|
+
currentLang: localeString,
|
|
19
22
|
children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, {
|
|
20
23
|
flags: skeletonFlags,
|
|
21
24
|
children: /* @__PURE__ */ jsx(ModulePrivilegesProvider, {
|
|
@@ -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.
|
|
5
|
+
import { B as BaseModule } from "../BaseModule/index.6659c50e.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
function MFHostApp(props) {
|
|
8
8
|
const {
|
|
@@ -11,7 +11,7 @@ import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
|
|
|
11
11
|
import { u as useAuth } from "../../hooks/useAuth/index.cb6a3420.js";
|
|
12
12
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import NProgress from "nprogress";
|
|
14
|
-
import { B as BaseModule } from "../BaseModule/index.
|
|
14
|
+
import { B as BaseModule } from "../BaseModule/index.6659c50e.js";
|
|
15
15
|
import { AreasProvider } from "@m4l/components";
|
|
16
16
|
function MFAuthApp(props) {
|
|
17
17
|
const {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Formatters } from '@m4l/graphics';
|
|
2
|
+
import { WindowToolsMF } from '@m4l/components';
|
|
3
|
+
import { BaseModuleProps } from '../BaseModule/types';
|
|
4
|
+
export interface ByHostProps {
|
|
5
|
+
formatters: Formatters;
|
|
6
|
+
windowTools: WindowToolsMF;
|
|
7
|
+
}
|
|
8
|
+
export declare type MFNoAuthAppProps = ByHostProps & BaseModuleProps;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { DomainCountryProvider } from "@m4l/core";
|
|
2
|
+
import { FormatterProvider } from "@m4l/graphics";
|
|
3
|
+
import { B as BaseModule } from "./BaseModule/index.6659c50e.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function MFNoAuthApp(props) {
|
|
6
|
+
const {
|
|
7
|
+
children,
|
|
8
|
+
formatters,
|
|
9
|
+
moduleId,
|
|
10
|
+
moduleNameField,
|
|
11
|
+
skeletonFlags,
|
|
12
|
+
privileges,
|
|
13
|
+
componentsDictionary
|
|
14
|
+
} = props;
|
|
15
|
+
const domianCountry = {
|
|
16
|
+
id: 1,
|
|
17
|
+
currency: "USD",
|
|
18
|
+
currency_decimal_digits: 2,
|
|
19
|
+
decimal_symbol: ".",
|
|
20
|
+
thousands_symbol: ","
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ jsx(DomainCountryProvider, {
|
|
23
|
+
isMicroFrontEnd: true,
|
|
24
|
+
...domianCountry,
|
|
25
|
+
children: /* @__PURE__ */ jsx(BaseModule, {
|
|
26
|
+
moduleId,
|
|
27
|
+
moduleNameField,
|
|
28
|
+
componentsDictionary,
|
|
29
|
+
skeletonFlags,
|
|
30
|
+
privileges,
|
|
31
|
+
children: /* @__PURE__ */ jsx(FormatterProvider, {
|
|
32
|
+
isMicroFrontEnd: true,
|
|
33
|
+
...formatters,
|
|
34
|
+
children
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
MFNoAuthApp as M
|
|
41
|
+
};
|
package/components/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useContext } from "react";
|
|
2
|
-
import { M as MasterDetailContext } from "../../layouts/MasterDetailLayout/index.
|
|
2
|
+
import { M as MasterDetailContext } from "../../layouts/MasterDetailLayout/index.748f7ada.js";
|
|
3
3
|
const useMasterDetail = () => useContext(MasterDetailContext);
|
|
4
4
|
export {
|
|
5
5
|
useMasterDetail as u
|
package/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { M } from "./components/MFIsolationApp/index.
|
|
2
|
-
import { M as M2 } from "./components/
|
|
3
|
-
import {
|
|
1
|
+
import { M } from "./components/MFIsolationApp/index.c5ce8b36.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";
|
|
4
5
|
import { a, A } from "./contexts/AuthContext/index.6f966215.js";
|
|
5
6
|
import { a as a2, d, g } from "./layouts/ModuleLayout/index.e7218171.js";
|
|
6
|
-
import { a as a3, d as d2, g as g2 } from "./layouts/MasterDetailLayout/index.
|
|
7
|
+
import { a as a3, d as d2, g as g2 } from "./layouts/MasterDetailLayout/index.748f7ada.js";
|
|
7
8
|
import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index.7ba635bb.js";
|
|
8
|
-
import { u } from "./hooks/useMasterDetail/index.
|
|
9
|
+
import { u } from "./hooks/useMasterDetail/index.d45f2a86.js";
|
|
9
10
|
import { u as u2 } from "./hooks/useAuth/index.cb6a3420.js";
|
|
10
11
|
import { u as u3 } from "./hooks/useModule/index.b5f598b1.js";
|
|
11
12
|
import "react";
|
|
@@ -27,8 +28,9 @@ export {
|
|
|
27
28
|
a as AuthContext,
|
|
28
29
|
A as AuthProvider,
|
|
29
30
|
B as BaseModule,
|
|
30
|
-
|
|
31
|
+
M3 as MFHostApp,
|
|
31
32
|
M as MFIsolationApp,
|
|
33
|
+
M2 as MFNoAuthApp,
|
|
32
34
|
a3 as MasterDetailLayout,
|
|
33
35
|
a2 as ModuleLayout,
|
|
34
36
|
N as NoAuthModuleLayout,
|
|
@@ -46,8 +46,8 @@ const useMasterDetailLayoutUtilityClasses = () => {
|
|
|
46
46
|
const MasterDetailLayoutRoot = styled("div")(({ theme }) => ({
|
|
47
47
|
...theme.components?.M4LMasterDetailLayout?.styleOverrides
|
|
48
48
|
}));
|
|
49
|
-
function getTotalModuleActions(splitActions, moduleActions = []
|
|
50
|
-
let totalActions =
|
|
49
|
+
function getTotalModuleActions(splitActions, moduleActions = []) {
|
|
50
|
+
let totalActions = [...splitActions];
|
|
51
51
|
totalActions = moduleActions.concat(totalActions);
|
|
52
52
|
return totalActions;
|
|
53
53
|
}
|
|
@@ -113,22 +113,10 @@ function MasterDetailLayout(props) {
|
|
|
113
113
|
)
|
|
114
114
|
});
|
|
115
115
|
}, [detailComponent, getLabel]);
|
|
116
|
-
const viewDetailAction = useMemo(() => {
|
|
117
|
-
return {
|
|
118
|
-
urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
|
|
119
|
-
onClick: onClickViewDetail,
|
|
120
|
-
disabled: false,
|
|
121
|
-
visibility: "normal",
|
|
122
|
-
label: getLabel("master_detail_layout.view_detail"),
|
|
123
|
-
tag: "none",
|
|
124
|
-
className: "",
|
|
125
|
-
key: "detail"
|
|
126
|
-
};
|
|
127
|
-
}, [environment_assets, onClickViewDetail]);
|
|
128
116
|
const finalModuleActions = useMemo(() => {
|
|
129
|
-
const actions = getTotalModuleActions(splitActions, moduleActions
|
|
117
|
+
const actions = getTotalModuleActions(splitActions, moduleActions);
|
|
130
118
|
return actions;
|
|
131
|
-
}, [splitActions, moduleActions
|
|
119
|
+
}, [splitActions, moduleActions]);
|
|
132
120
|
const classes = useMasterDetailLayoutUtilityClasses();
|
|
133
121
|
return /* @__PURE__ */ jsx(MasterDetailProvider, {
|
|
134
122
|
onClickViewDetail,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./AuthContext/index.6f966215.js";
|
package/hooks/index.850e8ae2.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ModuleLayout/index.e7218171.js";
|
|
2
|
-
import "@m4l/components";
|
|
3
|
-
import "react";
|
|
4
|
-
import "@m4l/core";
|
|
5
|
-
import "./MasterDetailLayout/index.f91d39eb.js";
|
|
6
|
-
import "@m4l/graphics";
|
|
7
|
-
import "react/jsx-runtime";
|
|
8
|
-
import "./NoAuthModuleLayout/index.7ba635bb.js";
|