@svgrid/grid-wc 3.0.0 → 3.0.2
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 +130 -110
- package/dist/GridMenus-B1mC1aPp.js +1077 -0
- package/dist/SvChartMenu-CBMKm7Xb.js +413 -0
- package/dist/SvDateRangeInput-BrYTQEMM.js +197 -0
- package/dist/SvDateTimePicker-CnLlqNDQ.js +766 -0
- package/dist/SvField-Bmzp3ObZ.js +147 -0
- package/dist/SvGridCellEditor-B005dmV1.js +560 -0
- package/dist/SvGridChart-4TcL9Rj2.js +3702 -0
- package/dist/SvGridChartBuilder-C4OL4XYx.js +1165 -0
- package/dist/SvGridChartPanel-CfHA8Ioq.js +1743 -0
- package/dist/SvGridChartView-Ci-9_EJ0.js +45 -0
- package/dist/SvGridDropdown-BlA6iw9m.js +257 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +178 -7
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +77 -2
- package/dist/{shadow/cell-formatting-C0OsDmi_.js → cell-formatting-Eypm-id0.js} +1 -1
- package/dist/chart/SvChartMenu-C-sbGNk8.js +586 -0
- package/dist/chart/chart-export-BHGuh_kZ.js +127 -0
- package/dist/chart/chart-export-pdf-BjkkIEkE.js +104 -0
- package/dist/chart/chart-summary-B86RFA3M.js +137 -0
- package/dist/chart/chart-trend-DP6DSsBa.js +56 -0
- package/dist/chart/chart-validate-CD6ptiwg.js +180 -0
- package/dist/chart/client-BuB0wIgc.js +2757 -0
- package/dist/chart/sv-chart-element.d.ts +98 -0
- package/dist/chart/sv-chart-element.js +7282 -0
- package/dist/chart-DoqdUoGg.js +4398 -0
- package/dist/chart-export-pdf-BirUdchl.js +104 -0
- package/dist/chart-summary-BP9i-v8M.js +137 -0
- package/dist/chart-validate-CD6ptiwg.js +180 -0
- package/dist/{shadow/client-DjwUji8D.js → client-DEF0GRjE.js} +1 -1
- package/dist/{shadow/column-resize-DvCRUrN3.js → column-resize-DUPgynvc.js} +3 -3
- package/dist/date-format-DMTwV8NC.js +1128 -0
- package/dist/{export-format-B6FUgOll.js → export-format-uGayRKWM.js} +3 -3
- package/dist/focus-trap-DvlOlOGM.js +65 -0
- package/dist/list-option-DrRyivWp.js +82 -0
- package/dist/react/chart.d.ts +99 -0
- package/dist/react/chart.js +49 -0
- package/dist/react/index.d.ts +28 -0
- package/dist/react/index.js +4 -1
- package/dist/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
- package/dist/shadow/GridMenus-B1mC1aPp.js +1077 -0
- package/dist/shadow/SvChartMenu-CBMKm7Xb.js +413 -0
- package/dist/shadow/SvDateRangeInput-BrYTQEMM.js +197 -0
- package/dist/shadow/SvDateTimePicker-CnLlqNDQ.js +766 -0
- package/dist/shadow/SvField-Bmzp3ObZ.js +147 -0
- package/dist/shadow/SvGridCellEditor-B005dmV1.js +560 -0
- package/dist/shadow/SvGridChart-4TcL9Rj2.js +3702 -0
- package/dist/shadow/SvGridChartBuilder-C4OL4XYx.js +1165 -0
- package/dist/shadow/SvGridChartPanel-CfHA8Ioq.js +1743 -0
- package/dist/shadow/SvGridChartView-Ci-9_EJ0.js +45 -0
- package/dist/shadow/SvGridDropdown-BlA6iw9m.js +257 -0
- package/dist/{cell-formatting-C0OsDmi_.js → shadow/cell-formatting-Eypm-id0.js} +1 -1
- package/dist/shadow/chart-DoqdUoGg.js +4398 -0
- package/dist/shadow/chart-export-pdf-BirUdchl.js +104 -0
- package/dist/shadow/chart-summary-BP9i-v8M.js +137 -0
- package/dist/shadow/chart-validate-CD6ptiwg.js +180 -0
- package/dist/{client-DjwUji8D.js → shadow/client-DEF0GRjE.js} +1 -1
- package/dist/{column-resize-DvCRUrN3.js → shadow/column-resize-DUPgynvc.js} +3 -3
- package/dist/shadow/date-format-DMTwV8NC.js +1128 -0
- package/dist/shadow/{export-format-C8kZGZfz.js → export-format-DhdZREP1.js} +3 -3
- package/dist/shadow/focus-trap-DvlOlOGM.js +65 -0
- package/dist/shadow/list-option-DrRyivWp.js +82 -0
- package/dist/shadow/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
- package/dist/shadow/sv-grid-shadow-element.d.ts +15 -0
- package/dist/shadow/sv-grid-shadow-element.js +4853 -3626
- package/dist/shadow/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
- package/dist/sv-grid-element.d.ts +15 -0
- package/dist/sv-grid-element.js +4809 -3612
- package/dist/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
- package/dist/vue/chart.d.ts +64 -0
- package/dist/vue/chart.js +41 -0
- package/dist/vue/index.d.ts +11 -2
- package/dist/vue/index.js +4 -1
- package/package.json +18 -5
- package/dist/GridMenus-DpmS1pzo.js +0 -1121
- package/dist/SvDateRangeInput-u4ibte8S.js +0 -196
- package/dist/SvDateTimePicker-DVFiDxUq.js +0 -765
- package/dist/SvField-ChCI-O2O.js +0 -146
- package/dist/SvGridCellEditor-DvsQyE9a.js +0 -550
- package/dist/SvGridChart-yK5Zv85y.js +0 -1199
- package/dist/SvGridChartPanel-B38_VjXM.js +0 -584
- package/dist/SvGridChartView-ScXTF6t-.js +0 -50
- package/dist/SvGridDropdown-DnAESFDu.js +0 -256
- package/dist/chart-uvs3sFJA.js +0 -1220
- package/dist/date-format-CPHqTHN6.js +0 -1127
- package/dist/shadow/GridMenus-DpmS1pzo.js +0 -1121
- package/dist/shadow/SvDateRangeInput-u4ibte8S.js +0 -196
- package/dist/shadow/SvDateTimePicker-DVFiDxUq.js +0 -765
- package/dist/shadow/SvField-ChCI-O2O.js +0 -146
- package/dist/shadow/SvGridCellEditor-DvsQyE9a.js +0 -550
- package/dist/shadow/SvGridChart-yK5Zv85y.js +0 -1199
- package/dist/shadow/SvGridChartPanel-B38_VjXM.js +0 -584
- package/dist/shadow/SvGridChartView-ScXTF6t-.js +0 -50
- package/dist/shadow/SvGridDropdown-DnAESFDu.js +0 -256
- package/dist/shadow/chart-uvs3sFJA.js +0 -1220
- package/dist/shadow/date-format-CPHqTHN6.js +0 -1127
|
@@ -0,0 +1,1743 @@
|
|
|
1
|
+
(function(){try{var c=".sv-chart-panes.svelte-14dx6di{flex-direction:column;gap:2px;min-width:0;display:flex}.sv-chart-pane.svelte-14dx6di{min-width:0;position:relative}.sv-chart-pane-title.svelte-14dx6di{z-index:1;color:var(--sg-muted,#64748b);pointer-events:none;font-size:10px;font-weight:600;position:absolute;top:2px}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChartPanel"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChartPanel");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
|
|
2
|
+
import { S as e, h as t } from "./chart-DoqdUoGg.js";
|
|
3
|
+
import { A as n, C as r, E as i, F as a, H as o, I as s, J as c, L as l, M as u, O as d, P as f, Q as p, R as m, S as h, U as g, Y as _, Z as v, _ as y, a as b, d as x, et as S, f as C, g as w, h as T, i as E, it as D, j as O, k, n as A, nt as ee, o as te, p as j, q as M, r as ne, s as re, tt as ie, v as ae, w as N, y as P } from "./client-DEF0GRjE.js";
|
|
4
|
+
import { a as F } from "./editor-contract-peBDxir_.js";
|
|
5
|
+
import { a as oe, n as se, o as ce, r as le, s as ue, t as de } from "./SvGridChart-4TcL9Rj2.js";
|
|
6
|
+
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/transition/index.js
|
|
7
|
+
function I(e) {
|
|
8
|
+
let t = e - 1;
|
|
9
|
+
return t * t * t + 1;
|
|
10
|
+
}
|
|
11
|
+
function L(e) {
|
|
12
|
+
let t = typeof e == "string" && e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);
|
|
13
|
+
return t ? [parseFloat(t[1]), t[2] || "px"] : [e, "px"];
|
|
14
|
+
}
|
|
15
|
+
function R(e, { delay: t = 0, duration: n = 400, easing: r = I, x: i = 0, y: a = 0, opacity: o = 0 } = {}) {
|
|
16
|
+
let s = getComputedStyle(e), c = +s.opacity, l = s.transform === "none" ? "" : s.transform, u = c * (1 - o), [d, f] = L(i), [p, m] = L(a);
|
|
17
|
+
return {
|
|
18
|
+
delay: t,
|
|
19
|
+
duration: n,
|
|
20
|
+
easing: r,
|
|
21
|
+
css: (e, t) => `
|
|
22
|
+
transform: ${l} translate(${(1 - e) * d}${f}, ${(1 - e) * p}${m});
|
|
23
|
+
opacity: ${c - u * t}`
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../node_modules/.pnpm/svelte@5.55.9_@typescript-eslint+types@8.67.0/node_modules/svelte/src/easing/index.js
|
|
28
|
+
function fe(e) {
|
|
29
|
+
let t = e - 1;
|
|
30
|
+
return t * t * t + 1;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region ../grid/dist/SvChartPanes.svelte
|
|
34
|
+
var z = O("<div class=\"sv-chart-pane is-indicator svelte-14dx6di\"><span class=\"sv-chart-pane-title svelte-14dx6di\"> </span> <!></div>"), pe = O("<div class=\"sv-chart-panes svelte-14dx6di\"><div class=\"sv-chart-pane is-main svelte-14dx6di\"><!></div> <!></div>");
|
|
35
|
+
function me(t, n) {
|
|
36
|
+
ee(n, !0);
|
|
37
|
+
let r = A(n, "indicators", 19, () => []), i = A(n, "axisWidth", 3, 56), a = A(n, "zoom", 15, null), s = ne(n, [
|
|
38
|
+
"$$slots",
|
|
39
|
+
"$$events",
|
|
40
|
+
"$$legacy",
|
|
41
|
+
"spec",
|
|
42
|
+
"indicators",
|
|
43
|
+
"syncGroup",
|
|
44
|
+
"axisWidth",
|
|
45
|
+
"zoom",
|
|
46
|
+
"onZoom",
|
|
47
|
+
"zoomable",
|
|
48
|
+
"legend",
|
|
49
|
+
"toolbar"
|
|
50
|
+
]), c = `svcp-${Math.random().toString(36).slice(2, 8)}`, l = S(() => n.syncGroup ?? c), u = p(0), f = (e) => m(u) > 0 && !e.width ? { width: Math.round(m(u)) } : {}, h = S(() => ({
|
|
51
|
+
...n.spec,
|
|
52
|
+
...f(n.spec),
|
|
53
|
+
xAxis: {
|
|
54
|
+
...n.spec.xAxis,
|
|
55
|
+
...r().length ? { labels: !1 } : {}
|
|
56
|
+
},
|
|
57
|
+
yAxis: {
|
|
58
|
+
...n.spec.yAxis,
|
|
59
|
+
width: i()
|
|
60
|
+
},
|
|
61
|
+
...n.spec.y2Axis || n.spec.series.some((e) => e.axis === "right") ? { y2Axis: {
|
|
62
|
+
...n.spec.y2Axis,
|
|
63
|
+
width: i()
|
|
64
|
+
} } : {}
|
|
65
|
+
})), g = S(() => r().map((t, a) => {
|
|
66
|
+
let { title: o, ...s } = e(n.spec, t);
|
|
67
|
+
return {
|
|
68
|
+
title: o ?? t.kind,
|
|
69
|
+
spec: {
|
|
70
|
+
...s,
|
|
71
|
+
...f(s),
|
|
72
|
+
xAxis: {
|
|
73
|
+
...s.xAxis,
|
|
74
|
+
labels: a === r().length - 1
|
|
75
|
+
},
|
|
76
|
+
yAxis: {
|
|
77
|
+
...s.yAxis,
|
|
78
|
+
width: i()
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}));
|
|
83
|
+
var y = pe(), b = M(y), x = M(b);
|
|
84
|
+
de(x, E({
|
|
85
|
+
get spec() {
|
|
86
|
+
return m(h);
|
|
87
|
+
},
|
|
88
|
+
get syncGroup() {
|
|
89
|
+
return m(l);
|
|
90
|
+
},
|
|
91
|
+
get onZoom() {
|
|
92
|
+
return n.onZoom;
|
|
93
|
+
},
|
|
94
|
+
get zoomable() {
|
|
95
|
+
return n.zoomable;
|
|
96
|
+
},
|
|
97
|
+
get legend() {
|
|
98
|
+
return n.legend;
|
|
99
|
+
},
|
|
100
|
+
get toolbar() {
|
|
101
|
+
return n.toolbar;
|
|
102
|
+
}
|
|
103
|
+
}, () => s, {
|
|
104
|
+
get zoom() {
|
|
105
|
+
return a();
|
|
106
|
+
},
|
|
107
|
+
set zoom(e) {
|
|
108
|
+
a(e);
|
|
109
|
+
}
|
|
110
|
+
})), D(b);
|
|
111
|
+
var w = _(b, 2);
|
|
112
|
+
N(w, 19, () => m(g), (e, t) => `${r()[t]?.kind}-${t}`, (e, t, a) => {
|
|
113
|
+
var s = z(), c = M(s);
|
|
114
|
+
let u;
|
|
115
|
+
var f = M(c, !0);
|
|
116
|
+
D(c);
|
|
117
|
+
var p = _(c, 2);
|
|
118
|
+
{
|
|
119
|
+
let e = S(() => n.zoomable ? {
|
|
120
|
+
drag: !1,
|
|
121
|
+
wheel: typeof n.zoomable == "object" && n.zoomable.wheel,
|
|
122
|
+
pan: typeof n.zoomable == "object" && n.zoomable.pan
|
|
123
|
+
} : !1);
|
|
124
|
+
de(p, {
|
|
125
|
+
get spec() {
|
|
126
|
+
return m(t).spec;
|
|
127
|
+
},
|
|
128
|
+
get syncGroup() {
|
|
129
|
+
return m(l);
|
|
130
|
+
},
|
|
131
|
+
get zoomable() {
|
|
132
|
+
return m(e);
|
|
133
|
+
},
|
|
134
|
+
legend: !1,
|
|
135
|
+
toolbar: !1,
|
|
136
|
+
interactive: !0,
|
|
137
|
+
get localeText() {
|
|
138
|
+
return n.localeText;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
D(s), o(() => {
|
|
143
|
+
C(s, "data-indicator", r()[m(a)]?.kind), u = ae(c, "", u, { left: `${i() + 6}px` }), d(f, m(t).title);
|
|
144
|
+
}), k(e, s);
|
|
145
|
+
}), D(y), te(y, "clientWidth", (e) => v(u, e)), k(t, y), ie();
|
|
146
|
+
}
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region ../grid/dist/SvGridChartPickers.svelte
|
|
149
|
+
var B = [
|
|
150
|
+
{
|
|
151
|
+
value: "bar",
|
|
152
|
+
label: "chartTypeBar",
|
|
153
|
+
group: "chartGroupCompare"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: "line",
|
|
157
|
+
label: "chartTypeLine",
|
|
158
|
+
group: "chartGroupCompare"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: "area",
|
|
162
|
+
label: "chartTypeArea",
|
|
163
|
+
group: "chartGroupCompare"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: "lollipop",
|
|
167
|
+
label: "chartTypeLollipop",
|
|
168
|
+
group: "chartGroupCompare"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
value: "pareto",
|
|
172
|
+
label: "chartTypePareto",
|
|
173
|
+
group: "chartGroupCompare"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
value: "range-bar",
|
|
177
|
+
label: "chartTypeRangeBar",
|
|
178
|
+
group: "chartGroupCompare",
|
|
179
|
+
needs: (e) => e.measures.length >= 2
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
value: "range-area",
|
|
183
|
+
label: "chartTypeRangeArea",
|
|
184
|
+
group: "chartGroupCompare",
|
|
185
|
+
needs: (e) => e.measures.length >= 2
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
value: "dumbbell",
|
|
189
|
+
label: "chartTypeDumbbell",
|
|
190
|
+
group: "chartGroupCompare",
|
|
191
|
+
needs: (e) => e.measures.length >= 2
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
value: "radial-column",
|
|
195
|
+
label: "chartTypeRadialColumn",
|
|
196
|
+
group: "chartGroupCompare"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
value: "radial-bar",
|
|
200
|
+
label: "chartTypeRadialBar",
|
|
201
|
+
group: "chartGroupCompare"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
value: "nightingale",
|
|
205
|
+
label: "chartTypeNightingale",
|
|
206
|
+
group: "chartGroupCompare"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
value: "pie",
|
|
210
|
+
label: "chartTypePie",
|
|
211
|
+
group: "chartGroupPartOfWhole"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
value: "treemap",
|
|
215
|
+
label: "chartTypeTreemap",
|
|
216
|
+
group: "chartGroupPartOfWhole"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
value: "sunburst",
|
|
220
|
+
label: "chartTypeSunburst",
|
|
221
|
+
group: "chartGroupPartOfWhole"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
value: "funnel",
|
|
225
|
+
label: "chartTypeFunnel",
|
|
226
|
+
group: "chartGroupFlow"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
value: "waterfall",
|
|
230
|
+
label: "chartTypeWaterfall",
|
|
231
|
+
group: "chartGroupFlow"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
value: "sankey",
|
|
235
|
+
label: "chartTypeSankey",
|
|
236
|
+
group: "chartGroupFlow",
|
|
237
|
+
needs: (e) => e.dims.length >= 2
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
value: "chord",
|
|
241
|
+
label: "chartTypeChord",
|
|
242
|
+
group: "chartGroupFlow",
|
|
243
|
+
needs: (e) => e.dims.length >= 2
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
value: "radar",
|
|
247
|
+
label: "chartTypeRadar",
|
|
248
|
+
group: "chartGroupDistribution"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
value: "heatmap",
|
|
252
|
+
label: "chartTypeHeatmap",
|
|
253
|
+
group: "chartGroupDistribution",
|
|
254
|
+
needs: (e) => e.dims.length >= 2
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
value: "scatter",
|
|
258
|
+
label: "chartTypeScatter",
|
|
259
|
+
group: "chartGroupDistribution",
|
|
260
|
+
needs: (e) => e.measures.length >= 2
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
value: "boxplot",
|
|
264
|
+
label: "chartTypeBoxplot",
|
|
265
|
+
group: "chartGroupDistribution"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
value: "histogram",
|
|
269
|
+
label: "chartTypeHistogram",
|
|
270
|
+
group: "chartGroupDistribution"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
value: "gauge",
|
|
274
|
+
label: "chartTypeGauge",
|
|
275
|
+
group: "chartGroupSingleValue"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
value: "bullet",
|
|
279
|
+
label: "chartTypeBullet",
|
|
280
|
+
group: "chartGroupSingleValue"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
value: "calendar",
|
|
284
|
+
label: "chartTypeCalendar",
|
|
285
|
+
group: "chartGroupOverTime",
|
|
286
|
+
needs: (e) => e.dates.length >= 1
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
value: "stream",
|
|
290
|
+
label: "chartTypeStream",
|
|
291
|
+
group: "chartGroupOverTime",
|
|
292
|
+
needs: (e) => e.dims.length >= 2
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
value: "candlestick",
|
|
296
|
+
label: "chartTypeCandlestick",
|
|
297
|
+
group: "chartGroupOverTime",
|
|
298
|
+
needs: (e) => e.dates.length >= 1 && e.measures.length >= 4
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
value: "ohlc",
|
|
302
|
+
label: "chartTypeOhlc",
|
|
303
|
+
group: "chartGroupOverTime",
|
|
304
|
+
needs: (e) => e.dates.length >= 1 && e.measures.length >= 4
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
function he(e, t) {
|
|
308
|
+
return B.filter((t) => !t.needs || t.needs(e)).map((e) => ({
|
|
309
|
+
value: e.value,
|
|
310
|
+
label: t[e.label],
|
|
311
|
+
group: t[e.group]
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
314
|
+
function V(e) {
|
|
315
|
+
return [
|
|
316
|
+
{
|
|
317
|
+
value: "sum",
|
|
318
|
+
label: e.chartReduceSum
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
value: "avg",
|
|
322
|
+
label: e.chartReduceAvg
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
value: "count",
|
|
326
|
+
label: e.chartReduceCount
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
value: "min",
|
|
330
|
+
label: e.chartReduceMin
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
value: "max",
|
|
334
|
+
label: e.chartReduceMax
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
value: "median",
|
|
338
|
+
label: e.chartReduceMedian
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
value: "p90",
|
|
342
|
+
label: e.chartReduceP90
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
value: "first",
|
|
346
|
+
label: e.chartReduceFirst
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
value: "last",
|
|
350
|
+
label: e.chartReduceLast
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
value: "countDistinct",
|
|
354
|
+
label: e.chartReduceCountDistinct
|
|
355
|
+
}
|
|
356
|
+
];
|
|
357
|
+
}
|
|
358
|
+
var H = [
|
|
359
|
+
{
|
|
360
|
+
key: "theme",
|
|
361
|
+
label: "chartPaletteTheme",
|
|
362
|
+
colors: null
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
key: "ocean",
|
|
366
|
+
label: "chartPaletteOcean",
|
|
367
|
+
colors: [
|
|
368
|
+
"#0ea5e9",
|
|
369
|
+
"#14b8a6",
|
|
370
|
+
"#6366f1",
|
|
371
|
+
"#8b5cf6",
|
|
372
|
+
"#06b6d4"
|
|
373
|
+
]
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
key: "sunset",
|
|
377
|
+
label: "chartPaletteSunset",
|
|
378
|
+
colors: [
|
|
379
|
+
"#f59e0b",
|
|
380
|
+
"#ef4444",
|
|
381
|
+
"#ec4899",
|
|
382
|
+
"#8b5cf6",
|
|
383
|
+
"#f97316"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
key: "forest",
|
|
388
|
+
label: "chartPaletteForest",
|
|
389
|
+
colors: [
|
|
390
|
+
"#16a34a",
|
|
391
|
+
"#65a30d",
|
|
392
|
+
"#0d9488",
|
|
393
|
+
"#4d7c0f",
|
|
394
|
+
"#0891b2"
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
key: "slate",
|
|
399
|
+
label: "chartPaletteSlate",
|
|
400
|
+
colors: [
|
|
401
|
+
"#475569",
|
|
402
|
+
"#0ea5e9",
|
|
403
|
+
"#64748b",
|
|
404
|
+
"#38bdf8",
|
|
405
|
+
"#94a3b8"
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
], U = [
|
|
409
|
+
{
|
|
410
|
+
value: "volume",
|
|
411
|
+
label: "chartIndVolume",
|
|
412
|
+
title: "chartIndVolumeTitle"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
value: "rsi",
|
|
416
|
+
label: "chartIndRsi",
|
|
417
|
+
title: "chartIndRsiTitle"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
value: "macd",
|
|
421
|
+
label: "chartIndMacd",
|
|
422
|
+
title: "chartIndMacdTitle"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
value: "stochastic",
|
|
426
|
+
label: "chartIndStochastic",
|
|
427
|
+
title: "chartIndStochasticTitle"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
value: "atr",
|
|
431
|
+
label: "chartIndAtr",
|
|
432
|
+
title: "chartIndAtrTitle"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
value: "obv",
|
|
436
|
+
label: "chartIndObv",
|
|
437
|
+
title: "chartIndObvTitle"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
value: "sma",
|
|
441
|
+
label: "chartIndSma",
|
|
442
|
+
title: "chartIndSmaTitle"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
value: "ema",
|
|
446
|
+
label: "chartIndEma",
|
|
447
|
+
title: "chartIndEmaTitle"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
value: "bb",
|
|
451
|
+
label: "chartIndBb",
|
|
452
|
+
title: "chartIndBbTitle"
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
value: "vwap",
|
|
456
|
+
label: "chartIndVwap",
|
|
457
|
+
title: "chartIndVwapTitle"
|
|
458
|
+
}
|
|
459
|
+
], ge = [
|
|
460
|
+
"sma",
|
|
461
|
+
"ema",
|
|
462
|
+
"bb",
|
|
463
|
+
"vwap"
|
|
464
|
+
], _e = [
|
|
465
|
+
{
|
|
466
|
+
key: "open",
|
|
467
|
+
label: "chartOpen"
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
key: "high",
|
|
471
|
+
label: "chartHigh"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
key: "low",
|
|
475
|
+
label: "chartLow"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
key: "close",
|
|
479
|
+
label: "chartClosePrice"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
key: "volume",
|
|
483
|
+
label: "chartVolume"
|
|
484
|
+
}
|
|
485
|
+
], ve = [
|
|
486
|
+
"bar",
|
|
487
|
+
"line",
|
|
488
|
+
"area",
|
|
489
|
+
"lollipop",
|
|
490
|
+
"pareto",
|
|
491
|
+
"range-bar",
|
|
492
|
+
"range-area",
|
|
493
|
+
"dumbbell",
|
|
494
|
+
"stream"
|
|
495
|
+
], ye = [
|
|
496
|
+
"range-bar",
|
|
497
|
+
"range-area",
|
|
498
|
+
"dumbbell"
|
|
499
|
+
], be = [
|
|
500
|
+
{
|
|
501
|
+
value: "",
|
|
502
|
+
label: "chartBucketExact"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
value: "day",
|
|
506
|
+
label: "chartBucketDay"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
value: "week",
|
|
510
|
+
label: "chartBucketWeek"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
value: "month",
|
|
514
|
+
label: "chartBucketMonth"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
value: "quarter",
|
|
518
|
+
label: "chartBucketQuarter"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
value: "year",
|
|
522
|
+
label: "chartBucketYear"
|
|
523
|
+
}
|
|
524
|
+
], xe = O("<option> </option>"), Se = O("<optgroup></optgroup>"), Ce = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), we = O("<option> </option>"), Te = O("<option> </option>"), Ee = O("<option> </option>"), W = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><!><!></select></label>"), De = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label> <!>", 1), Oe = O("<option> </option>"), ke = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), Ae = O("<option> </option>"), je = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><!></select></label>"), Me = O("<option> </option>"), Ne = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), Pe = O("<option> </option>"), Fe = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), Ie = O("<option> </option>"), Le = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), Re = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <input class=\"sv-grid-chart-num\" type=\"number\" min=\"1\" max=\"200\"/></label>"), G = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><option> </option><option> </option></select></label>"), ze = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><option> </option><option> </option></select></label>"), Be = O("<button type=\"button\"> </button>"), Ve = O("<span class=\"sv-grid-chart-ctl sv-grid-chart-indicators\" role=\"group\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <span class=\"sv-grid-chart-chips\"></span></span>"), He = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label> <label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>", 1), Ue = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), We = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), Ge = O("<option> </option>"), Ke = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), K = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), q = O("<option> </option>"), J = O("<label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label>"), qe = O("<label class=\"sv-grid-chart-toggle\"><input type=\"checkbox\"/> </label>"), Je = O("<p class=\"sv-grid-chart-hint sv-grid-chart-pivot-hint\" role=\"note\"> </p>"), Ye = O("<p class=\"sv-grid-chart-hint\" role=\"note\"> </p>"), Y = O("<div><!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select><option> </option><option> </option><option> </option></select></label> <!> <!> <!> <label class=\"sv-grid-chart-ctl\"><span class=\"sv-grid-chart-ctl-lbl\"> </span> <select></select></label> <!> <!> <!> <!> <!></div>");
|
|
525
|
+
function Xe(e, n) {
|
|
526
|
+
ee(n, !0);
|
|
527
|
+
let r = A(n, "ctrl", 7), a = A(n, "scope", 3, "panel"), l = S(() => r().chartableColumns), u = S(() => r().pivotResult != null), f = S(() => he(m(l), n.messages).filter((e) => !m(u) || t(e.value) === e.value)), p = S(() => [...new Set(m(f).map((e) => e.group))]), h = S(() => V(n.messages));
|
|
528
|
+
function g(e) {
|
|
529
|
+
let t = r().chartIndicators.includes(e), n = ge.includes(e) ? r().chartIndicators.filter((e) => !ge.includes(e)) : r().chartIndicators;
|
|
530
|
+
r().chartIndicators = t ? n.filter((t) => t !== e) : [...n, e];
|
|
531
|
+
}
|
|
532
|
+
let v = S(() => H.find((e) => e.colors && r().chartPalette && e.colors.join() === r().chartPalette.join())?.key ?? "theme"), b = S(() => r().chartType === "bar"), E = S(() => r().chartType === "pie" || r().chartType === "sunburst"), O = S(() => !m(u) && r().chartType !== "gauge" && r().chartType !== "histogram"), te = S(() => !m(u) && m(l).dims.length > 1 && ![
|
|
533
|
+
"pie",
|
|
534
|
+
"gauge",
|
|
535
|
+
"waterfall",
|
|
536
|
+
"funnel",
|
|
537
|
+
"calendar",
|
|
538
|
+
"bullet",
|
|
539
|
+
"pareto",
|
|
540
|
+
"radial-bar"
|
|
541
|
+
].includes(r().chartType)), ne = S(() => [
|
|
542
|
+
"bar",
|
|
543
|
+
"line",
|
|
544
|
+
"area",
|
|
545
|
+
"radial-column"
|
|
546
|
+
].includes(r().chartType)), re = S(() => ve.includes(r().chartType) || r().chartType === "scatter" || r().chartType === "boxplot" || r().chartType === "histogram"), ae = S(() => ![
|
|
547
|
+
"gauge",
|
|
548
|
+
"sankey",
|
|
549
|
+
"calendar",
|
|
550
|
+
"treemap",
|
|
551
|
+
"scatter",
|
|
552
|
+
"boxplot",
|
|
553
|
+
"chord",
|
|
554
|
+
"sunburst",
|
|
555
|
+
"stream"
|
|
556
|
+
].includes(r().chartType)), F = S(() => !m(u) && (r().chartType === "scatter" || ye.includes(r().chartType) || r().chartType === "bullet")), oe = S(() => r().chartType === "scatter" ? n.messages.chartY : r().chartType === "bullet" ? n.messages.chartTarget : n.messages.chartHigh), se = S(() => r().chartType === "funnel"), ce = S(() => r().chartType === "candlestick"), le = S(() => !m(u) && r().chartIsOhlc), ue = S(() => !m(u) && r().chartType === "histogram"), de = S(() => !m(u) && !r().chartIsOhlc), I = S(() => !m(u) && r().chartType !== "scatter" && r().chartType !== "boxplot" && r().chartType !== "histogram" && !r().chartIsOhlc), L = S(() => {
|
|
557
|
+
let e = r().chartType, t = r().chartSpec?.categories.length ?? 0;
|
|
558
|
+
if (e === "heatmap" && !r().chartSeriesId && m(l).dims.length > 1) return n.messages.chartIssueHeatmap;
|
|
559
|
+
if (e === "sankey" && !r().chartSeriesId) return n.messages.chartIssueSankey;
|
|
560
|
+
if (e === "radar" && t > 0 && t < 3) return n.messages.chartIssueRadar;
|
|
561
|
+
if (e === "funnel" && t === 1) return n.messages.chartIssueFunnel;
|
|
562
|
+
if (e === "chord" && !r().chartSeriesId) return n.messages.chartIssueChord;
|
|
563
|
+
if (e === "stream" && !r().chartSeriesId) return n.messages.chartIssueStream;
|
|
564
|
+
if (ye.includes(e) && !r().effectiveChartMeasure2Id) return n.messages.chartIssueSecondMeasure;
|
|
565
|
+
if (r().chartIsOhlc) {
|
|
566
|
+
let e = r().chartOhlc;
|
|
567
|
+
if (!r().chartOhlcDateId) return n.messages.chartIssueOhlcDate;
|
|
568
|
+
if (!e.open || !e.high || !e.low || !e.close) return n.messages.chartIssueOhlcColumns;
|
|
569
|
+
}
|
|
570
|
+
return null;
|
|
571
|
+
});
|
|
572
|
+
var R = Y();
|
|
573
|
+
let fe;
|
|
574
|
+
var z = M(R), pe = (e) => {
|
|
575
|
+
var t = Ce(), i = M(t), a = M(i, !0);
|
|
576
|
+
D(i);
|
|
577
|
+
var c = _(i, 2);
|
|
578
|
+
N(c, 20, () => m(p), (e) => e, (e, t) => {
|
|
579
|
+
var n = Se();
|
|
580
|
+
N(n, 21, () => m(f).filter((e) => e.group === t), (e) => e.value, (e, t) => {
|
|
581
|
+
var n = xe(), r = M(n, !0);
|
|
582
|
+
D(n);
|
|
583
|
+
var i = {};
|
|
584
|
+
o(() => {
|
|
585
|
+
d(r, m(t).label), i !== (i = m(t).value) && (n.value = (n.__value = m(t).value) ?? "");
|
|
586
|
+
}), k(e, n);
|
|
587
|
+
}), D(n), o(() => C(n, "label", t)), k(e, n);
|
|
588
|
+
}), D(c);
|
|
589
|
+
var l;
|
|
590
|
+
w(c), D(t), o(() => {
|
|
591
|
+
d(a, n.messages.chartType), l !== (l = r().chartType) && (c.value = (c.__value = r().chartType) ?? "", y(c, r().chartType));
|
|
592
|
+
}), s("change", c, (e) => r().chartType = e.currentTarget.value), k(e, t);
|
|
593
|
+
};
|
|
594
|
+
i(z, (e) => {
|
|
595
|
+
a() === "panel" && e(pe);
|
|
596
|
+
});
|
|
597
|
+
var me = _(z, 2), B = (e) => {
|
|
598
|
+
var t = De(), a = c(t), u = M(a), f = M(u, !0);
|
|
599
|
+
D(u);
|
|
600
|
+
var p = _(u, 2);
|
|
601
|
+
N(p, 21, () => m(l).dates, (e) => e.id, (e, t) => {
|
|
602
|
+
var n = we(), r = M(n, !0);
|
|
603
|
+
D(n);
|
|
604
|
+
var i = {};
|
|
605
|
+
o(() => {
|
|
606
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
607
|
+
}), k(e, n);
|
|
608
|
+
}), D(p);
|
|
609
|
+
var h;
|
|
610
|
+
w(p), D(a);
|
|
611
|
+
var g = _(a, 2);
|
|
612
|
+
N(g, 17, () => _e, (e) => e.key, (e, t) => {
|
|
613
|
+
var a = W(), c = M(a), u = M(c, !0);
|
|
614
|
+
D(c);
|
|
615
|
+
var f = _(c, 2), p = M(f), h = (e) => {
|
|
616
|
+
var t = Te(), r = M(t, !0);
|
|
617
|
+
D(t), t.value = t.__value = "", o(() => d(r, n.messages.chartNone)), k(e, t);
|
|
618
|
+
};
|
|
619
|
+
i(p, (e) => {
|
|
620
|
+
m(t).key === "volume" && e(h);
|
|
621
|
+
});
|
|
622
|
+
var g = _(p);
|
|
623
|
+
N(g, 17, () => m(l).measures, (e) => e.id, (e, t) => {
|
|
624
|
+
var n = Ee(), r = M(n, !0);
|
|
625
|
+
D(n);
|
|
626
|
+
var i = {};
|
|
627
|
+
o(() => {
|
|
628
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
629
|
+
}), k(e, n);
|
|
630
|
+
}), D(f);
|
|
631
|
+
var v;
|
|
632
|
+
w(f), D(a), o(() => {
|
|
633
|
+
d(u, n.messages[m(t).label]), v !== (v = r().chartOhlc[m(t).key] ?? "") && (f.value = (f.__value = r().chartOhlc[m(t).key] ?? "") ?? "", y(f, r().chartOhlc[m(t).key] ?? ""));
|
|
634
|
+
}), s("change", f, (e) => r().chartOhlc = {
|
|
635
|
+
...r().chartOhlc,
|
|
636
|
+
[m(t).key]: e.currentTarget.value || null
|
|
637
|
+
}), k(e, a);
|
|
638
|
+
}), o(() => {
|
|
639
|
+
d(f, n.messages.chartDate), h !== (h = r().chartOhlcDateId ?? "") && (p.value = (p.__value = r().chartOhlcDateId ?? "") ?? "", y(p, r().chartOhlcDateId ?? ""));
|
|
640
|
+
}), s("change", p, (e) => r().chartDimensionId = e.currentTarget.value || null), k(e, t);
|
|
641
|
+
}, Xe = (e) => {
|
|
642
|
+
var t = ke(), i = M(t), a = M(i, !0);
|
|
643
|
+
D(i);
|
|
644
|
+
var c = _(i, 2);
|
|
645
|
+
N(c, 21, () => m(l).dims, (e) => e.id, (e, t) => {
|
|
646
|
+
var n = Oe(), r = M(n, !0);
|
|
647
|
+
D(n);
|
|
648
|
+
var i = {};
|
|
649
|
+
o(() => {
|
|
650
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
651
|
+
}), k(e, n);
|
|
652
|
+
}), D(c);
|
|
653
|
+
var u;
|
|
654
|
+
w(c), D(t), o(() => {
|
|
655
|
+
d(a, r().chartType === "sankey" ? n.messages.chartFrom : r().chartType === "heatmap" ? n.messages.chartColumns : n.messages.chartGroupBy), u !== (u = r().chartDimensionId ?? "") && (c.value = (c.__value = r().chartDimensionId ?? "") ?? "", y(c, r().chartDimensionId ?? ""));
|
|
656
|
+
}), s("change", c, (e) => r().chartDimensionId = e.currentTarget.value || null), k(e, t);
|
|
657
|
+
};
|
|
658
|
+
i(me, (e) => {
|
|
659
|
+
m(le) ? e(B) : m(O) && e(Xe, 1);
|
|
660
|
+
});
|
|
661
|
+
var Ze = _(me, 2), Qe = (e) => {
|
|
662
|
+
var t = je(), i = M(t), a = M(i, !0);
|
|
663
|
+
D(i);
|
|
664
|
+
var c = _(i, 2), u = M(c), f = M(u, !0);
|
|
665
|
+
D(u), u.value = u.__value = "";
|
|
666
|
+
var p = _(u);
|
|
667
|
+
N(p, 17, () => m(l).dims, (e) => e.id, (e, t) => {
|
|
668
|
+
var n = Ae(), r = M(n, !0);
|
|
669
|
+
D(n);
|
|
670
|
+
var i = {};
|
|
671
|
+
o(() => {
|
|
672
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
673
|
+
}), k(e, n);
|
|
674
|
+
}), D(c);
|
|
675
|
+
var h;
|
|
676
|
+
w(c), D(t), o(() => {
|
|
677
|
+
d(a, r().chartType === "sankey" ? n.messages.chartTo : r().chartType === "heatmap" ? n.messages.chartRows : n.messages.chartSplitBy), d(f, n.messages.chartNone), h !== (h = r().chartSeriesId ?? "") && (c.value = (c.__value = r().chartSeriesId ?? "") ?? "", y(c, r().chartSeriesId ?? ""));
|
|
678
|
+
}), s("change", c, (e) => r().chartSeriesId = e.currentTarget.value || null), k(e, t);
|
|
679
|
+
};
|
|
680
|
+
i(Ze, (e) => {
|
|
681
|
+
m(te) && e(Qe);
|
|
682
|
+
});
|
|
683
|
+
var $e = _(Ze, 2), et = (e) => {
|
|
684
|
+
var t = Ne(), i = M(t), a = M(i, !0);
|
|
685
|
+
D(i);
|
|
686
|
+
var c = _(i, 2);
|
|
687
|
+
N(c, 21, () => m(l).measures, (e) => e.id, (e, t) => {
|
|
688
|
+
var n = Me(), r = M(n, !0);
|
|
689
|
+
D(n);
|
|
690
|
+
var i = {};
|
|
691
|
+
o(() => {
|
|
692
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
693
|
+
}), k(e, n);
|
|
694
|
+
}), D(c);
|
|
695
|
+
var u;
|
|
696
|
+
w(c), D(t), o((e) => {
|
|
697
|
+
d(a, e), u !== (u = r().chartMeasureId ?? "") && (c.value = (c.__value = r().chartMeasureId ?? "") ?? "", y(c, r().chartMeasureId ?? ""));
|
|
698
|
+
}, [() => r().chartType === "scatter" ? n.messages.chartX : ye.includes(r().chartType) ? n.messages.chartLow : r().chartType === "gauge" ? n.messages.chartMetric : n.messages.chartValue]), s("change", c, (e) => r().chartMeasureId = e.currentTarget.value || null), k(e, t);
|
|
699
|
+
};
|
|
700
|
+
i($e, (e) => {
|
|
701
|
+
m(de) && e(et);
|
|
702
|
+
});
|
|
703
|
+
var tt = _($e, 2), nt = (e) => {
|
|
704
|
+
var t = Fe(), n = M(t), i = M(n, !0);
|
|
705
|
+
D(n);
|
|
706
|
+
var a = _(n, 2);
|
|
707
|
+
N(a, 21, () => m(l).measures, (e) => e.id, (e, t) => {
|
|
708
|
+
var n = Pe(), r = M(n, !0);
|
|
709
|
+
D(n);
|
|
710
|
+
var i = {};
|
|
711
|
+
o(() => {
|
|
712
|
+
d(r, m(t).label), i !== (i = m(t).id) && (n.value = (n.__value = m(t).id) ?? "");
|
|
713
|
+
}), k(e, n);
|
|
714
|
+
}), D(a);
|
|
715
|
+
var c;
|
|
716
|
+
w(a), D(t), o(() => {
|
|
717
|
+
d(i, m(oe)), c !== (c = r().effectiveChartMeasure2Id ?? "") && (a.value = (a.__value = r().effectiveChartMeasure2Id ?? "") ?? "", y(a, r().effectiveChartMeasure2Id ?? ""));
|
|
718
|
+
}), s("change", a, (e) => r().chartMeasure2Id = e.currentTarget.value || null), k(e, t);
|
|
719
|
+
};
|
|
720
|
+
i(tt, (e) => {
|
|
721
|
+
m(F) && e(nt);
|
|
722
|
+
});
|
|
723
|
+
var rt = _(tt, 2), it = (e) => {
|
|
724
|
+
var t = Le(), i = M(t), a = M(i, !0);
|
|
725
|
+
D(i);
|
|
726
|
+
var c = _(i, 2);
|
|
727
|
+
N(c, 21, () => m(h), (e) => e.value, (e, t) => {
|
|
728
|
+
var n = Ie(), r = M(n, !0);
|
|
729
|
+
D(n);
|
|
730
|
+
var i = {};
|
|
731
|
+
o(() => {
|
|
732
|
+
d(r, m(t).label), i !== (i = m(t).value) && (n.value = (n.__value = m(t).value) ?? "");
|
|
733
|
+
}), k(e, n);
|
|
734
|
+
}), D(c);
|
|
735
|
+
var l;
|
|
736
|
+
w(c), D(t), o(() => {
|
|
737
|
+
d(a, n.messages.chartAggregate), l !== (l = r().chartReduce) && (c.value = (c.__value = r().chartReduce) ?? "", y(c, r().chartReduce));
|
|
738
|
+
}), s("change", c, (e) => r().chartReduce = e.currentTarget.value), k(e, t);
|
|
739
|
+
};
|
|
740
|
+
i(rt, (e) => {
|
|
741
|
+
m(I) && e(it);
|
|
742
|
+
});
|
|
743
|
+
var at = _(rt, 2), ot = (e) => {
|
|
744
|
+
var t = Re(), i = M(t), a = M(i, !0);
|
|
745
|
+
D(i);
|
|
746
|
+
var c = _(i, 2);
|
|
747
|
+
x(c), D(t), o(() => {
|
|
748
|
+
C(t, "title", n.messages.chartBinsTitle), d(a, n.messages.chartBins), T(c, r().chartBins ?? ""), C(c, "placeholder", n.messages.chartBuilderAuto);
|
|
749
|
+
}), s("change", c, (e) => r().chartBins = e.currentTarget.value ? Number(e.currentTarget.value) : null), k(e, t);
|
|
750
|
+
};
|
|
751
|
+
i(at, (e) => {
|
|
752
|
+
m(ue) && e(ot);
|
|
753
|
+
});
|
|
754
|
+
var st = _(at, 2), ct = (e) => {
|
|
755
|
+
var t = G(), i = M(t), a = M(i, !0);
|
|
756
|
+
D(i);
|
|
757
|
+
var c = _(i, 2), l = M(c), u = M(l, !0);
|
|
758
|
+
D(l), l.value = l.__value = "trapezoid";
|
|
759
|
+
var f = _(l), p = M(f, !0);
|
|
760
|
+
D(f), f.value = f.__value = "pyramid";
|
|
761
|
+
var m = _(f), h = M(m, !0);
|
|
762
|
+
D(m), m.value = m.__value = "cone", D(c);
|
|
763
|
+
var g;
|
|
764
|
+
w(c), D(t), o(() => {
|
|
765
|
+
d(a, n.messages.chartShape), d(u, n.messages.chartShapeFunnel), d(p, n.messages.chartShapePyramid), d(h, n.messages.chartShapeCone), g !== (g = r().chartFunnelShape ?? "trapezoid") && (c.value = (c.__value = r().chartFunnelShape ?? "trapezoid") ?? "", y(c, r().chartFunnelShape ?? "trapezoid"));
|
|
766
|
+
}), s("change", c, (e) => r().chartFunnelShape = e.currentTarget.value), k(e, t);
|
|
767
|
+
};
|
|
768
|
+
i(st, (e) => {
|
|
769
|
+
m(se) && e(ct);
|
|
770
|
+
});
|
|
771
|
+
var lt = _(st, 2), ut = (e) => {
|
|
772
|
+
var t = ze(), i = M(t), a = M(i, !0);
|
|
773
|
+
D(i);
|
|
774
|
+
var c = _(i, 2), l = M(c), u = M(l, !0);
|
|
775
|
+
D(l), l.value = l.__value = "classic";
|
|
776
|
+
var f = _(l), p = M(f, !0);
|
|
777
|
+
D(f), f.value = f.__value = "hollow";
|
|
778
|
+
var m = _(f), h = M(m, !0);
|
|
779
|
+
D(m), m.value = m.__value = "heikin-ashi", D(c);
|
|
780
|
+
var g;
|
|
781
|
+
w(c), D(t), o(() => {
|
|
782
|
+
d(a, n.messages.chartCandles), d(u, n.messages.chartCandlesClassic), d(p, n.messages.chartCandlesHollow), d(h, n.messages.chartCandlesHeikinAshi), g !== (g = r().chartCandleStyle ?? "classic") && (c.value = (c.__value = r().chartCandleStyle ?? "classic") ?? "", y(c, r().chartCandleStyle ?? "classic"));
|
|
783
|
+
}), s("change", c, (e) => r().chartCandleStyle = e.currentTarget.value), k(e, t);
|
|
784
|
+
};
|
|
785
|
+
i(lt, (e) => {
|
|
786
|
+
m(ce) && e(ut);
|
|
787
|
+
});
|
|
788
|
+
var dt = _(lt, 2), ft = (e) => {
|
|
789
|
+
var t = Ve(), i = M(t), a = M(i, !0);
|
|
790
|
+
D(i);
|
|
791
|
+
var c = _(i, 2);
|
|
792
|
+
N(c, 21, () => U, (e) => e.value, (e, t) => {
|
|
793
|
+
var i = Be();
|
|
794
|
+
let a;
|
|
795
|
+
var c = M(i, !0);
|
|
796
|
+
D(i), o((e, r) => {
|
|
797
|
+
a = P(i, 1, "sv-grid-chart-chip", null, a, e), C(i, "aria-pressed", r), C(i, "title", n.messages[m(t).title]), d(c, n.messages[m(t).label]);
|
|
798
|
+
}, [() => ({ "is-on": r().chartIndicators.includes(m(t).value) }), () => r().chartIndicators.includes(m(t).value)]), s("click", i, () => g(m(t).value)), k(e, i);
|
|
799
|
+
}), D(c), D(t), o(() => {
|
|
800
|
+
C(t, "aria-label", n.messages.chartIndicators), d(a, n.messages.chartIndicators);
|
|
801
|
+
}), k(e, t);
|
|
802
|
+
};
|
|
803
|
+
i(dt, (e) => {
|
|
804
|
+
m(le) && e(ft);
|
|
805
|
+
});
|
|
806
|
+
var pt = _(dt, 2), mt = M(pt), ht = M(mt, !0);
|
|
807
|
+
D(mt);
|
|
808
|
+
var X = _(mt, 2), gt = M(X), _t = M(gt, !0);
|
|
809
|
+
D(gt), gt.value = gt.__value = "number";
|
|
810
|
+
var vt = _(gt), yt = M(vt, !0);
|
|
811
|
+
D(vt), vt.value = vt.__value = "currency";
|
|
812
|
+
var bt = _(vt), xt = M(bt, !0);
|
|
813
|
+
D(bt), bt.value = bt.__value = "percent", D(X);
|
|
814
|
+
var St;
|
|
815
|
+
w(X), D(pt);
|
|
816
|
+
var Ct = _(pt, 2), wt = (e) => {
|
|
817
|
+
var t = He(), i = c(t), a = M(i);
|
|
818
|
+
x(a);
|
|
819
|
+
var l = _(a);
|
|
820
|
+
D(i);
|
|
821
|
+
var u = _(i, 2), f = M(u);
|
|
822
|
+
x(f);
|
|
823
|
+
var p = _(f);
|
|
824
|
+
D(u), o(() => {
|
|
825
|
+
j(a, r().chartStacked), d(l, ` ${n.messages.chartStacked ?? ""}`), C(u, "title", n.messages.chartStacked100Title), j(f, r().chartStacked100), d(p, ` ${n.messages.chartStacked100 ?? ""}`);
|
|
826
|
+
}), s("change", a, (e) => r().chartStacked = e.currentTarget.checked), s("change", f, (e) => r().chartStacked100 = e.currentTarget.checked), k(e, t);
|
|
827
|
+
};
|
|
828
|
+
i(Ct, (e) => {
|
|
829
|
+
m(ne) && e(wt);
|
|
830
|
+
});
|
|
831
|
+
var Tt = _(Ct, 2), Et = (e) => {
|
|
832
|
+
var t = Ue(), i = M(t);
|
|
833
|
+
x(i);
|
|
834
|
+
var a = _(i);
|
|
835
|
+
D(t), o(() => {
|
|
836
|
+
C(t, "title", n.messages.chartHorizontalTitle), j(i, r().chartOrientation === "horizontal"), d(a, ` ${n.messages.chartHorizontal ?? ""}`);
|
|
837
|
+
}), s("change", i, (e) => r().chartOrientation = e.currentTarget.checked ? "horizontal" : "vertical"), k(e, t);
|
|
838
|
+
};
|
|
839
|
+
i(Tt, (e) => {
|
|
840
|
+
m(b) && e(Et);
|
|
841
|
+
});
|
|
842
|
+
var Dt = _(Tt, 2), Ot = (e) => {
|
|
843
|
+
var t = We(), i = M(t);
|
|
844
|
+
x(i);
|
|
845
|
+
var a = _(i);
|
|
846
|
+
D(t), o(() => {
|
|
847
|
+
j(i, r().chartDonut), d(a, ` ${n.messages.chartDonut ?? ""}`);
|
|
848
|
+
}), s("change", i, (e) => r().chartDonut = e.currentTarget.checked), k(e, t);
|
|
849
|
+
};
|
|
850
|
+
i(Dt, (e) => {
|
|
851
|
+
m(E) && e(Ot);
|
|
852
|
+
});
|
|
853
|
+
var Z = _(Dt, 2), kt = M(Z), At = M(kt, !0);
|
|
854
|
+
D(kt);
|
|
855
|
+
var Q = _(kt, 2);
|
|
856
|
+
N(Q, 21, () => H, (e) => e.key, (e, t) => {
|
|
857
|
+
var r = Ge(), i = M(r, !0);
|
|
858
|
+
D(r);
|
|
859
|
+
var a = {};
|
|
860
|
+
o(() => {
|
|
861
|
+
d(i, n.messages[m(t).label]), a !== (a = m(t).key) && (r.value = (r.__value = m(t).key) ?? "");
|
|
862
|
+
}), k(e, r);
|
|
863
|
+
}), D(Q);
|
|
864
|
+
var jt;
|
|
865
|
+
w(Q), D(Z);
|
|
866
|
+
var Mt = _(Z, 2), Nt = (e) => {
|
|
867
|
+
var t = Ke(), i = M(t);
|
|
868
|
+
x(i);
|
|
869
|
+
var a = _(i);
|
|
870
|
+
D(t), o(() => {
|
|
871
|
+
j(i, r().chartDataLabels), d(a, ` ${n.messages.chartLabels ?? ""}`);
|
|
872
|
+
}), s("change", i, (e) => r().chartDataLabels = e.currentTarget.checked), k(e, t);
|
|
873
|
+
};
|
|
874
|
+
i(Mt, (e) => {
|
|
875
|
+
m(ae) && e(Nt);
|
|
876
|
+
});
|
|
877
|
+
var Pt = _(Mt, 2), $ = (e) => {
|
|
878
|
+
var t = K(), i = M(t);
|
|
879
|
+
x(i);
|
|
880
|
+
var a = _(i);
|
|
881
|
+
D(t), o(() => {
|
|
882
|
+
C(t, "title", n.messages.chartLogScaleTitle), j(i, r().chartLogScale), d(a, ` ${n.messages.chartLogScale ?? ""}`);
|
|
883
|
+
}), s("change", i, (e) => r().chartLogScale = e.currentTarget.checked), k(e, t);
|
|
884
|
+
};
|
|
885
|
+
i(Pt, (e) => {
|
|
886
|
+
m(re) && e($);
|
|
887
|
+
});
|
|
888
|
+
var Ft = _(Pt, 2), It = (e) => {
|
|
889
|
+
var t = J(), i = M(t), a = M(i, !0);
|
|
890
|
+
D(i);
|
|
891
|
+
var c = _(i, 2);
|
|
892
|
+
N(c, 21, () => be, (e) => e.value, (e, t) => {
|
|
893
|
+
var r = q(), i = M(r, !0);
|
|
894
|
+
D(r);
|
|
895
|
+
var a = {};
|
|
896
|
+
o(() => {
|
|
897
|
+
d(i, n.messages[m(t).label]), a !== (a = m(t).value) && (r.value = (r.__value = m(t).value) ?? "");
|
|
898
|
+
}), k(e, r);
|
|
899
|
+
}), D(c);
|
|
900
|
+
var l;
|
|
901
|
+
w(c), D(t), o(() => {
|
|
902
|
+
C(t, "title", n.messages.chartBucketTitle), d(a, n.messages.chartBucket), l !== (l = r().chartBucket ?? "") && (c.value = (c.__value = r().chartBucket ?? "") ?? "", y(c, r().chartBucket ?? ""));
|
|
903
|
+
}), s("change", c, (e) => r().chartBucket = e.currentTarget.value || null), k(e, t);
|
|
904
|
+
};
|
|
905
|
+
i(Ft, (e) => {
|
|
906
|
+
r().chartDimensionIsDate && m(O) && e(It);
|
|
907
|
+
});
|
|
908
|
+
var Lt = _(Ft, 2), Rt = (e) => {
|
|
909
|
+
var t = qe(), i = M(t);
|
|
910
|
+
x(i);
|
|
911
|
+
var a = _(i);
|
|
912
|
+
D(t), o(() => {
|
|
913
|
+
C(t, "title", n.messages.chartDateAxisTitle), j(i, r().chartTimeAxis), d(a, ` ${n.messages.chartDateAxis ?? ""}`);
|
|
914
|
+
}), s("change", i, (e) => r().chartTimeAxis = e.currentTarget.checked), k(e, t);
|
|
915
|
+
}, zt = S(() => r().chartDimensionIsDate && ve.includes(r().chartType));
|
|
916
|
+
i(Lt, (e) => {
|
|
917
|
+
m(zt) && e(Rt);
|
|
918
|
+
});
|
|
919
|
+
var Bt = _(Lt, 2), Vt = (e) => {
|
|
920
|
+
var t = Je(), r = M(t, !0);
|
|
921
|
+
D(t), o(() => d(r, n.messages.chartPivotHint)), k(e, t);
|
|
922
|
+
}, Ht = (e) => {
|
|
923
|
+
var t = Ye(), n = M(t, !0);
|
|
924
|
+
D(t), o(() => d(n, m(L))), k(e, t);
|
|
925
|
+
};
|
|
926
|
+
i(Bt, (e) => {
|
|
927
|
+
m(u) ? e(Vt) : m(L) && e(Ht, 1);
|
|
928
|
+
}), D(R), o(() => {
|
|
929
|
+
fe = P(R, 1, "sv-grid-chart-controls", null, fe, { "is-form": a() === "builder" }), C(R, "data-scope", a()), d(ht, n.messages.chartFormat), d(_t, n.messages.chartFormatNumber), d(yt, n.messages.chartFormatCurrency), d(xt, n.messages.chartFormatPercent), St !== (St = r().chartValueFormat) && (X.value = (X.__value = r().chartValueFormat) ?? "", y(X, r().chartValueFormat)), d(At, n.messages.chartColours), jt !== (jt = m(v)) && (Q.value = (Q.__value = m(v)) ?? "", y(Q, m(v)));
|
|
930
|
+
}), s("change", X, (e) => r().chartValueFormat = e.currentTarget.value), s("change", Q, (e) => r().chartPalette = H.find((t) => t.key === e.currentTarget.value)?.colors ?? null), k(e, R), ie();
|
|
931
|
+
}
|
|
932
|
+
a(["change", "click"]);
|
|
933
|
+
//#endregion
|
|
934
|
+
//#region ../grid/dist/chart-panel-messages.js
|
|
935
|
+
var Ze = {
|
|
936
|
+
chartPanelTitle: "Chart",
|
|
937
|
+
chartClearFilter: "Clear filter",
|
|
938
|
+
chartExport: "Export",
|
|
939
|
+
chartExportLabel: "Export chart",
|
|
940
|
+
chartExportPng: "PNG image",
|
|
941
|
+
chartExportSvg: "SVG vector",
|
|
942
|
+
chartExportPdf: "PDF document",
|
|
943
|
+
chartExportCsv: "CSV data",
|
|
944
|
+
chartExportCopy: "Copy to clipboard",
|
|
945
|
+
chartExportPrint: "Print",
|
|
946
|
+
chartExportDescribe: "Describe chart",
|
|
947
|
+
chartAi: "AI",
|
|
948
|
+
chartAiLabel: "Chart with AI",
|
|
949
|
+
chartAiPlaceholder: "Describe a chart, e.g. revenue by region stacked by product",
|
|
950
|
+
chartAiRun: "Chart it",
|
|
951
|
+
chartAiThinking: "Thinking...",
|
|
952
|
+
chartAiExplain: "Explain",
|
|
953
|
+
chartAiExplainTitle: "Explain this chart in plain words",
|
|
954
|
+
chartAiNoChart: "Couldn't build a chart from that request.",
|
|
955
|
+
chartAiNoExplanation: "Couldn't explain this chart.",
|
|
956
|
+
chartAiFailed: "Something went wrong.",
|
|
957
|
+
chartBuild: "Build",
|
|
958
|
+
chartBuildLabel: "Open the chart builder",
|
|
959
|
+
chartBuildTitle: "Chart builder: type gallery, data and format",
|
|
960
|
+
chartLinkBack: "Link the chart back to the grid",
|
|
961
|
+
chartUnlink: "Unlink the chart from the grid",
|
|
962
|
+
chartLinkedTitle: "Linked: the chart follows the grid's rows. Click to freeze it.",
|
|
963
|
+
chartUnlinkedTitle: "Unlinked: the chart keeps the data it has. Click to follow the grid again.",
|
|
964
|
+
chartAdd: "Add chart",
|
|
965
|
+
chartSave: "Save",
|
|
966
|
+
chartSaveLabel: "Saved charts",
|
|
967
|
+
chartSavedTitle: "Saved charts",
|
|
968
|
+
chartSaveName: "Save this chart as",
|
|
969
|
+
chartSaveNamePlaceholder: "Name",
|
|
970
|
+
chartSaveApply: "Apply",
|
|
971
|
+
chartPivotHint: "Charting the pivot: its row groups are the categories and its column groups the series.",
|
|
972
|
+
chartSaveRemove: "Remove",
|
|
973
|
+
chartSavedEmpty: "No saved charts yet.",
|
|
974
|
+
chartMaximize: "Maximize",
|
|
975
|
+
chartRestore: "Restore",
|
|
976
|
+
chartDock: "Dock",
|
|
977
|
+
chartDockLabel: "Dock chart",
|
|
978
|
+
chartPopOut: "Pop out",
|
|
979
|
+
chartPopOutLabel: "Pop out chart",
|
|
980
|
+
chartClose: "Close chart",
|
|
981
|
+
chartResize: "Resize chart panel",
|
|
982
|
+
chartResizeWindow: "Resize chart window",
|
|
983
|
+
chartTabs: "Charts",
|
|
984
|
+
chartRemoveTab: "Remove {title}",
|
|
985
|
+
chartRemove: "Remove",
|
|
986
|
+
chartEmptyColumns: "Charting needs at least one text column (to group by) and one numeric column (to measure).",
|
|
987
|
+
chartEmptyData: "No data to chart.",
|
|
988
|
+
chartType: "Type",
|
|
989
|
+
chartDate: "Date",
|
|
990
|
+
chartGroupBy: "Group by",
|
|
991
|
+
chartFrom: "From",
|
|
992
|
+
chartColumns: "Columns",
|
|
993
|
+
chartSplitBy: "Split by",
|
|
994
|
+
chartTo: "To",
|
|
995
|
+
chartRows: "Rows",
|
|
996
|
+
chartNone: "(none)",
|
|
997
|
+
chartValue: "Value",
|
|
998
|
+
chartX: "X",
|
|
999
|
+
chartY: "Y",
|
|
1000
|
+
chartLow: "Low",
|
|
1001
|
+
chartHigh: "High",
|
|
1002
|
+
chartOpen: "Open",
|
|
1003
|
+
chartClosePrice: "Close",
|
|
1004
|
+
chartVolume: "Volume",
|
|
1005
|
+
chartMetric: "Metric",
|
|
1006
|
+
chartTarget: "Target",
|
|
1007
|
+
chartAggregate: "Aggregate",
|
|
1008
|
+
chartReduceSum: "Sum",
|
|
1009
|
+
chartReduceAvg: "Average",
|
|
1010
|
+
chartReduceCount: "Count",
|
|
1011
|
+
chartReduceMin: "Min",
|
|
1012
|
+
chartReduceMax: "Max",
|
|
1013
|
+
chartReduceMedian: "Median",
|
|
1014
|
+
chartReduceP90: "90th percentile",
|
|
1015
|
+
chartReduceFirst: "First",
|
|
1016
|
+
chartReduceLast: "Last",
|
|
1017
|
+
chartReduceCountDistinct: "Distinct count",
|
|
1018
|
+
chartBins: "Bins",
|
|
1019
|
+
chartBinsTitle: "How many bins the sample is split into",
|
|
1020
|
+
chartShape: "Shape",
|
|
1021
|
+
chartShapeFunnel: "Funnel",
|
|
1022
|
+
chartShapePyramid: "Pyramid",
|
|
1023
|
+
chartShapeCone: "Cone",
|
|
1024
|
+
chartCandles: "Candles",
|
|
1025
|
+
chartCandlesClassic: "Classic",
|
|
1026
|
+
chartCandlesHollow: "Hollow",
|
|
1027
|
+
chartCandlesHeikinAshi: "Heikin-Ashi",
|
|
1028
|
+
chartIndicators: "Indicators",
|
|
1029
|
+
chartIndVolume: "Volume",
|
|
1030
|
+
chartIndVolumeTitle: "Volume bars under the price",
|
|
1031
|
+
chartIndRsi: "RSI",
|
|
1032
|
+
chartIndRsiTitle: "Relative strength index, 14 bars",
|
|
1033
|
+
chartIndMacd: "MACD",
|
|
1034
|
+
chartIndMacdTitle: "MACD 12 / 26 / 9",
|
|
1035
|
+
chartIndStochastic: "Stoch",
|
|
1036
|
+
chartIndStochasticTitle: "Stochastic oscillator 14 / 3",
|
|
1037
|
+
chartIndAtr: "ATR",
|
|
1038
|
+
chartIndAtrTitle: "Average true range, 14 bars",
|
|
1039
|
+
chartIndObv: "OBV",
|
|
1040
|
+
chartIndObvTitle: "On-balance volume",
|
|
1041
|
+
chartIndSma: "SMA 20",
|
|
1042
|
+
chartIndSmaTitle: "20-bar simple moving average on the price",
|
|
1043
|
+
chartIndEma: "EMA 20",
|
|
1044
|
+
chartIndEmaTitle: "20-bar exponential moving average on the price",
|
|
1045
|
+
chartIndBb: "Bollinger",
|
|
1046
|
+
chartIndBbTitle: "Bollinger bands 20 / 2 on the price",
|
|
1047
|
+
chartIndVwap: "VWAP",
|
|
1048
|
+
chartIndVwapTitle: "Volume-weighted average price on the price",
|
|
1049
|
+
chartFormat: "Format",
|
|
1050
|
+
chartFormatNumber: "Number",
|
|
1051
|
+
chartFormatCurrency: "Currency",
|
|
1052
|
+
chartFormatPercent: "Percent",
|
|
1053
|
+
chartStacked: "Stacked",
|
|
1054
|
+
chartStacked100: "100%",
|
|
1055
|
+
chartStacked100Title: "Normalise each category to 100 percent",
|
|
1056
|
+
chartHorizontal: "Horizontal",
|
|
1057
|
+
chartHorizontalTitle: "Bars grow rightwards - suits long category labels",
|
|
1058
|
+
chartDonut: "Donut",
|
|
1059
|
+
chartColours: "Colours",
|
|
1060
|
+
chartPaletteTheme: "Theme",
|
|
1061
|
+
chartPaletteOcean: "Ocean",
|
|
1062
|
+
chartPaletteSunset: "Sunset",
|
|
1063
|
+
chartPaletteForest: "Forest",
|
|
1064
|
+
chartPaletteSlate: "Slate",
|
|
1065
|
+
chartLabels: "Labels",
|
|
1066
|
+
chartLogScale: "Log scale",
|
|
1067
|
+
chartLogScaleTitle: "Logarithmic value axis - flattens wide-range data",
|
|
1068
|
+
chartBucket: "Bucket",
|
|
1069
|
+
chartBucketTitle: "Group the dates by calendar unit: one bar per month instead of one per day",
|
|
1070
|
+
chartBucketExact: "Exact",
|
|
1071
|
+
chartBucketDay: "Day",
|
|
1072
|
+
chartBucketWeek: "Week",
|
|
1073
|
+
chartBucketMonth: "Month",
|
|
1074
|
+
chartBucketQuarter: "Quarter",
|
|
1075
|
+
chartBucketYear: "Year",
|
|
1076
|
+
chartDateAxis: "Date axis",
|
|
1077
|
+
chartDateAxisTitle: "Space points by actual date - real time ticks and proportional gaps",
|
|
1078
|
+
chartGroupCompare: "Compare",
|
|
1079
|
+
chartGroupPartOfWhole: "Part of a whole",
|
|
1080
|
+
chartGroupFlow: "Flow",
|
|
1081
|
+
chartGroupDistribution: "Distribution",
|
|
1082
|
+
chartGroupSingleValue: "Single value",
|
|
1083
|
+
chartGroupOverTime: "Over time",
|
|
1084
|
+
chartTypeBar: "Bar",
|
|
1085
|
+
chartTypeLine: "Line",
|
|
1086
|
+
chartTypeArea: "Area",
|
|
1087
|
+
chartTypeLollipop: "Lollipop",
|
|
1088
|
+
chartTypePareto: "Pareto",
|
|
1089
|
+
chartTypeRangeBar: "Range bar",
|
|
1090
|
+
chartTypeRangeArea: "Range area",
|
|
1091
|
+
chartTypeDumbbell: "Dumbbell",
|
|
1092
|
+
chartTypeRadialColumn: "Radial column",
|
|
1093
|
+
chartTypeRadialBar: "Radial bar",
|
|
1094
|
+
chartTypeNightingale: "Nightingale",
|
|
1095
|
+
chartTypePie: "Pie",
|
|
1096
|
+
chartTypeTreemap: "Tree map",
|
|
1097
|
+
chartTypeSunburst: "Sunburst",
|
|
1098
|
+
chartTypeFunnel: "Funnel",
|
|
1099
|
+
chartTypeWaterfall: "Waterfall",
|
|
1100
|
+
chartTypeSankey: "Sankey",
|
|
1101
|
+
chartTypeChord: "Chord",
|
|
1102
|
+
chartTypeRadar: "Radar",
|
|
1103
|
+
chartTypeHeatmap: "Heat map",
|
|
1104
|
+
chartTypeScatter: "Scatter",
|
|
1105
|
+
chartTypeBoxplot: "Box plot",
|
|
1106
|
+
chartTypeHistogram: "Histogram",
|
|
1107
|
+
chartTypeGauge: "Gauge",
|
|
1108
|
+
chartTypeBullet: "Bullet",
|
|
1109
|
+
chartTypeCalendar: "Calendar",
|
|
1110
|
+
chartTypeStream: "Stream",
|
|
1111
|
+
chartTypeCandlestick: "Candlestick",
|
|
1112
|
+
chartTypeOhlc: "OHLC bars",
|
|
1113
|
+
chartIssueHeatmap: "Heat map needs a Split by column for its rows.",
|
|
1114
|
+
chartIssueSankey: "Sankey needs a Split by column: Group by is the source, Split by the target.",
|
|
1115
|
+
chartIssueRadar: "Radar needs at least 3 groups.",
|
|
1116
|
+
chartIssueFunnel: "Funnel needs at least 2 stages.",
|
|
1117
|
+
chartIssueChord: "Chord needs a Split by column: Group by and Split by are the two ends of each flow.",
|
|
1118
|
+
chartIssueStream: "Stream needs a Split by column: each split becomes a layer.",
|
|
1119
|
+
chartIssueSecondMeasure: "Pick a second measure for the high end of the range.",
|
|
1120
|
+
chartIssueOhlcDate: "Candlesticks need a date column.",
|
|
1121
|
+
chartIssueOhlcColumns: "Pick the Open, High, Low and Close columns.",
|
|
1122
|
+
chartBuilderTitle: "Chart builder",
|
|
1123
|
+
chartBuilderTabType: "Type",
|
|
1124
|
+
chartBuilderTabData: "Data",
|
|
1125
|
+
chartBuilderTabFormat: "Format",
|
|
1126
|
+
chartBuilderLinked: "Linked to the grid",
|
|
1127
|
+
chartBuilderFrozenAt: "Frozen at {time}; edits, filters and new rows no longer change it.",
|
|
1128
|
+
chartBuilderFollows: "The chart follows the grid's rows, filters and edits.",
|
|
1129
|
+
chartBuilderTitleField: "Title",
|
|
1130
|
+
chartBuilderSubtitle: "Subtitle",
|
|
1131
|
+
chartBuilderCaption: "Caption",
|
|
1132
|
+
chartBuilderLegend: "Legend",
|
|
1133
|
+
chartLegendBottom: "Bottom",
|
|
1134
|
+
chartLegendTop: "Top",
|
|
1135
|
+
chartLegendLeft: "Left",
|
|
1136
|
+
chartLegendRight: "Right",
|
|
1137
|
+
chartLegendHidden: "Hidden",
|
|
1138
|
+
chartBuilderDataLabels: "Data labels",
|
|
1139
|
+
chartBuilderPanelSetting: "Panel setting",
|
|
1140
|
+
chartLabelsTop: "Top",
|
|
1141
|
+
chartLabelsOutside: "Outside",
|
|
1142
|
+
chartLabelsInside: "Inside",
|
|
1143
|
+
chartLabelsCenter: "Center",
|
|
1144
|
+
chartLabelsHidden: "Hidden",
|
|
1145
|
+
chartBuilderSeriesLabels: "Series labels",
|
|
1146
|
+
chartBuilderCrosshairLabels: "Crosshair labels",
|
|
1147
|
+
chartBuilderCompactBelow: "Compact under",
|
|
1148
|
+
chartBuilderCompactBelowTitle: "Below this width in px the chart drops its series and data labels, turns the category labels vertical and hides the legend",
|
|
1149
|
+
chartBuilderValueAxis: "Value axis",
|
|
1150
|
+
chartBuilderRightAxis: "Right axis",
|
|
1151
|
+
chartBuilderCategoryAxis: "Category axis",
|
|
1152
|
+
chartBuilderMin: "Min",
|
|
1153
|
+
chartBuilderMax: "Max",
|
|
1154
|
+
chartBuilderAuto: "auto",
|
|
1155
|
+
chartBuilderOff: "off",
|
|
1156
|
+
chartBuilderGridLines: "Grid lines",
|
|
1157
|
+
chartBuilderAxisLabels: "Labels",
|
|
1158
|
+
chartBuilderLabelsAuto: "Auto",
|
|
1159
|
+
chartBuilderLabelsHorizontal: "Horizontal",
|
|
1160
|
+
chartBuilderLabelsTilted: "Tilted",
|
|
1161
|
+
chartBuilderLabelsVertical: "Vertical",
|
|
1162
|
+
chartBuilderSeries: "Series",
|
|
1163
|
+
chartBuilderColor: "Color",
|
|
1164
|
+
chartBuilderSeriesType: "Type",
|
|
1165
|
+
chartBuilderAxis: "Axis",
|
|
1166
|
+
chartBuilderMarker: "Marker",
|
|
1167
|
+
chartBuilderWidth: "Width",
|
|
1168
|
+
chartBuilderStack: "Stack",
|
|
1169
|
+
chartBuilderStackPlaceholder: "own",
|
|
1170
|
+
chartBuilderSeriesColorLabel: "{series} colour",
|
|
1171
|
+
chartBuilderSeriesTypeLabel: "{series} type",
|
|
1172
|
+
chartBuilderSeriesAxisLabel: "{series} axis",
|
|
1173
|
+
chartBuilderSeriesMarkerLabel: "{series} marker",
|
|
1174
|
+
chartBuilderSeriesWidthLabel: "{series} line width",
|
|
1175
|
+
chartBuilderSeriesStackLabel: "{series} stack group",
|
|
1176
|
+
chartBuilderChartType: "Chart",
|
|
1177
|
+
chartBuilderBar: "Bar",
|
|
1178
|
+
chartBuilderLine: "Line",
|
|
1179
|
+
chartBuilderArea: "Area",
|
|
1180
|
+
chartBuilderLeft: "Left",
|
|
1181
|
+
chartBuilderRight: "Right",
|
|
1182
|
+
chartBuilderStyle: "Style",
|
|
1183
|
+
chartBuilderFontSize: "Font size",
|
|
1184
|
+
chartBuilderFontFamily: "Font",
|
|
1185
|
+
chartBuilderBackground: "Background",
|
|
1186
|
+
chartBuilderTextColor: "Text",
|
|
1187
|
+
chartBuilderResetFormat: "Reset format"
|
|
1188
|
+
};
|
|
1189
|
+
function Qe(e) {
|
|
1190
|
+
return F(Ze, e);
|
|
1191
|
+
}
|
|
1192
|
+
function $e(e, t) {
|
|
1193
|
+
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
1194
|
+
}
|
|
1195
|
+
//#endregion
|
|
1196
|
+
//#region ../grid/dist/SvGridChartPanel.svelte
|
|
1197
|
+
var et = O("<div role=\"separator\"></div>"), tt = O("<button type=\"button\" class=\"sv-grid-chart-btn\"> </button>"), nt = 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>"), rt = 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>"), it = O("<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>"), at = O("<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>"), ot = O("<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>"), st = O("<ul class=\"sv-grid-chart-saved-list\"></ul>"), ct = O("<p class=\"sv-grid-chart-saved-empty\"> </p>"), lt = O("<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>"), ut = 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>"), dt = 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>"), ft = O("<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), pt = 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>"), mt = 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>"), ht = O("<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), X = O("<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>"), gt = O("<div><button type=\"button\" class=\"sv-grid-chart-tab-label\" role=\"tab\"> </button> <button type=\"button\" class=\"sv-grid-chart-tab-x\">×</button></div>"), _t = O("<div class=\"sv-grid-chart-tabs\" role=\"tablist\"></div>"), vt = O("<button type=\"button\" class=\"sv-grid-chart-btn sv-grid-chart-explain-btn\"> </button>"), yt = O("<p class=\"sv-grid-chart-ai-msg is-error\"> </p>"), bt = O("<p class=\"sv-grid-chart-ai-msg\"> </p>"), xt = O("<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>"), St = O("<div class=\"sv-grid-chart-panes-host\"><!></div>"), Ct = O("<p class=\"sv-grid-chart-empty\"><!></p>"), wt = O("<div class=\"sv-grid-chart-float-resizer\" role=\"separator\"></div>"), Tt = O("<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>");
|
|
1198
|
+
function Et(e, t) {
|
|
1199
|
+
ee(t, !0);
|
|
1200
|
+
let a = p(null), u = p(!1);
|
|
1201
|
+
function y() {
|
|
1202
|
+
if (m(a)) {
|
|
1203
|
+
v(u, !0);
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
import("./SvGridChartBuilder-C4OL4XYx.js").then((e) => {
|
|
1207
|
+
v(a, e.default, !0), v(u, !0);
|
|
1208
|
+
});
|
|
1209
|
+
}
|
|
1210
|
+
let w = A(t, "ctrl", 7), T = S(() => Qe(w().localizationText)), E = S(() => w().chartingConfig), O = S(() => w().chartCfg), te = S(() => w().chartFormat?.legend === void 0 || w().chartFormat.legend), j = S(() => w().chartFormat?.dataLabels === void 0 ? w().chartDataLabels : w().chartFormat.dataLabels !== null && { placement: w().chartFormat.dataLabels }), ne = S(() => w().chartFormat?.crosshairLabels !== !1), F = S(() => w().chartIsCustom), I = S(() => m(E)?.position ?? "bottom"), L = S(() => m(E)?.crossFilter !== !1), z = S(() => w().chartSpec), pe = S(() => w().chartableColumns), B = S(() => w().chartSize ?? (m(I) === "right" ? m(E)?.width ?? 340 : m(E)?.height ?? 260)), V = S(() => w().chartFloating), H = S(() => w().chartMaximized), U = S(() => w().chartFloatRect), ge = p(null);
|
|
1211
|
+
function _e() {
|
|
1212
|
+
let e = m(ge)?.offsetParent;
|
|
1213
|
+
return {
|
|
1214
|
+
w: e?.clientWidth ?? 800,
|
|
1215
|
+
h: e?.clientHeight ?? 520
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
function ve() {
|
|
1219
|
+
if (!w().chartFloatRect) {
|
|
1220
|
+
let { w: e, h: t } = _e(), n = Math.min(600, Math.max(360, e - 80)), r = Math.min(430, Math.max(260, t - 90));
|
|
1221
|
+
w().chartFloatRect = {
|
|
1222
|
+
x: Math.round((e - n) / 2),
|
|
1223
|
+
y: Math.round((t - r) / 2),
|
|
1224
|
+
w: n,
|
|
1225
|
+
h: r
|
|
1226
|
+
};
|
|
1227
|
+
}
|
|
1228
|
+
w().chartFloating = !0;
|
|
1229
|
+
}
|
|
1230
|
+
function ye() {
|
|
1231
|
+
w().chartFloating = !1, w().chartMaximized = !1;
|
|
1232
|
+
}
|
|
1233
|
+
let be = () => w().chartMaximized = !w().chartMaximized;
|
|
1234
|
+
function xe(e) {
|
|
1235
|
+
if (!m(V) || m(H) || e.target?.closest("button")) return;
|
|
1236
|
+
let t = w().chartFloatRect;
|
|
1237
|
+
if (!t) return;
|
|
1238
|
+
e.preventDefault();
|
|
1239
|
+
let n = e.clientX, r = e.clientY, { w: i, h: a } = _e(), o = (e) => {
|
|
1240
|
+
let o = Math.max(0, Math.min(i - t.w, t.x + e.clientX - n)), s = Math.max(0, Math.min(a - t.h, t.y + e.clientY - r));
|
|
1241
|
+
w().chartFloatRect = {
|
|
1242
|
+
x: o,
|
|
1243
|
+
y: s,
|
|
1244
|
+
w: t.w,
|
|
1245
|
+
h: t.h
|
|
1246
|
+
};
|
|
1247
|
+
}, s = () => {
|
|
1248
|
+
window.removeEventListener("pointermove", o), window.removeEventListener("pointerup", s);
|
|
1249
|
+
};
|
|
1250
|
+
window.addEventListener("pointermove", o), window.addEventListener("pointerup", s);
|
|
1251
|
+
}
|
|
1252
|
+
function Se(e) {
|
|
1253
|
+
let t = w().chartFloatRect;
|
|
1254
|
+
if (!t) return;
|
|
1255
|
+
e.preventDefault(), e.stopPropagation();
|
|
1256
|
+
let n = e.clientX, r = e.clientY;
|
|
1257
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
1258
|
+
let i = (e) => {
|
|
1259
|
+
w().chartFloatRect = {
|
|
1260
|
+
x: t.x,
|
|
1261
|
+
y: t.y,
|
|
1262
|
+
w: Math.max(300, t.w + e.clientX - n),
|
|
1263
|
+
h: Math.max(220, t.h + e.clientY - r)
|
|
1264
|
+
};
|
|
1265
|
+
}, a = () => {
|
|
1266
|
+
window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a);
|
|
1267
|
+
};
|
|
1268
|
+
window.addEventListener("pointermove", i), window.addEventListener("pointerup", a);
|
|
1269
|
+
}
|
|
1270
|
+
let Ce = S(() => m(V) ? m(H) ? "left:12px; top:12px; right:12px; bottom:12px; width:auto; height:auto;" : m(U) ? `left:${m(U).x}px; top:${m(U).y}px; width:${m(U).w}px; height:${m(U).h}px;` : "" : m(I) === "right" ? `width:${m(B)}px` : `height:${m(B)}px`), we = S(() => he(m(pe), m(T)));
|
|
1271
|
+
function Te(e) {
|
|
1272
|
+
m(L) && e.category != null && w().applyChartCrossFilter(String(e.category));
|
|
1273
|
+
}
|
|
1274
|
+
let Ee = p(null), W = p(!1), De = p(!1), Oe = () => m(Ee)?.querySelector("svg") ?? null, ke = S(() => !!m(z) && se(m(z)));
|
|
1275
|
+
function Ae() {
|
|
1276
|
+
let e = Oe();
|
|
1277
|
+
e && ce(e, "chart.png"), v(W, !1);
|
|
1278
|
+
}
|
|
1279
|
+
function je() {
|
|
1280
|
+
let e = Oe();
|
|
1281
|
+
e && ue(e, "chart.svg"), v(W, !1);
|
|
1282
|
+
}
|
|
1283
|
+
function Me() {
|
|
1284
|
+
m(z) && oe(m(z), "chart.csv"), v(W, !1);
|
|
1285
|
+
}
|
|
1286
|
+
async function Ne() {
|
|
1287
|
+
let e = Oe();
|
|
1288
|
+
v(W, !1), e && await (await import("./chart-export-pdf-BirUdchl.js")).downloadChartPdf(e, "chart.pdf", { title: m(z)?.title ?? w().charts[w().activeChartIndex]?.title });
|
|
1289
|
+
}
|
|
1290
|
+
async function Pe() {
|
|
1291
|
+
let e = Oe();
|
|
1292
|
+
v(W, !1), e && (await import("./chart-export-pdf-BirUdchl.js")).printChart(e, { title: m(z)?.title ?? w().charts[w().activeChartIndex]?.title });
|
|
1293
|
+
}
|
|
1294
|
+
async function Fe() {
|
|
1295
|
+
let e = Oe();
|
|
1296
|
+
if (v(W, !1), !(!e || typeof ClipboardItem > "u" || !navigator.clipboard?.write)) try {
|
|
1297
|
+
let t = await le(e);
|
|
1298
|
+
await navigator.clipboard.write([new ClipboardItem({ "image/png": t })]), v(De, !0), setTimeout(() => v(De, !1), 1400);
|
|
1299
|
+
} catch {}
|
|
1300
|
+
}
|
|
1301
|
+
let Ie = p(null), Le = p(null);
|
|
1302
|
+
function Re(e, t, n) {
|
|
1303
|
+
let r = (n) => {
|
|
1304
|
+
n.target?.closest(e) || t();
|
|
1305
|
+
}, i = (e) => {
|
|
1306
|
+
e.key === "Escape" && (e.stopPropagation(), t(), n()?.focus());
|
|
1307
|
+
};
|
|
1308
|
+
return window.addEventListener("pointerdown", r), window.addEventListener("keydown", i, !0), () => {
|
|
1309
|
+
window.removeEventListener("pointerdown", r), window.removeEventListener("keydown", i, !0);
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
g(() => {
|
|
1313
|
+
if (m(W)) return Re(".sv-grid-chart-export", () => v(W, !1), () => m(Ie));
|
|
1314
|
+
});
|
|
1315
|
+
let G = p(!1), ze = p("");
|
|
1316
|
+
function Be() {
|
|
1317
|
+
let e = m(ze).trim();
|
|
1318
|
+
e && (w().saveChart(e), v(ze, ""));
|
|
1319
|
+
}
|
|
1320
|
+
g(() => {
|
|
1321
|
+
if (m(G)) return Re(".sv-grid-chart-saved", () => v(G, !1), () => m(Le));
|
|
1322
|
+
});
|
|
1323
|
+
async function Ve() {
|
|
1324
|
+
if (v(W, !1), !m(z)) return;
|
|
1325
|
+
let { chartSummary: e } = await import("./chart-summary-BP9i-v8M.js"), t = e(m(z));
|
|
1326
|
+
try {
|
|
1327
|
+
await navigator.clipboard?.writeText(t);
|
|
1328
|
+
} catch {}
|
|
1329
|
+
v(J, t, !0);
|
|
1330
|
+
}
|
|
1331
|
+
let He = S(() => !!w().chartAiHandler), Ue = S(() => !!w().chartExplainHandler);
|
|
1332
|
+
async function We() {
|
|
1333
|
+
let e = w().chartExplainHandler;
|
|
1334
|
+
if (!(!e || m(K))) {
|
|
1335
|
+
v(K, !0), v(q, ""), v(J, "");
|
|
1336
|
+
try {
|
|
1337
|
+
let t = await e();
|
|
1338
|
+
v(J, t ? [t.summary, ...t.insights].filter(Boolean).join(" ") : "", !0), t || v(q, m(T).chartAiNoExplanation, !0);
|
|
1339
|
+
} catch (e) {
|
|
1340
|
+
v(q, e instanceof Error ? e.message : m(T).chartAiFailed, !0);
|
|
1341
|
+
} finally {
|
|
1342
|
+
v(K, !1);
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
let Ge = p(!1), Ke = p(""), K = p(!1), q = p(""), J = p("");
|
|
1347
|
+
async function qe() {
|
|
1348
|
+
let e = w().chartAiHandler, t = m(Ke).trim();
|
|
1349
|
+
if (!(!e || !t || m(K))) {
|
|
1350
|
+
v(K, !0), v(q, ""), v(J, "");
|
|
1351
|
+
try {
|
|
1352
|
+
let n = await e(t);
|
|
1353
|
+
n ? (w().applyChartConfig(n), v(J, typeof n.rationale == "string" ? n.rationale : "", !0)) : v(q, m(T).chartAiNoChart, !0);
|
|
1354
|
+
} catch (e) {
|
|
1355
|
+
v(q, e instanceof Error ? e.message : m(T).chartAiFailed, !0);
|
|
1356
|
+
} finally {
|
|
1357
|
+
v(K, !1);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
let Je = p(!1);
|
|
1362
|
+
function Ye(e) {
|
|
1363
|
+
e.preventDefault(), v(Je, !0);
|
|
1364
|
+
let t = m(I) === "right" ? e.clientX : e.clientY, n = m(B);
|
|
1365
|
+
e.target.setPointerCapture?.(e.pointerId);
|
|
1366
|
+
let r = (e) => {
|
|
1367
|
+
let r = m(I) === "right" ? t - e.clientX : t - e.clientY;
|
|
1368
|
+
w().chartSize = Math.max(160, Math.min(720, n + r));
|
|
1369
|
+
}, i = () => {
|
|
1370
|
+
v(Je, !1), window.removeEventListener("pointermove", r), window.removeEventListener("pointerup", i);
|
|
1371
|
+
};
|
|
1372
|
+
window.addEventListener("pointermove", r), window.addEventListener("pointerup", i);
|
|
1373
|
+
}
|
|
1374
|
+
var Y = Tt();
|
|
1375
|
+
let Ze;
|
|
1376
|
+
var Et = M(Y), Dt = (e) => {
|
|
1377
|
+
var t = et();
|
|
1378
|
+
let n;
|
|
1379
|
+
o(() => {
|
|
1380
|
+
n = P(t, 1, "sv-grid-chart-resizer", null, n, { "is-dragging": m(Je) }), C(t, "aria-orientation", m(I) === "right" ? "vertical" : "horizontal"), C(t, "aria-label", m(T).chartResize);
|
|
1381
|
+
}), s("pointerdown", t, Ye), k(e, t);
|
|
1382
|
+
};
|
|
1383
|
+
i(Et, (e) => {
|
|
1384
|
+
m(V) || e(Dt);
|
|
1385
|
+
});
|
|
1386
|
+
var Ot = _(Et, 2), Z = M(Ot);
|
|
1387
|
+
let kt;
|
|
1388
|
+
var At = _(M(Z), 2), Q = M(At, !0);
|
|
1389
|
+
D(At);
|
|
1390
|
+
var jt = _(At, 2), Mt = M(jt), Nt = (e) => {
|
|
1391
|
+
var t = tt(), n = M(t, !0);
|
|
1392
|
+
D(t), o(() => d(n, m(T).chartClearFilter)), s("click", t, () => w().clearChartCrossFilter()), k(e, t);
|
|
1393
|
+
};
|
|
1394
|
+
i(Mt, (e) => {
|
|
1395
|
+
m(L) && !m(F) && e(Nt);
|
|
1396
|
+
});
|
|
1397
|
+
var Pt = _(Mt, 2), $ = M(Pt), Ft = M($), It = (e) => {
|
|
1398
|
+
var t = nt();
|
|
1399
|
+
k(e, t);
|
|
1400
|
+
}, Lt = (e) => {
|
|
1401
|
+
var t = rt();
|
|
1402
|
+
k(e, t);
|
|
1403
|
+
};
|
|
1404
|
+
i(Ft, (e) => {
|
|
1405
|
+
m(De) ? e(It) : e(Lt, -1);
|
|
1406
|
+
}), D($), b($, (e) => v(Ie, e), () => m(Ie));
|
|
1407
|
+
var Rt = _($, 2), zt = (e) => {
|
|
1408
|
+
var t = it(), n = M(t), r = M(n, !0);
|
|
1409
|
+
D(n);
|
|
1410
|
+
var i = _(n, 2), a = M(i, !0);
|
|
1411
|
+
D(i);
|
|
1412
|
+
var c = _(i, 2), l = M(c, !0);
|
|
1413
|
+
D(c);
|
|
1414
|
+
var u = _(c, 2), f = M(u, !0);
|
|
1415
|
+
D(u);
|
|
1416
|
+
var p = _(u, 2), h = M(p, !0);
|
|
1417
|
+
D(p);
|
|
1418
|
+
var g = _(p, 2), v = M(g, !0);
|
|
1419
|
+
D(g);
|
|
1420
|
+
var y = _(g, 2), b = M(y, !0);
|
|
1421
|
+
D(y), D(t), o(() => {
|
|
1422
|
+
d(r, m(T).chartExportPng), d(a, m(T).chartExportSvg), d(l, m(T).chartExportPdf), u.disabled = !m(ke), d(f, m(T).chartExportCsv), d(h, m(T).chartExportCopy), d(v, m(T).chartExportPrint), d(b, m(T).chartExportDescribe);
|
|
1423
|
+
}), s("click", n, Ae), s("click", i, je), s("click", c, Ne), s("click", u, Me), s("click", p, Fe), s("click", g, Pe), s("click", y, Ve), k(e, t);
|
|
1424
|
+
};
|
|
1425
|
+
i(Rt, (e) => {
|
|
1426
|
+
m(W) && e(zt);
|
|
1427
|
+
}), D(Pt);
|
|
1428
|
+
var Bt = _(Pt, 2), Vt = (e) => {
|
|
1429
|
+
var t = at();
|
|
1430
|
+
let n;
|
|
1431
|
+
var r = _(M(t));
|
|
1432
|
+
D(t), o(() => {
|
|
1433
|
+
n = P(t, 1, "sv-grid-chart-btn sv-grid-chart-ai-btn", null, n, { "is-active": m(Ge) }), C(t, "aria-label", m(T).chartAiLabel), C(t, "title", m(T).chartAiLabel), C(t, "aria-expanded", m(Ge)), d(r, ` ${m(T).chartAi ?? ""}`);
|
|
1434
|
+
}), s("click", t, () => v(Ge, !m(Ge))), k(e, t);
|
|
1435
|
+
};
|
|
1436
|
+
i(Bt, (e) => {
|
|
1437
|
+
m(He) && !m(F) && e(Vt);
|
|
1438
|
+
});
|
|
1439
|
+
var Ht = _(Bt, 2), Ut = (e) => {
|
|
1440
|
+
var t = ft(), n = c(t), r = _(M(n));
|
|
1441
|
+
D(n);
|
|
1442
|
+
var a = _(n, 2), u = M(a);
|
|
1443
|
+
b(u, (e) => v(Le, e), () => m(Le));
|
|
1444
|
+
var f = _(u, 2), p = (e) => {
|
|
1445
|
+
var t = lt(), n = M(t), r = M(n);
|
|
1446
|
+
x(r);
|
|
1447
|
+
var a = _(r, 2), c = M(a, !0);
|
|
1448
|
+
D(a), D(n);
|
|
1449
|
+
var u = _(n, 2), f = (e) => {
|
|
1450
|
+
var t = st();
|
|
1451
|
+
N(t, 21, () => w().savedCharts, (e) => e.name, (e, t) => {
|
|
1452
|
+
var n = ot(), r = M(n), i = M(r, !0);
|
|
1453
|
+
D(r);
|
|
1454
|
+
var a = _(r, 2);
|
|
1455
|
+
D(n), o(() => {
|
|
1456
|
+
C(r, "title", m(T).chartSaveApply), d(i, m(t).name), C(a, "aria-label", `${m(T).chartSaveRemove}: ${m(t).name}`), C(a, "title", m(T).chartSaveRemove);
|
|
1457
|
+
}), s("click", r, () => {
|
|
1458
|
+
w().applySavedChart(m(t).name), v(G, !1);
|
|
1459
|
+
}), s("click", a, () => w().removeSavedChart(m(t).name)), k(e, n);
|
|
1460
|
+
}), D(t), k(e, t);
|
|
1461
|
+
}, p = (e) => {
|
|
1462
|
+
var t = ct(), n = M(t, !0);
|
|
1463
|
+
D(t), o(() => d(n, m(T).chartSavedEmpty)), k(e, t);
|
|
1464
|
+
};
|
|
1465
|
+
i(u, (e) => {
|
|
1466
|
+
w().savedCharts.length ? e(f) : e(p, -1);
|
|
1467
|
+
}), D(t), o((e) => {
|
|
1468
|
+
C(t, "aria-label", m(T).chartSavedTitle), C(r, "aria-label", m(T).chartSaveName), C(r, "placeholder", m(T).chartSaveNamePlaceholder), a.disabled = e, d(c, m(T).chartSave);
|
|
1469
|
+
}, [() => !m(ze).trim()]), l("submit", n, (e) => {
|
|
1470
|
+
e.preventDefault(), Be();
|
|
1471
|
+
}), re(r, () => m(ze), (e) => v(ze, e)), k(e, t);
|
|
1472
|
+
};
|
|
1473
|
+
i(f, (e) => {
|
|
1474
|
+
m(G) && e(p);
|
|
1475
|
+
}), D(a);
|
|
1476
|
+
var h = _(a, 2);
|
|
1477
|
+
let g;
|
|
1478
|
+
var S = M(h), E = (e) => {
|
|
1479
|
+
var t = ut();
|
|
1480
|
+
k(e, t);
|
|
1481
|
+
}, O = (e) => {
|
|
1482
|
+
var t = dt();
|
|
1483
|
+
k(e, t);
|
|
1484
|
+
};
|
|
1485
|
+
i(S, (e) => {
|
|
1486
|
+
w().chartFrozen ? e(E) : e(O, -1);
|
|
1487
|
+
}), D(h);
|
|
1488
|
+
var A = _(h, 2);
|
|
1489
|
+
o(() => {
|
|
1490
|
+
C(n, "aria-label", m(T).chartBuildLabel), C(n, "title", m(T).chartBuildTitle), d(r, ` ${m(T).chartBuild ?? ""}`), C(u, "aria-label", m(T).chartSaveLabel), C(u, "title", m(T).chartSavedTitle), C(u, "aria-expanded", m(G)), g = P(h, 1, "sv-grid-chart-icon-btn sv-grid-chart-link-btn", null, g, { "is-unlinked": !!w().chartFrozen }), C(h, "aria-label", w().chartFrozen ? m(T).chartLinkBack : m(T).chartUnlink), C(h, "aria-pressed", !!w().chartFrozen), C(h, "title", w().chartFrozen ? m(T).chartUnlinkedTitle : m(T).chartLinkedTitle), C(A, "aria-label", m(T).chartAdd), C(A, "title", m(T).chartAdd);
|
|
1491
|
+
}), s("click", n, y), s("click", u, () => v(G, !m(G))), s("click", h, () => w().chartFrozen ? w().unfreezeChart() : w().freezeChart()), s("click", A, () => w().addChart()), k(e, t);
|
|
1492
|
+
};
|
|
1493
|
+
i(Ht, (e) => {
|
|
1494
|
+
m(F) || e(Ut);
|
|
1495
|
+
});
|
|
1496
|
+
var Wt = _(Ht, 2), Gt = (e) => {
|
|
1497
|
+
var t = ht(), n = c(t), r = M(n), a = (e) => {
|
|
1498
|
+
var t = pt();
|
|
1499
|
+
k(e, t);
|
|
1500
|
+
}, l = (e) => {
|
|
1501
|
+
var t = mt();
|
|
1502
|
+
k(e, t);
|
|
1503
|
+
};
|
|
1504
|
+
i(r, (e) => {
|
|
1505
|
+
m(H) ? e(a) : e(l, -1);
|
|
1506
|
+
}), D(n);
|
|
1507
|
+
var u = _(n, 2);
|
|
1508
|
+
o(() => {
|
|
1509
|
+
C(n, "aria-label", m(H) ? m(T).chartRestore : m(T).chartMaximize), C(n, "title", m(H) ? m(T).chartRestore : m(T).chartMaximize), C(u, "aria-label", m(T).chartDockLabel), C(u, "title", m(T).chartDock);
|
|
1510
|
+
}), s("click", n, be), s("click", u, ye), k(e, t);
|
|
1511
|
+
}, Kt = (e) => {
|
|
1512
|
+
var t = X();
|
|
1513
|
+
o(() => {
|
|
1514
|
+
C(t, "aria-label", m(T).chartPopOutLabel), C(t, "title", m(T).chartPopOut);
|
|
1515
|
+
}), s("click", t, ve), k(e, t);
|
|
1516
|
+
};
|
|
1517
|
+
i(Wt, (e) => {
|
|
1518
|
+
m(V) ? e(Gt) : e(Kt, -1);
|
|
1519
|
+
});
|
|
1520
|
+
var qt = _(Wt, 2);
|
|
1521
|
+
D(jt), D(Z);
|
|
1522
|
+
var Jt = _(Z, 2), Yt = (e) => {
|
|
1523
|
+
var t = _t();
|
|
1524
|
+
N(t, 23, () => w().charts, (e) => e.id, (e, t, n) => {
|
|
1525
|
+
var r = gt();
|
|
1526
|
+
let i;
|
|
1527
|
+
var a = M(r), c = M(a, !0);
|
|
1528
|
+
D(a);
|
|
1529
|
+
var l = _(a, 2);
|
|
1530
|
+
D(r), o((e) => {
|
|
1531
|
+
i = P(r, 1, "sv-grid-chart-tab", null, i, { "is-active": m(n) === w().activeChartIndex }), C(a, "aria-selected", m(n) === w().activeChartIndex), d(c, m(t).title), C(l, "aria-label", e), C(l, "title", m(T).chartRemove);
|
|
1532
|
+
}, [() => $e(m(T).chartRemoveTab, { title: m(t).title })]), s("click", a, () => w().activeChartIndex = m(n)), s("click", l, () => w().removeChart(m(n))), k(e, r);
|
|
1533
|
+
}), D(t), o(() => C(t, "aria-label", m(T).chartTabs)), k(e, t);
|
|
1534
|
+
};
|
|
1535
|
+
i(Jt, (e) => {
|
|
1536
|
+
!m(F) && w().charts.length > 1 && e(Yt);
|
|
1537
|
+
});
|
|
1538
|
+
var Xt = _(Jt, 2), Zt = (e) => {
|
|
1539
|
+
var t = xt(), n = M(t), r = M(n);
|
|
1540
|
+
x(r);
|
|
1541
|
+
var a = _(r, 2), c = M(a, !0);
|
|
1542
|
+
D(a);
|
|
1543
|
+
var u = _(a, 2), f = (e) => {
|
|
1544
|
+
var t = vt(), n = M(t, !0);
|
|
1545
|
+
D(t), o(() => {
|
|
1546
|
+
t.disabled = m(K) || !m(z), C(t, "title", m(T).chartAiExplainTitle), d(n, m(T).chartAiExplain);
|
|
1547
|
+
}), s("click", t, We), k(e, t);
|
|
1548
|
+
};
|
|
1549
|
+
i(u, (e) => {
|
|
1550
|
+
m(Ue) && e(f);
|
|
1551
|
+
}), D(n);
|
|
1552
|
+
var p = _(n, 2), h = (e) => {
|
|
1553
|
+
var t = yt(), n = M(t, !0);
|
|
1554
|
+
D(t), o(() => d(n, m(q))), k(e, t);
|
|
1555
|
+
}, g = (e) => {
|
|
1556
|
+
var t = bt(), n = M(t, !0);
|
|
1557
|
+
D(t), o(() => d(n, m(J))), k(e, t);
|
|
1558
|
+
};
|
|
1559
|
+
i(p, (e) => {
|
|
1560
|
+
m(q) ? e(h) : m(J) && e(g, 1);
|
|
1561
|
+
}), D(t), o((e) => {
|
|
1562
|
+
C(r, "placeholder", m(T).chartAiPlaceholder), r.disabled = m(K), a.disabled = e, d(c, m(K) ? m(T).chartAiThinking : m(T).chartAiRun);
|
|
1563
|
+
}, [() => m(K) || !m(Ke).trim()]), l("submit", n, (e) => {
|
|
1564
|
+
e.preventDefault(), qe();
|
|
1565
|
+
}), re(r, () => m(Ke), (e) => v(Ke, e)), k(e, t);
|
|
1566
|
+
};
|
|
1567
|
+
i(Xt, (e) => {
|
|
1568
|
+
m(He) && m(Ge) && !m(F) && e(Zt);
|
|
1569
|
+
});
|
|
1570
|
+
var Qt = _(Xt, 2), $t = (e) => {
|
|
1571
|
+
Xe(e, {
|
|
1572
|
+
get ctrl() {
|
|
1573
|
+
return w();
|
|
1574
|
+
},
|
|
1575
|
+
get messages() {
|
|
1576
|
+
return m(T);
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
};
|
|
1580
|
+
i(Qt, (e) => {
|
|
1581
|
+
m(F) || e($t);
|
|
1582
|
+
}), D(Ot);
|
|
1583
|
+
var en = _(Ot, 2), tn = M(en), nn = (e) => {
|
|
1584
|
+
var t = St(), n = M(t);
|
|
1585
|
+
{
|
|
1586
|
+
let e = S(() => m(O)?.zoom ?? !1), t = S(() => m(O)?.rangePresets), r = S(() => m(O)?.syncGroup), i = S(() => m(O)?.contextMenu), a = S(() => m(O)?.animate), o = S(() => m(O)?.localeText), s = S(() => m(O)?.export === !0 || void 0);
|
|
1587
|
+
me(n, {
|
|
1588
|
+
get spec() {
|
|
1589
|
+
return m(z);
|
|
1590
|
+
},
|
|
1591
|
+
get indicators() {
|
|
1592
|
+
return w().chartIndicatorPanes;
|
|
1593
|
+
},
|
|
1594
|
+
onSelect: Te,
|
|
1595
|
+
interactive: !0,
|
|
1596
|
+
legend: !1,
|
|
1597
|
+
get zoomable() {
|
|
1598
|
+
return m(e);
|
|
1599
|
+
},
|
|
1600
|
+
get rangePresets() {
|
|
1601
|
+
return m(t);
|
|
1602
|
+
},
|
|
1603
|
+
get syncGroup() {
|
|
1604
|
+
return m(r);
|
|
1605
|
+
},
|
|
1606
|
+
get contextMenu() {
|
|
1607
|
+
return m(i);
|
|
1608
|
+
},
|
|
1609
|
+
get animate() {
|
|
1610
|
+
return m(a);
|
|
1611
|
+
},
|
|
1612
|
+
get localeText() {
|
|
1613
|
+
return m(o);
|
|
1614
|
+
},
|
|
1615
|
+
get crosshairLabels() {
|
|
1616
|
+
return m(ne);
|
|
1617
|
+
},
|
|
1618
|
+
get toolbar() {
|
|
1619
|
+
return m(s);
|
|
1620
|
+
},
|
|
1621
|
+
get zoom() {
|
|
1622
|
+
return w().chartZoom;
|
|
1623
|
+
},
|
|
1624
|
+
set zoom(e) {
|
|
1625
|
+
w().chartZoom = e;
|
|
1626
|
+
}
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
D(t), k(e, t);
|
|
1630
|
+
}, rn = (e) => {
|
|
1631
|
+
{
|
|
1632
|
+
let t = S(() => m(O)?.zoom ?? !1), n = S(() => m(O)?.brush === !0), r = S(() => m(O)?.rangePresets), i = S(() => m(O)?.syncGroup), a = S(() => m(O)?.contextMenu), o = S(() => m(O)?.animate), s = S(() => m(O)?.localeText), c = S(() => m(O)?.export === !0 || void 0);
|
|
1633
|
+
de(e, {
|
|
1634
|
+
get spec() {
|
|
1635
|
+
return m(z);
|
|
1636
|
+
},
|
|
1637
|
+
autosize: !0,
|
|
1638
|
+
onSelect: Te,
|
|
1639
|
+
interactive: !0,
|
|
1640
|
+
get legend() {
|
|
1641
|
+
return m(te);
|
|
1642
|
+
},
|
|
1643
|
+
get dataLabels() {
|
|
1644
|
+
return m(j);
|
|
1645
|
+
},
|
|
1646
|
+
get zoomable() {
|
|
1647
|
+
return m(t);
|
|
1648
|
+
},
|
|
1649
|
+
get brush() {
|
|
1650
|
+
return m(n);
|
|
1651
|
+
},
|
|
1652
|
+
get rangePresets() {
|
|
1653
|
+
return m(r);
|
|
1654
|
+
},
|
|
1655
|
+
get syncGroup() {
|
|
1656
|
+
return m(i);
|
|
1657
|
+
},
|
|
1658
|
+
get contextMenu() {
|
|
1659
|
+
return m(a);
|
|
1660
|
+
},
|
|
1661
|
+
get animate() {
|
|
1662
|
+
return m(o);
|
|
1663
|
+
},
|
|
1664
|
+
get localeText() {
|
|
1665
|
+
return m(s);
|
|
1666
|
+
},
|
|
1667
|
+
get crosshairLabels() {
|
|
1668
|
+
return m(ne);
|
|
1669
|
+
},
|
|
1670
|
+
get toolbar() {
|
|
1671
|
+
return m(c);
|
|
1672
|
+
},
|
|
1673
|
+
get zoom() {
|
|
1674
|
+
return w().chartZoom;
|
|
1675
|
+
},
|
|
1676
|
+
set zoom(e) {
|
|
1677
|
+
w().chartZoom = e;
|
|
1678
|
+
}
|
|
1679
|
+
});
|
|
1680
|
+
}
|
|
1681
|
+
}, an = (e) => {
|
|
1682
|
+
var t = Ct(), n = M(t), r = (e) => {
|
|
1683
|
+
var t = f();
|
|
1684
|
+
o(() => d(t, m(T).chartEmptyColumns)), k(e, t);
|
|
1685
|
+
}, a = (e) => {
|
|
1686
|
+
var t = f();
|
|
1687
|
+
o(() => d(t, m(T).chartEmptyData)), k(e, t);
|
|
1688
|
+
};
|
|
1689
|
+
i(n, (e) => {
|
|
1690
|
+
!m(pe).dims.length || !m(pe).measures.length ? e(r) : e(a, -1);
|
|
1691
|
+
}), D(t), k(e, t);
|
|
1692
|
+
};
|
|
1693
|
+
i(tn, (e) => {
|
|
1694
|
+
m(z) && w().chartIndicatorPanes.length && m(z).series[0]?.ohlc ? e(nn) : m(z) && (m(z).series.length || m(z).gaugeValue != null || m(F)) ? e(rn, 1) : e(an, -1);
|
|
1695
|
+
}), D(en), b(en, (e) => v(Ee, e), () => m(Ee));
|
|
1696
|
+
var on = _(en, 2), sn = (e) => {
|
|
1697
|
+
var t = n(), i = c(t);
|
|
1698
|
+
r(i, () => m(a), (e, t) => {
|
|
1699
|
+
t(e, {
|
|
1700
|
+
get ctrl() {
|
|
1701
|
+
return w();
|
|
1702
|
+
},
|
|
1703
|
+
get types() {
|
|
1704
|
+
return m(we);
|
|
1705
|
+
},
|
|
1706
|
+
get messages() {
|
|
1707
|
+
return m(T);
|
|
1708
|
+
},
|
|
1709
|
+
get open() {
|
|
1710
|
+
return m(u);
|
|
1711
|
+
},
|
|
1712
|
+
set open(e) {
|
|
1713
|
+
v(u, e, !0);
|
|
1714
|
+
}
|
|
1715
|
+
});
|
|
1716
|
+
}), k(e, t);
|
|
1717
|
+
};
|
|
1718
|
+
i(on, (e) => {
|
|
1719
|
+
m(a) && e(sn);
|
|
1720
|
+
});
|
|
1721
|
+
var cn = _(on, 2), ln = (e) => {
|
|
1722
|
+
var t = wt();
|
|
1723
|
+
o(() => C(t, "aria-label", m(T).chartResizeWindow)), s("pointerdown", t, Se), k(e, t);
|
|
1724
|
+
};
|
|
1725
|
+
i(cn, (e) => {
|
|
1726
|
+
m(V) && !m(H) && e(ln);
|
|
1727
|
+
}), D(Y), b(Y, (e) => v(ge, e), () => m(ge)), o(() => {
|
|
1728
|
+
Ze = P(Y, 1, "sv-grid-chart-panel", null, Ze, {
|
|
1729
|
+
"is-right": m(I) === "right" && !m(V),
|
|
1730
|
+
"is-bottom": m(I) === "bottom" && !m(V),
|
|
1731
|
+
"is-floating": m(V),
|
|
1732
|
+
"is-maximized": m(V) && m(H)
|
|
1733
|
+
}), ae(Y, m(Ce)), C(Y, "aria-label", m(T).chartPanelTitle), kt = P(Z, 1, "sv-grid-chart-drawer-title", null, kt, { "is-drag-handle": m(V) && !m(H) }), d(Q, m(T).chartPanelTitle), C($, "aria-label", m(T).chartExportLabel), C($, "title", m(T).chartExport), C($, "aria-expanded", m(W)), C(qt, "aria-label", m(T).chartClose);
|
|
1734
|
+
}), s("pointerdown", Z, xe), s("click", $, () => v(W, !m(W))), s("click", qt, () => w().chartPanelOpen = !1), h(3, Y, () => R, () => ({
|
|
1735
|
+
x: !m(V) && m(I) === "right" ? m(B) : 0,
|
|
1736
|
+
y: !m(V) && m(I) === "bottom" ? m(B) : 0,
|
|
1737
|
+
duration: 180,
|
|
1738
|
+
easing: fe
|
|
1739
|
+
})), k(e, Y), ie();
|
|
1740
|
+
}
|
|
1741
|
+
a(["pointerdown", "click"]);
|
|
1742
|
+
//#endregion
|
|
1743
|
+
export { Et as default, Xe as n, $e as t };
|