@m4l/core 0.0.0 → 0.0.3
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/dist/{lib/contexts → contexts}/EnvironmentContext/index.d.ts +0 -0
- package/dist/{lib/contexts → contexts}/EnvironmentContext/types.d.ts +0 -0
- package/dist/contexts/FlagsContext/index.d.ts +5 -0
- package/dist/contexts/FlagsContext/types.d.ts +10 -0
- package/dist/{lib/contexts → contexts}/HostToolsContext/index.d.ts +0 -0
- package/dist/{lib/contexts → contexts}/HostToolsContext/types.d.ts +0 -0
- package/dist/contexts/ModuleDictionaryContext/index.d.ts +5 -0
- package/dist/contexts/ModuleDictionaryContext/types.d.ts +15 -0
- package/dist/{lib/contexts → contexts}/NetworkContext/index.d.ts +0 -0
- package/dist/{lib/contexts → contexts}/NetworkContext/types.d.ts +0 -0
- package/dist/{lib/contexts → contexts}/index.d.ts +2 -0
- package/dist/{lib/hooks → hooks}/index.d.ts +2 -0
- package/dist/{lib/hooks → hooks}/useEnvironment/index.d.ts +0 -0
- package/dist/hooks/useFlags/index.d.ts +3 -0
- package/dist/{lib/hooks → hooks}/useHostTools/index.d.ts +1 -1
- package/dist/{lib/hooks → hooks}/useLocalStorage/useLocalStorage.d.ts +0 -0
- package/dist/hooks/useModuleDictionary/index.d.ts +1 -0
- package/dist/{lib/hooks → hooks}/useNetwork/index.d.ts +0 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1567 -0
- package/dist/types/dictionary.d.ts +13 -0
- package/dist/{lib/types → types}/index.d.ts +0 -0
- package/dist/utils/axiosOperation/index.d.ts +2 -0
- package/dist/utils/axiosOperation/types.d.ts +5 -0
- package/dist/{lib/utils → utils}/getLocalStorage.d.ts +0 -0
- package/dist/{lib/utils → utils}/getPropertyByString.d.ts +0 -0
- package/dist/{lib/utils → utils}/index.d.ts +1 -0
- package/dist/{lib/utils → utils}/setLocalStorage.d.ts +0 -0
- package/dist/{lib/utils → utils}/voidFunction.d.ts +0 -0
- package/package.json +12 -18
- package/dist/lib/index.d.ts +0 -5
- package/dist/m4l_core.es.js +0 -114
- package/dist/manifest.json +0 -7
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FlagsContextProps, FlagsProviderProps } from './types';
|
|
3
|
+
declare const FlagsContext: import("react").Context<FlagsContextProps>;
|
|
4
|
+
declare function FlagsProvider({ children }: FlagsProviderProps): JSX.Element;
|
|
5
|
+
export { FlagsProvider, FlagsContext };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FlagsProviderProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare type Flag = string;
|
|
6
|
+
export interface FlagsContextProps {
|
|
7
|
+
flags: Array<Flag>;
|
|
8
|
+
clearFlags: () => void;
|
|
9
|
+
addFlag: (flag: Flag) => void;
|
|
10
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ModuleDictionaryContextProps, ModuleDictionaryProviderProps } from './types';
|
|
3
|
+
declare const ModuleDictionaryContext: import("react").Context<ModuleDictionaryContextProps>;
|
|
4
|
+
declare function ModuleDictionaryProvider(props: ModuleDictionaryProviderProps): JSX.Element;
|
|
5
|
+
export { ModuleDictionaryProvider, ModuleDictionaryContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { GetLabelType, ModuleDictionary } from 'src/types/dictionary';
|
|
3
|
+
export interface ModuleDictionaryProviderProps {
|
|
4
|
+
currentLang?: string;
|
|
5
|
+
isAuth?: boolean;
|
|
6
|
+
moduleId: number;
|
|
7
|
+
moduleName?: string;
|
|
8
|
+
componentsDictionary: string[];
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface ModuleDictionaryContextProps {
|
|
12
|
+
moduleDictionary?: ModuleDictionary;
|
|
13
|
+
getLabel: GetLabelType;
|
|
14
|
+
getModuleLabel: () => string;
|
|
15
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { EnvironmentContext } from './EnvironmentContext';
|
|
2
2
|
export { HostToolsContext } from './HostToolsContext';
|
|
3
3
|
export { NetworkContext } from './NetworkContext';
|
|
4
|
+
export { FlagsContext } from './FlagsContext';
|
|
5
|
+
export { ModuleDictionaryContext } from './ModuleDictionaryContext';
|
|
@@ -2,3 +2,5 @@ export { useLocalStorage } from './useLocalStorage/useLocalStorage';
|
|
|
2
2
|
export { useHostTools } from './useHostTools';
|
|
3
3
|
export { useNetwork } from './useNetwork';
|
|
4
4
|
export { useEnvironment } from './useEnvironment';
|
|
5
|
+
export { useFlags } from './useFlags';
|
|
6
|
+
export { useModuleDictionary } from './useModuleDictionary';
|
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const useHostTools: () => import("../..").
|
|
1
|
+
export declare const useHostTools: () => import("../..").HostToolsType;
|
|
2
2
|
export default useHostTools;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useModuleDictionary: () => import("../../contexts/ModuleDictionaryContext/types").ModuleDictionaryContextProps;
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export
|
|
1
|
+
export * from './contexts';
|
|
2
|
+
export * from './hooks';
|
|
3
|
+
export { EmitEvents } from './types';
|
|
4
|
+
export type { Maybe, HostToolsType, NetworkProps, EnvironmentType } from './types';
|
|
5
|
+
export * from './utils';
|