@ws-ui/settings-editor 1.12.2 → 1.12.4
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/index.cjs.js.map +1 -1
- package/dist/index.es.js +25 -19
- package/dist/index.es.js.map +1 -1
- package/package.json +5 -5
package/dist/index.es.js
CHANGED
|
@@ -3802,7 +3802,10 @@ const Ei = {
|
|
|
3802
3802
|
};
|
|
3803
3803
|
};
|
|
3804
3804
|
function sc(i, r) {
|
|
3805
|
-
return i.reduce(
|
|
3805
|
+
return i.reduce(
|
|
3806
|
+
(u, s) => u || (s.path === r ? s : s.children ? sc(s.children, r) : null),
|
|
3807
|
+
null
|
|
3808
|
+
);
|
|
3806
3809
|
}
|
|
3807
3810
|
function mm(i, r) {
|
|
3808
3811
|
switch (r.type) {
|
|
@@ -3896,11 +3899,7 @@ const lc = Oo(null), Im = ({
|
|
|
3896
3899
|
onCreateNewFileAndOpen: b,
|
|
3897
3900
|
onOpenModal: g
|
|
3898
3901
|
}),
|
|
3899
|
-
[
|
|
3900
|
-
d,
|
|
3901
|
-
b,
|
|
3902
|
-
g
|
|
3903
|
-
]
|
|
3902
|
+
[d, b, g]
|
|
3904
3903
|
);
|
|
3905
3904
|
return /* @__PURE__ */ q(lc.Provider, { value: { state: I, dispatch: x, externalActions: B }, children: i });
|
|
3906
3905
|
};
|
|
@@ -3912,10 +3911,16 @@ function Cm(i) {
|
|
|
3912
3911
|
);
|
|
3913
3912
|
const { state: u, dispatch: s, externalActions: o } = r;
|
|
3914
3913
|
return {
|
|
3915
|
-
getTabPath: de(
|
|
3914
|
+
getTabPath: de(
|
|
3915
|
+
() => i ?? u.tabPath,
|
|
3916
|
+
[i, u.tabPath]
|
|
3917
|
+
),
|
|
3916
3918
|
getPreferences: de(() => u.preferences, [u.preferences]),
|
|
3917
3919
|
getQodly: de(() => u.qodly, [u.qodly]),
|
|
3918
|
-
getFeatureFlag: de(
|
|
3920
|
+
getFeatureFlag: de(
|
|
3921
|
+
(c) => c === "states" ? !0 : !!u.preferences.session[`features.experimental.${c}`],
|
|
3922
|
+
[u.preferences.session]
|
|
3923
|
+
),
|
|
3919
3924
|
getExplorer: de(() => u.explorer, [u.explorer]),
|
|
3920
3925
|
getWebForms: de(() => u.webforms, [u.webforms]),
|
|
3921
3926
|
findNodeByPath: de(
|
|
@@ -3964,9 +3969,7 @@ const Am = ({
|
|
|
3964
3969
|
onChange: o,
|
|
3965
3970
|
setTouched: c
|
|
3966
3971
|
}) => {
|
|
3967
|
-
const [d, b] = mr.useState(
|
|
3968
|
-
u
|
|
3969
|
-
), g = r ?? d;
|
|
3972
|
+
const [d, b] = mr.useState(u), g = r ?? d;
|
|
3970
3973
|
return /* @__PURE__ */ q(
|
|
3971
3974
|
"div",
|
|
3972
3975
|
{
|
|
@@ -4039,14 +4042,17 @@ const Am = ({
|
|
|
4039
4042
|
Un(() => {
|
|
4040
4043
|
h(String(b));
|
|
4041
4044
|
}, [b]);
|
|
4042
|
-
const I = de(
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4045
|
+
const I = de(
|
|
4046
|
+
(S) => {
|
|
4047
|
+
const E = Math.max(1, Math.min(60, S));
|
|
4048
|
+
h(String(E)), c.actions.setSetting({
|
|
4049
|
+
path: u,
|
|
4050
|
+
settingsKey: s,
|
|
4051
|
+
value: E * 1e3
|
|
4052
|
+
});
|
|
4053
|
+
},
|
|
4054
|
+
[c.actions, u, s]
|
|
4055
|
+
), x = () => {
|
|
4050
4056
|
if (g.trim() === "") {
|
|
4051
4057
|
h(String(b));
|
|
4052
4058
|
return;
|