@arbidocs/blocks 0.5.146 → 0.5.148
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/{ConnectedCallDock-JVLJEWLJ.cjs → ConnectedCallDock-6VGATAAQ.cjs} +5 -5
- package/dist/{ConnectedCallDock-JVLJEWLJ.cjs.map → ConnectedCallDock-6VGATAAQ.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-7YQRDIS3.cjs → ConnectedCallRoom-YBNERVTW.cjs} +5 -5
- package/dist/{ConnectedCallRoom-7YQRDIS3.cjs.map → ConnectedCallRoom-YBNERVTW.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-JJXQBIV2.cjs → ConnectedPresentation-JZQFTC5H.cjs} +4 -4
- package/dist/{ConnectedPresentation-JJXQBIV2.cjs.map → ConnectedPresentation-JZQFTC5H.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-ENCPTGJE.cjs → DocumentReviewCard-UDC4PNIS.cjs} +15 -14
- package/dist/DocumentReviewCard-UDC4PNIS.cjs.map +1 -0
- package/dist/{FilesViewerDialog-FFPW7TIK.cjs → FilesViewerDialog-D5GHWK4Y.cjs} +12 -11
- package/dist/FilesViewerDialog-D5GHWK4Y.cjs.map +1 -0
- package/dist/{WorkspaceTableView-2RH33X3U.cjs → WorkspaceTableView-2NRV4CWP.cjs} +7 -6
- package/dist/WorkspaceTableView-2NRV4CWP.cjs.map +1 -0
- package/dist/agents/index.cjs +176 -175
- package/dist/agents/tasks/TaskRowMenu.d.ts +1 -2
- package/dist/agents/tasks/TaskRowMenu.js +0 -2
- package/dist/agents/tasks/TaskRowMenu.js.map +2 -2
- package/dist/agents/tasks/TaskTable.d.ts +5 -2
- package/dist/agents/tasks/TaskTable.js +11 -8
- package/dist/agents/tasks/TaskTable.js.map +2 -2
- package/dist/agents/tasks/taskTableLabels.js +1 -1
- package/dist/agents/tasks/taskTableLabels.js.map +1 -1
- package/dist/{ai-YX3OAC4F.cjs → ai-VLIPYNWP.cjs} +13 -13
- package/dist/ai-VLIPYNWP.cjs.map +1 -0
- package/dist/calls/index.cjs +2 -2
- package/dist/chat/ChatThreads.js +1 -1
- package/dist/chat/ChatThreads.js.map +2 -2
- package/dist/chat/chat-page-types.d.ts +2 -0
- package/dist/chat/chat-page-types.js.map +2 -2
- package/dist/chat/index.cjs +25 -25
- package/dist/{chunk-32HVYK4Q.cjs → chunk-3VPNL4EH.cjs} +14 -13
- package/dist/chunk-3VPNL4EH.cjs.map +1 -0
- package/dist/{chunk-6TU4YLFW.cjs → chunk-5TT6J67U.cjs} +3 -3
- package/dist/chunk-5TT6J67U.cjs.map +1 -0
- package/dist/{chunk-N7AUJTU4.cjs → chunk-7AULM6LS.cjs} +5 -5
- package/dist/{chunk-N7AUJTU4.cjs.map → chunk-7AULM6LS.cjs.map} +1 -1
- package/dist/{chunk-MBXXWTKT.cjs → chunk-AYWY4MX2.cjs} +28 -28
- package/dist/{chunk-MBXXWTKT.cjs.map → chunk-AYWY4MX2.cjs.map} +1 -1
- package/dist/{chunk-P2AZ2HX7.cjs → chunk-AZQ4XIVY.cjs} +26 -26
- package/dist/{chunk-P2AZ2HX7.cjs.map → chunk-AZQ4XIVY.cjs.map} +1 -1
- package/dist/{chunk-VZKTOGZR.cjs → chunk-BLRPBEUG.cjs} +2 -2
- package/dist/{chunk-VZKTOGZR.cjs.map → chunk-BLRPBEUG.cjs.map} +1 -1
- package/dist/chunk-DKY67DA6.cjs +43 -0
- package/dist/chunk-DKY67DA6.cjs.map +1 -0
- package/dist/{chunk-N3H3YAKY.cjs → chunk-DUNXLT63.cjs} +17 -12
- package/dist/chunk-DUNXLT63.cjs.map +1 -0
- package/dist/{chunk-UOI6JJPG.cjs → chunk-EF2QQBDV.cjs} +29 -134
- package/dist/chunk-EF2QQBDV.cjs.map +1 -0
- package/dist/{chunk-3Y75LUCT.cjs → chunk-FHKBR55Q.cjs} +3 -3
- package/dist/{chunk-3Y75LUCT.cjs.map → chunk-FHKBR55Q.cjs.map} +1 -1
- package/dist/{chunk-QW6NCUR7.cjs → chunk-GAA222SK.cjs} +5 -5
- package/dist/{chunk-QW6NCUR7.cjs.map → chunk-GAA222SK.cjs.map} +1 -1
- package/dist/{chunk-LVIQWRC5.cjs → chunk-KRQCUVH7.cjs} +2 -2
- package/dist/chunk-KRQCUVH7.cjs.map +1 -0
- package/dist/{chunk-6RJXO2NF.cjs → chunk-KWV4VC74.cjs} +6 -6
- package/dist/{chunk-6RJXO2NF.cjs.map → chunk-KWV4VC74.cjs.map} +1 -1
- package/dist/{chunk-UD56Y6UA.cjs → chunk-L5Q5PDTA.cjs} +4 -4
- package/dist/{chunk-UD56Y6UA.cjs.map → chunk-L5Q5PDTA.cjs.map} +1 -1
- package/dist/{chunk-XAW22O2S.cjs → chunk-LCIMYEGX.cjs} +4 -4
- package/dist/{chunk-XAW22O2S.cjs.map → chunk-LCIMYEGX.cjs.map} +1 -1
- package/dist/{chunk-BCRB42SP.cjs → chunk-LYYJDQW6.cjs} +110 -970
- package/dist/chunk-LYYJDQW6.cjs.map +1 -0
- package/dist/{chunk-OE36OY64.cjs → chunk-LZQ2XZOC.cjs} +4 -4
- package/dist/{chunk-OE36OY64.cjs.map → chunk-LZQ2XZOC.cjs.map} +1 -1
- package/dist/{chunk-BTAT3MJP.cjs → chunk-MEWRE43W.cjs} +28 -28
- package/dist/{chunk-BTAT3MJP.cjs.map → chunk-MEWRE43W.cjs.map} +1 -1
- package/dist/chunk-MWHVETKN.cjs +151 -0
- package/dist/chunk-MWHVETKN.cjs.map +1 -0
- package/dist/{chunk-33GOYI3O.cjs → chunk-ONRUHYW3.cjs} +4 -4
- package/dist/{chunk-33GOYI3O.cjs.map → chunk-ONRUHYW3.cjs.map} +1 -1
- package/dist/{chunk-KP7BQIZL.cjs → chunk-ORGGDQKZ.cjs} +43 -40
- package/dist/chunk-ORGGDQKZ.cjs.map +1 -0
- package/dist/{chunk-N2OVF6SJ.cjs → chunk-OXPIJYRU.cjs} +65 -60
- package/dist/chunk-OXPIJYRU.cjs.map +1 -0
- package/dist/{chunk-2V5HW6T5.cjs → chunk-P5TQOSKA.cjs} +6 -6
- package/dist/{chunk-2V5HW6T5.cjs.map → chunk-P5TQOSKA.cjs.map} +1 -1
- package/dist/chunk-Q25CZLK6.cjs +958 -0
- package/dist/chunk-Q25CZLK6.cjs.map +1 -0
- package/dist/{chunk-ZPIZINH2.cjs → chunk-VLHBKF4P.cjs} +164 -98
- package/dist/chunk-VLHBKF4P.cjs.map +1 -0
- package/dist/{chunk-TG2GM7WJ.cjs → chunk-WCT6FT2K.cjs} +11 -7
- package/dist/chunk-WCT6FT2K.cjs.map +1 -0
- package/dist/{chunk-NPRNR54M.cjs → chunk-ZCVW63DF.cjs} +4 -4
- package/dist/{chunk-NPRNR54M.cjs.map → chunk-ZCVW63DF.cjs.map} +1 -1
- package/dist/collaboration/index.cjs +34 -9
- package/dist/collaboration/sharing/ShareControl.d.ts +15 -6
- package/dist/collaboration/sharing/ShareControl.js +9 -4
- package/dist/collaboration/sharing/ShareControl.js.map +2 -2
- package/dist/collaboration/sharing/index.d.ts +1 -0
- package/dist/collaboration/sharing/index.js +15 -1
- package/dist/collaboration/sharing/index.js.map +2 -2
- package/dist/collaboration/sharing/one-way.d.ts +41 -0
- package/dist/collaboration/sharing/one-way.js +39 -0
- package/dist/collaboration/sharing/one-way.js.map +7 -0
- package/dist/connect/index.cjs +4037 -3984
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +9 -8
- package/dist/connection/account-cluster/ConnectedAccountCluster.js +1 -1
- package/dist/connection/account-cluster/ConnectedAccountCluster.js.map +1 -1
- package/dist/connection/agents/agentsPageParts.js +6 -2
- package/dist/connection/agents/agentsPageParts.js.map +2 -2
- package/dist/connection/command/actions.js +3 -3
- package/dist/connection/command/actions.js.map +2 -2
- package/dist/connection/conversation/ConnectedConversationSettings.js +3 -6
- package/dist/connection/conversation/ConnectedConversationSettings.js.map +2 -2
- package/dist/connection/dashboards/PanelEditor.d.ts +3 -9
- package/dist/connection/dashboards/PanelEditor.js +17 -124
- package/dist/connection/dashboards/PanelEditor.js.map +2 -2
- package/dist/connection/dashboards/index.d.ts +0 -1
- package/dist/connection/dashboards/index.js +0 -6
- package/dist/connection/dashboards/index.js.map +2 -2
- package/dist/connection/dashboards/templates.d.ts +1 -1
- package/dist/connection/dashboards/templates.js.map +1 -1
- package/dist/connection/databases/ConnectedDatabasesPage.js +46 -20
- package/dist/connection/databases/ConnectedDatabasesPage.js.map +2 -2
- package/dist/connection/databases/DatabaseViewsMenu.d.ts +5 -1
- package/dist/connection/databases/DatabaseViewsMenu.js +16 -21
- package/dist/connection/databases/DatabaseViewsMenu.js.map +2 -2
- package/dist/connection/files/bulk/ConnectedFilesBulkActions.d.ts +4 -3
- package/dist/connection/files/bulk/ConnectedFilesBulkActions.js +12 -18
- package/dist/connection/files/bulk/ConnectedFilesBulkActions.js.map +2 -2
- package/dist/connection/files/bulk/useDocumentBulkActions.d.ts +2 -3
- package/dist/connection/files/bulk/useDocumentBulkActions.js +6 -15
- package/dist/connection/files/bulk/useDocumentBulkActions.js.map +2 -2
- package/dist/connection/files/grid/cells.d.ts +7 -3
- package/dist/connection/files/grid/cells.js +8 -5
- package/dist/connection/files/grid/cells.js.map +2 -2
- package/dist/connection/files/grid/documentCellRenderers.d.ts +4 -1
- package/dist/connection/files/grid/documentCellRenderers.js +3 -2
- package/dist/connection/files/grid/documentCellRenderers.js.map +2 -2
- package/dist/connection/files/grid/documentColumns.d.ts +3 -3
- package/dist/connection/files/grid/documentColumns.js +4 -2
- package/dist/connection/files/grid/documentColumns.js.map +2 -2
- package/dist/connection/files/grid/useDocumentTable.js +10 -5
- package/dist/connection/files/grid/useDocumentTable.js.map +2 -2
- package/dist/connection/files/index.d.ts +1 -2
- package/dist/connection/files/index.js +4 -12
- package/dist/connection/files/index.js.map +2 -2
- package/dist/connection/files/review/useAiReviewLiveUpdates.js +13 -2
- package/dist/connection/files/review/useAiReviewLiveUpdates.js.map +2 -2
- package/dist/connection/files/views/ViewSelector.js +9 -21
- package/dist/connection/files/views/ViewSelector.js.map +2 -2
- package/dist/connection/files/views/useTableViews.d.ts +23 -15
- package/dist/connection/files/views/useTableViews.js +61 -35
- package/dist/connection/files/views/useTableViews.js.map +2 -2
- package/dist/connection/files/views/useViewWrites.d.ts +6 -0
- package/dist/connection/files/views/useViewWrites.js +64 -0
- package/dist/connection/files/views/useViewWrites.js.map +7 -0
- package/dist/connection/pages/BlockEditor.d.ts +32 -0
- package/dist/connection/pages/BlockEditor.js +175 -0
- package/dist/connection/pages/BlockEditor.js.map +7 -0
- package/dist/connection/pages/ConnectedPagesPage.d.ts +31 -0
- package/dist/connection/pages/ConnectedPagesPage.js +426 -0
- package/dist/connection/pages/ConnectedPagesPage.js.map +7 -0
- package/dist/connection/pages/DocumentBlocks.d.ts +46 -0
- package/dist/connection/pages/DocumentBlocks.js +200 -0
- package/dist/connection/pages/DocumentBlocks.js.map +7 -0
- package/dist/connection/pages/DocumentsPicker.d.ts +26 -0
- package/dist/connection/pages/DocumentsPicker.js +133 -0
- package/dist/connection/pages/DocumentsPicker.js.map +7 -0
- package/dist/connection/pages/PageBlockView.d.ts +22 -0
- package/dist/connection/pages/PageBlockView.js +82 -0
- package/dist/connection/pages/PageBlockView.js.map +7 -0
- package/dist/connection/pages/PageGrid.d.ts +26 -0
- package/dist/connection/pages/PageGrid.js +50 -0
- package/dist/connection/pages/PageGrid.js.map +7 -0
- package/dist/connection/pages/PageView.d.ts +24 -0
- package/dist/connection/pages/PageView.js +93 -0
- package/dist/connection/pages/PageView.js.map +7 -0
- package/dist/connection/pages/PagesList.d.ts +14 -0
- package/dist/connection/pages/PagesList.js +143 -0
- package/dist/connection/pages/PagesList.js.map +7 -0
- package/dist/connection/pages/TableViewBlock.d.ts +24 -0
- package/dist/connection/pages/TableViewBlock.js +82 -0
- package/dist/connection/pages/TableViewBlock.js.map +7 -0
- package/dist/connection/pages/ViewPicker.d.ts +21 -0
- package/dist/connection/pages/ViewPicker.js +56 -0
- package/dist/connection/pages/ViewPicker.js.map +7 -0
- package/dist/connection/pages/index.d.ts +9 -0
- package/dist/connection/pages/index.js +49 -0
- package/dist/connection/pages/index.js.map +7 -0
- package/dist/connection/pages/labels.d.ts +61 -0
- package/dist/connection/pages/labels.js +61 -0
- package/dist/connection/pages/labels.js.map +7 -0
- package/dist/connection/settings-page/featuresSection.js +2 -2
- package/dist/connection/settings-page/featuresSection.js.map +1 -1
- package/dist/connection/sharing/ResourceShareForm.js +1 -1
- package/dist/connection/sharing/ResourceShareForm.js.map +2 -2
- package/dist/connection/threads-page/ConnectedThreadsPage.js +10 -8
- package/dist/connection/threads-page/ConnectedThreadsPage.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +11 -6
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/dashboards/ConditionsEditor.d.ts +54 -0
- package/dist/dashboards/ConditionsEditor.js +156 -0
- package/dist/dashboards/ConditionsEditor.js.map +7 -0
- package/dist/dashboards/index.cjs +33 -521
- package/dist/dashboards/index.cjs.map +1 -1
- package/dist/dashboards/index.d.ts +3 -2
- package/dist/dashboards/index.js +13 -1
- package/dist/dashboards/index.js.map +2 -2
- package/dist/databases/DatabaseFilterMenu.d.ts +18 -0
- package/dist/databases/DatabaseFilterMenu.js +95 -0
- package/dist/databases/DatabaseFilterMenu.js.map +7 -0
- package/dist/databases/DatabaseTable.js +1 -1
- package/dist/databases/DatabaseTable.js.map +1 -1
- package/dist/databases/DatabaseToolbar.d.ts +3 -1
- package/dist/databases/DatabaseToolbar.js +2 -0
- package/dist/databases/DatabaseToolbar.js.map +2 -2
- package/dist/databases/index.cjs +85 -71
- package/dist/databases/index.d.ts +1 -0
- package/dist/databases/index.js +8 -0
- package/dist/databases/index.js.map +2 -2
- package/dist/embed/index.cjs +14 -13
- package/dist/facts/index.cjs +43 -43
- package/dist/files/bulk/BulkActionsBar.d.ts +8 -5
- package/dist/files/bulk/BulkActionsBar.js +6 -7
- package/dist/files/bulk/BulkActionsBar.js.map +2 -2
- package/dist/files/cells/DocumentNameCell.d.ts +2 -1
- package/dist/files/cells/DocumentNameCell.js +1 -1
- package/dist/files/cells/DocumentNameCell.js.map +2 -2
- package/dist/files/index.cjs +237 -224
- package/dist/files/index.d.ts +1 -1
- package/dist/files/index.js +0 -2
- package/dist/files/index.js.map +2 -2
- package/dist/files/permissions.d.ts +4 -3
- package/dist/files/permissions.js +6 -3
- package/dist/files/permissions.js.map +2 -2
- package/dist/files/views/ViewSelectorMenu.d.ts +24 -5
- package/dist/files/views/ViewSelectorMenu.js +78 -51
- package/dist/files/views/ViewSelectorMenu.js.map +2 -2
- package/dist/files/views/gridViews.d.ts +34 -1
- package/dist/files/views/gridViews.js +28 -0
- package/dist/files/views/gridViews.js.map +2 -2
- package/dist/files/views/index.d.ts +2 -2
- package/dist/files/views/index.js +8 -0
- package/dist/files/views/index.js.map +2 -2
- package/dist/files/views/useGridViews.d.ts +8 -4
- package/dist/files/views/useGridViews.js +42 -11
- package/dist/files/views/useGridViews.js.map +2 -2
- package/dist/files/visibility.d.ts +1 -16
- package/dist/files/visibility.js +6 -23
- package/dist/files/visibility.js.map +2 -2
- package/dist/index.cjs +453 -428
- package/dist/index.cjs.map +1 -1
- package/dist/pages/index.cjs +1363 -0
- package/dist/pages/index.cjs.map +1 -0
- package/dist/pages/index.d.ts +14 -0
- package/dist/pages/index.js +3 -0
- package/dist/pages/index.js.map +7 -0
- package/dist/settings/ConversationSettingsParts.d.ts +4 -6
- package/dist/settings/ConversationSettingsParts.js +15 -10
- package/dist/settings/ConversationSettingsParts.js.map +2 -2
- package/dist/settings/index.cjs +145 -144
- package/dist/studio/index.cjs +8 -7
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/widgets.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/index.cjs +23 -22
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +10 -5
- package/dist/DocumentReviewCard-ENCPTGJE.cjs.map +0 -1
- package/dist/FilesViewerDialog-FFPW7TIK.cjs.map +0 -1
- package/dist/WorkspaceTableView-2RH33X3U.cjs.map +0 -1
- package/dist/ai-YX3OAC4F.cjs.map +0 -1
- package/dist/chunk-32HVYK4Q.cjs.map +0 -1
- package/dist/chunk-6TU4YLFW.cjs.map +0 -1
- package/dist/chunk-BCRB42SP.cjs.map +0 -1
- package/dist/chunk-KP7BQIZL.cjs.map +0 -1
- package/dist/chunk-LVIQWRC5.cjs.map +0 -1
- package/dist/chunk-N2OVF6SJ.cjs.map +0 -1
- package/dist/chunk-N3H3YAKY.cjs.map +0 -1
- package/dist/chunk-TG2GM7WJ.cjs.map +0 -1
- package/dist/chunk-UOI6JJPG.cjs.map +0 -1
- package/dist/chunk-ZPIZINH2.cjs.map +0 -1
- package/dist/connection/dashboards/ConnectedDashboardsPage.d.ts +0 -69
- package/dist/connection/dashboards/ConnectedDashboardsPage.js +0 -554
- package/dist/connection/dashboards/ConnectedDashboardsPage.js.map +0 -7
- package/dist/connection/files/views/tableViews.d.ts +0 -19
- package/dist/connection/files/views/tableViews.js +0 -36
- package/dist/connection/files/views/tableViews.js.map +0 -7
|
@@ -1,557 +1,51 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkEF2QQBDV_cjs = require('../chunk-EF2QQBDV.cjs');
|
|
5
|
+
var chunkKRQCUVH7_cjs = require('../chunk-KRQCUVH7.cjs');
|
|
6
6
|
var chunkF6F375V7_cjs = require('../chunk-F6F375V7.cjs');
|
|
7
7
|
var chunkPBPO54KZ_cjs = require('../chunk-PBPO54KZ.cjs');
|
|
8
|
+
var chunkMWHVETKN_cjs = require('../chunk-MWHVETKN.cjs');
|
|
8
9
|
require('../chunk-SD7GUB44.cjs');
|
|
9
10
|
require('../chunk-ZU2B2RZK.cjs');
|
|
10
|
-
var chunkNSD37OF5_cjs = require('../chunk-NSD37OF5.cjs');
|
|
11
11
|
var chunkOEJQFPWO_cjs = require('../chunk-OEJQFPWO.cjs');
|
|
12
12
|
require('../chunk-OUGRCQM7.cjs');
|
|
13
|
-
|
|
13
|
+
require('../chunk-ZW6FPIFC.cjs');
|
|
14
14
|
require('../chunk-IPSHAMO2.cjs');
|
|
15
|
-
|
|
15
|
+
require('../chunk-LIKDQBNJ.cjs');
|
|
16
16
|
require('../chunk-YZBDHBKI.cjs');
|
|
17
17
|
require('../chunk-CVPV4I7Z.cjs');
|
|
18
18
|
require('../chunk-PLIF5CUV.cjs');
|
|
19
|
-
var react$1 = require('react');
|
|
20
|
-
var lucideReact = require('lucide-react');
|
|
21
|
-
var react = require('@arbidocs/react');
|
|
22
|
-
var ui = require('@arbidocs/react/ui');
|
|
23
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
title: "Analytics",
|
|
27
|
-
description: "Charts and figures from your documents, threads, tags, facts, workflows, AI usage and databases.",
|
|
28
|
-
newDashboard: "New dashboard",
|
|
29
|
-
blank: "Blank dashboard",
|
|
30
|
-
untitled: "Untitled dashboard",
|
|
31
|
-
empty: "No dashboards yet",
|
|
32
|
-
emptyDescription: "Start from a template or a blank page, then add charts, figures and tables.",
|
|
33
|
-
loadError: "The dashboards could not be loaded.",
|
|
34
|
-
offline: "You are offline. Your dashboards show when the connection is back.",
|
|
35
|
-
retry: "Try again",
|
|
36
|
-
panels: (count) => `${count} ${count === 1 ? "panel" : "panels"}`,
|
|
37
|
-
back: "All dashboards",
|
|
38
|
-
edit: "Edit",
|
|
39
|
-
more: "More dashboard actions",
|
|
40
|
-
delete: "Delete",
|
|
41
|
-
confirmDelete: (title) => `Delete the dashboard \u201C${title}\u201D? Its panels go with it.`,
|
|
42
|
-
deleteFailed: "The dashboard could not be deleted",
|
|
43
|
-
confirmDiscard: "Discard the changes to this dashboard?",
|
|
44
|
-
save: "Save",
|
|
45
|
-
saving: "Saving\u2026",
|
|
46
|
-
cancel: "Cancel",
|
|
47
|
-
dashboardTitle: "Name",
|
|
48
|
-
dashboardDescription: "Description",
|
|
49
|
-
addPanel: "Add a panel",
|
|
50
|
-
editPanel: "Panel",
|
|
51
|
-
editPanelDescription: "Choose the data, how to show it, and what to measure.",
|
|
52
|
-
panelDone: "Done",
|
|
53
|
-
moveUp: "Move up",
|
|
54
|
-
moveDown: "Move down",
|
|
55
|
-
removePanel: "Remove the panel",
|
|
56
|
-
noPanels: "No panels yet. Add one to start.",
|
|
57
|
-
saved: "Dashboard saved",
|
|
58
|
-
saveFailed: "The dashboard could not be saved",
|
|
59
|
-
rows: "Rows",
|
|
60
|
-
unreadable: (count) => `${count} saved ${count === 1 ? "dashboard" : "dashboards"} could not be opened.`,
|
|
61
|
-
deleteUnreadable: "Delete",
|
|
62
|
-
confirmDeleteUnreadable: (count) => `Delete the ${count === 1 ? "dashboard" : `${count} dashboards`} that could not be opened?`
|
|
63
|
-
};
|
|
64
|
-
function PanelsGrid({
|
|
65
|
-
spec,
|
|
66
|
-
panelLabels,
|
|
67
|
-
editing,
|
|
68
|
-
testId
|
|
69
|
-
}) {
|
|
70
|
-
return /* @__PURE__ */ jsxRuntime.jsx(chunkF6F375V7_cjs.DashboardGrid, { testId: testId && `${testId}-grid`, children: spec.panels.map((panel, i) => /* @__PURE__ */ jsxRuntime.jsx(chunkF6F375V7_cjs.DashboardCell, { width: panel.width, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
-
chunkF6F375V7_cjs.DashboardPanel,
|
|
72
|
-
{
|
|
73
|
-
panel,
|
|
74
|
-
labels: panelLabels,
|
|
75
|
-
testId: testId && `${testId}-panel-${panel.id}`,
|
|
76
|
-
actions: editing && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
-
ui.Button,
|
|
79
|
-
{
|
|
80
|
-
variant: "ghost",
|
|
81
|
-
size: "icon",
|
|
82
|
-
className: "size-7",
|
|
83
|
-
"aria-label": editing.l.editPanel,
|
|
84
|
-
onClick: () => editing.onEdit(i),
|
|
85
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-3.5" })
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
-
ui.Button,
|
|
90
|
-
{
|
|
91
|
-
variant: "ghost",
|
|
92
|
-
size: "icon",
|
|
93
|
-
className: "size-7",
|
|
94
|
-
"aria-label": editing.l.moveUp,
|
|
95
|
-
disabled: i === 0,
|
|
96
|
-
onClick: () => editing.onMove(i, -1),
|
|
97
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-3.5" })
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
101
|
-
ui.Button,
|
|
102
|
-
{
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
size: "icon",
|
|
105
|
-
className: "size-7",
|
|
106
|
-
"aria-label": editing.l.moveDown,
|
|
107
|
-
disabled: i === spec.panels.length - 1,
|
|
108
|
-
onClick: () => editing.onMove(i, 1),
|
|
109
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-3.5" })
|
|
110
|
-
}
|
|
111
|
-
),
|
|
112
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
-
ui.Button,
|
|
114
|
-
{
|
|
115
|
-
variant: "ghost",
|
|
116
|
-
size: "icon",
|
|
117
|
-
className: "size-7",
|
|
118
|
-
"aria-label": editing.l.removePanel,
|
|
119
|
-
onClick: () => editing.onRemove(i),
|
|
120
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-3.5" })
|
|
121
|
-
}
|
|
122
|
-
)
|
|
123
|
-
] })
|
|
124
|
-
}
|
|
125
|
-
) }, panel.id)) });
|
|
126
|
-
}
|
|
127
|
-
function NewDashboardButton({
|
|
128
|
-
templates,
|
|
129
|
-
l,
|
|
130
|
-
onBlank,
|
|
131
|
-
onTemplate,
|
|
132
|
-
busy,
|
|
133
|
-
testId
|
|
134
|
-
}) {
|
|
135
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { disabled: busy, "data-testid": `${testId}-new`, children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" }),
|
|
138
|
-
" ",
|
|
139
|
-
busy ? l.saving : l.newDashboard
|
|
140
|
-
] }) }),
|
|
141
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "end", className: "max-w-[min(20rem,calc(100vw-1rem))]", children: [
|
|
142
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuItem, { onSelect: onBlank, "data-testid": `${testId}-blank`, children: l.blank }),
|
|
143
|
-
templates.map((t, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
144
|
-
ui.DropdownMenuItem,
|
|
145
|
-
{
|
|
146
|
-
onSelect: () => onTemplate(t),
|
|
147
|
-
className: "flex-col items-start gap-0.5",
|
|
148
|
-
"data-testid": `${testId}-template-${i}`,
|
|
149
|
-
children: [
|
|
150
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: t.title }),
|
|
151
|
-
t.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: t.description })
|
|
152
|
-
]
|
|
153
|
-
},
|
|
154
|
-
`${t.title}-${i}`
|
|
155
|
-
))
|
|
156
|
-
] })
|
|
157
|
-
] });
|
|
158
|
-
}
|
|
159
|
-
function ConnectedDashboardsPage({
|
|
160
|
-
templates: siteTemplates,
|
|
161
|
-
dashboardId,
|
|
162
|
-
onDashboardChange,
|
|
163
|
-
labels,
|
|
164
|
-
panelLabels,
|
|
165
|
-
editorLabels,
|
|
166
|
-
className,
|
|
167
|
-
testId = "dashboards"
|
|
168
|
-
}) {
|
|
169
|
-
const l = { ...DEFAULT_DASHBOARDS_PAGE_LABELS, ...labels };
|
|
170
|
-
const { confirm, notify } = chunkLIKDQBNJ_cjs.useBlocksEnvironment();
|
|
171
|
-
const workflowsOn = react.useFeature("workflows");
|
|
172
|
-
const templates = siteTemplates ?? chunkLVIQWRC5_cjs.templatesFor(chunkLVIQWRC5_cjs.DASHBOARD_TEMPLATES, { workflows: workflowsOn });
|
|
173
|
-
const store = react.useDashboardStore();
|
|
174
|
-
const saved = react.useSavedDashboards(store);
|
|
175
|
-
const save = react.useSaveDashboard(store);
|
|
176
|
-
const remove = react.useDeleteDashboard(store);
|
|
177
|
-
const [ownOpenId, setOwnOpenId] = react.useSessionView(
|
|
178
|
-
`dashboards.open:${store.scope ?? ""}`,
|
|
179
|
-
null
|
|
180
|
-
);
|
|
181
|
-
const openId = dashboardId === void 0 ? ownOpenId : dashboardId;
|
|
182
|
-
const setOpenId = (id) => {
|
|
183
|
-
setOwnOpenId(id);
|
|
184
|
-
onDashboardChange?.(id);
|
|
185
|
-
};
|
|
186
|
-
const [draft, setDraft] = react$1.useState(null);
|
|
187
|
-
const [creating, setCreating] = react$1.useState(false);
|
|
188
|
-
const openIdRef = react$1.useRef(openId);
|
|
189
|
-
react$1.useEffect(() => {
|
|
190
|
-
openIdRef.current = openId;
|
|
191
|
-
}, [openId]);
|
|
192
|
-
const [editingPanel, setEditingPanel] = react$1.useState(null);
|
|
193
|
-
const open = react$1.useMemo(
|
|
194
|
-
() => saved.data?.find((d) => d.id === openId && !d.unreadable),
|
|
195
|
-
[saved.data, openId]
|
|
196
|
-
);
|
|
197
|
-
react$1.useEffect(() => {
|
|
198
|
-
if (openId && saved.data && !open && !draft) setOwnOpenId(null);
|
|
199
|
-
}, [openId, saved.data, open, draft]);
|
|
200
|
-
const [chartRequest, clearChartRequest] = react.useTransientView(
|
|
201
|
-
react.ANALYTICS_CHART_VIEW,
|
|
202
|
-
null
|
|
203
|
-
);
|
|
204
|
-
react$1.useEffect(() => {
|
|
205
|
-
if (!chartRequest) return;
|
|
206
|
-
clearChartRequest(void 0);
|
|
207
|
-
const source = {
|
|
208
|
-
id: "database",
|
|
209
|
-
params: { databaseId: chartRequest.id, workspaceId: chartRequest.workspaceId }
|
|
210
|
-
};
|
|
211
|
-
const spec = {
|
|
212
|
-
version: 1,
|
|
213
|
-
title: chartRequest.name,
|
|
214
|
-
panels: [
|
|
215
|
-
{ ...chunkLVIQWRC5_cjs.newPanel(), title: l.rows, source, chart: { type: "metric" }, width: 3 },
|
|
216
|
-
{ ...chunkLVIQWRC5_cjs.newPanel(), title: chartRequest.name, source, chart: { type: "table" }, width: 12 }
|
|
217
|
-
]
|
|
218
|
-
};
|
|
219
|
-
setDraft({ spec, base: spec });
|
|
220
|
-
}, [chartRequest]);
|
|
221
|
-
const startEditing = (d) => setDraft({ id: d.id, spec: d.spec, base: d.spec });
|
|
222
|
-
const createBlank = () => {
|
|
223
|
-
const spec = { version: 1, title: l.untitled, panels: [] };
|
|
224
|
-
setDraft({ spec, base: spec });
|
|
225
|
-
};
|
|
226
|
-
const createFromTemplate = async (template) => {
|
|
227
|
-
if (creating) return;
|
|
228
|
-
setCreating(true);
|
|
229
|
-
const openWhenStarted = openIdRef.current;
|
|
230
|
-
try {
|
|
231
|
-
const result = await save.mutateAsync({
|
|
232
|
-
spec: { ...template, panels: template.panels.map((p) => ({ ...p })) }
|
|
233
|
-
});
|
|
234
|
-
if (openIdRef.current === openWhenStarted) setOpenId(result.id);
|
|
235
|
-
notify(l.saved, "success");
|
|
236
|
-
} catch (error) {
|
|
237
|
-
notify(`${l.saveFailed}: ${error instanceof Error ? error.message : String(error)}`, "error");
|
|
238
|
-
} finally {
|
|
239
|
-
setCreating(false);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
const cancelEditing = async () => {
|
|
243
|
-
const changed = draft && JSON.stringify(draft.spec) !== JSON.stringify(draft.base);
|
|
244
|
-
if (changed && !await confirm({ message: l.confirmDiscard, kind: "yesno" })) return;
|
|
245
|
-
setDraft(null);
|
|
246
|
-
};
|
|
247
|
-
const updateDraft = (patch) => setDraft((d) => d ? { ...d, spec: { ...d.spec, ...patch } } : d);
|
|
248
|
-
const setPanels = (panels) => updateDraft({ panels });
|
|
249
|
-
const commit = async () => {
|
|
250
|
-
if (!draft) return;
|
|
251
|
-
try {
|
|
252
|
-
const result = await save.mutateAsync({
|
|
253
|
-
id: draft.id,
|
|
254
|
-
spec: { ...draft.spec, title: draft.spec.title.trim() || l.untitled }
|
|
255
|
-
});
|
|
256
|
-
setDraft(null);
|
|
257
|
-
setOpenId(result.id);
|
|
258
|
-
notify(l.saved, "success");
|
|
259
|
-
} catch (error) {
|
|
260
|
-
notify(`${l.saveFailed}: ${error instanceof Error ? error.message : String(error)}`, "error");
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
const deleteOpen = async (d) => {
|
|
264
|
-
if (!await confirm({ message: l.confirmDelete(d.spec.title), kind: "yesno" })) return;
|
|
265
|
-
try {
|
|
266
|
-
await remove.mutateAsync(d.id);
|
|
267
|
-
setOpenId(null);
|
|
268
|
-
} catch (error) {
|
|
269
|
-
notify(
|
|
270
|
-
`${l.deleteFailed}: ${error instanceof Error ? error.message : String(error)}`,
|
|
271
|
-
"error"
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
let content;
|
|
276
|
-
if (draft) {
|
|
277
|
-
const panels = draft.spec.panels;
|
|
278
|
-
content = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", "data-testid": `${testId}-editor`, children: [
|
|
279
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
-
chunkNSD37OF5_cjs.PageHeader,
|
|
281
|
-
{
|
|
282
|
-
title: draft.spec.title || l.untitled,
|
|
283
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
284
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
285
|
-
ui.Button,
|
|
286
|
-
{
|
|
287
|
-
variant: "ghost",
|
|
288
|
-
onClick: () => void cancelEditing(),
|
|
289
|
-
"data-testid": `${testId}-cancel`,
|
|
290
|
-
children: l.cancel
|
|
291
|
-
}
|
|
292
|
-
),
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
294
|
-
ui.Button,
|
|
295
|
-
{
|
|
296
|
-
onClick: () => void commit(),
|
|
297
|
-
disabled: save.isPending,
|
|
298
|
-
"data-testid": `${testId}-save`,
|
|
299
|
-
children: save.isPending ? l.saving : l.save
|
|
300
|
-
}
|
|
301
|
-
)
|
|
302
|
-
] })
|
|
303
|
-
}
|
|
304
|
-
),
|
|
305
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [
|
|
306
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
307
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `${testId}-name`, children: l.dashboardTitle }),
|
|
308
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
309
|
-
ui.Input,
|
|
310
|
-
{
|
|
311
|
-
id: `${testId}-name`,
|
|
312
|
-
value: draft.spec.title,
|
|
313
|
-
onChange: (e) => updateDraft({ title: e.target.value }),
|
|
314
|
-
"data-testid": `${testId}-name`
|
|
315
|
-
}
|
|
316
|
-
)
|
|
317
|
-
] }),
|
|
318
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
|
|
319
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: `${testId}-about`, children: l.dashboardDescription }),
|
|
320
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
321
|
-
ui.Input,
|
|
322
|
-
{
|
|
323
|
-
id: `${testId}-about`,
|
|
324
|
-
value: draft.spec.description ?? "",
|
|
325
|
-
onChange: (e) => updateDraft({ description: e.target.value || void 0 })
|
|
326
|
-
}
|
|
327
|
-
)
|
|
328
|
-
] })
|
|
329
|
-
] }),
|
|
330
|
-
panels.length ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
331
|
-
PanelsGrid,
|
|
332
|
-
{
|
|
333
|
-
spec: draft.spec,
|
|
334
|
-
panelLabels,
|
|
335
|
-
testId,
|
|
336
|
-
editing: {
|
|
337
|
-
l,
|
|
338
|
-
onEdit: (index) => setEditingPanel({ index, panel: panels[index] }),
|
|
339
|
-
onMove: (index, by) => {
|
|
340
|
-
const next = [...panels];
|
|
341
|
-
const [moved] = next.splice(index, 1);
|
|
342
|
-
next.splice(index + by, 0, moved);
|
|
343
|
-
setPanels(next);
|
|
344
|
-
},
|
|
345
|
-
onRemove: (index) => setPanels(panels.filter((_, i) => i !== index))
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.noPanels }),
|
|
349
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
350
|
-
ui.Button,
|
|
351
|
-
{
|
|
352
|
-
variant: "outline",
|
|
353
|
-
onClick: () => setEditingPanel({ index: panels.length, panel: chunkLVIQWRC5_cjs.newPanel() }),
|
|
354
|
-
"data-testid": `${testId}-add-panel`,
|
|
355
|
-
children: [
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "size-4" }),
|
|
357
|
-
" ",
|
|
358
|
-
l.addPanel
|
|
359
|
-
]
|
|
360
|
-
}
|
|
361
|
-
),
|
|
362
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Dialog, { open: editingPanel !== null, onOpenChange: (o) => !o && setEditingPanel(null), children: /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { className: "max-h-[90dvh] max-w-5xl overflow-y-auto", children: [
|
|
363
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogHeader, { children: [
|
|
364
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: l.editPanel }),
|
|
365
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: l.editPanelDescription })
|
|
366
|
-
] }),
|
|
367
|
-
editingPanel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
-
chunkUOI6JJPG_cjs.PanelEditor,
|
|
369
|
-
{
|
|
370
|
-
value: editingPanel.panel,
|
|
371
|
-
onChange: (panel) => setEditingPanel({ ...editingPanel, panel }),
|
|
372
|
-
labels: editorLabels,
|
|
373
|
-
testId: `${testId}-panel-editor`
|
|
374
|
-
}
|
|
375
|
-
),
|
|
376
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DialogFooter, { children: [
|
|
377
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", onClick: () => setEditingPanel(null), children: l.cancel }),
|
|
378
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
-
ui.Button,
|
|
380
|
-
{
|
|
381
|
-
"data-testid": `${testId}-panel-done`,
|
|
382
|
-
onClick: () => {
|
|
383
|
-
if (!editingPanel) return;
|
|
384
|
-
const next = [...panels];
|
|
385
|
-
next[editingPanel.index] = editingPanel.panel;
|
|
386
|
-
setPanels(next);
|
|
387
|
-
setEditingPanel(null);
|
|
388
|
-
},
|
|
389
|
-
children: l.panelDone
|
|
390
|
-
}
|
|
391
|
-
)
|
|
392
|
-
] })
|
|
393
|
-
] }) })
|
|
394
|
-
] });
|
|
395
|
-
} else if (open) {
|
|
396
|
-
content = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", "data-testid": `${testId}-view`, children: [
|
|
397
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
398
|
-
chunkNSD37OF5_cjs.PageHeader,
|
|
399
|
-
{
|
|
400
|
-
title: open.spec.title,
|
|
401
|
-
description: open.spec.description,
|
|
402
|
-
leading: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "ghost", size: "icon", "aria-label": l.back, onClick: () => setOpenId(null), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeft, { className: "size-4" }) }),
|
|
403
|
-
actions: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
|
|
404
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
405
|
-
ui.Button,
|
|
406
|
-
{
|
|
407
|
-
variant: "outline",
|
|
408
|
-
onClick: () => startEditing(open),
|
|
409
|
-
"data-testid": `${testId}-edit`,
|
|
410
|
-
children: [
|
|
411
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-4" }),
|
|
412
|
-
" ",
|
|
413
|
-
l.edit
|
|
414
|
-
]
|
|
415
|
-
}
|
|
416
|
-
),
|
|
417
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
|
|
418
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
419
|
-
ui.Button,
|
|
420
|
-
{
|
|
421
|
-
variant: "ghost",
|
|
422
|
-
size: "icon",
|
|
423
|
-
"aria-label": l.more,
|
|
424
|
-
"data-testid": `${testId}-more`,
|
|
425
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-4" })
|
|
426
|
-
}
|
|
427
|
-
) }),
|
|
428
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
429
|
-
ui.DropdownMenuItem,
|
|
430
|
-
{
|
|
431
|
-
onSelect: () => void deleteOpen(open),
|
|
432
|
-
className: "text-destructive focus:text-destructive",
|
|
433
|
-
"data-testid": `${testId}-delete`,
|
|
434
|
-
children: [
|
|
435
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-4" }),
|
|
436
|
-
" ",
|
|
437
|
-
l.delete
|
|
438
|
-
]
|
|
439
|
-
}
|
|
440
|
-
) })
|
|
441
|
-
] })
|
|
442
|
-
] })
|
|
443
|
-
}
|
|
444
|
-
),
|
|
445
|
-
/* @__PURE__ */ jsxRuntime.jsx(PanelsGrid, { spec: open.spec, panelLabels, testId })
|
|
446
|
-
] });
|
|
447
|
-
} else {
|
|
448
|
-
const list = (saved.data ?? []).filter((d) => !d.unreadable);
|
|
449
|
-
const unreadable = (saved.data ?? []).filter((d) => d.unreadable);
|
|
450
|
-
const deleteUnreadable = async () => {
|
|
451
|
-
if (!await confirm({ message: l.confirmDeleteUnreadable(unreadable.length), kind: "yesno" }))
|
|
452
|
-
return;
|
|
453
|
-
try {
|
|
454
|
-
for (const d of unreadable) await remove.mutateAsync(d.id);
|
|
455
|
-
} catch (error) {
|
|
456
|
-
notify(
|
|
457
|
-
`${l.deleteFailed}: ${error instanceof Error ? error.message : String(error)}`,
|
|
458
|
-
"error"
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
const newButton = /* @__PURE__ */ jsxRuntime.jsx(
|
|
463
|
-
NewDashboardButton,
|
|
464
|
-
{
|
|
465
|
-
templates,
|
|
466
|
-
l,
|
|
467
|
-
onBlank: createBlank,
|
|
468
|
-
onTemplate: (t) => void createFromTemplate(t),
|
|
469
|
-
busy: creating,
|
|
470
|
-
testId
|
|
471
|
-
}
|
|
472
|
-
);
|
|
473
|
-
const isEmpty = !!saved.data && list.length === 0;
|
|
474
|
-
content = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-6", "data-testid": `${testId}-list`, children: [
|
|
475
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
476
|
-
chunkNSD37OF5_cjs.PageHeader,
|
|
477
|
-
{
|
|
478
|
-
title: l.title,
|
|
479
|
-
description: l.description,
|
|
480
|
-
actions: saved.isError || saved.data && !isEmpty ? newButton : void 0
|
|
481
|
-
}
|
|
482
|
-
),
|
|
483
|
-
unreadable.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", "data-testid": `${testId}-unreadable`, children: [
|
|
484
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: l.unreadable(unreadable.length) }),
|
|
485
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", size: "sm", onClick: () => void deleteUnreadable(), children: l.deleteUnreadable })
|
|
486
|
-
] }),
|
|
487
|
-
saved.isError && !saved.data ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-3", role: "alert", children: [
|
|
488
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive", children: l.loadError }),
|
|
489
|
-
/* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", size: "sm", onClick: () => void saved.refetch(), children: l.retry })
|
|
490
|
-
] }) : !saved.data && saved.fetchStatus === "paused" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", "data-testid": `${testId}-offline`, children: l.offline }) : !saved.data ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-24 animate-pulse rounded-xl bg-muted" }, i)) }) : isEmpty ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
|
-
chunkZW6FPIFC_cjs.EmptyState,
|
|
492
|
-
{
|
|
493
|
-
icon: lucideReact.LayoutDashboard,
|
|
494
|
-
title: l.empty,
|
|
495
|
-
description: l.emptyDescription,
|
|
496
|
-
action: newButton,
|
|
497
|
-
testId: `${testId}-empty`
|
|
498
|
-
}
|
|
499
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3", children: list.map((d) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { variant: "elevated", className: "card-hover h-full rounded-xl p-0", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
500
|
-
"button",
|
|
501
|
-
{
|
|
502
|
-
type: "button",
|
|
503
|
-
className: "flex size-full flex-col items-start gap-1 rounded-xl p-5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
504
|
-
onClick: () => setOpenId(d.id),
|
|
505
|
-
"data-testid": `${testId}-open-${d.id}`,
|
|
506
|
-
children: [
|
|
507
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2 font-medium text-foreground", children: [
|
|
508
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { className: "size-4 text-muted-foreground" }),
|
|
509
|
-
d.spec.title
|
|
510
|
-
] }),
|
|
511
|
-
d.spec.description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-2 text-sm text-muted-foreground", children: d.spec.description }),
|
|
512
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground", children: l.panels(d.spec.panels.length) })
|
|
513
|
-
]
|
|
514
|
-
}
|
|
515
|
-
) }) }, d.id)) })
|
|
516
|
-
] });
|
|
517
|
-
}
|
|
518
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
519
|
-
"div",
|
|
520
|
-
{
|
|
521
|
-
className: ui.cn("h-full min-h-0 w-full overflow-y-auto p-4 sm:p-6", className),
|
|
522
|
-
"data-testid": testId,
|
|
523
|
-
children: content
|
|
524
|
-
}
|
|
525
|
-
);
|
|
526
|
-
}
|
|
20
|
+
|
|
527
21
|
|
|
528
22
|
Object.defineProperty(exports, "DEFAULT_PANEL_EDITOR_LABELS", {
|
|
529
23
|
enumerable: true,
|
|
530
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkEF2QQBDV_cjs.DEFAULT_PANEL_EDITOR_LABELS; }
|
|
531
25
|
});
|
|
532
26
|
Object.defineProperty(exports, "PanelEditor", {
|
|
533
27
|
enumerable: true,
|
|
534
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkEF2QQBDV_cjs.PanelEditor; }
|
|
535
29
|
});
|
|
536
30
|
Object.defineProperty(exports, "DASHBOARD_TEMPLATES", {
|
|
537
31
|
enumerable: true,
|
|
538
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkKRQCUVH7_cjs.DASHBOARD_TEMPLATES; }
|
|
539
33
|
});
|
|
540
34
|
Object.defineProperty(exports, "OVERVIEW_DASHBOARD", {
|
|
541
35
|
enumerable: true,
|
|
542
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkKRQCUVH7_cjs.OVERVIEW_DASHBOARD; }
|
|
543
37
|
});
|
|
544
38
|
Object.defineProperty(exports, "newPanel", {
|
|
545
39
|
enumerable: true,
|
|
546
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkKRQCUVH7_cjs.newPanel; }
|
|
547
41
|
});
|
|
548
42
|
Object.defineProperty(exports, "newPanelId", {
|
|
549
43
|
enumerable: true,
|
|
550
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkKRQCUVH7_cjs.newPanelId; }
|
|
551
45
|
});
|
|
552
46
|
Object.defineProperty(exports, "usagePanels", {
|
|
553
47
|
enumerable: true,
|
|
554
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkKRQCUVH7_cjs.usagePanels; }
|
|
555
49
|
});
|
|
556
50
|
Object.defineProperty(exports, "ChartRenderer", {
|
|
557
51
|
enumerable: true,
|
|
@@ -617,6 +111,26 @@ Object.defineProperty(exports, "metricValueOf", {
|
|
|
617
111
|
enumerable: true,
|
|
618
112
|
get: function () { return chunkPBPO54KZ_cjs.metricValueOf; }
|
|
619
113
|
});
|
|
114
|
+
Object.defineProperty(exports, "ConditionsEditor", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () { return chunkMWHVETKN_cjs.ConditionsEditor; }
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, "DEFAULT_CONDITIONS_LABELS", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () { return chunkMWHVETKN_cjs.DEFAULT_CONDITIONS_LABELS; }
|
|
121
|
+
});
|
|
122
|
+
Object.defineProperty(exports, "EditorField", {
|
|
123
|
+
enumerable: true,
|
|
124
|
+
get: function () { return chunkMWHVETKN_cjs.EditorField; }
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "EditorSelect", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () { return chunkMWHVETKN_cjs.EditorSelect; }
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, "needsValue", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () { return chunkMWHVETKN_cjs.needsValue; }
|
|
133
|
+
});
|
|
620
134
|
Object.defineProperty(exports, "CATEGORICAL_SERIES_STYLES", {
|
|
621
135
|
enumerable: true,
|
|
622
136
|
get: function () { return chunkOEJQFPWO_cjs.CATEGORICAL_SERIES_STYLES; }
|
|
@@ -629,7 +143,5 @@ Object.defineProperty(exports, "categoricalStyle", {
|
|
|
629
143
|
enumerable: true,
|
|
630
144
|
get: function () { return chunkOEJQFPWO_cjs.categoricalStyle; }
|
|
631
145
|
});
|
|
632
|
-
exports.ConnectedDashboardsPage = ConnectedDashboardsPage;
|
|
633
|
-
exports.DEFAULT_DASHBOARDS_PAGE_LABELS = DEFAULT_DASHBOARDS_PAGE_LABELS;
|
|
634
146
|
//# sourceMappingURL=index.cjs.map
|
|
635
147
|
//# sourceMappingURL=index.cjs.map
|