@malloy-publisher/sdk 0.0.53 → 0.0.54
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/index.cjs.js +11 -11
- package/dist/index.es.js +425 -404
- package/package.json +1 -1
- package/src/components/AnalyzePackageButton.tsx +90 -56
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { Add, Launch } from "@mui/icons-material";
|
|
2
2
|
import {
|
|
3
3
|
Button,
|
|
4
|
-
Menu,
|
|
5
|
-
MenuItem,
|
|
6
|
-
ListItemIcon,
|
|
7
|
-
ListItemText,
|
|
8
|
-
Typography,
|
|
9
4
|
Dialog,
|
|
10
|
-
DialogTitle,
|
|
11
5
|
DialogContent,
|
|
6
|
+
DialogTitle,
|
|
12
7
|
FormControl,
|
|
8
|
+
ListItemIcon,
|
|
9
|
+
ListItemText,
|
|
10
|
+
Menu,
|
|
11
|
+
MenuItem,
|
|
12
|
+
Stack,
|
|
13
13
|
TextField,
|
|
14
|
+
Typography,
|
|
14
15
|
} from "@mui/material";
|
|
16
|
+
import React from "react";
|
|
17
|
+
import { useRouterClickHandler } from "./click_helper";
|
|
15
18
|
import {
|
|
16
|
-
NotebookStorageProvider,
|
|
17
19
|
BrowserNotebookStorage,
|
|
18
20
|
MutableNotebookList,
|
|
21
|
+
NotebookStorageProvider,
|
|
19
22
|
} from "./MutableNotebook";
|
|
20
|
-
import React from "react";
|
|
21
|
-
import { useRouterClickHandler } from "./click_helper";
|
|
22
23
|
|
|
23
24
|
export interface AnalyzePackageButtonProps {
|
|
24
25
|
projectName: string;
|
|
@@ -75,7 +76,15 @@ export function AnalyzePackageButton({
|
|
|
75
76
|
aria-haspopup="true"
|
|
76
77
|
aria-expanded={open ? "true" : undefined}
|
|
77
78
|
onClick={handleClick}
|
|
78
|
-
|
|
79
|
+
variant="contained"
|
|
80
|
+
sx={{
|
|
81
|
+
height: "40px",
|
|
82
|
+
px: 2,
|
|
83
|
+
backgroundColor: "#fbbb04",
|
|
84
|
+
"&:hover": {
|
|
85
|
+
backgroundColor: "#eab308",
|
|
86
|
+
},
|
|
87
|
+
}}
|
|
79
88
|
>
|
|
80
89
|
Analyze Package
|
|
81
90
|
</Button>
|
|
@@ -84,10 +93,9 @@ export function AnalyzePackageButton({
|
|
|
84
93
|
anchorEl={anchorEl}
|
|
85
94
|
open={open}
|
|
86
95
|
onClose={handleMenuClose}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
},
|
|
96
|
+
MenuListProps={{
|
|
97
|
+
"aria-labelledby": "basic-button",
|
|
98
|
+
sx: { py: 0.5 },
|
|
91
99
|
}}
|
|
92
100
|
>
|
|
93
101
|
<MenuItem
|
|
@@ -95,12 +103,18 @@ export function AnalyzePackageButton({
|
|
|
95
103
|
setNewDialogOpen(true);
|
|
96
104
|
handleMenuClose();
|
|
97
105
|
}}
|
|
106
|
+
sx={{ py: 1, px: 2 }}
|
|
98
107
|
>
|
|
99
108
|
<ListItemIcon>
|
|
100
109
|
<Add fontSize="small" />
|
|
101
110
|
</ListItemIcon>
|
|
102
111
|
<ListItemText>
|
|
103
|
-
<Typography variant="body2"
|
|
112
|
+
<Typography variant="body2" fontWeight={500}>
|
|
113
|
+
New Workbook
|
|
114
|
+
</Typography>
|
|
115
|
+
<Typography variant="caption" color="text.secondary">
|
|
116
|
+
Create a new analysis workbook
|
|
117
|
+
</Typography>
|
|
104
118
|
</ListItemText>
|
|
105
119
|
</MenuItem>
|
|
106
120
|
<MenuItem
|
|
@@ -108,67 +122,87 @@ export function AnalyzePackageButton({
|
|
|
108
122
|
setOpenDialogOpen(true);
|
|
109
123
|
handleMenuClose();
|
|
110
124
|
}}
|
|
125
|
+
sx={{ py: 1, px: 2 }}
|
|
111
126
|
>
|
|
112
127
|
<ListItemIcon>
|
|
113
128
|
<Launch fontSize="small" />
|
|
114
129
|
</ListItemIcon>
|
|
115
130
|
<ListItemText>
|
|
116
|
-
<Typography variant="body2"
|
|
131
|
+
<Typography variant="body2" fontWeight={500}>
|
|
132
|
+
Open Workbook
|
|
133
|
+
</Typography>
|
|
134
|
+
<Typography variant="caption" color="text.secondary">
|
|
135
|
+
Open an existing workbook
|
|
136
|
+
</Typography>
|
|
117
137
|
</ListItemText>
|
|
118
138
|
</MenuItem>
|
|
119
139
|
</Menu>
|
|
140
|
+
|
|
141
|
+
{/* Create New Workbook Dialog */}
|
|
120
142
|
<Dialog
|
|
121
143
|
open={newDialogOpen}
|
|
122
144
|
onClose={handleNewDialogClose}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
width: "100%",
|
|
126
|
-
maxWidth: "300px",
|
|
127
|
-
},
|
|
128
|
-
}}
|
|
145
|
+
maxWidth="sm"
|
|
146
|
+
fullWidth
|
|
129
147
|
>
|
|
130
|
-
<DialogTitle
|
|
131
|
-
|
|
148
|
+
<DialogTitle sx={{ pb: 1, pt: 2, px: 2 }}>
|
|
149
|
+
<Typography variant="h6" fontWeight={600} sx={{ mb: 0.5 }}>
|
|
150
|
+
Create New Workbook
|
|
151
|
+
</Typography>
|
|
152
|
+
<Typography variant="body2" color="text.secondary">
|
|
153
|
+
Start a new analysis workbook to explore your data
|
|
154
|
+
</Typography>
|
|
132
155
|
</DialogTitle>
|
|
133
|
-
<DialogContent>
|
|
134
|
-
<
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
<DialogContent sx={{ px: 2, pb: 2 }}>
|
|
157
|
+
<Stack spacing={2} sx={{ mt: 1 }}>
|
|
158
|
+
<FormControl fullWidth>
|
|
159
|
+
<TextField
|
|
160
|
+
label="Workbook Name"
|
|
161
|
+
value={workbookName}
|
|
162
|
+
onChange={(e) => setWorkbookName(e.target.value)}
|
|
163
|
+
placeholder="Enter workbook name..."
|
|
164
|
+
fullWidth
|
|
165
|
+
autoFocus
|
|
166
|
+
size="small"
|
|
167
|
+
/>
|
|
168
|
+
</FormControl>
|
|
169
|
+
<Stack direction="row" spacing={1} justifyContent="flex-end">
|
|
170
|
+
<Button
|
|
171
|
+
onClick={handleNewDialogClose}
|
|
172
|
+
variant="outlined"
|
|
173
|
+
size="small"
|
|
174
|
+
>
|
|
175
|
+
Cancel
|
|
176
|
+
</Button>
|
|
177
|
+
<Button
|
|
178
|
+
onClick={(event) => createNotebookClick(event)}
|
|
179
|
+
variant="contained"
|
|
180
|
+
disabled={!workbookName.trim()}
|
|
181
|
+
size="small"
|
|
182
|
+
>
|
|
183
|
+
Create Workbook
|
|
184
|
+
</Button>
|
|
185
|
+
</Stack>
|
|
186
|
+
</Stack>
|
|
156
187
|
</DialogContent>
|
|
157
188
|
</Dialog>
|
|
189
|
+
|
|
190
|
+
{/* Open Workbook Dialog */}
|
|
158
191
|
<Dialog
|
|
159
192
|
open={openDialogOpen}
|
|
160
193
|
onClose={handleOpenDialogClose}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
width: "100%",
|
|
164
|
-
maxWidth: "300px",
|
|
165
|
-
},
|
|
166
|
-
}}
|
|
194
|
+
maxWidth="md"
|
|
195
|
+
fullWidth
|
|
167
196
|
>
|
|
168
|
-
<DialogTitle
|
|
169
|
-
|
|
197
|
+
<DialogTitle sx={{ pb: 1, pt: 2, px: 2 }}>
|
|
198
|
+
<Typography variant="h6" fontWeight={600} sx={{ mb: 0.5 }}>
|
|
199
|
+
Open Workbook
|
|
200
|
+
</Typography>
|
|
201
|
+
<Typography variant="body2" color="text.secondary">
|
|
202
|
+
Select an existing workbook to continue your analysis
|
|
203
|
+
</Typography>
|
|
170
204
|
</DialogTitle>
|
|
171
|
-
<DialogContent>
|
|
205
|
+
<DialogContent sx={{ px: 2, pb: 2 }}>
|
|
172
206
|
<NotebookStorageProvider
|
|
173
207
|
notebookStorage={new BrowserNotebookStorage()}
|
|
174
208
|
userContext={{
|