@yuneta/gobj-ui 7.26.55 → 7.26.56
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/gobj-ui.cjs.js +42 -42
- package/dist/gobj-ui.es.js +3 -3
- package/package.json +4 -4
package/dist/gobj-ui.cjs.js
CHANGED
|
@@ -6,7 +6,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
10
10
|
var __exportAll = (all, no_symbols) => {
|
|
11
11
|
let target = {};
|
|
12
12
|
for (var name in all) __defProp(target, name, {
|
|
@@ -15422,9 +15422,9 @@ function mt_destroy$15(gobj) {
|
|
|
15422
15422
|
gobj.priv.theme_observer.disconnect();
|
|
15423
15423
|
gobj.priv.theme_observer = null;
|
|
15424
15424
|
}
|
|
15425
|
-
let uplot
|
|
15426
|
-
if (uplot
|
|
15427
|
-
uplot
|
|
15425
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15426
|
+
if (uplot) {
|
|
15427
|
+
uplot.destroy();
|
|
15428
15428
|
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "uplot", null);
|
|
15429
15429
|
}
|
|
15430
15430
|
destroy_ui$9(gobj);
|
|
@@ -15454,12 +15454,12 @@ function build_ui$14(gobj) {
|
|
|
15454
15454
|
scales: (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "scales"),
|
|
15455
15455
|
fmtDate: yui_uplot_fmt_date(() => i18next.default.language)
|
|
15456
15456
|
};
|
|
15457
|
-
let uplot$
|
|
15458
|
-
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "uplot", uplot$
|
|
15457
|
+
let uplot$1 = new uplot.default(uPlot_options, (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "data"), $container);
|
|
15458
|
+
(0, _yuneta_gobj_js.gobj_write_attr)(gobj, "uplot", uplot$1);
|
|
15459
15459
|
let fixed_height = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "height");
|
|
15460
15460
|
function fit_to_container() {
|
|
15461
15461
|
let w = $container.clientWidth;
|
|
15462
|
-
if (w > 0) uplot$
|
|
15462
|
+
if (w > 0) uplot$1.setSize({
|
|
15463
15463
|
width: w,
|
|
15464
15464
|
height: fixed_height
|
|
15465
15465
|
});
|
|
@@ -15495,19 +15495,19 @@ function destroy_ui$9(gobj) {
|
|
|
15495
15495
|
*
|
|
15496
15496
|
******************************************************/
|
|
15497
15497
|
function ac_load_data$2(gobj, event, kw, src) {
|
|
15498
|
-
let uplot
|
|
15498
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15499
15499
|
if (!kw.length) {
|
|
15500
|
-
uplot
|
|
15500
|
+
uplot.setData([]);
|
|
15501
15501
|
return -1;
|
|
15502
15502
|
}
|
|
15503
15503
|
let tm = (0, _yuneta_gobj_js.gobj_read_str_attr)(gobj, "tm");
|
|
15504
15504
|
let data = [];
|
|
15505
|
-
let max_series = uplot
|
|
15505
|
+
let max_series = uplot.series.length;
|
|
15506
15506
|
for (let idx = 0; idx < max_series; idx++) data[idx] = [];
|
|
15507
15507
|
for (let i = 0; i < kw.length; i++) {
|
|
15508
15508
|
data[0].push(kw[i][tm]);
|
|
15509
|
-
for (let idx = 1; idx < uplot
|
|
15510
|
-
let serie = uplot
|
|
15509
|
+
for (let idx = 1; idx < uplot.series.length; idx++) {
|
|
15510
|
+
let serie = uplot.series[idx];
|
|
15511
15511
|
let value = kw[i][serie.id];
|
|
15512
15512
|
if ((0, _yuneta_gobj_js.is_string)(value)) {
|
|
15513
15513
|
if (value.toLowerCase() === "on") value = 1;
|
|
@@ -15520,20 +15520,20 @@ function ac_load_data$2(gobj, event, kw, src) {
|
|
|
15520
15520
|
data[idx].push(value);
|
|
15521
15521
|
}
|
|
15522
15522
|
}
|
|
15523
|
-
uplot
|
|
15524
|
-
Array.from(uplot
|
|
15523
|
+
uplot.setData(data);
|
|
15524
|
+
Array.from(uplot.root.querySelectorAll(".cursor-pt")).forEach(function(pt, i) {
|
|
15525
15525
|
pt.onclick = function(e) {
|
|
15526
15526
|
let seriesIdx = i + 1;
|
|
15527
|
-
let dataIdx = uplot
|
|
15528
|
-
let xVal = uplot
|
|
15529
|
-
let yVal = uplot
|
|
15530
|
-
let xPos = uplot
|
|
15531
|
-
let yPos = uplot
|
|
15527
|
+
let dataIdx = uplot.cursor.idx;
|
|
15528
|
+
let xVal = uplot.data[0][dataIdx];
|
|
15529
|
+
let yVal = uplot.data[seriesIdx][dataIdx];
|
|
15530
|
+
let xPos = uplot.valToPos(xVal, "x");
|
|
15531
|
+
let yPos = uplot.valToPos(yVal, "y");
|
|
15532
15532
|
let heart = document.createElement("div");
|
|
15533
15533
|
heart.classList.add("heart");
|
|
15534
15534
|
heart.style.left = xPos + "px";
|
|
15535
15535
|
heart.style.top = yPos + "px";
|
|
15536
|
-
uplot
|
|
15536
|
+
uplot.root.querySelector(".over").appendChild(heart);
|
|
15537
15537
|
};
|
|
15538
15538
|
});
|
|
15539
15539
|
return 0;
|
|
@@ -15542,10 +15542,10 @@ function ac_load_data$2(gobj, event, kw, src) {
|
|
|
15542
15542
|
*
|
|
15543
15543
|
******************************************************/
|
|
15544
15544
|
function ac_add_serie(gobj, event, kw, src) {
|
|
15545
|
-
let uplot
|
|
15545
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15546
15546
|
let idx = 0;
|
|
15547
|
-
for (; idx < uplot
|
|
15548
|
-
let serie = uplot
|
|
15547
|
+
for (; idx < uplot.series.length; idx++) {
|
|
15548
|
+
let serie = uplot.series[idx];
|
|
15549
15549
|
if (serie.id && serie.id === kw.id) {
|
|
15550
15550
|
(0, _yuneta_gobj_js.log_error)("Serie '" + kw.id + "' already exists");
|
|
15551
15551
|
return -1;
|
|
@@ -15556,7 +15556,7 @@ function ac_add_serie(gobj, event, kw, src) {
|
|
|
15556
15556
|
let color = colors[Math.max(0, idx - 1) % colors.length];
|
|
15557
15557
|
if (kw.stroke === void 0) kw.stroke = color.stroke;
|
|
15558
15558
|
if (kw.fill === void 0) kw.fill = color.fill;
|
|
15559
|
-
uplot
|
|
15559
|
+
uplot.addSeries(kw);
|
|
15560
15560
|
return 0;
|
|
15561
15561
|
}
|
|
15562
15562
|
/******************************************************
|
|
@@ -15564,10 +15564,10 @@ function ac_add_serie(gobj, event, kw, src) {
|
|
|
15564
15564
|
* one already, the canvas is what has to be painted again.
|
|
15565
15565
|
******************************************************/
|
|
15566
15566
|
function ac_theme$4(gobj, event, kw, src) {
|
|
15567
|
-
let uplot
|
|
15568
|
-
if (!uplot
|
|
15567
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15568
|
+
if (!uplot) return 0;
|
|
15569
15569
|
try {
|
|
15570
|
-
uplot
|
|
15570
|
+
uplot.redraw();
|
|
15571
15571
|
} catch (e) {
|
|
15572
15572
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot redraw the chart: ${e}`);
|
|
15573
15573
|
}
|
|
@@ -15579,11 +15579,11 @@ function ac_theme$4(gobj, event, kw, src) {
|
|
|
15579
15579
|
* so they are written again.
|
|
15580
15580
|
******************************************************/
|
|
15581
15581
|
function ac_language_changed$9(gobj, event, kw, src) {
|
|
15582
|
-
let uplot
|
|
15583
|
-
if (!uplot
|
|
15582
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15583
|
+
if (!uplot) return 0;
|
|
15584
15584
|
try {
|
|
15585
|
-
uplot
|
|
15586
|
-
uplot
|
|
15585
|
+
uplot.redraw(true, true);
|
|
15586
|
+
uplot.setLegend(null, false);
|
|
15587
15587
|
} catch (e) {
|
|
15588
15588
|
(0, _yuneta_gobj_js.log_error)(`${(0, _yuneta_gobj_js.gobj_short_name)(gobj)}: cannot redraw the chart: ${e}`);
|
|
15589
15589
|
}
|
|
@@ -15593,14 +15593,14 @@ function ac_language_changed$9(gobj, event, kw, src) {
|
|
|
15593
15593
|
*
|
|
15594
15594
|
******************************************************/
|
|
15595
15595
|
function ac_del_serie(gobj, event, kw, src) {
|
|
15596
|
-
let uplot
|
|
15597
|
-
for (let idx = 1; idx < uplot
|
|
15598
|
-
let serie = uplot
|
|
15596
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15597
|
+
for (let idx = 1; idx < uplot.series.length; idx++) {
|
|
15598
|
+
let serie = uplot.series[idx];
|
|
15599
15599
|
if (serie.id && serie.id === kw.id) {
|
|
15600
|
-
uplot
|
|
15601
|
-
let data = uplot
|
|
15600
|
+
uplot.delSeries(idx);
|
|
15601
|
+
let data = uplot.data.splice(idx, 1);
|
|
15602
15602
|
if (data.length === 1) data = [[]];
|
|
15603
|
-
uplot
|
|
15603
|
+
uplot.setData(data);
|
|
15604
15604
|
return 0;
|
|
15605
15605
|
}
|
|
15606
15606
|
}
|
|
@@ -15610,9 +15610,9 @@ function ac_del_serie(gobj, event, kw, src) {
|
|
|
15610
15610
|
*
|
|
15611
15611
|
******************************************************/
|
|
15612
15612
|
function ac_clear$1(gobj, event, kw, src) {
|
|
15613
|
-
let uplot
|
|
15614
|
-
uplot
|
|
15615
|
-
for (let idx = uplot
|
|
15613
|
+
let uplot = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "uplot");
|
|
15614
|
+
uplot.setData([[]]);
|
|
15615
|
+
for (let idx = uplot.series.length - 1; idx > 0; idx--) uplot.delSeries(idx);
|
|
15616
15616
|
return 0;
|
|
15617
15617
|
}
|
|
15618
15618
|
/***************************
|
|
@@ -55047,10 +55047,10 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
55047
55047
|
* @author AntVis
|
|
55048
55048
|
* @docs https://g.antv.antgroup.com/
|
|
55049
55049
|
*/
|
|
55050
|
-
(/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
55050
|
+
(/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
55051
55051
|
(function(global, factory) {
|
|
55052
55052
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.html2canvas = factory());
|
|
55053
|
-
})(
|
|
55053
|
+
})(this$1, (function() {
|
|
55054
55054
|
"use strict";
|
|
55055
55055
|
var extendStatics = function(d, b) {
|
|
55056
55056
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
package/dist/gobj-ui.es.js
CHANGED
|
@@ -13,7 +13,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
13
13
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
14
|
var __getProtoOf = Object.getPrototypeOf;
|
|
15
15
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
16
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
|
|
17
17
|
var __exportAll = (all, no_symbols) => {
|
|
18
18
|
let target = {};
|
|
19
19
|
for (var name in all) __defProp(target, name, {
|
|
@@ -55042,10 +55042,10 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
55042
55042
|
* @author AntVis
|
|
55043
55043
|
* @docs https://g.antv.antgroup.com/
|
|
55044
55044
|
*/
|
|
55045
|
-
(/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
55045
|
+
(/* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
55046
55046
|
(function(global, factory) {
|
|
55047
55047
|
typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory() : typeof define === "function" && define.amd ? define(factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, global.html2canvas = factory());
|
|
55048
|
-
})(
|
|
55048
|
+
})(this$1, (function() {
|
|
55049
55049
|
"use strict";
|
|
55050
55050
|
var extendStatics = function(d, b) {
|
|
55051
55051
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, b) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuneta/gobj-ui",
|
|
3
|
-
"version": "7.26.
|
|
3
|
+
"version": "7.26.56",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/gobj-ui.cjs.js",
|
|
6
6
|
"module": "dist/gobj-ui.es.js",
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"@rollup/plugin-terser": "^1.0.0",
|
|
42
42
|
"@vitest/coverage-v8": "^4.1.10",
|
|
43
43
|
"@yuneta/gobj-js": "^7.26.28",
|
|
44
|
-
"vite": "^8.3.
|
|
44
|
+
"vite": "^8.3.4",
|
|
45
45
|
"vitest": "^4.1.10"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@antv/g6": "^5.1.0",
|
|
49
49
|
"@yuneta/gobj-js": "^7.26.3",
|
|
50
50
|
"bulma": "^1.0.4",
|
|
51
|
-
"i18next": "^26.
|
|
52
|
-
"maplibre-gl": "^6.
|
|
51
|
+
"i18next": "^26.4.5",
|
|
52
|
+
"maplibre-gl": "^6.14.0",
|
|
53
53
|
"tabulator-tables": "^6.5.3",
|
|
54
54
|
"tom-select": "^2.6.2",
|
|
55
55
|
"uplot": "^1.6.32",
|