@hortiview/modulebase 0.0.13321 → 0.0.13925
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/hooks/useCustom.js +4 -4
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/lib/hooks/useCustom.d.ts +1 -1
- package/dist/lib/hooks/useStores.d.ts +9 -9
- package/dist/lib/main.d.ts +9 -2
- package/dist/lib/types/Environment.d.ts +0 -1
- package/dist/lib/types/Requests.d.ts +4 -10
- package/dist/lib/utils/fetches.d.ts +6 -6
- package/dist/lib/utils/helper.d.ts +9 -1
- package/dist/main.js +125 -118
- package/dist/types/Environment.js +1 -4
- package/dist/types/Requests.js +1 -4
- package/dist/utils/helper.js +23 -21
- package/package.json +1 -1
package/dist/hooks/useCustom.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { u as i } from "../useQuery-XBGd5Kep.js";
|
|
2
2
|
import { useBasePropsStore as n } from "../stores/BasePropsStore.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { fetchFromCustomApi as p } from "../utils/fetches.js";
|
|
4
|
+
import { universalSelector as a } from "../utils/helper.js";
|
|
5
5
|
const l = ({
|
|
6
6
|
endpoint: e,
|
|
7
7
|
queryKey: t,
|
|
@@ -12,8 +12,8 @@ const l = ({
|
|
|
12
12
|
const s = n((r) => r.organizationId);
|
|
13
13
|
return i({
|
|
14
14
|
queryKey: [...t, s],
|
|
15
|
-
queryFn: () =>
|
|
16
|
-
select: (r) => o ? o(r) :
|
|
15
|
+
queryFn: () => p(e, u),
|
|
16
|
+
select: (r) => o ? o(r) : a(r),
|
|
17
17
|
enabled: m
|
|
18
18
|
});
|
|
19
19
|
};
|
package/dist/hooks/useEntity.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { u as f } from "../useQuery-XBGd5Kep.js";
|
|
2
2
|
import { useMemo as p } from "react";
|
|
3
3
|
import { useBasePropsStore as y } from "../stores/BasePropsStore.js";
|
|
4
|
-
import { universalSelector as E } from "../types/Requests.js";
|
|
5
4
|
import { getModuleDependedEntities as g, getFarmOrgEntities as R } from "../utils/fetches.js";
|
|
5
|
+
import { universalSelector as E } from "../utils/helper.js";
|
|
6
6
|
import { useOption as M, useModuleDependency as k } from "./useOption.js";
|
|
7
7
|
const D = {
|
|
8
8
|
farms: "farm",
|
package/dist/hooks/useOption.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { u as m } from "../useQuery-XBGd5Kep.js";
|
|
2
2
|
import { g as u } from "../api-D9Lmqe6S.js";
|
|
3
3
|
import { useBasePropsStore as n } from "../stores/BasePropsStore.js";
|
|
4
|
-
import { universalSelector as s } from "../types/Requests.js";
|
|
5
4
|
import { fetchFromCommonApi as i, fetchFromModuleApi as c } from "../utils/fetches.js";
|
|
5
|
+
import { universalSelector as s } from "../utils/helper.js";
|
|
6
6
|
const f = (e) => {
|
|
7
7
|
const r = n((o) => o.commonOptions), t = u(r, e);
|
|
8
8
|
return m({
|
|
@@ -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';
|
|
@@ -14,3 +20,4 @@ export { useEntity } from './hooks/useEntity';
|
|
|
14
20
|
export { useOption } from './hooks/useOption';
|
|
15
21
|
export { useNotification, useServiceBus } from './hooks/useServiceBus';
|
|
16
22
|
export { mutateOnCustomApi } from './utils/fetches';
|
|
23
|
+
export * from './utils/helper';
|
|
@@ -13,7 +13,6 @@ export type Environments = 'SDC-DEV' | 'SDC-TEST' | 'SDC-DEMO' | 'BAYER-TES' | '
|
|
|
13
13
|
export type EnvConfig = {
|
|
14
14
|
[key in Environments]?: CustomEnv;
|
|
15
15
|
};
|
|
16
|
-
export declare const checkConfig: <T extends EnvConfig>(config: T & Record<Exclude<keyof T, Environments>, never>) => T;
|
|
17
16
|
export type CustomEnv = {
|
|
18
17
|
[key: string]: string;
|
|
19
18
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Expand, Filter, Select } from 'odata-query';
|
|
2
2
|
export type RequestConfig = {
|
|
3
|
-
redirect:
|
|
4
|
-
credentials:
|
|
3
|
+
redirect: 'follow';
|
|
4
|
+
credentials: 'omit';
|
|
5
5
|
headers: RequestHeader;
|
|
6
6
|
method: httpMethod;
|
|
7
7
|
body?: string | FormData;
|
|
8
8
|
};
|
|
9
9
|
export type RequestHeader = Headers & {
|
|
10
|
-
|
|
10
|
+
'Content-Type'?: 'application/json';
|
|
11
11
|
orgId?: string;
|
|
12
12
|
Authorization?: string;
|
|
13
13
|
Permission?: string;
|
|
14
|
-
|
|
14
|
+
'Api-Version'?: '1.0' | '2.0';
|
|
15
15
|
languageId?: string;
|
|
16
16
|
};
|
|
17
17
|
export type InternalError = {
|
|
@@ -41,10 +41,4 @@ export type BaseResponse<T> = T | T[] | {
|
|
|
41
41
|
} | {
|
|
42
42
|
items: T | T[];
|
|
43
43
|
};
|
|
44
|
-
/**
|
|
45
|
-
* a universal selector that can be used for all fetches
|
|
46
|
-
* @param data - the data to select from
|
|
47
|
-
* @returns
|
|
48
|
-
*/
|
|
49
|
-
export declare const universalSelector: <T>(data: BaseResponse<T>) => T | T[];
|
|
50
44
|
export type httpMethod = 'POST' | 'PATCH' | 'DELETE' | 'PUT' | 'GET';
|
|
@@ -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>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseProps } from '../main';
|
|
2
|
-
import { HortiViewEnvironments } from '../types/Environment';
|
|
2
|
+
import { EnvConfig, Environments, HortiViewEnvironments } from '../types/Environment';
|
|
3
|
+
import { BaseResponse } from '../types/Requests';
|
|
3
4
|
/**
|
|
4
5
|
* Validates the props and checks if the required props are set
|
|
5
6
|
* @param props props to be validated
|
|
@@ -18,3 +19,10 @@ export declare const checkIfPropExists: (prop: keyof BaseProps, props: BaseProps
|
|
|
18
19
|
*/
|
|
19
20
|
export declare const getEnvironmentVariables: () => HortiViewEnvironments | undefined;
|
|
20
21
|
export declare const checkVersion: (environmentVariables?: HortiViewEnvironments) => string | null;
|
|
22
|
+
/**
|
|
23
|
+
* a universal selector that can be used for all fetches
|
|
24
|
+
* @param data - the data to select from
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
export declare const universalSelector: <T>(data: BaseResponse<T>) => T | T[];
|
|
28
|
+
export declare const checkConfig: <T extends EnvConfig>(config: T & Record<Exclude<keyof T, Environments>, never>) => T;
|
package/dist/main.js
CHANGED
|
@@ -4,136 +4,143 @@ import { useBreadcrumbTranslation as u } from "./hooks/useBreadcrumbTranslation.
|
|
|
4
4
|
import { useSignalRMessages as n } from "./hooks/useSignalRMessages.js";
|
|
5
5
|
import { useNavigate as S } from "./module-router.js";
|
|
6
6
|
import { useBaseProps as m, useConfig as E } from "./hooks/useStores.js";
|
|
7
|
-
import { useCustom as
|
|
7
|
+
import { useCustom as F } from "./hooks/useCustom.js";
|
|
8
8
|
import { useCustomMutation as A } from "./hooks/useCustomMutation.js";
|
|
9
|
-
import { useEntity as
|
|
9
|
+
import { useEntity as _ } from "./hooks/useEntity.js";
|
|
10
10
|
import { useOption as h } from "./hooks/useOption.js";
|
|
11
|
-
import { useNotification as
|
|
11
|
+
import { useNotification as C, useServiceBus as U } from "./hooks/useServiceBus.js";
|
|
12
12
|
import { mutateOnCustomApi as v } from "./utils/fetches.js";
|
|
13
|
-
import {
|
|
13
|
+
import { arePropsValid as P, checkConfig as k, checkIfPropExists as y, checkVersion as L, getEnvironmentVariables as M, universalSelector as D } from "./utils/helper.js";
|
|
14
|
+
import { A as B, B as O, F as b, H as I, I as T, a as w, b as V, L as q, c as z, M as G, d as K, N as W, e as j, f as J, O as Q, P as X, R as Y, g as Z, h as $, i as aa, S as ea, j as sa, k as ta, l as ra, m as oa, D as ua, n as ia, E as na, o as ca, p as Sa, q as Ra, r as ma, s as Ea, t as la, u as Fa, v as Na, V as Aa, w as pa, x as _a, y as da, z as ha, C as xa, G as Ca, J as Ua, K as ga, Q as va, T as fa, U as Pa, W as ka, X as ya, Y as La, Z as Ma, _ as Da, $ as Ha, a0 as Ba, a1 as Oa, a2 as ba, a3 as Ia, a4 as Ta, a5 as wa, a6 as Va, a7 as qa, a8 as za, a9 as Ga, aa as Ka, ab as Wa, ac as ja, ad as Ja, ae as Qa, af as Xa, ag as Ya, ah as Za, ai as $a, aj as ae, ak as ee, al as se, am as te, an as re, ao as oe, ap as ue, aq as ie, ar as ne, as as ce, at as Se, au as Re, av as me, aw as Ee, ax as le, ay as Fe, az as Ne, aA as Ae, aB as pe, aC as _e, aD as de, aE as he, aF as xe, aG as Ce, aH as Ue, aI as ge, aJ as ve, aK as fe, aL as Pe, aM as ke, aN as ye, aO as Le, aP as Me, aQ as De, aR as He, aS as Be, aT as Oe } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
|
|
14
15
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
16
|
+
B as Await,
|
|
17
|
+
O as BrowserRouter,
|
|
18
|
+
b as Form,
|
|
19
|
+
I as HashRouter,
|
|
20
|
+
T as IDLE_BLOCKER,
|
|
21
|
+
w as IDLE_FETCHER,
|
|
22
|
+
V as IDLE_NAVIGATION,
|
|
23
|
+
q as Link,
|
|
24
|
+
z as Links,
|
|
25
|
+
G as MemoryRouter,
|
|
26
|
+
K as Meta,
|
|
26
27
|
s as ModuleBase,
|
|
27
28
|
r as ModuleCore,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
29
|
+
W as NavLink,
|
|
30
|
+
j as Navigate,
|
|
31
|
+
J as NavigationType,
|
|
32
|
+
Q as Outlet,
|
|
33
|
+
X as PrefetchPageLinks,
|
|
34
|
+
Y as Route,
|
|
35
|
+
Z as Router,
|
|
36
|
+
$ as RouterProvider,
|
|
37
|
+
aa as Routes,
|
|
38
|
+
ea as Scripts,
|
|
39
|
+
sa as ScrollRestoration,
|
|
40
|
+
ta as ServerRouter,
|
|
41
|
+
ra as StaticRouter,
|
|
42
|
+
oa as StaticRouterProvider,
|
|
43
|
+
ua as UNSAFE_DataRouterContext,
|
|
44
|
+
ia as UNSAFE_DataRouterStateContext,
|
|
45
|
+
na as UNSAFE_ErrorResponseImpl,
|
|
46
|
+
ca as UNSAFE_FetchersContext,
|
|
47
|
+
Sa as UNSAFE_FrameworkContext,
|
|
48
|
+
Ra as UNSAFE_LocationContext,
|
|
49
|
+
ma as UNSAFE_NavigationContext,
|
|
50
|
+
Ea as UNSAFE_RemixErrorBoundary,
|
|
51
|
+
la as UNSAFE_RouteContext,
|
|
52
|
+
Fa as UNSAFE_ServerMode,
|
|
53
|
+
Na as UNSAFE_SingleFetchRedirectSymbol,
|
|
54
|
+
Aa as UNSAFE_ViewTransitionContext,
|
|
55
|
+
pa as UNSAFE_createBrowserHistory,
|
|
56
|
+
_a as UNSAFE_createClientRoutes,
|
|
57
|
+
da as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
|
|
58
|
+
ha as UNSAFE_createRouter,
|
|
59
|
+
xa as UNSAFE_decodeViaTurboStream,
|
|
60
|
+
Ca as UNSAFE_deserializeErrors,
|
|
61
|
+
Ua as UNSAFE_getPatchRoutesOnNavigationFunction,
|
|
62
|
+
ga as UNSAFE_getSingleFetchDataStrategy,
|
|
63
|
+
va as UNSAFE_invariant,
|
|
64
|
+
fa as UNSAFE_mapRouteProperties,
|
|
65
|
+
Pa as UNSAFE_shouldHydrateRouteLoader,
|
|
66
|
+
ka as UNSAFE_useFogOFWarDiscovery,
|
|
67
|
+
ya as UNSAFE_useScrollRestoration,
|
|
68
|
+
P as arePropsValid,
|
|
69
|
+
k as checkConfig,
|
|
70
|
+
y as checkIfPropExists,
|
|
71
|
+
L as checkVersion,
|
|
72
|
+
La as createBrowserRouter,
|
|
73
|
+
Ma as createCookie,
|
|
74
|
+
Da as createCookieSessionStorage,
|
|
75
|
+
Ha as createHashRouter,
|
|
76
|
+
Ba as createMemoryRouter,
|
|
77
|
+
Oa as createMemorySessionStorage,
|
|
78
|
+
ba as createPath,
|
|
79
|
+
Ia as createRequestHandler,
|
|
80
|
+
Ta as createRoutesFromChildren,
|
|
81
|
+
wa as createRoutesFromElements,
|
|
82
|
+
Va as createRoutesStub,
|
|
83
|
+
qa as createSearchParams,
|
|
84
|
+
za as createSession,
|
|
85
|
+
Ga as createSessionStorage,
|
|
86
|
+
Ka as createStaticHandler,
|
|
87
|
+
Wa as createStaticRouter,
|
|
88
|
+
ja as data,
|
|
89
|
+
Ja as generatePath,
|
|
90
|
+
M as getEnvironmentVariables,
|
|
91
|
+
Qa as isCookie,
|
|
92
|
+
Xa as isRouteErrorResponse,
|
|
93
|
+
Ya as isSession,
|
|
94
|
+
Za as matchPath,
|
|
95
|
+
$a as matchRoutes,
|
|
90
96
|
v as mutateOnCustomApi,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
ae as parsePath,
|
|
98
|
+
ee as redirect,
|
|
99
|
+
se as redirectDocument,
|
|
100
|
+
te as renderMatches,
|
|
101
|
+
re as replace,
|
|
102
|
+
oe as resolvePath,
|
|
103
|
+
D as universalSelector,
|
|
104
|
+
ue as unstable_HistoryRouter,
|
|
105
|
+
ie as unstable_setDevServerHooks,
|
|
106
|
+
ne as unstable_usePrompt,
|
|
107
|
+
ce as useActionData,
|
|
108
|
+
Se as useAsyncError,
|
|
109
|
+
Re as useAsyncValue,
|
|
103
110
|
m as useBaseProps,
|
|
104
|
-
|
|
105
|
-
|
|
111
|
+
me as useBeforeUnload,
|
|
112
|
+
Ee as useBlocker,
|
|
106
113
|
u as useBreadcrumbTranslation,
|
|
107
114
|
E as useConfig,
|
|
108
|
-
|
|
115
|
+
F as useCustom,
|
|
109
116
|
A as useCustomMutation,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
_ as useEntity,
|
|
118
|
+
le as useFetcher,
|
|
119
|
+
Fe as useFetchers,
|
|
120
|
+
Ne as useFormAction,
|
|
121
|
+
Ae as useHref,
|
|
122
|
+
pe as useInRouterContext,
|
|
123
|
+
_e as useLinkClickHandler,
|
|
124
|
+
de as useLoaderData,
|
|
125
|
+
he as useLocation,
|
|
126
|
+
xe as useMatch,
|
|
127
|
+
Ce as useMatches,
|
|
121
128
|
S as useNavigate,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
Ue as useNavigation,
|
|
130
|
+
ge as useNavigationType,
|
|
131
|
+
C as useNotification,
|
|
125
132
|
h as useOption,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
ve as useOutlet,
|
|
134
|
+
fe as useOutletContext,
|
|
135
|
+
Pe as useParams,
|
|
136
|
+
ke as useResolvedPath,
|
|
137
|
+
ye as useRevalidator,
|
|
138
|
+
Le as useRouteError,
|
|
139
|
+
Me as useRouteLoaderData,
|
|
140
|
+
De as useRoutes,
|
|
141
|
+
He as useSearchParams,
|
|
142
|
+
U as useServiceBus,
|
|
136
143
|
n as useSignalRMessages,
|
|
137
|
-
|
|
138
|
-
|
|
144
|
+
Be as useSubmit,
|
|
145
|
+
Oe as useViewTransitionState
|
|
139
146
|
};
|
package/dist/types/Requests.js
CHANGED
package/dist/utils/helper.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { REQUIRED_PROPS as
|
|
2
|
-
const
|
|
1
|
+
import { REQUIRED_PROPS as d } from "../constants.js";
|
|
2
|
+
const h = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, u = (r) => {
|
|
3
3
|
if (typeof r != "string")
|
|
4
4
|
throw new TypeError("Invalid argument expected string");
|
|
5
|
-
const e = r.match(
|
|
5
|
+
const e = r.match(h);
|
|
6
6
|
if (!e)
|
|
7
7
|
throw new Error(`Invalid argument not valid semver ('${r}' received)`);
|
|
8
8
|
return e.shift(), e;
|
|
9
|
-
}, c = (r) => r === "*" || r === "x" || r === "X",
|
|
9
|
+
}, c = (r) => r === "*" || r === "x" || r === "X", f = (r) => {
|
|
10
10
|
const e = parseInt(r, 10);
|
|
11
11
|
return isNaN(e) ? r : e;
|
|
12
|
-
},
|
|
12
|
+
}, m = (r, e) => typeof r != typeof e ? [String(r), String(e)] : [r, e], E = (r, e) => {
|
|
13
13
|
if (c(r) || c(e))
|
|
14
14
|
return 0;
|
|
15
|
-
const [
|
|
16
|
-
return
|
|
17
|
-
},
|
|
18
|
-
for (let
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
21
|
-
return
|
|
15
|
+
const [n, t] = m(f(r), f(e));
|
|
16
|
+
return n > t ? 1 : n < t ? -1 : 0;
|
|
17
|
+
}, l = (r, e) => {
|
|
18
|
+
for (let n = 0; n < Math.max(r.length, e.length); n++) {
|
|
19
|
+
const t = E(r[n] || "0", e[n] || "0");
|
|
20
|
+
if (t !== 0)
|
|
21
|
+
return t;
|
|
22
22
|
}
|
|
23
23
|
return 0;
|
|
24
|
-
},
|
|
25
|
-
const
|
|
26
|
-
return s !== 0 ? s : i && o ?
|
|
27
|
-
},
|
|
24
|
+
}, g = (r, e) => {
|
|
25
|
+
const n = u(r), t = u(e), i = n.pop(), o = t.pop(), s = l(n, t);
|
|
26
|
+
return s !== 0 ? s : i && o ? l(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
27
|
+
}, p = "0.0.13925", w = (r) => d.every((e) => v(e, r)), v = (r, e) => {
|
|
28
28
|
if (!e[r]) {
|
|
29
29
|
if (e.throwError)
|
|
30
30
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
|
@@ -38,11 +38,13 @@ const p = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
38
38
|
}, P = (r) => {
|
|
39
39
|
if (!r?.REQ_VERSION) return null;
|
|
40
40
|
const e = r.REQ_VERSION;
|
|
41
|
-
return
|
|
42
|
-
};
|
|
41
|
+
return g(p, e) < 0 ? `ModuleBase version ${p} is probably not compatible with the current HortiView version ${e}. Please update the modulebase to be at least ${e}` : null;
|
|
42
|
+
}, _ = (r) => typeof r == "string" || typeof r == "boolean" || typeof r == "number" ? r : typeof r == "object" && "value" in r ? r.value : typeof r == "object" && "items" in r ? r.items : (Array.isArray(r), r), a = (r) => r;
|
|
43
43
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
w as arePropsValid,
|
|
45
|
+
a as checkConfig,
|
|
46
|
+
v as checkIfPropExists,
|
|
46
47
|
P as checkVersion,
|
|
47
|
-
I as getEnvironmentVariables
|
|
48
|
+
I as getEnvironmentVariables,
|
|
49
|
+
_ as universalSelector
|
|
48
50
|
};
|
package/package.json
CHANGED