@malloy-publisher/app 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/components/MainPage.d.ts +5 -1
- package/dist/index.cjs.js +260 -455
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +262 -457
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -32170,6 +32170,62 @@ function ExportMalloyButton({
|
|
|
32170
32170
|
};
|
|
32171
32171
|
return /* @__PURE__ */ jsxRuntime.jsx(material.Button, { color: "primary", onClick: handleExport, size: "small", children: copied ? "Copied!" : "Export" });
|
|
32172
32172
|
}
|
|
32173
|
+
function MutableNotebookList({
|
|
32174
|
+
onNotebookClick
|
|
32175
|
+
}) {
|
|
32176
|
+
const { notebookStorage, userContext } = useNotebookStorage();
|
|
32177
|
+
const [notebooks, setNotebooks] = React.useState([]);
|
|
32178
|
+
React.useEffect(() => {
|
|
32179
|
+
if (notebookStorage && userContext) {
|
|
32180
|
+
setNotebooks(notebookStorage.listNotebooks(userContext));
|
|
32181
|
+
}
|
|
32182
|
+
}, [notebookStorage, userContext]);
|
|
32183
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32184
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Divider, {}),
|
|
32185
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32186
|
+
material.Box,
|
|
32187
|
+
{
|
|
32188
|
+
sx: {
|
|
32189
|
+
maxHeight: "300px",
|
|
32190
|
+
overflow: "auto",
|
|
32191
|
+
"&::-webkit-scrollbar": {
|
|
32192
|
+
width: "8px"
|
|
32193
|
+
},
|
|
32194
|
+
"&::-webkit-scrollbar-track": {
|
|
32195
|
+
background: "transparent"
|
|
32196
|
+
},
|
|
32197
|
+
"&::-webkit-scrollbar-thumb": {
|
|
32198
|
+
background: "rgba(0,0,0,0.2)",
|
|
32199
|
+
borderRadius: "4px"
|
|
32200
|
+
}
|
|
32201
|
+
},
|
|
32202
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(material.List, { dense: true, children: [
|
|
32203
|
+
notebooks.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(material.ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32204
|
+
material.ListItemText,
|
|
32205
|
+
{
|
|
32206
|
+
primary: "No notebooks found.",
|
|
32207
|
+
sx: { textAlign: "center" }
|
|
32208
|
+
}
|
|
32209
|
+
) }),
|
|
32210
|
+
notebooks.map((notebook) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
32211
|
+
material.ListItem,
|
|
32212
|
+
{
|
|
32213
|
+
onClick: (event) => onNotebookClick(notebook, event),
|
|
32214
|
+
sx: {
|
|
32215
|
+
cursor: "pointer",
|
|
32216
|
+
"&:hover": {
|
|
32217
|
+
backgroundColor: "action.hover"
|
|
32218
|
+
}
|
|
32219
|
+
},
|
|
32220
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(material.ListItemText, { primary: notebook })
|
|
32221
|
+
},
|
|
32222
|
+
notebook
|
|
32223
|
+
))
|
|
32224
|
+
] })
|
|
32225
|
+
}
|
|
32226
|
+
)
|
|
32227
|
+
] });
|
|
32228
|
+
}
|
|
32173
32229
|
const projectsApi$1 = new ProjectsApi(new Configuration());
|
|
32174
32230
|
function About() {
|
|
32175
32231
|
const { projectName } = useProject();
|
|
@@ -32311,211 +32367,196 @@ function Home({ navigate }) {
|
|
|
32311
32367
|
return /* @__PURE__ */ jsxRuntime.jsx(Loading, { text: "Loading projects..." });
|
|
32312
32368
|
}
|
|
32313
32369
|
}
|
|
32314
|
-
|
|
32315
|
-
|
|
32316
|
-
|
|
32370
|
+
function AnalyzePackageButton({
|
|
32371
|
+
projectName,
|
|
32372
|
+
packageName
|
|
32373
|
+
}) {
|
|
32374
|
+
const [workbookName, setWorkbookName] = React.useState("");
|
|
32375
|
+
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
32376
|
+
const [newDialogOpen, setNewDialogOpen] = React.useState(false);
|
|
32377
|
+
const [openDialogOpen, setOpenDialogOpen] = React.useState(false);
|
|
32317
32378
|
const navigate = useRouterClickHandler();
|
|
32318
|
-
|
|
32379
|
+
const open = Boolean(anchorEl);
|
|
32380
|
+
const handleClick = (event) => {
|
|
32381
|
+
setAnchorEl(event.currentTarget);
|
|
32382
|
+
};
|
|
32383
|
+
const handleMenuClose = () => {
|
|
32384
|
+
setAnchorEl(null);
|
|
32385
|
+
};
|
|
32386
|
+
const handleOpenDialogClose = () => {
|
|
32387
|
+
setOpenDialogOpen(false);
|
|
32388
|
+
};
|
|
32389
|
+
const handleNewDialogClose = () => {
|
|
32390
|
+
setNewDialogOpen(false);
|
|
32391
|
+
};
|
|
32392
|
+
const handleNotebookClick = (notebook, event) => {
|
|
32393
|
+
setOpenDialogOpen(false);
|
|
32394
|
+
navigate(
|
|
32395
|
+
`/${projectName}/${packageName}/scratchNotebook/${encodeURIComponent(notebook)}`,
|
|
32396
|
+
event
|
|
32397
|
+
);
|
|
32398
|
+
};
|
|
32399
|
+
const createNotebookClick = (event) => {
|
|
32400
|
+
setNewDialogOpen(false);
|
|
32401
|
+
navigate(
|
|
32402
|
+
`/${projectName}/${packageName}/scratchNotebook/${encodeURIComponent(workbookName)}`,
|
|
32403
|
+
event
|
|
32404
|
+
);
|
|
32405
|
+
setWorkbookName("");
|
|
32406
|
+
};
|
|
32407
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32319
32408
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32320
|
-
material.
|
|
32409
|
+
material.Button,
|
|
32321
32410
|
{
|
|
32322
|
-
|
|
32411
|
+
"aria-controls": open ? "basic-menu" : void 0,
|
|
32412
|
+
"aria-haspopup": "true",
|
|
32413
|
+
"aria-expanded": open ? "true" : void 0,
|
|
32414
|
+
onClick: handleClick,
|
|
32415
|
+
variant: "contained",
|
|
32323
32416
|
sx: {
|
|
32324
|
-
|
|
32325
|
-
|
|
32326
|
-
|
|
32327
|
-
|
|
32417
|
+
height: "40px",
|
|
32418
|
+
px: 2,
|
|
32419
|
+
backgroundColor: "#fbbb04",
|
|
32420
|
+
"&:hover": {
|
|
32421
|
+
backgroundColor: "#eab308"
|
|
32422
|
+
}
|
|
32328
32423
|
},
|
|
32329
|
-
children:
|
|
32330
|
-
|
|
32331
|
-
|
|
32424
|
+
children: "Analyze Package"
|
|
32425
|
+
}
|
|
32426
|
+
),
|
|
32427
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32428
|
+
material.Menu,
|
|
32429
|
+
{
|
|
32430
|
+
id: "basic-menu",
|
|
32431
|
+
anchorEl,
|
|
32432
|
+
open,
|
|
32433
|
+
onClose: handleMenuClose,
|
|
32434
|
+
MenuListProps: {
|
|
32435
|
+
"aria-labelledby": "basic-button",
|
|
32436
|
+
sx: { py: 0.5 }
|
|
32437
|
+
},
|
|
32438
|
+
children: [
|
|
32439
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32440
|
+
material.MenuItem,
|
|
32332
32441
|
{
|
|
32333
|
-
|
|
32334
|
-
|
|
32335
|
-
|
|
32336
|
-
letterSpacing: "-0.025em",
|
|
32337
|
-
mb: 0.25
|
|
32442
|
+
onClick: () => {
|
|
32443
|
+
setNewDialogOpen(true);
|
|
32444
|
+
handleMenuClose();
|
|
32338
32445
|
},
|
|
32339
|
-
|
|
32446
|
+
sx: { py: 1, px: 2 },
|
|
32447
|
+
children: [
|
|
32448
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Add, { fontSize: "small" }) }),
|
|
32449
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.ListItemText, { children: [
|
|
32450
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", fontWeight: 500, children: "New Workbook" }),
|
|
32451
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", children: "Create a new analysis workbook" })
|
|
32452
|
+
] })
|
|
32453
|
+
]
|
|
32340
32454
|
}
|
|
32341
32455
|
),
|
|
32342
|
-
/* @__PURE__ */ jsxRuntime.
|
|
32343
|
-
material.
|
|
32456
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32457
|
+
material.MenuItem,
|
|
32344
32458
|
{
|
|
32345
|
-
|
|
32346
|
-
|
|
32347
|
-
|
|
32348
|
-
maxWidth: "600px",
|
|
32349
|
-
lineHeight: 1.4
|
|
32459
|
+
onClick: () => {
|
|
32460
|
+
setOpenDialogOpen(true);
|
|
32461
|
+
handleMenuClose();
|
|
32350
32462
|
},
|
|
32351
|
-
|
|
32463
|
+
sx: { py: 1, px: 2 },
|
|
32464
|
+
children: [
|
|
32465
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Launch, { fontSize: "small" }) }),
|
|
32466
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.ListItemText, { children: [
|
|
32467
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", fontWeight: 500, children: "Open Workbook" }),
|
|
32468
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "caption", color: "text.secondary", children: "Open an existing workbook" })
|
|
32469
|
+
] })
|
|
32470
|
+
]
|
|
32352
32471
|
}
|
|
32353
32472
|
)
|
|
32354
|
-
]
|
|
32473
|
+
]
|
|
32355
32474
|
}
|
|
32356
32475
|
),
|
|
32357
32476
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32358
|
-
material.
|
|
32477
|
+
material.Dialog,
|
|
32359
32478
|
{
|
|
32360
|
-
|
|
32361
|
-
|
|
32362
|
-
|
|
32479
|
+
open: newDialogOpen,
|
|
32480
|
+
onClose: handleNewDialogClose,
|
|
32481
|
+
maxWidth: "sm",
|
|
32482
|
+
fullWidth: true,
|
|
32363
32483
|
children: [
|
|
32364
|
-
/* @__PURE__ */ jsxRuntime.
|
|
32365
|
-
material.
|
|
32366
|
-
{
|
|
32367
|
-
|
|
32368
|
-
|
|
32369
|
-
|
|
32370
|
-
|
|
32371
|
-
|
|
32372
|
-
"
|
|
32373
|
-
|
|
32374
|
-
|
|
32484
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogTitle, { sx: { pb: 1, pt: 2, px: 2 }, children: [
|
|
32485
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, sx: { mb: 0.5 }, children: "Create New Workbook" }),
|
|
32486
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Start a new analysis workbook to explore your data" })
|
|
32487
|
+
] }),
|
|
32488
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.DialogContent, { sx: { px: 2, pb: 2 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { spacing: 2, sx: { mt: 1 }, children: [
|
|
32489
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.FormControl, { fullWidth: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32490
|
+
material.TextField,
|
|
32491
|
+
{
|
|
32492
|
+
label: "Workbook Name",
|
|
32493
|
+
value: workbookName,
|
|
32494
|
+
onChange: (e) => setWorkbookName(e.target.value),
|
|
32495
|
+
placeholder: "Enter workbook name...",
|
|
32496
|
+
fullWidth: true,
|
|
32497
|
+
autoFocus: true,
|
|
32498
|
+
size: "small"
|
|
32499
|
+
}
|
|
32500
|
+
) }),
|
|
32501
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 1, justifyContent: "flex-end", children: [
|
|
32502
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32503
|
+
material.Button,
|
|
32504
|
+
{
|
|
32505
|
+
onClick: handleNewDialogClose,
|
|
32506
|
+
variant: "outlined",
|
|
32507
|
+
size: "small",
|
|
32508
|
+
children: "Cancel"
|
|
32375
32509
|
}
|
|
32376
|
-
|
|
32377
|
-
|
|
32378
|
-
|
|
32379
|
-
|
|
32380
|
-
|
|
32381
|
-
|
|
32382
|
-
|
|
32383
|
-
|
|
32384
|
-
|
|
32385
|
-
}
|
|
32386
|
-
),
|
|
32387
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32388
|
-
material.Typography,
|
|
32389
|
-
{
|
|
32390
|
-
variant: "body2",
|
|
32391
|
-
color: "text.secondary",
|
|
32392
|
-
sx: { lineHeight: 1.4 },
|
|
32393
|
-
children: "Explore your data with interactive Malloy models and queries"
|
|
32394
|
-
}
|
|
32395
|
-
)
|
|
32396
|
-
] })
|
|
32397
|
-
}
|
|
32398
|
-
),
|
|
32399
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32400
|
-
material.Card,
|
|
32401
|
-
{
|
|
32402
|
-
variant: "outlined",
|
|
32403
|
-
sx: {
|
|
32404
|
-
flex: 1,
|
|
32405
|
-
p: 1,
|
|
32406
|
-
transition: "all 0.2s ease-in-out",
|
|
32407
|
-
"&:hover": {
|
|
32408
|
-
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
32409
|
-
transform: "translateY(-2px)"
|
|
32510
|
+
),
|
|
32511
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32512
|
+
material.Button,
|
|
32513
|
+
{
|
|
32514
|
+
onClick: (event) => createNotebookClick(event),
|
|
32515
|
+
variant: "contained",
|
|
32516
|
+
disabled: !workbookName.trim(),
|
|
32517
|
+
size: "small",
|
|
32518
|
+
children: "Create Workbook"
|
|
32410
32519
|
}
|
|
32411
|
-
|
|
32412
|
-
|
|
32413
|
-
|
|
32414
|
-
|
|
32415
|
-
|
|
32416
|
-
|
|
32417
|
-
|
|
32418
|
-
|
|
32419
|
-
|
|
32420
|
-
|
|
32421
|
-
|
|
32422
|
-
|
|
32423
|
-
|
|
32424
|
-
|
|
32425
|
-
|
|
32426
|
-
|
|
32427
|
-
|
|
32428
|
-
|
|
32429
|
-
|
|
32430
|
-
|
|
32431
|
-
] })
|
|
32432
|
-
}
|
|
32433
|
-
),
|
|
32434
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32435
|
-
material.Card,
|
|
32520
|
+
)
|
|
32521
|
+
] })
|
|
32522
|
+
] }) })
|
|
32523
|
+
]
|
|
32524
|
+
}
|
|
32525
|
+
),
|
|
32526
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32527
|
+
material.Dialog,
|
|
32528
|
+
{
|
|
32529
|
+
open: openDialogOpen,
|
|
32530
|
+
onClose: handleOpenDialogClose,
|
|
32531
|
+
maxWidth: "md",
|
|
32532
|
+
fullWidth: true,
|
|
32533
|
+
children: [
|
|
32534
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogTitle, { sx: { pb: 1, pt: 2, px: 2 }, children: [
|
|
32535
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, sx: { mb: 0.5 }, children: "Open Workbook" }),
|
|
32536
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Select an existing workbook to continue your analysis" })
|
|
32537
|
+
] }),
|
|
32538
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.DialogContent, { sx: { px: 2, pb: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32539
|
+
NotebookStorageProvider,
|
|
32436
32540
|
{
|
|
32437
|
-
|
|
32438
|
-
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
transition: "all 0.2s ease-in-out",
|
|
32442
|
-
"&:hover": {
|
|
32443
|
-
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.1)",
|
|
32444
|
-
transform: "translateY(-2px)"
|
|
32445
|
-
}
|
|
32541
|
+
notebookStorage: new BrowserNotebookStorage(),
|
|
32542
|
+
userContext: {
|
|
32543
|
+
project: projectName,
|
|
32544
|
+
package: packageName
|
|
32446
32545
|
},
|
|
32447
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
32448
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32449
|
-
material.Typography,
|
|
32450
|
-
{
|
|
32451
|
-
variant: "subtitle1",
|
|
32452
|
-
fontWeight: 600,
|
|
32453
|
-
sx: { mb: 0.25 },
|
|
32454
|
-
children: "Collaboration"
|
|
32455
|
-
}
|
|
32456
|
-
),
|
|
32457
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32458
|
-
material.Typography,
|
|
32459
|
-
{
|
|
32460
|
-
variant: "body2",
|
|
32461
|
-
color: "text.secondary",
|
|
32462
|
-
sx: { lineHeight: 1.4 },
|
|
32463
|
-
children: "Share insights and collaborate with your team on data projects"
|
|
32464
|
-
}
|
|
32465
|
-
)
|
|
32466
|
-
] })
|
|
32546
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MutableNotebookList, { onNotebookClick: handleNotebookClick })
|
|
32467
32547
|
}
|
|
32468
|
-
)
|
|
32548
|
+
) })
|
|
32469
32549
|
]
|
|
32470
32550
|
}
|
|
32471
|
-
)
|
|
32472
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: { xs: "column", md: "row" }, spacing: 1, children: [
|
|
32473
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Card, { sx: { flex: 1, p: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.CardContent, { sx: { p: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { spacing: 0.5, children: [
|
|
32474
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32475
|
-
material.Box,
|
|
32476
|
-
{
|
|
32477
|
-
sx: { display: "flex", alignItems: "center", gap: 1 },
|
|
32478
|
-
children: [
|
|
32479
|
-
/* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Speed, { sx: { color: "warning.main", fontSize: 28 } }),
|
|
32480
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "subtitle1", fontWeight: 600, children: "High Performance" })
|
|
32481
|
-
]
|
|
32482
|
-
}
|
|
32483
|
-
),
|
|
32484
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32485
|
-
material.Typography,
|
|
32486
|
-
{
|
|
32487
|
-
variant: "body2",
|
|
32488
|
-
color: "text.secondary",
|
|
32489
|
-
sx: { lineHeight: 1.4 },
|
|
32490
|
-
children: "Optimized query execution and intelligent caching ensure fast performance even with large datasets and complex analytical queries."
|
|
32491
|
-
}
|
|
32492
|
-
)
|
|
32493
|
-
] }) }) }),
|
|
32494
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Card, { sx: { flex: 1, p: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(material.CardContent, { sx: { p: 0 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { spacing: 0.5, children: [
|
|
32495
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
32496
|
-
material.Box,
|
|
32497
|
-
{
|
|
32498
|
-
sx: { display: "flex", alignItems: "center", gap: 1 },
|
|
32499
|
-
children: [
|
|
32500
|
-
/* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Security, { sx: { color: "info.main", fontSize: 28 } }),
|
|
32501
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "subtitle1", fontWeight: 600, children: "Enterprise Ready" })
|
|
32502
|
-
]
|
|
32503
|
-
}
|
|
32504
|
-
),
|
|
32505
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32506
|
-
material.Typography,
|
|
32507
|
-
{
|
|
32508
|
-
variant: "body2",
|
|
32509
|
-
color: "text.secondary",
|
|
32510
|
-
sx: { lineHeight: 1.4 },
|
|
32511
|
-
children: "Built with enterprise security and scalability in mind. Supports authentication, authorization, and comprehensive audit logging."
|
|
32512
|
-
}
|
|
32513
|
-
)
|
|
32514
|
-
] }) }) })
|
|
32515
|
-
] }),
|
|
32516
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { display: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(Home, { navigate }) })
|
|
32551
|
+
)
|
|
32517
32552
|
] });
|
|
32518
32553
|
}
|
|
32554
|
+
new ConnectionsApi(new Configuration());
|
|
32555
|
+
globalAxios.defaults.baseURL = "IfYouAreSeeingThis_baseURL_IsNotSet";
|
|
32556
|
+
function HomePage() {
|
|
32557
|
+
const navigate = useRouterClickHandler();
|
|
32558
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Home, { navigate });
|
|
32559
|
+
}
|
|
32519
32560
|
const Container = system.createContainer({
|
|
32520
32561
|
createStyledComponent: styled("div", {
|
|
32521
32562
|
name: "MuiContainer",
|
|
@@ -33274,103 +33315,14 @@ function BreadcrumbNav() {
|
|
|
33274
33315
|
}
|
|
33275
33316
|
) });
|
|
33276
33317
|
}
|
|
33277
|
-
function
|
|
33278
|
-
onNotebookClick
|
|
33279
|
-
}) {
|
|
33280
|
-
const { notebookStorage, userContext } = useNotebookStorage();
|
|
33281
|
-
const [notebooks, setNotebooks] = React.useState([]);
|
|
33282
|
-
React.useEffect(() => {
|
|
33283
|
-
if (notebookStorage && userContext) {
|
|
33284
|
-
setNotebooks(notebookStorage.listNotebooks(userContext));
|
|
33285
|
-
}
|
|
33286
|
-
}, [notebookStorage, userContext]);
|
|
33287
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33288
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Divider, {}),
|
|
33289
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33290
|
-
material.Box,
|
|
33291
|
-
{
|
|
33292
|
-
sx: {
|
|
33293
|
-
maxHeight: "300px",
|
|
33294
|
-
overflow: "auto",
|
|
33295
|
-
"&::-webkit-scrollbar": {
|
|
33296
|
-
width: "8px"
|
|
33297
|
-
},
|
|
33298
|
-
"&::-webkit-scrollbar-track": {
|
|
33299
|
-
background: "transparent"
|
|
33300
|
-
},
|
|
33301
|
-
"&::-webkit-scrollbar-thumb": {
|
|
33302
|
-
background: "rgba(0,0,0,0.2)",
|
|
33303
|
-
borderRadius: "4px"
|
|
33304
|
-
}
|
|
33305
|
-
},
|
|
33306
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(material.List, { dense: true, children: [
|
|
33307
|
-
notebooks.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(material.ListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33308
|
-
material.ListItemText,
|
|
33309
|
-
{
|
|
33310
|
-
primary: "No notebooks found.",
|
|
33311
|
-
sx: { textAlign: "center" }
|
|
33312
|
-
}
|
|
33313
|
-
) }),
|
|
33314
|
-
notebooks.map((notebook) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
33315
|
-
material.ListItem,
|
|
33316
|
-
{
|
|
33317
|
-
onClick: (event) => onNotebookClick(notebook, event),
|
|
33318
|
-
sx: {
|
|
33319
|
-
cursor: "pointer",
|
|
33320
|
-
"&:hover": {
|
|
33321
|
-
backgroundColor: "action.hover"
|
|
33322
|
-
}
|
|
33323
|
-
},
|
|
33324
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(material.ListItemText, { primary: notebook })
|
|
33325
|
-
},
|
|
33326
|
-
notebook
|
|
33327
|
-
))
|
|
33328
|
-
] })
|
|
33329
|
-
}
|
|
33330
|
-
)
|
|
33331
|
-
] });
|
|
33332
|
-
}
|
|
33333
|
-
function MainPage() {
|
|
33318
|
+
function MainPage({ showHeader = true }) {
|
|
33334
33319
|
const { projectName, packageName } = useParams();
|
|
33335
|
-
const navigate = useRouterClickHandler();
|
|
33336
|
-
const [workbookName, setWorkbookName] = React.useState("");
|
|
33337
|
-
const [anchorEl, setAnchorEl] = React.useState(null);
|
|
33338
|
-
const [newDialogOpen, setNewDialogOpen] = React.useState(false);
|
|
33339
|
-
const [openDialogOpen, setOpenDialogOpen] = React.useState(false);
|
|
33340
|
-
const open = Boolean(anchorEl);
|
|
33341
|
-
const handleClick = (event) => {
|
|
33342
|
-
setAnchorEl(event.currentTarget);
|
|
33343
|
-
};
|
|
33344
|
-
const handleMenuClose = () => {
|
|
33345
|
-
setAnchorEl(null);
|
|
33346
|
-
};
|
|
33347
|
-
const handleOpenDialogClose = () => {
|
|
33348
|
-
setOpenDialogOpen(false);
|
|
33349
|
-
};
|
|
33350
|
-
const handleNewDialogClose = () => {
|
|
33351
|
-
setNewDialogOpen(false);
|
|
33352
|
-
};
|
|
33353
|
-
const handleNotebookClick = (notebook, event) => {
|
|
33354
|
-
setOpenDialogOpen(false);
|
|
33355
|
-
navigate(
|
|
33356
|
-
`/${projectName}/${packageName}/scratchNotebook/${encodeURIComponent(notebook)}`,
|
|
33357
|
-
event
|
|
33358
|
-
);
|
|
33359
|
-
};
|
|
33360
|
-
const createNotebookClick = (event) => {
|
|
33361
|
-
setNewDialogOpen(false);
|
|
33362
|
-
navigate(
|
|
33363
|
-
`/${projectName}/${packageName}/scratchNotebook/${encodeURIComponent(workbookName)}`,
|
|
33364
|
-
event
|
|
33365
|
-
);
|
|
33366
|
-
setWorkbookName("");
|
|
33367
|
-
};
|
|
33368
33320
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
33369
33321
|
material.Box,
|
|
33370
33322
|
{
|
|
33371
33323
|
sx: { display: "flex", flexDirection: "column", minHeight: "100vh" },
|
|
33372
33324
|
children: [
|
|
33373
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33325
|
+
showHeader && /* @__PURE__ */ jsxRuntime.jsx(
|
|
33374
33326
|
material.AppBar,
|
|
33375
33327
|
{
|
|
33376
33328
|
position: "sticky",
|
|
@@ -33382,32 +33334,38 @@ function MainPage() {
|
|
|
33382
33334
|
},
|
|
33383
33335
|
children: /* @__PURE__ */ jsxRuntime.jsxs(material.Toolbar, { sx: { justifyContent: "space-between" }, children: [
|
|
33384
33336
|
/* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: [
|
|
33385
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33386
|
-
|
|
33387
|
-
|
|
33388
|
-
{
|
|
33389
|
-
|
|
33390
|
-
|
|
33391
|
-
|
|
33392
|
-
|
|
33393
|
-
|
|
33394
|
-
|
|
33395
|
-
|
|
33396
|
-
|
|
33397
|
-
|
|
33398
|
-
|
|
33399
|
-
|
|
33400
|
-
|
|
33401
|
-
|
|
33402
|
-
|
|
33403
|
-
|
|
33404
|
-
|
|
33405
|
-
|
|
33406
|
-
|
|
33407
|
-
|
|
33408
|
-
|
|
33409
|
-
|
|
33410
|
-
|
|
33337
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33338
|
+
material.Box,
|
|
33339
|
+
{
|
|
33340
|
+
sx: { display: "flex", alignItems: "center", gap: 1 },
|
|
33341
|
+
children: [
|
|
33342
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33343
|
+
material.Box,
|
|
33344
|
+
{
|
|
33345
|
+
component: "img",
|
|
33346
|
+
src: "/logo.svg",
|
|
33347
|
+
alt: "Malloy",
|
|
33348
|
+
sx: {
|
|
33349
|
+
width: 28,
|
|
33350
|
+
height: 28
|
|
33351
|
+
}
|
|
33352
|
+
}
|
|
33353
|
+
),
|
|
33354
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33355
|
+
material.Typography,
|
|
33356
|
+
{
|
|
33357
|
+
variant: "h5",
|
|
33358
|
+
sx: {
|
|
33359
|
+
color: "text.primary",
|
|
33360
|
+
fontWeight: 700,
|
|
33361
|
+
letterSpacing: "-0.025em"
|
|
33362
|
+
},
|
|
33363
|
+
children: "Malloy Publisher"
|
|
33364
|
+
}
|
|
33365
|
+
)
|
|
33366
|
+
]
|
|
33367
|
+
}
|
|
33368
|
+
),
|
|
33411
33369
|
/* @__PURE__ */ jsxRuntime.jsx(BreadcrumbNav, {})
|
|
33412
33370
|
] }),
|
|
33413
33371
|
/* @__PURE__ */ jsxRuntime.jsx(material.Stack, { direction: "row", spacing: 2, alignItems: "center", children: !projectName || !packageName ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -33428,90 +33386,13 @@ function MainPage() {
|
|
|
33428
33386
|
}
|
|
33429
33387
|
),
|
|
33430
33388
|
/* @__PURE__ */ jsxRuntime.jsx(material.Button, { href: "/api-doc.html", size: "small", children: "Publisher API" })
|
|
33431
|
-
] }) : /* @__PURE__ */ jsxRuntime.
|
|
33432
|
-
|
|
33433
|
-
|
|
33434
|
-
|
|
33435
|
-
|
|
33436
|
-
|
|
33437
|
-
|
|
33438
|
-
onClick: handleClick,
|
|
33439
|
-
variant: "contained",
|
|
33440
|
-
sx: {
|
|
33441
|
-
height: "40px",
|
|
33442
|
-
px: 2,
|
|
33443
|
-
backgroundColor: "#fbbb04",
|
|
33444
|
-
"&:hover": {
|
|
33445
|
-
backgroundColor: "#eab308"
|
|
33446
|
-
}
|
|
33447
|
-
},
|
|
33448
|
-
children: "Analyze Package"
|
|
33449
|
-
}
|
|
33450
|
-
),
|
|
33451
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33452
|
-
material.Menu,
|
|
33453
|
-
{
|
|
33454
|
-
id: "basic-menu",
|
|
33455
|
-
anchorEl,
|
|
33456
|
-
open,
|
|
33457
|
-
onClose: handleMenuClose,
|
|
33458
|
-
MenuListProps: {
|
|
33459
|
-
"aria-labelledby": "basic-button",
|
|
33460
|
-
sx: { py: 0.5 }
|
|
33461
|
-
},
|
|
33462
|
-
children: [
|
|
33463
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33464
|
-
material.MenuItem,
|
|
33465
|
-
{
|
|
33466
|
-
onClick: () => {
|
|
33467
|
-
setNewDialogOpen(true);
|
|
33468
|
-
handleMenuClose();
|
|
33469
|
-
},
|
|
33470
|
-
sx: { py: 1, px: 2 },
|
|
33471
|
-
children: [
|
|
33472
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Add, { fontSize: "small" }) }),
|
|
33473
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.ListItemText, { children: [
|
|
33474
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", fontWeight: 500, children: "New Workbook" }),
|
|
33475
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33476
|
-
material.Typography,
|
|
33477
|
-
{
|
|
33478
|
-
variant: "caption",
|
|
33479
|
-
color: "text.secondary",
|
|
33480
|
-
children: "Create a new analysis workbook"
|
|
33481
|
-
}
|
|
33482
|
-
)
|
|
33483
|
-
] })
|
|
33484
|
-
]
|
|
33485
|
-
}
|
|
33486
|
-
),
|
|
33487
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33488
|
-
material.MenuItem,
|
|
33489
|
-
{
|
|
33490
|
-
onClick: () => {
|
|
33491
|
-
setOpenDialogOpen(true);
|
|
33492
|
-
handleMenuClose();
|
|
33493
|
-
},
|
|
33494
|
-
sx: { py: 1, px: 2 },
|
|
33495
|
-
children: [
|
|
33496
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.ListItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(iconsMaterial.Launch, { fontSize: "small" }) }),
|
|
33497
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.ListItemText, { children: [
|
|
33498
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", fontWeight: 500, children: "Open Workbook" }),
|
|
33499
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33500
|
-
material.Typography,
|
|
33501
|
-
{
|
|
33502
|
-
variant: "caption",
|
|
33503
|
-
color: "text.secondary",
|
|
33504
|
-
children: "Open an existing workbook"
|
|
33505
|
-
}
|
|
33506
|
-
)
|
|
33507
|
-
] })
|
|
33508
|
-
]
|
|
33509
|
-
}
|
|
33510
|
-
)
|
|
33511
|
-
]
|
|
33512
|
-
}
|
|
33513
|
-
)
|
|
33514
|
-
] }) })
|
|
33389
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33390
|
+
AnalyzePackageButton,
|
|
33391
|
+
{
|
|
33392
|
+
projectName,
|
|
33393
|
+
packageName
|
|
33394
|
+
}
|
|
33395
|
+
) }) })
|
|
33515
33396
|
] })
|
|
33516
33397
|
}
|
|
33517
33398
|
),
|
|
@@ -33529,82 +33410,6 @@ function MainPage() {
|
|
|
33529
33410
|
},
|
|
33530
33411
|
children: /* @__PURE__ */ jsxRuntime.jsx(material.Box, { sx: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Outlet, {}) })
|
|
33531
33412
|
}
|
|
33532
|
-
),
|
|
33533
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33534
|
-
material.Dialog,
|
|
33535
|
-
{
|
|
33536
|
-
open: newDialogOpen,
|
|
33537
|
-
onClose: handleNewDialogClose,
|
|
33538
|
-
maxWidth: "sm",
|
|
33539
|
-
fullWidth: true,
|
|
33540
|
-
children: [
|
|
33541
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogTitle, { sx: { pb: 1, pt: 2, px: 2 }, children: [
|
|
33542
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, sx: { mb: 0.5 }, children: "Create New Workbook" }),
|
|
33543
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Start a new analysis workbook to explore your data" })
|
|
33544
|
-
] }),
|
|
33545
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.DialogContent, { sx: { px: 2, pb: 2 }, children: /* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { spacing: 2, sx: { mt: 1 }, children: [
|
|
33546
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.FormControl, { fullWidth: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33547
|
-
material.TextField,
|
|
33548
|
-
{
|
|
33549
|
-
label: "Workbook Name",
|
|
33550
|
-
value: workbookName,
|
|
33551
|
-
onChange: (e) => setWorkbookName(e.target.value),
|
|
33552
|
-
placeholder: "Enter workbook name...",
|
|
33553
|
-
fullWidth: true,
|
|
33554
|
-
autoFocus: true,
|
|
33555
|
-
size: "small"
|
|
33556
|
-
}
|
|
33557
|
-
) }),
|
|
33558
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.Stack, { direction: "row", spacing: 1, justifyContent: "flex-end", children: [
|
|
33559
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33560
|
-
material.Button,
|
|
33561
|
-
{
|
|
33562
|
-
onClick: handleNewDialogClose,
|
|
33563
|
-
variant: "outlined",
|
|
33564
|
-
size: "small",
|
|
33565
|
-
children: "Cancel"
|
|
33566
|
-
}
|
|
33567
|
-
),
|
|
33568
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33569
|
-
material.Button,
|
|
33570
|
-
{
|
|
33571
|
-
onClick: (event) => createNotebookClick(event),
|
|
33572
|
-
variant: "contained",
|
|
33573
|
-
disabled: !workbookName.trim(),
|
|
33574
|
-
size: "small",
|
|
33575
|
-
children: "Create Workbook"
|
|
33576
|
-
}
|
|
33577
|
-
)
|
|
33578
|
-
] })
|
|
33579
|
-
] }) })
|
|
33580
|
-
]
|
|
33581
|
-
}
|
|
33582
|
-
),
|
|
33583
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
33584
|
-
material.Dialog,
|
|
33585
|
-
{
|
|
33586
|
-
open: openDialogOpen,
|
|
33587
|
-
onClose: handleOpenDialogClose,
|
|
33588
|
-
maxWidth: "md",
|
|
33589
|
-
fullWidth: true,
|
|
33590
|
-
children: [
|
|
33591
|
-
/* @__PURE__ */ jsxRuntime.jsxs(material.DialogTitle, { sx: { pb: 1, pt: 2, px: 2 }, children: [
|
|
33592
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", fontWeight: 600, sx: { mb: 0.5 }, children: "Open Workbook" }),
|
|
33593
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Select an existing workbook to continue your analysis" })
|
|
33594
|
-
] }),
|
|
33595
|
-
/* @__PURE__ */ jsxRuntime.jsx(material.DialogContent, { sx: { px: 2, pb: 2 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33596
|
-
NotebookStorageProvider,
|
|
33597
|
-
{
|
|
33598
|
-
notebookStorage: new BrowserNotebookStorage(),
|
|
33599
|
-
userContext: {
|
|
33600
|
-
project: projectName || "",
|
|
33601
|
-
package: packageName || ""
|
|
33602
|
-
},
|
|
33603
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(SimpleNotebookList, { onNotebookClick: handleNotebookClick })
|
|
33604
|
-
}
|
|
33605
|
-
) })
|
|
33606
|
-
]
|
|
33607
|
-
}
|
|
33608
33413
|
)
|
|
33609
33414
|
]
|
|
33610
33415
|
}
|