@marimo-team/islands 0.25.2-dev137 → 0.25.2-dev139
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-tFxALcda.js → ErrorBoundary-BJ0_83Mq.js} +1 -1
- package/dist/{cells-CuYwqnV8.js → cells-C8iCYvLU.js} +18 -18
- package/dist/{chat-ui-C6oDg4Zu.js → chat-ui-BDpymeoe.js} +5 -5
- package/dist/{code-visibility-DRHmU9Ty.js → code-visibility-Cv5Z6gJw.js} +4 -4
- package/dist/{common-C_DVk1Gs.js → common-B7IjNlZf.js} +6245 -7598
- package/dist/{data-grid-overlay-editor-DZWMtXXU.js → data-grid-overlay-editor-BzztV280.js} +1 -1
- package/dist/{error-entries-zfHL6H60.js → error-entries-CzoYkIQZ.js} +1 -1
- package/dist/{feedback-button-DGgbTY8B.js → feedback-button-BXlzBM0D.js} +4 -4
- package/dist/{formats-DLtvJPnj.js → formats-BGh2thRc.js} +1 -1
- package/dist/{glide-data-editor-oGZnEfDD.js → glide-data-editor-CiUr65D6.js} +3 -3
- package/dist/{globals-eEVHhFzx.js → globals-ax332bgg.js} +1 -1
- package/dist/{html-to-image-BJJsbNZ1.js → html-to-image-CZY1pIZH.js} +2 -2
- package/dist/main.js +37 -37
- package/dist/{number-overlay-editor-BuftERPN.js → number-overlay-editor-CBnIcaPV.js} +1 -1
- package/dist/{process-output-C1GGFU6Q.js → process-output-e4jj9Ijt.js} +2 -2
- package/dist/{reveal-component-Rrg8oD35.js → reveal-component-hAqwoa_n.js} +4 -4
- package/dist/{toDate-Dwcg_x_5.js → toDate-BNJf01u1.js} +3 -3
- package/dist/{vega-component-DLBAQLSf.js → vega-component-DG29TAB7.js} +2 -2
- package/package.json +1 -1
- package/src/components/data-table/__tests__/column_formatting.test.ts +30 -0
- package/src/components/data-table/__tests__/columns.test.tsx +70 -0
- package/src/components/data-table/column-formatting/feature.ts +20 -1
- package/src/components/data-table/columns.tsx +25 -18
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
3
|
import { t as n } from "./react-dom-DUmH0GXv.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-BH_r7g7l.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-CiUr65D6.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_aca11a353ce3b112922852200b9c160f/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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as e, N as t, b as n, d as r, jt as i, kt as a } from "./cells-
|
|
1
|
+
import { At as e, N as t, b as n, d as r, jt as i, kt as a } from "./cells-C8iCYvLU.js";
|
|
2
2
|
import { C as o } from "./select-BButFi-d.js";
|
|
3
3
|
//#region src/core/errors/error-entries.ts
|
|
4
4
|
function s(t) {
|
|
@@ -3,15 +3,15 @@ import { h as t, t as n } from "./button-CvjkwdSk.js";
|
|
|
3
3
|
import { t as r } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as a } from "./copy-icon-Ft7t9bqz.js";
|
|
6
|
-
import { Ct as o, Ft as s, H as c, L as l, Lt as u, V as d, d as f, un as p } from "./cells-
|
|
6
|
+
import { Ct as o, Ft as s, H as c, L as l, Lt as u, V as d, d as f, un as p } from "./cells-C8iCYvLU.js";
|
|
7
7
|
import { b as m } from "./select-BButFi-d.js";
|
|
8
|
-
import { n as h, t as ee } from "./globals-
|
|
8
|
+
import { n as h, t as ee } from "./globals-ax332bgg.js";
|
|
9
9
|
import { t as g } from "./jsx-runtime-3BD1kT0s.js";
|
|
10
10
|
import { C as _, _ as te, i as v } from "./useTheme-CRnjkku0.js";
|
|
11
11
|
import { a as ne, i as re, n as ie, r as ae } from "./dialog-CEBFZNyc.js";
|
|
12
12
|
import { t as oe } from "./useAsyncData-Deh5kszT.js";
|
|
13
|
-
import { t as se } from "./code-visibility-
|
|
14
|
-
import { i as ce, n as le } from "./error-entries-
|
|
13
|
+
import { t as se } from "./code-visibility-Cv5Z6gJw.js";
|
|
14
|
+
import { i as ce, n as le } from "./error-entries-CzoYkIQZ.js";
|
|
15
15
|
//#region src/components/ui/skeleton.tsx
|
|
16
16
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = g(), ue = (e) => {
|
|
17
17
|
let n = (0, b.c)(8), r, i;
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
|
2
2
|
import { h as t, r as n } from "./button-CvjkwdSk.js";
|
|
3
3
|
import { t as r } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as i } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { t as a } from "./toDate-
|
|
5
|
+
import { t as a } from "./toDate-BNJf01u1.js";
|
|
6
6
|
import { t as o } from "./jsx-runtime-3BD1kT0s.js";
|
|
7
7
|
import { i as s } from "./loader-BQOfjTIJ.js";
|
|
8
8
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/isDate.js
|
|
@@ -6,7 +6,7 @@ import { i as s, n as c, r as l } from "./copy-icon-Ft7t9bqz.js";
|
|
|
6
6
|
import { C as u, c as d, i as f, n as p, s as m, t as h, x as g } from "./select-BButFi-d.js";
|
|
7
7
|
import { d as _, h as v, i as y, l as b, n as x, o as S, s as C, t as w, u as T } from "./dropdown-menu-CP_qCYHC.js";
|
|
8
8
|
import { c as E, d as D, l as O, n as k, o as A, s as ee, t as j, u as te } from "./glide-utils-DJyqh0EM.js";
|
|
9
|
-
import { n as ne, t as re } from "./ErrorBoundary-
|
|
9
|
+
import { n as ne, t as re } from "./ErrorBoundary-BJ0_83Mq.js";
|
|
10
10
|
import { t as M } from "./react-dom-DUmH0GXv.js";
|
|
11
11
|
import { t as N } from "./jsx-runtime-3BD1kT0s.js";
|
|
12
12
|
import { t as ie } from "./label-BDKF3Afc.js";
|
|
@@ -7062,7 +7062,7 @@ function rs(e, t, n, r, i) {
|
|
|
7062
7062
|
}
|
|
7063
7063
|
//#endregion
|
|
7064
7064
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_aca11a353ce3b112922852200b9c160f/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7065
|
-
var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7065
|
+
var is = /* @__PURE__ */ e(_r(), 1), as = /* @__PURE__ */ e(xr(), 1), os = K.lazy(async () => await import("./data-grid-overlay-editor-BzztV280.js")), ss = 0;
|
|
7066
7066
|
function cs(e) {
|
|
7067
7067
|
return (0, is.default)((0, as.default)((0, as.default)(e).filter((e) => e.span !== void 0).map((e) => (0, Za.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7068
7068
|
}
|
|
@@ -9293,7 +9293,7 @@ function Vs(e, t, n, r, i) {
|
|
|
9293
9293
|
}
|
|
9294
9294
|
//#endregion
|
|
9295
9295
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_aca11a353ce3b112922852200b9c160f/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9296
|
-
var Hs = K.lazy(async () => await import("./number-overlay-editor-
|
|
9296
|
+
var Hs = K.lazy(async () => await import("./number-overlay-editor-CBnIcaPV.js")), Us = {
|
|
9297
9297
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9298
9298
|
kind: W.Number,
|
|
9299
9299
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-BO1REbqs.js";
|
|
2
2
|
import { _ as t } from "./useTheme-CRnjkku0.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-Cv5Z6gJw.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",
|
|
@@ -5,10 +5,10 @@ import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
|
5
5
|
import { n as u, t as d } from "./copy-icon-Ft7t9bqz.js";
|
|
6
6
|
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DPZk8vhS.js";
|
|
7
7
|
import { c as _, h as v, l as y, s as b, t as x, u as ee } from "./tooltip-BO1REbqs.js";
|
|
8
|
-
import { A as te, E as ne, G as re, Nt as ie, O as ae, R as oe, St as se, Z as ce, Zt as le, _t as ue, en as de, et as fe, gt as pe, h as me, ht as he, lt as ge, s as _e, t as ve, vt as ye, xt as be, yt as xe, z as Se } from "./cells-
|
|
8
|
+
import { A as te, E as ne, G as re, Nt as ie, O as ae, R as oe, St as se, Z as ce, Zt as le, _t as ue, en as de, et as fe, gt as pe, h as me, ht as he, lt as ge, s as _e, t as ve, vt as ye, xt as be, yt as xe, z as Se } from "./cells-C8iCYvLU.js";
|
|
9
9
|
import { M as Ce, O as we, k as Te } from "./select-BButFi-d.js";
|
|
10
10
|
import { dt as Ee, q as De } from "./dropdown-menu-CP_qCYHC.js";
|
|
11
|
-
import {
|
|
11
|
+
import { p as Oe, v as ke } from "./toDate-BNJf01u1.js";
|
|
12
12
|
import { t as Ae } from "./jsx-runtime-3BD1kT0s.js";
|
|
13
13
|
import { Ct as je, K as Me, Q as Ne, St as S, X as Pe, Y as Fe, bt as C, ct as Ie, dt as Le, ft as Re, ht as ze, lt as Be, pt as Ve, vt as He, wt as w, xt as Ue, yt as We } from "./use-restore-focus-BEM7sFWl.js";
|
|
14
14
|
import { A as Ge, C as T, E as Ke, _ as E, c as qe, n as Je } from "./useTheme-CRnjkku0.js";
|
package/dist/main.js
CHANGED
|
@@ -3,20 +3,20 @@ import { _ as a, c as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p,
|
|
|
3
3
|
import { t as v } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as y } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { i as b, n as x, r as S, t as C } from "./copy-icon-Ft7t9bqz.js";
|
|
6
|
-
import { C as w, F as T, G as E, I as D, J as O, K as k, L as A, P as j, R as M, X as N, Z as P, _ as F, a as I, b as L, g as R, i as z, j as B, k as ee, n as te, o as ne, q as re, v as ie, y as ae } from "./html-to-image-
|
|
6
|
+
import { C as w, F as T, G as E, I as D, J as O, K as k, L as A, P as j, R as M, X as N, Z as P, _ as F, a as I, b as L, g as R, i as z, j as B, k as ee, n as te, o as ne, q as re, v as ie, y as ae } from "./html-to-image-CZY1pIZH.js";
|
|
7
7
|
import { a as oe, d as se, f as ce, h as V, i as le, n as ue, o as de, r as fe, t as pe } from "./tooltip-BO1REbqs.js";
|
|
8
|
-
import { $ as me, $t as he, B as ge, Bt as _e, C as ve, Ct as ye, D as be, Dt as xe, Et as Se, F as Ce, G as we, Gt as Te, Ht as Ee, I as De, J as Oe, Jt as ke, Kt as Ae, L as je, O as Me, Ot as Ne, P as Pe, Pt as Fe, Q as Ie, Qt as Le, Rt as Re, S as ze, St as Be, T as Ve, Tt as He, U as Ue, W as We, Wt as Ge, bt as Ke, c as qe, cn as Je, ct as Ye, d as Xe, dn as Ze, dt as Qe, en as $e, f as et, fn as tt, ft as nt, g as rt, gt as it, h as at, hn as ot, k as st, l as ct, ln as lt, m as ut, mn as dt, n as ft, o as pt, on as mt, ot as ht, p as gt, q as _t, qt as vt, r as yt, rn as bt, rt as xt, sn as St, st as Ct, tn as wt, u as Tt, v as Et, w as Dt, wt as Ot, zt as kt } from "./cells-
|
|
8
|
+
import { $ as me, $t as he, B as ge, Bt as _e, C as ve, Ct as ye, D as be, Dt as xe, Et as Se, F as Ce, G as we, Gt as Te, Ht as Ee, I as De, J as Oe, Jt as ke, Kt as Ae, L as je, O as Me, Ot as Ne, P as Pe, Pt as Fe, Q as Ie, Qt as Le, Rt as Re, S as ze, St as Be, T as Ve, Tt as He, U as Ue, W as We, Wt as Ge, bt as Ke, c as qe, cn as Je, ct as Ye, d as Xe, dn as Ze, dt as Qe, en as $e, f as et, fn as tt, ft as nt, g as rt, gt as it, h as at, hn as ot, k as st, l as ct, ln as lt, m as ut, mn as dt, n as ft, o as pt, on as mt, ot as ht, p as gt, q as _t, qt as vt, r as yt, rn as bt, rt as xt, sn as St, st as Ct, tn as wt, u as Tt, v as Et, w as Dt, wt as Ot, zt as kt } from "./cells-C8iCYvLU.js";
|
|
9
9
|
import { D as At, E as jt, O as Mt, S as Nt, T as Pt, _ as Ft, a as It, c as Lt, d as Rt, f as zt, g as Bt, h as Vt, i as Ht, l as Ut, m as Wt, n as Gt, o as Kt, p as qt, r as Jt, s as Yt, t as Xt, u as Zt, v as Qt, w as $t, x as en, y as tn } from "./spec-BwarBpUJ.js";
|
|
10
|
-
import { $t as nn, A as rn, At as an, B as on, Bt as sn, C as cn, Ct as ln, D as un, Dt as dn, E as fn, Et as pn, F as mn, Ft as hn, G as gn, Gt as _n, H as vn, Ht as yn, I as bn, It as xn, J as Sn, Jt as Cn, K as wn, Kt as Tn, L as En, Lt as Dn, M as On, Mt as kn, N as An, Nt as jn, O as Mn, Ot as Nn, P as Pn, Pt as Fn, Qt as In, R as Ln, Rt as Rn, S as zn, St as Bn, T as Vn, Tt as Hn, U as Un, Ut as Wn, V as Gn, Vt as Kn, W as qn, Wt as Jn, X as Yn, Xt as Xn, Y as Zn, Yt as Qn, Zt as $n, _ as er, _t as tr, an as nr, at as rr, b as ir, c as ar, cn as or, ct as sr, d as cr, dn as lr, dt as ur, en as dr, et as fr, f as pr, fn as mr, ft as hr, g as gr, gt as _r, h as vr, hn as yr, ht as br, in as xr, it as Sr, j as Cr, jt as wr, k as Tr, kt as Er, ln as Dr, lt as Or, m as kr, mn as Ar, mt as jr, nn as Mr, nt as Nr, ot as Pr, p as Fr, pn as Ir, pt as Lr, q as Rr, qt as zr, r as Br, rn as Vr, rt as Hr, sn as Ur, st as Wr, t as Gr, tn as Kr, tt as qr, u as Jr, un as Yr, ut as Xr, v as Zr, vt as Qr, w as $r, wt as ei, x as ti, y as ni, yt as ri, z as ii, zt as ai } from "./common-
|
|
10
|
+
import { $t as nn, A as rn, At as an, B as on, Bt as sn, C as cn, Ct as ln, D as un, Dt as dn, E as fn, Et as pn, F as mn, Ft as hn, G as gn, Gt as _n, H as vn, Ht as yn, I as bn, It as xn, J as Sn, Jt as Cn, K as wn, Kt as Tn, L as En, Lt as Dn, M as On, Mt as kn, N as An, Nt as jn, O as Mn, Ot as Nn, P as Pn, Pt as Fn, Qt as In, R as Ln, Rt as Rn, S as zn, St as Bn, T as Vn, Tt as Hn, U as Un, Ut as Wn, V as Gn, Vt as Kn, W as qn, Wt as Jn, X as Yn, Xt as Xn, Y as Zn, Yt as Qn, Zt as $n, _ as er, _t as tr, an as nr, at as rr, b as ir, c as ar, cn as or, ct as sr, d as cr, dn as lr, dt as ur, en as dr, et as fr, f as pr, fn as mr, ft as hr, g as gr, gt as _r, h as vr, hn as yr, ht as br, in as xr, it as Sr, j as Cr, jt as wr, k as Tr, kt as Er, ln as Dr, lt as Or, m as kr, mn as Ar, mt as jr, nn as Mr, nt as Nr, ot as Pr, p as Fr, pn as Ir, pt as Lr, q as Rr, qt as zr, r as Br, rn as Vr, rt as Hr, sn as Ur, st as Wr, t as Gr, tn as Kr, tt as qr, u as Jr, un as Yr, ut as Xr, v as Zr, vt as Qr, w as $r, wt as ei, x as ti, y as ni, yt as ri, z as ii, zt as ai } from "./common-B7IjNlZf.js";
|
|
11
11
|
import { c as oi, i as si, n as ci, o as li, t as ui } from "./useLifecycle-j7D9uD1o.js";
|
|
12
12
|
import { t as di } from "./check-EDwSwP89.js";
|
|
13
13
|
import { A as fi, C as pi, D as mi, E as hi, M as gi, O as _i, S as vi, T as yi, a as bi, b as xi, c as Si, i as Ci, k as wi, l as Ti, n as Ei, o as Di, r as Oi, s as ki, t as Ai, w as ji, x as Mi } from "./select-BButFi-d.js";
|
|
14
14
|
import { $ as Ni, C as Pi, Et as Fi, J as Ii, K as Li, R as Ri, S as zi, U as Bi, Y as Vi, _ as Hi, _n as Ui, a as Wi, c as Gi, f as Ki, g as qi, h as Ji, i as Yi, kt as Xi, m as Zi, mt as Qi, n as $i, p as ea, q as ta, r as na, s as ra, t as ia, ut as aa, v as oa, vn as sa, x as ca, z as la } from "./dropdown-menu-CP_qCYHC.js";
|
|
15
|
-
import {
|
|
16
|
-
import { a as Ca, c as wa, d as Ta, f as Ea, i as Da, l as Oa, n as ka, o as Aa, r as ja, s as Ma, t as Na } from "./process-output-
|
|
15
|
+
import { S as ua, a as da, b as fa, c as pa, d as ma, f as ha, g as ga, l as _a, m as va, p as ya, s as ba, v as xa, y as Sa } from "./toDate-BNJf01u1.js";
|
|
16
|
+
import { a as Ca, c as wa, d as Ta, f as Ea, i as Da, l as Oa, n as ka, o as Aa, r as ja, s as Ma, t as Na } from "./process-output-e4jj9Ijt.js";
|
|
17
17
|
import { a as Pa, c as Fa, d as Ia, i as La, l as Ra, r as za, u as Ba } from "./glide-utils-DJyqh0EM.js";
|
|
18
|
-
import { n as Va, t as Ha } from "./ErrorBoundary-
|
|
19
|
-
import { n as Ua, t as Wa } from "./globals-
|
|
18
|
+
import { n as Va, t as Ha } from "./ErrorBoundary-BJ0_83Mq.js";
|
|
19
|
+
import { n as Ua, t as Wa } from "./globals-ax332bgg.js";
|
|
20
20
|
import { t as Ga } from "./react-dom-DUmH0GXv.js";
|
|
21
21
|
import { t as Ka } from "./jsx-runtime-3BD1kT0s.js";
|
|
22
22
|
import { B as qa, C as H, Ct as Ja, D as Ya, E as Xa, F as U, G as Za, H as Qa, I as $a, L as eo, M as W, N as to, O as no, P as ro, Q as io, R as ao, S as G, St as oo, Tt as so, U as co, W as lo, Y as uo, Z as fo, _ as po, _t as mo, a as ho, b as go, bt as _o, c as vo, d as yo, f as bo, g as xo, h as So, ht as Co, i as wo, j as K, k as To, l as Eo, m as Do, n as Oo, o as ko, p as Ao, r as jo, s as Mo, u as No, ut as Po, v as Fo, vt as Io, w as Lo, wt as Ro, x as zo, xt as Bo, y as Vo, yt as Ho } from "./use-restore-focus-BEM7sFWl.js";
|
|
@@ -36,10 +36,10 @@ import { n as Os } from "./dist-CrSP_H1M.js";
|
|
|
36
36
|
import { i as ks } from "./dist-BorMD-uX.js";
|
|
37
37
|
import { n as As, t as js } from "./esm-AMFssoNp.js";
|
|
38
38
|
import { t as Ms } from "./useAsyncData-Deh5kszT.js";
|
|
39
|
-
import { i as Ns, n as Ps, r as Fs } from "./formats-
|
|
39
|
+
import { i as Ns, n as Ps, r as Fs } from "./formats-BGh2thRc.js";
|
|
40
40
|
import { M as Is, N as Ls } from "./vega-loader.browser-DNST6uVf.js";
|
|
41
41
|
import { a as Rs, n as zs } from "./loader-BQOfjTIJ.js";
|
|
42
|
-
import { c as Bs, d as Vs, i as Hs, l as Us, o as Ws, s as Gs, t as Ks, u as qs } from "./code-visibility-
|
|
42
|
+
import { c as Bs, d as Vs, i as Hs, l as Us, o as Ws, s as Gs, t as Ks, u as qs } from "./code-visibility-Cv5Z6gJw.js";
|
|
43
43
|
import { t as Js } from "./useDeepCompareMemoize-DXwzRINI.js";
|
|
44
44
|
import { t as Ys } from "./esm-D2gTsXEV.js";
|
|
45
45
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
@@ -2903,7 +2903,7 @@ function hp(e) {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
//#endregion
|
|
2905
2905
|
//#region ../node_modules/.pnpm/react-hook-form@7.54.2_react@19.3.0/node_modules/react-hook-form/dist/index.esm.mjs
|
|
2906
|
-
var X = y(), gp = /* @__PURE__ */ e(it(), 1), _p =
|
|
2906
|
+
var X = y(), gp = /* @__PURE__ */ e(it(), 1), _p = ha(), vp = (e) => e.type === "checkbox", yp = (e) => e instanceof Date, bp = (e) => e == null, xp = (e) => typeof e == "object", Sp = (e) => !bp(e) && !Array.isArray(e) && xp(e) && !yp(e), Cp = (e) => Sp(e) && e.target ? vp(e.target) ? e.target.checked : e.target.value : e, wp = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Tp = (e, t) => e.has(wp(t)), Ep = (e) => {
|
|
2907
2907
|
let t = e.constructor && e.constructor.prototype;
|
|
2908
2908
|
return Sp(t) && t.hasOwnProperty("isPrototypeOf");
|
|
2909
2909
|
}, Dp = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
@@ -5398,8 +5398,8 @@ var Ag = class {
|
|
|
5398
5398
|
}
|
|
5399
5399
|
async #t(e, t = {}) {
|
|
5400
5400
|
if (!(Tg(e) || t.kernelAuthored === !0 && /^(https?:|data:)/.test(e))) throw Error(`Refusing to load anywidget module from untrusted URL: ${String(e)}`);
|
|
5401
|
-
let n =
|
|
5402
|
-
return
|
|
5401
|
+
let n = da(e).toString();
|
|
5402
|
+
return pa() && (n = Sg(n)), import(
|
|
5403
5403
|
/* @vite-ignore */
|
|
5404
5404
|
n
|
|
5405
5405
|
);
|
|
@@ -5506,7 +5506,7 @@ var Ng = class e {
|
|
|
5506
5506
|
#r;
|
|
5507
5507
|
#i;
|
|
5508
5508
|
#a = new AbortController();
|
|
5509
|
-
#o = new
|
|
5509
|
+
#o = new Sa();
|
|
5510
5510
|
#s = /* @__PURE__ */ new Set();
|
|
5511
5511
|
#c = /* @__PURE__ */ new Map();
|
|
5512
5512
|
#l;
|
|
@@ -5816,7 +5816,7 @@ async function Wg(e, t) {
|
|
|
5816
5816
|
return;
|
|
5817
5817
|
}
|
|
5818
5818
|
e.createModel(n, (e) => {
|
|
5819
|
-
let t =
|
|
5819
|
+
let t = pa() ? {
|
|
5820
5820
|
sendUpdate: async () => void 0,
|
|
5821
5821
|
sendCustomMessage: async () => void 0
|
|
5822
5822
|
} : {
|
|
@@ -6211,7 +6211,7 @@ function f_(e) {
|
|
|
6211
6211
|
}
|
|
6212
6212
|
function p_(e) {
|
|
6213
6213
|
let t = new URL(globalThis.location.href);
|
|
6214
|
-
return
|
|
6214
|
+
return _a({
|
|
6215
6215
|
href: e,
|
|
6216
6216
|
queryParams: t.search,
|
|
6217
6217
|
keys: [os.filePath]
|
|
@@ -9325,7 +9325,7 @@ function lS({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
9325
9325
|
let { input: t, output: a } = i;
|
|
9326
9326
|
n[r] = async (...n) => {
|
|
9327
9327
|
bs(n.length <= 1, `Plugin functions only supports a single argument. Called ${r}`);
|
|
9328
|
-
let i =
|
|
9328
|
+
let i = pa(), o = Ee.findElementThroughShadowDOMs(e)?.id, c = o ? Ee.parse(o) : null;
|
|
9329
9329
|
if (c && !i) {
|
|
9330
9330
|
let e = as.get(Xe), t = e.cellRuntime[c], n = e.cellData[c];
|
|
9331
9331
|
if (He({
|
|
@@ -10067,7 +10067,7 @@ var LS = (e) => {
|
|
|
10067
10067
|
output: t
|
|
10068
10068
|
};
|
|
10069
10069
|
} };
|
|
10070
|
-
} }, US = J.lazy(() => import("./chat-ui-
|
|
10070
|
+
} }, US = J.lazy(() => import("./chat-ui-BDpymeoe.js").then((e) => ({ default: e.Chatbot }))), WS = G(W({
|
|
10071
10071
|
id: U(),
|
|
10072
10072
|
role: Fo([
|
|
10073
10073
|
"system",
|
|
@@ -10533,7 +10533,7 @@ function VC(e, t) {
|
|
|
10533
10533
|
}
|
|
10534
10534
|
//#endregion
|
|
10535
10535
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
10536
|
-
var HC = J.lazy(() => import("./glide-data-editor-
|
|
10536
|
+
var HC = J.lazy(() => import("./glide-data-editor-CiUr65D6.js").then((e) => e.t)), UC = wS("marimo-data-editor", { cssStyles: [qS] }).withData(W({
|
|
10537
10537
|
initialValue: W({ edits: G(W({
|
|
10538
10538
|
rowIdx: K(),
|
|
10539
10539
|
columnId: U(),
|
|
@@ -14846,7 +14846,7 @@ var BE = (e) => {
|
|
|
14846
14846
|
t[66] === se ? ce = t[67] : (ce = [se], t[66] = se, t[67] = ce), (0, J.useEffect)(oe, ce);
|
|
14847
14847
|
let V;
|
|
14848
14848
|
t[68] === e ? V = t[69] : (V = async () => {
|
|
14849
|
-
let t =
|
|
14849
|
+
let t = pa();
|
|
14850
14850
|
return e.totalRows === 0 || !e.showColumnSummaries || t ? {
|
|
14851
14851
|
data: null,
|
|
14852
14852
|
stats: {},
|
|
@@ -14878,7 +14878,7 @@ var BE = (e) => {
|
|
|
14878
14878
|
if (k) {
|
|
14879
14879
|
s.error(k);
|
|
14880
14880
|
let e;
|
|
14881
|
-
t[82] === k ? e = t[83] : (e = !
|
|
14881
|
+
t[82] === k ? e = t[83] : (e = !pa() && /* @__PURE__ */ (0, Y.jsxs)(Ps, {
|
|
14882
14882
|
variant: "destructive",
|
|
14883
14883
|
className: "mb-2",
|
|
14884
14884
|
children: [/* @__PURE__ */ (0, Y.jsx)(Ns, { children: "Error" }), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -14947,7 +14947,7 @@ var HE = (e) => {
|
|
|
14947
14947
|
});
|
|
14948
14948
|
}, t[0] = w, t[1] = T, t[2] = ve) : ve = t[2];
|
|
14949
14949
|
let ye = ve, { locale: be } = Jo(), [xe, Se] = (0, J.useState)(0), { isPanelOpen: Ce, isAnyPanelOpen: we, togglePanel: Te, panelType: Ee, setPanelType: De } = oE(_e, pe), Oe;
|
|
14950
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (Oe =
|
|
14950
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (Oe = pa(), t[3] = Oe) : Oe = t[3];
|
|
14951
14951
|
let ke = Oe, Ae;
|
|
14952
14952
|
bb0: {
|
|
14953
14953
|
if (!D) {
|
|
@@ -21832,7 +21832,7 @@ function $j(e, t) {
|
|
|
21832
21832
|
}
|
|
21833
21833
|
//#endregion
|
|
21834
21834
|
//#region src/plugins/impl/vega/VegaPlugin.tsx
|
|
21835
|
-
var eM = J.lazy(() => import("./vega-component-
|
|
21835
|
+
var eM = J.lazy(() => import("./vega-component-DG29TAB7.js")), tM = class {
|
|
21836
21836
|
tagName = "marimo-vega";
|
|
21837
21837
|
validator = W({
|
|
21838
21838
|
spec: W({}).passthrough().transform((e) => e),
|
|
@@ -22103,7 +22103,7 @@ var oM = class {
|
|
|
22103
22103
|
//#endregion
|
|
22104
22104
|
//#region src/components/editor/chrome/panels/outline/useActiveOutline.tsx
|
|
22105
22105
|
function EM() {
|
|
22106
|
-
return
|
|
22106
|
+
return ya() === "edit" ? document.getElementById("App") : void 0;
|
|
22107
22107
|
}
|
|
22108
22108
|
function DM(e) {
|
|
22109
22109
|
let t = (0, X.c)(7), [n, r] = (0, J.useState)(void 0), [i, a] = (0, J.useState)(void 0), o = (0, J.useRef)(null), s = (0, J.useRef)(null), c;
|
|
@@ -30107,8 +30107,8 @@ function OR(e) {
|
|
|
30107
30107
|
}
|
|
30108
30108
|
//#endregion
|
|
30109
30109
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
30110
|
-
var kR = J.lazy(() => import("./reveal-component-
|
|
30111
|
-
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = ns(
|
|
30110
|
+
var kR = J.lazy(() => import("./reveal-component-hAqwoa_n.js")), AR = (e) => {
|
|
30111
|
+
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = ns(ga), s = a === "read" || o, c = ns(gt) > 1, [l, u] = (0, J.useState)(null), d;
|
|
30112
30112
|
t[0] !== i || t[1] !== n ? (d = EP(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
30113
30113
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
30114
30114
|
t[3] !== l || t[4] !== f || t[5] !== g ? (_ = l ? f.findIndex((e) => e.id === l) : g, t[3] = l, t[4] = f, t[5] = g, t[6] = _) : _ = t[6];
|
|
@@ -30333,7 +30333,7 @@ var zR = (e) => {
|
|
|
30333
30333
|
let v;
|
|
30334
30334
|
t[17] === n ? v = t[18] : (v = () => n("help"), t[17] = n, t[18] = v);
|
|
30335
30335
|
let y;
|
|
30336
|
-
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(
|
|
30336
|
+
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(ua, {
|
|
30337
30337
|
fontSize: 36,
|
|
30338
30338
|
className: "w-5 h-5"
|
|
30339
30339
|
}), t[19] = y) : y = t[19];
|
|
@@ -30763,10 +30763,10 @@ function dz(e, t) {
|
|
|
30763
30763
|
function fz({ showCodeInRunModePreference: e, kioskMode: t }) {
|
|
30764
30764
|
if (!e) return !1;
|
|
30765
30765
|
let n = new URLSearchParams(window.location.search).get(os.showCode);
|
|
30766
|
-
return n === null ?
|
|
30766
|
+
return n === null ? pa() || fa() || t : n === "true";
|
|
30767
30767
|
}
|
|
30768
30768
|
function pz(e) {
|
|
30769
|
-
|
|
30769
|
+
pa() && ma((t) => {
|
|
30770
30770
|
t.set(os.showCode, String(e));
|
|
30771
30771
|
});
|
|
30772
30772
|
}
|
|
@@ -30799,7 +30799,7 @@ var gz = (e) => {
|
|
|
30799
30799
|
children: h
|
|
30800
30800
|
}), t[12] = s, t[13] = h, t[14] = g) : g = t[14], g;
|
|
30801
30801
|
}, _z = (e) => {
|
|
30802
|
-
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = dz(n.length, i), o = ns(
|
|
30802
|
+
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = dz(n.length, i), o = ns(ga), s = ns(Ws), [l] = fs(), u = ns(Hs), d;
|
|
30803
30803
|
t[0] !== o || t[1] !== u ? (d = () => fz({
|
|
30804
30804
|
showCodeInRunModePreference: u,
|
|
30805
30805
|
kioskMode: o
|
|
@@ -30888,7 +30888,7 @@ var gz = (e) => {
|
|
|
30888
30888
|
Zr(new Blob([e.contents], { type: "text/plain" }), cn.toPY(document.title));
|
|
30889
30889
|
}, t[0] = a, t[1] = l);
|
|
30890
30890
|
let u = l, d;
|
|
30891
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d =
|
|
30891
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = pa(), t[2] = d) : d = t[2];
|
|
30892
30892
|
let f = d, p;
|
|
30893
30893
|
if (t[3] !== n || t[4] !== u || t[5] !== i || t[6] !== r) {
|
|
30894
30894
|
if (p = [], n) {
|
|
@@ -30957,7 +30957,7 @@ var gz = (e) => {
|
|
|
30957
30957
|
} else p = t[7];
|
|
30958
30958
|
if (p.length === 0) return null;
|
|
30959
30959
|
let m;
|
|
30960
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = c("right-0 top-0 z-50 m-4 print:hidden flex gap-2",
|
|
30960
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = c("right-0 top-0 z-50 m-4 print:hidden flex gap-2", pa() ? "absolute" : "fixed"), t[22] = m) : m = t[22];
|
|
30961
30961
|
let h;
|
|
30962
30962
|
t[23] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(Ki, {
|
|
30963
30963
|
asChild: !0,
|
|
@@ -31775,7 +31775,7 @@ function xB() {
|
|
|
31775
31775
|
//#region src/core/islands/bootstrap.ts
|
|
31776
31776
|
async function SB(e) {
|
|
31777
31777
|
let t = e.store || as, n = e.root || document, r = e.bridge;
|
|
31778
|
-
t.set(ye, r), t.set(
|
|
31778
|
+
t.set(ye, r), t.set(va, "read"), t.set(Us, null), e.autoInitializePlugins !== !1 && rN();
|
|
31779
31779
|
let i = Array.from(n.querySelectorAll(vu.ISLAND));
|
|
31780
31780
|
if (i.length === 0) {
|
|
31781
31781
|
s.log("No islands found, skipping initialization");
|
|
@@ -32149,12 +32149,12 @@ var BB = class {
|
|
|
32149
32149
|
store;
|
|
32150
32150
|
root;
|
|
32151
32151
|
session;
|
|
32152
|
-
sessionReady = new
|
|
32152
|
+
sessionReady = new Sa();
|
|
32153
32153
|
nextSessionGeneration = 0;
|
|
32154
32154
|
activeSessionGenerations = /* @__PURE__ */ new Set();
|
|
32155
32155
|
appTransition = Promise.resolve();
|
|
32156
|
-
workerReady = new
|
|
32157
|
-
initialized = new
|
|
32156
|
+
workerReady = new Sa();
|
|
32157
|
+
initialized = new Sa();
|
|
32158
32158
|
constructor(e = {}) {
|
|
32159
32159
|
this.store = e.store || as, this.root = e.root || document;
|
|
32160
32160
|
try {
|
|
@@ -32197,7 +32197,7 @@ var BB = class {
|
|
|
32197
32197
|
appId: n.id,
|
|
32198
32198
|
sessionGeneration: ++this.nextSessionGeneration
|
|
32199
32199
|
}, a = this.session, o = t && a !== void 0;
|
|
32200
|
-
this.activeSessionGenerations.add(r.sessionGeneration), o && this.store.set(Xe, Tt()), (t || !a) && (t && this.sessionReady.status !== "pending" && (this.sessionReady = new
|
|
32200
|
+
this.activeSessionGenerations.add(r.sessionGeneration), o && this.store.set(Xe, Tt()), (t || !a) && (t && this.sessionReady.status !== "pending" && (this.sessionReady = new Sa()), this.session = {
|
|
32201
32201
|
...r,
|
|
32202
32202
|
code: t ? e : void 0
|
|
32203
32203
|
});
|
|
@@ -32215,7 +32215,7 @@ var BB = class {
|
|
|
32215
32215
|
t?.code === void 0 || e && t.appId !== e || (this.activeSessionGenerations.delete(t.sessionGeneration), await this.rpc.proxy.request.stopSession({
|
|
32216
32216
|
appId: t.appId,
|
|
32217
32217
|
sessionGeneration: t.sessionGeneration
|
|
32218
|
-
}), this.store.set(Us, null), this.session = void 0, this.sessionReady = new
|
|
32218
|
+
}), this.store.set(Us, null), this.session = void 0, this.sessionReady = new Sa(), this.store.set(Xe, Tt()));
|
|
32219
32219
|
});
|
|
32220
32220
|
}
|
|
32221
32221
|
enqueueAppTransition(e) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
2
|
import { t } from "./react-sHtZdjeP.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-CiUr65D6.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.17.21_marked@15.0.12_react-dom@19.3.0_aca11a353ce3b112922852200b9c160f/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",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as e } from "./html-to-image-
|
|
1
|
+
import { O as e } from "./html-to-image-CZY1pIZH.js";
|
|
2
2
|
import { h as t } from "./tooltip-BO1REbqs.js";
|
|
3
|
-
import { b as n, y as r } from "./cells-
|
|
3
|
+
import { b as n, y as r } from "./cells-C8iCYvLU.js";
|
|
4
4
|
import { b as i } from "./select-BButFi-d.js";
|
|
5
5
|
import { n as a } from "./semaphore-89jsoHtS.js";
|
|
6
6
|
var o = t("file", [["path", {
|
|
@@ -3,15 +3,15 @@ import { c as t, g as n, h as r, m as i, t as a } from "./button-CvjkwdSk.js";
|
|
|
3
3
|
import { t as o } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-BO1REbqs.js";
|
|
6
|
-
import { w as u } from "./cells-
|
|
7
|
-
import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-
|
|
6
|
+
import { w as u } from "./cells-C8iCYvLU.js";
|
|
7
|
+
import { $ as d, Q as f, Z as p, an as m, i as h, l as g, ln as _, n as v, on as y, r as b, t as x, u as S } from "./common-B7IjNlZf.js";
|
|
8
8
|
import { M as C } from "./select-BButFi-d.js";
|
|
9
9
|
import { q as ee } from "./dropdown-menu-CP_qCYHC.js";
|
|
10
|
-
import {
|
|
10
|
+
import { g as w } from "./toDate-BNJf01u1.js";
|
|
11
11
|
import { t as T } from "./jsx-runtime-3BD1kT0s.js";
|
|
12
12
|
import { q as E } from "./use-restore-focus-BEM7sFWl.js";
|
|
13
13
|
import { A as D, C as O, b as k } from "./useTheme-CRnjkku0.js";
|
|
14
|
-
import { a as A, n as te, t as ne } from "./code-visibility-
|
|
14
|
+
import { a as A, n as te, t as ne } from "./code-visibility-Cv5Z6gJw.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
var j = c("sticky-note", [["path", {
|
|
17
17
|
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",
|
|
@@ -686,7 +686,7 @@ function ee(e) {
|
|
|
686
686
|
}
|
|
687
687
|
//#endregion
|
|
688
688
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js
|
|
689
|
-
var te = 365.2425, ne = 6048e5, re = 864e5,
|
|
689
|
+
var te = 365.2425, ne = 6048e5, re = 864e5, Z = 86400;
|
|
690
690
|
Z * 7, Z * te / 12 * 3;
|
|
691
691
|
var Q = Symbol.for("constructDateFrom");
|
|
692
692
|
//#endregion
|
|
@@ -696,8 +696,8 @@ function $(e, t) {
|
|
|
696
696
|
}
|
|
697
697
|
//#endregion
|
|
698
698
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
|
|
699
|
-
function
|
|
699
|
+
function ie(e, t) {
|
|
700
700
|
return $(t || e, e);
|
|
701
701
|
}
|
|
702
702
|
//#endregion
|
|
703
|
-
export {
|
|
703
|
+
export { u as S, x as _, ee as a, p as b, H as c, k as d, D as f, b as g, y as h, ne as i, M as l, v as m, $ as n, X as o, g as p, re as r, U as s, ie as t, j as u, _ as v, f as x, m as y };
|
|
@@ -3,7 +3,7 @@ import { g as t, h as n, m as r, o as i } from "./button-CvjkwdSk.js";
|
|
|
3
3
|
import { t as a } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as o } from "./compiler-runtime-CldRdSsv.js";
|
|
5
5
|
import { t as s } from "./tooltip-BO1REbqs.js";
|
|
6
|
-
import {
|
|
6
|
+
import { S as c, a as l } from "./toDate-BNJf01u1.js";
|
|
7
7
|
import { t as u } from "./jsx-runtime-3BD1kT0s.js";
|
|
8
8
|
import { n as d } from "./error-banner-Da600cwz.js";
|
|
9
9
|
import { t as f } from "./debounce-C3jyATpc.js";
|
|
@@ -11,7 +11,7 @@ import { A as p, n as ee } from "./useTheme-CRnjkku0.js";
|
|
|
11
11
|
import { c as m } from "./arrays-CN1djC4k.js";
|
|
12
12
|
import { t as te } from "./objects-CzUgoMIF.js";
|
|
13
13
|
import { t as h } from "./useAsyncData-Deh5kszT.js";
|
|
14
|
-
import { a as ne, i as re, n as ie, t as g } from "./formats-
|
|
14
|
+
import { a as ne, i as re, n as ie, t as g } from "./formats-BGh2thRc.js";
|
|
15
15
|
import { M as ae, n as oe } from "./vega-loader.browser-DNST6uVf.js";
|
|
16
16
|
import { t as se } from "./react-vega-BED0DjiB.js";
|
|
17
17
|
import { a as ce, n as _ } from "./loader-BQOfjTIJ.js";
|
package/package.json
CHANGED
|
@@ -50,6 +50,36 @@ describe("applyFormat", () => {
|
|
|
50
50
|
}),
|
|
51
51
|
).toBe("10/1/23, 12:00:00 PM UTC");
|
|
52
52
|
});
|
|
53
|
+
|
|
54
|
+
it("should treat naive datetime strings as UTC", () => {
|
|
55
|
+
const naive = "2023-10-01 23:30:00";
|
|
56
|
+
expect(
|
|
57
|
+
applyFormat(naive, { locale, format: "Date", dataType: "datetime" }),
|
|
58
|
+
).toBe("10/1/23");
|
|
59
|
+
expect(
|
|
60
|
+
applyFormat(naive, {
|
|
61
|
+
locale,
|
|
62
|
+
format: "Datetime",
|
|
63
|
+
dataType: "datetime",
|
|
64
|
+
}),
|
|
65
|
+
).toBe("10/1/23, 11:30:00 PM UTC");
|
|
66
|
+
expect(
|
|
67
|
+
applyFormat(naive, { locale, format: "Time", dataType: "datetime" }),
|
|
68
|
+
).toBe("11:30:00 PM UTC");
|
|
69
|
+
expect(
|
|
70
|
+
applyFormat("2023-10-01T23:30:00.250", {
|
|
71
|
+
locale,
|
|
72
|
+
format: "Time",
|
|
73
|
+
dataType: "datetime",
|
|
74
|
+
}),
|
|
75
|
+
).toBe("11:30:00 PM UTC");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("should keep the calendar date for date-only strings", () => {
|
|
79
|
+
expect(
|
|
80
|
+
applyFormat("2023-10-01", { locale, format: "Date", dataType: "date" }),
|
|
81
|
+
).toBe("10/1/23");
|
|
82
|
+
});
|
|
53
83
|
});
|
|
54
84
|
|
|
55
85
|
describe("number formatting", () => {
|
|
@@ -1268,6 +1268,76 @@ describe("renderCellValue with datetime values", () => {
|
|
|
1268
1268
|
}).not.toThrow();
|
|
1269
1269
|
});
|
|
1270
1270
|
});
|
|
1271
|
+
|
|
1272
|
+
it("should render the column format for datetime strings", () => {
|
|
1273
|
+
const mockColumn = {
|
|
1274
|
+
...createMockColumn(),
|
|
1275
|
+
getColumnFormatting: () => "Date",
|
|
1276
|
+
applyColumnFormatting: () => "FORMATTED",
|
|
1277
|
+
} as unknown as Column<unknown>;
|
|
1278
|
+
|
|
1279
|
+
const selectCell = vi.fn();
|
|
1280
|
+
const result = renderCellValue({
|
|
1281
|
+
column: mockColumn,
|
|
1282
|
+
renderValue: () => "2024-06-14 12:34:20",
|
|
1283
|
+
getValue: () => "2024-06-14 12:34:20",
|
|
1284
|
+
selectCell,
|
|
1285
|
+
cellStyles: "cell-styles",
|
|
1286
|
+
});
|
|
1287
|
+
const { container } = render(
|
|
1288
|
+
<I18nProvider locale="en-US">
|
|
1289
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1290
|
+
</I18nProvider>,
|
|
1291
|
+
);
|
|
1292
|
+
expect(container.textContent).toContain("FORMATTED");
|
|
1293
|
+
expect(container.textContent).not.toContain("2024-06-14 12:34:20");
|
|
1294
|
+
|
|
1295
|
+
const wrapper = container.querySelector(".cell-styles");
|
|
1296
|
+
expect(wrapper).not.toBeNull();
|
|
1297
|
+
wrapper?.dispatchEvent(new MouseEvent("click", { bubbles: true }));
|
|
1298
|
+
expect(selectCell).toHaveBeenCalledTimes(1);
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
it("should render the column format for Date instances", () => {
|
|
1302
|
+
const mockColumn = {
|
|
1303
|
+
...createMockColumn(),
|
|
1304
|
+
getColumnFormatting: () => "Date",
|
|
1305
|
+
applyColumnFormatting: () => "FORMATTED",
|
|
1306
|
+
} as unknown as Column<unknown>;
|
|
1307
|
+
const value = new Date("2024-06-14T12:34:20Z");
|
|
1308
|
+
|
|
1309
|
+
const result = renderCellValue({
|
|
1310
|
+
column: mockColumn,
|
|
1311
|
+
renderValue: () => value,
|
|
1312
|
+
getValue: () => value,
|
|
1313
|
+
selectCell: undefined,
|
|
1314
|
+
cellStyles: "",
|
|
1315
|
+
});
|
|
1316
|
+
const { container } = render(
|
|
1317
|
+
<I18nProvider locale="en-US">
|
|
1318
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1319
|
+
</I18nProvider>,
|
|
1320
|
+
);
|
|
1321
|
+
expect(container.textContent).toContain("FORMATTED");
|
|
1322
|
+
});
|
|
1323
|
+
|
|
1324
|
+
it("should keep the raw string when no column format is set", () => {
|
|
1325
|
+
const mockColumn = createMockColumn();
|
|
1326
|
+
|
|
1327
|
+
const result = renderCellValue({
|
|
1328
|
+
column: mockColumn,
|
|
1329
|
+
renderValue: () => "2024-06-14",
|
|
1330
|
+
getValue: () => "2024-06-14",
|
|
1331
|
+
selectCell: undefined,
|
|
1332
|
+
cellStyles: "",
|
|
1333
|
+
});
|
|
1334
|
+
const { container } = render(
|
|
1335
|
+
<I18nProvider locale="en-US">
|
|
1336
|
+
<TooltipProvider>{result}</TooltipProvider>
|
|
1337
|
+
</I18nProvider>,
|
|
1338
|
+
);
|
|
1339
|
+
expect(container.textContent).toContain("2024-06-14");
|
|
1340
|
+
});
|
|
1271
1341
|
});
|
|
1272
1342
|
|
|
1273
1343
|
test("column_widths sets fixed size and meta.width", () => {
|
|
@@ -97,6 +97,7 @@ export const getFormatters = memoizeLastValue((locale: string) => {
|
|
|
97
97
|
|
|
98
98
|
const dateFormatter = new Intl.DateTimeFormat(locale, {
|
|
99
99
|
dateStyle: "short", // 3/4/2024
|
|
100
|
+
timeZone: "UTC",
|
|
100
101
|
});
|
|
101
102
|
|
|
102
103
|
const dateTimeFormatter = new Intl.DateTimeFormat(locale, {
|
|
@@ -123,6 +124,24 @@ export const getFormatters = memoizeLastValue((locale: string) => {
|
|
|
123
124
|
};
|
|
124
125
|
});
|
|
125
126
|
|
|
127
|
+
const TIMEZONE_SUFFIX = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* The date formatters render in UTC. A naive datetime string carries no
|
|
131
|
+
* offset, and `new Date` would read it as local time, so pin it to UTC
|
|
132
|
+
* to keep the wall-clock fields the backend sent.
|
|
133
|
+
*/
|
|
134
|
+
function parseDateAsUTC(value: unknown): Date {
|
|
135
|
+
if (typeof value !== "string") {
|
|
136
|
+
return new Date(value as number | Date);
|
|
137
|
+
}
|
|
138
|
+
const trimmed = value.trim();
|
|
139
|
+
if (TIMEZONE_SUFFIX.test(trimmed) || !trimmed.includes(":")) {
|
|
140
|
+
return new Date(trimmed);
|
|
141
|
+
}
|
|
142
|
+
return new Date(`${trimmed.replace(" ", "T")}Z`);
|
|
143
|
+
}
|
|
144
|
+
|
|
126
145
|
// Apply formatting to a value given a format and data type
|
|
127
146
|
export const applyFormat = (
|
|
128
147
|
value: unknown,
|
|
@@ -152,7 +171,7 @@ export const applyFormat = (
|
|
|
152
171
|
return value;
|
|
153
172
|
case "datetime":
|
|
154
173
|
case "date": {
|
|
155
|
-
const date =
|
|
174
|
+
const date = parseDateAsUTC(value);
|
|
156
175
|
switch (format) {
|
|
157
176
|
case "Date":
|
|
158
177
|
return dateFormatter.format(date);
|