@opentiny/tiny-engine-plugin-page 2.1.0-rc.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,37 +1,37 @@
1
1
  import "./style.css";
2
- import { ref as G, watchEffect as ee, resolveComponent as p, openBlock as I, createBlock as E, computed as ge, createElementBlock as q, createVNode as g, withCtx as h, pushScopeId as Se, popScopeId as he, createElementVNode as w, reactive as X, createTextVNode as Y, createCommentVNode as A, resolveDynamicComponent as He, onUnmounted as We, nextTick as ze, Fragment as ye, renderList as Qe, toDisplayString as De, provide as Ye, inject as Ze } from "vue";
3
- import { getMetaApi as V, META_SERVICE as x, usePage as M, useBlock as $e, useModal as z, getMergeMeta as Oe, useNotify as O, useCanvas as Ce, getMergeRegistry as Ae, useLayout as le, useBreadcrumb as et, useMessage as Ee, useHelp as tt, getOptions as Ve, HOOK_NAME as at } from "@opentiny/tiny-engine-meta-register";
4
- import { BlockHistoryList as nt, MetaCodeEditor as ot, LifeCycles as st, PluginSetting as Me, SvgButton as be, ButtonGroup as Ue, PluginPanel as rt } from "@opentiny/tiny-engine-common";
2
+ import { ref as G, watchEffect as ee, resolveComponent as p, openBlock as I, createBlock as E, computed as ge, createElementBlock as q, createVNode as g, withCtx as D, createElementVNode as w, reactive as X, createTextVNode as Y, createCommentVNode as A, resolveDynamicComponent as Ge, onUnmounted as Je, nextTick as Ke, Fragment as _e, renderList as Xe, toDisplayString as ye, provide as We, inject as ze } from "vue";
3
+ import { getMetaApi as V, META_SERVICE as x, usePage as M, useBlock as Qe, useModal as z, getMergeMeta as Fe, useNotify as O, useCanvas as Se, getMergeRegistry as Re, useLayout as ce, useBreadcrumb as Ye, useMessage as we, useHelp as Ze, getOptions as ke, HOOK_NAME as $e } from "@opentiny/tiny-engine-meta-register";
4
+ import { BlockHistoryList as et, MetaCodeEditor as tt, LifeCycles as at, PluginSetting as Be, SvgButton as De, ButtonGroup as He, PluginPanel as nt } from "@opentiny/tiny-engine-common";
5
5
  import { isEqual as pe, extend as Z } from "@opentiny/vue-renderless/common/object";
6
- import { Checkbox as Le, Button as je, Collapse as ve, CollapseItem as Ne, Input as qe, Search as ct, Tree as lt, Form as it, FormItem as gt, Select as pt, Radio as ut } from "@opentiny/vue";
7
- import { constants as Je } from "@opentiny/tiny-engine-utils";
8
- import { isVsCodeEnv as Ke } from "@opentiny/tiny-engine-common/js/environments";
9
- import { handlePageUpdate as dt } from "@opentiny/tiny-engine-common/js/http";
10
- import { generatePage as mt, generateRouter as _t } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
- import { previewPage as Pt } from "@opentiny/tiny-engine-common/js/preview";
12
- import ft from "@opentiny/vue-renderless/common/deps/throttle";
13
- import { IconSearch as yt, IconFolderOpened as St, IconFolderClosed as ht } from "@opentiny/vue-icon";
14
- import { getCanvasStatus as xe } from "@opentiny/tiny-engine-common/js/canvas";
15
- import { REGEXP_PAGE_NAME as Dt, REGEXP_ROUTE as Ge, REGEXP_FOLDER_NAME as Ct } from "@opentiny/tiny-engine-common/js/verification";
16
- const bt = (t) => V(x.Http).get(`/app-center/api/pages/list/${t}`), Ie = (t) => V(x.Http).get(`/app-center/api/pages/detail/${t}`), vt = (t) => V(x.Http).get(`/app-center/api/pages/delete/${t}`), Nt = (t) => V(x.Http).post("/app-center/api/pages/create", t), It = (t, a) => V(x.Http).post(`/app-center/api/pages/update/${t}`, a), Tt = (t) => V(x.Http).post("/app-center/api/pages/copy", t), Xe = (t) => V(x.Http).get(`/app-center/api/pages/histories?page=${t}`), Ft = (t) => V(x.Http).post("/app-center/api/pageHistory/restore", t), wt = (t) => V(x.Http).get(`/app-center/api/pages/histories/${t}`), kt = (t, a) => V(x.Http).post(`/app-center/api/pages/update/${t}`, a), ue = {
17
- fetchPageList: bt,
18
- fetchPageDetail: Ie,
19
- requestDeletePage: vt,
20
- requestCreatePage: Nt,
21
- requestCopyPage: Tt,
22
- fetchPageHistory: Xe,
23
- fetchHistoryDetail: wt,
24
- handleRouteHomeUpdate: It,
25
- requestRestorePageHistory: Ft,
26
- requestUpdatePage: kt
27
- }, J = (t, a) => {
28
- const i = t.__vccOpts || t;
29
- for (const [e, r] of a)
6
+ import { Checkbox as Ae, Button as Me, Collapse as he, CollapseItem as Ce, Input as Ue, Search as ot, Tree as st, Form as rt, FormItem as lt, Select as ct, Radio as it } from "@opentiny/vue";
7
+ import { constants as Le } from "@opentiny/tiny-engine-utils";
8
+ import { isVsCodeEnv as je } from "@opentiny/tiny-engine-common/js/environments";
9
+ import { handlePageUpdate as gt } from "@opentiny/tiny-engine-common/js/http";
10
+ import { generatePage as pt, generateRouter as ut } from "@opentiny/tiny-engine-common/js/vscodeGenerateFile";
11
+ import { previewPage as dt } from "@opentiny/tiny-engine-common/js/preview";
12
+ import mt from "@opentiny/vue-renderless/common/deps/throttle";
13
+ import { IconSearch as ft, IconFolderOpened as Pt, IconFolderClosed as _t } from "@opentiny/vue-icon";
14
+ import { getCanvasStatus as Oe } from "@opentiny/tiny-engine-common/js/canvas";
15
+ import { REGEXP_PAGE_NAME as yt, REGEXP_ROUTE as Ee, REGEXP_FOLDER_NAME as St } from "@opentiny/tiny-engine-common/js/verification";
16
+ const Dt = (a) => V(x.Http).get(`/app-center/api/pages/list/${a}`), be = (a) => V(x.Http).get(`/app-center/api/pages/detail/${a}`), ht = (a) => V(x.Http).get(`/app-center/api/pages/delete/${a}`), Ct = (a) => V(x.Http).post("/app-center/api/pages/create", a), bt = (a, t) => V(x.Http).post(`/app-center/api/pages/update/${a}`, t), vt = (a) => V(x.Http).post("/app-center/api/pages/copy", a), qe = (a) => V(x.Http).get(`/app-center/api/pages/histories?page=${a}`), Nt = (a) => V(x.Http).post("/app-center/api/pageHistory/restore", a), It = (a) => V(x.Http).get(`/app-center/api/pages/histories/${a}`), Tt = (a, t) => V(x.Http).post(`/app-center/api/pages/update/${a}`, t), ue = {
17
+ fetchPageList: Dt,
18
+ fetchPageDetail: be,
19
+ requestDeletePage: ht,
20
+ requestCreatePage: Ct,
21
+ requestCopyPage: vt,
22
+ fetchPageHistory: qe,
23
+ fetchHistoryDetail: It,
24
+ handleRouteHomeUpdate: bt,
25
+ requestRestorePageHistory: Nt,
26
+ requestUpdatePage: Tt
27
+ }, J = (a, t) => {
28
+ const i = a.__vccOpts || a;
29
+ for (const [e, r] of t)
30
30
  i[e] = r;
31
31
  return i;
32
- }, Ot = {
32
+ }, Ft = {
33
33
  components: {
34
- BlockHistoryList: nt
34
+ BlockHistoryList: et
35
35
  },
36
36
  props: {
37
37
  curPageData: {
@@ -40,28 +40,28 @@ const bt = (t) => V(x.Http).get(`/app-center/api/pages/list/${t}`), Ie = (t) =>
40
40
  }
41
41
  },
42
42
  emits: ["restorePage"],
43
- setup(t, { emit: a }) {
44
- const { pageSettingState: i } = M(), { getDateFromNow: e } = $e(), { confirm: r } = z(), s = G([]), _ = (d) => {
45
- const { id: f, version: m } = V(x.GlobalService).getBaseInfo(), v = m ? `&app=${f}&version=${m}` : "";
46
- d ? Xe(d + v).then((C) => {
43
+ setup(a, { emit: t }) {
44
+ const { pageSettingState: i } = M(), { getDateFromNow: e } = Qe(), { confirm: r } = z(), s = G([]), f = (d) => {
45
+ const { id: _, version: m } = V(x.GlobalService).getBaseInfo(), v = m ? `&app=${_}&version=${m}` : "";
46
+ d ? qe(d + v).then((C) => {
47
47
  C && (C.forEach((S) => {
48
48
  S.backupTitle = S.message, S.backupTime = e(new Date(S.time));
49
49
  }), s.value = C.reverse());
50
50
  }) : s.value = [];
51
51
  };
52
52
  return ee(() => {
53
- var f;
54
- const d = ((f = i.currentPageData) == null ? void 0 : f.id) || "";
55
- _(d);
53
+ var _;
54
+ const d = ((_ = i.currentPageData) == null ? void 0 : _.id) || "";
55
+ f(d);
56
56
  }), {
57
57
  list: s,
58
58
  previewHistory: (d) => {
59
- var f, m;
60
- d && Pt({
59
+ var _, m;
60
+ d && dt({
61
61
  id: d.page,
62
62
  history: d.id,
63
- framework: (f = Oe("engine.config")) == null ? void 0 : f.dslMode,
64
- platform: (m = Oe("engine.config")) == null ? void 0 : m.platformId
63
+ framework: (_ = Fe("engine.config")) == null ? void 0 : _.dslMode,
64
+ platform: (m = Fe("engine.config")) == null ? void 0 : m.platformId
65
65
  });
66
66
  },
67
67
  restoreHistory: (d) => {
@@ -69,54 +69,54 @@ const bt = (t) => V(x.Http).get(`/app-center/api/pages/list/${t}`), Ie = (t) =>
69
69
  title: "提示",
70
70
  message: "您即将还原历史页面,是否继续还原?",
71
71
  exec: () => {
72
- a("restorePage", d);
72
+ t("restorePage", d);
73
73
  }
74
74
  });
75
75
  }
76
76
  };
77
77
  }
78
78
  };
79
- function Et(t, a, i, e, r, s) {
80
- const _ = p("block-history-list");
81
- return I(), E(_, {
79
+ function wt(a, t, i, e, r, s) {
80
+ const f = p("block-history-list");
81
+ return I(), E(f, {
82
82
  history: e.list,
83
83
  onPreview: e.previewHistory,
84
84
  onRestore: e.restoreHistory
85
85
  }, null, 8, ["history", "onPreview", "onRestore"]);
86
86
  }
87
- const Vt = /* @__PURE__ */ J(Ot, [["render", Et]]), xt = {
87
+ const kt = /* @__PURE__ */ J(Ft, [["render", wt]]), Ot = {
88
88
  components: {
89
- MetaCodeEditor: ot,
90
- TinyCheckbox: Le
89
+ MetaCodeEditor: tt,
90
+ TinyCheckbox: Ae
91
91
  },
92
92
  setup() {
93
- const t = G(""), a = G(""), { pageSettingState: i } = M(), e = ge(() => i.currentPageData);
93
+ const a = G(""), t = G(""), { pageSettingState: i } = M(), e = ge(() => i.currentPageData);
94
94
  return ee(() => {
95
- var n, l;
96
- t.value = ((n = i.currentPageData.page_content) == null ? void 0 : n.inputs) || "", a.value = ((l = i.currentPageData.page_content) == null ? void 0 : l.outputs) || "";
95
+ var n, c;
96
+ a.value = ((n = i.currentPageData.page_content) == null ? void 0 : n.inputs) || "", t.value = ((c = i.currentPageData.page_content) == null ? void 0 : c.outputs) || "";
97
97
  }), {
98
- inputValue: t,
99
- outputValue: a,
98
+ inputValue: a,
99
+ outputValue: t,
100
100
  saveInputValue: (n) => {
101
101
  try {
102
- const l = JSON.parse(n.content);
103
- t.value = n.content, e.value.page_content.inputs = l;
104
- } catch (l) {
102
+ const c = JSON.parse(n.content);
103
+ a.value = n.content, e.value.page_content.inputs = c;
104
+ } catch (c) {
105
105
  O({
106
106
  title: "输入配置保存失败(必须符合JSON格式)",
107
- message: `${(l == null ? void 0 : l.message) || l}`,
107
+ message: `${(c == null ? void 0 : c.message) || c}`,
108
108
  type: "error"
109
109
  });
110
110
  }
111
111
  },
112
112
  saveOutputValue: (n) => {
113
113
  try {
114
- const l = JSON.parse(n.content);
115
- a.value = n.content, e.value.page_content.outputs = l;
116
- } catch (l) {
114
+ const c = JSON.parse(n.content);
115
+ t.value = n.content, e.value.page_content.outputs = c;
116
+ } catch (c) {
117
117
  O({
118
118
  title: "输出配置保存失败(必须符合JSON格式)",
119
- message: `${(l == null ? void 0 : l.message) || l}`,
119
+ message: `${(c == null ? void 0 : c.message) || c}`,
120
120
  type: "error"
121
121
  });
122
122
  }
@@ -125,10 +125,10 @@ const Vt = /* @__PURE__ */ J(Ot, [["render", Et]]), xt = {
125
125
  hasContent: (n) => Array.isArray(n) && n.length > 0 || typeof n == "object" && Object.keys(n).length > 0
126
126
  };
127
127
  }
128
- }, de = (t) => (Se("data-v-b78f3300"), t = t(), he(), t), Gt = { class: "input-or-output" }, Rt = /* @__PURE__ */ de(() => /* @__PURE__ */ w("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)), Bt = /* @__PURE__ */ de(() => /* @__PURE__ */ w("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)), Ht = /* @__PURE__ */ de(() => /* @__PURE__ */ w("span", null, "设为根元素为Body", -1)), At = /* @__PURE__ */ de(() => /* @__PURE__ */ w("div", { class: "input-output-div" }, "默认为div", -1));
129
- function Mt(t, a, i, e, r, s) {
130
- const _ = p("svg-icon"), n = p("meta-code-editor"), l = p("tiny-checkbox");
131
- return I(), q("div", Gt, [
128
+ }, Et = { class: "input-or-output" };
129
+ function Vt(a, t, i, e, r, s) {
130
+ const f = p("svg-icon"), n = p("meta-code-editor"), c = p("tiny-checkbox");
131
+ return I(), q("div", Et, [
132
132
  g(n, {
133
133
  modelValue: e.inputValue,
134
134
  title: "输入配置",
@@ -138,15 +138,15 @@ function Mt(t, a, i, e, r, s) {
138
138
  single: "",
139
139
  onSave: e.saveInputValue
140
140
  }, {
141
- icon: h(() => [
142
- g(_, {
141
+ icon: D(() => [
142
+ g(f, {
143
143
  class: "edit-btn-icon",
144
144
  name: "to-edit"
145
145
  })
146
146
  ]),
147
147
  _: 1
148
148
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
149
- Rt,
149
+ t[2] || (t[2] = w("div", { class: "input-output-tips" }, "传递给页面的参数(类似组件的输入属性)", -1)),
150
150
  g(n, {
151
151
  modelValue: e.outputValue,
152
152
  title: "输出配置",
@@ -156,60 +156,60 @@ function Mt(t, a, i, e, r, s) {
156
156
  single: "",
157
157
  onSave: e.saveOutputValue
158
158
  }, {
159
- icon: h(() => [
160
- g(_, {
159
+ icon: D(() => [
160
+ g(f, {
161
161
  class: "edit-btn-icon",
162
162
  name: "to-edit"
163
163
  })
164
164
  ]),
165
165
  _: 1
166
166
  }, 8, ["modelValue", "buttonShowContent", "onSave"]),
167
- Bt,
168
- g(l, {
167
+ t[3] || (t[3] = w("div", { class: "input-output-div" }, "页面传递出的事件(类似组件触发的输出事件)", -1)),
168
+ g(c, {
169
169
  class: "selectHome",
170
170
  modelValue: e.pageSettingState.currentPageData.isBody,
171
- "onUpdate:modelValue": a[0] || (a[0] = (d) => e.pageSettingState.currentPageData.isBody = d)
171
+ "onUpdate:modelValue": t[0] || (t[0] = (d) => e.pageSettingState.currentPageData.isBody = d)
172
172
  }, {
173
- default: h(() => [
174
- Ht
175
- ]),
173
+ default: D(() => t[1] || (t[1] = [
174
+ w("span", null, "设为根元素为Body", -1)
175
+ ])),
176
176
  _: 1
177
177
  }, 8, ["modelValue"]),
178
- At
178
+ t[4] || (t[4] = w("div", { class: "input-output-div" }, "默认为div", -1))
179
179
  ]);
180
180
  }
181
- const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300"]]), $ = {
181
+ const xt = /* @__PURE__ */ J(Ot, [["render", Vt], ["__scopeId", "data-v-3b0f8d59"]]), $ = {
182
182
  id: "engine.plugins.appmanage",
183
183
  title: "页面",
184
184
  type: "plugins",
185
185
  icon: "plugin-icon-page",
186
186
  align: "top"
187
187
  }, {
188
- COMPONENT_NAME: Lt
189
- } = Je, Te = G(!1), ie = () => {
190
- Te.value = !0;
188
+ COMPONENT_NAME: Gt
189
+ } = Le, ve = G(!1), ie = () => {
190
+ ve.value = !0;
191
191
  }, L = () => {
192
- Te.value = !1;
192
+ ve.value = !1;
193
193
  const {
194
- resetPageData: t
194
+ resetPageData: a
195
195
  } = M();
196
- t();
197
- }, Re = {
196
+ a();
197
+ }, Ve = {
198
198
  general: "general",
199
199
  inputOutput: "inputOutput",
200
200
  lifeCycles: "lifeCycles",
201
201
  history: "history"
202
- }, jt = {
202
+ }, Rt = {
203
203
  components: {
204
- TinyButton: je,
205
- TinyCollapse: ve,
206
- TinyCollapseItem: Ne,
207
- PageInputOutput: Ut,
208
- LifeCycles: st,
209
- PageHistory: Vt,
210
- PluginSetting: Me,
211
- SvgButton: be,
212
- ButtonGroup: Ue
204
+ TinyButton: Me,
205
+ TinyCollapse: he,
206
+ TinyCollapseItem: Ce,
207
+ PageInputOutput: xt,
208
+ LifeCycles: at,
209
+ PageHistory: kt,
210
+ PluginSetting: Be,
211
+ SvgButton: De,
212
+ ButtonGroup: He
213
213
  },
214
214
  props: {
215
215
  isFolder: {
@@ -218,8 +218,8 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
218
218
  }
219
219
  },
220
220
  emits: ["openNewPage"],
221
- setup(t, {
222
- emit: a
221
+ setup(a, {
222
+ emit: t
223
223
  }) {
224
224
  var oe;
225
225
  const {
@@ -228,18 +228,18 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
228
228
  } = ue, {
229
229
  getDefaultPage: r,
230
230
  pageSettingState: s,
231
- changeTreeData: _,
231
+ changeTreeData: f,
232
232
  isCurrentDataSame: n,
233
- initCurrentPageData: l,
233
+ initCurrentPageData: c,
234
234
  isTemporaryPage: d,
235
- STATIC_PAGE_GROUP_ID: f
235
+ STATIC_PAGE_GROUP_ID: _
236
236
  } = M(), {
237
237
  pageState: m,
238
238
  initData: v
239
- } = Ce(), {
239
+ } = Se(), {
240
240
  confirm: C
241
- } = z(), S = Ae($.type, $.id), u = S.components.PageGeneral, N = (oe = S == null ? void 0 : S.options) == null ? void 0 : oe.beforeCreatePage, k = G(null), T = X({
242
- activeName: Object.values(Re),
241
+ } = z(), S = Re($.type, $.id), u = S.components.PageGeneral, N = (oe = S == null ? void 0 : S.options) == null ? void 0 : oe.beforeCreatePage, k = G(null), T = X({
242
+ activeName: Object.values(Ve),
243
243
  title: "页面设置",
244
244
  historyMessage: ""
245
245
  }), U = () => {
@@ -247,7 +247,7 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
247
247
  title: "提示",
248
248
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
249
249
  exec: () => {
250
- s.isNew || (_(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), L();
250
+ s.isNew || (f(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy)), L();
251
251
  }
252
252
  });
253
253
  }, K = async () => {
@@ -255,43 +255,43 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
255
255
  page_content: b,
256
256
  ...o
257
257
  } = r(), {
258
- page_content: c,
258
+ page_content: l,
259
259
  ...y
260
260
  } = s.currentPageData, P = {
261
261
  ...o,
262
262
  ...y,
263
263
  page_content: {
264
264
  ...b,
265
- ...c,
265
+ ...l,
266
266
  fileName: s.currentPageData.name
267
267
  },
268
268
  app: V(x.GlobalService).getBaseInfo().id,
269
269
  isPage: !0
270
270
  };
271
- P.id && (delete P.id, delete P._id), N && await N(P), i(P).then((D) => {
272
- s.updateTreeData(), s.isNew = !1, d.saved = !1, a("openNewPage", D), L(), le().closePlugin(), O({
271
+ P.id && (delete P.id, delete P._id), N && await N(P), i(P).then((h) => {
272
+ s.updateTreeData(), s.isNew = !1, d.saved = !1, t("openNewPage", h), L(), ce().closePlugin(), O({
273
273
  type: "success",
274
274
  message: "新建页面成功!"
275
- }), Ke && mt(D);
276
- }).catch((D) => {
275
+ }), je && pt(h);
276
+ }).catch((h) => {
277
277
  O({
278
278
  type: "error",
279
279
  title: "新建页面失败",
280
- message: JSON.stringify((D == null ? void 0 : D.message) || D)
280
+ message: JSON.stringify((h == null ? void 0 : h.message) || h)
281
281
  });
282
282
  });
283
283
  }, j = (b, o) => {
284
284
  var P;
285
- const c = s.currentPageDataCopy.route !== s.currentPageData.route, y = ((P = m == null ? void 0 : m.currentPage) == null ? void 0 : P.id) === b;
286
- return dt(b, o, c, y);
287
- }, me = (b) => {
285
+ const l = s.currentPageDataCopy.route !== s.currentPageData.route, y = ((P = m == null ? void 0 : m.currentPage) == null ? void 0 : P.id) === b;
286
+ return gt(b, o, l, y);
287
+ }, de = (b) => {
288
288
  b.id = b.page, ["page", "backupTime", "backupTitle", "time"].forEach((y) => delete b[y]);
289
- const c = {
289
+ const l = {
290
290
  ...s.currentPageData,
291
291
  ...b,
292
292
  message: "还原页面"
293
293
  };
294
- j(b.id, c).then((y) => {
294
+ j(b.id, l).then((y) => {
295
295
  var P;
296
296
  ((P = m == null ? void 0 : m.currentPage) == null ? void 0 : P.id) === (y == null ? void 0 : y.id) && v(y.page_content, y);
297
297
  });
@@ -299,16 +299,16 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
299
299
  const {
300
300
  id: b,
301
301
  name: o,
302
- page_content: c
302
+ page_content: l
303
303
  } = s.currentPageData, y = {
304
304
  ...s.currentPageData,
305
305
  page_content: {
306
- ...c,
306
+ ...l,
307
307
  fileName: o
308
308
  }
309
309
  }, P = await j(b, y);
310
- l(P);
311
- }, _e = (b) => {
310
+ c(P);
311
+ }, me = (b) => {
312
312
  if (!b)
313
313
  return;
314
314
  const o = s.currentPageData.page_content;
@@ -319,12 +319,12 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
319
319
  }, W = () => {
320
320
  const b = s.currentPageData, o = Z(!0, {}, b);
321
321
  s.isNew = !0, o.name = `${o.name}Copy`, o.route = `${o.route}Copy`, s.currentPageData = o, s.currentPageDataCopy = Z(!0, {}, o);
322
- }, Pe = () => {
322
+ }, fe = () => {
323
323
  n() ? W() : C({
324
324
  title: "提示",
325
325
  message: "您即将复制的页面有更改未保存,是否确定跳过更改直接复制?",
326
326
  exec: () => {
327
- _(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), W();
327
+ f(s.oldParentId, s.currentPageData.parentId), Object.assign(s.currentPageData, s.currentPageDataCopy), W();
328
328
  }
329
329
  });
330
330
  }, ae = () => {
@@ -332,7 +332,7 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
332
332
  title: "创建历史备份信息",
333
333
  status: "custom",
334
334
  message: {
335
- render: () => g(qe, {
335
+ render: () => g(Ue, {
336
336
  placeholder: "历史备份信息",
337
337
  modelValue: T.historyMessage,
338
338
  "onUpdate:modelValue": (P) => T.historyMessage = P
@@ -342,26 +342,26 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
342
342
  s.currentPageData.message = T.historyMessage.trim() || "Page auto save", s.isNew ? K() : te(), T.historyMessage = "";
343
343
  }
344
344
  });
345
- }, fe = () => {
345
+ }, Pe = () => {
346
346
  k.value.validGeneralForm().then(ae);
347
347
  }, ne = (b = []) => {
348
348
  if (!Array.isArray(b))
349
349
  return [];
350
350
  const o = [];
351
- return b.forEach((c) => {
351
+ return b.forEach((l) => {
352
352
  var y;
353
- if (c != null && c.isPage) {
354
- o.push(c);
353
+ if (l != null && l.isPage) {
354
+ o.push(l);
355
355
  return;
356
356
  }
357
- !(c != null && c.isPage) && ((y = c == null ? void 0 : c.children) != null && y.length) && o.push(...ne(c.children));
357
+ !(l != null && l.isPage) && ((y = l == null ? void 0 : l.children) != null && y.length) && o.push(...ne(l.children));
358
358
  }), o;
359
359
  };
360
360
  return {
361
361
  state: T,
362
- isShow: Te,
363
- savePageSetting: fe,
364
- copyPage: Pe,
362
+ isShow: ve,
363
+ savePageSetting: Pe,
364
+ copyPage: fe,
365
365
  pageSettingState: s,
366
366
  pageGeneral: u,
367
367
  pageGeneralRef: k,
@@ -373,16 +373,16 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
373
373
  var o;
374
374
  const b = ((o = s.currentPageData) == null ? void 0 : o.id) || "";
375
375
  e(b).then(() => {
376
- s.updateTreeData().then((c) => {
376
+ s.updateTreeData().then((l) => {
377
377
  var se, Q;
378
378
  if (((se = m == null ? void 0 : m.currentPage) == null ? void 0 : se.id) !== b)
379
379
  return;
380
- const y = ((Q = (c || []).find(({
380
+ const y = ((Q = (l || []).find(({
381
381
  groupId: re
382
- }) => re === f)) == null ? void 0 : Q.data) || [], P = ne(y), D = P.find((re) => re.isHome), R = P == null ? void 0 : P[0], B = {
383
- componentName: Lt.Page
382
+ }) => re === _)) == null ? void 0 : Q.data) || [], P = ne(y), h = P.find((re) => re.isHome), R = P == null ? void 0 : P[0], B = {
383
+ componentName: Gt.Page
384
384
  };
385
- a("openNewPage", D || R || B);
385
+ t("openNewPage", h || R || B);
386
386
  }), L(), O({
387
387
  message: "删除页面成功!",
388
388
  type: "success"
@@ -398,29 +398,29 @@ const Ut = /* @__PURE__ */ J(xt, [["render", Mt], ["__scopeId", "data-v-b78f3300
398
398
  },
399
399
  cancelPageSetting: U,
400
400
  closePageSettingPanel: L,
401
- updatePageLifeCycles: _e,
402
- restorePage: me,
403
- PAGE_SETTING_SESSION: Re
401
+ updatePageLifeCycles: me,
402
+ restorePage: de,
403
+ PAGE_SETTING_SESSION: Ve
404
404
  };
405
405
  }
406
- }, qt = { class: "page-setting-content" }, Jt = { class: "life-cycles-container" };
407
- function Kt(t, a, i, e, r, s) {
408
- const _ = p("tiny-button"), n = p("svg-button"), l = p("button-group"), d = p("tiny-collapse-item"), f = p("page-input-output"), m = p("life-cycles"), v = p("page-history"), C = p("tiny-collapse"), S = p("plugin-setting");
406
+ }, Bt = { class: "page-setting-content" }, Ht = { class: "life-cycles-container" };
407
+ function At(a, t, i, e, r, s) {
408
+ const f = p("tiny-button"), n = p("svg-button"), c = p("button-group"), d = p("tiny-collapse-item"), _ = p("page-input-output"), m = p("life-cycles"), v = p("page-history"), C = p("tiny-collapse"), S = p("plugin-setting");
409
409
  return e.isShow ? (I(), E(S, {
410
410
  key: 0,
411
411
  title: e.state.title,
412
412
  class: "page-plugin-setting"
413
413
  }, {
414
- header: h(() => [
415
- g(l, null, {
416
- default: h(() => [
417
- g(_, {
414
+ header: D(() => [
415
+ g(c, null, {
416
+ default: D(() => [
417
+ g(f, {
418
418
  type: "primary",
419
419
  onClick: e.savePageSetting
420
420
  }, {
421
- default: h(() => [
421
+ default: D(() => t[1] || (t[1] = [
422
422
  Y("保存")
423
- ]),
423
+ ])),
424
424
  _: 1
425
425
  }, 8, ["onClick"]),
426
426
  e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
@@ -445,20 +445,20 @@ function Kt(t, a, i, e, r, s) {
445
445
  _: 1
446
446
  })
447
447
  ]),
448
- content: h(() => [
449
- w("div", qt, [
448
+ content: D(() => [
449
+ w("div", Bt, [
450
450
  g(C, {
451
451
  modelValue: e.state.activeName,
452
- "onUpdate:modelValue": a[0] || (a[0] = (u) => e.state.activeName = u),
452
+ "onUpdate:modelValue": t[0] || (t[0] = (u) => e.state.activeName = u),
453
453
  class: "page-setting-collapse"
454
454
  }, {
455
- default: h(() => [
455
+ default: D(() => [
456
456
  g(d, {
457
457
  title: "基本设置",
458
458
  name: e.PAGE_SETTING_SESSION.general
459
459
  }, {
460
- default: h(() => [
461
- (I(), E(He(e.pageGeneral), {
460
+ default: D(() => [
461
+ (I(), E(Ge(e.pageGeneral), {
462
462
  ref: "pageGeneralRef",
463
463
  isFolder: i.isFolder
464
464
  }, null, 8, ["isFolder"]))
@@ -471,8 +471,8 @@ function Kt(t, a, i, e, r, s) {
471
471
  title: "输入输出",
472
472
  name: e.PAGE_SETTING_SESSION.inputOutput
473
473
  }, {
474
- default: h(() => [
475
- g(f)
474
+ default: D(() => [
475
+ g(_)
476
476
  ]),
477
477
  _: 1
478
478
  }, 8, ["name"])) : A("", !0),
@@ -482,10 +482,10 @@ function Kt(t, a, i, e, r, s) {
482
482
  title: "页面生命周期配置",
483
483
  name: e.PAGE_SETTING_SESSION.lifeCycles
484
484
  }, {
485
- default: h(() => {
485
+ default: D(() => {
486
486
  var u;
487
487
  return [
488
- w("div", Jt, [
488
+ w("div", Ht, [
489
489
  g(m, {
490
490
  bindLifeCycles: (u = e.pageSettingState.currentPageData.page_content) == null ? void 0 : u.lifeCycles,
491
491
  onUpdatePageLifeCycles: e.updatePageLifeCycles
@@ -500,7 +500,7 @@ function Kt(t, a, i, e, r, s) {
500
500
  title: "历史备份",
501
501
  name: e.PAGE_SETTING_SESSION.history
502
502
  }, {
503
- default: h(() => [
503
+ default: D(() => [
504
504
  g(v, { onRestorePage: e.restorePage }, null, 8, ["onRestorePage"])
505
505
  ]),
506
506
  _: 1
@@ -513,22 +513,22 @@ function Kt(t, a, i, e, r, s) {
513
513
  _: 1
514
514
  }, 8, ["title"])) : A("", !0);
515
515
  }
516
- const Xt = /* @__PURE__ */ J(jt, [["render", Kt], ["__scopeId", "data-v-8b752486"]]);
517
- let Fe = G(!1);
518
- const Be = () => {
519
- Fe.value = !0;
516
+ const Mt = /* @__PURE__ */ J(Rt, [["render", At], ["__scopeId", "data-v-47ffd21b"]]);
517
+ let Ne = G(!1);
518
+ const xe = () => {
519
+ Ne.value = !0;
520
520
  }, H = () => {
521
- Fe.value = !1;
522
- const { resetPageData: t } = M();
523
- t();
524
- }, Wt = {
521
+ Ne.value = !1;
522
+ const { resetPageData: a } = M();
523
+ a();
524
+ }, Ut = {
525
525
  components: {
526
- TinyButton: je,
527
- TinyCollapse: ve,
528
- TinyCollapseItem: Ne,
529
- PluginSetting: Me,
530
- SvgButton: be,
531
- ButtonGroup: Ue
526
+ TinyButton: Me,
527
+ TinyCollapse: he,
528
+ TinyCollapseItem: Ce,
529
+ PluginSetting: Be,
530
+ SvgButton: De,
531
+ ButtonGroup: He
532
532
  },
533
533
  props: {
534
534
  isFolder: {
@@ -537,11 +537,11 @@ const Be = () => {
537
537
  }
538
538
  },
539
539
  setup() {
540
- const t = X({
540
+ const a = X({
541
541
  activeName: ["folderGeneralRef"],
542
542
  title: "文件夹设置"
543
- }), { requestCreatePage: a, requestUpdatePage: i, requestDeletePage: e } = ue, { pageSettingState: r, changeTreeData: s } = M(), { confirm: _ } = z(), l = Ae($.type, $.id).components.PageGeneral, d = G(null), f = () => {
544
- pe(r.currentPageData, r.currentPageDataCopy) ? H() : _({
543
+ }), { requestCreatePage: t, requestUpdatePage: i, requestDeletePage: e } = ue, { pageSettingState: r, changeTreeData: s } = M(), { confirm: f } = z(), c = Re($.type, $.id).components.PageGeneral, d = G(null), _ = () => {
544
+ pe(r.currentPageData, r.currentPageDataCopy) ? H() : f({
545
545
  title: "提示",
546
546
  message: "您即将使用未保存的更改关闭此页。是否要在关闭之前放弃这些更改?",
547
547
  exec: () => {
@@ -554,7 +554,7 @@ const Be = () => {
554
554
  app: V(x.GlobalService).getBaseInfo().id,
555
555
  isPage: !1
556
556
  };
557
- a(N).then(() => {
557
+ t(N).then(() => {
558
558
  r.updateTreeData(), r.isNew = !1, H(), O({
559
559
  type: "success",
560
560
  message: "新建文件夹成功!"
@@ -587,7 +587,7 @@ const Be = () => {
587
587
  r.isNew ? m() : v();
588
588
  });
589
589
  },
590
- deleteFolder: ft(5e3, !0, () => {
590
+ deleteFolder: mt(5e3, !0, () => {
591
591
  var u, N;
592
592
  if ((N = (u = r.treeDataMapping[r.currentPageData.id]) == null ? void 0 : u.children) != null && N.length) {
593
593
  O({
@@ -596,7 +596,7 @@ const Be = () => {
596
596
  });
597
597
  return;
598
598
  }
599
- _({
599
+ f({
600
600
  title: "提示",
601
601
  message: "您是否要删除文件夹?",
602
602
  exec: () => {
@@ -617,33 +617,33 @@ const Be = () => {
617
617
  }
618
618
  });
619
619
  }),
620
- pageGeneral: l,
620
+ pageGeneral: c,
621
621
  folderGeneralRef: d,
622
622
  closeFolderSettingPanel: H,
623
- isShow: Fe,
624
- state: t,
623
+ isShow: Ne,
624
+ state: a,
625
625
  pageSettingState: r,
626
- closeFolderSetting: f
626
+ closeFolderSetting: _
627
627
  };
628
628
  }
629
- }, zt = { class: "page-setting-content" };
630
- function Qt(t, a, i, e, r, s) {
631
- const _ = p("tiny-button"), n = p("svg-button"), l = p("button-group"), d = p("tiny-collapse-item"), f = p("tiny-collapse"), m = p("plugin-setting");
629
+ }, Lt = { class: "page-setting-content" };
630
+ function jt(a, t, i, e, r, s) {
631
+ const f = p("tiny-button"), n = p("svg-button"), c = p("button-group"), d = p("tiny-collapse-item"), _ = p("tiny-collapse"), m = p("plugin-setting");
632
632
  return e.isShow ? (I(), E(m, {
633
633
  key: 0,
634
634
  title: e.state.title,
635
635
  class: "pageFolder-plugin-setting"
636
636
  }, {
637
- header: h(() => [
638
- g(l, null, {
639
- default: h(() => [
640
- g(_, {
637
+ header: D(() => [
638
+ g(c, null, {
639
+ default: D(() => [
640
+ g(f, {
641
641
  type: "primary",
642
642
  onClick: e.saveFolderSetting
643
643
  }, {
644
- default: h(() => [
644
+ default: D(() => t[1] || (t[1] = [
645
645
  Y("保存")
646
- ]),
646
+ ])),
647
647
  _: 1
648
648
  }, 8, ["onClick"]),
649
649
  e.pageSettingState.isNew ? A("", !0) : (I(), E(n, {
@@ -662,19 +662,19 @@ function Qt(t, a, i, e, r, s) {
662
662
  _: 1
663
663
  })
664
664
  ]),
665
- content: h(() => [
666
- w("div", zt, [
667
- g(f, {
665
+ content: D(() => [
666
+ w("div", Lt, [
667
+ g(_, {
668
668
  modelValue: e.state.activeName,
669
- "onUpdate:modelValue": a[0] || (a[0] = (v) => e.state.activeName = v)
669
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => e.state.activeName = v)
670
670
  }, {
671
- default: h(() => [
671
+ default: D(() => [
672
672
  g(d, {
673
673
  title: "基本设置",
674
674
  name: "folderGeneralRef"
675
675
  }, {
676
- default: h(() => [
677
- (I(), E(He(e.pageGeneral), {
676
+ default: D(() => [
677
+ (I(), E(Ge(e.pageGeneral), {
678
678
  ref: "folderGeneralRef",
679
679
  isFolder: i.isFolder
680
680
  }, null, 8, ["isFolder"]))
@@ -689,17 +689,17 @@ function Qt(t, a, i, e, r, s) {
689
689
  _: 1
690
690
  }, 8, ["title"])) : A("", !0);
691
691
  }
692
- const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0"]]), {
693
- ELEMENT_TAG: Zt,
694
- PAGE_STATUS: $t,
695
- COMPONENT_NAME: ea
696
- } = Je, ta = {
692
+ const qt = /* @__PURE__ */ J(Ut, [["render", jt], ["__scopeId", "data-v-98cffdb3"]]), {
693
+ ELEMENT_TAG: Jt,
694
+ PAGE_STATUS: Kt,
695
+ COMPONENT_NAME: Xt
696
+ } = Le, Wt = {
697
697
  components: {
698
- TinySearch: ct,
699
- TinyTree: lt,
700
- TinyCollapse: ve,
701
- TinyCollapseItem: Ne,
702
- TinyIconSearch: yt()
698
+ TinySearch: ot,
699
+ TinyTree: st,
700
+ TinyCollapse: he,
701
+ TinyCollapseItem: Ce,
702
+ TinyIconSearch: ft()
703
703
  },
704
704
  props: {
705
705
  isFolder: {
@@ -708,8 +708,8 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
708
708
  }
709
709
  },
710
710
  emits: ["openSettingPanel", "add"],
711
- setup(t, {
712
- emit: a
711
+ setup(a, {
712
+ emit: t
713
713
  }) {
714
714
  const {
715
715
  confirm: i
@@ -717,23 +717,23 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
717
717
  initData: e,
718
718
  pageState: r,
719
719
  isBlock: s,
720
- isSaved: _
721
- } = Ce(), {
720
+ isSaved: f
721
+ } = Se(), {
722
722
  pageSettingState: n,
723
- changeTreeData: l,
723
+ changeTreeData: c,
724
724
  isCurrentDataSame: d,
725
- STATIC_PAGE_GROUP_ID: f,
725
+ STATIC_PAGE_GROUP_ID: _,
726
726
  COMMON_PAGE_GROUP_ID: m
727
727
  } = M(), {
728
728
  fetchPageList: v,
729
729
  fetchPageDetail: C
730
730
  } = ue, {
731
731
  setBreadcrumbPage: S
732
- } = et(), u = G([]), N = n.ROOT_ID, k = () => V(x.GlobalService).getBaseInfo().id, T = X({
732
+ } = Ye(), u = G([]), N = n.ROOT_ID, k = () => V(x.GlobalService).getBaseInfo().id, T = X({
733
733
  pageSearchValue: "",
734
- collapseValue: [f, m],
734
+ collapseValue: [_, m],
735
735
  currentNodeData: {}
736
- }), U = (o, c, y) => {
736
+ }), U = (o, l, y) => {
737
737
  const P = {
738
738
  [N]: {
739
739
  id: N,
@@ -741,24 +741,24 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
741
741
  children: []
742
742
  }
743
743
  };
744
- return o.forEach((D) => {
745
- P[D[y]] = D, D.parentId === N && P[N].children.push(D);
746
- }), o.forEach((D) => {
747
- let R = P[D[c]];
748
- R && R.id !== N ? (R.children = R.children || [], R.children.push(D)) : R && R.id;
744
+ return o.forEach((h) => {
745
+ P[h[y]] = h, h.parentId === N && P[N].children.push(h);
746
+ }), o.forEach((h) => {
747
+ let R = P[h[l]];
748
+ R && R.id !== N ? (R.children = R.children || [], R.children.push(h)) : R && R.id;
749
749
  }), n.treeDataMapping = P, n.treeDataMapping;
750
750
  }, K = (o) => {
751
- Array.isArray(u == null ? void 0 : u.value) && ze(() => {
752
- u.value.forEach((c) => {
753
- c == null || c.filter(o);
751
+ Array.isArray(u == null ? void 0 : u.value) && Ke(() => {
752
+ u.value.forEach((l) => {
753
+ l == null || l.filter(o);
754
754
  });
755
755
  });
756
- }, j = async (o, c) => {
757
- const y = c || await v(o), P = {
756
+ }, j = async (o, l) => {
757
+ const y = l || await v(o), P = {
758
758
  groupName: "静态页面",
759
- groupId: f,
759
+ groupId: _,
760
760
  data: []
761
- }, D = {
761
+ }, h = {
762
762
  groupName: "公共页面",
763
763
  groupId: m,
764
764
  data: []
@@ -773,77 +773,77 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
773
773
  ...B.meta,
774
774
  name: B.fileName,
775
775
  isPage: !0,
776
- isBody: B.meta.rootElement === Zt.Body
776
+ isBody: B.meta.rootElement === Jt.Body
777
777
  } : se, {
778
778
  children: re,
779
- ...ke
779
+ ...Te
780
780
  } = Q;
781
- Q.group === "staticPages" ? P.data.push(ke) : D.data.push(ke);
781
+ Q.group === "staticPages" ? P.data.push(Te) : h.data.push(Te);
782
782
  });
783
783
  const R = U([...P.data], "parentId", "id");
784
- return P.data = R[N].children, n.pages = [P, D], K(T.pageSearchValue), n.pages;
784
+ return P.data = R[N].children, n.pages = [P, h], K(T.pageSearchValue), n.pages;
785
785
  };
786
786
  n.updateTreeData = async () => await j(k());
787
- const me = () => {
787
+ const de = () => {
788
788
  r.currentVm = null, r.hoverVm = null, r.properties = {}, r.pageSchema = null;
789
789
  }, te = (o) => {
790
- const c = new URL(window.location);
791
- c.searchParams.delete("blockid"), c.searchParams.set("pageid", o), window.history.pushState({}, "", c);
792
- }, _e = (o) => {
790
+ const l = new URL(window.location);
791
+ l.searchParams.delete("blockid"), l.searchParams.set("pageid", o), window.history.pushState({}, "", l);
792
+ }, me = (o) => {
793
793
  if (o !== 0 && !o) {
794
794
  te(""), e({
795
- componentName: ea.Page
796
- }, {}), le().layoutState.pageStatus = {
795
+ componentName: Xt.Page
796
+ }, {}), ce().layoutState.pageStatus = {
797
797
  state: "empty",
798
798
  data: {}
799
799
  };
800
800
  return;
801
801
  }
802
- C(o).then((c) => {
803
- te(o), L(), H(), le().closePlugin(), le().layoutState.pageStatus = xe(c.occupier), e(c.page_content, c);
802
+ C(o).then((l) => {
803
+ te(o), L(), H(), ce().closePlugin(), ce().layoutState.pageStatus = Oe(l.occupier), e(l.page_content, l);
804
804
  });
805
805
  }, W = (o) => {
806
806
  r.hoverVm = null, T.currentNodeData = o;
807
- let c = "";
808
- o.isPage && (c = (o == null ? void 0 : o.name) || ""), S([c]), me(), _e(o.id);
809
- }, Pe = (o, c) => {
810
- var D;
807
+ let l = "";
808
+ o.isPage && (l = (o == null ? void 0 : o.name) || ""), S([l]), de(), me(o.id);
809
+ }, fe = (o, l) => {
810
+ var h;
811
811
  o.stopPropagation();
812
812
  const {
813
813
  id: y,
814
814
  isPage: P
815
- } = c.data;
816
- !s() && y === ((D = T == null ? void 0 : T.currentNodeData) == null ? void 0 : D.id) || !P || (_() && d() ? W(c.data) : i({
815
+ } = l.data;
816
+ !s() && y === ((h = T == null ? void 0 : T.currentNodeData) == null ? void 0 : h.id) || !P || (f() && d() ? W(l.data) : i({
817
817
  title: "提示",
818
818
  message: `${s() ? "区块" : "页面"}尚未保存,是否要继续切换?`,
819
819
  exec: () => {
820
- l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), W(c.data);
820
+ c(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), W(l.data);
821
821
  }
822
822
  }));
823
- }, ae = (o, c, y) => {
823
+ }, ae = (o, l, y) => {
824
824
  var P;
825
- if (o.stopPropagation(), y && c.data.isPage) {
826
- const D = ((P = c.data.occupier) == null ? void 0 : P.username) || "";
825
+ if (o.stopPropagation(), y && l.data.isPage) {
826
+ const h = ((P = l.data.occupier) == null ? void 0 : P.username) || "";
827
827
  z().message({
828
- message: `您点击的页面被${D}锁定,暂时无法编辑,请联系解锁`
828
+ message: `您点击的页面被${h}锁定,暂时无法编辑,请联系解锁`
829
829
  });
830
830
  return;
831
831
  }
832
- pe(n.currentPageData, n.currentPageDataCopy) ? a("openSettingPanel", c) : i({
832
+ pe(n.currentPageData, n.currentPageDataCopy) ? t("openSettingPanel", l) : i({
833
833
  title: "提示",
834
834
  message: `当前页面或文件夹${n.currentPageData.name}尚未保存,是否要继续切换?`,
835
835
  exec: () => {
836
- l(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), a("openSettingPanel", c);
836
+ c(n.oldParentId, n.currentPageData.parentId), Object.assign(n.currentPageData, n.currentPageDataCopy), t("openSettingPanel", l);
837
837
  }
838
838
  });
839
- }, fe = (o, {
840
- node: c,
839
+ }, Pe = (o, {
840
+ node: l,
841
841
  data: y
842
842
  }) => {
843
- const P = xe(y.occupier).state === $t.Lock;
843
+ const P = Oe(y.occupier).state === Kt.Lock;
844
844
  return g("span", {
845
845
  class: "tiny-tree-node__label",
846
- onMousedown: (D) => Pe(D, c)
846
+ onMousedown: (h) => fe(h, l)
847
847
  }, [y.isPage ? g(p("SvgIcon"), {
848
848
  name: "text-page-common",
849
849
  class: "icon-page"
@@ -852,38 +852,38 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
852
852
  class: "folder-icon"
853
853
  }, null), g("span", {
854
854
  class: "label"
855
- }, [c.label]), g("span", {
855
+ }, [l.label]), g("span", {
856
856
  class: "icons"
857
857
  }, [y.isPage && P ? g(p("SvgIcon"), {
858
858
  class: "page-edit-icon",
859
859
  name: "locked",
860
- onMousedown: (D) => ae(D, c, P)
860
+ onMousedown: (h) => ae(h, l, P)
861
861
  }, null) : null, y.isHome ? g(p("SvgIcon"), {
862
862
  class: "page-edit-icon",
863
863
  name: "text-page-home"
864
864
  }, null) : null, g(p("SvgIcon"), {
865
865
  name: "setting",
866
866
  class: "setting page-edit-icon",
867
- onMousedown: (D) => ae(D, c, P)
867
+ onMousedown: (h) => ae(h, l, P)
868
868
  }, null)])]);
869
869
  };
870
- Ee().subscribe({
870
+ we().subscribe({
871
871
  topic: "app_id_changed",
872
872
  subscriber: "page_tree_app_id_changed",
873
873
  callback: (o) => {
874
874
  j(o);
875
875
  }
876
876
  });
877
- const ne = (o, c) => {
877
+ const ne = (o, l) => {
878
878
  var y;
879
- return o ? ((y = c.name) == null ? void 0 : y.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
880
- }, we = (o) => {
879
+ return o ? ((y = l.name) == null ? void 0 : y.toLowerCase().indexOf(o == null ? void 0 : o.toLowerCase())) !== -1 : !0;
880
+ }, Ie = (o) => {
881
881
  o && u.value.push(o);
882
882
  }, oe = (o) => {
883
- o.stopPropagation(), o.preventDefault(), a("add");
883
+ o.stopPropagation(), o.preventDefault(), t("add");
884
884
  }, b = g("span", null, null);
885
- return We(() => {
886
- Ee().unsubscribe({
885
+ return Je(() => {
886
+ we().unsubscribe({
887
887
  topic: "app_id_changed",
888
888
  subscriber: "page_tree_app_id_changed"
889
889
  });
@@ -893,51 +893,51 @@ const Yt = /* @__PURE__ */ J(Wt, [["render", Qt], ["__scopeId", "data-v-e73be7d0
893
893
  switchPage: W,
894
894
  pageSettingState: n,
895
895
  searchPageData: K,
896
- renderContent: fe,
896
+ renderContent: Pe,
897
897
  refreshPageList: j,
898
898
  filterPageTreeData: ne,
899
- getPageTreeRefs: we,
900
- IconFolderOpened: St(),
901
- IconFolderClosed: ht(),
899
+ getPageTreeRefs: Ie,
900
+ IconFolderOpened: Pt(),
901
+ IconFolderClosed: _t(),
902
902
  nullIcon: b
903
903
  };
904
904
  }
905
- }, aa = { class: "app-manage-search" }, na = { class: "title" }, oa = { class: "app-manage-tree" };
906
- function sa(t, a, i, e, r, s) {
907
- const _ = p("tiny-icon-search"), n = p("tiny-search"), l = p("tiny-tree"), d = p("tiny-collapse-item"), f = p("tiny-collapse");
908
- return I(), q(ye, null, [
909
- w("div", aa, [
905
+ }, zt = { class: "app-manage-search" }, Qt = { class: "title" }, Yt = { class: "app-manage-tree" };
906
+ function Zt(a, t, i, e, r, s) {
907
+ const f = p("tiny-icon-search"), n = p("tiny-search"), c = p("tiny-tree"), d = p("tiny-collapse-item"), _ = p("tiny-collapse");
908
+ return I(), q(_e, null, [
909
+ w("div", zt, [
910
910
  g(n, {
911
911
  modelValue: e.state.pageSearchValue,
912
912
  "onUpdate:modelValue": [
913
- a[0] || (a[0] = (m) => e.state.pageSearchValue = m),
913
+ t[0] || (t[0] = (m) => e.state.pageSearchValue = m),
914
914
  e.searchPageData
915
915
  ],
916
916
  clearable: "",
917
917
  placeholder: "搜索"
918
918
  }, {
919
- prefix: h(() => [
920
- g(_)
919
+ prefix: D(() => [
920
+ g(f)
921
921
  ]),
922
922
  _: 1
923
923
  }, 8, ["modelValue", "onUpdate:modelValue"])
924
924
  ]),
925
- g(f, {
925
+ g(_, {
926
926
  modelValue: e.state.collapseValue,
927
- "onUpdate:modelValue": a[1] || (a[1] = (m) => e.state.collapseValue = m),
927
+ "onUpdate:modelValue": t[1] || (t[1] = (m) => e.state.collapseValue = m),
928
928
  class: "page-manage-collapse lowcode-scrollbar"
929
929
  }, {
930
- default: h(() => [
931
- (I(!0), q(ye, null, Qe(e.pageSettingState.pages, (m, v) => (I(), E(d, {
930
+ default: D(() => [
931
+ (I(!0), q(_e, null, Xe(e.pageSettingState.pages, (m, v) => (I(), E(d, {
932
932
  key: v,
933
933
  name: m.groupId
934
934
  }, {
935
- title: h(() => [
936
- w("span", na, De(m.groupName), 1)
935
+ title: D(() => [
936
+ w("span", Qt, ye(m.groupName), 1)
937
937
  ]),
938
- default: h(() => [
939
- w("div", oa, [
940
- (I(), E(l, {
938
+ default: D(() => [
939
+ w("div", Yt, [
940
+ (I(), E(c, {
941
941
  ref_for: !0,
942
942
  ref: e.getPageTreeRefs,
943
943
  key: e.pageSettingState.pageTreeKey,
@@ -962,19 +962,19 @@ function sa(t, a, i, e, r, s) {
962
962
  }, 8, ["modelValue"])
963
963
  ], 64);
964
964
  }
965
- const ra = /* @__PURE__ */ J(ta, [["render", sa], ["__scopeId", "data-v-5bb39c39"]]), ca = {
966
- getPageById: async (t) => {
967
- if (t)
968
- return Ie(t);
965
+ const $t = /* @__PURE__ */ J(Wt, [["render", Zt], ["__scopeId", "data-v-8742a262"]]), ea = {
966
+ getPageById: async (a) => {
967
+ if (a)
968
+ return be(a);
969
969
  },
970
970
  openPageSettingPanel: ie
971
- }, la = {
971
+ }, ta = {
972
972
  components: {
973
- PageSetting: Xt,
974
- PluginPanel: rt,
975
- SvgButton: be,
976
- PageFolderSetting: Yt,
977
- PageTree: ra
973
+ PageSetting: Mt,
974
+ PluginPanel: nt,
975
+ SvgButton: De,
976
+ PageFolderSetting: qt,
977
+ PageTree: $t
978
978
  },
979
979
  props: {
980
980
  title: {
@@ -984,24 +984,24 @@ const ra = /* @__PURE__ */ J(ta, [["render", sa], ["__scopeId", "data-v-5bb39c39
984
984
  },
985
985
  setup() {
986
986
  const {
987
- pageState: t
988
- } = Ce(), {
989
- pageSettingState: a,
987
+ pageState: a
988
+ } = Se(), {
989
+ pageSettingState: t,
990
990
  getDefaultPage: i,
991
991
  isTemporaryPage: e,
992
992
  initCurrentPageData: r
993
- } = M(), s = G(null), _ = a.ROOT_ID, n = tt().getDocsUrl("page"), l = X({
993
+ } = M(), s = G(null), f = t.ROOT_ID, n = Ze().getDocsUrl("page"), c = X({
994
994
  isFolder: !1
995
995
  }), d = (S) => {
996
- H(), a.isNew = !0;
996
+ H(), t.isNew = !0;
997
997
  try {
998
998
  const u = i();
999
999
  if (!u)
1000
1000
  throw new Error("Failed to get default page configuration");
1001
- a.currentPageData = {
1001
+ t.currentPageData = {
1002
1002
  ...i(),
1003
1003
  ...u,
1004
- parentId: _,
1004
+ parentId: f,
1005
1005
  route: "",
1006
1006
  name: "Untitled",
1007
1007
  page_content: {
@@ -1011,28 +1011,28 @@ const ra = /* @__PURE__ */ J(ta, [["render", sa], ["__scopeId", "data-v-5bb39c39
1011
1011
  };
1012
1012
  } catch {
1013
1013
  }
1014
- a.currentPageDataCopy = Z(!0, {}, a.currentPageData), l.isFolder = !1, ie();
1015
- }, f = () => {
1016
- L(), a.isNew = !0, a.currentPageData = {
1017
- parentId: _,
1014
+ t.currentPageDataCopy = Z(!0, {}, t.currentPageData), c.isFolder = !1, ie();
1015
+ }, _ = () => {
1016
+ L(), t.isNew = !0, t.currentPageData = {
1017
+ parentId: f,
1018
1018
  route: "",
1019
1019
  name: "untitled"
1020
- }, a.currentPageDataCopy = Z(!0, {}, a.currentPageData), l.isFolder = !0, Be();
1020
+ }, t.currentPageDataCopy = Z(!0, {}, t.currentPageData), c.isFolder = !0, xe();
1021
1021
  };
1022
1022
  ee(() => {
1023
1023
  e.saved && ie();
1024
1024
  });
1025
1025
  const m = async (S) => {
1026
1026
  var k;
1027
- l.isFolder = !S.data.isPage, a.isNew = !1;
1028
- const u = S.data.id !== a.currentPageData.id;
1029
- l.isFolder ? (u && L(), Be()) : (u && H(), ie());
1030
- const N = await Ie((k = S.data) == null ? void 0 : k.id);
1027
+ c.isFolder = !S.data.isPage, t.isNew = !1;
1028
+ const u = S.data.id !== t.currentPageData.id;
1029
+ c.isFolder ? (u && L(), xe()) : (u && H(), ie());
1030
+ const N = await be((k = S.data) == null ? void 0 : k.id);
1031
1031
  r(N);
1032
1032
  };
1033
- return Ye("openSettingPanel", m), {
1034
- state: l,
1035
- pageState: t,
1033
+ return We("openSettingPanel", m), {
1034
+ state: c,
1035
+ pageState: a,
1036
1036
  openNewPage: (S) => {
1037
1037
  s.value.switchPage(S);
1038
1038
  },
@@ -1041,42 +1041,42 @@ const ra = /* @__PURE__ */ J(ta, [["render", sa], ["__scopeId", "data-v-5bb39c39
1041
1041
  L(), H();
1042
1042
  },
1043
1043
  openSettingPanel: m,
1044
- createNewFolder: f,
1044
+ createNewFolder: _,
1045
1045
  createNewPage: d,
1046
1046
  docsUrl: n
1047
1047
  };
1048
1048
  }
1049
1049
  };
1050
- function ia(t, a, i, e, r, s) {
1051
- const _ = p("svg-button"), n = p("page-tree"), l = p("plugin-panel"), d = p("page-setting"), f = p("page-folder-setting");
1052
- return I(), q(ye, null, [
1053
- g(l, {
1050
+ function aa(a, t, i, e, r, s) {
1051
+ const f = p("svg-button"), n = p("page-tree"), c = p("plugin-panel"), d = p("page-setting"), _ = p("page-folder-setting");
1052
+ return I(), q(_e, null, [
1053
+ g(c, {
1054
1054
  title: i.title,
1055
1055
  onClose: e.pluginPanelClosed,
1056
1056
  docsUrl: e.docsUrl,
1057
1057
  isShowDocsIcon: !0
1058
1058
  }, {
1059
- header: h(() => [
1060
- g(_, {
1059
+ header: D(() => [
1060
+ g(f, {
1061
1061
  class: "add-folder-icon",
1062
1062
  name: "add-folder",
1063
1063
  placement: "bottom",
1064
1064
  tips: "新建文件夹",
1065
1065
  onClick: e.createNewFolder
1066
1066
  }, null, 8, ["onClick"]),
1067
- g(_, {
1067
+ g(f, {
1068
1068
  class: "new-page-icon",
1069
1069
  name: "new-page",
1070
1070
  placement: "bottom",
1071
1071
  tips: "新建页面",
1072
- onClick: a[0] || (a[0] = (m) => e.createNewPage("staticPages"))
1072
+ onClick: t[0] || (t[0] = (m) => e.createNewPage("staticPages"))
1073
1073
  })
1074
1074
  ]),
1075
- content: h(() => [
1075
+ content: D(() => [
1076
1076
  g(n, {
1077
1077
  ref: "pageTreeRef",
1078
1078
  isFolder: e.state.isFolder,
1079
- onAdd: a[1] || (a[1] = (m) => e.createNewPage("publicPages")),
1079
+ onAdd: t[1] || (t[1] = (m) => e.createNewPage("publicPages")),
1080
1080
  onOpenSettingPanel: e.openSettingPanel
1081
1081
  }, null, 8, ["isFolder", "onOpenSettingPanel"])
1082
1082
  ]),
@@ -1086,12 +1086,12 @@ function ia(t, a, i, e, r, s) {
1086
1086
  isFolder: e.state.isFolder,
1087
1087
  onOpenNewPage: e.openNewPage
1088
1088
  }, null, 8, ["isFolder", "onOpenNewPage"]),
1089
- g(f, {
1089
+ g(_, {
1090
1090
  isFolder: e.state.isFolder
1091
1091
  }, null, 8, ["isFolder"])
1092
1092
  ], 64);
1093
1093
  }
1094
- const ga = /* @__PURE__ */ J(la, [["render", ia], ["__scopeId", "data-v-2a7e948f"]]), ce = {
1094
+ const na = /* @__PURE__ */ J(ta, [["render", aa], ["__scopeId", "data-v-ab2e6412"]]), le = {
1095
1095
  app: "",
1096
1096
  name: "",
1097
1097
  route: "",
@@ -1115,7 +1115,7 @@ const ga = /* @__PURE__ */ J(la, [["render", ia], ["__scopeId", "data-v-2a7e948f
1115
1115
  parentId: "none",
1116
1116
  isBody: !1,
1117
1117
  group: "staticPages"
1118
- }, pa = G(null), F = X({
1118
+ }, oa = G(null), F = X({
1119
1119
  currentPageDataCopy: {},
1120
1120
  // 记录当前页最开始的状态,当用户点击取消按钮的时候恢复到初始状态
1121
1121
  currentPageData: {},
@@ -1128,124 +1128,124 @@ const ga = /* @__PURE__ */ J(la, [["render", ia], ["__scopeId", "data-v-2a7e948f
1128
1128
  // 根节点ID
1129
1129
  updateTreeData: null,
1130
1130
  treeDataMapping: {}
1131
- }), ua = X({
1131
+ }), sa = X({
1132
1132
  saved: !1
1133
- }), da = (t, a) => {
1133
+ }), ra = (a, t) => {
1134
1134
  var r, s;
1135
- if (!((r = t == null ? void 0 : t.pageBaseStyle) != null && r.className) || !((s = t == null ? void 0 : t.pageBaseStyle) != null && s.style))
1135
+ if (!((r = a == null ? void 0 : a.pageBaseStyle) != null && r.className) || !((s = a == null ? void 0 : a.pageBaseStyle) != null && s.style))
1136
1136
  return "";
1137
- const i = (_, n) => `.${_} {
1137
+ const i = (f, n) => `.${f} {
1138
1138
  ${n.trim()}
1139
1139
  }
1140
- `, e = `.${t.pageBaseStyle.className}{\r
1141
- ${t.pageBaseStyle.style}\r
1140
+ `, e = `.${a.pageBaseStyle.className}{\r
1141
+ ${a.pageBaseStyle.style}\r
1142
1142
  }\r
1143
1143
  `;
1144
- return a.useBaseStyle ? [
1145
- i(t.pageBaseStyle.className, t.pageBaseStyle.style),
1146
- i(a.blockBaseStyle.className, a.blockBaseStyle.style),
1147
- i(a.componentBaseStyle.className, a.componentBaseStyle.style)
1144
+ return t.useBaseStyle ? [
1145
+ i(a.pageBaseStyle.className, a.pageBaseStyle.style),
1146
+ i(t.blockBaseStyle.className, t.blockBaseStyle.style),
1147
+ i(t.componentBaseStyle.className, t.componentBaseStyle.style)
1148
1148
  ].join(`
1149
1149
  `) : e;
1150
- }, ma = () => {
1151
- const t = Ve("engine.plugins.materials"), a = Ve("engine.plugins.appmanage");
1152
- return !t || !a || !a.pageBaseStyle ? { ...ce } : {
1153
- ...ce,
1150
+ }, la = () => {
1151
+ const a = ke("engine.plugins.materials"), t = ke("engine.plugins.appmanage");
1152
+ return !a || !t || !t.pageBaseStyle ? { ...le } : {
1153
+ ...le,
1154
1154
  page_content: {
1155
- ...ce.page_content,
1155
+ ...le.page_content,
1156
1156
  props: {
1157
- ...ce.page_content.props,
1158
- className: a.pageBaseStyle.className
1157
+ ...le.page_content.props,
1158
+ className: t.pageBaseStyle.className
1159
1159
  },
1160
- css: da(a, t)
1160
+ css: ra(t, a)
1161
1161
  }
1162
1162
  };
1163
- }, _a = () => {
1164
- const t = F.currentPageData || {}, a = F.currentPageDataCopy || {};
1163
+ }, ca = () => {
1164
+ const a = F.currentPageData || {}, t = F.currentPageDataCopy || {};
1165
1165
  let i = !0;
1166
- return Object.keys(a).some((e) => {
1166
+ return Object.keys(t).some((e) => {
1167
1167
  if (["children", "label", "createdBy", "assets", "occupier"].includes(e))
1168
1168
  return !1;
1169
1169
  if (e === "page_content") {
1170
1170
  const r = {
1171
- inputs: a[e].inputs,
1172
- outputs: a[e].outputs,
1173
- lifeCycles: a[e].lifeCycles
1174
- }, s = {
1175
1171
  inputs: t[e].inputs,
1176
1172
  outputs: t[e].outputs,
1177
1173
  lifeCycles: t[e].lifeCycles
1174
+ }, s = {
1175
+ inputs: a[e].inputs,
1176
+ outputs: a[e].outputs,
1177
+ lifeCycles: a[e].lifeCycles
1178
1178
  };
1179
1179
  JSON.stringify(r) !== JSON.stringify(s) && (i = !1);
1180
1180
  } else
1181
- a[e] !== t[e] && (i = !1);
1181
+ t[e] !== a[e] && (i = !1);
1182
1182
  return !i;
1183
1183
  }), i;
1184
- }, Pa = (t, a) => {
1184
+ }, ia = (a, t) => {
1185
1185
  var i, e;
1186
- if (t && a && t !== a) {
1187
- const r = F.treeDataMapping[t], s = F.treeDataMapping[a], _ = F.currentPageData.id, n = (e = (i = s.children) == null ? void 0 : i.findIndex) == null ? void 0 : e.call(i, ({ id: l }) => l === _);
1186
+ if (a && t && a !== t) {
1187
+ const r = F.treeDataMapping[a], s = F.treeDataMapping[t], f = F.currentPageData.id, n = (e = (i = s.children) == null ? void 0 : i.findIndex) == null ? void 0 : e.call(i, ({ id: c }) => c === f);
1188
1188
  n > -1 && (s.children.splice(n, 1), r.children || (r.children = []), r.children.unshift(F.currentPageData), F.pageTreeKey++);
1189
1189
  }
1190
- }, fa = () => F.currentPageData.page_content || {}, ya = (t) => {
1191
- F.currentPageData = t, F.currentPageDataCopy = Z(!0, {}, t), F.oldParentId = t.parentId;
1192
- }, Sa = () => {
1190
+ }, ga = () => F.currentPageData.page_content || {}, pa = (a) => {
1191
+ F.currentPageData = a, F.currentPageDataCopy = Z(!0, {}, a), F.oldParentId = a.parentId;
1192
+ }, ua = () => {
1193
1193
  F.currentPageData = {}, F.currentPageDataCopy = {}, F.oldParentId = null;
1194
- }, ha = () => !pe(F.currentPageData, F.currentPageDataCopy), Da = 0, Ca = 1, ba = () => ({
1195
- getDefaultPage: ma,
1196
- selectedTemplateCard: pa,
1194
+ }, da = () => !pe(F.currentPageData, F.currentPageDataCopy), ma = 0, fa = 1, Pa = () => ({
1195
+ getDefaultPage: la,
1196
+ selectedTemplateCard: oa,
1197
1197
  pageSettingState: F,
1198
- isTemporaryPage: ua,
1199
- isCurrentDataSame: _a,
1200
- changeTreeData: Pa,
1201
- getPageContent: fa,
1202
- resetPageData: Sa,
1203
- initCurrentPageData: ya,
1204
- isChangePageData: ha,
1205
- STATIC_PAGE_GROUP_ID: Da,
1206
- COMMON_PAGE_GROUP_ID: Ca
1207
- }), va = {
1198
+ isTemporaryPage: sa,
1199
+ isCurrentDataSame: ca,
1200
+ changeTreeData: ia,
1201
+ getPageContent: ga,
1202
+ resetPageData: ua,
1203
+ initCurrentPageData: pa,
1204
+ isChangePageData: da,
1205
+ STATIC_PAGE_GROUP_ID: ma,
1206
+ COMMON_PAGE_GROUP_ID: fa
1207
+ }), _a = {
1208
1208
  id: "engine.service.page",
1209
1209
  type: "MetaService",
1210
- apis: ba(),
1210
+ apis: Pa(),
1211
1211
  composable: {
1212
- name: at.usePage
1212
+ name: $e.usePage
1213
1213
  }
1214
- }, Na = {
1214
+ }, ya = {
1215
1215
  components: {
1216
- TinyCheckbox: Le
1216
+ TinyCheckbox: Ae
1217
1217
  },
1218
1218
  setup() {
1219
- const { pageSettingState: t, STATIC_PAGE_GROUP_ID: a } = M(), { handleRouteHomeUpdate: i } = ue, { confirm: e } = z(), r = X({
1219
+ const { pageSettingState: a, STATIC_PAGE_GROUP_ID: t } = M(), { handleRouteHomeUpdate: i } = ue, { confirm: e } = z(), r = X({
1220
1220
  checked: !1,
1221
1221
  selectDisable: !1
1222
1222
  });
1223
1223
  ee(() => {
1224
1224
  var d;
1225
- const l = !!((d = t.currentPageData) != null && d.isHome);
1226
- r.checked = l, r.selectDisable = l;
1225
+ const c = !!((d = a.currentPageData) != null && d.isHome);
1226
+ r.checked = c, r.selectDisable = c;
1227
1227
  });
1228
1228
  const s = ge(() => {
1229
- let l = "暂无主页";
1230
- if (t.pages[a]) {
1231
- const f = t.pages[a].data.filter((m) => m.isHome);
1232
- f[0] && (l = f[0].name);
1229
+ let c = "暂无主页";
1230
+ if (a.pages[t]) {
1231
+ const _ = a.pages[t].data.filter((m) => m.isHome);
1232
+ _[0] && (c = _[0].name);
1233
1233
  }
1234
- return l;
1235
- }), _ = Ze("openSettingPanel");
1234
+ return c;
1235
+ }), f = ze("openSettingPanel");
1236
1236
  return {
1237
- pageSettingState: t,
1237
+ pageSettingState: a,
1238
1238
  settingHome: () => {
1239
1239
  e({
1240
1240
  title: "提示",
1241
1241
  type: "warning ",
1242
1242
  message: "是否确定要将此页面设置为主页?您所做的任何未保存的更改都将被丢弃。",
1243
1243
  exec: () => {
1244
- const { id: l } = t.currentPageData, d = t.ROOT_ID, f = { ...t.currentPageData };
1245
- f.parentId = d, f.isHome = !0, i(l, f).then(() => {
1246
- t.updateTreeData(), _({ data: t.currentPageData }), t.isNew = !1, Ke && _t({
1247
- pageId: l,
1248
- componentsTree: f
1244
+ const { id: c } = a.currentPageData, d = a.ROOT_ID, _ = { ...a.currentPageData };
1245
+ _.parentId = d, _.isHome = !0, i(c, _).then(() => {
1246
+ a.updateTreeData(), f({ data: a.currentPageData }), a.isNew = !1, je && ut({
1247
+ pageId: c,
1248
+ componentsTree: _
1249
1249
  }), O({ message: "主页设置成功!", type: "success" });
1250
1250
  }).catch(() => {
1251
1251
  O({ message: "主页设置失败!", type: "error" });
@@ -1260,36 +1260,36 @@ const ga = /* @__PURE__ */ J(la, [["render", ia], ["__scopeId", "data-v-2a7e948f
1260
1260
  state: r
1261
1261
  };
1262
1262
  }
1263
- }, Ia = (t) => (Se("data-v-46b25916"), t = t(), he(), t), Ta = { class: "home" }, Fa = { class: "tip" }, wa = /* @__PURE__ */ Ia(() => /* @__PURE__ */ w("span", null, "当前主页是", -1)), ka = { class: "home-page" };
1264
- function Oa(t, a, i, e, r, s) {
1265
- const _ = p("tiny-checkbox");
1266
- return I(), q("div", Ta, [
1267
- g(_, {
1263
+ }, Sa = { class: "home" }, Da = { class: "tip" }, ha = { class: "home-page" };
1264
+ function Ca(a, t, i, e, r, s) {
1265
+ const f = p("tiny-checkbox");
1266
+ return I(), q("div", Sa, [
1267
+ g(f, {
1268
1268
  class: "selectHome",
1269
1269
  modelValue: e.state.checked,
1270
- "onUpdate:modelValue": a[0] || (a[0] = (n) => e.state.checked = n),
1270
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => e.state.checked = n),
1271
1271
  disabled: e.state.selectDisable,
1272
1272
  onChange: e.settingHome
1273
1273
  }, {
1274
- default: h(() => [
1274
+ default: D(() => t[1] || (t[1] = [
1275
1275
  Y("设为主页")
1276
- ]),
1276
+ ])),
1277
1277
  _: 1
1278
1278
  }, 8, ["modelValue", "disabled", "onChange"]),
1279
- w("div", Fa, [
1280
- wa,
1281
- w("span", ka, "【" + De(e.homePage) + "】", 1)
1279
+ w("div", Da, [
1280
+ t[2] || (t[2] = w("span", null, "当前主页是", -1)),
1281
+ w("span", ha, "【" + ye(e.homePage) + "】", 1)
1282
1282
  ])
1283
1283
  ]);
1284
1284
  }
1285
- const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916"]]), Va = {
1285
+ const ba = /* @__PURE__ */ J(ya, [["render", Ca], ["__scopeId", "data-v-bf1c3be4"]]), va = {
1286
1286
  components: {
1287
- TinyForm: it,
1288
- TinyFormItem: gt,
1289
- TinyInput: qe,
1290
- TinySelect: pt,
1291
- PageHome: Ea,
1292
- TinyRadio: ut
1287
+ TinyForm: rt,
1288
+ TinyFormItem: lt,
1289
+ TinyInput: Ue,
1290
+ TinySelect: ct,
1291
+ PageHome: ba,
1292
+ TinyRadio: it
1293
1293
  },
1294
1294
  props: {
1295
1295
  modelValue: {
@@ -1303,28 +1303,28 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1303
1303
  },
1304
1304
  setup() {
1305
1305
  const {
1306
- pageSettingState: t,
1307
- changeTreeData: a,
1306
+ pageSettingState: a,
1307
+ changeTreeData: t,
1308
1308
  STATIC_PAGE_GROUP_ID: i
1309
- } = M(), e = t.ROOT_ID, r = G(t.currentPageData.parentId);
1309
+ } = M(), e = a.ROOT_ID, r = G(a.currentPageData.parentId);
1310
1310
  ee(() => {
1311
- r.value = t.oldParentId;
1311
+ r.value = a.oldParentId;
1312
1312
  });
1313
1313
  const s = ge(() => {
1314
- let C = t.currentPageData.route || "", S = t.currentPageData.parentId;
1314
+ let C = a.currentPageData.route || "", S = a.currentPageData.parentId;
1315
1315
  for (; S !== e; ) {
1316
- const u = t.treeDataMapping[S];
1316
+ const u = a.treeDataMapping[S];
1317
1317
  if (!u)
1318
1318
  break;
1319
1319
  C = `${u.route}/${C}`, S = u.parentId;
1320
1320
  }
1321
1321
  return C.startsWith("/") && (C = C.slice(1)), C;
1322
- }), _ = {
1322
+ }), f = {
1323
1323
  name: [{
1324
1324
  required: !0,
1325
1325
  message: "请输入页面 ID"
1326
1326
  }, {
1327
- pattern: Dt,
1327
+ pattern: yt,
1328
1328
  message: "只允许包含英文字母,且为大写开头驼峰格式, 如DemoPage"
1329
1329
  }, {
1330
1330
  min: 3,
@@ -1335,7 +1335,7 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1335
1335
  required: !0,
1336
1336
  message: "请输入页面路由"
1337
1337
  }, {
1338
- pattern: Ge,
1338
+ pattern: Ee,
1339
1339
  message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
1340
1340
  }]
1341
1341
  }, n = {
@@ -1343,7 +1343,7 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1343
1343
  required: !0,
1344
1344
  message: "请输入页面文件夹 ID"
1345
1345
  }, {
1346
- pattern: Ct,
1346
+ pattern: St,
1347
1347
  message: "只允许包含英文字母、数字、下横线_、中横线-, 且以英文字母开头"
1348
1348
  }, {
1349
1349
  min: 3,
@@ -1354,17 +1354,17 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1354
1354
  required: !0,
1355
1355
  message: "请输入页面文件夹路由"
1356
1356
  }, {
1357
- pattern: Ge,
1357
+ pattern: Ee,
1358
1358
  message: "只允许包含英文字母、数字、下横线_、中横线-、正斜杠/, 且以英文字母开头"
1359
1359
  }],
1360
1360
  group: [{
1361
1361
  required: !0,
1362
1362
  message: "必须选择页面类型"
1363
1363
  }]
1364
- }, l = (C) => {
1364
+ }, c = (C) => {
1365
1365
  const S = [];
1366
1366
  return C.forEach((u) => {
1367
- !u.isPage && u.id !== t.currentPageData.id && (S.push(u), u.children || (u.children = []), u.children = l(u.children));
1367
+ !u.isPage && u.id !== a.currentPageData.id && (S.push(u), u.children || (u.children = []), u.children = c(u.children));
1368
1368
  }), S;
1369
1369
  }, d = ge(() => {
1370
1370
  var T;
@@ -1374,12 +1374,12 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1374
1374
  }, null), S = g(p("SvgIcon"), {
1375
1375
  name: "text-page-folder",
1376
1376
  class: "folder-icon"
1377
- }, null), u = ((T = t.pages[i]) == null ? void 0 : T.data) || [];
1377
+ }, null), u = ((T = a.pages[i]) == null ? void 0 : T.data) || [];
1378
1378
  return {
1379
1379
  data: [{
1380
1380
  name: "无",
1381
1381
  id: e
1382
- }, ...l(JSON.parse(JSON.stringify(u)))],
1382
+ }, ...c(JSON.parse(JSON.stringify(u)))],
1383
1383
  shrinkIcon: S,
1384
1384
  expandIcon: C,
1385
1385
  renderContent: (U, {
@@ -1394,35 +1394,35 @@ const Ea = /* @__PURE__ */ J(Na, [["render", Oa], ["__scopeId", "data-v-46b25916
1394
1394
  class: "label"
1395
1395
  }, [K.label])])
1396
1396
  };
1397
- }), f = G(null);
1397
+ }), _ = G(null);
1398
1398
  return {
1399
- pageRules: _,
1399
+ pageRules: f,
1400
1400
  folderRules: n,
1401
- pageSettingState: t,
1402
- generalForm: f,
1401
+ pageSettingState: a,
1402
+ generalForm: _,
1403
1403
  validGeneralForm: () => new Promise((C, S) => {
1404
- f.value.validate((u) => {
1404
+ _.value.validate((u) => {
1405
1405
  u ? C(u) : S(u);
1406
1406
  });
1407
1407
  }),
1408
1408
  treeFolderOp: d,
1409
1409
  currentRoute: s,
1410
1410
  changeParentForderId: (C) => {
1411
- a(C.id, r.value), r.value = C.id;
1411
+ t(C.id, r.value), r.value = C.id;
1412
1412
  }
1413
1413
  };
1414
1414
  }
1415
- }, xa = (t) => (Se("data-v-a8400625"), t = t(), he(), t), Ga = { class: "general-config" }, Ra = { class: "tip" }, Ba = {
1415
+ }, Na = { class: "general-config" }, Ia = { class: "tip" }, Ta = {
1416
1416
  key: 0,
1417
1417
  class: "text"
1418
- }, Ha = {
1418
+ }, Fa = {
1419
1419
  key: 1,
1420
1420
  class: "route-text"
1421
- }, Aa = /* @__PURE__ */ xa(() => /* @__PURE__ */ w("span", { class: "text" }, "website.com/", -1)), Ma = { class: "text-dim" };
1422
- function Ua(t, a, i, e, r, s) {
1423
- const _ = p("tiny-radio"), n = p("tiny-form-item"), l = p("tiny-input"), d = p("tiny-select"), f = p("tiny-form"), m = p("page-home");
1424
- return I(), q("div", Ga, [
1425
- g(f, {
1421
+ }, wa = { class: "text-dim" };
1422
+ function ka(a, t, i, e, r, s) {
1423
+ const f = p("tiny-radio"), n = p("tiny-form-item"), c = p("tiny-input"), d = p("tiny-select"), _ = p("tiny-form"), m = p("page-home");
1424
+ return I(), q("div", Na, [
1425
+ g(_, {
1426
1426
  ref: "generalForm",
1427
1427
  model: e.pageSettingState.currentPageData,
1428
1428
  rules: i.isFolder ? e.folderRules : e.pageRules,
@@ -1433,34 +1433,34 @@ function Ua(t, a, i, e, r, s) {
1433
1433
  "label-position": "top",
1434
1434
  class: "general-config-form"
1435
1435
  }, {
1436
- default: h(() => [
1436
+ default: D(() => [
1437
1437
  i.isFolder ? A("", !0) : (I(), E(n, {
1438
1438
  key: 0,
1439
1439
  prop: "group",
1440
1440
  label: "页面类型",
1441
1441
  class: "form-item-page-type"
1442
1442
  }, {
1443
- default: h(() => [
1444
- g(_, {
1443
+ default: D(() => [
1444
+ g(f, {
1445
1445
  modelValue: e.pageSettingState.currentPageData.group,
1446
- "onUpdate:modelValue": a[0] || (a[0] = (v) => e.pageSettingState.currentPageData.group = v),
1446
+ "onUpdate:modelValue": t[0] || (t[0] = (v) => e.pageSettingState.currentPageData.group = v),
1447
1447
  class: "page-type-radio",
1448
1448
  label: "staticPages"
1449
1449
  }, {
1450
- default: h(() => [
1450
+ default: D(() => t[5] || (t[5] = [
1451
1451
  Y(" 静态页面 ")
1452
- ]),
1452
+ ])),
1453
1453
  _: 1
1454
1454
  }, 8, ["modelValue"]),
1455
- g(_, {
1455
+ g(f, {
1456
1456
  modelValue: e.pageSettingState.currentPageData.group,
1457
- "onUpdate:modelValue": a[1] || (a[1] = (v) => e.pageSettingState.currentPageData.group = v),
1457
+ "onUpdate:modelValue": t[1] || (t[1] = (v) => e.pageSettingState.currentPageData.group = v),
1458
1458
  class: "page-type-radio",
1459
1459
  label: "publicPages"
1460
1460
  }, {
1461
- default: h(() => [
1461
+ default: D(() => t[6] || (t[6] = [
1462
1462
  Y(" 公共页面 ")
1463
- ]),
1463
+ ])),
1464
1464
  _: 1
1465
1465
  }, 8, ["modelValue"])
1466
1466
  ]),
@@ -1470,10 +1470,10 @@ function Ua(t, a, i, e, r, s) {
1470
1470
  prop: "name",
1471
1471
  label: `${i.isFolder ? "文件夹" : "页面"}名称`
1472
1472
  }, {
1473
- default: h(() => [
1474
- g(l, {
1473
+ default: D(() => [
1474
+ g(c, {
1475
1475
  modelValue: e.pageSettingState.currentPageData.name,
1476
- "onUpdate:modelValue": a[2] || (a[2] = (v) => e.pageSettingState.currentPageData.name = v),
1476
+ "onUpdate:modelValue": t[2] || (t[2] = (v) => e.pageSettingState.currentPageData.name = v),
1477
1477
  placeholder: `请设置${i.isFolder ? "文件夹" : "页面"}名称`
1478
1478
  }, null, 8, ["modelValue", "placeholder"])
1479
1479
  ]),
@@ -1484,10 +1484,10 @@ function Ua(t, a, i, e, r, s) {
1484
1484
  label: "父文件夹",
1485
1485
  prop: "parentId"
1486
1486
  }, {
1487
- default: h(() => [
1487
+ default: D(() => [
1488
1488
  g(d, {
1489
1489
  modelValue: e.pageSettingState.currentPageData.parentId,
1490
- "onUpdate:modelValue": a[3] || (a[3] = (v) => e.pageSettingState.currentPageData.parentId = v),
1490
+ "onUpdate:modelValue": t[3] || (t[3] = (v) => e.pageSettingState.currentPageData.parentId = v),
1491
1491
  "value-field": "id",
1492
1492
  "render-type": "tree",
1493
1493
  "tree-op": e.treeFolderOp,
@@ -1503,17 +1503,17 @@ function Ua(t, a, i, e, r, s) {
1503
1503
  label: "页面路由",
1504
1504
  prop: "route"
1505
1505
  }, {
1506
- default: h(() => [
1507
- g(l, {
1506
+ default: D(() => [
1507
+ g(c, {
1508
1508
  modelValue: e.pageSettingState.currentPageData.route,
1509
- "onUpdate:modelValue": a[4] || (a[4] = (v) => e.pageSettingState.currentPageData.route = v),
1509
+ "onUpdate:modelValue": t[4] || (t[4] = (v) => e.pageSettingState.currentPageData.route = v),
1510
1510
  placeholder: "请设置路由"
1511
1511
  }, null, 8, ["modelValue"]),
1512
- w("div", Ra, [
1513
- e.pageSettingState.currentPageData.route ? (I(), q("span", Ha, [
1514
- Aa,
1515
- w("span", Ma, De(e.currentRoute), 1)
1516
- ])) : (I(), q("span", Ba, "路由将以website.com开头"))
1512
+ w("div", Ia, [
1513
+ e.pageSettingState.currentPageData.route ? (I(), q("span", Fa, [
1514
+ t[7] || (t[7] = w("span", { class: "text" }, "website.com/", -1)),
1515
+ w("span", wa, ye(e.currentRoute), 1)
1516
+ ])) : (I(), q("span", Ta, "路由将以website.com开头"))
1517
1517
  ])
1518
1518
  ]),
1519
1519
  _: 1
@@ -1524,10 +1524,10 @@ function Ua(t, a, i, e, r, s) {
1524
1524
  !i.isFolder && !e.pageSettingState.isNew && e.pageSettingState.currentPageData.group !== "public" ? (I(), E(m, { key: 0 })) : A("", !0)
1525
1525
  ]);
1526
1526
  }
1527
- const La = /* @__PURE__ */ J(Va, [["render", Ua], ["__scopeId", "data-v-a8400625"]]), on = {
1527
+ const Oa = /* @__PURE__ */ J(va, [["render", ka], ["__scopeId", "data-v-7be2b6ba"]]), Xa = {
1528
1528
  ...$,
1529
- apis: ca,
1530
- entry: ga,
1529
+ apis: ea,
1530
+ entry: na,
1531
1531
  options: {
1532
1532
  pageBaseStyle: {
1533
1533
  className: "page-base-style",
@@ -1535,11 +1535,11 @@ const La = /* @__PURE__ */ J(Va, [["render", Ua], ["__scopeId", "data-v-a8400625
1535
1535
  }
1536
1536
  },
1537
1537
  components: {
1538
- PageGeneral: La
1538
+ PageGeneral: Oa
1539
1539
  },
1540
- metas: [va]
1540
+ metas: [_a]
1541
1541
  };
1542
1542
  export {
1543
- va as PageService,
1544
- on as default
1543
+ _a as PageService,
1544
+ Xa as default
1545
1545
  };