@hortiview/modulebase 1.1.2-alpha.a0b1047e.1 → 1.1.2-alpha.a87fc893.1

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 (92) hide show
  1. package/{dist/ModuleCore-DRMqZO8r.js → ModuleCore-C4Z4zObE.js} +3030 -3110
  2. package/{dist/api-COabZnyn.js → api-CikhPcJj.js} +10 -10
  3. package/{dist/chunk-EVOBXE3Y-B43QN6RE.js → chunk-KS7C4IRE-CT7Z8Xx_.js} +3866 -3585
  4. package/components/ModuleBase.js +30 -0
  5. package/{dist/components → components}/ModuleCore.js +2 -3
  6. package/{dist/constants.js → constants.js} +8 -8
  7. package/{dist/hooks → hooks}/useCustom.js +9 -9
  8. package/{dist/hooks → hooks}/useCustomMutation.js +6 -6
  9. package/{dist/hooks → hooks}/useEntity.js +5 -5
  10. package/hooks/useOffline.js +57 -0
  11. package/{dist/hooks → hooks}/useOption.js +6 -6
  12. package/{dist/hooks → hooks}/useSignalRMessages.js +1 -1
  13. package/{dist/hooks → hooks}/useStores.js +1 -1
  14. package/{dist/isTypedArray-SkhznY1k.js → isTypedArray-T1_r8YHg.js} +33 -33
  15. package/{dist/lib → lib}/components/ModuleBase.d.ts +1 -1
  16. package/{dist/lib → lib}/components/ModuleCore.d.ts +1 -2
  17. package/{dist/lib → lib}/hooks/useCustom.d.ts +1 -1
  18. package/{dist/lib → lib}/hooks/useCustomMutation.d.ts +1 -1
  19. package/{dist/lib → lib}/hooks/useOffline.d.ts +5 -5
  20. package/lib/provider/SignalR/SignalRModuleContext.d.ts +4 -0
  21. package/lib/provider/SignalR/SignalRProvider.d.ts +9 -0
  22. package/lib/types/BaseProps.d.ts +98 -0
  23. package/lib/utils/IndexedDbService.d.ts +6 -0
  24. package/main.js +228 -0
  25. package/{dist/module-router.js → module-router.js} +813 -847
  26. package/{dist/omit-DYPaIq41.js → omit-CiJPWayj.js} +66 -66
  27. package/package.json +22 -56
  28. package/provider/SignalR/SignalRModuleContext.js +6205 -0
  29. package/provider/SignalR/SignalRProvider.js +35 -0
  30. package/{dist/stores → stores}/BasePropsStore.js +1 -0
  31. package/{dist/stores → stores}/EnvironmentStore.js +5 -5
  32. package/{dist/types → types}/Entities.js +5 -5
  33. package/{dist/useCustomMutation-9VUQ7NbQ.js → useCustomMutation-BX8lKAYe.js} +10 -10
  34. package/{dist/useQuery-DUDyh33-.js → useQuery-URJEw3ly.js} +128 -126
  35. package/utils/IndexedDbService.js +43 -0
  36. package/{dist/utils → utils}/api.js +1 -1
  37. package/{dist/utils → utils}/baseFetches.js +1 -1
  38. package/README.md +0 -9
  39. package/dist/components/ModuleBase.js +0 -21
  40. package/dist/hooks/useOffline.js +0 -57
  41. package/dist/lib/provider/SignalR/SignalRProvider.d.ts +0 -13
  42. package/dist/lib/types/BaseProps.d.ts +0 -48
  43. package/dist/lib/utils/IndexedDbService.d.ts +0 -33
  44. package/dist/main.js +0 -228
  45. package/dist/provider/SignalR/SignalRProvider.js +0 -5979
  46. package/dist/utils/IndexedDbService.js +0 -43
  47. package/{dist/IsRestoringProvider-SzKJZczp.js → IsRestoringProvider-SzKJZczp.js} +0 -0
  48. package/{dist/_commonjsHelpers-ByX85dGu.js → _commonjsHelpers-ByX85dGu.js} +0 -0
  49. package/{dist/assets → assets}/ModuleCore.css +0 -0
  50. package/{dist/enum → enum}/ActionStorage.js +0 -0
  51. package/{dist/hooks → hooks}/useBreadcrumbTranslation.js +0 -0
  52. package/{dist/lib → lib}/constants.d.ts +8 -8
  53. /package/{dist/lib → lib}/enum/ActionStorage.d.ts +0 -0
  54. /package/{dist/lib → lib}/hooks/useBreadcrumbTranslation.d.ts +0 -0
  55. /package/{dist/lib → lib}/hooks/useEntity.d.ts +0 -0
  56. /package/{dist/lib → lib}/hooks/useOption.d.ts +0 -0
  57. /package/{dist/lib → lib}/hooks/useSignalRMessages.d.ts +0 -0
  58. /package/{dist/lib → lib}/hooks/useStores.d.ts +0 -0
  59. /package/{dist/lib → lib}/main.d.ts +0 -0
  60. /package/{dist/lib → lib}/module-router.d.ts +0 -0
  61. /package/{dist/lib → lib}/provider/SignalR/signalR.d.ts +0 -0
  62. /package/{dist/lib → lib}/stores/BasePropsStore.d.ts +0 -0
  63. /package/{dist/lib → lib}/stores/EnvironmentStore.d.ts +0 -0
  64. /package/{dist/lib → lib}/types/ActionStorage.d.ts +0 -0
  65. /package/{dist/lib → lib}/types/AppInsights.d.ts +0 -0
  66. /package/{dist/lib → lib}/types/CommonOptions.d.ts +0 -0
  67. /package/{dist/lib → lib}/types/Entities.d.ts +0 -0
  68. /package/{dist/lib → lib}/types/Environment.d.ts +0 -0
  69. /package/{dist/lib → lib}/types/EnvironmentVariable.d.ts +0 -0
  70. /package/{dist/lib → lib}/types/ModuleApi.d.ts +0 -0
  71. /package/{dist/lib → lib}/types/Requests.d.ts +0 -0
  72. /package/{dist/lib → lib}/types/ServiceBus.d.ts +0 -0
  73. /package/{dist/lib → lib}/types/SystemMessage.d.ts +0 -0
  74. /package/{dist/lib → lib}/utils/api.d.ts +0 -0
  75. /package/{dist/lib → lib}/utils/baseFetches.d.ts +0 -0
  76. /package/{dist/lib → lib}/utils/fetches.d.ts +0 -0
  77. /package/{dist/lib → lib}/utils/helper.d.ts +0 -0
  78. /package/{dist/provider → provider}/SignalR/signalR.js +0 -0
  79. /package/{dist/react-c9FSfB30.js → react-c9FSfB30.js} +0 -0
  80. /package/{dist/types → types}/ActionStorage.js +0 -0
  81. /package/{dist/types → types}/AppInsights.js +0 -0
  82. /package/{dist/types → types}/BaseProps.js +0 -0
  83. /package/{dist/types → types}/CommonOptions.js +0 -0
  84. /package/{dist/types → types}/Environment.js +0 -0
  85. /package/{dist/types → types}/EnvironmentVariable.js +0 -0
  86. /package/{dist/types → types}/ModuleApi.js +0 -0
  87. /package/{dist/types → types}/Requests.js +0 -0
  88. /package/{dist/types → types}/ServiceBus.js +0 -0
  89. /package/{dist/types → types}/SystemMessage.js +0 -0
  90. /package/{dist/utils → utils}/fetches.js +0 -0
  91. /package/{dist/utils → utils}/helper.js +0 -0
  92. /package/{dist/vite-env.d.js → vite-env.d.js} +0 -0
package/main.js ADDED
@@ -0,0 +1,228 @@
1
+ import { ModuleBase as A } from "./components/ModuleBase.js";
2
+ import { M as v, Q as U } from "./ModuleCore-C4Z4zObE.js";
3
+ import { ActionState as C } from "./enum/ActionStorage.js";
4
+ import { useBreadcrumbTranslation as M } from "./hooks/useBreadcrumbTranslation.js";
5
+ import { useOffline as H } from "./hooks/useOffline.js";
6
+ import { useSignalRMessages as w } from "./hooks/useSignalRMessages.js";
7
+ import { ServerRouter as B, UNSAFE_RSCDefaultRootErrorBoundary as L, UNSAFE_ServerMode as I, UNSAFE_getHydrationData as Q, createCookie as T, createCookieSessionStorage as V, createMemorySessionStorage as W, createRequestHandler as K, createRoutesStub as q, createSession as G, createSessionStorage as j, href as z, isCookie as J, isSession as X, unstable_RSCStaticRouter as Y, unstable_routeRSCServerRequest as Z, unstable_setDevServerHooks as $, useNavigate as ee } from "./module-router.js";
8
+ import { useBaseProps as te, useConfig as se } from "./hooks/useStores.js";
9
+ import { useCustom as oe } from "./hooks/useCustom.js";
10
+ import { u as ue, a as ne } from "./useCustomMutation-BX8lKAYe.js";
11
+ import { useEntity as he } from "./hooks/useEntity.js";
12
+ import { useOption as Re } from "./hooks/useOption.js";
13
+ import { mutateOnCustomApi as Ee } from "./utils/fetches.js";
14
+ import { arePropsValid as me, checkConfig as Fe, checkIfPropExists as de, checkVersion as Ne, getEnvironmentVariables as Pe, getModuleQueryKey as pe, universalSelector as ge } from "./utils/helper.js";
15
+ import { A as Ae, B as xe, F as ve, H as Ue, I as ye, a as Ce, b as be, L as Me, d as ke, M as He, e as Oe, N as we, f as De, g as Be, O as Le, P as Ie, h as Qe, i as Te, j as Ve, R as We, k as Ke, S as qe, l as Ge, m as je, n as ze, o as Je, D as Xe, p as Ye, E as Ze, q as $e, r as ea, s as aa, t as ta, v as sa, w as ra, x as oa, V as ia, W as ua, y as na, z as ca, C as ha, G as Sa, J as Ra, K as la, Q as Ea, T as fa, U as ma, X as Fa, Y as da, Z as Na, _ as Pa, $ as pa, a0 as ga, a1 as _a, a2 as Aa, a3 as xa, a4 as va, a5 as Ua, c as ya, a6 as Ca, a7 as ba, a8 as Ma, a9 as ka, aa as Ha, ab as Oa, ac as wa, ad as Da, ae as Ba, af as La, ag as Ia, ah as Qa, ai as Ta, aj as Va, ak as Wa, al as Ka, am as qa, an as Ga, ao as ja, ap as za, aq as Ja, ar as Xa, as as Ya, at as Za, au as $a, av as et, aw as at, ax as tt, ay as st, az as rt, aA as ot, aB as it, aC as ut, aD as nt, aE as ct, aF as ht, aG as St, aH as Rt, aI as lt, aJ as Et, aK as ft, aL as mt, aM as Ft, aN as dt, aO as Nt, aP as Pt, aQ as pt, aR as gt, aS as _t, aT as At, aU as xt, aV as vt } from "./chunk-KS7C4IRE-CT7Z8Xx_.js";
16
+ import { Q as l, a as E } from "./useQuery-URJEw3ly.js";
17
+ import { u as yt } from "./useQuery-URJEw3ly.js";
18
+ import { h as f, a as m } from "./IsRestoringProvider-SzKJZczp.js";
19
+ import { u as bt } from "./IsRestoringProvider-SzKJZczp.js";
20
+ var F = class extends l {
21
+ constructor(e, a) {
22
+ super(e, a);
23
+ }
24
+ bindMethods() {
25
+ super.bindMethods(), this.fetchNextPage = this.fetchNextPage.bind(this), this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
26
+ }
27
+ setOptions(e) {
28
+ e._type = "infinite", super.setOptions(e);
29
+ }
30
+ getOptimisticResult(e) {
31
+ return e._type = "infinite", super.getOptimisticResult(e);
32
+ }
33
+ fetchNextPage(e) {
34
+ return this.fetch({
35
+ ...e,
36
+ meta: {
37
+ fetchMore: { direction: "forward" }
38
+ }
39
+ });
40
+ }
41
+ fetchPreviousPage(e) {
42
+ return this.fetch({
43
+ ...e,
44
+ meta: {
45
+ fetchMore: { direction: "backward" }
46
+ }
47
+ });
48
+ }
49
+ createResult(e, a) {
50
+ const { state: s } = e, r = super.createResult(e, a), { isFetching: o, isRefetching: S, isError: i, isRefetchError: R } = r, t = s.fetchMeta?.fetchMore?.direction, u = i && t === "forward", n = o && t === "forward", c = i && t === "backward", h = o && t === "backward";
51
+ return {
52
+ ...r,
53
+ fetchNextPage: this.fetchNextPage,
54
+ fetchPreviousPage: this.fetchPreviousPage,
55
+ hasNextPage: m(a, s.data),
56
+ hasPreviousPage: f(a, s.data),
57
+ isFetchNextPageError: u,
58
+ isFetchingNextPage: n,
59
+ isFetchPreviousPageError: c,
60
+ isFetchingPreviousPage: h,
61
+ isRefetchError: R && !u && !c,
62
+ isRefetching: S && !n && !h
63
+ };
64
+ }
65
+ };
66
+ function p(e, a) {
67
+ return E(
68
+ e,
69
+ F,
70
+ a
71
+ );
72
+ }
73
+ export {
74
+ C as ActionState,
75
+ Ae as Await,
76
+ xe as BrowserRouter,
77
+ ve as Form,
78
+ Ue as HashRouter,
79
+ ye as IDLE_BLOCKER,
80
+ Ce as IDLE_FETCHER,
81
+ be as IDLE_NAVIGATION,
82
+ Me as Link,
83
+ ke as Links,
84
+ He as MemoryRouter,
85
+ Oe as Meta,
86
+ A as ModuleBase,
87
+ v as ModuleCore,
88
+ we as NavLink,
89
+ De as Navigate,
90
+ Be as NavigationType,
91
+ Le as Outlet,
92
+ Ie as PrefetchPageLinks,
93
+ U as QueryClient,
94
+ Qe as Route,
95
+ Te as Router,
96
+ Ve as RouterContextProvider,
97
+ We as RouterProvider,
98
+ Ke as Routes,
99
+ qe as Scripts,
100
+ Ge as ScrollRestoration,
101
+ B as ServerRouter,
102
+ je as StaticRouter,
103
+ ze as StaticRouterProvider,
104
+ Je as UNSAFE_AwaitContextProvider,
105
+ Xe as UNSAFE_DataRouterContext,
106
+ Ye as UNSAFE_DataRouterStateContext,
107
+ Ze as UNSAFE_ErrorResponseImpl,
108
+ $e as UNSAFE_FetchersContext,
109
+ ea as UNSAFE_FrameworkContext,
110
+ aa as UNSAFE_LocationContext,
111
+ ta as UNSAFE_NavigationContext,
112
+ L as UNSAFE_RSCDefaultRootErrorBoundary,
113
+ sa as UNSAFE_RemixErrorBoundary,
114
+ ra as UNSAFE_RouteContext,
115
+ I as UNSAFE_ServerMode,
116
+ oa as UNSAFE_SingleFetchRedirectSymbol,
117
+ ia as UNSAFE_ViewTransitionContext,
118
+ ua as UNSAFE_WithComponentProps,
119
+ na as UNSAFE_WithErrorBoundaryProps,
120
+ ca as UNSAFE_WithHydrateFallbackProps,
121
+ ha as UNSAFE_createBrowserHistory,
122
+ Sa as UNSAFE_createClientRoutes,
123
+ Ra as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
124
+ la as UNSAFE_createHashHistory,
125
+ Ea as UNSAFE_createMemoryHistory,
126
+ fa as UNSAFE_createRouter,
127
+ ma as UNSAFE_decodeViaTurboStream,
128
+ Q as UNSAFE_getHydrationData,
129
+ Fa as UNSAFE_getPatchRoutesOnNavigationFunction,
130
+ da as UNSAFE_getTurboStreamSingleFetchDataStrategy,
131
+ Na as UNSAFE_hydrationRouteProperties,
132
+ Pa as UNSAFE_invariant,
133
+ pa as UNSAFE_mapRouteProperties,
134
+ ga as UNSAFE_shouldHydrateRouteLoader,
135
+ _a as UNSAFE_useFogOFWarDiscovery,
136
+ Aa as UNSAFE_useScrollRestoration,
137
+ xa as UNSAFE_withComponentProps,
138
+ va as UNSAFE_withErrorBoundaryProps,
139
+ Ua as UNSAFE_withHydrateFallbackProps,
140
+ me as arePropsValid,
141
+ Fe as checkConfig,
142
+ de as checkIfPropExists,
143
+ Ne as checkVersion,
144
+ ya as createBrowserRouter,
145
+ Ca as createContext,
146
+ T as createCookie,
147
+ V as createCookieSessionStorage,
148
+ ba as createHashRouter,
149
+ Ma as createMemoryRouter,
150
+ W as createMemorySessionStorage,
151
+ ka as createPath,
152
+ K as createRequestHandler,
153
+ Ha as createRoutesFromChildren,
154
+ Oa as createRoutesFromElements,
155
+ q as createRoutesStub,
156
+ wa as createSearchParams,
157
+ G as createSession,
158
+ j as createSessionStorage,
159
+ Da as createStaticHandler,
160
+ Ba as createStaticRouter,
161
+ La as data,
162
+ Ia as generatePath,
163
+ Pe as getEnvironmentVariables,
164
+ pe as getModuleQueryKey,
165
+ z as href,
166
+ J as isCookie,
167
+ Qa as isRouteErrorResponse,
168
+ X as isSession,
169
+ Ta as matchPath,
170
+ Va as matchRoutes,
171
+ Ee as mutateOnCustomApi,
172
+ Wa as parsePath,
173
+ Ka as redirect,
174
+ qa as redirectDocument,
175
+ Ga as renderMatches,
176
+ ja as replace,
177
+ za as resolvePath,
178
+ ge as universalSelector,
179
+ Ja as unstable_HistoryRouter,
180
+ Y as unstable_RSCStaticRouter,
181
+ Z as unstable_routeRSCServerRequest,
182
+ $ as unstable_setDevServerHooks,
183
+ Xa as unstable_usePrompt,
184
+ Ya as unstable_useRoute,
185
+ Za as unstable_useRouterState,
186
+ $a as useActionData,
187
+ et as useAsyncError,
188
+ at as useAsyncValue,
189
+ te as useBaseProps,
190
+ tt as useBeforeUnload,
191
+ st as useBlocker,
192
+ M as useBreadcrumbTranslation,
193
+ se as useConfig,
194
+ oe as useCustom,
195
+ ue as useCustomMutation,
196
+ he as useEntity,
197
+ rt as useFetcher,
198
+ ot as useFetchers,
199
+ it as useFormAction,
200
+ ut as useHref,
201
+ nt as useInRouterContext,
202
+ p as useInfiniteQuery,
203
+ ct as useLinkClickHandler,
204
+ ht as useLoaderData,
205
+ St as useLocation,
206
+ Rt as useMatch,
207
+ lt as useMatches,
208
+ ne as useMutation,
209
+ ee as useNavigate,
210
+ Et as useNavigation,
211
+ ft as useNavigationType,
212
+ H as useOffline,
213
+ Re as useOption,
214
+ mt as useOutlet,
215
+ Ft as useOutletContext,
216
+ dt as useParams,
217
+ yt as useQuery,
218
+ bt as useQueryClient,
219
+ Nt as useResolvedPath,
220
+ Pt as useRevalidator,
221
+ pt as useRouteError,
222
+ gt as useRouteLoaderData,
223
+ _t as useRoutes,
224
+ At as useSearchParams,
225
+ w as useSignalRMessages,
226
+ xt as useSubmit,
227
+ vt as useViewTransitionState
228
+ };