g-ui-web 1.1.25 → 1.1.26
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 +99 -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,130 @@ 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.contractAmount;
|
|
95568
|
+
else {
|
|
95569
|
+
const L = {
|
|
95570
|
+
[b]: O[b],
|
|
95571
|
+
[`${_}${M + 1}`]: A,
|
|
95572
|
+
[`${w}${M + 1}`]: O.contractAmount
|
|
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
|
+
// ...column,
|
|
95585
|
+
title: A,
|
|
95586
|
+
field: `${k.field}${M + 1}`
|
|
95587
|
+
});
|
|
95588
|
+
});
|
|
95589
|
+
}), {
|
|
95590
|
+
newDbO: {
|
|
95591
|
+
xAxisField: g.xAxisField,
|
|
95592
|
+
groupField: g.groupField,
|
|
95593
|
+
columns: E,
|
|
95594
|
+
data: S
|
|
95595
|
+
},
|
|
95596
|
+
newData: S
|
|
95597
|
+
};
|
|
95598
|
+
} else
|
|
95599
|
+
return {
|
|
95600
|
+
newDbO: g,
|
|
95601
|
+
newData: m
|
|
95602
|
+
};
|
|
95560
95603
|
};
|
|
95561
95604
|
ke(
|
|
95562
95605
|
() => o.dbOptions.data,
|
|
95563
|
-
(
|
|
95564
|
-
c.value = Kt(
|
|
95565
|
-
const
|
|
95566
|
-
|
|
95606
|
+
(g) => {
|
|
95607
|
+
c.value = Kt(g);
|
|
95608
|
+
const m = ["http://", "https://", void 0];
|
|
95609
|
+
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
95610
|
},
|
|
95568
95611
|
{
|
|
95569
95612
|
deep: !0
|
|
95570
95613
|
}
|
|
95571
95614
|
), ke(
|
|
95572
95615
|
() => n["gui-theme"],
|
|
95573
|
-
async (
|
|
95616
|
+
async (g) => {
|
|
95574
95617
|
c.value = null, xe(async () => {
|
|
95575
|
-
i++, c.value = Kt(o.dbOptions.data), p(c.value.data), c.value.on("load", (
|
|
95576
|
-
p(
|
|
95618
|
+
i++, c.value = Kt(o.dbOptions.data), p(c.value.data), c.value.on("load", (m) => {
|
|
95619
|
+
p(m);
|
|
95577
95620
|
});
|
|
95578
95621
|
});
|
|
95579
95622
|
},
|
|
95580
95623
|
{ deep: !0 }
|
|
95581
95624
|
), xe(async () => {
|
|
95582
|
-
c.value = Kt(o.dbOptions.data), c.value.on("load", (
|
|
95583
|
-
p(
|
|
95625
|
+
c.value = Kt(o.dbOptions.data), c.value.on("load", (g) => {
|
|
95626
|
+
p(g);
|
|
95584
95627
|
});
|
|
95585
95628
|
}), t({
|
|
95586
95629
|
props: o,
|
|
@@ -95592,24 +95635,24 @@ const Clt = (e, t) => {
|
|
|
95592
95635
|
return f.value;
|
|
95593
95636
|
}
|
|
95594
95637
|
});
|
|
95595
|
-
const
|
|
95596
|
-
a("chart-click",
|
|
95638
|
+
const v = (g) => {
|
|
95639
|
+
a("chart-click", g);
|
|
95597
95640
|
};
|
|
95598
|
-
return (
|
|
95599
|
-
const
|
|
95641
|
+
return (g, m) => {
|
|
95642
|
+
const _ = vt("g-chart");
|
|
95600
95643
|
return D(), $("div", Blt, [
|
|
95601
|
-
(D(), Se(
|
|
95644
|
+
(D(), Se(_, Pt({ options: l.value }, g.$attrs, {
|
|
95602
95645
|
ref_key: "lineRef",
|
|
95603
95646
|
ref: u,
|
|
95604
95647
|
isEmpty: s.value,
|
|
95605
95648
|
description: e.description,
|
|
95606
|
-
onClick:
|
|
95649
|
+
onClick: v,
|
|
95607
95650
|
key: y(i)
|
|
95608
95651
|
}), null, 16, ["options", "isEmpty", "description"]))
|
|
95609
95652
|
]);
|
|
95610
95653
|
};
|
|
95611
95654
|
}
|
|
95612
|
-
}), Wlt = /* @__PURE__ */ Qn(Hlt, [["__scopeId", "data-v-
|
|
95655
|
+
}), Wlt = /* @__PURE__ */ Qn(Hlt, [["__scopeId", "data-v-7bf18ebb"]]), Glt = rr(Wlt), wm = Tr(), Gf = document.documentElement, Ult = (e) => e || "-", Klt = (e) => e || "", Ylt = (e, t) => {
|
|
95613
95656
|
let r = [];
|
|
95614
95657
|
for (let n = 0; n <= e; n++)
|
|
95615
95658
|
r.push({
|
package/lib/g-ui-web.js.gz
CHANGED
|
Binary file
|