@marimo-team/islands 0.25.1-dev43 → 0.25.1-dev45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-CwMXfDQR.js → ConnectedDataExplorerComponent-C2d9ysUI.js} +5 -6
- package/dist/{ErrorBoundary-DdIeNEwv.js → ErrorBoundary-pBYdeBnS.js} +1 -1
- package/dist/{chat-ui-DLSF8a04.js → chat-ui-fVyVOhYN.js} +4 -4
- package/dist/{code-visibility-Y9eq-gxh.js → code-visibility-BtQ8kX30.js} +1 -1
- package/dist/{common-Gq6IVrpO.js → common-CT8H5t1V.js} +6722 -6426
- package/dist/{data-grid-overlay-editor-DVXL-zNG.js → data-grid-overlay-editor-BLIYSMps.js} +1 -1
- package/dist/{dropdown-menu-CZgjYSAh.js → dropdown-menu-CZy06LAq.js} +12 -12
- package/dist/{feedback-button-BpOwMFBW.js → feedback-button-Oixw7nP7.js} +2 -2
- package/dist/{glide-data-editor-BuCHH3vV.js → glide-data-editor-u2Z6Gofm.js} +5 -5
- package/dist/{globals-CVcdPJxP.js → globals-JfO03feH.js} +1 -1
- package/dist/{html-to-image-CGVgroef.js → html-to-image-CmkwfNkf.js} +1 -1
- package/dist/{useNumberFormatter-BfDpa21j.js → label-BslhXqL6.js} +108 -81
- package/dist/main.js +60 -54
- package/dist/{number-overlay-editor-DWKHP3YG.js → number-overlay-editor-Da3rqdsN.js} +1 -1
- package/dist/{process-output-CGfg-JmZ.js → process-output-CYN5E-iO.js} +1 -1
- package/dist/{reveal-component-Z9PfGTO0.js → reveal-component-DvSplL6e.js} +3 -3
- package/dist/{spec-CAYwFeV6.js → spec-DQBRQSba.js} +123 -102
- package/dist/style.css +1 -1
- package/dist/{useDateFormatter-BRTPsUK7.js → useDateFormatter-BXQGu86d.js} +28 -49
- package/package.json +1 -1
- package/src/components/data-table/TableTopBar.tsx +2 -2
- package/src/components/data-table/__tests__/export-actions.test.tsx +662 -0
- package/src/components/data-table/data-table.tsx +1 -1
- package/src/components/data-table/export-actions.tsx +642 -176
- package/src/components/data-table/schemas.ts +25 -3
- package/dist/label-BJ49YTvk.js +0 -30
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { g as e } from "./tooltip-qB8NlSqV.js";
|
|
2
2
|
import { s as t } from "./useLifecycle-DPgiiwwU.js";
|
|
3
|
-
import {
|
|
4
|
-
import { C as
|
|
5
|
-
var
|
|
3
|
+
import { a as n } from "./useDateFormatter-BXQGu86d.js";
|
|
4
|
+
import { C as r } from "./select-C6plhmZr.js";
|
|
5
|
+
var i = e("align-center-vertical", [
|
|
6
6
|
["path", {
|
|
7
7
|
d: "M12 2v20",
|
|
8
8
|
key: "t6zp3m"
|
|
@@ -23,7 +23,7 @@ var a = e("align-center-vertical", [
|
|
|
23
23
|
d: "M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",
|
|
24
24
|
key: "1euafb"
|
|
25
25
|
}]
|
|
26
|
-
]),
|
|
26
|
+
]), a = e("arrow-down-to-line", [
|
|
27
27
|
["path", {
|
|
28
28
|
d: "M12 17V3",
|
|
29
29
|
key: "1cwfxf"
|
|
@@ -36,7 +36,7 @@ var a = e("align-center-vertical", [
|
|
|
36
36
|
d: "M19 21H5",
|
|
37
37
|
key: "150jfl"
|
|
38
38
|
}]
|
|
39
|
-
]),
|
|
39
|
+
]), o = e("arrow-up-to-line", [
|
|
40
40
|
["path", {
|
|
41
41
|
d: "M5 3h14",
|
|
42
42
|
key: "7usisc"
|
|
@@ -49,7 +49,7 @@ var a = e("align-center-vertical", [
|
|
|
49
49
|
d: "M12 7v14",
|
|
50
50
|
key: "1akyts"
|
|
51
51
|
}]
|
|
52
|
-
]),
|
|
52
|
+
]), s = e("baseline", [
|
|
53
53
|
["path", {
|
|
54
54
|
d: "M4 20h16",
|
|
55
55
|
key: "14thso"
|
|
@@ -62,13 +62,13 @@ var a = e("align-center-vertical", [
|
|
|
62
62
|
d: "M8 12h8",
|
|
63
63
|
key: "1wcyev"
|
|
64
64
|
}]
|
|
65
|
-
]),
|
|
65
|
+
]), c = e("chart-area", [["path", {
|
|
66
66
|
d: "M3 3v16a2 2 0 0 0 2 2h16",
|
|
67
67
|
key: "c24i48"
|
|
68
68
|
}], ["path", {
|
|
69
69
|
d: "M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",
|
|
70
70
|
key: "q0gr47"
|
|
71
|
-
}]]),
|
|
71
|
+
}]]), l = e("chart-column", [
|
|
72
72
|
["path", {
|
|
73
73
|
d: "M3 3v16a2 2 0 0 0 2 2h16",
|
|
74
74
|
key: "c24i48"
|
|
@@ -85,13 +85,13 @@ var a = e("align-center-vertical", [
|
|
|
85
85
|
d: "M8 17v-3",
|
|
86
86
|
key: "17ska0"
|
|
87
87
|
}]
|
|
88
|
-
]),
|
|
88
|
+
]), u = e("chart-line", [["path", {
|
|
89
89
|
d: "M3 3v16a2 2 0 0 0 2 2h16",
|
|
90
90
|
key: "c24i48"
|
|
91
91
|
}], ["path", {
|
|
92
92
|
d: "m19 9-5 5-4-4-3 3",
|
|
93
93
|
key: "2osh9i"
|
|
94
|
-
}]]),
|
|
94
|
+
}]]), d = e("chart-no-axes-column-increasing", [
|
|
95
95
|
["path", {
|
|
96
96
|
d: "M5 21v-6",
|
|
97
97
|
key: "1hz6c0"
|
|
@@ -104,7 +104,7 @@ var a = e("align-center-vertical", [
|
|
|
104
104
|
d: "M19 21V3",
|
|
105
105
|
key: "11j9sm"
|
|
106
106
|
}]
|
|
107
|
-
]),
|
|
107
|
+
]), f = e("chart-no-axes-column", [
|
|
108
108
|
["path", {
|
|
109
109
|
d: "M5 21v-6",
|
|
110
110
|
key: "1hz6c0"
|
|
@@ -117,7 +117,7 @@ var a = e("align-center-vertical", [
|
|
|
117
117
|
d: "M19 21V9",
|
|
118
118
|
key: "unv183"
|
|
119
119
|
}]
|
|
120
|
-
]),
|
|
120
|
+
]), p = e("chart-scatter", [
|
|
121
121
|
["circle", {
|
|
122
122
|
cx: "7.5",
|
|
123
123
|
cy: "7.5",
|
|
@@ -157,7 +157,7 @@ var a = e("align-center-vertical", [
|
|
|
157
157
|
d: "M3 3v16a2 2 0 0 0 2 2h16",
|
|
158
158
|
key: "c24i48"
|
|
159
159
|
}]
|
|
160
|
-
]),
|
|
160
|
+
]), m = e("ruler-dimension-line", [
|
|
161
161
|
["path", {
|
|
162
162
|
d: "M10 15v-3",
|
|
163
163
|
key: "1pjskw"
|
|
@@ -194,10 +194,10 @@ var a = e("align-center-vertical", [
|
|
|
194
194
|
rx: "2",
|
|
195
195
|
key: "1tqiko"
|
|
196
196
|
}]
|
|
197
|
-
]),
|
|
197
|
+
]), h = e("sigma", [["path", {
|
|
198
198
|
d: "M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",
|
|
199
199
|
key: "wuwx1p"
|
|
200
|
-
}]]),
|
|
200
|
+
}]]), g = e("square-function", [
|
|
201
201
|
["rect", {
|
|
202
202
|
width: "18",
|
|
203
203
|
height: "18",
|
|
@@ -215,6 +215,27 @@ var a = e("align-center-vertical", [
|
|
|
215
215
|
d: "M9 11.2h5.7",
|
|
216
216
|
key: "3zgcl2"
|
|
217
217
|
}]
|
|
218
|
+
]), _ = e("table", [
|
|
219
|
+
["path", {
|
|
220
|
+
d: "M12 3v18",
|
|
221
|
+
key: "108xh3"
|
|
222
|
+
}],
|
|
223
|
+
["rect", {
|
|
224
|
+
width: "18",
|
|
225
|
+
height: "18",
|
|
226
|
+
x: "3",
|
|
227
|
+
y: "3",
|
|
228
|
+
rx: "2",
|
|
229
|
+
key: "afitv7"
|
|
230
|
+
}],
|
|
231
|
+
["path", {
|
|
232
|
+
d: "M3 9h18",
|
|
233
|
+
key: "1pudct"
|
|
234
|
+
}],
|
|
235
|
+
["path", {
|
|
236
|
+
d: "M3 15h18",
|
|
237
|
+
key: "5xshup"
|
|
238
|
+
}]
|
|
218
239
|
]);
|
|
219
240
|
//#endregion
|
|
220
241
|
//#region src/components/data-table/charts/chart-spec/utils.ts
|
|
@@ -223,29 +244,29 @@ function v(e) {
|
|
|
223
244
|
}
|
|
224
245
|
//#endregion
|
|
225
246
|
//#region src/components/data-table/charts/constants.ts
|
|
226
|
-
var y = "__count__", b = "default",
|
|
227
|
-
line:
|
|
228
|
-
bar:
|
|
229
|
-
pie:
|
|
230
|
-
scatter:
|
|
231
|
-
heatmap:
|
|
232
|
-
area:
|
|
233
|
-
}, S = "mean",
|
|
234
|
-
none:
|
|
247
|
+
var y = "__count__", b = "default", ee = "yearmonthdate", x = {
|
|
248
|
+
line: u,
|
|
249
|
+
bar: d,
|
|
250
|
+
pie: n,
|
|
251
|
+
scatter: p,
|
|
252
|
+
heatmap: _,
|
|
253
|
+
area: c
|
|
254
|
+
}, S = "mean", te = {
|
|
255
|
+
none: g,
|
|
235
256
|
count: t,
|
|
236
|
-
sum:
|
|
237
|
-
mean:
|
|
238
|
-
median:
|
|
239
|
-
min:
|
|
240
|
-
max:
|
|
257
|
+
sum: h,
|
|
258
|
+
mean: s,
|
|
259
|
+
median: i,
|
|
260
|
+
min: a,
|
|
261
|
+
max: o,
|
|
241
262
|
distinct: t,
|
|
242
263
|
valid: t,
|
|
243
|
-
stdev:
|
|
244
|
-
stdevp:
|
|
245
|
-
variance:
|
|
246
|
-
variancep:
|
|
247
|
-
bin:
|
|
248
|
-
},
|
|
264
|
+
stdev: f,
|
|
265
|
+
stdevp: f,
|
|
266
|
+
variance: l,
|
|
267
|
+
variancep: l,
|
|
268
|
+
bin: m
|
|
269
|
+
}, ne = {
|
|
249
270
|
none: "No aggregation",
|
|
250
271
|
count: "Count of records",
|
|
251
272
|
sum: "Sum of values",
|
|
@@ -260,7 +281,7 @@ var y = "__count__", b = "default", x = "yearmonthdate", ee = {
|
|
|
260
281
|
variance: "Variance",
|
|
261
282
|
variancep: "Variance of population",
|
|
262
283
|
bin: "Group values into bins"
|
|
263
|
-
},
|
|
284
|
+
}, re = [
|
|
264
285
|
b,
|
|
265
286
|
"accent",
|
|
266
287
|
"category10",
|
|
@@ -306,11 +327,11 @@ var y = "__count__", b = "default", x = "yearmonthdate", ee = {
|
|
|
306
327
|
"spectral",
|
|
307
328
|
"rainbow",
|
|
308
329
|
"sinebow"
|
|
309
|
-
],
|
|
330
|
+
], C = {
|
|
310
331
|
number: "Continuous numerical scale",
|
|
311
332
|
string: "Discrete categorical scale (inputs treated as strings)",
|
|
312
333
|
temporal: "Continuous temporal scale"
|
|
313
|
-
},
|
|
334
|
+
}, w = {
|
|
314
335
|
year: ["Year", "2025"],
|
|
315
336
|
quarter: ["Quarter", "Q1 2025"],
|
|
316
337
|
month: ["Month", "Jan 2025"],
|
|
@@ -325,11 +346,11 @@ var y = "__count__", b = "default", x = "yearmonthdate", ee = {
|
|
|
325
346
|
yearmonth: ["Year Month", "Jan 2025"],
|
|
326
347
|
yearmonthdate: ["Year Month Date", "Jan 01, 2025"],
|
|
327
348
|
monthdate: ["Month Date", "Jan 01"]
|
|
328
|
-
},
|
|
349
|
+
}, T = [
|
|
329
350
|
"number",
|
|
330
351
|
"string",
|
|
331
352
|
"temporal"
|
|
332
|
-
],
|
|
353
|
+
], E = [
|
|
333
354
|
"year",
|
|
334
355
|
"quarter",
|
|
335
356
|
"month",
|
|
@@ -341,14 +362,14 @@ var y = "__count__", b = "default", x = "yearmonthdate", ee = {
|
|
|
341
362
|
"minutes",
|
|
342
363
|
"seconds",
|
|
343
364
|
"milliseconds"
|
|
344
|
-
],
|
|
365
|
+
], D = [
|
|
345
366
|
"yearmonth",
|
|
346
367
|
"yearmonthdate",
|
|
347
368
|
"monthdate"
|
|
348
|
-
],
|
|
349
|
-
[...
|
|
350
|
-
var
|
|
351
|
-
|
|
369
|
+
], O = [...E, ...D];
|
|
370
|
+
[...O];
|
|
371
|
+
var k = ["ascending", "descending"], A = "none", j = [
|
|
372
|
+
A,
|
|
352
373
|
"bin",
|
|
353
374
|
"count",
|
|
354
375
|
"sum",
|
|
@@ -362,27 +383,27 @@ var O = ["ascending", "descending"], k = "none", A = [
|
|
|
362
383
|
"stdevp",
|
|
363
384
|
"variance",
|
|
364
385
|
"variancep"
|
|
365
|
-
],
|
|
366
|
-
|
|
386
|
+
], M = [
|
|
387
|
+
A,
|
|
367
388
|
"count",
|
|
368
389
|
"distinct",
|
|
369
390
|
"valid"
|
|
370
|
-
],
|
|
391
|
+
], N = {
|
|
371
392
|
LINE: "line",
|
|
372
393
|
BAR: "bar",
|
|
373
394
|
PIE: "pie",
|
|
374
395
|
SCATTER: "scatter",
|
|
375
396
|
HEATMAP: "heatmap",
|
|
376
397
|
AREA: "area"
|
|
377
|
-
},
|
|
398
|
+
}, P = Object.values(N), ie = [
|
|
378
399
|
"X",
|
|
379
400
|
"Y",
|
|
380
401
|
"Color",
|
|
381
|
-
|
|
402
|
+
A
|
|
382
403
|
];
|
|
383
404
|
//#endregion
|
|
384
405
|
//#region src/components/data-table/charts/chart-spec/types.ts
|
|
385
|
-
function
|
|
406
|
+
function F(e) {
|
|
386
407
|
switch (e) {
|
|
387
408
|
case "number":
|
|
388
409
|
case "integer": return "quantitative";
|
|
@@ -394,10 +415,10 @@ function P(e) {
|
|
|
394
415
|
case "datetime":
|
|
395
416
|
case "time":
|
|
396
417
|
case "temporal": return "temporal";
|
|
397
|
-
default: return
|
|
418
|
+
default: return r(e), "nominal";
|
|
398
419
|
}
|
|
399
420
|
}
|
|
400
|
-
function
|
|
421
|
+
function I(e) {
|
|
401
422
|
switch (e) {
|
|
402
423
|
case "number":
|
|
403
424
|
case "integer": return "number";
|
|
@@ -408,34 +429,34 @@ function F(e) {
|
|
|
408
429
|
case "date":
|
|
409
430
|
case "datetime":
|
|
410
431
|
case "time": return "temporal";
|
|
411
|
-
default: return
|
|
432
|
+
default: return r(e), "string";
|
|
412
433
|
}
|
|
413
434
|
}
|
|
414
|
-
function
|
|
435
|
+
function L(e) {
|
|
415
436
|
switch (e) {
|
|
416
|
-
case
|
|
417
|
-
case
|
|
418
|
-
case
|
|
437
|
+
case N.PIE: return "arc";
|
|
438
|
+
case N.SCATTER: return "point";
|
|
439
|
+
case N.HEATMAP: return "rect";
|
|
419
440
|
default: return e;
|
|
420
441
|
}
|
|
421
442
|
}
|
|
422
443
|
//#endregion
|
|
423
444
|
//#region src/components/data-table/charts/chart-spec/encodings.ts
|
|
424
|
-
function
|
|
425
|
-
if (e ===
|
|
445
|
+
function R(e, t, n, r) {
|
|
446
|
+
if (e === N.HEATMAP) return n?.maxbins ? { maxbins: n?.maxbins } : void 0;
|
|
426
447
|
if (t !== "number") return;
|
|
427
448
|
if (!n?.binned) return r;
|
|
428
449
|
let i = {};
|
|
429
450
|
return n.step !== void 0 && (i.step = n.step), n.maxbins !== void 0 && (i.maxbins = n.maxbins), Object.keys(i).length === 0 || i;
|
|
430
451
|
}
|
|
431
|
-
function
|
|
452
|
+
function z(e) {
|
|
432
453
|
let t = e.color?.range;
|
|
433
454
|
if (t?.length) return { range: t };
|
|
434
455
|
let n = e.color?.scheme;
|
|
435
456
|
if (n && n !== "default") return { scheme: n };
|
|
436
457
|
}
|
|
437
|
-
function
|
|
438
|
-
if (e ===
|
|
458
|
+
function B(e, t) {
|
|
459
|
+
if (e === N.PIE) return;
|
|
439
460
|
let n;
|
|
440
461
|
if (Q(t.general?.colorByColumn?.field)) n = t.general?.colorByColumn;
|
|
441
462
|
else if (Q(t.color?.field)) switch (t.color?.field) {
|
|
@@ -459,28 +480,28 @@ function z(e, t) {
|
|
|
459
480
|
let r = t.color?.bin, i = n.selectedDataType || "string", a = n?.aggregate;
|
|
460
481
|
return {
|
|
461
482
|
field: v(n.field),
|
|
462
|
-
type:
|
|
463
|
-
scale:
|
|
464
|
-
aggregate:
|
|
465
|
-
bin:
|
|
483
|
+
type: F(i),
|
|
484
|
+
scale: z(t),
|
|
485
|
+
aggregate: H(a, i),
|
|
486
|
+
bin: R(e, i, r)
|
|
466
487
|
};
|
|
467
488
|
}
|
|
468
|
-
function
|
|
469
|
-
if (!(t.general?.stacking || !Q(t.general?.colorByColumn?.field) || e !==
|
|
489
|
+
function V(e, t) {
|
|
490
|
+
if (!(t.general?.stacking || !Q(t.general?.colorByColumn?.field) || e !== N.BAR)) return { field: v(t.general?.colorByColumn?.field) };
|
|
470
491
|
}
|
|
471
|
-
function
|
|
472
|
-
if (t !== "temporal" && e !== "none" && e !== "bin") return e ? t === "string" ?
|
|
492
|
+
function H(e, t, n) {
|
|
493
|
+
if (t !== "temporal" && e !== "none" && e !== "bin") return e ? t === "string" ? M.includes(e) ? e : void 0 : e : n || void 0;
|
|
473
494
|
}
|
|
474
495
|
//#endregion
|
|
475
496
|
//#region src/components/data-table/charts/chart-spec/tooltips.ts
|
|
476
|
-
function
|
|
497
|
+
function U(e) {
|
|
477
498
|
switch (e) {
|
|
478
499
|
case "integer": return ",.0f";
|
|
479
500
|
case "number": return ",.2f";
|
|
480
501
|
default: return;
|
|
481
502
|
}
|
|
482
503
|
}
|
|
483
|
-
function
|
|
504
|
+
function W(e) {
|
|
484
505
|
let { formValues: t, xEncoding: n, yEncoding: r, colorByEncoding: i } = e;
|
|
485
506
|
if (!t.tooltips) return;
|
|
486
507
|
function a(e, t, n) {
|
|
@@ -489,7 +510,7 @@ function U(e) {
|
|
|
489
510
|
field: e.field,
|
|
490
511
|
aggregate: e.aggregate,
|
|
491
512
|
timeUnit: e.timeUnit,
|
|
492
|
-
format:
|
|
513
|
+
format: U(t),
|
|
493
514
|
title: n,
|
|
494
515
|
bin: e.bin
|
|
495
516
|
};
|
|
@@ -526,20 +547,20 @@ function U(e) {
|
|
|
526
547
|
}
|
|
527
548
|
//#endregion
|
|
528
549
|
//#region src/components/data-table/charts/chart-spec/spec.ts
|
|
529
|
-
var
|
|
530
|
-
function
|
|
550
|
+
var G = "X-axis column is required", K = "Y-axis column is required";
|
|
551
|
+
function q(e, t, n, r, i) {
|
|
531
552
|
let { xColumn: a, yColumn: o, colorByColumn: s, horizontal: c, stacking: l, title: u, facet: d } = t.general ?? {};
|
|
532
|
-
if (e ===
|
|
533
|
-
if (!Q(a?.field)) return
|
|
534
|
-
if (!Q(o?.field)) return
|
|
535
|
-
let f =
|
|
553
|
+
if (e === N.PIE) return ae(t, n, r, i);
|
|
554
|
+
if (!Q(a?.field)) return G;
|
|
555
|
+
if (!Q(o?.field)) return K;
|
|
556
|
+
let f = Y(a, t.xAxis?.bin, $(t.xAxis?.label), s?.field && c ? l : void 0, e), p = S;
|
|
536
557
|
o?.selectedDataType === "string" && (p = "count");
|
|
537
|
-
let m =
|
|
558
|
+
let m = Y(o, t.yAxis?.bin, $(t.yAxis?.label), s?.field && !c ? l : void 0, e, p), h = d?.row.field ? X(d.row, e) : void 0, g = d?.column.field ? X(d.column, e) : void 0, _ = B(e, t), v = Z(e, t, n, r, i, u), y = {
|
|
538
559
|
x: c ? m : f,
|
|
539
560
|
y: c ? f : m,
|
|
540
|
-
xOffset:
|
|
561
|
+
xOffset: V(e, t),
|
|
541
562
|
color: _,
|
|
542
|
-
tooltip:
|
|
563
|
+
tooltip: W({
|
|
543
564
|
formValues: t,
|
|
544
565
|
xEncoding: f,
|
|
545
566
|
yEncoding: m,
|
|
@@ -550,38 +571,38 @@ function K(e, t, n, r, i) {
|
|
|
550
571
|
}, b = ce(d?.column, d?.row);
|
|
551
572
|
return {
|
|
552
573
|
...v,
|
|
553
|
-
mark: { type:
|
|
574
|
+
mark: { type: L(e) },
|
|
554
575
|
encoding: y,
|
|
555
576
|
...b
|
|
556
577
|
};
|
|
557
578
|
}
|
|
558
|
-
function
|
|
579
|
+
function J(e, t) {
|
|
559
580
|
return {
|
|
560
581
|
...e,
|
|
561
582
|
data: { values: t }
|
|
562
583
|
};
|
|
563
584
|
}
|
|
564
|
-
function
|
|
585
|
+
function Y(e, t, n, r, i, a) {
|
|
565
586
|
let o = e.selectedDataType || "string";
|
|
566
587
|
return e.field === "__count__" ? {
|
|
567
588
|
aggregate: "count",
|
|
568
589
|
type: "quantitative",
|
|
569
|
-
bin:
|
|
590
|
+
bin: R(i, o, t),
|
|
570
591
|
title: n === "__count__" ? void 0 : n,
|
|
571
592
|
stack: r
|
|
572
593
|
} : {
|
|
573
594
|
field: v(e.field),
|
|
574
|
-
type:
|
|
575
|
-
bin:
|
|
595
|
+
type: F(e.selectedDataType || "unknown"),
|
|
596
|
+
bin: R(i, o, t),
|
|
576
597
|
title: n,
|
|
577
598
|
stack: r,
|
|
578
|
-
aggregate:
|
|
599
|
+
aggregate: H(e.aggregate, o, a),
|
|
579
600
|
sort: e.sort,
|
|
580
601
|
timeUnit: oe(e)
|
|
581
602
|
};
|
|
582
603
|
}
|
|
583
|
-
function
|
|
584
|
-
let n =
|
|
604
|
+
function X(e, t) {
|
|
605
|
+
let n = R(t, e.selectedDataType || "string", {
|
|
585
606
|
maxbins: e.maxbins,
|
|
586
607
|
binned: e.binned
|
|
587
608
|
}, { maxbins: 6 });
|
|
@@ -589,30 +610,30 @@ function Y(e, t) {
|
|
|
589
610
|
field: v(e.field),
|
|
590
611
|
sort: e.sort,
|
|
591
612
|
timeUnit: se(e),
|
|
592
|
-
type:
|
|
613
|
+
type: F(e.selectedDataType || "unknown"),
|
|
593
614
|
bin: n
|
|
594
615
|
};
|
|
595
616
|
}
|
|
596
|
-
function
|
|
617
|
+
function ae(e, t, n, r) {
|
|
597
618
|
let { yColumn: i, colorByColumn: a, title: o } = e.general ?? {};
|
|
598
619
|
if (!Q(a?.field)) return "Color by column is required";
|
|
599
620
|
if (!Q(i?.field)) return "Size by column is required";
|
|
600
|
-
let s =
|
|
621
|
+
let s = Y(i, e.xAxis?.bin, $(e.xAxis?.label), void 0, N.PIE), c = {
|
|
601
622
|
field: v(a.field),
|
|
602
|
-
type:
|
|
603
|
-
scale:
|
|
623
|
+
type: F(a.selectedDataType || "unknown"),
|
|
624
|
+
scale: z(e),
|
|
604
625
|
title: $(e.yAxis?.label)
|
|
605
626
|
};
|
|
606
627
|
return {
|
|
607
|
-
...Z(
|
|
628
|
+
...Z(N.PIE, e, t, n, r, o),
|
|
608
629
|
mark: {
|
|
609
|
-
type:
|
|
630
|
+
type: L(N.PIE),
|
|
610
631
|
innerRadius: e.style?.innerRadius
|
|
611
632
|
},
|
|
612
633
|
encoding: {
|
|
613
634
|
theta: s,
|
|
614
635
|
color: c,
|
|
615
|
-
tooltip:
|
|
636
|
+
tooltip: W({
|
|
616
637
|
formValues: e,
|
|
617
638
|
xEncoding: s,
|
|
618
639
|
yEncoding: s,
|
|
@@ -623,7 +644,7 @@ function X(e, t, n, r) {
|
|
|
623
644
|
}
|
|
624
645
|
function Z(e, t, n, r, i, a) {
|
|
625
646
|
let o = t.style?.gridLines ?? !1;
|
|
626
|
-
return e ===
|
|
647
|
+
return e === N.SCATTER && (o = !0), {
|
|
627
648
|
$schema: "https://vega.github.io/schema/vega-lite/v6.json",
|
|
628
649
|
background: n === "dark" ? "dark" : "white",
|
|
629
650
|
title: a,
|
|
@@ -651,4 +672,4 @@ function ce(e, t) {
|
|
|
651
672
|
return e?.linkXAxis === !1 && (n.x = "independent"), t?.linkYAxis === !1 && (n.y = "independent"), Object.keys(n).length > 0 ? { resolve: { axis: n } } : void 0;
|
|
652
673
|
}
|
|
653
674
|
//#endregion
|
|
654
|
-
export {
|
|
675
|
+
export { ee as C, g as D, v as E, l as O, b as S, w as T, te as _, j as a, y as b, D as c, T as d, E as f, ne as g, O as h, I as i, N as l, M as m, q as n, P as o, k as p, Q as r, ie as s, J as t, A as u, x as v, C as w, S as x, re as y };
|