@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.
- package/dist/IsRestoringProvider-Dc5Evyjr.js +6 -0
- package/dist/QueryClientProvider-DZI32rjZ.js +21 -0
- package/dist/api-CSxWxEZl.js +148 -0
- package/dist/{chunk-EVOBXE3Y-B43QN6RE.js → chunk-EVOBXE3Y-BRmUxtwH.js} +126 -127
- package/dist/components/ModuleBase.js +13 -17
- package/dist/components/ModuleCore.js +11398 -9
- package/dist/constants.js +1 -2
- package/dist/defaultQueryClient-Cfsorhtn.js +620 -0
- package/dist/hooks/useBreadcrumbTranslation.js +13 -16
- package/dist/hooks/useCustom.js +1 -1
- package/dist/hooks/useCustomMutation.js +5 -5
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOffline.js +1 -1
- package/dist/hooks/useOption.js +2 -2
- package/dist/hooks/useSignalRMessages.js +1 -1
- package/dist/lib/components/ModuleBase.d.ts +3 -22
- package/dist/lib/components/ModuleCore.d.ts +3 -17
- package/dist/lib/main.d.ts +0 -3
- package/dist/lib/module-router.d.ts +1 -1
- package/dist/lib/provider/SignalR/SignalRProvider.d.ts +0 -4
- package/dist/lib/types/BaseProps.d.ts +38 -1
- package/dist/lib/utils/defaultQueryClient.d.ts +2 -0
- package/dist/lib/utils/defaultSignalRClient.d.ts +4 -0
- package/dist/lib/utils/helper.d.ts +1 -2
- package/dist/main.js +56 -187
- package/dist/module-router.js +2 -2
- package/dist/provider/SignalR/SignalRProvider.js +22 -5966
- package/dist/{IsRestoringProvider-SzKJZczp.js → query-DZDIN635.js} +211 -232
- package/dist/stores/BasePropsStore.js +1 -0
- package/dist/{useCustomMutation-9VUQ7NbQ.js → useCustomMutation-C1aVbjpt.js} +13 -12
- package/dist/{useQuery-DUDyh33-.js → useQuery-CUSHkb38.js} +33 -31
- package/dist/utils/api.js +1 -1
- package/dist/utils/baseFetches.js +1 -1
- package/dist/utils/defaultQueryClient.js +4 -0
- package/dist/utils/defaultSignalRClient.js +5949 -0
- package/dist/utils/helper.js +9 -10
- package/package.json +1 -1
- package/dist/ModuleCore-DRMqZO8r.js +0 -12017
- package/dist/api-COabZnyn.js +0 -147
- package/dist/lib/types/ServiceBus.d.ts +0 -17
- package/dist/types/ServiceBus.js +0 -1
package/dist/utils/helper.js
CHANGED
|
@@ -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
|
|
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(
|
|
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
|
-
},
|
|
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] =
|
|
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 =
|
|
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
|
-
},
|
|
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
|
|
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) =>
|
|
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
|
-
|
|
52
|
+
M as getModuleQueryKey,
|
|
54
53
|
_ as universalSelector
|
|
55
54
|
};
|
package/package.json
CHANGED