@m4l/layouts 1.0.5 → 2.0.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.
Files changed (28) hide show
  1. package/components/MFHostApp/{index.401a303e.js → index-CKsHsRY8.js} +1 -2
  2. package/components/MFHostApp/types.d.ts +1 -2
  3. package/components/MFNoAuthApp/types.d.ts +1 -2
  4. package/components/{index.7006a30d.js → index-BydiHRF0.js} +1 -1
  5. package/components/index.d.ts +0 -3
  6. package/contexts/AuthContext/{index.6f966215.js → index-DARkRRM4.js} +6 -5
  7. package/hooks/useAuth/index-8hAi3guc.js +10 -0
  8. package/hooks/useMasterDetail/{index.d45f2a86.js → index-D4QUQYYc.js} +1 -1
  9. package/hooks/useModule/{index.b5f598b1.js → index-FY5nsBmE.js} +2 -3
  10. package/index.js +13 -32
  11. package/layouts/MasterDetailLayout/{index.748f7ada.js → index-DeC4RoBs.js} +6 -1
  12. package/layouts/ModuleLayout/{index.e7218171.js → index-DAtDuh6s.js} +7 -0
  13. package/layouts/NoAuthModuleLayout/{index.83cd3ea3.js → index-BxJ0vCUq.js} +2 -0
  14. package/m4l_layouts/types.d.ts +1 -0
  15. package/package.json +2 -2
  16. package/vite-env.d.ts +3 -3
  17. package/components/BaseModule/index.8ff0193e.js +0 -39
  18. package/components/BaseModule/index.d.ts +0 -4
  19. package/components/BaseModule/types.d.ts +0 -10
  20. package/components/MFIsolationApp/index.d.ts +0 -4
  21. package/components/MFIsolationApp/index.e733d368.js +0 -181
  22. package/components/MFIsolationApp/subcomponents/MFAuthApp/index.d.ts +0 -4
  23. package/components/MFIsolationApp/subcomponents/MFAuthApp/types.d.ts +0 -6
  24. package/components/MFIsolationApp/types.d.ts +0 -14
  25. package/hooks/useAuth/index.cb6a3420.js +0 -11
  26. /package/contexts/{index.ee173661.js → index-l0sNRNKZ.js} +0 -0
  27. /package/hooks/{index.77acdde7.js → index-l0sNRNKZ.js} +0 -0
  28. /package/layouts/{index.417b6868.js → index-l0sNRNKZ.js} +0 -0
@@ -1,8 +1,7 @@
1
1
  import { unstable_HistoryRouter } from "react-router-dom";
2
2
  import { EnvironmentProvider, HostToolsProvider, NetworkProvider, DomainCountryProvider } from "@m4l/core";
3
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";
4
+ import { BaseModule, WindowToolsMFProvider, DynamicMFParmsProvider } from "@m4l/components";
6
5
  import { jsx } from "react/jsx-runtime";
7
6
  function MFHostApp(props) {
8
7
  const {
@@ -1,7 +1,6 @@
1
1
  import type { AxiosOperation, EnvironmentType, HostToolsType } from '@m4l/core';
2
2
  import { Formatters, LocaleType } from '@m4l/graphics';
3
- import { DynamicMFStore, WindowToolsMF } from '@m4l/components';
4
- import { BaseModuleProps } from '../BaseModule/types';
3
+ import { DynamicMFStore, WindowToolsMF, BaseModuleProps } from '@m4l/components';
5
4
  import { HostThemeType } from '@m4l/graphics';
6
5
  export interface ByHostProps {
7
6
  environment: EnvironmentType;
@@ -1,6 +1,5 @@
1
1
  import { Formatters } from '@m4l/graphics';
2
- import { WindowToolsMF } from '@m4l/components';
3
- import { BaseModuleProps } from '../BaseModule/types';
2
+ import { WindowToolsMF, BaseModuleProps } from '@m4l/components';
4
3
  export interface ByHostProps {
5
4
  formatters: Formatters;
6
5
  windowTools: WindowToolsMF;
@@ -1,6 +1,6 @@
1
1
  import { DomainCountryProvider } from "@m4l/core";
2
2
  import { FormatterProvider, ResponsiveContainerProvider } from "@m4l/graphics";
3
- import { B as BaseModule } from "./BaseModule/index.8ff0193e.js";
3
+ import { BaseModule } from "@m4l/components";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  function MFNoAuthApp(props) {
6
6
  const {
@@ -1,6 +1,3 @@
1
- export { MFIsolationApp } from './MFIsolationApp';
2
1
  export { MFNoAuthApp } from './MFNoAuthApp';
3
2
  export { MFHostApp } from './MFHostApp';
4
- export { BaseModule } from './BaseModule';
5
3
  export type { ByHostProps } from './MFHostApp/types';
6
- export type { BaseModuleProps } from './BaseModule/types';
@@ -61,8 +61,9 @@ function AuthProvider(props) {
61
61
  domain_token
62
62
  } = useEnvironment();
63
63
  const [nextValSession, setNextValSession] = useLocalStorageWithListener(
64
+ //Variable para saber si ha cambiado la session en otro navegador
64
65
  "vSession",
65
- new Date().getTime() + ""
66
+ (/* @__PURE__ */ new Date()).getTime() + ""
66
67
  );
67
68
  useEffect(() => {
68
69
  const initialize = async () => {
@@ -124,7 +125,7 @@ function AuthProvider(props) {
124
125
  user
125
126
  }
126
127
  });
127
- setNextValSession(new Date().getTime() + "");
128
+ setNextValSession((/* @__PURE__ */ new Date()).getTime() + "");
128
129
  });
129
130
  };
130
131
  const logout = async (isAuthenticated) => {
@@ -137,7 +138,7 @@ function AuthProvider(props) {
137
138
  dispatch({
138
139
  type: EnumTypes.Logout
139
140
  });
140
- setNextValSession(new Date().getTime() + "");
141
+ setNextValSession((/* @__PURE__ */ new Date()).getTime() + "");
141
142
  };
142
143
  const onNetserviceUnautorized = () => {
143
144
  logout(false);
@@ -155,6 +156,6 @@ function AuthProvider(props) {
155
156
  });
156
157
  }
157
158
  export {
158
- AuthProvider as A,
159
- AuthContext as a
159
+ AuthContext as A,
160
+ AuthProvider as a
160
161
  };
@@ -0,0 +1,10 @@
1
+ import { useContext } from "react";
2
+ import { A as AuthContext } from "../../contexts/AuthContext/index-DARkRRM4.js";
3
+ const useAuth = () => {
4
+ const context = useContext(AuthContext);
5
+ if (!context) throw new Error("Auth context must be use inside AuthProvider");
6
+ return context;
7
+ };
8
+ export {
9
+ useAuth as u
10
+ };
@@ -1,5 +1,5 @@
1
1
  import { useContext } from "react";
2
- import { M as MasterDetailContext } from "../../layouts/MasterDetailLayout/index.748f7ada.js";
2
+ import { M as MasterDetailContext } from "../../layouts/MasterDetailLayout/index-DeC4RoBs.js";
3
3
  const useMasterDetail = () => useContext(MasterDetailContext);
4
4
  export {
5
5
  useMasterDetail as u
@@ -1,9 +1,8 @@
1
1
  import { useContext } from "react";
2
- import { M as ModuleContext } from "../../layouts/ModuleLayout/index.e7218171.js";
2
+ import { M as ModuleContext } from "../../layouts/ModuleLayout/index-DAtDuh6s.js";
3
3
  const useModule = () => {
4
4
  const context = useContext(ModuleContext);
5
- if (!context)
6
- throw new Error("useModule context must be use inside ModuleContext");
5
+ if (!context) throw new Error("useModule context must be use inside ModuleContext");
7
6
  return context;
8
7
  };
9
8
  export {
package/index.js CHANGED
@@ -1,36 +1,17 @@
1
- import { M } from "./components/MFIsolationApp/index.e733d368.js";
2
- import { M as M2 } from "./components/index.7006a30d.js";
3
- import { M as M3 } from "./components/MFHostApp/index.401a303e.js";
4
- import { B } from "./components/BaseModule/index.8ff0193e.js";
5
- import { a, A } from "./contexts/AuthContext/index.6f966215.js";
6
- import { a as a2, d, g } from "./layouts/ModuleLayout/index.e7218171.js";
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.83cd3ea3.js";
9
- import { u } from "./hooks/useMasterDetail/index.d45f2a86.js";
10
- import { u as u2 } from "./hooks/useAuth/index.cb6a3420.js";
11
- import { u as u3 } from "./hooks/useModule/index.b5f598b1.js";
12
- import "react";
13
- import "react-router-dom";
14
- import "react-toastify";
15
- import "@m4l/graphics";
16
- import "@m4l/core";
17
- import "history";
18
- import "eventemitter3";
19
- import "date-fns";
20
- import "@m4l/styles";
21
- import "react/jsx-runtime";
22
- import "nprogress";
23
- import "@m4l/components";
24
- import "@mui/material/styles";
25
- import "@mui/material";
26
- import "@mui/base";
1
+ import { M } from "./components/index-BydiHRF0.js";
2
+ import { M as M2 } from "./components/MFHostApp/index-CKsHsRY8.js";
3
+ import { A, a } from "./contexts/AuthContext/index-DARkRRM4.js";
4
+ import { a as a2, d, g } from "./layouts/ModuleLayout/index-DAtDuh6s.js";
5
+ import { a as a3, d as d2, g as g2 } from "./layouts/MasterDetailLayout/index-DeC4RoBs.js";
6
+ import { N, d as d3, g as g3 } from "./layouts/NoAuthModuleLayout/index-BxJ0vCUq.js";
7
+ import { u } from "./hooks/useMasterDetail/index-D4QUQYYc.js";
8
+ import { u as u2 } from "./hooks/useAuth/index-8hAi3guc.js";
9
+ import { u as u3 } from "./hooks/useModule/index-FY5nsBmE.js";
27
10
  export {
28
- a as AuthContext,
29
- A as AuthProvider,
30
- B as BaseModule,
31
- M3 as MFHostApp,
32
- M as MFIsolationApp,
33
- M2 as MFNoAuthApp,
11
+ A as AuthContext,
12
+ a as AuthProvider,
13
+ M2 as MFHostApp,
14
+ M as MFNoAuthApp,
34
15
  a3 as MasterDetailLayout,
35
16
  a2 as ModuleLayout,
36
17
  N as NoAuthModuleLayout,
@@ -1,7 +1,7 @@
1
1
  import { createContext, useState, useRef, useMemo, useCallback } from "react";
2
2
  import { voidFunction, useEnvironment, useModuleDictionary } from "@m4l/core";
3
3
  import { WindowBase, SplitLayout } from "@m4l/components";
4
- import { a as ModuleLayout, g as getModuleLayoutComponentsDictionary } from "../ModuleLayout/index.e7218171.js";
4
+ import { a as ModuleLayout, g as getModuleLayoutComponentsDictionary } from "../ModuleLayout/index-DAtDuh6s.js";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  import { useResponsiveDesktop } from "@m4l/graphics";
7
7
  import { generateUtilityClasses, generateUtilityClass, styled } from "@mui/material";
@@ -29,7 +29,9 @@ function MasterDetailProvider(props) {
29
29
  }
30
30
  const componentName = "M4LMasterDetailLayout";
31
31
  generateUtilityClasses(componentName, [
32
+ /* elements */
32
33
  "root"
34
+ /* states or variants of elements */
33
35
  ]);
34
36
  function getMasterDetailLayoutUtilityClass(slot) {
35
37
  return generateUtilityClass(componentName, slot);
@@ -58,6 +60,7 @@ function MasterDetailLayout(props) {
58
60
  detailComponent,
59
61
  moduleActions,
60
62
  version
63
+ // defaultDictionary,
61
64
  } = props;
62
65
  const {
63
66
  host_static_assets,
@@ -111,6 +114,7 @@ function MasterDetailLayout(props) {
111
114
  children: typeof detailComponent === "function" ? detailComponent({}) : detailComponent
112
115
  }
113
116
  )
117
+ // actions: undefined,
114
118
  });
115
119
  }, [detailComponent, getLabel]);
116
120
  const finalModuleActions = useMemo(() => {
@@ -146,6 +150,7 @@ const defaultMasterDetailDictionary = {
146
150
  no_split: "No split",
147
151
  view_detail: "View detail"
148
152
  }
153
+ //...defaultModuleLayoutDictionary,
149
154
  };
150
155
  export {
151
156
  MasterDetailContext as M,
@@ -11,8 +11,10 @@ const InnerModuleRoot = styled("div")(({
11
11
  }));
12
12
  const componentName = "M4LModuleLayout";
13
13
  generateUtilityClasses(componentName, [
14
+ /* elements */
14
15
  "root",
15
16
  "moduleContent"
17
+ /* states or variants of elements */
16
18
  ]);
17
19
  function getModuleLayoutUtilityClass(slot) {
18
20
  return generateUtilityClass(componentName, slot);
@@ -74,8 +76,13 @@ function ModuleProvider(props) {
74
76
  }, [finalModuleActions]);
75
77
  return /* @__PURE__ */ jsx(ModuleContext.Provider, {
76
78
  value: {
79
+ // moduleActions: finalModuleActions,
80
+ // dynamicActions,
77
81
  setDynamicActions,
78
82
  moduleId: configOptions.moduleId
83
+ // moduleNameField: configOptions.moduleNameField,
84
+ // urlIcon: configOptions.urlIcon,
85
+ // breadcrumbLinks: configOptions.breadcrumbLinks,
79
86
  },
80
87
  children
81
88
  });
@@ -269,6 +269,8 @@ const CompanyName = styled$1("div")(() => ({
269
269
  const FormContent = styled$1("div")(() => ({
270
270
  display: "flex",
271
271
  flexDirection: "column",
272
+ /* justifyContent: 'flex-start',
273
+ alignItems: 'center', */
272
274
  padding: "12px",
273
275
  margin: "auto 0",
274
276
  width: "100%",
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
- "version": "1.0.5",
3
+ "version": "2.0.1",
4
4
  "license": "UNLICENSED",
5
5
  "author": "M4L Team",
6
6
  "private": false,
@@ -19,7 +19,7 @@
19
19
  "nprogress": "^0.2.0",
20
20
  "react": "^17.0.0 || ^18.0.0",
21
21
  "react-dom": "^17.0.0 || ^18.0.0",
22
- "react-toastify": "9.0.5"
22
+ "react-toastify": "10.0.5"
23
23
  },
24
24
  "files": [
25
25
  "*"
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,39 +0,0 @@
1
- import { ModalProvider } from "@m4l/components";
2
- import { FlagsProvider, ModuleDictionaryProvider, ModuleSkeletonProvider, ModulePrivilegesProvider } from "@m4l/core";
3
- import { useLocales } from "@m4l/graphics";
4
- import { jsx } from "react/jsx-runtime";
5
- function BaseModule(props) {
6
- const {
7
- children,
8
- isAuth = true,
9
- moduleId,
10
- moduleNameField,
11
- skeletonFlags,
12
- privileges,
13
- componentsDictionary
14
- } = props;
15
- const localeString = useLocales().currentLocale?.localeString;
16
- return /* @__PURE__ */ jsx(FlagsProvider, {
17
- children: /* @__PURE__ */ jsx(ModuleDictionaryProvider, {
18
- isAuth,
19
- moduleId,
20
- moduleNameField,
21
- componentsDictionary,
22
- currentLang: localeString,
23
- children: /* @__PURE__ */ jsx(ModuleSkeletonProvider, {
24
- flags: skeletonFlags,
25
- children: isAuth ? /* @__PURE__ */ jsx(ModulePrivilegesProvider, {
26
- queryPrivileges: privileges,
27
- children: /* @__PURE__ */ jsx(ModalProvider, {
28
- children
29
- })
30
- }) : /* @__PURE__ */ jsx(ModalProvider, {
31
- children
32
- })
33
- })
34
- })
35
- });
36
- }
37
- export {
38
- BaseModule as B
39
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { BaseModuleProps } from './types';
3
- export declare function BaseModule(props: BaseModuleProps): import("react").JSX.Element;
4
- export default BaseModule;
@@ -1,10 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare type BaseModuleProps = {
3
- moduleId: string;
4
- skeletonFlags: string[];
5
- moduleNameField?: string;
6
- privileges: string[];
7
- componentsDictionary: string[];
8
- isAuth?: boolean;
9
- children: ReactNode;
10
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { MFIsolationAppProps } from './types';
3
- export declare function MFIsolationApp(props: MFIsolationAppProps): import("react").JSX.Element;
4
- export default MFIsolationApp;
@@ -1,181 +0,0 @@
1
- import { useEffect, useMemo, useCallback } from "react";
2
- import { unstable_HistoryRouter } from "react-router-dom";
3
- import { ToastContainer, toast } from "react-toastify";
4
- import { HostThemeProvider, FormatterProvider, LocalesProvider, getLocaleFromNetwork, ResponsiveContainerProvider } from "@m4l/graphics";
5
- import { A as AuthProvider } from "../../contexts/AuthContext/index.6f966215.js";
6
- import { DomainCountryProvider, EnvironmentProvider, HostToolsProvider, NetworkProvider, axiosOperation } from "@m4l/core";
7
- import { createBrowserHistory } from "history";
8
- import EventEmitter from "eventemitter3";
9
- import { format } from "date-fns";
10
- import { defaultThemeOptions, fnComponentsOverrides } from "@m4l/styles";
11
- import { u as useAuth } from "../../hooks/useAuth/index.cb6a3420.js";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- import NProgress from "nprogress";
14
- import { B as BaseModule } from "../BaseModule/index.8ff0193e.js";
15
- import { AreasProvider } from "@m4l/components";
16
- function MFAuthApp(props) {
17
- const {
18
- children,
19
- user,
20
- pwd
21
- } = props;
22
- const {
23
- isAuthenticated,
24
- isInitialized,
25
- login,
26
- user: authUser
27
- } = useAuth();
28
- useEffect(() => {
29
- if (isInitialized && isAuthenticated === false) {
30
- login(user, pwd, false);
31
- }
32
- }, [isInitialized, isAuthenticated]);
33
- if (!isAuthenticated)
34
- return /* @__PURE__ */ jsx("div", {
35
- children: "Pendiente x atenticar"
36
- });
37
- const domianCountry = {
38
- id: 1,
39
- currency: "USD",
40
- currency_decimal_digits: 2,
41
- decimal_symbol: ".",
42
- thousands_symbol: ","
43
- };
44
- if (authUser?.domain_country) {
45
- domianCountry.id = authUser?.domain_country.id ?? domianCountry.id;
46
- domianCountry.currency = authUser?.domain_country.currency ?? domianCountry.currency;
47
- domianCountry.currency_decimal_digits = authUser?.domain_country.currency_decimal_digits ?? domianCountry.currency_decimal_digits;
48
- domianCountry.decimal_symbol = authUser?.domain_country.decimal_symbol ?? domianCountry.decimal_symbol;
49
- domianCountry.thousands_symbol = authUser?.domain_country?.thousands_symbol ?? domianCountry.thousands_symbol;
50
- }
51
- return /* @__PURE__ */ jsxs(HostThemeProvider, {
52
- hostThemeOptions: defaultThemeOptions,
53
- fnComponentsOverrides,
54
- isMicroFrontEnd: true,
55
- children: [/* @__PURE__ */ jsx(ToastContainer, {}), /* @__PURE__ */ jsx(DomainCountryProvider, {
56
- ...domianCountry,
57
- isMicroFrontEnd: false,
58
- children: /* @__PURE__ */ jsx(FormatterProvider, {
59
- isMicroFrontEnd: false,
60
- dateFormatter: {
61
- formatDate: format
62
- },
63
- currencyFormatter: {
64
- code: domianCountry.currency,
65
- decimalDigits: domianCountry.currency_decimal_digits
66
- },
67
- children
68
- })
69
- })]
70
- });
71
- }
72
- const history = createBrowserHistory({
73
- window
74
- });
75
- function MFIsolationApp(props) {
76
- const {
77
- children,
78
- user,
79
- pwd,
80
- database = "domain",
81
- host_api_local,
82
- host_api_remote,
83
- host_static_assets,
84
- environment_assets,
85
- moduleId,
86
- skeletonFlags,
87
- moduleNameField,
88
- privileges,
89
- componentsDictionary,
90
- onLoad,
91
- activeAreasNetwork = false,
92
- activeCookiesFromNetwork = false,
93
- observedDivRef
94
- } = props;
95
- const eventEmitter = useMemo(() => new EventEmitter(), []);
96
- const events_add_listener = useCallback((eventName, handler) => {
97
- eventEmitter.on(eventName, handler);
98
- }, [eventEmitter]);
99
- const events_remove_listener = useCallback((eventName, handler) => {
100
- if (handler === null) {
101
- eventEmitter.removeListener(eventName);
102
- return;
103
- }
104
- eventEmitter.removeListener(eventName, handler);
105
- }, [eventEmitter]);
106
- const events_emit = useCallback((eventName, arg) => {
107
- eventEmitter.emit(eventName, arg);
108
- }, [eventEmitter]);
109
- const startProgress = () => {
110
- NProgress.configure({
111
- showSpinner: true
112
- });
113
- NProgress.start();
114
- };
115
- const stopProgress = () => {
116
- NProgress.done();
117
- };
118
- const environment = useMemo(() => ({
119
- host: "",
120
- isLocalhost: true,
121
- domain_token: "lab1",
122
- database,
123
- host_api_local,
124
- host_api_remote,
125
- host_static_assets,
126
- environment_assets
127
- }), []);
128
- const hostTools = useMemo(() => ({
129
- history,
130
- toast,
131
- startProgress,
132
- stopProgress,
133
- events_add_listener,
134
- events_remove_listener,
135
- events_emit
136
- }), []);
137
- return /* @__PURE__ */ jsx(EnvironmentProvider, {
138
- ...environment,
139
- children: /* @__PURE__ */ jsx(HostToolsProvider, {
140
- ...hostTools,
141
- children: /* @__PURE__ */ jsx(NetworkProvider, {
142
- axiosOperation,
143
- children: /* @__PURE__ */ jsx(unstable_HistoryRouter, {
144
- history,
145
- children: /* @__PURE__ */ jsx(LocalesProvider, {
146
- isMicroFrontEnd: false,
147
- getLocaleFromNetwork,
148
- children: /* @__PURE__ */ jsx(AuthProvider, {
149
- children: /* @__PURE__ */ jsx(MFAuthApp, {
150
- user,
151
- pwd,
152
- children: /* @__PURE__ */ jsx(BaseModule, {
153
- moduleId,
154
- privileges,
155
- skeletonFlags,
156
- componentsDictionary,
157
- moduleNameField,
158
- children: /* @__PURE__ */ jsx(AreasProvider, {
159
- onLoad,
160
- loadAreasFromNetwork: activeAreasNetwork,
161
- loadCookiesFromNetwork: activeCookiesFromNetwork,
162
- onSelectLayout: (modId) => {
163
- console.log("onSelectLayout", modId);
164
- },
165
- children: /* @__PURE__ */ jsx(ResponsiveContainerProvider, {
166
- observedDivRef,
167
- children
168
- })
169
- })
170
- })
171
- })
172
- })
173
- })
174
- })
175
- })
176
- })
177
- });
178
- }
179
- export {
180
- MFIsolationApp as M
181
- };
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import { MFAuthAppProps } from './types';
3
- export declare function MFAuthApp(props: MFAuthAppProps): import("react").JSX.Element;
4
- export default MFAuthApp;
@@ -1,6 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare type MFAuthAppProps = {
3
- user: string;
4
- pwd: string;
5
- children: ReactNode;
6
- };
@@ -1,14 +0,0 @@
1
- import { BaseModuleProps } from '../BaseModule/types';
2
- export declare type MFIsolationAppProps = BaseModuleProps & {
3
- user: string;
4
- pwd: string;
5
- host_api_local: string;
6
- database?: string;
7
- host_api_remote: string;
8
- host_static_assets: string;
9
- environment_assets: string;
10
- onLoad: () => void;
11
- activeAreasNetwork?: boolean;
12
- activeCookiesFromNetwork?: boolean;
13
- observedDivRef: Element | Text | null;
14
- };
@@ -1,11 +0,0 @@
1
- import { useContext } from "react";
2
- import { a as AuthContext } from "../../contexts/AuthContext/index.6f966215.js";
3
- const useAuth = () => {
4
- const context = useContext(AuthContext);
5
- if (!context)
6
- throw new Error("Auth context must be use inside AuthProvider");
7
- return context;
8
- };
9
- export {
10
- useAuth as u
11
- };
File without changes