@hortiview/modulebase 0.0.13888 → 0.0.14044
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/components/ModuleCore.js +444 -441
- package/dist/hooks/useCustom.js +4 -4
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/lib/components/ModuleBase.d.ts +27 -5
- package/dist/lib/components/ModuleCore.d.ts +24 -5
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/hooks/useCustom.d.ts +1 -1
- package/dist/lib/hooks/useStores.d.ts +2 -1
- package/dist/lib/main.d.ts +2 -0
- package/dist/lib/types/BaseProps.d.ts +2 -0
- package/dist/lib/types/Environment.d.ts +0 -1
- package/dist/lib/types/EnvironmentVariable.d.ts +6 -0
- package/dist/lib/types/Requests.d.ts +4 -10
- 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/EnvironmentVariable.js +1 -0
- 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({
|
|
@@ -2,13 +2,35 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
2
2
|
import { RouteObject } from 'react-router';
|
|
3
3
|
import { BaseProps } from '../types/BaseProps';
|
|
4
4
|
import { EnvConfig } from '../types/Environment';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type ModuleBaseProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Properties that are passed to the Base component by the host application, {@link BaseProps}
|
|
8
|
+
*/
|
|
9
9
|
props: BaseProps;
|
|
10
|
+
/**
|
|
11
|
+
* Routes that are used in the module, {@link RouteObject}
|
|
12
|
+
*/
|
|
10
13
|
routes: RouteObject[];
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated
|
|
16
|
+
* Environment configuration that is used to configure the module, {@link EnvConfig}.
|
|
17
|
+
* New way to pass environment variables is through the base props:
|
|
18
|
+
* Setup the environment variables in the host application (module edit in the vendor section).
|
|
19
|
+
* They are then passed to the module within the base props.
|
|
20
|
+
*/
|
|
11
21
|
env?: EnvConfig;
|
|
22
|
+
/**
|
|
23
|
+
* If true, the module will use the SignalR provider to connect to the module API.
|
|
24
|
+
*/
|
|
12
25
|
useSignalR?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Query client that is used to provide the module with a query client, {@link QueryClient}.
|
|
28
|
+
* If not provided, the default query client will be used.
|
|
29
|
+
*/
|
|
13
30
|
queryClient?: QueryClient;
|
|
14
|
-
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Main component of the module. This component is used to create a module with a router and a signalR provider.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ModuleBase: ({ props, routes, env, useSignalR, queryClient, }: ModuleBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -2,12 +2,31 @@ import { QueryClient } from '@tanstack/react-query';
|
|
|
2
2
|
import { BaseProps } from '../types/BaseProps';
|
|
3
3
|
import { EnvConfig } from '../types/Environment';
|
|
4
4
|
export declare const ModuleQueryClient: QueryClient;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type ModuleCoreProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Properties that are passed to the Base component by the host application, {@link BaseProps}
|
|
8
|
+
*/
|
|
9
9
|
props: BaseProps;
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* Environment configuration that is used to configure the module, {@link EnvConfig}.
|
|
13
|
+
* New way to pass environment variables is through the base props:
|
|
14
|
+
* Setup the environment variables in the host application (module edit in the vendor section).
|
|
15
|
+
* They are then passed to the module within the base props.
|
|
16
|
+
*/
|
|
10
17
|
env?: EnvConfig;
|
|
18
|
+
/**
|
|
19
|
+
* Query client that is used to provide the module with a query client, {@link QueryClient}.
|
|
20
|
+
* If not provided, the default query client will be used.
|
|
21
|
+
*/
|
|
11
22
|
queryClient?: QueryClient;
|
|
23
|
+
/**
|
|
24
|
+
* Children components that are rendered within the module core
|
|
25
|
+
*/
|
|
12
26
|
children: React.ReactNode;
|
|
13
|
-
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Minimal component to create a module with a query client and a signalR provider (to use module api)
|
|
30
|
+
*/
|
|
31
|
+
export declare const ModuleCore: ({ props, env, queryClient, children, }: ModuleCoreProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export {};
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -20,9 +20,10 @@ export declare const useBaseProps: () => Pick<import('../main').DeprecatedBasePr
|
|
|
20
20
|
logEvent?: (event: import('../main').AppInsightsEvent, customProperties?: import('../main').AppInsightsProperties) => void;
|
|
21
21
|
logError?: (exception: import('../main').AppInsightsException) => void;
|
|
22
22
|
throwError?: (message: string, code: number) => void;
|
|
23
|
+
environmentVariables?: import('../main').EnvironmentVariable[];
|
|
23
24
|
} & {
|
|
24
25
|
setBaseProps: (props: import('../main').BaseProps) => void;
|
|
25
|
-
}, keyof import('../main').DeprecatedBaseProps | "modulePermissionToken" | "moduleId" | "organizationId" | "basePath" | "currentNavigationPath" | "sourcePath" | "currentLanguage" | "currentLanguageId" | "alertRules" | "commonOptions" | "riseNotification" | "navigateInHortiview" | "addBreadcrumbTranslation" | "showSnackbar" | "showMessage" | "logEvent" | "logError" | "throwError">;
|
|
26
|
+
}, keyof import('../main').DeprecatedBaseProps | "modulePermissionToken" | "moduleId" | "organizationId" | "basePath" | "currentNavigationPath" | "sourcePath" | "currentLanguage" | "currentLanguageId" | "alertRules" | "commonOptions" | "riseNotification" | "navigateInHortiview" | "addBreadcrumbTranslation" | "showSnackbar" | "showMessage" | "logEvent" | "logError" | "throwError" | "environmentVariables">;
|
|
26
27
|
export declare const useConfig: () => Pick<{
|
|
27
28
|
environment: import('../main').HortiViewEnvironments;
|
|
28
29
|
setEnvironment: (environment: import('../main').HortiViewEnvironments) => void;
|
package/dist/lib/main.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type * from './types/BaseProps';
|
|
|
5
5
|
export type * from './types/CommonOptions';
|
|
6
6
|
export type * from './types/Deprecated';
|
|
7
7
|
export type * from './types/Environment';
|
|
8
|
+
export type * from './types/EnvironmentVariable';
|
|
8
9
|
export type * from './types/ModuleApi';
|
|
9
10
|
export type * from './types/Requests';
|
|
10
11
|
export type * from './types/ServiceBus';
|
|
@@ -20,3 +21,4 @@ export { useEntity } from './hooks/useEntity';
|
|
|
20
21
|
export { useOption } from './hooks/useOption';
|
|
21
22
|
export { useNotification, useServiceBus } from './hooks/useServiceBus';
|
|
22
23
|
export { mutateOnCustomApi } from './utils/fetches';
|
|
24
|
+
export * from './utils/helper';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AppInsightsEvent, AppInsightsException, AppInsightsProperties } from './AppInsights';
|
|
2
2
|
import { AllDropdownsData, CommonOption } from './CommonOptions';
|
|
3
3
|
import { DeprecatedBaseProps } from './Deprecated';
|
|
4
|
+
import { EnvironmentVariable } from './EnvironmentVariable';
|
|
4
5
|
import { AlertServiceBusMessage } from './ServiceBus';
|
|
5
6
|
import { SystemMessage } from './SystemMessage';
|
|
6
7
|
/**
|
|
@@ -37,4 +38,5 @@ export type BaseProps = DeprecatedBaseProps & {
|
|
|
37
38
|
logEvent?: (event: AppInsightsEvent, customProperties?: AppInsightsProperties) => void;
|
|
38
39
|
logError?: (exception: AppInsightsException) => void;
|
|
39
40
|
throwError?: (message: string, code: number) => void;
|
|
41
|
+
environmentVariables?: EnvironmentVariable[];
|
|
40
42
|
};
|
|
@@ -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,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
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
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.14044", 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