@marimo-team/islands 0.26.1-dev47 → 0.26.1-dev48
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/{ErrorBoundary-DdY0kgXv.js → ErrorBoundary-uU7o1PeJ.js} +1 -1
- package/dist/{code-visibility-CsDfs1e1.js → code-visibility-C18rxvVq.js} +1 -1
- package/dist/{common-BEzP29zn.js → common-B8iC72ed.js} +89 -34
- package/dist/{data-grid-overlay-editor-gJb9MZVF.js → data-grid-overlay-editor-BvBZ8bVF.js} +1 -1
- package/dist/{feedback-button-BAOFQTkH.js → feedback-button-CARoMOjw.js} +2 -2
- package/dist/{glide-data-editor-BknFgsDc.js → glide-data-editor-Bk1B4gCx.js} +3 -3
- package/dist/{globals-95am9BSj.js → globals-DZHyDz_N.js} +1 -1
- package/dist/main.js +7 -6
- package/dist/{number-overlay-editor-BjVZ4TjB.js → number-overlay-editor-D3SvrEmR.js} +1 -1
- package/dist/{reveal-component-We7t_Fnt.js → reveal-component-CFMbs41f.js} +2 -2
- package/package.json +1 -1
- package/src/components/data-table/__tests__/export-actions.test.tsx +79 -0
- package/src/components/data-table/export-actions.tsx +64 -19
- package/src/components/data-table/schemas.ts +1 -0
|
@@ -148,7 +148,7 @@ function L(e) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
151
|
-
var R = (0, T.lazy)(() => import("./feedback-button-
|
|
151
|
+
var R = (0, T.lazy)(() => import("./feedback-button-CARoMOjw.js").then((e) => ({ default: e.FeedbackModal }))), z = (e) => {
|
|
152
152
|
let t = (0, w.c)(2), n;
|
|
153
153
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, N.jsx)(O, {
|
|
154
154
|
FallbackComponent: B,
|
|
@@ -14,7 +14,7 @@ function y() {
|
|
|
14
14
|
return e.warn("Failed to get version from mount config"), null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
var b = y() || "0.26.1-
|
|
17
|
+
var b = y() || "0.26.1-dev48", x = o(b), S = o(!0);
|
|
18
18
|
o(null);
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/core/wasm/state.ts
|
|
@@ -33,7 +33,7 @@ import { a as ba, i as xa, n as Sa, o as Ca, r as wa, t as Ta } from "./dialog-C
|
|
|
33
33
|
import { o as Ea } from "./dist-BG-7Qpaj.js";
|
|
34
34
|
import { t as Da } from "./useAsyncData-P5-Oovhq.js";
|
|
35
35
|
import { n as W, t as G } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
36
|
-
import { n as Oa, t as ka } from "./ErrorBoundary-
|
|
36
|
+
import { n as Oa, t as ka } from "./ErrorBoundary-uU7o1PeJ.js";
|
|
37
37
|
import { W as Aa, n as ja } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
38
38
|
import { a as Ma, n as Na, r as Pa, t as Fa } from "./loader-qPmiRXZd.js";
|
|
39
39
|
import { t as Ia } from "./useIframeCapabilities-_0KX0nu_.js";
|
|
@@ -26482,20 +26482,24 @@ var dB = [
|
|
|
26482
26482
|
], gB = {
|
|
26483
26483
|
csv: {
|
|
26484
26484
|
separator: ",",
|
|
26485
|
-
encoding: "utf-8"
|
|
26485
|
+
encoding: "utf-8",
|
|
26486
|
+
decimalComma: !1
|
|
26487
|
+
},
|
|
26488
|
+
tsv: {
|
|
26489
|
+
encoding: "utf-8",
|
|
26490
|
+
decimalComma: !1
|
|
26486
26491
|
},
|
|
26487
|
-
tsv: { encoding: "utf-8" },
|
|
26488
26492
|
json: { ensureAscii: !0 }
|
|
26489
26493
|
}, _B = (e) => e in gB;
|
|
26490
26494
|
function vB(e, t, n) {
|
|
26491
26495
|
let r = {};
|
|
26492
26496
|
switch (t) {
|
|
26493
26497
|
case "csv":
|
|
26494
|
-
|
|
26495
|
-
|
|
26496
|
-
|
|
26497
|
-
n === "download" && e.tsv.encoding !== gB.tsv.encoding && (r.encoding = e.tsv.encoding);
|
|
26498
|
+
case "tsv": {
|
|
26499
|
+
let i = e[t];
|
|
26500
|
+
t === "csv" && e.csv.separator !== gB.csv.separator && (r.separator = e.csv.separator), i.decimalComma && (r.decimal_comma = !0), n === "download" && i.encoding !== gB[t].encoding && (r.encoding = i.encoding);
|
|
26498
26501
|
break;
|
|
26502
|
+
}
|
|
26499
26503
|
case "json":
|
|
26500
26504
|
e.json.ensureAscii !== gB.json.ensureAscii && (r.ensure_ascii = e.json.ensureAscii);
|
|
26501
26505
|
break;
|
|
@@ -26508,8 +26512,15 @@ function vB(e, t, n) {
|
|
|
26508
26512
|
var yB = (e, t) => e.find((e) => e.value === t)?.label ?? t;
|
|
26509
26513
|
function bB(e, t) {
|
|
26510
26514
|
switch (t) {
|
|
26511
|
-
case "csv":
|
|
26512
|
-
case "tsv":
|
|
26515
|
+
case "csv":
|
|
26516
|
+
case "tsv": {
|
|
26517
|
+
let n = e[t];
|
|
26518
|
+
return [
|
|
26519
|
+
...t === "csv" ? [yB(mB, e.csv.separator)] : [],
|
|
26520
|
+
yB(hB, n.encoding),
|
|
26521
|
+
...n.decimalComma ? ["Decimal comma"] : []
|
|
26522
|
+
].join(" · ");
|
|
26523
|
+
}
|
|
26513
26524
|
case "json": return e.json.ensureAscii ? "Escapes non-ASCII" : "Keeps non-ASCII";
|
|
26514
26525
|
case "parquet":
|
|
26515
26526
|
case "geojson":
|
|
@@ -26956,8 +26967,36 @@ var OB = (e) => {
|
|
|
26956
26967
|
children: [Ae, Le]
|
|
26957
26968
|
}), t[95] = a, t[96] = le, t[97] = Ae, t[98] = Le, t[99] = Re) : Re = t[99], Re;
|
|
26958
26969
|
}, kB = (e) => {
|
|
26959
|
-
let t = (0, J.c)(
|
|
26960
|
-
t[0] !== a || t[1] !== i ? (o = (e
|
|
26970
|
+
let t = (0, J.c)(47), { format: n, settings: r, onChange: i } = e, a = K.useId(), o;
|
|
26971
|
+
t[0] !== a || t[1] !== i || t[2] !== r ? (o = (e) => /* @__PURE__ */ (0, q.jsx)(AB, {
|
|
26972
|
+
id: `${a}-decimal`,
|
|
26973
|
+
label: "Decimal separator",
|
|
26974
|
+
help: "Character between the integer and fractional parts of a number.",
|
|
26975
|
+
children: /* @__PURE__ */ (0, q.jsxs)(qe, {
|
|
26976
|
+
id: `${a}-decimal`,
|
|
26977
|
+
className: "mb-0 w-full",
|
|
26978
|
+
value: r[e].decimalComma ? "comma" : "point",
|
|
26979
|
+
onChange: (t) => {
|
|
26980
|
+
let n = t.target.value === "comma";
|
|
26981
|
+
i((t) => ({
|
|
26982
|
+
...t,
|
|
26983
|
+
[e]: {
|
|
26984
|
+
...t[e],
|
|
26985
|
+
decimalComma: n
|
|
26986
|
+
}
|
|
26987
|
+
}));
|
|
26988
|
+
},
|
|
26989
|
+
children: [/* @__PURE__ */ (0, q.jsx)("option", {
|
|
26990
|
+
value: "point",
|
|
26991
|
+
children: "Point"
|
|
26992
|
+
}), /* @__PURE__ */ (0, q.jsx)("option", {
|
|
26993
|
+
value: "comma",
|
|
26994
|
+
children: "Comma"
|
|
26995
|
+
})]
|
|
26996
|
+
})
|
|
26997
|
+
}), t[0] = a, t[1] = i, t[2] = r, t[3] = o) : o = t[3];
|
|
26998
|
+
let s = o, c;
|
|
26999
|
+
t[4] !== a || t[5] !== i ? (c = (e, t) => /* @__PURE__ */ (0, q.jsx)(AB, {
|
|
26961
27000
|
id: `${a}-encoding`,
|
|
26962
27001
|
label: "Encoding",
|
|
26963
27002
|
help: "Text encoding of the saved file. Pick UTF-8 with BOM when Excel shows garbled accents. Copies always use UTF-8.",
|
|
@@ -26977,12 +27016,12 @@ var OB = (e) => {
|
|
|
26977
27016
|
},
|
|
26978
27017
|
children: hB.map(FB)
|
|
26979
27018
|
})
|
|
26980
|
-
}), t[
|
|
26981
|
-
let
|
|
27019
|
+
}), t[4] = a, t[5] = i, t[6] = c) : c = t[6];
|
|
27020
|
+
let l = c;
|
|
26982
27021
|
switch (n) {
|
|
26983
27022
|
case "csv": {
|
|
26984
27023
|
let e = `${a}-separator`, n = `${a}-separator`, o = r.csv.separator, c;
|
|
26985
|
-
t[
|
|
27024
|
+
t[7] === i ? c = t[8] : (c = (e) => {
|
|
26986
27025
|
let t = e.target.value;
|
|
26987
27026
|
i((e) => ({
|
|
26988
27027
|
...e,
|
|
@@ -26991,55 +27030,71 @@ var OB = (e) => {
|
|
|
26991
27030
|
separator: t
|
|
26992
27031
|
}
|
|
26993
27032
|
}));
|
|
26994
|
-
}, t[
|
|
26995
|
-
let l;
|
|
26996
|
-
t[5] === Symbol.for("react.memo_cache_sentinel") ? (l = mB.map(IB), t[5] = l) : l = t[5];
|
|
27033
|
+
}, t[7] = i, t[8] = c);
|
|
26997
27034
|
let u;
|
|
26998
|
-
t[
|
|
27035
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (u = mB.map(IB), t[9] = u) : u = t[9];
|
|
27036
|
+
let d;
|
|
27037
|
+
t[10] !== r.csv.separator || t[11] !== n || t[12] !== c ? (d = /* @__PURE__ */ (0, q.jsx)(qe, {
|
|
26999
27038
|
id: n,
|
|
27000
27039
|
className: "mb-0 w-full",
|
|
27001
27040
|
value: o,
|
|
27002
27041
|
onChange: c,
|
|
27003
|
-
children:
|
|
27004
|
-
}), t[
|
|
27005
|
-
let
|
|
27006
|
-
t[
|
|
27042
|
+
children: u
|
|
27043
|
+
}), t[10] = r.csv.separator, t[11] = n, t[12] = c, t[13] = d) : d = t[13];
|
|
27044
|
+
let f;
|
|
27045
|
+
t[14] !== e || t[15] !== d ? (f = /* @__PURE__ */ (0, q.jsx)(AB, {
|
|
27007
27046
|
id: e,
|
|
27008
27047
|
label: "Delimiter",
|
|
27009
27048
|
help: "Character between fields. Semicolon suits spreadsheets in locales that use a comma as the decimal separator.",
|
|
27010
|
-
children:
|
|
27011
|
-
}), t[
|
|
27012
|
-
let f;
|
|
27013
|
-
t[13] !== s || t[14] !== r.csv.encoding ? (f = s(r.csv.encoding, "csv"), t[13] = s, t[14] = r.csv.encoding, t[15] = f) : f = t[15];
|
|
27049
|
+
children: d
|
|
27050
|
+
}), t[14] = e, t[15] = d, t[16] = f) : f = t[16];
|
|
27014
27051
|
let p;
|
|
27015
|
-
|
|
27052
|
+
t[17] !== l || t[18] !== r.csv.encoding ? (p = l(r.csv.encoding, "csv"), t[17] = l, t[18] = r.csv.encoding, t[19] = p) : p = t[19];
|
|
27053
|
+
let m;
|
|
27054
|
+
t[20] === s ? m = t[21] : (m = s("csv"), t[20] = s, t[21] = m);
|
|
27055
|
+
let h;
|
|
27056
|
+
t[22] !== r.csv.decimalComma || t[23] !== r.csv.separator ? (h = r.csv.separator === "," && r.csv.decimalComma && /* @__PURE__ */ (0, q.jsx)("p", {
|
|
27057
|
+
className: "col-span-2 text-xs text-muted-foreground",
|
|
27058
|
+
children: "Excel in a comma-decimal locale needs the Semicolon delimiter."
|
|
27059
|
+
}), t[22] = r.csv.decimalComma, t[23] = r.csv.separator, t[24] = h) : h = t[24];
|
|
27060
|
+
let g;
|
|
27061
|
+
return t[25] !== p || t[26] !== m || t[27] !== h || t[28] !== f ? (g = /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [
|
|
27062
|
+
f,
|
|
27063
|
+
p,
|
|
27064
|
+
m,
|
|
27065
|
+
h
|
|
27066
|
+
] }), t[25] = p, t[26] = m, t[27] = h, t[28] = f, t[29] = g) : g = t[29], g;
|
|
27016
27067
|
}
|
|
27017
27068
|
case "tsv": {
|
|
27018
27069
|
let e;
|
|
27019
|
-
|
|
27070
|
+
t[30] !== l || t[31] !== r.tsv.encoding ? (e = l(r.tsv.encoding, "tsv"), t[30] = l, t[31] = r.tsv.encoding, t[32] = e) : e = t[32];
|
|
27071
|
+
let n;
|
|
27072
|
+
t[33] === s ? n = t[34] : (n = s("tsv"), t[33] = s, t[34] = n);
|
|
27073
|
+
let i;
|
|
27074
|
+
return t[35] !== e || t[36] !== n ? (i = /* @__PURE__ */ (0, q.jsxs)(q.Fragment, { children: [e, n] }), t[35] = e, t[36] = n, t[37] = i) : i = t[37], i;
|
|
27020
27075
|
}
|
|
27021
27076
|
case "json": {
|
|
27022
27077
|
let e = `${a}-ensure-ascii`, n = `${a}-ensure-ascii`, o;
|
|
27023
|
-
t[
|
|
27078
|
+
t[38] === i ? o = t[39] : (o = (e) => {
|
|
27024
27079
|
i((t) => ({
|
|
27025
27080
|
...t,
|
|
27026
27081
|
json: { ensureAscii: e }
|
|
27027
27082
|
}));
|
|
27028
|
-
}, t[
|
|
27083
|
+
}, t[38] = i, t[39] = o);
|
|
27029
27084
|
let s;
|
|
27030
|
-
t[
|
|
27085
|
+
t[40] !== r.json.ensureAscii || t[41] !== n || t[42] !== o ? (s = /* @__PURE__ */ (0, q.jsx)(uB, {
|
|
27031
27086
|
id: n,
|
|
27032
27087
|
size: "xs",
|
|
27033
27088
|
checked: r.json.ensureAscii,
|
|
27034
27089
|
onCheckedChange: o
|
|
27035
|
-
}), t[
|
|
27090
|
+
}), t[40] = r.json.ensureAscii, t[41] = n, t[42] = o, t[43] = s) : s = t[43];
|
|
27036
27091
|
let c;
|
|
27037
|
-
return t[
|
|
27092
|
+
return t[44] !== e || t[45] !== s ? (c = /* @__PURE__ */ (0, q.jsx)(AB, {
|
|
27038
27093
|
id: e,
|
|
27039
27094
|
label: "Escape non-ASCII",
|
|
27040
27095
|
help: "Write characters outside ASCII as \\\\u escapes. Turn off to keep accents and symbols readable in the file.",
|
|
27041
27096
|
children: s
|
|
27042
|
-
}), t[
|
|
27097
|
+
}), t[44] = e, t[45] = s, t[46] = c) : c = t[46], c;
|
|
27043
27098
|
}
|
|
27044
27099
|
default: return Wr(n), null;
|
|
27045
27100
|
}
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
3
|
import { t as n } from "./react-dom-DdqGVp5N.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-DBNnjiYJ.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-Bk1B4gCx.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|
|
@@ -4,13 +4,13 @@ import { t as r } from "./react-Bgs_wQh3.js";
|
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { t as a } from "./copy-icon-DuxRkh7T.js";
|
|
6
6
|
import { A as o, L as s, Y as c, i as l, j as u, n as d, on as f, tn as p, z as m } from "./error-entries-8CPw0aYH.js";
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
7
|
+
import { n as h, t as ee } from "./globals-DZHyDz_N.js";
|
|
8
8
|
import { r as g } from "./assertNever-473SFxLt.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Ct as te, Vt as v, m as y } from "./use-restore-focus-DT1TZACX.js";
|
|
11
11
|
import { a as ne, i as re, n as ie, r as ae } from "./dialog-CvyFEwby.js";
|
|
12
12
|
import { t as oe } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as se } from "./code-visibility-
|
|
13
|
+
import { t as se } from "./code-visibility-C18rxvVq.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var b = /* @__PURE__ */ e(r(), 1), x = i(), S = _(), ce = (e) => {
|
|
16
16
|
let n = (0, x.c)(8), r, i;
|
|
@@ -14,7 +14,7 @@ import { t as F } from "./jsx-runtime-D8btoEHk.js";
|
|
|
14
14
|
import { d as ae, r as I } from "./use-restore-focus-DT1TZACX.js";
|
|
15
15
|
import { t as oe } from "./useEvent-BoN7U38T.js";
|
|
16
16
|
import { n as L, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-uU7o1PeJ.js";
|
|
18
18
|
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, L as he, M as ge, N as R, O as z, P as _e, R as ve, S as ye, T as be, _ as xe, a as Se, b as B, c as Ce, d as we, f as V, g as Te, h as Ee, i as De, j as H, k as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as U, s as Pe, t as Fe, u as Ie, v as Le, w as Re, x as ze, y as Be, z as Ve } from "./data-grid-types-DBNnjiYJ.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function He(e) {
|
|
@@ -7061,7 +7061,7 @@ function ds(e, t, n, r, i) {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
//#endregion
|
|
7063
7063
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7064
|
-
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7064
|
+
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-BvBZ8bVF.js")), hs = 0;
|
|
7065
7065
|
function gs(e) {
|
|
7066
7066
|
return (0, fs.default)((0, ps.default)((0, ps.default)(e).filter((e) => e.span !== void 0).map((e) => (0, ao.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7067
7067
|
}
|
|
@@ -9284,7 +9284,7 @@ function Ys(e, t, n, r, i) {
|
|
|
9284
9284
|
}
|
|
9285
9285
|
//#endregion
|
|
9286
9286
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9287
|
-
var Xs = W.lazy(async () => await import("./number-overlay-editor-
|
|
9287
|
+
var Xs = W.lazy(async () => await import("./number-overlay-editor-D3SvrEmR.js")), Zs = {
|
|
9288
9288
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9289
9289
|
kind: U.Number,
|
|
9290
9290
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-BQZ-Bm6h.js";
|
|
2
2
|
import { Ct as t } from "./use-restore-focus-DT1TZACX.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-C18rxvVq.js";
|
|
4
4
|
var r = e("triangle-alert", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
package/dist/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import { i as x, n as S, r as C, t as w } from "./copy-icon-DuxRkh7T.js";
|
|
|
6
6
|
import { B as T, Bt as E, Ct as D, E as O, F as k, Ft as A, I as j, It as M, J as N, L as P, Lt as F, M as I, Mt as L, O as R, Ot as z, P as B, R as ee, Rt as te, St as ne, Ut as re, Vt as ie, Wt as ae, Y as oe, _ as se, a as ce, at as le, b as ue, bt as de, c as fe, ct as pe, ft as me, ht as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, nt as Ce, o as we, ot as Te, pt as Ee, tt as De, ut as Oe, vt as ke, z as Ae, zt as je } from "./html-to-image-BIom70fW.js";
|
|
7
7
|
import { a as Me, f as Ne, h as Pe, i as Fe, m as Ie, n as Le, o as Re, r as ze, t as Be } from "./tooltip-BQZ-Bm6h.js";
|
|
8
8
|
import { D as Ve, E as He, S as Ue, T as We, _ as Ge, a as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, l as $e, m as et, n as tt, o as nt, p as rt, r as it, s as at, t as ot, u as st, v as ct, w as lt, x as ut, y as dt } from "./spec-CRfw-lOm.js";
|
|
9
|
-
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-
|
|
9
|
+
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-B8iC72ed.js";
|
|
10
10
|
import { a as Nr, n as Pr, s as Fr, t as Ir } from "./useLifecycle-C9UTzCY8.js";
|
|
11
11
|
import { t as Lr } from "./check-DmTIavbZ.js";
|
|
12
12
|
import { A as Rr, C as zr, D as Br, M as Vr, O as Hr, a as Ur, c as Wr, d as Gr, i as Kr, k as qr, l as Jr, n as Yr, o as Xr, r as Zr, s as Qr, t as $r, w as ei, x as ti } from "./select-BszV-bbI.js";
|
|
@@ -16,7 +16,7 @@ import { $t as Ui, A as Wi, At as Gi, Bt as Ki, C as qi, Ct as Ji, Dt as Yi, Ft
|
|
|
16
16
|
import { a as Na, d as Pa, i as Fa, n as Ia, o as La, r as Ra, s as za, t as Ba, u as Va } from "./process-output-ns7N5ovS.js";
|
|
17
17
|
import { t as Ha } from "./pencil-FAv6JUvp.js";
|
|
18
18
|
import { a as Ua, c as Wa, d as Ga, f as Ka, i as qa, l as Ja, r as Ya } from "./glide-utils-iHKKQPJ8.js";
|
|
19
|
-
import { n as Xa, t as Za } from "./globals-
|
|
19
|
+
import { n as Xa, t as Za } from "./globals-DZHyDz_N.js";
|
|
20
20
|
import { a as Qa, i as $a, n as eo, r as to, s as no, t as ro } from "./assertNever-473SFxLt.js";
|
|
21
21
|
import { t as io } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as ao } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -40,10 +40,10 @@ import { i as ac } from "./dist-BG-7Qpaj.js";
|
|
|
40
40
|
import { p as oc } from "./dist-BidYR5m4.js";
|
|
41
41
|
import { t as sc } from "./useAsyncData-P5-Oovhq.js";
|
|
42
42
|
import { n as cc, r as lc, t as uc } from "./useDeepCompareMemoize-CO6rO5Mq.js";
|
|
43
|
-
import { t as dc } from "./ErrorBoundary-
|
|
43
|
+
import { t as dc } from "./ErrorBoundary-uU7o1PeJ.js";
|
|
44
44
|
import { G as fc, W as pc } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
45
45
|
import { a as mc, n as hc } from "./loader-qPmiRXZd.js";
|
|
46
|
-
import { a as gc, c as _c, i as vc, l as yc, o as bc, s as xc, t as Sc } from "./code-visibility-
|
|
46
|
+
import { a as gc, c as _c, i as vc, l as yc, o as bc, s as xc, t as Sc } from "./code-visibility-C18rxvVq.js";
|
|
47
47
|
import { t as Cc } from "./esm-DY8dGAjJ.js";
|
|
48
48
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
49
49
|
var wc = Object.freeze({
|
|
@@ -13109,7 +13109,7 @@ function XO(e, t) {
|
|
|
13109
13109
|
}
|
|
13110
13110
|
//#endregion
|
|
13111
13111
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
13112
|
-
var ZO = J.lazy(() => import("./glide-data-editor-
|
|
13112
|
+
var ZO = J.lazy(() => import("./glide-data-editor-Bk1B4gCx.js").then((e) => e.t)), QO = MD("marimo-data-editor", { cssStyles: [tO, nO] }).withData(G({
|
|
13113
13113
|
initialValue: G({ edits: V(G({
|
|
13114
13114
|
rowIdx: W(),
|
|
13115
13115
|
columnId: K(),
|
|
@@ -16635,6 +16635,7 @@ var xj = G({
|
|
|
16635
16635
|
geometry_column: K().nullish(),
|
|
16636
16636
|
options: G({
|
|
16637
16637
|
separator: K().optional(),
|
|
16638
|
+
decimal_comma: U().optional(),
|
|
16638
16639
|
encoding: K().optional(),
|
|
16639
16640
|
ensure_ascii: U().optional()
|
|
16640
16641
|
}).optional()
|
|
@@ -32832,7 +32833,7 @@ function $U(e) {
|
|
|
32832
32833
|
}
|
|
32833
32834
|
//#endregion
|
|
32834
32835
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32835
|
-
var eW = J.lazy(() => import("./reveal-component-
|
|
32836
|
+
var eW = J.lazy(() => import("./reveal-component-CFMbs41f.js")), tW = (e) => {
|
|
32836
32837
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = Io(Ys), s = a === "read" || o, c = Io(Ca) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32837
32838
|
t[0] !== i || t[1] !== n ? (d = Zz(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32838
32839
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-Bk1B4gCx.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
|
|
5
5
|
var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
|
|
6
6
|
name: "NumberOverlayEditorStyle",
|
|
@@ -3,14 +3,14 @@ import { g as t, h as n, m as r, r as i, t as a } from "./button-Z2R2272J.js";
|
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-BQZ-Bm6h.js";
|
|
6
|
-
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-
|
|
6
|
+
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-B8iC72ed.js";
|
|
7
7
|
import { M as w } from "./select-BszV-bbI.js";
|
|
8
8
|
import { X as T } from "./dropdown-menu-BiXHfje7.js";
|
|
9
9
|
import { t as E } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Vt as D, Wt as O, f as k, i as ee } from "./use-restore-focus-DT1TZACX.js";
|
|
11
11
|
import { t as A } from "./useEvent-BoN7U38T.js";
|
|
12
12
|
import { o as te } from "./static-state-BtDNJuc2.js";
|
|
13
|
-
import { n as ne, t as re } from "./code-visibility-
|
|
13
|
+
import { n as ne, t as re } from "./code-visibility-C18rxvVq.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
var j = c("sticky-note", [["path", {
|
|
16
16
|
d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
|
package/package.json
CHANGED
|
@@ -114,6 +114,85 @@ describe("ExportActions dialog", () => {
|
|
|
114
114
|
vi.unstubAllGlobals();
|
|
115
115
|
});
|
|
116
116
|
|
|
117
|
+
it.each(["CSV", "TSV"])(
|
|
118
|
+
"sends decimal comma for %s downloads and copies",
|
|
119
|
+
async (label) => {
|
|
120
|
+
vi.stubGlobal(
|
|
121
|
+
"fetch",
|
|
122
|
+
vi.fn().mockResolvedValue({
|
|
123
|
+
ok: true,
|
|
124
|
+
text: vi.fn().mockResolvedValue("3,14\n"),
|
|
125
|
+
}),
|
|
126
|
+
);
|
|
127
|
+
renderExportActions();
|
|
128
|
+
await openDialog();
|
|
129
|
+
const format = label.toLowerCase();
|
|
130
|
+
fireEvent.click(screen.getByRole("button", { name: `${label} options` }));
|
|
131
|
+
const select = screen.getByRole("combobox", {
|
|
132
|
+
name: "Decimal separator",
|
|
133
|
+
});
|
|
134
|
+
expect(select).toHaveValue("point");
|
|
135
|
+
expect(
|
|
136
|
+
screen.getByTestId(`export-summary-${format}`),
|
|
137
|
+
).not.toHaveTextContent("Decimal comma");
|
|
138
|
+
fireEvent.click(
|
|
139
|
+
screen.getByRole("button", { name: `Download ${label}` }),
|
|
140
|
+
);
|
|
141
|
+
await waitFor(() => expect(downloadAs).toHaveBeenCalledWith({ format }));
|
|
142
|
+
downloadAs.mockClear();
|
|
143
|
+
fireEvent.change(select, { target: { value: "comma" } });
|
|
144
|
+
expect(screen.getByTestId(`export-summary-${format}`)).toHaveTextContent(
|
|
145
|
+
"Decimal comma",
|
|
146
|
+
);
|
|
147
|
+
fireEvent.click(
|
|
148
|
+
screen.getByRole("button", { name: `Download ${label}` }),
|
|
149
|
+
);
|
|
150
|
+
await waitFor(() =>
|
|
151
|
+
expect(downloadAs).toHaveBeenCalledWith({
|
|
152
|
+
format,
|
|
153
|
+
options: { decimal_comma: true },
|
|
154
|
+
}),
|
|
155
|
+
);
|
|
156
|
+
downloadAs.mockClear();
|
|
157
|
+
fireEvent.click(screen.getByRole("button", { name: `Copy ${label}` }));
|
|
158
|
+
await waitFor(() =>
|
|
159
|
+
expect(copyToClipboard).toHaveBeenCalledWith("3,14\n"),
|
|
160
|
+
);
|
|
161
|
+
expect(downloadAs).toHaveBeenCalledWith({
|
|
162
|
+
format,
|
|
163
|
+
options: { decimal_comma: true },
|
|
164
|
+
});
|
|
165
|
+
},
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
it("shows the Excel hint only for a comma delimiter with decimal comma", async () => {
|
|
169
|
+
renderExportActions();
|
|
170
|
+
await openDialog();
|
|
171
|
+
fireEvent.click(screen.getByRole("button", { name: "CSV options" }));
|
|
172
|
+
const hint =
|
|
173
|
+
"Excel in a comma-decimal locale needs the Semicolon delimiter.";
|
|
174
|
+
expect(screen.queryByText(hint)).not.toBeInTheDocument();
|
|
175
|
+
fireEvent.change(
|
|
176
|
+
screen.getByRole("combobox", { name: "Decimal separator" }),
|
|
177
|
+
{
|
|
178
|
+
target: { value: "comma" },
|
|
179
|
+
},
|
|
180
|
+
);
|
|
181
|
+
expect(screen.getByText(hint)).toBeInTheDocument();
|
|
182
|
+
fireEvent.change(screen.getByRole("combobox", { name: "Delimiter" }), {
|
|
183
|
+
target: { value: ";" },
|
|
184
|
+
});
|
|
185
|
+
expect(screen.queryByText(hint)).not.toBeInTheDocument();
|
|
186
|
+
fireEvent.click(screen.getByRole("button", { name: "TSV options" }));
|
|
187
|
+
fireEvent.change(
|
|
188
|
+
screen.getByRole("combobox", { name: "Decimal separator" }),
|
|
189
|
+
{
|
|
190
|
+
target: { value: "comma" },
|
|
191
|
+
},
|
|
192
|
+
);
|
|
193
|
+
expect(screen.queryByText(hint)).not.toBeInTheDocument();
|
|
194
|
+
});
|
|
195
|
+
|
|
117
196
|
it("selects a primary geometry for GeoParquet without changing other formats", async () => {
|
|
118
197
|
const getExportMetadata = vi.fn().mockResolvedValue(geometryMetadata);
|
|
119
198
|
renderExportActions({ getExportMetadata });
|
|
@@ -152,15 +152,20 @@ const ENCODINGS = [
|
|
|
152
152
|
type Separator = (typeof SEPARATORS)[number]["value"];
|
|
153
153
|
type Encoding = (typeof ENCODINGS)[number]["value"];
|
|
154
154
|
|
|
155
|
+
interface DelimitedSettings {
|
|
156
|
+
encoding: Encoding;
|
|
157
|
+
decimalComma: boolean;
|
|
158
|
+
}
|
|
159
|
+
|
|
155
160
|
interface ExportSettings {
|
|
156
|
-
csv: { separator: Separator
|
|
157
|
-
tsv:
|
|
161
|
+
csv: DelimitedSettings & { separator: Separator };
|
|
162
|
+
tsv: DelimitedSettings;
|
|
158
163
|
json: { ensureAscii: boolean };
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
const DEFAULT_SETTINGS: ExportSettings = {
|
|
162
|
-
csv: { separator: ",", encoding: "utf-8" },
|
|
163
|
-
tsv: { encoding: "utf-8" },
|
|
167
|
+
csv: { separator: ",", encoding: "utf-8", decimalComma: false },
|
|
168
|
+
tsv: { encoding: "utf-8", decimalComma: false },
|
|
164
169
|
json: { ensureAscii: true },
|
|
165
170
|
};
|
|
166
171
|
|
|
@@ -184,24 +189,25 @@ function requestOptions(
|
|
|
184
189
|
const options: DownloadAsOptions = {};
|
|
185
190
|
switch (format) {
|
|
186
191
|
case "csv":
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
192
|
+
case "tsv": {
|
|
193
|
+
const delimited = settings[format];
|
|
190
194
|
if (
|
|
191
|
-
|
|
192
|
-
settings.csv.
|
|
195
|
+
format === "csv" &&
|
|
196
|
+
settings.csv.separator !== DEFAULT_SETTINGS.csv.separator
|
|
193
197
|
) {
|
|
194
|
-
options.
|
|
198
|
+
options.separator = settings.csv.separator;
|
|
199
|
+
}
|
|
200
|
+
if (delimited.decimalComma) {
|
|
201
|
+
options.decimal_comma = true;
|
|
195
202
|
}
|
|
196
|
-
break;
|
|
197
|
-
case "tsv":
|
|
198
203
|
if (
|
|
199
204
|
destination === "download" &&
|
|
200
|
-
|
|
205
|
+
delimited.encoding !== DEFAULT_SETTINGS[format].encoding
|
|
201
206
|
) {
|
|
202
|
-
options.encoding =
|
|
207
|
+
options.encoding = delimited.encoding;
|
|
203
208
|
}
|
|
204
209
|
break;
|
|
210
|
+
}
|
|
205
211
|
case "json":
|
|
206
212
|
if (settings.json.ensureAscii !== DEFAULT_SETTINGS.json.ensureAscii) {
|
|
207
213
|
options.ensure_ascii = settings.json.ensureAscii;
|
|
@@ -228,12 +234,16 @@ function settingsSummary(
|
|
|
228
234
|
): string | null {
|
|
229
235
|
switch (format) {
|
|
230
236
|
case "csv":
|
|
237
|
+
case "tsv": {
|
|
238
|
+
const delimited = settings[format];
|
|
231
239
|
return [
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
...(format === "csv"
|
|
241
|
+
? [labelForValue(SEPARATORS, settings.csv.separator)]
|
|
242
|
+
: []),
|
|
243
|
+
labelForValue(ENCODINGS, delimited.encoding),
|
|
244
|
+
...(delimited.decimalComma ? ["Decimal comma"] : []),
|
|
234
245
|
].join(" · ");
|
|
235
|
-
|
|
236
|
-
return labelForValue(ENCODINGS, settings.tsv.encoding);
|
|
246
|
+
}
|
|
237
247
|
case "json":
|
|
238
248
|
return settings.json.ensureAscii
|
|
239
249
|
? "Escapes non-ASCII"
|
|
@@ -1066,6 +1076,30 @@ const ExportSettingsFields: React.FC<ExportSettingsFieldsProps> = ({
|
|
|
1066
1076
|
}) => {
|
|
1067
1077
|
const id = React.useId();
|
|
1068
1078
|
|
|
1079
|
+
const decimalField = (key: "csv" | "tsv") => (
|
|
1080
|
+
<SettingField
|
|
1081
|
+
id={`${id}-decimal`}
|
|
1082
|
+
label="Decimal separator"
|
|
1083
|
+
help="Character between the integer and fractional parts of a number."
|
|
1084
|
+
>
|
|
1085
|
+
<NativeSelect
|
|
1086
|
+
id={`${id}-decimal`}
|
|
1087
|
+
className="mb-0 w-full"
|
|
1088
|
+
value={settings[key].decimalComma ? "comma" : "point"}
|
|
1089
|
+
onChange={(event) => {
|
|
1090
|
+
const decimalComma = event.target.value === "comma";
|
|
1091
|
+
onChange((current) => ({
|
|
1092
|
+
...current,
|
|
1093
|
+
[key]: { ...current[key], decimalComma },
|
|
1094
|
+
}));
|
|
1095
|
+
}}
|
|
1096
|
+
>
|
|
1097
|
+
<option value="point">Point</option>
|
|
1098
|
+
<option value="comma">Comma</option>
|
|
1099
|
+
</NativeSelect>
|
|
1100
|
+
</SettingField>
|
|
1101
|
+
);
|
|
1102
|
+
|
|
1069
1103
|
const encodingField = (encoding: Encoding, key: "csv" | "tsv") => (
|
|
1070
1104
|
<SettingField
|
|
1071
1105
|
id={`${id}-encoding`}
|
|
@@ -1122,10 +1156,21 @@ const ExportSettingsFields: React.FC<ExportSettingsFieldsProps> = ({
|
|
|
1122
1156
|
</NativeSelect>
|
|
1123
1157
|
</SettingField>
|
|
1124
1158
|
{encodingField(settings.csv.encoding, "csv")}
|
|
1159
|
+
{decimalField("csv")}
|
|
1160
|
+
{settings.csv.separator === "," && settings.csv.decimalComma && (
|
|
1161
|
+
<p className="col-span-2 text-xs text-muted-foreground">
|
|
1162
|
+
Excel in a comma-decimal locale needs the Semicolon delimiter.
|
|
1163
|
+
</p>
|
|
1164
|
+
)}
|
|
1125
1165
|
</>
|
|
1126
1166
|
);
|
|
1127
1167
|
case "tsv":
|
|
1128
|
-
return
|
|
1168
|
+
return (
|
|
1169
|
+
<>
|
|
1170
|
+
{encodingField(settings.tsv.encoding, "tsv")}
|
|
1171
|
+
{decimalField("tsv")}
|
|
1172
|
+
</>
|
|
1173
|
+
);
|
|
1129
1174
|
case "json":
|
|
1130
1175
|
return (
|
|
1131
1176
|
<SettingField
|