@malloy-publisher/sdk 0.9.10 → 0.9.12
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/{RenderedResult-Dp1Qdajz.es.js → RenderedResult-CDiXJAh9.es.js} +102 -102
- package/dist/RenderedResult-De51QvsZ.cjs.js +153 -0
- package/dist/ServerProvider-DKrBcXL7.cjs.js +1 -0
- package/dist/{ServerProvider-CQy4jVYK.es.js → ServerProvider-RvKSbvnL.es.js} +622 -587
- package/dist/builder/index.cjs.js +78 -130
- package/dist/builder/index.es.js +7493 -6769
- package/dist/builder-entry.d.ts +3 -0
- package/dist/client/api.d.ts +72 -23
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +1 -1
- package/dist/components/AppDialog.d.ts +9 -1
- package/dist/components/Connections/common.d.ts +11 -3
- package/dist/components/Dashboard/DashboardGrid.d.ts +14 -15
- package/dist/components/Dashboard/DashboardTile.d.ts +8 -1
- package/dist/components/Dashboard/DashboardView.d.ts +22 -34
- package/dist/components/Dashboard/TileCard.d.ts +10 -3
- package/dist/components/Dashboard/useStuck.d.ts +15 -7
- package/dist/components/DocumentCreate/useDocumentChoices.d.ts +6 -0
- package/dist/components/Package/PackageProblems.d.ts +14 -0
- package/dist/components/RemoveBadge.d.ts +40 -0
- package/dist/components/Report/Report.d.ts +13 -4
- package/dist/components/Report/ReportPage.d.ts +60 -0
- package/dist/components/Report/layoutRules.d.ts +32 -0
- package/dist/components/Report/reportQuery.d.ts +30 -0
- package/dist/components/Report/telemetry.d.ts +0 -2
- package/dist/components/ReportBuilder/AddTileDialog.d.ts +22 -3
- package/dist/components/ReportBuilder/BuilderBar.d.ts +17 -0
- package/dist/components/ReportBuilder/BuilderDialogs.d.ts +7 -6
- package/dist/components/ReportBuilder/BuilderGrid.d.ts +10 -4
- package/dist/components/ReportBuilder/BuilderHeader.d.ts +4 -7
- package/dist/components/ReportBuilder/BuilderToolbar.d.ts +88 -0
- package/dist/components/ReportBuilder/DrillDialog.d.ts +3 -1
- package/dist/components/ReportBuilder/EditorSurface.d.ts +7 -9
- package/dist/components/ReportBuilder/FilterDialog.d.ts +3 -1
- package/dist/components/ReportBuilder/FilterStrip.d.ts +30 -8
- package/dist/components/ReportBuilder/InlineMarkdown.d.ts +4 -4
- package/dist/components/ReportBuilder/ReportBuilder.d.ts +49 -12
- package/dist/components/ReportBuilder/ReportEditor.d.ts +53 -3
- package/dist/components/ReportBuilder/TextTileBody.d.ts +2 -5
- package/dist/components/ReportBuilder/TileFrame.d.ts +10 -4
- package/dist/components/ReportBuilder/TileMenu.d.ts +12 -9
- package/dist/components/ReportBuilder/ViewPicker.d.ts +53 -0
- package/dist/components/ReportBuilder/addTileToDocument.d.ts +24 -3
- package/dist/components/ReportBuilder/builderControls.d.ts +60 -0
- package/dist/components/ReportBuilder/catalog.d.ts +2 -4
- package/dist/components/ReportBuilder/inlineEdit.d.ts +9 -10
- package/dist/components/ReportBuilder/localGiven.d.ts +12 -0
- package/dist/components/ReportBuilder/preview.d.ts +17 -2
- package/dist/components/ReportBuilder/readDocument.d.ts +0 -2
- package/dist/components/ReportBuilder/readForEditor.d.ts +2 -7
- package/dist/components/ReportBuilder/reportTag.d.ts +11 -1
- package/dist/components/ReportBuilder/sortable.d.ts +4 -3
- package/dist/components/ReportBuilder/testing/inline.d.ts +5 -1
- package/dist/components/ReportBuilder/useBuilderSelection.d.ts +0 -1
- package/dist/components/ReportBuilder/useBuilderSession.d.ts +21 -12
- package/dist/components/ReportBuilder/useDocumentEditor.d.ts +2 -6
- package/dist/components/ReportBuilder/useExitGuard.d.ts +3 -0
- package/dist/components/ReportBuilder/useFilterForm.d.ts +3 -1
- package/dist/components/ReportBuilder/useOpenedDocument.d.ts +0 -4
- package/dist/components/ReportBuilder/useReportDraft.d.ts +66 -0
- package/dist/components/ReportBuilder/useReportEditor.d.ts +0 -9
- package/dist/components/ReportBuilder/useTileEditing.d.ts +6 -3
- package/dist/components/ReportBuilder/viewAnnotations.d.ts +9 -0
- package/dist/components/ReportBuilder/widthLabel.d.ts +6 -0
- package/dist/components/ServerProvider.d.ts +9 -0
- package/dist/components/controlTokens.d.ts +45 -0
- package/dist/components/drill/markDrillableCells.d.ts +1 -1
- package/dist/components/given/FilterButton.d.ts +35 -0
- package/dist/components/given/GivensPanel.d.ts +2 -1
- package/dist/components/given/filterEditing.d.ts +54 -0
- package/dist/components/given/filterSummary.d.ts +9 -0
- package/dist/components/given/paramCodec.d.ts +11 -0
- package/dist/components/given/required.d.ts +25 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/legacy/index.d.ts +1 -1
- package/dist/components/{Report/CellReport.d.ts → legacy/malloynb/CellRunnerView.d.ts} +9 -17
- package/dist/components/legacy/{MalloynbCells.d.ts → malloynb/MalloynbCells.d.ts} +3 -3
- package/dist/components/legacy/{Notebook.d.ts → malloynb/Notebook.d.ts} +1 -1
- package/dist/components/{Notebook → legacy/malloynb}/NotebookCell.d.ts +3 -3
- package/dist/components/legacy/malloynb/cellKind.d.ts +5 -0
- package/dist/components/{Notebook → legacy/malloynb}/types.d.ts +1 -1
- package/dist/components/styles.d.ts +0 -2
- package/dist/hooks/useQueryResult.d.ts +7 -0
- package/dist/index.cjs.js +16 -19
- package/dist/index.es.js +8418 -7722
- package/dist/theme/ThemeContext.d.ts +8 -1
- package/dist/theme/classes.d.ts +49 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/types.d.ts +7 -0
- package/dist/theme/ui.d.ts +75 -0
- package/dist/{useCompiledDocument-BMPDvdFx.es.js → useCompiledDocument-Bf4RSfB6.es.js} +8669 -7851
- package/dist/useCompiledDocument-XsQz85Ri.cjs.js +141 -0
- package/package.json +2 -2
- package/src/builder-entry.ts +9 -0
- package/src/components/AppDialog.tsx +23 -0
- package/src/components/Connections/AddConnectionDialog.tsx +34 -2
- package/src/components/Connections/EditConnectionDialog.tsx +45 -3
- package/src/components/Connections/common.spec.ts +69 -0
- package/src/components/Connections/common.ts +132 -0
- package/src/components/Dashboard/DashboardGrid.tsx +39 -17
- package/src/components/Dashboard/DashboardTile.tsx +19 -2
- package/src/components/Dashboard/DashboardView.spec.tsx +216 -15
- package/src/components/Dashboard/DashboardView.tsx +137 -155
- package/src/components/Dashboard/RowsDialog.tsx +1 -2
- package/src/components/Dashboard/TileCard.tsx +28 -10
- package/src/components/Dashboard/defaultTileSpan.spec.ts +24 -0
- package/src/components/Dashboard/useStuck.ts +28 -17
- package/src/components/DocumentCreate/useDocumentChoices.ts +19 -2
- package/src/components/Environment/Connections.tsx +1 -0
- package/src/components/Package/NewDocumentDialog.spec.tsx +76 -59
- package/src/components/Package/NewDocumentDialog.tsx +383 -119
- package/src/components/Package/Package.artifacts.spec.tsx +1 -1
- package/src/components/Package/Package.create.spec.tsx +7 -6
- package/src/components/Package/Package.tsx +10 -7
- package/src/components/Package/PackageProblems.spec.tsx +41 -0
- package/src/components/Package/PackageProblems.tsx +95 -0
- package/src/components/Prose.tsx +12 -7
- package/src/components/RemoveBadge.tsx +94 -0
- package/src/components/RenderedResult/RenderedResult.tsx +5 -9
- package/src/components/RenderedResult/ResultPanel.tsx +59 -3
- package/src/components/Report/Report.spec.tsx +50 -32
- package/src/components/Report/Report.telemetry.spec.tsx +0 -45
- package/src/components/Report/Report.tsx +45 -77
- package/src/components/Report/ReportPage.tsx +168 -0
- package/src/components/Report/layoutRules.spec.ts +35 -0
- package/src/components/Report/layoutRules.ts +55 -0
- package/src/components/Report/reportQuery.ts +53 -0
- package/src/components/Report/telemetry.ts +0 -2
- package/src/components/ReportBuilder/AddTileDialog.spec.tsx +76 -41
- package/src/components/ReportBuilder/AddTileDialog.tsx +368 -133
- package/src/components/ReportBuilder/BuilderBar.tsx +599 -0
- package/src/components/ReportBuilder/BuilderDialogs.tsx +28 -39
- package/src/components/ReportBuilder/BuilderGrid.tsx +31 -29
- package/src/components/ReportBuilder/BuilderHeader.tsx +63 -75
- package/src/components/ReportBuilder/BuilderToolbar.tsx +95 -9
- package/src/components/ReportBuilder/DrillDialog.tsx +240 -128
- package/src/components/ReportBuilder/EditorSurface.tsx +345 -69
- package/src/components/ReportBuilder/FilterDialog.tsx +516 -166
- package/src/components/ReportBuilder/FilterStrip.tsx +130 -151
- package/src/components/ReportBuilder/InlineMarkdown.tsx +71 -45
- package/src/components/ReportBuilder/ReportBuilder.charts.spec.tsx +35 -40
- package/src/components/ReportBuilder/ReportBuilder.controls.spec.tsx +491 -0
- package/src/components/ReportBuilder/ReportBuilder.exit.spec.tsx +2 -4
- package/src/components/ReportBuilder/ReportBuilder.inline.spec.tsx +13 -15
- package/src/components/ReportBuilder/ReportBuilder.notebook.spec.tsx +27 -118
- package/src/components/ReportBuilder/ReportBuilder.openDraft.spec.tsx +12 -5
- package/src/components/ReportBuilder/ReportBuilder.sources.spec.tsx +2 -10
- package/src/components/ReportBuilder/ReportBuilder.spec.tsx +37 -31
- package/src/components/ReportBuilder/ReportBuilder.textTiles.spec.tsx +22 -15
- package/src/components/ReportBuilder/ReportBuilder.tsx +292 -117
- package/src/components/ReportBuilder/ReportEditor.emptyStart.spec.tsx +2 -1
- package/src/components/ReportBuilder/ReportEditor.modelFilters.spec.tsx +312 -0
- package/src/components/ReportBuilder/ReportEditor.notebook.spec.tsx +26 -75
- package/src/components/ReportBuilder/ReportEditor.package.spec.tsx +6 -2
- package/src/components/ReportBuilder/ReportEditor.resourceUri.spec.tsx +3 -2
- package/src/components/ReportBuilder/ReportEditor.spec.tsx +2 -4
- package/src/components/ReportBuilder/ReportEditor.textSource.spec.tsx +93 -13
- package/src/components/ReportBuilder/ReportEditor.tsx +104 -14
- package/src/components/ReportBuilder/TextTileBody.tsx +6 -7
- package/src/components/ReportBuilder/TileFrame.tsx +212 -75
- package/src/components/ReportBuilder/TileMenu.tsx +241 -140
- package/src/components/ReportBuilder/ViewPicker.tsx +349 -0
- package/src/components/ReportBuilder/addTile.compile.spec.ts +1 -1
- package/src/components/ReportBuilder/addTileToDocument.spec.ts +102 -3
- package/src/components/ReportBuilder/addTileToDocument.ts +122 -25
- package/src/components/ReportBuilder/builderControls.ts +164 -0
- package/src/components/ReportBuilder/builderReport.ts +1 -2
- package/src/components/ReportBuilder/catalog.ts +10 -26
- package/src/components/ReportBuilder/inlineEdit.tsx +22 -54
- package/src/components/ReportBuilder/localGiven.ts +56 -0
- package/src/components/ReportBuilder/preview.spec.ts +125 -5
- package/src/components/ReportBuilder/preview.ts +60 -44
- package/src/components/ReportBuilder/readDocument.spec.ts +16 -22
- package/src/components/ReportBuilder/readDocument.ts +14 -11
- package/src/components/ReportBuilder/readForEditor.spec.ts +12 -41
- package/src/components/ReportBuilder/readForEditor.ts +4 -26
- package/src/components/ReportBuilder/reportTag.ts +28 -7
- package/src/components/ReportBuilder/sortable.tsx +15 -7
- package/src/components/ReportBuilder/spliceDocument.imports.spec.ts +1 -1
- package/src/components/ReportBuilder/tagParse.spec.ts +0 -40
- package/src/components/ReportBuilder/testing/inline.ts +25 -5
- package/src/components/ReportBuilder/testing/reportLayoutParity.json +13 -8
- package/src/components/ReportBuilder/textTiles.spec.ts +7 -6
- package/src/components/ReportBuilder/useBuilderSelection.ts +35 -0
- package/src/components/ReportBuilder/useBuilderSession.spec.ts +2 -2
- package/src/components/ReportBuilder/useBuilderSession.ts +21 -13
- package/src/components/ReportBuilder/useDocumentEditor.spec.ts +0 -58
- package/src/components/ReportBuilder/useDocumentEditor.ts +3 -16
- package/src/components/ReportBuilder/useEditorCatalog.spec.tsx +26 -0
- package/src/components/ReportBuilder/useEditorCatalog.ts +7 -2
- package/src/components/ReportBuilder/useExitGuard.ts +16 -0
- package/src/components/ReportBuilder/useFilterForm.spec.tsx +17 -0
- package/src/components/ReportBuilder/useFilterForm.ts +5 -1
- package/src/components/ReportBuilder/useOpenedDocument.ts +0 -2
- package/src/components/ReportBuilder/useReportDraft.spec.ts +149 -0
- package/src/components/ReportBuilder/useReportDraft.ts +292 -0
- package/src/components/ReportBuilder/useReportEditor.ts +3 -12
- package/src/components/ReportBuilder/useSaveChannel.ts +0 -1
- package/src/components/ReportBuilder/useTileEditing.ts +43 -12
- package/src/components/ReportBuilder/viewAnnotations.ts +29 -0
- package/src/components/ReportBuilder/widthLabel.spec.ts +25 -0
- package/src/components/ReportBuilder/widthLabel.ts +26 -0
- package/src/components/ServerProvider.tsx +11 -0
- package/src/components/controlTokens.ts +47 -0
- package/src/components/drill/markDrillableCells.ts +2 -1
- package/src/components/given/FilterButton.spec.tsx +143 -0
- package/src/components/given/FilterButton.tsx +478 -0
- package/src/components/given/GivenInput.spec.tsx +47 -0
- package/src/components/given/GivenInput.tsx +20 -2
- package/src/components/given/GivensPanel.spec.tsx +11 -3
- package/src/components/given/GivensPanel.tsx +45 -44
- package/src/components/given/filterEditing.ts +60 -0
- package/src/components/given/filterSummary.spec.ts +108 -0
- package/src/components/given/filterSummary.ts +109 -0
- package/src/components/given/paramCodec.ts +1 -1
- package/src/components/given/required.spec.ts +60 -0
- package/src/components/given/required.ts +78 -0
- package/src/components/index.ts +9 -0
- package/src/components/legacy/Dashboard.spec.tsx +3 -1
- package/src/components/legacy/index.ts +1 -1
- package/src/components/{Report/CellReport.spec.tsx → legacy/malloynb/CellRunnerView.spec.tsx} +53 -57
- package/src/components/{Report/CellReport.tsx → legacy/malloynb/CellRunnerView.tsx} +122 -136
- package/src/components/legacy/{MalloynbCells.tsx → malloynb/MalloynbCells.tsx} +6 -6
- package/src/components/legacy/{Notebook.layout.spec.tsx → malloynb/Notebook.layout.spec.tsx} +16 -7
- package/src/components/legacy/malloynb/Notebook.served.spec.tsx +84 -0
- package/src/components/legacy/{Notebook.spec.tsx → malloynb/Notebook.spec.tsx} +5 -3
- package/src/components/legacy/{Notebook.tsx → malloynb/Notebook.tsx} +9 -7
- package/src/components/{Notebook → legacy/malloynb}/NotebookCell.tsx +70 -150
- package/src/components/legacy/malloynb/cellKind.spec.ts +33 -0
- package/src/components/legacy/malloynb/cellKind.ts +24 -0
- package/src/components/{Notebook → legacy/malloynb}/types.ts +1 -1
- package/src/components/styles.ts +0 -18
- package/src/hooks/useGivensState.ts +7 -3
- package/src/hooks/useQueryResult.placeholder.spec.ts +44 -0
- package/src/hooks/useQueryResult.ts +26 -1
- package/src/theme/ThemeContext.tsx +21 -1
- package/src/theme/classes.ts +52 -0
- package/src/theme/index.ts +8 -0
- package/src/theme/resolveTheme.ts +3 -0
- package/src/theme/types.ts +7 -0
- package/src/theme/ui.spec.tsx +91 -0
- package/src/theme/ui.ts +115 -0
- package/dist/RenderedResult-BcgYjkZ0.cjs.js +0 -153
- package/dist/ServerProvider-B0dUY8be.cjs.js +0 -1
- package/dist/components/Notebook/cellKind.d.ts +0 -20
- package/dist/components/Report/LinearReport.d.ts +0 -18
- package/dist/components/ReportBuilder/SourceViewPicker.d.ts +0 -9
- package/dist/components/ReportBuilder/legacyNotebook.d.ts +0 -73
- package/dist/components/ReportBuilder/useConversionConfirm.d.ts +0 -20
- package/dist/useCompiledDocument-UY28ITET.cjs.js +0 -141
- package/src/components/Notebook/cellKind.spec.ts +0 -199
- package/src/components/Notebook/cellKind.ts +0 -74
- package/src/components/Report/LinearReport.tsx +0 -71
- package/src/components/ReportBuilder/SourceViewPicker.tsx +0 -122
- package/src/components/ReportBuilder/legacyNotebook.chart.spec.ts +0 -77
- package/src/components/ReportBuilder/legacyNotebook.convert.spec.ts +0 -626
- package/src/components/ReportBuilder/legacyNotebook.read.spec.ts +0 -338
- package/src/components/ReportBuilder/legacyNotebook.ts +0 -1122
- package/src/components/ReportBuilder/useConversionConfirm.ts +0 -55
- package/src/components/legacy/Notebook.served.spec.tsx +0 -183
- /package/dist/components/{Notebook → legacy/malloynb}/runPlan.d.ts +0 -0
- /package/src/components/{Notebook → legacy/malloynb}/runPlan.spec.ts +0 -0
- /package/src/components/{Notebook → legacy/malloynb}/runPlan.ts +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Given } from '../../client';
|
|
2
|
+
import { GivenValue } from '../../hooks/givenValue';
|
|
3
|
+
/**
|
|
4
|
+
* Whether a given must be set before anything that reads it can run: the
|
|
5
|
+
* server says it declares no default (`required`), and Malloy then refuses
|
|
6
|
+
* the query ("Given 'X' has no value and no default").
|
|
7
|
+
*
|
|
8
|
+
* The explicit flag, not an absent `default`: a server or proxy that does not
|
|
9
|
+
* send `required` leaves every tile running as before, where reading absence
|
|
10
|
+
* would make every given look required on one that drops `default`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const isRequiredGiven: (given: Given) => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The page's required controls that have no value yet, in row order. A tile
|
|
15
|
+
* that reads one is not run; the page asks for them instead.
|
|
16
|
+
*/
|
|
17
|
+
export declare function missingRequiredGivens(specs: readonly Given[], values: ReadonlyMap<string, GivenValue>,
|
|
18
|
+
/** Values the host sets itself, which count as set. */
|
|
19
|
+
hostGivens?: Readonly<Record<string, unknown>>): Given[];
|
|
20
|
+
/** The required givens among `missing` that a tile reading `reads` waits on. */
|
|
21
|
+
export declare function waitingOn(missing: readonly Given[], reads: readonly string[] | undefined): Given[];
|
|
22
|
+
/** What the page says while a required filter is unset: "Pick a value for Recall Year to see this report." */
|
|
23
|
+
export declare function requiredPrompt(missing: readonly Given[]): string;
|
|
24
|
+
/** What a tile waiting on required filters says in place of its result. */
|
|
25
|
+
export declare function waitingText(waiting: readonly Given[]): string;
|
|
@@ -4,6 +4,9 @@ export { AppDialog } from './AppDialog';
|
|
|
4
4
|
export { UnsavedChangesDialog } from './UnsavedChangesDialog';
|
|
5
5
|
export { BackLink } from './BackLink';
|
|
6
6
|
export { NarrowEditGate } from './NarrowEditGate';
|
|
7
|
+
export { localGivenSpec } from './ReportBuilder/localGiven';
|
|
8
|
+
export { malloyLiteral } from '../utils/malloyLiteral';
|
|
9
|
+
export { clearReportDraft, draftStorageAvailable, reportDraftKey, type ReportDraftTarget, } from './ReportBuilder/useReportDraft';
|
|
7
10
|
export { MONO_FONT_FAMILY, PALETTE, SURFACE_TINT } from './styles';
|
|
8
11
|
export { useRouterClickHandler, type NavigationClick } from './click_helper';
|
|
9
12
|
export * from './Dashboard';
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
* and its line below.
|
|
7
7
|
*/
|
|
8
8
|
export { Dashboard, type DashboardProps } from './Dashboard';
|
|
9
|
-
export { default as Notebook } from './Notebook';
|
|
9
|
+
export { default as Notebook } from './malloynb/Notebook';
|
|
10
10
|
export { type DocumentKind } from './kindAdapter';
|
|
11
11
|
export { documentRoute, legacyAliasOf, locateDocument, locateReportByName, type NameLookup, } from './nameAlias';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NotebookCell as RawCell, RawNotebook } from '
|
|
2
|
-
import { GivenValue } from '
|
|
3
|
-
import { ApiError } from '
|
|
4
|
-
import { NavigationClick } from '
|
|
5
|
-
import { DrillNavigation } from '
|
|
1
|
+
import { NotebookCell as RawCell, RawNotebook } from '../../../client';
|
|
2
|
+
import { GivenValue } from '../../../hooks/givenValue';
|
|
3
|
+
import { ApiError } from '../../ApiErrorDisplay';
|
|
4
|
+
import { NavigationClick } from '../../click_helper';
|
|
5
|
+
import { DrillNavigation } from '../../drill';
|
|
6
6
|
/** What one cell's run is handed: the cell, its index, the values to run it with, and the signal that cancels it. */
|
|
7
7
|
interface CellRun {
|
|
8
8
|
cell: RawCell;
|
|
@@ -19,6 +19,9 @@ export type CellRunner = (run: CellRun) => Promise<{
|
|
|
19
19
|
export interface CellReportProps {
|
|
20
20
|
/** `publisher://…/models/<path>`: the report, and the model its cells run against. */
|
|
21
21
|
resourceUri: string;
|
|
22
|
+
/** The report's title and description, drawn in the header every report has. */
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
22
25
|
maxResultSize?: number;
|
|
23
26
|
/**
|
|
24
27
|
* Parameter values from the host, typically its URL query parameters: the
|
|
@@ -69,21 +72,10 @@ export interface CellReportProps {
|
|
|
69
72
|
* read) and the runner that executes one; what reads the cells and what runs
|
|
70
73
|
* them is the caller's.
|
|
71
74
|
*/
|
|
72
|
-
export declare function CellRunnerView({ resourceUri, maxResultSize, givens, onGivensChange, onNavigate, onDrillNavigate, notebook, error, runCell, }: CellReportProps & {
|
|
75
|
+
export declare function CellRunnerView({ resourceUri, title, description, maxResultSize, givens, onGivensChange, onNavigate, onDrillNavigate, notebook, error, runCell, }: CellReportProps & {
|
|
73
76
|
notebook: RawNotebook | undefined;
|
|
74
77
|
/** Why the cells could not be read; the view says so in place of them. */
|
|
75
78
|
error?: ApiError | null;
|
|
76
79
|
runCell: CellRunner;
|
|
77
80
|
}): import("react/jsx-runtime").JSX.Element;
|
|
78
|
-
/**
|
|
79
|
-
* A `.malloy` report written as `run:` cells, whose cells the caller already
|
|
80
|
-
* holds (`Report` reads them off `GET …/reports/{path}`). Each runs through
|
|
81
|
-
* the governed query endpoint the grid tiles use
|
|
82
|
-
* (`POST …/models/{path}/query`, the report's path as the model and the cell's
|
|
83
|
-
* text as the query), which holds a cell to the same surface, `#(authorize)`
|
|
84
|
-
* and row-level gates a tile is held to.
|
|
85
|
-
*/
|
|
86
|
-
export declare function CellReport({ notebook: held, ...props }: CellReportProps & {
|
|
87
|
-
notebook: RawNotebook;
|
|
88
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
89
81
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RawNotebook } from '
|
|
2
|
-
import { CellReportProps } from '
|
|
1
|
+
import { RawNotebook } from '../../../client';
|
|
2
|
+
import { CellReportProps } from './CellRunnerView';
|
|
3
3
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
4
|
-
import { ApiError } from '
|
|
4
|
+
import { ApiError } from '../../ApiErrorDisplay';
|
|
5
5
|
/** The deprecated notebook read, one cache entry per URI however many components ask. */
|
|
6
6
|
export declare function useNotebookQuery(resourceUri: string): UseQueryResult<RawNotebook, ApiError>;
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Given } from '
|
|
2
|
-
import { NavigationClick } from '
|
|
3
|
-
import { DrillNavigation } from '
|
|
1
|
+
import { Given } from '../../../client';
|
|
2
|
+
import { NavigationClick } from '../../click_helper';
|
|
3
|
+
import { DrillNavigation } from '../../drill';
|
|
4
4
|
import { EnhancedNotebookCell } from './types';
|
|
5
5
|
interface NotebookCellProps {
|
|
6
6
|
cell: EnhancedNotebookCell;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NotebookCell } from '../../../client';
|
|
2
|
+
/** Whether the viewer sends a cell to the server to run: every code cell. */
|
|
3
|
+
export declare function cellRuns(cell: Pick<NotebookCell, "type">): boolean;
|
|
4
|
+
/** A cell's code without its `##` lines. */
|
|
5
|
+
export declare function stripProse(cell: Pick<NotebookCell, "text">): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NotebookCell as ClientNotebookCell } from '
|
|
1
|
+
import { NotebookCell as ClientNotebookCell } from '../../../client';
|
|
2
2
|
/**
|
|
3
3
|
* Enhanced notebook cell that extends the base API cell with execution results.
|
|
4
4
|
* The base ClientNotebookCell only contains type and text (raw content).
|
|
@@ -68,8 +68,6 @@ export declare const MONO_FONT_FAMILY = "\"JetBrains Mono\", \"ui-monospace\", \
|
|
|
68
68
|
export declare const StyledCard: StyledComponent< CardOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "elevation" | "square" | "sx" | "variant" | "raised"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
69
69
|
export declare const StyledCardContent: StyledComponent< CardContentOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "children" | "sx"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
70
70
|
export declare const StyledCardMedia: StyledComponent< CardMediaOwnProps & CommonProps & Omit< DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "className" | "style" | "classes" | "image" | "children" | "sx" | "src"> & MUIStyledCommonProps<Theme>, {}, {}>;
|
|
71
|
-
export declare const CleanNotebookContainer: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
72
|
-
export declare const CleanNotebookSection: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
73
71
|
export declare const CleanMetricCard: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
74
72
|
export declare const StyledExplorerPage: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
75
73
|
export declare const StyledExplorerContent: StyledComponent<MUIStyledCommonProps<Theme>, DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -38,5 +38,12 @@ export declare function modelResultsKey(spec: Pick<QueryRequestSpec, "environmen
|
|
|
38
38
|
export declare function useQueryResult(spec: QueryRequestSpec, { enabled }?: {
|
|
39
39
|
enabled?: boolean;
|
|
40
40
|
}): UseQueryResult<AxiosResponse<QueryResult, any, {}, any>, ApiError>;
|
|
41
|
+
/**
|
|
42
|
+
* The same request but for its control values. Only then is the last answer
|
|
43
|
+
* worth showing while the new one runs: a tile switched to another view, or a
|
|
44
|
+
* query changed for any other reason, showed the old view's rows under the
|
|
45
|
+
* new title. The wrapper appends the server; that has to match too.
|
|
46
|
+
*/
|
|
47
|
+
export declare function onlyGivensDiffer(previous: QueryKey, next: QueryKey): boolean;
|
|
41
48
|
/** What a result surface holds while a query runs: hand it to `ResultPanel`. */
|
|
42
49
|
export type QueryResultState = ReturnType<typeof useQueryResult>;
|