@declarion/react 0.163.0 → 0.167.0
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-lib/components/actions/ActionDialog.js +93 -88
- package/dist-lib/components/actions/ActionRunner.js +3 -1
- package/dist-lib/components/fields/JsonEditor.js +10 -6
- package/dist-lib/components/pages/SmartDetailPage.impl.js +484 -474
- package/dist-lib/hooks/usePageStateRuntime.js +1 -1
- package/dist-lib/hooks/useRegisterScreenTab.js +15 -13
- package/package.json +1 -1
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import { useTabStore as e } from "../stores/tabs.js";
|
|
2
2
|
import { useEmbed as t } from "../embed/EmbedContext.js";
|
|
3
3
|
import { useText as n } from "./useText.js";
|
|
4
|
-
import { useEffect as r } from "react";
|
|
4
|
+
import { useEffect as r, useRef as i } from "react";
|
|
5
5
|
// src/hooks/useRegisterScreenTab.ts
|
|
6
|
-
function
|
|
7
|
-
let
|
|
6
|
+
function a(n, a, o, s) {
|
|
7
|
+
let c = t(), l = i(s);
|
|
8
8
|
r(() => {
|
|
9
|
-
|
|
9
|
+
l.current = s;
|
|
10
|
+
}, [s]), r(() => {
|
|
11
|
+
n && !c.enabled && e.getState().openTab({
|
|
10
12
|
pathname: n,
|
|
11
|
-
search:
|
|
12
|
-
title:
|
|
13
|
-
icon:
|
|
13
|
+
search: l.current,
|
|
14
|
+
title: a,
|
|
15
|
+
icon: o,
|
|
14
16
|
closable: !0
|
|
15
17
|
});
|
|
16
18
|
}, [
|
|
17
19
|
n,
|
|
18
|
-
i,
|
|
19
20
|
a,
|
|
20
|
-
|
|
21
|
+
o,
|
|
22
|
+
c.enabled
|
|
21
23
|
]);
|
|
22
24
|
}
|
|
23
|
-
function
|
|
24
|
-
let
|
|
25
|
-
|
|
25
|
+
function o(e, t, r) {
|
|
26
|
+
let i = n(), o = e?.route, s = t ? i(e?.display?.name) || i(t.display.name_plural) : "", c = e?.display?.icon || t?.display.icon;
|
|
27
|
+
a(t ? o : void 0, s, c, r);
|
|
26
28
|
}
|
|
27
|
-
export {
|
|
29
|
+
export { o as useRegisterScreenTab, a as useScreenTabRegistration };
|