@ws-ui/store 0.0.34 → 0.0.35
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.es.js
CHANGED
|
@@ -11868,7 +11868,7 @@ const FI = re(
|
|
|
11868
11868
|
}), a("failed to create folder");
|
|
11869
11869
|
}
|
|
11870
11870
|
}
|
|
11871
|
-
), Qi = async (e, r =
|
|
11871
|
+
), Qi = async (e, r = {}) => {
|
|
11872
11872
|
try {
|
|
11873
11873
|
const t = e.path.split(".").at(-1), a = await Qr({
|
|
11874
11874
|
verb: dt.GET_INFO,
|
|
@@ -11880,7 +11880,7 @@ const FI = re(
|
|
|
11880
11880
|
}, s = nh(e.path);
|
|
11881
11881
|
s === V.METHOD && (i.attributes = Cc(a.content), a.content = oh(a.content, {}));
|
|
11882
11882
|
const { content: c, date: f, ext: l } = a;
|
|
11883
|
-
return {
|
|
11883
|
+
return r.confirmed === void 0 && (r.confirmed = !0), {
|
|
11884
11884
|
date: f,
|
|
11885
11885
|
view: {
|
|
11886
11886
|
panel: {
|
|
@@ -11891,7 +11891,7 @@ const FI = re(
|
|
|
11891
11891
|
},
|
|
11892
11892
|
flags: {
|
|
11893
11893
|
enabled: ["WebForm", "MForm"].includes(l),
|
|
11894
|
-
confirmed: r
|
|
11894
|
+
confirmed: r.confirmed
|
|
11895
11895
|
},
|
|
11896
11896
|
extra: i,
|
|
11897
11897
|
name: e.name,
|
|
@@ -11949,40 +11949,40 @@ const FI = re(
|
|
|
11949
11949
|
}
|
|
11950
11950
|
}, vi = re(
|
|
11951
11951
|
"explorer/openFile",
|
|
11952
|
-
async ({ file: e, inactive: r,
|
|
11952
|
+
async ({ file: e, inactive: r, isNew: t, flags: a = {} }, { getState: i, dispatch: s }) => {
|
|
11953
11953
|
const {
|
|
11954
|
-
root: { tabs:
|
|
11955
|
-
roles:
|
|
11956
|
-
debugger: { sessions:
|
|
11957
|
-
} =
|
|
11958
|
-
if (
|
|
11959
|
-
const
|
|
11960
|
-
...
|
|
11954
|
+
root: { tabs: c },
|
|
11955
|
+
roles: f,
|
|
11956
|
+
debugger: { sessions: l }
|
|
11957
|
+
} = i(), p = c.find(({ path: _ }) => e.path === _);
|
|
11958
|
+
if (p) {
|
|
11959
|
+
const _ = {
|
|
11960
|
+
...p,
|
|
11961
11961
|
extra: {
|
|
11962
|
-
...
|
|
11962
|
+
...p == null ? void 0 : p.extra,
|
|
11963
11963
|
editor: e.editor
|
|
11964
11964
|
},
|
|
11965
11965
|
flags: {
|
|
11966
|
-
...
|
|
11967
|
-
...
|
|
11966
|
+
...p == null ? void 0 : p.flags,
|
|
11967
|
+
...a
|
|
11968
11968
|
}
|
|
11969
11969
|
};
|
|
11970
|
-
return
|
|
11970
|
+
return s(Yt(_)), _;
|
|
11971
11971
|
}
|
|
11972
11972
|
if (e.path.startsWith("Debugger")) {
|
|
11973
|
-
const
|
|
11974
|
-
(
|
|
11973
|
+
const _ = l.find(
|
|
11974
|
+
(w) => `Debugger/${w.threadId}` === e.path
|
|
11975
11975
|
);
|
|
11976
|
-
if (
|
|
11976
|
+
if (_) {
|
|
11977
11977
|
const {
|
|
11978
|
-
source: { content:
|
|
11979
|
-
source:
|
|
11980
|
-
} =
|
|
11978
|
+
source: { content: w },
|
|
11979
|
+
source: S
|
|
11980
|
+
} = _.currentStackFrame, x = {
|
|
11981
11981
|
name: e.name,
|
|
11982
11982
|
type: V.DEBUGGER,
|
|
11983
11983
|
date: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11984
11984
|
path: e.path,
|
|
11985
|
-
content:
|
|
11985
|
+
content: w,
|
|
11986
11986
|
view: {
|
|
11987
11987
|
panel: {
|
|
11988
11988
|
isOpen: !1,
|
|
@@ -11990,28 +11990,28 @@ const FI = re(
|
|
|
11990
11990
|
current: ""
|
|
11991
11991
|
}
|
|
11992
11992
|
},
|
|
11993
|
-
initialContent:
|
|
11993
|
+
initialContent: w,
|
|
11994
11994
|
flags: { confirmed: !0 },
|
|
11995
11995
|
extra: {
|
|
11996
|
-
source:
|
|
11996
|
+
source: S,
|
|
11997
11997
|
editor: e.editor
|
|
11998
11998
|
}
|
|
11999
11999
|
};
|
|
12000
|
-
return
|
|
12000
|
+
return s(Yt(x)), x;
|
|
12001
12001
|
}
|
|
12002
12002
|
}
|
|
12003
|
-
let
|
|
12003
|
+
let h = null;
|
|
12004
12004
|
try {
|
|
12005
|
-
|
|
12006
|
-
} catch (
|
|
12007
|
-
const { data:
|
|
12008
|
-
if (
|
|
12009
|
-
(
|
|
12005
|
+
h = await Qi(e, a);
|
|
12006
|
+
} catch (_) {
|
|
12007
|
+
const { data: w } = _;
|
|
12008
|
+
if (w.__ERROR.find(
|
|
12009
|
+
(S) => [
|
|
12010
12010
|
Vu.JSON_MALFORMED,
|
|
12011
12011
|
Vu.JSON_MALFORMED_AT_LINE
|
|
12012
|
-
].includes(
|
|
12012
|
+
].includes(S.errCode)
|
|
12013
12013
|
)) {
|
|
12014
|
-
const { confirmed:
|
|
12014
|
+
const { confirmed: S } = await s(
|
|
12015
12015
|
xr({
|
|
12016
12016
|
title: "Corrupt file",
|
|
12017
12017
|
type: nr.CONFIRM,
|
|
@@ -12019,15 +12019,15 @@ const FI = re(
|
|
|
12019
12019
|
message: "Open in code editor ?"
|
|
12020
12020
|
})
|
|
12021
12021
|
).unwrap();
|
|
12022
|
-
if (
|
|
12023
|
-
const
|
|
12022
|
+
if (S) {
|
|
12023
|
+
const x = await Qr({
|
|
12024
12024
|
verb: dt.GET_INFO,
|
|
12025
12025
|
path: e.path,
|
|
12026
12026
|
content: !0,
|
|
12027
12027
|
as: "text"
|
|
12028
|
-
}), { content:
|
|
12029
|
-
|
|
12030
|
-
date:
|
|
12028
|
+
}), { content: I, date: P, ext: W } = x;
|
|
12029
|
+
h = {
|
|
12030
|
+
date: P,
|
|
12031
12031
|
view: {
|
|
12032
12032
|
panel: {
|
|
12033
12033
|
isOpen: !1,
|
|
@@ -12036,7 +12036,7 @@ const FI = re(
|
|
|
12036
12036
|
}
|
|
12037
12037
|
},
|
|
12038
12038
|
flags: {
|
|
12039
|
-
enabled: ["WebForm", "MForm"].includes(
|
|
12039
|
+
enabled: ["WebForm", "MForm"].includes(W),
|
|
12040
12040
|
confirmed: !0
|
|
12041
12041
|
},
|
|
12042
12042
|
extra: {
|
|
@@ -12045,23 +12045,28 @@ const FI = re(
|
|
|
12045
12045
|
name: e.name,
|
|
12046
12046
|
path: e.path,
|
|
12047
12047
|
type: nh(e.path),
|
|
12048
|
-
initialContent:
|
|
12049
|
-
content:
|
|
12048
|
+
initialContent: I,
|
|
12049
|
+
content: I
|
|
12050
12050
|
};
|
|
12051
12051
|
}
|
|
12052
12052
|
}
|
|
12053
12053
|
}
|
|
12054
|
-
return
|
|
12054
|
+
return h && (e.path === It && !f.flags.touched ? s(
|
|
12055
12055
|
Ng({
|
|
12056
|
-
content:
|
|
12057
|
-
date:
|
|
12056
|
+
content: h.content,
|
|
12057
|
+
date: h.date
|
|
12058
12058
|
})
|
|
12059
|
-
) : e.path === Vn &&
|
|
12059
|
+
) : e.path === Vn && s(
|
|
12060
12060
|
tf({
|
|
12061
12061
|
path: "project",
|
|
12062
|
-
value:
|
|
12062
|
+
value: h.content
|
|
12063
12063
|
})
|
|
12064
|
-
),
|
|
12064
|
+
), s(
|
|
12065
|
+
(r ? _P : Yt)({
|
|
12066
|
+
...h,
|
|
12067
|
+
isNew: t
|
|
12068
|
+
})
|
|
12069
|
+
), h);
|
|
12065
12070
|
}
|
|
12066
12071
|
), Wg = re("explorer/openFileAtLine", async ({ file: e }, { getState: r, dispatch: t }) => {
|
|
12067
12072
|
const { tabs: a } = r().root, i = a.find(({ path: c }) => e.path === c);
|
|
@@ -14101,29 +14106,30 @@ const aP = {
|
|
|
14101
14106
|
};
|
|
14102
14107
|
},
|
|
14103
14108
|
selectTabByReference(e, r) {
|
|
14104
|
-
const t = [
|
|
14105
|
-
|
|
14106
|
-
|
|
14107
|
-
|
|
14108
|
-
|
|
14109
|
-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
|
|
14113
|
-
|
|
14109
|
+
const t = [V.DEBUGGER], { isNew: a, ...i } = r.payload;
|
|
14110
|
+
let s = i, c = e.tabs.find(({ path: f }) => s.path === f);
|
|
14111
|
+
if ((t.includes(s.type) || c != null && c.flags.confirmed) && (s = {
|
|
14112
|
+
...s,
|
|
14113
|
+
flags: {
|
|
14114
|
+
...s.flags,
|
|
14115
|
+
confirmed: !0
|
|
14116
|
+
}
|
|
14117
|
+
}), !c) {
|
|
14118
|
+
const f = e.tabs.findIndex(
|
|
14119
|
+
({ flags: { confirmed: l } }) => l === !1
|
|
14114
14120
|
);
|
|
14115
|
-
|
|
14116
|
-
}
|
|
14117
|
-
if (e.activeTab !==
|
|
14118
|
-
const
|
|
14119
|
-
e.activeTab =
|
|
14120
|
-
}
|
|
14121
|
-
|
|
14122
|
-
...
|
|
14123
|
-
...
|
|
14124
|
-
},
|
|
14125
|
-
...
|
|
14126
|
-
...
|
|
14121
|
+
f !== -1 && !t.includes(s.type) && !a ? e.activeTab === e.tabs[f].path ? (e.tabs[f] = s, c = e.tabs[f]) : (e.tabs.push(s), c = e.tabs[e.tabs.length - 1], e.tabs.splice(f, 1)) : (e.tabs.push(s), c = e.tabs[e.tabs.length - 1]);
|
|
14122
|
+
}
|
|
14123
|
+
if (e.activeTab !== s.path) {
|
|
14124
|
+
const f = e.tabs.reduce((l, p) => (p == null ? void 0 : p.weight) > ((l == null ? void 0 : l.weight) || 0) ? p : l, null);
|
|
14125
|
+
e.activeTab = s.path, c.weight = ((f == null ? void 0 : f.weight) || 0) + 1;
|
|
14126
|
+
}
|
|
14127
|
+
c.extra = {
|
|
14128
|
+
...c.extra,
|
|
14129
|
+
...s.extra
|
|
14130
|
+
}, c.flags = {
|
|
14131
|
+
...c.flags || {},
|
|
14132
|
+
...s.flags || {}
|
|
14127
14133
|
};
|
|
14128
14134
|
},
|
|
14129
14135
|
setContent(e, r) {
|
|
@@ -14617,7 +14623,7 @@ exposed Function ${t.meta.arg.name}()
|
|
|
14617
14623
|
},
|
|
14618
14624
|
reducers: {},
|
|
14619
14625
|
extraReducers(e) {
|
|
14620
|
-
e.addCase(ba.pending, (
|
|
14626
|
+
e.addCase(ba.pending, () => ({
|
|
14621
14627
|
state: "loading"
|
|
14622
14628
|
})).addCase(ba.fulfilled, (r, { payload: t }) => ({
|
|
14623
14629
|
state: "loaded",
|