@opentiny/tiny-engine-plugin-page 2.5.0-rc.2 → 2.5.0-rc.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.js CHANGED
@@ -1,24 +1,24 @@
1
1
  import "./style.css";
2
- import { ref as K, watchEffect as Se, resolveComponent as D, createBlock as L, openBlock as S, computed as z, createElementBlock as U, createVNode as p, createElementVNode as x, withCtx as v, reactive as ee, createCommentVNode as j, resolveDynamicComponent as Xe, createTextVNode as _e, defineComponent as ze, Fragment as ie, renderList as De, normalizeClass as he, renderSlot as it, toDisplayString as ae, onMounted as ct, onUnmounted as He, provide as Le } from "vue";
3
- import { getMetaApi as R, META_SERVICE as M, usePage as Y, useBlock as ut, useModal as oe, useNotify as V, useCanvas as se, getMergeRegistry as Qe, useLayout as ne, useMessage as Ne, useHelp as gt, useBreadcrumb as dt, getOptions as Ue, HOOK_NAME as pt } from "@opentiny/tiny-engine-meta-register";
2
+ import { ref as K, watchEffect as Se, resolveComponent as h, createBlock as L, openBlock as S, computed as z, createElementBlock as U, createVNode as f, createElementVNode as G, withCtx as v, reactive as ee, createCommentVNode as j, resolveDynamicComponent as Xe, createTextVNode as _e, defineComponent as ze, Fragment as ie, renderList as De, normalizeClass as he, renderSlot as it, toDisplayString as ae, onMounted as ct, onUnmounted as He, provide as Le } from "vue";
3
+ import { getMetaApi as A, META_SERVICE as M, usePage as Y, useBlock as gt, useModal as oe, useNotify as B, useCanvas as se, getMergeRegistry as Qe, useLayout as ne, useMessage as Ie, useHelp as dt, useBreadcrumb as ut, getOptions as Ue, HOOK_NAME as pt } from "@opentiny/tiny-engine-meta-register";
4
4
  import { BlockHistoryList as ft, MetaCodeEditor as mt, ButtonGroup as Ye, SvgButton as ve, PluginSetting as Ze, LifeCycles as Pt, PluginPanel as yt } from "@opentiny/tiny-engine-common";
5
- import { isEqual as ge, extend as de } from "@opentiny/vue-renderless/common/object";
6
- import { Checkbox as _t, CollapseItem as Ee, Collapse as Ie, Button as $e, Input as et, Popover as Dt, Search as ht, Radio as St, Select as vt, FormItem as Ct, Form as bt } from "@opentiny/vue";
7
- import { constants as we } from "@opentiny/tiny-engine-utils";
8
- import { isVsCodeEnv as Ft } from "@opentiny/tiny-engine-common/js/environments";
5
+ import { isEqual as de, extend as ue } from "@opentiny/vue-renderless/common/object";
6
+ import { Checkbox as _t, CollapseItem as we, Collapse as Te, Button as $e, Input as et, Popover as Dt, Search as ht, Radio as St, Select as vt, FormItem as bt, Form as Ct } from "@opentiny/vue";
7
+ import { constants as ke } from "@opentiny/tiny-engine-utils";
8
+ import { isVsCodeEnv as Nt } from "@opentiny/tiny-engine-common/js/environments";
9
9
  import { handlePageUpdate as tt } from "@opentiny/tiny-engine-common/js/http";
10
- import { generatePage as Nt } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
- import { previewPage as Et } from "@opentiny/tiny-engine-common/js/preview";
12
- import It from "@opentiny/vue-renderless/common/deps/throttle";
13
- import { IconSearch as wt, IconFolderClosed as Tt, IconFolderOpened as Bt, iconFile as kt } from "@opentiny/vue-icon";
10
+ import { generatePage as It } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
+ import { previewPage as wt } from "@opentiny/tiny-engine-common/js/preview";
12
+ import Tt from "@opentiny/vue-renderless/common/deps/throttle";
13
+ import { IconSearch as kt, IconFolderClosed as Ft, IconFolderOpened as Et, iconFile as Ot } from "@opentiny/vue-icon";
14
14
  import { getCanvasStatus as at } from "@opentiny/tiny-engine-common/js/canvas";
15
- import { REGEXP_ROUTE as qe, REGEXP_FOLDER_NAME as Ot, REGEXP_PAGE_NAME as xt } from "@opentiny/tiny-engine-common/js/verification";
16
- const At = (t) => R(M.Http).get(`/app-center/api/pages/list/${t}`), Te = (t) => R(M.Http).get(`/app-center/api/pages/detail/${t}`), Gt = (t) => R(M.Http).get(`/app-center/api/pages/delete/${t}`), Vt = (t) => R(M.Http).post("/app-center/api/pages/create", t), nt = (t, a) => R(M.Http).post(`/app-center/api/pages/update/${t}`, a), Rt = (t) => R(M.Http).post("/app-center/api/pages/copy", t), ot = (t) => R(M.Http).get(`/app-center/api/pages/histories?page=${t}`), Mt = (t) => R(M.Http).post("/app-center/api/pageHistory/restore", t), Ht = (t) => R(M.Http).get(`/app-center/api/pages/histories/${t}`), Lt = (t, a) => R(M.Http).post(`/app-center/api/pages/update/${t}`, a), ce = {
17
- fetchPageList: At,
18
- fetchPageDetail: Te,
19
- requestDeletePage: Gt,
20
- requestCreatePage: Vt,
21
- requestCopyPage: Rt,
15
+ import { REGEXP_ROUTE as qe, REGEXP_FOLDER_NAME as xt, REGEXP_PAGE_NAME as Gt } from "@opentiny/tiny-engine-common/js/verification";
16
+ const Vt = (t) => A(M.Http).get(`/app-center/api/pages/list/${t}`), Fe = (t) => A(M.Http).get(`/app-center/api/pages/detail/${t}`), Rt = (t) => A(M.Http).get(`/app-center/api/pages/delete/${t}`), Bt = (t) => A(M.Http).post("/app-center/api/pages/create", t), nt = (t, a) => A(M.Http).post(`/app-center/api/pages/update/${t}`, a), At = (t) => A(M.Http).post("/app-center/api/pages/copy", t), ot = (t) => A(M.Http).get(`/app-center/api/pages/histories?page=${t}`), Mt = (t) => A(M.Http).post("/app-center/api/pageHistory/restore", t), Ht = (t) => A(M.Http).get(`/app-center/api/pages/histories/${t}`), Lt = (t, a) => A(M.Http).post(`/app-center/api/pages/update/${t}`, a), ce = {
17
+ fetchPageList: Vt,
18
+ fetchPageDetail: Fe,
19
+ requestDeletePage: Rt,
20
+ requestCreatePage: Bt,
21
+ requestCopyPage: At,
22
22
  fetchPageHistory: ot,
23
23
  fetchHistoryDetail: Ht,
24
24
  handleRouteHomeUpdate: nt,
@@ -36,36 +36,36 @@ const At = (t) => R(M.Http).get(`/app-center/api/pages/list/${t}`), Te = (t) =>
36
36
  },
37
37
  emits: ["restorePage"],
38
38
  setup(t, { emit: a }) {
39
- const { pageSettingState: n, getFamily: e } = Y(), { getDateFromNow: o } = ut(), { confirm: s } = oe(), r = K([]), c = (y) => {
40
- const { id: f, version: C } = R(M.GlobalService).getBaseInfo(), _ = C ? `&app=${f}&version=${C}` : "";
41
- y ? ot(y + _).then((I) => {
42
- I && (I.forEach((B) => {
43
- B.backupTitle = B.message, B.backupTime = o(new Date(B.time));
44
- }), r.value = I.reverse());
39
+ const { pageSettingState: n, getFamily: e } = Y(), { getDateFromNow: o } = gt(), { confirm: s } = oe(), r = K([]), i = (_) => {
40
+ const { id: m, version: b } = A(M.GlobalService).getBaseInfo(), D = b ? `&app=${m}&version=${b}` : "";
41
+ _ ? ot(_ + D).then((k) => {
42
+ k && (k.forEach((F) => {
43
+ F.backupTitle = F.message, F.backupTime = o(new Date(F.time));
44
+ }), r.value = k.reverse());
45
45
  }) : r.value = [];
46
46
  };
47
47
  return Se(() => {
48
- var f;
49
- const y = ((f = n.currentPageData) == null ? void 0 : f.id) || "";
50
- c(y);
48
+ var m;
49
+ const _ = ((m = n.currentPageData) == null ? void 0 : m.id) || "";
50
+ i(_);
51
51
  }), {
52
52
  list: r,
53
- previewHistory: async (y) => {
54
- if (y) {
55
- const f = {
56
- ...y,
57
- id: Number(y.page),
58
- history: y.id
53
+ previewHistory: async (_) => {
54
+ if (_) {
55
+ const m = {
56
+ ..._,
57
+ id: Number(_.page),
58
+ history: _.id
59
59
  };
60
- f.ancestors = await e(f), Et(f, !0);
60
+ m.ancestors = await e(m), wt(m, !0);
61
61
  }
62
62
  },
63
- restoreHistory: (y) => {
63
+ restoreHistory: (_) => {
64
64
  s({
65
65
  title: "提示",
66
66
  message: "您即将还原历史页面,是否继续还原?",
67
67
  exec: () => {
68
- a("restorePage", y);
68
+ a("restorePage", _);
69
69
  }
70
70
  });
71
71
  }
@@ -78,7 +78,7 @@ const At = (t) => R(M.Http).get(`/app-center/api/pages/list/${t}`), Te = (t) =>
78
78
  return n;
79
79
  };
80
80
  function qt(t, a, n, e, o, s) {
81
- const r = D("block-history-list");
81
+ const r = h("block-history-list");
82
82
  return S(), L(r, {
83
83
  history: e.list,
84
84
  onPreview: e.previewHistory,
@@ -93,44 +93,44 @@ const jt = /* @__PURE__ */ Z(Ut, [["render", qt]]), Jt = {
93
93
  setup() {
94
94
  const t = K(""), a = K(""), { pageSettingState: n } = Y(), e = z(() => n.currentPageData);
95
95
  return Se(() => {
96
- var c, g;
97
- t.value = ((c = n.currentPageData.page_content) == null ? void 0 : c.inputs) || "", a.value = ((g = n.currentPageData.page_content) == null ? void 0 : g.outputs) || "";
96
+ var i, d;
97
+ t.value = ((i = n.currentPageData.page_content) == null ? void 0 : i.inputs) || "", a.value = ((d = n.currentPageData.page_content) == null ? void 0 : d.outputs) || "";
98
98
  }), {
99
99
  inputValue: t,
100
100
  outputValue: a,
101
- saveInputValue: (c) => {
101
+ saveInputValue: (i) => {
102
102
  try {
103
- const g = JSON.parse(c.content);
104
- t.value = c.content, e.value.page_content.inputs = g;
105
- } catch (g) {
106
- V({
103
+ const d = JSON.parse(i.content);
104
+ t.value = i.content, e.value.page_content.inputs = d;
105
+ } catch (d) {
106
+ B({
107
107
  title: "输入配置保存失败(必须符合JSON格式)",
108
- message: `${(g == null ? void 0 : g.message) || g}`,
108
+ message: `${(d == null ? void 0 : d.message) || d}`,
109
109
  type: "error"
110
110
  });
111
111
  }
112
112
  },
113
- saveOutputValue: (c) => {
113
+ saveOutputValue: (i) => {
114
114
  try {
115
- const g = JSON.parse(c.content);
116
- a.value = c.content, e.value.page_content.outputs = g;
117
- } catch (g) {
118
- V({
115
+ const d = JSON.parse(i.content);
116
+ a.value = i.content, e.value.page_content.outputs = d;
117
+ } catch (d) {
118
+ B({
119
119
  title: "输出配置保存失败(必须符合JSON格式)",
120
- message: `${(g == null ? void 0 : g.message) || g}`,
120
+ message: `${(d == null ? void 0 : d.message) || d}`,
121
121
  type: "error"
122
122
  });
123
123
  }
124
124
  },
125
125
  pageSettingState: n,
126
- hasContent: (c) => Array.isArray(c) && c.length > 0 || typeof c == "object" && Object.keys(c).length > 0
126
+ hasContent: (i) => Array.isArray(i) && i.length > 0 || typeof i == "object" && Object.keys(i).length > 0
127
127
  };
128
128
  }
129
129
  }, Kt = { class: "input-or-output" };
130
130
  function Wt(t, a, n, e, o, s) {
131
- const r = D("svg-icon"), c = D("meta-code-editor"), g = D("tiny-checkbox");
131
+ const r = h("svg-icon"), i = h("meta-code-editor"), d = h("tiny-checkbox");
132
132
  return S(), U("div", Kt, [
133
- p(c, {
133
+ f(i, {
134
134
  modelValue: e.inputValue,
135
135
  title: "输入配置",
136
136
  "button-text": "输入配置",
@@ -140,15 +140,15 @@ function Wt(t, a, n, e, o, s) {
140
140
  onSave: e.saveInputValue
141
141
  }, {
142
142
  icon: v(() => [
143
- p(r, {
143
+ f(r, {
144
144
  class: "edit-btn-icon",
145
145
  name: "to-edit"
146
146
  })
147
147
  ]),
148
148
  _: 1
149
149
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
150
- a[2] || (a[2] = x("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
151
- p(c, {
150
+ a[2] || (a[2] = G("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
151
+ f(i, {
152
152
  modelValue: e.outputValue,
153
153
  title: "输出配置",
154
154
  "button-text": "输出配置",
@@ -158,25 +158,25 @@ function Wt(t, a, n, e, o, s) {
158
158
  onSave: e.saveOutputValue
159
159
  }, {
160
160
  icon: v(() => [
161
- p(r, {
161
+ f(r, {
162
162
  class: "edit-btn-icon",
163
163
  name: "to-edit"
164
164
  })
165
165
  ]),
166
166
  _: 1
167
167
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
168
- a[3] || (a[3] = x("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
169
- p(g, {
168
+ a[3] || (a[3] = G("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
169
+ f(d, {
170
170
  class: "selectHome",
171
171
  modelValue: e.pageSettingState.currentPageData.isBody,
172
- "onUpdate:modelValue": a[0] || (a[0] = (N) => e.pageSettingState.currentPageData.isBody = N)
172
+ "onUpdate:modelValue": a[0] || (a[0] = (w) => e.pageSettingState.currentPageData.isBody = w)
173
173
  }, {
174
174
  default: v(() => a[1] || (a[1] = [
175
- x("span", null, "设为根元素为Body", -1)
175
+ G("span", null, "设为根元素为Body", -1)
176
176
  ])),
177
177
  _: 1
178
178
  }, 8, ["modelValue"]),
179
- a[4] || (a[4] = x("div", { class: "input-output-div" }, "默认为div", -1))
179
+ a[4] || (a[4] = G("div", { class: "input-output-div" }, "默认为div", -1))
180
180
  ]);
181
181
  }
182
182
  const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b"]]), pe = {
@@ -187,10 +187,10 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
187
187
  align: "leftTop"
188
188
  }, {
189
189
  COMPONENT_NAME: zt
190
- } = we, Be = K(!1), ye = () => {
191
- Be.value = !0;
190
+ } = ke, Ee = K(!1), ye = () => {
191
+ Ee.value = !0;
192
192
  }, Q = () => {
193
- Be.value = !1;
193
+ Ee.value = !1;
194
194
  const {
195
195
  resetPageData: t
196
196
  } = Y();
@@ -203,8 +203,8 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
203
203
  }, Qt = {
204
204
  components: {
205
205
  TinyButton: $e,
206
- TinyCollapse: Ie,
207
- TinyCollapseItem: Ee,
206
+ TinyCollapse: Te,
207
+ TinyCollapseItem: we,
208
208
  PageInputOutput: Xt,
209
209
  LifeCycles: Pt,
210
210
  PageHistory: jt,
@@ -230,107 +230,113 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
230
230
  getDefaultPage: o,
231
231
  pageSettingState: s,
232
232
  changeTreeData: r,
233
- isCurrentDataSame: c,
234
- initCurrentPageData: g,
235
- isTemporaryPage: N,
236
- STATIC_PAGE_GROUP_ID: y
233
+ isCurrentDataSame: i,
234
+ initCurrentPageData: d,
235
+ isTemporaryPage: w,
236
+ STATIC_PAGE_GROUP_ID: _
237
237
  } = Y(), {
238
- pageState: f,
239
- initData: C
238
+ pageState: m,
239
+ initData: b
240
240
  } = se(), {
241
- confirm: _
242
- } = oe(), I = Qe(pe.type, pe.id), B = I.components.PageGeneral, A = (me = I == null ? void 0 : I.options) == null ? void 0 : me.beforeCreatePage, G = K(null), {
241
+ confirm: D
242
+ } = oe(), k = Qe(pe.type, pe.id), F = k.components.PageGeneral, V = (me = k == null ? void 0 : k.options) == null ? void 0 : me.beforeCreatePage, R = K(null), {
243
243
  PLUGIN_NAME: J,
244
- getPluginByLayout: d
245
- } = ne(), m = z(() => d(J.AppManage)), l = ee({
244
+ getPluginByLayout: u
245
+ } = ne(), P = z(() => u(J.AppManage)), l = ee({
246
246
  activeName: Object.values(je),
247
247
  title: "页面设置",
248
248
  historyMessage: ""
249
- }), u = () => {
250
- ge(s.currentPageData, s.currentPageDataCopy) ? Q() : _({
249
+ }), g = () => {
250
+ de(s.currentPageData, s.currentPageDataCopy) ? Q() : D({
251
251
  title: "提示",
252
252
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
253
253
  exec: () => {
254
254
  s.isNew || (r(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), Q();
255
255
  }
256
256
  });
257
- }, F = async () => {
257
+ }, N = async () => {
258
258
  const {
259
- page_content: T,
260
- ...w
259
+ page_content: O,
260
+ ...I
261
261
  } = o(), {
262
- page_content: k,
263
- ...i
264
- } = s.currentPageData, P = {
265
- ...w,
266
- ...i,
262
+ page_content: E,
263
+ ...c
264
+ } = s.currentPageData, p = {
265
+ ...I,
266
+ ...c,
267
267
  page_content: {
268
- ...T,
269
- ...k,
268
+ ...O,
269
+ ...E,
270
270
  fileName: s.currentPageData.name
271
271
  },
272
- app: R(M.GlobalService).getBaseInfo().id,
272
+ app: A(M.GlobalService).getBaseInfo().id,
273
273
  isPage: !0
274
274
  };
275
- P.id && (delete P.id, delete P._id), A && await A(P), n(P).then((h) => {
276
- s.updateTreeData(), s.isNew = !1, N.saved = !1, a("openNewPage", h), Q(), ne().closePlugin(), V({
275
+ p.id && (delete p.id, delete p._id), V && await V(p);
276
+ try {
277
+ const y = await n(p);
278
+ await s.updateTreeData(), s.isNew = !1, w.saved = !1, a("openNewPage", y), Q(), ne().closePlugin(), B({
277
279
  type: "success",
278
280
  message: "新建页面成功!"
279
- }), Ft && Nt(h);
280
- }).catch((h) => {
281
- V({
281
+ }), Nt && It(y);
282
+ } catch (y) {
283
+ B({
282
284
  type: "error",
283
285
  title: "新建页面失败",
284
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
286
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
285
287
  });
286
- });
287
- }, b = (T, w, k = !0) => {
288
+ }
289
+ }, C = (O, I, E = !0) => {
288
290
  var H;
289
- const i = s.currentPageDataCopy.route !== s.currentPageData.route, P = ((H = f == null ? void 0 : f.currentPage) == null ? void 0 : H.id) === T;
291
+ const c = s.currentPageDataCopy.route !== s.currentPageData.route, p = ((H = m == null ? void 0 : m.currentPage) == null ? void 0 : H.id) === O;
290
292
  return tt({
291
- id: T,
292
- params: w,
293
- routerChange: i,
294
- isCurEditPage: P,
295
- isUpdateTree: k
293
+ id: O,
294
+ params: I,
295
+ routerChange: c,
296
+ isCurEditPage: p,
297
+ isUpdateTree: E
296
298
  });
297
- }, q = (T) => {
298
- T.id = T.page, ["page", "backupTime", "backupTitle", "time"].forEach((i) => delete T[i]);
299
- const k = {
299
+ }, q = (O) => {
300
+ const I = {
301
+ ...O,
302
+ id: O.page
303
+ };
304
+ ["page", "backupTime", "backupTitle", "time"].forEach((p) => delete I[p]);
305
+ const c = {
300
306
  ...s.currentPageData,
301
- ...T,
307
+ ...I,
302
308
  message: "还原页面"
303
309
  };
304
- b(T.id, k).then((i) => {
305
- var P;
306
- ((P = f == null ? void 0 : f.currentPage) == null ? void 0 : P.id) === (i == null ? void 0 : i.id) && C(i.page_content, i);
310
+ C(I.id, c).then((p) => {
311
+ var y;
312
+ ((y = m == null ? void 0 : m.currentPage) == null ? void 0 : y.id) === (p == null ? void 0 : p.id) && b(p.page_content, p), d(p);
307
313
  });
308
- }, O = async () => {
314
+ }, x = async () => {
309
315
  const {
310
- id: T,
311
- name: w,
312
- page_content: k
313
- } = s.currentPageData, i = {
316
+ id: O,
317
+ name: I,
318
+ page_content: E
319
+ } = s.currentPageData, c = {
314
320
  ...s.currentPageData,
315
321
  page_content: {
316
- ...k,
317
- fileName: w
322
+ ...E,
323
+ fileName: I
318
324
  }
319
- }, P = await b(T, i);
320
- g(P);
321
- }, re = (T) => {
322
- if (!T)
325
+ }, p = await C(O, c);
326
+ d(p);
327
+ }, re = (O) => {
328
+ if (!O)
323
329
  return;
324
- const w = s.currentPageData.page_content;
325
- w.lifeCycles = {
326
- ...w.lifeCycles || {},
327
- ...T
330
+ const I = s.currentPageData.page_content;
331
+ I.lifeCycles = {
332
+ ...I.lifeCycles || {},
333
+ ...O
328
334
  };
329
335
  }, $ = () => {
330
- const T = s.currentPageData, w = de(!0, {}, T);
331
- s.isNew = !0, w.name = `${w.name}Copy`, w.route = `${w.route}Copy`, s.currentPageData = w, s.currentPageDataCopy = de(!0, {}, w), s.defaultPage = null;
336
+ const O = s.currentPageData, I = ue(!0, {}, O);
337
+ s.isNew = !0, I.name = `${I.name}Copy`, I.route = `${I.route}Copy`, s.currentPageData = I, s.currentPageDataCopy = ue(!0, {}, I), s.defaultPage = null;
332
338
  }, te = () => {
333
- c() ? $() : _({
339
+ i() ? $() : D({
334
340
  title: "提示",
335
341
  message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
336
342
  exec: () => {
@@ -338,86 +344,86 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
338
344
  }
339
345
  });
340
346
  }, fe = async () => {
341
- var w;
342
- const T = {
347
+ var I;
348
+ const O = {
343
349
  ...s.defaultPage,
344
350
  isDefault: !0
345
351
  };
346
- b((w = s.defaultPage) == null ? void 0 : w.id, T, !1).then((k) => {
347
- k && O();
352
+ C((I = s.defaultPage) == null ? void 0 : I.id, O, !1).then((E) => {
353
+ E && x();
348
354
  });
349
- }, Ae = () => {
350
- s.isNew ? (s.currentPageData.message = "Page auto save", F()) : _({
355
+ }, Ve = () => {
356
+ s.isNew ? (s.currentPageData.message = "Page auto save", N()) : D({
351
357
  title: "创建历史备份信息",
352
358
  message: {
353
- render: () => p(et, {
359
+ render: () => f(et, {
354
360
  placeholder: "历史备份信息",
355
361
  modelValue: l.historyMessage,
356
- "onUpdate:modelValue": (i) => l.historyMessage = i
362
+ "onUpdate:modelValue": (c) => l.historyMessage = c
357
363
  }, null)
358
364
  },
359
365
  exec: () => {
360
- var i;
361
- s.currentPageData.message = l.historyMessage.trim() || "Page auto save", (i = s.defaultPage) != null && i.id ? fe() : O(), l.historyMessage = "";
366
+ var c;
367
+ s.currentPageData.message = l.historyMessage.trim() || "Page auto save", (c = s.defaultPage) != null && c.id ? fe() : x(), l.historyMessage = "";
362
368
  }
363
369
  });
364
- }, Ge = () => {
365
- G.value.validGeneralForm().then(Ae);
366
- }, le = (T = []) => {
367
- if (!Array.isArray(T))
370
+ }, Re = () => {
371
+ R.value.validGeneralForm().then(Ve);
372
+ }, le = (O = []) => {
373
+ if (!Array.isArray(O))
368
374
  return [];
369
- const w = [];
370
- return T.forEach((k) => {
371
- var i;
372
- if (k != null && k.isPage) {
373
- w.push(k);
375
+ const I = [];
376
+ return O.forEach((E) => {
377
+ var c;
378
+ if (E != null && E.isPage) {
379
+ I.push(E);
374
380
  return;
375
381
  }
376
- !(k != null && k.isPage) && ((i = k == null ? void 0 : k.children) != null && i.length) && w.push(...le(k.children));
377
- }), w;
382
+ !(E != null && E.isPage) && ((c = E == null ? void 0 : E.children) != null && c.length) && I.push(...le(E.children));
383
+ }), I;
378
384
  };
379
385
  return {
380
- align: m,
386
+ align: P,
381
387
  PLUGIN_NAME: J,
382
388
  state: l,
383
- isShow: Be,
384
- savePageSetting: Ge,
389
+ isShow: Ee,
390
+ savePageSetting: Re,
385
391
  copyPage: te,
386
392
  pageSettingState: s,
387
- pageGeneral: B,
388
- pageGeneralRef: G,
393
+ pageGeneral: F,
394
+ pageGeneralRef: R,
389
395
  deletePage: () => {
390
- var T, w;
391
- if ((w = (T = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : T.children) != null && w.length) {
392
- V({
396
+ var O, I;
397
+ if ((I = (O = s.treeDataMapping[s.currentPageData.id]) == null ? void 0 : O.children) != null && I.length) {
398
+ B({
393
399
  type: "error",
394
400
  message: "此页面存在子页面或子文件夹,不能删除!"
395
401
  });
396
402
  return;
397
403
  }
398
- _({
404
+ D({
399
405
  title: "提示",
400
406
  message: "您是否要删除页面?",
401
407
  exec: () => {
402
- var i;
403
- const k = ((i = s.currentPageData) == null ? void 0 : i.id) || "";
404
- e(k).then(() => {
405
- s.updateTreeData().then((P) => {
406
- var ue, Me;
407
- if (((ue = f == null ? void 0 : f.currentPage) == null ? void 0 : ue.id) !== k)
408
+ var c;
409
+ const E = ((c = s.currentPageData) == null ? void 0 : c.id) || "";
410
+ e(E).then(() => {
411
+ s.updateTreeData().then((p) => {
412
+ var ge, Me;
413
+ if (((ge = m == null ? void 0 : m.currentPage) == null ? void 0 : ge.id) !== E)
408
414
  return;
409
- const h = ((Me = (P || []).find(({
410
- groupId: Fe
411
- }) => Fe === y)) == null ? void 0 : Me.data) || [], H = le(h), W = H.find((Fe) => Fe.isHome), be = H == null ? void 0 : H[0], Re = {
415
+ const y = ((Me = (p || []).find(({
416
+ groupId: Ne
417
+ }) => Ne === _)) == null ? void 0 : Me.data) || [], H = le(y), W = H.find((Ne) => Ne.isHome), Ce = H == null ? void 0 : H[0], Ae = {
412
418
  componentName: zt.Page
413
419
  };
414
- a("openNewPage", W || be || Re);
415
- }), Q(), V({
420
+ a("openNewPage", W || Ce || Ae);
421
+ }), Q(), B({
416
422
  message: "删除页面成功!",
417
423
  type: "success"
418
424
  });
419
425
  }).catch(() => {
420
- V({
426
+ B({
421
427
  message: "删除页面失败!",
422
428
  type: "error"
423
429
  });
@@ -425,7 +431,7 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
425
431
  }
426
432
  });
427
433
  },
428
- cancelPageSetting: u,
434
+ cancelPageSetting: g,
429
435
  closePageSettingPanel: Q,
430
436
  updatePageLifeCycles: re,
431
437
  restorePage: q,
@@ -434,8 +440,8 @@ const Xt = /* @__PURE__ */ Z(Jt, [["render", Wt], ["__scopeId", "data-v-c7b79c9b
434
440
  }
435
441
  }, Yt = { class: "page-setting-content" }, Zt = { class: "life-cycles-container" };
436
442
  function $t(t, a, n, e, o, s) {
437
- const r = D("tiny-button"), c = D("svg-button"), g = D("button-group"), N = D("tiny-collapse-item"), y = D("page-input-output"), f = D("life-cycles"), C = D("page-history"), _ = D("tiny-collapse"), I = D("plugin-setting");
438
- return e.isShow ? (S(), L(I, {
443
+ const r = h("tiny-button"), i = h("svg-button"), d = h("button-group"), w = h("tiny-collapse-item"), _ = h("page-input-output"), m = h("life-cycles"), b = h("page-history"), D = h("tiny-collapse"), k = h("plugin-setting");
444
+ return e.isShow ? (S(), L(k, {
439
445
  key: 0,
440
446
  "fixed-name": e.PLUGIN_NAME.AppManage,
441
447
  align: e.align,
@@ -443,9 +449,9 @@ function $t(t, a, n, e, o, s) {
443
449
  class: "page-plugin-setting"
444
450
  }, {
445
451
  header: v(() => [
446
- p(g, null, {
452
+ f(d, null, {
447
453
  default: v(() => [
448
- p(r, {
454
+ f(r, {
449
455
  type: "primary",
450
456
  onClick: e.savePageSetting
451
457
  }, {
@@ -454,20 +460,20 @@ function $t(t, a, n, e, o, s) {
454
460
  ])),
455
461
  _: 1
456
462
  }, 8, ["onClick"]),
457
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
463
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
458
464
  key: 0,
459
465
  name: "text-copy-page",
460
466
  placement: "bottom",
461
467
  tips: "复制页面",
462
468
  onClick: e.copyPage
463
469
  }, null, 8, ["onClick"])),
464
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
470
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
465
471
  key: 1,
466
472
  name: "delete",
467
473
  tips: "删除页面",
468
474
  onClick: e.deletePage
469
475
  }, null, 8, ["onClick"])),
470
- p(c, {
476
+ f(i, {
471
477
  name: "close",
472
478
  onClick: e.cancelPageSetting
473
479
  }, null, 8, ["onClick"])
@@ -476,14 +482,14 @@ function $t(t, a, n, e, o, s) {
476
482
  })
477
483
  ]),
478
484
  content: v(() => [
479
- x("div", Yt, [
480
- p(_, {
485
+ G("div", Yt, [
486
+ f(D, {
481
487
  modelValue: e.state.activeName,
482
- "onUpdate:modelValue": a[0] || (a[0] = (B) => e.state.activeName = B),
488
+ "onUpdate:modelValue": a[0] || (a[0] = (F) => e.state.activeName = F),
483
489
  class: "page-setting-collapse"
484
490
  }, {
485
491
  default: v(() => [
486
- p(N, {
492
+ f(w, {
487
493
  title: "基本设置",
488
494
  name: e.PAGE_SETTING_SESSION.general
489
495
  }, {
@@ -495,29 +501,29 @@ function $t(t, a, n, e, o, s) {
495
501
  ]),
496
502
  _: 1
497
503
  }, 8, ["name"]),
498
- e.pageSettingState.currentPageData.group !== "public" ? (S(), L(N, {
504
+ e.pageSettingState.currentPageData.group !== "public" ? (S(), L(w, {
499
505
  key: 0,
500
506
  class: "base-setting",
501
507
  title: "输入输出",
502
508
  name: e.PAGE_SETTING_SESSION.inputOutput
503
509
  }, {
504
510
  default: v(() => [
505
- p(y)
511
+ f(_)
506
512
  ]),
507
513
  _: 1
508
514
  }, 8, ["name"])) : j("", !0),
509
- e.pageSettingState.currentPageData.group !== "public" ? (S(), L(N, {
515
+ e.pageSettingState.currentPageData.group !== "public" ? (S(), L(w, {
510
516
  key: 1,
511
517
  class: "input-output",
512
518
  title: "页面生命周期配置",
513
519
  name: e.PAGE_SETTING_SESSION.lifeCycles
514
520
  }, {
515
521
  default: v(() => {
516
- var B;
522
+ var F;
517
523
  return [
518
- x("div", Zt, [
519
- p(f, {
520
- bindLifeCycles: (B = e.pageSettingState.currentPageData.page_content) == null ? void 0 : B.lifeCycles,
524
+ G("div", Zt, [
525
+ f(m, {
526
+ bindLifeCycles: (F = e.pageSettingState.currentPageData.page_content) == null ? void 0 : F.lifeCycles,
521
527
  onUpdatePageLifeCycles: e.updatePageLifeCycles
522
528
  }, null, 8, ["bindLifeCycles", "onUpdatePageLifeCycles"])
523
529
  ])
@@ -525,13 +531,13 @@ function $t(t, a, n, e, o, s) {
525
531
  }),
526
532
  _: 1
527
533
  }, 8, ["name"])) : j("", !0),
528
- p(N, {
534
+ f(w, {
529
535
  class: "history-source",
530
536
  title: "历史备份",
531
537
  name: e.PAGE_SETTING_SESSION.history
532
538
  }, {
533
539
  default: v(() => [
534
- p(C, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
540
+ f(b, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
535
541
  ]),
536
542
  _: 1
537
543
  }, 8, ["name"])
@@ -543,17 +549,17 @@ function $t(t, a, n, e, o, s) {
543
549
  _: 1
544
550
  }, 8, ["fixed-name", "align", "title"])) : j("", !0);
545
551
  }
546
- const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2"]]), ke = K(!1), Je = () => {
547
- ke.value = !0;
552
+ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-4afcc608"]]), Oe = K(!1), Je = () => {
553
+ Oe.value = !0;
548
554
  }, X = () => {
549
- ke.value = !1;
555
+ Oe.value = !1;
550
556
  const { resetPageData: t } = Y();
551
557
  t();
552
558
  }, ta = {
553
559
  components: {
554
560
  TinyButton: $e,
555
- TinyCollapse: Ie,
556
- TinyCollapseItem: Ee,
561
+ TinyCollapse: Te,
562
+ TinyCollapseItem: we,
557
563
  PluginSetting: Ze,
558
564
  SvgButton: ve,
559
565
  ButtonGroup: Ye
@@ -568,59 +574,59 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
568
574
  const t = ee({
569
575
  activeName: ["folderGeneralRef"],
570
576
  title: "文件夹设置"
571
- }), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: o, changeTreeData: s } = Y(), { confirm: r } = oe(), g = Qe(pe.type, pe.id).components.PageGeneral, N = K(null), { PLUGIN_NAME: y, getPluginByLayout: f } = ne(), C = z(() => f(y.AppManage)), _ = () => {
572
- ge(o.currentPageData, o.currentPageDataCopy) ? X() : r({
577
+ }), { requestCreatePage: a, requestUpdatePage: n, requestDeletePage: e } = ce, { pageSettingState: o, changeTreeData: s } = Y(), { confirm: r } = oe(), d = Qe(pe.type, pe.id).components.PageGeneral, w = K(null), { PLUGIN_NAME: _, getPluginByLayout: m } = ne(), b = z(() => m(_.AppManage)), D = () => {
578
+ de(o.currentPageData, o.currentPageDataCopy) ? X() : r({
573
579
  title: "提示",
574
580
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
575
581
  exec: () => {
576
582
  o.isNew || (s(o.oldParentId, o.currentPageData.parentId), Object.assign(o.currentPageData, o.currentPageDataCopy)), X();
577
583
  }
578
584
  });
579
- }, I = () => {
580
- const d = {
585
+ }, k = () => {
586
+ const u = {
581
587
  ...o.currentPageData,
582
- app: R(M.GlobalService).getBaseInfo().id,
588
+ app: A(M.GlobalService).getBaseInfo().id,
583
589
  isPage: !1
584
590
  };
585
- a(d).then(() => {
586
- o.updateTreeData(), o.isNew = !1, X(), V({
591
+ a(u).then(() => {
592
+ o.updateTreeData(), o.isNew = !1, X(), B({
587
593
  type: "success",
588
594
  message: "新建文件夹成功!"
589
595
  });
590
- }).catch((m) => {
591
- V({
596
+ }).catch((P) => {
597
+ B({
592
598
  type: "error",
593
599
  title: "新建文件夹失败",
594
- message: JSON.stringify((m == null ? void 0 : m.message) || m)
600
+ message: JSON.stringify((P == null ? void 0 : P.message) || P)
595
601
  });
596
602
  });
597
- }, B = () => {
603
+ }, F = () => {
598
604
  const { id: J } = o.currentPageData;
599
605
  n(J, { ...o.currentPageData, page_content: null }).then(() => {
600
- o.updateTreeData(), o.isNew = !1, X(), V({
606
+ o.updateTreeData(), o.isNew = !1, X(), B({
601
607
  type: "success",
602
608
  message: "更新文件夹成功!"
603
609
  });
604
- }).catch((d) => {
605
- V({
610
+ }).catch((u) => {
611
+ B({
606
612
  type: "error",
607
613
  title: "更新文件夹失败",
608
- message: JSON.stringify((d == null ? void 0 : d.message) || d)
614
+ message: JSON.stringify((u == null ? void 0 : u.message) || u)
609
615
  });
610
616
  });
611
617
  };
612
618
  return {
613
- align: C,
614
- PLUGIN_NAME: y,
619
+ align: b,
620
+ PLUGIN_NAME: _,
615
621
  saveFolderSetting: () => {
616
- N.value.validGeneralForm().then(() => {
617
- o.isNew ? I() : B();
622
+ w.value.validGeneralForm().then(() => {
623
+ o.isNew ? k() : F();
618
624
  });
619
625
  },
620
- deleteFolder: It(5e3, !0, () => {
621
- var J, d;
622
- if ((d = (J = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : J.children) != null && d.length) {
623
- V({
626
+ deleteFolder: Tt(5e3, !0, () => {
627
+ var J, u;
628
+ if ((u = (J = o.treeDataMapping[o.currentPageData.id]) == null ? void 0 : J.children) != null && u.length) {
629
+ B({
624
630
  type: "error",
625
631
  message: "此文件夹不是空文件夹,不能删除!"
626
632
  });
@@ -631,35 +637,35 @@ const ea = /* @__PURE__ */ Z(Qt, [["render", $t], ["__scopeId", "data-v-6f00bed2
631
637
  message: "您是否要删除文件夹?",
632
638
  exec: () => {
633
639
  var l;
634
- const m = ((l = o.currentPageData) == null ? void 0 : l.id) || "";
635
- e(m).then(() => {
636
- o.updateTreeData(), X(), V({
640
+ const P = ((l = o.currentPageData) == null ? void 0 : l.id) || "";
641
+ e(P).then(() => {
642
+ o.updateTreeData(), X(), B({
637
643
  type: "success",
638
644
  message: "删除文件夹成功!"
639
645
  });
640
- }).catch((u) => {
641
- V({
646
+ }).catch((g) => {
647
+ B({
642
648
  type: "success",
643
649
  title: "删除文件夹失败!",
644
- message: JSON.stringify((u == null ? void 0 : u.message) || u)
650
+ message: JSON.stringify((g == null ? void 0 : g.message) || g)
645
651
  });
646
652
  });
647
653
  }
648
654
  });
649
655
  }),
650
- pageGeneral: g,
651
- folderGeneralRef: N,
656
+ pageGeneral: d,
657
+ folderGeneralRef: w,
652
658
  closeFolderSettingPanel: X,
653
- isShow: ke,
659
+ isShow: Oe,
654
660
  state: t,
655
661
  pageSettingState: o,
656
- closeFolderSetting: _
662
+ closeFolderSetting: D
657
663
  };
658
664
  }
659
665
  }, aa = { class: "page-setting-content" };
660
666
  function na(t, a, n, e, o, s) {
661
- const r = D("tiny-button"), c = D("svg-button"), g = D("button-group"), N = D("tiny-collapse-item"), y = D("tiny-collapse"), f = D("plugin-setting");
662
- return e.isShow ? (S(), L(f, {
667
+ const r = h("tiny-button"), i = h("svg-button"), d = h("button-group"), w = h("tiny-collapse-item"), _ = h("tiny-collapse"), m = h("plugin-setting");
668
+ return e.isShow ? (S(), L(m, {
663
669
  key: 0,
664
670
  "fixed-name": e.PLUGIN_NAME.AppManage,
665
671
  align: e.align,
@@ -667,9 +673,9 @@ function na(t, a, n, e, o, s) {
667
673
  class: "pageFolder-plugin-setting"
668
674
  }, {
669
675
  header: v(() => [
670
- p(g, null, {
676
+ f(d, null, {
671
677
  default: v(() => [
672
- p(r, {
678
+ f(r, {
673
679
  type: "primary",
674
680
  onClick: e.saveFolderSetting
675
681
  }, {
@@ -678,14 +684,14 @@ function na(t, a, n, e, o, s) {
678
684
  ])),
679
685
  _: 1
680
686
  }, 8, ["onClick"]),
681
- e.pageSettingState.isNew ? j("", !0) : (S(), L(c, {
687
+ e.pageSettingState.isNew ? j("", !0) : (S(), L(i, {
682
688
  key: 0,
683
689
  name: "delete",
684
690
  placement: "bottom",
685
691
  tips: "删除",
686
692
  onClick: e.deleteFolder
687
693
  }, null, 8, ["onClick"])),
688
- p(c, {
694
+ f(i, {
689
695
  class: "close-plugin-setting-icon",
690
696
  name: "close",
691
697
  onClick: e.closeFolderSetting
@@ -695,13 +701,13 @@ function na(t, a, n, e, o, s) {
695
701
  })
696
702
  ]),
697
703
  content: v(() => [
698
- x("div", aa, [
699
- p(y, {
704
+ G("div", aa, [
705
+ f(_, {
700
706
  modelValue: e.state.activeName,
701
- "onUpdate:modelValue": a[0] || (a[0] = (C) => e.state.activeName = C)
707
+ "onUpdate:modelValue": a[0] || (a[0] = (b) => e.state.activeName = b)
702
708
  }, {
703
709
  default: v(() => [
704
- p(N, {
710
+ f(w, {
705
711
  title: "基本设置",
706
712
  name: "folderGeneralRef"
707
713
  }, {
@@ -761,7 +767,7 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
761
767
  class: "gap"
762
768
  }, [
763
769
  t.lineData[e] ? (S(), U("svg", sa, [
764
- n[0] || (n[0] = x("line", {
770
+ n[0] || (n[0] = G("line", {
765
771
  x1: "8",
766
772
  y1: "0",
767
773
  x2: "8",
@@ -774,7 +780,7 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
774
780
  ])) : j("", !0)
775
781
  ]))), 128));
776
782
  }
777
- }), ca = /* @__PURE__ */ Z(ia, [["__scopeId", "data-v-fe0c65d9"]]), ua = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], ga = ["onClick"], da = { class: "prefix-icon" }, pa = /* @__PURE__ */ ze({
783
+ }), ca = /* @__PURE__ */ Z(ia, [["__scopeId", "data-v-fe0c65d9"]]), ga = ["draggable", "onDragstart", "onDragover", "onDragenter", "onDrop"], da = ["onClick"], ua = { class: "prefix-icon" }, pa = /* @__PURE__ */ ze({
778
784
  __name: "Tree",
779
785
  props: {
780
786
  data: {
@@ -811,124 +817,124 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
811
817
  },
812
818
  emits: ["clickRow", "moveNode"],
813
819
  setup(t, { emit: a }) {
814
- const n = t, e = a, o = (l, u, F = 0) => {
815
- const { idKey: b, labelKey: q, childrenKey: O } = n, re = {
816
- id: l[b],
820
+ const n = t, e = a, o = (l, g, N = 0) => {
821
+ const { idKey: C, labelKey: q, childrenKey: x } = n, re = {
822
+ id: l[C],
817
823
  label: l[q],
818
- parentId: u,
819
- level: F,
824
+ parentId: g,
825
+ level: N,
820
826
  rawData: l
821
- }, $ = [re], te = l[O];
827
+ }, $ = [re], te = l[x];
822
828
  if (Array.isArray(te))
823
829
  for (const fe of te)
824
- $.push(...o(fe, re.id, F + 1));
830
+ $.push(...o(fe, re.id, N + 1));
825
831
  return $;
826
- }, s = z(() => o({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = z(() => s.value.reduce((l, u) => (l[u.id] = u, l), {})), c = z(() => s.value.filter((l) => l.label.toLowerCase().includes(n.filterValue.toLowerCase()))), g = (l) => {
827
- const u = r.value[l];
828
- if (!u || !u.parentId)
832
+ }, s = z(() => o({ [n.idKey]: n.rootId, [n.childrenKey]: n.data }).slice(1)), r = z(() => s.value.reduce((l, g) => (l[g.id] = g, l), {})), i = z(() => s.value.filter((l) => l.label.toLowerCase().includes(n.filterValue.toLowerCase()))), d = (l) => {
833
+ const g = r.value[l];
834
+ if (!g || !g.parentId)
829
835
  return [];
830
- const F = g(u.parentId);
831
- return F.push(u.parentId), F;
832
- }, N = z(() => {
836
+ const N = d(g.parentId);
837
+ return N.push(g.parentId), N;
838
+ }, w = z(() => {
833
839
  const l = /* @__PURE__ */ new Set();
834
- for (const u of c.value) {
835
- l.add(u.id);
836
- for (const F of g(u.id))
837
- l.add(F);
840
+ for (const g of i.value) {
841
+ l.add(g.id);
842
+ for (const N of d(g.id))
843
+ l.add(N);
838
844
  }
839
- return s.value.filter((u) => l.has(u.id));
840
- }), y = {
845
+ return s.value.filter((g) => l.has(g.id));
846
+ }), _ = {
841
847
  node: 1,
842
848
  // └
843
849
  layer: 2
844
- }, f = z(() => {
845
- const l = {}, u = N.value;
846
- for (const [F, b] of u.entries())
847
- if (l[F] = l[F] || {}, l[F][b.level - 1] = y.node, b.parentId !== n.rootId) {
848
- const q = u.findIndex((O) => O.id === b.parentId);
849
- for (let O = q + 1; O < F; O++)
850
- l[O][b.level - 1] = (l[O][b.level - 1] || 0) | y.layer;
850
+ }, m = z(() => {
851
+ const l = {}, g = w.value;
852
+ for (const [N, C] of g.entries())
853
+ if (l[N] = l[N] || {}, l[N][C.level - 1] = _.node, C.parentId !== n.rootId) {
854
+ const q = g.findIndex((x) => x.id === C.parentId);
855
+ for (let x = q + 1; x < N; x++)
856
+ l[x][C.level - 1] = (l[x][C.level - 1] || 0) | _.layer;
851
857
  }
852
858
  return l;
853
- }), C = (l) => {
859
+ }), b = (l) => {
854
860
  e("clickRow", l);
855
- }, _ = K(null), I = K(null), B = (l, u) => {
856
- n.draggable && (_.value = u);
857
- }, A = (l, u) => {
861
+ }, D = K(null), k = K(null), F = (l, g) => {
862
+ n.draggable && (D.value = g);
863
+ }, V = (l, g) => {
858
864
  if (!n.draggable)
859
865
  return;
860
- g(u.id).includes(_.value.id) ? I.value = null : (l.preventDefault(), I.value = u.id);
861
- }, G = (l, u) => {
866
+ d(g.id).includes(D.value.id) ? k.value = null : (l.preventDefault(), k.value = g.id);
867
+ }, R = (l, g) => {
862
868
  l.preventDefault();
863
- const F = _.value;
864
- if (_.value = null, !F)
869
+ const N = D.value;
870
+ if (D.value = null, !N)
865
871
  return;
866
- !g(u.id).includes(F.id) && F.id !== u.id && F.parentId !== u.id && e("moveNode", F, u);
872
+ !d(g.id).includes(N.id) && N.id !== g.id && N.parentId !== g.id && e("moveNode", N, g);
867
873
  }, J = () => {
868
- I.value = null;
869
- }, d = (l) => {
870
- n.draggable && l.target === l.currentTarget && (l.preventDefault(), I.value = n.rootId);
871
- }, m = (l) => {
872
- n.draggable && l.target === l.currentTarget && (I.value = null);
874
+ k.value = null;
875
+ }, u = (l) => {
876
+ n.draggable && l.target === l.currentTarget && (l.preventDefault(), k.value = n.rootId);
877
+ }, P = (l) => {
878
+ n.draggable && l.target === l.currentTarget && (k.value = null);
873
879
  };
874
- return (l, u) => {
875
- const F = D("svg-icon");
880
+ return (l, g) => {
881
+ const N = h("svg-icon");
876
882
  return S(), U("div", {
877
- class: he(["draggable-tree", "border-transparent", { "hover-border-color": I.value === t.rootId }]),
878
- onDragover: d,
879
- onDragenter: d,
880
- onDragleave: m,
881
- onDrop: u[0] || (u[0] = (b) => G(b, { id: t.rootId }))
883
+ class: he(["draggable-tree", "border-transparent", { "hover-border-color": k.value === t.rootId }]),
884
+ onDragover: u,
885
+ onDragenter: u,
886
+ onDragleave: P,
887
+ onDrop: g[0] || (g[0] = (C) => R(C, { id: t.rootId }))
882
888
  }, [
883
- (S(!0), U(ie, null, De(N.value, (b, q) => (S(), U("div", {
889
+ (S(!0), U(ie, null, De(w.value, (C, q) => (S(), U("div", {
884
890
  class: he([
885
891
  "row",
886
892
  "border-transparent",
887
893
  {
888
- active: String(t.active) === String(b.id),
889
- "hover-border-color": I.value === b.id
894
+ active: String(t.active) === String(C.id),
895
+ "hover-border-color": k.value === C.id
890
896
  }
891
897
  ]),
892
- key: b.id,
898
+ key: C.id,
893
899
  draggable: t.draggable ? "true" : void 0,
894
- onDragstart: (O) => B(O, b),
895
- onDragover: (O) => A(O, b),
896
- onDragenter: (O) => A(O, b),
897
- onDrop: (O) => G(O, b),
900
+ onDragstart: (x) => F(x, C),
901
+ onDragover: (x) => V(x, C),
902
+ onDragenter: (x) => V(x, C),
903
+ onDrop: (x) => R(x, C),
898
904
  onDragend: J
899
905
  }, [
900
- x("div", {
906
+ G("div", {
901
907
  class: "content",
902
- onClick: (O) => C(b)
908
+ onClick: (x) => b(C)
903
909
  }, [
904
- p(ca, {
905
- "line-data": f.value[q],
906
- level: b.level
910
+ f(ca, {
911
+ "line-data": m.value[q],
912
+ level: C.level
907
913
  }, null, 8, ["line-data", "level"]),
908
- x("div", da, [
909
- b.rawData.isPage ? (S(), L(F, {
914
+ G("div", ua, [
915
+ C.rawData.isPage ? (S(), L(N, {
910
916
  key: 0,
911
917
  name: "text-page-common"
912
- })) : (S(), L(F, {
918
+ })) : (S(), L(N, {
913
919
  key: 1,
914
920
  name: "text-page-folder-closed"
915
921
  }))
916
922
  ]),
917
- x("label", null, ae(b.label), 1)
918
- ], 8, ga),
919
- it(l.$slots, "row-suffix", { node: b }, void 0, !0)
920
- ], 42, ua))), 128))
923
+ G("label", null, ae(C.label), 1)
924
+ ], 8, da),
925
+ it(l.$slots, "row-suffix", { node: C }, void 0, !0)
926
+ ], 42, ga))), 128))
921
927
  ], 34);
922
928
  };
923
929
  }
924
930
  }), fa = /* @__PURE__ */ Z(pa, [["__scopeId", "data-v-44d73ce9"]]), {
925
931
  PAGE_STATUS: ma
926
- } = we, Pa = {
932
+ } = ke, Pa = {
927
933
  components: {
928
934
  TinySearch: ht,
929
- TinyCollapse: Ie,
930
- TinyCollapseItem: Ee,
931
- TinyIconSearch: wt(),
935
+ TinyCollapse: Te,
936
+ TinyCollapseItem: we,
937
+ TinyIconSearch: kt(),
932
938
  TinyPopover: Dt,
933
939
  DraggableTree: fa,
934
940
  SvgButton: ve
@@ -951,81 +957,81 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
951
957
  isSaved: s
952
958
  } = se(), {
953
959
  pageSettingState: r,
954
- changeTreeData: c,
955
- isCurrentDataSame: g,
956
- getPageList: N,
957
- resetPageData: y,
958
- STATIC_PAGE_GROUP_ID: f,
959
- COMMON_PAGE_GROUP_ID: C,
960
- switchPage: _
960
+ changeTreeData: i,
961
+ isCurrentDataSame: d,
962
+ getPageList: w,
963
+ resetPageData: _,
964
+ STATIC_PAGE_GROUP_ID: m,
965
+ COMMON_PAGE_GROUP_ID: b,
966
+ switchPage: D
961
967
  } = Y(), {
962
- fetchPageDetail: I,
963
- requestUpdatePage: B
964
- } = ce, A = () => R(M.GlobalService).getBaseInfo().id, G = ee({
968
+ fetchPageDetail: k,
969
+ requestUpdatePage: F
970
+ } = ce, V = () => A(M.GlobalService).getBaseInfo().id, R = ee({
965
971
  pageSearchValue: "",
966
- collapseValue: [f, C],
972
+ collapseValue: [m, b],
967
973
  currentNodeData: {
968
- id: R(M.GlobalService).getBaseInfo().pageId
974
+ id: A(M.GlobalService).getBaseInfo().pageId
969
975
  }
970
976
  }), {
971
977
  subscribe: J,
972
- unsubscribe: d
973
- } = Ne();
974
- let m = null;
978
+ unsubscribe: u
979
+ } = Ie();
980
+ let P = null;
975
981
  ct(() => {
976
- m = J({
982
+ P = J({
977
983
  topic: "locationHistoryChanged",
978
- callback: (i) => {
979
- i.pageId ? G.currentNodeData = {
980
- id: i.pageId
981
- } : o() && (G.currentNodeData = {});
984
+ callback: (c) => {
985
+ c.pageId ? R.currentNodeData = {
986
+ id: c.pageId
987
+ } : o() && (R.currentNodeData = {});
982
988
  },
983
989
  subscriber: "pageTree"
984
990
  });
985
991
  }), He(() => {
986
- m && d(m);
992
+ P && u(P);
987
993
  });
988
- const l = async (i) => await N(i);
989
- r.updateTreeData = async () => await l(A());
990
- const u = (i) => {
991
- G.currentNodeData = i, _(i.id).then(() => {
994
+ const l = async (c) => await w(c);
995
+ r.updateTreeData = async () => await l(V());
996
+ const g = (c) => {
997
+ R.currentNodeData = c, D(c.id).then(() => {
992
998
  Q(), X();
993
999
  });
994
- }, F = (i, P) => {
1000
+ }, N = (c, p) => {
995
1001
  var W;
996
1002
  const {
997
- id: h,
1003
+ id: y,
998
1004
  isPage: H
999
- } = P;
1000
- !o() && h === ((W = G == null ? void 0 : G.currentNodeData) == null ? void 0 : W.id) || !H || (s() && g() ? u(P) : n({
1005
+ } = p;
1006
+ !o() && y === ((W = R == null ? void 0 : R.currentNodeData) == null ? void 0 : W.id) || !H || (s() && d() ? g(p) : n({
1001
1007
  title: "提示",
1002
1008
  message: `${o() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
1003
1009
  exec: () => {
1004
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), u(P);
1010
+ i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), g(p);
1005
1011
  }
1006
1012
  }));
1007
- }, b = (i, P, h) => {
1013
+ }, C = (c, p, y) => {
1008
1014
  var H;
1009
- if (h && P.isPage) {
1010
- const W = ((H = P.occupier) == null ? void 0 : H.username) || "";
1015
+ if (y && p.isPage) {
1016
+ const W = ((H = p.occupier) == null ? void 0 : H.username) || "";
1011
1017
  oe().message({
1012
1018
  message: `您点击的页面被${W}锁定,暂时无法编辑,请联系解锁`
1013
1019
  });
1014
1020
  return;
1015
1021
  }
1016
- ge(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", P) : n({
1022
+ de(r.currentPageData, r.currentPageDataCopy) ? a("openSettingPanel", p) : n({
1017
1023
  title: "提示",
1018
1024
  message: `当前页面或文件夹${r.currentPageData.name}尚未保存,是否要继续切换?`,
1019
1025
  exec: () => {
1020
- c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", P);
1026
+ i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy), a("openSettingPanel", p);
1021
1027
  }
1022
1028
  });
1023
- }, q = {}, O = (i, P) => {
1024
- q[P] = i;
1025
- }, re = (i) => {
1026
- F(null, i.rawData);
1027
- }, $ = (i) => at(i.occupier).state === ma.Lock, te = (i) => {
1028
- b(null, i.rawData, $(i.rawData));
1029
+ }, q = {}, x = (c, p) => {
1030
+ q[p] = c;
1031
+ }, re = (c) => {
1032
+ N(null, c.rawData);
1033
+ }, $ = (c) => at(c.occupier).state === ma.Lock, te = (c) => {
1034
+ C(null, c.rawData, $(c.rawData));
1029
1035
  }, le = [
1030
1036
  {
1031
1037
  type: "settings",
@@ -1038,201 +1044,201 @@ const oa = /* @__PURE__ */ Z(ta, [["render", na], ["__scopeId", "data-v-21dedc52
1038
1044
  {
1039
1045
  type: "createPage",
1040
1046
  label: "新建子页面",
1041
- action: (i) => {
1042
- a("createPage", "staticPages", i.id);
1047
+ action: (c) => {
1048
+ a("createPage", "staticPages", c.id);
1043
1049
  }
1044
1050
  },
1045
1051
  {
1046
1052
  type: "createFolder",
1047
1053
  label: "新建子文件夹",
1048
- action: (i) => {
1049
- a("createFolder", i.id);
1054
+ action: (c) => {
1055
+ a("createFolder", c.id);
1050
1056
  }
1051
1057
  },
1052
1058
  {
1053
1059
  type: "settingHome",
1054
1060
  label: "设置为主页",
1055
- action: (i) => {
1056
- a("settingHome", i);
1061
+ action: (c) => {
1062
+ a("settingHome", c);
1057
1063
  }
1058
1064
  }
1059
1065
  // TODO 复制和删除的逻辑耦合在其他组件内,暂时屏蔽
1060
1066
  // { type: 'divider' },
1061
1067
  // { type: 'copy', label: '复制页面', action: copyPage },
1062
1068
  // { type: 'delete', label: '删除', class: ['danger'], action: deleteNode }
1063
- ].map((i) => ({
1064
- ...i,
1065
- action: (P) => {
1066
- var h, H, W;
1067
- (h = i.action) == null || h.call(i, P), (W = (H = q[P.id]) == null ? void 0 : H.doClose) == null || W.call(H);
1069
+ ].map((c) => ({
1070
+ ...c,
1071
+ action: (p) => {
1072
+ var y, H, W;
1073
+ (y = c.action) == null || y.call(c, p), (W = (H = q[p.id]) == null ? void 0 : H.doClose) == null || W.call(H);
1068
1074
  }
1069
- })), Ve = (i, P) => i === C ? le.slice(0, 1) : !P.rawData.isPage || P.rawData.group === "public" ? le.filter((h) => h.type !== "settingHome") : le, me = (i) => {
1070
- var ue;
1075
+ })), Be = (c, p) => c === b ? le.slice(0, 1) : !p.rawData.isPage || p.rawData.group === "public" ? le.filter((y) => y.type !== "settingHome") : le, me = (c) => {
1076
+ var ge;
1071
1077
  const {
1072
- id: P,
1073
- name: h,
1078
+ id: p,
1079
+ name: y,
1074
1080
  page_content: H
1075
- } = i, W = {
1076
- ...i,
1081
+ } = c, W = {
1082
+ ...c,
1077
1083
  page_content: {
1078
1084
  ...H,
1079
- fileName: h
1085
+ fileName: y
1080
1086
  }
1081
- }, be = ((ue = e == null ? void 0 : e.currentPage) == null ? void 0 : ue.id) === P;
1087
+ }, Ce = ((ge = e == null ? void 0 : e.currentPage) == null ? void 0 : ge.id) === p;
1082
1088
  return tt({
1083
- id: P,
1089
+ id: p,
1084
1090
  params: W,
1085
- isCurEditPage: be
1091
+ isCurEditPage: Ce
1086
1092
  });
1087
- }, T = (i) => {
1093
+ }, O = (c) => {
1088
1094
  const {
1089
- id: P
1090
- } = i;
1091
- return B(P, {
1092
- ...i,
1095
+ id: p
1096
+ } = c;
1097
+ return F(p, {
1098
+ ...c,
1093
1099
  page_content: null
1094
1100
  }).then(() => {
1095
- V({
1101
+ B({
1096
1102
  type: "success",
1097
1103
  message: "更新文件夹成功!"
1098
1104
  });
1099
- }).catch((h) => {
1100
- V({
1105
+ }).catch((y) => {
1106
+ B({
1101
1107
  type: "error",
1102
1108
  title: "更新文件夹失败",
1103
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
1109
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
1104
1110
  });
1105
1111
  }).finally(() => {
1106
1112
  r.updateTreeData(), r.isNew = !1;
1107
1113
  });
1108
- }, w = (i, P) => {
1109
- ge(r.currentPageData, r.currentPageDataCopy) ? (Q(), X(), r.currentPageData.id = i.id, c(P.id, i.parentId), y(), I(i.id).then((h) => {
1110
- h.parentId = P.id, h.isPage ? (h.isDefault = !1, me(h)) : T(h);
1111
- }).catch((h) => {
1112
- V({
1114
+ }, I = (c, p) => {
1115
+ de(r.currentPageData, r.currentPageDataCopy) ? (Q(), X(), r.currentPageData.id = c.id, i(p.id, c.parentId), _(), k(c.id).then((y) => {
1116
+ y.parentId = p.id, y.isPage ? (y.isDefault = !1, me(y)) : O(y);
1117
+ }).catch((y) => {
1118
+ B({
1113
1119
  type: "error",
1114
1120
  title: "移动页面文件/文件夹失败",
1115
- message: JSON.stringify((h == null ? void 0 : h.message) || h)
1121
+ message: JSON.stringify((y == null ? void 0 : y.message) || y)
1116
1122
  });
1117
1123
  })) : n({
1118
1124
  title: "提示",
1119
1125
  message: "更改尚未保存,是否要放弃这些更改?",
1120
1126
  exec: () => {
1121
- r.isNew || (c(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), Q();
1127
+ r.isNew || (i(r.oldParentId, r.currentPageData.parentId), Object.assign(r.currentPageData, r.currentPageDataCopy)), Q();
1122
1128
  }
1123
1129
  });
1124
1130
  };
1125
- Ne().subscribe({
1131
+ Ie().subscribe({
1126
1132
  topic: "app_id_changed",
1127
1133
  subscriber: "page_tree_app_id_changed",
1128
- callback: (i) => {
1129
- l(i);
1134
+ callback: (c) => {
1135
+ l(c);
1130
1136
  }
1131
1137
  });
1132
- const k = (i) => {
1133
- i.stopPropagation(), i.preventDefault(), a("add");
1138
+ const E = (c) => {
1139
+ c.stopPropagation(), c.preventDefault(), a("add");
1134
1140
  };
1135
1141
  return He(() => {
1136
- Ne().unsubscribe({
1142
+ Ie().unsubscribe({
1137
1143
  topic: "app_id_changed",
1138
1144
  subscriber: "page_tree_app_id_changed"
1139
1145
  });
1140
1146
  }), {
1141
- createPublicPage: k,
1142
- state: G,
1143
- switchPage: u,
1147
+ createPublicPage: E,
1148
+ state: R,
1149
+ switchPage: g,
1144
1150
  pageSettingState: r,
1145
- setPopoverRef: O,
1146
- IconFolderOpened: Bt(),
1147
- IconFolderClosed: Tt(),
1148
- getRowOperations: Ve,
1151
+ setPopoverRef: x,
1152
+ IconFolderOpened: Et(),
1153
+ IconFolderClosed: Ft(),
1154
+ getRowOperations: Be,
1149
1155
  handleClickRow: re,
1150
- handleMoveNode: w,
1156
+ handleMoveNode: I,
1151
1157
  isPageLocked: $,
1152
1158
  handleClickPageSettings: te,
1153
- STATIC_PAGE_GROUP_ID: f
1159
+ STATIC_PAGE_GROUP_ID: m
1154
1160
  };
1155
1161
  }
1156
1162
  }, ya = { class: "app-manage-search" }, _a = { class: "title" }, Da = { class: "app-manage-tree" }, ha = {
1157
1163
  class: /* @__PURE__ */ he(["actions"])
1158
1164
  }, Sa = { class: "operation-list" }, va = ["onClick"];
1159
- function Ca(t, a, n, e, o, s) {
1160
- const r = D("tiny-icon-search"), c = D("tiny-search"), g = D("svg-button"), N = D("tiny-popover"), y = D("draggable-tree"), f = D("tiny-collapse-item"), C = D("tiny-collapse");
1165
+ function ba(t, a, n, e, o, s) {
1166
+ const r = h("tiny-icon-search"), i = h("tiny-search"), d = h("svg-button"), w = h("tiny-popover"), _ = h("draggable-tree"), m = h("tiny-collapse-item"), b = h("tiny-collapse");
1161
1167
  return S(), U(ie, null, [
1162
- x("div", ya, [
1163
- p(c, {
1168
+ G("div", ya, [
1169
+ f(i, {
1164
1170
  modelValue: e.state.pageSearchValue,
1165
- "onUpdate:modelValue": a[0] || (a[0] = (_) => e.state.pageSearchValue = _),
1171
+ "onUpdate:modelValue": a[0] || (a[0] = (D) => e.state.pageSearchValue = D),
1166
1172
  clearable: "",
1167
1173
  placeholder: "搜索"
1168
1174
  }, {
1169
1175
  prefix: v(() => [
1170
- p(r)
1176
+ f(r)
1171
1177
  ]),
1172
1178
  _: 1
1173
1179
  }, 8, ["modelValue"])
1174
1180
  ]),
1175
- p(C, {
1181
+ f(b, {
1176
1182
  modelValue: e.state.collapseValue,
1177
- "onUpdate:modelValue": a[1] || (a[1] = (_) => e.state.collapseValue = _),
1183
+ "onUpdate:modelValue": a[1] || (a[1] = (D) => e.state.collapseValue = D),
1178
1184
  class: "page-manage-collapse lowcode-scrollbar"
1179
1185
  }, {
1180
1186
  default: v(() => [
1181
- (S(!0), U(ie, null, De(e.pageSettingState.pages, (_, I) => (S(), L(f, {
1182
- key: I,
1183
- name: _.groupId
1187
+ (S(!0), U(ie, null, De(e.pageSettingState.pages, (D, k) => (S(), L(m, {
1188
+ key: k,
1189
+ name: D.groupId
1184
1190
  }, {
1185
1191
  title: v(() => [
1186
- x("span", _a, ae(_.groupName), 1)
1192
+ G("span", _a, ae(D.groupName), 1)
1187
1193
  ]),
1188
1194
  default: v(() => [
1189
- x("div", Da, [
1190
- p(y, {
1191
- data: _.data,
1195
+ G("div", Da, [
1196
+ f(_, {
1197
+ data: D.data,
1192
1198
  "label-key": "name",
1193
1199
  active: e.state.currentNodeData.id,
1194
1200
  "filter-value": e.state.pageSearchValue,
1195
1201
  "root-id": e.pageSettingState.ROOT_ID,
1196
- draggable: _.groupId === e.STATIC_PAGE_GROUP_ID,
1202
+ draggable: D.groupId === e.STATIC_PAGE_GROUP_ID,
1197
1203
  onClickRow: e.handleClickRow,
1198
1204
  onMoveNode: e.handleMoveNode
1199
1205
  }, {
1200
- "row-suffix": v(({ node: B }) => [
1201
- x("div", ha, [
1202
- e.isPageLocked(B.rawData) ? (S(), L(g, {
1206
+ "row-suffix": v(({ node: F }) => [
1207
+ G("div", ha, [
1208
+ e.isPageLocked(F.rawData) ? (S(), L(d, {
1203
1209
  key: 0,
1204
1210
  name: "locked",
1205
1211
  hoverBgColor: !1
1206
1212
  })) : j("", !0),
1207
- B.rawData.isHome ? (S(), L(g, {
1213
+ F.rawData.isHome ? (S(), L(d, {
1208
1214
  key: 1,
1209
1215
  name: "home",
1210
1216
  hoverBgColor: !1
1211
1217
  })) : j("", !0),
1212
- p(N, {
1218
+ f(w, {
1213
1219
  ref_for: !0,
1214
- ref: (A) => e.setPopoverRef(A, B.id),
1220
+ ref: (V) => e.setPopoverRef(V, F.id),
1215
1221
  placement: "bottom-start",
1216
1222
  "visible-arrow": !1,
1217
1223
  "popper-class": "page-tree-row-operation-list"
1218
1224
  }, {
1219
1225
  reference: v(() => [
1220
- p(g, {
1226
+ f(d, {
1221
1227
  name: "ellipsis",
1222
1228
  class: "auto-hidden",
1223
1229
  hoverBgColor: !1
1224
1230
  })
1225
1231
  ]),
1226
1232
  default: v(() => [
1227
- x("div", Sa, [
1228
- (S(!0), U(ie, null, De(e.getRowOperations(_.groupId, B), (A, G) => (S(), U("div", {
1229
- key: G,
1230
- class: he([A.type === "divider" ? "divider" : "item"].concat(A.class || [])),
1233
+ G("div", Sa, [
1234
+ (S(!0), U(ie, null, De(e.getRowOperations(D.groupId, F), (V, R) => (S(), U("div", {
1235
+ key: R,
1236
+ class: he([V.type === "divider" ? "divider" : "item"].concat(V.class || [])),
1231
1237
  onClick: (J) => {
1232
- var d;
1233
- return (d = A.action) == null ? void 0 : d.call(A, B);
1238
+ var u;
1239
+ return (u = V.action) == null ? void 0 : u.call(V, F);
1234
1240
  }
1235
- }, ae(A.label), 11, va))), 128))
1241
+ }, ae(V.label), 11, va))), 128))
1236
1242
  ])
1237
1243
  ]),
1238
1244
  _: 2
@@ -1250,19 +1256,19 @@ function Ca(t, a, n, e, o, s) {
1250
1256
  }, 8, ["modelValue"])
1251
1257
  ], 64);
1252
1258
  }
1253
- const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad"]]), Fa = {
1259
+ const Ca = /* @__PURE__ */ Z(Pa, [["render", ba], ["__scopeId", "data-v-1e91c8ad"]]), Na = {
1254
1260
  getPageById: async (t) => {
1255
1261
  if (t)
1256
- return Te(t);
1262
+ return Fe(t);
1257
1263
  },
1258
1264
  openPageSettingPanel: ye
1259
- }, Na = {
1265
+ }, Ia = {
1260
1266
  components: {
1261
1267
  PageSetting: ea,
1262
1268
  PluginPanel: yt,
1263
1269
  SvgButton: ve,
1264
1270
  PageFolderSetting: oa,
1265
- PageTree: ba
1271
+ PageTree: Ca
1266
1272
  },
1267
1273
  props: {
1268
1274
  title: {
@@ -1285,59 +1291,59 @@ const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad
1285
1291
  pageSettingState: o,
1286
1292
  getDefaultPage: s,
1287
1293
  isTemporaryPage: r,
1288
- initCurrentPageData: c
1294
+ initCurrentPageData: i
1289
1295
  } = Y(), {
1290
- PLUGIN_NAME: g
1291
- } = ne(), N = ee({
1296
+ PLUGIN_NAME: d
1297
+ } = ne(), w = ee({
1292
1298
  emitEvent: a
1293
1299
  });
1294
- Le("panelState", N);
1295
- const y = K(null), f = o.ROOT_ID, C = gt().getDocsUrl("page"), _ = ee({
1300
+ Le("panelState", w);
1301
+ const _ = K(null), m = o.ROOT_ID, b = dt().getDocsUrl("page"), D = ee({
1296
1302
  isFolder: !1
1297
- }), I = (m, l = f) => {
1303
+ }), k = (P, l = m) => {
1298
1304
  X(), o.isNew = !0;
1299
1305
  try {
1300
- const u = s();
1301
- if (!u)
1306
+ const g = s();
1307
+ if (!g)
1302
1308
  throw new Error("Failed to get default page configuration");
1303
1309
  o.currentPageData = {
1304
1310
  ...s(),
1305
- ...u,
1311
+ ...g,
1306
1312
  parentId: l,
1307
1313
  route: "",
1308
1314
  name: "Untitled",
1309
1315
  page_content: {
1310
1316
  lifeCycles: {}
1311
1317
  },
1312
- group: m
1318
+ group: P
1313
1319
  };
1314
- } catch (u) {
1315
- throw new Error(u);
1320
+ } catch (g) {
1321
+ throw new Error(g);
1316
1322
  }
1317
- o.currentPageDataCopy = de(!0, {}, o.currentPageData), _.isFolder = !1, ye();
1318
- }, B = (m = f) => {
1323
+ o.currentPageDataCopy = ue(!0, {}, o.currentPageData), D.isFolder = !1, ye();
1324
+ }, F = (P = m) => {
1319
1325
  Q(), o.isNew = !0, o.currentPageData = {
1320
- parentId: m,
1326
+ parentId: P,
1321
1327
  route: "",
1322
1328
  name: "untitled"
1323
- }, o.currentPageDataCopy = de(!0, {}, o.currentPageData), _.isFolder = !0, Je();
1324
- }, A = (m) => {
1329
+ }, o.currentPageDataCopy = ue(!0, {}, o.currentPageData), D.isFolder = !0, Je();
1330
+ }, V = (P) => {
1325
1331
  n({
1326
1332
  title: "提示",
1327
1333
  type: "warning ",
1328
1334
  message: "是否确定要将此页面设置为主页?",
1329
1335
  exec: () => {
1330
1336
  const l = {
1331
- ...m.rawData,
1337
+ ...P.rawData,
1332
1338
  isHome: !0
1333
1339
  };
1334
- nt(m.id, l).then(() => {
1335
- o.updateTreeData(), o.isNew = !1, V({
1340
+ nt(P.id, l).then(() => {
1341
+ o.updateTreeData(), o.isNew = !1, B({
1336
1342
  message: "主页设置成功!",
1337
1343
  type: "success"
1338
1344
  });
1339
1345
  }).catch(() => {
1340
- V({
1346
+ B({
1341
1347
  message: "主页设置失败!",
1342
1348
  type: "error"
1343
1349
  });
@@ -1348,36 +1354,36 @@ const ba = /* @__PURE__ */ Z(Pa, [["render", Ca], ["__scopeId", "data-v-1e91c8ad
1348
1354
  Se(() => {
1349
1355
  r.saved && ye();
1350
1356
  });
1351
- const G = async (m) => {
1352
- _.isFolder = !m.isPage, o.isNew = !1;
1353
- const l = m.id !== o.currentPageData.id;
1354
- _.isFolder ? (l && Q(), Je()) : (l && X(), ye());
1355
- const u = await Te(m == null ? void 0 : m.id);
1356
- c(u);
1357
+ const R = async (P) => {
1358
+ D.isFolder = !P.isPage, o.isNew = !1;
1359
+ const l = P.id !== o.currentPageData.id;
1360
+ D.isFolder ? (l && Q(), Je()) : (l && X(), ye());
1361
+ const g = await Fe(P == null ? void 0 : P.id);
1362
+ i(g);
1357
1363
  };
1358
- return Le("openSettingPanel", G), {
1359
- PLUGIN_NAME: g,
1360
- state: _,
1364
+ return Le("openSettingPanel", R), {
1365
+ PLUGIN_NAME: d,
1366
+ state: D,
1361
1367
  pageState: e,
1362
- openNewPage: (m) => {
1363
- y.value.switchPage(m);
1368
+ openNewPage: (P) => {
1369
+ _.value.switchPage(P);
1364
1370
  },
1365
- pageTreeRef: y,
1371
+ pageTreeRef: _,
1366
1372
  pluginPanelClosed: () => {
1367
1373
  a("close"), Q(), X();
1368
1374
  },
1369
- openSettingPanel: G,
1370
- createNewFolder: B,
1371
- createNewPage: I,
1372
- docsUrl: C,
1373
- settingHome: A
1375
+ openSettingPanel: R,
1376
+ createNewFolder: F,
1377
+ createNewPage: k,
1378
+ docsUrl: b,
1379
+ settingHome: V
1374
1380
  };
1375
1381
  }
1376
- }, Ea = { class: "plugin-page" };
1377
- function Ia(t, a, n, e, o, s) {
1378
- const r = D("svg-button"), c = D("page-tree"), g = D("plugin-panel"), N = D("page-setting"), y = D("page-folder-setting");
1379
- return S(), U("div", Ea, [
1380
- p(g, {
1382
+ }, wa = { class: "plugin-page" };
1383
+ function Ta(t, a, n, e, o, s) {
1384
+ const r = h("svg-button"), i = h("page-tree"), d = h("plugin-panel"), w = h("page-setting"), _ = h("page-folder-setting");
1385
+ return S(), U("div", wa, [
1386
+ f(d, {
1381
1387
  title: n.title,
1382
1388
  "fixed-name": e.PLUGIN_NAME.AppManage,
1383
1389
  fixedPanels: n.fixedPanels,
@@ -1386,26 +1392,26 @@ function Ia(t, a, n, e, o, s) {
1386
1392
  isShowDocsIcon: !0
1387
1393
  }, {
1388
1394
  header: v(() => [
1389
- p(r, {
1395
+ f(r, {
1390
1396
  class: "add-folder-icon",
1391
1397
  name: "add-folder",
1392
1398
  placement: "bottom",
1393
1399
  tips: "新建文件夹",
1394
- onClick: a[0] || (a[0] = (f) => e.createNewFolder())
1400
+ onClick: a[0] || (a[0] = (m) => e.createNewFolder())
1395
1401
  }),
1396
- p(r, {
1402
+ f(r, {
1397
1403
  class: "new-page-icon",
1398
1404
  name: "new-page",
1399
1405
  placement: "bottom",
1400
1406
  tips: "新建页面",
1401
- onClick: a[1] || (a[1] = (f) => e.createNewPage("staticPages"))
1407
+ onClick: a[1] || (a[1] = (m) => e.createNewPage("staticPages"))
1402
1408
  })
1403
1409
  ]),
1404
1410
  content: v(() => [
1405
- p(c, {
1411
+ f(i, {
1406
1412
  ref: "pageTreeRef",
1407
1413
  isFolder: e.state.isFolder,
1408
- onAdd: a[2] || (a[2] = (f) => e.createNewPage("publicPages")),
1414
+ onAdd: a[2] || (a[2] = (m) => e.createNewPage("publicPages")),
1409
1415
  onOpenSettingPanel: e.openSettingPanel,
1410
1416
  onCreatePage: e.createNewPage,
1411
1417
  onCreateFolder: e.createNewFolder,
@@ -1414,16 +1420,16 @@ function Ia(t, a, n, e, o, s) {
1414
1420
  ]),
1415
1421
  _: 1
1416
1422
  }, 8, ["title", "fixed-name", "fixedPanels", "onClose", "docsUrl"]),
1417
- p(N, {
1423
+ f(w, {
1418
1424
  isFolder: e.state.isFolder,
1419
1425
  onOpenNewPage: e.openNewPage
1420
1426
  }, null, 8, ["isFolder", "onOpenNewPage"]),
1421
- p(y, {
1427
+ f(_, {
1422
1428
  isFolder: e.state.isFolder
1423
1429
  }, null, 8, ["isFolder"])
1424
1430
  ]);
1425
1431
  }
1426
- const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f"]]), { ELEMENT_TAG: Ta, COMPONENT_NAME: Ba } = we, Pe = {
1432
+ const ka = /* @__PURE__ */ Z(Ia, [["render", Ta], ["__scopeId", "data-v-7bd6cd0f"]]), { ELEMENT_TAG: Fa, COMPONENT_NAME: Ea } = ke, Pe = {
1427
1433
  app: "",
1428
1434
  name: "",
1429
1435
  route: "",
@@ -1447,7 +1453,7 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1447
1453
  parentId: "none",
1448
1454
  isBody: !1,
1449
1455
  group: "staticPages"
1450
- }, ka = K(null), E = ee({
1456
+ }, Oa = K(null), T = ee({
1451
1457
  currentPageDataCopy: {},
1452
1458
  // 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
1453
1459
  currentPageData: {},
@@ -1461,14 +1467,14 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1461
1467
  treeDataMapping: {},
1462
1468
  defaultPage: null
1463
1469
  // 当前页设置的默认页
1464
- }), Oa = ee({
1470
+ }), xa = ee({
1465
1471
  saved: !1
1466
- }), Oe = 0, st = 1, xa = (t, a) => {
1472
+ }), xe = 0, st = 1, Ga = (t, a) => {
1467
1473
  var o, s;
1468
1474
  if (!((o = t == null ? void 0 : t.pageBaseStyle) != null && o.className) || !((s = t == null ? void 0 : t.pageBaseStyle) != null && s.style))
1469
1475
  return "";
1470
- const n = (r, c) => `.${r} {
1471
- ${c.trim()}
1476
+ const n = (r, i) => `.${r} {
1477
+ ${i.trim()}
1472
1478
  }
1473
1479
  `, e = `.${t.pageBaseStyle.className}{\r
1474
1480
  ${t.pageBaseStyle.style}\r
@@ -1480,7 +1486,7 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1480
1486
  n(a.componentBaseStyle.className, a.componentBaseStyle.style)
1481
1487
  ].join(`
1482
1488
  `) : e;
1483
- }, Aa = () => {
1489
+ }, Va = () => {
1484
1490
  const t = Ue("engine.plugins.materials"), a = Ue("engine.plugins.appmanage");
1485
1491
  return !t || !a || !a.pageBaseStyle ? { ...Pe } : {
1486
1492
  ...Pe,
@@ -1490,11 +1496,11 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1490
1496
  ...Pe.page_content.props,
1491
1497
  className: a.pageBaseStyle.className
1492
1498
  },
1493
- css: xa(a, t)
1499
+ css: Ga(a, t)
1494
1500
  }
1495
1501
  };
1496
- }, Ga = () => {
1497
- const t = E.currentPageData || {}, a = E.currentPageDataCopy || {};
1502
+ }, Ra = () => {
1503
+ const t = T.currentPageData || {}, a = T.currentPageDataCopy || {};
1498
1504
  let n = !0;
1499
1505
  return Object.keys(a).some((e) => {
1500
1506
  if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
@@ -1514,53 +1520,53 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1514
1520
  a[e] !== t[e] && (n = !1);
1515
1521
  return !n;
1516
1522
  }), n;
1517
- }, Ke = (t) => t === E.ROOT_ID ? { id: E.ROOT_ID, children: E.pages[Oe].data } : E.treeDataMapping[t], Va = (t, a) => {
1523
+ }, Ke = (t) => t === T.ROOT_ID ? { id: T.ROOT_ID, children: T.pages[xe].data } : T.treeDataMapping[t], Ba = (t, a) => {
1518
1524
  var n, e;
1519
1525
  if (t && a && String(t) !== String(a)) {
1520
1526
  const o = Ke(t), s = Ke(a);
1521
1527
  if (!o || !s)
1522
1528
  return;
1523
- const r = E.currentPageData.id, c = (e = (n = s.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: g }) => g === r);
1524
- if (c > -1) {
1525
- const g = s.children.splice(c, 1)[0];
1526
- o.children || (o.children = []), o.children.unshift(g);
1529
+ const r = T.currentPageData.id, i = (e = (n = s.children) == null ? void 0 : n.findIndex) == null ? void 0 : e.call(n, ({ id: d }) => d === r);
1530
+ if (i > -1) {
1531
+ const d = s.children.splice(i, 1)[0];
1532
+ o.children || (o.children = []), o.children.unshift(d);
1527
1533
  }
1528
1534
  }
1529
- }, Ra = () => E.currentPageData.page_content || {}, Ma = (t) => {
1530
- E.currentPageData = t, E.currentPageDataCopy = de(!0, {}, t), E.oldParentId = t.parentId;
1535
+ }, Aa = () => T.currentPageData.page_content || {}, Ma = (t) => {
1536
+ T.currentPageData = t, T.currentPageDataCopy = ue(!0, {}, t), T.oldParentId = t.parentId;
1531
1537
  }, Ha = () => {
1532
- E.currentPageData = {}, E.currentPageDataCopy = {}, E.oldParentId = null, E.defaultPage = null;
1533
- }, La = () => !ge(E.currentPageData, E.currentPageDataCopy), We = (t) => {
1534
- const { ROOT_ID: a } = E, n = { [a]: { id: a, parentId: "" } };
1538
+ T.currentPageData = {}, T.currentPageDataCopy = {}, T.oldParentId = null, T.defaultPage = null;
1539
+ }, La = () => !de(T.currentPageData, T.currentPageDataCopy), We = (t) => {
1540
+ const { ROOT_ID: a } = T, n = { [a]: { id: a, parentId: "" } };
1535
1541
  return t.forEach((e) => {
1536
1542
  n[e.id] = e;
1537
1543
  }), t.forEach((e) => {
1538
1544
  const o = n[e.parentId];
1539
1545
  o && (o.children = o.children || [], o.children.push(e));
1540
1546
  }), n;
1541
- }, Ce = async (t) => {
1542
- const a = await ce.fetchPageList(t || R(M.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: Oe, data: [] }, e = { groupName: "公共页面", groupId: st, data: [] };
1547
+ }, be = async (t) => {
1548
+ const a = await ce.fetchPageList(t || A(M.GlobalService).getBaseInfo().id), n = { groupName: "静态页面", groupId: xe, data: [] }, e = { groupName: "公共页面", groupId: st, data: [] };
1543
1549
  a.forEach((r) => {
1544
- const c = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, g = r.meta ? {
1550
+ const i = r.name ? r : { ...r, name: r.folderName, group: "staticPages" }, d = r.meta ? {
1545
1551
  ...r,
1546
1552
  ...r.meta,
1547
1553
  name: r.fileName,
1548
1554
  isPage: !0,
1549
- isBody: r.meta.rootElement === Ta.Body
1550
- } : c, { children: N, ...y } = g;
1551
- g.group === "staticPages" ? n.data.push(y) : e.data.push(y);
1555
+ isBody: r.meta.rootElement === Fa.Body
1556
+ } : i, { children: w, ..._ } = d;
1557
+ d.group === "staticPages" ? n.data.push(_) : e.data.push(_);
1552
1558
  });
1553
1559
  const o = We(n.data), s = We(e.data);
1554
- return E.treeDataMapping = { ...o, ...s }, n.data = o[E.ROOT_ID].children || [], E.pages = [n, e], E.pages;
1555
- }, xe = (t) => {
1556
- if (t === E.ROOT_ID)
1560
+ return T.treeDataMapping = { ...o, ...s }, n.data = o[T.ROOT_ID].children || [], T.pages = [n, e], T.pages;
1561
+ }, Ge = (t) => {
1562
+ if (t === T.ROOT_ID)
1557
1563
  return [];
1558
- const a = E.treeDataMapping[t];
1559
- return [a].concat(xe(a.parentId));
1564
+ const a = T.treeDataMapping[t];
1565
+ return [a].concat(Ge(a.parentId));
1560
1566
  }, Ua = async (t, a) => {
1561
- if (E.pages.length === 0 && await Ce(), !E.treeDataMapping[t])
1567
+ if (T.pages.length === 0 && await be(), !T.treeDataMapping[t])
1562
1568
  return null;
1563
- const e = xe(t).slice(1).reverse(), o = a ? () => !0 : (s) => s.isPage;
1569
+ const e = Ge(t).slice(1).reverse(), o = a ? () => !0 : (s) => s.isPage;
1564
1570
  return e.filter(o).map((s) => s.id);
1565
1571
  }, rt = (t) => {
1566
1572
  if (t.every((n) => n.isPage))
@@ -1571,24 +1577,24 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1571
1577
  }))).flat();
1572
1578
  return rt(a);
1573
1579
  }, qa = async (t) => {
1574
- E.pages.length === 0 && await Ce();
1575
- const a = E.treeDataMapping[t];
1580
+ T.pages.length === 0 && await be();
1581
+ const a = T.treeDataMapping[t];
1576
1582
  return Array.isArray(a == null ? void 0 : a.children) ? rt(a.children) : [];
1577
1583
  }, ja = () => {
1578
1584
  const { pageState: t } = se();
1579
1585
  t.currentVm = null, t.hoverVm = null, t.properties = {}, t.pageSchema = null;
1580
1586
  }, lt = (t, a = !1) => {
1581
1587
  if (ja(), t !== 0 && !t) {
1582
- a ? R(M.GlobalService).updateParams({ pageId: "", previewId: "" }) : R(M.GlobalService).updatePageId(""), se().initData({ componentName: Ba.Page, props: {} }, {}), ne().layoutState.pageStatus = {
1588
+ a ? A(M.GlobalService).updateParams({ pageId: "", previewId: "" }) : A(M.GlobalService).updatePageId(""), se().initData({ componentName: Ea.Page, props: {} }, {}), ne().layoutState.pageStatus = {
1583
1589
  state: "empty",
1584
1590
  data: {}
1585
1591
  };
1586
1592
  return;
1587
1593
  }
1588
1594
  return ce.fetchPageDetail(t).then((n) => {
1589
- n.isPage && dt().setBreadcrumbPage([n.name]), a ? R(M.GlobalService).updateParams({ pageId: t, previewId: "" }) : R(M.GlobalService).updatePageId(t), ne().closePlugin(), ne().layoutState.pageStatus = at(n.occupier), se().initData(n.page_content, n);
1595
+ n.isPage && ut().setBreadcrumbPage([n.name]), a ? A(M.GlobalService).updateParams({ pageId: t, previewId: "" }) : A(M.GlobalService).updatePageId(t), ne().closePlugin(), ne().layoutState.pageStatus = at(n.occupier), se().initData(n.page_content, n);
1590
1596
  }).catch(() => {
1591
- V({
1597
+ B({
1592
1598
  type: "error",
1593
1599
  message: "切换页面失败,目标页面不存在"
1594
1600
  });
@@ -1630,15 +1636,15 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1630
1636
  var o;
1631
1637
  t.parentId !== e && !a.find((s) => s.id === t.parentId) && (t.parentId = (o = a[n - 1]) != null && o.id ? a[n - 1].id : e);
1632
1638
  }, za = async (t) => {
1633
- const { ROOT_ID: a } = E;
1639
+ const { ROOT_ID: a } = T;
1634
1640
  t.length > 0 && await Promise.all(
1635
1641
  t.map(async (n, e) => {
1636
1642
  await Wa(n), Xa(n, t, e, a);
1637
1643
  })
1638
1644
  );
1639
1645
  }, Qa = async (t) => {
1640
- E.pages.length === 0 && await Ce();
1641
- const a = xe(t.id).filter((n) => n.isPage).reverse().map((n) => ({
1646
+ T.pages.length === 0 && await be();
1647
+ const a = Ge(t.id).filter((n) => n.isPage).reverse().map((n) => ({
1642
1648
  id: n.id,
1643
1649
  page_content: n.page_content,
1644
1650
  name: n.name,
@@ -1653,23 +1659,23 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1653
1659
  }));
1654
1660
  return await za(a), Ka(a, t), a;
1655
1661
  }, Ya = () => ({
1656
- getDefaultPage: Aa,
1657
- selectedTemplateCard: ka,
1658
- pageSettingState: E,
1659
- isTemporaryPage: Oa,
1660
- isCurrentDataSame: Ga,
1661
- changeTreeData: Va,
1662
- getPageContent: Ra,
1662
+ getDefaultPage: Va,
1663
+ selectedTemplateCard: Oa,
1664
+ pageSettingState: T,
1665
+ isTemporaryPage: xa,
1666
+ isCurrentDataSame: Ra,
1667
+ changeTreeData: Ba,
1668
+ getPageContent: Aa,
1663
1669
  resetPageData: Ha,
1664
1670
  initCurrentPageData: Ma,
1665
1671
  isChangePageData: La,
1666
- getPageList: Ce,
1672
+ getPageList: be,
1667
1673
  getAncestors: Ua,
1668
1674
  switchPage: lt,
1669
1675
  switchPageWithConfirm: Ja,
1670
1676
  getFamily: Qa,
1671
1677
  getPageChildren: qa,
1672
- STATIC_PAGE_GROUP_ID: Oe,
1678
+ STATIC_PAGE_GROUP_ID: xe,
1673
1679
  COMMON_PAGE_GROUP_ID: st
1674
1680
  }), Za = {
1675
1681
  id: "engine.service.page",
@@ -1680,8 +1686,8 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1680
1686
  }
1681
1687
  }, $a = {
1682
1688
  components: {
1683
- TinyForm: bt,
1684
- TinyFormItem: Ct,
1689
+ TinyForm: Ct,
1690
+ TinyFormItem: bt,
1685
1691
  TinyInput: et,
1686
1692
  TinySelect: vt,
1687
1693
  TinyRadio: St
@@ -1706,48 +1712,48 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1706
1712
  get() {
1707
1713
  return String(t.currentPageData.parentId);
1708
1714
  },
1709
- set(d) {
1710
- t.currentPageData.parentId = d;
1715
+ set(u) {
1716
+ t.currentPageData.parentId = u;
1711
1717
  }
1712
- }), r = K(s.value), c = ee({
1718
+ }), r = K(s.value), i = ee({
1713
1719
  childPageList: [],
1714
1720
  childPageOp: [],
1715
1721
  defaultPageId: ""
1716
- }), g = async (d) => {
1717
- var m;
1722
+ }), d = async (u) => {
1723
+ var P;
1718
1724
  if (t.isNew)
1719
- c.childPageList = [], c.childPageOp = [], c.defaultPageId = "";
1725
+ i.childPageList = [], i.childPageOp = [], i.defaultPageId = "";
1720
1726
  else {
1721
- c.childPageList = await e(d);
1722
- const l = (m = c.childPageList) == null ? void 0 : m.find((u) => u.isDefault);
1723
- t.defaultPage = l || null, c.defaultPageId = l ? l.id : "", c.childPageOp = c.childPageList.map((u) => ({
1724
- value: u.id,
1725
- label: u.name,
1726
- icon: kt()
1727
+ i.childPageList = await e(u);
1728
+ const l = (P = i.childPageList) == null ? void 0 : P.find((g) => g.isDefault);
1729
+ t.defaultPage = l || null, i.defaultPageId = l ? l.id : "", i.childPageOp = i.childPageList.map((g) => ({
1730
+ value: g.id,
1731
+ label: g.name,
1732
+ icon: Ot()
1727
1733
  }));
1728
1734
  }
1729
- }, N = () => {
1730
- t.defaultPage = c.childPageList.find((d) => d.id === c.defaultPageId);
1735
+ }, w = () => {
1736
+ t.defaultPage = i.childPageList.find((u) => u.id === i.defaultPageId);
1731
1737
  };
1732
1738
  Se(() => {
1733
- var d;
1734
- r.value = t.oldParentId, g((d = t.currentPageData) == null ? void 0 : d.id);
1739
+ var u;
1740
+ r.value = t.oldParentId, d((u = t.currentPageData) == null ? void 0 : u.id);
1735
1741
  });
1736
- const y = z(() => {
1737
- let d = t.currentPageData.route || "", m = s.value;
1738
- for (; m !== o; ) {
1739
- const l = t.treeDataMapping[m];
1742
+ const _ = z(() => {
1743
+ let u = t.currentPageData.route || "", P = s.value;
1744
+ for (; P !== o; ) {
1745
+ const l = t.treeDataMapping[P];
1740
1746
  if (!l)
1741
1747
  break;
1742
- d = `${l.route}/${d}`, m = l.parentId;
1748
+ u = `${l.route}/${u}`, P = l.parentId;
1743
1749
  }
1744
- return d.startsWith("/") && (d = d.slice(1)), d;
1745
- }), f = {
1750
+ return u.startsWith("/") && (u = u.slice(1)), u;
1751
+ }), m = {
1746
1752
  name: [{
1747
1753
  required: !0,
1748
1754
  message: "请输入页面 ID"
1749
1755
  }, {
1750
- pattern: xt,
1756
+ pattern: Gt,
1751
1757
  message: "只允许包含英文字母,且为大写开头驼峰格式, 如DemoPage"
1752
1758
  }, {
1753
1759
  min: 3,
@@ -1761,12 +1767,12 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1761
1767
  pattern: qe,
1762
1768
  message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
1763
1769
  }]
1764
- }, C = {
1770
+ }, b = {
1765
1771
  name: [{
1766
1772
  required: !0,
1767
1773
  message: "请输入页面文件夹 ID"
1768
1774
  }, {
1769
- pattern: Ot,
1775
+ pattern: xt,
1770
1776
  message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
1771
1777
  }, {
1772
1778
  min: 3,
@@ -1784,58 +1790,58 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1784
1790
  required: !0,
1785
1791
  message: "必须选择页面类型"
1786
1792
  }]
1787
- }, _ = (d) => {
1793
+ }, D = (u) => {
1788
1794
  const {
1789
- id: m,
1795
+ id: P,
1790
1796
  name: l,
1791
- isPage: u,
1792
- children: F
1793
- } = d, b = {
1794
- id: String(m),
1797
+ isPage: g,
1798
+ children: N
1799
+ } = u, C = {
1800
+ id: String(P),
1795
1801
  name: l,
1796
- isPage: u
1802
+ isPage: g
1797
1803
  };
1798
- return Array.isArray(F) && (b.children = F.filter((q) => q.id !== t.currentPageData.id).map((q) => _(q))), b;
1799
- }, I = (d) => d.id === o ? null : d.isPage ? p(D("SvgIcon"), {
1804
+ return Array.isArray(N) && (C.children = N.filter((q) => q.id !== t.currentPageData.id).map((q) => D(q))), C;
1805
+ }, k = (u) => u.id === o ? null : u.isPage ? f(h("SvgIcon"), {
1800
1806
  name: "text-page-common"
1801
- }, null) : p(D("SvgIcon"), {
1807
+ }, null) : f(h("SvgIcon"), {
1802
1808
  name: "text-page-folder"
1803
- }, null), B = z(() => {
1804
- var F;
1805
- const d = ((F = t.pages[n]) == null ? void 0 : F.data) || [];
1809
+ }, null), F = z(() => {
1810
+ var N;
1811
+ const u = ((N = t.pages[n]) == null ? void 0 : N.data) || [];
1806
1812
  return {
1807
- data: _({
1813
+ data: D({
1808
1814
  children: [{
1809
1815
  name: "无",
1810
1816
  id: o
1811
- }].concat(d)
1817
+ }].concat(u)
1812
1818
  }).children,
1813
1819
  shrinkIcon: null,
1814
1820
  expandIcon: null,
1815
- renderContent: (b, {
1821
+ renderContent: (C, {
1816
1822
  node: q,
1817
- data: O
1818
- }) => p(ie, null, [I(O), p("div", null, [q.label])])
1823
+ data: x
1824
+ }) => f(ie, null, [k(x), f("div", null, [q.label])])
1819
1825
  };
1820
- }), A = K(null);
1826
+ }), V = K(null);
1821
1827
  return {
1822
- pageRules: f,
1823
- folderRules: C,
1828
+ pageRules: m,
1829
+ folderRules: b,
1824
1830
  pageSettingState: t,
1825
1831
  pageParentId: s,
1826
- generalForm: A,
1827
- validGeneralForm: () => new Promise((d, m) => {
1828
- A.value.validate((l) => {
1829
- l ? d(l) : m(l);
1832
+ generalForm: V,
1833
+ validGeneralForm: () => new Promise((u, P) => {
1834
+ V.value.validate((l) => {
1835
+ l ? u(l) : P(l);
1830
1836
  });
1831
1837
  }),
1832
- treeFolderOp: B,
1833
- currentRoute: y,
1834
- changeParentForderId: (d) => {
1835
- a(d.id, r.value), r.value = d.id;
1838
+ treeFolderOp: F,
1839
+ currentRoute: _,
1840
+ changeParentForderId: (u) => {
1841
+ a(u.id, r.value), r.value = u.id;
1836
1842
  },
1837
- state: c,
1838
- changeDefaultPage: N
1843
+ state: i,
1844
+ changeDefaultPage: w
1839
1845
  };
1840
1846
  }
1841
1847
  }, en = { class: "general-config" }, tn = { class: "tip" }, an = {
@@ -1849,9 +1855,9 @@ const wa = /* @__PURE__ */ Z(Na, [["render", Ia], ["__scopeId", "data-v-7bd6cd0f
1849
1855
  class: "tip"
1850
1856
  }, rn = { class: "tip-text-dim" }, ln = { class: "tip-text-dim" };
1851
1857
  function cn(t, a, n, e, o, s) {
1852
- const r = D("tiny-radio"), c = D("tiny-form-item"), g = D("tiny-input"), N = D("tiny-select"), y = D("tiny-form");
1858
+ const r = h("tiny-radio"), i = h("tiny-form-item"), d = h("tiny-input"), w = h("tiny-select"), _ = h("tiny-form");
1853
1859
  return S(), U("div", en, [
1854
- p(y, {
1860
+ f(_, {
1855
1861
  ref: "generalForm",
1856
1862
  model: e.pageSettingState.currentPageData,
1857
1863
  rules: n.isFolder ? e.folderRules : e.pageRules,
@@ -1863,18 +1869,18 @@ function cn(t, a, n, e, o, s) {
1863
1869
  class: "general-config-form"
1864
1870
  }, {
1865
1871
  default: v(() => {
1866
- var f;
1872
+ var m;
1867
1873
  return [
1868
- n.isFolder ? j("", !0) : (S(), L(c, {
1874
+ n.isFolder ? j("", !0) : (S(), L(i, {
1869
1875
  key: 0,
1870
1876
  prop: "group",
1871
1877
  label: "页面类型",
1872
1878
  class: "form-item-page-type"
1873
1879
  }, {
1874
1880
  default: v(() => [
1875
- p(r, {
1881
+ f(r, {
1876
1882
  modelValue: e.pageSettingState.currentPageData.group,
1877
- "onUpdate:modelValue": a[0] || (a[0] = (C) => e.pageSettingState.currentPageData.group = C),
1883
+ "onUpdate:modelValue": a[0] || (a[0] = (b) => e.pageSettingState.currentPageData.group = b),
1878
1884
  class: "page-type-radio",
1879
1885
  label: "staticPages"
1880
1886
  }, {
@@ -1883,9 +1889,9 @@ function cn(t, a, n, e, o, s) {
1883
1889
  ])),
1884
1890
  _: 1
1885
1891
  }, 8, ["modelValue"]),
1886
- p(r, {
1892
+ f(r, {
1887
1893
  modelValue: e.pageSettingState.currentPageData.group,
1888
- "onUpdate:modelValue": a[1] || (a[1] = (C) => e.pageSettingState.currentPageData.group = C),
1894
+ "onUpdate:modelValue": a[1] || (a[1] = (b) => e.pageSettingState.currentPageData.group = b),
1889
1895
  class: "page-type-radio",
1890
1896
  label: "publicPages"
1891
1897
  }, {
@@ -1897,28 +1903,28 @@ function cn(t, a, n, e, o, s) {
1897
1903
  ]),
1898
1904
  _: 1
1899
1905
  })),
1900
- p(c, {
1906
+ f(i, {
1901
1907
  prop: "name",
1902
1908
  label: `${n.isFolder ? "文件夹" : "页面"}名称`
1903
1909
  }, {
1904
1910
  default: v(() => [
1905
- p(g, {
1911
+ f(d, {
1906
1912
  modelValue: e.pageSettingState.currentPageData.name,
1907
- "onUpdate:modelValue": a[2] || (a[2] = (C) => e.pageSettingState.currentPageData.name = C),
1913
+ "onUpdate:modelValue": a[2] || (a[2] = (b) => e.pageSettingState.currentPageData.name = b),
1908
1914
  placeholder: `请设置${n.isFolder ? "文件夹" : "页面"}名称`
1909
1915
  }, null, 8, ["modelValue", "placeholder"])
1910
1916
  ]),
1911
1917
  _: 1
1912
1918
  }, 8, ["label"]),
1913
- e.pageSettingState.currentPageData.group !== "publicPages" ? (S(), L(c, {
1919
+ e.pageSettingState.currentPageData.group !== "publicPages" ? (S(), L(i, {
1914
1920
  key: 1,
1915
1921
  label: "父文件夹/父页面",
1916
1922
  prop: "parentId"
1917
1923
  }, {
1918
1924
  default: v(() => [
1919
- p(N, {
1925
+ f(w, {
1920
1926
  modelValue: e.pageParentId,
1921
- "onUpdate:modelValue": a[3] || (a[3] = (C) => e.pageParentId = C),
1927
+ "onUpdate:modelValue": a[3] || (a[3] = (b) => e.pageParentId = b),
1922
1928
  "value-field": "id",
1923
1929
  "render-type": "tree",
1924
1930
  "tree-op": e.treeFolderOp,
@@ -1930,45 +1936,45 @@ function cn(t, a, n, e, o, s) {
1930
1936
  ]),
1931
1937
  _: 1
1932
1938
  })) : j("", !0),
1933
- p(c, {
1939
+ f(i, {
1934
1940
  label: "页面路由",
1935
1941
  prop: "route"
1936
1942
  }, {
1937
1943
  default: v(() => [
1938
- p(g, {
1944
+ f(d, {
1939
1945
  modelValue: e.pageSettingState.currentPageData.route,
1940
- "onUpdate:modelValue": a[4] || (a[4] = (C) => e.pageSettingState.currentPageData.route = C),
1946
+ "onUpdate:modelValue": a[4] || (a[4] = (b) => e.pageSettingState.currentPageData.route = b),
1941
1947
  placeholder: "请设置路由"
1942
1948
  }, null, 8, ["modelValue"]),
1943
- x("div", tn, [
1949
+ G("div", tn, [
1944
1950
  e.pageSettingState.currentPageData.route ? (S(), U("span", nn, [
1945
- a[8] || (a[8] = x("span", { class: "tip-text" }, "website.com/", -1)),
1946
- x("span", on, ae(e.currentRoute), 1)
1951
+ a[8] || (a[8] = G("span", { class: "tip-text" }, "website.com/", -1)),
1952
+ G("span", on, ae(e.currentRoute), 1)
1947
1953
  ])) : (S(), U("span", an, "路由将以website.com开头"))
1948
1954
  ])
1949
1955
  ]),
1950
1956
  _: 1
1951
1957
  }),
1952
- e.pageSettingState.currentPageData.group !== "publicPages" && !n.isFolder && ((f = e.state.childPageOp) != null && f.length) ? (S(), L(c, {
1958
+ e.pageSettingState.currentPageData.group !== "publicPages" && !n.isFolder && ((m = e.state.childPageOp) != null && m.length) ? (S(), L(i, {
1953
1959
  key: 2,
1954
1960
  label: "设置默认跳转页",
1955
1961
  prop: "isDefault"
1956
1962
  }, {
1957
1963
  default: v(() => {
1958
- var C, _;
1964
+ var b, D;
1959
1965
  return [
1960
- p(N, {
1966
+ f(w, {
1961
1967
  modelValue: e.state.defaultPageId,
1962
- "onUpdate:modelValue": a[5] || (a[5] = (I) => e.state.defaultPageId = I),
1968
+ "onUpdate:modelValue": a[5] || (a[5] = (k) => e.state.defaultPageId = k),
1963
1969
  options: e.state.childPageOp,
1964
1970
  placeholder: "请选择默认跳转页",
1965
1971
  onChange: e.changeDefaultPage
1966
1972
  }, null, 8, ["modelValue", "options", "onChange"]),
1967
1973
  e.state.defaultPageId ? (S(), U("div", sn, [
1968
- a[9] || (a[9] = x("div", { class: "tip-text" }, "访问", -1)),
1969
- x("span", rn, "/" + ae(e.currentRoute), 1),
1970
- a[10] || (a[10] = x("div", { class: "tip-text" }, "路由,默认跳转", -1)),
1971
- x("span", ln, "/" + ae(e.currentRoute) + "/" + ae((_ = (C = e.pageSettingState) == null ? void 0 : C.defaultPage) == null ? void 0 : _.route), 1)
1974
+ a[9] || (a[9] = G("div", { class: "tip-text" }, "访问", -1)),
1975
+ G("span", rn, "/" + ae(e.currentRoute), 1),
1976
+ a[10] || (a[10] = G("div", { class: "tip-text" }, "路由,默认跳转", -1)),
1977
+ G("span", ln, "/" + ae(e.currentRoute) + "/" + ae((D = (b = e.pageSettingState) == null ? void 0 : b.defaultPage) == null ? void 0 : D.route), 1)
1972
1978
  ])) : j("", !0)
1973
1979
  ];
1974
1980
  }),
@@ -1980,10 +1986,10 @@ function cn(t, a, n, e, o, s) {
1980
1986
  }, 8, ["model", "rules"])
1981
1987
  ]);
1982
1988
  }
1983
- const un = /* @__PURE__ */ Z($a, [["render", cn], ["__scopeId", "data-v-875f317e"]]), Nn = {
1989
+ const gn = /* @__PURE__ */ Z($a, [["render", cn], ["__scopeId", "data-v-875f317e"]]), In = {
1984
1990
  ...pe,
1985
- apis: Fa,
1986
- entry: wa,
1991
+ apis: Na,
1992
+ entry: ka,
1987
1993
  options: {
1988
1994
  pageBaseStyle: {
1989
1995
  className: "page-base-style",
@@ -1991,11 +1997,11 @@ const un = /* @__PURE__ */ Z($a, [["render", cn], ["__scopeId", "data-v-875f317e
1991
1997
  }
1992
1998
  },
1993
1999
  components: {
1994
- PageGeneral: un
2000
+ PageGeneral: gn
1995
2001
  },
1996
2002
  metas: [Za]
1997
2003
  };
1998
2004
  export {
1999
2005
  Za as PageService,
2000
- Nn as default
2006
+ In as default
2001
2007
  };