@marimo-team/frontend 0.16.1 → 0.16.3
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/{ConnectedDataExplorerComponent-2wVcyvDj.js → ConnectedDataExplorerComponent-Brtw1DxF.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-D2j6i0hv.js → ImageComparisonComponent-Dxl-PbZX.js} +1 -1
- package/dist/assets/{VegaLite-BckFaf2D.js → VegaLite-BXQF0Cx_.js} +1 -1
- package/dist/assets/_baseEach-BjSm9ht3.js +1 -0
- package/dist/assets/_baseMap-CV4Ezmtf.js +1 -0
- package/dist/assets/_baseUniq-Ci9yZGxz.js +1 -0
- package/dist/assets/{_createAggregator-C5CVY-0t.js → _createAggregator-VFK9K2d9.js} +1 -1
- package/dist/assets/{agent-panel-RGLNjkYe.js → agent-panel-BoscVLCT.js} +7 -7
- package/dist/assets/{any-language-editor-DjuXwGCA.js → any-language-editor-ChaY_VUU.js} +1 -1
- package/dist/assets/{architectureDiagram-W76B3OCA-Dyj4ds_R.js → architectureDiagram-W76B3OCA-CueUUFYd.js} +1 -1
- package/dist/assets/{between-horizontal-start-Dt2aKpPf.js → between-horizontal-start-DAHqmLYT.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-o-i7DDvN.js → blockDiagram-QIGZ2CNN-BYYygyWn.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-DGHEwWrx.js → c4Diagram-FPNF74CW-DAz3xEh1.js} +1 -1
- package/dist/assets/channel-6SqQ2U_X.js +1 -0
- package/dist/assets/chat-panel-DJkOLrw9.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-BJecb-Ri.js → chunk-4BX2VUAB-8g-RyHdt.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CAATkc4w.js → chunk-55IACEB6-iWZZ8Mt6.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DPuNbQ-f.js → chunk-FMBD7UC4-knjss4wk.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-C8TWVLiH.js → chunk-K7UQS3LO-DVIwPBgZ.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DiZZ09q4.js → chunk-QN33PNHL-CBU8pN6I.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BIUM7usu.js → chunk-QZHKN3VN-5ljElUF4.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-vGTArPBG.js → chunk-TVAH2DTR-DkIdGINc.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-D2KRqp_x.js → chunk-TZMSLE5B-CIFOSTqh.js} +1 -1
- package/dist/assets/{circle-play-cjeNez0N.js → circle-play-BOdsbq5u.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-DVqXcTYf.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-DVqXcTYf.js +1 -0
- package/dist/assets/{clear-button-C97JtAez.js → clear-button-GAjXl0CQ.js} +1 -1
- package/dist/assets/clone-DSDb0xen.js +1 -0
- package/dist/assets/command-palette-BUXkqoLh.js +1 -0
- package/dist/assets/{common-Du9rSOwD.js → common-DahoYqdi.js} +1 -1
- package/dist/assets/{compile-CZXqyOxa.js → compile-Bg8uJ7vm.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CqUN5Y9b.js → cose-bilkent-S5V4N54A-z_0gqD9K.js} +1 -1
- package/dist/assets/{dagre-5GWH7T2D-RJqTI9DM.js → dagre-5GWH7T2D-BMt7CNXL.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DZN0q1LV.js → data-grid-overlay-editor-Ctn4XtXx.js} +1 -1
- package/dist/assets/datasources-panel-C7sqRIHs.js +1 -0
- package/dist/assets/{dependency-graph-panel-CEog_O7V.js → dependency-graph-panel-DNajptzv.js} +4 -4
- package/dist/assets/{diagram-N5W7TBWH-D-l4zZ9d.js → diagram-N5W7TBWH-BzwvLvAy.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CCOmBUt-.js → diagram-QEK2KX5R-DRLJ56FS.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-C_I_9jnZ.js → diagram-S2PKOQOG-Bf8x4KTU.js} +1 -1
- package/dist/assets/{documentation-panel-C1BtMZ3M.js → documentation-panel-Dm6Ozl67.js} +1 -1
- package/dist/assets/{edit-page-B-oevUZ9.js → edit-page-CGc9EjuG.js} +53 -42
- package/dist/assets/{ellipsis-vertical-BEb-J8z6.js → ellipsis-vertical-Bj1YXvZe.js} +1 -1
- package/dist/assets/{empty-state-C99UyDE3.js → empty-state-CYev-D31.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-BePOLi5M.js → erDiagram-AWTI2OKA-DmgzgN_I.js} +1 -1
- package/dist/assets/{error-panel-Bs34jXFh.js → error-panel-BYG4twCa.js} +1 -1
- package/dist/assets/{file-explorer-panel-Ck6UL861.js → file-explorer-panel-BSMiOApi.js} +1 -1
- package/dist/assets/{flowDiagram-PVAE7QVJ-BgjFu5l7.js → flowDiagram-PVAE7QVJ-BdRKkajr.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-YOPb3XSV.js → ganttDiagram-OWAHRB6G-lfRAMnq_.js} +5 -5
- package/dist/assets/{gitGraphDiagram-NY62KEGX-CGhqaDTy.js → gitGraphDiagram-NY62KEGX-CQVTIrHF.js} +1 -1
- package/dist/assets/{glide-data-editor-9QUH6iso.js → glide-data-editor-D5A4pou7.js} +4 -4
- package/dist/assets/{graph-DQQFGrho.js → graph-CBNo279v.js} +1 -1
- package/dist/assets/{home-page-DRKpPCrF.js → home-page-CmdznBJR.js} +2 -2
- package/dist/assets/{index-SGLNXrGP.js → index-0dfGh-Gj.js} +1 -1
- package/dist/assets/{index-aE43R74q.js → index-BDYVSSzB.js} +1 -1
- package/dist/assets/{index-BJNCMUmG.js → index-B_KyDZ94.js} +1 -1
- package/dist/assets/{index-BjgnbONl.js → index-Bfy-I_lW.js} +1 -1
- package/dist/assets/{index-CUFv_thQ.js → index-Bh98Tp-z.js} +1 -1
- package/dist/assets/{index-C2MD0vgD.js → index-BhroIwBL.js} +1 -1
- package/dist/assets/{index-DdnKZNxM.js → index-BtQtesaI.js} +1 -1
- package/dist/assets/index-C0iXCvyY.css +1 -0
- package/dist/assets/index-C1SHFMCp.js +581 -0
- package/dist/assets/{index-C_tkBKNO.js → index-C6DWtSls.js} +1 -1
- package/dist/assets/{index-Aeo6WiK7.js → index-C71cdkH-.js} +1 -1
- package/dist/assets/{index-G5QZppK2.js → index-CT_FTqvK.js} +1 -1
- package/dist/assets/{index-B8jXZ12t.js → index-CU5rRr66.js} +1 -1
- package/dist/assets/{index-BAbIIxHU.js → index-Cb6duXQm.js} +1 -1
- package/dist/assets/{index-BW3k9Gss.js → index-D23e9zQj.js} +1 -1
- package/dist/assets/index-DUGecC2Z.js +68 -0
- package/dist/assets/{index-CFKO7WXI.js → index-DcGIOAQi.js} +1 -1
- package/dist/assets/{index-ClzeQrN7.js → index-PJfa9qXY.js} +1 -1
- package/dist/assets/{index-C1ez98sk.js → index-SPslPC2B.js} +1 -1
- package/dist/assets/{index-BprjMYH5.js → index-VPQlo4Uz.js} +1 -1
- package/dist/assets/{index-CfaDbEdi.js → index-qbTLKWyG.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-DBu8p9gd.js +2 -0
- package/dist/assets/{isEmpty-D-4c7sMv.js → isEmpty-CnOLuQIv.js} +1 -1
- package/dist/assets/{journeyDiagram-BIP6EPQ6-C94u3Mv3.js → journeyDiagram-BIP6EPQ6-6U_vHJBH.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-BEXYFzz7.js → kanban-definition-6OIFK2YF-DgnR14ys.js} +1 -1
- package/dist/assets/{layout-Bz2BJ2ru.js → layout-RHmq4fP9.js} +1 -1
- package/dist/assets/{linear-D8s7K76e.js → linear-CLdOVPGV.js} +1 -1
- package/dist/assets/links-Dd1icsEk.js +7 -0
- package/dist/assets/{logs-panel-DC7wpmPz.js → logs-panel-CjbuhBLx.js} +1 -1
- package/dist/assets/{markdown-renderer-DRdSWR9X.js → markdown-renderer-X5YJvAZq.js} +3 -3
- package/dist/assets/{mermaid-Y3x4hmD0.js → mermaid-Bl2T5oEC.js} +1 -1
- package/dist/assets/{mermaid.core-DzthE35Y.js → mermaid.core-CfukBvGI.js} +4 -4
- package/dist/assets/min-BXIes1Za.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-DktvuLe1.js → mindmap-definition-Q6HEUPPD-BXCjP4Lu.js} +1 -1
- package/dist/assets/{number-overlay-editor-BEfwI1IT.js → number-overlay-editor-BUyqkSes.js} +1 -1
- package/dist/assets/{outline-panel-CdsnAy2w.js → outline-panel-BvGcPKdd.js} +1 -1
- package/dist/assets/{packages-panel-DiTA-d_D.js → packages-panel-BichDQWG.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DQDNQ-de.js → pieDiagram-ADFJNKIX-CMzJFIJM.js} +1 -1
- package/dist/assets/{quadrantDiagram-LMRXKWRM-0kgIXc2-.js → quadrantDiagram-LMRXKWRM-CfGssUlO.js} +1 -1
- package/dist/assets/{react-plotly-DJqqfM7c.js → react-plotly-DR3hV0HW.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-B5rb0ypd.js → requirementDiagram-4UW4RH46-CfrFolth.js} +1 -1
- package/dist/assets/{run-page-CFmLrv1R.js → run-page-Bqd_4ePD.js} +1 -1
- package/dist/assets/{sankeyDiagram-GR3RE2ED-Dom7IlnF.js → sankeyDiagram-GR3RE2ED-D_UttKU0.js} +1 -1
- package/dist/assets/{scratchpad-panel-CuHWpHO8.js → scratchpad-panel-D5N15ji1.js} +1 -1
- package/dist/assets/secrets-panel-BpbnAO4R.js +1 -0
- package/dist/assets/{sequenceDiagram-C3RYC4MD-PNJWXQbw.js → sequenceDiagram-C3RYC4MD-MdfQQApP.js} +1 -1
- package/dist/assets/{slides-component-CJgaTRZ0.js → slides-component-C0z7rXmk.js} +1 -1
- package/dist/assets/{snippets-panel-B2EC1txM.js → snippets-panel-wlpZ_Wzx.js} +1 -1
- package/dist/assets/sortBy-BW_zNHP6.js +1 -0
- package/dist/assets/{state-CWict9RU.js → state-CDooX-dk.js} +1 -1
- package/dist/assets/{stateDiagram-KXAO66HF-BE58aJnr.js → stateDiagram-KXAO66HF-H7kfw3ot.js} +1 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-YMeb9qMR.js +1 -0
- package/dist/assets/{storage-DRaR04wR.js → storage-b1QCapTq.js} +6 -6
- package/dist/assets/{terminal-BX3Su5q7.js → terminal-CPV44BXz.js} +1 -1
- package/dist/assets/{time-hUzZfpNE.js → time-DDy3xv5Y.js} +1 -1
- package/dist/assets/{timeline-definition-XQNQX7LJ-CqQP9t51.js → timeline-definition-XQNQX7LJ-J-cPRT2_.js} +1 -1
- package/dist/assets/{tracing-B10Q1n-L.js → tracing-3eHHRUiJ.js} +2 -2
- package/dist/assets/{tracing-panel-Du8WCnno.js → tracing-panel-BMgy3D7d.js} +2 -2
- package/dist/assets/{trash-B81GTiv6.js → trash--tonOuDe.js} +1 -1
- package/dist/assets/{tree-6vW2ogkh.js → tree-ouIGEsVg.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CdwDwwsz.js → treemap-75Q7IDZK-CzJTJ_3R.js} +20 -20
- package/dist/assets/{variable-panel-D5qgJI7k.js → variable-panel-sFTn4Oih.js} +1 -1
- package/dist/assets/{vega-component-DJaJWMJM.js → vega-component-BkPkzX9r.js} +1 -1
- package/dist/assets/{xychartDiagram-6GGTOJPD-WFtXqaM9.js → xychartDiagram-6GGTOJPD-BZ8WOb_8.js} +1 -1
- package/dist/index.html +10 -3
- package/package.json +8 -8
- package/src/__mocks__/common.ts +5 -3
- package/src/__mocks__/notebook.ts +2 -2
- package/src/__mocks__/requests.ts +1 -0
- package/src/__tests__/main.test.tsx +2 -2
- package/src/components/ai/ai-provider-icon.tsx +2 -0
- package/src/components/app-config/ai-config.tsx +32 -1
- package/src/components/app-config/common.tsx +2 -2
- package/src/components/app-config/user-config-form.tsx +26 -0
- package/src/components/audio/audio-recorder.tsx +0 -1
- package/src/components/chat/acp/blocks.tsx +2 -2
- package/src/components/chat/acp/thread.tsx +3 -5
- package/src/components/chat/acp/utils.ts +5 -5
- package/src/components/chat/chat-panel.tsx +1 -1
- package/src/components/data-table/__tests__/columns.test.tsx +38 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +2 -2
- package/src/components/data-table/cell-hover-template/feature.ts +1 -1
- package/src/components/data-table/cell-hover-template/types.ts +1 -1
- package/src/components/data-table/charts/__tests__/altair-generator.test.ts +1 -1
- package/src/components/data-table/charts/chart-spec/tooltips.ts +3 -3
- package/src/components/data-table/charts/components/chart-items.tsx +1 -1
- package/src/components/data-table/charts/components/form-fields.tsx +2 -2
- package/src/components/data-table/charts/constants.ts +1 -1
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +2 -2
- package/src/components/data-table/columns.tsx +22 -3
- package/src/components/data-table/data-table.tsx +35 -3
- package/src/components/data-table/date-popover.tsx +1 -1
- package/src/components/data-table/download-actions.tsx +1 -1
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +5 -5
- package/src/components/data-table/renderers.tsx +22 -13
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +1 -1
- package/src/components/data-table/schemas.ts +16 -0
- package/src/components/data-table/types.ts +4 -3
- package/src/components/datasources/column-preview.tsx +9 -6
- package/src/components/debugger/debugger-code.tsx +1 -1
- package/src/components/dependency-graph/custom-node.tsx +15 -6
- package/src/components/dependency-graph/dependency-graph-minimap.tsx +2 -2
- package/src/components/dependency-graph/dependency-graph-tree.tsx +2 -2
- package/src/components/dependency-graph/dependency-graph.tsx +1 -1
- package/src/components/dependency-graph/elements.ts +7 -7
- package/src/components/dependency-graph/utils/changes.ts +4 -4
- package/src/components/editor/Cell.tsx +7 -1
- package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +1 -1
- package/src/components/editor/chrome/panels/packages-panel.tsx +1 -1
- package/src/components/editor/columns/storage.ts +1 -1
- package/src/components/editor/database/__tests__/__snapshots__/as-code.test.ts.snap +36 -0
- package/src/components/editor/database/__tests__/as-code.test.ts +30 -7
- package/src/components/editor/database/add-database-form.tsx +11 -0
- package/src/components/editor/database/as-code.ts +104 -5
- package/src/components/editor/database/schemas.ts +36 -18
- package/src/components/editor/errors/auto-fix.tsx +12 -2
- package/src/components/editor/errors/sql-validation-errors.tsx +40 -0
- package/src/components/editor/navigation/clipboard.ts +2 -2
- package/src/components/editor/output/ConsoleOutput.tsx +14 -2
- package/src/components/editor/output/JsonOutput.tsx +1 -1
- package/src/components/editor/output/MarimoErrorOutput.tsx +60 -1
- package/src/components/editor/output/MarimoTracebackOutput.tsx +17 -2
- package/src/components/editor/renderers/grid-layout/types.ts +2 -2
- package/src/components/editor/renderers/plugins.ts +1 -1
- package/src/components/editor/renderers/types.ts +1 -1
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +7 -7
- package/src/components/forms/form.tsx +5 -5
- package/src/components/ui/links.tsx +1 -0
- package/src/core/ai/__tests__/model-registry.test.ts +0 -10
- package/src/core/ai/context/providers/cell-output.ts +1 -18
- package/src/core/ai/context/providers/error.ts +2 -2
- package/src/core/ai/ids/ids.ts +1 -0
- package/src/core/ai/model-registry.ts +2 -1
- package/src/core/cells/cells.ts +5 -5
- package/src/core/cells/logs.ts +1 -1
- package/src/core/cells/types.ts +1 -1
- package/src/core/codemirror/__tests__/format.test.ts +6 -0
- package/src/core/codemirror/cells/traceback-decorations.ts +1 -1
- package/src/core/codemirror/editing/commands.ts +2 -2
- package/src/core/codemirror/find-replace/navigate.ts +1 -1
- package/src/core/codemirror/language/__tests__/extension.test.ts +24 -0
- package/src/core/codemirror/language/__tests__/sql-validation.test.ts +133 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +764 -79
- package/src/core/codemirror/language/languages/markdown.ts +4 -1
- package/src/core/codemirror/language/languages/sql/banner-validation-errors.ts +85 -0
- package/src/core/codemirror/language/languages/sql/completion-builder.ts +160 -0
- package/src/core/codemirror/language/languages/sql/completion-sources.tsx +9 -3
- package/src/core/codemirror/language/languages/sql/completion-store.ts +46 -50
- package/src/core/codemirror/language/languages/sql/renderers.tsx +485 -0
- package/src/core/codemirror/language/languages/sql/sql-mode.ts +20 -0
- package/src/core/codemirror/language/languages/sql/sql.ts +218 -4
- package/src/core/codemirror/language/languages/sql/utils.ts +4 -1
- package/src/core/codemirror/language/panel/panel.tsx +8 -2
- package/src/core/codemirror/language/panel/sql.tsx +86 -4
- package/src/core/codemirror/language/utils/ast.ts +3 -3
- package/src/core/codemirror/lsp/federated-lsp.ts +4 -4
- package/src/core/codemirror/lsp/lens.ts +4 -4
- package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
- package/src/core/codemirror/lsp/types.ts +1 -1
- package/src/core/codemirror/markdown/completions.ts +1 -1
- package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
- package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/config/feature-flag.tsx +6 -2
- package/src/core/datasets/request-registry.ts +24 -1
- package/src/core/dom/events.ts +1 -1
- package/src/core/dom/outline.ts +2 -2
- package/src/core/dom/uiregistry.ts +2 -8
- package/src/core/errors/__tests__/errors.test.ts +22 -4
- package/src/core/errors/errors.ts +29 -1
- package/src/core/errors/state.ts +1 -1
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/islands/main.ts +3 -2
- package/src/core/islands/parse.ts +1 -3
- package/src/core/kernel/messages.ts +2 -1
- package/src/core/network/CachingRequestRegistry.ts +74 -0
- package/src/core/network/DeferredRequestRegistry.ts +3 -1
- package/src/core/network/__tests__/CachingRequestRegistry.test.ts +73 -0
- package/src/core/network/requests-network.ts +7 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.ts +1 -0
- package/src/core/network/types.ts +3 -1
- package/src/core/variables/state.ts +2 -2
- package/src/core/wasm/__tests__/state.test.ts +1 -1
- package/src/core/wasm/bridge.ts +5 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +9 -2
- package/src/custom.d.ts +1 -1
- package/src/hooks/useCellRenderCount.ts +1 -0
- package/src/hooks/useResizeHandle.ts +4 -1
- package/src/plugins/core/RenderHTML.tsx +1 -2
- package/src/plugins/core/registerReactComponent.tsx +23 -19
- package/src/plugins/impl/DataTablePlugin.tsx +18 -6
- package/src/plugins/impl/FileUploadPlugin.tsx +1 -1
- package/src/plugins/impl/RefreshPlugin.tsx +1 -1
- package/src/plugins/impl/SliderPlugin.tsx +4 -0
- package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +27 -9
- package/src/plugins/impl/anywidget/__tests__/AnyWidgetPlugin.test.tsx +58 -2
- package/src/plugins/impl/anywidget/__tests__/model.test.ts +3 -4
- package/src/plugins/impl/anywidget/model.ts +2 -3
- package/src/plugins/impl/data-editor/types.ts +1 -1
- package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +17 -5
- package/src/plugins/impl/data-frames/types.ts +1 -1
- package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
- package/src/plugins/impl/vega/__tests__/loader.test.ts +2 -2
- package/src/plugins/impl/vega/loader.ts +1 -1
- package/src/plugins/impl/vega/vega-component.tsx +1 -1
- package/src/plugins/impl/vega/vega-loader.ts +2 -2
- package/src/plugins/layout/NavigationMenuPlugin.tsx +1 -1
- package/src/plugins/layout/RoutesPlugin.tsx +1 -2
- package/src/plugins/plugins.ts +2 -2
- package/src/stories/dataframe.stories.tsx +2 -0
- package/src/utils/Logger.ts +1 -1
- package/src/utils/__tests__/data-views.test.ts +30 -68
- package/src/utils/__tests__/dom.test.ts +167 -0
- package/src/utils/__tests__/id-tree.test.ts +49 -1
- package/src/utils/__tests__/storage.test.ts +1 -1
- package/src/utils/__tests__/traceback.test.ts +13 -2
- package/src/utils/arrays.ts +1 -1
- package/src/utils/createReducer.ts +1 -5
- package/src/utils/data-views.ts +6 -19
- package/src/utils/dom.ts +55 -0
- package/src/utils/edit-distance.ts +1 -1
- package/src/utils/fileToBase64.ts +1 -1
- package/src/utils/id-tree.tsx +20 -18
- package/src/utils/json/base64.ts +13 -0
- package/src/utils/json/json-parser.ts +2 -2
- package/src/utils/lru.ts +4 -0
- package/src/utils/mergeRefs.ts +1 -1
- package/src/utils/objects.ts +3 -3
- package/src/utils/pluralize.ts +1 -1
- package/src/utils/routes.ts +2 -2
- package/src/utils/sets.ts +1 -1
- package/src/utils/traceback.ts +45 -15
- package/src/utils/tracer.ts +11 -9
- package/dist/assets/_baseEach-CvTX9w0Y.js +0 -1
- package/dist/assets/_baseMap-CtlwA90f.js +0 -1
- package/dist/assets/_baseUniq-BKktIGQ1.js +0 -1
- package/dist/assets/channel-Co6iMgWq.js +0 -1
- package/dist/assets/chat-panel-9alr8FS4.js +0 -3
- package/dist/assets/classDiagram-KNZD7YFC-BbJ0rY3y.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-BbJ0rY3y.js +0 -1
- package/dist/assets/clone-BMP0PsTa.js +0 -1
- package/dist/assets/command-palette-B93Pjcky.js +0 -1
- package/dist/assets/datasources-panel-v7H3cR0p.js +0 -1
- package/dist/assets/index-2252nrk6.js +0 -68
- package/dist/assets/index-C7CoaNFb.js +0 -578
- package/dist/assets/index-DadI618h.css +0 -1
- package/dist/assets/infoDiagram-STP46IZ2-CJLOpSAf.js +0 -2
- package/dist/assets/links-BpXlz1GG.js +0 -7
- package/dist/assets/min-BBO3-1Hg.js +0 -1
- package/dist/assets/secrets-panel-CfHc5YD0.js +0 -1
- package/dist/assets/sortBy-DZnlX29-.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-CdThjimL.js +0 -1
- package/src/__tests__/lru.test.ts +0 -74
|
@@ -735,16 +735,130 @@ describe("tablesCompletionSource", () => {
|
|
|
735
735
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
736
736
|
{
|
|
737
737
|
"public": {
|
|
738
|
-
"
|
|
739
|
-
"
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
738
|
+
"children": {
|
|
739
|
+
"orders": {
|
|
740
|
+
"children": [
|
|
741
|
+
{
|
|
742
|
+
"info": [Function],
|
|
743
|
+
"label": "order_id",
|
|
744
|
+
"type": "column",
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"info": [Function],
|
|
748
|
+
"label": "user_id",
|
|
749
|
+
"type": "column",
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"info": [Function],
|
|
753
|
+
"label": "total",
|
|
754
|
+
"type": "column",
|
|
755
|
+
},
|
|
756
|
+
],
|
|
757
|
+
"self": {
|
|
758
|
+
"info": [Function],
|
|
759
|
+
"label": "orders",
|
|
760
|
+
"type": "table",
|
|
761
|
+
},
|
|
762
|
+
},
|
|
763
|
+
"users": {
|
|
764
|
+
"children": [
|
|
765
|
+
{
|
|
766
|
+
"info": [Function],
|
|
767
|
+
"label": "id",
|
|
768
|
+
"type": "column",
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"info": [Function],
|
|
772
|
+
"label": "name",
|
|
773
|
+
"type": "column",
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"info": [Function],
|
|
777
|
+
"label": "email",
|
|
778
|
+
"type": "column",
|
|
779
|
+
},
|
|
780
|
+
],
|
|
781
|
+
"self": {
|
|
782
|
+
"info": [Function],
|
|
783
|
+
"label": "users",
|
|
784
|
+
"type": "table",
|
|
785
|
+
},
|
|
786
|
+
},
|
|
787
|
+
},
|
|
788
|
+
"self": {
|
|
789
|
+
"detail": "public",
|
|
790
|
+
"info": [Function],
|
|
791
|
+
"label": "public",
|
|
792
|
+
"type": "schema",
|
|
793
|
+
},
|
|
794
|
+
},
|
|
795
|
+
"test_db": {
|
|
796
|
+
"children": {
|
|
797
|
+
"public": {
|
|
798
|
+
"children": {
|
|
799
|
+
"orders": {
|
|
800
|
+
"children": [
|
|
801
|
+
{
|
|
802
|
+
"info": [Function],
|
|
803
|
+
"label": "order_id",
|
|
804
|
+
"type": "column",
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"info": [Function],
|
|
808
|
+
"label": "user_id",
|
|
809
|
+
"type": "column",
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"info": [Function],
|
|
813
|
+
"label": "total",
|
|
814
|
+
"type": "column",
|
|
815
|
+
},
|
|
816
|
+
],
|
|
817
|
+
"self": {
|
|
818
|
+
"info": [Function],
|
|
819
|
+
"label": "orders",
|
|
820
|
+
"type": "table",
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
"users": {
|
|
824
|
+
"children": [
|
|
825
|
+
{
|
|
826
|
+
"info": [Function],
|
|
827
|
+
"label": "id",
|
|
828
|
+
"type": "column",
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"info": [Function],
|
|
832
|
+
"label": "name",
|
|
833
|
+
"type": "column",
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"info": [Function],
|
|
837
|
+
"label": "email",
|
|
838
|
+
"type": "column",
|
|
839
|
+
},
|
|
840
|
+
],
|
|
841
|
+
"self": {
|
|
842
|
+
"info": [Function],
|
|
843
|
+
"label": "users",
|
|
844
|
+
"type": "table",
|
|
845
|
+
},
|
|
846
|
+
},
|
|
847
|
+
},
|
|
848
|
+
"self": {
|
|
849
|
+
"detail": "test_db.public",
|
|
850
|
+
"info": [Function],
|
|
851
|
+
"label": "public",
|
|
852
|
+
"type": "schema",
|
|
853
|
+
},
|
|
854
|
+
},
|
|
855
|
+
},
|
|
856
|
+
"self": {
|
|
857
|
+
"detail": "test_db",
|
|
858
|
+
"info": [Function],
|
|
859
|
+
"label": "test_db",
|
|
860
|
+
"type": "database",
|
|
861
|
+
},
|
|
748
862
|
},
|
|
749
863
|
}
|
|
750
864
|
`);
|
|
@@ -829,17 +943,71 @@ describe("tablesCompletionSource", () => {
|
|
|
829
943
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
830
944
|
{
|
|
831
945
|
"db1": {
|
|
832
|
-
"
|
|
833
|
-
"
|
|
834
|
-
"
|
|
835
|
-
|
|
946
|
+
"children": {
|
|
947
|
+
"schema1": {
|
|
948
|
+
"children": {
|
|
949
|
+
"table1": {
|
|
950
|
+
"children": [
|
|
951
|
+
{
|
|
952
|
+
"info": [Function],
|
|
953
|
+
"label": "col1",
|
|
954
|
+
"type": "column",
|
|
955
|
+
},
|
|
956
|
+
],
|
|
957
|
+
"self": {
|
|
958
|
+
"info": [Function],
|
|
959
|
+
"label": "table1",
|
|
960
|
+
"type": "table",
|
|
961
|
+
},
|
|
962
|
+
},
|
|
963
|
+
},
|
|
964
|
+
"self": {
|
|
965
|
+
"detail": "db1.schema1",
|
|
966
|
+
"info": [Function],
|
|
967
|
+
"label": "schema1",
|
|
968
|
+
"type": "schema",
|
|
969
|
+
},
|
|
970
|
+
},
|
|
971
|
+
},
|
|
972
|
+
"self": {
|
|
973
|
+
"detail": "db1",
|
|
974
|
+
"info": [Function],
|
|
975
|
+
"label": "db1",
|
|
976
|
+
"type": "database",
|
|
836
977
|
},
|
|
837
978
|
},
|
|
838
979
|
"db2": {
|
|
839
|
-
"
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
|
|
980
|
+
"children": {
|
|
981
|
+
"schema2": {
|
|
982
|
+
"children": {
|
|
983
|
+
"table2": {
|
|
984
|
+
"children": [
|
|
985
|
+
{
|
|
986
|
+
"info": [Function],
|
|
987
|
+
"label": "col2",
|
|
988
|
+
"type": "column",
|
|
989
|
+
},
|
|
990
|
+
],
|
|
991
|
+
"self": {
|
|
992
|
+
"info": [Function],
|
|
993
|
+
"label": "table2",
|
|
994
|
+
"type": "table",
|
|
995
|
+
},
|
|
996
|
+
},
|
|
997
|
+
},
|
|
998
|
+
"self": {
|
|
999
|
+
"detail": "db2.schema2",
|
|
1000
|
+
"info": [Function],
|
|
1001
|
+
"label": "schema2",
|
|
1002
|
+
"type": "schema",
|
|
1003
|
+
},
|
|
1004
|
+
},
|
|
1005
|
+
},
|
|
1006
|
+
"self": {
|
|
1007
|
+
"detail": "db2",
|
|
1008
|
+
"info": [Function],
|
|
1009
|
+
"label": "db2",
|
|
1010
|
+
"type": "database",
|
|
843
1011
|
},
|
|
844
1012
|
},
|
|
845
1013
|
}
|
|
@@ -975,29 +1143,179 @@ describe("tablesCompletionSource", () => {
|
|
|
975
1143
|
);
|
|
976
1144
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
977
1145
|
{
|
|
1146
|
+
"db1": {
|
|
1147
|
+
"children": {
|
|
1148
|
+
"schema1": {
|
|
1149
|
+
"children": {
|
|
1150
|
+
"table1": {
|
|
1151
|
+
"children": [
|
|
1152
|
+
{
|
|
1153
|
+
"info": [Function],
|
|
1154
|
+
"label": "col1",
|
|
1155
|
+
"type": "column",
|
|
1156
|
+
},
|
|
1157
|
+
],
|
|
1158
|
+
"self": {
|
|
1159
|
+
"info": [Function],
|
|
1160
|
+
"label": "table1",
|
|
1161
|
+
"type": "table",
|
|
1162
|
+
},
|
|
1163
|
+
},
|
|
1164
|
+
},
|
|
1165
|
+
"self": {
|
|
1166
|
+
"detail": "db1.schema1",
|
|
1167
|
+
"info": [Function],
|
|
1168
|
+
"label": "schema1",
|
|
1169
|
+
"type": "schema",
|
|
1170
|
+
},
|
|
1171
|
+
},
|
|
1172
|
+
"schema2": {
|
|
1173
|
+
"children": {
|
|
1174
|
+
"table2": {
|
|
1175
|
+
"children": [
|
|
1176
|
+
{
|
|
1177
|
+
"info": [Function],
|
|
1178
|
+
"label": "col2",
|
|
1179
|
+
"type": "column",
|
|
1180
|
+
},
|
|
1181
|
+
],
|
|
1182
|
+
"self": {
|
|
1183
|
+
"info": [Function],
|
|
1184
|
+
"label": "table2",
|
|
1185
|
+
"type": "table",
|
|
1186
|
+
},
|
|
1187
|
+
},
|
|
1188
|
+
},
|
|
1189
|
+
"self": {
|
|
1190
|
+
"detail": "db1.schema2",
|
|
1191
|
+
"info": [Function],
|
|
1192
|
+
"label": "schema2",
|
|
1193
|
+
"type": "schema",
|
|
1194
|
+
},
|
|
1195
|
+
},
|
|
1196
|
+
},
|
|
1197
|
+
"self": {
|
|
1198
|
+
"detail": "db1",
|
|
1199
|
+
"info": [Function],
|
|
1200
|
+
"label": "db1",
|
|
1201
|
+
"type": "database",
|
|
1202
|
+
},
|
|
1203
|
+
},
|
|
978
1204
|
"db2": {
|
|
979
|
-
"
|
|
980
|
-
"
|
|
981
|
-
"
|
|
982
|
-
|
|
1205
|
+
"children": {
|
|
1206
|
+
"schema2": {
|
|
1207
|
+
"children": {
|
|
1208
|
+
"table2": {
|
|
1209
|
+
"children": [
|
|
1210
|
+
{
|
|
1211
|
+
"info": [Function],
|
|
1212
|
+
"label": "col2",
|
|
1213
|
+
"type": "column",
|
|
1214
|
+
},
|
|
1215
|
+
],
|
|
1216
|
+
"self": {
|
|
1217
|
+
"info": [Function],
|
|
1218
|
+
"label": "table2",
|
|
1219
|
+
"type": "table",
|
|
1220
|
+
},
|
|
1221
|
+
},
|
|
1222
|
+
},
|
|
1223
|
+
"self": {
|
|
1224
|
+
"detail": "db2.schema2",
|
|
1225
|
+
"info": [Function],
|
|
1226
|
+
"label": "schema2",
|
|
1227
|
+
"type": "schema",
|
|
1228
|
+
},
|
|
1229
|
+
},
|
|
1230
|
+
},
|
|
1231
|
+
"self": {
|
|
1232
|
+
"detail": "db2",
|
|
1233
|
+
"info": [Function],
|
|
1234
|
+
"label": "db2",
|
|
1235
|
+
"type": "database",
|
|
983
1236
|
},
|
|
984
1237
|
},
|
|
985
1238
|
"db3": {
|
|
986
|
-
"
|
|
987
|
-
"
|
|
988
|
-
"
|
|
989
|
-
|
|
1239
|
+
"children": {
|
|
1240
|
+
"schema2": {
|
|
1241
|
+
"children": {
|
|
1242
|
+
"table2": {
|
|
1243
|
+
"children": [
|
|
1244
|
+
{
|
|
1245
|
+
"info": [Function],
|
|
1246
|
+
"label": "col2",
|
|
1247
|
+
"type": "column",
|
|
1248
|
+
},
|
|
1249
|
+
],
|
|
1250
|
+
"self": {
|
|
1251
|
+
"info": [Function],
|
|
1252
|
+
"label": "table2",
|
|
1253
|
+
"type": "table",
|
|
1254
|
+
},
|
|
1255
|
+
},
|
|
1256
|
+
},
|
|
1257
|
+
"self": {
|
|
1258
|
+
"detail": "db3.schema2",
|
|
1259
|
+
"info": [Function],
|
|
1260
|
+
"label": "schema2",
|
|
1261
|
+
"type": "schema",
|
|
1262
|
+
},
|
|
1263
|
+
},
|
|
1264
|
+
},
|
|
1265
|
+
"self": {
|
|
1266
|
+
"detail": "db3",
|
|
1267
|
+
"info": [Function],
|
|
1268
|
+
"label": "db3",
|
|
1269
|
+
"type": "database",
|
|
990
1270
|
},
|
|
991
1271
|
},
|
|
992
1272
|
"schema1": {
|
|
993
|
-
"
|
|
994
|
-
"
|
|
995
|
-
|
|
1273
|
+
"children": {
|
|
1274
|
+
"table1": {
|
|
1275
|
+
"children": [
|
|
1276
|
+
{
|
|
1277
|
+
"info": [Function],
|
|
1278
|
+
"label": "col1",
|
|
1279
|
+
"type": "column",
|
|
1280
|
+
},
|
|
1281
|
+
],
|
|
1282
|
+
"self": {
|
|
1283
|
+
"info": [Function],
|
|
1284
|
+
"label": "table1",
|
|
1285
|
+
"type": "table",
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
},
|
|
1289
|
+
"self": {
|
|
1290
|
+
"detail": "schema1",
|
|
1291
|
+
"info": [Function],
|
|
1292
|
+
"label": "schema1",
|
|
1293
|
+
"type": "schema",
|
|
1294
|
+
},
|
|
996
1295
|
},
|
|
997
1296
|
"schema2": {
|
|
998
|
-
"
|
|
999
|
-
"
|
|
1000
|
-
|
|
1297
|
+
"children": {
|
|
1298
|
+
"table2": {
|
|
1299
|
+
"children": [
|
|
1300
|
+
{
|
|
1301
|
+
"info": [Function],
|
|
1302
|
+
"label": "col2",
|
|
1303
|
+
"type": "column",
|
|
1304
|
+
},
|
|
1305
|
+
],
|
|
1306
|
+
"self": {
|
|
1307
|
+
"info": [Function],
|
|
1308
|
+
"label": "table2",
|
|
1309
|
+
"type": "table",
|
|
1310
|
+
},
|
|
1311
|
+
},
|
|
1312
|
+
},
|
|
1313
|
+
"self": {
|
|
1314
|
+
"detail": "schema2",
|
|
1315
|
+
"info": [Function],
|
|
1316
|
+
"label": "schema2",
|
|
1317
|
+
"type": "schema",
|
|
1318
|
+
},
|
|
1001
1319
|
},
|
|
1002
1320
|
}
|
|
1003
1321
|
`);
|
|
@@ -1066,11 +1384,82 @@ describe("tablesCompletionSource", () => {
|
|
|
1066
1384
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
1067
1385
|
{
|
|
1068
1386
|
"public": {
|
|
1069
|
-
"
|
|
1070
|
-
"
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1387
|
+
"children": {
|
|
1388
|
+
"users": {
|
|
1389
|
+
"children": [
|
|
1390
|
+
{
|
|
1391
|
+
"info": [Function],
|
|
1392
|
+
"label": "id",
|
|
1393
|
+
"type": "column",
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"info": [Function],
|
|
1397
|
+
"label": "name",
|
|
1398
|
+
"type": "column",
|
|
1399
|
+
},
|
|
1400
|
+
{
|
|
1401
|
+
"info": [Function],
|
|
1402
|
+
"label": "email",
|
|
1403
|
+
"type": "column",
|
|
1404
|
+
},
|
|
1405
|
+
],
|
|
1406
|
+
"self": {
|
|
1407
|
+
"info": [Function],
|
|
1408
|
+
"label": "users",
|
|
1409
|
+
"type": "table",
|
|
1410
|
+
},
|
|
1411
|
+
},
|
|
1412
|
+
},
|
|
1413
|
+
"self": {
|
|
1414
|
+
"detail": "public",
|
|
1415
|
+
"info": [Function],
|
|
1416
|
+
"label": "public",
|
|
1417
|
+
"type": "schema",
|
|
1418
|
+
},
|
|
1419
|
+
},
|
|
1420
|
+
"test_db": {
|
|
1421
|
+
"children": {
|
|
1422
|
+
"public": {
|
|
1423
|
+
"children": {
|
|
1424
|
+
"users": {
|
|
1425
|
+
"children": [
|
|
1426
|
+
{
|
|
1427
|
+
"info": [Function],
|
|
1428
|
+
"label": "id",
|
|
1429
|
+
"type": "column",
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"info": [Function],
|
|
1433
|
+
"label": "name",
|
|
1434
|
+
"type": "column",
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
"info": [Function],
|
|
1438
|
+
"label": "email",
|
|
1439
|
+
"type": "column",
|
|
1440
|
+
},
|
|
1441
|
+
],
|
|
1442
|
+
"self": {
|
|
1443
|
+
"info": [Function],
|
|
1444
|
+
"label": "users",
|
|
1445
|
+
"type": "table",
|
|
1446
|
+
},
|
|
1447
|
+
},
|
|
1448
|
+
},
|
|
1449
|
+
"self": {
|
|
1450
|
+
"detail": "test_db.public",
|
|
1451
|
+
"info": [Function],
|
|
1452
|
+
"label": "public",
|
|
1453
|
+
"type": "schema",
|
|
1454
|
+
},
|
|
1455
|
+
},
|
|
1456
|
+
},
|
|
1457
|
+
"self": {
|
|
1458
|
+
"detail": "test_db",
|
|
1459
|
+
"info": [Function],
|
|
1460
|
+
"label": "test_db",
|
|
1461
|
+
"type": "database",
|
|
1462
|
+
},
|
|
1074
1463
|
},
|
|
1075
1464
|
}
|
|
1076
1465
|
`);
|
|
@@ -1196,16 +1585,55 @@ describe("tablesCompletionSource", () => {
|
|
|
1196
1585
|
expect(completionSource?.dialect).toBe(PostgreSQL);
|
|
1197
1586
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
1198
1587
|
{
|
|
1588
|
+
"test_db": {
|
|
1589
|
+
"children": {},
|
|
1590
|
+
"self": {
|
|
1591
|
+
"detail": "test_db",
|
|
1592
|
+
"info": [Function],
|
|
1593
|
+
"label": "test_db",
|
|
1594
|
+
"type": "database",
|
|
1595
|
+
},
|
|
1596
|
+
},
|
|
1199
1597
|
"test_db2": {
|
|
1200
|
-
"
|
|
1201
|
-
"
|
|
1598
|
+
"children": {
|
|
1599
|
+
"orders": {
|
|
1600
|
+
"children": [
|
|
1601
|
+
{
|
|
1602
|
+
"info": [Function],
|
|
1603
|
+
"label": "order_id",
|
|
1604
|
+
"type": "column",
|
|
1605
|
+
},
|
|
1606
|
+
],
|
|
1607
|
+
"self": {
|
|
1608
|
+
"info": [Function],
|
|
1609
|
+
"label": "orders",
|
|
1610
|
+
"type": "table",
|
|
1611
|
+
},
|
|
1612
|
+
},
|
|
1613
|
+
},
|
|
1614
|
+
"self": {
|
|
1615
|
+
"detail": "test_db2",
|
|
1616
|
+
"info": [Function],
|
|
1617
|
+
"label": "test_db2",
|
|
1618
|
+
"type": "database",
|
|
1619
|
+
},
|
|
1620
|
+
},
|
|
1621
|
+
"users": {
|
|
1622
|
+
"children": [
|
|
1623
|
+
{
|
|
1624
|
+
"info": [Function],
|
|
1625
|
+
"label": "id",
|
|
1626
|
+
"type": "column",
|
|
1627
|
+
},
|
|
1202
1628
|
],
|
|
1629
|
+
"self": {
|
|
1630
|
+
"info": [Function],
|
|
1631
|
+
"label": "users",
|
|
1632
|
+
"type": "table",
|
|
1633
|
+
},
|
|
1203
1634
|
},
|
|
1204
|
-
"users": [
|
|
1205
|
-
"id",
|
|
1206
|
-
],
|
|
1207
1635
|
}
|
|
1208
|
-
|
|
1636
|
+
`);
|
|
1209
1637
|
});
|
|
1210
1638
|
|
|
1211
1639
|
it("should return local tables", () => {
|
|
@@ -1534,14 +1962,82 @@ describe("tablesCompletionSource", () => {
|
|
|
1534
1962
|
const completionSource = completionStore.getCompletionSource(TEST_ENGINE);
|
|
1535
1963
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
1536
1964
|
{
|
|
1537
|
-
"dataset1":
|
|
1538
|
-
"
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1965
|
+
"dataset1": {
|
|
1966
|
+
"children": [
|
|
1967
|
+
{
|
|
1968
|
+
"info": [Function],
|
|
1969
|
+
"label": "col1",
|
|
1970
|
+
"type": "column",
|
|
1971
|
+
},
|
|
1972
|
+
{
|
|
1973
|
+
"info": [Function],
|
|
1974
|
+
"label": "col2",
|
|
1975
|
+
"type": "column",
|
|
1976
|
+
},
|
|
1544
1977
|
],
|
|
1978
|
+
"self": {
|
|
1979
|
+
"info": [Function],
|
|
1980
|
+
"label": "dataset1",
|
|
1981
|
+
"type": "table",
|
|
1982
|
+
},
|
|
1983
|
+
},
|
|
1984
|
+
"test_db": {
|
|
1985
|
+
"children": {
|
|
1986
|
+
"test_schema": {
|
|
1987
|
+
"children": {
|
|
1988
|
+
"dataset2": {
|
|
1989
|
+
"children": [
|
|
1990
|
+
{
|
|
1991
|
+
"info": [Function],
|
|
1992
|
+
"label": "col1",
|
|
1993
|
+
"type": "column",
|
|
1994
|
+
},
|
|
1995
|
+
],
|
|
1996
|
+
"self": {
|
|
1997
|
+
"info": [Function],
|
|
1998
|
+
"label": "dataset2",
|
|
1999
|
+
"type": "table",
|
|
2000
|
+
},
|
|
2001
|
+
},
|
|
2002
|
+
},
|
|
2003
|
+
"self": {
|
|
2004
|
+
"detail": "test_db.test_schema",
|
|
2005
|
+
"info": [Function],
|
|
2006
|
+
"label": "test_schema",
|
|
2007
|
+
"type": "schema",
|
|
2008
|
+
},
|
|
2009
|
+
},
|
|
2010
|
+
},
|
|
2011
|
+
"self": {
|
|
2012
|
+
"detail": "test_db",
|
|
2013
|
+
"info": [Function],
|
|
2014
|
+
"label": "test_db",
|
|
2015
|
+
"type": "database",
|
|
2016
|
+
},
|
|
2017
|
+
},
|
|
2018
|
+
"test_schema": {
|
|
2019
|
+
"children": {
|
|
2020
|
+
"dataset2": {
|
|
2021
|
+
"children": [
|
|
2022
|
+
{
|
|
2023
|
+
"info": [Function],
|
|
2024
|
+
"label": "col1",
|
|
2025
|
+
"type": "column",
|
|
2026
|
+
},
|
|
2027
|
+
],
|
|
2028
|
+
"self": {
|
|
2029
|
+
"info": [Function],
|
|
2030
|
+
"label": "dataset2",
|
|
2031
|
+
"type": "table",
|
|
2032
|
+
},
|
|
2033
|
+
},
|
|
2034
|
+
},
|
|
2035
|
+
"self": {
|
|
2036
|
+
"detail": "test_schema",
|
|
2037
|
+
"info": [Function],
|
|
2038
|
+
"label": "test_schema",
|
|
2039
|
+
"type": "schema",
|
|
2040
|
+
},
|
|
1545
2041
|
},
|
|
1546
2042
|
}
|
|
1547
2043
|
`);
|
|
@@ -1555,13 +2051,66 @@ describe("tablesCompletionSource", () => {
|
|
|
1555
2051
|
|
|
1556
2052
|
const completionSource = completionStore.getCompletionSource(TEST_ENGINE);
|
|
1557
2053
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
2054
|
+
{
|
|
2055
|
+
"test_db": {
|
|
2056
|
+
"children": {
|
|
2057
|
+
"test_schema": {
|
|
2058
|
+
"children": {
|
|
2059
|
+
"dataset2": {
|
|
2060
|
+
"children": [
|
|
2061
|
+
{
|
|
2062
|
+
"info": [Function],
|
|
2063
|
+
"label": "col1",
|
|
2064
|
+
"type": "column",
|
|
2065
|
+
},
|
|
2066
|
+
],
|
|
2067
|
+
"self": {
|
|
2068
|
+
"info": [Function],
|
|
2069
|
+
"label": "dataset2",
|
|
2070
|
+
"type": "table",
|
|
2071
|
+
},
|
|
2072
|
+
},
|
|
2073
|
+
},
|
|
2074
|
+
"self": {
|
|
2075
|
+
"detail": "test_db.test_schema",
|
|
2076
|
+
"info": [Function],
|
|
2077
|
+
"label": "test_schema",
|
|
2078
|
+
"type": "schema",
|
|
2079
|
+
},
|
|
2080
|
+
},
|
|
2081
|
+
},
|
|
2082
|
+
"self": {
|
|
2083
|
+
"detail": "test_db",
|
|
2084
|
+
"info": [Function],
|
|
2085
|
+
"label": "test_db",
|
|
2086
|
+
"type": "database",
|
|
2087
|
+
},
|
|
2088
|
+
},
|
|
2089
|
+
"test_schema": {
|
|
2090
|
+
"children": {
|
|
2091
|
+
"dataset2": {
|
|
2092
|
+
"children": [
|
|
2093
|
+
{
|
|
2094
|
+
"info": [Function],
|
|
2095
|
+
"label": "col1",
|
|
2096
|
+
"type": "column",
|
|
2097
|
+
},
|
|
2098
|
+
],
|
|
2099
|
+
"self": {
|
|
2100
|
+
"info": [Function],
|
|
2101
|
+
"label": "dataset2",
|
|
2102
|
+
"type": "table",
|
|
2103
|
+
},
|
|
2104
|
+
},
|
|
2105
|
+
},
|
|
2106
|
+
"self": {
|
|
2107
|
+
"detail": "test_schema",
|
|
2108
|
+
"info": [Function],
|
|
2109
|
+
"label": "test_schema",
|
|
2110
|
+
"type": "schema",
|
|
2111
|
+
},
|
|
2112
|
+
},
|
|
2113
|
+
}
|
|
1565
2114
|
`);
|
|
1566
2115
|
|
|
1567
2116
|
const newConnection: DataSourceConnection = {
|
|
@@ -1593,17 +2142,85 @@ describe("tablesCompletionSource", () => {
|
|
|
1593
2142
|
mockStore.set(datasetsAtom, { tables: testDatasets } as DatasetsState);
|
|
1594
2143
|
const completionSource = completionStore.getCompletionSource(TEST_ENGINE);
|
|
1595
2144
|
expect(completionSource?.schema).toMatchInlineSnapshot(`
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
2145
|
+
{
|
|
2146
|
+
"dataset1": {
|
|
2147
|
+
"children": [
|
|
2148
|
+
{
|
|
2149
|
+
"info": [Function],
|
|
2150
|
+
"label": "col1",
|
|
2151
|
+
"type": "column",
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"info": [Function],
|
|
2155
|
+
"label": "col2",
|
|
2156
|
+
"type": "column",
|
|
2157
|
+
},
|
|
2158
|
+
],
|
|
2159
|
+
"self": {
|
|
2160
|
+
"info": [Function],
|
|
2161
|
+
"label": "dataset1",
|
|
2162
|
+
"type": "table",
|
|
2163
|
+
},
|
|
2164
|
+
},
|
|
2165
|
+
"test_db": {
|
|
2166
|
+
"children": {
|
|
2167
|
+
"test_schema": {
|
|
2168
|
+
"children": {
|
|
2169
|
+
"dataset2": {
|
|
2170
|
+
"children": [
|
|
2171
|
+
{
|
|
2172
|
+
"info": [Function],
|
|
2173
|
+
"label": "col1",
|
|
2174
|
+
"type": "column",
|
|
2175
|
+
},
|
|
2176
|
+
],
|
|
2177
|
+
"self": {
|
|
2178
|
+
"info": [Function],
|
|
2179
|
+
"label": "dataset2",
|
|
2180
|
+
"type": "table",
|
|
2181
|
+
},
|
|
2182
|
+
},
|
|
2183
|
+
},
|
|
2184
|
+
"self": {
|
|
2185
|
+
"detail": "test_db.test_schema",
|
|
2186
|
+
"info": [Function],
|
|
2187
|
+
"label": "test_schema",
|
|
2188
|
+
"type": "schema",
|
|
2189
|
+
},
|
|
2190
|
+
},
|
|
2191
|
+
},
|
|
2192
|
+
"self": {
|
|
2193
|
+
"detail": "test_db",
|
|
2194
|
+
"info": [Function],
|
|
2195
|
+
"label": "test_db",
|
|
2196
|
+
"type": "database",
|
|
2197
|
+
},
|
|
2198
|
+
},
|
|
2199
|
+
"test_schema": {
|
|
2200
|
+
"children": {
|
|
2201
|
+
"dataset2": {
|
|
2202
|
+
"children": [
|
|
2203
|
+
{
|
|
2204
|
+
"info": [Function],
|
|
2205
|
+
"label": "col1",
|
|
2206
|
+
"type": "column",
|
|
2207
|
+
},
|
|
2208
|
+
],
|
|
2209
|
+
"self": {
|
|
2210
|
+
"info": [Function],
|
|
2211
|
+
"label": "dataset2",
|
|
2212
|
+
"type": "table",
|
|
2213
|
+
},
|
|
2214
|
+
},
|
|
2215
|
+
},
|
|
2216
|
+
"self": {
|
|
2217
|
+
"detail": "test_schema",
|
|
2218
|
+
"info": [Function],
|
|
2219
|
+
"label": "test_schema",
|
|
2220
|
+
"type": "schema",
|
|
2221
|
+
},
|
|
2222
|
+
},
|
|
2223
|
+
}
|
|
1607
2224
|
`);
|
|
1608
2225
|
|
|
1609
2226
|
const newTestDatasets = [
|
|
@@ -1620,17 +2237,85 @@ describe("tablesCompletionSource", () => {
|
|
|
1620
2237
|
const newCompletionSource =
|
|
1621
2238
|
completionStore.getCompletionSource(TEST_ENGINE);
|
|
1622
2239
|
expect(newCompletionSource?.schema).toMatchInlineSnapshot(`
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
2240
|
+
{
|
|
2241
|
+
"dataset3": {
|
|
2242
|
+
"children": [
|
|
2243
|
+
{
|
|
2244
|
+
"info": [Function],
|
|
2245
|
+
"label": "col1",
|
|
2246
|
+
"type": "column",
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
"info": [Function],
|
|
2250
|
+
"label": "col2",
|
|
2251
|
+
"type": "column",
|
|
2252
|
+
},
|
|
2253
|
+
],
|
|
2254
|
+
"self": {
|
|
2255
|
+
"info": [Function],
|
|
2256
|
+
"label": "dataset3",
|
|
2257
|
+
"type": "table",
|
|
2258
|
+
},
|
|
2259
|
+
},
|
|
2260
|
+
"test_db": {
|
|
2261
|
+
"children": {
|
|
2262
|
+
"test_schema": {
|
|
2263
|
+
"children": {
|
|
2264
|
+
"dataset2": {
|
|
2265
|
+
"children": [
|
|
2266
|
+
{
|
|
2267
|
+
"info": [Function],
|
|
2268
|
+
"label": "col1",
|
|
2269
|
+
"type": "column",
|
|
2270
|
+
},
|
|
2271
|
+
],
|
|
2272
|
+
"self": {
|
|
2273
|
+
"info": [Function],
|
|
2274
|
+
"label": "dataset2",
|
|
2275
|
+
"type": "table",
|
|
2276
|
+
},
|
|
2277
|
+
},
|
|
2278
|
+
},
|
|
2279
|
+
"self": {
|
|
2280
|
+
"detail": "test_db.test_schema",
|
|
2281
|
+
"info": [Function],
|
|
2282
|
+
"label": "test_schema",
|
|
2283
|
+
"type": "schema",
|
|
2284
|
+
},
|
|
2285
|
+
},
|
|
2286
|
+
},
|
|
2287
|
+
"self": {
|
|
2288
|
+
"detail": "test_db",
|
|
2289
|
+
"info": [Function],
|
|
2290
|
+
"label": "test_db",
|
|
2291
|
+
"type": "database",
|
|
2292
|
+
},
|
|
2293
|
+
},
|
|
2294
|
+
"test_schema": {
|
|
2295
|
+
"children": {
|
|
2296
|
+
"dataset2": {
|
|
2297
|
+
"children": [
|
|
2298
|
+
{
|
|
2299
|
+
"info": [Function],
|
|
2300
|
+
"label": "col1",
|
|
2301
|
+
"type": "column",
|
|
2302
|
+
},
|
|
2303
|
+
],
|
|
2304
|
+
"self": {
|
|
2305
|
+
"info": [Function],
|
|
2306
|
+
"label": "dataset2",
|
|
2307
|
+
"type": "table",
|
|
2308
|
+
},
|
|
2309
|
+
},
|
|
2310
|
+
},
|
|
2311
|
+
"self": {
|
|
2312
|
+
"detail": "test_schema",
|
|
2313
|
+
"info": [Function],
|
|
2314
|
+
"label": "test_schema",
|
|
2315
|
+
"type": "schema",
|
|
2316
|
+
},
|
|
2317
|
+
},
|
|
2318
|
+
}
|
|
1634
2319
|
`);
|
|
1635
2320
|
});
|
|
1636
2321
|
});
|