g-ui-web 1.1.25 → 1.1.27
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/lib/g-ui-web.js +98 -56
- package/lib/g-ui-web.js.gz +0 -0
- package/lib/g-ui-web.umd.cjs +2 -2
- package/lib/style.css +1 -1
- package/lib/style.css.gz +0 -0
- package/package.json +1 -1
package/lib/g-ui-web.js
CHANGED
|
@@ -48722,7 +48722,7 @@ class K3 {
|
|
|
48722
48722
|
R0(this, "events");
|
|
48723
48723
|
if (this.events = {}, !t)
|
|
48724
48724
|
throw console.error("dataUrl is undefined or null"), new Error("Invalid dataUrl");
|
|
48725
|
-
if (
|
|
48725
|
+
if (!(t != null && t.path) && !["string", "number"].includes(typeof t) && !Array.isArray(t) || Array.isArray(t) && !t.some((r) => r.path))
|
|
48726
48726
|
this.loadStaticData(t);
|
|
48727
48727
|
else if (Array.isArray(t)) {
|
|
48728
48728
|
if (!t.some((r) => r && r.path))
|
|
@@ -95500,87 +95500,129 @@ const Clt = (e, t) => {
|
|
|
95500
95500
|
let i = z(0);
|
|
95501
95501
|
const s = z(!1), l = z(), u = z(null), c = z({});
|
|
95502
95502
|
let d = null, f = z(!1);
|
|
95503
|
-
const p = async (
|
|
95504
|
-
if (ya(
|
|
95503
|
+
const p = async (g) => {
|
|
95504
|
+
if (ya(g)) {
|
|
95505
95505
|
s.value = !0;
|
|
95506
95506
|
return;
|
|
95507
95507
|
} else
|
|
95508
95508
|
s.value = !1;
|
|
95509
|
-
const
|
|
95510
|
-
f.value = !1;
|
|
95511
|
-
let
|
|
95509
|
+
const m = Zd(o.dbOptions.xAxisField), { newDbO: _, newData: b } = h(o.dbOptions, g);
|
|
95510
|
+
console.log(_, b), g = b, f.value = !1;
|
|
95511
|
+
let w = z([]), C = zp(o.options), x = [], S = [], E = {
|
|
95512
95512
|
xAxis: [],
|
|
95513
95513
|
series: []
|
|
95514
95514
|
};
|
|
95515
|
-
if (d =
|
|
95516
|
-
|
|
95517
|
-
|
|
95518
|
-
|
|
95515
|
+
if (d = g, w.value = g, f.value = !0, w.value && _) {
|
|
95516
|
+
w.value.map((A) => {
|
|
95517
|
+
S.push(
|
|
95518
|
+
m == "function" ? _.xAxisField(A) : A[_.xAxisField]
|
|
95519
95519
|
);
|
|
95520
95520
|
});
|
|
95521
|
-
let
|
|
95522
|
-
if (
|
|
95523
|
-
const
|
|
95524
|
-
return
|
|
95521
|
+
let T = [];
|
|
95522
|
+
if (_.yAxis && _.yAxis.yAxisFields ? T = _.columns.map((A) => {
|
|
95523
|
+
const M = _.yAxis.yAxisFields.find((k) => k.field === A.field);
|
|
95524
|
+
return M ? { ...A, ...M } : A;
|
|
95525
95525
|
}).concat(
|
|
95526
|
-
|
|
95527
|
-
(
|
|
95526
|
+
_.yAxis.yAxisFields.filter(
|
|
95527
|
+
(A) => !_.columns.some((M) => M.field === A.field)
|
|
95528
95528
|
)
|
|
95529
|
-
) :
|
|
95530
|
-
let
|
|
95529
|
+
) : T = _.columns, T.map((A) => {
|
|
95530
|
+
let M = {
|
|
95531
95531
|
name: "",
|
|
95532
|
-
type:
|
|
95533
|
-
yAxisIndex:
|
|
95534
|
-
stack:
|
|
95532
|
+
type: A.type || "line",
|
|
95533
|
+
yAxisIndex: A.yAxisIndex,
|
|
95534
|
+
stack: A.stack,
|
|
95535
95535
|
data: [],
|
|
95536
|
-
lineStyle:
|
|
95537
|
-
areaStyle:
|
|
95536
|
+
lineStyle: A.lineStyle,
|
|
95537
|
+
areaStyle: A.areaStyle
|
|
95538
95538
|
};
|
|
95539
|
-
|
|
95540
|
-
|
|
95541
|
-
}),
|
|
95542
|
-
}),
|
|
95543
|
-
if (
|
|
95544
|
-
let
|
|
95545
|
-
|
|
95546
|
-
let
|
|
95547
|
-
name:
|
|
95539
|
+
w.value.map((k) => {
|
|
95540
|
+
M.name = k[A.title] || A.title, M.data.push(k[A.field]);
|
|
95541
|
+
}), x.push(M);
|
|
95542
|
+
}), C) {
|
|
95543
|
+
if (C.xAxis ? C.xAxis[0].data = S : C.xAxis = [{ data: S }], C.series ? C.series = An({}, C.series, x) : C.series = x, _ && _.yAxis && _.yAxis.yAxises) {
|
|
95544
|
+
let A = [];
|
|
95545
|
+
_.yAxis.yAxises.map((M) => {
|
|
95546
|
+
let k = {
|
|
95547
|
+
name: M.name,
|
|
95548
95548
|
type: "value",
|
|
95549
|
-
position:
|
|
95550
|
-
alignTicks:
|
|
95551
|
-
offset:
|
|
95549
|
+
position: M.position,
|
|
95550
|
+
alignTicks: M.alignTicks,
|
|
95551
|
+
offset: M.offset
|
|
95552
95552
|
};
|
|
95553
|
-
|
|
95554
|
-
}),
|
|
95553
|
+
A.push(k);
|
|
95554
|
+
}), C.yAxis = An({}, C.yAxis, A);
|
|
95555
95555
|
}
|
|
95556
95556
|
} else
|
|
95557
|
-
|
|
95558
|
-
}
|
|
95559
|
-
|
|
95557
|
+
E.xAxis = [{ data: S }], E.series = x;
|
|
95558
|
+
}
|
|
95559
|
+
C ? l.value = UB(C, _.columns) : l.value = UB(E, _.columns);
|
|
95560
|
+
}, h = (g, m) => {
|
|
95561
|
+
if (g.groupField) {
|
|
95562
|
+
const _ = g.groupField, b = g.xAxisField, w = g.columns && g.columns[0].field, C = m, x = [...new Set(C.map((A) => A[_]))], S = [];
|
|
95563
|
+
x.forEach((A, M) => {
|
|
95564
|
+
C.filter((O) => O[_] === A).forEach((O) => {
|
|
95565
|
+
const V = S.find((L) => L[b] === O[b]);
|
|
95566
|
+
if (V)
|
|
95567
|
+
V[`${_}${M + 1}`] = A, V[`${w}${M + 1}`] = O[w];
|
|
95568
|
+
else {
|
|
95569
|
+
const L = {
|
|
95570
|
+
[b]: O[b],
|
|
95571
|
+
[`${_}${M + 1}`]: A,
|
|
95572
|
+
[`${w}${M + 1}`]: O[w]
|
|
95573
|
+
};
|
|
95574
|
+
for (let P = 0; P < x.length; P++)
|
|
95575
|
+
P !== M && (L[`${_}${P + 1}`] = "", L[`${w}${P + 1}`] = 0);
|
|
95576
|
+
S.push(L);
|
|
95577
|
+
}
|
|
95578
|
+
});
|
|
95579
|
+
});
|
|
95580
|
+
const E = [];
|
|
95581
|
+
return x.forEach((A, M) => {
|
|
95582
|
+
g.columns.forEach((k, O) => {
|
|
95583
|
+
E.push({
|
|
95584
|
+
title: A,
|
|
95585
|
+
field: `${k.field}${M + 1}`
|
|
95586
|
+
});
|
|
95587
|
+
});
|
|
95588
|
+
}), {
|
|
95589
|
+
newDbO: {
|
|
95590
|
+
xAxisField: g.xAxisField,
|
|
95591
|
+
groupField: g.groupField,
|
|
95592
|
+
columns: E,
|
|
95593
|
+
data: S
|
|
95594
|
+
},
|
|
95595
|
+
newData: S
|
|
95596
|
+
};
|
|
95597
|
+
} else
|
|
95598
|
+
return {
|
|
95599
|
+
newDbO: g,
|
|
95600
|
+
newData: m
|
|
95601
|
+
};
|
|
95560
95602
|
};
|
|
95561
95603
|
ke(
|
|
95562
95604
|
() => o.dbOptions.data,
|
|
95563
|
-
(
|
|
95564
|
-
c.value = Kt(
|
|
95565
|
-
const
|
|
95566
|
-
|
|
95605
|
+
(g) => {
|
|
95606
|
+
c.value = Kt(g);
|
|
95607
|
+
const m = ["http://", "https://", void 0];
|
|
95608
|
+
g ? (typeof g == "object" && !g.path && !g.dsKey && !c.value.dataUrl && !(typeof g == "string" && m.some((_) => g.includes(_))) && c.value.loadStaticData(g), (typeof g == "string" || typeof g == "object") && (g.path || g.data && typeof g.data == "string") && c.value.reload(g.data || g)) : console.warn("props.dbOptions.data is undefined");
|
|
95567
95609
|
},
|
|
95568
95610
|
{
|
|
95569
95611
|
deep: !0
|
|
95570
95612
|
}
|
|
95571
95613
|
), ke(
|
|
95572
95614
|
() => n["gui-theme"],
|
|
95573
|
-
async (
|
|
95615
|
+
async (g) => {
|
|
95574
95616
|
c.value = null, xe(async () => {
|
|
95575
|
-
i++, c.value = Kt(o.dbOptions.data), p(c.value.data), c.value.on("load", (
|
|
95576
|
-
p(
|
|
95617
|
+
i++, c.value = Kt(o.dbOptions.data), p(c.value.data), c.value.on("load", (m) => {
|
|
95618
|
+
p(m);
|
|
95577
95619
|
});
|
|
95578
95620
|
});
|
|
95579
95621
|
},
|
|
95580
95622
|
{ deep: !0 }
|
|
95581
95623
|
), xe(async () => {
|
|
95582
|
-
c.value = Kt(o.dbOptions.data), c.value.on("load", (
|
|
95583
|
-
p(
|
|
95624
|
+
c.value = Kt(o.dbOptions.data), c.value.on("load", (g) => {
|
|
95625
|
+
p(g);
|
|
95584
95626
|
});
|
|
95585
95627
|
}), t({
|
|
95586
95628
|
props: o,
|
|
@@ -95592,24 +95634,24 @@ const Clt = (e, t) => {
|
|
|
95592
95634
|
return f.value;
|
|
95593
95635
|
}
|
|
95594
95636
|
});
|
|
95595
|
-
const
|
|
95596
|
-
a("chart-click",
|
|
95637
|
+
const v = (g) => {
|
|
95638
|
+
a("chart-click", g);
|
|
95597
95639
|
};
|
|
95598
|
-
return (
|
|
95599
|
-
const
|
|
95640
|
+
return (g, m) => {
|
|
95641
|
+
const _ = vt("g-chart");
|
|
95600
95642
|
return D(), $("div", Blt, [
|
|
95601
|
-
(D(), Se(
|
|
95643
|
+
(D(), Se(_, Pt({ options: l.value }, g.$attrs, {
|
|
95602
95644
|
ref_key: "lineRef",
|
|
95603
95645
|
ref: u,
|
|
95604
95646
|
isEmpty: s.value,
|
|
95605
95647
|
description: e.description,
|
|
95606
|
-
onClick:
|
|
95648
|
+
onClick: v,
|
|
95607
95649
|
key: y(i)
|
|
95608
95650
|
}), null, 16, ["options", "isEmpty", "description"]))
|
|
95609
95651
|
]);
|
|
95610
95652
|
};
|
|
95611
95653
|
}
|
|
95612
|
-
}), Wlt = /* @__PURE__ */ Qn(Hlt, [["__scopeId", "data-v-
|
|
95654
|
+
}), Wlt = /* @__PURE__ */ Qn(Hlt, [["__scopeId", "data-v-56a72cc0"]]), Glt = rr(Wlt), wm = Tr(), Gf = document.documentElement, Ult = (e) => e || "-", Klt = (e) => e || "", Ylt = (e, t) => {
|
|
95613
95655
|
let r = [];
|
|
95614
95656
|
for (let n = 0; n <= e; n++)
|
|
95615
95657
|
r.push({
|
package/lib/g-ui-web.js.gz
CHANGED
|
Binary file
|