@malloy-publisher/sdk 0.0.210 → 0.0.212
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/client/api.d.ts +10 -2
- package/dist/components/Materializations/DeleteMaterializationDialog.d.ts +1 -1
- package/dist/components/Materializations/MaterializationRunsList.d.ts +1 -1
- package/dist/{core-BbW0t3RQ.es.js → core-XtBSnW2U.es.js} +1 -1
- package/dist/{core-FnSzIM32.cjs.js → core-nOY_ehFO.cjs.js} +1 -1
- package/dist/{index-CkHg3_Dp.cjs.js → index-6oc6QM4J.cjs.js} +82 -82
- package/dist/{index-DtQs9Dug.es.js → index-BOPR9L3h.es.js} +6950 -6771
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
- package/src/components/Materializations/DeleteMaterializationDialog.tsx +17 -2
- package/src/components/Materializations/MaterializationRunsList.tsx +5 -3
- package/src/components/Materializations/Materializations.tsx +13 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-6oc6QM4J.cjs.js"),o=require("./ServerProvider-DLfoKLcf.cjs.js");exports.AnalyzePackageButton=e.AnalyzePackageButton;exports.BrowserWorkbookStorage=e.BrowserWorkbookStorage;exports.ConnectionExplorer=e.ConnectionExplorer;exports.DimensionFilter=e.DimensionFilter;exports.EmbeddedQueryResult=e.EmbeddedQueryResult;exports.Environment=e.Environment;exports.Home=e.Home;exports.Loading=e.Loading;exports.Materializations=e.Materializations;exports.Model=e.Model;exports.ModelExplorer=e.ModelExplorer;exports.ModelExplorerDialog=e.ModelExplorerDialog;exports.Models=e.Models;exports.Notebook=e.Notebook;exports.Package=e.Package;exports.Packages=e.Packages;exports.PageViewer=e.PageViewer;exports.QueryResult=e.QueryResult;exports.RenderedResult=e.RenderedResult;exports.ResultContainer=e.ResultContainer;exports.SourceExplorerComponent=e.SourceExplorerComponent;exports.SourcesExplorer=e.SourcesExplorer;exports.Workbook=e.Workbook;exports.WorkbookList=e.WorkbookList;exports.WorkbookManager=e.WorkbookManager;exports.WorkbookStorageProvider=e.WorkbookStorageProvider;exports.createEmbeddedQueryResult=e.createEmbeddedQueryResult;exports.encodeResourceUri=e.encodeResourceUri;exports.extractDimensionSpecs=e.extractDimensionSpecs;exports.extractSourceFromQuery=e.extractSourceFromQuery;exports.generateFilterClause=e.generateFilterClause;exports.getDimensionKey=e.getDimensionKey;exports.getJoinedSources=e.getJoinedSources;exports.injectWhereClause=e.injectWhereClause;exports.makeDimensionKey=e.makeDimensionKey;exports.parseAllSourceInfos=e.parseAllSourceInfos;exports.parseDimensionFilterAnnotation=e.parseDimensionFilterAnnotation;exports.parseNotebookFilterAnnotation=e.parseNotebookFilterAnnotation;exports.parseResourceUri=e.parseResourceUri;exports.useDimensionFilters=e.useDimensionFilters;exports.useDimensionFiltersFromSpec=e.useDimensionFiltersFromSpec;exports.useDimensionFiltersQuery=e.useDimensionFiltersQuery;exports.useDimensionalFilterRangeData=e.useDimensionalFilterRangeData;exports.useGivensForm=e.useGivensForm;exports.useModelData=e.useModelData;exports.useModelGivens=e.useModelGivens;exports.useRawQueryData=e.useRawQueryData;exports.useRouterClickHandler=e.useRouterClickHandler;exports.ServerProvider=o.ServerProvider;exports.useServer=o.useServer;
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as a, O as o, C as r, D as n, F as i, E as t, H as l, L as u, M as m, o as d, q as c, r as k, y as p, N as g, x as D, P as S, B as F, Q as R, R as x, I as y, t as b, S as E, W as M, J as v, T as C, K as P, G as Q, a2 as W, g as A, i as f, j as w, Z as B, k as G, l as H, _ as K, p as L, m as N, n as U, a1 as j, U as z, V as I, X as J, Y as V, a0 as h, v as q, $ as O, u as T, e as X } from "./index-
|
|
1
|
+
import { A as a, O as o, C as r, D as n, F as i, E as t, H as l, L as u, M as m, o as d, q as c, r as k, y as p, N as g, x as D, P as S, B as F, Q as R, R as x, I as y, t as b, S as E, W as M, J as v, T as C, K as P, G as Q, a2 as W, g as A, i as f, j as w, Z as B, k as G, l as H, _ as K, p as L, m as N, n as U, a1 as j, U as z, V as I, X as J, Y as V, a0 as h, v as q, $ as O, u as T, e as X } from "./index-BOPR9L3h.es.js";
|
|
2
2
|
import { S as Z, u as _ } from "./ServerProvider-B76JLUMa.es.js";
|
|
3
3
|
export {
|
|
4
4
|
a as AnalyzePackageButton,
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Delete } from "@mui/icons-material";
|
|
2
2
|
import CloseIcon from "@mui/icons-material/Close";
|
|
3
3
|
import Button from "@mui/material/Button";
|
|
4
|
+
import Checkbox from "@mui/material/Checkbox";
|
|
4
5
|
import Dialog from "@mui/material/Dialog";
|
|
5
6
|
import DialogActions from "@mui/material/DialogActions";
|
|
6
7
|
import DialogContent from "@mui/material/DialogContent";
|
|
7
8
|
import DialogTitle from "@mui/material/DialogTitle";
|
|
9
|
+
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
8
10
|
import IconButton from "@mui/material/IconButton";
|
|
9
11
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
|
10
12
|
import ListItemText from "@mui/material/ListItemText";
|
|
@@ -22,13 +24,15 @@ export default function DeleteMaterializationDialog({
|
|
|
22
24
|
materialization: Materialization;
|
|
23
25
|
onCloseDialog: () => void;
|
|
24
26
|
isMutating: boolean;
|
|
25
|
-
onDelete: () => void;
|
|
27
|
+
onDelete: (dropTables: boolean) => void;
|
|
26
28
|
}) {
|
|
27
29
|
const [open, setOpen] = useState(false);
|
|
30
|
+
const [dropTables, setDropTables] = useState(false);
|
|
28
31
|
|
|
29
32
|
const handleClickOpen = () => setOpen(true);
|
|
30
33
|
const handleClose = () => {
|
|
31
34
|
setOpen(false);
|
|
35
|
+
setDropTables(false);
|
|
32
36
|
onCloseDialog();
|
|
33
37
|
};
|
|
34
38
|
|
|
@@ -73,13 +77,24 @@ export default function DeleteMaterializationDialog({
|
|
|
73
77
|
Are you sure you want to delete this materialization record?
|
|
74
78
|
This action cannot be undone.
|
|
75
79
|
</Typography>
|
|
80
|
+
<FormControlLabel
|
|
81
|
+
control={
|
|
82
|
+
<Checkbox
|
|
83
|
+
checked={dropTables}
|
|
84
|
+
onChange={(event) =>
|
|
85
|
+
setDropTables(event.target.checked)
|
|
86
|
+
}
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
label="Also drop the materialized table(s) this run produced"
|
|
90
|
+
/>
|
|
76
91
|
</DialogContent>
|
|
77
92
|
<DialogActions>
|
|
78
93
|
<Button
|
|
79
94
|
loading={isMutating}
|
|
80
95
|
variant="contained"
|
|
81
96
|
autoFocus
|
|
82
|
-
onClick={() => onDelete()}
|
|
97
|
+
onClick={() => onDelete(dropTables)}
|
|
83
98
|
color="error"
|
|
84
99
|
>
|
|
85
100
|
Delete
|
|
@@ -35,7 +35,7 @@ type MaterializationRunsListProps = {
|
|
|
35
35
|
mutable: boolean;
|
|
36
36
|
isMutating: boolean;
|
|
37
37
|
onStop: (materialization: Materialization) => void;
|
|
38
|
-
onDelete: (materialization: Materialization) => void;
|
|
38
|
+
onDelete: (materialization: Materialization, dropTables: boolean) => void;
|
|
39
39
|
onViewDetails: (materialization: Materialization) => void;
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -99,7 +99,7 @@ function MaterializationRow({
|
|
|
99
99
|
mutable: boolean;
|
|
100
100
|
isMutating: boolean;
|
|
101
101
|
onStop: (materialization: Materialization) => void;
|
|
102
|
-
onDelete: (materialization: Materialization) => void;
|
|
102
|
+
onDelete: (materialization: Materialization, dropTables: boolean) => void;
|
|
103
103
|
onViewDetails: (materialization: Materialization) => void;
|
|
104
104
|
}) {
|
|
105
105
|
const [menuAnchorEl, setMenuAnchorEl] = useState<null | HTMLElement>(null);
|
|
@@ -202,7 +202,9 @@ function MaterializationRow({
|
|
|
202
202
|
materialization={materialization}
|
|
203
203
|
isMutating={isMutating}
|
|
204
204
|
onCloseDialog={handleMenuClose}
|
|
205
|
-
onDelete={() =>
|
|
205
|
+
onDelete={(dropTables) =>
|
|
206
|
+
onDelete(materialization, dropTables)
|
|
207
|
+
}
|
|
206
208
|
/>
|
|
207
209
|
)}
|
|
208
210
|
</Menu>
|
|
@@ -122,11 +122,18 @@ export default function Materializations({
|
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
const deleteMaterialization = useMutationWithApiError({
|
|
125
|
-
mutationFn: (
|
|
125
|
+
mutationFn: ({
|
|
126
|
+
materialization,
|
|
127
|
+
dropTables,
|
|
128
|
+
}: {
|
|
129
|
+
materialization: Materialization;
|
|
130
|
+
dropTables: boolean;
|
|
131
|
+
}) =>
|
|
126
132
|
apiClients.materializations.deleteMaterialization(
|
|
127
133
|
environmentName,
|
|
128
134
|
packageName,
|
|
129
135
|
materialization.id as string,
|
|
136
|
+
dropTables,
|
|
130
137
|
),
|
|
131
138
|
onSuccess() {
|
|
132
139
|
setNotificationMessage("Materialization deleted");
|
|
@@ -230,8 +237,11 @@ export default function Materializations({
|
|
|
230
237
|
onStop={(materialization) =>
|
|
231
238
|
stopMaterialization.mutate(materialization)
|
|
232
239
|
}
|
|
233
|
-
onDelete={(materialization) =>
|
|
234
|
-
deleteMaterialization.mutate(
|
|
240
|
+
onDelete={(materialization, dropTables) =>
|
|
241
|
+
deleteMaterialization.mutate({
|
|
242
|
+
materialization,
|
|
243
|
+
dropTables,
|
|
244
|
+
})
|
|
235
245
|
}
|
|
236
246
|
onViewDetails={(materialization) =>
|
|
237
247
|
setSelectedId(materialization.id ?? null)
|