@malloy-publisher/sdk 0.17.0 → 0.17.1
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/README.md +32 -50
- package/dist/{RenderedResult-BcEDcw0V.es.js → RenderedResult-CYJ2Y9Fm.es.js} +24 -24
- package/dist/{RenderedResult-uT2oc6ke.cjs.js → RenderedResult-hRvgFMAF.cjs.js} +1 -1
- package/dist/ServerProvider-DeVejmVr.cjs.js +1 -0
- package/dist/{ServerProvider-vmEUjlEu.es.js → ServerProvider-DzzfVDg_.es.js} +1314 -1712
- package/dist/builder/index.cjs.js +12 -12
- package/dist/builder/index.es.js +4 -9
- package/dist/client/api.d.ts +54 -505
- package/dist/client/configuration.d.ts +1 -1
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client/index.es.js +132 -144
- package/dist/components/Dashboard/DashboardGrid.d.ts +1 -1
- package/dist/components/Model/ExplorerPage.d.ts +1 -3
- package/dist/components/Model/Model.d.ts +1 -4
- package/dist/components/Model/ModelExplorer.d.ts +1 -2
- package/dist/components/Package/reportQueries.d.ts +2 -4
- package/dist/components/Report/Report.d.ts +20 -9
- package/dist/components/{legacy → Report}/malloynb/CellRunnerView.d.ts +13 -16
- package/dist/components/Report/malloynb/MalloynbReport.d.ts +11 -0
- package/dist/components/{legacy → Report}/malloynb/cellKind.d.ts +1 -1
- package/dist/components/ServerProvider.d.ts +1 -3
- package/dist/components/drill/drillClauses.d.ts +8 -9
- package/dist/components/drill/rowsTarget.d.ts +7 -9
- package/dist/components/legacy/index.d.ts +3 -7
- package/dist/components/modelPage.d.ts +2 -5
- package/dist/hooks/useModelGivens.d.ts +2 -2
- package/dist/hooks/useQueryResult.d.ts +7 -0
- package/dist/index.cjs.js +33 -33
- package/dist/index.es.js +8799 -8903
- package/dist/{useCompiledDocument-h5-Kc1Zh.cjs.js → useCompiledDocument-BCr-xB_i.cjs.js} +4 -4
- package/dist/{useCompiledDocument-rOwDSK_s.es.js → useCompiledDocument-E0tU5KzP.es.js} +266 -277
- package/package.json +1 -1
- package/src/components/Dashboard/DashboardGrid.tsx +1 -1
- package/src/components/Dashboard/DashboardTile.spec.tsx +1 -1
- package/src/components/Model/ExplorerPage.tsx +1 -3
- package/src/components/Model/Model.tsx +1 -4
- package/src/components/Model/ModelExplorer.tsx +1 -2
- package/src/components/Package/Package.tsx +1 -5
- package/src/components/Package/reportQueries.ts +3 -15
- package/src/components/Report/Report.malloynb.spec.tsx +230 -0
- package/src/components/Report/Report.spec.tsx +429 -38
- package/src/components/Report/Report.telemetry.spec.tsx +51 -10
- package/src/components/Report/Report.tsx +63 -44
- package/src/components/{legacy → Report}/malloynb/CellRunnerView.spec.tsx +11 -44
- package/src/components/{legacy → Report}/malloynb/CellRunnerView.tsx +63 -107
- package/src/components/Report/malloynb/MalloynbReport.tsx +110 -0
- package/src/components/{legacy → Report}/malloynb/cellKind.ts +5 -4
- package/src/components/ReportBuilder/EditorSurface.tsx +3 -3
- package/src/components/ReportBuilder/ReportBuilder.spec.tsx +2 -2
- package/src/components/ReportBuilder/ReportEditor.notebook.spec.tsx +0 -4
- package/src/components/ReportBuilder/ReportEditor.queryVersion.spec.tsx +0 -1
- package/src/components/ReportBuilder/ReportEditor.resourceUri.spec.tsx +3 -3
- package/src/components/ReportBuilder/ReportEditor.tsx +1 -1
- package/src/components/ReportBuilder/loadMalloy.ts +1 -4
- package/src/components/ReportBuilder/useSaveChannel.ts +1 -6
- package/src/components/ServerProvider.tsx +0 -4
- package/src/components/drill/drillClauses.ts +8 -9
- package/src/components/drill/rowsTarget.ts +7 -9
- package/src/components/index.ts +2 -3
- package/src/components/legacy/index.ts +3 -7
- package/src/components/modelPage.ts +2 -5
- package/src/hooks/useGivensState.ts +8 -8
- package/src/hooks/useModelGivens.ts +2 -2
- package/src/hooks/useQueryResult.ts +30 -18
- package/test/README.md +4 -4
- package/dist/ServerProvider-DDRwHiPz.cjs.js +0 -1
- package/dist/components/legacy/Dashboard.d.ts +0 -68
- package/dist/components/legacy/malloynb/MalloynbCells.d.ts +0 -13
- package/dist/components/legacy/malloynb/Notebook.d.ts +0 -15
- package/dist/components/legacy/queryKeys.d.ts +0 -8
- package/src/components/legacy/Dashboard.spec.tsx +0 -242
- package/src/components/legacy/Dashboard.tsx +0 -181
- package/src/components/legacy/malloynb/MalloynbCells.tsx +0 -88
- package/src/components/legacy/malloynb/Notebook.layout.spec.tsx +0 -103
- package/src/components/legacy/malloynb/Notebook.served.spec.tsx +0 -84
- package/src/components/legacy/malloynb/Notebook.spec.tsx +0 -223
- package/src/components/legacy/malloynb/Notebook.tsx +0 -46
- package/src/components/legacy/queryKeys.ts +0 -26
- /package/dist/components/{legacy → Report}/malloynb/NotebookCell.d.ts +0 -0
- /package/dist/components/{legacy → Report}/malloynb/runPlan.d.ts +0 -0
- /package/dist/components/{legacy → Report}/malloynb/types.d.ts +0 -0
- /package/src/components/{legacy → Report}/malloynb/NotebookCell.tsx +0 -0
- /package/src/components/{legacy → Report}/malloynb/cellKind.spec.ts +0 -0
- /package/src/components/{legacy → Report}/malloynb/runPlan.spec.ts +0 -0
- /package/src/components/{legacy → Report}/malloynb/runPlan.ts +0 -0
- /package/src/components/{legacy → Report}/malloynb/types.ts +0 -0
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Credible Data Inc.
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
import { parseResourceUri } from "../../../utils/formatting";
|
|
5
|
-
import type { CellReportProps } from "./CellRunnerView";
|
|
6
|
-
import { DashboardView } from "../../Dashboard/DashboardView";
|
|
7
|
-
import { MalloynbCells, useNotebookQuery } from "./MalloynbCells";
|
|
8
|
-
|
|
9
|
-
type NotebookProps = CellReportProps;
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A notebook by its package path, read through the deprecated
|
|
13
|
-
* `GET …/notebooks/{path}`: a tile layout drawn as a linear report, anything
|
|
14
|
-
* else (a `.malloynb`, or a report written as `run:` cells) cell by cell
|
|
15
|
-
* through the deprecated cell route.
|
|
16
|
-
*
|
|
17
|
-
* @deprecated Render `Report` with the file's path instead: it reads
|
|
18
|
-
* `GET …/reports/{path}` and renders either layout. Kept, over the same
|
|
19
|
-
* renderers, for hosts that still mount it and for the `.malloynb` format,
|
|
20
|
-
* which only these routes run.
|
|
21
|
-
*/
|
|
22
|
-
// Requires PackageProvider
|
|
23
|
-
export default function Notebook(props: NotebookProps) {
|
|
24
|
-
const { data: notebook } = useNotebookQuery(props.resourceUri);
|
|
25
|
-
// A notebook written as a tile layout is a linear report: the report view,
|
|
26
|
-
// in one column.
|
|
27
|
-
if (notebook?.dashboard) {
|
|
28
|
-
const { environmentName, packageName, versionId, modelPath } =
|
|
29
|
-
parseResourceUri(props.resourceUri);
|
|
30
|
-
return (
|
|
31
|
-
<DashboardView
|
|
32
|
-
manifest={{ ...notebook.dashboard, layout: "linear" }}
|
|
33
|
-
environmentName={environmentName}
|
|
34
|
-
packageName={packageName}
|
|
35
|
-
versionId={versionId}
|
|
36
|
-
documentName={modelPath}
|
|
37
|
-
givens={props.givens}
|
|
38
|
-
onGivensChange={props.onGivensChange}
|
|
39
|
-
onNavigate={props.onDrillNavigate}
|
|
40
|
-
{...(props.onNavigate ? { onLinkNavigate: props.onNavigate } : {})}
|
|
41
|
-
maxResultSize={props.maxResultSize}
|
|
42
|
-
/>
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
return <MalloynbCells {...props} />;
|
|
46
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Credible Data Inc.
|
|
2
|
-
// SPDX-License-Identifier: MIT
|
|
3
|
-
|
|
4
|
-
import type { QueryKey } from "@tanstack/react-query";
|
|
5
|
-
import { encodeResourceUri } from "../../utils/formatting";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The cache entries the deprecated report readers keep: the `Dashboard`
|
|
9
|
-
* wrapper's manifest, the old dashboard and notebook listings a host may
|
|
10
|
-
* still key on, and the `Notebook` wrapper's read, which it keys on the
|
|
11
|
-
* report's resource URI.
|
|
12
|
-
*/
|
|
13
|
-
export function legacyReportQueryKeys(
|
|
14
|
-
environmentName: string,
|
|
15
|
-
packageName: string,
|
|
16
|
-
modelPath?: string,
|
|
17
|
-
): QueryKey[] {
|
|
18
|
-
return [
|
|
19
|
-
["dashboards"],
|
|
20
|
-
["notebooks"],
|
|
21
|
-
["dashboard"],
|
|
22
|
-
...(modelPath === undefined
|
|
23
|
-
? []
|
|
24
|
-
: [[encodeResourceUri({ environmentName, packageName, modelPath })]]),
|
|
25
|
-
];
|
|
26
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|