@hortiview/modulebase 0.0.13321 → 0.0.13888
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,4 +1,4 @@
|
|
|
1
|
-
export declare const useBaseProps: () => Pick<import('../
|
|
1
|
+
export declare const useBaseProps: () => Pick<import('../main').DeprecatedBaseProps & {
|
|
2
2
|
modulePermissionToken?: string;
|
|
3
3
|
moduleId?: string;
|
|
4
4
|
organizationId?: string;
|
|
@@ -8,7 +8,7 @@ export declare const useBaseProps: () => Pick<import('../types/Deprecated').Depr
|
|
|
8
8
|
currentLanguage?: string;
|
|
9
9
|
currentLanguageId?: string;
|
|
10
10
|
alertRules?: string;
|
|
11
|
-
commonOptions?: import('../
|
|
11
|
+
commonOptions?: import('../main').AllDropdownsData<import('../main').CommonOption>["items"];
|
|
12
12
|
riseNotification?: (message: import('../main').AlertServiceBusMessage) => Promise<unknown>;
|
|
13
13
|
navigateInHortiview?: (path: string) => void;
|
|
14
14
|
addBreadcrumbTranslation?: (translation: {
|
|
@@ -16,15 +16,15 @@ export declare const useBaseProps: () => Pick<import('../types/Deprecated').Depr
|
|
|
16
16
|
value: string;
|
|
17
17
|
}, hide?: boolean) => void;
|
|
18
18
|
showSnackbar?: (message: string, icon?: string) => void;
|
|
19
|
-
showMessage?: (message: import('../
|
|
20
|
-
logEvent?: (event: import('../
|
|
21
|
-
logError?: (exception: import('../
|
|
19
|
+
showMessage?: (message: import('../main').SystemMessage) => void;
|
|
20
|
+
logEvent?: (event: import('../main').AppInsightsEvent, customProperties?: import('../main').AppInsightsProperties) => void;
|
|
21
|
+
logError?: (exception: import('../main').AppInsightsException) => void;
|
|
22
22
|
throwError?: (message: string, code: number) => void;
|
|
23
23
|
} & {
|
|
24
24
|
setBaseProps: (props: import('../main').BaseProps) => void;
|
|
25
|
-
}, keyof import('../
|
|
25
|
+
}, keyof import('../main').DeprecatedBaseProps | "modulePermissionToken" | "moduleId" | "organizationId" | "basePath" | "currentNavigationPath" | "sourcePath" | "currentLanguage" | "currentLanguageId" | "alertRules" | "commonOptions" | "riseNotification" | "navigateInHortiview" | "addBreadcrumbTranslation" | "showSnackbar" | "showMessage" | "logEvent" | "logError" | "throwError">;
|
|
26
26
|
export declare const useConfig: () => Pick<{
|
|
27
|
-
environment: import('../
|
|
28
|
-
setEnvironment: (environment: import('../
|
|
29
|
-
addEnvironment: (customEnv: import('../
|
|
27
|
+
environment: import('../main').HortiViewEnvironments;
|
|
28
|
+
setEnvironment: (environment: import('../main').HortiViewEnvironments) => void;
|
|
29
|
+
addEnvironment: (customEnv: import('../main').CustomEnv) => void;
|
|
30
30
|
}, "environment">;
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
export { ModuleBase } from './components/ModuleBase';
|
|
2
2
|
export { ModuleCore } from './components/ModuleCore';
|
|
3
|
-
export type
|
|
3
|
+
export type * from './types/AppInsights';
|
|
4
|
+
export type * from './types/BaseProps';
|
|
5
|
+
export type * from './types/CommonOptions';
|
|
6
|
+
export type * from './types/Deprecated';
|
|
7
|
+
export type * from './types/Environment';
|
|
4
8
|
export type * from './types/ModuleApi';
|
|
5
|
-
export type
|
|
9
|
+
export type * from './types/Requests';
|
|
10
|
+
export type * from './types/ServiceBus';
|
|
11
|
+
export type * from './types/SystemMessage';
|
|
6
12
|
export { useBreadcrumbTranslation } from './hooks/useBreadcrumbTranslation';
|
|
7
13
|
export { useSignalRMessages } from './hooks/useSignalRMessages';
|
|
8
14
|
export * from './module-router';
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { httpMethod } from '../types/Requests';
|
|
2
|
-
export declare const mutateOnCustomApi: <T, R>(endpoint: string, data: T, method?: Omit<httpMethod, "GET">, token?: string, headers?: Headers) => Promise<import('../
|
|
2
|
+
export declare const mutateOnCustomApi: <T, R>(endpoint: string, data: T, method?: Omit<httpMethod, "GET">, token?: string, headers?: Headers) => Promise<import('../main').BaseResponse<R>>;
|
|
3
3
|
/**
|
|
4
4
|
* a fetch function to get a certain farmorganization entity from the moduleApi (will be used in useEntity)
|
|
5
5
|
* @param moduleId moduleID to get the entity from
|
|
6
6
|
* @param entityId entityID of the entity to get
|
|
7
7
|
* @returns entity to get
|
|
8
8
|
*/
|
|
9
|
-
export declare const getFarmOrgEntities: <T>(moduleId: string, entityId: string) => Promise<import('../
|
|
9
|
+
export declare const getFarmOrgEntities: <T>(moduleId: string, entityId: string) => Promise<import('../main').BaseResponse<T>>;
|
|
10
10
|
/**
|
|
11
11
|
* a fetch function to get a certain MODULEDEPENDED entity from the moduleApi (will be used in useEntity)
|
|
12
12
|
* @param moduleId moduleID to get the entity from
|
|
13
13
|
* @param entityId entityID of the entity to get
|
|
14
14
|
* @returns entity to get
|
|
15
15
|
*/
|
|
16
|
-
export declare const getModuleDependedEntities: <T>(moduleId: string, entityId: string) => Promise<import('../
|
|
16
|
+
export declare const getModuleDependedEntities: <T>(moduleId: string, entityId: string) => Promise<import('../main').BaseResponse<T>>;
|
|
17
17
|
/**
|
|
18
18
|
* a fetch function to handle GET requests and returns the response.
|
|
19
19
|
* @param endpoint custom endpoint to GET data from
|
|
20
20
|
* @param token token to use (default is the modulePermissionToken)
|
|
21
21
|
* @returns Promise<BaseResponse<T>> response from the fetch
|
|
22
22
|
*/
|
|
23
|
-
export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string) => Promise<import('../
|
|
23
|
+
export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string) => Promise<import('../main').BaseResponse<T>>;
|
|
24
24
|
/**
|
|
25
25
|
* a fetch function to handle GET requests and returns the response.
|
|
26
26
|
* @param endpoint endpoint of moduleApi to fetch data from
|
|
27
27
|
* @returns Promise<BaseResponse<T>> response from the fetch
|
|
28
28
|
*/
|
|
29
|
-
export declare const fetchFromModuleApi: <T>(endpoint: string) => Promise<import('../
|
|
29
|
+
export declare const fetchFromModuleApi: <T>(endpoint: string) => Promise<import('../main').BaseResponse<T>>;
|
|
30
30
|
/**
|
|
31
31
|
* a fetch function to handle GET requests and returns the response.
|
|
32
32
|
* @param endpoint endpoint of commonApi to fetch data from
|
|
33
33
|
* @returns Promise<BaseResponse<T>> response from the fetch
|
|
34
34
|
*/
|
|
35
|
-
export declare const fetchFromCommonApi: <T>(endpoint: string) => Promise<import('../
|
|
35
|
+
export declare const fetchFromCommonApi: <T>(endpoint: string) => Promise<import('../main').BaseResponse<T>>;
|
package/dist/utils/helper.js
CHANGED
|
@@ -24,7 +24,7 @@ const p = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
24
24
|
}, m = (r, e) => {
|
|
25
25
|
const t = u(r), n = u(e), i = t.pop(), o = n.pop(), s = f(t, n);
|
|
26
26
|
return s !== 0 ? s : i && o ? f(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
27
|
-
}, a = "0.0.
|
|
27
|
+
}, a = "0.0.13888", v = (r) => l.every((e) => g(e, r)), g = (r, e) => {
|
|
28
28
|
if (!e[r]) {
|
|
29
29
|
if (e.throwError)
|
|
30
30
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
package/package.json
CHANGED