@malloy-publisher/sdk 0.3.0 → 0.4.0

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.
Files changed (244) hide show
  1. package/README.md +22 -9
  2. package/dist/DocumentStorageProvider-CyOJ0hqf.es.js +24443 -0
  3. package/dist/DocumentStorageProvider-DGPQEd_l.cjs.js +134 -0
  4. package/dist/RenderedResult-BnPzJ9Jf.es.js +549 -0
  5. package/dist/RenderedResult-Dp22kZsQ.cjs.js +115 -0
  6. package/dist/{ServerProvider-DSK9rfSY.es.js → ServerProvider-BWOEKg0O.es.js} +1256 -1318
  7. package/dist/ServerProvider-Cc489A3f.cjs.js +1 -0
  8. package/dist/builder/index.cjs.js +105 -0
  9. package/dist/builder/index.d.ts +2 -0
  10. package/dist/builder/index.es.js +9482 -0
  11. package/dist/builder-entry.d.ts +8 -0
  12. package/dist/client/api.d.ts +100 -42
  13. package/dist/client/index.cjs.js +1 -1
  14. package/dist/client/index.es.js +1 -1
  15. package/dist/components/AppDialog.d.ts +30 -0
  16. package/dist/components/BackLink.d.ts +32 -0
  17. package/dist/components/Dashboard/Dashboard.d.ts +19 -14
  18. package/dist/components/Dashboard/DashboardBar.d.ts +21 -0
  19. package/dist/components/Dashboard/DashboardGrid.d.ts +67 -0
  20. package/dist/components/Dashboard/DashboardTile.d.ts +6 -1
  21. package/dist/components/Dashboard/ExploreDialog.d.ts +18 -0
  22. package/dist/components/Dashboard/RowsDialog.d.ts +47 -0
  23. package/dist/components/Dashboard/TileCard.d.ts +44 -0
  24. package/dist/components/Dashboard/index.d.ts +2 -0
  25. package/dist/components/Dashboard/promoteMeasureRow.d.ts +7 -3
  26. package/dist/components/Dashboard/telemetry.d.ts +48 -0
  27. package/dist/components/DashboardBuilder/AddTileDialog.d.ts +35 -0
  28. package/dist/components/DashboardBuilder/BuilderToolbar.d.ts +31 -0
  29. package/dist/components/DashboardBuilder/DashboardBuilder.d.ts +118 -0
  30. package/dist/components/DashboardBuilder/DashboardEditor.d.ts +30 -0
  31. package/dist/components/DashboardBuilder/DiffDialog.d.ts +15 -0
  32. package/dist/components/DashboardBuilder/DrillDialog.d.ts +15 -0
  33. package/dist/components/DashboardBuilder/FilterDialog.d.ts +54 -0
  34. package/dist/components/DashboardBuilder/FilterStrip.d.ts +17 -0
  35. package/dist/components/DashboardBuilder/SettingsPopover.d.ts +20 -0
  36. package/dist/components/DashboardBuilder/TileFrame.d.ts +42 -0
  37. package/dist/components/DashboardBuilder/TileMenu.d.ts +24 -0
  38. package/dist/components/DashboardBuilder/catalog.d.ts +62 -0
  39. package/dist/components/DashboardBuilder/controls.d.ts +157 -0
  40. package/dist/components/DashboardBuilder/diff.d.ts +35 -0
  41. package/dist/components/DashboardBuilder/document.d.ts +218 -0
  42. package/dist/components/DashboardBuilder/layout.d.ts +71 -0
  43. package/dist/components/DashboardBuilder/malloyText.d.ts +45 -0
  44. package/dist/components/DashboardBuilder/newDashboard.d.ts +17 -0
  45. package/dist/components/DashboardBuilder/preview.d.ts +60 -0
  46. package/dist/components/DashboardBuilder/readDocument.d.ts +106 -0
  47. package/dist/components/DashboardBuilder/sortable.d.ts +51 -0
  48. package/dist/components/DashboardBuilder/spliceDocument.d.ts +53 -0
  49. package/dist/components/DashboardBuilder/testing/fixtures.d.ts +10 -0
  50. package/dist/components/DashboardBuilder/useBuilderShortcuts.d.ts +22 -0
  51. package/dist/components/DashboardBuilder/useDashboardEditor.d.ts +63 -0
  52. package/dist/components/DashboardBuilder/useDraft.d.ts +13 -0
  53. package/dist/components/DashboardBuilder/useFilterForm.d.ts +65 -0
  54. package/dist/components/DashboardBuilder/useTileReorder.d.ts +22 -0
  55. package/dist/components/DashboardBuilder/useTileResize.d.ts +29 -0
  56. package/dist/components/DocumentStorage/DocumentStorageProvider.d.ts +7 -0
  57. package/dist/components/DocumentStorage/index.d.ts +1 -1
  58. package/dist/components/FloatingIconButton.d.ts +16 -0
  59. package/dist/components/ItemRow.d.ts +38 -0
  60. package/dist/components/Materializations/MaterializationDetailDialog.d.ts +1 -2
  61. package/dist/components/Materializations/MaterializationRunsList.d.ts +1 -5
  62. package/dist/components/Materializations/Materializations.d.ts +7 -3
  63. package/dist/components/Materializations/ScopeButton.d.ts +18 -0
  64. package/dist/components/Materializations/SectionLabel.d.ts +7 -4
  65. package/dist/components/Materializations/TriggerLabel.d.ts +14 -0
  66. package/dist/components/Materializations/index.d.ts +0 -1
  67. package/dist/components/Package/ContentTypeIcon.d.ts +3 -5
  68. package/dist/components/Package/NewDashboardDialog.d.ts +18 -0
  69. package/dist/components/Package/index.d.ts +0 -1
  70. package/dist/components/PackageSection.d.ts +23 -0
  71. package/dist/components/Prose.d.ts +46 -0
  72. package/dist/components/RenderedResult/ResultPanel.d.ts +30 -0
  73. package/dist/components/RenderedResult/index.d.ts +1 -0
  74. package/dist/components/buttons.d.ts +53 -0
  75. package/dist/components/drill/index.d.ts +1 -1
  76. package/dist/components/drill/resolveDrill.d.ts +22 -0
  77. package/dist/components/drill/useDrill.d.ts +11 -2
  78. package/dist/components/index.d.ts +6 -0
  79. package/dist/components/styles.d.ts +49 -44
  80. package/dist/hooks/index.d.ts +2 -0
  81. package/dist/hooks/useCrudMutation.d.ts +42 -0
  82. package/dist/hooks/useDocumentControls.d.ts +70 -0
  83. package/dist/hooks/useQueryResult.d.ts +40 -0
  84. package/dist/index.cjs.js +22 -273
  85. package/dist/index.d.ts +1 -0
  86. package/dist/index.es.js +16888 -44451
  87. package/dist/telemetry/consoleEvents.d.ts +60 -0
  88. package/dist/utils/malloyLiteral.d.ts +11 -0
  89. package/dist/utils/sha256.d.ts +2 -0
  90. package/package.json +24 -9
  91. package/src/builder-entry.ts +55 -0
  92. package/src/components/AppDialog.tsx +115 -0
  93. package/src/components/BackLink.tsx +83 -0
  94. package/src/components/Connections/AddConnectionDialog.tsx +50 -70
  95. package/src/components/Connections/DeleteConnectionDialog.tsx +23 -50
  96. package/src/components/Connections/EditConnectionDialog.tsx +54 -73
  97. package/src/components/Dashboard/Dashboard.spec.tsx +7 -10
  98. package/src/components/Dashboard/Dashboard.tsx +165 -175
  99. package/src/components/Dashboard/DashboardBar.tsx +88 -0
  100. package/src/components/Dashboard/DashboardGrid.tsx +124 -0
  101. package/src/components/Dashboard/DashboardTile.spec.tsx +30 -6
  102. package/src/components/Dashboard/DashboardTile.tsx +66 -123
  103. package/src/components/Dashboard/ExploreDialog.tsx +84 -0
  104. package/src/components/Dashboard/RowsDialog.spec.ts +42 -0
  105. package/src/components/Dashboard/RowsDialog.tsx +234 -0
  106. package/src/components/Dashboard/TileCard.tsx +120 -0
  107. package/src/components/Dashboard/index.ts +2 -0
  108. package/src/components/Dashboard/promoteMeasureRow.spec.ts +70 -0
  109. package/src/components/Dashboard/promoteMeasureRow.ts +33 -2
  110. package/src/components/Dashboard/telemetry.ts +51 -0
  111. package/src/components/Dashboard/tileGridColumn.spec.ts +1 -1
  112. package/src/components/DashboardBuilder/AddTileDialog.tsx +247 -0
  113. package/src/components/DashboardBuilder/BuilderToolbar.tsx +162 -0
  114. package/src/components/DashboardBuilder/DashboardBuilder.spec.tsx +852 -0
  115. package/src/components/DashboardBuilder/DashboardBuilder.tsx +666 -0
  116. package/src/components/DashboardBuilder/DashboardEditor.package.spec.tsx +163 -0
  117. package/src/components/DashboardBuilder/DashboardEditor.spec.tsx +188 -0
  118. package/src/components/DashboardBuilder/DashboardEditor.tsx +567 -0
  119. package/src/components/DashboardBuilder/DiffDialog.tsx +122 -0
  120. package/src/components/DashboardBuilder/DrillDialog.tsx +269 -0
  121. package/src/components/DashboardBuilder/FilterDialog.tsx +562 -0
  122. package/src/components/DashboardBuilder/FilterStrip.tsx +126 -0
  123. package/src/components/DashboardBuilder/SettingsPopover.tsx +168 -0
  124. package/src/components/DashboardBuilder/TileFrame.tsx +380 -0
  125. package/src/components/DashboardBuilder/TileMenu.tsx +188 -0
  126. package/src/components/DashboardBuilder/catalog.spec.ts +215 -0
  127. package/src/components/DashboardBuilder/catalog.ts +225 -0
  128. package/src/components/DashboardBuilder/controls.spec.ts +243 -0
  129. package/src/components/DashboardBuilder/controls.ts +398 -0
  130. package/src/components/DashboardBuilder/diff.spec.ts +44 -0
  131. package/src/components/DashboardBuilder/diff.ts +93 -0
  132. package/src/components/DashboardBuilder/document.ts +209 -0
  133. package/src/components/DashboardBuilder/keepRowStructure.spec.ts +84 -0
  134. package/src/components/DashboardBuilder/layout.ts +143 -0
  135. package/src/components/DashboardBuilder/malloyText.spec.ts +84 -0
  136. package/src/components/DashboardBuilder/malloyText.ts +151 -0
  137. package/src/components/DashboardBuilder/moveIntoGap.spec.ts +90 -0
  138. package/src/components/DashboardBuilder/newDashboard.spec.ts +40 -0
  139. package/src/components/DashboardBuilder/newDashboard.ts +48 -0
  140. package/src/components/DashboardBuilder/preview.spec.ts +149 -0
  141. package/src/components/DashboardBuilder/preview.ts +172 -0
  142. package/src/components/DashboardBuilder/readDocument.spec.ts +375 -0
  143. package/src/components/DashboardBuilder/readDocument.ts +467 -0
  144. package/src/components/DashboardBuilder/sortable.tsx +151 -0
  145. package/src/components/DashboardBuilder/spliceDocument.spec.ts +1161 -0
  146. package/src/components/DashboardBuilder/spliceDocument.ts +1135 -0
  147. package/src/components/DashboardBuilder/testing/fixtures.ts +48 -0
  148. package/src/components/DashboardBuilder/useBuilderShortcuts.ts +88 -0
  149. package/src/components/DashboardBuilder/useDashboardEditor.spec.ts +311 -0
  150. package/src/components/DashboardBuilder/useDashboardEditor.ts +201 -0
  151. package/src/components/DashboardBuilder/useDraft.ts +43 -0
  152. package/src/components/DashboardBuilder/useFilterForm.spec.tsx +144 -0
  153. package/src/components/DashboardBuilder/useFilterForm.ts +352 -0
  154. package/src/components/DashboardBuilder/useTileReorder.spec.tsx +97 -0
  155. package/src/components/DashboardBuilder/useTileReorder.ts +115 -0
  156. package/src/components/DashboardBuilder/useTileResize.spec.tsx +121 -0
  157. package/src/components/DashboardBuilder/useTileResize.ts +110 -0
  158. package/src/components/DashboardBuilder/withGaps.spec.ts +96 -0
  159. package/src/components/DocumentStorage/DocumentStorageProvider.tsx +12 -0
  160. package/src/components/DocumentStorage/index.ts +1 -0
  161. package/src/components/Environment/About.tsx +16 -62
  162. package/src/components/Environment/AddPackageDialog.tsx +85 -154
  163. package/src/components/Environment/Connections.tsx +125 -205
  164. package/src/components/Environment/DeletePackageDialog.tsx +32 -77
  165. package/src/components/Environment/EditPackageDialog.tsx +46 -58
  166. package/src/components/Environment/Environment.tsx +34 -36
  167. package/src/components/Environment/Packages.tsx +63 -128
  168. package/src/components/FloatingIconButton.tsx +41 -0
  169. package/src/components/Home/AddEnvironmentDialog.tsx +47 -70
  170. package/src/components/Home/DeleteEnvironmentDialog.tsx +32 -77
  171. package/src/components/Home/EditEnvironmentDialog.tsx +47 -61
  172. package/src/components/Home/Home.tsx +101 -214
  173. package/src/components/ItemRow.tsx +165 -0
  174. package/src/components/Materializations/CreateMaterializationDialog.tsx +34 -51
  175. package/src/components/Materializations/DeleteMaterializationDialog.tsx +31 -53
  176. package/src/components/Materializations/MaterializationDetailDialog.tsx +60 -69
  177. package/src/components/Materializations/MaterializationRunsList.tsx +29 -42
  178. package/src/components/Materializations/Materializations.tsx +137 -140
  179. package/src/components/Materializations/ScopeButton.tsx +85 -0
  180. package/src/components/Materializations/SectionLabel.tsx +7 -4
  181. package/src/components/Materializations/SetScheduleDialog.tsx +48 -89
  182. package/src/components/Materializations/TriggerLabel.tsx +36 -0
  183. package/src/components/Materializations/cron.spec.ts +113 -0
  184. package/src/components/Materializations/index.ts +0 -1
  185. package/src/components/Materializations/utils.spec.ts +182 -0
  186. package/src/components/Model/Model.tsx +6 -23
  187. package/src/components/Model/ModelCell.tsx +33 -72
  188. package/src/components/Notebook/Notebook.tsx +25 -88
  189. package/src/components/Notebook/NotebookCell.tsx +35 -183
  190. package/src/components/Package/ContentTypeIcon.spec.ts +22 -37
  191. package/src/components/Package/ContentTypeIcon.tsx +10 -12
  192. package/src/components/Package/NewDashboardDialog.spec.tsx +129 -0
  193. package/src/components/Package/NewDashboardDialog.tsx +265 -0
  194. package/src/components/Package/Package.tsx +179 -238
  195. package/src/components/Package/index.ts +0 -1
  196. package/src/components/PackageSection.tsx +85 -0
  197. package/src/components/Prose.spec.tsx +85 -0
  198. package/src/components/Prose.tsx +179 -0
  199. package/src/components/QueryResult/QueryResult.tsx +15 -43
  200. package/src/components/RenderedResult/RenderedResult.lifecycle.spec.tsx +198 -0
  201. package/src/components/RenderedResult/RenderedResult.tsx +22 -8
  202. package/src/components/RenderedResult/ResultContainer.tsx +4 -12
  203. package/src/components/RenderedResult/ResultPanel.spec.tsx +49 -0
  204. package/src/components/RenderedResult/ResultPanel.tsx +73 -0
  205. package/src/components/RenderedResult/index.ts +1 -0
  206. package/src/components/ResultsDialog.tsx +8 -32
  207. package/src/components/buttons.tsx +114 -0
  208. package/src/components/designSystem.spec.tsx +316 -0
  209. package/src/components/drill/index.ts +1 -0
  210. package/src/components/drill/resolveDrill.ts +22 -1
  211. package/src/components/drill/useDrill.spec.tsx +94 -0
  212. package/src/components/drill/useDrill.tsx +52 -12
  213. package/src/components/given/GivensPanel.tsx +1 -1
  214. package/src/components/given/paramCodec.spec.ts +1 -1
  215. package/src/components/index.ts +16 -0
  216. package/src/components/styles.ts +49 -122
  217. package/src/hooks/index.ts +13 -0
  218. package/src/hooks/useCrudMutation.spec.tsx +119 -0
  219. package/src/hooks/useCrudMutation.tsx +85 -0
  220. package/src/hooks/useDocumentControls.ts +170 -0
  221. package/src/hooks/useQueryResult.ts +82 -0
  222. package/src/index.ts +9 -0
  223. package/src/telemetry/consoleEvents.spec.ts +130 -0
  224. package/src/telemetry/consoleEvents.ts +124 -0
  225. package/src/theme/defaults.ts +34 -23
  226. package/src/theme/resolveTheme.spec.ts +9 -4
  227. package/src/theme/resolveTheme.ts +12 -8
  228. package/src/utils/malloyLiteral.spec.ts +43 -0
  229. package/src/utils/malloyLiteral.ts +76 -0
  230. package/src/utils/sha256.ts +13 -0
  231. package/test/README.md +1 -1
  232. package/test/serverProvider.tsx +5 -2
  233. package/vite.config.ts +5 -0
  234. package/dist/ServerProvider-CGnLjzag.cjs.js +0 -1
  235. package/dist/components/Materializations/CreateEnvMaterializationDialog.d.ts +0 -14
  236. package/dist/components/Materializations/EnvironmentMaterializations.d.ts +0 -7
  237. package/dist/components/Materializations/ScheduleCard.d.ts +0 -20
  238. package/dist/components/Materializations/TriggerChip.d.ts +0 -10
  239. package/dist/components/Package/Models.d.ts +0 -6
  240. package/src/components/Materializations/CreateEnvMaterializationDialog.tsx +0 -179
  241. package/src/components/Materializations/EnvironmentMaterializations.tsx +0 -267
  242. package/src/components/Materializations/ScheduleCard.tsx +0 -231
  243. package/src/components/Materializations/TriggerChip.tsx +0 -44
  244. package/src/components/Package/Models.tsx +0 -71
@@ -1,20 +1,16 @@
1
1
  // Copyright (c) Credible Data Inc.
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
- import AddIcon from "@mui/icons-material/Add";
5
4
  import {
6
5
  Button,
7
- Dialog,
8
- DialogActions,
9
- DialogContent,
10
- DialogContentText,
11
- DialogTitle,
12
6
  FormControlLabel,
13
7
  FormGroup,
14
8
  Switch,
15
9
  Tooltip,
16
10
  } from "@mui/material";
17
11
  import { useState } from "react";
12
+ import { AppDialog } from "../AppDialog";
13
+ import { AddButton } from "../buttons";
18
14
 
19
15
  type CreateMaterializationDialogProps = {
20
16
  onSubmit: (opts: { forceRefresh: boolean }) => Promise<unknown>;
@@ -46,15 +42,11 @@ export default function CreateMaterializationDialog({
46
42
 
47
43
  const button = (
48
44
  <span>
49
- <Button
50
- variant="contained"
51
- startIcon={<AddIcon />}
45
+ <AddButton
46
+ label="Materialization"
52
47
  onClick={() => setOpen(true)}
53
48
  disabled={disabled}
54
- aria-label="New materialization"
55
- >
56
- New materialization
57
- </Button>
49
+ />
58
50
  </span>
59
51
  );
60
52
 
@@ -66,47 +58,38 @@ export default function CreateMaterializationDialog({
66
58
  button
67
59
  )}
68
60
 
69
- <Dialog
61
+ <AppDialog
70
62
  open={open}
71
63
  onClose={handleClose}
72
- maxWidth="xs"
73
- fullWidth
74
- aria-labelledby="create-materialization-title"
64
+ title="New materialization"
65
+ description="Compile the package, build a table for every persist source, and load them so queries serve from the tables."
66
+ actions={
67
+ <>
68
+ <Button onClick={handleClose}>Cancel</Button>
69
+ <Button
70
+ variant="contained"
71
+ loading={isSubmitting}
72
+ onClick={handleRun}
73
+ >
74
+ Materialize
75
+ </Button>
76
+ </>
77
+ }
75
78
  >
76
- <DialogTitle id="create-materialization-title">
77
- New materialization
78
- </DialogTitle>
79
- <DialogContent>
80
- <DialogContentText sx={{ mb: 2 }}>
81
- Materialize every persist source in this package: compile,
82
- build the tables, and load them so queries serve from the
83
- materialized tables.
84
- </DialogContentText>
85
- <FormGroup>
86
- <FormControlLabel
87
- control={
88
- <Switch
89
- checked={forceRefresh}
90
- onChange={(event) =>
91
- setForceRefresh(event.target.checked)
92
- }
93
- />
94
- }
95
- label="Force refresh (rebuild even if unchanged)"
96
- />
97
- </FormGroup>
98
- </DialogContent>
99
- <DialogActions>
100
- <Button onClick={handleClose}>Cancel</Button>
101
- <Button
102
- variant="contained"
103
- loading={isSubmitting}
104
- onClick={handleRun}
105
- >
106
- Materialize
107
- </Button>
108
- </DialogActions>
109
- </Dialog>
79
+ <FormGroup>
80
+ <FormControlLabel
81
+ control={
82
+ <Switch
83
+ checked={forceRefresh}
84
+ onChange={(event) =>
85
+ setForceRefresh(event.target.checked)
86
+ }
87
+ />
88
+ }
89
+ label="Force refresh (rebuild even if unchanged)"
90
+ />
91
+ </FormGroup>
92
+ </AppDialog>
110
93
  </>
111
94
  );
112
95
  }
@@ -2,21 +2,16 @@
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
4
  import { Delete } from "@mui/icons-material";
5
- import CloseIcon from "@mui/icons-material/Close";
6
5
  import Button from "@mui/material/Button";
7
6
  import Checkbox from "@mui/material/Checkbox";
8
- import Dialog from "@mui/material/Dialog";
9
- import DialogActions from "@mui/material/DialogActions";
10
- import DialogContent from "@mui/material/DialogContent";
11
- import DialogTitle from "@mui/material/DialogTitle";
12
7
  import FormControlLabel from "@mui/material/FormControlLabel";
13
- import IconButton from "@mui/material/IconButton";
14
8
  import ListItemIcon from "@mui/material/ListItemIcon";
15
9
  import ListItemText from "@mui/material/ListItemText";
16
10
  import MenuItem from "@mui/material/MenuItem";
17
11
  import Typography from "@mui/material/Typography";
18
12
  import React, { useState } from "react";
19
13
  import { Materialization } from "../../client";
14
+ import { AppDialog } from "../AppDialog";
20
15
 
21
16
  export default function DeleteMaterializationDialog({
22
17
  materialization,
@@ -55,55 +50,38 @@ export default function DeleteMaterializationDialog({
55
50
  <ListItemText>Delete</ListItemText>
56
51
  </MenuItem>
57
52
 
58
- <Dialog
59
- onClose={handleClose}
53
+ <AppDialog
60
54
  open={open}
61
- aria-labelledby="delete-materialization-title"
55
+ onClose={handleClose}
56
+ title="Delete materialization"
57
+ actions={
58
+ <>
59
+ <Button onClick={handleClose}>Cancel</Button>
60
+ <Button
61
+ variant="contained"
62
+ color="error"
63
+ autoFocus
64
+ onClick={() => onDelete(dropTables)}
65
+ loading={isMutating}
66
+ >
67
+ Delete run
68
+ </Button>
69
+ </>
70
+ }
62
71
  >
63
- <DialogTitle sx={{ m: 0, p: 2 }} id="delete-materialization-title">
64
- Delete Materialization
65
- </DialogTitle>
66
- <IconButton
67
- aria-label="close"
68
- onClick={handleClose}
69
- sx={(theme) => ({
70
- position: "absolute",
71
- right: 8,
72
- top: 8,
73
- color: theme.palette.grey[500],
74
- })}
75
- >
76
- <CloseIcon />
77
- </IconButton>
78
- <DialogContent dividers>
79
- <Typography gutterBottom>
80
- Are you sure you want to delete this materialization record?
81
- This action cannot be undone.
82
- </Typography>
83
- <FormControlLabel
84
- control={
85
- <Checkbox
86
- checked={dropTables}
87
- onChange={(event) =>
88
- setDropTables(event.target.checked)
89
- }
90
- />
91
- }
92
- label="Also drop the materialized table(s) this run produced"
93
- />
94
- </DialogContent>
95
- <DialogActions>
96
- <Button
97
- loading={isMutating}
98
- variant="contained"
99
- autoFocus
100
- onClick={() => onDelete(dropTables)}
101
- color="error"
102
- >
103
- Delete
104
- </Button>
105
- </DialogActions>
106
- </Dialog>
72
+ <Typography variant="body2">
73
+ Delete this run&apos;s record? This cannot be undone.
74
+ </Typography>
75
+ <FormControlLabel
76
+ control={
77
+ <Checkbox
78
+ checked={dropTables}
79
+ onChange={(event) => setDropTables(event.target.checked)}
80
+ />
81
+ }
82
+ label="Also drop the materialized tables this run produced"
83
+ />
84
+ </AppDialog>
107
85
  </React.Fragment>
108
86
  );
109
87
  }
@@ -21,7 +21,7 @@ import { BuildPlan, Materialization } from "../../client";
21
21
  import { MONO_FONT_FAMILY } from "../styles";
22
22
  import ManifestView from "./ManifestView";
23
23
  import SectionLabel from "./SectionLabel";
24
- import TriggerChip from "./TriggerChip";
24
+ import TriggerLabel from "./TriggerLabel";
25
25
  import {
26
26
  formatDuration,
27
27
  formatTimestamp,
@@ -34,23 +34,16 @@ import {
34
34
  type MaterializationDetailDialogProps = {
35
35
  materialization: Materialization | null;
36
36
  // The compiled package's current build plan (Package.buildPlan), shown for
37
- // context. It is a property of the package version, not the historical run.
38
- // Note it is null both in the environment-scoped view and for a package with
39
- // no persist sources, so it cannot itself gate the section — see
40
- // `showBuildPlan`.
37
+ // context. It is a property of the package version, not the historical run,
38
+ // and it is null for a package with no persist sources — which is why the
39
+ // section renders an empty state rather than disappearing.
41
40
  buildPlan: BuildPlan | null;
42
- // Whether to render the Build plan section. The package view shows it (with a
43
- // "no persist sources" empty state when the plan is empty); the
44
- // environment-scoped view, which spans packages and has no single plan, omits
45
- // it entirely.
46
- showBuildPlan?: boolean;
47
41
  onClose: () => void;
48
42
  };
49
43
 
50
44
  export default function MaterializationDetailDialog({
51
45
  materialization,
52
46
  buildPlan,
53
- showBuildPlan = true,
54
47
  onClose,
55
48
  }: MaterializationDetailDialogProps) {
56
49
  const meta = materialization ? parseMetadata(materialization) : {};
@@ -86,7 +79,7 @@ export default function MaterializationDetailDialog({
86
79
  : "outlined"
87
80
  }
88
81
  />
89
- <TriggerChip meta={meta} />
82
+ <TriggerLabel meta={meta} />
90
83
  </Stack>
91
84
  <Typography variant="subtitle1" sx={{ fontWeight: 600 }}>
92
85
  {materialization.packageName ?? "Materialization"}
@@ -177,64 +170,62 @@ export default function MaterializationDetailDialog({
177
170
  </Box>
178
171
  )}
179
172
 
180
- {showBuildPlan && (
181
- <Box sx={{ mb: 3 }}>
182
- <SectionLabel>Build plan</SectionLabel>
183
- {planSources.length === 0 ? (
184
- <Typography
185
- variant="body2"
186
- color="text.secondary"
187
- sx={{ fontStyle: "italic" }}
188
- >
189
- This package has no persist sources.
190
- </Typography>
191
- ) : (
192
- <Table size="small">
193
- <TableHead>
194
- <TableRow>
195
- <TableCell>Source</TableCell>
196
- <TableCell>Connection</TableCell>
197
- <TableCell>Dialect</TableCell>
198
- <TableCell align="right">Columns</TableCell>
199
- <TableCell>Source Entity ID</TableCell>
173
+ <Box sx={{ mb: 3 }}>
174
+ <SectionLabel>Build plan</SectionLabel>
175
+ {planSources.length === 0 ? (
176
+ <Typography
177
+ variant="body2"
178
+ color="text.secondary"
179
+ sx={{ fontStyle: "italic" }}
180
+ >
181
+ This package has no persist sources.
182
+ </Typography>
183
+ ) : (
184
+ <Table size="small">
185
+ <TableHead>
186
+ <TableRow>
187
+ <TableCell>Source</TableCell>
188
+ <TableCell>Connection</TableCell>
189
+ <TableCell>Dialect</TableCell>
190
+ <TableCell align="right">Columns</TableCell>
191
+ <TableCell>Source Entity ID</TableCell>
192
+ </TableRow>
193
+ </TableHead>
194
+ <TableBody>
195
+ {planSources.map((source) => (
196
+ <TableRow key={source.sourceID}>
197
+ <TableCell
198
+ sx={{ fontFamily: MONO_FONT_FAMILY }}
199
+ >
200
+ {source.name}
201
+ </TableCell>
202
+ <TableCell
203
+ sx={{ fontFamily: MONO_FONT_FAMILY }}
204
+ >
205
+ {source.connectionName}
206
+ </TableCell>
207
+ <TableCell>
208
+ {source.dialect ?? "-"}
209
+ </TableCell>
210
+ <TableCell align="right">
211
+ {source.columns?.length ?? 0}
212
+ </TableCell>
213
+ <TableCell
214
+ sx={{
215
+ fontFamily: MONO_FONT_FAMILY,
216
+ fontSize: "0.75rem",
217
+ wordBreak: "break-all",
218
+ maxWidth: 220,
219
+ }}
220
+ >
221
+ {source.sourceEntityId}
222
+ </TableCell>
200
223
  </TableRow>
201
- </TableHead>
202
- <TableBody>
203
- {planSources.map((source) => (
204
- <TableRow key={source.sourceID}>
205
- <TableCell
206
- sx={{ fontFamily: MONO_FONT_FAMILY }}
207
- >
208
- {source.name}
209
- </TableCell>
210
- <TableCell
211
- sx={{ fontFamily: MONO_FONT_FAMILY }}
212
- >
213
- {source.connectionName}
214
- </TableCell>
215
- <TableCell>
216
- {source.dialect ?? "-"}
217
- </TableCell>
218
- <TableCell align="right">
219
- {source.columns?.length ?? 0}
220
- </TableCell>
221
- <TableCell
222
- sx={{
223
- fontFamily: MONO_FONT_FAMILY,
224
- fontSize: "0.75rem",
225
- wordBreak: "break-all",
226
- maxWidth: 220,
227
- }}
228
- >
229
- {source.sourceEntityId}
230
- </TableCell>
231
- </TableRow>
232
- ))}
233
- </TableBody>
234
- </Table>
235
- )}
236
- </Box>
237
- )}
224
+ ))}
225
+ </TableBody>
226
+ </Table>
227
+ )}
228
+ </Box>
238
229
 
239
230
  <ManifestView
240
231
  entries={materialization.manifest?.entries}
@@ -6,9 +6,7 @@ import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
6
6
  import StopIcon from "@mui/icons-material/Stop";
7
7
  import {
8
8
  Box,
9
- Chip,
10
9
  IconButton,
11
- Link,
12
10
  ListItemIcon,
13
11
  ListItemText,
14
12
  Menu,
@@ -24,7 +22,7 @@ import {
24
22
  import { useState } from "react";
25
23
  import { Materialization } from "../../client";
26
24
  import DeleteMaterializationDialog from "./DeleteMaterializationDialog";
27
- import TriggerChip from "./TriggerChip";
25
+ import TriggerLabel from "./TriggerLabel";
28
26
  import {
29
27
  formatDuration,
30
28
  formatRelativeTime,
@@ -39,10 +37,6 @@ type MaterializationRunsListProps = {
39
37
  materializations: Materialization[];
40
38
  mutable: boolean;
41
39
  isMutating: boolean;
42
- /** Show a Package column — for the environment-scoped view spanning packages. */
43
- showPackage?: boolean;
44
- /** Navigate to a package (used by the Package column links). */
45
- onClickPackage?: (packageName: string) => void;
46
40
  onStop: (materialization: Materialization) => void;
47
41
  onDelete: (materialization: Materialization, dropTables: boolean) => void;
48
42
  onViewDetails: (materialization: Materialization) => void;
@@ -52,8 +46,6 @@ export default function MaterializationRunsList({
52
46
  materializations,
53
47
  mutable,
54
48
  isMutating,
55
- showPackage = false,
56
- onClickPackage,
57
49
  onStop,
58
50
  onDelete,
59
51
  onViewDetails,
@@ -71,10 +63,20 @@ export default function MaterializationRunsList({
71
63
  }
72
64
 
73
65
  return (
74
- <Table size="small">
66
+ <Table
67
+ size="small"
68
+ // The section's rows start at its left edge and end at its right, so
69
+ // the table does too: MUI's own 16px on the outer cells put this one
70
+ // table a thumb's width inside every list above it.
71
+ sx={{
72
+ "& td, & th": { borderColor: "divider" },
73
+ "& td:first-of-type, & th:first-of-type": { pl: 0 },
74
+ "& td:last-of-type, & th:last-of-type": { pr: 0 },
75
+ "& th": { color: "text.secondary", fontWeight: 600 },
76
+ }}
77
+ >
75
78
  <TableHead>
76
79
  <TableRow>
77
- {showPackage && <TableCell>Package</TableCell>}
78
80
  <TableCell>Status</TableCell>
79
81
  <TableCell>Trigger</TableCell>
80
82
  <TableCell>Started</TableCell>
@@ -90,8 +92,6 @@ export default function MaterializationRunsList({
90
92
  materialization={materialization}
91
93
  mutable={mutable}
92
94
  isMutating={isMutating}
93
- showPackage={showPackage}
94
- onClickPackage={onClickPackage}
95
95
  onStop={onStop}
96
96
  onDelete={onDelete}
97
97
  onViewDetails={onViewDetails}
@@ -106,8 +106,6 @@ function MaterializationRow({
106
106
  materialization,
107
107
  mutable,
108
108
  isMutating,
109
- showPackage,
110
- onClickPackage,
111
109
  onStop,
112
110
  onDelete,
113
111
  onViewDetails,
@@ -115,8 +113,6 @@ function MaterializationRow({
115
113
  materialization: Materialization;
116
114
  mutable: boolean;
117
115
  isMutating: boolean;
118
- showPackage?: boolean;
119
- onClickPackage?: (packageName: string) => void;
120
116
  onStop: (materialization: Materialization) => void;
121
117
  onDelete: (materialization: Materialization, dropTables: boolean) => void;
122
118
  onViewDetails: (materialization: Materialization) => void;
@@ -157,32 +153,23 @@ function MaterializationRow({
157
153
  tabIndex={0}
158
154
  aria-label={`View materialization ${materialization.id ?? ""} details`.trim()}
159
155
  >
160
- {showPackage && (
161
- <TableCell onClick={(event) => event.stopPropagation()}>
162
- {onClickPackage ? (
163
- <Link
164
- component="button"
165
- underline="hover"
166
- onClick={() =>
167
- onClickPackage(materialization.packageName ?? "")
168
- }
169
- sx={{ fontWeight: 500 }}
170
- >
171
- {materialization.packageName}
172
- </Link>
173
- ) : (
174
- materialization.packageName
175
- )}
176
- </TableCell>
177
- )}
178
156
  <TableCell>
179
157
  <Box sx={{ display: "flex", alignItems: "center", gap: 0.5 }}>
180
- <Chip
181
- size="small"
182
- label={statusLabel(materialization.status)}
183
- color={statusColor(materialization.status)}
184
- variant={active ? "filled" : "outlined"}
185
- />
158
+ {/* The word, in the colour the state already carries. A pill
159
+ around one word of a six-word row was the only chip on the
160
+ page, and it read as a control rather than as a value. */}
161
+ <Typography
162
+ variant="body2"
163
+ sx={{
164
+ fontWeight: 500,
165
+ color:
166
+ statusColor(materialization.status) === "default"
167
+ ? "text.primary"
168
+ : `${statusColor(materialization.status)}.main`,
169
+ }}
170
+ >
171
+ {statusLabel(materialization.status)}
172
+ </Typography>
186
173
  {error && (
187
174
  <Tooltip title={error}>
188
175
  <InfoOutlinedIcon fontSize="small" color="error" />
@@ -191,7 +178,7 @@ function MaterializationRow({
191
178
  </Box>
192
179
  </TableCell>
193
180
  <TableCell>
194
- <TriggerChip meta={meta} />
181
+ <TriggerLabel meta={meta} />
195
182
  </TableCell>
196
183
  <TableCell>
197
184
  {formatRelativeTime(