@hortiview/modulebase 0.0.13318 → 0.0.13888
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/{QueryClientProvider-Q_mWQTzQ.js → QueryClientProvider-VtJdNkDw.js} +18 -18
- package/dist/assets/ModuleCore.css +1 -0
- package/dist/components/ModuleBase.js +17 -489
- package/dist/components/ModuleCore.js +14694 -0
- package/dist/hooks/useCustom.js +1 -1
- package/dist/hooks/useCustomMutation.js +6 -5
- package/dist/hooks/useEntity.js +1 -1
- package/dist/hooks/useOption.js +1 -1
- package/dist/hooks/useServiceBus.js +1 -1
- package/dist/lib/components/ModuleBase.d.ts +3 -0
- package/dist/lib/components/ModuleCore.d.ts +13 -0
- package/dist/lib/hooks/useStores.d.ts +10 -10
- package/dist/lib/main.d.ts +12 -3
- package/dist/lib/utils/fetches.d.ts +6 -6
- package/dist/main.js +135 -133
- package/dist/{mutation-X73nm7Df.js → mutation-CnKIetRs.js} +1 -1
- package/dist/{query-CRIVoEP7.js → query-CFoO2uy7.js} +1 -1
- package/dist/{useMutation-3rykrmeD.js → useMutation-Num57Ulc.js} +2 -2
- package/dist/{useQuery-CwwWze9O.js → useQuery-XBGd5Kep.js} +12 -12
- package/dist/utils/helper.js +12 -12
- package/package.json +3 -1
package/dist/utils/helper.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { REQUIRED_PROPS as
|
|
2
|
-
const
|
|
1
|
+
import { REQUIRED_PROPS as l } from "../constants.js";
|
|
2
|
+
const p = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, u = (r) => {
|
|
3
3
|
if (typeof r != "string")
|
|
4
4
|
throw new TypeError("Invalid argument expected string");
|
|
5
|
-
const e = r.match(
|
|
5
|
+
const e = r.match(p);
|
|
6
6
|
if (!e)
|
|
7
7
|
throw new Error(`Invalid argument not valid semver ('${r}' received)`);
|
|
8
8
|
return e.shift(), e;
|
|
@@ -14,7 +14,7 @@ const l = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
14
14
|
return 0;
|
|
15
15
|
const [t, n] = E(d(r), d(e));
|
|
16
16
|
return t > n ? 1 : t < n ? -1 : 0;
|
|
17
|
-
},
|
|
17
|
+
}, f = (r, e) => {
|
|
18
18
|
for (let t = 0; t < Math.max(r.length, e.length); t++) {
|
|
19
19
|
const n = h(r[t] || "0", e[t] || "0");
|
|
20
20
|
if (n !== 0)
|
|
@@ -22,27 +22,27 @@ const l = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
22
22
|
}
|
|
23
23
|
return 0;
|
|
24
24
|
}, m = (r, e) => {
|
|
25
|
-
const t = u(r), n = u(e), i = t.pop(), o = n.pop(), s =
|
|
26
|
-
return s !== 0 ? s : i && o ?
|
|
27
|
-
},
|
|
25
|
+
const t = u(r), n = u(e), i = t.pop(), o = n.pop(), s = f(t, n);
|
|
26
|
+
return s !== 0 ? s : i && o ? f(i.split("."), o.split(".")) : i || o ? i ? -1 : 1 : 0;
|
|
27
|
+
}, a = "0.0.13888", v = (r) => l.every((e) => g(e, r)), g = (r, e) => {
|
|
28
28
|
if (!e[r]) {
|
|
29
29
|
if (e.throwError)
|
|
30
30
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
|
31
31
|
throw new Error(`Missing required prop: ${r}`);
|
|
32
32
|
}
|
|
33
33
|
return !0;
|
|
34
|
-
},
|
|
34
|
+
}, I = () => {
|
|
35
35
|
const r = window.__env__;
|
|
36
|
-
if (r &&
|
|
36
|
+
if (r && r.COMMON_API && r.MODULE_AUTH_API && r.API_PREFIX && r.ENVIRONMENT)
|
|
37
37
|
return r;
|
|
38
38
|
}, P = (r) => {
|
|
39
39
|
if (!r?.REQ_VERSION) return null;
|
|
40
40
|
const e = r.REQ_VERSION;
|
|
41
|
-
return m(
|
|
41
|
+
return m(a, e) < 0 ? `ModuleBase version ${a} is probably not compatible with the current HortiView version ${e}. Please update the modulebase to be at least ${e}` : null;
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
44
|
v as arePropsValid,
|
|
45
|
-
|
|
45
|
+
g as checkIfPropExists,
|
|
46
46
|
P as checkVersion,
|
|
47
|
-
|
|
47
|
+
I as getEnvironmentVariables
|
|
48
48
|
};
|
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": "0.0.
|
|
4
|
+
"version": "0.0.13888",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
"preview": "vite preview"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
+
"@hortiview/default-components": "^1.2.0",
|
|
27
|
+
"@hortiview/shared-components": "^1.4.2",
|
|
26
28
|
"@microsoft/signalr": "^8.0.7",
|
|
27
29
|
"@tanstack/react-query": "^5.67.3",
|
|
28
30
|
"compare-versions": "^6.1.1",
|