@hortiview/modulebase 0.0.16348 → 0.0.20436

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 (47) hide show
  1. package/dist/ModuleCore-DpwHP0IU.js +14973 -0
  2. package/dist/{QueryClientProvider-VtJdNkDw.js → QueryClientProvider-Beog9TR7.js} +25 -23
  3. package/dist/{_baseGet-B7FwMMGI.js → _baseGet-C6jMXSsQ.js} +447 -447
  4. package/dist/api-CogBuK0n.js +473 -0
  5. package/dist/components/ModuleBase.js +1 -1
  6. package/dist/components/ModuleCore.js +9 -14698
  7. package/dist/constants.js +1 -1
  8. package/dist/enum/ActionStorage.js +4 -0
  9. package/dist/hooks/useCustom.js +15 -18
  10. package/dist/hooks/useCustomMutation.js +12 -11
  11. package/dist/hooks/useEntity.js +48 -60
  12. package/dist/hooks/useOffline.js +57 -0
  13. package/dist/hooks/useOption.js +20 -20
  14. package/dist/hooks/useServiceBus.js +1 -1
  15. package/dist/hooks/useStores.js +1 -1
  16. package/dist/{query-CFoO2uy7.js → isRestoring-CLuxJVSA.js} +21 -17
  17. package/dist/lib/constants.d.ts +1 -1
  18. package/dist/lib/enum/ActionStorage.d.ts +7 -0
  19. package/dist/lib/hooks/useCustom.d.ts +3 -2
  20. package/dist/lib/hooks/useCustomMutation.d.ts +2 -1
  21. package/dist/lib/hooks/useEntity.d.ts +9 -23
  22. package/dist/lib/hooks/useOffline.d.ts +15 -0
  23. package/dist/lib/hooks/useStores.d.ts +10 -2
  24. package/dist/lib/main.d.ts +4 -0
  25. package/dist/lib/types/ActionStorage.d.ts +8 -0
  26. package/dist/lib/types/BaseProps.d.ts +10 -1
  27. package/dist/lib/types/Deprecated.d.ts +4 -0
  28. package/dist/lib/types/Entities.d.ts +22 -0
  29. package/dist/lib/utils/IndexedDbService.d.ts +33 -0
  30. package/dist/lib/utils/api.d.ts +1 -1
  31. package/dist/lib/utils/baseFetches.d.ts +2 -2
  32. package/dist/lib/utils/fetches.d.ts +2 -2
  33. package/dist/lib/utils/helper.d.ts +1 -0
  34. package/dist/main.js +218 -144
  35. package/dist/{mutation-CnKIetRs.js → mutation-DSKlaYzY.js} +1 -1
  36. package/dist/{omit-B7MWDtHq.js → omit-C9Qe80rl.js} +1 -1
  37. package/dist/types/ActionStorage.js +1 -0
  38. package/dist/types/Entities.js +25 -0
  39. package/dist/{useMutation-Num57Ulc.js → useMutation-zu8uxBak.js} +16 -16
  40. package/dist/{useQuery-XBGd5Kep.js → useQuery-Bj9k9zik.js} +39 -39
  41. package/dist/utils/IndexedDbService.js +43 -0
  42. package/dist/utils/api.js +1 -1
  43. package/dist/utils/baseFetches.js +15 -15
  44. package/dist/utils/fetches.js +10 -10
  45. package/dist/utils/helper.js +25 -20
  46. package/package.json +7 -3
  47. package/dist/api-D9Lmqe6S.js +0 -458
@@ -1,3 +1,4 @@
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';
@@ -17,6 +18,7 @@ import { SystemMessage } from './SystemMessage';
17
18
  * @param currentNavigationPath current path of the route, that is changed, when the host application navigates
18
19
  */
19
20
  export type BaseProps = DeprecatedBaseProps & {
21
+ isOnline?: boolean;
20
22
  modulePermissionToken?: string;
21
23
  moduleId?: string;
22
24
  organizationId?: string;
@@ -25,8 +27,8 @@ export type BaseProps = DeprecatedBaseProps & {
25
27
  sourcePath?: string | null;
26
28
  currentLanguage?: string;
27
29
  currentLanguageId?: string;
28
- alertRules?: string;
29
30
  commonOptions?: AllDropdownsData<CommonOption>['items'];
31
+ refreshModulePermissionToken?: () => Promise<string | undefined>;
30
32
  riseNotification?: (message: AlertServiceBusMessage) => Promise<unknown>;
31
33
  navigateInHortiview?: (path: string) => void;
32
34
  addBreadcrumbTranslation?: (translation: {
@@ -35,6 +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
+ getPendingActions?: () => ActionItem[];
42
+ resolveAction?: (key: string, result?: string) => void;
43
+ startResolvingAction?: (key: string) => void;
44
+ addAction?: (functionName: string, args: unknown[], key?: string) => void;
45
+ getActions?: () => ActionItem[];
46
+ getActionByKey?: (key: string) => ActionItem | undefined;
38
47
  logEvent?: (event: AppInsightsEvent, customProperties?: AppInsightsProperties) => void;
39
48
  logError?: (exception: AppInsightsException) => void;
40
49
  throwError?: (message: string, code: number) => void;
@@ -42,6 +42,10 @@ export type DeprecatedBaseProps = {
42
42
  * @deprecated Use `navigateInHortiview` instead
43
43
  */
44
44
  navigateTo?: (path: string) => void;
45
+ /**
46
+ * @deprecated modules need to call their own rules directly
47
+ */
48
+ alertRules?: string;
45
49
  };
46
50
  /**
47
51
  * @deprecated should not be used anymore
@@ -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
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The interface for the IndexedDb communication object.
3
+ * It is used in the TanstackQuery Persistent Query Provider.
4
+ *
5
+ * @see TanstackQuery {@link https://tanstack.com/query}
6
+ */
7
+ interface IndexedDbStorage {
8
+ /**
9
+ * the getter takes a key and returns the value behind the key from the IndexedDB
10
+ * @param key
11
+ * @returns a Promise containing the data behind the key or null
12
+ */
13
+ getItem: (key: string) => Promise<string | undefined | null>;
14
+ /**
15
+ * the setter adds some values to the IndexedDB with the given key as the key in the IndexedDB.
16
+ * @param key
17
+ * @returns
18
+ */
19
+ setItem: (key: string, value: string) => Promise<unknown>;
20
+ /**
21
+ * the remove fundtion takes a key and deletes the value behind the key from the IndexedDB
22
+ * @param key
23
+ * @returns
24
+ */
25
+ removeItem: (key: string) => Promise<void>;
26
+ }
27
+ /**
28
+ * This object is the implementation of the {@link IndexedDbStorage} interface using the idb-keyval package
29
+ *
30
+ * @see idb-keyval {@link https://www.npmjs.com/package/idb-keyval?activeTab=readme}
31
+ */
32
+ export declare const indexedDbStorage: IndexedDbStorage;
33
+ export {};
@@ -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,5 +1,5 @@
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('../main').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
@@ -28,7 +28,7 @@ export declare const getModuleDependedEntitiesRaw: <T>(moduleId: string, entityI
28
28
  * @param token token to use (default is the modulePermissionToken)
29
29
  * @returns Promise<BaseResponse<T>> response from the fetch
30
30
  */
31
- export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string) => Promise<import('../main').BaseResponse<T>>;
31
+ export declare const fetchFromCustomApi: <T>(endpoint: string, token?: string, noAuth?: boolean) => Promise<import('../main').BaseResponse<T>>;
32
32
  /**
33
33
  * a fetch function to handle GET requests and returns the response.
34
34
  * @param endpoint endpoint of moduleApi to fetch data from
@@ -26,3 +26,4 @@ export declare const checkVersion: (environmentVariables?: HortiViewEnvironments
26
26
  */
27
27
  export declare const universalSelector: <T>(data: BaseResponse<T>) => T | T[];
28
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,146 +1,220 @@
1
- import { ModuleBase as s } from "./components/ModuleBase.js";
2
- import { ModuleCore as r } from "./components/ModuleCore.js";
3
- import { useBreadcrumbTranslation as u } from "./hooks/useBreadcrumbTranslation.js";
4
- import { useSignalRMessages as n } from "./hooks/useSignalRMessages.js";
5
- import { useNavigate as S } from "./module-router.js";
6
- import { useBaseProps as m, useConfig as E } from "./hooks/useStores.js";
7
- import { useCustom as F } from "./hooks/useCustom.js";
8
- import { useCustomMutation as A } from "./hooks/useCustomMutation.js";
9
- import { useEntity as _ } from "./hooks/useEntity.js";
10
- import { useOption as h } from "./hooks/useOption.js";
11
- import { useNotification as C, useServiceBus as U } from "./hooks/useServiceBus.js";
12
- import { mutateOnCustomApi as v } from "./utils/fetches.js";
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";
1
+ import { ModuleBase as A } from "./components/ModuleBase.js";
2
+ import { i as f, h as m, b as l } from "./ModuleCore-DpwHP0IU.js";
3
+ import { M as C, Q as U } from "./ModuleCore-DpwHP0IU.js";
4
+ import { ActionState as M } from "./enum/ActionStorage.js";
5
+ import { useBreadcrumbTranslation as k } from "./hooks/useBreadcrumbTranslation.js";
6
+ import { useOffline as L } from "./hooks/useOffline.js";
7
+ import { useSignalRMessages as B } from "./hooks/useSignalRMessages.js";
8
+ import { useNavigate as H } from "./module-router.js";
9
+ import { useBaseProps as I, useConfig as T } from "./hooks/useStores.js";
10
+ import { useCustom as K } from "./hooks/useCustom.js";
11
+ import { useCustomMutation as G } from "./hooks/useCustomMutation.js";
12
+ import { useEntity as j } from "./hooks/useEntity.js";
13
+ import { useOption as J } from "./hooks/useOption.js";
14
+ import { useNotification as Y, useServiceBus as Z } from "./hooks/useServiceBus.js";
15
+ import { mutateOnCustomApi as ee } from "./utils/fetches.js";
16
+ import { arePropsValid as se, checkConfig as te, checkIfPropExists as re, checkVersion as oe, getEnvironmentVariables as ie, getModuleQueryKey as ue, universalSelector as ne } from "./utils/helper.js";
17
+ import { Q as g, a as d } from "./useQuery-Bj9k9zik.js";
18
+ import { u as he } from "./useQuery-Bj9k9zik.js";
19
+ import { u as Se } from "./useMutation-zu8uxBak.js";
20
+ import { u as me } from "./QueryClientProvider-Beog9TR7.js";
21
+ import { A as ge, B as de, F as pe, H as Ee, I as Pe, a as Ne, b as Fe, L as xe, c as ve, M as Ae, d as _e, N as Ce, e as Ue, f as ye, O as Me, P as be, R as ke, g as Oe, h as Le, i as we, S as Be, j as De, k as He, l as Qe, m as Ie, D as Te, n as Ve, E as Ke, o as ze, p as Ge, q as We, r as je, s as qe, t as Je, u as Xe, v as Ye, V as Ze, w as $e, x as ea, y as aa, z as sa, C as ta, G as ra, J as oa, K as ia, Q as ua, T as na, U as ca, W as ha, X as fa, Y as Sa, Z as Ra, _ as ma, $ as la, a0 as ga, a1 as da, a2 as pa, a3 as Ea, a4 as Pa, a5 as Na, a6 as Fa, a7 as xa, a8 as va, a9 as Aa, aa as _a, ab as Ca, ac as Ua, ad as ya, ae as Ma, af as ba, ag as ka, ah as Oa, ai as La, aj as wa, ak as Ba, al as Da, am as Ha, an as Qa, ao as Ia, ap as Ta, aq as Va, ar as Ka, as as za, at as Ga, au as Wa, av as ja, aw as qa, ax as Ja, ay as Xa, az as Ya, aA as Za, aB as $a, aC as es, aD as as, aE as ss, aF as ts, aG as rs, aH as os, aI as is, aJ as us, aK as ns, aL as cs, aM as hs, aN as fs, aO as Ss, aP as Rs, aQ as ms, aR as ls, aS as gs, aT as ds } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
22
+ var p = class extends g {
23
+ constructor(e, a) {
24
+ super(e, a);
25
+ }
26
+ bindMethods() {
27
+ super.bindMethods(), this.fetchNextPage = this.fetchNextPage.bind(this), this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
28
+ }
29
+ setOptions(e, a) {
30
+ super.setOptions(
31
+ {
32
+ ...e,
33
+ behavior: f()
34
+ },
35
+ a
36
+ );
37
+ }
38
+ getOptimisticResult(e) {
39
+ return e.behavior = f(), super.getOptimisticResult(e);
40
+ }
41
+ fetchNextPage(e) {
42
+ return this.fetch({
43
+ ...e,
44
+ meta: {
45
+ fetchMore: { direction: "forward" }
46
+ }
47
+ });
48
+ }
49
+ fetchPreviousPage(e) {
50
+ return this.fetch({
51
+ ...e,
52
+ meta: {
53
+ fetchMore: { direction: "backward" }
54
+ }
55
+ });
56
+ }
57
+ createResult(e, a) {
58
+ 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";
59
+ return {
60
+ ...r,
61
+ fetchNextPage: this.fetchNextPage,
62
+ fetchPreviousPage: this.fetchPreviousPage,
63
+ hasNextPage: m(a, t.data),
64
+ hasPreviousPage: l(a, t.data),
65
+ isFetchNextPageError: u,
66
+ isFetchingNextPage: n,
67
+ isFetchPreviousPageError: c,
68
+ isFetchingPreviousPage: h,
69
+ isRefetchError: R && !u && !c,
70
+ isRefetching: S && !n && !h
71
+ };
72
+ }
73
+ };
74
+ function F(e, a) {
75
+ return d(
76
+ e,
77
+ p,
78
+ a
79
+ );
80
+ }
15
81
  export {
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,
27
- s as ModuleBase,
28
- r as ModuleCore,
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,
96
- v as mutateOnCustomApi,
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,
110
- m as useBaseProps,
111
- me as useBeforeUnload,
112
- Ee as useBlocker,
113
- u as useBreadcrumbTranslation,
114
- E as useConfig,
115
- F as useCustom,
116
- A as useCustomMutation,
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,
128
- S as useNavigate,
129
- Ue as useNavigation,
130
- ge as useNavigationType,
131
- C as useNotification,
132
- h as useOption,
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,
143
- n as useSignalRMessages,
144
- Be as useSubmit,
145
- Oe as useViewTransitionState
82
+ M as ActionState,
83
+ ge as Await,
84
+ de as BrowserRouter,
85
+ pe as Form,
86
+ Ee as HashRouter,
87
+ Pe as IDLE_BLOCKER,
88
+ Ne as IDLE_FETCHER,
89
+ Fe as IDLE_NAVIGATION,
90
+ xe as Link,
91
+ ve as Links,
92
+ Ae as MemoryRouter,
93
+ _e as Meta,
94
+ A as ModuleBase,
95
+ C as ModuleCore,
96
+ Ce as NavLink,
97
+ Ue as Navigate,
98
+ ye as NavigationType,
99
+ Me as Outlet,
100
+ be as PrefetchPageLinks,
101
+ U as QueryClient,
102
+ ke as Route,
103
+ Oe as Router,
104
+ Le as RouterProvider,
105
+ we as Routes,
106
+ Be as Scripts,
107
+ De as ScrollRestoration,
108
+ He as ServerRouter,
109
+ Qe as StaticRouter,
110
+ Ie as StaticRouterProvider,
111
+ Te as UNSAFE_DataRouterContext,
112
+ Ve as UNSAFE_DataRouterStateContext,
113
+ Ke as UNSAFE_ErrorResponseImpl,
114
+ ze as UNSAFE_FetchersContext,
115
+ Ge as UNSAFE_FrameworkContext,
116
+ We as UNSAFE_LocationContext,
117
+ je as UNSAFE_NavigationContext,
118
+ qe as UNSAFE_RemixErrorBoundary,
119
+ Je as UNSAFE_RouteContext,
120
+ Xe as UNSAFE_ServerMode,
121
+ Ye as UNSAFE_SingleFetchRedirectSymbol,
122
+ Ze as UNSAFE_ViewTransitionContext,
123
+ $e as UNSAFE_createBrowserHistory,
124
+ ea as UNSAFE_createClientRoutes,
125
+ aa as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
126
+ sa as UNSAFE_createRouter,
127
+ ta as UNSAFE_decodeViaTurboStream,
128
+ ra as UNSAFE_deserializeErrors,
129
+ oa as UNSAFE_getPatchRoutesOnNavigationFunction,
130
+ ia as UNSAFE_getSingleFetchDataStrategy,
131
+ ua as UNSAFE_invariant,
132
+ na as UNSAFE_mapRouteProperties,
133
+ ca as UNSAFE_shouldHydrateRouteLoader,
134
+ ha as UNSAFE_useFogOFWarDiscovery,
135
+ fa as UNSAFE_useScrollRestoration,
136
+ se as arePropsValid,
137
+ te as checkConfig,
138
+ re as checkIfPropExists,
139
+ oe as checkVersion,
140
+ Sa as createBrowserRouter,
141
+ Ra as createCookie,
142
+ ma as createCookieSessionStorage,
143
+ la as createHashRouter,
144
+ ga as createMemoryRouter,
145
+ da as createMemorySessionStorage,
146
+ pa as createPath,
147
+ Ea as createRequestHandler,
148
+ Pa as createRoutesFromChildren,
149
+ Na as createRoutesFromElements,
150
+ Fa as createRoutesStub,
151
+ xa as createSearchParams,
152
+ va as createSession,
153
+ Aa as createSessionStorage,
154
+ _a as createStaticHandler,
155
+ Ca as createStaticRouter,
156
+ Ua as data,
157
+ ya as generatePath,
158
+ ie as getEnvironmentVariables,
159
+ ue as getModuleQueryKey,
160
+ Ma as isCookie,
161
+ ba as isRouteErrorResponse,
162
+ ka as isSession,
163
+ Oa as matchPath,
164
+ La as matchRoutes,
165
+ ee as mutateOnCustomApi,
166
+ wa as parsePath,
167
+ Ba as redirect,
168
+ Da as redirectDocument,
169
+ Ha as renderMatches,
170
+ Qa as replace,
171
+ Ia as resolvePath,
172
+ ne as universalSelector,
173
+ Ta as unstable_HistoryRouter,
174
+ Va as unstable_setDevServerHooks,
175
+ Ka as unstable_usePrompt,
176
+ za as useActionData,
177
+ Ga as useAsyncError,
178
+ Wa as useAsyncValue,
179
+ I as useBaseProps,
180
+ ja as useBeforeUnload,
181
+ qa as useBlocker,
182
+ k as useBreadcrumbTranslation,
183
+ T as useConfig,
184
+ K as useCustom,
185
+ G as useCustomMutation,
186
+ j as useEntity,
187
+ Ja as useFetcher,
188
+ Xa as useFetchers,
189
+ Ya as useFormAction,
190
+ Za as useHref,
191
+ $a as useInRouterContext,
192
+ F as useInfiniteQuery,
193
+ es as useLinkClickHandler,
194
+ as as useLoaderData,
195
+ ss as useLocation,
196
+ ts as useMatch,
197
+ rs as useMatches,
198
+ Se as useMutation,
199
+ H as useNavigate,
200
+ os as useNavigation,
201
+ is as useNavigationType,
202
+ Y as useNotification,
203
+ L as useOffline,
204
+ J as useOption,
205
+ us as useOutlet,
206
+ ns as useOutletContext,
207
+ cs as useParams,
208
+ he as useQuery,
209
+ me as useQueryClient,
210
+ hs as useResolvedPath,
211
+ fs as useRevalidator,
212
+ Ss as useRouteError,
213
+ Rs as useRouteLoaderData,
214
+ ms as useRoutes,
215
+ ls as useSearchParams,
216
+ Z as useServiceBus,
217
+ B as useSignalRMessages,
218
+ gs as useSubmit,
219
+ ds as useViewTransitionState
146
220
  };
@@ -1,4 +1,4 @@
1
- import { R as o, c as a, n as r } from "./QueryClientProvider-VtJdNkDw.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;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,25 @@
1
+ const e = {
2
+ farms: "farm",
3
+ fields: "field",
4
+ zones: "block",
5
+ irrigation_stations: "irrigationStation",
6
+ farm_organizations: "farmOrg",
7
+ alert_rules: "farmAlertRule"
8
+ }, t = {
9
+ farm_members: "member"
10
+ }, a = {
11
+ Season: "season",
12
+ BlockPlantLayout: "blockPlantLayout",
13
+ Record: "recordLight",
14
+ Scouting: "scouting"
15
+ }, r = {
16
+ ...e,
17
+ ...t,
18
+ ...a
19
+ };
20
+ export {
21
+ r as AllEntitiesTypeResultMap,
22
+ t as FarmMemberEntitiesTypeResultMap,
23
+ e as FarmOrgEntitiesTypeResultMap,
24
+ a as ModuleDependedEntityTypeResultMap
25
+ };
@@ -1,6 +1,6 @@
1
- import * as n from "react";
2
- import { g as l } from "./mutation-CnKIetRs.js";
3
- import { S as d, f as p, h, n as a, u as b } from "./QueryClientProvider-VtJdNkDw.js";
1
+ import * as o from "react";
2
+ import { g as l } from "./mutation-DSKlaYzY.js";
3
+ import { S as d, s as p, h, n as a, u as b } from "./QueryClientProvider-Beog9TR7.js";
4
4
  import { n as m, s as f } from "./utils-DxRR_XLb.js";
5
5
  var v = class extends d {
6
6
  #e;
@@ -25,13 +25,13 @@ var v = class extends d {
25
25
  this.hasListeners() || this.#t?.removeObserver(this);
26
26
  }
27
27
  onMutationUpdate(t) {
28
- this.#r(), this.#n(t);
28
+ this.#r(), this.#o(t);
29
29
  }
30
30
  getCurrentResult() {
31
31
  return this.#i;
32
32
  }
33
33
  reset() {
34
- this.#t?.removeObserver(this), this.#t = void 0, this.#r(), this.#n();
34
+ this.#t?.removeObserver(this), this.#t = void 0, this.#r(), this.#o();
35
35
  }
36
36
  mutate(t, s) {
37
37
  return this.#s = s, this.#t?.removeObserver(this), this.#t = this.#e.getMutationCache().build(this.#e, this.options), this.#t.addObserver(this), this.#t.execute(t);
@@ -48,7 +48,7 @@ var v = class extends d {
48
48
  reset: this.reset
49
49
  };
50
50
  }
51
- #n(t) {
51
+ #o(t) {
52
52
  a.batch(() => {
53
53
  if (this.#s && this.hasListeners()) {
54
54
  const s = this.#i.variables, i = this.#i.context;
@@ -65,26 +65,26 @@ var v = class extends d {
65
65
  });
66
66
  }
67
67
  };
68
- function C(t, s) {
69
- const i = b(), [e] = n.useState(
68
+ function M(t, s) {
69
+ const i = b(s), [e] = o.useState(
70
70
  () => new v(
71
71
  i,
72
72
  t
73
73
  )
74
74
  );
75
- n.useEffect(() => {
75
+ o.useEffect(() => {
76
76
  e.setOptions(t);
77
77
  }, [e, t]);
78
- const r = n.useSyncExternalStore(
79
- n.useCallback(
80
- (o) => e.subscribe(a.batchCalls(o)),
78
+ const r = o.useSyncExternalStore(
79
+ o.useCallback(
80
+ (n) => e.subscribe(a.batchCalls(n)),
81
81
  [e]
82
82
  ),
83
83
  () => e.getCurrentResult(),
84
84
  () => e.getCurrentResult()
85
- ), u = n.useCallback(
86
- (o, c) => {
87
- e.mutate(o, c).catch(m);
85
+ ), u = o.useCallback(
86
+ (n, c) => {
87
+ e.mutate(n, c).catch(m);
88
88
  },
89
89
  [e]
90
90
  );
@@ -93,5 +93,5 @@ function C(t, s) {
93
93
  return { ...r, mutate: u, mutateAsync: r.mutate };
94
94
  }
95
95
  export {
96
- C as u
96
+ M as u
97
97
  };