@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('../types/Deprecated').DeprecatedBaseProps & {
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('../types/CommonOptions').AllDropdownsData<import('../types/CommonOptions').CommonOption>["items"];
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('../types/SystemMessage').SystemMessage) => void;
20
- logEvent?: (event: import('../types/AppInsights').AppInsightsEvent, customProperties?: import('../types/AppInsights').AppInsightsProperties) => void;
21
- logError?: (exception: import('../types/AppInsights').AppInsightsException) => void;
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('../types/Deprecated').DeprecatedBaseProps | "modulePermissionToken" | "moduleId" | "organizationId" | "basePath" | "currentNavigationPath" | "sourcePath" | "currentLanguage" | "currentLanguageId" | "alertRules" | "commonOptions" | "riseNotification" | "navigateInHortiview" | "addBreadcrumbTranslation" | "showSnackbar" | "showMessage" | "logEvent" | "logError" | "throwError">;
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('../types/Environment').HortiViewEnvironments;
28
- setEnvironment: (environment: import('../types/Environment').HortiViewEnvironments) => void;
29
- addEnvironment: (customEnv: import('../types/Environment').CustomEnv) => void;
27
+ environment: import('../main').HortiViewEnvironments;
28
+ setEnvironment: (environment: import('../main').HortiViewEnvironments) => void;
29
+ addEnvironment: (customEnv: import('../main').CustomEnv) => void;
30
30
  }, "environment">;
@@ -1,8 +1,14 @@
1
1
  export { ModuleBase } from './components/ModuleBase';
2
2
  export { ModuleCore } from './components/ModuleCore';
3
- export type { BaseProps } from './types/BaseProps';
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 { AlertServiceBusMessage } from './types/ServiceBus';
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('../types/Requests').BaseResponse<R>>;
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('../types/Requests').BaseResponse<T>>;
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('../types/Requests').BaseResponse<T>>;
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('../types/Requests').BaseResponse<T>>;
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('../types/Requests').BaseResponse<T>>;
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('../types/Requests').BaseResponse<T>>;
35
+ export declare const fetchFromCommonApi: <T>(endpoint: string) => Promise<import('../main').BaseResponse<T>>;
@@ -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.13321", v = (r) => l.every((e) => g(e, r)), g = (r, e) => {
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/modulebase",
3
3
  "description": "This is a base module for hortiview",
4
- "version": "0.0.13321",
4
+ "version": "0.0.13888",
5
5
  "type": "module",
6
6
  "author": "Falk Menge <falk.menge.ext@bayer.com>",
7
7
  "contributors": [