@malloy-publisher/sdk 0.9.10 → 0.9.12
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/{RenderedResult-Dp1Qdajz.es.js → RenderedResult-CDiXJAh9.es.js} +102 -102
- package/dist/RenderedResult-De51QvsZ.cjs.js +153 -0
- package/dist/ServerProvider-DKrBcXL7.cjs.js +1 -0
- package/dist/{ServerProvider-CQy4jVYK.es.js → ServerProvider-RvKSbvnL.es.js} +622 -587
- package/dist/builder/index.cjs.js +78 -130
- package/dist/builder/index.es.js +7493 -6769
- package/dist/builder-entry.d.ts +3 -0
- package/dist/client/api.d.ts +72 -23
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/AppDialog.d.ts +9 -1
- package/dist/components/Connections/common.d.ts +11 -3
- package/dist/components/Dashboard/DashboardGrid.d.ts +14 -15
- package/dist/components/Dashboard/DashboardTile.d.ts +8 -1
- package/dist/components/Dashboard/DashboardView.d.ts +22 -34
- package/dist/components/Dashboard/TileCard.d.ts +10 -3
- package/dist/components/Dashboard/useStuck.d.ts +15 -7
- package/dist/components/DocumentCreate/useDocumentChoices.d.ts +6 -0
- package/dist/components/Package/PackageProblems.d.ts +14 -0
- package/dist/components/RemoveBadge.d.ts +40 -0
- package/dist/components/Report/Report.d.ts +13 -4
- package/dist/components/Report/ReportPage.d.ts +60 -0
- package/dist/components/Report/layoutRules.d.ts +32 -0
- package/dist/components/Report/reportQuery.d.ts +30 -0
- package/dist/components/Report/telemetry.d.ts +0 -2
- package/dist/components/ReportBuilder/AddTileDialog.d.ts +22 -3
- package/dist/components/ReportBuilder/BuilderBar.d.ts +17 -0
- package/dist/components/ReportBuilder/BuilderDialogs.d.ts +7 -6
- package/dist/components/ReportBuilder/BuilderGrid.d.ts +10 -4
- package/dist/components/ReportBuilder/BuilderHeader.d.ts +4 -7
- package/dist/components/ReportBuilder/BuilderToolbar.d.ts +88 -0
- package/dist/components/ReportBuilder/DrillDialog.d.ts +3 -1
- package/dist/components/ReportBuilder/EditorSurface.d.ts +7 -9
- package/dist/components/ReportBuilder/FilterDialog.d.ts +3 -1
- package/dist/components/ReportBuilder/FilterStrip.d.ts +30 -8
- package/dist/components/ReportBuilder/InlineMarkdown.d.ts +4 -4
- package/dist/components/ReportBuilder/ReportBuilder.d.ts +49 -12
- package/dist/components/ReportBuilder/ReportEditor.d.ts +53 -3
- package/dist/components/ReportBuilder/TextTileBody.d.ts +2 -5
- package/dist/components/ReportBuilder/TileFrame.d.ts +10 -4
- package/dist/components/ReportBuilder/TileMenu.d.ts +12 -9
- package/dist/components/ReportBuilder/ViewPicker.d.ts +53 -0
- package/dist/components/ReportBuilder/addTileToDocument.d.ts +24 -3
- package/dist/components/ReportBuilder/builderControls.d.ts +60 -0
- package/dist/components/ReportBuilder/catalog.d.ts +2 -4
- package/dist/components/ReportBuilder/inlineEdit.d.ts +9 -10
- package/dist/components/ReportBuilder/localGiven.d.ts +12 -0
- package/dist/components/ReportBuilder/preview.d.ts +17 -2
- package/dist/components/ReportBuilder/readDocument.d.ts +0 -2
- package/dist/components/ReportBuilder/readForEditor.d.ts +2 -7
- package/dist/components/ReportBuilder/reportTag.d.ts +11 -1
- package/dist/components/ReportBuilder/sortable.d.ts +4 -3
- package/dist/components/ReportBuilder/testing/inline.d.ts +5 -1
- package/dist/components/ReportBuilder/useBuilderSelection.d.ts +0 -1
- package/dist/components/ReportBuilder/useBuilderSession.d.ts +21 -12
- package/dist/components/ReportBuilder/useDocumentEditor.d.ts +2 -6
- package/dist/components/ReportBuilder/useExitGuard.d.ts +3 -0
- package/dist/components/ReportBuilder/useFilterForm.d.ts +3 -1
- package/dist/components/ReportBuilder/useOpenedDocument.d.ts +0 -4
- package/dist/components/ReportBuilder/useReportDraft.d.ts +66 -0
- package/dist/components/ReportBuilder/useReportEditor.d.ts +0 -9
- package/dist/components/ReportBuilder/useTileEditing.d.ts +6 -3
- package/dist/components/ReportBuilder/viewAnnotations.d.ts +9 -0
- package/dist/components/ReportBuilder/widthLabel.d.ts +6 -0
- package/dist/components/ServerProvider.d.ts +9 -0
- package/dist/components/controlTokens.d.ts +45 -0
- package/dist/components/drill/markDrillableCells.d.ts +1 -1
- package/dist/components/given/FilterButton.d.ts +35 -0
- package/dist/components/given/GivensPanel.d.ts +2 -1
- package/dist/components/given/filterEditing.d.ts +54 -0
- package/dist/components/given/filterSummary.d.ts +9 -0
- package/dist/components/given/paramCodec.d.ts +11 -0
- package/dist/components/given/required.d.ts +25 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/legacy/index.d.ts +1 -1
- package/dist/components/{Report/CellReport.d.ts → legacy/malloynb/CellRunnerView.d.ts} +9 -17
- package/dist/components/legacy/{MalloynbCells.d.ts → malloynb/MalloynbCells.d.ts} +3 -3
- package/dist/components/legacy/{Notebook.d.ts → malloynb/Notebook.d.ts} +1 -1
- package/dist/components/{Notebook → legacy/malloynb}/NotebookCell.d.ts +3 -3
- package/dist/components/legacy/malloynb/cellKind.d.ts +5 -0
- package/dist/components/{Notebook → legacy/malloynb}/types.d.ts +1 -1
- package/dist/components/styles.d.ts +0 -2
- package/dist/hooks/useQueryResult.d.ts +7 -0
- package/dist/index.cjs.js +16 -19
- package/dist/index.es.js +8418 -7722
- package/dist/theme/ThemeContext.d.ts +8 -1
- package/dist/theme/classes.d.ts +49 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/types.d.ts +7 -0
- package/dist/theme/ui.d.ts +75 -0
- package/dist/{useCompiledDocument-BMPDvdFx.es.js → useCompiledDocument-Bf4RSfB6.es.js} +8669 -7851
- package/dist/useCompiledDocument-XsQz85Ri.cjs.js +141 -0
- package/package.json +2 -2
- package/src/builder-entry.ts +9 -0
- package/src/components/AppDialog.tsx +23 -0
- package/src/components/Connections/AddConnectionDialog.tsx +34 -2
- package/src/components/Connections/EditConnectionDialog.tsx +45 -3
- package/src/components/Connections/common.spec.ts +69 -0
- package/src/components/Connections/common.ts +132 -0
- package/src/components/Dashboard/DashboardGrid.tsx +39 -17
- package/src/components/Dashboard/DashboardTile.tsx +19 -2
- package/src/components/Dashboard/DashboardView.spec.tsx +216 -15
- package/src/components/Dashboard/DashboardView.tsx +137 -155
- package/src/components/Dashboard/RowsDialog.tsx +1 -2
- package/src/components/Dashboard/TileCard.tsx +28 -10
- package/src/components/Dashboard/defaultTileSpan.spec.ts +24 -0
- package/src/components/Dashboard/useStuck.ts +28 -17
- package/src/components/DocumentCreate/useDocumentChoices.ts +19 -2
- package/src/components/Environment/Connections.tsx +1 -0
- package/src/components/Package/NewDocumentDialog.spec.tsx +76 -59
- package/src/components/Package/NewDocumentDialog.tsx +383 -119
- package/src/components/Package/Package.artifacts.spec.tsx +1 -1
- package/src/components/Package/Package.create.spec.tsx +7 -6
- package/src/components/Package/Package.tsx +10 -7
- package/src/components/Package/PackageProblems.spec.tsx +41 -0
- package/src/components/Package/PackageProblems.tsx +95 -0
- package/src/components/Prose.tsx +12 -7
- package/src/components/RemoveBadge.tsx +94 -0
- package/src/components/RenderedResult/RenderedResult.tsx +5 -9
- package/src/components/RenderedResult/ResultPanel.tsx +59 -3
- package/src/components/Report/Report.spec.tsx +50 -32
- package/src/components/Report/Report.telemetry.spec.tsx +0 -45
- package/src/components/Report/Report.tsx +45 -77
- package/src/components/Report/ReportPage.tsx +168 -0
- package/src/components/Report/layoutRules.spec.ts +35 -0
- package/src/components/Report/layoutRules.ts +55 -0
- package/src/components/Report/reportQuery.ts +53 -0
- package/src/components/Report/telemetry.ts +0 -2
- package/src/components/ReportBuilder/AddTileDialog.spec.tsx +76 -41
- package/src/components/ReportBuilder/AddTileDialog.tsx +368 -133
- package/src/components/ReportBuilder/BuilderBar.tsx +599 -0
- package/src/components/ReportBuilder/BuilderDialogs.tsx +28 -39
- package/src/components/ReportBuilder/BuilderGrid.tsx +31 -29
- package/src/components/ReportBuilder/BuilderHeader.tsx +63 -75
- package/src/components/ReportBuilder/BuilderToolbar.tsx +95 -9
- package/src/components/ReportBuilder/DrillDialog.tsx +240 -128
- package/src/components/ReportBuilder/EditorSurface.tsx +345 -69
- package/src/components/ReportBuilder/FilterDialog.tsx +516 -166
- package/src/components/ReportBuilder/FilterStrip.tsx +130 -151
- package/src/components/ReportBuilder/InlineMarkdown.tsx +71 -45
- package/src/components/ReportBuilder/ReportBuilder.charts.spec.tsx +35 -40
- package/src/components/ReportBuilder/ReportBuilder.controls.spec.tsx +491 -0
- package/src/components/ReportBuilder/ReportBuilder.exit.spec.tsx +2 -4
- package/src/components/ReportBuilder/ReportBuilder.inline.spec.tsx +13 -15
- package/src/components/ReportBuilder/ReportBuilder.notebook.spec.tsx +27 -118
- package/src/components/ReportBuilder/ReportBuilder.openDraft.spec.tsx +12 -5
- package/src/components/ReportBuilder/ReportBuilder.sources.spec.tsx +2 -10
- package/src/components/ReportBuilder/ReportBuilder.spec.tsx +37 -31
- package/src/components/ReportBuilder/ReportBuilder.textTiles.spec.tsx +22 -15
- package/src/components/ReportBuilder/ReportBuilder.tsx +292 -117
- package/src/components/ReportBuilder/ReportEditor.emptyStart.spec.tsx +2 -1
- package/src/components/ReportBuilder/ReportEditor.modelFilters.spec.tsx +312 -0
- package/src/components/ReportBuilder/ReportEditor.notebook.spec.tsx +26 -75
- package/src/components/ReportBuilder/ReportEditor.package.spec.tsx +6 -2
- package/src/components/ReportBuilder/ReportEditor.resourceUri.spec.tsx +3 -2
- package/src/components/ReportBuilder/ReportEditor.spec.tsx +2 -4
- package/src/components/ReportBuilder/ReportEditor.textSource.spec.tsx +93 -13
- package/src/components/ReportBuilder/ReportEditor.tsx +104 -14
- package/src/components/ReportBuilder/TextTileBody.tsx +6 -7
- package/src/components/ReportBuilder/TileFrame.tsx +212 -75
- package/src/components/ReportBuilder/TileMenu.tsx +241 -140
- package/src/components/ReportBuilder/ViewPicker.tsx +349 -0
- package/src/components/ReportBuilder/addTile.compile.spec.ts +1 -1
- package/src/components/ReportBuilder/addTileToDocument.spec.ts +102 -3
- package/src/components/ReportBuilder/addTileToDocument.ts +122 -25
- package/src/components/ReportBuilder/builderControls.ts +164 -0
- package/src/components/ReportBuilder/builderReport.ts +1 -2
- package/src/components/ReportBuilder/catalog.ts +10 -26
- package/src/components/ReportBuilder/inlineEdit.tsx +22 -54
- package/src/components/ReportBuilder/localGiven.ts +56 -0
- package/src/components/ReportBuilder/preview.spec.ts +125 -5
- package/src/components/ReportBuilder/preview.ts +60 -44
- package/src/components/ReportBuilder/readDocument.spec.ts +16 -22
- package/src/components/ReportBuilder/readDocument.ts +14 -11
- package/src/components/ReportBuilder/readForEditor.spec.ts +12 -41
- package/src/components/ReportBuilder/readForEditor.ts +4 -26
- package/src/components/ReportBuilder/reportTag.ts +28 -7
- package/src/components/ReportBuilder/sortable.tsx +15 -7
- package/src/components/ReportBuilder/spliceDocument.imports.spec.ts +1 -1
- package/src/components/ReportBuilder/tagParse.spec.ts +0 -40
- package/src/components/ReportBuilder/testing/inline.ts +25 -5
- package/src/components/ReportBuilder/testing/reportLayoutParity.json +13 -8
- package/src/components/ReportBuilder/textTiles.spec.ts +7 -6
- package/src/components/ReportBuilder/useBuilderSelection.ts +35 -0
- package/src/components/ReportBuilder/useBuilderSession.spec.ts +2 -2
- package/src/components/ReportBuilder/useBuilderSession.ts +21 -13
- package/src/components/ReportBuilder/useDocumentEditor.spec.ts +0 -58
- package/src/components/ReportBuilder/useDocumentEditor.ts +3 -16
- package/src/components/ReportBuilder/useEditorCatalog.spec.tsx +26 -0
- package/src/components/ReportBuilder/useEditorCatalog.ts +7 -2
- package/src/components/ReportBuilder/useExitGuard.ts +16 -0
- package/src/components/ReportBuilder/useFilterForm.spec.tsx +17 -0
- package/src/components/ReportBuilder/useFilterForm.ts +5 -1
- package/src/components/ReportBuilder/useOpenedDocument.ts +0 -2
- package/src/components/ReportBuilder/useReportDraft.spec.ts +149 -0
- package/src/components/ReportBuilder/useReportDraft.ts +292 -0
- package/src/components/ReportBuilder/useReportEditor.ts +3 -12
- package/src/components/ReportBuilder/useSaveChannel.ts +0 -1
- package/src/components/ReportBuilder/useTileEditing.ts +43 -12
- package/src/components/ReportBuilder/viewAnnotations.ts +29 -0
- package/src/components/ReportBuilder/widthLabel.spec.ts +25 -0
- package/src/components/ReportBuilder/widthLabel.ts +26 -0
- package/src/components/ServerProvider.tsx +11 -0
- package/src/components/controlTokens.ts +47 -0
- package/src/components/drill/markDrillableCells.ts +2 -1
- package/src/components/given/FilterButton.spec.tsx +143 -0
- package/src/components/given/FilterButton.tsx +478 -0
- package/src/components/given/GivenInput.spec.tsx +47 -0
- package/src/components/given/GivenInput.tsx +20 -2
- package/src/components/given/GivensPanel.spec.tsx +11 -3
- package/src/components/given/GivensPanel.tsx +45 -44
- package/src/components/given/filterEditing.ts +60 -0
- package/src/components/given/filterSummary.spec.ts +108 -0
- package/src/components/given/filterSummary.ts +109 -0
- package/src/components/given/paramCodec.ts +1 -1
- package/src/components/given/required.spec.ts +60 -0
- package/src/components/given/required.ts +78 -0
- package/src/components/index.ts +9 -0
- package/src/components/legacy/Dashboard.spec.tsx +3 -1
- package/src/components/legacy/index.ts +1 -1
- package/src/components/{Report/CellReport.spec.tsx → legacy/malloynb/CellRunnerView.spec.tsx} +53 -57
- package/src/components/{Report/CellReport.tsx → legacy/malloynb/CellRunnerView.tsx} +122 -136
- package/src/components/legacy/{MalloynbCells.tsx → malloynb/MalloynbCells.tsx} +6 -6
- package/src/components/legacy/{Notebook.layout.spec.tsx → malloynb/Notebook.layout.spec.tsx} +16 -7
- package/src/components/legacy/malloynb/Notebook.served.spec.tsx +84 -0
- package/src/components/legacy/{Notebook.spec.tsx → malloynb/Notebook.spec.tsx} +5 -3
- package/src/components/legacy/{Notebook.tsx → malloynb/Notebook.tsx} +9 -7
- package/src/components/{Notebook → legacy/malloynb}/NotebookCell.tsx +70 -150
- package/src/components/legacy/malloynb/cellKind.spec.ts +33 -0
- package/src/components/legacy/malloynb/cellKind.ts +24 -0
- package/src/components/{Notebook → legacy/malloynb}/types.ts +1 -1
- package/src/components/styles.ts +0 -18
- package/src/hooks/useGivensState.ts +7 -3
- package/src/hooks/useQueryResult.placeholder.spec.ts +44 -0
- package/src/hooks/useQueryResult.ts +26 -1
- package/src/theme/ThemeContext.tsx +21 -1
- package/src/theme/classes.ts +52 -0
- package/src/theme/index.ts +8 -0
- package/src/theme/resolveTheme.ts +3 -0
- package/src/theme/types.ts +7 -0
- package/src/theme/ui.spec.tsx +91 -0
- package/src/theme/ui.ts +115 -0
- package/dist/RenderedResult-BcgYjkZ0.cjs.js +0 -153
- package/dist/ServerProvider-B0dUY8be.cjs.js +0 -1
- package/dist/components/Notebook/cellKind.d.ts +0 -20
- package/dist/components/Report/LinearReport.d.ts +0 -18
- package/dist/components/ReportBuilder/SourceViewPicker.d.ts +0 -9
- package/dist/components/ReportBuilder/legacyNotebook.d.ts +0 -73
- package/dist/components/ReportBuilder/useConversionConfirm.d.ts +0 -20
- package/dist/useCompiledDocument-UY28ITET.cjs.js +0 -141
- package/src/components/Notebook/cellKind.spec.ts +0 -199
- package/src/components/Notebook/cellKind.ts +0 -74
- package/src/components/Report/LinearReport.tsx +0 -71
- package/src/components/ReportBuilder/SourceViewPicker.tsx +0 -122
- package/src/components/ReportBuilder/legacyNotebook.chart.spec.ts +0 -77
- package/src/components/ReportBuilder/legacyNotebook.convert.spec.ts +0 -626
- package/src/components/ReportBuilder/legacyNotebook.read.spec.ts +0 -338
- package/src/components/ReportBuilder/legacyNotebook.ts +0 -1122
- package/src/components/ReportBuilder/useConversionConfirm.ts +0 -55
- package/src/components/legacy/Notebook.served.spec.tsx +0 -183
- /package/dist/components/{Notebook → legacy/malloynb}/runPlan.d.ts +0 -0
- /package/src/components/{Notebook → legacy/malloynb}/runPlan.spec.ts +0 -0
- /package/src/components/{Notebook → legacy/malloynb}/runPlan.ts +0 -0
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
// Copyright (c) Credible Data Inc.
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
import { reportClasses } from "../../theme/classes";
|
|
5
|
+
import AddIcon from "@mui/icons-material/Add";
|
|
6
|
+
import CheckIcon from "@mui/icons-material/Check";
|
|
7
|
+
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
|
|
8
|
+
import FilterListIcon from "@mui/icons-material/FilterList";
|
|
9
|
+
import InsertChartOutlinedIcon from "@mui/icons-material/InsertChartOutlined";
|
|
10
|
+
import NotesIcon from "@mui/icons-material/Notes";
|
|
11
|
+
import RestartAltIcon from "@mui/icons-material/RestartAlt";
|
|
12
|
+
import RedoIcon from "@mui/icons-material/Redo";
|
|
13
|
+
import UndoIcon from "@mui/icons-material/Undo";
|
|
14
|
+
import {
|
|
15
|
+
Box,
|
|
16
|
+
Button,
|
|
17
|
+
ButtonBase,
|
|
18
|
+
Divider,
|
|
19
|
+
IconButton,
|
|
20
|
+
Menu,
|
|
21
|
+
MenuItem,
|
|
22
|
+
Stack,
|
|
23
|
+
ToggleButton,
|
|
24
|
+
ToggleButtonGroup,
|
|
25
|
+
Tooltip,
|
|
26
|
+
useMediaQuery,
|
|
27
|
+
} from "@mui/material";
|
|
28
|
+
import type { Theme } from "@mui/material";
|
|
29
|
+
import { useState, type ReactNode } from "react";
|
|
30
|
+
import { MOTION_FAST } from "../../theme/motion";
|
|
31
|
+
import type { ReportUi } from "../../theme/ui";
|
|
32
|
+
import { usePublisherTheme } from "../../theme/ThemeContext";
|
|
33
|
+
import { edgeColor, hoverEdgeColor } from "../controlTokens";
|
|
34
|
+
import type { BuilderControls } from "./builderControls";
|
|
35
|
+
import {
|
|
36
|
+
controlSx,
|
|
37
|
+
dividerSx,
|
|
38
|
+
iconControlSx,
|
|
39
|
+
segmentedSx,
|
|
40
|
+
} from "./BuilderToolbar";
|
|
41
|
+
import { MOD } from "./useBuilderShortcuts";
|
|
42
|
+
|
|
43
|
+
export interface BuilderBarProps {
|
|
44
|
+
/** The builder's controls, from `onControlsChange`. Undefined while it opens: only Done is drawn. */
|
|
45
|
+
controls: BuilderControls | undefined;
|
|
46
|
+
/** Leave the builder for the reader. Absent, no Done is drawn. */
|
|
47
|
+
onDone?: () => void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The builder's controls as one bar, for a host's header: the save status,
|
|
52
|
+
* undo and redo, the layout switch, an Add menu, then Done and, while there
|
|
53
|
+
* are unsaved edits, Save. The page under it stays the reader's page, with the
|
|
54
|
+
* tile and filter controls on the things they change.
|
|
55
|
+
*
|
|
56
|
+
* Done leaves; a host whose leave guard asks about unsaved edits (as the
|
|
57
|
+
* Console's does) is asked there, so Done never discards on its own.
|
|
58
|
+
*/
|
|
59
|
+
export function BuilderBar({ controls, onDone: onDoneProp }: BuilderBarProps) {
|
|
60
|
+
// A host that passed the builder `onExit` and draws the bar without its own
|
|
61
|
+
// Done still gets a way out.
|
|
62
|
+
const onDone = onDoneProp ?? controls?.exit;
|
|
63
|
+
// A phone's header has room for the way out and little else: the bar there
|
|
64
|
+
// is the status, Done and Save, and the rest is on the page.
|
|
65
|
+
const compact = useMediaQuery("(max-width: 599.95px)");
|
|
66
|
+
const { theme } = usePublisherTheme();
|
|
67
|
+
const edge = edgeColor(theme.cardBorder);
|
|
68
|
+
const hoverEdge = hoverEdgeColor(theme.cardBorder, theme.tileTitle);
|
|
69
|
+
const [addAnchor, setAddAnchor] = useState<HTMLElement | null>(null);
|
|
70
|
+
const unsaved = controls?.save !== undefined && controls.status !== "saved";
|
|
71
|
+
// Done writes the edits itself when the builder offers it, so Save is then
|
|
72
|
+
// only the keyboard's (⌘S), for a checkpoint without leaving.
|
|
73
|
+
const finish = controls?.done ?? onDone;
|
|
74
|
+
const separateSave = unsaved && controls?.done === undefined;
|
|
75
|
+
const add = controls?.add;
|
|
76
|
+
const canAdd =
|
|
77
|
+
add !== undefined &&
|
|
78
|
+
(add.tile !== undefined ||
|
|
79
|
+
add.text !== undefined ||
|
|
80
|
+
add.filter !== undefined ||
|
|
81
|
+
add.filterUnavailable !== undefined);
|
|
82
|
+
const pick = (action: (() => void) | undefined) => () => {
|
|
83
|
+
setAddAnchor(null);
|
|
84
|
+
action?.();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return (
|
|
88
|
+
<Stack
|
|
89
|
+
direction="row"
|
|
90
|
+
role="toolbar"
|
|
91
|
+
className={reportClasses.builderBar}
|
|
92
|
+
aria-label="Report builder"
|
|
93
|
+
sx={{
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
gap: 0.5,
|
|
96
|
+
flexShrink: 0,
|
|
97
|
+
"& .MuiButton-root": { whiteSpace: "nowrap" },
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
{controls && (
|
|
101
|
+
<>
|
|
102
|
+
{controls.save && <SaveStatus controls={controls} />}
|
|
103
|
+
{!compact && (
|
|
104
|
+
<>
|
|
105
|
+
<Tooltip title={`Undo (${MOD}Z)`}>
|
|
106
|
+
{/* A span, because a disabled button dispatches no events and a
|
|
107
|
+
tooltip on one would never show. */}
|
|
108
|
+
<span>
|
|
109
|
+
<IconButton
|
|
110
|
+
aria-label="Undo"
|
|
111
|
+
disabled={!controls.canUndo}
|
|
112
|
+
onClick={controls.undo}
|
|
113
|
+
sx={iconControlSx(theme.ui)}
|
|
114
|
+
>
|
|
115
|
+
<UndoIcon fontSize="small" />
|
|
116
|
+
</IconButton>
|
|
117
|
+
</span>
|
|
118
|
+
</Tooltip>
|
|
119
|
+
<Tooltip title={`Redo (${MOD}⇧Z)`}>
|
|
120
|
+
<span>
|
|
121
|
+
<IconButton
|
|
122
|
+
aria-label="Redo"
|
|
123
|
+
disabled={!controls.canRedo}
|
|
124
|
+
onClick={controls.redo}
|
|
125
|
+
sx={iconControlSx(theme.ui)}
|
|
126
|
+
>
|
|
127
|
+
<RedoIcon fontSize="small" />
|
|
128
|
+
</IconButton>
|
|
129
|
+
</span>
|
|
130
|
+
</Tooltip>
|
|
131
|
+
{(controls.layout || canAdd) && (
|
|
132
|
+
<Divider orientation="vertical" sx={dividerSx} />
|
|
133
|
+
)}
|
|
134
|
+
{controls.layout && (
|
|
135
|
+
<Tooltip title="Layout: tiles side by side, or one after another">
|
|
136
|
+
<ToggleButtonGroup
|
|
137
|
+
size="small"
|
|
138
|
+
exclusive
|
|
139
|
+
value={controls.layout.value}
|
|
140
|
+
aria-label="Layout"
|
|
141
|
+
onChange={(
|
|
142
|
+
_event,
|
|
143
|
+
next: "grid" | "linear" | null,
|
|
144
|
+
) => {
|
|
145
|
+
if (next && next !== controls.layout?.value)
|
|
146
|
+
controls.layout?.set(next);
|
|
147
|
+
}}
|
|
148
|
+
sx={segmentedSx(edge, theme.ui)}
|
|
149
|
+
>
|
|
150
|
+
<ToggleButton
|
|
151
|
+
value="linear"
|
|
152
|
+
aria-label="Linear layout"
|
|
153
|
+
>
|
|
154
|
+
Linear
|
|
155
|
+
</ToggleButton>
|
|
156
|
+
<ToggleButton
|
|
157
|
+
value="grid"
|
|
158
|
+
aria-label="Grid layout"
|
|
159
|
+
>
|
|
160
|
+
Grid
|
|
161
|
+
</ToggleButton>
|
|
162
|
+
</ToggleButtonGroup>
|
|
163
|
+
</Tooltip>
|
|
164
|
+
)}
|
|
165
|
+
{canAdd && (
|
|
166
|
+
<>
|
|
167
|
+
<Button
|
|
168
|
+
variant="outlined"
|
|
169
|
+
startIcon={<AddIcon />}
|
|
170
|
+
endIcon={<ExpandMoreIcon />}
|
|
171
|
+
aria-haspopup="menu"
|
|
172
|
+
aria-expanded={addAnchor !== null}
|
|
173
|
+
onClick={(event) =>
|
|
174
|
+
setAddAnchor(event.currentTarget)
|
|
175
|
+
}
|
|
176
|
+
sx={{
|
|
177
|
+
...controlSx(edge, hoverEdge),
|
|
178
|
+
"& .MuiButton-endIcon": {
|
|
179
|
+
ml: 0.25,
|
|
180
|
+
"& svg": { fontSize: 16 },
|
|
181
|
+
},
|
|
182
|
+
}}
|
|
183
|
+
>
|
|
184
|
+
Add
|
|
185
|
+
</Button>
|
|
186
|
+
<Menu
|
|
187
|
+
anchorEl={addAnchor}
|
|
188
|
+
open={addAnchor !== null}
|
|
189
|
+
onClose={() => setAddAnchor(null)}
|
|
190
|
+
// A pick opens a window or an editor that takes focus;
|
|
191
|
+
// the menu handing it back to Add as it closed took it
|
|
192
|
+
// away again (the add-tile search lost its caret).
|
|
193
|
+
disableRestoreFocus
|
|
194
|
+
anchorOrigin={{
|
|
195
|
+
vertical: "bottom",
|
|
196
|
+
horizontal: "right",
|
|
197
|
+
}}
|
|
198
|
+
transformOrigin={{
|
|
199
|
+
vertical: -6,
|
|
200
|
+
horizontal: "right",
|
|
201
|
+
}}
|
|
202
|
+
slotProps={{
|
|
203
|
+
paper: { sx: menuPaperSx(edge, theme.ui) },
|
|
204
|
+
}}
|
|
205
|
+
MenuListProps={{ sx: { p: 0.5 } }}
|
|
206
|
+
>
|
|
207
|
+
{add?.tile && (
|
|
208
|
+
<AddItem
|
|
209
|
+
icon={<InsertChartOutlinedIcon />}
|
|
210
|
+
title="Tile"
|
|
211
|
+
detail="A view from the model"
|
|
212
|
+
onClick={pick(add.tile)}
|
|
213
|
+
/>
|
|
214
|
+
)}
|
|
215
|
+
{add?.text && (
|
|
216
|
+
<AddItem
|
|
217
|
+
icon={<NotesIcon />}
|
|
218
|
+
title="Text"
|
|
219
|
+
detail="Prose between the tiles"
|
|
220
|
+
onClick={pick(add.text)}
|
|
221
|
+
/>
|
|
222
|
+
)}
|
|
223
|
+
{(add?.filter || add?.filterUnavailable) && (
|
|
224
|
+
<AddItem
|
|
225
|
+
icon={<FilterListIcon />}
|
|
226
|
+
title="Filter"
|
|
227
|
+
detail={
|
|
228
|
+
add.filterUnavailable ??
|
|
229
|
+
"A control the tiles read"
|
|
230
|
+
}
|
|
231
|
+
disabled={add.filter === undefined}
|
|
232
|
+
onClick={pick(add.filter)}
|
|
233
|
+
/>
|
|
234
|
+
)}
|
|
235
|
+
</Menu>
|
|
236
|
+
</>
|
|
237
|
+
)}
|
|
238
|
+
</>
|
|
239
|
+
)}
|
|
240
|
+
</>
|
|
241
|
+
)}
|
|
242
|
+
{(finish || separateSave) && controls && (
|
|
243
|
+
<Divider orientation="vertical" sx={dividerSx} />
|
|
244
|
+
)}
|
|
245
|
+
{finish && (
|
|
246
|
+
<Tooltip
|
|
247
|
+
// Only for a pointer that rests: the click that starts a save
|
|
248
|
+
// leaves the pointer here, and the tip popped up over Saving….
|
|
249
|
+
enterDelay={800}
|
|
250
|
+
enterNextDelay={800}
|
|
251
|
+
title={
|
|
252
|
+
controls?.done && unsaved
|
|
253
|
+
? `Saves your edits, then shows the report · ${controls.saveTarget}`
|
|
254
|
+
: ""
|
|
255
|
+
}
|
|
256
|
+
>
|
|
257
|
+
<span>
|
|
258
|
+
<Button
|
|
259
|
+
variant={separateSave ? "outlined" : "contained"}
|
|
260
|
+
disableElevation
|
|
261
|
+
disabled={controls?.status === "saving"}
|
|
262
|
+
onClick={finish}
|
|
263
|
+
// Wide enough for "Saving…", so the label changes in
|
|
264
|
+
// place: the bar is set against the header's right
|
|
265
|
+
// edge, and a wider button pushed every control left.
|
|
266
|
+
sx={{ ...controlSx(edge, hoverEdge, theme.ui), width: 92 }}
|
|
267
|
+
>
|
|
268
|
+
{controls?.done && controls.status === "saving"
|
|
269
|
+
? "Saving…"
|
|
270
|
+
: "Done"}
|
|
271
|
+
</Button>
|
|
272
|
+
</span>
|
|
273
|
+
</Tooltip>
|
|
274
|
+
)}
|
|
275
|
+
{controls?.save && separateSave && (
|
|
276
|
+
<Tooltip title={`Save (${MOD}S) · ${controls.saveTarget}`}>
|
|
277
|
+
<span>
|
|
278
|
+
<Button
|
|
279
|
+
variant="contained"
|
|
280
|
+
disableElevation
|
|
281
|
+
disabled={controls.status === "saving"}
|
|
282
|
+
onClick={controls.save}
|
|
283
|
+
sx={{
|
|
284
|
+
...controlSx(edge, hoverEdge, theme.ui),
|
|
285
|
+
minWidth: 72,
|
|
286
|
+
}}
|
|
287
|
+
>
|
|
288
|
+
{controls.status === "saving" ? "Saving…" : "Save"}
|
|
289
|
+
</Button>
|
|
290
|
+
</span>
|
|
291
|
+
</Tooltip>
|
|
292
|
+
)}
|
|
293
|
+
</Stack>
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Where the edits stand: saved, saving, kept in this browser, or (with no
|
|
299
|
+
* draft) unsaved. While there are edits to drop, it opens a menu offering
|
|
300
|
+
* Discard edits, which is one undoable edit back to the saved report.
|
|
301
|
+
*/
|
|
302
|
+
function SaveStatus({ controls }: { controls: BuilderControls }) {
|
|
303
|
+
const { theme } = usePublisherTheme();
|
|
304
|
+
const ui = theme.ui;
|
|
305
|
+
const [anchor, setAnchor] = useState<HTMLElement | null>(null);
|
|
306
|
+
const { status, draftKeptAt, discard } = controls;
|
|
307
|
+
const words =
|
|
308
|
+
status === "saved"
|
|
309
|
+
? "Saved"
|
|
310
|
+
: status === "saving"
|
|
311
|
+
? "Saving…"
|
|
312
|
+
: draftKeptAt !== undefined
|
|
313
|
+
? "Draft saved"
|
|
314
|
+
: "Unsaved changes";
|
|
315
|
+
const hint =
|
|
316
|
+
status === "unsaved" && draftKeptAt !== undefined
|
|
317
|
+
? "Your edits are kept in this browser. Done saves them to the report."
|
|
318
|
+
: controls.saveTarget;
|
|
319
|
+
// One element for every state, set the same way: the same type and
|
|
320
|
+
// padding, an icon slot of one size (a dot, or the check), and the
|
|
321
|
+
// chevron's room kept whether or not the menu is offered. Each state used
|
|
322
|
+
// to be drawn differently (a menu button for a draft, bare text otherwise),
|
|
323
|
+
// so Draft saved → Saving… → Saved changed font, padding and width at every
|
|
324
|
+
// step, and the controls beside it jumped. A minimum width, with the words
|
|
325
|
+
// set against the undo buttons, keeps them still.
|
|
326
|
+
const menu = discard !== undefined && status === "unsaved";
|
|
327
|
+
const sx = (mui: Theme) => ({
|
|
328
|
+
display: "inline-flex",
|
|
329
|
+
alignItems: "center",
|
|
330
|
+
justifyContent: "flex-end",
|
|
331
|
+
gap: 0.75,
|
|
332
|
+
minWidth: 132,
|
|
333
|
+
height: ui.size.control,
|
|
334
|
+
px: 1,
|
|
335
|
+
borderRadius: ui.radius.control,
|
|
336
|
+
font: "inherit",
|
|
337
|
+
...ui.type.control,
|
|
338
|
+
whiteSpace: "nowrap" as const,
|
|
339
|
+
color:
|
|
340
|
+
status === "saved"
|
|
341
|
+
? mui.palette.text.secondary
|
|
342
|
+
: mui.palette.text.primary,
|
|
343
|
+
transition: `color ${MOTION_FAST}, background-color ${MOTION_FAST}`,
|
|
344
|
+
...(menu ? { "&:hover": { bgcolor: mui.palette.action.hover } } : {}),
|
|
345
|
+
});
|
|
346
|
+
const inner = (
|
|
347
|
+
<>
|
|
348
|
+
<Box
|
|
349
|
+
component="span"
|
|
350
|
+
aria-hidden
|
|
351
|
+
sx={{
|
|
352
|
+
width: 16,
|
|
353
|
+
height: 16,
|
|
354
|
+
flex: "none",
|
|
355
|
+
display: "inline-flex",
|
|
356
|
+
alignItems: "center",
|
|
357
|
+
justifyContent: "center",
|
|
358
|
+
}}
|
|
359
|
+
>
|
|
360
|
+
{status === "saved" ? (
|
|
361
|
+
<CheckIcon sx={{ fontSize: 16 }} />
|
|
362
|
+
) : (
|
|
363
|
+
<Box
|
|
364
|
+
component="span"
|
|
365
|
+
sx={(mui) => ({
|
|
366
|
+
width: 7,
|
|
367
|
+
height: 7,
|
|
368
|
+
borderRadius: "50%",
|
|
369
|
+
bgcolor:
|
|
370
|
+
status === "saving" || draftKeptAt !== undefined
|
|
371
|
+
? mui.palette.text.disabled
|
|
372
|
+
: mui.palette.warning.main,
|
|
373
|
+
})}
|
|
374
|
+
/>
|
|
375
|
+
)}
|
|
376
|
+
</Box>
|
|
377
|
+
<Box component="span" aria-hidden>
|
|
378
|
+
{words}
|
|
379
|
+
</Box>
|
|
380
|
+
<ExpandMoreIcon
|
|
381
|
+
aria-hidden
|
|
382
|
+
sx={{
|
|
383
|
+
fontSize: 16,
|
|
384
|
+
ml: -0.25,
|
|
385
|
+
visibility: menu ? "visible" : "hidden",
|
|
386
|
+
}}
|
|
387
|
+
/>
|
|
388
|
+
</>
|
|
389
|
+
);
|
|
390
|
+
// The words a screen reader hears as they change, beside the control
|
|
391
|
+
// rather than in it, so a button around them is named by its words.
|
|
392
|
+
const announce = (
|
|
393
|
+
<Box
|
|
394
|
+
component="span"
|
|
395
|
+
role="status"
|
|
396
|
+
aria-live="polite"
|
|
397
|
+
sx={VISUALLY_HIDDEN}
|
|
398
|
+
>
|
|
399
|
+
{words}
|
|
400
|
+
</Box>
|
|
401
|
+
);
|
|
402
|
+
return (
|
|
403
|
+
<>
|
|
404
|
+
{announce}
|
|
405
|
+
<Tooltip title={hint} describeChild>
|
|
406
|
+
{menu ? (
|
|
407
|
+
<ButtonBase
|
|
408
|
+
className={reportClasses.saveStatus}
|
|
409
|
+
aria-label={words}
|
|
410
|
+
aria-haspopup="menu"
|
|
411
|
+
aria-expanded={anchor !== null}
|
|
412
|
+
onClick={(event) => setAnchor(event.currentTarget)}
|
|
413
|
+
sx={sx}
|
|
414
|
+
>
|
|
415
|
+
{inner}
|
|
416
|
+
</ButtonBase>
|
|
417
|
+
) : (
|
|
418
|
+
<Box
|
|
419
|
+
component="span"
|
|
420
|
+
className={reportClasses.saveStatus}
|
|
421
|
+
sx={sx}
|
|
422
|
+
>
|
|
423
|
+
{inner}
|
|
424
|
+
</Box>
|
|
425
|
+
)}
|
|
426
|
+
</Tooltip>
|
|
427
|
+
<Menu
|
|
428
|
+
className={reportClasses.menu}
|
|
429
|
+
anchorEl={anchor}
|
|
430
|
+
open={anchor !== null}
|
|
431
|
+
onClose={() => setAnchor(null)}
|
|
432
|
+
anchorOrigin={{ vertical: "bottom", horizontal: "left" }}
|
|
433
|
+
transformOrigin={{ vertical: -4, horizontal: "left" }}
|
|
434
|
+
slotProps={{
|
|
435
|
+
paper: {
|
|
436
|
+
sx: {
|
|
437
|
+
minWidth: 240,
|
|
438
|
+
borderRadius: ui.radius.menu,
|
|
439
|
+
border: `1px solid ${edgeColor(theme.cardBorder)}`,
|
|
440
|
+
boxShadow: ui.shadow.menu,
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
}}
|
|
444
|
+
MenuListProps={{ dense: true, sx: { py: 0.5 } }}
|
|
445
|
+
>
|
|
446
|
+
{draftKeptAt !== undefined && (
|
|
447
|
+
<Box
|
|
448
|
+
component="li"
|
|
449
|
+
role="presentation"
|
|
450
|
+
sx={{
|
|
451
|
+
px: 1.75,
|
|
452
|
+
pt: 0.75,
|
|
453
|
+
pb: 1,
|
|
454
|
+
...ui.type.caption,
|
|
455
|
+
color: "text.secondary",
|
|
456
|
+
}}
|
|
457
|
+
>
|
|
458
|
+
Kept in this browser at{" "}
|
|
459
|
+
{new Date(draftKeptAt).toLocaleTimeString([], {
|
|
460
|
+
hour: "numeric",
|
|
461
|
+
minute: "2-digit",
|
|
462
|
+
})}
|
|
463
|
+
</Box>
|
|
464
|
+
)}
|
|
465
|
+
<MenuItem
|
|
466
|
+
onClick={() => {
|
|
467
|
+
setAnchor(null);
|
|
468
|
+
discard();
|
|
469
|
+
}}
|
|
470
|
+
sx={{
|
|
471
|
+
mx: 0.5,
|
|
472
|
+
borderRadius: ui.radius.control,
|
|
473
|
+
gap: 1.25,
|
|
474
|
+
color: "error.main",
|
|
475
|
+
// The menu focuses its item on open; a full focus ring
|
|
476
|
+
// there read as two stray rules across the menu.
|
|
477
|
+
"&.Mui-focusVisible": {
|
|
478
|
+
outline: "none",
|
|
479
|
+
bgcolor: "action.hover",
|
|
480
|
+
},
|
|
481
|
+
}}
|
|
482
|
+
>
|
|
483
|
+
<RestartAltIcon fontSize="small" />
|
|
484
|
+
Discard edits
|
|
485
|
+
</MenuItem>
|
|
486
|
+
</Menu>
|
|
487
|
+
</>
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** In the accessibility tree, not on screen: the status line's announcement. */
|
|
492
|
+
const VISUALLY_HIDDEN = {
|
|
493
|
+
position: "absolute",
|
|
494
|
+
// Strings, not numbers: in `sx` a width or height of 1 is 100%, and a
|
|
495
|
+
// margin of -1 is one spacing unit. As numbers, this "hidden" span was as
|
|
496
|
+
// wide as the host's header and scrolled its panel sideways.
|
|
497
|
+
width: "1px",
|
|
498
|
+
height: "1px",
|
|
499
|
+
margin: "-1px",
|
|
500
|
+
padding: 0,
|
|
501
|
+
overflow: "hidden",
|
|
502
|
+
clip: "rect(0 0 0 0)",
|
|
503
|
+
whiteSpace: "nowrap",
|
|
504
|
+
border: 0,
|
|
505
|
+
} as const;
|
|
506
|
+
|
|
507
|
+
/** The builder's menus: a card set like its windows, rounded and bordered. */
|
|
508
|
+
const menuPaperSx = (edge: string, ui: ReportUi) => ({
|
|
509
|
+
minWidth: 260,
|
|
510
|
+
mt: 0.5,
|
|
511
|
+
borderRadius: ui.radius.menu,
|
|
512
|
+
border: `1px solid ${edge}`,
|
|
513
|
+
boxShadow: ui.shadow.menu,
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
/**
|
|
517
|
+
* One thing the Add menu adds: its picture in a tile, its name, and a line
|
|
518
|
+
* saying what it is (or, when it cannot be added, why not).
|
|
519
|
+
*/
|
|
520
|
+
function AddItem({
|
|
521
|
+
icon,
|
|
522
|
+
title,
|
|
523
|
+
detail,
|
|
524
|
+
disabled = false,
|
|
525
|
+
onClick,
|
|
526
|
+
}: {
|
|
527
|
+
icon: ReactNode;
|
|
528
|
+
title: string;
|
|
529
|
+
detail: string;
|
|
530
|
+
disabled?: boolean;
|
|
531
|
+
onClick: () => void;
|
|
532
|
+
}) {
|
|
533
|
+
const { theme } = usePublisherTheme();
|
|
534
|
+
const ui = theme.ui;
|
|
535
|
+
return (
|
|
536
|
+
<MenuItem
|
|
537
|
+
onClick={onClick}
|
|
538
|
+
disabled={disabled}
|
|
539
|
+
sx={(mui) => ({
|
|
540
|
+
gap: 1.5,
|
|
541
|
+
px: 1.25,
|
|
542
|
+
py: 1,
|
|
543
|
+
borderRadius: ui.radius.control,
|
|
544
|
+
alignItems: "center",
|
|
545
|
+
"& .add-icon": {
|
|
546
|
+
width: 32,
|
|
547
|
+
height: 32,
|
|
548
|
+
flex: "none",
|
|
549
|
+
borderRadius: ui.radius.tile,
|
|
550
|
+
display: "flex",
|
|
551
|
+
alignItems: "center",
|
|
552
|
+
justifyContent: "center",
|
|
553
|
+
color: mui.palette.text.secondary,
|
|
554
|
+
bgcolor: mui.palette.action.hover,
|
|
555
|
+
transition: `color ${MOTION_FAST}, background-color ${MOTION_FAST}`,
|
|
556
|
+
"& svg": { fontSize: 18 },
|
|
557
|
+
},
|
|
558
|
+
"&:hover .add-icon, &.Mui-focusVisible .add-icon": {
|
|
559
|
+
color: theme.accent,
|
|
560
|
+
bgcolor: `color-mix(in srgb, ${theme.accent} 10%, ${mui.palette.background.paper})`,
|
|
561
|
+
},
|
|
562
|
+
// The menu focuses its first item on open; a full ring there read
|
|
563
|
+
// as a box drawn round a box.
|
|
564
|
+
"&.Mui-focusVisible": {
|
|
565
|
+
outline: "none",
|
|
566
|
+
bgcolor: mui.palette.action.hover,
|
|
567
|
+
},
|
|
568
|
+
"&.Mui-disabled": { opacity: 1 },
|
|
569
|
+
"&.Mui-disabled .add-text": { opacity: 0.5 },
|
|
570
|
+
"&.Mui-disabled .add-icon": { opacity: 0.5 },
|
|
571
|
+
})}
|
|
572
|
+
>
|
|
573
|
+
<Box className="add-icon" aria-hidden>
|
|
574
|
+
{icon}
|
|
575
|
+
</Box>
|
|
576
|
+
<Box className="add-text" sx={{ minWidth: 0 }}>
|
|
577
|
+
<Box
|
|
578
|
+
sx={{
|
|
579
|
+
...ui.type.control,
|
|
580
|
+
fontWeight: ui.type.label.fontWeight,
|
|
581
|
+
lineHeight: 1.3,
|
|
582
|
+
}}
|
|
583
|
+
>
|
|
584
|
+
{title}
|
|
585
|
+
</Box>
|
|
586
|
+
<Box
|
|
587
|
+
sx={{
|
|
588
|
+
...ui.type.caption,
|
|
589
|
+
color: "text.secondary",
|
|
590
|
+
whiteSpace: "normal",
|
|
591
|
+
maxWidth: 220,
|
|
592
|
+
}}
|
|
593
|
+
>
|
|
594
|
+
{detail}
|
|
595
|
+
</Box>
|
|
596
|
+
</Box>
|
|
597
|
+
</MenuItem>
|
|
598
|
+
);
|
|
599
|
+
}
|