@svgrid/grid 3.0.2 → 3.0.4
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/README.md +2 -1
- package/dist/GridMenus.svelte +44 -2
- package/dist/SvChartMenu.svelte +69 -0
- package/dist/SvChartMenu.svelte.d.ts +11 -0
- package/dist/SvChartPanes.svelte +113 -0
- package/dist/SvChartPanes.svelte.d.ts +20 -0
- package/dist/SvGrid.controller.svelte.d.ts +110 -39
- package/dist/SvGrid.controller.svelte.js +655 -200
- package/dist/SvGrid.css +105 -2
- package/dist/SvGrid.svelte +386 -514
- package/dist/SvGrid.types.d.ts +210 -9
- package/dist/SvGridCellEditor.svelte +17 -0
- package/dist/SvGridChart.svelte +2257 -329
- package/dist/SvGridChart.svelte.d.ts +6 -106
- package/dist/SvGridChart.types.d.ts +338 -0
- package/dist/SvGridChart.types.js +1 -0
- package/dist/SvGridChartBuilder.svelte +323 -0
- package/dist/SvGridChartBuilder.svelte.d.ts +34 -0
- package/dist/SvGridChartPanel.svelte +221 -275
- package/dist/SvGridChartPickers.svelte +417 -0
- package/dist/SvGridChartPickers.svelte.d.ts +70 -0
- package/dist/SvGridChartView.svelte +13 -14
- package/dist/SvModal.svelte +7 -1
- package/dist/SvModal.svelte.d.ts +5 -0
- package/dist/ai.d.ts +40 -8
- package/dist/ai.js +135 -24
- package/dist/aria.d.ts +11 -0
- package/dist/build-api.js +108 -22
- package/dist/cdn/GridMenus-7kbpnnBW.js +635 -0
- package/dist/cdn/GridMenus-BL7ZgQvU.js +636 -0
- package/dist/cdn/SvChartMenu-Bl6PBbkT.js +58 -0
- package/dist/cdn/SvChartMenu-FBSMINA6.js +59 -0
- package/dist/cdn/{SvDateRangeInput-DMLKmGEc.js → SvDateRangeInput-BeU_TkbQ.js} +15 -14
- package/dist/cdn/{SvDateRangeInput-CaOuMs8O.js → SvDateRangeInput-yX8vzleW.js} +38 -37
- package/dist/cdn/{SvDateTimePicker-sonaH0oh.js → SvDateTimePicker-DQwt4UAs.js} +139 -180
- package/dist/cdn/SvDateTimePicker-vNU6bZ-q.js +775 -0
- package/dist/cdn/{SvGridCellEditor-CjEJMJKc.js → SvGridCellEditor-B1p-vCK5.js} +188 -178
- package/dist/cdn/{SvGridCellEditor-BWnTi2N7.js → SvGridCellEditor-D_0q4xAu.js} +98 -88
- package/dist/cdn/SvGridChart-C3EWAZaM.js +3574 -0
- package/dist/cdn/SvGridChart-DzLkSwCH.js +3572 -0
- package/dist/cdn/SvGridChartBuilder-BE2T1ykB.js +783 -0
- package/dist/cdn/SvGridChartBuilder-CfII62sZ.js +784 -0
- package/dist/cdn/SvGridChartPanel-CCX5_Wgd.js +675 -0
- package/dist/cdn/SvGridChartPanel-xf4sWVTo.js +699 -0
- package/dist/cdn/SvGridChartView-CfuXmY5I.js +48 -0
- package/dist/cdn/SvGridChartView-DYwabQWj.js +47 -0
- package/dist/cdn/SvMenuList-CLN8OuIK.js +452 -0
- package/dist/cdn/SvMenuList-DkGhNKjf.js +451 -0
- package/dist/cdn/SvModal-BAE-pjZX.js +396 -0
- package/dist/cdn/SvModal-CIZWCcad.js +397 -0
- package/dist/cdn/chart-Dz7SqMXH.js +4341 -0
- package/dist/cdn/chart-export-BXqueeWJ.js +135 -0
- package/dist/cdn/chart-export-pdf-DONFUnNY.js +110 -0
- package/dist/cdn/chart-panel-messages-CUbf2R4i.js +1052 -0
- package/dist/cdn/chart-panel-messages-CmNrMdsr.js +1053 -0
- package/dist/cdn/chart-summary-BJW_tg_X.js +138 -0
- package/dist/cdn/chart-trend-CaN9mDEV.js +50 -0
- package/dist/cdn/chart-validate-HcOVFAfJ.js +188 -0
- package/dist/cdn/{column-resize-DsfNXMom.js → column-resize-DpmOLfRp.js} +3 -3
- package/dist/cdn/{date-format-BnnHlqGw.js → date-format-CtquV-p3.js} +583 -603
- package/dist/cdn/{date-format-BNii4zeD.js → date-format-D6KFzU_W.js} +347 -367
- package/dist/cdn/dismissable-DAHetSNk.js +44 -0
- package/dist/cdn/editor-contract-LXgQJAgd.js +22 -0
- package/dist/cdn/focus-trap-BBOQYBma.js +65 -0
- package/dist/cdn/{row-resize-BRcimkUT.js → row-resize-niQCp040.js} +44 -36
- package/dist/cdn/{src-DNbz94Ct.js → src-BKhZ6eXd.js} +10227 -9787
- package/dist/cdn/{src-BJ2opd0j.js → src-V1uu8iE9.js} +6568 -6128
- package/dist/cdn/svgrid.js +26 -15
- package/dist/cdn/svgrid.svelte-external.js +26 -15
- package/dist/chart-axes.d.ts +53 -0
- package/dist/chart-axes.js +351 -0
- package/dist/chart-cartesian.d.ts +88 -0
- package/dist/chart-cartesian.js +1862 -0
- package/dist/chart-decimate.d.ts +51 -0
- package/dist/chart-decimate.js +199 -0
- package/dist/chart-export-pdf.d.ts +47 -0
- package/dist/chart-export-pdf.js +187 -0
- package/dist/chart-export.d.ts +2 -1
- package/dist/chart-export.js +18 -3
- package/dist/chart-financial.d.ts +91 -0
- package/dist/chart-financial.js +175 -0
- package/dist/chart-flow.d.ts +10 -0
- package/dist/chart-flow.js +298 -0
- package/dist/chart-format.d.ts +18 -0
- package/dist/chart-format.js +65 -0
- package/dist/chart-grid.d.ts +8 -0
- package/dist/chart-grid.js +190 -0
- package/dist/chart-hierarchy.d.ts +17 -0
- package/dist/chart-hierarchy.js +146 -0
- package/dist/chart-indicators.d.ts +115 -0
- package/dist/chart-indicators.js +389 -0
- package/dist/chart-messages.d.ts +95 -0
- package/dist/chart-messages.js +92 -0
- package/dist/chart-motion.d.ts +16 -0
- package/dist/chart-motion.js +141 -0
- package/dist/chart-panel-messages.d.ts +265 -0
- package/dist/chart-panel-messages.js +285 -0
- package/dist/chart-pivot.d.ts +87 -0
- package/dist/chart-pivot.js +156 -0
- package/dist/chart-polar.d.ts +25 -0
- package/dist/chart-polar.js +700 -0
- package/dist/chart-samples.d.ts +16 -0
- package/dist/chart-samples.js +153 -0
- package/dist/chart-scale.d.ts +113 -0
- package/dist/chart-scale.js +405 -0
- package/dist/chart-stats.d.ts +111 -0
- package/dist/chart-stats.js +419 -0
- package/dist/chart-stream.d.ts +45 -0
- package/dist/chart-stream.js +91 -0
- package/dist/chart-summary.d.ts +27 -0
- package/dist/chart-summary.js +205 -0
- package/dist/chart-sync.svelte.d.ts +32 -0
- package/dist/chart-sync.svelte.js +23 -0
- package/dist/chart-table.d.ts +35 -0
- package/dist/chart-table.js +165 -0
- package/dist/chart-trend.d.ts +19 -0
- package/dist/chart-trend.js +61 -0
- package/dist/chart-types.d.ts +1456 -0
- package/dist/chart-types.js +6 -0
- package/dist/chart-validate.d.ts +43 -0
- package/dist/chart-validate.js +272 -0
- package/dist/chart-zoom.d.ts +40 -0
- package/dist/chart-zoom.js +145 -0
- package/dist/chart.d.ts +186 -865
- package/dist/chart.js +460 -2204
- package/dist/clipboard.d.ts +1 -0
- package/dist/clipboard.js +137 -18
- package/dist/column-resize.d.ts +3 -0
- package/dist/column-resize.js +4 -1
- package/dist/columns.js +3 -0
- package/dist/command-context.d.ts +19 -0
- package/dist/command-context.js +116 -0
- package/dist/core.d.ts +7 -0
- package/dist/createPopoverSelect.svelte.d.ts +2 -2
- package/dist/editing.d.ts +2 -8
- package/dist/editing.js +262 -33
- package/dist/fill-patterns.d.ts +0 -5
- package/dist/fill-patterns.js +56 -2
- package/dist/grid-messages.d.ts +10 -3
- package/dist/grid-messages.js +5 -0
- package/dist/history.d.ts +83 -0
- package/dist/history.js +133 -0
- package/dist/index.d.ts +24 -6
- package/dist/index.js +20 -2
- package/dist/keyboard-handlers.js +88 -31
- package/dist/keyboard.d.ts +55 -0
- package/dist/keyboard.js +132 -0
- package/dist/menus.d.ts +3 -1
- package/dist/menus.js +7 -2
- package/dist/merges.d.ts +97 -0
- package/dist/merges.js +147 -0
- package/dist/row-resize.d.ts +3 -0
- package/dist/row-resize.js +14 -0
- package/dist/scroll-sync.d.ts +1 -0
- package/dist/scroll-sync.js +24 -0
- package/dist/selection.d.ts +16 -0
- package/dist/selection.js +108 -16
- package/dist/shortcut-registry.d.ts +145 -0
- package/dist/shortcut-registry.js +44 -0
- package/dist/svgrid-wrapper.types.d.ts +213 -22
- package/dist/virtualization/virtualizer.js +38 -17
- package/package.json +6 -1
- package/src/GridMenus.svelte +44 -2
- package/src/SvChartMenu.svelte +69 -0
- package/src/SvChartPanes.svelte +113 -0
- package/src/SvChartPanes.test.ts +66 -0
- package/src/SvGrid.controller.svelte.ts +629 -172
- package/src/SvGrid.css +105 -2
- package/src/SvGrid.svelte +386 -514
- package/src/SvGrid.types.ts +188 -8
- package/src/SvGridCellEditor.svelte +17 -0
- package/src/SvGridChart.svelte +2257 -329
- package/src/SvGridChart.test.ts +1419 -1
- package/src/SvGridChart.types.ts +336 -0
- package/src/SvGridChartBuilder.svelte +323 -0
- package/src/SvGridChartPanel.svelte +221 -275
- package/src/SvGridChartPickers.svelte +417 -0
- package/src/SvGridChartView.svelte +13 -14
- package/src/SvModal.svelte +7 -1
- package/src/SvModal.test.ts +9 -0
- package/src/ai.test.ts +57 -2
- package/src/ai.ts +166 -22
- package/src/aria.d.ts +11 -0
- package/src/build-api.coverage.test.ts +184 -0
- package/src/build-api.ts +107 -18
- package/src/chart-axes.test.ts +573 -0
- package/src/chart-axes.ts +342 -0
- package/src/chart-cartesian.ts +1863 -0
- package/src/chart-decimate.test.ts +249 -0
- package/src/chart-decimate.ts +186 -0
- package/src/chart-export-pdf.test.ts +91 -0
- package/src/chart-export-pdf.ts +207 -0
- package/src/chart-export.test.ts +14 -0
- package/src/chart-export.ts +13 -3
- package/src/chart-financial.ts +208 -0
- package/src/chart-flow.ts +286 -0
- package/src/chart-format.ts +67 -0
- package/src/chart-grid.ts +179 -0
- package/src/chart-hierarchy.ts +135 -0
- package/src/chart-indicators.test.ts +443 -0
- package/src/chart-indicators.ts +384 -0
- package/src/chart-messages.test.ts +21 -0
- package/src/chart-messages.ts +184 -0
- package/src/chart-motion.test.ts +71 -0
- package/src/chart-motion.ts +148 -0
- package/src/chart-panel-messages.test.ts +29 -0
- package/src/chart-panel-messages.ts +550 -0
- package/src/chart-pivot.test.ts +54 -0
- package/src/chart-pivot.ts +225 -0
- package/src/chart-polar.ts +674 -0
- package/src/chart-samples.ts +106 -0
- package/src/chart-scale.ts +394 -0
- package/src/chart-series-types.test.ts +714 -0
- package/src/chart-stats.ts +409 -0
- package/src/chart-stream.test.ts +75 -0
- package/src/chart-stream.ts +114 -0
- package/src/chart-summary.test.ts +90 -0
- package/src/chart-summary.ts +197 -0
- package/src/chart-sync.svelte.ts +41 -0
- package/src/chart-table.test.ts +76 -0
- package/src/chart-table.ts +178 -0
- package/src/chart-trend.ts +47 -0
- package/src/chart-types.ts +1309 -0
- package/src/chart-validate.test.ts +100 -0
- package/src/chart-validate.ts +247 -0
- package/src/chart-zoom.test.ts +137 -0
- package/src/chart-zoom.ts +124 -0
- package/src/chart.coverage.test.ts +81 -0
- package/src/chart.test.ts +56 -3
- package/src/chart.ts +557 -2784
- package/src/clipboard.test.ts +151 -0
- package/src/clipboard.ts +145 -16
- package/src/column-resize.ts +7 -1
- package/src/columns.ts +2 -0
- package/src/command-context.test.ts +200 -0
- package/src/command-context.ts +137 -0
- package/src/core.ts +7 -0
- package/src/editing.test.ts +281 -3
- package/src/editing.ts +256 -38
- package/src/fill-patterns.test.ts +35 -0
- package/src/fill-patterns.ts +56 -2
- package/src/grid-messages.ts +16 -3
- package/src/history.test.ts +196 -0
- package/src/history.ts +162 -0
- package/src/icon-seam.test.ts +3 -2
- package/src/index.ts +150 -2
- package/src/keyboard-handlers.coverage.test.ts +126 -6
- package/src/keyboard-handlers.ts +91 -30
- package/src/keyboard-shortcuts.seam.test.ts +200 -0
- package/src/keyboard.test.ts +124 -1
- package/src/keyboard.ts +142 -0
- package/src/menus.test.ts +26 -0
- package/src/menus.ts +10 -3
- package/src/merges.test.ts +112 -0
- package/src/merges.ts +168 -0
- package/src/pivot.grid.test.ts +40 -5
- package/src/row-resize.test.ts +44 -0
- package/src/row-resize.ts +17 -0
- package/src/scroll-sync.test.ts +42 -1
- package/src/scroll-sync.ts +25 -0
- package/src/selection.multi-range.test.ts +34 -0
- package/src/selection.test.ts +30 -2
- package/src/selection.ts +111 -19
- package/src/shortcut-registry.test.ts +97 -0
- package/src/shortcut-registry.ts +181 -0
- package/src/svgrid-wrapper.types.ts +184 -13
- package/src/svgrid.behavior.test.ts +135 -0
- package/src/svgrid.charting.test.ts +513 -3
- package/src/svgrid.context-menu.test.ts +31 -0
- package/src/svgrid.new-features.wrapper.test.ts +10 -3
- package/src/virtualization/virtualizer.ts +39 -17
- package/dist/cdn/GridMenus-DyFA-QxA.js +0 -602
- package/dist/cdn/GridMenus-M2XP9t0_.js +0 -603
- package/dist/cdn/SvDateTimePicker-CCbDZNZB.js +0 -816
- package/dist/cdn/SvGridChart-DAb9RbRs.js +0 -1480
- package/dist/cdn/SvGridChart-Yl-IXZFO.js +0 -1481
- package/dist/cdn/SvGridChartPanel-DayQpDsR.js +0 -834
- package/dist/cdn/SvGridChartPanel-aqf8n-vJ.js +0 -810
- package/dist/cdn/SvGridChartView-CxfakxR0.js +0 -56
- package/dist/cdn/SvGridChartView-Dm_YEx9L.js +0 -55
- package/dist/cdn/chart-CKJRCPOk.js +0 -1652
|
@@ -0,0 +1,699 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { B as t, C as n, E as r, F as i, G as a, H as o, I as s, L as c, N as l, R as u, U as d, V as f, X as p, Y as m, _ as h, a as g, at as _, d as v, et as y, i as b, it as x, k as S, lt as ee, n as C, nt as w, o as T, pt as E, r as D, st as O, t as k, tt as A, u as te, ut as j, v as M, w as ne, x as N } from "./disclose-version-Dr7rEVv-.js";
|
|
3
|
+
import { z as P } from "./chart-Dz7SqMXH.js";
|
|
4
|
+
import { t as re } from "./SvGridChart-DzLkSwCH.js";
|
|
5
|
+
import { a as ie, o as ae, r as oe, s as se, t as ce } from "./chart-export-BXqueeWJ.js";
|
|
6
|
+
import { a as le, i as ue, r as de, t as fe } from "./chart-panel-messages-CUbf2R4i.js";
|
|
7
|
+
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
|
|
8
|
+
function pe(e) {
|
|
9
|
+
let t = e - 1;
|
|
10
|
+
return t * t * t + 1;
|
|
11
|
+
}
|
|
12
|
+
function me(e) {
|
|
13
|
+
let t = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
14
|
+
return t ? [parseFloat(t[1]), t[2] || "px"] : [e, "px"];
|
|
15
|
+
}
|
|
16
|
+
function he(e, { delay: t = 0, duration: n = 400, easing: r = pe, x: i = 0, y: a = 0, opacity: o = 0 } = {}) {
|
|
17
|
+
let s = getComputedStyle(e), c = +s.opacity, l = s.transform === "none" ? "" : s.transform, u = c * (1 - o), [d, f] = me(i), [p, m] = me(a);
|
|
18
|
+
return {
|
|
19
|
+
delay: t,
|
|
20
|
+
duration: n,
|
|
21
|
+
easing: r,
|
|
22
|
+
css: (e, t) => `
|
|
23
|
+
transform: ${l} translate(${(1 - e) * d}${f}, ${(1 - e) * p}${m});
|
|
24
|
+
opacity: ${c - u * t}`
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/easing/index.js
|
|
29
|
+
function ge(e) {
|
|
30
|
+
let t = e - 1;
|
|
31
|
+
return t * t * t + 1;
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/SvChartPanes.svelte
|
|
35
|
+
var _e = c("<div class=\"sv-chart-pane is-indicator svelte-1osc6vl\"><span class=\"sv-chart-pane-title svelte-1osc6vl\"> </span> <!></div>"), F = c("<div class=\"sv-chart-panes svelte-1osc6vl\"><div class=\"sv-chart-pane is-main svelte-1osc6vl\"><!></div> <!></div>"), I = {
|
|
36
|
+
hash: "svelte-1osc6vl",
|
|
37
|
+
code: ".sv-chart-panes.svelte-1osc6vl {display:flex;flex-direction:column;gap:2px;min-width:0;}.sv-chart-pane.svelte-1osc6vl {position:relative;min-width:0;}\n /* The title of a pane sits in its top-left corner, small, like a terminal. */\n /* Placed just right of the value-axis gutter, clear of the tick labels. */.sv-chart-pane-title.svelte-1osc6vl {position:absolute;top:2px;z-index:1;font-size:10px;font-weight:600;color:var(--sg-muted, #64748b);pointer-events:none;}"
|
|
38
|
+
};
|
|
39
|
+
function ve(e, t) {
|
|
40
|
+
j(t, !0), N(e, I);
|
|
41
|
+
let n = k(t, "indicators", 19, () => []), o = k(t, "axisWidth", 3, 56), s = k(t, "zoom", 15, null), c = C(t, [
|
|
42
|
+
"$$slots",
|
|
43
|
+
"$$events",
|
|
44
|
+
"$$legacy",
|
|
45
|
+
"spec",
|
|
46
|
+
"indicators",
|
|
47
|
+
"syncGroup",
|
|
48
|
+
"axisWidth",
|
|
49
|
+
"zoom",
|
|
50
|
+
"onZoom",
|
|
51
|
+
"zoomable",
|
|
52
|
+
"legend",
|
|
53
|
+
"toolbar"
|
|
54
|
+
]), u = `svcp-${Math.random().toString(36).slice(2, 8)}`, d = O(() => t.syncGroup ?? u), f = _(0), p = (e) => a(f) > 0 && !e.width ? { width: Math.round(a(f)) } : {}, b = O(() => ({
|
|
55
|
+
...t.spec,
|
|
56
|
+
...p(t.spec),
|
|
57
|
+
xAxis: {
|
|
58
|
+
...t.spec.xAxis,
|
|
59
|
+
...n().length ? { labels: !1 } : {}
|
|
60
|
+
},
|
|
61
|
+
yAxis: {
|
|
62
|
+
...t.spec.yAxis,
|
|
63
|
+
width: o()
|
|
64
|
+
},
|
|
65
|
+
...t.spec.y2Axis || t.spec.series.some((e) => e.axis === "right") ? { y2Axis: {
|
|
66
|
+
...t.spec.y2Axis,
|
|
67
|
+
width: o()
|
|
68
|
+
} } : {}
|
|
69
|
+
})), S = O(() => n().map((e, r) => {
|
|
70
|
+
let { title: i, ...a } = P(t.spec, e);
|
|
71
|
+
return {
|
|
72
|
+
title: i ?? e.kind,
|
|
73
|
+
spec: {
|
|
74
|
+
...a,
|
|
75
|
+
...p(a),
|
|
76
|
+
xAxis: {
|
|
77
|
+
...a.xAxis,
|
|
78
|
+
labels: r === n().length - 1
|
|
79
|
+
},
|
|
80
|
+
yAxis: {
|
|
81
|
+
...a.yAxis,
|
|
82
|
+
width: o()
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}));
|
|
87
|
+
var T = F(), A = y(T), te = y(A);
|
|
88
|
+
re(te, D({
|
|
89
|
+
get spec() {
|
|
90
|
+
return a(b);
|
|
91
|
+
},
|
|
92
|
+
get syncGroup() {
|
|
93
|
+
return a(d);
|
|
94
|
+
},
|
|
95
|
+
get onZoom() {
|
|
96
|
+
return t.onZoom;
|
|
97
|
+
},
|
|
98
|
+
get zoomable() {
|
|
99
|
+
return t.zoomable;
|
|
100
|
+
},
|
|
101
|
+
get legend() {
|
|
102
|
+
return t.legend;
|
|
103
|
+
},
|
|
104
|
+
get toolbar() {
|
|
105
|
+
return t.toolbar;
|
|
106
|
+
}
|
|
107
|
+
}, () => c, {
|
|
108
|
+
get zoom() {
|
|
109
|
+
return s();
|
|
110
|
+
},
|
|
111
|
+
set zoom(e) {
|
|
112
|
+
s(e);
|
|
113
|
+
}
|
|
114
|
+
})), E(A);
|
|
115
|
+
var M = w(A, 2);
|
|
116
|
+
r(M, 19, () => a(S), (e, t) => `${n()[t]?.kind}-${t}`, (e, r, s) => {
|
|
117
|
+
var c = _e(), u = y(c);
|
|
118
|
+
let f;
|
|
119
|
+
var p = y(u, !0);
|
|
120
|
+
E(u);
|
|
121
|
+
var g = w(u, 2);
|
|
122
|
+
{
|
|
123
|
+
let e = O(() => t.zoomable ? {
|
|
124
|
+
drag: !1,
|
|
125
|
+
wheel: typeof t.zoomable == "object" && t.zoomable.wheel,
|
|
126
|
+
pan: typeof t.zoomable == "object" && t.zoomable.pan
|
|
127
|
+
} : !1);
|
|
128
|
+
re(g, {
|
|
129
|
+
get spec() {
|
|
130
|
+
return a(r).spec;
|
|
131
|
+
},
|
|
132
|
+
get syncGroup() {
|
|
133
|
+
return a(d);
|
|
134
|
+
},
|
|
135
|
+
get zoomable() {
|
|
136
|
+
return a(e);
|
|
137
|
+
},
|
|
138
|
+
legend: !1,
|
|
139
|
+
toolbar: !1,
|
|
140
|
+
interactive: !0,
|
|
141
|
+
get localeText() {
|
|
142
|
+
return t.localeText;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
E(c), m(() => {
|
|
147
|
+
v(c, "data-indicator", n()[a(s)]?.kind), f = h(u, "", f, { left: `${o() + 6}px` }), l(p, a(r).title);
|
|
148
|
+
}), i(e, c);
|
|
149
|
+
}), E(T), g(T, "clientWidth", (e) => x(f, e)), i(e, T), ee();
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/SvGridChartPanel.svelte
|
|
153
|
+
var ye = /* @__PURE__ */ e({ default: () => L }), be = c("<div role=\"separator\"></div>"), xe = c("<button type=\"button\" class=\"sv-grid-chart-btn\"> </button>"), Se = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg>"), Ce = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>"), we = c("<div class=\"sv-grid-chart-export-menu\" role=\"menu\"><button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button> <button type=\"button\" role=\"menuitem\"> </button></div>"), Te = c("<button type=\"button\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12 2l1.9 4.6L18.5 8.5 13.9 10.4 12 15l-1.9-4.6L5.5 8.5l4.6-1.9L12 2zm6 11l1 2.4 2.4 1-2.4 1L18 21l-1-2.6-2.4-1 2.4-1L18 13zM6 14l.8 2 2 .8-2 .8L6 20l-.8-2.4-2-.8 2-.8L6 14z\"></path></svg> </button>"), Ee = c("<li class=\"sv-grid-chart-saved-item\"><button type=\"button\" class=\"sv-grid-chart-saved-apply\"> </button> <button type=\"button\" class=\"sv-grid-chart-saved-x\">×</button></li>"), De = c("<ul class=\"sv-grid-chart-saved-list\"></ul>"), Oe = c("<p class=\"sv-grid-chart-saved-empty\"> </p>"), ke = c("<div class=\"sv-grid-chart-export-menu sv-grid-chart-saved-menu\" role=\"dialog\"><form class=\"sv-grid-chart-saved-row\"><input class=\"sv-grid-chart-saved-name\" type=\"text\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button></form> <!></div>"), Ae = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07l-1.72 1.71\"></path><path d=\"M5.17 11.75l-1.71 1.71a5 5 0 0 0 7.07 7.07l1.71-1.71\"></path><line x1=\"8\" y1=\"2\" x2=\"8\" y2=\"5\"></line><line x1=\"2\" y1=\"8\" x2=\"5\" y2=\"8\"></line><line x1=\"16\" y1=\"19\" x2=\"16\" y2=\"22\"></line><line x1=\"19\" y1=\"16\" x2=\"22\" y2=\"16\"></line></svg>"), je = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\"></path><path d=\"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\"></path></svg>"), Me = c("<button type=\"button\" class=\"sv-grid-chart-btn sv-grid-chart-build-btn\" aria-haspopup=\"dialog\"><svg width=\"13\" height=\"13\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"></rect><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"></rect></svg> </button> <div class=\"sv-grid-chart-export sv-grid-chart-saved\"><button type=\"button\" class=\"sv-grid-chart-icon-btn sv-grid-chart-saved-btn\" aria-haspopup=\"dialog\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"></path><polyline points=\"17 21 17 13 7 13 7 21\"></polyline><polyline points=\"7 3 7 8 15 8\"></polyline></svg></button> <!></div> <button type=\"button\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\"></line><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"></line></svg></button>", 1), Ne = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3v3a2 2 0 0 1-2 2H3\"></path><path d=\"M21 8h-3a2 2 0 0 1-2-2V3\"></path><path d=\"M3 16h3a2 2 0 0 1 2 2v3\"></path><path d=\"M16 21v-3a2 2 0 0 1 2-2h3\"></path></svg>"), Pe = u("<svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M8 3H5a2 2 0 0 0-2 2v3\"></path><path d=\"M21 8V5a2 2 0 0 0-2-2h-3\"></path><path d=\"M3 16v3a2 2 0 0 0 2 2h3\"></path><path d=\"M16 21h3a2 2 0 0 0 2-2v-3\"></path></svg>"), Fe = c("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"></rect><line x1=\"15\" y1=\"3\" x2=\"15\" y2=\"21\"></line></svg></button>", 1), Ie = c("<button type=\"button\" class=\"sv-grid-chart-icon-btn\"><svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><path d=\"M15 3h6v6\"></path><path d=\"M10 14 21 3\"></path><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"></path></svg></button>"), Le = c("<div><button type=\"button\" class=\"sv-grid-chart-tab-label\" role=\"tab\"> </button> <button type=\"button\" class=\"sv-grid-chart-tab-x\">×</button></div>"), Re = c("<div class=\"sv-grid-chart-tabs\" role=\"tablist\"></div>"), ze = c("<button type=\"button\" class=\"sv-grid-chart-btn sv-grid-chart-explain-btn\"> </button>"), Be = c("<p class=\"sv-grid-chart-ai-msg is-error\"> </p>"), Ve = c("<p class=\"sv-grid-chart-ai-msg\"> </p>"), He = c("<div class=\"sv-grid-chart-ai\"><form class=\"sv-grid-chart-ai-row\"><input class=\"sv-grid-chart-ai-input\" type=\"text\"/> <button type=\"submit\" class=\"sv-grid-chart-btn\"> </button> <!></form> <!></div>"), Ue = c("<div class=\"sv-grid-chart-panes-host\"><!></div>"), We = c("<p class=\"sv-grid-chart-empty\"><!></p>"), Ge = c("<div class=\"sv-grid-chart-float-resizer\" role=\"separator\"></div>"), Ke = c("<section><!> <header class=\"sv-grid-chart-panel-head\"><div><svg class=\"sv-grid-chart-title-icon\" width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\"><line x1=\"12\" y1=\"20\" x2=\"12\" y2=\"10\"></line><line x1=\"18\" y1=\"20\" x2=\"18\" y2=\"4\"></line><line x1=\"6\" y1=\"20\" x2=\"6\" y2=\"16\"></line></svg> <span class=\"sv-grid-chart-title\"> </span> <div class=\"sv-grid-chart-actions\"><!> <div class=\"sv-grid-chart-export\"><button type=\"button\" class=\"sv-grid-chart-icon-btn\"><!></button> <!></div> <!> <!> <!> <button type=\"button\" class=\"sv-grid-chart-close\">×</button></div></div> <!> <!> <!></header> <div class=\"sv-grid-chart-panel-body\"><!></div> <!> <!></section>");
|
|
154
|
+
function L(e, c) {
|
|
155
|
+
j(c, !0);
|
|
156
|
+
let u = _(null), f = _(!1);
|
|
157
|
+
function g() {
|
|
158
|
+
if (a(u)) {
|
|
159
|
+
x(f, !0);
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
import("./SvGridChartBuilder-BE2T1ykB.js").then((e) => {
|
|
163
|
+
x(u, e.default, !0), x(f, !0);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
let C = k(c, "ctrl", 7), D = O(() => de(C().localizationText)), N = O(() => C().chartingConfig), P = O(() => C().chartCfg), pe = O(() => C().chartFormat?.legend === void 0 || C().chartFormat.legend), me = O(() => C().chartFormat?.dataLabels === void 0 ? C().chartDataLabels : C().chartFormat.dataLabels !== null && { placement: C().chartFormat.dataLabels }), _e = O(() => C().chartFormat?.crosshairLabels !== !1), F = O(() => C().chartIsCustom), I = O(() => a(N)?.position ?? "bottom"), ye = O(() => a(N)?.crossFilter !== !1), L = O(() => C().chartSpec), qe = O(() => C().chartableColumns), R = O(() => C().chartSize ?? (a(I) === "right" ? a(N)?.width ?? 340 : a(N)?.height ?? 260)), z = O(() => C().chartFloating), B = O(() => C().chartMaximized), V = O(() => C().chartFloatRect), Je = _(null);
|
|
167
|
+
function Ye() {
|
|
168
|
+
let e = a(Je)?.offsetParent;
|
|
169
|
+
return {
|
|
170
|
+
w: e?.clientWidth ?? 800,
|
|
171
|
+
h: e?.clientHeight ?? 520
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function Xe() {
|
|
175
|
+
if (!C().chartFloatRect) {
|
|
176
|
+
let { w: e, h: t } = Ye(), n = Math.min(600, Math.max(360, e - 80)), r = Math.min(430, Math.max(260, t - 90));
|
|
177
|
+
C().chartFloatRect = {
|
|
178
|
+
x: Math.round((e - n) / 2),
|
|
179
|
+
y: Math.round((t - r) / 2),
|
|
180
|
+
w: n,
|
|
181
|
+
h: r
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
C().chartFloating = !0;
|
|
185
|
+
}
|
|
186
|
+
function Ze() {
|
|
187
|
+
C().chartFloating = !1, C().chartMaximized = !1;
|
|
188
|
+
}
|
|
189
|
+
let Qe = () => C().chartMaximized = !C().chartMaximized;
|
|
190
|
+
function $e(e) {
|
|
191
|
+
if (!a(z) || a(B) || e.target?.closest("button")) return;
|
|
192
|
+
let t = C().chartFloatRect;
|
|
193
|
+
if (!t) return;
|
|
194
|
+
e.preventDefault();
|
|
195
|
+
let n = e.clientX, r = e.clientY, { w: i, h: o } = Ye(), s = (e) => {
|
|
196
|
+
let a = Math.max(0, Math.min(i - t.w, t.x + e.clientX - n)), s = Math.max(0, Math.min(o - t.h, t.y + e.clientY - r));
|
|
197
|
+
C().chartFloatRect = {
|
|
198
|
+
x: a,
|
|
199
|
+
y: s,
|
|
200
|
+
w: t.w,
|
|
201
|
+
h: t.h
|
|
202
|
+
};
|
|
203
|
+
}, c = () => {
|
|
204
|
+
window.removeEventListener("pointermove", s), window.removeEventListener("pointerup", c);
|
|
205
|
+
};
|
|
206
|
+
window.addEventListener("pointermove", s), window.addEventListener("pointerup", c);
|
|
207
|
+
}
|
|
208
|
+
function et(e) {
|
|
209
|
+
let t = C().chartFloatRect;
|
|
210
|
+
if (!t) return;
|
|
211
|
+
e.preventDefault(), e.stopPropagation();
|
|
212
|
+
let n = e.clientX, r = e.clientY;
|
|
213
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
214
|
+
let i = (e) => {
|
|
215
|
+
C().chartFloatRect = {
|
|
216
|
+
x: t.x,
|
|
217
|
+
y: t.y,
|
|
218
|
+
w: Math.max(300, t.w + e.clientX - n),
|
|
219
|
+
h: Math.max(220, t.h + e.clientY - r)
|
|
220
|
+
};
|
|
221
|
+
}, a = () => {
|
|
222
|
+
window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a);
|
|
223
|
+
};
|
|
224
|
+
window.addEventListener("pointermove", i), window.addEventListener("pointerup", a);
|
|
225
|
+
}
|
|
226
|
+
let tt = O(() => a(z) ? a(B) ? "left:12px; top:12px; right:12px; bottom:12px; width:auto; height:auto;" : a(V) ? `left:${a(V).x}px; top:${a(V).y}px; width:${a(V).w}px; height:${a(V).h}px;` : "" : a(I) === "right" ? `width:${a(R)}px` : `height:${a(R)}px`), nt = O(() => le(a(qe), a(D)));
|
|
227
|
+
function rt(e) {
|
|
228
|
+
a(ye) && e.category != null && C().applyChartCrossFilter(String(e.category));
|
|
229
|
+
}
|
|
230
|
+
let it = _(null), H = _(!1), at = _(!1), U = () => a(it)?.querySelector("svg") ?? null, ot = O(() => !!a(L) && ce(a(L)));
|
|
231
|
+
function st() {
|
|
232
|
+
let e = U();
|
|
233
|
+
e && ae(e, "chart.png"), x(H, !1);
|
|
234
|
+
}
|
|
235
|
+
function ct() {
|
|
236
|
+
let e = U();
|
|
237
|
+
e && se(e, "chart.svg"), x(H, !1);
|
|
238
|
+
}
|
|
239
|
+
function lt() {
|
|
240
|
+
a(L) && ie(a(L), "chart.csv"), x(H, !1);
|
|
241
|
+
}
|
|
242
|
+
async function ut() {
|
|
243
|
+
let e = U();
|
|
244
|
+
x(H, !1), e && await (await import("./chart-export-pdf-DONFUnNY.js").then((e) => e.r)).downloadChartPdf(e, "chart.pdf", { title: a(L)?.title ?? C().charts[C().activeChartIndex]?.title });
|
|
245
|
+
}
|
|
246
|
+
async function dt() {
|
|
247
|
+
let e = U();
|
|
248
|
+
x(H, !1), e && (await import("./chart-export-pdf-DONFUnNY.js").then((e) => e.r)).printChart(e, { title: a(L)?.title ?? C().charts[C().activeChartIndex]?.title });
|
|
249
|
+
}
|
|
250
|
+
async function ft() {
|
|
251
|
+
let e = U();
|
|
252
|
+
if (x(H, !1), !(!e || typeof ClipboardItem > "u" || !navigator.clipboard?.write)) try {
|
|
253
|
+
let t = await oe(e);
|
|
254
|
+
await navigator.clipboard.write([new ClipboardItem({ "image/png": t })]), x(at, !0), setTimeout(() => x(at, !1), 1400);
|
|
255
|
+
} catch {}
|
|
256
|
+
}
|
|
257
|
+
let pt = _(null), mt = _(null);
|
|
258
|
+
function ht(e, t, n) {
|
|
259
|
+
let r = (n) => {
|
|
260
|
+
n.target?.closest(e) || t();
|
|
261
|
+
}, i = (e) => {
|
|
262
|
+
e.key === "Escape" && (e.stopPropagation(), t(), n()?.focus());
|
|
263
|
+
};
|
|
264
|
+
return window.addEventListener("pointerdown", r), window.addEventListener("keydown", i, !0), () => {
|
|
265
|
+
window.removeEventListener("pointerdown", r), window.removeEventListener("keydown", i, !0);
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
p(() => {
|
|
269
|
+
if (a(H)) return ht(".sv-grid-chart-export", () => x(H, !1), () => a(pt));
|
|
270
|
+
});
|
|
271
|
+
let W = _(!1), G = _("");
|
|
272
|
+
function gt() {
|
|
273
|
+
let e = a(G).trim();
|
|
274
|
+
e && (C().saveChart(e), x(G, ""));
|
|
275
|
+
}
|
|
276
|
+
p(() => {
|
|
277
|
+
if (a(W)) return ht(".sv-grid-chart-saved", () => x(W, !1), () => a(mt));
|
|
278
|
+
});
|
|
279
|
+
async function _t() {
|
|
280
|
+
if (x(H, !1), !a(L)) return;
|
|
281
|
+
let { chartSummary: e } = await import("./chart-summary-BJW_tg_X.js").then((e) => e.n), t = e(a(L));
|
|
282
|
+
try {
|
|
283
|
+
await navigator.clipboard?.writeText(t);
|
|
284
|
+
} catch {}
|
|
285
|
+
x(X, t, !0);
|
|
286
|
+
}
|
|
287
|
+
let vt = O(() => !!C().chartAiHandler), yt = O(() => !!C().chartExplainHandler);
|
|
288
|
+
async function bt() {
|
|
289
|
+
let e = C().chartExplainHandler;
|
|
290
|
+
if (!(!e || a(J))) {
|
|
291
|
+
x(J, !0), x(Y, ""), x(X, "");
|
|
292
|
+
try {
|
|
293
|
+
let t = await e();
|
|
294
|
+
x(X, t ? [t.summary, ...t.insights].filter(Boolean).join(" ") : "", !0), t || x(Y, a(D).chartAiNoExplanation, !0);
|
|
295
|
+
} catch (e) {
|
|
296
|
+
x(Y, e instanceof Error ? e.message : a(D).chartAiFailed, !0);
|
|
297
|
+
} finally {
|
|
298
|
+
x(J, !1);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
let K = _(!1), q = _(""), J = _(!1), Y = _(""), X = _("");
|
|
303
|
+
async function xt() {
|
|
304
|
+
let e = C().chartAiHandler, t = a(q).trim();
|
|
305
|
+
if (!(!e || !t || a(J))) {
|
|
306
|
+
x(J, !0), x(Y, ""), x(X, "");
|
|
307
|
+
try {
|
|
308
|
+
let n = await e(t);
|
|
309
|
+
n ? (C().applyChartConfig(n), x(X, typeof n.rationale == "string" ? n.rationale : "", !0)) : x(Y, a(D).chartAiNoChart, !0);
|
|
310
|
+
} catch (e) {
|
|
311
|
+
x(Y, e instanceof Error ? e.message : a(D).chartAiFailed, !0);
|
|
312
|
+
} finally {
|
|
313
|
+
x(J, !1);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
let St = _(!1);
|
|
318
|
+
function Ct(e) {
|
|
319
|
+
e.preventDefault(), x(St, !0);
|
|
320
|
+
let t = a(I) === "right" ? e.clientX : e.clientY, n = a(R);
|
|
321
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
322
|
+
let r = (e) => {
|
|
323
|
+
let r = a(I) === "right" ? t - e.clientX : t - e.clientY;
|
|
324
|
+
C().chartSize = Math.max(160, Math.min(720, n + r));
|
|
325
|
+
}, i = () => {
|
|
326
|
+
x(St, !1), window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i);
|
|
327
|
+
};
|
|
328
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i);
|
|
329
|
+
}
|
|
330
|
+
var Z = Ke();
|
|
331
|
+
let wt;
|
|
332
|
+
var Tt = y(Z), Et = (e) => {
|
|
333
|
+
var t = be();
|
|
334
|
+
let n;
|
|
335
|
+
m(() => {
|
|
336
|
+
n = M(t, 1, "sv-grid-chart-resizer", null, n, { "is-dragging": a(St) }), v(t, "aria-orientation", a(I) === "right" ? "vertical" : "horizontal"), v(t, "aria-label", a(D).chartResize);
|
|
337
|
+
}), o("pointerdown", t, Ct), i(e, t);
|
|
338
|
+
};
|
|
339
|
+
S(Tt, (e) => {
|
|
340
|
+
a(z) || e(Et);
|
|
341
|
+
});
|
|
342
|
+
var Dt = w(Tt, 2), Q = y(Dt);
|
|
343
|
+
let Ot;
|
|
344
|
+
var kt = w(y(Q), 2), At = y(kt, !0);
|
|
345
|
+
E(kt);
|
|
346
|
+
var jt = w(kt, 2), Mt = y(jt), Nt = (e) => {
|
|
347
|
+
var t = xe(), n = y(t, !0);
|
|
348
|
+
E(t), m(() => l(n, a(D).chartClearFilter)), o("click", t, () => C().clearChartCrossFilter()), i(e, t);
|
|
349
|
+
};
|
|
350
|
+
S(Mt, (e) => {
|
|
351
|
+
a(ye) && !a(F) && e(Nt);
|
|
352
|
+
});
|
|
353
|
+
var Pt = w(Mt, 2), $ = y(Pt), Ft = y($), It = (e) => {
|
|
354
|
+
var t = Se();
|
|
355
|
+
i(e, t);
|
|
356
|
+
}, Lt = (e) => {
|
|
357
|
+
var t = Ce();
|
|
358
|
+
i(e, t);
|
|
359
|
+
};
|
|
360
|
+
S(Ft, (e) => {
|
|
361
|
+
a(at) ? e(It) : e(Lt, -1);
|
|
362
|
+
}), E($), b($, (e) => x(pt, e), () => a(pt));
|
|
363
|
+
var Rt = w($, 2), zt = (e) => {
|
|
364
|
+
var t = we(), n = y(t), r = y(n, !0);
|
|
365
|
+
E(n);
|
|
366
|
+
var s = w(n, 2), c = y(s, !0);
|
|
367
|
+
E(s);
|
|
368
|
+
var u = w(s, 2), d = y(u, !0);
|
|
369
|
+
E(u);
|
|
370
|
+
var f = w(u, 2), p = y(f, !0);
|
|
371
|
+
E(f);
|
|
372
|
+
var h = w(f, 2), g = y(h, !0);
|
|
373
|
+
E(h);
|
|
374
|
+
var _ = w(h, 2), v = y(_, !0);
|
|
375
|
+
E(_);
|
|
376
|
+
var b = w(_, 2), x = y(b, !0);
|
|
377
|
+
E(b), E(t), m(() => {
|
|
378
|
+
l(r, a(D).chartExportPng), l(c, a(D).chartExportSvg), l(d, a(D).chartExportPdf), f.disabled = !a(ot), l(p, a(D).chartExportCsv), l(g, a(D).chartExportCopy), l(v, a(D).chartExportPrint), l(x, a(D).chartExportDescribe);
|
|
379
|
+
}), o("click", n, st), o("click", s, ct), o("click", u, ut), o("click", f, lt), o("click", h, ft), o("click", _, dt), o("click", b, _t), i(e, t);
|
|
380
|
+
};
|
|
381
|
+
S(Rt, (e) => {
|
|
382
|
+
a(H) && e(zt);
|
|
383
|
+
}), E(Pt);
|
|
384
|
+
var Bt = w(Pt, 2), Vt = (e) => {
|
|
385
|
+
var t = Te();
|
|
386
|
+
let n;
|
|
387
|
+
var r = w(y(t));
|
|
388
|
+
E(t), m(() => {
|
|
389
|
+
n = M(t, 1, "sv-grid-chart-btn sv-grid-chart-ai-btn", null, n, { "is-active": a(K) }), v(t, "aria-label", a(D).chartAiLabel), v(t, "title", a(D).chartAiLabel), v(t, "aria-expanded", a(K)), l(r, ` ${a(D).chartAi ?? ""}`);
|
|
390
|
+
}), o("click", t, () => x(K, !a(K))), i(e, t);
|
|
391
|
+
};
|
|
392
|
+
S(Bt, (e) => {
|
|
393
|
+
a(vt) && !a(F) && e(Vt);
|
|
394
|
+
});
|
|
395
|
+
var Ht = w(Bt, 2), Ut = (e) => {
|
|
396
|
+
var t = Me(), n = A(t), s = w(y(n));
|
|
397
|
+
E(n);
|
|
398
|
+
var c = w(n, 2), u = y(c);
|
|
399
|
+
b(u, (e) => x(mt, e), () => a(mt));
|
|
400
|
+
var f = w(u, 2), p = (e) => {
|
|
401
|
+
var t = ke(), n = y(t), s = y(n);
|
|
402
|
+
te(s);
|
|
403
|
+
var c = w(s, 2), u = y(c, !0);
|
|
404
|
+
E(c), E(n);
|
|
405
|
+
var f = w(n, 2), p = (e) => {
|
|
406
|
+
var t = De();
|
|
407
|
+
r(t, 21, () => C().savedCharts, (e) => e.name, (e, t) => {
|
|
408
|
+
var n = Ee(), r = y(n), s = y(r, !0);
|
|
409
|
+
E(r);
|
|
410
|
+
var c = w(r, 2);
|
|
411
|
+
E(n), m(() => {
|
|
412
|
+
v(r, "title", a(D).chartSaveApply), l(s, a(t).name), v(c, "aria-label", `${a(D).chartSaveRemove}: ${a(t).name}`), v(c, "title", a(D).chartSaveRemove);
|
|
413
|
+
}), o("click", r, () => {
|
|
414
|
+
C().applySavedChart(a(t).name), x(W, !1);
|
|
415
|
+
}), o("click", c, () => C().removeSavedChart(a(t).name)), i(e, n);
|
|
416
|
+
}), E(t), i(e, t);
|
|
417
|
+
}, h = (e) => {
|
|
418
|
+
var t = Oe(), n = y(t, !0);
|
|
419
|
+
E(t), m(() => l(n, a(D).chartSavedEmpty)), i(e, t);
|
|
420
|
+
};
|
|
421
|
+
S(f, (e) => {
|
|
422
|
+
C().savedCharts.length ? e(p) : e(h, -1);
|
|
423
|
+
}), E(t), m((e) => {
|
|
424
|
+
v(t, "aria-label", a(D).chartSavedTitle), v(s, "aria-label", a(D).chartSaveName), v(s, "placeholder", a(D).chartSaveNamePlaceholder), c.disabled = e, l(u, a(D).chartSave);
|
|
425
|
+
}, [() => !a(G).trim()]), d("submit", n, (e) => {
|
|
426
|
+
e.preventDefault(), gt();
|
|
427
|
+
}), T(s, () => a(G), (e) => x(G, e)), i(e, t);
|
|
428
|
+
};
|
|
429
|
+
S(f, (e) => {
|
|
430
|
+
a(W) && e(p);
|
|
431
|
+
}), E(c);
|
|
432
|
+
var h = w(c, 2);
|
|
433
|
+
let _;
|
|
434
|
+
var ee = y(h), O = (e) => {
|
|
435
|
+
var t = Ae();
|
|
436
|
+
i(e, t);
|
|
437
|
+
}, k = (e) => {
|
|
438
|
+
var t = je();
|
|
439
|
+
i(e, t);
|
|
440
|
+
};
|
|
441
|
+
S(ee, (e) => {
|
|
442
|
+
C().chartFrozen ? e(O) : e(k, -1);
|
|
443
|
+
}), E(h);
|
|
444
|
+
var j = w(h, 2);
|
|
445
|
+
m(() => {
|
|
446
|
+
v(n, "aria-label", a(D).chartBuildLabel), v(n, "title", a(D).chartBuildTitle), l(s, ` ${a(D).chartBuild ?? ""}`), v(u, "aria-label", a(D).chartSaveLabel), v(u, "title", a(D).chartSavedTitle), v(u, "aria-expanded", a(W)), _ = M(h, 1, "sv-grid-chart-icon-btn sv-grid-chart-link-btn", null, _, { "is-unlinked": !!C().chartFrozen }), v(h, "aria-label", C().chartFrozen ? a(D).chartLinkBack : a(D).chartUnlink), v(h, "aria-pressed", !!C().chartFrozen), v(h, "title", C().chartFrozen ? a(D).chartUnlinkedTitle : a(D).chartLinkedTitle), v(j, "aria-label", a(D).chartAdd), v(j, "title", a(D).chartAdd);
|
|
447
|
+
}), o("click", n, g), o("click", u, () => x(W, !a(W))), o("click", h, () => C().chartFrozen ? C().unfreezeChart() : C().freezeChart()), o("click", j, () => C().addChart()), i(e, t);
|
|
448
|
+
};
|
|
449
|
+
S(Ht, (e) => {
|
|
450
|
+
a(F) || e(Ut);
|
|
451
|
+
});
|
|
452
|
+
var Wt = w(Ht, 2), Gt = (e) => {
|
|
453
|
+
var t = Fe(), n = A(t), r = y(n), s = (e) => {
|
|
454
|
+
var t = Ne();
|
|
455
|
+
i(e, t);
|
|
456
|
+
}, c = (e) => {
|
|
457
|
+
var t = Pe();
|
|
458
|
+
i(e, t);
|
|
459
|
+
};
|
|
460
|
+
S(r, (e) => {
|
|
461
|
+
a(B) ? e(s) : e(c, -1);
|
|
462
|
+
}), E(n);
|
|
463
|
+
var l = w(n, 2);
|
|
464
|
+
m(() => {
|
|
465
|
+
v(n, "aria-label", a(B) ? a(D).chartRestore : a(D).chartMaximize), v(n, "title", a(B) ? a(D).chartRestore : a(D).chartMaximize), v(l, "aria-label", a(D).chartDockLabel), v(l, "title", a(D).chartDock);
|
|
466
|
+
}), o("click", n, Qe), o("click", l, Ze), i(e, t);
|
|
467
|
+
}, Kt = (e) => {
|
|
468
|
+
var t = Ie();
|
|
469
|
+
m(() => {
|
|
470
|
+
v(t, "aria-label", a(D).chartPopOutLabel), v(t, "title", a(D).chartPopOut);
|
|
471
|
+
}), o("click", t, Xe), i(e, t);
|
|
472
|
+
};
|
|
473
|
+
S(Wt, (e) => {
|
|
474
|
+
a(z) ? e(Gt) : e(Kt, -1);
|
|
475
|
+
});
|
|
476
|
+
var qt = w(Wt, 2);
|
|
477
|
+
E(jt), E(Q);
|
|
478
|
+
var Jt = w(Q, 2), Yt = (e) => {
|
|
479
|
+
var t = Re();
|
|
480
|
+
r(t, 23, () => C().charts, (e) => e.id, (e, t, n) => {
|
|
481
|
+
var r = Le();
|
|
482
|
+
let s;
|
|
483
|
+
var c = y(r), u = y(c, !0);
|
|
484
|
+
E(c);
|
|
485
|
+
var d = w(c, 2);
|
|
486
|
+
E(r), m((e) => {
|
|
487
|
+
s = M(r, 1, "sv-grid-chart-tab", null, s, { "is-active": a(n) === C().activeChartIndex }), v(c, "aria-selected", a(n) === C().activeChartIndex), l(u, a(t).title), v(d, "aria-label", e), v(d, "title", a(D).chartRemove);
|
|
488
|
+
}, [() => fe(a(D).chartRemoveTab, { title: a(t).title })]), o("click", c, () => C().activeChartIndex = a(n)), o("click", d, () => C().removeChart(a(n))), i(e, r);
|
|
489
|
+
}), E(t), m(() => v(t, "aria-label", a(D).chartTabs)), i(e, t);
|
|
490
|
+
};
|
|
491
|
+
S(Jt, (e) => {
|
|
492
|
+
!a(F) && C().charts.length > 1 && e(Yt);
|
|
493
|
+
});
|
|
494
|
+
var Xt = w(Jt, 2), Zt = (e) => {
|
|
495
|
+
var t = He(), n = y(t), r = y(n);
|
|
496
|
+
te(r);
|
|
497
|
+
var s = w(r, 2), c = y(s, !0);
|
|
498
|
+
E(s);
|
|
499
|
+
var u = w(s, 2), f = (e) => {
|
|
500
|
+
var t = ze(), n = y(t, !0);
|
|
501
|
+
E(t), m(() => {
|
|
502
|
+
t.disabled = a(J) || !a(L), v(t, "title", a(D).chartAiExplainTitle), l(n, a(D).chartAiExplain);
|
|
503
|
+
}), o("click", t, bt), i(e, t);
|
|
504
|
+
};
|
|
505
|
+
S(u, (e) => {
|
|
506
|
+
a(yt) && e(f);
|
|
507
|
+
}), E(n);
|
|
508
|
+
var p = w(n, 2), h = (e) => {
|
|
509
|
+
var t = Be(), n = y(t, !0);
|
|
510
|
+
E(t), m(() => l(n, a(Y))), i(e, t);
|
|
511
|
+
}, g = (e) => {
|
|
512
|
+
var t = Ve(), n = y(t, !0);
|
|
513
|
+
E(t), m(() => l(n, a(X))), i(e, t);
|
|
514
|
+
};
|
|
515
|
+
S(p, (e) => {
|
|
516
|
+
a(Y) ? e(h) : a(X) && e(g, 1);
|
|
517
|
+
}), E(t), m((e) => {
|
|
518
|
+
v(r, "placeholder", a(D).chartAiPlaceholder), r.disabled = a(J), s.disabled = e, l(c, a(J) ? a(D).chartAiThinking : a(D).chartAiRun);
|
|
519
|
+
}, [() => a(J) || !a(q).trim()]), d("submit", n, (e) => {
|
|
520
|
+
e.preventDefault(), xt();
|
|
521
|
+
}), T(r, () => a(q), (e) => x(q, e)), i(e, t);
|
|
522
|
+
};
|
|
523
|
+
S(Xt, (e) => {
|
|
524
|
+
a(vt) && a(K) && !a(F) && e(Zt);
|
|
525
|
+
});
|
|
526
|
+
var Qt = w(Xt, 2), $t = (e) => {
|
|
527
|
+
ue(e, {
|
|
528
|
+
get ctrl() {
|
|
529
|
+
return C();
|
|
530
|
+
},
|
|
531
|
+
get messages() {
|
|
532
|
+
return a(D);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
S(Qt, (e) => {
|
|
537
|
+
a(F) || e($t);
|
|
538
|
+
}), E(Dt);
|
|
539
|
+
var en = w(Dt, 2), tn = y(en), nn = (e) => {
|
|
540
|
+
var t = Ue(), n = y(t);
|
|
541
|
+
{
|
|
542
|
+
let e = O(() => a(P)?.zoom ?? !1), t = O(() => a(P)?.rangePresets), r = O(() => a(P)?.syncGroup), i = O(() => a(P)?.contextMenu), o = O(() => a(P)?.animate), s = O(() => a(P)?.localeText), c = O(() => a(P)?.export === !0 || void 0);
|
|
543
|
+
ve(n, {
|
|
544
|
+
get spec() {
|
|
545
|
+
return a(L);
|
|
546
|
+
},
|
|
547
|
+
get indicators() {
|
|
548
|
+
return C().chartIndicatorPanes;
|
|
549
|
+
},
|
|
550
|
+
onSelect: rt,
|
|
551
|
+
interactive: !0,
|
|
552
|
+
legend: !1,
|
|
553
|
+
get zoomable() {
|
|
554
|
+
return a(e);
|
|
555
|
+
},
|
|
556
|
+
get rangePresets() {
|
|
557
|
+
return a(t);
|
|
558
|
+
},
|
|
559
|
+
get syncGroup() {
|
|
560
|
+
return a(r);
|
|
561
|
+
},
|
|
562
|
+
get contextMenu() {
|
|
563
|
+
return a(i);
|
|
564
|
+
},
|
|
565
|
+
get animate() {
|
|
566
|
+
return a(o);
|
|
567
|
+
},
|
|
568
|
+
get localeText() {
|
|
569
|
+
return a(s);
|
|
570
|
+
},
|
|
571
|
+
get crosshairLabels() {
|
|
572
|
+
return a(_e);
|
|
573
|
+
},
|
|
574
|
+
get toolbar() {
|
|
575
|
+
return a(c);
|
|
576
|
+
},
|
|
577
|
+
get zoom() {
|
|
578
|
+
return C().chartZoom;
|
|
579
|
+
},
|
|
580
|
+
set zoom(e) {
|
|
581
|
+
C().chartZoom = e;
|
|
582
|
+
}
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
E(t), i(e, t);
|
|
586
|
+
}, rn = (e) => {
|
|
587
|
+
{
|
|
588
|
+
let t = O(() => a(P)?.zoom ?? !1), n = O(() => a(P)?.brush === !0), r = O(() => a(P)?.rangePresets), i = O(() => a(P)?.syncGroup), o = O(() => a(P)?.contextMenu), s = O(() => a(P)?.animate), c = O(() => a(P)?.localeText), l = O(() => a(P)?.export === !0 || void 0);
|
|
589
|
+
re(e, {
|
|
590
|
+
get spec() {
|
|
591
|
+
return a(L);
|
|
592
|
+
},
|
|
593
|
+
autosize: !0,
|
|
594
|
+
onSelect: rt,
|
|
595
|
+
interactive: !0,
|
|
596
|
+
get legend() {
|
|
597
|
+
return a(pe);
|
|
598
|
+
},
|
|
599
|
+
get dataLabels() {
|
|
600
|
+
return a(me);
|
|
601
|
+
},
|
|
602
|
+
get zoomable() {
|
|
603
|
+
return a(t);
|
|
604
|
+
},
|
|
605
|
+
get brush() {
|
|
606
|
+
return a(n);
|
|
607
|
+
},
|
|
608
|
+
get rangePresets() {
|
|
609
|
+
return a(r);
|
|
610
|
+
},
|
|
611
|
+
get syncGroup() {
|
|
612
|
+
return a(i);
|
|
613
|
+
},
|
|
614
|
+
get contextMenu() {
|
|
615
|
+
return a(o);
|
|
616
|
+
},
|
|
617
|
+
get animate() {
|
|
618
|
+
return a(s);
|
|
619
|
+
},
|
|
620
|
+
get localeText() {
|
|
621
|
+
return a(c);
|
|
622
|
+
},
|
|
623
|
+
get crosshairLabels() {
|
|
624
|
+
return a(_e);
|
|
625
|
+
},
|
|
626
|
+
get toolbar() {
|
|
627
|
+
return a(l);
|
|
628
|
+
},
|
|
629
|
+
get zoom() {
|
|
630
|
+
return C().chartZoom;
|
|
631
|
+
},
|
|
632
|
+
set zoom(e) {
|
|
633
|
+
C().chartZoom = e;
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
}
|
|
637
|
+
}, an = (e) => {
|
|
638
|
+
var n = We(), r = y(n), o = (e) => {
|
|
639
|
+
var n = t();
|
|
640
|
+
m(() => l(n, a(D).chartEmptyColumns)), i(e, n);
|
|
641
|
+
}, s = (e) => {
|
|
642
|
+
var n = t();
|
|
643
|
+
m(() => l(n, a(D).chartEmptyData)), i(e, n);
|
|
644
|
+
};
|
|
645
|
+
S(r, (e) => {
|
|
646
|
+
!a(qe).dims.length || !a(qe).measures.length ? e(o) : e(s, -1);
|
|
647
|
+
}), E(n), i(e, n);
|
|
648
|
+
};
|
|
649
|
+
S(tn, (e) => {
|
|
650
|
+
a(L) && C().chartIndicatorPanes.length && a(L).series[0]?.ohlc ? e(nn) : a(L) && (a(L).series.length || a(L).gaugeValue != null || a(F)) ? e(rn, 1) : e(an, -1);
|
|
651
|
+
}), E(en), b(en, (e) => x(it, e), () => a(it));
|
|
652
|
+
var on = w(en, 2), sn = (e) => {
|
|
653
|
+
var t = s(), n = A(t);
|
|
654
|
+
ne(n, () => a(u), (e, t) => {
|
|
655
|
+
t(e, {
|
|
656
|
+
get ctrl() {
|
|
657
|
+
return C();
|
|
658
|
+
},
|
|
659
|
+
get types() {
|
|
660
|
+
return a(nt);
|
|
661
|
+
},
|
|
662
|
+
get messages() {
|
|
663
|
+
return a(D);
|
|
664
|
+
},
|
|
665
|
+
get open() {
|
|
666
|
+
return a(f);
|
|
667
|
+
},
|
|
668
|
+
set open(e) {
|
|
669
|
+
x(f, e, !0);
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}), i(e, t);
|
|
673
|
+
};
|
|
674
|
+
S(on, (e) => {
|
|
675
|
+
a(u) && e(sn);
|
|
676
|
+
});
|
|
677
|
+
var cn = w(on, 2), ln = (e) => {
|
|
678
|
+
var t = Ge();
|
|
679
|
+
m(() => v(t, "aria-label", a(D).chartResizeWindow)), o("pointerdown", t, et), i(e, t);
|
|
680
|
+
};
|
|
681
|
+
S(cn, (e) => {
|
|
682
|
+
a(z) && !a(B) && e(ln);
|
|
683
|
+
}), E(Z), b(Z, (e) => x(Je, e), () => a(Je)), m(() => {
|
|
684
|
+
wt = M(Z, 1, "sv-grid-chart-panel", null, wt, {
|
|
685
|
+
"is-right": a(I) === "right" && !a(z),
|
|
686
|
+
"is-bottom": a(I) === "bottom" && !a(z),
|
|
687
|
+
"is-floating": a(z),
|
|
688
|
+
"is-maximized": a(z) && a(B)
|
|
689
|
+
}), h(Z, a(tt)), v(Z, "aria-label", a(D).chartPanelTitle), Ot = M(Q, 1, "sv-grid-chart-drawer-title", null, Ot, { "is-drag-handle": a(z) && !a(B) }), l(At, a(D).chartPanelTitle), v($, "aria-label", a(D).chartExportLabel), v($, "title", a(D).chartExport), v($, "aria-expanded", a(H)), v(qt, "aria-label", a(D).chartClose);
|
|
690
|
+
}), o("pointerdown", Q, $e), o("click", $, () => x(H, !a(H))), o("click", qt, () => C().chartPanelOpen = !1), n(3, Z, () => he, () => ({
|
|
691
|
+
x: !a(z) && a(I) === "right" ? a(R) : 0,
|
|
692
|
+
y: !a(z) && a(I) === "bottom" ? a(R) : 0,
|
|
693
|
+
duration: 180,
|
|
694
|
+
easing: ge
|
|
695
|
+
})), i(e, Z), ee();
|
|
696
|
+
}
|
|
697
|
+
f(["pointerdown", "click"]);
|
|
698
|
+
//#endregion
|
|
699
|
+
export { he as i, ye as n, ve as r, L as t };
|