go-view-worker 0.0.1 → 0.0.3

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-f8e7e2ce.js} +2 -2
  2. package/dist/chunks/{404-3d357d75.js → 404-a142c879.js} +2 -2
  3. package/dist/chunks/{500-96d14fb0.js → 500-bae41738.js} +2 -2
  4. package/dist/chunks/{StylesSetting-952ff564.js → StylesSetting-0b3e3982.js} +3 -3
  5. package/dist/chunks/{chartEditStore-a725b558.js → chartEditStore-f48950d9.js} +176 -181
  6. package/dist/chunks/{designStore-fe92c2ba.js → designStore-abf0276f.js} +732 -723
  7. package/dist/chunks/{index-09e62bb4.js → index-0de14166.js} +12 -12
  8. package/dist/chunks/{index-1cb69ab6.js → index-10239152.js} +8 -8
  9. package/dist/chunks/{index-82d00e13.js → index-2de9e3ea.js} +89 -93
  10. package/dist/chunks/{index-3fd591ea.js → index-36618d76.js} +12 -12
  11. package/dist/chunks/{index-51458edb.js → index-3dd569d9.js} +2 -2
  12. package/dist/chunks/{index-95c5f0a0.js → index-58176a0a.js} +167 -166
  13. package/dist/chunks/index-722c6f2c.js +461 -0
  14. package/dist/chunks/index-839d28d5.js +94 -0
  15. package/dist/chunks/{index-9502bd7e.js → index-84fa0f64.js} +14 -13
  16. package/dist/chunks/{index-32d13283.js → index-900fa1fe.js} +6 -6
  17. package/dist/chunks/{index-fdf7dc1e.js → index-90f26e37.js} +13 -13
  18. package/dist/chunks/{index-0472b3a5.js → index-93353748.js} +48 -47
  19. package/dist/chunks/{index-a410a1d3.js → index-9c2aed71.js} +8 -8
  20. package/dist/chunks/{index-62a7855c.js → index-ba8452e6.js} +13 -12
  21. package/dist/chunks/{index-f266153a.js → index-c995ea0c.js} +106 -104
  22. package/dist/chunks/{index-fec9f9f8.js → index-d5c768d4.js} +66 -65
  23. package/dist/chunks/{index-de0a1234.js → index-e0c80625.js} +36 -36
  24. package/dist/chunks/{index-00b6339d.js → index-f6b272ec.js} +6 -6
  25. package/dist/chunks/{index-da8ddb02.js → index-f7052250.js} +1 -1
  26. package/dist/chunks/{index-f97e5ffc.js → index-fb392034.js} +1 -1
  27. package/dist/chunks/{index.vue_vue_type_script_setup_true_lang-c6159a17.js → index.vue_vue_type_script_setup_true_lang-326b78df.js} +550 -549
  28. package/dist/chunks/{lodash-c80b695e.js → lodash-6f44772f.js} +1 -1
  29. package/dist/chunks/{router-106a6abc.js → router-409e60a0.js} +15 -15
  30. package/dist/chunks/{useKeyboard.hook-da88451a.js → useKeyboard.hook-2a34f019.js} +27 -27
  31. package/dist/chunks/{useSyncUpdate.hook-5517a8ad.js → useSyncUpdate.hook-c4fe3cc0.js} +16 -16
  32. package/dist/chunks/{useTargetData.hook-28a7e43b.js → useTargetData.hook-45598610.js} +1 -1
  33. package/dist/chunks/{wrapper-4c15ca94.js → wrapper-6fd9dd7e.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
@@ -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-326b78df.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-abf0276f.js";
5
+ import "vue-router";
6
+ import { D as Ze } from "./index-2de9e3ea.js";
7
+ import { u as K, a as qe, C as L, k as Qe, m as T, n as x } from "./chartEditStore-f48950d9.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, { data: e.data }, null, 8, ["data"]));
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
+ };
@@ -0,0 +1,94 @@
1
+ import { defineComponent as R, inject as S, computed as b, resolveComponent as g, openBlock as r, createBlock as p, withCtx as _, createElementBlock as O, Fragment as w, renderList as G, resolveDynamicComponent as L, createElementVNode as B, toDisplayString as H } from "vue";
2
+ import { b as l, i as k, j as D, a as i, s as m, _ as P } from "./designStore-abf0276f.js";
3
+ import { a as N, b as j } from "./router-409e60a0.js";
4
+ import "naive-ui";
5
+ import { u as F, i as V } from "./chartEditStore-f48950d9.js";
6
+ import { useRoute as M } from "vue-router";
7
+ import { s as W } from "./useSyncUpdate.hook-c4fe3cc0.js";
8
+ import { l as q } from "./lodash-6f44772f.js";
9
+ import "pinia";
10
+ import "./index-722c6f2c.js";
11
+ import "./index.vue_vue_type_script_setup_true_lang-326b78df.js";
12
+ import "./index-2de9e3ea.js";
13
+ import "../resize.js";
14
+ const z = (u) => typeof u == "function", J = /* @__PURE__ */ R({
15
+ __name: "index",
16
+ setup(u) {
17
+ const { BrowsersOutlineIcon: I, SendIcon: h, AnalyticsIcon: y } = V.ionicons5, a = F(), C = M(), c = S("previewChart"), E = () => {
18
+ if (c && z(c))
19
+ c();
20
+ else {
21
+ const t = N(k.CHART_PREVIEW_NAME, "href");
22
+ if (!t)
23
+ return;
24
+ const { id: s } = C.params, o = typeof s == "string" ? s : s[0], n = a.getStorageInfo(), e = D(i.GO_CHART_STORAGE_LIST) || [];
25
+ if (e?.length) {
26
+ const v = e.findIndex((A) => A.id === o);
27
+ v !== -1 ? (e.splice(v, 1, { id: o, ...n }), m(i.GO_CHART_STORAGE_LIST, e)) : (e.push({
28
+ id: o,
29
+ ...n
30
+ }), m(i.GO_CHART_STORAGE_LIST, e));
31
+ } else
32
+ m(i.GO_CHART_STORAGE_LIST, [{ id: o, ...n }]);
33
+ j(t, [o], void 0, !0);
34
+ }
35
+ }, d = S("saveData"), T = () => {
36
+ const t = a.getStorageInfo();
37
+ d && d(t);
38
+ }, f = [
39
+ {
40
+ select: !0,
41
+ title: "同步内容",
42
+ type: "primary",
43
+ icon: l(y),
44
+ event: W
45
+ },
46
+ {
47
+ select: !0,
48
+ title: "预览",
49
+ icon: l(I),
50
+ event: E
51
+ },
52
+ {
53
+ select: !0,
54
+ title: "保存",
55
+ icon: l(h),
56
+ event: T
57
+ }
58
+ ], x = b(() => {
59
+ if (a.getEditCanvas.isCodeEdit)
60
+ return f;
61
+ const t = q.cloneDeep(f);
62
+ return t.shift(), t;
63
+ });
64
+ return (t, s) => {
65
+ const o = g("n-button"), n = g("n-space");
66
+ return r(), p(n, {
67
+ class: "go-mt-0",
68
+ wrap: !1
69
+ }, {
70
+ default: _(() => [
71
+ (r(!0), O(w, null, G(x.value, (e) => (r(), p(o, {
72
+ key: e.title,
73
+ type: e.type,
74
+ ghost: "",
75
+ onClick: e.event
76
+ }, {
77
+ icon: _(() => [
78
+ (r(), p(L(e.icon)))
79
+ ]),
80
+ default: _(() => [
81
+ B("span", null, H(e.title), 1)
82
+ ]),
83
+ _: 2
84
+ }, 1032, ["type", "onClick"]))), 128))
85
+ ]),
86
+ _: 1
87
+ });
88
+ };
89
+ }
90
+ });
91
+ const ie = /* @__PURE__ */ P(J, [["__scopeId", "data-v-3829bb97"]]);
92
+ export {
93
+ ie as default
94
+ };
@@ -1,14 +1,15 @@
1
- import { defineComponent as Y, toRefs as G, reactive as y, computed as C, inject as J, resolveComponent as s, openBlock as n, createBlock as c, withCtx as t, createVNode as r, unref as Q, createElementBlock as g, Fragment as f, renderList as S, resolveDynamicComponent as b, createElementVNode as h, toDisplayString as v } from "vue";
2
- import { C as a, A as U } from "./designStore-fe92c2ba.js";
1
+ import { defineComponent as Y, toRefs as G, reactive as y, computed as g, inject as J, resolveComponent as s, openBlock as n, createBlock as c, withCtx as t, createVNode as r, unref as Q, createElementBlock as C, Fragment as f, renderList as b, resolveDynamicComponent as S, createElementVNode as h, toDisplayString as v } from "vue";
2
+ import { b as a, _ as U } from "./designStore-abf0276f.js";
3
3
  import "vue-router";
4
- import { u as X, a as Z, H as i, i as ee, g as te } from "./chartEditStore-a725b558.js";
4
+ import { u as X, a as Z, H as i, i as ee, g as te } from "./chartEditStore-f48950d9.js";
5
5
  import "naive-ui";
6
- import { u as oe } from "./useKeyboard.hook-da88451a.js";
7
- import { u as A, C as l } from "./index-097ae4b0.js";
6
+ import { u as oe } from "./useKeyboard.hook-2a34f019.js";
7
+ import { a as A, C as l } from "./index-722c6f2c.js";
8
8
  import "pinia";
9
- import "./index.vue_vue_type_script_setup_true_lang-c6159a17.js";
10
- import "./router-106a6abc.js";
11
- import "./index-82d00e13.js";
9
+ import "./index.vue_vue_type_script_setup_true_lang-326b78df.js";
10
+ import "./router-409e60a0.js";
11
+ import "./index-2de9e3ea.js";
12
+ import "../resize.js";
12
13
  const ne = /* @__PURE__ */ Y({
13
14
  __name: "index",
14
15
  emits: ["back"],
@@ -32,7 +33,7 @@ const ne = /* @__PURE__ */ Y({
32
33
  title: "详情设置",
33
34
  icon: a(w)
34
35
  }
35
- ]), T = C(() => m.getBackStack.length > 1), z = C(() => m.getForwardStack.length > 0), $ = y([
36
+ ]), T = g(() => m.getBackStack.length > 1), z = g(() => m.getForwardStack.length > 0), $ = y([
36
37
  {
37
38
  key: i.BACK_STACK,
38
39
  // 一定会有初始化画布
@@ -91,7 +92,7 @@ const ne = /* @__PURE__ */ Y({
91
92
  }),
92
93
  r(k, { wrap: !1 }, {
93
94
  default: t(() => [
94
- (n(!0), g(f, null, S(K, (e) => (n(), c(u, {
95
+ (n(!0), C(f, null, b(K, (e) => (n(), c(u, {
95
96
  key: e.key,
96
97
  placement: "bottom",
97
98
  trigger: "hover"
@@ -105,7 +106,7 @@ const ne = /* @__PURE__ */ Y({
105
106
  onClick: (M) => O(e)
106
107
  }, {
107
108
  default: t(() => [
108
- (n(), c(b(e.icon)))
109
+ (n(), c(S(e.icon)))
109
110
  ]),
110
111
  _: 2
111
112
  }, 1032, ["type", "onClick"])
@@ -116,7 +117,7 @@ const ne = /* @__PURE__ */ Y({
116
117
  _: 2
117
118
  }, 1024))), 128)),
118
119
  r(q, { vertical: "" }),
119
- (n(!0), g(f, null, S($, (e) => (n(), c(u, {
120
+ (n(!0), C(f, null, b($, (e) => (n(), c(u, {
120
121
  key: e.key,
121
122
  placement: "bottom",
122
123
  trigger: "hover"
@@ -130,7 +131,7 @@ const ne = /* @__PURE__ */ Y({
130
131
  onClick: (M) => P(e)
131
132
  }, {
132
133
  default: t(() => [
133
- (n(), c(b(e.icon)))
134
+ (n(), c(S(e.icon)))
134
135
  ]),
135
136
  _: 2
136
137
  }, 1032, ["disabled", "onClick"])
@@ -1,10 +1,10 @@
1
1
  import { resolveComponent as p, openBlock as e, createBlock as o, withCtx as m, resolveDynamicComponent as r, KeepAlive as a, defineComponent as s, unref as u } from "vue";
2
- import { A as f } from "./designStore-fe92c2ba.js";
2
+ import { _ as f } from "./designStore-abf0276f.js";
3
3
  import "pinia";
4
4
  import "naive-ui";
5
5
  import "vue-router";
6
6
  const l = {};
7
- function d(c, _) {
7
+ function d(_, c) {
8
8
  const t = p("router-view");
9
9
  return e(), o(t, null, {
10
10
  default: m(({ Component: n, route: i }) => [
@@ -15,12 +15,12 @@ function d(c, _) {
15
15
  _: 1
16
16
  });
17
17
  }
18
- const v = /* @__PURE__ */ f(l, [["render", d]]), A = /* @__PURE__ */ s({
18
+ const v = /* @__PURE__ */ f(l, [["render", d]]), C = /* @__PURE__ */ s({
19
19
  __name: "index",
20
- setup(c) {
21
- return (_, t) => (e(), o(u(v)));
20
+ setup(_) {
21
+ return (c, t) => (e(), o(u(v)));
22
22
  }
23
23
  });
24
24
  export {
25
- A as default
25
+ C as default
26
26
  };