@opentiny/tiny-engine-toolbar-save 2.9.0-alpha.0 → 2.9.0-alpha.10
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.js +650 -551
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { useMessage as f, callEntry as
|
|
3
|
-
import { reactive as
|
|
4
|
-
import { ToolbarBase as h, VueMonaco as
|
|
5
|
-
import { Select as
|
|
2
|
+
import { useMessage as f, callEntry as u, getMetaApi as G, META_APP as R, useBlock as W, getOptions as Y, usePage as q, useNotify as j, useLayout as z, useCanvas as v, useCompile as $ } from "@opentiny/tiny-engine-meta-register";
|
|
3
|
+
import { reactive as ie, ref as oe, onMounted as ne, onUnmounted as se, resolveComponent as I, createElementBlock as le, openBlock as ee, createVNode as J, withCtx as U, createBlock as ae, createCommentVNode as ce, createTextVNode as te, createElementVNode as X, withModifiers as re } from "vue";
|
|
4
|
+
import { ToolbarBase as h, VueMonaco as A } from "@opentiny/tiny-engine-common";
|
|
5
|
+
import { Select as de, Checkbox as me, DialogBox as ue, Popover as ve, Button as pe } from "@opentiny/vue";
|
|
6
|
+
import { iconDownWard as P, iconUpWard as V } from "@opentiny/vue-icon";
|
|
6
7
|
import { constants as _ } from "@opentiny/tiny-engine-utils";
|
|
7
|
-
import { handlePageUpdate as
|
|
8
|
-
const
|
|
8
|
+
import { handlePageUpdate as F } from "@opentiny/tiny-engine-common/js/http";
|
|
9
|
+
const w = {
|
|
9
10
|
id: "engine.toolbars.save",
|
|
10
11
|
type: "toolbars",
|
|
11
12
|
title: "save",
|
|
@@ -16,65 +17,65 @@ const B = {
|
|
|
16
17
|
renderType: "button"
|
|
17
18
|
}
|
|
18
19
|
}, {
|
|
19
|
-
publish:
|
|
20
|
+
publish: H
|
|
20
21
|
} = f(), {
|
|
21
|
-
PAGE_STATUS:
|
|
22
|
-
AUTO_SAVED:
|
|
23
|
-
} = _,
|
|
22
|
+
PAGE_STATUS: O,
|
|
23
|
+
AUTO_SAVED: L
|
|
24
|
+
} = _, N = ie({
|
|
24
25
|
visible: !1,
|
|
25
26
|
code: "",
|
|
26
27
|
originalCode: "",
|
|
27
28
|
disabled: !1
|
|
28
|
-
}),
|
|
29
|
-
var
|
|
30
|
-
const e =
|
|
31
|
-
getCurrentBlock:
|
|
32
|
-
} =
|
|
33
|
-
t.label =
|
|
29
|
+
}), r = oe(!1), K = u(async (a) => {
|
|
30
|
+
var l;
|
|
31
|
+
const e = G(R.BlockManage), {
|
|
32
|
+
getCurrentBlock: o
|
|
33
|
+
} = W(), t = o();
|
|
34
|
+
t.label = a.fileName, t.content = a, r.value = !0, t.screenshot = await e.getBlockBase64(), await ((l = e.saveBlock) == null ? void 0 : l.call(e, t)), r.value = !1;
|
|
34
35
|
}, {
|
|
35
36
|
metaData: {
|
|
36
37
|
id: "engine.toolbars.save.js-index.saveBlock"
|
|
37
38
|
},
|
|
38
39
|
ctx: () => ({
|
|
39
|
-
useBlock:
|
|
40
|
-
useCanvas:
|
|
41
|
-
useLayout:
|
|
42
|
-
useNotify:
|
|
43
|
-
usePage:
|
|
44
|
-
getOptions:
|
|
45
|
-
getMetaApi:
|
|
46
|
-
META_APP:
|
|
40
|
+
useBlock: W,
|
|
41
|
+
useCanvas: v,
|
|
42
|
+
useLayout: z,
|
|
43
|
+
useNotify: j,
|
|
44
|
+
usePage: q,
|
|
45
|
+
getOptions: Y,
|
|
46
|
+
getMetaApi: G,
|
|
47
|
+
META_APP: R,
|
|
47
48
|
useMessage: f,
|
|
48
49
|
constants: _,
|
|
49
|
-
handlePageUpdate:
|
|
50
|
-
meta:
|
|
51
|
-
publish:
|
|
52
|
-
PAGE_STATUS:
|
|
53
|
-
AUTO_SAVED:
|
|
54
|
-
state:
|
|
55
|
-
isLoading:
|
|
56
|
-
saveBlock:
|
|
57
|
-
savePage:
|
|
50
|
+
handlePageUpdate: F,
|
|
51
|
+
meta: w,
|
|
52
|
+
publish: H,
|
|
53
|
+
PAGE_STATUS: O,
|
|
54
|
+
AUTO_SAVED: L,
|
|
55
|
+
state: N,
|
|
56
|
+
isLoading: r,
|
|
57
|
+
saveBlock: K,
|
|
58
|
+
savePage: Q,
|
|
58
59
|
saveCommon: g,
|
|
59
60
|
openCommon: y,
|
|
60
61
|
getAutoSaveStatus: k,
|
|
61
62
|
setAutoSaveStatus: x
|
|
62
63
|
})
|
|
63
|
-
}),
|
|
64
|
+
}), Q = u(async (a) => {
|
|
64
65
|
const {
|
|
65
66
|
currentPage: e
|
|
66
|
-
} =
|
|
67
|
-
page_content:
|
|
67
|
+
} = v().pageState, o = {
|
|
68
|
+
page_content: a
|
|
68
69
|
};
|
|
69
|
-
|
|
70
|
+
r.value = !0;
|
|
70
71
|
const t = {
|
|
71
72
|
id: e.id,
|
|
72
73
|
params: {
|
|
73
74
|
...e,
|
|
74
|
-
...
|
|
75
|
+
...o
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
|
-
await
|
|
78
|
+
await F(t), r.value = !1, H({
|
|
78
79
|
topic: "page-saved"
|
|
79
80
|
});
|
|
80
81
|
}, {
|
|
@@ -82,130 +83,130 @@ const B = {
|
|
|
82
83
|
id: "engine.toolbars.save.js-index.savePage"
|
|
83
84
|
},
|
|
84
85
|
ctx: () => ({
|
|
85
|
-
useBlock:
|
|
86
|
-
useCanvas:
|
|
87
|
-
useLayout:
|
|
88
|
-
useNotify:
|
|
89
|
-
usePage:
|
|
90
|
-
getOptions:
|
|
91
|
-
getMetaApi:
|
|
92
|
-
META_APP:
|
|
86
|
+
useBlock: W,
|
|
87
|
+
useCanvas: v,
|
|
88
|
+
useLayout: z,
|
|
89
|
+
useNotify: j,
|
|
90
|
+
usePage: q,
|
|
91
|
+
getOptions: Y,
|
|
92
|
+
getMetaApi: G,
|
|
93
|
+
META_APP: R,
|
|
93
94
|
useMessage: f,
|
|
94
95
|
constants: _,
|
|
95
|
-
handlePageUpdate:
|
|
96
|
-
meta:
|
|
97
|
-
publish:
|
|
98
|
-
PAGE_STATUS:
|
|
99
|
-
AUTO_SAVED:
|
|
100
|
-
state:
|
|
101
|
-
isLoading:
|
|
102
|
-
saveBlock:
|
|
103
|
-
savePage:
|
|
96
|
+
handlePageUpdate: F,
|
|
97
|
+
meta: w,
|
|
98
|
+
publish: H,
|
|
99
|
+
PAGE_STATUS: O,
|
|
100
|
+
AUTO_SAVED: L,
|
|
101
|
+
state: N,
|
|
102
|
+
isLoading: r,
|
|
103
|
+
saveBlock: K,
|
|
104
|
+
savePage: Q,
|
|
104
105
|
saveCommon: g,
|
|
105
106
|
openCommon: y,
|
|
106
107
|
getAutoSaveStatus: k,
|
|
107
108
|
setAutoSaveStatus: x
|
|
108
109
|
})
|
|
109
|
-
}), g =
|
|
110
|
+
}), g = u((a) => {
|
|
110
111
|
const {
|
|
111
112
|
pageSettingState: e,
|
|
112
|
-
isTemporaryPage:
|
|
113
|
-
} =
|
|
113
|
+
isTemporaryPage: o
|
|
114
|
+
} = q(), {
|
|
114
115
|
isBlock: t,
|
|
115
|
-
canvasApi:
|
|
116
|
-
pageState:
|
|
117
|
-
resetBlockCanvasState:
|
|
118
|
-
resetPageCanvasState:
|
|
119
|
-
} =
|
|
120
|
-
selectNode:
|
|
121
|
-
} =
|
|
122
|
-
if (t() ?
|
|
123
|
-
...
|
|
124
|
-
pageSchema:
|
|
125
|
-
}) :
|
|
126
|
-
...
|
|
127
|
-
pageSchema:
|
|
116
|
+
canvasApi: l,
|
|
117
|
+
pageState: n,
|
|
118
|
+
resetBlockCanvasState: p,
|
|
119
|
+
resetPageCanvasState: d
|
|
120
|
+
} = v(), i = JSON.parse(a), {
|
|
121
|
+
selectNode: c
|
|
122
|
+
} = l.value;
|
|
123
|
+
if (t() ? p({
|
|
124
|
+
...n,
|
|
125
|
+
pageSchema: i
|
|
126
|
+
}) : d({
|
|
127
|
+
...n,
|
|
128
|
+
pageSchema: i
|
|
128
129
|
}), e != null && e.isAIPage) {
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
return e.currentPageData[
|
|
130
|
+
o.saved && (o.saved = !1), o.saved = !0;
|
|
131
|
+
const s = "page_content";
|
|
132
|
+
return e.currentPageData[s] = i, Promise.resolve();
|
|
132
133
|
}
|
|
133
|
-
return
|
|
134
|
+
return c(null), t() ? K(i) : Q(i);
|
|
134
135
|
}, {
|
|
135
136
|
metaData: {
|
|
136
137
|
id: "engine.toolbars.save.js-index.saveCommon"
|
|
137
138
|
},
|
|
138
139
|
ctx: () => ({
|
|
139
|
-
useBlock:
|
|
140
|
-
useCanvas:
|
|
141
|
-
useLayout:
|
|
142
|
-
useNotify:
|
|
143
|
-
usePage:
|
|
144
|
-
getOptions:
|
|
145
|
-
getMetaApi:
|
|
146
|
-
META_APP:
|
|
140
|
+
useBlock: W,
|
|
141
|
+
useCanvas: v,
|
|
142
|
+
useLayout: z,
|
|
143
|
+
useNotify: j,
|
|
144
|
+
usePage: q,
|
|
145
|
+
getOptions: Y,
|
|
146
|
+
getMetaApi: G,
|
|
147
|
+
META_APP: R,
|
|
147
148
|
useMessage: f,
|
|
148
149
|
constants: _,
|
|
149
|
-
handlePageUpdate:
|
|
150
|
-
meta:
|
|
151
|
-
publish:
|
|
152
|
-
PAGE_STATUS:
|
|
153
|
-
AUTO_SAVED:
|
|
154
|
-
state:
|
|
155
|
-
isLoading:
|
|
156
|
-
saveBlock:
|
|
157
|
-
savePage:
|
|
150
|
+
handlePageUpdate: F,
|
|
151
|
+
meta: w,
|
|
152
|
+
publish: H,
|
|
153
|
+
PAGE_STATUS: O,
|
|
154
|
+
AUTO_SAVED: L,
|
|
155
|
+
state: N,
|
|
156
|
+
isLoading: r,
|
|
157
|
+
saveBlock: K,
|
|
158
|
+
savePage: Q,
|
|
158
159
|
saveCommon: g,
|
|
159
160
|
openCommon: y,
|
|
160
161
|
getAutoSaveStatus: k,
|
|
161
162
|
setAutoSaveStatus: x
|
|
162
163
|
})
|
|
163
|
-
}), y =
|
|
164
|
-
var
|
|
164
|
+
}), y = u(async () => {
|
|
165
|
+
var s;
|
|
165
166
|
const {
|
|
166
|
-
isSaved:
|
|
167
|
+
isSaved: a,
|
|
167
168
|
getSchema: e
|
|
168
|
-
} =
|
|
169
|
-
if (
|
|
169
|
+
} = v();
|
|
170
|
+
if (a() || N.disabled)
|
|
170
171
|
return;
|
|
171
172
|
const {
|
|
172
|
-
beforeSave:
|
|
173
|
+
beforeSave: o,
|
|
173
174
|
saveMethod: t,
|
|
174
|
-
saved:
|
|
175
|
-
} =
|
|
175
|
+
saved: l
|
|
176
|
+
} = Y(w.id);
|
|
176
177
|
try {
|
|
177
|
-
if (typeof
|
|
178
|
+
if (typeof o == "function" && await o(), typeof t == "function" && await t())
|
|
178
179
|
return;
|
|
179
|
-
} catch (
|
|
180
|
-
|
|
180
|
+
} catch (b) {
|
|
181
|
+
j({
|
|
181
182
|
type: "error",
|
|
182
|
-
message: `Error in saving: ${
|
|
183
|
+
message: `Error in saving: ${b}`
|
|
183
184
|
});
|
|
184
185
|
}
|
|
185
|
-
const
|
|
186
|
-
[
|
|
187
|
-
[
|
|
188
|
-
[
|
|
189
|
-
[
|
|
186
|
+
const n = (s = z().layoutState) == null ? void 0 : s.pageStatus, p = n == null ? void 0 : n.state, d = n == null ? void 0 : n.data, i = {
|
|
187
|
+
[O.Release]: "当前页面未锁定,请先锁定再保存",
|
|
188
|
+
[O.Empty]: "当前应用无页面,请先新建页面再保存",
|
|
189
|
+
[O.Guest]: "官网演示应用不能保存页面,如需体验请切换应用",
|
|
190
|
+
[O.Lock]: `当前页面被 ${(d == null ? void 0 : d.username) || ""} 锁定,如需编辑请先联系他解锁文件,然后再锁定该页面后编辑!`
|
|
190
191
|
};
|
|
191
|
-
if ([
|
|
192
|
-
|
|
192
|
+
if ([O.Release, O.Empty, O.Guest, O.Lock].includes(p)) {
|
|
193
|
+
j({
|
|
193
194
|
type: "error",
|
|
194
195
|
title: "保存失败",
|
|
195
|
-
message:
|
|
196
|
+
message: i[p]
|
|
196
197
|
});
|
|
197
198
|
return;
|
|
198
199
|
}
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
return
|
|
202
|
-
if (
|
|
200
|
+
N.disabled = !0;
|
|
201
|
+
const c = e();
|
|
202
|
+
return N.code = JSON.stringify(c || {}, null, 2), g(N.code).finally(() => {
|
|
203
|
+
if (N.disabled = !1, typeof l == "function")
|
|
203
204
|
try {
|
|
204
|
-
|
|
205
|
-
} catch (
|
|
206
|
-
|
|
205
|
+
l();
|
|
206
|
+
} catch (b) {
|
|
207
|
+
j({
|
|
207
208
|
type: "error",
|
|
208
|
-
message: `Error in saved: ${
|
|
209
|
+
message: `Error in saved: ${b}`
|
|
209
210
|
});
|
|
210
211
|
}
|
|
211
212
|
});
|
|
@@ -214,34 +215,34 @@ const B = {
|
|
|
214
215
|
id: "engine.toolbars.save.js-index.openCommon"
|
|
215
216
|
},
|
|
216
217
|
ctx: () => ({
|
|
217
|
-
useBlock:
|
|
218
|
-
useCanvas:
|
|
219
|
-
useLayout:
|
|
220
|
-
useNotify:
|
|
221
|
-
usePage:
|
|
222
|
-
getOptions:
|
|
223
|
-
getMetaApi:
|
|
224
|
-
META_APP:
|
|
218
|
+
useBlock: W,
|
|
219
|
+
useCanvas: v,
|
|
220
|
+
useLayout: z,
|
|
221
|
+
useNotify: j,
|
|
222
|
+
usePage: q,
|
|
223
|
+
getOptions: Y,
|
|
224
|
+
getMetaApi: G,
|
|
225
|
+
META_APP: R,
|
|
225
226
|
useMessage: f,
|
|
226
227
|
constants: _,
|
|
227
|
-
handlePageUpdate:
|
|
228
|
-
meta:
|
|
229
|
-
publish:
|
|
230
|
-
PAGE_STATUS:
|
|
231
|
-
AUTO_SAVED:
|
|
232
|
-
state:
|
|
233
|
-
isLoading:
|
|
234
|
-
saveBlock:
|
|
235
|
-
savePage:
|
|
228
|
+
handlePageUpdate: F,
|
|
229
|
+
meta: w,
|
|
230
|
+
publish: H,
|
|
231
|
+
PAGE_STATUS: O,
|
|
232
|
+
AUTO_SAVED: L,
|
|
233
|
+
state: N,
|
|
234
|
+
isLoading: r,
|
|
235
|
+
saveBlock: K,
|
|
236
|
+
savePage: Q,
|
|
236
237
|
saveCommon: g,
|
|
237
238
|
openCommon: y,
|
|
238
239
|
getAutoSaveStatus: k,
|
|
239
240
|
setAutoSaveStatus: x
|
|
240
241
|
})
|
|
241
|
-
}), k =
|
|
242
|
+
}), k = u(() => {
|
|
242
243
|
try {
|
|
243
|
-
const
|
|
244
|
-
return JSON.parse(
|
|
244
|
+
const a = localStorage.getItem(L) ?? "";
|
|
245
|
+
return JSON.parse(a) ?? !1;
|
|
245
246
|
} catch {
|
|
246
247
|
return !1;
|
|
247
248
|
}
|
|
@@ -250,33 +251,33 @@ const B = {
|
|
|
250
251
|
id: "engine.toolbars.save.js-index.getAutoSaveStatus"
|
|
251
252
|
},
|
|
252
253
|
ctx: () => ({
|
|
253
|
-
useBlock:
|
|
254
|
-
useCanvas:
|
|
255
|
-
useLayout:
|
|
256
|
-
useNotify:
|
|
257
|
-
usePage:
|
|
258
|
-
getOptions:
|
|
259
|
-
getMetaApi:
|
|
260
|
-
META_APP:
|
|
254
|
+
useBlock: W,
|
|
255
|
+
useCanvas: v,
|
|
256
|
+
useLayout: z,
|
|
257
|
+
useNotify: j,
|
|
258
|
+
usePage: q,
|
|
259
|
+
getOptions: Y,
|
|
260
|
+
getMetaApi: G,
|
|
261
|
+
META_APP: R,
|
|
261
262
|
useMessage: f,
|
|
262
263
|
constants: _,
|
|
263
|
-
handlePageUpdate:
|
|
264
|
-
meta:
|
|
265
|
-
publish:
|
|
266
|
-
PAGE_STATUS:
|
|
267
|
-
AUTO_SAVED:
|
|
268
|
-
state:
|
|
269
|
-
isLoading:
|
|
270
|
-
saveBlock:
|
|
271
|
-
savePage:
|
|
264
|
+
handlePageUpdate: F,
|
|
265
|
+
meta: w,
|
|
266
|
+
publish: H,
|
|
267
|
+
PAGE_STATUS: O,
|
|
268
|
+
AUTO_SAVED: L,
|
|
269
|
+
state: N,
|
|
270
|
+
isLoading: r,
|
|
271
|
+
saveBlock: K,
|
|
272
|
+
savePage: Q,
|
|
272
273
|
saveCommon: g,
|
|
273
274
|
openCommon: y,
|
|
274
275
|
getAutoSaveStatus: k,
|
|
275
276
|
setAutoSaveStatus: x
|
|
276
277
|
})
|
|
277
|
-
}), x =
|
|
278
|
+
}), x = u((a) => {
|
|
278
279
|
try {
|
|
279
|
-
return localStorage.setItem(
|
|
280
|
+
return localStorage.setItem(L, JSON.stringify(a)), !0;
|
|
280
281
|
} catch {
|
|
281
282
|
return !1;
|
|
282
283
|
}
|
|
@@ -285,57 +286,55 @@ const B = {
|
|
|
285
286
|
id: "engine.toolbars.save.js-index.setAutoSaveStatus"
|
|
286
287
|
},
|
|
287
288
|
ctx: () => ({
|
|
288
|
-
useBlock:
|
|
289
|
-
useCanvas:
|
|
290
|
-
useLayout:
|
|
291
|
-
useNotify:
|
|
292
|
-
usePage:
|
|
293
|
-
getOptions:
|
|
294
|
-
getMetaApi:
|
|
295
|
-
META_APP:
|
|
289
|
+
useBlock: W,
|
|
290
|
+
useCanvas: v,
|
|
291
|
+
useLayout: z,
|
|
292
|
+
useNotify: j,
|
|
293
|
+
usePage: q,
|
|
294
|
+
getOptions: Y,
|
|
295
|
+
getMetaApi: G,
|
|
296
|
+
META_APP: R,
|
|
296
297
|
useMessage: f,
|
|
297
298
|
constants: _,
|
|
298
|
-
handlePageUpdate:
|
|
299
|
-
meta:
|
|
300
|
-
publish:
|
|
301
|
-
PAGE_STATUS:
|
|
302
|
-
AUTO_SAVED:
|
|
303
|
-
state:
|
|
304
|
-
isLoading:
|
|
305
|
-
saveBlock:
|
|
306
|
-
savePage:
|
|
299
|
+
handlePageUpdate: F,
|
|
300
|
+
meta: w,
|
|
301
|
+
publish: H,
|
|
302
|
+
PAGE_STATUS: O,
|
|
303
|
+
AUTO_SAVED: L,
|
|
304
|
+
state: N,
|
|
305
|
+
isLoading: r,
|
|
306
|
+
saveBlock: K,
|
|
307
|
+
savePage: Q,
|
|
307
308
|
saveCommon: g,
|
|
308
309
|
openCommon: y,
|
|
309
310
|
getAutoSaveStatus: k,
|
|
310
311
|
setAutoSaveStatus: x
|
|
311
312
|
})
|
|
312
313
|
}), {
|
|
313
|
-
OPEN_DELAY:
|
|
314
|
-
} = _,
|
|
314
|
+
OPEN_DELAY: B
|
|
315
|
+
} = _, E = {
|
|
315
316
|
saveCommon: g,
|
|
316
317
|
openCommon: y
|
|
317
|
-
},
|
|
318
|
+
}, ge = {
|
|
318
319
|
components: {
|
|
319
|
-
VueMonaco:
|
|
320
|
-
TinyButton:
|
|
321
|
-
TinyPopover:
|
|
322
|
-
TinyDialogBox:
|
|
323
|
-
TinyCheckbox:
|
|
324
|
-
TinySelect:
|
|
320
|
+
VueMonaco: A,
|
|
321
|
+
TinyButton: pe,
|
|
322
|
+
TinyPopover: ve,
|
|
323
|
+
TinyDialogBox: ue,
|
|
324
|
+
TinyCheckbox: me,
|
|
325
|
+
TinySelect: de,
|
|
326
|
+
TinyIconUpWard: V(),
|
|
327
|
+
TinyIconDownWard: P(),
|
|
325
328
|
ToolbarBase: h
|
|
326
329
|
},
|
|
327
330
|
props: {
|
|
328
|
-
iconExpand: {
|
|
329
|
-
type: String,
|
|
330
|
-
default: "down-arrow"
|
|
331
|
-
},
|
|
332
331
|
options: {
|
|
333
332
|
type: Object,
|
|
334
333
|
default: () => ({})
|
|
335
334
|
}
|
|
336
335
|
},
|
|
337
336
|
setup() {
|
|
338
|
-
const
|
|
337
|
+
const a = [{
|
|
339
338
|
value: 5,
|
|
340
339
|
label: "5分钟"
|
|
341
340
|
}, {
|
|
@@ -344,44 +343,84 @@ const B = {
|
|
|
344
343
|
}, {
|
|
345
344
|
value: 15,
|
|
346
345
|
label: "15分钟"
|
|
347
|
-
}], e =
|
|
346
|
+
}], e = ie({
|
|
348
347
|
visible: !1,
|
|
349
348
|
code: "",
|
|
350
349
|
originalCode: "",
|
|
351
350
|
checked: !1,
|
|
352
351
|
timeValue: 5,
|
|
353
352
|
preservationTime: null
|
|
354
|
-
}),
|
|
355
|
-
isSaved:
|
|
356
|
-
setSaved:
|
|
357
|
-
getSchema:
|
|
358
|
-
} =
|
|
353
|
+
}), o = oe(null), t = oe(!1), {
|
|
354
|
+
isSaved: l,
|
|
355
|
+
setSaved: n,
|
|
356
|
+
getSchema: p
|
|
357
|
+
} = v(), {
|
|
359
358
|
subscribe: d,
|
|
360
|
-
unsubscribe:
|
|
361
|
-
} = f(),
|
|
362
|
-
|
|
359
|
+
unsubscribe: i
|
|
360
|
+
} = f(), c = "toolbar-save", s = oe(null), b = u(() => {
|
|
361
|
+
t.value = !t.value;
|
|
362
|
+
}, {
|
|
363
|
+
metaData: {
|
|
364
|
+
id: "engine.toolbars.save.Main.clickPopover"
|
|
365
|
+
},
|
|
366
|
+
ctx: () => ({
|
|
367
|
+
delayOptions: a,
|
|
368
|
+
state: e,
|
|
369
|
+
editor: o,
|
|
370
|
+
poperVisible: t,
|
|
371
|
+
isSaved: l,
|
|
372
|
+
setSaved: n,
|
|
373
|
+
getSchema: p,
|
|
374
|
+
subscribe: d,
|
|
375
|
+
unsubscribe: i,
|
|
376
|
+
subscriber: c,
|
|
377
|
+
originSchema: s,
|
|
378
|
+
clickPopover: b,
|
|
379
|
+
close: S,
|
|
380
|
+
openApi: C,
|
|
381
|
+
saveApi: D,
|
|
382
|
+
editorOptions: m,
|
|
383
|
+
saveSetTimeout: M,
|
|
384
|
+
saveConfig: T,
|
|
385
|
+
VueMonaco: A,
|
|
386
|
+
iconUpWard: V,
|
|
387
|
+
iconDownWard: P,
|
|
388
|
+
useCanvas: v,
|
|
389
|
+
useMessage: f,
|
|
390
|
+
ToolbarBase: h,
|
|
391
|
+
openCommon: y,
|
|
392
|
+
saveCommon: g,
|
|
393
|
+
isLoading: r,
|
|
394
|
+
setAutoSaveStatus: x,
|
|
395
|
+
getAutoSaveStatus: k,
|
|
396
|
+
constants: _,
|
|
397
|
+
OPEN_DELAY: B,
|
|
398
|
+
api: E
|
|
399
|
+
})
|
|
400
|
+
});
|
|
401
|
+
ne(u(u(() => {
|
|
363
402
|
d({
|
|
364
403
|
topic: "pageOrBlockInit",
|
|
365
|
-
subscriber:
|
|
366
|
-
callback: (
|
|
367
|
-
|
|
404
|
+
subscriber: c,
|
|
405
|
+
callback: (Z) => {
|
|
406
|
+
s.value = JSON.stringify(Z), n(!0);
|
|
368
407
|
}
|
|
369
408
|
}), d({
|
|
370
409
|
topic: "schemaChange",
|
|
371
|
-
subscriber:
|
|
410
|
+
subscriber: c,
|
|
372
411
|
callback: () => {
|
|
373
|
-
if (
|
|
374
|
-
const
|
|
375
|
-
|
|
412
|
+
if (s.value) {
|
|
413
|
+
const Z = JSON.stringify(p()) === s.value;
|
|
414
|
+
n(Z);
|
|
376
415
|
}
|
|
377
416
|
}
|
|
378
417
|
}), d({
|
|
379
418
|
topic: "schemaImport",
|
|
380
|
-
subscriber:
|
|
419
|
+
subscriber: c,
|
|
381
420
|
callback: () => {
|
|
382
|
-
if (
|
|
383
|
-
const
|
|
384
|
-
|
|
421
|
+
if (s.value) {
|
|
422
|
+
const Z = JSON.stringify(p()) === s.value;
|
|
423
|
+
n(Z);
|
|
385
424
|
}
|
|
386
425
|
}
|
|
387
426
|
});
|
|
@@ -390,559 +429,619 @@ const B = {
|
|
|
390
429
|
id: "engine.toolbars.save.Main.onMounted[0]"
|
|
391
430
|
},
|
|
392
431
|
ctx: () => ({
|
|
393
|
-
delayOptions:
|
|
432
|
+
delayOptions: a,
|
|
394
433
|
state: e,
|
|
395
|
-
editor:
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
434
|
+
editor: o,
|
|
435
|
+
poperVisible: t,
|
|
436
|
+
isSaved: l,
|
|
437
|
+
setSaved: n,
|
|
438
|
+
getSchema: p,
|
|
399
439
|
subscribe: d,
|
|
400
|
-
unsubscribe:
|
|
401
|
-
subscriber:
|
|
402
|
-
originSchema:
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
440
|
+
unsubscribe: i,
|
|
441
|
+
subscriber: c,
|
|
442
|
+
originSchema: s,
|
|
443
|
+
clickPopover: b,
|
|
444
|
+
close: S,
|
|
445
|
+
openApi: C,
|
|
446
|
+
saveApi: D,
|
|
447
|
+
editorOptions: m,
|
|
448
|
+
saveSetTimeout: M,
|
|
449
|
+
saveConfig: T,
|
|
450
|
+
VueMonaco: A,
|
|
451
|
+
iconUpWard: V,
|
|
452
|
+
iconDownWard: P,
|
|
453
|
+
useCanvas: v,
|
|
411
454
|
useMessage: f,
|
|
412
455
|
ToolbarBase: h,
|
|
413
456
|
openCommon: y,
|
|
414
457
|
saveCommon: g,
|
|
415
|
-
isLoading:
|
|
458
|
+
isLoading: r,
|
|
416
459
|
setAutoSaveStatus: x,
|
|
417
460
|
getAutoSaveStatus: k,
|
|
418
461
|
constants: _,
|
|
419
|
-
OPEN_DELAY:
|
|
420
|
-
api:
|
|
462
|
+
OPEN_DELAY: B,
|
|
463
|
+
api: E
|
|
421
464
|
})
|
|
422
465
|
}), {
|
|
423
466
|
metaData: {
|
|
424
467
|
id: "engine.toolbars.save.Main.onMounted[0]"
|
|
425
468
|
},
|
|
426
469
|
ctx: () => ({
|
|
427
|
-
delayOptions:
|
|
470
|
+
delayOptions: a,
|
|
428
471
|
state: e,
|
|
429
|
-
editor:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
472
|
+
editor: o,
|
|
473
|
+
poperVisible: t,
|
|
474
|
+
isSaved: l,
|
|
475
|
+
setSaved: n,
|
|
476
|
+
getSchema: p,
|
|
433
477
|
subscribe: d,
|
|
434
|
-
unsubscribe:
|
|
435
|
-
subscriber:
|
|
436
|
-
originSchema:
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
478
|
+
unsubscribe: i,
|
|
479
|
+
subscriber: c,
|
|
480
|
+
originSchema: s,
|
|
481
|
+
clickPopover: b,
|
|
482
|
+
close: S,
|
|
483
|
+
openApi: C,
|
|
484
|
+
saveApi: D,
|
|
485
|
+
editorOptions: m,
|
|
486
|
+
saveSetTimeout: M,
|
|
487
|
+
saveConfig: T,
|
|
488
|
+
_callEntry: u,
|
|
489
|
+
_useCompile: $,
|
|
490
|
+
_metaData: w,
|
|
491
|
+
VueMonaco: A,
|
|
492
|
+
iconUpWard: V,
|
|
493
|
+
iconDownWard: P,
|
|
494
|
+
useCanvas: v,
|
|
448
495
|
useMessage: f,
|
|
449
496
|
ToolbarBase: h,
|
|
450
497
|
openCommon: y,
|
|
451
498
|
saveCommon: g,
|
|
452
|
-
isLoading:
|
|
499
|
+
isLoading: r,
|
|
453
500
|
setAutoSaveStatus: x,
|
|
454
501
|
getAutoSaveStatus: k,
|
|
455
502
|
constants: _,
|
|
456
|
-
OPEN_DELAY:
|
|
457
|
-
api:
|
|
503
|
+
OPEN_DELAY: B,
|
|
504
|
+
api: E
|
|
458
505
|
})
|
|
459
|
-
})),
|
|
460
|
-
|
|
506
|
+
})), se(u(u(() => {
|
|
507
|
+
i({
|
|
461
508
|
topic: "pageOrBlockInit",
|
|
462
|
-
subscriber:
|
|
463
|
-
}),
|
|
509
|
+
subscriber: c
|
|
510
|
+
}), i({
|
|
464
511
|
topic: "schemaChange",
|
|
465
|
-
subscriber:
|
|
466
|
-
}),
|
|
512
|
+
subscriber: c
|
|
513
|
+
}), i({
|
|
467
514
|
topic: "schemaImport",
|
|
468
|
-
subscriber:
|
|
515
|
+
subscriber: c
|
|
469
516
|
});
|
|
470
517
|
}, {
|
|
471
518
|
metaData: {
|
|
472
519
|
id: "engine.toolbars.save.Main.onUnmounted[0]"
|
|
473
520
|
},
|
|
474
521
|
ctx: () => ({
|
|
475
|
-
delayOptions:
|
|
522
|
+
delayOptions: a,
|
|
476
523
|
state: e,
|
|
477
|
-
editor:
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
524
|
+
editor: o,
|
|
525
|
+
poperVisible: t,
|
|
526
|
+
isSaved: l,
|
|
527
|
+
setSaved: n,
|
|
528
|
+
getSchema: p,
|
|
481
529
|
subscribe: d,
|
|
482
|
-
unsubscribe:
|
|
483
|
-
subscriber:
|
|
484
|
-
originSchema:
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
530
|
+
unsubscribe: i,
|
|
531
|
+
subscriber: c,
|
|
532
|
+
originSchema: s,
|
|
533
|
+
clickPopover: b,
|
|
534
|
+
close: S,
|
|
535
|
+
openApi: C,
|
|
536
|
+
saveApi: D,
|
|
537
|
+
editorOptions: m,
|
|
538
|
+
saveSetTimeout: M,
|
|
539
|
+
saveConfig: T,
|
|
540
|
+
VueMonaco: A,
|
|
541
|
+
iconUpWard: V,
|
|
542
|
+
iconDownWard: P,
|
|
543
|
+
useCanvas: v,
|
|
493
544
|
useMessage: f,
|
|
494
545
|
ToolbarBase: h,
|
|
495
546
|
openCommon: y,
|
|
496
547
|
saveCommon: g,
|
|
497
|
-
isLoading:
|
|
548
|
+
isLoading: r,
|
|
498
549
|
setAutoSaveStatus: x,
|
|
499
550
|
getAutoSaveStatus: k,
|
|
500
551
|
constants: _,
|
|
501
|
-
OPEN_DELAY:
|
|
502
|
-
api:
|
|
552
|
+
OPEN_DELAY: B,
|
|
553
|
+
api: E
|
|
503
554
|
})
|
|
504
555
|
}), {
|
|
505
556
|
metaData: {
|
|
506
557
|
id: "engine.toolbars.save.Main.onUnmounted[0]"
|
|
507
558
|
},
|
|
508
559
|
ctx: () => ({
|
|
509
|
-
delayOptions:
|
|
560
|
+
delayOptions: a,
|
|
510
561
|
state: e,
|
|
511
|
-
editor:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
562
|
+
editor: o,
|
|
563
|
+
poperVisible: t,
|
|
564
|
+
isSaved: l,
|
|
565
|
+
setSaved: n,
|
|
566
|
+
getSchema: p,
|
|
515
567
|
subscribe: d,
|
|
516
|
-
unsubscribe:
|
|
517
|
-
subscriber:
|
|
518
|
-
originSchema:
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
568
|
+
unsubscribe: i,
|
|
569
|
+
subscriber: c,
|
|
570
|
+
originSchema: s,
|
|
571
|
+
clickPopover: b,
|
|
572
|
+
close: S,
|
|
573
|
+
openApi: C,
|
|
574
|
+
saveApi: D,
|
|
575
|
+
editorOptions: m,
|
|
576
|
+
saveSetTimeout: M,
|
|
577
|
+
saveConfig: T,
|
|
578
|
+
_callEntry: u,
|
|
579
|
+
_useCompile: $,
|
|
580
|
+
_metaData: w,
|
|
581
|
+
VueMonaco: A,
|
|
582
|
+
iconUpWard: V,
|
|
583
|
+
iconDownWard: P,
|
|
584
|
+
useCanvas: v,
|
|
530
585
|
useMessage: f,
|
|
531
586
|
ToolbarBase: h,
|
|
532
587
|
openCommon: y,
|
|
533
588
|
saveCommon: g,
|
|
534
|
-
isLoading:
|
|
589
|
+
isLoading: r,
|
|
535
590
|
setAutoSaveStatus: x,
|
|
536
591
|
getAutoSaveStatus: k,
|
|
537
592
|
constants: _,
|
|
538
|
-
OPEN_DELAY:
|
|
539
|
-
api:
|
|
593
|
+
OPEN_DELAY: B,
|
|
594
|
+
api: E
|
|
540
595
|
})
|
|
541
596
|
}));
|
|
542
|
-
const
|
|
597
|
+
const S = u(() => {
|
|
543
598
|
e.visible = !1, e.originalCode = "";
|
|
544
599
|
}, {
|
|
545
600
|
metaData: {
|
|
546
601
|
id: "engine.toolbars.save.Main.close"
|
|
547
602
|
},
|
|
548
603
|
ctx: () => ({
|
|
549
|
-
delayOptions:
|
|
604
|
+
delayOptions: a,
|
|
550
605
|
state: e,
|
|
551
|
-
editor:
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
606
|
+
editor: o,
|
|
607
|
+
poperVisible: t,
|
|
608
|
+
isSaved: l,
|
|
609
|
+
setSaved: n,
|
|
610
|
+
getSchema: p,
|
|
555
611
|
subscribe: d,
|
|
556
|
-
unsubscribe:
|
|
557
|
-
subscriber:
|
|
558
|
-
originSchema:
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
612
|
+
unsubscribe: i,
|
|
613
|
+
subscriber: c,
|
|
614
|
+
originSchema: s,
|
|
615
|
+
clickPopover: b,
|
|
616
|
+
close: S,
|
|
617
|
+
openApi: C,
|
|
618
|
+
saveApi: D,
|
|
619
|
+
editorOptions: m,
|
|
620
|
+
saveSetTimeout: M,
|
|
621
|
+
saveConfig: T,
|
|
622
|
+
VueMonaco: A,
|
|
623
|
+
iconUpWard: V,
|
|
624
|
+
iconDownWard: P,
|
|
625
|
+
useCanvas: v,
|
|
567
626
|
useMessage: f,
|
|
568
627
|
ToolbarBase: h,
|
|
569
628
|
openCommon: y,
|
|
570
629
|
saveCommon: g,
|
|
571
|
-
isLoading:
|
|
630
|
+
isLoading: r,
|
|
572
631
|
setAutoSaveStatus: x,
|
|
573
632
|
getAutoSaveStatus: k,
|
|
574
633
|
constants: _,
|
|
575
|
-
OPEN_DELAY:
|
|
576
|
-
api:
|
|
634
|
+
OPEN_DELAY: B,
|
|
635
|
+
api: E
|
|
577
636
|
})
|
|
578
|
-
}),
|
|
579
|
-
|
|
637
|
+
}), C = u(() => {
|
|
638
|
+
r.value || y();
|
|
580
639
|
}, {
|
|
581
640
|
metaData: {
|
|
582
641
|
id: "engine.toolbars.save.Main.openApi"
|
|
583
642
|
},
|
|
584
643
|
ctx: () => ({
|
|
585
|
-
delayOptions:
|
|
644
|
+
delayOptions: a,
|
|
586
645
|
state: e,
|
|
587
|
-
editor:
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
646
|
+
editor: o,
|
|
647
|
+
poperVisible: t,
|
|
648
|
+
isSaved: l,
|
|
649
|
+
setSaved: n,
|
|
650
|
+
getSchema: p,
|
|
591
651
|
subscribe: d,
|
|
592
|
-
unsubscribe:
|
|
593
|
-
subscriber:
|
|
594
|
-
originSchema:
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
652
|
+
unsubscribe: i,
|
|
653
|
+
subscriber: c,
|
|
654
|
+
originSchema: s,
|
|
655
|
+
clickPopover: b,
|
|
656
|
+
close: S,
|
|
657
|
+
openApi: C,
|
|
658
|
+
saveApi: D,
|
|
659
|
+
editorOptions: m,
|
|
660
|
+
saveSetTimeout: M,
|
|
661
|
+
saveConfig: T,
|
|
662
|
+
VueMonaco: A,
|
|
663
|
+
iconUpWard: V,
|
|
664
|
+
iconDownWard: P,
|
|
665
|
+
useCanvas: v,
|
|
603
666
|
useMessage: f,
|
|
604
667
|
ToolbarBase: h,
|
|
605
668
|
openCommon: y,
|
|
606
669
|
saveCommon: g,
|
|
607
|
-
isLoading:
|
|
670
|
+
isLoading: r,
|
|
608
671
|
setAutoSaveStatus: x,
|
|
609
672
|
getAutoSaveStatus: k,
|
|
610
673
|
constants: _,
|
|
611
|
-
OPEN_DELAY:
|
|
612
|
-
api:
|
|
674
|
+
OPEN_DELAY: B,
|
|
675
|
+
api: E
|
|
613
676
|
})
|
|
614
|
-
}),
|
|
677
|
+
}), D = u(() => {
|
|
615
678
|
g();
|
|
616
679
|
}, {
|
|
617
680
|
metaData: {
|
|
618
681
|
id: "engine.toolbars.save.Main.saveApi"
|
|
619
682
|
},
|
|
620
683
|
ctx: () => ({
|
|
621
|
-
delayOptions:
|
|
684
|
+
delayOptions: a,
|
|
622
685
|
state: e,
|
|
623
|
-
editor:
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
686
|
+
editor: o,
|
|
687
|
+
poperVisible: t,
|
|
688
|
+
isSaved: l,
|
|
689
|
+
setSaved: n,
|
|
690
|
+
getSchema: p,
|
|
627
691
|
subscribe: d,
|
|
628
|
-
unsubscribe:
|
|
629
|
-
subscriber:
|
|
630
|
-
originSchema:
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
692
|
+
unsubscribe: i,
|
|
693
|
+
subscriber: c,
|
|
694
|
+
originSchema: s,
|
|
695
|
+
clickPopover: b,
|
|
696
|
+
close: S,
|
|
697
|
+
openApi: C,
|
|
698
|
+
saveApi: D,
|
|
699
|
+
editorOptions: m,
|
|
700
|
+
saveSetTimeout: M,
|
|
701
|
+
saveConfig: T,
|
|
702
|
+
VueMonaco: A,
|
|
703
|
+
iconUpWard: V,
|
|
704
|
+
iconDownWard: P,
|
|
705
|
+
useCanvas: v,
|
|
639
706
|
useMessage: f,
|
|
640
707
|
ToolbarBase: h,
|
|
641
708
|
openCommon: y,
|
|
642
709
|
saveCommon: g,
|
|
643
|
-
isLoading:
|
|
710
|
+
isLoading: r,
|
|
644
711
|
setAutoSaveStatus: x,
|
|
645
712
|
getAutoSaveStatus: k,
|
|
646
713
|
constants: _,
|
|
647
|
-
OPEN_DELAY:
|
|
648
|
-
api:
|
|
714
|
+
OPEN_DELAY: B,
|
|
715
|
+
api: E
|
|
649
716
|
})
|
|
650
|
-
}),
|
|
717
|
+
}), m = {
|
|
651
718
|
language: "json",
|
|
652
719
|
lineNumbers: !0,
|
|
653
720
|
minimap: {
|
|
654
721
|
enabled: !1
|
|
655
722
|
}
|
|
656
|
-
},
|
|
723
|
+
}, M = u(() => {
|
|
657
724
|
clearTimeout(e.preservationTime), e.preservationTime = setTimeout(() => {
|
|
658
|
-
|
|
725
|
+
C(), M();
|
|
659
726
|
}, e.timeValue * 60 * 1e3);
|
|
660
727
|
}, {
|
|
661
728
|
metaData: {
|
|
662
729
|
id: "engine.toolbars.save.Main.saveSetTimeout"
|
|
663
730
|
},
|
|
664
731
|
ctx: () => ({
|
|
665
|
-
delayOptions:
|
|
732
|
+
delayOptions: a,
|
|
666
733
|
state: e,
|
|
667
|
-
editor:
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
734
|
+
editor: o,
|
|
735
|
+
poperVisible: t,
|
|
736
|
+
isSaved: l,
|
|
737
|
+
setSaved: n,
|
|
738
|
+
getSchema: p,
|
|
671
739
|
subscribe: d,
|
|
672
|
-
unsubscribe:
|
|
673
|
-
subscriber:
|
|
674
|
-
originSchema:
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
740
|
+
unsubscribe: i,
|
|
741
|
+
subscriber: c,
|
|
742
|
+
originSchema: s,
|
|
743
|
+
clickPopover: b,
|
|
744
|
+
close: S,
|
|
745
|
+
openApi: C,
|
|
746
|
+
saveApi: D,
|
|
747
|
+
editorOptions: m,
|
|
748
|
+
saveSetTimeout: M,
|
|
749
|
+
saveConfig: T,
|
|
750
|
+
VueMonaco: A,
|
|
751
|
+
iconUpWard: V,
|
|
752
|
+
iconDownWard: P,
|
|
753
|
+
useCanvas: v,
|
|
683
754
|
useMessage: f,
|
|
684
755
|
ToolbarBase: h,
|
|
685
756
|
openCommon: y,
|
|
686
757
|
saveCommon: g,
|
|
687
|
-
isLoading:
|
|
758
|
+
isLoading: r,
|
|
688
759
|
setAutoSaveStatus: x,
|
|
689
760
|
getAutoSaveStatus: k,
|
|
690
761
|
constants: _,
|
|
691
|
-
OPEN_DELAY:
|
|
692
|
-
api:
|
|
762
|
+
OPEN_DELAY: B,
|
|
763
|
+
api: E
|
|
693
764
|
})
|
|
694
|
-
}),
|
|
695
|
-
x(e.checked), e.checked ?
|
|
765
|
+
}), T = u(() => {
|
|
766
|
+
x(e.checked), e.checked ? M() : clearTimeout(e.preservationTime);
|
|
696
767
|
}, {
|
|
697
768
|
metaData: {
|
|
698
769
|
id: "engine.toolbars.save.Main.saveConfig"
|
|
699
770
|
},
|
|
700
771
|
ctx: () => ({
|
|
701
|
-
delayOptions:
|
|
772
|
+
delayOptions: a,
|
|
702
773
|
state: e,
|
|
703
|
-
editor:
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
774
|
+
editor: o,
|
|
775
|
+
poperVisible: t,
|
|
776
|
+
isSaved: l,
|
|
777
|
+
setSaved: n,
|
|
778
|
+
getSchema: p,
|
|
707
779
|
subscribe: d,
|
|
708
|
-
unsubscribe:
|
|
709
|
-
subscriber:
|
|
710
|
-
originSchema:
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
780
|
+
unsubscribe: i,
|
|
781
|
+
subscriber: c,
|
|
782
|
+
originSchema: s,
|
|
783
|
+
clickPopover: b,
|
|
784
|
+
close: S,
|
|
785
|
+
openApi: C,
|
|
786
|
+
saveApi: D,
|
|
787
|
+
editorOptions: m,
|
|
788
|
+
saveSetTimeout: M,
|
|
789
|
+
saveConfig: T,
|
|
790
|
+
VueMonaco: A,
|
|
791
|
+
iconUpWard: V,
|
|
792
|
+
iconDownWard: P,
|
|
793
|
+
useCanvas: v,
|
|
719
794
|
useMessage: f,
|
|
720
795
|
ToolbarBase: h,
|
|
721
796
|
openCommon: y,
|
|
722
797
|
saveCommon: g,
|
|
723
|
-
isLoading:
|
|
798
|
+
isLoading: r,
|
|
724
799
|
setAutoSaveStatus: x,
|
|
725
800
|
getAutoSaveStatus: k,
|
|
726
801
|
constants: _,
|
|
727
|
-
OPEN_DELAY:
|
|
728
|
-
api:
|
|
802
|
+
OPEN_DELAY: B,
|
|
803
|
+
api: E
|
|
729
804
|
})
|
|
730
805
|
});
|
|
731
|
-
return
|
|
732
|
-
e.checked = k(), e.checked &&
|
|
806
|
+
return ne(u(u(() => {
|
|
807
|
+
e.checked = k(), e.checked && M();
|
|
733
808
|
}, {
|
|
734
809
|
metaData: {
|
|
735
810
|
id: "engine.toolbars.save.Main.onMounted[1]"
|
|
736
811
|
},
|
|
737
812
|
ctx: () => ({
|
|
738
|
-
delayOptions:
|
|
813
|
+
delayOptions: a,
|
|
739
814
|
state: e,
|
|
740
|
-
editor:
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
815
|
+
editor: o,
|
|
816
|
+
poperVisible: t,
|
|
817
|
+
isSaved: l,
|
|
818
|
+
setSaved: n,
|
|
819
|
+
getSchema: p,
|
|
744
820
|
subscribe: d,
|
|
745
|
-
unsubscribe:
|
|
746
|
-
subscriber:
|
|
747
|
-
originSchema:
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
821
|
+
unsubscribe: i,
|
|
822
|
+
subscriber: c,
|
|
823
|
+
originSchema: s,
|
|
824
|
+
clickPopover: b,
|
|
825
|
+
close: S,
|
|
826
|
+
openApi: C,
|
|
827
|
+
saveApi: D,
|
|
828
|
+
editorOptions: m,
|
|
829
|
+
saveSetTimeout: M,
|
|
830
|
+
saveConfig: T,
|
|
831
|
+
VueMonaco: A,
|
|
832
|
+
iconUpWard: V,
|
|
833
|
+
iconDownWard: P,
|
|
834
|
+
useCanvas: v,
|
|
756
835
|
useMessage: f,
|
|
757
836
|
ToolbarBase: h,
|
|
758
837
|
openCommon: y,
|
|
759
838
|
saveCommon: g,
|
|
760
|
-
isLoading:
|
|
839
|
+
isLoading: r,
|
|
761
840
|
setAutoSaveStatus: x,
|
|
762
841
|
getAutoSaveStatus: k,
|
|
763
842
|
constants: _,
|
|
764
|
-
OPEN_DELAY:
|
|
765
|
-
api:
|
|
843
|
+
OPEN_DELAY: B,
|
|
844
|
+
api: E
|
|
766
845
|
})
|
|
767
846
|
}), {
|
|
768
847
|
metaData: {
|
|
769
848
|
id: "engine.toolbars.save.Main.onMounted[1]"
|
|
770
849
|
},
|
|
771
850
|
ctx: () => ({
|
|
772
|
-
delayOptions:
|
|
851
|
+
delayOptions: a,
|
|
773
852
|
state: e,
|
|
774
|
-
editor:
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
853
|
+
editor: o,
|
|
854
|
+
poperVisible: t,
|
|
855
|
+
isSaved: l,
|
|
856
|
+
setSaved: n,
|
|
857
|
+
getSchema: p,
|
|
778
858
|
subscribe: d,
|
|
779
|
-
unsubscribe:
|
|
780
|
-
subscriber:
|
|
781
|
-
originSchema:
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
859
|
+
unsubscribe: i,
|
|
860
|
+
subscriber: c,
|
|
861
|
+
originSchema: s,
|
|
862
|
+
clickPopover: b,
|
|
863
|
+
close: S,
|
|
864
|
+
openApi: C,
|
|
865
|
+
saveApi: D,
|
|
866
|
+
editorOptions: m,
|
|
867
|
+
saveSetTimeout: M,
|
|
868
|
+
saveConfig: T,
|
|
869
|
+
_callEntry: u,
|
|
870
|
+
_useCompile: $,
|
|
871
|
+
_metaData: w,
|
|
872
|
+
VueMonaco: A,
|
|
873
|
+
iconUpWard: V,
|
|
874
|
+
iconDownWard: P,
|
|
875
|
+
useCanvas: v,
|
|
793
876
|
useMessage: f,
|
|
794
877
|
ToolbarBase: h,
|
|
795
878
|
openCommon: y,
|
|
796
879
|
saveCommon: g,
|
|
797
|
-
isLoading:
|
|
880
|
+
isLoading: r,
|
|
798
881
|
setAutoSaveStatus: x,
|
|
799
882
|
getAutoSaveStatus: k,
|
|
800
883
|
constants: _,
|
|
801
|
-
OPEN_DELAY:
|
|
802
|
-
api:
|
|
884
|
+
OPEN_DELAY: B,
|
|
885
|
+
api: E
|
|
803
886
|
})
|
|
804
|
-
})),
|
|
887
|
+
})), se(u(u(() => {
|
|
805
888
|
clearTimeout(e.preservationTime);
|
|
806
889
|
}, {
|
|
807
890
|
metaData: {
|
|
808
891
|
id: "engine.toolbars.save.Main.onUnmounted[1]"
|
|
809
892
|
},
|
|
810
893
|
ctx: () => ({
|
|
811
|
-
delayOptions:
|
|
894
|
+
delayOptions: a,
|
|
812
895
|
state: e,
|
|
813
|
-
editor:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
896
|
+
editor: o,
|
|
897
|
+
poperVisible: t,
|
|
898
|
+
isSaved: l,
|
|
899
|
+
setSaved: n,
|
|
900
|
+
getSchema: p,
|
|
817
901
|
subscribe: d,
|
|
818
|
-
unsubscribe:
|
|
819
|
-
subscriber:
|
|
820
|
-
originSchema:
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
902
|
+
unsubscribe: i,
|
|
903
|
+
subscriber: c,
|
|
904
|
+
originSchema: s,
|
|
905
|
+
clickPopover: b,
|
|
906
|
+
close: S,
|
|
907
|
+
openApi: C,
|
|
908
|
+
saveApi: D,
|
|
909
|
+
editorOptions: m,
|
|
910
|
+
saveSetTimeout: M,
|
|
911
|
+
saveConfig: T,
|
|
912
|
+
VueMonaco: A,
|
|
913
|
+
iconUpWard: V,
|
|
914
|
+
iconDownWard: P,
|
|
915
|
+
useCanvas: v,
|
|
829
916
|
useMessage: f,
|
|
830
917
|
ToolbarBase: h,
|
|
831
918
|
openCommon: y,
|
|
832
919
|
saveCommon: g,
|
|
833
|
-
isLoading:
|
|
920
|
+
isLoading: r,
|
|
834
921
|
setAutoSaveStatus: x,
|
|
835
922
|
getAutoSaveStatus: k,
|
|
836
923
|
constants: _,
|
|
837
|
-
OPEN_DELAY:
|
|
838
|
-
api:
|
|
924
|
+
OPEN_DELAY: B,
|
|
925
|
+
api: E
|
|
839
926
|
})
|
|
840
927
|
}), {
|
|
841
928
|
metaData: {
|
|
842
929
|
id: "engine.toolbars.save.Main.onUnmounted[1]"
|
|
843
930
|
},
|
|
844
931
|
ctx: () => ({
|
|
845
|
-
delayOptions:
|
|
932
|
+
delayOptions: a,
|
|
846
933
|
state: e,
|
|
847
|
-
editor:
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
934
|
+
editor: o,
|
|
935
|
+
poperVisible: t,
|
|
936
|
+
isSaved: l,
|
|
937
|
+
setSaved: n,
|
|
938
|
+
getSchema: p,
|
|
851
939
|
subscribe: d,
|
|
852
|
-
unsubscribe:
|
|
853
|
-
subscriber:
|
|
854
|
-
originSchema:
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
940
|
+
unsubscribe: i,
|
|
941
|
+
subscriber: c,
|
|
942
|
+
originSchema: s,
|
|
943
|
+
clickPopover: b,
|
|
944
|
+
close: S,
|
|
945
|
+
openApi: C,
|
|
946
|
+
saveApi: D,
|
|
947
|
+
editorOptions: m,
|
|
948
|
+
saveSetTimeout: M,
|
|
949
|
+
saveConfig: T,
|
|
950
|
+
_callEntry: u,
|
|
951
|
+
_useCompile: $,
|
|
952
|
+
_metaData: w,
|
|
953
|
+
VueMonaco: A,
|
|
954
|
+
iconUpWard: V,
|
|
955
|
+
iconDownWard: P,
|
|
956
|
+
useCanvas: v,
|
|
866
957
|
useMessage: f,
|
|
867
958
|
ToolbarBase: h,
|
|
868
959
|
openCommon: y,
|
|
869
960
|
saveCommon: g,
|
|
870
|
-
isLoading:
|
|
961
|
+
isLoading: r,
|
|
871
962
|
setAutoSaveStatus: x,
|
|
872
963
|
getAutoSaveStatus: k,
|
|
873
964
|
constants: _,
|
|
874
|
-
OPEN_DELAY:
|
|
875
|
-
api:
|
|
965
|
+
OPEN_DELAY: B,
|
|
966
|
+
api: E
|
|
876
967
|
})
|
|
877
968
|
})), {
|
|
878
969
|
state: e,
|
|
879
|
-
editor:
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
970
|
+
editor: o,
|
|
971
|
+
poperVisible: t,
|
|
972
|
+
editorOptions: m,
|
|
973
|
+
isLoading: r,
|
|
974
|
+
isSaved: l,
|
|
975
|
+
clickPopover: b,
|
|
976
|
+
close: S,
|
|
977
|
+
openApi: C,
|
|
978
|
+
saveApi: D,
|
|
979
|
+
delayOptions: a,
|
|
980
|
+
saveConfig: T,
|
|
981
|
+
OPEN_DELAY: B
|
|
889
982
|
};
|
|
890
983
|
}
|
|
891
|
-
},
|
|
892
|
-
const
|
|
893
|
-
for (const [t,
|
|
894
|
-
|
|
895
|
-
return
|
|
896
|
-
},
|
|
897
|
-
function
|
|
898
|
-
const d =
|
|
899
|
-
return ee(),
|
|
900
|
-
|
|
984
|
+
}, be = (a, e) => {
|
|
985
|
+
const o = a.__vccOpts || a;
|
|
986
|
+
for (const [t, l] of e)
|
|
987
|
+
o[t] = l;
|
|
988
|
+
return o;
|
|
989
|
+
}, fe = { class: "toolbar-save" }, ye = { class: "save-style" }, _e = { class: "save-time" }, ke = { class: "save-button-group" };
|
|
990
|
+
function xe(a, e, o, t, l, n) {
|
|
991
|
+
const p = I("tiny-icon-up-ward"), d = I("tiny-icon-down-ward"), i = I("tiny-checkbox"), c = I("tiny-select"), s = I("tiny-button"), b = I("tiny-popover"), S = I("vue-monaco"), C = I("tiny-dialog-box"), D = I("toolbar-base");
|
|
992
|
+
return ee(), le("div", fe, [
|
|
993
|
+
J(D, {
|
|
901
994
|
content: t.isLoading ? "保存中" : "保存",
|
|
902
|
-
icon:
|
|
903
|
-
options: { ...
|
|
995
|
+
icon: o.options.icon.default || o.options.icon,
|
|
996
|
+
options: { ...o.options, showDots: !t.isSaved() },
|
|
904
997
|
onClickApi: t.openApi
|
|
905
998
|
}, {
|
|
906
|
-
button:
|
|
907
|
-
|
|
999
|
+
button: U(() => [
|
|
1000
|
+
J(b, {
|
|
908
1001
|
"visible-arrow": !1,
|
|
909
1002
|
width: "203",
|
|
910
|
-
trigger: "
|
|
911
|
-
"open-delay": t.OPEN_DELAY.Default
|
|
1003
|
+
trigger: "manual",
|
|
1004
|
+
"open-delay": t.OPEN_DELAY.Default,
|
|
1005
|
+
modelValue: t.poperVisible,
|
|
1006
|
+
"onUpdate:modelValue": e[3] || (e[3] = (m) => t.poperVisible = m)
|
|
912
1007
|
}, {
|
|
913
|
-
reference:
|
|
914
|
-
|
|
1008
|
+
reference: U(() => [
|
|
1009
|
+
X("span", {
|
|
1010
|
+
onClick: e[0] || (e[0] = re((...m) => t.clickPopover && t.clickPopover(...m), ["stop"]))
|
|
1011
|
+
}, [
|
|
1012
|
+
t.poperVisible ? (ee(), ae(p, { key: 0 })) : (ee(), ae(d, { key: 1 }))
|
|
1013
|
+
])
|
|
915
1014
|
]),
|
|
916
|
-
default:
|
|
917
|
-
|
|
918
|
-
e[
|
|
919
|
-
|
|
1015
|
+
default: U(() => [
|
|
1016
|
+
X("div", ye, [
|
|
1017
|
+
e[8] || (e[8] = X("div", { class: "save-setting" }, "保存设置", -1)),
|
|
1018
|
+
J(i, {
|
|
920
1019
|
modelValue: t.state.checked,
|
|
921
|
-
"onUpdate:modelValue": e[
|
|
1020
|
+
"onUpdate:modelValue": e[1] || (e[1] = (m) => t.state.checked = m),
|
|
922
1021
|
name: "tiny-checkbox"
|
|
923
1022
|
}, {
|
|
924
|
-
default:
|
|
925
|
-
|
|
1023
|
+
default: U(() => [...e[5] || (e[5] = [
|
|
1024
|
+
te("自动保存", -1)
|
|
926
1025
|
])]),
|
|
927
1026
|
_: 1
|
|
928
1027
|
}, 8, ["modelValue"]),
|
|
929
|
-
|
|
930
|
-
e[
|
|
931
|
-
|
|
1028
|
+
X("div", _e, [
|
|
1029
|
+
e[6] || (e[6] = X("div", { class: "save-time-label" }, "保存间隔", -1)),
|
|
1030
|
+
J(c, {
|
|
932
1031
|
modelValue: t.state.timeValue,
|
|
933
|
-
"onUpdate:modelValue": e[
|
|
1032
|
+
"onUpdate:modelValue": e[2] || (e[2] = (m) => t.state.timeValue = m),
|
|
934
1033
|
options: t.delayOptions,
|
|
935
1034
|
disabled: !t.state.checked,
|
|
936
1035
|
autocomplete: ""
|
|
937
1036
|
}, null, 8, ["modelValue", "options", "disabled"])
|
|
938
1037
|
]),
|
|
939
|
-
|
|
940
|
-
|
|
1038
|
+
X("div", ke, [
|
|
1039
|
+
J(s, {
|
|
941
1040
|
type: "primary",
|
|
942
1041
|
onClick: t.saveConfig
|
|
943
1042
|
}, {
|
|
944
|
-
default:
|
|
945
|
-
|
|
1043
|
+
default: U(() => [...e[7] || (e[7] = [
|
|
1044
|
+
te("设置并保存", -1)
|
|
946
1045
|
])]),
|
|
947
1046
|
_: 1
|
|
948
1047
|
}, 8, ["onClick"])
|
|
@@ -950,37 +1049,37 @@ function be(o, e, a, t, s, i) {
|
|
|
950
1049
|
])
|
|
951
1050
|
]),
|
|
952
1051
|
_: 1
|
|
953
|
-
}, 8, ["open-delay"])
|
|
1052
|
+
}, 8, ["open-delay", "modelValue"])
|
|
954
1053
|
]),
|
|
955
|
-
default:
|
|
956
|
-
|
|
1054
|
+
default: U(() => [
|
|
1055
|
+
J(C, {
|
|
957
1056
|
class: "dialog-box",
|
|
958
1057
|
modal: !1,
|
|
959
1058
|
fullscreen: !0,
|
|
960
1059
|
"append-to-body": !0,
|
|
961
1060
|
visible: t.state.visible,
|
|
962
1061
|
title: "Schema 本地与线上差异",
|
|
963
|
-
"onUpdate:visible": e[
|
|
1062
|
+
"onUpdate:visible": e[4] || (e[4] = (m) => t.state.visible = m)
|
|
964
1063
|
}, {
|
|
965
|
-
footer:
|
|
966
|
-
|
|
967
|
-
default:
|
|
968
|
-
|
|
1064
|
+
footer: U(() => [
|
|
1065
|
+
J(s, { onClick: t.close }, {
|
|
1066
|
+
default: U(() => [...e[9] || (e[9] = [
|
|
1067
|
+
te("取 消", -1)
|
|
969
1068
|
])]),
|
|
970
1069
|
_: 1
|
|
971
1070
|
}, 8, ["onClick"]),
|
|
972
|
-
|
|
1071
|
+
J(s, {
|
|
973
1072
|
type: "primary",
|
|
974
1073
|
onClick: t.saveApi
|
|
975
1074
|
}, {
|
|
976
|
-
default:
|
|
977
|
-
|
|
1075
|
+
default: U(() => [...e[10] || (e[10] = [
|
|
1076
|
+
te("保 存", -1)
|
|
978
1077
|
])]),
|
|
979
1078
|
_: 1
|
|
980
1079
|
}, 8, ["onClick"])
|
|
981
1080
|
]),
|
|
982
|
-
default:
|
|
983
|
-
t.state.visible ? (ee(),
|
|
1081
|
+
default: U(() => [
|
|
1082
|
+
t.state.visible ? (ee(), ae(S, {
|
|
984
1083
|
key: 0,
|
|
985
1084
|
ref: "editor",
|
|
986
1085
|
class: "monaco-editor",
|
|
@@ -988,7 +1087,7 @@ function be(o, e, a, t, s, i) {
|
|
|
988
1087
|
options: t.editorOptions,
|
|
989
1088
|
value: t.state.code,
|
|
990
1089
|
original: t.state.originalCode
|
|
991
|
-
}, null, 8, ["options", "value", "original"])) :
|
|
1090
|
+
}, null, 8, ["options", "value", "original"])) : ce("", !0)
|
|
992
1091
|
]),
|
|
993
1092
|
_: 1
|
|
994
1093
|
}, 8, ["visible"])
|
|
@@ -997,12 +1096,12 @@ function be(o, e, a, t, s, i) {
|
|
|
997
1096
|
}, 8, ["content", "icon", "options", "onClickApi"])
|
|
998
1097
|
]);
|
|
999
1098
|
}
|
|
1000
|
-
const
|
|
1001
|
-
...
|
|
1002
|
-
entry:
|
|
1003
|
-
apis:
|
|
1099
|
+
const Ce = /* @__PURE__ */ be(ge, [["render", xe], ["__scopeId", "data-v-60edfe5e"]]), Be = {
|
|
1100
|
+
...w,
|
|
1101
|
+
entry: Ce,
|
|
1102
|
+
apis: E
|
|
1004
1103
|
};
|
|
1005
1104
|
export {
|
|
1006
|
-
|
|
1105
|
+
Be as default
|
|
1007
1106
|
};
|
|
1008
1107
|
//# sourceMappingURL=index.js.map
|