@marimo-team/frontend 0.25.3-dev4 → 0.25.3-dev40
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/assets/CellStatus-BGIWF94J.js +1 -0
- package/dist/assets/{ConnectedDataExplorerComponent-t8fH_TNc.js → ConnectedDataExplorerComponent-D9UK8o9A.js} +1 -1
- package/dist/assets/{ErrorBoundary-Gl5nCA8C.js → ErrorBoundary-hliG40Pk.js} +2 -2
- package/dist/assets/JsonOutput-9tmC-p6h.js +11 -0
- package/dist/assets/{LazyAnyLanguageCodeMirror-CKcCbG2G.js → LazyAnyLanguageCodeMirror-BPYE76jR.js} +2 -2
- package/dist/assets/MarimoErrorOutput-BaHdbtck.js +10 -0
- package/dist/assets/{RenderHTML-BbOqmHy3.js → RenderHTML-B1FzB5NY.js} +1 -1
- package/dist/assets/{RunButton-CK3LhnP5.js → RunButton-DpGokdF1.js} +1 -1
- package/dist/assets/{add-cell-with-ai-8UBC0xwR.js → add-cell-with-ai-BYWG0iKO.js} +13 -13
- package/dist/assets/{add-connection-dialog-DXQnd6eB.js → add-connection-dialog-BWbUVPJk.js} +2 -2
- package/dist/assets/{agent-panel-DdkVL-Kx.js → agent-panel-DKNiQrAl.js} +5 -5
- package/dist/assets/ai-model-dropdown-CIg9eu47.js +13 -0
- package/dist/assets/{alert-dialog-BaPGzeOK.js → alert-dialog-C-sWmKva.js} +1 -1
- package/dist/assets/any-language-editor-DUMe1UCk.js +1 -0
- package/dist/assets/{app-config-button-BKEG4x9u.js → app-config-button-BvkL2eSY.js} +1 -1
- package/dist/assets/arrays-0R2reF2y.js +1 -0
- package/dist/assets/{blob-D5nfNHOo.js → blob-BQfLiwKr.js} +1 -1
- package/dist/assets/{button-COI-NGrx.js → button-D8gVKwe-.js} +1 -1
- package/dist/assets/{cache-panel-DTY1dqvi.js → cache-panel-Byolv2ht.js} +1 -1
- package/dist/assets/{capabilities-BJvf-MD4.js → capabilities-Pq1YNPlK.js} +1 -1
- package/dist/assets/{cell-editor-32lVhib7.js → cell-editor-BKKUv4d5.js} +9 -9
- package/dist/assets/{cell-link-LSth_8hT.js → cell-link-B_QkRkm-.js} +1 -1
- package/dist/assets/{cells-BRkCaSsh.js → cells-CdH98VSn.js} +31 -31
- package/dist/assets/{chat-display-Dnagy4Nv.js → chat-display-CNbRSebo.js} +1 -1
- package/dist/assets/{chat-panel-DN9vsbgS.js → chat-panel-HbEKDf0c.js} +2 -2
- package/dist/assets/{chat-ui-Df8Vcj6n.js → chat-ui-BwMev8Bf.js} +1 -1
- package/dist/assets/{circle-DXf-VWZG.js → circle-B6D_6D8w.js} +1 -1
- package/dist/assets/code-visibility-sQ37CBNo.js +1 -0
- package/dist/assets/coerce-DWjFeXOY.js +1 -0
- package/dist/assets/{column-preview-CHK_DNrs.js → column-preview-CsEBzIUE.js} +1 -1
- package/dist/assets/command-palette-BzZ86pUz.js +1 -0
- package/dist/assets/{common-Cu6CDbuw.js → common-S2v8dsEy.js} +1 -1
- package/dist/assets/{components-CGw16R_N.js → components-D-TnFWjo.js} +1 -1
- package/dist/assets/{components-CP_UoFtT.js → components-DrU8dOzy.js} +1 -1
- package/dist/assets/{components-CXfO-F47.js → components-lDm0qi2t.js} +1 -1
- package/dist/assets/config-BoBwH7CU.js +1 -0
- package/dist/assets/config-CYsbZpwa.js +104 -0
- package/dist/assets/config-DGX7JYor.js +1 -0
- package/dist/assets/{copy-D8O_CYCG.js → copy-KlhazlhB.js} +1 -1
- package/dist/assets/{copy-icon-BIiRXh_3.js → copy-icon-8-a5vovc.js} +1 -1
- package/dist/assets/{createReducer-DgRODTW6.js → createReducer-HKXUbqyz.js} +1 -1
- package/dist/assets/{datasource-Cq6x_5ML.js → datasource-BA7YF4eo.js} +1 -1
- package/dist/assets/{dates-CfmdTL6B.js → dates-CQMwFko2.js} +1 -1
- package/dist/assets/{dependency-graph-panel--Kgtktcw.js → dependency-graph-panel-DsjI61Qa.js} +1 -1
- package/dist/assets/{dist-iaThVDkA.js → dist-jlhMTKo_.js} +1 -1
- package/dist/assets/{documentation-panel-BHmbeznw.js → documentation-panel-hk3IdeXy.js} +1 -1
- package/dist/assets/{download-DCJXy66H.js → download-CCZkq0y4.js} +1 -1
- package/dist/assets/{dropdown-menu-C1rnl-0o.js → dropdown-menu-DS6umAnH.js} +1 -1
- package/dist/assets/edit-page-BgS6tjth.js +9 -0
- package/dist/assets/{error-banner-Cd69vvyX.js → error-banner-B5kzVf_0.js} +1 -1
- package/dist/assets/{error-entries-Dk3VZ-OK.js → error-entries-BVXrGOTZ.js} +1 -1
- package/dist/assets/{error-panel-BPRYmC5J.js → error-panel-DYethUUR.js} +1 -1
- package/dist/assets/{errors-DCrsa1nH.js → errors-CNsgAw6m.js} +1 -1
- package/dist/assets/{es-Cqst59WX.js → es-N9SHpmG7.js} +1 -1
- package/dist/assets/feedback-button-DDzObtF2.js +1 -0
- package/dist/assets/{feedback-button-Bik2-e33.js → feedback-button-DaNc3uJa.js} +2 -2
- package/dist/assets/{file-explorer-panel-BmekFu7T.js → file-explorer-panel-CqnzSSYc.js} +1 -1
- package/dist/assets/{file-name-input-Cdc-TVqO.js → file-name-input-D4AvwZV9.js} +1 -1
- package/dist/assets/{floating-outline-XD9FAV-f.js → floating-outline-CTy-Iakk.js} +1 -1
- package/dist/assets/{formats-yZ06h1Pl.js → formats-zylfwejq.js} +1 -1
- package/dist/assets/{formatting-BqrP-n49.js → formatting-uom1es4b.js} +1 -1
- package/dist/assets/{fullscreen-B9tHcfpV.js → fullscreen-BWTs8pYZ.js} +1 -1
- package/dist/assets/{gallery-page-Dm6mGwBi.js → gallery-page-ByjlvM6k.js} +1 -1
- package/dist/assets/{ganttDiagram-EL5Y4UJY-2n7Ig5Jm.js → ganttDiagram-EL5Y4UJY-CYqkCfFG.js} +1 -1
- package/dist/assets/{glide-data-editor-J9CAb70d.js → glide-data-editor-CABBj2b0.js} +2 -2
- package/dist/assets/{glide-utils-CIrAxdjv.js → glide-utils-HFqhvWHI.js} +2 -2
- package/dist/assets/{home-page-s3LUizSn.js → home-page-DejRSjeJ.js} +3 -3
- package/dist/assets/hooks-BJgCcVXZ.js +1 -0
- package/dist/assets/{html-to-image-DK9Zl1lU.js → html-to-image-D_0rd3_B.js} +1 -1
- package/dist/assets/index-ChfDZJzP.css +2 -0
- package/dist/assets/index-PDJQd7X6.js +30 -0
- package/dist/assets/{input-BoBxR50a.js → input-ByHt6aoV.js} +1 -1
- package/dist/assets/{kiosk-mode-BZECfg9k.js → kiosk-mode-BGmMSc7A.js} +1 -1
- package/dist/assets/{layout-B_GMOySr.js → layout-Ct0rjb-5.js} +5 -5
- package/dist/assets/linear-Bma8J3iM.js +1 -0
- package/dist/assets/links-CXcpNIM0.js +1 -0
- package/dist/assets/{logs-panel-ABM16htT.js → logs-panel-TyeqEvOY.js} +1 -1
- package/dist/assets/{markdown-renderer-BG3sp2rs.js → markdown-renderer-BFyD6Jhs.js} +1 -1
- package/dist/assets/{menu-items-BrwnTgyK.js → menu-items-BgUyNUpu.js} +1 -1
- package/dist/assets/{mermaid-a3xYymTy.js → mermaid-B6mqMm5_.js} +2 -2
- package/dist/assets/{name-cell-input-BgEBmqyL.js → name-cell-input-D-0VF3qd.js} +1 -1
- package/dist/assets/numbers-CsZVw3Dc.js +1 -0
- package/dist/assets/{objects-snlMn4yk.js → objects-rLPlQ3X_.js} +1 -1
- package/dist/assets/{once-Haz_uxEL.js → once-6KNTRW0u.js} +1 -1
- package/dist/assets/{outline-panel-DCXQ3_F6.js → outline-panel-DMTjk2WC.js} +1 -1
- package/dist/assets/{packages-panel-BMGOmZkR.js → packages-panel-DrT69k9L.js} +1 -1
- package/dist/assets/{panel-accordion-state-C1sdPp0m.js → panel-accordion-state-Ban6j---.js} +1 -1
- package/dist/assets/panels-BLYQRkEc.js +4 -0
- package/dist/assets/precisionRound-BxlUs8G4.js +1 -0
- package/dist/assets/process-output-DzpQYlpY.js +1 -0
- package/dist/assets/{quadrantDiagram-AXDQQJYC-yBhCDI7E.js → quadrantDiagram-AXDQQJYC-D9KH5Zge.js} +1 -1
- package/dist/assets/react-vega-BTNeboR2.js +189 -0
- package/dist/assets/{readonly-code-display-Do50PHI8.js → readonly-code-display-Cyn3k5TX.js} +1 -1
- package/dist/assets/{readonly-python-code-DCSMIsTX.js → readonly-python-code-DrXDDAnA.js} +1 -1
- package/dist/assets/{renderShortcut-BkVJQ_Zh.js → renderShortcut-H60uiHBp.js} +1 -1
- package/dist/assets/{reveal-component-CLE6vB1Z.js → reveal-component-_lKImPWP.js} +3 -3
- package/dist/assets/{run-page-Depd6lEE.js → run-page-7UNg--Rj.js} +1 -1
- package/dist/assets/{runs-BLp5jezv.js → runs-6lJxKV1w.js} +1 -1
- package/dist/assets/{runtime-details-state-CSPobEdR.js → runtime-details-state-CKOKhMhv.js} +1 -1
- package/dist/assets/{schemas-Dv42wLFq.js → schemas-ChRqMOTL.js} +1 -1
- package/dist/assets/{scratchpad-panel-lc6jmpjv.js → scratchpad-panel-C7h4MgqN.js} +1 -1
- package/dist/assets/{scroll-to-bottom-button-1FyowpWV.js → scroll-to-bottom-button-CIkON2WJ.js} +1 -1
- package/dist/assets/{secrets-panel-Bctbtkrp.js → secrets-panel-CmLZsNfp.js} +1 -1
- package/dist/assets/{select-DTBn5eTb.js → select-3CVGlYrC.js} +1 -1
- package/dist/assets/{session-DqoWmb7X.js → session-B8Y-GJnS.js} +1 -1
- package/dist/assets/session-panel-CLiWXc5y.js +1 -0
- package/dist/assets/{snippets-panel-Bh1oTw4m.js → snippets-panel-Wrqaorxa.js} +1 -1
- package/dist/assets/{spec-BfSBcO5B.js → spec-uCpVvaAR.js} +1 -1
- package/dist/assets/{state-uwRvJLb8.js → state-BY4_P6ko.js} +1 -1
- package/dist/assets/{state-BAJYRhmO.js → state-C0irhlOZ.js} +1 -1
- package/dist/assets/{state-DxQnC_1I.js → state-Ck7FMD5A.js} +1 -1
- package/dist/assets/{state-C3oDoyFe.js → state-DaWgt-rn.js} +1 -1
- package/dist/assets/state-TVREh4u4.js +3 -0
- package/dist/assets/{state-XsPO8hNi.js → state-_uXVmwuN.js} +1 -1
- package/dist/assets/{strings-B2vv-ENv.js → strings-C25fhMR_.js} +1 -1
- package/dist/assets/{swiper-component-a07domrZ.js → swiper-component-CRGRy5_O.js} +1 -1
- package/dist/assets/{switch-CTaiAjrz.js → switch-1h011wlH.js} +1 -1
- package/dist/assets/{tabs-BuQlZFbt.js → tabs-CY8E4r9U.js} +1 -1
- package/dist/assets/{terminal-Ck_vK-34.js → terminal-Dp5gyJ7l.js} +3 -3
- package/dist/assets/{time-MgToa8VM.js → time-DswSXBDk.js} +1 -1
- package/dist/assets/{toast-BGzLGnvw.js → toast-Gzxi-le_.js} +1 -1
- package/dist/assets/tooltip-Brya4Ghn.js +61 -0
- package/dist/assets/{tooltip-C9TuY18o.js → tooltip-CkGm8X7m.js} +1 -1
- package/dist/assets/tracing-fUNLyKuj.js +1 -0
- package/dist/assets/{tracing-panel-PeRXHD8_.js → tracing-panel-Cx4OqOoP.js} +2 -2
- package/dist/assets/{tree-actions-GM5E_bUs.js → tree-actions-B1vsdenY.js} +1 -1
- package/dist/assets/{use-restore-focus-BxEGwIbk.js → use-restore-focus-DdS7Tl0F.js} +1 -1
- package/dist/assets/{useAddCell-GR7eEQrT.js → useAddCell-DZ-50qEG.js} +1 -1
- package/dist/assets/useAsyncData-DhhdOGGd.js +1 -0
- package/dist/assets/{useBoolean-BDD6_xQQ.js → useBoolean-5g-bBaYF.js} +1 -1
- package/dist/assets/{useCellActionButton-B-9eG5z_.js → useCellActionButton-DINnRstv.js} +1 -1
- package/dist/assets/{useDeleteCell-2_bMClHd.js → useDeleteCell-CREJXVNp.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-k3C3M18S.js → useDependencyPanelTab-Cw5VT16Q.js} +1 -1
- package/dist/assets/{useEventListener-D9cftcHj.js → useEventListener-CjDeLqFC.js} +1 -1
- package/dist/assets/{useIframeCapabilities-CwTkczVN.js → useIframeCapabilities-Czr9e4uG.js} +1 -1
- package/dist/assets/{useInstallPackage-iX1eufdl.js → useInstallPackage-Cw0dVELh.js} +1 -1
- package/dist/assets/{useInterval--x3s1VpI.js → useInterval-DJdQmXnq.js} +1 -1
- package/dist/assets/useNotebookActions-B4av4mLc.js +1 -0
- package/dist/assets/{useRunCells-B2vUhREg.js → useRunCells-BHBMk9zW.js} +1 -1
- package/dist/assets/{useSplitCell-DEb03htp.js → useSplitCell-DAgwZV0q.js} +1 -1
- package/dist/assets/{useTheme-COhSHkCj.js → useTheme-DLtPc-39.js} +1 -1
- package/dist/assets/{utils-CaQYvazl.js → utils-DfElfBpz.js} +1 -1
- package/dist/assets/vega-component-pQE2mKc1.js +1 -0
- package/dist/assets/{vega-embed-container-DJPNkHPb.js → vega-embed-container-DtArSJz1.js} +1 -1
- package/dist/assets/vega-loader.browser-Bu25TKax.js +6 -0
- package/dist/assets/{write-secret-modal-DzKAInL2.js → write-secret-modal-usRSi1bb.js} +1 -1
- package/dist/assets/{xychartDiagram-S5SC5T6Z-KbGzG6-u.js → xychartDiagram-S5SC5T6Z-CeRnBS5e.js} +1 -1
- package/dist/index.html +76 -77
- package/package.json +4 -2
- package/src/__tests__/fixtures/{pair-preview.ts → pair-config.ts} +3 -2
- package/src/__tests__/mount.test.ts +28 -8
- package/src/components/app-config/ai-config.tsx +5 -1
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +329 -6
- package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
- package/src/components/data-table/columns.tsx +2 -1
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +192 -116
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +2 -2
- package/src/components/data-table/schemas.ts +14 -36
- package/src/components/editor/Output.tsx +9 -2
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +80 -252
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +186 -34
- package/src/components/editor/actions/pair-with-agent-commands.ts +42 -51
- package/src/components/editor/actions/pair-with-agent-modal.tsx +96 -36
- package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
- package/src/components/editor/chrome/panels/error-panel.tsx +1 -0
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +366 -0
- package/src/components/editor/chrome/wrapper/footer-item.tsx +32 -24
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +237 -0
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- package/src/components/editor/connections/components.tsx +1 -1
- package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
- package/src/components/editor/controls/command-palette.tsx +22 -10
- package/src/components/editor/dynamic-favicon.tsx +21 -40
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +537 -0
- package/src/components/editor/errors/send-error-report-button.tsx +69 -0
- package/src/components/editor/output/MarimoErrorOutput.tsx +21 -5
- package/src/components/editor/output/MarimoTracebackOutput.tsx +36 -21
- package/src/components/editor/output/__tests__/ansi-reduce.test.ts +18 -0
- package/src/components/editor/output/ansi-reduce.ts +6 -0
- package/src/components/pages/home-page.tsx +4 -4
- package/src/components/tracing/tracing.tsx +2 -2
- package/src/core/attachments/__tests__/toast.test.tsx +58 -0
- package/src/core/attachments/state.ts +18 -0
- package/src/core/attachments/toast.ts +15 -0
- package/src/core/cells/__tests__/cells.test.ts +52 -0
- package/src/core/cells/__tests__/error-report.test.ts +139 -0
- package/src/core/cells/__tests__/notebook-outline.test.ts +113 -0
- package/src/core/cells/__tests__/session.test.ts +50 -1
- package/src/core/cells/cells.ts +2 -1
- package/src/core/cells/error-report.ts +63 -0
- package/src/core/cells/pending-delete-service.ts +2 -6
- package/src/core/cells/session.ts +28 -1
- package/src/core/config/pair.ts +5 -3
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +4 -4
- package/src/core/datasets/data-source-discovery.ts +4 -6
- package/src/core/edit-app.tsx +2 -2
- package/src/core/host/AGENTS.md +5 -0
- package/src/core/host/__tests__/attachments.test.ts +57 -0
- package/src/core/host/__tests__/document.test.ts +124 -0
- package/src/core/host/__tests__/events.test.ts +46 -0
- package/src/core/host/__tests__/fixtures.ts +39 -0
- package/src/core/host/__tests__/notebook-client.test.ts +433 -0
- package/src/core/host/__tests__/protocol.test.ts +15 -0
- package/src/core/host/__tests__/stream.test.ts +209 -0
- package/src/core/host/connection.ts +81 -0
- package/src/core/host/events.ts +61 -0
- package/src/core/host/notebook-client.ts +290 -0
- package/src/core/host/protocol.ts +11 -6
- package/src/core/host/resources/attachments.ts +19 -0
- package/src/core/host/resources/document.ts +101 -0
- package/src/core/host/resources/resource.ts +47 -0
- package/src/core/host/stream.ts +211 -0
- package/src/core/hotkeys/actions.ts +2 -4
- package/src/core/network/connection.ts +4 -2
- package/src/core/run-app.tsx +2 -2
- package/src/core/runtime/__tests__/runtime.test.ts +55 -11
- package/src/core/runtime/runtime.ts +18 -5
- package/src/core/runtime/types.ts +2 -0
- package/src/core/websocket/__tests__/{useMarimoKernelConnection.test.ts → connection-state.test.ts} +15 -17
- package/src/core/websocket/__tests__/{useWebSocket.test.ts → createConnectionTransport.test.ts} +1 -1
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +170 -0
- package/src/core/websocket/__tests__/{useMarimoKernelConnection.hook.test.tsx → useNotebookSession.hook.test.tsx} +181 -65
- package/src/core/websocket/connection-state.ts +70 -0
- package/src/core/websocket/state.ts +7 -0
- package/src/core/websocket/transports/__tests__/sse.test.ts +1 -4
- package/src/core/websocket/transports/create.ts +31 -0
- package/src/core/websocket/transports/transport.ts +12 -23
- package/src/core/websocket/types.ts +9 -39
- package/src/core/websocket/useNotebookClient.ts +88 -0
- package/src/core/websocket/{useMarimoKernelConnection.tsx → useNotebookSession.tsx} +59 -225
- package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
- package/src/hooks/useAsyncData.ts +3 -3
- package/src/hooks/useDataSourceDiscovery.ts +6 -4
- package/src/hooks/useElapsedTime.ts +3 -3
- package/src/mount.tsx +7 -3
- package/src/plugins/core/registerReactComponent.tsx +1 -1
- package/src/plugins/impl/DropdownPlugin.tsx +2 -6
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +84 -0
- package/src/plugins/impl/code/any-language-editor.tsx +2 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
- package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
- package/src/plugins/impl/vega/make-selectable.ts +3 -6
- package/src/utils/__tests__/arrays.test.ts +35 -0
- package/src/utils/__tests__/numbers.test.ts +48 -1
- package/src/utils/__tests__/objects.test.ts +21 -0
- package/src/utils/arrays.ts +10 -0
- package/src/utils/numbers.ts +28 -17
- package/src/utils/objects.ts +3 -7
- package/src/utils/once.ts +19 -19
- package/dist/assets/CellStatus-BP2mavAq.js +0 -1
- package/dist/assets/JsonOutput-DxHKOpPG.js +0 -11
- package/dist/assets/MarimoErrorOutput-D60XkCny.js +0 -6
- package/dist/assets/ai-model-dropdown-B0z6-zhp.js +0 -5
- package/dist/assets/any-language-editor-BLCAD3yx.js +0 -1
- package/dist/assets/api-BeC_VSGv.js +0 -1
- package/dist/assets/arrays-BqUx5USx.js +0 -1
- package/dist/assets/code-visibility-B-_GvwR5.js +0 -1
- package/dist/assets/coerce-CpE6kUdX.js +0 -1
- package/dist/assets/command-palette-Cf7WX-nr.js +0 -1
- package/dist/assets/config-BOKzA3tF.js +0 -1
- package/dist/assets/config-DX8Y2WbJ.js +0 -1
- package/dist/assets/config-VPSq73n8.js +0 -1
- package/dist/assets/edit-page-BT74CF4G.js +0 -9
- package/dist/assets/feedback-button-B2gKC5cn.js +0 -1
- package/dist/assets/hooks-RnjuFmEx.js +0 -1
- package/dist/assets/index-Bcdzex-3.css +0 -2
- package/dist/assets/index-D-kY3FU1.js +0 -29
- package/dist/assets/linear-0eij_aAG.js +0 -1
- package/dist/assets/links-DkkL9DVa.js +0 -1
- package/dist/assets/numbers-Mk3-CcoU.js +0 -1
- package/dist/assets/pair-CaQyK6En.js +0 -1
- package/dist/assets/panels-Dn59o8ay.js +0 -4
- package/dist/assets/precisionRound-Bq_nmf5u.js +0 -1
- package/dist/assets/process-output-D0KGq04R.js +0 -1
- package/dist/assets/react-vega-C3rYGtP6.js +0 -189
- package/dist/assets/session-panel-BxS5hiG2.js +0 -1
- package/dist/assets/state-_Qai_QyX.js +0 -3
- package/dist/assets/tooltip-mT3CGest.js +0 -61
- package/dist/assets/tracing-Di6pUmX8.js +0 -1
- package/dist/assets/useAsyncData-C7aJJz0Y.js +0 -1
- package/dist/assets/useNotebookActions-DIc4xTzY.js +0 -1
- package/dist/assets/vega-component-CnadTgoE.js +0 -1
- package/dist/assets/vega-loader.browser-CLRkNgm7.js +0 -6
- package/src/core/websocket/useWebSocket.tsx +0 -88
|
@@ -54,6 +54,7 @@ function renderExportActions(
|
|
|
54
54
|
props: Partial<ExportActionProps> = {},
|
|
55
55
|
sizeLimit: { limitBytes: number; unavailableMessage: string } | null = null,
|
|
56
56
|
mode: AppMode = "edit",
|
|
57
|
+
strictMode = false,
|
|
57
58
|
) {
|
|
58
59
|
const store = createStore();
|
|
59
60
|
store.set(downloadSizeLimitAtom, sizeLimit);
|
|
@@ -66,7 +67,7 @@ function renderExportActions(
|
|
|
66
67
|
</TooltipProvider>
|
|
67
68
|
</Provider>
|
|
68
69
|
);
|
|
69
|
-
const result = render(view(props));
|
|
70
|
+
const result = render(view(props), { reactStrictMode: strictMode });
|
|
70
71
|
return {
|
|
71
72
|
...result,
|
|
72
73
|
rerenderExportActions: (nextProps: Partial<ExportActionProps>) =>
|
|
@@ -284,7 +285,7 @@ describe("ExportActions dialog", () => {
|
|
|
284
285
|
await waitFor(() => {
|
|
285
286
|
expect(downloadByURL).toHaveBeenCalled();
|
|
286
287
|
});
|
|
287
|
-
expect(getExportMetadata).toHaveBeenCalledTimes(
|
|
288
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(3);
|
|
288
289
|
expect(
|
|
289
290
|
screen.queryByText("GeoParquet export requires pyarrow."),
|
|
290
291
|
).not.toBeInTheDocument();
|
|
@@ -310,10 +311,10 @@ describe("ExportActions dialog", () => {
|
|
|
310
311
|
mocks.handleInstallPackages.mock.calls[0][1]();
|
|
311
312
|
});
|
|
312
313
|
await waitFor(() => {
|
|
313
|
-
expect(getExportMetadata).toHaveBeenCalledTimes(
|
|
314
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(3);
|
|
314
315
|
});
|
|
315
316
|
expect(
|
|
316
|
-
screen.
|
|
317
|
+
await screen.findByRole("button", { name: "Install pyarrow" }),
|
|
317
318
|
).toBeInTheDocument();
|
|
318
319
|
expect(
|
|
319
320
|
screen.getByRole("button", { name: "Download GeoParquet" }),
|
|
@@ -530,6 +531,328 @@ describe("ExportActions dialog", () => {
|
|
|
530
531
|
expect(downloadByURL).not.toHaveBeenCalled();
|
|
531
532
|
});
|
|
532
533
|
|
|
534
|
+
async function startGeoParquetInstall(strictMode = false) {
|
|
535
|
+
const getExportMetadata = vi.fn().mockResolvedValue(geometryMetadata);
|
|
536
|
+
downloadAs.mockResolvedValueOnce({
|
|
537
|
+
url: "",
|
|
538
|
+
filename: "",
|
|
539
|
+
error: "GeoParquet export requires pyarrow.",
|
|
540
|
+
missing_packages: ["pyarrow"],
|
|
541
|
+
});
|
|
542
|
+
const { rerenderExportActions, unmount } = renderExportActions(
|
|
543
|
+
{ getExportMetadata, metadataSource: "first" },
|
|
544
|
+
null,
|
|
545
|
+
"edit",
|
|
546
|
+
strictMode,
|
|
547
|
+
);
|
|
548
|
+
const dialog = await openDialog();
|
|
549
|
+
fireEvent.click(
|
|
550
|
+
await screen.findByRole("button", { name: "Download GeoParquet" }),
|
|
551
|
+
);
|
|
552
|
+
fireEvent.click(
|
|
553
|
+
await screen.findByRole("button", { name: "Install pyarrow" }),
|
|
554
|
+
);
|
|
555
|
+
return { dialog, getExportMetadata, rerenderExportActions, unmount };
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
it("does not retry with a geometry choice after the final geometry disappears", async () => {
|
|
559
|
+
const { getExportMetadata } = await startGeoParquetInstall();
|
|
560
|
+
getExportMetadata.mockResolvedValue({
|
|
561
|
+
geometry_columns: [],
|
|
562
|
+
primary_geometry_column: null,
|
|
563
|
+
default_geometry_column: null,
|
|
564
|
+
formats: {},
|
|
565
|
+
});
|
|
566
|
+
|
|
567
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
568
|
+
|
|
569
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
570
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
571
|
+
expect(
|
|
572
|
+
await screen.findByText(
|
|
573
|
+
"The selected geometry is no longer available. Choose another geometry to export.",
|
|
574
|
+
),
|
|
575
|
+
).toBeInTheDocument();
|
|
576
|
+
fireEvent.click(screen.getByRole("button", { name: "Download Parquet" }));
|
|
577
|
+
await waitFor(() => expect(downloadByURL).toHaveBeenCalledTimes(1));
|
|
578
|
+
expect(downloadAs).toHaveBeenLastCalledWith({ format: "parquet" });
|
|
579
|
+
});
|
|
580
|
+
|
|
581
|
+
it("does not export when installation finishes after the widget unmounts", async () => {
|
|
582
|
+
const { getExportMetadata, unmount } = await startGeoParquetInstall();
|
|
583
|
+
unmount();
|
|
584
|
+
|
|
585
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
586
|
+
|
|
587
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(1);
|
|
588
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
589
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
590
|
+
});
|
|
591
|
+
|
|
592
|
+
it("does not export when post-install metadata resolves after unmount", async () => {
|
|
593
|
+
const { getExportMetadata, unmount } = await startGeoParquetInstall();
|
|
594
|
+
let resolveCheck: (value: ExportMetadata) => void = () => undefined;
|
|
595
|
+
getExportMetadata.mockImplementationOnce(
|
|
596
|
+
() =>
|
|
597
|
+
new Promise<ExportMetadata>((resolve) => {
|
|
598
|
+
resolveCheck = resolve;
|
|
599
|
+
}),
|
|
600
|
+
);
|
|
601
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
602
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(2);
|
|
603
|
+
unmount();
|
|
604
|
+
|
|
605
|
+
await act(async () => resolveCheck(geometryMetadata));
|
|
606
|
+
|
|
607
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
608
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
it("does not deliver a retried export that resolves after unmount", async () => {
|
|
612
|
+
const { unmount } = await startGeoParquetInstall();
|
|
613
|
+
let resolveDownload: (value: {
|
|
614
|
+
url: string;
|
|
615
|
+
filename: string;
|
|
616
|
+
}) => void = () => undefined;
|
|
617
|
+
downloadAs.mockImplementationOnce(
|
|
618
|
+
() =>
|
|
619
|
+
new Promise((resolve) => {
|
|
620
|
+
resolveDownload = resolve;
|
|
621
|
+
}),
|
|
622
|
+
);
|
|
623
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
624
|
+
expect(downloadAs).toHaveBeenCalledTimes(2);
|
|
625
|
+
unmount();
|
|
626
|
+
|
|
627
|
+
await act(async () =>
|
|
628
|
+
resolveDownload({
|
|
629
|
+
url: "https://example.test/export",
|
|
630
|
+
filename: "table",
|
|
631
|
+
}),
|
|
632
|
+
);
|
|
633
|
+
|
|
634
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
it("retries after installation under StrictMode effect replay", async () => {
|
|
638
|
+
await startGeoParquetInstall(true);
|
|
639
|
+
|
|
640
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
641
|
+
|
|
642
|
+
await waitFor(() => expect(downloadByURL).toHaveBeenCalledTimes(1));
|
|
643
|
+
expect(downloadAs).toHaveBeenLastCalledWith({
|
|
644
|
+
format: "parquet",
|
|
645
|
+
geometry_column: "location",
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
|
|
649
|
+
it("does not export when installation finishes after the dialog closes", async () => {
|
|
650
|
+
const { dialog, getExportMetadata } = await startGeoParquetInstall();
|
|
651
|
+
fireEvent.click(within(dialog).getByRole("button", { name: "Close" }));
|
|
652
|
+
await waitFor(() => {
|
|
653
|
+
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
657
|
+
|
|
658
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(1);
|
|
659
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
660
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
661
|
+
});
|
|
662
|
+
|
|
663
|
+
it("does not export when installation finishes after the source changes", async () => {
|
|
664
|
+
const { getExportMetadata, rerenderExportActions } =
|
|
665
|
+
await startGeoParquetInstall();
|
|
666
|
+
rerenderExportActions({ getExportMetadata, metadataSource: "second" });
|
|
667
|
+
await waitFor(() => {
|
|
668
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(2);
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
672
|
+
|
|
673
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(2);
|
|
674
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
675
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
676
|
+
});
|
|
677
|
+
|
|
678
|
+
it("does not export a non-geographic retry after the dialog closes", async () => {
|
|
679
|
+
downloadAs.mockResolvedValueOnce({
|
|
680
|
+
url: "",
|
|
681
|
+
filename: "",
|
|
682
|
+
error: "Parquet export requires pyarrow.",
|
|
683
|
+
missing_packages: ["pyarrow"],
|
|
684
|
+
});
|
|
685
|
+
renderExportActions();
|
|
686
|
+
const dialog = await openDialog();
|
|
687
|
+
fireEvent.click(screen.getByRole("button", { name: "Download Parquet" }));
|
|
688
|
+
fireEvent.click(
|
|
689
|
+
await screen.findByRole("button", { name: "Install pyarrow" }),
|
|
690
|
+
);
|
|
691
|
+
fireEvent.click(within(dialog).getByRole("button", { name: "Close" }));
|
|
692
|
+
|
|
693
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
694
|
+
|
|
695
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
696
|
+
expect(downloadByURL).not.toHaveBeenCalled();
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
it("retries after installation when an earlier export succeeded", async () => {
|
|
700
|
+
const getExportMetadata = vi.fn().mockResolvedValue({
|
|
701
|
+
...geometryMetadata,
|
|
702
|
+
formats: {
|
|
703
|
+
parquet: {
|
|
704
|
+
available: false,
|
|
705
|
+
reason: "GeoParquet export requires pyarrow.",
|
|
706
|
+
missing_packages: ["pyarrow"],
|
|
707
|
+
},
|
|
708
|
+
},
|
|
709
|
+
});
|
|
710
|
+
renderExportActions({ getExportMetadata });
|
|
711
|
+
await openDialog();
|
|
712
|
+
fireEvent.click(screen.getByRole("button", { name: "Download CSV" }));
|
|
713
|
+
await waitFor(() => expect(downloadByURL).toHaveBeenCalledTimes(1));
|
|
714
|
+
fireEvent.click(
|
|
715
|
+
await screen.findByRole("button", { name: "Install pyarrow" }),
|
|
716
|
+
);
|
|
717
|
+
getExportMetadata.mockResolvedValue(geometryMetadata);
|
|
718
|
+
|
|
719
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
720
|
+
|
|
721
|
+
await waitFor(() => expect(downloadByURL).toHaveBeenCalledTimes(2));
|
|
722
|
+
expect(downloadAs).toHaveBeenLastCalledWith({
|
|
723
|
+
format: "parquet",
|
|
724
|
+
geometry_column: "location",
|
|
725
|
+
});
|
|
726
|
+
});
|
|
727
|
+
|
|
728
|
+
it("waits for the post-install metadata check before exporting", async () => {
|
|
729
|
+
let resolveCheck: (value: ExportMetadata) => void = () => undefined;
|
|
730
|
+
const getExportMetadata = vi.fn().mockResolvedValue({
|
|
731
|
+
...geometryMetadata,
|
|
732
|
+
formats: {
|
|
733
|
+
parquet: {
|
|
734
|
+
available: false,
|
|
735
|
+
reason: "GeoParquet export requires pyarrow.",
|
|
736
|
+
missing_packages: ["pyarrow"],
|
|
737
|
+
},
|
|
738
|
+
},
|
|
739
|
+
});
|
|
740
|
+
renderExportActions({ getExportMetadata });
|
|
741
|
+
await openDialog();
|
|
742
|
+
fireEvent.click(
|
|
743
|
+
await screen.findByRole("button", { name: "Install pyarrow" }),
|
|
744
|
+
);
|
|
745
|
+
getExportMetadata.mockImplementationOnce(
|
|
746
|
+
() =>
|
|
747
|
+
new Promise((resolve) => {
|
|
748
|
+
resolveCheck = resolve;
|
|
749
|
+
}),
|
|
750
|
+
);
|
|
751
|
+
|
|
752
|
+
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
753
|
+
expect(downloadAs).not.toHaveBeenCalled();
|
|
754
|
+
|
|
755
|
+
getExportMetadata.mockResolvedValue(geometryMetadata);
|
|
756
|
+
await act(async () => resolveCheck(geometryMetadata));
|
|
757
|
+
await waitFor(() => expect(downloadByURL).toHaveBeenCalled());
|
|
758
|
+
expect(downloadAs).toHaveBeenCalledTimes(1);
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
it("uses the new source eligibility after a settled package failure", async () => {
|
|
762
|
+
const getExportMetadata = vi.fn().mockResolvedValue(geometryMetadata);
|
|
763
|
+
downloadAs.mockResolvedValueOnce({
|
|
764
|
+
url: "",
|
|
765
|
+
filename: "",
|
|
766
|
+
error: "GeoParquet export requires pyarrow.",
|
|
767
|
+
missing_packages: ["pyarrow"],
|
|
768
|
+
});
|
|
769
|
+
const { rerenderExportActions } = renderExportActions({
|
|
770
|
+
getExportMetadata,
|
|
771
|
+
metadataSource: "first",
|
|
772
|
+
});
|
|
773
|
+
await openDialog();
|
|
774
|
+
fireEvent.click(
|
|
775
|
+
await screen.findByRole("button", { name: "Download GeoParquet" }),
|
|
776
|
+
);
|
|
777
|
+
await screen.findByRole("button", { name: "Install pyarrow" });
|
|
778
|
+
|
|
779
|
+
rerenderExportActions({ getExportMetadata, metadataSource: "second" });
|
|
780
|
+
|
|
781
|
+
await waitFor(() =>
|
|
782
|
+
expect(
|
|
783
|
+
screen.getByRole("button", { name: "Download GeoParquet" }),
|
|
784
|
+
).toBeEnabled(),
|
|
785
|
+
);
|
|
786
|
+
expect(
|
|
787
|
+
screen.queryByRole("button", { name: "Install pyarrow" }),
|
|
788
|
+
).not.toBeInTheDocument();
|
|
789
|
+
});
|
|
790
|
+
|
|
791
|
+
it("ignores metadata for an earlier source that resolves late", async () => {
|
|
792
|
+
let resolveFirst: (value: ExportMetadata) => void = () => undefined;
|
|
793
|
+
const first = vi.fn(
|
|
794
|
+
() =>
|
|
795
|
+
new Promise<ExportMetadata>((resolve) => {
|
|
796
|
+
resolveFirst = resolve;
|
|
797
|
+
}),
|
|
798
|
+
);
|
|
799
|
+
const second = vi.fn().mockResolvedValue({
|
|
800
|
+
...geometryMetadata,
|
|
801
|
+
geometry_columns: [
|
|
802
|
+
{ name: "region", encoding: "objects", crs: "EPSG:3857" },
|
|
803
|
+
],
|
|
804
|
+
primary_geometry_column: "region",
|
|
805
|
+
default_geometry_column: "region",
|
|
806
|
+
});
|
|
807
|
+
const { rerenderExportActions } = renderExportActions({
|
|
808
|
+
getExportMetadata: first,
|
|
809
|
+
metadataSource: "first",
|
|
810
|
+
});
|
|
811
|
+
await openDialog();
|
|
812
|
+
rerenderExportActions({
|
|
813
|
+
getExportMetadata: second,
|
|
814
|
+
metadataSource: "second",
|
|
815
|
+
});
|
|
816
|
+
await waitFor(() =>
|
|
817
|
+
expect(screen.getByTestId("export-summary-parquet")).toHaveTextContent(
|
|
818
|
+
"region",
|
|
819
|
+
),
|
|
820
|
+
);
|
|
821
|
+
|
|
822
|
+
await act(async () => resolveFirst(geometryMetadata));
|
|
823
|
+
|
|
824
|
+
expect(screen.getByTestId("export-summary-parquet")).toHaveTextContent(
|
|
825
|
+
"region",
|
|
826
|
+
);
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
it("does not use earlier metadata when the new source request fails", async () => {
|
|
830
|
+
const getExportMetadata = vi.fn().mockResolvedValue(geometryMetadata);
|
|
831
|
+
const { rerenderExportActions } = renderExportActions({
|
|
832
|
+
getExportMetadata,
|
|
833
|
+
metadataSource: "first",
|
|
834
|
+
});
|
|
835
|
+
await openDialog();
|
|
836
|
+
await waitFor(() =>
|
|
837
|
+
expect(
|
|
838
|
+
screen.getByRole("button", { name: "Download GeoParquet" }),
|
|
839
|
+
).toBeEnabled(),
|
|
840
|
+
);
|
|
841
|
+
getExportMetadata.mockRejectedValueOnce(new Error("Connection lost"));
|
|
842
|
+
|
|
843
|
+
rerenderExportActions({ getExportMetadata, metadataSource: "second" });
|
|
844
|
+
|
|
845
|
+
expect(
|
|
846
|
+
await screen.findByText(
|
|
847
|
+
"Could not load geometry options: Connection lost",
|
|
848
|
+
),
|
|
849
|
+
).toBeInTheDocument();
|
|
850
|
+
expect(
|
|
851
|
+
screen.getByRole("button", { name: "Download Parquet" }),
|
|
852
|
+
).toBeDisabled();
|
|
853
|
+
expect(screen.getByRole("button", { name: "Download CSV" })).toBeEnabled();
|
|
854
|
+
});
|
|
855
|
+
|
|
533
856
|
it("shows formats in the approved order with an options toggle where supported", async () => {
|
|
534
857
|
renderExportActions();
|
|
535
858
|
const dialog = await openDialog();
|
|
@@ -1412,7 +1735,7 @@ describe("ExportActions GeoJSON", () => {
|
|
|
1412
1735
|
);
|
|
1413
1736
|
await act(async () => mocks.handleInstallPackages.mock.calls[0][1]());
|
|
1414
1737
|
await waitFor(() => expect(downloadByURL).toHaveBeenCalled());
|
|
1415
|
-
expect(getExportMetadata).toHaveBeenCalledTimes(
|
|
1738
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(3);
|
|
1416
1739
|
expect(downloadAs).toHaveBeenLastCalledWith({
|
|
1417
1740
|
format: "geojson",
|
|
1418
1741
|
geometry_column: "boundary",
|
|
@@ -1685,7 +2008,7 @@ describe("ExportActions GeoJSON clipboard", () => {
|
|
|
1685
2008
|
format: "geojson",
|
|
1686
2009
|
geometry_column: "boundary",
|
|
1687
2010
|
});
|
|
1688
|
-
expect(getExportMetadata).toHaveBeenCalledTimes(
|
|
2011
|
+
expect(getExportMetadata).toHaveBeenCalledTimes(3);
|
|
1689
2012
|
expect(downloadByURL).not.toHaveBeenCalled();
|
|
1690
2013
|
});
|
|
1691
2014
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import type { Table } from "@tanstack/react-table";
|
|
8
8
|
import { Columns3Icon, EyeIcon, EyeOffIcon, ScanEyeIcon } from "lucide-react";
|
|
9
|
-
import React
|
|
9
|
+
import React from "react";
|
|
10
10
|
import { ColumnName } from "@/components/datasources/components";
|
|
11
11
|
import { Button } from "@/components/ui/button";
|
|
12
12
|
import {
|
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
} from "@/components/ui/popover";
|
|
25
25
|
import { type BulkAction, useSelectList } from "@/components/ui/select-core";
|
|
26
26
|
import type { DataType } from "@/core/kernel/messages";
|
|
27
|
+
import { Arrays } from "@/utils/arrays";
|
|
27
28
|
import { cn } from "@/utils/cn";
|
|
28
29
|
import { Events } from "@/utils/events";
|
|
29
30
|
import { smartMatchFilter } from "@/utils/smartMatch";
|
|
@@ -67,9 +68,8 @@ export const ColumnVisibilityDropdown = <TData,>({
|
|
|
67
68
|
const hideableIds = userColumns
|
|
68
69
|
.filter((column) => column.getCanHide())
|
|
69
70
|
.map((column) => column.id);
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
).length;
|
|
71
|
+
const visibleHideableColumnIds = Arrays.difference(hideableIds, hiddenIds);
|
|
72
|
+
const visibleHideableCount = visibleHideableColumnIds.length;
|
|
73
73
|
|
|
74
74
|
const applyHidden = (next: string[] | string | null) => {
|
|
75
75
|
const hidden = new Set(Array.isArray(next) ? next : []);
|
|
@@ -106,15 +106,10 @@ export const ColumnVisibilityDropdown = <TData,>({
|
|
|
106
106
|
.filter((option) => !option.disabled)
|
|
107
107
|
.map((option) => option.value)
|
|
108
108
|
: [];
|
|
109
|
-
const showOnlyColumnState =
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
),
|
|
114
|
-
hideableColumnIdSet: new Set(hideableIds),
|
|
115
|
-
}),
|
|
116
|
-
[hideableIds, hiddenIds],
|
|
117
|
-
);
|
|
109
|
+
const showOnlyColumnState = {
|
|
110
|
+
visibleHideableColumnIds,
|
|
111
|
+
hideableColumnIdSet: new Set(hideableIds),
|
|
112
|
+
};
|
|
118
113
|
const hasSearchBulkActions =
|
|
119
114
|
showOnlyMatchIds.length > 0 || matchingActions.length > 0;
|
|
120
115
|
|
|
@@ -135,6 +135,7 @@ export function generateColumns<T>({
|
|
|
135
135
|
}): ColumnDef<T>[] {
|
|
136
136
|
// Row-headers are typically index columns
|
|
137
137
|
const rowHeadersSet = new Set(rowHeaders.map(([columnName]) => columnName));
|
|
138
|
+
const wrappedColumnsSet = new Set(wrappedColumns);
|
|
138
139
|
|
|
139
140
|
const typesByColumn = Maps.keyBy(fieldTypes, (entry) => entry[0]);
|
|
140
141
|
|
|
@@ -287,7 +288,7 @@ export function generateColumns<T>({
|
|
|
287
288
|
}
|
|
288
289
|
|
|
289
290
|
const justify = getJustify(key);
|
|
290
|
-
const wrapped =
|
|
291
|
+
const wrapped = wrappedColumnsSet.has(key);
|
|
291
292
|
const isCellSelected = cell?.getIsSelected?.() || false;
|
|
292
293
|
const canSelectCell =
|
|
293
294
|
(selection === "single-cell" || selection === "multi-cell") &&
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
|
-
import React from "react";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
3
|
import { useDateFormatter, useLocale } from "react-aria";
|
|
4
4
|
import { Tooltip } from "@/components/ui/tooltip";
|
|
5
5
|
|
|
@@ -45,6 +45,7 @@ export const DatePopover: React.FC<DatePopoverProps> = ({
|
|
|
45
45
|
|
|
46
46
|
const TimezoneDisplay = ({ date }: { date: Date }) => {
|
|
47
47
|
const { locale } = useLocale();
|
|
48
|
+
// The system timezone can change without the locale changing.
|
|
48
49
|
const localTimezone = new Intl.DateTimeFormat(locale).resolvedOptions()
|
|
49
50
|
.timeZone;
|
|
50
51
|
const hasSubSeconds = date.getUTCMilliseconds() !== 0;
|
|
@@ -116,9 +117,10 @@ const RelativeTime = ({ date }: { date: Date }) => {
|
|
|
116
117
|
const { locale } = useLocale();
|
|
117
118
|
|
|
118
119
|
// Initialize relative time formatter with current locale and "auto" numeric style
|
|
119
|
-
const relativeTimeFormatter =
|
|
120
|
-
numeric: "auto",
|
|
121
|
-
|
|
120
|
+
const relativeTimeFormatter = useMemo(
|
|
121
|
+
() => new Intl.RelativeTimeFormat(locale, { numeric: "auto" }),
|
|
122
|
+
[locale],
|
|
123
|
+
);
|
|
122
124
|
|
|
123
125
|
const currentTime = new Date();
|
|
124
126
|
// Get difference in seconds between now and the input date
|