@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
@@ -1,5 +1,5 @@
1
1
  import { g as w } from "./_commonjsHelpers-ByX85dGu.js";
2
- import { r as b, a as j, b as v, c as I, d as M, e as R, f as _, g as B, h as C } from "./isTypedArray-SkhznY1k.js";
2
+ import { r as b, a as j, b as v, c as I, d as M, e as R, f as _, g as B, h as C } from "./isTypedArray-T1_r8YHg.js";
3
3
  import { RETRY_HTTP_STATUS_CODES as z } from "./constants.js";
4
4
  import { useBasePropsStore as c } from "./stores/BasePropsStore.js";
5
5
  var h, g;
@@ -43,10 +43,10 @@ const D = /* @__PURE__ */ w(H), Y = (e, t, s, r = "GET", o) => {
43
43
  return n.append("Content-Type", "application/json"), t && n.append("orgId", t), s && n.append("languageId", s), e && n.append("Authorization", `Bearer ${e}`), o && o.forEach((i, f) => {
44
44
  n.set(f, i);
45
45
  }), {
46
- redirect: "follow",
47
46
  credentials: "omit",
47
+ headers: n,
48
48
  method: r,
49
- headers: n
49
+ redirect: "follow"
50
50
  };
51
51
  };
52
52
  let u = "moduleTokenIsFresh";
@@ -101,21 +101,21 @@ const p = async (e, t, s = !0) => {
101
101
  const r = e.clone(), o = c.getState().logEvent, n = c.getState().logError;
102
102
  try {
103
103
  const i = {
104
- requestUrl: t,
104
+ requestBody: $(s, "body"),
105
105
  requestHeaders: { ...s.headers, Authorization: void 0 },
106
106
  requestMethod: s.method,
107
- requestBody: $(s, "body"),
107
+ requestUrl: t,
108
+ responseBody: await E(r),
108
109
  responseStatus: r?.status.toString(),
109
- responseStatusText: r?.statusText,
110
- responseBody: await E(r)
110
+ responseStatusText: r?.statusText
111
111
  };
112
112
  e.ok && o ? o({
113
113
  name: `request: ${r?.status.toString()} - ${t}`,
114
114
  properties: i
115
115
  }) : n?.({
116
116
  exception: {
117
- name: `request: ${r?.status.toString()} - ${t}`,
118
- message: r?.statusText
117
+ message: r?.statusText,
118
+ name: `request: ${r?.status.toString()} - ${t}`
119
119
  },
120
120
  properties: i
121
121
  });
@@ -127,8 +127,8 @@ const p = async (e, t, s = !0) => {
127
127
  return E(e);
128
128
  const t = {
129
129
  detail: e.statusText,
130
- status: e.status,
131
130
  stack: void 0,
131
+ status: e.status,
132
132
  title: "BaseError"
133
133
  }, s = c.getState().throwError;
134
134
  try {