@m4l/layouts 9.3.13-JAEBeta.0 → 9.3.13-JAEBeta.1

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.
@@ -1,9 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { unstable_HistoryRouter } from "react-router-dom";
3
- import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
+ import { EnvironmentProvider, HostToolsProvider, NetworkProvider, AuthProvider, 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 MFHostAppContainerStyled } from "./slots/MFHostAppSlots.js";
7
6
  function MFHostApp(props) {
8
7
  const {
9
8
  children,
@@ -21,10 +20,10 @@ function MFHostApp(props) {
21
20
  componentsDictionary,
22
21
  dynamicMFStore,
23
22
  windowTools,
24
- emergeType = "layout",
25
- overrideContainerStyles
23
+ // overrideContainerStyles,
24
+ loggedUser
26
25
  } = props;
27
- 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(
26
+ return /* @__PURE__ */ jsx(EnvironmentProvider, { ...environment, children: /* @__PURE__ */ jsx(HostToolsProvider, { ...hostTools, children: /* @__PURE__ */ jsx(NetworkProvider, { axiosOperation, children: /* @__PURE__ */ jsx(DeviceTypeProvider, { children: /* @__PURE__ */ jsx(AuthProvider, { isMicroFrontEnd: true, loggedUser, children: /* @__PURE__ */ jsx(LocalesProvider, { isMicroFrontEnd: true, localeHost: currentLocale, children: /* @__PURE__ */ jsx(
28
27
  HostThemeProvider,
29
28
  {
30
29
  isMicroFrontEnd: true,
@@ -47,13 +46,13 @@ function MFHostApp(props) {
47
46
  componentsDictionary,
48
47
  skeletonFlags,
49
48
  privileges,
50
- children: /* @__PURE__ */ jsx(FormatterProvider, { isMicroFrontEnd: true, ...formatters, children: /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(AppearanceComponentProvider, { children: /* @__PURE__ */ jsx(MFHostAppContainerStyled, { ownerState: { emergeType }, style: overrideContainerStyles, children }) }) }) }) })
49
+ children: /* @__PURE__ */ jsx(FormatterProvider, { isMicroFrontEnd: true, ...formatters, children: /* @__PURE__ */ jsx(WindowToolsMFProvider, { ...windowTools, children: /* @__PURE__ */ jsx(DynamicMFParmsProvider, { store: dynamicMFStore, children: /* @__PURE__ */ jsx(AppearanceComponentProvider, { children }) }) }) })
51
50
  }
52
51
  )
53
52
  }
54
53
  ) })
55
54
  }
56
- ) }) }) }) }) });
55
+ ) }) }) }) }) }) });
57
56
  }
58
57
  export {
59
58
  MFHostApp as M
@@ -1,7 +1,7 @@
1
- import { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
1
+ import { AuthUserType, AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
2
2
  import { Formatters, LocaleType, HostThemeType } from '@m4l/graphics';
3
3
  import { DynamicMFStore, WindowToolsMF, BaseModuleProps, EmergeType, M4LOverridesStyleRules } from '@m4l/components';
4
- import { MFHostAppSlots } from './slots/MFHostAppSlotsEnum';
4
+ import { MFHostAppSlots } from './slots/styled';
5
5
  import { MF_HOST_APP_KEY } from './constants';
6
6
  import { Theme } from '@mui/material/styles';
7
7
  export interface ByHostProps {
@@ -24,13 +24,9 @@ export interface ByHostProps {
24
24
  */
25
25
  isAddEditModule?: boolean;
26
26
  /**
27
- * Estilos para el contenedor de la aplicación, que es el content del WindowBase.
27
+ * loggedUser: usuario logueado, para los microfrontends que necesitan el usuario logueado
28
28
  */
29
- overrideContainerStyles?: React.CSSProperties;
30
- /**
31
- * EmergeType tipo de lanzamiento de la ventana, popup, layout, modal
32
- */
33
- emergeType?: EmergeType;
29
+ loggedUser?: AuthUserType;
34
30
  }
35
31
  export type MFHostAppProps = ByHostProps & BaseModuleProps;
36
32
  export type MFHostAppOwnerState = {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "9.3.13-JAEBeta.0",
3
+ "version": "9.3.13-JAEBeta.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
6
  "lint-staged": {
7
7
  "*.{js,ts,tsx}": "eslint --fix --max-warnings 0"
8
8
  },
9
9
  "peerDependencies": {
10
- "@m4l/components": "^9.0.0",
10
+ "@m4l/components": "9.3.21-JAEBeta.1",
11
11
  "@m4l/core": "^2.0.0",
12
12
  "@m4l/graphics": "^7.0.0",
13
13
  "@m4l/styles": "^7.0.0"
@@ -11,7 +11,7 @@ function createAppMF(props) {
11
11
  componentsDictionary,
12
12
  skeletonFlags
13
13
  } = props;
14
- window[`render_${prefixMF}_${moduleId}`] = (containerId, environment, hostTools, currentLocale, hostTheme, axiosOperation, formatters, dynamicMFStore, windowTools, emergeType) => {
14
+ window[`render_${prefixMF}_${moduleId}`] = (containerId, environment, hostTools, currentLocale, hostTheme, axiosOperation, formatters, dynamicMFStore, windowTools, options) => {
15
15
  const container = document.getElementById(containerId);
16
16
  if (container) {
17
17
  const root = createRoot(container);
@@ -32,7 +32,8 @@ function createAppMF(props) {
32
32
  skeletonFlags,
33
33
  componentsDictionary,
34
34
  windowTools,
35
- children: /* @__PURE__ */ jsx(App, { emergeType })
35
+ loggedUser: options.loggedUser,
36
+ children: /* @__PURE__ */ jsx(App, { emergeType: options.emergeType })
36
37
  }
37
38
  )
38
39
  );
@@ -1,4 +0,0 @@
1
- const MF_HOST_APP_KEY = "MFHostApp";
2
- export {
3
- MF_HOST_APP_KEY as M
4
- };
@@ -1,11 +0,0 @@
1
- import { styled } from "@mui/material/styles";
2
- import { M as MF_HOST_APP_KEY } from "../constants.js";
3
- import { M as MFHostAppSlots } from "./MFHostAppSlotsEnum.js";
4
- import { m as mfHostAppStyles } from "../styles.js";
5
- const MFHostAppContainerStyled = styled("div", {
6
- name: MF_HOST_APP_KEY,
7
- slot: MFHostAppSlots.container
8
- })(mfHostAppStyles.container);
9
- export {
10
- MFHostAppContainerStyled as M
11
- };
@@ -1,7 +0,0 @@
1
- var MFHostAppSlots = /* @__PURE__ */ ((MFHostAppSlots2) => {
2
- MFHostAppSlots2["container"] = "container";
3
- return MFHostAppSlots2;
4
- })(MFHostAppSlots || {});
5
- export {
6
- MFHostAppSlots as M
7
- };
@@ -1,15 +0,0 @@
1
- const mfHostAppStyles = {
2
- /**
3
- * Estilos para el componente BaseModuleLayout.
4
- */
5
- container: ({ theme, ownerState }) => ({
6
- padding: ownerState?.emergeType === "layout" ? theme.vars.size?.baseSpacings?.sp5 : theme.vars.size?.baseSpacings?.sp4,
7
- display: "flex",
8
- width: "100%",
9
- height: "100%",
10
- overflow: "auto"
11
- })
12
- };
13
- export {
14
- mfHostAppStyles as m
15
- };