@m4l/core 0.0.13 → 0.0.16
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/contexts/EnvironmentContext/index.d.ts +5 -0
- package/dist/contexts/EnvironmentContext/types.d.ts +6 -0
- package/dist/contexts/FlagsContext/index.d.ts +5 -0
- package/dist/contexts/FlagsContext/types.d.ts +10 -0
- package/dist/contexts/HostToolsContext/index.d.ts +6 -0
- package/dist/contexts/HostToolsContext/types.d.ts +6 -0
- package/dist/contexts/ModuleDictionaryContext/index.d.ts +5 -0
- package/dist/contexts/ModuleDictionaryContext/types.d.ts +15 -0
- package/dist/contexts/NetworkContext/index.d.ts +5 -0
- package/dist/contexts/NetworkContext/types.d.ts +11 -0
- package/dist/contexts/index.d.ts +5 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/useEnvironment/index.d.ts +2 -0
- package/dist/hooks/useFlags/index.d.ts +3 -0
- package/dist/hooks/useHostTools/index.d.ts +2 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts +1 -0
- package/dist/hooks/useModuleDictionary/index.d.ts +1 -0
- package/dist/hooks/useNetwork/index.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +110 -111
- package/dist/types/dictionary.d.ts +13 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/utils/axiosOperation/index.d.ts +2 -0
- package/dist/utils/axiosOperation/types.d.ts +5 -0
- package/dist/utils/getLocalStorage.d.ts +1 -0
- package/dist/utils/getPropertyByString.d.ts +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/setLocalStorage.d.ts +1 -0
- package/dist/utils/voidFunction.d.ts +1 -0
- package/dist/vite-env.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EnvironmentProviderProps } from './types';
|
|
3
|
+
declare const EnvironmentContext: import("react").Context<import("../..").EnvironmentType>;
|
|
4
|
+
declare function EnvironmentProvider(props: EnvironmentProviderProps): JSX.Element;
|
|
5
|
+
export { EnvironmentProvider, EnvironmentContext };
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HostToolsType } from '../../types';
|
|
3
|
+
import type { HostToolsProviderProps } from './types';
|
|
4
|
+
declare const HostToolsContext: import("react").Context<HostToolsType>;
|
|
5
|
+
declare function HostToolsProvider(props: HostToolsProviderProps): JSX.Element;
|
|
6
|
+
export { HostToolsProvider, HostToolsContext };
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { NetworkProviderProps } from './types';
|
|
3
|
+
declare const NetworkContext: import("react").Context<import("./types").NetworkType>;
|
|
4
|
+
declare function NetworkProvider(props: NetworkProviderProps): JSX.Element;
|
|
5
|
+
export { NetworkProvider, NetworkContext };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AxiosOperation, NetworkProps } from '../../types';
|
|
3
|
+
export declare type EventFunListener = (...args: any[]) => void;
|
|
4
|
+
export interface NetworkType {
|
|
5
|
+
networkOperation: (props: NetworkProps) => Promise<any>;
|
|
6
|
+
}
|
|
7
|
+
export interface NetworkProviderProps {
|
|
8
|
+
axiosOperation: AxiosOperation;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare type NetworkContextType = NetworkType;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EnvironmentContext, EnvironmentProvider } from './EnvironmentContext';
|
|
2
|
+
export { HostToolsContext, HostToolsProvider } from './HostToolsContext';
|
|
3
|
+
export { NetworkContext, NetworkProvider } from './NetworkContext';
|
|
4
|
+
export { FlagsContext, FlagsProvider } from './FlagsContext';
|
|
5
|
+
export { ModuleDictionaryContext, ModuleDictionaryProvider } from './ModuleDictionaryContext';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useLocalStorage } from './useLocalStorage/useLocalStorage';
|
|
2
|
+
export { useHostTools } from './useHostTools';
|
|
3
|
+
export { useNetwork } from './useNetwork';
|
|
4
|
+
export { useEnvironment } from './useEnvironment';
|
|
5
|
+
export { useFlags, useFlagsPresent } from './useFlags';
|
|
6
|
+
export { useModuleDictionary } from './useModuleDictionary';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useLocalStorage<ValueType>(key: string, initialValue: ValueType): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useModuleDictionary: () => import("../../contexts/ModuleDictionaryContext/types").ModuleDictionaryContextProps;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './contexts';
|
|
2
|
+
export * from './hooks';
|
|
3
|
+
export { EmitEvents } from './types';
|
|
4
|
+
export type { Maybe, HostToolsType, NetworkProps, EnvironmentType, AxiosOperation, EventFunListener, } from './types';
|
|
5
|
+
export type { GetLabelType, Dictionary, ModuleDictionary, ComponentDictionary, } from './types/dictionary';
|
|
6
|
+
export * from './utils';
|
package/dist/index.js
CHANGED
|
@@ -25,117 +25,6 @@ function EnvironmentProvider(props) {
|
|
|
25
25
|
}
|
|
26
26
|
function voidFunction() {
|
|
27
27
|
}
|
|
28
|
-
function getPropertyByString(object, propString) {
|
|
29
|
-
let value = object;
|
|
30
|
-
const props = propString.split(".");
|
|
31
|
-
for (let index = 0; index < props.length; index += 1) {
|
|
32
|
-
if (props[index] === void 0)
|
|
33
|
-
break;
|
|
34
|
-
value = value[props[index]];
|
|
35
|
-
}
|
|
36
|
-
return value;
|
|
37
|
-
}
|
|
38
|
-
function getLocalStorage(key, initialValue2) {
|
|
39
|
-
try {
|
|
40
|
-
const item = window.localStorage.getItem(key);
|
|
41
|
-
return item !== null ? JSON.parse(item) : initialValue2;
|
|
42
|
-
} catch (e) {
|
|
43
|
-
return initialValue2;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function setLocalStorage(key, value) {
|
|
47
|
-
try {
|
|
48
|
-
const item = window.localStorage.getItem(key);
|
|
49
|
-
let newValue = item !== null ? JSON.parse(item) : {};
|
|
50
|
-
newValue = { ...newValue, ...value };
|
|
51
|
-
window.localStorage.setItem(key, JSON.stringify(newValue));
|
|
52
|
-
} catch (e) {
|
|
53
|
-
console.error(e);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
var EmitEvents = /* @__PURE__ */ ((EmitEvents2) => {
|
|
57
|
-
EmitEvents2["EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED"] = `netsevice_unauthorized`;
|
|
58
|
-
EmitEvents2["EMMIT_EVENT_HOST_THEME_CHANGE"] = "host_theme_change";
|
|
59
|
-
return EmitEvents2;
|
|
60
|
-
})(EmitEvents || {});
|
|
61
|
-
const axiosInstance = axios.create({});
|
|
62
|
-
function getResponse(endPoint, response) {
|
|
63
|
-
console.log("Axios response", response, typeof response.data);
|
|
64
|
-
if (response && response.data && typeof response.data === "object") {
|
|
65
|
-
if (response.data.error && response.data.error?.code && response.data.error?.msg !== void 0) {
|
|
66
|
-
return Promise.reject({ ...response.data.error, status: response.status });
|
|
67
|
-
}
|
|
68
|
-
return response.data;
|
|
69
|
-
}
|
|
70
|
-
return Promise.reject({
|
|
71
|
-
code: 1,
|
|
72
|
-
msg: `Incorrect endpoint: ${endPoint}`,
|
|
73
|
-
status: response.status
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
function getError(error, hostTools, checkUnAuthorized = true) {
|
|
77
|
-
const { toast } = hostTools;
|
|
78
|
-
let err = {
|
|
79
|
-
message: "",
|
|
80
|
-
status: 1,
|
|
81
|
-
code: 0
|
|
82
|
-
};
|
|
83
|
-
console.log("getError", error);
|
|
84
|
-
if (error?.code !== void 0 && err.status !== void 0 && error.message !== void 0) {
|
|
85
|
-
err = { ...err, ...error };
|
|
86
|
-
} else if (error?.response) {
|
|
87
|
-
if (error.response.data && typeof error.response.data === "object" && error.response.data.error && error.response.data.error?.code && error.response.data.error?.message !== void 0) {
|
|
88
|
-
err = { ...error.response.data.error, status: error.response.status };
|
|
89
|
-
} else {
|
|
90
|
-
err.message = error.message;
|
|
91
|
-
err.status = error.response.status;
|
|
92
|
-
err.code = 0;
|
|
93
|
-
}
|
|
94
|
-
if (checkUnAuthorized && error.response.status === 401) {
|
|
95
|
-
hostTools.events_emit(EmitEvents.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {});
|
|
96
|
-
}
|
|
97
|
-
} else if (error?.request) {
|
|
98
|
-
err.message = `${error?.code} ${error.message}`;
|
|
99
|
-
err.code = -1;
|
|
100
|
-
} else {
|
|
101
|
-
err.message = `${error?.code} ${error.message}`;
|
|
102
|
-
err.status = 0;
|
|
103
|
-
err.code = -2;
|
|
104
|
-
}
|
|
105
|
-
if (checkUnAuthorized) {
|
|
106
|
-
toast(`${err.message} - status: ${err.status} - code: ${err.code}`, { type: "error" });
|
|
107
|
-
}
|
|
108
|
-
return err;
|
|
109
|
-
}
|
|
110
|
-
const axiosOperation = async (props, enviroment, hostTools) => {
|
|
111
|
-
const {
|
|
112
|
-
method,
|
|
113
|
-
endPoint,
|
|
114
|
-
timeout = 5e3,
|
|
115
|
-
parms = {},
|
|
116
|
-
data = {},
|
|
117
|
-
isRemote = true,
|
|
118
|
-
checkUnAuthorized = true
|
|
119
|
-
} = props;
|
|
120
|
-
let baseURL;
|
|
121
|
-
if (isRemote) {
|
|
122
|
-
baseURL = enviroment.host_api_remote;
|
|
123
|
-
} else {
|
|
124
|
-
baseURL = enviroment.host_api_local;
|
|
125
|
-
}
|
|
126
|
-
hostTools.startProgress();
|
|
127
|
-
return axiosInstance({
|
|
128
|
-
baseURL,
|
|
129
|
-
withCredentials: isRemote,
|
|
130
|
-
method,
|
|
131
|
-
url: `/${endPoint}`,
|
|
132
|
-
data: snakecaseKeys(data, { deep: true }),
|
|
133
|
-
params: snakecaseKeys(parms, { deep: true }),
|
|
134
|
-
timeout
|
|
135
|
-
}).then((response) => getResponse(endPoint, response)).catch((error) => Promise.reject(getError(error, hostTools, checkUnAuthorized))).finally(() => {
|
|
136
|
-
hostTools.stopProgress();
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
28
|
const initialValue$1 = {
|
|
140
29
|
toast: () => 0,
|
|
141
30
|
startProgress: voidFunction,
|
|
@@ -351,4 +240,114 @@ function ModuleDictionaryProvider(props) {
|
|
|
351
240
|
children
|
|
352
241
|
});
|
|
353
242
|
}
|
|
243
|
+
var EmitEvents = /* @__PURE__ */ ((EmitEvents2) => {
|
|
244
|
+
EmitEvents2["EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED"] = `netsevice_unauthorized`;
|
|
245
|
+
EmitEvents2["EMMIT_EVENT_HOST_THEME_CHANGE"] = "host_theme_change";
|
|
246
|
+
return EmitEvents2;
|
|
247
|
+
})(EmitEvents || {});
|
|
248
|
+
function getPropertyByString(object, propString) {
|
|
249
|
+
let value = object;
|
|
250
|
+
const props = propString.split(".");
|
|
251
|
+
for (let index = 0; index < props.length; index += 1) {
|
|
252
|
+
if (props[index] === void 0)
|
|
253
|
+
break;
|
|
254
|
+
value = value[props[index]];
|
|
255
|
+
}
|
|
256
|
+
return value;
|
|
257
|
+
}
|
|
258
|
+
function getLocalStorage(key, initialValue2) {
|
|
259
|
+
try {
|
|
260
|
+
const item = window.localStorage.getItem(key);
|
|
261
|
+
return item !== null ? JSON.parse(item) : initialValue2;
|
|
262
|
+
} catch (e) {
|
|
263
|
+
return initialValue2;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
function setLocalStorage(key, value) {
|
|
267
|
+
try {
|
|
268
|
+
const item = window.localStorage.getItem(key);
|
|
269
|
+
let newValue = item !== null ? JSON.parse(item) : {};
|
|
270
|
+
newValue = { ...newValue, ...value };
|
|
271
|
+
window.localStorage.setItem(key, JSON.stringify(newValue));
|
|
272
|
+
} catch (e) {
|
|
273
|
+
console.error(e);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function getResponse(endPoint, response) {
|
|
277
|
+
console.log("Axios response", response, typeof response.data);
|
|
278
|
+
if (response && response.data && typeof response.data === "object") {
|
|
279
|
+
if (response.data.error && response.data.error?.code && response.data.error?.msg !== void 0) {
|
|
280
|
+
return Promise.reject({ ...response.data.error, status: response.status });
|
|
281
|
+
}
|
|
282
|
+
return response.data;
|
|
283
|
+
}
|
|
284
|
+
return Promise.reject({
|
|
285
|
+
code: 1,
|
|
286
|
+
msg: `Incorrect endpoint: ${endPoint}`,
|
|
287
|
+
status: response.status
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function getError(error, hostTools, checkUnAuthorized = true) {
|
|
291
|
+
const { toast } = hostTools;
|
|
292
|
+
let err = {
|
|
293
|
+
message: "",
|
|
294
|
+
status: 1,
|
|
295
|
+
code: 0
|
|
296
|
+
};
|
|
297
|
+
console.log("getError", error);
|
|
298
|
+
if (error?.code !== void 0 && err.status !== void 0 && error.message !== void 0) {
|
|
299
|
+
err = { ...err, ...error };
|
|
300
|
+
} else if (error?.response) {
|
|
301
|
+
if (error.response.data && typeof error.response.data === "object" && error.response.data.error && error.response.data.error?.code && error.response.data.error?.message !== void 0) {
|
|
302
|
+
err = { ...error.response.data.error, status: error.response.status };
|
|
303
|
+
} else {
|
|
304
|
+
err.message = error.message;
|
|
305
|
+
err.status = error.response.status;
|
|
306
|
+
err.code = 0;
|
|
307
|
+
}
|
|
308
|
+
if (checkUnAuthorized && error.response.status === 401) {
|
|
309
|
+
hostTools.events_emit(EmitEvents.EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED, {});
|
|
310
|
+
}
|
|
311
|
+
} else if (error?.request) {
|
|
312
|
+
err.message = `${error?.code} ${error.message}`;
|
|
313
|
+
err.code = -1;
|
|
314
|
+
} else {
|
|
315
|
+
err.message = `${error?.code} ${error.message}`;
|
|
316
|
+
err.status = 0;
|
|
317
|
+
err.code = -2;
|
|
318
|
+
}
|
|
319
|
+
if (checkUnAuthorized) {
|
|
320
|
+
toast(`${err.message} - status: ${err.status} - code: ${err.code}`, { type: "error" });
|
|
321
|
+
}
|
|
322
|
+
return err;
|
|
323
|
+
}
|
|
324
|
+
const axiosOperation = async (props, enviroment, hostTools) => {
|
|
325
|
+
const {
|
|
326
|
+
method,
|
|
327
|
+
endPoint,
|
|
328
|
+
timeout = 5e3,
|
|
329
|
+
parms = {},
|
|
330
|
+
data = {},
|
|
331
|
+
isRemote = true,
|
|
332
|
+
checkUnAuthorized = true
|
|
333
|
+
} = props;
|
|
334
|
+
let baseURL;
|
|
335
|
+
if (isRemote) {
|
|
336
|
+
baseURL = enviroment.host_api_remote;
|
|
337
|
+
} else {
|
|
338
|
+
baseURL = enviroment.host_api_local;
|
|
339
|
+
}
|
|
340
|
+
hostTools.startProgress();
|
|
341
|
+
return axios({
|
|
342
|
+
baseURL,
|
|
343
|
+
withCredentials: isRemote,
|
|
344
|
+
method,
|
|
345
|
+
url: `/${endPoint}`,
|
|
346
|
+
data: snakecaseKeys(data, { deep: true }),
|
|
347
|
+
params: snakecaseKeys(parms, { deep: true }),
|
|
348
|
+
timeout
|
|
349
|
+
}).then((response) => getResponse(endPoint, response)).catch((error) => Promise.reject(getError(error, hostTools, checkUnAuthorized))).finally(() => {
|
|
350
|
+
hostTools.stopProgress();
|
|
351
|
+
});
|
|
352
|
+
};
|
|
354
353
|
export { EmitEvents, EnvironmentContext, EnvironmentProvider, FlagsContext, FlagsProvider, HostToolsContext, HostToolsProvider, ModuleDictionaryContext, ModuleDictionaryProvider, NetworkContext, NetworkProvider, axiosOperation, getLocalStorage, getPropertyByString, setLocalStorage, useEnvironment, useFlags, useFlagsPresent, useHostTools, useLocalStorage, useModuleDictionary, useNetwork, voidFunction };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare type GetLabelType = (key: string) => string;
|
|
2
|
+
export interface ComponentDictionary {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Dictionary {
|
|
6
|
+
[key: string]: ComponentDictionary | boolean | undefined | string;
|
|
7
|
+
}
|
|
8
|
+
export interface DataDictionary extends ComponentDictionary {
|
|
9
|
+
module_name: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ModuleDictionary extends Dictionary {
|
|
12
|
+
data: DataDictionary;
|
|
13
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Id, ToastContent, ToastOptions } from 'react-toastify';
|
|
2
|
+
import type { BrowserHistory } from 'history';
|
|
3
|
+
export declare type Maybe<T> = T | undefined | null;
|
|
4
|
+
export declare interface EnvironmentType {
|
|
5
|
+
isLocalhost: boolean;
|
|
6
|
+
host: string;
|
|
7
|
+
domain_token: string;
|
|
8
|
+
host_api_remote: string;
|
|
9
|
+
host_api_local: string;
|
|
10
|
+
host_static_assets: string;
|
|
11
|
+
environment: string;
|
|
12
|
+
}
|
|
13
|
+
export declare type NetworkProps = {
|
|
14
|
+
method: any;
|
|
15
|
+
endPoint: string;
|
|
16
|
+
timeout?: number;
|
|
17
|
+
parms?: object;
|
|
18
|
+
data?: object;
|
|
19
|
+
checkUnAuthorized?: boolean;
|
|
20
|
+
isRemote?: boolean;
|
|
21
|
+
showSuccesInfo?: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare type ToastFunction = (content: ToastContent, options?: ToastOptions) => Id;
|
|
24
|
+
export declare type EventFunListener = (...args: any[]) => void;
|
|
25
|
+
export declare interface HostToolsType {
|
|
26
|
+
history?: BrowserHistory;
|
|
27
|
+
toast: ToastFunction;
|
|
28
|
+
startProgress: VoidFunction;
|
|
29
|
+
stopProgress: VoidFunction;
|
|
30
|
+
events_add_listener: (eventName: string, handler: EventFunListener) => void;
|
|
31
|
+
events_remove_listener: (eventName: string, handler: Maybe<EventFunListener>) => void;
|
|
32
|
+
events_emit: (eventName: string, arg: any) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare enum EmitEvents {
|
|
35
|
+
EMMIT_EVENT_NET_SERVICE_UNAUTHORIZED = "netsevice_unauthorized",
|
|
36
|
+
EMMIT_EVENT_HOST_THEME_CHANGE = "host_theme_change"
|
|
37
|
+
}
|
|
38
|
+
export declare type AxiosOperation = (props: NetworkProps, enviroment: EnvironmentType, hostTools: HostToolsType) => Promise<any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getLocalStorage<ValueType>(key: string, initialValue: ValueType): ValueType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getPropertyByString(object: Record<string, unknown>, propString: string): any;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { voidFunction } from './voidFunction';
|
|
2
|
+
export { getPropertyByString } from './getPropertyByString';
|
|
3
|
+
export { getLocalStorage } from './getLocalStorage';
|
|
4
|
+
export { setLocalStorage } from './setLocalStorage';
|
|
5
|
+
export { axiosOperation } from './axiosOperation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function setLocalStorage<ValueType>(key: string, value: ValueType): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function voidFunction(): void;
|