@malloy-publisher/sdk 0.12.1 → 0.12.2
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 +79 -6
- package/dist/{RenderedResult-DrNhQ2_9.cjs.js → RenderedResult-Cgw4iqev.cjs.js} +1 -1
- package/dist/{RenderedResult-AyM-RQaA.es.js → RenderedResult-DEjFM1DL.es.js} +2 -2
- package/dist/ServerProvider-BRQl_cBo.cjs.js +1 -0
- package/dist/{ServerProvider-a9Ki0QXO.es.js → ServerProvider-RnliA2Ao.es.js} +577 -555
- package/dist/builder/index.cjs.js +1 -1
- package/dist/builder/index.es.js +3 -3
- package/dist/client/api.d.ts +10 -1
- package/dist/client/index.cjs.js +1 -1
- package/dist/client/index.es.js +28 -27
- package/dist/components/Model/ExplorerPage.d.ts +9 -0
- package/dist/components/Model/Model.d.ts +27 -11
- package/dist/components/ModelViewer/AccessChips.d.ts +34 -0
- package/dist/components/ModelViewer/EmptyRow.d.ts +23 -0
- package/dist/components/ModelViewer/Facts.d.ts +15 -0
- package/dist/components/ModelViewer/FieldGroup.d.ts +31 -0
- package/dist/components/ModelViewer/FieldRow.d.ts +69 -0
- package/dist/components/ModelViewer/GivenFacts.d.ts +21 -0
- package/dist/components/ModelViewer/HeaderBar.d.ts +75 -0
- package/dist/components/ModelViewer/InlineDoc.d.ts +13 -0
- package/dist/components/ModelViewer/ModelGivensSection.d.ts +32 -0
- package/dist/components/ModelViewer/ModelSection.d.ts +21 -0
- package/dist/components/ModelViewer/ModelViewer.d.ts +91 -0
- package/dist/components/ModelViewer/QueriesGroup.d.ts +15 -0
- package/dist/components/ModelViewer/RowGlyph.d.ts +27 -0
- package/dist/components/ModelViewer/RunResult.d.ts +46 -0
- package/dist/components/ModelViewer/SampleValues.d.ts +20 -0
- package/dist/components/ModelViewer/SchemaJoin.d.ts +51 -0
- package/dist/components/ModelViewer/SchemaView.d.ts +52 -0
- package/dist/components/ModelViewer/SegmentIcons.d.ts +70 -0
- package/dist/components/ModelViewer/SourcesDropdown.d.ts +53 -0
- package/dist/components/ModelViewer/SourcesNav.d.ts +25 -0
- package/dist/components/ModelViewer/StatusPill.d.ts +56 -0
- package/dist/components/ModelViewer/ValueChip.d.ts +17 -0
- package/dist/components/ModelViewer/ViewRow.d.ts +36 -0
- package/dist/components/ModelViewer/clickableBox.d.ts +29 -0
- package/dist/components/ModelViewer/codeDisplay.d.ts +44 -0
- package/dist/components/ModelViewer/docAnnotations.d.ts +90 -0
- package/dist/components/ModelViewer/explorerModel.d.ts +12 -0
- package/dist/components/ModelViewer/extensions.d.ts +94 -0
- package/dist/components/ModelViewer/fieldCode.d.ts +74 -0
- package/dist/components/ModelViewer/fieldEntities.d.ts +45 -0
- package/dist/components/ModelViewer/fieldExpansion.d.ts +41 -0
- package/dist/components/ModelViewer/givenUsage.d.ts +71 -0
- package/dist/components/ModelViewer/headerCard.d.ts +31 -0
- package/dist/components/ModelViewer/httpStatus.d.ts +4 -0
- package/dist/components/ModelViewer/icons.d.ts +31 -0
- package/dist/components/ModelViewer/index.d.ts +9 -0
- package/dist/components/ModelViewer/joinAccess.d.ts +52 -0
- package/dist/components/ModelViewer/malloyRunText.d.ts +22 -0
- package/dist/components/ModelViewer/malloyText.d.ts +21 -0
- package/dist/components/ModelViewer/modelGivens.d.ts +61 -0
- package/dist/components/ModelViewer/modelGivensContext.d.ts +9 -0
- package/dist/components/ModelViewer/modelHeaderPresentation.d.ts +28 -0
- package/dist/components/ModelViewer/modelTextDeclarations.d.ts +32 -0
- package/dist/components/ModelViewer/modelTextParse.d.ts +27 -0
- package/dist/components/ModelViewer/namedQueryCode.d.ts +12 -0
- package/dist/components/ModelViewer/offSurface.d.ts +54 -0
- package/dist/components/ModelViewer/rowLayers.d.ts +30 -0
- package/dist/components/ModelViewer/runGate.d.ts +49 -0
- package/dist/components/ModelViewer/schemaModel.d.ts +109 -0
- package/dist/components/ModelViewer/sectionOpenCommand.d.ts +45 -0
- package/dist/components/ModelViewer/sourceAccess.d.ts +67 -0
- package/dist/components/ModelViewer/sourceLineage.d.ts +14 -0
- package/dist/components/ModelViewer/sourcePicker.d.ts +66 -0
- package/dist/components/ModelViewer/surface.d.ts +47 -0
- package/dist/components/ModelViewer/text.d.ts +6 -0
- package/dist/components/ModelViewer/theme.d.ts +63 -0
- package/dist/components/ModelViewer/tokens.d.ts +52 -0
- package/dist/components/ModelViewer/ui.d.ts +48 -0
- package/dist/components/ModelViewer/useDimensionSamples.d.ts +76 -0
- package/dist/components/ModelViewer/useModelSources.d.ts +92 -0
- package/dist/components/ModelViewer/useRunQuery.d.ts +115 -0
- package/dist/components/ReportBuilder/loadMalloy.d.ts +4 -0
- package/dist/components/ServerProvider.d.ts +15 -1
- package/dist/components/filter/utils.d.ts +1 -1
- package/dist/components/given/GivenInput.d.ts +7 -1
- package/dist/components/given/GivensPanel.d.ts +3 -1
- package/dist/components/given/filterSummary.d.ts +6 -0
- package/dist/components/given/useGivenUrlParams.d.ts +11 -0
- package/dist/components/index.d.ts +2 -1
- package/dist/components/modelPage.d.ts +36 -0
- package/dist/hooks/useDimensionalFilterRangeData.d.ts +9 -0
- package/dist/hooks/useSuggestOptions.d.ts +26 -2
- package/dist/index.cjs.js +47 -19
- package/dist/index.es.js +14281 -9879
- package/dist/useCompiledDocument-D88_2cGS.cjs.js +143 -0
- package/dist/{useCompiledDocument-Utj2u8CG.es.js → useCompiledDocument-Dmm6xkom.es.js} +6975 -6893
- package/dist/utils/filterCondition.d.ts +14 -0
- package/dist/utils/malloyLiteral.d.ts +20 -1
- package/package.json +2 -2
- package/src/components/Model/ExplorerPage.tsx +269 -0
- package/src/components/Model/Model.tsx +66 -250
- package/src/components/Model/ModelExplorer.spec.tsx +64 -1
- package/src/components/ModelViewer/AccessChips.tsx +149 -0
- package/src/components/ModelViewer/EmptyRow.tsx +71 -0
- package/src/components/ModelViewer/Facts.tsx +46 -0
- package/src/components/ModelViewer/FieldGroup.tsx +137 -0
- package/src/components/ModelViewer/FieldRow.tsx +566 -0
- package/src/components/ModelViewer/GivenFacts.tsx +89 -0
- package/src/components/ModelViewer/HeaderBar.tsx +362 -0
- package/src/components/ModelViewer/InlineDoc.tsx +50 -0
- package/src/components/ModelViewer/ModelGivensSection.tsx +142 -0
- package/src/components/ModelViewer/ModelSection.tsx +98 -0
- package/src/components/ModelViewer/ModelViewer.spec.tsx +937 -0
- package/src/components/ModelViewer/ModelViewer.tsx +777 -0
- package/src/components/ModelViewer/QueriesGroup.tsx +107 -0
- package/src/components/ModelViewer/RowGlyph.tsx +138 -0
- package/src/components/ModelViewer/RunResult.tsx +298 -0
- package/src/components/ModelViewer/SampleValues.tsx +97 -0
- package/src/components/ModelViewer/SchemaJoin.tsx +258 -0
- package/src/components/ModelViewer/SchemaView.tsx +222 -0
- package/src/components/ModelViewer/SegmentIcons.tsx +129 -0
- package/src/components/ModelViewer/SourcesDropdown.tsx +265 -0
- package/src/components/ModelViewer/SourcesNav.tsx +75 -0
- package/src/components/ModelViewer/StatusPill.tsx +145 -0
- package/src/components/ModelViewer/ValueChip.tsx +39 -0
- package/src/components/ModelViewer/ViewRow.tsx +274 -0
- package/src/components/ModelViewer/clickableBox.ts +59 -0
- package/src/components/ModelViewer/codeDisplay.spec.ts +176 -0
- package/src/components/ModelViewer/codeDisplay.ts +118 -0
- package/src/components/ModelViewer/docAnnotations.spec.ts +181 -0
- package/src/components/ModelViewer/docAnnotations.ts +244 -0
- package/src/components/ModelViewer/docAnnotations.typeDetail.spec.ts +114 -0
- package/src/components/ModelViewer/explorerModel.spec.ts +43 -0
- package/src/components/ModelViewer/explorerModel.ts +31 -0
- package/src/components/ModelViewer/extensions.tsx +112 -0
- package/src/components/ModelViewer/fieldCode.spec.ts +168 -0
- package/src/components/ModelViewer/fieldCode.ts +118 -0
- package/src/components/ModelViewer/fieldEntities.ts +63 -0
- package/src/components/ModelViewer/fieldExpansion.spec.ts +116 -0
- package/src/components/ModelViewer/fieldExpansion.ts +95 -0
- package/src/components/ModelViewer/givenUsage.spec.ts +304 -0
- package/src/components/ModelViewer/givenUsage.ts +325 -0
- package/src/components/ModelViewer/headerCard.tsx +102 -0
- package/src/components/ModelViewer/httpStatus.ts +15 -0
- package/src/components/ModelViewer/icons.tsx +67 -0
- package/src/components/ModelViewer/index.ts +26 -0
- package/src/components/ModelViewer/joinAccess.spec.ts +95 -0
- package/src/components/ModelViewer/joinAccess.ts +54 -0
- package/src/components/ModelViewer/malloyRunText.spec.ts +48 -0
- package/src/components/ModelViewer/malloyRunText.ts +51 -0
- package/src/components/ModelViewer/malloyText.spec.ts +47 -0
- package/src/components/ModelViewer/malloyText.ts +77 -0
- package/src/components/ModelViewer/modelGivens.ts +228 -0
- package/src/components/ModelViewer/modelGivensContext.ts +13 -0
- package/src/components/ModelViewer/modelHeaderPresentation.spec.ts +31 -0
- package/src/components/ModelViewer/modelHeaderPresentation.ts +41 -0
- package/src/components/ModelViewer/modelTextDeclarations.spec.ts +336 -0
- package/src/components/ModelViewer/modelTextDeclarations.ts +228 -0
- package/src/components/ModelViewer/modelTextParse.ts +112 -0
- package/src/components/ModelViewer/namedQueryCode.spec.ts +58 -0
- package/src/components/ModelViewer/namedQueryCode.ts +26 -0
- package/src/components/ModelViewer/offSurface.tsx +124 -0
- package/src/components/ModelViewer/rowLayers.tsx +104 -0
- package/src/components/ModelViewer/runGate.spec.ts +219 -0
- package/src/components/ModelViewer/runGate.ts +145 -0
- package/src/components/ModelViewer/schemaModel.defaultSource.spec.ts +126 -0
- package/src/components/ModelViewer/schemaModel.queries.spec.ts +37 -0
- package/src/components/ModelViewer/schemaModel.ts +300 -0
- package/src/components/ModelViewer/sectionOpenCommand.tsx +125 -0
- package/src/components/ModelViewer/sourceAccess.spec.ts +130 -0
- package/src/components/ModelViewer/sourceAccess.ts +194 -0
- package/src/components/ModelViewer/sourceLineage.spec.ts +73 -0
- package/src/components/ModelViewer/sourceLineage.ts +38 -0
- package/src/components/ModelViewer/sourcePicker.spec.ts +294 -0
- package/src/components/ModelViewer/sourcePicker.ts +162 -0
- package/src/components/ModelViewer/surface.ts +51 -0
- package/src/components/ModelViewer/text.tsx +33 -0
- package/src/components/ModelViewer/theme.spec.ts +38 -0
- package/src/components/ModelViewer/theme.ts +58 -0
- package/src/components/ModelViewer/tokens.ts +87 -0
- package/src/components/ModelViewer/ui.tsx +201 -0
- package/src/components/ModelViewer/useDimensionSamples.spec.tsx +139 -0
- package/src/components/ModelViewer/useDimensionSamples.ts +220 -0
- package/src/components/ModelViewer/useModelSources.spec.ts +110 -0
- package/src/components/ModelViewer/useModelSources.ts +238 -0
- package/src/components/ModelViewer/useRunQuery.spec.ts +50 -0
- package/src/components/ModelViewer/useRunQuery.ts +223 -0
- package/src/components/ReportBuilder/emptyStart.spec.ts +8 -0
- package/src/components/ReportBuilder/loadMalloy.ts +8 -1
- package/src/components/ServerProvider.tsx +27 -3
- package/src/components/filter/utils.ts +4 -60
- package/src/components/given/FilterButton.tsx +4 -1
- package/src/components/given/GivenInput.tsx +8 -0
- package/src/components/given/GivensPanel.tsx +6 -1
- package/src/components/given/filterSummary.spec.ts +31 -1
- package/src/components/given/filterSummary.ts +41 -19
- package/src/components/given/useGivenUrlParams.spec.tsx +32 -0
- package/src/components/given/useGivenUrlParams.ts +49 -14
- package/src/components/index.ts +6 -1
- package/src/components/legacy/malloynb/Notebook.spec.tsx +38 -4
- package/src/components/legacy/malloynb/NotebookCell.tsx +8 -2
- package/src/components/modelPage.spec.ts +79 -0
- package/src/components/modelPage.ts +48 -0
- package/src/hooks/useDimensionFilters.ts +3 -58
- package/src/hooks/useDimensionFiltersQuery.ts +3 -58
- package/src/hooks/useDimensionalFilterRangeData.spec.ts +57 -0
- package/src/hooks/useDimensionalFilterRangeData.ts +8 -63
- package/src/hooks/useSuggestOptions.dom.spec.ts +54 -1
- package/src/hooks/useSuggestOptions.spec.ts +71 -0
- package/src/hooks/useSuggestOptions.ts +102 -12
- package/src/utils/filterCondition.spec.ts +87 -0
- package/src/utils/filterCondition.ts +66 -0
- package/src/utils/malloyLiteral.spec.ts +53 -1
- package/src/utils/malloyLiteral.ts +47 -12
- package/dist/ServerProvider-BvD7PYZ7.cjs.js +0 -1
- package/dist/useCompiledDocument-CRhFBKv_.cjs.js +0 -142
package/dist/client/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ServerProvider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../ServerProvider-BRQl_cBo.cjs.js");exports.AgentsApi=e.AgentsApi;exports.AgentsApiAxiosParamCreator=e.AgentsApiAxiosParamCreator;exports.AgentsApiFactory=e.AgentsApiFactory;exports.AgentsApiFp=e.AgentsApiFp;exports.AttachedDatabaseTypeEnum=e.AttachedDatabaseTypeEnum;exports.AzureConnectionAuthTypeEnum=e.AzureConnectionAuthTypeEnum;exports.CompileProblemSeverityEnum=e.CompileProblemSeverityEnum;exports.CompileRequestScopeEnum=e.CompileRequestScopeEnum;exports.CompileResultStatusEnum=e.CompileResultStatusEnum;exports.CompiledDocumentKindEnum=e.CompiledDocumentKindEnum;exports.CompiledDocumentLayoutEnum=e.CompiledDocumentLayoutEnum;exports.Configuration=e.Configuration;exports.ConnectionProxyTypeEnum=e.ConnectionProxyTypeEnum;exports.ConnectionStatusStatusEnum=e.ConnectionStatusStatusEnum;exports.ConnectionTypeEnum=e.ConnectionTypeEnum;exports.ConnectionsApi=e.ConnectionsApi;exports.ConnectionsApiAxiosParamCreator=e.ConnectionsApiAxiosParamCreator;exports.ConnectionsApiFactory=e.ConnectionsApiFactory;exports.ConnectionsApiFp=e.ConnectionsApiFp;exports.ConnectionsTestApi=e.ConnectionsTestApi;exports.ConnectionsTestApiAxiosParamCreator=e.ConnectionsTestApiAxiosParamCreator;exports.ConnectionsTestApiFactory=e.ConnectionsTestApiFactory;exports.ConnectionsTestApiFp=e.ConnectionsTestApiFp;exports.DashboardManifestKindEnum=e.DashboardManifestKindEnum;exports.DashboardManifestLayoutEnum=e.DashboardManifestLayoutEnum;exports.DashboardTileKindEnum=e.DashboardTileKindEnum;exports.DashboardsApi=e.DashboardsApi;exports.DashboardsApiAxiosParamCreator=e.DashboardsApiAxiosParamCreator;exports.DashboardsApiFactory=e.DashboardsApiFactory;exports.DashboardsApiFp=e.DashboardsApiFp;exports.DataAppFitEnum=e.DataAppFitEnum;exports.DataAppsApi=e.DataAppsApi;exports.DataAppsApiAxiosParamCreator=e.DataAppsApiAxiosParamCreator;exports.DataAppsApiFactory=e.DataAppsApiFactory;exports.DataAppsApiFp=e.DataAppsApiFp;exports.DatabaseTypeEnum=e.DatabaseTypeEnum;exports.DatabasesApi=e.DatabasesApi;exports.DatabasesApiAxiosParamCreator=e.DatabasesApiAxiosParamCreator;exports.DatabasesApiFactory=e.DatabasesApiFactory;exports.DatabasesApiFp=e.DatabasesApiFp;exports.EnvironmentsApi=e.EnvironmentsApi;exports.EnvironmentsApiAxiosParamCreator=e.EnvironmentsApiAxiosParamCreator;exports.EnvironmentsApiFactory=e.EnvironmentsApiFactory;exports.EnvironmentsApiFp=e.EnvironmentsApiFp;exports.ExecuteNotebookCellBypassFiltersEnum=e.ExecuteNotebookCellBypassFiltersEnum;exports.FilterTypeEnum=e.FilterTypeEnum;exports.FreshnessFallbackEnum=e.FreshnessFallbackEnum;exports.GetAgentSkillsEnum=e.GetAgentSkillsEnum;exports.GivenControlEnum=e.GivenControlEnum;exports.LedgerEntryStrategyEnum=e.LedgerEntryStrategyEnum;exports.LogMessageSeverityEnum=e.LogMessageSeverityEnum;exports.ManifestEntryFreshnessFallbackEnum=e.ManifestEntryFreshnessFallbackEnum;exports.ManifestEntryOriginEnum=e.ManifestEntryOriginEnum;exports.ManifestEntryRefreshEnum=e.ManifestEntryRefreshEnum;exports.ManifestEntryUpstreamReuseEnum=e.ManifestEntryUpstreamReuseEnum;exports.MaterializationActionActionEnum=e.MaterializationActionActionEnum;exports.MaterializationStatus=e.MaterializationStatus;exports.MaterializationsApi=e.MaterializationsApi;exports.MaterializationsApiAxiosParamCreator=e.MaterializationsApiAxiosParamCreator;exports.MaterializationsApiFactory=e.MaterializationsApiFactory;exports.MaterializationsApiFp=e.MaterializationsApiFp;exports.ModelEntitiesErrorKindEnum=e.ModelEntitiesErrorKindEnum;exports.ModelsApi=e.ModelsApi;exports.ModelsApiAxiosParamCreator=e.ModelsApiAxiosParamCreator;exports.ModelsApiFactory=e.ModelsApiFactory;exports.ModelsApiFp=e.ModelsApiFp;exports.NotebookCellKindEnum=e.NotebookCellKindEnum;exports.NotebookCellResultKindEnum=e.NotebookCellResultKindEnum;exports.NotebookCellResultTypeEnum=e.NotebookCellResultTypeEnum;exports.NotebookCellTypeEnum=e.NotebookCellTypeEnum;exports.NotebooksApi=e.NotebooksApi;exports.NotebooksApiAxiosParamCreator=e.NotebooksApiAxiosParamCreator;exports.NotebooksApiFactory=e.NotebooksApiFactory;exports.NotebooksApiFp=e.NotebooksApiFp;exports.PackageArchiveStatusEnum=e.PackageArchiveStatusEnum;exports.PackageEmbeddingIndexReasonEnum=e.PackageEmbeddingIndexReasonEnum;exports.PackageEmbeddingIndexStageEnum=e.PackageEmbeddingIndexStageEnum;exports.PackageEmbeddingIndexStatusEnum=e.PackageEmbeddingIndexStatusEnum;exports.PackageManifestBindingStatusEnum=e.PackageManifestBindingStatusEnum;exports.PackageQueryableSourcesEnum=e.PackageQueryableSourcesEnum;exports.PackageScopeEnum=e.PackageScopeEnum;exports.PackageServingStateArchiveStatusEnum=e.PackageServingStateArchiveStatusEnum;exports.PackageServingStateManifestBindingStatusEnum=e.PackageServingStateManifestBindingStatusEnum;exports.PackageStatusEntryArchiveStatusEnum=e.PackageStatusEntryArchiveStatusEnum;exports.PackageStatusEntryFieldsArchiveStatusEnum=e.PackageStatusEntryFieldsArchiveStatusEnum;exports.PackageStatusEntryFieldsManifestBindingStatusEnum=e.PackageStatusEntryFieldsManifestBindingStatusEnum;exports.PackageStatusEntryManifestBindingStatusEnum=e.PackageStatusEntryManifestBindingStatusEnum;exports.PackageStatusEntryQueryableSourcesEnum=e.PackageStatusEntryQueryableSourcesEnum;exports.PackageStatusEntryScopeEnum=e.PackageStatusEntryScopeEnum;exports.PackageVersionArchiveStatusEnum=e.PackageVersionArchiveStatusEnum;exports.PackageVersionUpdateArchiveStatusEnum=e.PackageVersionUpdateArchiveStatusEnum;exports.PackageWarningsInnerSeverityEnum=e.PackageWarningsInnerSeverityEnum;exports.PackagesApi=e.PackagesApi;exports.PackagesApiAxiosParamCreator=e.PackagesApiAxiosParamCreator;exports.PackagesApiFactory=e.PackagesApiFactory;exports.PackagesApiFp=e.PackagesApiFp;exports.PersistSourcePlanOriginEnum=e.PersistSourcePlanOriginEnum;exports.PostgresConnectionSslmodeEnum=e.PostgresConnectionSslmodeEnum;exports.PublisherApi=e.PublisherApi;exports.PublisherApiAxiosParamCreator=e.PublisherApiAxiosParamCreator;exports.PublisherApiFactory=e.PublisherApiFactory;exports.PublisherApiFp=e.PublisherApiFp;exports.QueryClass=e.QueryClass;exports.QueryResultQueryRowLimitSourceEnum=e.QueryResultQueryRowLimitSourceEnum;exports.QueryResultServedFromEnum=e.QueryResultServedFromEnum;exports.RawNotebookFormatEnum=e.RawNotebookFormatEnum;exports.Realization=e.Realization;exports.RefusedSourceReasonEnum=e.RefusedSourceReasonEnum;exports.RefusedSourceTierEnum=e.RefusedSourceTierEnum;exports.ReportCellsFormatEnum=e.ReportCellsFormatEnum;exports.ReportLayoutEnum=e.ReportLayoutEnum;exports.ReportManifestLayoutEnum=e.ReportManifestLayoutEnum;exports.ReportTileKindEnum=e.ReportTileKindEnum;exports.ReportsApi=e.ReportsApi;exports.ReportsApiAxiosParamCreator=e.ReportsApiAxiosParamCreator;exports.ReportsApiFactory=e.ReportsApiFactory;exports.ReportsApiFp=e.ReportsApiFp;exports.RunContextTriggerEnum=e.RunContextTriggerEnum;exports.S3ConnectionProviderEnum=e.S3ConnectionProviderEnum;exports.ServerProvider=e.ServerProvider;exports.ServerStatusModelPageEnum=e.ServerStatusModelPageEnum;exports.ServerStatusOperationalStateEnum=e.ServerStatusOperationalStateEnum;exports.ServerStatusPackageVersioningEnum=e.ServerStatusPackageVersioningEnum;exports.ServerStatusVersionPromotionEnum=e.ServerStatusVersionPromotionEnum;exports.SkillOriginEnum=e.SkillOriginEnum;exports.SkillSummaryOriginEnum=e.SkillSummaryOriginEnum;exports.SkillsApi=e.SkillsApi;exports.SkillsApiAxiosParamCreator=e.SkillsApiAxiosParamCreator;exports.SkillsApiFactory=e.SkillsApiFactory;exports.SkillsApiFp=e.SkillsApiFp;exports.StorageDestinationsApi=e.StorageDestinationsApi;exports.StorageDestinationsApiAxiosParamCreator=e.StorageDestinationsApiAxiosParamCreator;exports.StorageDestinationsApiFactory=e.StorageDestinationsApiFactory;exports.StorageDestinationsApiFp=e.StorageDestinationsApiFp;exports.StorageServeBindingOriginEnum=e.StorageServeBindingOriginEnum;exports.ThemeDefaultModeEnum=e.ThemeDefaultModeEnum;exports.VersionsApi=e.VersionsApi;exports.VersionsApiAxiosParamCreator=e.VersionsApiAxiosParamCreator;exports.VersionsApiFactory=e.VersionsApiFactory;exports.VersionsApiFp=e.VersionsApiFp;exports.WatchModeApi=e.WatchModeApi;exports.WatchModeApiAxiosParamCreator=e.WatchModeApiAxiosParamCreator;exports.WatchModeApiFactory=e.WatchModeApiFactory;exports.WatchModeApiFp=e.WatchModeApiFp;exports.globalQueryClient=e.globalQueryClient;exports.usePublisherTheme=e.usePublisherTheme;exports.useServer=e.useServer;
|
package/dist/client/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as t, b as i, c as n, d as o, e as r, C as u, f as p, g as m, h as A, i as E, j as c, k as l, l as b, m as S, n as g, o as y, p as P, q as d, r as C, s as F, t as k, u as h, D as M, v, w as D, x, y as R, z as f, B as T, E as N, F as z, G as V, H as K, I as L, J as Q, K as B, L as O, M as W, N as I, O as q, P as w, Q as G, R as U, S as j, T as H, U as J, V as X, W as Y, X as Z, Y as _, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ta, a2 as ia, a3 as na, a4 as oa, a5 as ra, a6 as ua, a7 as pa, a8 as ma, a9 as Aa, aa as Ea, ab as ca, ac as la, ad as ba, ae as Sa, af as ga, ag as ya, ah as Pa, ai as da, aj as Ca, ak as Fa, al as ka, am as ha, an as Ma, ao as va, ap as Da, aq as xa, ar as Ra, as as fa, at as Ta, au as Na, av as za, aw as Va, ax as Ka, ay as La, az as Qa, aA as Ba, aB as Oa, aC as Wa, aD as Ia, aE as qa, aF as wa, aG as Ga, aH as Ua, aI as ja, aJ as Ha, aK as Ja, aL as Xa, aM as Ya, aN as Za, aO as _a, aP as $a, aQ as as, aR as ss, aS as es, aT as ts, aU as is, aV as ns, aW as os, aX as rs, aY as us, aZ as ps, a_ as ms, a$ as As, b0 as Es, b1 as cs, b2 as ls, b3 as bs, b4 as Ss, b5 as gs, b6 as ys, b7 as Ps, b8 as ds, b9 as Cs, ba as Fs, bb as ks, bc as hs, bd as Ms, be as vs, bf as Ds, bg as xs, bh as Rs, bi as fs, bj as Ts, bk as Ns, bl as zs, bm as Vs, bn as Ks, bo as Ls, bp as Qs, bq as Bs, br as Os } from "../ServerProvider-
|
|
1
|
+
import { A as e, a as t, b as i, c as n, d as o, e as r, C as u, f as p, g as m, h as A, i as E, j as c, k as l, l as b, m as S, n as g, o as y, p as P, q as d, r as C, s as F, t as k, u as h, D as M, v, w as D, x, y as R, z as f, B as T, E as N, F as z, G as V, H as K, I as L, J as Q, K as B, L as O, M as W, N as I, O as q, P as w, Q as G, R as U, S as j, T as H, U as J, V as X, W as Y, X as Z, Y as _, Z as $, _ as aa, $ as sa, a0 as ea, a1 as ta, a2 as ia, a3 as na, a4 as oa, a5 as ra, a6 as ua, a7 as pa, a8 as ma, a9 as Aa, aa as Ea, ab as ca, ac as la, ad as ba, ae as Sa, af as ga, ag as ya, ah as Pa, ai as da, aj as Ca, ak as Fa, al as ka, am as ha, an as Ma, ao as va, ap as Da, aq as xa, ar as Ra, as as fa, at as Ta, au as Na, av as za, aw as Va, ax as Ka, ay as La, az as Qa, aA as Ba, aB as Oa, aC as Wa, aD as Ia, aE as qa, aF as wa, aG as Ga, aH as Ua, aI as ja, aJ as Ha, aK as Ja, aL as Xa, aM as Ya, aN as Za, aO as _a, aP as $a, aQ as as, aR as ss, aS as es, aT as ts, aU as is, aV as ns, aW as os, aX as rs, aY as us, aZ as ps, a_ as ms, a$ as As, b0 as Es, b1 as cs, b2 as ls, b3 as bs, b4 as Ss, b5 as gs, b6 as ys, b7 as Ps, b8 as ds, b9 as Cs, ba as Fs, bb as ks, bc as hs, bd as Ms, be as vs, bf as Ds, bg as xs, bh as Rs, bi as fs, bj as Ts, bk as Ns, bl as zs, bm as Vs, bn as Ks, bo as Ls, bp as Qs, bq as Bs, br as Os, bs as Ws } from "../ServerProvider-RnliA2Ao.es.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AgentsApi,
|
|
4
4
|
t as AgentsApiAxiosParamCreator,
|
|
@@ -120,30 +120,31 @@ export {
|
|
|
120
120
|
As as RunContextTriggerEnum,
|
|
121
121
|
Es as S3ConnectionProviderEnum,
|
|
122
122
|
cs as ServerProvider,
|
|
123
|
-
ls as
|
|
124
|
-
bs as
|
|
125
|
-
Ss as
|
|
126
|
-
gs as
|
|
127
|
-
ys as
|
|
128
|
-
Ps as
|
|
129
|
-
ds as
|
|
130
|
-
Cs as
|
|
131
|
-
Fs as
|
|
132
|
-
ks as
|
|
133
|
-
hs as
|
|
134
|
-
Ms as
|
|
135
|
-
vs as
|
|
136
|
-
Ds as
|
|
137
|
-
xs as
|
|
138
|
-
Rs as
|
|
139
|
-
fs as
|
|
140
|
-
Ts as
|
|
141
|
-
Ns as
|
|
142
|
-
zs as
|
|
143
|
-
Vs as
|
|
144
|
-
Ks as
|
|
145
|
-
Ls as
|
|
146
|
-
Qs as
|
|
147
|
-
Bs as
|
|
148
|
-
Os as
|
|
123
|
+
ls as ServerStatusModelPageEnum,
|
|
124
|
+
bs as ServerStatusOperationalStateEnum,
|
|
125
|
+
Ss as ServerStatusPackageVersioningEnum,
|
|
126
|
+
gs as ServerStatusVersionPromotionEnum,
|
|
127
|
+
ys as SkillOriginEnum,
|
|
128
|
+
Ps as SkillSummaryOriginEnum,
|
|
129
|
+
ds as SkillsApi,
|
|
130
|
+
Cs as SkillsApiAxiosParamCreator,
|
|
131
|
+
Fs as SkillsApiFactory,
|
|
132
|
+
ks as SkillsApiFp,
|
|
133
|
+
hs as StorageDestinationsApi,
|
|
134
|
+
Ms as StorageDestinationsApiAxiosParamCreator,
|
|
135
|
+
vs as StorageDestinationsApiFactory,
|
|
136
|
+
Ds as StorageDestinationsApiFp,
|
|
137
|
+
xs as StorageServeBindingOriginEnum,
|
|
138
|
+
Rs as ThemeDefaultModeEnum,
|
|
139
|
+
fs as VersionsApi,
|
|
140
|
+
Ts as VersionsApiAxiosParamCreator,
|
|
141
|
+
Ns as VersionsApiFactory,
|
|
142
|
+
zs as VersionsApiFp,
|
|
143
|
+
Vs as WatchModeApi,
|
|
144
|
+
Ks as WatchModeApiAxiosParamCreator,
|
|
145
|
+
Ls as WatchModeApiFactory,
|
|
146
|
+
Qs as WatchModeApiFp,
|
|
147
|
+
Bs as globalQueryClient,
|
|
148
|
+
Os as usePublisherTheme,
|
|
149
|
+
Ws as useServer
|
|
149
150
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ModelProps } from './Model';
|
|
2
|
+
/**
|
|
3
|
+
* The model page on a server whose `PUBLISHER_MODEL_PAGE` is `explorer`, the
|
|
4
|
+
* default: the Malloy Explorer over the model's sources, and its named
|
|
5
|
+
* queries. The Explorer writes the queries it builds back to Malloy text
|
|
6
|
+
* through `@malloydata/malloy-interfaces`, which puts a string value in
|
|
7
|
+
* unescaped, so a drilled value holding a double quote rewrites its query.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ExplorerPage({ onChange, resourceUri, runOnDemand, maxResultSize, givens, onGivensChange, }: ModelProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,32 @@
|
|
|
1
|
+
import { ModelViewerProps } from '../ModelViewer';
|
|
1
2
|
import { QueryExplorerResult } from './SourcesExplorer';
|
|
2
|
-
export interface ModelProps {
|
|
3
|
+
export interface ModelProps extends ModelViewerProps {
|
|
4
|
+
/**
|
|
5
|
+
* The Explorer page only: called with the query the Explorer builds. The
|
|
6
|
+
* model viewer builds none.
|
|
7
|
+
*/
|
|
3
8
|
onChange?: (query: QueryExplorerResult) => void;
|
|
4
|
-
resourceUri: string;
|
|
5
|
-
runOnDemand?: boolean;
|
|
6
|
-
maxResultSize?: number;
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
10
|
+
* The Explorer page only: a named query waits for its Run rather than
|
|
11
|
+
* running on render. The model viewer runs a view or a query only when it
|
|
12
|
+
* is opened, so there it turns nothing on.
|
|
11
13
|
*/
|
|
12
|
-
|
|
13
|
-
/** Applied control values, for a host that wants them in its URL. */
|
|
14
|
-
onGivensChange?: (givens: Record<string, string>, managed: readonly string[]) => void;
|
|
14
|
+
runOnDemand?: boolean;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* A model's page, the one the server's `PUBLISHER_MODEL_PAGE` names (see
|
|
18
|
+
* `useServer().modelPage`). Nothing shows until `/status` answers, so a
|
|
19
|
+
* `viewer` server never flashes the Explorer.
|
|
20
|
+
*
|
|
21
|
+
* - `explorer`, the default: the Malloy Explorer over the model's sources
|
|
22
|
+
* ({@link ExplorerPage}), and its named queries. The Explorer writes the
|
|
23
|
+
* queries it builds back to Malloy text through
|
|
24
|
+
* `@malloydata/malloy-interfaces`, whose string escaping is a TODO, so a
|
|
25
|
+
* drilled value holding a double quote rewrites its query.
|
|
26
|
+
* - `viewer`: the model viewer ({@link ModelViewer}) with a Copy link action
|
|
27
|
+
* on its heading. Each source's views, measures, calculations, dimensions
|
|
28
|
+
* and joins, the model's named queries, and the givens they read. It writes
|
|
29
|
+
* no value into Malloy text.
|
|
30
|
+
*/
|
|
31
|
+
export default function Model(props: ModelProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export type { ModelViewerProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { SourceAccess } from './sourceAccess';
|
|
2
|
+
/**
|
|
3
|
+
* A source's access declarations as page-header chips, on the status row under
|
|
4
|
+
* its name: "Restricted" for an `#(authorize)` rule, "Row filtered" for an
|
|
5
|
+
* `#(access_filter)`. Declarations-layer state (ux-design-guide §4 "Reference
|
|
6
|
+
* surfaces"), so neutral: the chip says what the source declares, never whether
|
|
7
|
+
* this reader passes — only the publisher knows that. Each is a tab stop whose
|
|
8
|
+
* accessible name is its tooltip (§7); in the source header each opens the
|
|
9
|
+
* card on who can query.
|
|
10
|
+
*/
|
|
11
|
+
export declare function AccessChips({ access }: {
|
|
12
|
+
access: SourceAccess | undefined;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* The same declarations as row pills — a source in the picker, a join to a
|
|
16
|
+
* gated source — in the Declarations layer's token voice. Not focusable: a row
|
|
17
|
+
* is one button, and its accessible name carries the same words
|
|
18
|
+
* ({@link accessRowLabel}).
|
|
19
|
+
*/
|
|
20
|
+
export declare function AccessPills({ access }: {
|
|
21
|
+
access: SourceAccess | undefined;
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
/** The words a row's accessible name adds for its access pills ("", ", restricted"). */
|
|
24
|
+
export declare function accessRowLabel(access: SourceAccess | undefined): string;
|
|
25
|
+
/**
|
|
26
|
+
* The access facts in the source's card, as rows of the facts grid the
|
|
27
|
+
* binding's facts use. Readers get sentences; an editor (who can change the
|
|
28
|
+
* model) also gets the Malloy rule and filter verbatim (§4a.2: expressions are
|
|
29
|
+
* writer vocabulary).
|
|
30
|
+
*/
|
|
31
|
+
export declare function AccessFacts({ access, showRules, }: {
|
|
32
|
+
access: SourceAccess;
|
|
33
|
+
showRules: boolean;
|
|
34
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Quiet empty-state row for a section list: a single dashed row carrying a
|
|
4
|
+
* message and a right-aligned action slot. Matches the width and rhythm of a
|
|
5
|
+
* populated list so an empty section reads as the same surface, not a hero
|
|
6
|
+
* card.
|
|
7
|
+
*
|
|
8
|
+
* An empty state carries a one-line explanation of what the section will hold,
|
|
9
|
+
* plus the action that puts the first thing in it where there is one.
|
|
10
|
+
*
|
|
11
|
+
* `secondary` is a quieter follow-on line under the message — the "or, do it
|
|
12
|
+
* this other way" alternative that shouldn't compete with the primary action.
|
|
13
|
+
*
|
|
14
|
+
* Where a section has no action that would fill it (a read-only artifact, a
|
|
15
|
+
* container whose contents arrive from elsewhere), pass `message` alone: the
|
|
16
|
+
* explanation is still worth more than the bare line, and an invented CTA is
|
|
17
|
+
* worse than none.
|
|
18
|
+
*/
|
|
19
|
+
export declare function EmptyRow({ message, secondary, actions, }: {
|
|
20
|
+
message: string;
|
|
21
|
+
secondary?: ReactNode;
|
|
22
|
+
actions?: ReactNode;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** The facts grid: labels share a column sized to the longest, values line up. */
|
|
3
|
+
export declare const FACTS_GRID_SX: {
|
|
4
|
+
readonly display: "grid";
|
|
5
|
+
readonly gridTemplateColumns: "max-content 1fr";
|
|
6
|
+
readonly columnGap: "16px";
|
|
7
|
+
readonly rowGap: "6px";
|
|
8
|
+
readonly alignItems: "baseline";
|
|
9
|
+
};
|
|
10
|
+
/** One label/value pair in the facts grid. Contributes both grid cells. */
|
|
11
|
+
export declare function Fact({ label, value, mono, }: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: ReactNode;
|
|
14
|
+
mono?: boolean;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FieldCodeLookup } from './fieldCode';
|
|
2
|
+
import { ExplorerField } from './schemaModel';
|
|
3
|
+
import { RunContext } from './useRunQuery';
|
|
4
|
+
interface FieldGroupProps {
|
|
5
|
+
/** "Measures", "Calculations" or "Dimensions". */
|
|
6
|
+
label: string;
|
|
7
|
+
/** What the count counts, singular and plural. */
|
|
8
|
+
noun: readonly [string, string];
|
|
9
|
+
items: ExplorerField[];
|
|
10
|
+
/** Where a dimension's sample values are read. */
|
|
11
|
+
run?: RunContext;
|
|
12
|
+
modelPath: string;
|
|
13
|
+
sourceName: string;
|
|
14
|
+
/** Per-field Malloy-definition lookup; absent when this group's rows have
|
|
15
|
+
* no code to show. */
|
|
16
|
+
getFieldCode?: (field: ExplorerField) => FieldCodeLookup | undefined;
|
|
17
|
+
/** A page section (h2), or a joined source's subsection (h3). */
|
|
18
|
+
level?: "h2" | "h3";
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* How many rows a section draws before a "Show all" for the rest: a source can
|
|
22
|
+
* pass thousands of table columns through, and drawing every row up front held
|
|
23
|
+
* the page for seconds before its heading appeared.
|
|
24
|
+
*/
|
|
25
|
+
export declare const FIELD_ROW_CAP = 200;
|
|
26
|
+
/**
|
|
27
|
+
* One field kind (a source's measures, calculations or dimensions) as an always-open section
|
|
28
|
+
* of compact rows: the first {@link FIELD_ROW_CAP}, then the rest on a click.
|
|
29
|
+
*/
|
|
30
|
+
export declare function FieldGroup({ label, noun, items, run, modelPath, sourceName, getFieldCode, level, }: FieldGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FieldCodeLookup } from './fieldCode';
|
|
3
|
+
import { ExplorerField } from './schemaModel';
|
|
4
|
+
import { RunContext } from './useRunQuery';
|
|
5
|
+
export type { FieldCodeLookup } from './fieldCode';
|
|
6
|
+
interface FieldRowProps {
|
|
7
|
+
/** A dimension, measure or calculation; a view or named query is a ViewRow. */
|
|
8
|
+
field: ExplorerField;
|
|
9
|
+
/** Where a dimension's sample values are read; absent, the row offers none. */
|
|
10
|
+
run?: RunContext;
|
|
11
|
+
modelPath: string;
|
|
12
|
+
/** The source that declares the field (a joined source's, for a join's field). */
|
|
13
|
+
sourceName: string;
|
|
14
|
+
/** Where the field's Malloy definition comes from, when the source's
|
|
15
|
+
* definitions are available at all. A lookup that resolves to no code
|
|
16
|
+
* leaves the row with nothing to open. */
|
|
17
|
+
fieldCode?: FieldCodeLookup;
|
|
18
|
+
/** A joined source's field, shown inside a join on another source's page:
|
|
19
|
+
* it offers no Values card, since its values are that source's. */
|
|
20
|
+
joined?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Compact field row: mono name in a fixed column, then its type and
|
|
24
|
+
* annotations, then what the field MEANS on the rest of the line. What it's
|
|
25
|
+
* MADE OF opens in place under it: its Malloy, a dimension's sample values, the
|
|
26
|
+
* givens it reads, and whatever a host adds. A row with nothing to open is plain
|
|
27
|
+
* text; one with something is a button (Enter or Space opens it too) whose
|
|
28
|
+
* `aria-expanded` says which.
|
|
29
|
+
*/
|
|
30
|
+
export declare function FieldRow({ field, run, modelPath, sourceName, fieldCode, joined, }: FieldRowProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* THE line of a model page's row — a view, a named query, a measure or a
|
|
33
|
+
* dimension alike, so the page reads as one list: the name in a fixed column
|
|
34
|
+
* (with its type, marks, pills and one action), then what it means on the rest of
|
|
35
|
+
* the line. A row with something to open is a button on its name (Enter or Space
|
|
36
|
+
* opens it, `aria-expanded` says whether it is) and toggles from anywhere on the
|
|
37
|
+
* line; one with nothing to open is plain text.
|
|
38
|
+
*/
|
|
39
|
+
export declare function RowLine({ glyph, name, typeLabel, typeAsChip, stackPills, typeTip, descriptors, pills, action, trailing, doc, generatedDoc, open, expandable, onToggle, }: {
|
|
40
|
+
/** The row's kind glyph (`RowGlyph`), before its name. */
|
|
41
|
+
glyph?: ReactNode;
|
|
42
|
+
name: string;
|
|
43
|
+
typeLabel?: string;
|
|
44
|
+
/** A field's type as a chip, apart from the name; a
|
|
45
|
+
* join's "N fields" count stays text. */
|
|
46
|
+
typeAsChip?: boolean;
|
|
47
|
+
/** A field's layout: its name and type on the first line, always together,
|
|
48
|
+
* and its pills and action on a second line under them (only when there are
|
|
49
|
+
* any) — so its state never squeezes the name, and the rebuild sits beside
|
|
50
|
+
* the pill it rebuilds. */
|
|
51
|
+
stackPills?: boolean;
|
|
52
|
+
/** The type chip's tooltip, where its label can't say it all (a record's fields). */
|
|
53
|
+
typeTip?: string;
|
|
54
|
+
/** Descriptor chips after the type, on the name's own line (a field's
|
|
55
|
+
* display tags, its "given"). */
|
|
56
|
+
descriptors?: ReactNode;
|
|
57
|
+
/** Status and declaration pills after the name. */
|
|
58
|
+
pills?: ReactNode;
|
|
59
|
+
/** The row's one action, beside its pills (Rebuild / Build). */
|
|
60
|
+
action?: ReactNode;
|
|
61
|
+
/** Controls at the line's right edge — an open view's Result | Code | Download. */
|
|
62
|
+
trailing?: ReactNode;
|
|
63
|
+
doc?: string;
|
|
64
|
+
/** `doc` is a host's description, not the modeler's: marked as generated. */
|
|
65
|
+
generatedDoc?: boolean;
|
|
66
|
+
open: boolean;
|
|
67
|
+
expandable: boolean;
|
|
68
|
+
onToggle: () => void;
|
|
69
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { GivenInfo } from './modelGivens';
|
|
2
|
+
/** What a "Given" pill's tooltip says: which givens the row reads. */
|
|
3
|
+
export declare function givenPillMeaning(givens: ReadonlyArray<GivenInfo>): string;
|
|
4
|
+
/**
|
|
5
|
+
* The Declarations-layer pill on a field, view or query whose definition reads a
|
|
6
|
+
* given (`$NAME`): its result depends on a value the reader sets. Not a tab stop
|
|
7
|
+
* of its own — it sits inside the row's button, whose accessible name carries
|
|
8
|
+
* the word, and what it reads is in the row's opened card.
|
|
9
|
+
*/
|
|
10
|
+
export declare function GivenPill({ givens }: {
|
|
11
|
+
givens: ReadonlyArray<GivenInfo>;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* The givens a row reads, in the card an open row's content takes: each one's
|
|
15
|
+
* name, type, default, and the label and description its declaration gives it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function GivenFacts({ givens, framed, }: {
|
|
18
|
+
givens: ReadonlyArray<GivenInfo>;
|
|
19
|
+
/** False: one section of a card someone else frames (an open field row's). */
|
|
20
|
+
framed?: boolean;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SourceAccess } from './sourceAccess';
|
|
3
|
+
/**
|
|
4
|
+
* The model page's header: the source's name as the page's heading, and beside
|
|
5
|
+
* it the source picker ("2 sources ▾", {@link import("./SourcesNav").SourcesNav}),
|
|
6
|
+
* with a host's actions on the right. Then the source's status row (who can
|
|
7
|
+
* query it, whether the package exposes the file, and what a host adds), the
|
|
8
|
+
* model's and the source's docs, and the quiet meta line ("Source · 33 fields ·
|
|
9
|
+
* from …").
|
|
10
|
+
*/
|
|
11
|
+
export declare function HeaderBar({
|
|
12
|
+
/** The heading: the source's name, or on a model with only queries the model's name. */
|
|
13
|
+
title,
|
|
14
|
+
/** Beside the heading: the source picker. */
|
|
15
|
+
titleAdornments,
|
|
16
|
+
/** What the title is, leading the meta line: "Source · 43 fields". */
|
|
17
|
+
kindLabel,
|
|
18
|
+
/** The meta line's count, after the kind: "33 fields", or "2 queries" on a model with only queries. */
|
|
19
|
+
meta,
|
|
20
|
+
/** The source's own `#(doc)`, printed under its name. */
|
|
21
|
+
doc,
|
|
22
|
+
/** Where the source comes from, at the end of the meta line. */
|
|
23
|
+
provenance,
|
|
24
|
+
/** Controls on the heading line's right. */
|
|
25
|
+
actions,
|
|
26
|
+
/** A host's chips on the status row, after the viewer's own. */
|
|
27
|
+
status,
|
|
28
|
+
/** The title's heading level: the page's h1 where the viewer is the page,
|
|
29
|
+
* a level down where it is a panel on another page. */
|
|
30
|
+
headingLevel,
|
|
31
|
+
/** The model file's own description, ahead of the source's. */
|
|
32
|
+
modelDoc,
|
|
33
|
+
/** The source's `#(authorize)` / `#(access_filter)` declarations: chips on
|
|
34
|
+
* the status row, and their facts in the card the chips open. */
|
|
35
|
+
access,
|
|
36
|
+
/** Whether the reader can change the model, so the card also shows the
|
|
37
|
+
* rules' Malloy (an editor's vocabulary) beside their words. */
|
|
38
|
+
showRules,
|
|
39
|
+
/** False for a model's own header (no sources, only queries): it has no status row. */
|
|
40
|
+
isSource,
|
|
41
|
+
/** The file is one the package's `index.malloy` leaves out: its Private chip leads the status row. */
|
|
42
|
+
offSurface,
|
|
43
|
+
/** The file is the package's root `index.malloy`, whose sources are the package's public
|
|
44
|
+
* ones: its Public chip sits in the status row where a hidden file's Private does. */
|
|
45
|
+
publicSurface, }: {
|
|
46
|
+
title: ReactNode;
|
|
47
|
+
titleAdornments?: ReactNode;
|
|
48
|
+
kindLabel?: string;
|
|
49
|
+
meta?: ReactNode;
|
|
50
|
+
doc?: string;
|
|
51
|
+
provenance?: ReactNode;
|
|
52
|
+
actions?: ReactNode;
|
|
53
|
+
status?: ReactNode;
|
|
54
|
+
headingLevel?: "h1" | "h2";
|
|
55
|
+
modelDoc?: string;
|
|
56
|
+
access?: SourceAccess;
|
|
57
|
+
showRules?: boolean;
|
|
58
|
+
isSource?: boolean;
|
|
59
|
+
offSurface?: boolean;
|
|
60
|
+
publicSurface?: boolean;
|
|
61
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
/**
|
|
63
|
+
* A source's doc under its name: at most two lines until the reader asks for the
|
|
64
|
+
* rest, with `backticked` names set as code rather than showing the backticks. A
|
|
65
|
+
* doc is written for the agent as much as the reader and runs long; the header's
|
|
66
|
+
* job is to say what the source is at a glance.
|
|
67
|
+
*/
|
|
68
|
+
export declare function SourceDoc({ doc, label, testId, }: {
|
|
69
|
+
doc: string;
|
|
70
|
+
/** What the More / Less button's accessible name calls the text. */
|
|
71
|
+
label?: string;
|
|
72
|
+
testId?: string;
|
|
73
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
74
|
+
/** `name` spans as code; everything else as written. */
|
|
75
|
+
export declare function withInlineCode(text: string): ReactNode[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
/** Whether a one-line description hides part of `doc`: clipped by its ellipsis,
|
|
3
|
+
* or showing only the first of several lines. */
|
|
4
|
+
export declare function isDocCut(el: HTMLElement, doc: string): boolean;
|
|
5
|
+
/**
|
|
6
|
+
* A row's description, printed on the row: its first line, cut to the space it
|
|
7
|
+
* has, with the whole text as a plain title only when some of it is cut off.
|
|
8
|
+
*/
|
|
9
|
+
export declare function InlineDoc({ doc, sx, testId, }: {
|
|
10
|
+
doc: string;
|
|
11
|
+
sx?: SxProps<Theme>;
|
|
12
|
+
testId?: string;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { GivenValue } from '../../hooks/givenValue';
|
|
2
|
+
import { GivenInfo } from './modelGivens';
|
|
3
|
+
/**
|
|
4
|
+
* The page's Givens section: the givens this source reads, as a page section
|
|
5
|
+
* like its Views and fields (title, "2 givens"), first on the page because they
|
|
6
|
+
* set every run below it. Inside it, the SDK's `GivensPanel` in its `bar`
|
|
7
|
+
* layout, the dashboard's filter bar, so a given is set with the same control,
|
|
8
|
+
* the same "Default: …" line and the same Reset on a model page as on a
|
|
9
|
+
* dashboard. None when the source reads no given. When the page can't tell
|
|
10
|
+
* whether the source reads a given it shows, it says that a value set for it
|
|
11
|
+
* may not apply, rather than offering a control that looks as if it narrows
|
|
12
|
+
* every run.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ModelGivensSection({ givens, unknown, inheritedFrom, values, onChange, onReset, environmentName, packageName, modelPath, versionId, declaredTypes, }: {
|
|
15
|
+
/** The givens this source reads (host-filled ones already left out). */
|
|
16
|
+
givens: ReadonlyArray<GivenInfo>;
|
|
17
|
+
/** Names of the givens shown that the page can't tie to the source either
|
|
18
|
+
* way: its model file builds it on an import, a query or a `compose(…)`
|
|
19
|
+
* (scanGivensForSource). */
|
|
20
|
+
unknown?: ReadonlySet<string>;
|
|
21
|
+
/** Given name → the sources it is read by that the page can't open (the
|
|
22
|
+
* model doesn't export them), for the line naming where it comes from. */
|
|
23
|
+
inheritedFrom?: ReadonlyMap<string, string[]>;
|
|
24
|
+
values: Map<string, GivenValue>;
|
|
25
|
+
onChange: (name: string, value: GivenValue) => void;
|
|
26
|
+
onReset: () => void;
|
|
27
|
+
environmentName: string;
|
|
28
|
+
packageName: string;
|
|
29
|
+
modelPath: string;
|
|
30
|
+
versionId?: string;
|
|
31
|
+
declaredTypes: ReadonlyMap<string, string | undefined>;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* One kind of thing a source holds (Views, Queries, Measures, Calculations,
|
|
4
|
+
* Dimensions, Joins)
|
|
5
|
+
* as a page section that is always open: the page's own section header (an h2),
|
|
6
|
+
* its Expand all under the title where it has one, then everything in it. No count: every
|
|
7
|
+
* row is on the page, and the line is the section's control's. A source page is read like a
|
|
8
|
+
* notebook, top to bottom, so nothing on it is folded away.
|
|
9
|
+
*
|
|
10
|
+
* <p>`level="h3"` is the same section one step down, inside a join: a joined
|
|
11
|
+
* source's Measures and Dimensions, titled as the page's own, a size smaller.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ModelSection({ label, count, level, testId, action, children, }: {
|
|
14
|
+
label: string;
|
|
15
|
+
count: number;
|
|
16
|
+
level?: "h2" | "h3";
|
|
17
|
+
testId?: string;
|
|
18
|
+
/** A control on the line under the title (Expand all), on an h2 section. */
|
|
19
|
+
action?: ReactNode;
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ModelViewerExtensions } from './extensions';
|
|
3
|
+
import { FieldEntity } from './fieldEntities';
|
|
4
|
+
import { QueryRunEvent } from './useRunQuery';
|
|
5
|
+
export interface ModelViewerProps {
|
|
6
|
+
/** The model, as `publisher://environments/{env}/packages/{pkg}/models/{path}`
|
|
7
|
+
* (`encodeResourceUri`), with an optional `versionId`. */
|
|
8
|
+
resourceUri: string;
|
|
9
|
+
/**
|
|
10
|
+
* The source on screen, for a host that keeps it (in its address, say). With
|
|
11
|
+
* it the viewer is controlled: picking a source calls `onSourceChange` and
|
|
12
|
+
* shows what the host passes back. A name the model doesn't expose shows a
|
|
13
|
+
* not-found state naming the sources it does.
|
|
14
|
+
*/
|
|
15
|
+
sourceName?: string;
|
|
16
|
+
/** Called with the source a reader picks. */
|
|
17
|
+
onSourceChange?: (sourceName: string) => void;
|
|
18
|
+
/** Which source to open on when uncontrolled; the model's default otherwise. */
|
|
19
|
+
initialSourceName?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Read and run the files and sources the package's `index.malloy` hides, for a
|
|
22
|
+
* reader the server lets edit the package; anyone else is refused. A file read
|
|
23
|
+
* this way is marked Private on its header.
|
|
24
|
+
*/
|
|
25
|
+
includeHiddenFilesAndSources?: boolean;
|
|
26
|
+
/** Givens the host fills on every query (`$GROUPS`, say): never a reader's input. */
|
|
27
|
+
hostGivenNames?: ReadonlyArray<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Given values from the host, typically its URL's query parameters
|
|
30
|
+
* (`useGivenUrlParams`), so a link to the page opens with them applied. Read
|
|
31
|
+
* as the page loads and whenever they change beneath it; names the model
|
|
32
|
+
* doesn't declare are ignored. Without it the values live in the viewer.
|
|
33
|
+
*/
|
|
34
|
+
givens?: Record<string, string>;
|
|
35
|
+
/**
|
|
36
|
+
* The applied values whenever they change, with every given name the model
|
|
37
|
+
* declares (`managed`, so the host knows which parameters to remove), for a
|
|
38
|
+
* host that keeps them in its URL. Called once the model has loaded.
|
|
39
|
+
*/
|
|
40
|
+
onGivensChange?: (givens: Record<string, string>, managed: readonly string[]) => void;
|
|
41
|
+
/** Show the Malloy of a source's access rules beside their words. */
|
|
42
|
+
showAccessRules?: boolean;
|
|
43
|
+
/** The heading level of the source's name: `h1` where the viewer is the page. */
|
|
44
|
+
headingLevel?: "h1" | "h2";
|
|
45
|
+
/** Controls at the right of the source's heading. */
|
|
46
|
+
headerActions?: ReactNode;
|
|
47
|
+
/** A host's chips on the source's status row. */
|
|
48
|
+
renderSourceStatus?: (sourceName: string) => ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* A host's fuller record of the model's fields (see {@link FieldEntity}):
|
|
51
|
+
* per-field code where the file's text isn't served, inherited columns, join
|
|
52
|
+
* targets and declarations. The viewer reads the model file's text without it.
|
|
53
|
+
*/
|
|
54
|
+
entities?: ReadonlyArray<FieldEntity>;
|
|
55
|
+
/** `entities` is still being read: rows hold their code rather than saying there is none. */
|
|
56
|
+
entitiesLoading?: boolean;
|
|
57
|
+
/** `entities` could not be read: a row whose code would come from them says so. */
|
|
58
|
+
entitiesError?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* A host's descriptions of the columns each source's table passes through
|
|
61
|
+
* (source name → column → text), for a dimension with no `#(doc)` of its
|
|
62
|
+
* own; shown marked as generated.
|
|
63
|
+
*/
|
|
64
|
+
columnDescriptions?: ReadonlyMap<string, ReadonlyMap<string, string>>;
|
|
65
|
+
/** Where a join to a source in another model file opens; without it such a join has no arrow. */
|
|
66
|
+
joinHref?: (target: {
|
|
67
|
+
modelPath: string;
|
|
68
|
+
sourceName: string;
|
|
69
|
+
}) => string | undefined;
|
|
70
|
+
/** Labels every run carries (`QueryRequest.queryMetadata`). */
|
|
71
|
+
queryMetadata?: Readonly<Record<string, string>>;
|
|
72
|
+
/** Called once per run that settles. */
|
|
73
|
+
onQueryRun?: (event: QueryRunEvent) => void;
|
|
74
|
+
/** A result larger than this (bytes) is held behind a warning before it renders. */
|
|
75
|
+
maxResultSize?: number;
|
|
76
|
+
/** What a host adds to the rows and runs (see {@link ModelViewerExtensions}). */
|
|
77
|
+
extensions?: ModelViewerExtensions;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* A Malloy model, read-only: the selected source's givens, views, the model's
|
|
81
|
+
* named queries, and the source's measures, calculations, dimensions and joins,
|
|
82
|
+
* under a header whose "2 sources ▾" pill switches between the model's sources.
|
|
83
|
+
* Every view and named query runs when opened, and a given's picker reads its
|
|
84
|
+
* options when opened, never on render, so browsing costs nothing; a dimension
|
|
85
|
+
* the model tags `#(index)` lists its common values.
|
|
86
|
+
*
|
|
87
|
+
* Nothing here writes a value into Malloy text. A run is a view or a query by
|
|
88
|
+
* name, every name is quoted (`malloyIdentifier`), and given values travel as
|
|
89
|
+
* the request's `givens`, which the server binds.
|
|
90
|
+
*/
|
|
91
|
+
export declare function ModelViewer({ resourceUri, sourceName: controlledSourceName, onSourceChange, initialSourceName, includeHiddenFilesAndSources, hostGivenNames, givens: hostParams, onGivensChange, showAccessRules, headingLevel, headerActions, renderSourceStatus, entities, entitiesLoading, entitiesError, columnDescriptions, joinHref, queryMetadata, onQueryRun, maxResultSize, extensions, }: ModelViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ExplorerQuery } from './schemaModel';
|
|
2
|
+
import { RunContext } from './useRunQuery';
|
|
3
|
+
/**
|
|
4
|
+
* A model's named queries as a section of rows, drawn and run exactly as a
|
|
5
|
+
* source's views are (ViewRow): opening one runs it, under Result | Code. Its
|
|
6
|
+
* code is the `query:` declaration read from the
|
|
7
|
+
* model file; where the file isn't served, Code stays in place, disabled, saying
|
|
8
|
+
* why.
|
|
9
|
+
*/
|
|
10
|
+
export declare function QueriesGroup({ queries, sourceText, modelPath, run, }: {
|
|
11
|
+
queries: ReadonlyArray<ExplorerQuery>;
|
|
12
|
+
sourceText?: string;
|
|
13
|
+
modelPath: string;
|
|
14
|
+
run?: RunContext;
|
|
15
|
+
}): import("react/jsx-runtime").JSX.Element;
|