@hortiview/modulebase 0.0.13075 → 0.0.13100-beta

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.
Files changed (68) hide show
  1. package/dist/ModuleCore-YCIFN_02.js +14973 -0
  2. package/dist/{QueryClientProvider-Q_mWQTzQ.js → QueryClientProvider-Beog9TR7.js} +39 -37
  3. package/dist/{_baseGet-B7FwMMGI.js → _baseGet-C6jMXSsQ.js} +447 -447
  4. package/dist/{api-D9Lmqe6S.js → api-s6E2GJtu.js} +48 -48
  5. package/dist/assets/ModuleCore.css +1 -0
  6. package/dist/components/ModuleBase.js +17 -498
  7. package/dist/components/ModuleCore.js +10 -0
  8. package/dist/hooks/useCustom.js +15 -18
  9. package/dist/hooks/useCustomMutation.js +14 -12
  10. package/dist/hooks/useEntity.js +48 -58
  11. package/dist/hooks/useOffline.js +45 -0
  12. package/dist/hooks/useOption.js +16 -16
  13. package/dist/hooks/useServiceBus.js +19 -11
  14. package/dist/hooks/useStores.js +1 -1
  15. package/dist/{query-CRIVoEP7.js → isRestoring-CLuxJVSA.js} +21 -17
  16. package/dist/lib/components/ModuleBase.d.ts +36 -0
  17. package/dist/lib/components/ModuleCore.d.ts +32 -0
  18. package/dist/{constants.d.ts → lib/constants.d.ts} +1 -1
  19. package/dist/{hooks → lib/hooks}/useCustom.d.ts +2 -1
  20. package/dist/{hooks → lib/hooks}/useCustomMutation.d.ts +2 -1
  21. package/dist/{hooks → lib/hooks}/useEntity.d.ts +6 -24
  22. package/dist/lib/hooks/useOffline.d.ts +15 -0
  23. package/dist/{hooks → lib/hooks}/useServiceBus.d.ts +6 -2
  24. package/dist/lib/hooks/useStores.d.ts +37 -0
  25. package/dist/lib/main.d.ts +27 -0
  26. package/dist/lib/types/ActionStorage.d.ts +13 -0
  27. package/dist/{types → lib/types}/BaseProps.d.ts +10 -2
  28. package/dist/{types → lib/types}/Deprecated.d.ts +6 -0
  29. package/dist/lib/types/Entities.d.ts +22 -0
  30. package/dist/{types → lib/types}/Environment.d.ts +1 -1
  31. package/dist/lib/types/EnvironmentVariable.d.ts +6 -0
  32. package/dist/{types → lib/types}/Requests.d.ts +4 -10
  33. package/dist/{utils → lib/utils}/api.d.ts +1 -1
  34. package/dist/{utils → lib/utils}/baseFetches.d.ts +2 -2
  35. package/dist/{utils → lib/utils}/fetches.d.ts +14 -6
  36. package/dist/lib/utils/helper.d.ts +29 -0
  37. package/dist/main.js +215 -133
  38. package/dist/{mutation-X73nm7Df.js → mutation-DSKlaYzY.js} +1 -1
  39. package/dist/{omit-B7MWDtHq.js → omit-C9Qe80rl.js} +1 -1
  40. package/dist/stores/EnvironmentStore.js +3 -2
  41. package/dist/types/ActionStorage.js +4 -0
  42. package/dist/types/Entities.js +25 -0
  43. package/dist/types/Environment.js +1 -4
  44. package/dist/types/EnvironmentVariable.js +1 -0
  45. package/dist/types/Requests.js +1 -4
  46. package/dist/{useMutation-3rykrmeD.js → useMutation-zu8uxBak.js} +16 -16
  47. package/dist/{useQuery-CwwWze9O.js → useQuery-Bj9k9zik.js} +47 -47
  48. package/dist/utils/api.js +1 -1
  49. package/dist/utils/baseFetches.js +15 -15
  50. package/dist/utils/fetches.js +14 -13
  51. package/dist/utils/helper.js +55 -0
  52. package/package.json +7 -2
  53. package/dist/components/ModuleBase.d.ts +0 -11
  54. package/dist/hooks/useStores.d.ts +0 -30
  55. package/dist/main.d.ts +0 -13
  56. /package/dist/{hooks → lib/hooks}/useBreadcrumbTranslation.d.ts +0 -0
  57. /package/dist/{hooks → lib/hooks}/useOption.d.ts +0 -0
  58. /package/dist/{hooks → lib/hooks}/useSignalRMessages.d.ts +0 -0
  59. /package/dist/{module-router.d.ts → lib/module-router.d.ts} +0 -0
  60. /package/dist/{provider → lib/provider}/SignalR/SignalRProvider.d.ts +0 -0
  61. /package/dist/{provider → lib/provider}/SignalR/signalR.d.ts +0 -0
  62. /package/dist/{stores → lib/stores}/BasePropsStore.d.ts +0 -0
  63. /package/dist/{stores → lib/stores}/EnvironmentStore.d.ts +0 -0
  64. /package/dist/{types → lib/types}/AppInsights.d.ts +0 -0
  65. /package/dist/{types → lib/types}/CommonOptions.d.ts +0 -0
  66. /package/dist/{types → lib/types}/ModuleApi.d.ts +0 -0
  67. /package/dist/{types → lib/types}/ServiceBus.d.ts +0 -0
  68. /package/dist/{types → lib/types}/SystemMessage.d.ts +0 -0
@@ -1,6 +1,8 @@
1
+ import { ActionItem } from './ActionStorage';
1
2
  import { AppInsightsEvent, AppInsightsException, AppInsightsProperties } from './AppInsights';
2
3
  import { AllDropdownsData, CommonOption } from './CommonOptions';
3
4
  import { DeprecatedBaseProps } from './Deprecated';
5
+ import { EnvironmentVariable } from './EnvironmentVariable';
4
6
  import { AlertServiceBusMessage } from './ServiceBus';
5
7
  import { SystemMessage } from './SystemMessage';
6
8
  /**
@@ -16,6 +18,7 @@ import { SystemMessage } from './SystemMessage';
16
18
  * @param currentNavigationPath current path of the route, that is changed, when the host application navigates
17
19
  */
18
20
  export type BaseProps = DeprecatedBaseProps & {
21
+ isOnline?: boolean;
19
22
  modulePermissionToken?: string;
20
23
  moduleId?: string;
21
24
  organizationId?: string;
@@ -26,8 +29,7 @@ export type BaseProps = DeprecatedBaseProps & {
26
29
  currentLanguageId?: string;
27
30
  alertRules?: string;
28
31
  commonOptions?: AllDropdownsData<CommonOption>['items'];
29
- serviceBusNotification?: (message: AlertServiceBusMessage, //currently only used for alerts
30
- apiKey: string, queue: string, topic: string) => Promise<unknown>;
32
+ riseNotification?: (message: AlertServiceBusMessage) => Promise<unknown>;
31
33
  navigateInHortiview?: (path: string) => void;
32
34
  addBreadcrumbTranslation?: (translation: {
33
35
  key: string;
@@ -35,7 +37,13 @@ export type BaseProps = DeprecatedBaseProps & {
35
37
  }, hide?: boolean) => void;
36
38
  showSnackbar?: (message: string, icon?: string) => void;
37
39
  showMessage?: (message: SystemMessage) => void;
40
+ pendingActions?: ActionItem[];
41
+ resolveAction?: (key: string, result?: string) => void;
42
+ addAction?: (functionName: string, args: unknown[], key?: string) => void;
43
+ getActions?: () => ActionItem[];
44
+ getActionByKey?: (key: string) => ActionItem | undefined;
38
45
  logEvent?: (event: AppInsightsEvent, customProperties?: AppInsightsProperties) => void;
39
46
  logError?: (exception: AppInsightsException) => void;
40
47
  throwError?: (message: string, code: number) => void;
48
+ environmentVariables?: EnvironmentVariable[];
41
49
  };
@@ -1,3 +1,4 @@
1
+ import { AlertServiceBusMessage } from './ServiceBus';
1
2
  import { SystemMessage } from './SystemMessage';
2
3
  /**
3
4
  * @deprecated should not be used anymore, will be removed in the near future (max 2 months)
@@ -21,6 +22,11 @@ export type DeprecatedBaseProps = {
21
22
  * @deprecated
22
23
  */
23
24
  addNotification?: (notification: OldAlertDto) => void;
25
+ /**
26
+ * @deprecated use `riseNotification` instead
27
+ */
28
+ serviceBusNotification?: (message: AlertServiceBusMessage, //currently only used for alerts
29
+ apiKey: string, queue: string, topic: string) => Promise<unknown>;
24
30
  /**
25
31
  * @deprecated Use `showMessage` instead
26
32
  */
@@ -0,0 +1,22 @@
1
+ import { Block, BlockPlantLayout, Farm, FarmAlertRule, FarmOrganization, Field, IrrigationStation, Season } from '../types/ModuleApi';
2
+ export type HortiviewDataAreaGroup = 'FarmOrganization' | 'FarmMember';
3
+ export type ModuleDataAreaGroup = 'ModuleDepended';
4
+ export type FarmOrganizationEntities = 'farms' | 'fields' | 'zones' | 'irrigation_stations' | 'farm_organizations' | 'alert_rules';
5
+ export type FarmMemberEntities = 'farm_members';
6
+ export type ModuleDependendEntities = 'Season' | 'BlockPlantLayout' | (string & {});
7
+ export type HortiviewDataAreaEntity<T extends HortiviewDataAreaGroup | ModuleDataAreaGroup> = T extends 'FarmOrganization' ? FarmOrganizationEntities : T extends 'FarmMember' ? FarmMemberEntities : T extends 'ModuleDepended' ? ModuleDependendEntities : never;
8
+ export type ResultMap<T extends FarmMemberEntities | FarmOrganizationEntities | ModuleDependendEntities> = T extends 'zones' ? Block : T extends 'fields' ? Field : T extends 'farms' ? Farm : T extends 'irrigation_stations' ? IrrigationStation : T extends 'farm_organizations' ? FarmOrganization : T extends 'alert_rules' ? FarmAlertRule : T extends 'Season' ? Season : T extends 'BlockPlantLayout' ? BlockPlantLayout : unknown;
9
+ export declare const FarmOrgEntitiesTypeResultMap: Record<FarmOrganizationEntities, string>;
10
+ export declare const FarmMemberEntitiesTypeResultMap: Record<FarmMemberEntities, string>;
11
+ export declare const ModuleDependedEntityTypeResultMap: Record<ModuleDependendEntities, string>;
12
+ export declare const AllEntitiesTypeResultMap: {
13
+ Season: string;
14
+ BlockPlantLayout: string;
15
+ farm_members: string;
16
+ farms: string;
17
+ fields: string;
18
+ zones: string;
19
+ irrigation_stations: string;
20
+ farm_organizations: string;
21
+ alert_rules: string;
22
+ };
@@ -3,6 +3,7 @@ export interface HortiViewEnvironments {
3
3
  MODULE_AUTH_API: string;
4
4
  API_PREFIX: string;
5
5
  ENVIRONMENT: string;
6
+ REQ_VERSION: string;
6
7
  [customkey: string]: string;
7
8
  }
8
9
  export interface CustomWindow extends Window {
@@ -12,7 +13,6 @@ export type Environments = 'SDC-DEV' | 'SDC-TEST' | 'SDC-DEMO' | 'BAYER-TES' | '
12
13
  export type EnvConfig = {
13
14
  [key in Environments]?: CustomEnv;
14
15
  };
15
- export declare const checkConfig: <T extends EnvConfig>(config: T & Record<Exclude<keyof T, Environments>, never>) => T;
16
16
  export type CustomEnv = {
17
17
  [key: string]: string;
18
18
  };
@@ -0,0 +1,6 @@
1
+ export type EnvironmentVariable = {
2
+ id?: string;
3
+ key: string;
4
+ value: string;
5
+ appEnvironmentId: string | null;
6
+ };
@@ -1,17 +1,17 @@
1
1
  import { Expand, Filter, Select } from 'odata-query';
2
2
  export type RequestConfig = {
3
- redirect: "follow";
4
- credentials: "omit";
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
- "Content-Type"?: "application/json";
10
+ 'Content-Type'?: 'application/json';
11
11
  orgId?: string;
12
12
  Authorization?: string;
13
13
  Permission?: string;
14
- "Api-Version"?: "1.0" | "2.0";
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,5 @@
1
1
  import { BaseResponse, httpMethod, Query, RequestConfig } from '../types/Requests';
2
- export declare const getConfig: (token: string, organizationId?: string, languageId?: string, method?: httpMethod, customHeaders?: Headers) => RequestConfig;
2
+ export declare const getConfig: (token?: string, organizationId?: string, languageId?: string, method?: httpMethod, customHeaders?: Headers) => RequestConfig;
3
3
  /**
4
4
  * a fetch function to handle requests and returns the response. if the response is unauthorized, it tries to refresh the token and retries the request
5
5
  * @param url - the complete url build by {@link prependBaseUrl}
@@ -8,7 +8,7 @@ import { BaseResponse, httpMethod, Query } from '../types/Requests';
8
8
  * @param headers (optional) custom headers to use
9
9
  * @returns Promise<BaseResponse<R>> response from the fetch
10
10
  */
11
- export declare const baseMutation: <T, R>(url: string, data: T, method: Omit<httpMethod, "GET">, customToken?: string, headers?: Headers) => Promise<BaseResponse<R>>;
11
+ export declare const baseMutation: <T, R>(url: string, data: T, method: Omit<httpMethod, "GET">, customToken?: string, headers?: Headers, noAuth?: boolean) => Promise<BaseResponse<R>>;
12
12
  /**
13
13
  * a fetch function to handle GET requests and returns the response.
14
14
  * @param url url to GET data from
@@ -16,4 +16,4 @@ export declare const baseMutation: <T, R>(url: string, data: T, method: Omit<htt
16
16
  * @param customToken token to use (default is the modulePermissionToken)
17
17
  * @returns Promise<BaseResponse<T>> response from the fetch
18
18
  */
19
- export declare const baseFetch: <T>(url: string, query: Query, customToken?: string) => Promise<BaseResponse<T>>;
19
+ export declare const baseFetch: <T>(url: string, query: Query, customToken?: string, noAuth?: boolean) => Promise<BaseResponse<T>>;
@@ -1,35 +1,43 @@
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, noAuth?: boolean) => 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
+ /**
18
+ * a fetch function to get a certain MODULEDEPENDED entity from the moduleApi (will be used in useEntity)
19
+ * the data will be returned in a raw format
20
+ * @param moduleId
21
+ * @param entityId
22
+ * @returns
23
+ */
24
+ export declare const getModuleDependedEntitiesRaw: <T>(moduleId: string, entityId: string) => Promise<import('../main').BaseResponse<T>>;
17
25
  /**
18
26
  * a fetch function to handle GET requests and returns the response.
19
27
  * @param endpoint custom endpoint to GET data from
20
28
  * @param token token to use (default is the modulePermissionToken)
21
29
  * @returns Promise<BaseResponse<T>> response from the fetch
22
30
  */
23
- export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string) => Promise<import('../types/Requests').BaseResponse<T>>;
31
+ export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string, noAuth?: boolean) => Promise<import('../main').BaseResponse<T>>;
24
32
  /**
25
33
  * a fetch function to handle GET requests and returns the response.
26
34
  * @param endpoint endpoint of moduleApi to fetch data from
27
35
  * @returns Promise<BaseResponse<T>> response from the fetch
28
36
  */
29
- export declare const fetchFromModuleApi: <T>(endpoint: string) => Promise<import('../types/Requests').BaseResponse<T>>;
37
+ export declare const fetchFromModuleApi: <T>(endpoint: string) => Promise<import('../main').BaseResponse<T>>;
30
38
  /**
31
39
  * a fetch function to handle GET requests and returns the response.
32
40
  * @param endpoint endpoint of commonApi to fetch data from
33
41
  * @returns Promise<BaseResponse<T>> response from the fetch
34
42
  */
35
- export declare const fetchFromCommonApi: <T>(endpoint: string) => Promise<import('../types/Requests').BaseResponse<T>>;
43
+ export declare const fetchFromCommonApi: <T>(endpoint: string) => Promise<import('../main').BaseResponse<T>>;
@@ -0,0 +1,29 @@
1
+ import { BaseProps } from '../main';
2
+ import { EnvConfig, Environments, HortiViewEnvironments } from '../types/Environment';
3
+ import { BaseResponse } from '../types/Requests';
4
+ /**
5
+ * Validates the props and checks if the required props are set
6
+ * @param props props to be validated
7
+ * @param requiredProps props that will be validated/checked if they exist
8
+ */
9
+ export declare const arePropsValid: (props: BaseProps) => boolean;
10
+ /**
11
+ * Checks if a prop exists and throws an error if it does not
12
+ * @param prop prop to be checked
13
+ * @param props props to be checked against
14
+ */
15
+ export declare const checkIfPropExists: (prop: keyof BaseProps, props: BaseProps) => boolean;
16
+ /**
17
+ * check if hortiview return the __env__ object correctly
18
+ * @returns the environment variables from the window object
19
+ */
20
+ export declare const getEnvironmentVariables: () => HortiViewEnvironments | undefined;
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;
29
+ export declare const getModuleQueryKey: (queryKey: (string | undefined)[]) => (string | undefined)[];
package/dist/main.js CHANGED
@@ -1,136 +1,218 @@
1
- import { ModuleBase as s } from "./components/ModuleBase.js";
2
- import { useBreadcrumbTranslation as r } from "./hooks/useBreadcrumbTranslation.js";
3
- import { useSignalRMessages as u } from "./hooks/useSignalRMessages.js";
4
- import { useNavigate as n } from "./module-router.js";
5
- import { useBaseProps as S, useConfig as R } from "./hooks/useStores.js";
6
- import { useCustom as E } from "./hooks/useCustom.js";
7
- import { useEntity as l } from "./hooks/useEntity.js";
8
- import { useOption as A } from "./hooks/useOption.js";
9
- import { useCustomMutation as d } from "./hooks/useCustomMutation.js";
10
- import { useServiceBus as h } from "./hooks/useServiceBus.js";
11
- import { mutateOnCustomApi as x } from "./utils/fetches.js";
12
- import { A as g, B as v, F as P, H as f, I as y, a as L, b as k, L as D, c as H, M, d as B, N as O, e as b, f as T, O as w, P as I, R as V, g as q, h as z, i as G, S as K, j as W, k as j, l as J, m as Q, D as X, n as Y, E as Z, o as $, p as aa, q as ea, r as sa, s as ta, t as ra, u as oa, v as ua, V as ia, w as na, x as ca, y as Sa, z as Ra, C as ma, G as Ea, J as Fa, K as la, Q as Na, T as Aa, U as _a, W as da, X as pa, Y as ha, Z as Ua, _ as xa, $ as Ca, a0 as ga, a1 as va, a2 as Pa, a3 as fa, a4 as ya, a5 as La, a6 as ka, a7 as Da, a8 as Ha, a9 as Ma, aa as Ba, ab as Oa, ac as ba, ad as Ta, ae as wa, af as Ia, ag as Va, ah as qa, ai as za, aj as Ga, ak as Ka, al as Wa, am as ja, an as Ja, ao as Qa, ap as Xa, aq as Ya, ar as Za, as as $a, at as ae, au as ee, av as se, aw as te, ax as re, ay as oe, az as ue, aA as ie, aB as ne, aC as ce, aD as Se, aE as Re, aF as me, aG as Ee, aH as Fe, aI as le, aJ as Ne, aK as Ae, aL as _e, aM as de, aN as pe, aO as he, aP as Ue, aQ as xe, aR as Ce, aS as ge, aT as ve } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
1
+ import { ModuleBase as A } from "./components/ModuleBase.js";
2
+ import { i as f, h as m, b as l } from "./ModuleCore-YCIFN_02.js";
3
+ import { M as C, Q as U } from "./ModuleCore-YCIFN_02.js";
4
+ import { useBreadcrumbTranslation as M } from "./hooks/useBreadcrumbTranslation.js";
5
+ import { useOffline as k } from "./hooks/useOffline.js";
6
+ import { useSignalRMessages as L } from "./hooks/useSignalRMessages.js";
7
+ import { useNavigate as B } from "./module-router.js";
8
+ import { useBaseProps as H, useConfig as Q } from "./hooks/useStores.js";
9
+ import { useCustom as T } from "./hooks/useCustom.js";
10
+ import { useCustomMutation as K } from "./hooks/useCustomMutation.js";
11
+ import { useEntity as G } from "./hooks/useEntity.js";
12
+ import { useOption as j } from "./hooks/useOption.js";
13
+ import { useNotification as J, useServiceBus as X } from "./hooks/useServiceBus.js";
14
+ import { mutateOnCustomApi as Z } from "./utils/fetches.js";
15
+ import { arePropsValid as ee, checkConfig as ae, checkIfPropExists as se, checkVersion as te, getEnvironmentVariables as re, getModuleQueryKey as oe, universalSelector as ie } from "./utils/helper.js";
16
+ import { Q as g, a as d } from "./useQuery-Bj9k9zik.js";
17
+ import { u as ne } from "./useQuery-Bj9k9zik.js";
18
+ import { u as he } from "./useMutation-zu8uxBak.js";
19
+ import { u as Se } from "./QueryClientProvider-Beog9TR7.js";
20
+ import { A as me, B as le, F as ge, H as de, I as Ee, a as Pe, b as pe, L as Ne, c as Fe, M as xe, d as ve, N as Ae, e as _e, f as Ce, O as Ue, P as ye, R as Me, g as be, h as ke, i as Oe, S as Le, j as we, k as Be, l as De, m as He, D as Qe, n as Ie, E as Te, o as Ve, p as Ke, q as ze, r as Ge, s as We, t as je, u as qe, v as Je, V as Xe, w as Ye, x as Ze, y as $e, z as ea, C as aa, G as sa, J as ta, K as ra, Q as oa, T as ia, U as ua, W as na, X as ca, Y as ha, Z as fa, _ as Sa, $ as Ra, a0 as ma, a1 as la, a2 as ga, a3 as da, a4 as Ea, a5 as Pa, a6 as pa, a7 as Na, a8 as Fa, a9 as xa, aa as va, ab as Aa, ac as _a, ad as Ca, ae as Ua, af as ya, ag as Ma, ah as ba, ai as ka, aj as Oa, ak as La, al as wa, am as Ba, an as Da, ao as Ha, ap as Qa, aq as Ia, ar as Ta, as as Va, at as Ka, au as za, av as Ga, aw as Wa, ax as ja, ay as qa, az as Ja, aA as Xa, aB as Ya, aC as Za, aD as $a, aE as es, aF as as, aG as ss, aH as ts, aI as rs, aJ as os, aK as is, aL as us, aM as ns, aN as cs, aO as hs, aP as fs, aQ as Ss, aR as Rs, aS as ms, aT as ls } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
21
+ var E = class extends g {
22
+ constructor(e, a) {
23
+ super(e, a);
24
+ }
25
+ bindMethods() {
26
+ super.bindMethods(), this.fetchNextPage = this.fetchNextPage.bind(this), this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
27
+ }
28
+ setOptions(e, a) {
29
+ super.setOptions(
30
+ {
31
+ ...e,
32
+ behavior: f()
33
+ },
34
+ a
35
+ );
36
+ }
37
+ getOptimisticResult(e) {
38
+ return e.behavior = f(), super.getOptimisticResult(e);
39
+ }
40
+ fetchNextPage(e) {
41
+ return this.fetch({
42
+ ...e,
43
+ meta: {
44
+ fetchMore: { direction: "forward" }
45
+ }
46
+ });
47
+ }
48
+ fetchPreviousPage(e) {
49
+ return this.fetch({
50
+ ...e,
51
+ meta: {
52
+ fetchMore: { direction: "backward" }
53
+ }
54
+ });
55
+ }
56
+ createResult(e, a) {
57
+ const { state: t } = e, r = super.createResult(e, a), { isFetching: o, isRefetching: S, isError: i, isRefetchError: R } = r, s = t.fetchMeta?.fetchMore?.direction, u = i && s === "forward", n = o && s === "forward", c = i && s === "backward", h = o && s === "backward";
58
+ return {
59
+ ...r,
60
+ fetchNextPage: this.fetchNextPage,
61
+ fetchPreviousPage: this.fetchPreviousPage,
62
+ hasNextPage: m(a, t.data),
63
+ hasPreviousPage: l(a, t.data),
64
+ isFetchNextPageError: u,
65
+ isFetchingNextPage: n,
66
+ isFetchPreviousPageError: c,
67
+ isFetchingPreviousPage: h,
68
+ isRefetchError: R && !u && !c,
69
+ isRefetching: S && !n && !h
70
+ };
71
+ }
72
+ };
73
+ function F(e, a) {
74
+ return d(
75
+ e,
76
+ E,
77
+ a
78
+ );
79
+ }
13
80
  export {
14
- g as Await,
15
- v as BrowserRouter,
16
- P as Form,
17
- f as HashRouter,
18
- y as IDLE_BLOCKER,
19
- L as IDLE_FETCHER,
20
- k as IDLE_NAVIGATION,
21
- D as Link,
22
- H as Links,
23
- M as MemoryRouter,
24
- B as Meta,
25
- s as ModuleBase,
26
- O as NavLink,
27
- b as Navigate,
28
- T as NavigationType,
29
- w as Outlet,
30
- I as PrefetchPageLinks,
31
- V as Route,
32
- q as Router,
33
- z as RouterProvider,
34
- G as Routes,
35
- K as Scripts,
36
- W as ScrollRestoration,
37
- j as ServerRouter,
38
- J as StaticRouter,
39
- Q as StaticRouterProvider,
40
- X as UNSAFE_DataRouterContext,
41
- Y as UNSAFE_DataRouterStateContext,
42
- Z as UNSAFE_ErrorResponseImpl,
43
- $ as UNSAFE_FetchersContext,
44
- aa as UNSAFE_FrameworkContext,
45
- ea as UNSAFE_LocationContext,
46
- sa as UNSAFE_NavigationContext,
47
- ta as UNSAFE_RemixErrorBoundary,
48
- ra as UNSAFE_RouteContext,
49
- oa as UNSAFE_ServerMode,
50
- ua as UNSAFE_SingleFetchRedirectSymbol,
51
- ia as UNSAFE_ViewTransitionContext,
52
- na as UNSAFE_createBrowserHistory,
53
- ca as UNSAFE_createClientRoutes,
54
- Sa as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
55
- Ra as UNSAFE_createRouter,
56
- ma as UNSAFE_decodeViaTurboStream,
57
- Ea as UNSAFE_deserializeErrors,
58
- Fa as UNSAFE_getPatchRoutesOnNavigationFunction,
59
- la as UNSAFE_getSingleFetchDataStrategy,
60
- Na as UNSAFE_invariant,
61
- Aa as UNSAFE_mapRouteProperties,
62
- _a as UNSAFE_shouldHydrateRouteLoader,
63
- da as UNSAFE_useFogOFWarDiscovery,
64
- pa as UNSAFE_useScrollRestoration,
81
+ me as Await,
82
+ le as BrowserRouter,
83
+ ge as Form,
84
+ de as HashRouter,
85
+ Ee as IDLE_BLOCKER,
86
+ Pe as IDLE_FETCHER,
87
+ pe as IDLE_NAVIGATION,
88
+ Ne as Link,
89
+ Fe as Links,
90
+ xe as MemoryRouter,
91
+ ve as Meta,
92
+ A as ModuleBase,
93
+ C as ModuleCore,
94
+ Ae as NavLink,
95
+ _e as Navigate,
96
+ Ce as NavigationType,
97
+ Ue as Outlet,
98
+ ye as PrefetchPageLinks,
99
+ U as QueryClient,
100
+ Me as Route,
101
+ be as Router,
102
+ ke as RouterProvider,
103
+ Oe as Routes,
104
+ Le as Scripts,
105
+ we as ScrollRestoration,
106
+ Be as ServerRouter,
107
+ De as StaticRouter,
108
+ He as StaticRouterProvider,
109
+ Qe as UNSAFE_DataRouterContext,
110
+ Ie as UNSAFE_DataRouterStateContext,
111
+ Te as UNSAFE_ErrorResponseImpl,
112
+ Ve as UNSAFE_FetchersContext,
113
+ Ke as UNSAFE_FrameworkContext,
114
+ ze as UNSAFE_LocationContext,
115
+ Ge as UNSAFE_NavigationContext,
116
+ We as UNSAFE_RemixErrorBoundary,
117
+ je as UNSAFE_RouteContext,
118
+ qe as UNSAFE_ServerMode,
119
+ Je as UNSAFE_SingleFetchRedirectSymbol,
120
+ Xe as UNSAFE_ViewTransitionContext,
121
+ Ye as UNSAFE_createBrowserHistory,
122
+ Ze as UNSAFE_createClientRoutes,
123
+ $e as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
124
+ ea as UNSAFE_createRouter,
125
+ aa as UNSAFE_decodeViaTurboStream,
126
+ sa as UNSAFE_deserializeErrors,
127
+ ta as UNSAFE_getPatchRoutesOnNavigationFunction,
128
+ ra as UNSAFE_getSingleFetchDataStrategy,
129
+ oa as UNSAFE_invariant,
130
+ ia as UNSAFE_mapRouteProperties,
131
+ ua as UNSAFE_shouldHydrateRouteLoader,
132
+ na as UNSAFE_useFogOFWarDiscovery,
133
+ ca as UNSAFE_useScrollRestoration,
134
+ ee as arePropsValid,
135
+ ae as checkConfig,
136
+ se as checkIfPropExists,
137
+ te as checkVersion,
65
138
  ha as createBrowserRouter,
66
- Ua as createCookie,
67
- xa as createCookieSessionStorage,
68
- Ca as createHashRouter,
69
- ga as createMemoryRouter,
70
- va as createMemorySessionStorage,
71
- Pa as createPath,
72
- fa as createRequestHandler,
73
- ya as createRoutesFromChildren,
74
- La as createRoutesFromElements,
75
- ka as createRoutesStub,
76
- Da as createSearchParams,
77
- Ha as createSession,
78
- Ma as createSessionStorage,
79
- Ba as createStaticHandler,
80
- Oa as createStaticRouter,
81
- ba as data,
82
- Ta as generatePath,
83
- wa as isCookie,
84
- Ia as isRouteErrorResponse,
85
- Va as isSession,
86
- qa as matchPath,
87
- za as matchRoutes,
88
- x as mutateOnCustomApi,
89
- Ga as parsePath,
90
- Ka as redirect,
91
- Wa as redirectDocument,
92
- ja as renderMatches,
93
- Ja as replace,
94
- Qa as resolvePath,
95
- Xa as unstable_HistoryRouter,
96
- Ya as unstable_setDevServerHooks,
97
- Za as unstable_usePrompt,
98
- $a as useActionData,
99
- ae as useAsyncError,
100
- ee as useAsyncValue,
101
- S as useBaseProps,
102
- se as useBeforeUnload,
103
- te as useBlocker,
104
- r as useBreadcrumbTranslation,
105
- R as useConfig,
106
- E as useCustom,
107
- d as useCustomMutation,
108
- l as useEntity,
109
- re as useFetcher,
110
- oe as useFetchers,
111
- ue as useFormAction,
112
- ie as useHref,
113
- ne as useInRouterContext,
114
- ce as useLinkClickHandler,
115
- Se as useLoaderData,
116
- Re as useLocation,
117
- me as useMatch,
118
- Ee as useMatches,
119
- n as useNavigate,
120
- Fe as useNavigation,
121
- le as useNavigationType,
122
- A as useOption,
123
- Ne as useOutlet,
124
- Ae as useOutletContext,
125
- _e as useParams,
126
- de as useResolvedPath,
127
- pe as useRevalidator,
128
- he as useRouteError,
129
- Ue as useRouteLoaderData,
130
- xe as useRoutes,
131
- Ce as useSearchParams,
132
- h as useServiceBus,
133
- u as useSignalRMessages,
134
- ge as useSubmit,
135
- ve as useViewTransitionState
139
+ fa as createCookie,
140
+ Sa as createCookieSessionStorage,
141
+ Ra as createHashRouter,
142
+ ma as createMemoryRouter,
143
+ la as createMemorySessionStorage,
144
+ ga as createPath,
145
+ da as createRequestHandler,
146
+ Ea as createRoutesFromChildren,
147
+ Pa as createRoutesFromElements,
148
+ pa as createRoutesStub,
149
+ Na as createSearchParams,
150
+ Fa as createSession,
151
+ xa as createSessionStorage,
152
+ va as createStaticHandler,
153
+ Aa as createStaticRouter,
154
+ _a as data,
155
+ Ca as generatePath,
156
+ re as getEnvironmentVariables,
157
+ oe as getModuleQueryKey,
158
+ Ua as isCookie,
159
+ ya as isRouteErrorResponse,
160
+ Ma as isSession,
161
+ ba as matchPath,
162
+ ka as matchRoutes,
163
+ Z as mutateOnCustomApi,
164
+ Oa as parsePath,
165
+ La as redirect,
166
+ wa as redirectDocument,
167
+ Ba as renderMatches,
168
+ Da as replace,
169
+ Ha as resolvePath,
170
+ ie as universalSelector,
171
+ Qa as unstable_HistoryRouter,
172
+ Ia as unstable_setDevServerHooks,
173
+ Ta as unstable_usePrompt,
174
+ Va as useActionData,
175
+ Ka as useAsyncError,
176
+ za as useAsyncValue,
177
+ H as useBaseProps,
178
+ Ga as useBeforeUnload,
179
+ Wa as useBlocker,
180
+ M as useBreadcrumbTranslation,
181
+ Q as useConfig,
182
+ T as useCustom,
183
+ K as useCustomMutation,
184
+ G as useEntity,
185
+ ja as useFetcher,
186
+ qa as useFetchers,
187
+ Ja as useFormAction,
188
+ Xa as useHref,
189
+ Ya as useInRouterContext,
190
+ F as useInfiniteQuery,
191
+ Za as useLinkClickHandler,
192
+ $a as useLoaderData,
193
+ es as useLocation,
194
+ as as useMatch,
195
+ ss as useMatches,
196
+ he as useMutation,
197
+ B as useNavigate,
198
+ ts as useNavigation,
199
+ rs as useNavigationType,
200
+ J as useNotification,
201
+ k as useOffline,
202
+ j as useOption,
203
+ os as useOutlet,
204
+ is as useOutletContext,
205
+ us as useParams,
206
+ ne as useQuery,
207
+ Se as useQueryClient,
208
+ ns as useResolvedPath,
209
+ cs as useRevalidator,
210
+ hs as useRouteError,
211
+ fs as useRouteLoaderData,
212
+ Ss as useRoutes,
213
+ Rs as useSearchParams,
214
+ X as useServiceBus,
215
+ L as useSignalRMessages,
216
+ ms as useSubmit,
217
+ ls as useViewTransitionState
136
218
  };
@@ -1,4 +1,4 @@
1
- import { R as o, c as a, n as r } from "./QueryClientProvider-Q_mWQTzQ.js";
1
+ import { R as o, c as a, n as r } from "./QueryClientProvider-Beog9TR7.js";
2
2
  var d = class extends o {
3
3
  #e;
4
4
  #t;
@@ -1,5 +1,5 @@
1
1
  import { g as hn } from "./_commonjsHelpers-BkfeUUK-.js";
2
- import { i as te, j as pn, k as qn, l as dn, m as An, b as Pt, f as B, d as wt, e as Sn, r as Tn, c as xt, n as ne, g as Kt, o as Lt, p as Rn, q as Et, a as ae, s as ie, t as Ft, u as Bt, h as In, v as Mt, w as On, x as mn, y as Cn } from "./_baseGet-B7FwMMGI.js";
2
+ import { i as te, j as pn, k as qn, l as dn, m as An, b as Pt, f as B, d as wt, e as Sn, r as Tn, c as xt, n as ne, g as Kt, o as Lt, p as Rn, q as Et, a as ae, s as ie, t as Ft, u as Bt, h as In, v as Mt, w as On, x as mn, y as Cn } from "./_baseGet-C6jMXSsQ.js";
3
3
  var H, pe;
4
4
  function jn() {
5
5
  if (pe) return H;
@@ -1,8 +1,9 @@
1
1
  import { c as r } from "../react-QiIgv49H.js";
2
- const m = r((e) => ({
2
+ const E = r((e) => ({
3
3
  environment: {
4
4
  ENVIRONMENT: "DEV",
5
5
  COMMON_API: "",
6
+ REQ_VERSION: "",
6
7
  MODULE_AUTH_API: "",
7
8
  API_PREFIX: ""
8
9
  },
@@ -10,5 +11,5 @@ const m = r((e) => ({
10
11
  addEnvironment: (n) => e((o) => ({ environment: { ...n, ...o.environment } }))
11
12
  }));
12
13
  export {
13
- m as useEnvironmentStore
14
+ E as useEnvironmentStore
14
15
  };
@@ -0,0 +1,4 @@
1
+ var D = /* @__PURE__ */ ((E) => (E.ENQUEUED = "ENQUEUED", E.PENDING = "PENDING", E.SUCCESS = "RESOLVED", E.ERROR = "REJECTED", E))(D || {});
2
+ export {
3
+ D as ActionState
4
+ };