scope360-core 0.0.112 → 0.0.113
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/scope360-core.js
CHANGED
|
@@ -19223,7 +19223,9 @@ const g_ = /* @__PURE__ */ NC("line", Dl), LC = { class: "chart-container" }, y_
|
|
|
19223
19223
|
props: {
|
|
19224
19224
|
data: { type: Array, required: !0 },
|
|
19225
19225
|
dataType: { type: String, required: !0 },
|
|
19226
|
-
ticksCallback: { type: Function, default: (t) => t }
|
|
19226
|
+
ticksCallback: { type: Function, default: (t) => t },
|
|
19227
|
+
borderColor: { type: String, default: "#007AFF" },
|
|
19228
|
+
gradient: { type: Object, default: { height: 450, startColor: "rgba(0, 122, 255, 0.1)", endColor: "rgba(0, 122, 255, 0)" } }
|
|
19227
19229
|
},
|
|
19228
19230
|
setup(t) {
|
|
19229
19231
|
Lo.register(iu, au, io, Xs, aC, c_);
|
|
@@ -19242,11 +19244,35 @@ const g_ = /* @__PURE__ */ NC("line", Dl), LC = { class: "chart-container" }, y_
|
|
|
19242
19244
|
data: h
|
|
19243
19245
|
}), { labels: Array.from(c), datasets: d };
|
|
19244
19246
|
}, s = U(() => n(e.data)), i = (u) => {
|
|
19245
|
-
const d = u.chart.ctx.createLinearGradient(0, 0, 0,
|
|
19246
|
-
return d.addColorStop(0,
|
|
19247
|
+
const d = u.chart.ctx.createLinearGradient(0, 0, 0, e.gradient.height);
|
|
19248
|
+
return d.addColorStop(0, e.gradient.startColor), d.addColorStop(1, e.gradient.endColor), d;
|
|
19247
19249
|
}, r = (u, c) => {
|
|
19248
19250
|
let d = document.querySelector(`#${u}-${e.dataType}`);
|
|
19249
19251
|
return d || (d = document.createElement("div"), d.classList.add(u), d.setAttribute("id", `${u}-${e.dataType}`), c.canvas.parentNode.appendChild(d)), d;
|
|
19252
|
+
}, a = (u) => {
|
|
19253
|
+
const { chart: c, tooltip: d } = u, h = r("chart-tooltip", c);
|
|
19254
|
+
if (d.opacity === 0) {
|
|
19255
|
+
h.style.opacity = String(0);
|
|
19256
|
+
return;
|
|
19257
|
+
}
|
|
19258
|
+
if (d.body) {
|
|
19259
|
+
const m = d.title || [], g = d.body.map((w) => w.lines), y = document.createElement("div");
|
|
19260
|
+
for (y.classList.add("chart-tooltip-middle"), y.innerHTML = `<div class="chart-tooltip-content">
|
|
19261
|
+
${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
19262
|
+
<span> | ${Ig(m[0])}, ${sV(m[0])}</span></div>`; h.firstChild; )
|
|
19263
|
+
h.firstChild.remove();
|
|
19264
|
+
h.appendChild(y);
|
|
19265
|
+
}
|
|
19266
|
+
const { offsetLeft: f, offsetTop: p } = c.canvas;
|
|
19267
|
+
h.style.opacity = String(1), h.style.left = f + d.caretX + "px", h.style.top = p + d.caretY + "px";
|
|
19268
|
+
}, o = (u) => {
|
|
19269
|
+
const { chart: c } = u, d = r("chart-line", c);
|
|
19270
|
+
c.canvas.addEventListener("mousemove", function(h) {
|
|
19271
|
+
const f = c.canvas.getBoundingClientRect(), p = h.clientX - f.left;
|
|
19272
|
+
d.style.left = p + "px", d.style.display = "flex";
|
|
19273
|
+
}), c.canvas.addEventListener("mouseout", function() {
|
|
19274
|
+
d.style.display = "none";
|
|
19275
|
+
});
|
|
19250
19276
|
}, l = K({
|
|
19251
19277
|
responsive: !0,
|
|
19252
19278
|
maintainAspectRatio: !1,
|
|
@@ -19303,23 +19329,7 @@ const g_ = /* @__PURE__ */ NC("line", Dl), LC = { class: "chart-container" }, y_
|
|
|
19303
19329
|
tooltip: {
|
|
19304
19330
|
enabled: !1,
|
|
19305
19331
|
position: "nearest",
|
|
19306
|
-
external:
|
|
19307
|
-
const { chart: c, tooltip: d } = u, h = r("chart-tooltip", c);
|
|
19308
|
-
if (d.opacity === 0) {
|
|
19309
|
-
h.style.opacity = String(0);
|
|
19310
|
-
return;
|
|
19311
|
-
}
|
|
19312
|
-
if (d.body) {
|
|
19313
|
-
const m = d.title || [], g = d.body.map((w) => w.lines), y = document.createElement("div");
|
|
19314
|
-
for (y.classList.add("chart-tooltip-middle"), y.innerHTML = `<div class="chart-tooltip-content">
|
|
19315
|
-
${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
19316
|
-
<span> | ${Ig(m[0])}, ${sV(m[0])}</span></div>`; h.firstChild; )
|
|
19317
|
-
h.firstChild.remove();
|
|
19318
|
-
h.appendChild(y);
|
|
19319
|
-
}
|
|
19320
|
-
const { offsetLeft: f, offsetTop: p } = c.canvas;
|
|
19321
|
-
h.style.opacity = String(1), h.style.left = f + d.caretX + "px", h.style.top = p + d.caretY + "px";
|
|
19322
|
-
}
|
|
19332
|
+
external: a
|
|
19323
19333
|
},
|
|
19324
19334
|
legend: !1
|
|
19325
19335
|
},
|
|
@@ -19328,7 +19338,7 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19328
19338
|
backgroundColor: (u) => i(u),
|
|
19329
19339
|
tension: 0.3,
|
|
19330
19340
|
borderWidth: 2,
|
|
19331
|
-
borderColor:
|
|
19341
|
+
borderColor: e.borderColor,
|
|
19332
19342
|
fill: "start",
|
|
19333
19343
|
spanGaps: !0
|
|
19334
19344
|
},
|
|
@@ -19336,7 +19346,7 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19336
19346
|
pointStyle: "circle",
|
|
19337
19347
|
pointRadius: 1,
|
|
19338
19348
|
pointHoverRadius: 8,
|
|
19339
|
-
pointBackgroundColor:
|
|
19349
|
+
pointBackgroundColor: e.borderColor,
|
|
19340
19350
|
pointBorderWidth: 0,
|
|
19341
19351
|
pointHoverBorderWidth: 3,
|
|
19342
19352
|
pointBorderColor: "#fff",
|
|
@@ -19344,15 +19354,7 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19344
19354
|
pointHitRadius: 50
|
|
19345
19355
|
}
|
|
19346
19356
|
},
|
|
19347
|
-
onHover:
|
|
19348
|
-
const { chart: c } = u, d = r("chart-line", c);
|
|
19349
|
-
c.canvas.addEventListener("mousemove", function(h) {
|
|
19350
|
-
const f = c.canvas.getBoundingClientRect(), p = h.clientX - f.left;
|
|
19351
|
-
d.style.left = p + "px", d.style.display = "flex";
|
|
19352
|
-
}), c.canvas.addEventListener("mouseout", function() {
|
|
19353
|
-
d.style.display = "none";
|
|
19354
|
-
});
|
|
19355
|
-
}
|
|
19357
|
+
onHover: o
|
|
19356
19358
|
});
|
|
19357
19359
|
return (u, c) => (D(), E("div", LC, [
|
|
19358
19360
|
ue(M(g_), {
|
|
@@ -19364,7 +19366,9 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19364
19366
|
}, FC = {
|
|
19365
19367
|
__name: "SimpleLineChart",
|
|
19366
19368
|
props: {
|
|
19367
|
-
data: { type: Array, required: !0 }
|
|
19369
|
+
data: { type: Array, required: !0 },
|
|
19370
|
+
borderColor: { type: String, default: "#56B683" },
|
|
19371
|
+
gradient: { type: Object, default: { height: 200, startColor: "rgba(86, 182, 131, 0.1)", endColor: "rgba(86, 182, 131, 0)" } }
|
|
19368
19372
|
},
|
|
19369
19373
|
setup(t) {
|
|
19370
19374
|
Lo.register(iu, au, io, Xs, c_);
|
|
@@ -19374,8 +19378,8 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19374
19378
|
data: u
|
|
19375
19379
|
}), { labels: Array.from(o), datasets: l };
|
|
19376
19380
|
}, s = U(() => n(e.data)), i = (a) => {
|
|
19377
|
-
const l = a.chart.ctx.createLinearGradient(0, 0, 0,
|
|
19378
|
-
return l.addColorStop(0,
|
|
19381
|
+
const l = a.chart.ctx.createLinearGradient(0, 0, 0, e.gradient.height);
|
|
19382
|
+
return l.addColorStop(0, e.gradient.startColor), l.addColorStop(1, e.gradient.endColor), l;
|
|
19379
19383
|
}, r = K({
|
|
19380
19384
|
responsive: !0,
|
|
19381
19385
|
maintainAspectRatio: !1,
|
|
@@ -19403,7 +19407,7 @@ ${e.dataType === "balanceChartData" ? `$${$g(g[0])}` : `${$g(g[0])}%`}
|
|
|
19403
19407
|
backgroundColor: (a) => i(a),
|
|
19404
19408
|
tension: 0.3,
|
|
19405
19409
|
borderWidth: 1,
|
|
19406
|
-
borderColor:
|
|
19410
|
+
borderColor: e.borderColor,
|
|
19407
19411
|
fill: "start",
|
|
19408
19412
|
spanGaps: !0
|
|
19409
19413
|
},
|