go-view-worker 0.0.1 → 0.0.2

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.
Files changed (42) hide show
  1. package/dist/chunks/{403-382550a8.js → 403-48dde732.js} +2 -2
  2. package/dist/chunks/{404-3d357d75.js → 404-33eb13aa.js} +2 -2
  3. package/dist/chunks/{500-96d14fb0.js → 500-03632c55.js} +2 -2
  4. package/dist/chunks/{StylesSetting-952ff564.js → StylesSetting-307bbc38.js} +3 -3
  5. package/dist/chunks/{chartEditStore-a725b558.js → chartEditStore-5bf68359.js} +176 -181
  6. package/dist/chunks/{designStore-fe92c2ba.js → designStore-196559cb.js} +732 -723
  7. package/dist/chunks/{index-3fd591ea.js → index-08a8f4f7.js} +12 -12
  8. package/dist/chunks/{index-95c5f0a0.js → index-1d427a73.js} +167 -166
  9. package/dist/chunks/{index-82d00e13.js → index-1f14b418.js} +89 -93
  10. package/dist/chunks/{index-1cb69ab6.js → index-36d9b318.js} +8 -8
  11. package/dist/chunks/{index-62a7855c.js → index-479e043f.js} +13 -12
  12. package/dist/chunks/{index-00b6339d.js → index-5dad4e02.js} +6 -6
  13. package/dist/chunks/{index-51458edb.js → index-632e8cd2.js} +2 -2
  14. package/dist/chunks/{index-f266153a.js → index-64580c85.js} +106 -104
  15. package/dist/chunks/{index-de0a1234.js → index-7b9408cb.js} +36 -36
  16. package/dist/chunks/index-7eaf2edc.js +461 -0
  17. package/dist/chunks/index-928e54a7.js +94 -0
  18. package/dist/chunks/{index-a410a1d3.js → index-9926f668.js} +8 -8
  19. package/dist/chunks/{index-9502bd7e.js → index-9af87347.js} +14 -13
  20. package/dist/chunks/{index-da8ddb02.js → index-bfd775d9.js} +1 -1
  21. package/dist/chunks/{index-09e62bb4.js → index-c627e7d2.js} +12 -12
  22. package/dist/chunks/{index-0472b3a5.js → index-d6866a98.js} +48 -47
  23. package/dist/chunks/{index-f97e5ffc.js → index-dd95bed0.js} +1 -1
  24. package/dist/chunks/{index-32d13283.js → index-e65e8cdc.js} +6 -6
  25. package/dist/chunks/{index-fdf7dc1e.js → index-e8a302ce.js} +13 -13
  26. package/dist/chunks/{index-fec9f9f8.js → index-f4bd44a9.js} +66 -65
  27. package/dist/chunks/{index.vue_vue_type_script_setup_true_lang-c6159a17.js → index.vue_vue_type_script_setup_true_lang-58afdf72.js} +550 -549
  28. package/dist/chunks/{lodash-c80b695e.js → lodash-5bba33ba.js} +1 -1
  29. package/dist/chunks/{router-106a6abc.js → router-443d466c.js} +15 -15
  30. package/dist/chunks/{useKeyboard.hook-da88451a.js → useKeyboard.hook-da57df02.js} +27 -27
  31. package/dist/chunks/{useSyncUpdate.hook-5517a8ad.js → useSyncUpdate.hook-dfee2f43.js} +16 -16
  32. package/dist/chunks/{useTargetData.hook-28a7e43b.js → useTargetData.hook-77b72165.js} +1 -1
  33. package/dist/chunks/{wrapper-4c15ca94.js → wrapper-54705288.js} +4 -4
  34. package/dist/go-view-worker.js +13 -12
  35. package/dist/init.js +1 -1
  36. package/dist/resize.js +18 -0
  37. package/dist/style.css +2 -2
  38. package/dist/types/packages/resize.d.ts +1 -0
  39. package/dist/types/src/hooks/useLang.hook.d.ts +1 -1
  40. package/package.json +5 -1
  41. package/dist/chunks/index-097ae4b0.js +0 -436
  42. package/dist/chunks/index-54f304ef.js +0 -89
@@ -1,12 +1,12 @@
1
- import { defineComponent as I, computed as ge, reactive as he, ref as h, watch as E, resolveComponent as d, openBlock as f, createElementBlock as S, withDirectives as x, createVNode as c, unref as s, vShow as L, createElementVNode as O, withCtx as _, resolveDirective as fe, normalizeStyle as ve, useCssVars as Z, onUnmounted as ye, normalizeClass as T, Fragment as R, renderList as U, createBlock as $, createTextVNode as j, toDisplayString as q, isRef as Ce, createCommentVNode as be } from "vue";
2
- import { i as ee, h as ke, f as Se, a as Oe, c as xe, u as Ie } from "./index.vue_vue_type_script_setup_true_lang-c6159a17.js";
3
- import { C as we } from "./index-51458edb.js";
4
- import { d as He, u as Le, i as A, e as $e, l as Ne, f as Pe, h as Ee, j as D, k as G } from "./chartEditStore-a725b558.js";
1
+ import { defineComponent as I, computed as ge, reactive as he, ref as h, watch as E, resolveComponent as d, openBlock as f, createElementBlock as S, withDirectives as x, createVNode as c, unref as s, vShow as L, createElementVNode as O, withCtx as _, resolveDirective as fe, normalizeStyle as ve, useCssVars as Z, onUnmounted as ye, normalizeClass as T, Fragment as M, renderList as R, createBlock as P, createTextVNode as U, toDisplayString as q, isRef as Ce, createCommentVNode as be } from "vue";
2
+ import { j as ee, i as ke, k as Se, m as Oe, n as xe, u as Ie } from "./index.vue_vue_type_script_setup_true_lang-58afdf72.js";
3
+ import { C as we } from "./index-632e8cd2.js";
4
+ import { d as He, u as Le, i as A, e as Pe, f as $e, h as Ne, l as Ee, P as D, j as G } from "./chartEditStore-5bf68359.js";
5
5
  import "naive-ui";
6
- import { A as B, J as Te, K as ze, C as K } from "./designStore-fe92c2ba.js";
6
+ import { _ as B, v as Te, w as ze, b as K } from "./designStore-196559cb.js";
7
7
  import "vue-router";
8
- import { l as Ae, c as J } from "./index-82d00e13.js";
9
- import { u as te, a as Y, C as z } from "./index-097ae4b0.js";
8
+ import { l as Ae, c as Y } from "./index-1f14b418.js";
9
+ import { a as te, b as J, C as z } from "./index-7eaf2edc.js";
10
10
  const Be = { class: "go-chart-common" }, Fe = { class: "chart-content-list" }, Ve = /* @__PURE__ */ I({
11
11
  __name: "index",
12
12
  props: {
@@ -17,7 +17,7 @@ const Be = { class: "go-chart-common" }, Fe = { class: "chart-content-list" }, V
17
17
  }
18
18
  },
19
19
  setup(l) {
20
- const i = Ae(() => import("./index-fec9f9f8.js")), u = ee(), g = l, v = He(), k = ge(() => e.categorysNum > 2 ? !0 : !v.getHidePackageOneCategory);
20
+ const i = Ae(() => import("./index-f4bd44a9.js")), u = ee(), g = l, v = He(), k = ge(() => e.categorysNum > 2 ? !0 : !v.getHidePackageOneCategory);
21
21
  let e = he({
22
22
  // 侧边栏
23
23
  menuOptions: [],
@@ -82,7 +82,7 @@ const Be = { class: "go-chart-common" }, Fe = { class: "chart-content-list" }, V
82
82
  class: "chart-menu-width",
83
83
  value: p.value,
84
84
  "onUpdate:value": [
85
- o[0] || (o[0] = (N) => p.value = N),
85
+ o[0] || (o[0] = ($) => p.value = $),
86
86
  b
87
87
  ],
88
88
  options: s(e).menuOptions,
@@ -106,10 +106,10 @@ const Be = { class: "go-chart-common" }, Fe = { class: "chart-content-list" }, V
106
106
  };
107
107
  }
108
108
  });
109
- const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () => te(), oe = h(""), Q = (...l) => Re().setItem(...l), W = { value: !1 }, Ue = {
109
+ const je = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Me = () => te(), oe = h(""), Q = (...l) => Me().setItem(...l), W = { value: !1 }, Re = {
110
110
  class: "list-img",
111
111
  alt: "图表图片"
112
- }, je = /* @__PURE__ */ I({
112
+ }, Ue = /* @__PURE__ */ I({
113
113
  __name: "index",
114
114
  props: {
115
115
  chartConfig: {
@@ -129,7 +129,7 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
129
129
  }
130
130
  ), (v, k) => {
131
131
  const e = fe("lazy");
132
- return x((f(), S("img", Ue, null, 512)), [
132
+ return x((f(), S("img", Re, null, 512)), [
133
133
  [e, u.value]
134
134
  ]);
135
135
  };
@@ -167,7 +167,7 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
167
167
  })
168
168
  }, null, 12, qe));
169
169
  }
170
- }), Ge = { class: "go-chart-search-box" }, Ke = { class: "search-list-box" }, Je = ["title", "onClick"], Ye = /* @__PURE__ */ I({
170
+ }), Ge = { class: "go-chart-search-box" }, Ke = { class: "search-list-box" }, Ye = ["title", "onClick"], Je = /* @__PURE__ */ I({
171
171
  __name: "index",
172
172
  props: {
173
173
  menuOptions: {
@@ -180,33 +180,33 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
180
180
  "42a060ac": s(oe)
181
181
  }));
182
182
  const i = l, u = Le(), g = te(), { SearchIcon: v, AlbumsIcon: k, GridIcon: e } = A.ionicons5, p = h(!1), m = h(!1), y = h(void 0), b = h(null), n = h([]), o = h(g.getChartType), C = [
183
- { label: "单列", icon: k, value: Y.SINGLE },
184
- { label: "双列", icon: e, value: Y.DOUBLE }
185
- ], N = ((t) => {
183
+ { label: "单列", icon: k, value: J.SINGLE },
184
+ { label: "双列", icon: e, value: J.DOUBLE }
185
+ ], $ = ((t) => {
186
186
  const a = [];
187
187
  for (const H of t)
188
188
  a.push(...H.list);
189
189
  return a;
190
- })(i.menuOptions), P = () => {
190
+ })(i.menuOptions), N = () => {
191
191
  y.value = void 0, m.value = !1, b.value = null, n.value = [];
192
192
  }, ne = (t) => {
193
- if (!$e(t) || !t.length) {
194
- P();
193
+ if (!Pe(t) || !t.length) {
194
+ N();
195
195
  return;
196
196
  }
197
- y.value = !0, m.value = !0, n.value = N.filter(
197
+ y.value = !0, m.value = !0, n.value = $.filter(
198
198
  (a) => !a.disabled && (!t || a.title.toLowerCase().includes(t.toLowerCase()))
199
199
  ), setTimeout(() => {
200
200
  y.value = void 0;
201
201
  }, 500);
202
202
  }, F = (t) => {
203
- m.value && t.target && (t.target.closest(".go-chart-search") || P());
203
+ m.value && t.target && (t.target.closest(".go-chart-search") || N());
204
204
  }, se = async (t) => {
205
205
  if (!t.disabled)
206
206
  try {
207
- Ne(), J(t.chartKey, Se(t)), J(t.conKey, Oe(t));
207
+ $e(), Y(t.chartKey, Se(t)), Y(t.conKey, Oe(t));
208
208
  let a = await xe(t);
209
- t.redirectComponent && (t.dataset && (a.option.dataset = t.dataset), a.chartConfig.title = t.title, a.chartConfig.chartFrame = t.chartFrame), u.addComponentList(a, !1, !0), u.setTargetSelectChart(a.id), P(), Pe();
209
+ t.redirectComponent && (t.dataset && (a.option.dataset = t.dataset), a.chartConfig.title = t.title, a.chartConfig.chartFrame = t.chartFrame), u.addComponentList(a, !1, !0), u.setTargetSelectChart(a.id), N(), Ne();
210
210
  } catch {
211
211
  Ee(), window.$message.warning("图表正在研发中, 敬请期待...");
212
212
  }
@@ -270,19 +270,19 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
270
270
  }, null, 512), [
271
271
  [L, !n.value.length]
272
272
  ]),
273
- (f(!0), S(R, null, U(n.value, (r) => (f(), S("div", {
273
+ (f(!0), S(M, null, R(n.value, (r) => (f(), S("div", {
274
274
  class: "list-item go-flex-items-center go-ellipsis-1",
275
275
  key: r.key,
276
276
  title: r.title,
277
- onClick: (M) => se(r)
277
+ onClick: (j) => se(r)
278
278
  }, [
279
- r.icon ? (f(), $(s(De), {
279
+ r.icon ? (f(), P(s(De), {
280
280
  key: 0,
281
281
  class: "list-img",
282
282
  icon: r.icon,
283
283
  color: "#999",
284
284
  width: "20"
285
- }, null, 8, ["icon"])) : (f(), $(s(je), {
285
+ }, null, 8, ["icon"])) : (f(), P(s(Ue), {
286
286
  key: 1,
287
287
  class: "list-item-img",
288
288
  chartConfig: r
@@ -292,11 +292,11 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
292
292
  depth: "2"
293
293
  }, {
294
294
  default: _(() => [
295
- j(q(r.title), 1)
295
+ U(q(r.title), 1)
296
296
  ]),
297
297
  _: 2
298
298
  }, 1024)
299
- ], 8, Je))), 128))
299
+ ], 8, Ye))), 128))
300
300
  ]),
301
301
  _: 1
302
302
  }),
@@ -311,10 +311,10 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
311
311
  style: { display: "flex" }
312
312
  }, {
313
313
  default: _(() => [
314
- (f(), S(R, null, U(C, (r, M) => c(_e, {
314
+ (f(), S(M, null, R(C, (r, j) => c(_e, {
315
315
  ghost: "",
316
316
  size: "small",
317
- key: M,
317
+ key: j,
318
318
  type: o.value === r.value ? "primary" : "tertiary",
319
319
  onClick: (at) => ae(r.value)
320
320
  }, {
@@ -330,7 +330,7 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
330
330
  }, null, 8, ["component"])
331
331
  ]),
332
332
  default: _(() => [
333
- j(" " + q(r.label), 1)
333
+ U(" " + q(r.label), 1)
334
334
  ]),
335
335
  _: 2
336
336
  }, 1024)
@@ -344,7 +344,7 @@ const Me = /* @__PURE__ */ B(Ve, [["__scopeId", "data-v-00605800"]]), Re = () =>
344
344
  };
345
345
  }
346
346
  });
347
- const Qe = /* @__PURE__ */ B(Ye, [["__scopeId", "data-v-833c2b76"]]), { AirPlaneOutlineIcon: gt, ImageIcon: We, BarChartIcon: Xe } = A.ionicons5, { TableSplitIcon: ht, RoadmapIcon: Ze, ChartPieIcon: ft, SpellCheckIcon: vt, GraphicalDataFlowIcon: yt } = A.carbon, X = {
347
+ const Qe = /* @__PURE__ */ B(Je, [["__scopeId", "data-v-833c2b76"]]), { AirPlaneOutlineIcon: gt, ImageIcon: We, BarChartIcon: Xe } = A.ionicons5, { TableSplitIcon: ht, RoadmapIcon: Ze, ChartPieIcon: ft, SpellCheckIcon: vt, GraphicalDataFlowIcon: yt } = A.carbon, X = {
348
348
  [D.CHARTS]: {
349
349
  icon: K(Ze),
350
350
  label: G.CHARTS
@@ -414,7 +414,7 @@ const Qe = /* @__PURE__ */ B(Ye, [["__scopeId", "data-v-833c2b76"]]), { AirPlane
414
414
  const u = Ie().getMenuOptions, { getCharts: g, BarChartIcon: v, themeColor: k, selectOptions: e, selectValue: p, clickItemHandle: m } = et(u);
415
415
  return (y, b) => {
416
416
  const n = d("n-icon"), o = d("n-menu"), C = d("go-skeleton");
417
- return f(), $(s(we), {
417
+ return f(), P(s(we), {
418
418
  class: T(["go-content-charts", { scoped: !s(g) }]),
419
419
  title: "组件",
420
420
  depth: 1,
@@ -458,7 +458,7 @@ const Qe = /* @__PURE__ */ B(Ye, [["__scopeId", "data-v-833c2b76"]]), { AirPlane
458
458
  repeat: 2,
459
459
  style: { width: "90%" }
460
460
  }, null, 8, ["load"]),
461
- s(e) ? (f(), $(s(Me), {
461
+ s(e) ? (f(), P(s(je), {
462
462
  selectOptions: s(e),
463
463
  key: s(p)
464
464
  }, null, 8, ["selectOptions"])) : be("", !0)
@@ -477,6 +477,6 @@ const st = /* @__PURE__ */ B(nt, [["__scopeId", "data-v-3b9b52f8"]]), Ct = /* @_
477
477
  }, Symbol.toStringTag, { value: "Module" }));
478
478
  export {
479
479
  De as _,
480
- je as a,
480
+ Ue as a,
481
481
  Ct as i
482
482
  };
@@ -0,0 +1,461 @@
1
+ import { defineComponent as h, openBlock as O, createBlock as A, unref as u, withCtx as m, createVNode as v, renderSlot as I, toRefs as ae, computed as y, onMounted as ne, createElementBlock as oe, provide as S, watch as ie } from "vue";
2
+ import { useMessage as se, useDialog as le, useLoadingBar as ce, NLoadingBarProvider as ue, NDialogProvider as de, NNotificationProvider as fe, NMessageProvider as pe, darkTheme as ve, zhCN as ge, enUS as _e, dateZhCN as me, dateEnUS as he, NConfigProvider as Ce } from "naive-ui";
3
+ import { l as N, o as w, p as ye, u as Te, _ as Oe, k as Se, m as $e, n as Le } from "./index.vue_vue_type_script_setup_true_lang-58afdf72.js";
4
+ import { u as D, L as Ee, N as M, O as be, Q as Ae, a as Pe, R as Ne, T as H, U as V, V as Y, X as we, Y as Me, G as xe, Z as j, $ as Re, a0 as Be, a1 as ke, a2 as Ge, E as Ue, y as Fe, a3 as Ie, a4 as De, a5 as P, a6 as He, a7 as Ve, a8 as Ye, a9 as je, g as Ke, p as $ } from "./designStore-196559cb.js";
5
+ import "vue-router";
6
+ import { D as Ze } from "./index-1f14b418.js";
7
+ import { u as K, a as qe, C as L, k as Qe, m as T, n as x } from "./chartEditStore-5bf68359.js";
8
+ import { defineStore as Xe } from "pinia";
9
+ import "../resize.js";
10
+ const Je = /* @__PURE__ */ h({
11
+ __name: "index",
12
+ setup(e) {
13
+ return window.$message = se(), (t, r) => null;
14
+ }
15
+ }), We = /* @__PURE__ */ h({
16
+ __name: "index",
17
+ setup(e) {
18
+ return window.$dialog = le(), (t, r) => null;
19
+ }
20
+ }), ze = /* @__PURE__ */ h({
21
+ __name: "index",
22
+ setup(e) {
23
+ return window.$loading = ce(), window.$loading.finish(), (t, r) => null;
24
+ }
25
+ }), et = /* @__PURE__ */ h({
26
+ __name: "index",
27
+ setup(e) {
28
+ return (t, r) => (O(), A(u(ue), null, {
29
+ default: m(() => [
30
+ v(u(de), null, {
31
+ default: m(() => [
32
+ v(u(We)),
33
+ v(u(ze)),
34
+ v(u(fe), null, {
35
+ default: m(() => [
36
+ v(u(pe), null, {
37
+ default: m(() => [
38
+ v(u(Je)),
39
+ I(t.$slots, "default")
40
+ ]),
41
+ _: 3
42
+ })
43
+ ]),
44
+ _: 3
45
+ })
46
+ ]),
47
+ _: 3
48
+ })
49
+ ]),
50
+ _: 3
51
+ }));
52
+ }
53
+ }), tt = () => {
54
+ const e = D(), { getAppTheme: t } = ae(e);
55
+ return y(
56
+ () => {
57
+ const n = {
58
+ common: {
59
+ primaryColor: t.value,
60
+ primaryColorHover: N(w(t.value), 0.1),
61
+ primaryColorPressed: N(w(t.value), 0.1),
62
+ primaryColorSuppl: t.value,
63
+ borderRadius: Ee
64
+ }
65
+ }, o = {
66
+ common: {
67
+ ...n.common
68
+ }
69
+ }, i = {
70
+ common: {
71
+ ...n.common
72
+ },
73
+ LoadingBar: {
74
+ colorLoading: t.value
75
+ }
76
+ };
77
+ return e.getDarkTheme ? i : o;
78
+ }
79
+ );
80
+ }, rt = () => {
81
+ const e = D();
82
+ return y(() => e.getDarkTheme ? ve : void 0);
83
+ }, at = () => {
84
+ const e = ye(), t = y(() => e.getLang === M.ZH ? ge : _e), r = y(() => e.getLang === M.ZH ? me : he);
85
+ return {
86
+ locale: t,
87
+ dateLocale: r
88
+ };
89
+ }, nt = ["data-theme"], ot = /* @__PURE__ */ h({
90
+ __name: "index",
91
+ props: {
92
+ theme: {}
93
+ },
94
+ setup(e) {
95
+ const t = e, r = Te(), n = y(() => t.theme ?? (r.isDarkMode ? "dark" : "light") ?? "light"), o = rt(), i = tt(), { locale: c, dateLocale: l } = at();
96
+ return ne(() => {
97
+ }), (a, d) => (O(), oe("div", {
98
+ class: "go-view-container",
99
+ "data-theme": n.value
100
+ }, [
101
+ v(u(Ce), {
102
+ theme: u(o),
103
+ locale: u(c),
104
+ "date-locale": u(l),
105
+ "theme-overrides": u(i)
106
+ }, {
107
+ default: m(() => [
108
+ v(u(et), null, {
109
+ default: m(() => [
110
+ I(a.$slots, "default")
111
+ ]),
112
+ _: 3
113
+ })
114
+ ]),
115
+ _: 3
116
+ }, 8, ["theme", "locale", "date-locale", "theme-overrides"])
117
+ ], 8, nt));
118
+ }
119
+ });
120
+ const it = /* @__PURE__ */ h({
121
+ __name: "index",
122
+ props: {
123
+ data: {
124
+ type: Object,
125
+ default: null
126
+ }
127
+ },
128
+ setup(e) {
129
+ return (t, r) => (O(), A(Oe));
130
+ }
131
+ });
132
+ var Z = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.DOUBLE = "double", e))(Z || {}), q = /* @__PURE__ */ ((e) => (e.THUMBNAIL = "thumbnail", e.TEXT = "text", e))(q || {}), b = /* @__PURE__ */ ((e) => (e.LAYERS = "layers", e.CHARTS = "charts", e.DETAILS = "details", e.Chart_TYPE = "chartType", e.LAYER_TYPE = "layerType", e.PERCENTAGE = "percentage", e.RE_POSITION_CANVAS = "rePositionCanvas", e))(b || {});
133
+ const st = () => K(), { GO_CHART_LAYOUT_STORE: Q } = Pe, lt = be(Q), ct = Xe("useChartLayoutStore", {
134
+ state: () => ({
135
+ // 图层控制
136
+ layers: !0,
137
+ // 图表组件
138
+ charts: !0,
139
+ // 详情设置(收缩为true)
140
+ details: !1,
141
+ // 组件列表展示类型(默认单列)
142
+ chartType: Z.SINGLE,
143
+ // 图层类型(默认图片)
144
+ layerType: q.THUMBNAIL,
145
+ // 当前加载数量
146
+ percentage: 0,
147
+ // 是否重置当前画布位置
148
+ rePositionCanvas: !1,
149
+ // 防止值不存在
150
+ ...lt
151
+ }),
152
+ getters: {
153
+ getLayers() {
154
+ return this.layers;
155
+ },
156
+ getCharts() {
157
+ return this.charts;
158
+ },
159
+ getDetails() {
160
+ return this.details;
161
+ },
162
+ getChartType() {
163
+ return this.chartType;
164
+ },
165
+ getLayerType() {
166
+ return this.layerType;
167
+ },
168
+ getPercentage() {
169
+ return this.percentage;
170
+ },
171
+ getRePositionCanvas() {
172
+ return this.rePositionCanvas;
173
+ }
174
+ },
175
+ actions: {
176
+ setItem(e, t, r = !0) {
177
+ this.$patch((n) => {
178
+ n[e] = t;
179
+ }), Ae(Q, this.$state), this.rePositionCanvas = !0, r && setTimeout(() => {
180
+ st().computedScale();
181
+ }, 500);
182
+ },
183
+ setItemUnHandle(e, t) {
184
+ this.$patch((r) => {
185
+ r[e] = t;
186
+ });
187
+ }
188
+ }
189
+ });
190
+ var ut = Ne, dt = H;
191
+ function ft(e, t, r) {
192
+ (r !== void 0 && !dt(e[t], r) || r === void 0 && !(t in e)) && ut(e, t, r);
193
+ }
194
+ var X = ft;
195
+ function pt(e) {
196
+ return function(t, r, n) {
197
+ for (var o = -1, i = Object(t), c = n(t), l = c.length; l--; ) {
198
+ var a = c[e ? l : ++o];
199
+ if (r(i[a], a, i) === !1)
200
+ break;
201
+ }
202
+ return t;
203
+ };
204
+ }
205
+ var vt = pt, gt = vt, _t = gt(), mt = _t, ht = V, Ct = Y;
206
+ function yt(e) {
207
+ return Ct(e) && ht(e);
208
+ }
209
+ var Tt = yt, Ot = we, St = Me, $t = Y, Lt = "[object Object]", Et = Function.prototype, bt = Object.prototype, J = Et.toString, At = bt.hasOwnProperty, Pt = J.call(Object);
210
+ function Nt(e) {
211
+ if (!$t(e) || Ot(e) != Lt)
212
+ return !1;
213
+ var t = St(e);
214
+ if (t === null)
215
+ return !0;
216
+ var r = At.call(t, "constructor") && t.constructor;
217
+ return typeof r == "function" && r instanceof r && J.call(r) == Pt;
218
+ }
219
+ var wt = Nt;
220
+ function Mt(e, t) {
221
+ if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
222
+ return e[t];
223
+ }
224
+ var W = Mt, xt = xe, Rt = j;
225
+ function Bt(e) {
226
+ return xt(e, Rt(e));
227
+ }
228
+ var kt = Bt, R = X, Gt = Re, Ut = Be, Ft = ke, It = Ge, B = Ue, k = Fe, Dt = Tt, Ht = Ie, Vt = De, Yt = P, jt = wt, Kt = He, G = W, Zt = kt;
229
+ function qt(e, t, r, n, o, i, c) {
230
+ var l = G(e, r), a = G(t, r), d = c.get(a);
231
+ if (d) {
232
+ R(e, r, d);
233
+ return;
234
+ }
235
+ var s = i ? i(l, a, r + "", e, t, c) : void 0, f = s === void 0;
236
+ if (f) {
237
+ var _ = k(a), p = !_ && Ht(a), C = !_ && !p && Kt(a);
238
+ s = a, _ || p || C ? k(l) ? s = l : Dt(l) ? s = Ft(l) : p ? (f = !1, s = Gt(a, !0)) : C ? (f = !1, s = Ut(a, !0)) : s = [] : jt(a) || B(a) ? (s = l, B(l) ? s = Zt(l) : (!Yt(l) || Vt(l)) && (s = It(a))) : f = !1;
239
+ }
240
+ f && (c.set(a, s), o(s, a, n, i, c), c.delete(a)), R(e, r, s);
241
+ }
242
+ var Qt = qt, Xt = Ve, Jt = X, Wt = mt, zt = Qt, er = P, tr = j, rr = W;
243
+ function z(e, t, r, n, o) {
244
+ e !== t && Wt(t, function(i, c) {
245
+ if (o || (o = new Xt()), er(i))
246
+ zt(e, t, c, r, z, n, o);
247
+ else {
248
+ var l = n ? n(rr(e, c), i, c + "", e, t, o) : void 0;
249
+ l === void 0 && (l = i), Jt(e, c, l);
250
+ }
251
+ }, tr);
252
+ }
253
+ var ar = z;
254
+ function nr(e) {
255
+ return e;
256
+ }
257
+ var ee = nr;
258
+ function or(e, t, r) {
259
+ switch (r.length) {
260
+ case 0:
261
+ return e.call(t);
262
+ case 1:
263
+ return e.call(t, r[0]);
264
+ case 2:
265
+ return e.call(t, r[0], r[1]);
266
+ case 3:
267
+ return e.call(t, r[0], r[1], r[2]);
268
+ }
269
+ return e.apply(t, r);
270
+ }
271
+ var ir = or, sr = ir, U = Math.max;
272
+ function lr(e, t, r) {
273
+ return t = U(t === void 0 ? e.length - 1 : t, 0), function() {
274
+ for (var n = arguments, o = -1, i = U(n.length - t, 0), c = Array(i); ++o < i; )
275
+ c[o] = n[t + o];
276
+ o = -1;
277
+ for (var l = Array(t + 1); ++o < t; )
278
+ l[o] = n[o];
279
+ return l[t] = r(c), sr(e, this, l);
280
+ };
281
+ }
282
+ var cr = lr;
283
+ function ur(e) {
284
+ return function() {
285
+ return e;
286
+ };
287
+ }
288
+ var dr = ur, fr = dr, F = Ye, pr = ee, vr = F ? function(e, t) {
289
+ return F(e, "toString", {
290
+ configurable: !0,
291
+ enumerable: !1,
292
+ value: fr(t),
293
+ writable: !0
294
+ });
295
+ } : pr, gr = vr, _r = 800, mr = 16, hr = Date.now;
296
+ function Cr(e) {
297
+ var t = 0, r = 0;
298
+ return function() {
299
+ var n = hr(), o = mr - (n - r);
300
+ if (r = n, o > 0) {
301
+ if (++t >= _r)
302
+ return arguments[0];
303
+ } else
304
+ t = 0;
305
+ return e.apply(void 0, arguments);
306
+ };
307
+ }
308
+ var yr = Cr, Tr = gr, Or = yr, Sr = Or(Tr), $r = Sr, Lr = ee, Er = cr, br = $r;
309
+ function Ar(e, t) {
310
+ return br(Er(e, t, Lr), e + "");
311
+ }
312
+ var Pr = Ar, Nr = H, wr = V, Mr = je, xr = P;
313
+ function Rr(e, t, r) {
314
+ if (!xr(r))
315
+ return !1;
316
+ var n = typeof t;
317
+ return (n == "number" ? wr(r) && Mr(t, r.length) : n == "string" && t in r) ? Nr(r[t], e) : !1;
318
+ }
319
+ var Br = Rr, kr = Pr, Gr = Br;
320
+ function Ur(e) {
321
+ return kr(function(t, r) {
322
+ var n = -1, o = r.length, i = o > 1 ? r[o - 1] : void 0, c = o > 2 ? r[2] : void 0;
323
+ for (i = e.length > 3 && typeof i == "function" ? (o--, i) : void 0, c && Gr(r[0], r[1], c) && (i = o < 3 ? void 0 : i, o = 1), t = Object(t); ++n < o; ) {
324
+ var l = r[n];
325
+ l && e(t, l, n, i);
326
+ }
327
+ return t;
328
+ });
329
+ }
330
+ var Fr = Ur, Ir = ar, Dr = Fr, Hr = Dr(function(e, t, r) {
331
+ Ir(e, t, r);
332
+ }), Vr = Hr;
333
+ const E = /* @__PURE__ */ Ke(Vr), Yr = (e) => e, jr = (e, t) => {
334
+ try {
335
+ if (t.id) {
336
+ const r = "vnodeBeforeMount" in t.events, n = "vnodeMounted" in t.events;
337
+ return r && (e.events.advancedEvents.vnodeBeforeMount = t?.events.vnodeBeforeMount), n && (e.events.advancedEvents.vnodeMounted = t?.events.vnodeMounted), (r || n) && (t.events = {
338
+ baseEvent: {
339
+ [T.ON_CLICK]: void 0,
340
+ [T.ON_DBL_CLICK]: void 0,
341
+ [T.ON_MOUSE_ENTER]: void 0,
342
+ [T.ON_MOUSE_LEAVE]: void 0
343
+ },
344
+ advancedEvents: {
345
+ [x.VNODE_MOUNTED]: void 0,
346
+ [x.VNODE_BEFORE_MOUNT]: void 0
347
+ },
348
+ interactEvents: []
349
+ }), e;
350
+ }
351
+ } catch {
352
+ return e;
353
+ }
354
+ }, g = (e, t, r = !1) => {
355
+ if (jr(e, t), r)
356
+ return E(e, t);
357
+ const n = t.option;
358
+ if (!n)
359
+ return E(e, t);
360
+ if (t.option = void 0, n)
361
+ return {
362
+ ...E(e, t),
363
+ option: n
364
+ };
365
+ }, Kr = () => {
366
+ const e = K(), t = qe(), r = ct();
367
+ return {
368
+ updateComponent: async (o, i = !1, c = !1) => {
369
+ i && (e.componentList = [], t.clearBackStack(), t.clearForwardStack()), o.editCanvasConfig = Yr(o.editCanvasConfig), o.componentList.forEach(async (a) => {
370
+ const d = (s) => {
371
+ window.$vue.component(s.chartConfig.chartKey) || (window.$vue.component(s.chartConfig.chartKey, Se(s.chartConfig)), window.$vue.component(s.chartConfig.conKey, $e(s.chartConfig)));
372
+ };
373
+ a.isGroup ? a.groupList.forEach((s) => {
374
+ d(s);
375
+ }) : d(a);
376
+ });
377
+ const l = async (a, d) => {
378
+ let s = await Le(a.chartConfig);
379
+ a.chartConfig.redirectComponent && (a.chartConfig.dataset && (s.option.dataset = a.chartConfig.dataset), s.chartConfig.title = a.chartConfig.title, s.chartConfig.chartFrame = a.chartConfig.chartFrame), d ? d(c ? g(s, { ...a, id: $() }) : g(s, a)) : c ? e.addComponentList(
380
+ g(s, { ...a, id: $() }),
381
+ !1,
382
+ !0
383
+ ) : e.addComponentList(g(s, a), !1, !0);
384
+ };
385
+ for (const a in o)
386
+ if (a === L.COMPONENT_LIST) {
387
+ let d = 0;
388
+ const s = o[a].length;
389
+ for (const f of o[a]) {
390
+ let _ = parseInt((parseFloat(`${++d / s}`) * 100).toString());
391
+ if (r.setItemUnHandle(b.PERCENTAGE, _), f.isGroup) {
392
+ let p = new Qe();
393
+ c ? p = g(p, { ...f, id: $() }) : p = g(p, f);
394
+ const C = [];
395
+ for (const te of f.groupList)
396
+ await l(te, (re) => {
397
+ C.push(re);
398
+ });
399
+ p.groupList = C, e.addComponentList(p, !1, !0);
400
+ } else
401
+ await l(f);
402
+ _ === 100 && (t.clearBackStack(), t.clearForwardStack());
403
+ }
404
+ } else
405
+ (a === L.EDIT_CANVAS_CONFIG || a === L.REQUEST_GLOBAL_CONFIG) && g(e[a], o[a], !0);
406
+ r.setItemUnHandle(b.PERCENTAGE, 0);
407
+ }
408
+ };
409
+ }, Zr = {
410
+ __name: "index",
411
+ props: {
412
+ //外部传入渲染数据
413
+ data: {
414
+ type: Object,
415
+ default: () => {
416
+ }
417
+ }
418
+ },
419
+ emits: ["back", "preview", "save"],
420
+ setup(e, { emit: t }) {
421
+ const r = e, n = t;
422
+ S("saveData", (i) => {
423
+ n("save", i);
424
+ }), S("previewChart", (i) => {
425
+ n("preview");
426
+ }), S("backHome", (i) => {
427
+ n("back");
428
+ });
429
+ const { updateComponent: o } = Kr();
430
+ return ie(
431
+ () => r.data,
432
+ async (i) => {
433
+ if (i)
434
+ try {
435
+ await o(i, !0, !0);
436
+ } catch (c) {
437
+ console.error("[go-view-worker] Failed to load data:", c);
438
+ }
439
+ },
440
+ { immediate: !0 }
441
+ ), (i, c) => (O(), A(Ze, { data: e.data }, null, 8, ["data"]));
442
+ }
443
+ }, aa = {
444
+ install: (e) => {
445
+ e.component("Configurator", ot), e.component("Renderer", it), e.component("Designer", Zr);
446
+ }
447
+ };
448
+ export {
449
+ b as C,
450
+ q as L,
451
+ cr as _,
452
+ ct as a,
453
+ Z as b,
454
+ $r as c,
455
+ ot as d,
456
+ it as e,
457
+ Zr as f,
458
+ aa as g,
459
+ wt as i,
460
+ Kr as u
461
+ };