@lunora/studio 1.0.0-alpha.8 → 1.0.0-alpha.80
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/LICENSE.md +6 -0
- package/dist/index.d.ts +777 -780
- package/dist/index.js +1 -41
- package/dist/mount.d.ts +10 -10
- package/dist/mount.js +1 -26
- package/dist/packem_chunks/ApiTab.js +1 -0
- package/dist/packem_chunks/AuditPanel.js +1 -0
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -0
- package/dist/packem_chunks/ExportImportPanel.js +3 -0
- package/dist/packem_chunks/FileBrowser.js +4 -0
- package/dist/packem_chunks/FunctionRunner.js +1 -0
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -0
- package/dist/packem_chunks/HealthPanel.js +1 -0
- package/dist/packem_chunks/InsightsPanel.js +1 -0
- package/dist/packem_chunks/LogsPanel.js +1 -0
- package/dist/packem_chunks/MailPanel.js +2 -0
- package/dist/packem_chunks/MetricsPanel.js +1 -0
- package/dist/packem_chunks/NotificationsPanel.js +1 -0
- package/dist/packem_chunks/PitrPanel.js +1 -0
- package/dist/packem_chunks/SchemaViewer.js +1 -0
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -0
- package/dist/packem_chunks/SettingsPanel.js +1 -0
- package/dist/packem_chunks/SqlEditorPanel.js +6 -0
- package/dist/packem_chunks/TableEditor.js +1 -0
- package/dist/packem_chunks/agents-panel.js +1 -0
- package/dist/packem_chunks/analytics-panel.js +1 -0
- package/dist/packem_chunks/auth-audit-panel.js +1 -0
- package/dist/packem_chunks/auth-config-panel.js +1 -0
- package/dist/packem_chunks/auth-sessions-panel.js +1 -0
- package/dist/packem_chunks/containers-panel.js +1 -0
- package/dist/packem_chunks/dashboards-panel.js +1 -0
- package/dist/packem_chunks/fanout-panel.js +1 -0
- package/dist/packem_chunks/flags-panel.js +1 -0
- package/dist/packem_chunks/issues-panel.js +1 -0
- package/dist/packem_chunks/kv-browser.js +1 -0
- package/dist/packem_chunks/log-drains-panel.js +4 -0
- package/dist/packem_chunks/migrations-route.js +1 -0
- package/dist/packem_chunks/organizations-panel.js +1 -0
- package/dist/packem_chunks/payments-panel.js +1 -0
- package/dist/packem_chunks/permissions-panel.js +1 -0
- package/dist/packem_chunks/queues-panel.js +1 -0
- package/dist/packem_chunks/rls-panel.js +1 -0
- package/dist/packem_chunks/schedule-panel.js +1 -0
- package/dist/packem_chunks/sparkline.js +1 -0
- package/dist/packem_chunks/storage-rules-panel.js +1 -0
- package/dist/packem_chunks/subscriptions-panel.js +1 -0
- package/dist/packem_chunks/sync-client-panel.js +1 -0
- package/dist/packem_chunks/traces-panel.js +1 -0
- package/dist/packem_chunks/users-panel.js +1 -0
- package/dist/packem_chunks/vector-browser.js +1 -0
- package/dist/packem_chunks/workflows-panel.js +1 -0
- package/dist/packem_shared/ADMIN_FUNCTIONS-BnD4aovm.js +1 -0
- package/dist/packem_shared/ApiDocsPanel-DfUQ1ZAF.js +2 -0
- package/dist/packem_shared/ApiReferencePanel-9q8BbJl-.js +1 -0
- package/dist/packem_shared/CommandPalette--SQwfTW1.js +1 -0
- package/dist/packem_shared/ConfirmButton-CTL3f3kr.js +1 -0
- package/dist/packem_shared/ConnectionBadge-DOk0CQWo.js +1 -0
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-BCC8_4BQ.js +1 -0
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js +1 -0
- package/dist/packem_shared/DEFAULT_LOCALE-BZ4NojpD.js +1 -0
- package/dist/packem_shared/DataBrowser-CuRlztBz.js +1 -0
- package/dist/packem_shared/DataFilters-B26ZeqBZ.js +1 -0
- package/dist/packem_shared/ErrorBoundary-DvzYskH7.js +1 -0
- package/dist/packem_shared/GlobalDataBrowser-DB-vQ2_H.js +1 -0
- package/dist/packem_shared/HomePanel-Dcs4a3Ax.js +1 -0
- package/dist/packem_shared/MigrationsPanel-C2OnsqRb.js +1 -0
- package/dist/packem_shared/OpenRpcReferencePanel-qOZcWXMs.js +1 -0
- package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.js +1 -0
- package/dist/packem_shared/ScheduledJobs-D8kBZWBu.js +1 -0
- package/dist/packem_shared/ShardInput-BVn2iCU0.js +1 -0
- package/dist/packem_shared/Studio-B26_pT8J.js +1 -0
- package/dist/packem_shared/StudioApp-bXhJeLlZ.js +1 -0
- package/dist/packem_shared/StudioI18nProvider-CZ5h4nrV.js +1 -0
- package/dist/packem_shared/advisor-view-Pa8HLtBv.js +1 -0
- package/dist/packem_shared/aggregateMetrics-BNfajLa2.js +1 -0
- package/dist/packem_shared/alert-CVcOFuDR.js +1 -0
- package/dist/packem_shared/app.d-DW7yZsfu.d.ts +252 -0
- package/dist/packem_shared/badge-BbuuAio7.js +1 -0
- package/dist/packem_shared/bar-chart-DraN_srt.js +9 -0
- package/dist/packem_shared/browser-storage-xjTyMKY0.js +1 -0
- package/dist/packem_shared/button-BkCrNcAs.js +1 -0
- package/dist/packem_shared/card-CIDGUN6K.js +1 -0
- package/dist/packem_shared/cf-links-gbDy51nR.js +1 -0
- package/dist/packem_shared/checkbox-StT4Gob6.js +1 -0
- package/dist/packem_shared/data-grid-DcxyIXwG.js +1 -0
- package/dist/packem_shared/data-view-params-ClrV7XgF.js +1 -0
- package/dist/packem_shared/dropdown-menu-C3RQ_HlW.js +2 -0
- package/dist/packem_shared/empty-state-Cg7t_8qu.js +1 -0
- package/dist/packem_shared/error-alert-t6cpEi0z.js +1 -0
- package/dist/packem_shared/grid-features-jnrD0SpX.js +6 -0
- package/dist/packem_shared/home-panel-CU6MWLHG.js +3 -0
- package/dist/packem_shared/input-JHu63lTv.js +1 -0
- package/dist/packem_shared/internal-BSIsQVC6.js +2 -0
- package/dist/packem_shared/label-6uP1obNF.js +1 -0
- package/dist/packem_shared/live-status-CmuRLFKf.js +1 -0
- package/dist/packem_shared/log-fields-CoL3hsIQ.js +1 -0
- package/dist/packem_shared/modal-shell-CUwwWC2o.js +1 -0
- package/dist/packem_shared/operation-console-provider-BMJNtiyB.js +1 -0
- package/dist/packem_shared/recording-client-DRAZEmzE.js +1 -0
- package/dist/packem_shared/reference-view-DnYYWr7I.js +12 -0
- package/dist/packem_shared/result-chart-DzJOVsaw.js +1 -0
- package/dist/packem_shared/schema-diagram-cg-bz_VL.js +2 -0
- package/dist/packem_shared/scroll-area-DTEq6Jec.js +2 -0
- package/dist/packem_shared/select-Bul-DeII.js +2 -0
- package/dist/packem_shared/shard-history-DMEW5VBE.js +1 -0
- package/dist/packem_shared/skeleton-C1wQ9M5t.js +1 -0
- package/dist/packem_shared/sparkline-CgjeUU2I.js +1 -0
- package/dist/packem_shared/storage-tier-DznqOf-q.js +1 -0
- package/dist/packem_shared/studio-q-C-acL7.js +2 -0
- package/dist/packem_shared/table-DdJBrClo.js +2 -0
- package/dist/packem_shared/table-list-sidebar-BFkSQwlB.js +1 -0
- package/dist/packem_shared/textarea-Bu2-jKAs.js +1 -0
- package/dist/packem_shared/trace-handoff-Dw7mwjxu.js +1 -0
- package/dist/packem_shared/use-admin-query-QJ-ibl5u.js +1 -0
- package/dist/packem_shared/use-async-submit-q3ymBJkD.js +1 -0
- package/dist/packem_shared/use-auth-config-BObBpdsi.js +1 -0
- package/dist/packem_shared/use-sql-assistant-CHEu2-Rk.js +1 -0
- package/dist/packem_shared/useDebounced-Ihdiid_k.js +1 -0
- package/dist/packem_shared/utils-bhneXptQ.js +1 -0
- package/dist/packem_shared/virtual-rect-1o1veP7R.js +1 -0
- package/dist/standalone/chunk-2GA4SHO7.js +1 -0
- package/dist/standalone/chunk-2OUPA2WJ.js +1 -0
- package/dist/standalone/chunk-2PJNAWB3.js +1 -0
- package/dist/standalone/chunk-2VDFV5TD.js +1 -0
- package/dist/standalone/chunk-2WOIRKEI.js +1 -0
- package/dist/standalone/chunk-33CL6OHR.js +1 -0
- package/dist/standalone/chunk-34D36UCW.js +1 -0
- package/dist/standalone/chunk-3C3CG7ZK.js +1 -0
- package/dist/standalone/chunk-3O3HAXW7.js +1 -0
- package/dist/standalone/chunk-3STOIE7Q.js +1 -0
- package/dist/standalone/chunk-3XIESWL4.js +1 -0
- package/dist/standalone/chunk-4UOFSGUS.js +1 -0
- package/dist/standalone/chunk-53WEPGUD.js +1 -0
- package/dist/standalone/chunk-54MMVNPT.js +1 -0
- package/dist/standalone/chunk-5CVJS7ON.js +1 -0
- package/dist/standalone/chunk-5Y3QLNWX.js +1 -0
- package/dist/standalone/chunk-6IKEW5LG.js +1 -0
- package/dist/standalone/chunk-6LNCYDZO.js +1 -0
- package/dist/standalone/chunk-6NY7SPDL.js +1 -0
- package/dist/standalone/chunk-6PNPIW6I.js +2 -0
- package/dist/standalone/chunk-6ST5ECQA.js +1 -0
- package/dist/standalone/chunk-6VAKZALJ.js +1 -0
- package/dist/standalone/chunk-6YI4WJO4.js +1 -0
- package/dist/standalone/chunk-6YTSSIEJ.js +3 -0
- package/dist/standalone/chunk-7LWMHTJ3.js +1 -0
- package/dist/standalone/chunk-7QIFDWQV.js +1 -0
- package/dist/standalone/chunk-7T7UOTYK.js +1 -0
- package/dist/standalone/chunk-A74VSSA2.js +4 -0
- package/dist/standalone/chunk-AADILRJW.js +14 -0
- package/dist/standalone/chunk-AVAC26HJ.js +1 -0
- package/dist/standalone/chunk-BGBLQ563.js +1 -0
- package/dist/standalone/chunk-CCVXYYPJ.js +1 -0
- package/dist/standalone/chunk-CFPZYHPY.js +2 -0
- package/dist/standalone/chunk-CT5MMH4O.js +1 -0
- package/dist/standalone/chunk-CTNB2KIA.js +1 -0
- package/dist/standalone/chunk-CU55Y5TV.js +62 -0
- package/dist/standalone/chunk-D2RKH6JK.js +1 -0
- package/dist/standalone/chunk-E3NMX2VU.js +4 -0
- package/dist/standalone/chunk-EN2QAEO4.js +11 -0
- package/dist/standalone/chunk-ESVP44Y3.js +1 -0
- package/dist/standalone/chunk-FNPJ7GJZ.js +1 -0
- package/dist/standalone/chunk-FOBRNWBG.js +3 -0
- package/dist/standalone/chunk-FXCBF4XT.js +1 -0
- package/dist/standalone/chunk-G6PSMGLD.js +1 -0
- package/dist/standalone/chunk-GAX5IZYG.js +8 -0
- package/dist/standalone/chunk-GB6U2BPU.js +1 -0
- package/dist/standalone/chunk-GEDMLM4A.js +6 -0
- package/dist/standalone/chunk-GMR677FL.js +1 -0
- package/dist/standalone/chunk-GRL5MG3Z.js +1 -0
- package/dist/standalone/chunk-GXSZH7VJ.js +13 -0
- package/dist/standalone/chunk-GYKVBKT5.js +1 -0
- package/dist/standalone/chunk-H6YOWRFB.js +1 -0
- package/dist/standalone/chunk-HJ3E4YF5.js +1 -0
- package/dist/standalone/chunk-HJD2YUQS.js +1 -0
- package/dist/standalone/chunk-HPFLBYRI.js +1 -0
- package/dist/standalone/chunk-IC4L6G56.js +1 -0
- package/dist/standalone/chunk-IHQC7J35.js +1 -0
- package/dist/standalone/chunk-ILNELDFC.js +1 -0
- package/dist/standalone/chunk-IVFHIQOT.js +1 -0
- package/dist/standalone/chunk-JLOWAJRR.js +1 -0
- package/dist/standalone/chunk-JN2Y24PY.js +1 -0
- package/dist/standalone/chunk-JRMMYIAF.js +1 -0
- package/dist/standalone/chunk-KC44QCN6.js +1 -0
- package/dist/standalone/chunk-KJB7YAKB.js +1 -0
- package/dist/standalone/chunk-KLQYC6CC.js +1 -0
- package/dist/standalone/chunk-KUVMORDQ.js +1 -0
- package/dist/standalone/chunk-KZ3ALMMP.js +1 -0
- package/dist/standalone/chunk-L7R74G63.js +1 -0
- package/dist/standalone/chunk-LEDWUPXM.js +1 -0
- package/dist/standalone/chunk-LFKCLLPT.js +1 -0
- package/dist/standalone/chunk-MIQTKZAR.js +1 -0
- package/dist/standalone/chunk-OG4N2XHD.js +19 -0
- package/dist/standalone/chunk-OY2RVUZL.js +1 -0
- package/dist/standalone/chunk-P4YLIBCN.js +1 -0
- package/dist/standalone/chunk-PZVU2QMX.js +1 -0
- package/dist/standalone/chunk-Q7O6B7WC.js +1 -0
- package/dist/standalone/chunk-QBWRC5YX.js +1 -0
- package/dist/standalone/chunk-QLQADHFE.js +1 -0
- package/dist/standalone/chunk-QWGT25SE.js +1 -0
- package/dist/standalone/chunk-QXXIJAD5.js +1 -0
- package/dist/standalone/chunk-QZGTH6WH.js +1 -0
- package/dist/standalone/chunk-RJP3WBZ4.js +1 -0
- package/dist/standalone/chunk-RNL6BSFM.js +1 -0
- package/dist/standalone/chunk-RNRJKBY3.js +4 -0
- package/dist/standalone/chunk-RQ7AFLIV.js +1 -0
- package/dist/standalone/chunk-S252DAFP.js +1 -0
- package/dist/standalone/chunk-S2VVR7HI.js +1 -0
- package/dist/standalone/chunk-SD4BERSA.js +1 -0
- package/dist/standalone/chunk-SFDOII3B.js +1 -0
- package/dist/standalone/chunk-SKHEGARW.js +1 -0
- package/dist/standalone/chunk-SKW6J4VW.js +1 -0
- package/dist/standalone/chunk-SMIESS7P.js +1 -0
- package/dist/standalone/chunk-T6VMSOBB.js +1 -0
- package/dist/standalone/chunk-T7IUZIF4.js +1 -0
- package/dist/standalone/chunk-THIXMMZD.js +1 -0
- package/dist/standalone/chunk-TTGOOYLF.js +1 -0
- package/dist/standalone/chunk-U6TNNM5U.js +1 -0
- package/dist/standalone/chunk-UZERI5YC.js +1 -0
- package/dist/standalone/chunk-V53KNYRN.js +1 -0
- package/dist/standalone/chunk-VHWOCPRK.js +1 -0
- package/dist/standalone/chunk-W6SAOXGH.js +6 -0
- package/dist/standalone/chunk-WBYSSCV2.js +1 -0
- package/dist/standalone/chunk-X665E2HU.js +1 -0
- package/dist/standalone/chunk-XBDKZZ67.js +1 -0
- package/dist/standalone/chunk-XDAT7LHC.js +1 -0
- package/dist/standalone/chunk-XQCVZAGU.js +1 -0
- package/dist/standalone/chunk-XS5LDR52.js +1 -0
- package/dist/standalone/chunk-XXQUMVWH.js +1 -0
- package/dist/standalone/chunk-Y5Y7DHFW.js +1 -0
- package/dist/standalone/chunk-YJYTMQJI.js +1 -0
- package/dist/standalone/chunk-Z2V42P7J.js +1 -0
- package/dist/standalone/chunk-ZJGP6EKR.js +1 -0
- package/dist/standalone/studio.js +9 -356
- package/dist/styles.css +2 -2
- package/package.json +16 -14
- package/dist/packem_shared/ADMIN_FUNCTIONS-DjXgvJb6.js +0 -46
- package/dist/packem_shared/ApiDocsPanel-yVSGHK3H.js +0 -842
- package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
- package/dist/packem_shared/ApiTab-rwttyQ1-.js +0 -251
- package/dist/packem_shared/AuditPanel-BqXZAsu_.js +0 -212
- package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
- package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
- package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
- package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
- package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
- package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
- package/dist/packem_shared/DataBrowser-Ck_7QwNK.js +0 -4542
- package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
- package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
- package/dist/packem_shared/ExportImportPanel-Dq6rj0tI.js +0 -193
- package/dist/packem_shared/FileBrowser-0pCpdKPE.js +0 -2932
- package/dist/packem_shared/FunctionRunner-7NH3KcTg.js +0 -343
- package/dist/packem_shared/FunctionStatsPanel-Cn_EBpDy.js +0 -432
- package/dist/packem_shared/GlobalDataBrowser-BTEmGrph.js +0 -318
- package/dist/packem_shared/HealthPanel-CQ4LzVET.js +0 -640
- package/dist/packem_shared/HomePanel-CP0lN1eF.js +0 -1273
- package/dist/packem_shared/InsightsPanel-DzNtoz7k.js +0 -423
- package/dist/packem_shared/LogsPanel-C3W0mabf.js +0 -839
- package/dist/packem_shared/MailPanel-CoEfWkCh.js +0 -447
- package/dist/packem_shared/MetricsPanel-CujtUfpl.js +0 -1625
- package/dist/packem_shared/MigrationsPanel-RX5qIFSr.js +0 -246
- package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
- package/dist/packem_shared/PitrPanel-LJGNP_IX.js +0 -252
- package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
- package/dist/packem_shared/ScheduledJobs-CabfKbyM.js +0 -159
- package/dist/packem_shared/SchemaViewer-Bam6ylvw.js +0 -2512
- package/dist/packem_shared/SecurityAdvisorPanel-DHr_bI38.js +0 -79
- package/dist/packem_shared/SettingsPanel-CBXQpYQA.js +0 -176
- package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
- package/dist/packem_shared/SqlEditorPanel-D5wMIxcg.js +0 -13
- package/dist/packem_shared/Studio-DkgODWD3.js +0 -33
- package/dist/packem_shared/StudioApp-ColQCvC_.js +0 -657
- package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
- package/dist/packem_shared/TableEditor-B8K5nUna.js +0 -371
- package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
- package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
- package/dist/packem_shared/app.d-Nbhpihxv.d.ts +0 -300
- package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
- package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
- package/dist/packem_shared/button-BhsN2uZH.js +0 -49
- package/dist/packem_shared/card-DURq3ElK.js +0 -175
- package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
- package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
- package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
- package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
- package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
- package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
- package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
- package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
- package/dist/packem_shared/label-D8ykjn5J.js +0 -46
- package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
- package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
- package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
- package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
- package/dist/packem_shared/sql-editor-panel-Smfl_FDF.js +0 -2562
- package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
- package/dist/packem_shared/studio-Be28OqIx.js +0 -10413
- package/dist/packem_shared/table-_RzNvy3R.js +0 -246
- package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
- package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
- package/dist/packem_shared/use-live-admin-Dq6g3daN.js +0 -73
- package/dist/packem_shared/use-live-shard-seed-Cuk3dnH0.js +0 -76
- package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
- package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
- package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
import { c } from 'react/compiler-runtime';
|
|
2
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
3
|
-
|
|
4
|
-
const OPERATORS = [{
|
|
5
|
-
label: "=",
|
|
6
|
-
value: "eq"
|
|
7
|
-
}, {
|
|
8
|
-
label: "≠",
|
|
9
|
-
value: "ne"
|
|
10
|
-
}, {
|
|
11
|
-
label: "<",
|
|
12
|
-
value: "lt"
|
|
13
|
-
}, {
|
|
14
|
-
label: "≤",
|
|
15
|
-
value: "lte"
|
|
16
|
-
}, {
|
|
17
|
-
label: ">",
|
|
18
|
-
value: "gt"
|
|
19
|
-
}, {
|
|
20
|
-
label: "≥",
|
|
21
|
-
value: "gte"
|
|
22
|
-
}, {
|
|
23
|
-
label: "contains",
|
|
24
|
-
value: "contains"
|
|
25
|
-
}];
|
|
26
|
-
const toFilterClauses = (filters) => filters.filter((filter) => filter.column !== "").map((filter) => {
|
|
27
|
-
const numeric = filter.operator !== "contains" && filter.value.trim() !== "" && !Number.isNaN(Number(filter.value));
|
|
28
|
-
return {
|
|
29
|
-
column: filter.column,
|
|
30
|
-
operator: filter.operator,
|
|
31
|
-
value: numeric ? Number(filter.value) : filter.value
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
const DataFilters = (t0) => {
|
|
35
|
-
const $ = c(40);
|
|
36
|
-
const {
|
|
37
|
-
columns,
|
|
38
|
-
filters,
|
|
39
|
-
onFiltersChange,
|
|
40
|
-
onSearchChange,
|
|
41
|
-
search
|
|
42
|
-
} = t0;
|
|
43
|
-
let t1;
|
|
44
|
-
if ($[0] !== columns[0] || $[1] !== filters || $[2] !== onFiltersChange) {
|
|
45
|
-
t1 = () => {
|
|
46
|
-
onFiltersChange([...filters, {
|
|
47
|
-
column: columns[0] ?? "",
|
|
48
|
-
operator: "eq",
|
|
49
|
-
value: ""
|
|
50
|
-
}]);
|
|
51
|
-
};
|
|
52
|
-
$[0] = columns[0];
|
|
53
|
-
$[1] = filters;
|
|
54
|
-
$[2] = onFiltersChange;
|
|
55
|
-
$[3] = t1;
|
|
56
|
-
} else {
|
|
57
|
-
t1 = $[3];
|
|
58
|
-
}
|
|
59
|
-
const addFilter = t1;
|
|
60
|
-
let t2;
|
|
61
|
-
if ($[4] !== filters || $[5] !== onFiltersChange) {
|
|
62
|
-
t2 = (event) => {
|
|
63
|
-
const index = Number(event.currentTarget.dataset.index);
|
|
64
|
-
onFiltersChange(filters.filter((_, position) => position !== index));
|
|
65
|
-
};
|
|
66
|
-
$[4] = filters;
|
|
67
|
-
$[5] = onFiltersChange;
|
|
68
|
-
$[6] = t2;
|
|
69
|
-
} else {
|
|
70
|
-
t2 = $[6];
|
|
71
|
-
}
|
|
72
|
-
const removeFilter = t2;
|
|
73
|
-
let t3;
|
|
74
|
-
if ($[7] !== filters || $[8] !== onFiltersChange) {
|
|
75
|
-
t3 = (event_0) => {
|
|
76
|
-
const index_0 = Number(event_0.currentTarget.dataset.index);
|
|
77
|
-
const next = event_0.currentTarget.value;
|
|
78
|
-
onFiltersChange(filters.map((filter, position_0) => position_0 === index_0 ? {
|
|
79
|
-
...filter,
|
|
80
|
-
column: next
|
|
81
|
-
} : filter));
|
|
82
|
-
};
|
|
83
|
-
$[7] = filters;
|
|
84
|
-
$[8] = onFiltersChange;
|
|
85
|
-
$[9] = t3;
|
|
86
|
-
} else {
|
|
87
|
-
t3 = $[9];
|
|
88
|
-
}
|
|
89
|
-
const changeColumn = t3;
|
|
90
|
-
let t4;
|
|
91
|
-
if ($[10] !== filters || $[11] !== onFiltersChange) {
|
|
92
|
-
t4 = (event_1) => {
|
|
93
|
-
const index_1 = Number(event_1.currentTarget.dataset.index);
|
|
94
|
-
const next_0 = event_1.currentTarget.value;
|
|
95
|
-
onFiltersChange(filters.map((filter_0, position_1) => position_1 === index_1 ? {
|
|
96
|
-
...filter_0,
|
|
97
|
-
operator: next_0
|
|
98
|
-
} : filter_0));
|
|
99
|
-
};
|
|
100
|
-
$[10] = filters;
|
|
101
|
-
$[11] = onFiltersChange;
|
|
102
|
-
$[12] = t4;
|
|
103
|
-
} else {
|
|
104
|
-
t4 = $[12];
|
|
105
|
-
}
|
|
106
|
-
const changeOperator = t4;
|
|
107
|
-
let t5;
|
|
108
|
-
if ($[13] !== filters || $[14] !== onFiltersChange) {
|
|
109
|
-
t5 = (event_2) => {
|
|
110
|
-
const index_2 = Number(event_2.currentTarget.dataset.index);
|
|
111
|
-
const next_1 = event_2.currentTarget.value;
|
|
112
|
-
onFiltersChange(filters.map((filter_1, position_2) => position_2 === index_2 ? {
|
|
113
|
-
...filter_1,
|
|
114
|
-
value: next_1
|
|
115
|
-
} : filter_1));
|
|
116
|
-
};
|
|
117
|
-
$[13] = filters;
|
|
118
|
-
$[14] = onFiltersChange;
|
|
119
|
-
$[15] = t5;
|
|
120
|
-
} else {
|
|
121
|
-
t5 = $[15];
|
|
122
|
-
}
|
|
123
|
-
const changeValue = t5;
|
|
124
|
-
let t6;
|
|
125
|
-
if ($[16] !== onSearchChange || $[17] !== search) {
|
|
126
|
-
t6 = /* @__PURE__ */ jsxDEV("input", {
|
|
127
|
-
"aria-label": "Search rows",
|
|
128
|
-
"data-testid": "db-filter",
|
|
129
|
-
onChange: onSearchChange,
|
|
130
|
-
placeholder: "search table…",
|
|
131
|
-
value: search
|
|
132
|
-
}, void 0, false);
|
|
133
|
-
$[16] = onSearchChange;
|
|
134
|
-
$[17] = search;
|
|
135
|
-
$[18] = t6;
|
|
136
|
-
} else {
|
|
137
|
-
t6 = $[18];
|
|
138
|
-
}
|
|
139
|
-
let t7;
|
|
140
|
-
if ($[19] !== addFilter) {
|
|
141
|
-
t7 = /* @__PURE__ */ jsxDEV("button", {
|
|
142
|
-
"data-testid": "db-add-filter",
|
|
143
|
-
onClick: addFilter,
|
|
144
|
-
type: "button",
|
|
145
|
-
children: "Add filter"
|
|
146
|
-
}, void 0, false);
|
|
147
|
-
$[19] = addFilter;
|
|
148
|
-
$[20] = t7;
|
|
149
|
-
} else {
|
|
150
|
-
t7 = $[20];
|
|
151
|
-
}
|
|
152
|
-
let t8;
|
|
153
|
-
if ($[21] !== t6 || $[22] !== t7) {
|
|
154
|
-
t8 = /* @__PURE__ */ jsxDEV("div", {
|
|
155
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
156
|
-
children: [t6, t7]
|
|
157
|
-
}, void 0, true);
|
|
158
|
-
$[21] = t6;
|
|
159
|
-
$[22] = t7;
|
|
160
|
-
$[23] = t8;
|
|
161
|
-
} else {
|
|
162
|
-
t8 = $[23];
|
|
163
|
-
}
|
|
164
|
-
let t9;
|
|
165
|
-
if ($[24] !== changeColumn || $[25] !== changeOperator || $[26] !== changeValue || $[27] !== columns || $[28] !== filters || $[29] !== removeFilter) {
|
|
166
|
-
let t102;
|
|
167
|
-
if ($[31] !== changeColumn || $[32] !== changeOperator || $[33] !== changeValue || $[34] !== columns || $[35] !== removeFilter) {
|
|
168
|
-
t102 = (filter_2, index_3) => /* @__PURE__ */ jsxDEV("div", {
|
|
169
|
-
className: "flex flex-wrap items-center gap-1.5",
|
|
170
|
-
"data-testid": "db-filter-row",
|
|
171
|
-
children: [/* @__PURE__ */ jsxDEV("select", {
|
|
172
|
-
"aria-label": "Filter column",
|
|
173
|
-
"data-index": index_3,
|
|
174
|
-
"data-testid": "db-filter-column",
|
|
175
|
-
onChange: changeColumn,
|
|
176
|
-
value: filter_2.column,
|
|
177
|
-
children: columns.map(_temp)
|
|
178
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("select", {
|
|
179
|
-
"aria-label": "Filter operator",
|
|
180
|
-
"data-index": index_3,
|
|
181
|
-
"data-testid": "db-filter-operator",
|
|
182
|
-
onChange: changeOperator,
|
|
183
|
-
value: filter_2.operator,
|
|
184
|
-
children: OPERATORS.map(_temp2)
|
|
185
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("input", {
|
|
186
|
-
"aria-label": "Filter value",
|
|
187
|
-
"data-index": index_3,
|
|
188
|
-
"data-testid": "db-filter-value",
|
|
189
|
-
onChange: changeValue,
|
|
190
|
-
placeholder: "value",
|
|
191
|
-
value: filter_2.value
|
|
192
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("button", {
|
|
193
|
-
"aria-label": "Remove filter",
|
|
194
|
-
"data-index": index_3,
|
|
195
|
-
"data-testid": "db-filter-remove",
|
|
196
|
-
onClick: removeFilter,
|
|
197
|
-
type: "button",
|
|
198
|
-
children: "✕"
|
|
199
|
-
}, void 0, false)]
|
|
200
|
-
}, index_3, true);
|
|
201
|
-
$[31] = changeColumn;
|
|
202
|
-
$[32] = changeOperator;
|
|
203
|
-
$[33] = changeValue;
|
|
204
|
-
$[34] = columns;
|
|
205
|
-
$[35] = removeFilter;
|
|
206
|
-
$[36] = t102;
|
|
207
|
-
} else {
|
|
208
|
-
t102 = $[36];
|
|
209
|
-
}
|
|
210
|
-
t9 = filters.map(t102);
|
|
211
|
-
$[24] = changeColumn;
|
|
212
|
-
$[25] = changeOperator;
|
|
213
|
-
$[26] = changeValue;
|
|
214
|
-
$[27] = columns;
|
|
215
|
-
$[28] = filters;
|
|
216
|
-
$[29] = removeFilter;
|
|
217
|
-
$[30] = t9;
|
|
218
|
-
} else {
|
|
219
|
-
t9 = $[30];
|
|
220
|
-
}
|
|
221
|
-
let t10;
|
|
222
|
-
if ($[37] !== t8 || $[38] !== t9) {
|
|
223
|
-
t10 = /* @__PURE__ */ jsxDEV("div", {
|
|
224
|
-
className: "flex flex-col gap-1.5",
|
|
225
|
-
"data-testid": "db-filters",
|
|
226
|
-
children: [t8, t9]
|
|
227
|
-
}, void 0, true);
|
|
228
|
-
$[37] = t8;
|
|
229
|
-
$[38] = t9;
|
|
230
|
-
$[39] = t10;
|
|
231
|
-
} else {
|
|
232
|
-
t10 = $[39];
|
|
233
|
-
}
|
|
234
|
-
return t10;
|
|
235
|
-
};
|
|
236
|
-
function _temp(column) {
|
|
237
|
-
return /* @__PURE__ */ jsxDEV("option", {
|
|
238
|
-
value: column,
|
|
239
|
-
children: column
|
|
240
|
-
}, column, false);
|
|
241
|
-
}
|
|
242
|
-
function _temp2(operator) {
|
|
243
|
-
return /* @__PURE__ */ jsxDEV("option", {
|
|
244
|
-
value: operator.value,
|
|
245
|
-
children: operator.label
|
|
246
|
-
}, operator.value, false);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
export { DataFilters, toFilterClauses };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import { jsxDEV, Fragment } from 'react/jsx-dev-runtime';
|
|
3
|
-
|
|
4
|
-
const CONTAINER_STYLE = {
|
|
5
|
-
border: "1px solid var(--destructive)",
|
|
6
|
-
color: "var(--destructive)",
|
|
7
|
-
padding: 12
|
|
8
|
-
};
|
|
9
|
-
const MESSAGE_STYLE = {
|
|
10
|
-
overflow: "auto",
|
|
11
|
-
whiteSpace: "pre-wrap"
|
|
12
|
-
};
|
|
13
|
-
class ErrorBoundary extends Component {
|
|
14
|
-
static getDerivedStateFromError(error) {
|
|
15
|
-
return {
|
|
16
|
-
error
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
state = {
|
|
20
|
-
error: null
|
|
21
|
-
};
|
|
22
|
-
componentDidCatch(error, info) {
|
|
23
|
-
console.error("[lunora-studio] panel error", error, info.componentStack);
|
|
24
|
-
}
|
|
25
|
-
reset = () => {
|
|
26
|
-
this.setState({
|
|
27
|
-
error: null
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
render() {
|
|
31
|
-
const {
|
|
32
|
-
children,
|
|
33
|
-
fallbackTitle,
|
|
34
|
-
label,
|
|
35
|
-
retryLabel
|
|
36
|
-
} = this.props;
|
|
37
|
-
const {
|
|
38
|
-
error
|
|
39
|
-
} = this.state;
|
|
40
|
-
if (error === null) {
|
|
41
|
-
return /* @__PURE__ */ jsxDEV(Fragment, {
|
|
42
|
-
children
|
|
43
|
-
}, void 0, false);
|
|
44
|
-
}
|
|
45
|
-
const title = fallbackTitle ?? (label === void 0 ? "Something went wrong" : `${label} failed`);
|
|
46
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
47
|
-
"data-testid": "dash-error-boundary",
|
|
48
|
-
role: "alert",
|
|
49
|
-
style: CONTAINER_STYLE,
|
|
50
|
-
children: [/* @__PURE__ */ jsxDEV("strong", {
|
|
51
|
-
children: title
|
|
52
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("pre", {
|
|
53
|
-
"data-testid": "dash-error-message",
|
|
54
|
-
style: MESSAGE_STYLE,
|
|
55
|
-
children: error.message
|
|
56
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("button", {
|
|
57
|
-
"data-testid": "dash-error-retry",
|
|
58
|
-
onClick: this.reset,
|
|
59
|
-
type: "button",
|
|
60
|
-
children: retryLabel ?? "Try again"
|
|
61
|
-
}, void 0, false)]
|
|
62
|
-
}, void 0, true);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { ErrorBoundary };
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { useLunora } from '@lunora/react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
import { ConfirmButton } from './ConfirmButton-C2eVi2Qv.js';
|
|
4
|
-
import { ShardInput } from './ShardInput-gx_DZXXn.js';
|
|
5
|
-
import { B as Button } from './button-BhsN2uZH.js';
|
|
6
|
-
import { C as Card, a as CardContent } from './card-DURq3ElK.js';
|
|
7
|
-
import { T as Textarea } from './textarea-D3gaCU_-.js';
|
|
8
|
-
import { useT } from './DEFAULT_LOCALE-CiX4W7Kr.js';
|
|
9
|
-
import { ADMIN_FUNCTIONS } from './ADMIN_FUNCTIONS-DjXgvJb6.js';
|
|
10
|
-
import { f as fireAndForget, c as callOptions, e as errorMessage, a as adminRef } from './internal-rXJEAhXS.js';
|
|
11
|
-
import { r as recordShard } from './shard-history-DyebH1R5.js';
|
|
12
|
-
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
13
|
-
|
|
14
|
-
const EXPORT_SHARD = adminRef(ADMIN_FUNCTIONS.exportShard);
|
|
15
|
-
const IMPORT_SHARD = adminRef(ADMIN_FUNCTIONS.importShard);
|
|
16
|
-
const toNdjson = (rows) => rows.map((row) => JSON.stringify(row)).join("\n");
|
|
17
|
-
const parseNdjson = (text) => {
|
|
18
|
-
const rows = [];
|
|
19
|
-
const lines = text.split("\n");
|
|
20
|
-
for (const [index, rawLine] of lines.entries()) {
|
|
21
|
-
const line = rawLine.trim();
|
|
22
|
-
if (line === "") {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
const parsed = JSON.parse(line);
|
|
26
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
27
|
-
throw new Error(`line ${(index + 1).toString()}: expected a { table, doc } object`);
|
|
28
|
-
}
|
|
29
|
-
const row = parsed;
|
|
30
|
-
if (typeof row.table !== "string" || typeof row.doc !== "object" || row.doc === null || Array.isArray(row.doc)) {
|
|
31
|
-
throw new Error(`line ${(index + 1).toString()}: expected a { table, doc } object`);
|
|
32
|
-
}
|
|
33
|
-
rows.push(row);
|
|
34
|
-
}
|
|
35
|
-
return rows;
|
|
36
|
-
};
|
|
37
|
-
const ExportImportPanel = ({
|
|
38
|
-
initialShardKey
|
|
39
|
-
}) => {
|
|
40
|
-
const client = useLunora();
|
|
41
|
-
const t = useT();
|
|
42
|
-
const [shardKey, setShardKey] = useState(initialShardKey ?? "");
|
|
43
|
-
const [ndjson, setNdjson] = useState("");
|
|
44
|
-
const [busy, setBusy] = useState(false);
|
|
45
|
-
const [error, setError] = useState(null);
|
|
46
|
-
const [importResult, setImportResult] = useState(null);
|
|
47
|
-
const [exportCount, setExportCount] = useState(null);
|
|
48
|
-
const exportShard = async () => {
|
|
49
|
-
setBusy(true);
|
|
50
|
-
setError(null);
|
|
51
|
-
setImportResult(null);
|
|
52
|
-
try {
|
|
53
|
-
const result = await client.query(EXPORT_SHARD, {}, callOptions(shardKey));
|
|
54
|
-
recordShard(shardKey);
|
|
55
|
-
setNdjson(toNdjson(result.rows));
|
|
56
|
-
setExportCount(result.rows.length);
|
|
57
|
-
} catch (error_) {
|
|
58
|
-
setError(errorMessage(error_));
|
|
59
|
-
} finally {
|
|
60
|
-
setBusy(false);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
const importShard = async () => {
|
|
64
|
-
setBusy(true);
|
|
65
|
-
setError(null);
|
|
66
|
-
setImportResult(null);
|
|
67
|
-
setExportCount(null);
|
|
68
|
-
let rows;
|
|
69
|
-
try {
|
|
70
|
-
rows = parseNdjson(ndjson);
|
|
71
|
-
} catch (error__0) {
|
|
72
|
-
setError(t("Invalid NDJSON: {message}", {
|
|
73
|
-
message: errorMessage(error__0)
|
|
74
|
-
}));
|
|
75
|
-
setBusy(false);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
const result_0 = await client.query(IMPORT_SHARD, {
|
|
80
|
-
rows
|
|
81
|
-
}, callOptions(shardKey));
|
|
82
|
-
recordShard(shardKey);
|
|
83
|
-
setImportResult(result_0);
|
|
84
|
-
} catch (error__1) {
|
|
85
|
-
setError(errorMessage(error__1));
|
|
86
|
-
} finally {
|
|
87
|
-
setBusy(false);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
const insertedTotal = importResult === null ? 0 : Object.values(importResult.inserted).reduce((sum, count) => sum + count, 0);
|
|
91
|
-
const runExport = () => {
|
|
92
|
-
fireAndForget(exportShard());
|
|
93
|
-
};
|
|
94
|
-
const runImport = () => {
|
|
95
|
-
fireAndForget(importShard());
|
|
96
|
-
};
|
|
97
|
-
const onNdjsonChange = (event) => {
|
|
98
|
-
setNdjson(event.target.value);
|
|
99
|
-
};
|
|
100
|
-
return /* @__PURE__ */ jsxDEV("div", {
|
|
101
|
-
className: "flex flex-col gap-4",
|
|
102
|
-
"data-testid": "lunora-export-import",
|
|
103
|
-
children: [/* @__PURE__ */ jsxDEV(Card, {
|
|
104
|
-
className: "rounded-xl border border-border bg-card shadow-xs",
|
|
105
|
-
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
106
|
-
className: "border-b border-border px-4 py-3",
|
|
107
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
108
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
109
|
-
children: t("Export")
|
|
110
|
-
}, void 0, false)
|
|
111
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(CardContent, {
|
|
112
|
-
className: "flex flex-col gap-3 p-4",
|
|
113
|
-
children: [/* @__PURE__ */ jsxDEV("div", {
|
|
114
|
-
className: "flex flex-wrap items-center gap-2",
|
|
115
|
-
children: [/* @__PURE__ */ jsxDEV(ShardInput, {
|
|
116
|
-
onChange: setShardKey,
|
|
117
|
-
testId: "ei-shard-input",
|
|
118
|
-
value: shardKey
|
|
119
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(Button, {
|
|
120
|
-
"data-testid": "ei-export",
|
|
121
|
-
disabled: busy,
|
|
122
|
-
onClick: runExport,
|
|
123
|
-
type: "button",
|
|
124
|
-
children: t("Export")
|
|
125
|
-
}, void 0, false)]
|
|
126
|
-
}, void 0, true), exportCount !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
127
|
-
className: "text-sm text-muted-foreground",
|
|
128
|
-
"data-testid": "ei-export-result",
|
|
129
|
-
children: t("Exported {count} rows.", {
|
|
130
|
-
count: exportCount
|
|
131
|
-
})
|
|
132
|
-
}, void 0, false)]
|
|
133
|
-
}, void 0, true)]
|
|
134
|
-
}, void 0, true), /* @__PURE__ */ jsxDEV(Card, {
|
|
135
|
-
className: "rounded-xl border border-border bg-card shadow-xs",
|
|
136
|
-
children: [/* @__PURE__ */ jsxDEV("header", {
|
|
137
|
-
className: "border-b border-border px-4 py-3",
|
|
138
|
-
children: /* @__PURE__ */ jsxDEV("span", {
|
|
139
|
-
className: "font-mono text-[11px] tracking-wide text-muted-foreground uppercase",
|
|
140
|
-
children: t("Import")
|
|
141
|
-
}, void 0, false)
|
|
142
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV(CardContent, {
|
|
143
|
-
className: "flex flex-col gap-3 p-4",
|
|
144
|
-
children: [/* @__PURE__ */ jsxDEV(Textarea, {
|
|
145
|
-
"aria-label": "NDJSON",
|
|
146
|
-
className: "font-mono text-xs min-h-40 rounded-md",
|
|
147
|
-
"data-testid": "ei-ndjson",
|
|
148
|
-
onChange: onNdjsonChange,
|
|
149
|
-
placeholder: '{"table":"messages","doc":{…}}',
|
|
150
|
-
value: ndjson
|
|
151
|
-
}, void 0, false), /* @__PURE__ */ jsxDEV("div", {
|
|
152
|
-
className: "flex flex-wrap items-center gap-2",
|
|
153
|
-
children: /* @__PURE__ */ jsxDEV(ConfirmButton, {
|
|
154
|
-
confirmLabel: t("Import (writes rows)?"),
|
|
155
|
-
disabled: busy || ndjson.trim() === "",
|
|
156
|
-
onConfirm: runImport,
|
|
157
|
-
testId: "ei-import",
|
|
158
|
-
children: t("Import")
|
|
159
|
-
}, void 0, false)
|
|
160
|
-
}, void 0, false), importResult !== null && /* @__PURE__ */ jsxDEV("div", {
|
|
161
|
-
className: "flex flex-col gap-2",
|
|
162
|
-
"data-testid": "ei-import-result",
|
|
163
|
-
children: [/* @__PURE__ */ jsxDEV("p", {
|
|
164
|
-
className: "text-sm text-muted-foreground",
|
|
165
|
-
children: t("Inserted {inserted}, {conflicts} conflicts, {errors} errors.", {
|
|
166
|
-
conflicts: importResult.conflicts,
|
|
167
|
-
errors: importResult.errors.length,
|
|
168
|
-
inserted: insertedTotal
|
|
169
|
-
})
|
|
170
|
-
}, void 0, false), importResult.errors.length > 0 && /* @__PURE__ */ jsxDEV("ul", {
|
|
171
|
-
className: "flex flex-col gap-1",
|
|
172
|
-
"data-testid": "ei-import-errors",
|
|
173
|
-
children: importResult.errors.map((rowError) => /* @__PURE__ */ jsxDEV("li", {
|
|
174
|
-
className: "text-xs text-destructive",
|
|
175
|
-
children: t("line {line} ({table}): {message}", {
|
|
176
|
-
line: rowError.line,
|
|
177
|
-
message: rowError.message,
|
|
178
|
-
table: rowError.table
|
|
179
|
-
})
|
|
180
|
-
}, `${rowError.table}-${rowError.line.toString()}`, false))
|
|
181
|
-
}, void 0, false)]
|
|
182
|
-
}, void 0, true)]
|
|
183
|
-
}, void 0, true)]
|
|
184
|
-
}, void 0, true), error !== null && /* @__PURE__ */ jsxDEV("p", {
|
|
185
|
-
className: "text-sm text-destructive",
|
|
186
|
-
"data-testid": "ei-error",
|
|
187
|
-
role: "alert",
|
|
188
|
-
children: error
|
|
189
|
-
}, void 0, false)]
|
|
190
|
-
}, void 0, true);
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
export { ExportImportPanel };
|