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.
- package/dist/chunks/{403-382550a8.js → 403-48dde732.js} +2 -2
- package/dist/chunks/{404-3d357d75.js → 404-33eb13aa.js} +2 -2
- package/dist/chunks/{500-96d14fb0.js → 500-03632c55.js} +2 -2
- package/dist/chunks/{StylesSetting-952ff564.js → StylesSetting-307bbc38.js} +3 -3
- package/dist/chunks/{chartEditStore-a725b558.js → chartEditStore-5bf68359.js} +176 -181
- package/dist/chunks/{designStore-fe92c2ba.js → designStore-196559cb.js} +732 -723
- package/dist/chunks/{index-3fd591ea.js → index-08a8f4f7.js} +12 -12
- package/dist/chunks/{index-95c5f0a0.js → index-1d427a73.js} +167 -166
- package/dist/chunks/{index-82d00e13.js → index-1f14b418.js} +89 -93
- package/dist/chunks/{index-1cb69ab6.js → index-36d9b318.js} +8 -8
- package/dist/chunks/{index-62a7855c.js → index-479e043f.js} +13 -12
- package/dist/chunks/{index-00b6339d.js → index-5dad4e02.js} +6 -6
- package/dist/chunks/{index-51458edb.js → index-632e8cd2.js} +2 -2
- package/dist/chunks/{index-f266153a.js → index-64580c85.js} +106 -104
- package/dist/chunks/{index-de0a1234.js → index-7b9408cb.js} +36 -36
- package/dist/chunks/index-7eaf2edc.js +461 -0
- package/dist/chunks/index-928e54a7.js +94 -0
- package/dist/chunks/{index-a410a1d3.js → index-9926f668.js} +8 -8
- package/dist/chunks/{index-9502bd7e.js → index-9af87347.js} +14 -13
- package/dist/chunks/{index-da8ddb02.js → index-bfd775d9.js} +1 -1
- package/dist/chunks/{index-09e62bb4.js → index-c627e7d2.js} +12 -12
- package/dist/chunks/{index-0472b3a5.js → index-d6866a98.js} +48 -47
- package/dist/chunks/{index-f97e5ffc.js → index-dd95bed0.js} +1 -1
- package/dist/chunks/{index-32d13283.js → index-e65e8cdc.js} +6 -6
- package/dist/chunks/{index-fdf7dc1e.js → index-e8a302ce.js} +13 -13
- package/dist/chunks/{index-fec9f9f8.js → index-f4bd44a9.js} +66 -65
- 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
- package/dist/chunks/{lodash-c80b695e.js → lodash-5bba33ba.js} +1 -1
- package/dist/chunks/{router-106a6abc.js → router-443d466c.js} +15 -15
- package/dist/chunks/{useKeyboard.hook-da88451a.js → useKeyboard.hook-da57df02.js} +27 -27
- package/dist/chunks/{useSyncUpdate.hook-5517a8ad.js → useSyncUpdate.hook-dfee2f43.js} +16 -16
- package/dist/chunks/{useTargetData.hook-28a7e43b.js → useTargetData.hook-77b72165.js} +1 -1
- package/dist/chunks/{wrapper-4c15ca94.js → wrapper-54705288.js} +4 -4
- package/dist/go-view-worker.js +13 -12
- package/dist/init.js +1 -1
- package/dist/resize.js +18 -0
- package/dist/style.css +2 -2
- package/dist/types/packages/resize.d.ts +1 -0
- package/dist/types/src/hooks/useLang.hook.d.ts +1 -1
- package/package.json +5 -1
- package/dist/chunks/index-097ae4b0.js +0 -436
- package/dist/chunks/index-54f304ef.js +0 -89
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useResizeByClientWidth } from './utils/resize';
|
|
@@ -48,7 +48,7 @@ export declare const useLang: () => {
|
|
|
48
48
|
startMonthPlaceholder: string;
|
|
49
49
|
endMonthPlaceholder: string;
|
|
50
50
|
monthBeforeYear: boolean;
|
|
51
|
-
firstDayOfWeek: 0 | 1 | 5 |
|
|
51
|
+
firstDayOfWeek: 0 | 1 | 5 | 4 | 3 | 2 | 6;
|
|
52
52
|
today: string;
|
|
53
53
|
};
|
|
54
54
|
DataTable: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "go-view-worker",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"author": "TroyFu",
|
|
5
5
|
"description": "go-view-worker base on go-view, quick to build drag and drop app",
|
|
6
6
|
"main": "dist/go-view-worker.js",
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"import": "./dist/init.js",
|
|
21
21
|
"types": "./dist/types/packages/init.d.ts"
|
|
22
22
|
},
|
|
23
|
+
"./resize": {
|
|
24
|
+
"import": "./dist/resize.js",
|
|
25
|
+
"types": "./dist/types/packages/resize.d.ts"
|
|
26
|
+
},
|
|
23
27
|
"./dist/*": "./dist/*"
|
|
24
28
|
},
|
|
25
29
|
"files": [
|
|
@@ -1,436 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m, openBlock as T, createBlock as L, unref as v, withCtx as h, createVNode as p, renderSlot as G, computed as P, onMounted as I, createElementBlock as ee, provide as E, watch as te, onBeforeUnmount as ne } from "vue";
|
|
2
|
-
import { useMessage as re, useDialog as ae, useLoadingBar as ie, NLoadingBarProvider as oe, NDialogProvider as se, NNotificationProvider as le, NMessageProvider as ue, darkTheme as ce, NConfigProvider as fe } from "naive-ui";
|
|
3
|
-
import { u as de, _ as ve, f as pe, a as _e, c as ge } from "./index.vue_vue_type_script_setup_true_lang-c6159a17.js";
|
|
4
|
-
import { D as he } from "./index-82d00e13.js";
|
|
5
|
-
import { g as me, s as Ce, S as ye, _ as Te, e as U, i as V, a as D, b as Ee, c as Oe, d as Se, k, f as $e, h as be, j as Le, l as we, m as Pe, n as Ae, o as Ne, p as xe, q as w, r as Me, t as Be, u as Re, v as Fe, w as Ge, x as O } from "./designStore-fe92c2ba.js";
|
|
6
|
-
import "vue-router";
|
|
7
|
-
import { u as H, a as Ie, C as S, P as Ue, B as y, E as A } from "./chartEditStore-a725b558.js";
|
|
8
|
-
import { defineStore as Ve } from "pinia";
|
|
9
|
-
const De = /* @__PURE__ */ m({
|
|
10
|
-
__name: "index",
|
|
11
|
-
setup(e) {
|
|
12
|
-
return window.$message = re(), (t, n) => null;
|
|
13
|
-
}
|
|
14
|
-
}), ke = /* @__PURE__ */ m({
|
|
15
|
-
__name: "index",
|
|
16
|
-
setup(e) {
|
|
17
|
-
return window.$dialog = ae(), (t, n) => null;
|
|
18
|
-
}
|
|
19
|
-
}), He = /* @__PURE__ */ m({
|
|
20
|
-
__name: "index",
|
|
21
|
-
setup(e) {
|
|
22
|
-
return window.$loading = ie(), window.$loading.finish(), (t, n) => null;
|
|
23
|
-
}
|
|
24
|
-
}), ze = /* @__PURE__ */ m({
|
|
25
|
-
__name: "index",
|
|
26
|
-
setup(e) {
|
|
27
|
-
return (t, n) => (T(), L(v(oe), null, {
|
|
28
|
-
default: h(() => [
|
|
29
|
-
p(v(se), null, {
|
|
30
|
-
default: h(() => [
|
|
31
|
-
p(v(ke)),
|
|
32
|
-
p(v(He)),
|
|
33
|
-
p(v(le), null, {
|
|
34
|
-
default: h(() => [
|
|
35
|
-
p(v(ue), null, {
|
|
36
|
-
default: h(() => [
|
|
37
|
-
p(v(De)),
|
|
38
|
-
G(t.$slots, "default")
|
|
39
|
-
]),
|
|
40
|
-
_: 3
|
|
41
|
-
})
|
|
42
|
-
]),
|
|
43
|
-
_: 3
|
|
44
|
-
})
|
|
45
|
-
]),
|
|
46
|
-
_: 3
|
|
47
|
-
})
|
|
48
|
-
]),
|
|
49
|
-
_: 3
|
|
50
|
-
}));
|
|
51
|
-
}
|
|
52
|
-
}), Ke = ["data-theme"], Ye = /* @__PURE__ */ m({
|
|
53
|
-
__name: "index",
|
|
54
|
-
props: {
|
|
55
|
-
theme: {}
|
|
56
|
-
},
|
|
57
|
-
setup(e) {
|
|
58
|
-
const t = e, n = de(), r = P(() => t.theme ?? (n.isDarkMode ? "dark" : "light") ?? "light"), a = P(() => r.value === "dark" ? ce : null);
|
|
59
|
-
return I(() => {
|
|
60
|
-
}), (o, l) => (T(), ee("div", {
|
|
61
|
-
class: "go-view-container",
|
|
62
|
-
"data-theme": r.value
|
|
63
|
-
}, [
|
|
64
|
-
p(v(fe), { theme: a.value }, {
|
|
65
|
-
default: h(() => [
|
|
66
|
-
p(v(ze), null, {
|
|
67
|
-
default: h(() => [
|
|
68
|
-
G(o.$slots, "default")
|
|
69
|
-
]),
|
|
70
|
-
_: 3
|
|
71
|
-
})
|
|
72
|
-
]),
|
|
73
|
-
_: 3
|
|
74
|
-
}, 8, ["theme"])
|
|
75
|
-
], 8, Ke));
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
const qe = /* @__PURE__ */ m({
|
|
79
|
-
__name: "index",
|
|
80
|
-
props: {
|
|
81
|
-
data: {
|
|
82
|
-
type: Object,
|
|
83
|
-
default: null
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
setup(e) {
|
|
87
|
-
return (t, n) => (T(), L(ve));
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var z = /* @__PURE__ */ ((e) => (e.SINGLE = "single", e.DOUBLE = "double", e))(z || {}), K = /* @__PURE__ */ ((e) => (e.THUMBNAIL = "thumbnail", e.TEXT = "text", e))(K || {}), 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 || {});
|
|
91
|
-
const je = () => H(), { GO_CHART_LAYOUT_STORE: Y } = ye, We = me(Y), Qe = Ve({
|
|
92
|
-
id: "useChartLayoutStore",
|
|
93
|
-
state: () => ({
|
|
94
|
-
// 图层控制
|
|
95
|
-
layers: !0,
|
|
96
|
-
// 图表组件
|
|
97
|
-
charts: !0,
|
|
98
|
-
// 详情设置(收缩为true)
|
|
99
|
-
details: !1,
|
|
100
|
-
// 组件列表展示类型(默认单列)
|
|
101
|
-
chartType: z.SINGLE,
|
|
102
|
-
// 图层类型(默认图片)
|
|
103
|
-
layerType: K.THUMBNAIL,
|
|
104
|
-
// 当前加载数量
|
|
105
|
-
percentage: 0,
|
|
106
|
-
// 是否重置当前画布位置
|
|
107
|
-
rePositionCanvas: !1,
|
|
108
|
-
// 防止值不存在
|
|
109
|
-
...We
|
|
110
|
-
}),
|
|
111
|
-
getters: {
|
|
112
|
-
getLayers() {
|
|
113
|
-
return this.layers;
|
|
114
|
-
},
|
|
115
|
-
getCharts() {
|
|
116
|
-
return this.charts;
|
|
117
|
-
},
|
|
118
|
-
getDetails() {
|
|
119
|
-
return this.details;
|
|
120
|
-
},
|
|
121
|
-
getChartType() {
|
|
122
|
-
return this.chartType;
|
|
123
|
-
},
|
|
124
|
-
getLayerType() {
|
|
125
|
-
return this.layerType;
|
|
126
|
-
},
|
|
127
|
-
getPercentage() {
|
|
128
|
-
return this.percentage;
|
|
129
|
-
},
|
|
130
|
-
getRePositionCanvas() {
|
|
131
|
-
return this.rePositionCanvas;
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
actions: {
|
|
135
|
-
setItem(e, t, n = !0) {
|
|
136
|
-
this.$patch((r) => {
|
|
137
|
-
r[e] = t;
|
|
138
|
-
}), Ce(Y, this.$state), this.rePositionCanvas = !0, n && setTimeout(() => {
|
|
139
|
-
je().computedScale();
|
|
140
|
-
}, 500);
|
|
141
|
-
},
|
|
142
|
-
setItemUnHandle(e, t) {
|
|
143
|
-
this.$patch((n) => {
|
|
144
|
-
n[e] = t;
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
var Xe = Te, Je = U;
|
|
150
|
-
function Ze(e, t, n) {
|
|
151
|
-
(n !== void 0 && !Je(e[t], n) || n === void 0 && !(t in e)) && Xe(e, t, n);
|
|
152
|
-
}
|
|
153
|
-
var q = Ze;
|
|
154
|
-
function et(e) {
|
|
155
|
-
return function(t, n, r) {
|
|
156
|
-
for (var a = -1, o = Object(t), l = r(t), u = l.length; u--; ) {
|
|
157
|
-
var i = l[e ? u : ++a];
|
|
158
|
-
if (n(o[i], i, o) === !1)
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
return t;
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
var tt = et, nt = tt, rt = nt(), at = rt, it = V, ot = D;
|
|
165
|
-
function st(e) {
|
|
166
|
-
return ot(e) && it(e);
|
|
167
|
-
}
|
|
168
|
-
var lt = st, ut = Ee, ct = Oe, ft = D, dt = "[object Object]", vt = Function.prototype, pt = Object.prototype, j = vt.toString, _t = pt.hasOwnProperty, gt = j.call(Object);
|
|
169
|
-
function ht(e) {
|
|
170
|
-
if (!ft(e) || ut(e) != dt)
|
|
171
|
-
return !1;
|
|
172
|
-
var t = ct(e);
|
|
173
|
-
if (t === null)
|
|
174
|
-
return !0;
|
|
175
|
-
var n = _t.call(t, "constructor") && t.constructor;
|
|
176
|
-
return typeof n == "function" && n instanceof n && j.call(n) == gt;
|
|
177
|
-
}
|
|
178
|
-
var mt = ht;
|
|
179
|
-
function Ct(e, t) {
|
|
180
|
-
if (!(t === "constructor" && typeof e[t] == "function") && t != "__proto__")
|
|
181
|
-
return e[t];
|
|
182
|
-
}
|
|
183
|
-
var W = Ct, yt = Se, Tt = k;
|
|
184
|
-
function Et(e) {
|
|
185
|
-
return yt(e, Tt(e));
|
|
186
|
-
}
|
|
187
|
-
var Ot = Et, N = q, St = $e, $t = be, bt = Le, Lt = we, x = Pe, M = Ae, wt = lt, Pt = Ne, At = xe, Nt = w, xt = mt, Mt = Me, B = W, Bt = Ot;
|
|
188
|
-
function Rt(e, t, n, r, a, o, l) {
|
|
189
|
-
var u = B(e, n), i = B(t, n), c = l.get(i);
|
|
190
|
-
if (c) {
|
|
191
|
-
N(e, n, c);
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
var s = o ? o(u, i, n + "", e, t, l) : void 0, f = s === void 0;
|
|
195
|
-
if (f) {
|
|
196
|
-
var g = M(i), d = !g && Pt(i), C = !g && !d && Mt(i);
|
|
197
|
-
s = i, g || d || C ? M(u) ? s = u : wt(u) ? s = bt(u) : d ? (f = !1, s = St(i, !0)) : C ? (f = !1, s = $t(i, !0)) : s = [] : xt(i) || x(i) ? (s = u, x(u) ? s = Bt(u) : (!Nt(u) || At(u)) && (s = Lt(i))) : f = !1;
|
|
198
|
-
}
|
|
199
|
-
f && (l.set(i, s), a(s, i, r, o, l), l.delete(i)), N(e, n, s);
|
|
200
|
-
}
|
|
201
|
-
var Ft = Rt, Gt = Be, It = q, Ut = at, Vt = Ft, Dt = w, kt = k, Ht = W;
|
|
202
|
-
function Q(e, t, n, r, a) {
|
|
203
|
-
e !== t && Ut(t, function(o, l) {
|
|
204
|
-
if (a || (a = new Gt()), Dt(o))
|
|
205
|
-
Vt(e, t, l, n, Q, r, a);
|
|
206
|
-
else {
|
|
207
|
-
var u = r ? r(Ht(e, l), o, l + "", e, t, a) : void 0;
|
|
208
|
-
u === void 0 && (u = o), It(e, l, u);
|
|
209
|
-
}
|
|
210
|
-
}, kt);
|
|
211
|
-
}
|
|
212
|
-
var zt = Q;
|
|
213
|
-
function Kt(e) {
|
|
214
|
-
return e;
|
|
215
|
-
}
|
|
216
|
-
var X = Kt;
|
|
217
|
-
function Yt(e, t, n) {
|
|
218
|
-
switch (n.length) {
|
|
219
|
-
case 0:
|
|
220
|
-
return e.call(t);
|
|
221
|
-
case 1:
|
|
222
|
-
return e.call(t, n[0]);
|
|
223
|
-
case 2:
|
|
224
|
-
return e.call(t, n[0], n[1]);
|
|
225
|
-
case 3:
|
|
226
|
-
return e.call(t, n[0], n[1], n[2]);
|
|
227
|
-
}
|
|
228
|
-
return e.apply(t, n);
|
|
229
|
-
}
|
|
230
|
-
var qt = Yt, jt = qt, R = Math.max;
|
|
231
|
-
function Wt(e, t, n) {
|
|
232
|
-
return t = R(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
233
|
-
for (var r = arguments, a = -1, o = R(r.length - t, 0), l = Array(o); ++a < o; )
|
|
234
|
-
l[a] = r[t + a];
|
|
235
|
-
a = -1;
|
|
236
|
-
for (var u = Array(t + 1); ++a < t; )
|
|
237
|
-
u[a] = r[a];
|
|
238
|
-
return u[t] = n(l), jt(e, this, u);
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
var Qt = Wt;
|
|
242
|
-
function Xt(e) {
|
|
243
|
-
return function() {
|
|
244
|
-
return e;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
var Jt = Xt, Zt = Jt, F = Re, en = X, tn = F ? function(e, t) {
|
|
248
|
-
return F(e, "toString", {
|
|
249
|
-
configurable: !0,
|
|
250
|
-
enumerable: !1,
|
|
251
|
-
value: Zt(t),
|
|
252
|
-
writable: !0
|
|
253
|
-
});
|
|
254
|
-
} : en, nn = tn, rn = 800, an = 16, on = Date.now;
|
|
255
|
-
function sn(e) {
|
|
256
|
-
var t = 0, n = 0;
|
|
257
|
-
return function() {
|
|
258
|
-
var r = on(), a = an - (r - n);
|
|
259
|
-
if (n = r, a > 0) {
|
|
260
|
-
if (++t >= rn)
|
|
261
|
-
return arguments[0];
|
|
262
|
-
} else
|
|
263
|
-
t = 0;
|
|
264
|
-
return e.apply(void 0, arguments);
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
var ln = sn, un = nn, cn = ln, fn = cn(un), dn = fn, vn = X, pn = Qt, _n = dn;
|
|
268
|
-
function gn(e, t) {
|
|
269
|
-
return _n(pn(e, t, vn), e + "");
|
|
270
|
-
}
|
|
271
|
-
var hn = gn, mn = U, Cn = V, yn = Fe, Tn = w;
|
|
272
|
-
function En(e, t, n) {
|
|
273
|
-
if (!Tn(n))
|
|
274
|
-
return !1;
|
|
275
|
-
var r = typeof t;
|
|
276
|
-
return (r == "number" ? Cn(n) && yn(t, n.length) : r == "string" && t in n) ? mn(n[t], e) : !1;
|
|
277
|
-
}
|
|
278
|
-
var On = En, Sn = hn, $n = On;
|
|
279
|
-
function bn(e) {
|
|
280
|
-
return Sn(function(t, n) {
|
|
281
|
-
var r = -1, a = n.length, o = a > 1 ? n[a - 1] : void 0, l = a > 2 ? n[2] : void 0;
|
|
282
|
-
for (o = e.length > 3 && typeof o == "function" ? (a--, o) : void 0, l && $n(n[0], n[1], l) && (o = a < 3 ? void 0 : o, a = 1), t = Object(t); ++r < a; ) {
|
|
283
|
-
var u = n[r];
|
|
284
|
-
u && e(t, u, r, o);
|
|
285
|
-
}
|
|
286
|
-
return t;
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
var Ln = bn, wn = zt, Pn = Ln, An = Pn(function(e, t, n) {
|
|
290
|
-
wn(e, t, n);
|
|
291
|
-
}), Nn = An;
|
|
292
|
-
const $ = /* @__PURE__ */ Ge(Nn), xn = (e) => e, Mn = (e, t) => {
|
|
293
|
-
try {
|
|
294
|
-
if (t.id) {
|
|
295
|
-
const n = "vnodeBeforeMount" in t.events, r = "vnodeMounted" in t.events;
|
|
296
|
-
return n && (e.events.advancedEvents.vnodeBeforeMount = t?.events.vnodeBeforeMount), r && (e.events.advancedEvents.vnodeMounted = t?.events.vnodeMounted), (n || r) && (t.events = {
|
|
297
|
-
baseEvent: {
|
|
298
|
-
[y.ON_CLICK]: void 0,
|
|
299
|
-
[y.ON_DBL_CLICK]: void 0,
|
|
300
|
-
[y.ON_MOUSE_ENTER]: void 0,
|
|
301
|
-
[y.ON_MOUSE_LEAVE]: void 0
|
|
302
|
-
},
|
|
303
|
-
advancedEvents: {
|
|
304
|
-
[A.VNODE_MOUNTED]: void 0,
|
|
305
|
-
[A.VNODE_BEFORE_MOUNT]: void 0
|
|
306
|
-
},
|
|
307
|
-
interactEvents: []
|
|
308
|
-
}), e;
|
|
309
|
-
}
|
|
310
|
-
} catch {
|
|
311
|
-
return e;
|
|
312
|
-
}
|
|
313
|
-
}, _ = (e, t, n = !1) => {
|
|
314
|
-
if (Mn(e, t), n)
|
|
315
|
-
return $(e, t);
|
|
316
|
-
const r = t.option;
|
|
317
|
-
if (!r)
|
|
318
|
-
return $(e, t);
|
|
319
|
-
if (t.option = void 0, r)
|
|
320
|
-
return {
|
|
321
|
-
...$(e, t),
|
|
322
|
-
option: r
|
|
323
|
-
};
|
|
324
|
-
}, Bn = () => {
|
|
325
|
-
const e = H(), t = Ie(), n = Qe();
|
|
326
|
-
return {
|
|
327
|
-
updateComponent: async (a, o = !1, l = !1) => {
|
|
328
|
-
o && (e.componentList = [], t.clearBackStack(), t.clearForwardStack()), a.editCanvasConfig = xn(a.editCanvasConfig), a.componentList.forEach(async (i) => {
|
|
329
|
-
const c = (s) => {
|
|
330
|
-
window.$vue.component(s.chartConfig.chartKey) || (window.$vue.component(s.chartConfig.chartKey, pe(s.chartConfig)), window.$vue.component(s.chartConfig.conKey, _e(s.chartConfig)));
|
|
331
|
-
};
|
|
332
|
-
i.isGroup ? i.groupList.forEach((s) => {
|
|
333
|
-
c(s);
|
|
334
|
-
}) : c(i);
|
|
335
|
-
});
|
|
336
|
-
const u = async (i, c) => {
|
|
337
|
-
let s = await ge(i.chartConfig);
|
|
338
|
-
i.chartConfig.redirectComponent && (i.chartConfig.dataset && (s.option.dataset = i.chartConfig.dataset), s.chartConfig.title = i.chartConfig.title, s.chartConfig.chartFrame = i.chartConfig.chartFrame), c ? c(l ? _(s, { ...i, id: O() }) : _(s, i)) : l ? e.addComponentList(
|
|
339
|
-
_(s, { ...i, id: O() }),
|
|
340
|
-
!1,
|
|
341
|
-
!0
|
|
342
|
-
) : e.addComponentList(_(s, i), !1, !0);
|
|
343
|
-
};
|
|
344
|
-
for (const i in a)
|
|
345
|
-
if (i === S.COMPONENT_LIST) {
|
|
346
|
-
let c = 0;
|
|
347
|
-
const s = a[i].length;
|
|
348
|
-
for (const f of a[i]) {
|
|
349
|
-
let g = parseInt((parseFloat(`${++c / s}`) * 100).toString());
|
|
350
|
-
if (n.setItemUnHandle(b.PERCENTAGE, g), f.isGroup) {
|
|
351
|
-
let d = new Ue();
|
|
352
|
-
l ? d = _(d, { ...f, id: O() }) : d = _(d, f);
|
|
353
|
-
const C = [];
|
|
354
|
-
for (const J of f.groupList)
|
|
355
|
-
await u(J, (Z) => {
|
|
356
|
-
C.push(Z);
|
|
357
|
-
});
|
|
358
|
-
d.groupList = C, e.addComponentList(d, !1, !0);
|
|
359
|
-
} else
|
|
360
|
-
await u(f);
|
|
361
|
-
g === 100 && (t.clearBackStack(), t.clearForwardStack());
|
|
362
|
-
}
|
|
363
|
-
} else
|
|
364
|
-
(i === S.EDIT_CANVAS_CONFIG || i === S.REQUEST_GLOBAL_CONFIG) && _(e[i], a[i], !0);
|
|
365
|
-
n.setItemUnHandle(b.PERCENTAGE, 0);
|
|
366
|
-
}
|
|
367
|
-
};
|
|
368
|
-
}, Rn = {
|
|
369
|
-
__name: "index",
|
|
370
|
-
props: {
|
|
371
|
-
//外部传入渲染数据
|
|
372
|
-
data: {
|
|
373
|
-
type: Object,
|
|
374
|
-
default: () => {
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
emits: ["back", "preview", "save"],
|
|
379
|
-
setup(e, { emit: t }) {
|
|
380
|
-
const n = e, r = t;
|
|
381
|
-
E("saveData", (o) => {
|
|
382
|
-
r("save", o);
|
|
383
|
-
}), E("previewChart", (o) => {
|
|
384
|
-
r("preview");
|
|
385
|
-
}), E("backHome", (o) => {
|
|
386
|
-
r("back");
|
|
387
|
-
});
|
|
388
|
-
const { updateComponent: a } = Bn();
|
|
389
|
-
return te(
|
|
390
|
-
() => n.data,
|
|
391
|
-
async (o) => {
|
|
392
|
-
if (o)
|
|
393
|
-
try {
|
|
394
|
-
await a(o, !0, !0);
|
|
395
|
-
} catch (l) {
|
|
396
|
-
console.error("[go-view-worker] Failed to load data:", l);
|
|
397
|
-
}
|
|
398
|
-
},
|
|
399
|
-
{ immediate: !0 }
|
|
400
|
-
), (o, l) => (T(), L(he, { data: e.data }, null, 8, ["data"]));
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
function zn(e = 1920, t = 14) {
|
|
404
|
-
let n;
|
|
405
|
-
const r = () => {
|
|
406
|
-
n && clearTimeout(n), n = setTimeout(() => {
|
|
407
|
-
const a = e, o = document.documentElement.clientWidth / a * t;
|
|
408
|
-
document.documentElement.style.fontSize = o + "px", document.body.style.fontSize = o + "px";
|
|
409
|
-
}, 300);
|
|
410
|
-
};
|
|
411
|
-
I(() => {
|
|
412
|
-
r(), window.addEventListener("resize", r);
|
|
413
|
-
}), ne(() => {
|
|
414
|
-
window.removeEventListener("resize", r), n && clearTimeout(n);
|
|
415
|
-
});
|
|
416
|
-
}
|
|
417
|
-
const Kn = {
|
|
418
|
-
install: (e) => {
|
|
419
|
-
e.component("Configurator", Ye), e.component("Renderer", qe), e.component("Designer", Rn);
|
|
420
|
-
}
|
|
421
|
-
};
|
|
422
|
-
export {
|
|
423
|
-
b as C,
|
|
424
|
-
K as L,
|
|
425
|
-
Qt as _,
|
|
426
|
-
z as a,
|
|
427
|
-
dn as b,
|
|
428
|
-
Bn as c,
|
|
429
|
-
Ye as d,
|
|
430
|
-
qe as e,
|
|
431
|
-
Rn as f,
|
|
432
|
-
Kn as g,
|
|
433
|
-
zn as h,
|
|
434
|
-
mt as i,
|
|
435
|
-
Qe as u
|
|
436
|
-
};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { defineComponent as T, inject as A, computed as x, resolveComponent as f, openBlock as r, createBlock as c, withCtx as p, createElementBlock as R, Fragment as O, renderList as G, resolveDynamicComponent as L, createElementVNode as B, toDisplayString as D } from "vue";
|
|
2
|
-
import { C as _, D as H, E as k, S as a, F as l, A as w } from "./designStore-fe92c2ba.js";
|
|
3
|
-
import { f as b, a as P } from "./router-106a6abc.js";
|
|
4
|
-
import "naive-ui";
|
|
5
|
-
import { u as N, i as F } from "./chartEditStore-a725b558.js";
|
|
6
|
-
import { useRoute as V } from "vue-router";
|
|
7
|
-
import { s as j } from "./useSyncUpdate.hook-5517a8ad.js";
|
|
8
|
-
import { l as M } from "./lodash-c80b695e.js";
|
|
9
|
-
import "pinia";
|
|
10
|
-
import "./index-097ae4b0.js";
|
|
11
|
-
import "./index.vue_vue_type_script_setup_true_lang-c6159a17.js";
|
|
12
|
-
import "./index-82d00e13.js";
|
|
13
|
-
const W = /* @__PURE__ */ T({
|
|
14
|
-
__name: "index",
|
|
15
|
-
setup(q) {
|
|
16
|
-
const { BrowsersOutlineIcon: S, SendIcon: g, AnalyticsIcon: I } = F.ionicons5, i = N(), v = V(), E = () => {
|
|
17
|
-
const t = b(H.CHART_PREVIEW_NAME, "href");
|
|
18
|
-
if (!t)
|
|
19
|
-
return;
|
|
20
|
-
const { id: s } = v.params, o = typeof s == "string" ? s : s[0], n = i.getStorageInfo(), e = k(a.GO_CHART_STORAGE_LIST) || [];
|
|
21
|
-
if (e?.length) {
|
|
22
|
-
const u = e.findIndex((h) => h.id === o);
|
|
23
|
-
u !== -1 ? (e.splice(u, 1, { id: o, ...n }), l(a.GO_CHART_STORAGE_LIST, e)) : (e.push({
|
|
24
|
-
id: o,
|
|
25
|
-
...n
|
|
26
|
-
}), l(a.GO_CHART_STORAGE_LIST, e));
|
|
27
|
-
} else
|
|
28
|
-
l(a.GO_CHART_STORAGE_LIST, [{ id: o, ...n }]);
|
|
29
|
-
P(t, [o], void 0, !0);
|
|
30
|
-
}, m = A("saveData"), y = () => {
|
|
31
|
-
const t = i.getStorageInfo();
|
|
32
|
-
m && m(t);
|
|
33
|
-
}, d = [
|
|
34
|
-
{
|
|
35
|
-
select: !0,
|
|
36
|
-
title: "同步内容",
|
|
37
|
-
type: "primary",
|
|
38
|
-
icon: _(I),
|
|
39
|
-
event: j
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
select: !0,
|
|
43
|
-
title: "预览",
|
|
44
|
-
icon: _(S),
|
|
45
|
-
event: E
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
select: !0,
|
|
49
|
-
title: "保存",
|
|
50
|
-
icon: _(g),
|
|
51
|
-
event: y
|
|
52
|
-
}
|
|
53
|
-
], C = x(() => {
|
|
54
|
-
if (i.getEditCanvas.isCodeEdit)
|
|
55
|
-
return d;
|
|
56
|
-
const t = M.cloneDeep(d);
|
|
57
|
-
return t.shift(), t;
|
|
58
|
-
});
|
|
59
|
-
return (t, s) => {
|
|
60
|
-
const o = f("n-button"), n = f("n-space");
|
|
61
|
-
return r(), c(n, {
|
|
62
|
-
class: "go-mt-0",
|
|
63
|
-
wrap: !1
|
|
64
|
-
}, {
|
|
65
|
-
default: p(() => [
|
|
66
|
-
(r(!0), R(O, null, G(C.value, (e) => (r(), c(o, {
|
|
67
|
-
key: e.title,
|
|
68
|
-
type: e.type,
|
|
69
|
-
ghost: "",
|
|
70
|
-
onClick: e.event
|
|
71
|
-
}, {
|
|
72
|
-
icon: p(() => [
|
|
73
|
-
(r(), c(L(e.icon)))
|
|
74
|
-
]),
|
|
75
|
-
default: p(() => [
|
|
76
|
-
B("span", null, D(e.title), 1)
|
|
77
|
-
]),
|
|
78
|
-
_: 2
|
|
79
|
-
}, 1032, ["type", "onClick"]))), 128))
|
|
80
|
-
]),
|
|
81
|
-
_: 1
|
|
82
|
-
});
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
const ne = /* @__PURE__ */ w(W, [["__scopeId", "data-v-94b6635a"]]);
|
|
87
|
-
export {
|
|
88
|
-
ne as default
|
|
89
|
-
};
|