@hortiview/modulebase 1.1.2-alpha.870da389.1 → 2.0.0-alpha.e897c28d.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 (41) hide show
  1. package/dist/IsRestoringProvider-Dc5Evyjr.js +6 -0
  2. package/dist/QueryClientProvider-DZI32rjZ.js +21 -0
  3. package/dist/api-CSxWxEZl.js +148 -0
  4. package/dist/{chunk-EVOBXE3Y-B43QN6RE.js → chunk-EVOBXE3Y-BRmUxtwH.js} +126 -127
  5. package/dist/components/ModuleBase.js +13 -17
  6. package/dist/components/ModuleCore.js +11398 -9
  7. package/dist/constants.js +1 -2
  8. package/dist/defaultQueryClient-Cfsorhtn.js +620 -0
  9. package/dist/hooks/useBreadcrumbTranslation.js +13 -16
  10. package/dist/hooks/useCustom.js +1 -1
  11. package/dist/hooks/useCustomMutation.js +5 -5
  12. package/dist/hooks/useEntity.js +1 -1
  13. package/dist/hooks/useOffline.js +1 -1
  14. package/dist/hooks/useOption.js +2 -2
  15. package/dist/hooks/useSignalRMessages.js +1 -1
  16. package/dist/lib/components/ModuleBase.d.ts +3 -22
  17. package/dist/lib/components/ModuleCore.d.ts +3 -17
  18. package/dist/lib/main.d.ts +0 -3
  19. package/dist/lib/module-router.d.ts +1 -1
  20. package/dist/lib/provider/SignalR/SignalRProvider.d.ts +0 -4
  21. package/dist/lib/types/BaseProps.d.ts +38 -1
  22. package/dist/lib/utils/defaultQueryClient.d.ts +2 -0
  23. package/dist/lib/utils/defaultSignalRClient.d.ts +4 -0
  24. package/dist/lib/utils/helper.d.ts +1 -2
  25. package/dist/main.js +56 -187
  26. package/dist/module-router.js +2 -2
  27. package/dist/provider/SignalR/SignalRProvider.js +22 -5966
  28. package/dist/{IsRestoringProvider-SzKJZczp.js → query-DZDIN635.js} +211 -232
  29. package/dist/stores/BasePropsStore.js +1 -0
  30. package/dist/{useCustomMutation-9VUQ7NbQ.js → useCustomMutation-C1aVbjpt.js} +13 -12
  31. package/dist/{useQuery-DUDyh33-.js → useQuery-CUSHkb38.js} +33 -31
  32. package/dist/utils/api.js +1 -1
  33. package/dist/utils/baseFetches.js +1 -1
  34. package/dist/utils/defaultQueryClient.js +4 -0
  35. package/dist/utils/defaultSignalRClient.js +5949 -0
  36. package/dist/utils/helper.js +9 -10
  37. package/package.json +1 -1
  38. package/dist/ModuleCore-DRMqZO8r.js +0 -12017
  39. package/dist/api-COabZnyn.js +0 -147
  40. package/dist/lib/types/ServiceBus.d.ts +0 -17
  41. package/dist/types/ServiceBus.js +0 -1
@@ -1,28 +1,28 @@
1
1
  import { REQUIRED_PROPS as m } from "../constants.js";
2
2
  import { useBasePropsStore as u } from "../stores/BasePropsStore.js";
3
- const g = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, c = (r) => {
3
+ const v = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, c = (r) => {
4
4
  if (typeof r != "string")
5
5
  throw new TypeError("Invalid argument expected string");
6
- const e = r.match(g);
6
+ const e = r.match(v);
7
7
  if (!e)
8
8
  throw new Error(`Invalid argument not valid semver ('${r}' received)`);
9
9
  return e.shift(), e;
10
10
  }, f = (r) => r === "*" || r === "x" || r === "X", l = (r) => {
11
11
  const e = parseInt(r, 10);
12
12
  return isNaN(e) ? r : e;
13
- }, v = (r, e) => typeof r != typeof e ? [String(r), String(e)] : [r, e], h = (r, e) => {
13
+ }, g = (r, e) => typeof r != typeof e ? [String(r), String(e)] : [r, e], E = (r, e) => {
14
14
  if (f(r) || f(e))
15
15
  return 0;
16
- const [t, n] = v(l(r), l(e));
16
+ const [t, n] = g(l(r), l(e));
17
17
  return t > n ? 1 : t < n ? -1 : 0;
18
18
  }, p = (r, e) => {
19
19
  for (let t = 0; t < Math.max(r.length, e.length); t++) {
20
- const n = h(r[t] || "0", e[t] || "0");
20
+ const n = E(r[t] || "0", e[t] || "0");
21
21
  if (n !== 0)
22
22
  return n;
23
23
  }
24
24
  return 0;
25
- }, E = (r, e) => {
25
+ }, h = (r, e) => {
26
26
  const t = c(r), n = c(e), o = t.pop(), i = n.pop(), s = p(t, n);
27
27
  return s !== 0 ? s : o && i ? p(o.split("."), i.split(".")) : o || i ? o ? -1 : 1 : 0;
28
28
  }, d = "1.1.1", w = (r) => m.every((e) => y(e, r)), y = (r, e) => {
@@ -39,17 +39,16 @@ const g = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
39
39
  }, S = (r) => {
40
40
  if (!r?.REQ_VERSION) return null;
41
41
  const e = r.REQ_VERSION;
42
- return E(d, e) < 0 ? `ModuleBase version ${d} is probably not compatible with the current HortiView version ${e}. Please update the modulebase to be at least ${e}` : null;
43
- }, _ = (r) => typeof r == "string" || typeof r == "boolean" || typeof r == "number" ? r : typeof r == "object" && "value" in r ? r.value : typeof r == "object" && "items" in r ? r.items : (Array.isArray(r), r), M = (r) => r, R = (r) => {
42
+ return h(d, e) < 0 ? `ModuleBase version ${d} is probably not compatible with the current HortiView version ${e}. Please update the modulebase to be at least ${e}` : null;
43
+ }, _ = (r) => typeof r == "string" || typeof r == "boolean" || typeof r == "number" ? r : typeof r == "object" && "value" in r ? r.value : typeof r == "object" && "items" in r ? r.items : (Array.isArray(r), r), M = (r) => {
44
44
  const e = u.getState().organizationId, t = u.getState().moduleId;
45
45
  return [...r, e, t];
46
46
  };
47
47
  export {
48
48
  w as arePropsValid,
49
- M as checkConfig,
50
49
  y as checkIfPropExists,
51
50
  S as checkVersion,
52
51
  P as getEnvironmentVariables,
53
- R as getModuleQueryKey,
52
+ M as getModuleQueryKey,
54
53
  _ as universalSelector
55
54
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hortiview/modulebase",
3
3
  "description": "This is a base module for hortiview",
4
- "version": "1.1.2-alpha.870da389.1",
4
+ "version": "2.0.0-alpha.e897c28d.1",
5
5
  "type": "module",
6
6
  "author": "HortiView Team",
7
7
  "license": "GPL-3.0",