@hortiview/modulebase 0.0.13075 → 0.0.13101-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-BWvRhZyP.js +14980 -0
  2. package/dist/{QueryClientProvider-Q_mWQTzQ.js → QueryClientProvider-BSM1ol7r.js} +81 -78
  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-LSIsLTaI.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 +38 -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 +11 -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 +212 -133
  38. package/dist/{mutation-X73nm7Df.js → mutation-EhVtpjb0.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-BYO7aks8.js} +16 -16
  47. package/dist/{useQuery-CwwWze9O.js → useQuery-Jx956wwH.js} +94 -94
  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,511 +1,30 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { S as R, g as k, n as u, m as q, j as A, a as h, e as H, k as K, l as B, o as j, p as D, q as S, v as L, h as I, w as F, s as U, Q as V } from "../QueryClientProvider-Q_mWQTzQ.js";
3
- import { Q as W } from "../query-CRIVoEP7.js";
4
- import { M as X } from "../mutation-X73nm7Df.js";
5
- import { useState as $, useEffect as b } from "react";
6
- import { Y as z, h as Y, O as G, aU as J } from "../chunk-IR6S3I6Y-BmDdD3SP.js";
7
- import { REQUIRED_PROPS as Z } from "../constants.js";
8
- import { SignalRProvider as x } from "../provider/SignalR/SignalRProvider.js";
9
- import { useBasePropsStore as M } from "../stores/BasePropsStore.js";
10
- import { useEnvironmentStore as T } from "../stores/EnvironmentStore.js";
11
- var ee = class extends R {
12
- constructor(e = {}) {
13
- super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
14
- }
15
- #e;
16
- build(e, t, s) {
17
- const r = t.queryKey, n = t.queryHash ?? k(r, t);
18
- let i = this.get(n);
19
- return i || (i = new W({
20
- client: e,
21
- queryKey: r,
22
- queryHash: n,
23
- options: e.defaultQueryOptions(t),
24
- state: s,
25
- defaultOptions: e.getQueryDefaults(r)
26
- }), this.add(i)), i;
27
- }
28
- add(e) {
29
- this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
30
- type: "added",
31
- query: e
32
- }));
33
- }
34
- remove(e) {
35
- const t = this.#e.get(e.queryHash);
36
- t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
37
- }
38
- clear() {
39
- u.batch(() => {
40
- this.getAll().forEach((e) => {
41
- this.remove(e);
42
- });
43
- });
44
- }
45
- get(e) {
46
- return this.#e.get(e);
47
- }
48
- getAll() {
49
- return [...this.#e.values()];
50
- }
51
- find(e) {
52
- const t = { exact: !0, ...e };
53
- return this.getAll().find(
54
- (s) => q(t, s)
55
- );
56
- }
57
- findAll(e = {}) {
58
- const t = this.getAll();
59
- return Object.keys(e).length > 0 ? t.filter((s) => q(e, s)) : t;
60
- }
61
- notify(e) {
62
- u.batch(() => {
63
- this.listeners.forEach((t) => {
64
- t(e);
65
- });
66
- });
67
- }
68
- onFocus() {
69
- u.batch(() => {
70
- this.getAll().forEach((e) => {
71
- e.onFocus();
72
- });
73
- });
74
- }
75
- onOnline() {
76
- u.batch(() => {
77
- this.getAll().forEach((e) => {
78
- e.onOnline();
79
- });
80
- });
81
- }
82
- }, te = class extends R {
83
- constructor(e = {}) {
84
- super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#s = 0;
85
- }
86
- #e;
87
- #t;
88
- #s;
89
- build(e, t, s) {
90
- const r = new X({
91
- mutationCache: this,
92
- mutationId: ++this.#s,
93
- options: e.defaultMutationOptions(t),
94
- state: s
95
- });
96
- return this.add(r), r;
97
- }
98
- add(e) {
99
- this.#e.add(e);
100
- const t = O(e);
101
- if (typeof t == "string") {
102
- const s = this.#t.get(t);
103
- s ? s.push(e) : this.#t.set(t, [e]);
104
- }
105
- this.notify({ type: "added", mutation: e });
106
- }
107
- remove(e) {
108
- if (this.#e.delete(e)) {
109
- const t = O(e);
110
- if (typeof t == "string") {
111
- const s = this.#t.get(t);
112
- if (s)
113
- if (s.length > 1) {
114
- const r = s.indexOf(e);
115
- r !== -1 && s.splice(r, 1);
116
- } else s[0] === e && this.#t.delete(t);
117
- }
118
- }
119
- this.notify({ type: "removed", mutation: e });
120
- }
121
- canRun(e) {
122
- const t = O(e);
123
- if (typeof t == "string") {
124
- const r = this.#t.get(t)?.find(
125
- (n) => n.state.status === "pending"
126
- );
127
- return !r || r === e;
128
- } else
129
- return !0;
130
- }
131
- runNext(e) {
132
- const t = O(e);
133
- return typeof t == "string" ? this.#t.get(t)?.find((r) => r !== e && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
134
- }
135
- clear() {
136
- u.batch(() => {
137
- this.#e.forEach((e) => {
138
- this.notify({ type: "removed", mutation: e });
139
- }), this.#e.clear(), this.#t.clear();
140
- });
141
- }
142
- getAll() {
143
- return Array.from(this.#e);
144
- }
145
- find(e) {
146
- const t = { exact: !0, ...e };
147
- return this.getAll().find(
148
- (s) => A(t, s)
149
- );
150
- }
151
- findAll(e = {}) {
152
- return this.getAll().filter((t) => A(e, t));
153
- }
154
- notify(e) {
155
- u.batch(() => {
156
- this.listeners.forEach((t) => {
157
- t(e);
158
- });
159
- });
160
- }
161
- resumePausedMutations() {
162
- const e = this.getAll().filter((t) => t.state.isPaused);
163
- return u.batch(
164
- () => Promise.all(
165
- e.map((t) => t.continue().catch(h))
166
- )
167
- );
168
- }
169
- };
170
- function O(e) {
171
- return e.options.scope?.id;
172
- }
173
- function C(e) {
174
- return {
175
- onFetch: (t, s) => {
176
- const r = t.options, n = t.fetchOptions?.meta?.fetchMore?.direction, i = t.state.data?.pages || [], f = t.state.data?.pageParams || [];
177
- let c = { pages: [], pageParams: [] }, d = 0;
178
- const P = async () => {
179
- let g = !1;
180
- const Q = (o) => {
181
- Object.defineProperty(o, "signal", {
182
- enumerable: !0,
183
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
184
- g = !0;
185
- }), t.signal)
186
- });
187
- }, a = H(t.options, t.fetchOptions), m = async (o, l, p) => {
188
- if (g)
189
- return Promise.reject();
190
- if (l == null && o.pages.length)
191
- return Promise.resolve(o);
192
- const v = {
193
- client: t.client,
194
- queryKey: t.queryKey,
195
- pageParam: l,
196
- direction: p ? "backward" : "forward",
197
- meta: t.options.meta
198
- };
199
- Q(v);
200
- const _ = await a(
201
- v
202
- ), { maxPages: w } = t.options, E = p ? K : B;
203
- return {
204
- pages: E(o.pages, _, w),
205
- pageParams: E(o.pageParams, l, w)
206
- };
207
- };
208
- if (n && i.length) {
209
- const o = n === "backward", l = o ? se : N, p = {
210
- pages: i,
211
- pageParams: f
212
- }, v = l(r, p);
213
- c = await m(p, v, o);
214
- } else {
215
- const o = e ?? i.length;
216
- do {
217
- const l = d === 0 ? f[0] ?? r.initialPageParam : N(r, c);
218
- if (d > 0 && l == null)
219
- break;
220
- c = await m(c, l), d++;
221
- } while (d < o);
222
- }
223
- return c;
224
- };
225
- t.options.persister ? t.fetchFn = () => t.options.persister?.(
226
- P,
227
- {
228
- client: t.client,
229
- queryKey: t.queryKey,
230
- meta: t.options.meta,
231
- signal: t.signal
232
- },
233
- s
234
- ) : t.fetchFn = P;
235
- }
236
- };
237
- }
238
- function N(e, { pages: t, pageParams: s }) {
239
- const r = t.length - 1;
240
- return t.length > 0 ? e.getNextPageParam(
241
- t[r],
242
- t,
243
- s[r],
244
- s
245
- ) : void 0;
246
- }
247
- function se(e, { pages: t, pageParams: s }) {
248
- return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, s[0], s) : void 0;
249
- }
250
- var re = class {
251
- #e;
252
- #t;
253
- #s;
254
- #n;
255
- #i;
256
- #r;
257
- #a;
258
- #u;
259
- constructor(e = {}) {
260
- this.#e = e.queryCache || new ee(), this.#t = e.mutationCache || new te(), this.#s = e.defaultOptions || {}, this.#n = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#r = 0;
261
- }
262
- mount() {
263
- this.#r++, this.#r === 1 && (this.#a = j.subscribe(async (e) => {
264
- e && (await this.resumePausedMutations(), this.#e.onFocus());
265
- }), this.#u = D.subscribe(async (e) => {
266
- e && (await this.resumePausedMutations(), this.#e.onOnline());
267
- }));
268
- }
269
- unmount() {
270
- this.#r--, this.#r === 0 && (this.#a?.(), this.#a = void 0, this.#u?.(), this.#u = void 0);
271
- }
272
- isFetching(e) {
273
- return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
274
- }
275
- isMutating(e) {
276
- return this.#t.findAll({ ...e, status: "pending" }).length;
277
- }
278
- getQueryData(e) {
279
- const t = this.defaultQueryOptions({ queryKey: e });
280
- return this.#e.get(t.queryHash)?.state.data;
281
- }
282
- ensureQueryData(e) {
283
- const t = this.defaultQueryOptions(e), s = this.#e.build(this, t), r = s.state.data;
284
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && s.isStaleByTime(S(t.staleTime, s)) && this.prefetchQuery(t), Promise.resolve(r));
285
- }
286
- getQueriesData(e) {
287
- return this.#e.findAll(e).map(({ queryKey: t, state: s }) => {
288
- const r = s.data;
289
- return [t, r];
290
- });
291
- }
292
- setQueryData(e, t, s) {
293
- const r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(
294
- r.queryHash
295
- )?.state.data, f = L(t, i);
296
- if (f !== void 0)
297
- return this.#e.build(this, r).setData(f, { ...s, manual: !0 });
298
- }
299
- setQueriesData(e, t, s) {
300
- return u.batch(
301
- () => this.#e.findAll(e).map(({ queryKey: r }) => [
302
- r,
303
- this.setQueryData(r, t, s)
304
- ])
305
- );
306
- }
307
- getQueryState(e) {
308
- const t = this.defaultQueryOptions({ queryKey: e });
309
- return this.#e.get(
310
- t.queryHash
311
- )?.state;
312
- }
313
- removeQueries(e) {
314
- const t = this.#e;
315
- u.batch(() => {
316
- t.findAll(e).forEach((s) => {
317
- t.remove(s);
318
- });
319
- });
320
- }
321
- resetQueries(e, t) {
322
- const s = this.#e;
323
- return u.batch(() => (s.findAll(e).forEach((r) => {
324
- r.reset();
325
- }), this.refetchQueries(
326
- {
327
- type: "active",
328
- ...e
329
- },
330
- t
331
- )));
332
- }
333
- cancelQueries(e, t = {}) {
334
- const s = { revert: !0, ...t }, r = u.batch(
335
- () => this.#e.findAll(e).map((n) => n.cancel(s))
336
- );
337
- return Promise.all(r).then(h).catch(h);
338
- }
339
- invalidateQueries(e, t = {}) {
340
- return u.batch(() => (this.#e.findAll(e).forEach((s) => {
341
- s.invalidate();
342
- }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
343
- {
344
- ...e,
345
- type: e?.refetchType ?? e?.type ?? "active"
346
- },
347
- t
348
- )));
349
- }
350
- refetchQueries(e, t = {}) {
351
- const s = {
352
- ...t,
353
- cancelRefetch: t.cancelRefetch ?? !0
354
- }, r = u.batch(
355
- () => this.#e.findAll(e).filter((n) => !n.isDisabled()).map((n) => {
356
- let i = n.fetch(void 0, s);
357
- return s.throwOnError || (i = i.catch(h)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
358
- })
359
- );
360
- return Promise.all(r).then(h);
361
- }
362
- fetchQuery(e) {
363
- const t = this.defaultQueryOptions(e);
364
- t.retry === void 0 && (t.retry = !1);
365
- const s = this.#e.build(this, t);
366
- return s.isStaleByTime(
367
- S(t.staleTime, s)
368
- ) ? s.fetch(t) : Promise.resolve(s.state.data);
369
- }
370
- prefetchQuery(e) {
371
- return this.fetchQuery(e).then(h).catch(h);
372
- }
373
- fetchInfiniteQuery(e) {
374
- return e.behavior = C(e.pages), this.fetchQuery(e);
375
- }
376
- prefetchInfiniteQuery(e) {
377
- return this.fetchInfiniteQuery(e).then(h).catch(h);
378
- }
379
- ensureInfiniteQueryData(e) {
380
- return e.behavior = C(e.pages), this.ensureQueryData(e);
381
- }
382
- resumePausedMutations() {
383
- return D.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
384
- }
385
- getQueryCache() {
386
- return this.#e;
387
- }
388
- getMutationCache() {
389
- return this.#t;
390
- }
391
- getDefaultOptions() {
392
- return this.#s;
393
- }
394
- setDefaultOptions(e) {
395
- this.#s = e;
396
- }
397
- setQueryDefaults(e, t) {
398
- this.#n.set(I(e), {
399
- queryKey: e,
400
- defaultOptions: t
401
- });
402
- }
403
- getQueryDefaults(e) {
404
- const t = [...this.#n.values()], s = {};
405
- return t.forEach((r) => {
406
- F(e, r.queryKey) && Object.assign(s, r.defaultOptions);
407
- }), s;
408
- }
409
- setMutationDefaults(e, t) {
410
- this.#i.set(I(e), {
411
- mutationKey: e,
412
- defaultOptions: t
413
- });
414
- }
415
- getMutationDefaults(e) {
416
- const t = [...this.#i.values()], s = {};
417
- return t.forEach((r) => {
418
- F(e, r.mutationKey) && Object.assign(s, r.defaultOptions);
419
- }), s;
420
- }
421
- defaultQueryOptions(e) {
422
- if (e._defaulted)
423
- return e;
424
- const t = {
425
- ...this.#s.queries,
426
- ...this.getQueryDefaults(e.queryKey),
427
- ...e,
428
- _defaulted: !0
429
- };
430
- return t.queryHash || (t.queryHash = k(
431
- t.queryKey,
432
- t
433
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === U && (t.enabled = !1), t;
434
- }
435
- defaultMutationOptions(e) {
436
- return e?._defaulted ? e : {
437
- ...this.#s.mutations,
438
- ...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
439
- ...e,
440
- _defaulted: !0
441
- };
442
- }
443
- clear() {
444
- this.#e.clear(), this.#t.clear();
445
- }
446
- };
447
- const ne = new re({
448
- defaultOptions: {
449
- mutations: {
450
- retry: !1
451
- },
452
- queries: {
453
- refetchOnWindowFocus: !1,
454
- gcTime: 1e3 * 60 * 60 * 24,
455
- // 24 hours
456
- staleTime: 60 * 1e3,
457
- // 60 seconds
458
- retry: !1
459
- }
460
- }
461
- }), ie = () => {
462
- const e = M((s) => s.currentNavigationPath), t = J();
463
- b(() => {
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useEffect as s } from "react";
3
+ import { Y as u, h as l, O as c, aU as d } from "../chunk-IR6S3I6Y-BmDdD3SP.js";
4
+ import { SignalRProvider as m } from "../provider/SignalR/SignalRProvider.js";
5
+ import { useBasePropsStore as f } from "../stores/BasePropsStore.js";
6
+ import { M as p, a as h } from "../ModuleCore-BWvRhZyP.js";
7
+ const v = () => {
8
+ const e = f((o) => o.currentNavigationPath), t = d();
9
+ s(() => {
464
10
  e && t(e, { replace: !0 });
465
11
  }, [e, t]);
466
- }, ae = () => (ie(), /* @__PURE__ */ y(G, {})), Oe = ({
12
+ }, g = () => (v(), /* @__PURE__ */ r(c, {})), x = ({
467
13
  props: e,
468
14
  routes: t,
469
- env: s = void 0,
470
- useSignalR: r = !1,
471
- queryClient: n = ne
15
+ env: o = void 0,
16
+ useSignalR: a = !1,
17
+ queryClient: i = h
472
18
  }) => {
473
- const i = M((a) => a.setBaseProps), f = M((a) => a.modulePermissionToken), c = T((a) => a.setEnvironment), d = T((a) => a.addEnvironment), [P, g] = $(!1);
474
- b(() => {
475
- const a = he();
476
- if (g(!a), a && c(a), !s) return;
477
- const m = s[a?.ENVIRONMENT];
478
- m && d(m);
479
- }, [d, s, c]), b(() => {
480
- g(!ue(e)), i(e);
481
- }, [
482
- e.currentLanguage,
483
- e.currentLanguageId,
484
- e.modulePermissionToken,
485
- e.organizationId,
486
- e.currentNavigationPath,
487
- e.sourcePath
488
- ]);
489
- const Q = z([
19
+ const n = u([
490
20
  {
491
21
  path: e.basePath,
492
22
  children: t,
493
- element: /* @__PURE__ */ y(ae, {})
23
+ element: /* @__PURE__ */ r(g, {})
494
24
  }
495
25
  ]);
496
- return P ? /* @__PURE__ */ y("div", { children: "TODO: Show fancy error" }) : f ? /* @__PURE__ */ y(V, { client: n, children: /* @__PURE__ */ y(x, { enabled: r, children: /* @__PURE__ */ y(Y, { router: Q }) }) }) : /* @__PURE__ */ y("div", { children: "TODO: Show fancy Loadingspinner" });
497
- }, ue = (e) => Z.every((t) => oe(t, e)), oe = (e, t) => {
498
- if (!t[e]) {
499
- if (t.throwError)
500
- return t.throwError(`Missing required prop: ${e}`, 404), !1;
501
- throw new Error(`Missing required prop: ${e}`);
502
- }
503
- return !0;
504
- }, he = () => {
505
- const e = window.__env__;
506
- if (e && (e.API_PREFIX = "/api/v8.0", !!e.COMMON_API && e.MODULE_AUTH_API && e.API_PREFIX && e.ENVIRONMENT))
507
- return e;
26
+ return /* @__PURE__ */ r(p, { props: e, env: o, queryClient: i, children: /* @__PURE__ */ r(m, { enabled: a, children: /* @__PURE__ */ r(l, { router: n }) }) });
508
27
  };
509
28
  export {
510
- Oe as ModuleBase
29
+ x as ModuleBase
511
30
  };
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import { M as a, a as l } from "../ModuleCore-BWvRhZyP.js";
3
+ import "react";
4
+ import "../stores/BasePropsStore.js";
5
+ import "../stores/EnvironmentStore.js";
6
+ import "../utils/helper.js";
7
+ export {
8
+ a as ModuleCore,
9
+ l as ModuleQueryClient
10
+ };
@@ -1,22 +1,19 @@
1
- import { u as i } from "../useQuery-CwwWze9O.js";
2
- import { useBasePropsStore as n } from "../stores/BasePropsStore.js";
3
- import { universalSelector as p } from "../types/Requests.js";
4
- import { fetchFromCustomApi as a } from "../utils/fetches.js";
5
- const l = ({
6
- endpoint: e,
1
+ import { u as f } from "../useQuery-Jx956wwH.js";
2
+ import { fetchFromCustomApi as i } from "../utils/fetches.js";
3
+ import { universalSelector as n } from "../utils/helper.js";
4
+ const y = ({
5
+ endpoint: o,
7
6
  queryKey: t,
8
7
  token: u,
9
- selector: o,
10
- enabled: m = !0
11
- }) => {
12
- const s = n((r) => r.organizationId);
13
- return i({
14
- queryKey: [...t, s],
15
- queryFn: () => a(e, u),
16
- select: (r) => o ? o(r) : p(r),
17
- enabled: m
18
- });
19
- };
8
+ selector: r,
9
+ enabled: m = !0,
10
+ noAuth: s = !1
11
+ }) => f({
12
+ queryKey: t,
13
+ queryFn: () => i(o, u, s),
14
+ select: (e) => r ? r(e) : n(e),
15
+ enabled: m
16
+ });
20
17
  export {
21
- l as useCustom
18
+ y as useCustom
22
19
  };
@@ -1,21 +1,23 @@
1
- import { u } from "../useMutation-3rykrmeD.js";
2
- import "../components/ModuleBase.js";
1
+ import { u as n } from "../useMutation-BYO7aks8.js";
2
+ import "react/jsx-runtime";
3
3
  import "react";
4
- import "../stores/BasePropsStore.js";
5
4
  import "../provider/SignalR/SignalRProvider.js";
6
- import "../omit-B7MWDtHq.js";
5
+ import "../stores/BasePropsStore.js";
6
+ import "../ModuleCore-BWvRhZyP.js";
7
+ import { mutateOnCustomApi as s } from "../utils/fetches.js";
8
+ import "../api-s6E2GJtu.js";
9
+ import "../types/Entities.js";
10
+ import "../omit-C9Qe80rl.js";
7
11
  import "../stores/EnvironmentStore.js";
8
- import { mutateOnCustomApi as n } from "../utils/fetches.js";
9
- import "./useEntity.js";
10
- import "../api-D9Lmqe6S.js";
11
- const O = ({
12
+ const d = ({
12
13
  endpoint: t,
13
14
  method: o,
14
15
  token: m,
15
- headers: r
16
- }) => u({
17
- mutationFn: (i, p) => n(p ?? t, i, o, m, r)
16
+ headers: r,
17
+ noAuth: i
18
+ }) => n({
19
+ mutationFn: (p, u) => s(u ?? t, p, o, m, r, i)
18
20
  });
19
21
  export {
20
- O as useCustomMutation
22
+ d as useCustomMutation
21
23
  };