@hortiview/modulebase 0.0.1-7.1-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.
- package/README.md +8 -0
- package/dist/ModuleCore-YCIFN_02.js +14973 -0
- package/dist/QueryClientProvider-Beog9TR7.js +437 -0
- package/dist/_baseGet-C6jMXSsQ.js +805 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/api-s6E2GJtu.js +458 -0
- package/dist/assets/ModuleCore.css +1 -0
- package/dist/chunk-IR6S3I6Y-BmDdD3SP.js +8162 -0
- package/dist/components/ModuleBase.js +30 -0
- package/dist/components/ModuleCore.js +10 -0
- package/dist/constants.js +34 -0
- package/dist/hooks/useBreadcrumbTranslation.js +23 -0
- package/dist/hooks/useCustom.js +19 -0
- package/dist/hooks/useCustomMutation.js +23 -0
- package/dist/hooks/useEntity.js +57 -0
- package/dist/hooks/useOffline.js +45 -0
- package/dist/hooks/useOption.js +25 -0
- package/dist/hooks/useServiceBus.js +25 -0
- package/dist/hooks/useSignalRMessages.js +13 -0
- package/dist/hooks/useStores.js +14 -0
- package/dist/isRestoring-CLuxJVSA.js +281 -0
- package/dist/lib/components/ModuleBase.d.ts +36 -0
- package/dist/lib/components/ModuleCore.d.ts +32 -0
- package/dist/lib/constants.d.ts +25 -0
- package/dist/lib/hooks/useBreadcrumbTranslation.d.ts +1 -0
- package/dist/lib/hooks/useCustom.d.ts +8 -0
- package/dist/lib/hooks/useCustomMutation.d.ts +9 -0
- package/dist/lib/hooks/useEntity.d.ts +162 -0
- package/dist/lib/hooks/useOffline.d.ts +15 -0
- package/dist/lib/hooks/useOption.d.ts +17 -0
- package/dist/lib/hooks/useServiceBus.d.ts +19 -0
- package/dist/lib/hooks/useSignalRMessages.d.ts +6 -0
- package/dist/lib/hooks/useStores.d.ts +37 -0
- package/dist/lib/main.d.ts +27 -0
- package/dist/lib/module-router.d.ts +7 -0
- package/dist/lib/provider/SignalR/SignalRProvider.d.ts +13 -0
- package/dist/lib/provider/SignalR/signalR.d.ts +53 -0
- package/dist/lib/stores/BasePropsStore.d.ts +6 -0
- package/dist/lib/stores/EnvironmentStore.d.ts +8 -0
- package/dist/lib/types/ActionStorage.d.ts +12 -0
- package/dist/lib/types/AppInsights.d.ts +12 -0
- package/dist/lib/types/BaseProps.d.ts +49 -0
- package/dist/lib/types/CommonOptions.d.ts +61 -0
- package/dist/lib/types/Deprecated.d.ts +99 -0
- package/dist/lib/types/Entities.d.ts +22 -0
- package/dist/lib/types/Environment.d.ts +18 -0
- package/dist/lib/types/EnvironmentVariable.d.ts +6 -0
- package/dist/lib/types/ModuleApi.d.ts +163 -0
- package/dist/lib/types/Requests.d.ts +44 -0
- package/dist/lib/types/ServiceBus.d.ts +17 -0
- package/dist/lib/types/SystemMessage.d.ts +14 -0
- package/dist/lib/utils/api.d.ts +20 -0
- package/dist/lib/utils/baseFetches.d.ts +19 -0
- package/dist/lib/utils/fetches.d.ts +43 -0
- package/dist/lib/utils/helper.d.ts +29 -0
- package/dist/main.js +218 -0
- package/dist/module-router.js +129 -0
- package/dist/mutation-DSKlaYzY.js +192 -0
- package/dist/omit-C9Qe80rl.js +835 -0
- package/dist/provider/SignalR/SignalRProvider.js +6408 -0
- package/dist/provider/SignalR/signalR.js +11 -0
- package/dist/react-QiIgv49H.js +27 -0
- package/dist/stores/BasePropsStore.js +7 -0
- package/dist/stores/EnvironmentStore.js +15 -0
- package/dist/types/ActionStorage.js +4 -0
- package/dist/types/AppInsights.js +1 -0
- package/dist/types/BaseProps.js +1 -0
- package/dist/types/CommonOptions.js +4 -0
- package/dist/types/Deprecated.js +1 -0
- package/dist/types/Entities.js +25 -0
- package/dist/types/Environment.js +1 -0
- package/dist/types/EnvironmentVariable.js +1 -0
- package/dist/types/ModuleApi.js +1 -0
- package/dist/types/Requests.js +1 -0
- package/dist/types/ServiceBus.js +1 -0
- package/dist/types/SystemMessage.js +1 -0
- package/dist/useMutation-zu8uxBak.js +97 -0
- package/dist/useQuery-Bj9k9zik.js +395 -0
- package/dist/utils/api.js +9 -0
- package/dist/utils/baseFetches.js +19 -0
- package/dist/utils/fetches.js +22 -0
- package/dist/utils/helper.js +55 -0
- package/dist/utils-DxRR_XLb.js +9 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { useCallback as r } from "react";
|
|
2
|
+
import { useBasePropsStore as t } from "./stores/BasePropsStore.js";
|
|
3
|
+
import { A as R, B as F, F as E, H as N, I as l, a as A, b as _, L as v, c as d, M as m, d as U, N as g, e as h, f as C, O as p, P, R as H, g as y, h as L, i as k, S as x, j as D, k as w, l as I, m as M, D as O, n as b, E as B, o as T, p as f, q as V, r as q, s as z, t as G, u as K, v as W, V as j, w as J, x as Q, y as X, z as Y, C as Z, G as $, J as aa, K as ea, Q as sa, T as ta, U as ra, W as oa, X as ia, Y as ua, Z as na, _ as ca, $ as Sa, a0 as Ra, a1 as Fa, a2 as Ea, a3 as Na, a4 as la, a5 as Aa, a6 as _a, a7 as va, a8 as da, a9 as ma, aa as Ua, ab as ga, ac as ha, ad as Ca, ae as pa, af as Pa, ag as Ha, ah as ya, ai as La, aj as ka, ak as xa, al as Da, am as wa, an as Ia, ao as Ma, ap as Oa, aq as ba, ar as Ba, as as Ta, at as fa, au as Va, av as qa, aw as za, ax as Ga, ay as Ka, az as Wa, aA as ja, aB as Ja, aC as Qa, aD as Xa, aE as Ya, aF as Za, aG as $a, aH as ae, aI as ee, aJ as se, aK as te, aL as re, aM as oe, aN as ie, aO as ue, aP as ne, aQ as ce, aR as Se, aS as Re, aT as Fe } from "./chunk-IR6S3I6Y-BmDdD3SP.js";
|
|
4
|
+
const n = () => {
|
|
5
|
+
const s = t((a) => a.navigateTo), e = t((a) => a.navigateInHortiview);
|
|
6
|
+
return r(
|
|
7
|
+
(a) => {
|
|
8
|
+
if (e) {
|
|
9
|
+
e(a);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
s?.(a);
|
|
13
|
+
},
|
|
14
|
+
[e, s]
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
R as Await,
|
|
19
|
+
F as BrowserRouter,
|
|
20
|
+
E as Form,
|
|
21
|
+
N as HashRouter,
|
|
22
|
+
l as IDLE_BLOCKER,
|
|
23
|
+
A as IDLE_FETCHER,
|
|
24
|
+
_ as IDLE_NAVIGATION,
|
|
25
|
+
v as Link,
|
|
26
|
+
d as Links,
|
|
27
|
+
m as MemoryRouter,
|
|
28
|
+
U as Meta,
|
|
29
|
+
g as NavLink,
|
|
30
|
+
h as Navigate,
|
|
31
|
+
C as NavigationType,
|
|
32
|
+
p as Outlet,
|
|
33
|
+
P as PrefetchPageLinks,
|
|
34
|
+
H as Route,
|
|
35
|
+
y as Router,
|
|
36
|
+
L as RouterProvider,
|
|
37
|
+
k as Routes,
|
|
38
|
+
x as Scripts,
|
|
39
|
+
D as ScrollRestoration,
|
|
40
|
+
w as ServerRouter,
|
|
41
|
+
I as StaticRouter,
|
|
42
|
+
M as StaticRouterProvider,
|
|
43
|
+
O as UNSAFE_DataRouterContext,
|
|
44
|
+
b as UNSAFE_DataRouterStateContext,
|
|
45
|
+
B as UNSAFE_ErrorResponseImpl,
|
|
46
|
+
T as UNSAFE_FetchersContext,
|
|
47
|
+
f as UNSAFE_FrameworkContext,
|
|
48
|
+
V as UNSAFE_LocationContext,
|
|
49
|
+
q as UNSAFE_NavigationContext,
|
|
50
|
+
z as UNSAFE_RemixErrorBoundary,
|
|
51
|
+
G as UNSAFE_RouteContext,
|
|
52
|
+
K as UNSAFE_ServerMode,
|
|
53
|
+
W as UNSAFE_SingleFetchRedirectSymbol,
|
|
54
|
+
j as UNSAFE_ViewTransitionContext,
|
|
55
|
+
J as UNSAFE_createBrowserHistory,
|
|
56
|
+
Q as UNSAFE_createClientRoutes,
|
|
57
|
+
X as UNSAFE_createClientRoutesWithHMRRevalidationOptOut,
|
|
58
|
+
Y as UNSAFE_createRouter,
|
|
59
|
+
Z as UNSAFE_decodeViaTurboStream,
|
|
60
|
+
$ as UNSAFE_deserializeErrors,
|
|
61
|
+
aa as UNSAFE_getPatchRoutesOnNavigationFunction,
|
|
62
|
+
ea as UNSAFE_getSingleFetchDataStrategy,
|
|
63
|
+
sa as UNSAFE_invariant,
|
|
64
|
+
ta as UNSAFE_mapRouteProperties,
|
|
65
|
+
ra as UNSAFE_shouldHydrateRouteLoader,
|
|
66
|
+
oa as UNSAFE_useFogOFWarDiscovery,
|
|
67
|
+
ia as UNSAFE_useScrollRestoration,
|
|
68
|
+
ua as createBrowserRouter,
|
|
69
|
+
na as createCookie,
|
|
70
|
+
ca as createCookieSessionStorage,
|
|
71
|
+
Sa as createHashRouter,
|
|
72
|
+
Ra as createMemoryRouter,
|
|
73
|
+
Fa as createMemorySessionStorage,
|
|
74
|
+
Ea as createPath,
|
|
75
|
+
Na as createRequestHandler,
|
|
76
|
+
la as createRoutesFromChildren,
|
|
77
|
+
Aa as createRoutesFromElements,
|
|
78
|
+
_a as createRoutesStub,
|
|
79
|
+
va as createSearchParams,
|
|
80
|
+
da as createSession,
|
|
81
|
+
ma as createSessionStorage,
|
|
82
|
+
Ua as createStaticHandler,
|
|
83
|
+
ga as createStaticRouter,
|
|
84
|
+
ha as data,
|
|
85
|
+
Ca as generatePath,
|
|
86
|
+
pa as isCookie,
|
|
87
|
+
Pa as isRouteErrorResponse,
|
|
88
|
+
Ha as isSession,
|
|
89
|
+
ya as matchPath,
|
|
90
|
+
La as matchRoutes,
|
|
91
|
+
ka as parsePath,
|
|
92
|
+
xa as redirect,
|
|
93
|
+
Da as redirectDocument,
|
|
94
|
+
wa as renderMatches,
|
|
95
|
+
Ia as replace,
|
|
96
|
+
Ma as resolvePath,
|
|
97
|
+
Oa as unstable_HistoryRouter,
|
|
98
|
+
ba as unstable_setDevServerHooks,
|
|
99
|
+
Ba as unstable_usePrompt,
|
|
100
|
+
Ta as useActionData,
|
|
101
|
+
fa as useAsyncError,
|
|
102
|
+
Va as useAsyncValue,
|
|
103
|
+
qa as useBeforeUnload,
|
|
104
|
+
za as useBlocker,
|
|
105
|
+
Ga as useFetcher,
|
|
106
|
+
Ka as useFetchers,
|
|
107
|
+
Wa as useFormAction,
|
|
108
|
+
ja as useHref,
|
|
109
|
+
Ja as useInRouterContext,
|
|
110
|
+
Qa as useLinkClickHandler,
|
|
111
|
+
Xa as useLoaderData,
|
|
112
|
+
Ya as useLocation,
|
|
113
|
+
Za as useMatch,
|
|
114
|
+
$a as useMatches,
|
|
115
|
+
n as useNavigate,
|
|
116
|
+
ae as useNavigation,
|
|
117
|
+
ee as useNavigationType,
|
|
118
|
+
se as useOutlet,
|
|
119
|
+
te as useOutletContext,
|
|
120
|
+
re as useParams,
|
|
121
|
+
oe as useResolvedPath,
|
|
122
|
+
ie as useRevalidator,
|
|
123
|
+
ue as useRouteError,
|
|
124
|
+
ne as useRouteLoaderData,
|
|
125
|
+
ce as useRoutes,
|
|
126
|
+
Se as useSearchParams,
|
|
127
|
+
Re as useSubmit,
|
|
128
|
+
Fe as useViewTransitionState
|
|
129
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { R as o, c as a, n as r } from "./QueryClientProvider-Beog9TR7.js";
|
|
2
|
+
var d = class extends o {
|
|
3
|
+
#e;
|
|
4
|
+
#t;
|
|
5
|
+
#i;
|
|
6
|
+
constructor(t) {
|
|
7
|
+
super(), this.mutationId = t.mutationId, this.#t = t.mutationCache, this.#e = [], this.state = t.state || u(), this.setOptions(t.options), this.scheduleGc();
|
|
8
|
+
}
|
|
9
|
+
setOptions(t) {
|
|
10
|
+
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
11
|
+
}
|
|
12
|
+
get meta() {
|
|
13
|
+
return this.options.meta;
|
|
14
|
+
}
|
|
15
|
+
addObserver(t) {
|
|
16
|
+
this.#e.includes(t) || (this.#e.push(t), this.clearGcTimeout(), this.#t.notify({
|
|
17
|
+
type: "observerAdded",
|
|
18
|
+
mutation: this,
|
|
19
|
+
observer: t
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
removeObserver(t) {
|
|
23
|
+
this.#e = this.#e.filter((i) => i !== t), this.scheduleGc(), this.#t.notify({
|
|
24
|
+
type: "observerRemoved",
|
|
25
|
+
mutation: this,
|
|
26
|
+
observer: t
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
optionalRemove() {
|
|
30
|
+
this.#e.length || (this.state.status === "pending" ? this.scheduleGc() : this.#t.remove(this));
|
|
31
|
+
}
|
|
32
|
+
continue() {
|
|
33
|
+
return this.#i?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
34
|
+
this.execute(this.state.variables);
|
|
35
|
+
}
|
|
36
|
+
async execute(t) {
|
|
37
|
+
this.#i = a({
|
|
38
|
+
fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
|
|
39
|
+
onFail: (e, n) => {
|
|
40
|
+
this.#s({ type: "failed", failureCount: e, error: n });
|
|
41
|
+
},
|
|
42
|
+
onPause: () => {
|
|
43
|
+
this.#s({ type: "pause" });
|
|
44
|
+
},
|
|
45
|
+
onContinue: () => {
|
|
46
|
+
this.#s({ type: "continue" });
|
|
47
|
+
},
|
|
48
|
+
retry: this.options.retry ?? 0,
|
|
49
|
+
retryDelay: this.options.retryDelay,
|
|
50
|
+
networkMode: this.options.networkMode,
|
|
51
|
+
canRun: () => this.#t.canRun(this)
|
|
52
|
+
});
|
|
53
|
+
const i = this.state.status === "pending", s = !this.#i.canStart();
|
|
54
|
+
try {
|
|
55
|
+
if (!i) {
|
|
56
|
+
this.#s({ type: "pending", variables: t, isPaused: s }), await this.#t.config.onMutate?.(
|
|
57
|
+
t,
|
|
58
|
+
this
|
|
59
|
+
);
|
|
60
|
+
const n = await this.options.onMutate?.(t);
|
|
61
|
+
n !== this.state.context && this.#s({
|
|
62
|
+
type: "pending",
|
|
63
|
+
context: n,
|
|
64
|
+
variables: t,
|
|
65
|
+
isPaused: s
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
const e = await this.#i.start();
|
|
69
|
+
return await this.#t.config.onSuccess?.(
|
|
70
|
+
e,
|
|
71
|
+
t,
|
|
72
|
+
this.state.context,
|
|
73
|
+
this
|
|
74
|
+
), await this.options.onSuccess?.(e, t, this.state.context), await this.#t.config.onSettled?.(
|
|
75
|
+
e,
|
|
76
|
+
null,
|
|
77
|
+
this.state.variables,
|
|
78
|
+
this.state.context,
|
|
79
|
+
this
|
|
80
|
+
), await this.options.onSettled?.(e, null, t, this.state.context), this.#s({ type: "success", data: e }), e;
|
|
81
|
+
} catch (e) {
|
|
82
|
+
try {
|
|
83
|
+
throw await this.#t.config.onError?.(
|
|
84
|
+
e,
|
|
85
|
+
t,
|
|
86
|
+
this.state.context,
|
|
87
|
+
this
|
|
88
|
+
), await this.options.onError?.(
|
|
89
|
+
e,
|
|
90
|
+
t,
|
|
91
|
+
this.state.context
|
|
92
|
+
), await this.#t.config.onSettled?.(
|
|
93
|
+
void 0,
|
|
94
|
+
e,
|
|
95
|
+
this.state.variables,
|
|
96
|
+
this.state.context,
|
|
97
|
+
this
|
|
98
|
+
), await this.options.onSettled?.(
|
|
99
|
+
void 0,
|
|
100
|
+
e,
|
|
101
|
+
t,
|
|
102
|
+
this.state.context
|
|
103
|
+
), e;
|
|
104
|
+
} finally {
|
|
105
|
+
this.#s({ type: "error", error: e });
|
|
106
|
+
}
|
|
107
|
+
} finally {
|
|
108
|
+
this.#t.runNext(this);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
#s(t) {
|
|
112
|
+
const i = (s) => {
|
|
113
|
+
switch (t.type) {
|
|
114
|
+
case "failed":
|
|
115
|
+
return {
|
|
116
|
+
...s,
|
|
117
|
+
failureCount: t.failureCount,
|
|
118
|
+
failureReason: t.error
|
|
119
|
+
};
|
|
120
|
+
case "pause":
|
|
121
|
+
return {
|
|
122
|
+
...s,
|
|
123
|
+
isPaused: !0
|
|
124
|
+
};
|
|
125
|
+
case "continue":
|
|
126
|
+
return {
|
|
127
|
+
...s,
|
|
128
|
+
isPaused: !1
|
|
129
|
+
};
|
|
130
|
+
case "pending":
|
|
131
|
+
return {
|
|
132
|
+
...s,
|
|
133
|
+
context: t.context,
|
|
134
|
+
data: void 0,
|
|
135
|
+
failureCount: 0,
|
|
136
|
+
failureReason: null,
|
|
137
|
+
error: null,
|
|
138
|
+
isPaused: t.isPaused,
|
|
139
|
+
status: "pending",
|
|
140
|
+
variables: t.variables,
|
|
141
|
+
submittedAt: Date.now()
|
|
142
|
+
};
|
|
143
|
+
case "success":
|
|
144
|
+
return {
|
|
145
|
+
...s,
|
|
146
|
+
data: t.data,
|
|
147
|
+
failureCount: 0,
|
|
148
|
+
failureReason: null,
|
|
149
|
+
error: null,
|
|
150
|
+
status: "success",
|
|
151
|
+
isPaused: !1
|
|
152
|
+
};
|
|
153
|
+
case "error":
|
|
154
|
+
return {
|
|
155
|
+
...s,
|
|
156
|
+
data: void 0,
|
|
157
|
+
error: t.error,
|
|
158
|
+
failureCount: s.failureCount + 1,
|
|
159
|
+
failureReason: t.error,
|
|
160
|
+
isPaused: !1,
|
|
161
|
+
status: "error"
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
this.state = i(this.state), r.batch(() => {
|
|
166
|
+
this.#e.forEach((s) => {
|
|
167
|
+
s.onMutationUpdate(t);
|
|
168
|
+
}), this.#t.notify({
|
|
169
|
+
mutation: this,
|
|
170
|
+
type: "updated",
|
|
171
|
+
action: t
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
function u() {
|
|
177
|
+
return {
|
|
178
|
+
context: void 0,
|
|
179
|
+
data: void 0,
|
|
180
|
+
error: null,
|
|
181
|
+
failureCount: 0,
|
|
182
|
+
failureReason: null,
|
|
183
|
+
isPaused: !1,
|
|
184
|
+
status: "idle",
|
|
185
|
+
variables: void 0,
|
|
186
|
+
submittedAt: 0
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
export {
|
|
190
|
+
d as M,
|
|
191
|
+
u as g
|
|
192
|
+
};
|