@hortiview/modulebase 0.0.20436 → 0.0.20524
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/README.md +3 -2
- package/dist/IsRestoringProvider-CBSZo7ur.js +312 -0
- package/dist/ModuleCore-DuJVrj6v.js +11828 -0
- package/dist/QueryClientProvider-DyiNrPkn.js +514 -0
- package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
- package/dist/api-COabZnyn.js +147 -0
- package/dist/assets/ModuleCore.css +1 -1
- package/dist/chunk-LFPYN7LY-D1ls8FXf.js +8643 -0
- package/dist/components/ModuleBase.js +9 -9
- package/dist/components/ModuleCore.js +1 -1
- package/dist/constants.js +2 -3
- package/dist/hooks/useCustom.js +1 -1
- package/dist/hooks/useCustomMutation.js +5 -5
- package/dist/hooks/useEntity.js +30 -30
- package/dist/hooks/useOffline.js +1 -1
- package/dist/hooks/useOption.js +5 -5
- package/dist/hooks/useServiceBus.js +1 -1
- package/dist/hooks/useStores.js +1 -1
- package/dist/{_baseGet-C6jMXSsQ.js → isTypedArray-SkhznY1k.js} +494 -494
- package/dist/lib/constants.d.ts +0 -1
- package/dist/lib/hooks/useCustom.d.ts +4 -2
- package/dist/lib/hooks/useCustomMutation.d.ts +8 -3
- package/dist/lib/hooks/useEntity.d.ts +6 -0
- package/dist/lib/types/Requests.d.ts +0 -17
- package/dist/lib/utils/api.d.ts +6 -13
- package/dist/lib/utils/baseFetches.d.ts +3 -2
- package/dist/main.js +188 -173
- package/dist/module-router.js +2322 -121
- package/dist/{mutation-DSKlaYzY.js → mutation-CmhiEgfA.js} +101 -56
- package/dist/{omit-C9Qe80rl.js → omit-Do6MFRwA.js} +240 -223
- package/dist/provider/SignalR/SignalRProvider.js +2389 -2824
- package/dist/react-c9FSfB30.js +27 -0
- package/dist/stores/BasePropsStore.js +1 -1
- package/dist/stores/EnvironmentStore.js +1 -1
- package/dist/useMutation-Aoachkw_.js +139 -0
- package/dist/useQuery-DEU_AUtf.js +392 -0
- package/dist/utils/api.js +3 -4
- package/dist/utils/baseFetches.js +18 -14
- package/dist/utils/fetches.js +3 -4
- package/dist/utils/helper.js +14 -14
- package/package.json +16 -13
- package/dist/ModuleCore-DpwHP0IU.js +0 -14973
- package/dist/QueryClientProvider-Beog9TR7.js +0 -437
- package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/api-CogBuK0n.js +0 -473
- package/dist/chunk-IR6S3I6Y-BmDdD3SP.js +0 -8162
- package/dist/isRestoring-CLuxJVSA.js +0 -281
- package/dist/react-QiIgv49H.js +0 -27
- package/dist/useMutation-zu8uxBak.js +0 -97
- package/dist/useQuery-Bj9k9zik.js +0 -395
- package/dist/utils-DxRR_XLb.js +0 -9
package/dist/utils/helper.js
CHANGED
|
@@ -10,22 +10,22 @@ const g = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([
|
|
|
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
|
+
}, v = (r, e) => typeof r != typeof e ? [String(r), String(e)] : [r, e], h = (r, e) => {
|
|
14
14
|
if (f(r) || f(e))
|
|
15
15
|
return 0;
|
|
16
|
-
const [
|
|
17
|
-
return
|
|
16
|
+
const [t, n] = v(l(r), l(e));
|
|
17
|
+
return t > n ? 1 : t < n ? -1 : 0;
|
|
18
18
|
}, p = (r, e) => {
|
|
19
|
-
for (let
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
19
|
+
for (let t = 0; t < Math.max(r.length, e.length); t++) {
|
|
20
|
+
const n = h(r[t] || "0", e[t] || "0");
|
|
21
|
+
if (n !== 0)
|
|
22
|
+
return n;
|
|
23
23
|
}
|
|
24
24
|
return 0;
|
|
25
|
-
},
|
|
26
|
-
const
|
|
25
|
+
}, E = (r, e) => {
|
|
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
|
-
}, d = "0.0.
|
|
28
|
+
}, d = "0.0.20524", w = (r) => m.every((e) => y(e, r)), y = (r, e) => {
|
|
29
29
|
if (!e[r]) {
|
|
30
30
|
if (e.throwError)
|
|
31
31
|
return e.throwError(`Missing required prop: ${r}`, 404), !1;
|
|
@@ -39,15 +39,15 @@ 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
|
|
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
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) => {
|
|
44
|
-
const e = u.getState().organizationId,
|
|
45
|
-
return [...r, e,
|
|
44
|
+
const e = u.getState().organizationId, t = u.getState().moduleId;
|
|
45
|
+
return [...r, e, t];
|
|
46
46
|
};
|
|
47
47
|
export {
|
|
48
48
|
w as arePropsValid,
|
|
49
49
|
M as checkConfig,
|
|
50
|
-
|
|
50
|
+
y as checkIfPropExists,
|
|
51
51
|
S as checkVersion,
|
|
52
52
|
P as getEnvironmentVariables,
|
|
53
53
|
R as getModuleQueryKey,
|
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.20524",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Falk Menge <falk.menge.ext@bayer.com>",
|
|
7
7
|
"contributors": [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"build": "tsc -b && vite build",
|
|
22
22
|
"lint": "eslint .",
|
|
23
23
|
"preview": "vite preview",
|
|
24
|
+
"release": "npx -p semantic-release -p semantic-release-ado semantic-release",
|
|
24
25
|
"tsCheck": "tsc --build --pretty --watch"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
@@ -31,8 +32,8 @@
|
|
|
31
32
|
"@tanstack/react-query": "^5.67.3",
|
|
32
33
|
"@tanstack/react-query-persist-client": "^5.85.5",
|
|
33
34
|
"compare-versions": "^6.1.1",
|
|
35
|
+
"idb-keyval": "^6.2.2",
|
|
34
36
|
"lodash": "^4.17.21",
|
|
35
|
-
"odata-query": "^7.0.9",
|
|
36
37
|
"react": "^18.3.1",
|
|
37
38
|
"react-dom": "^18.3.1",
|
|
38
39
|
"react-router": "^7.1.5",
|
|
@@ -40,23 +41,25 @@
|
|
|
40
41
|
"socket.io-client": "^4.8.1",
|
|
41
42
|
"vite-plugin-dts": "^4.5.0",
|
|
42
43
|
"vite-plugin-lib-inject-css": "^2.2.1",
|
|
43
|
-
"zustand": "^5.0.3"
|
|
44
|
-
"idb-keyval": "^6.2.2"
|
|
44
|
+
"zustand": "^5.0.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@eslint/js": "^
|
|
47
|
+
"@eslint/js": "^10.0.1",
|
|
48
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
49
|
+
"@semantic-release/exec": "^7.1.0",
|
|
50
|
+
"@semantic-release/git": "^10.0.1",
|
|
48
51
|
"@types/lodash": "^4.17.15",
|
|
49
52
|
"@types/node": "^22.10.7",
|
|
50
53
|
"@types/react": "^18.3.18",
|
|
51
54
|
"@types/react-dom": "^18.3.5",
|
|
52
|
-
"@vitejs/plugin-react": "^
|
|
53
|
-
"eslint": "^
|
|
54
|
-
"eslint-plugin-react-hooks": "^
|
|
55
|
-
"eslint-plugin-react-refresh": "^0.
|
|
56
|
-
"glob": "^
|
|
57
|
-
"globals": "^
|
|
58
|
-
"typescript": "~5.
|
|
55
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
56
|
+
"eslint": "^10.0.3",
|
|
57
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
58
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
59
|
+
"glob": "^13.0.6",
|
|
60
|
+
"globals": "^17.4.0",
|
|
61
|
+
"typescript": "~5.9.3",
|
|
59
62
|
"typescript-eslint": "^8.18.2",
|
|
60
|
-
"vite": "^
|
|
63
|
+
"vite": "^7.3.1"
|
|
61
64
|
}
|
|
62
65
|
}
|