@malloy-publisher/sdk 0.0.249 → 0.0.250

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.
Files changed (165) hide show
  1. package/README.md +5 -0
  2. package/TREE_SHAKING.md +5 -0
  3. package/bunfig.toml +3 -0
  4. package/dist/client/api.d.ts +9 -3
  5. package/dist/components/drill/resolveDrill.d.ts +0 -20
  6. package/dist/components/given/filterValue.d.ts +0 -20
  7. package/dist/components/styles.d.ts +12 -4
  8. package/dist/{core-DZk7z7ko.cjs.js → core-CVXEUnnm.cjs.js} +1 -1
  9. package/dist/{core-DFBwNhvb.es.js → core-Cr-9Wkp3.es.js} +1 -1
  10. package/dist/{index-CWQXhe0D.cjs.js → index-C-KeIwsG.cjs.js} +84 -83
  11. package/dist/{index-CLcRrkxd.es.js → index-DVkelll3.es.js} +6530 -6545
  12. package/dist/index.cjs.js +1 -1
  13. package/dist/index.es.js +1 -1
  14. package/dist/utils/malloyString.d.ts +7 -0
  15. package/package.json +1 -1
  16. package/src/client-entry.ts +3 -0
  17. package/src/components/AnalyzePackageButton.tsx +3 -0
  18. package/src/components/ApiErrorDisplay.tsx +3 -0
  19. package/src/components/Connections/AddConnectionDialog.tsx +3 -0
  20. package/src/components/Connections/DeleteConnectionDialog.tsx +3 -0
  21. package/src/components/Connections/EditConnectionDialog.tsx +3 -0
  22. package/src/components/Connections/common.ts +3 -0
  23. package/src/components/DOMElement/DOMElement.tsx +3 -0
  24. package/src/components/DOMElement/index.ts +3 -0
  25. package/src/components/Dashboard/Dashboard.tsx +3 -0
  26. package/src/components/Dashboard/DashboardTile.tsx +3 -0
  27. package/src/components/Dashboard/index.ts +3 -0
  28. package/src/components/DataAppViewer/DataAppViewer.tsx +3 -0
  29. package/src/components/DataAppViewer/index.ts +3 -0
  30. package/src/components/Environment/About.tsx +3 -0
  31. package/src/components/Environment/AddPackageDialog.tsx +3 -0
  32. package/src/components/Environment/ConnectionExplorer.tsx +3 -0
  33. package/src/components/Environment/Connections.tsx +3 -0
  34. package/src/components/Environment/DeletePackageDialog.tsx +3 -0
  35. package/src/components/Environment/EditPackageDialog.tsx +3 -0
  36. package/src/components/Environment/Environment.tsx +3 -0
  37. package/src/components/Environment/Packages.tsx +3 -0
  38. package/src/components/Environment/index.ts +3 -0
  39. package/src/components/Home/AddEnvironmentDialog.tsx +3 -0
  40. package/src/components/Home/DeleteEnvironmentDialog.tsx +3 -0
  41. package/src/components/Home/EditEnvironmentDialog.tsx +3 -0
  42. package/src/components/Home/Home.tsx +13 -14
  43. package/src/components/Home/index.ts +3 -0
  44. package/src/components/Loading.tsx +3 -0
  45. package/src/components/Materializations/CreateEnvMaterializationDialog.tsx +3 -0
  46. package/src/components/Materializations/CreateMaterializationDialog.tsx +3 -0
  47. package/src/components/Materializations/DeleteMaterializationDialog.tsx +3 -0
  48. package/src/components/Materializations/EnvironmentMaterializations.tsx +3 -0
  49. package/src/components/Materializations/ManifestView.tsx +3 -0
  50. package/src/components/Materializations/MaterializationDetailDialog.tsx +3 -0
  51. package/src/components/Materializations/MaterializationRunsList.tsx +3 -0
  52. package/src/components/Materializations/Materializations.tsx +3 -0
  53. package/src/components/Materializations/ScheduleCard.tsx +3 -0
  54. package/src/components/Materializations/SectionLabel.tsx +3 -0
  55. package/src/components/Materializations/SetScheduleDialog.tsx +3 -0
  56. package/src/components/Materializations/TriggerChip.tsx +3 -0
  57. package/src/components/Materializations/cron.ts +3 -0
  58. package/src/components/Materializations/index.ts +3 -0
  59. package/src/components/Materializations/utils.ts +3 -0
  60. package/src/components/Model/Model.tsx +3 -0
  61. package/src/components/Model/ModelCell.tsx +3 -0
  62. package/src/components/Model/ModelExplorer.tsx +3 -0
  63. package/src/components/Model/ModelExplorerDialog.tsx +3 -0
  64. package/src/components/Model/SourcesExplorer.tsx +3 -0
  65. package/src/components/Model/index.ts +3 -0
  66. package/src/components/Model/useModelData.ts +3 -0
  67. package/src/components/Notebook/Notebook.tsx +3 -0
  68. package/src/components/Notebook/NotebookCell.tsx +3 -0
  69. package/src/components/Notebook/index.ts +3 -0
  70. package/src/components/Notebook/runPlan.spec.ts +3 -0
  71. package/src/components/Notebook/runPlan.ts +3 -0
  72. package/src/components/Notebook/types.ts +3 -0
  73. package/src/components/Package/ContentTypeIcon.spec.ts +3 -0
  74. package/src/components/Package/ContentTypeIcon.tsx +3 -0
  75. package/src/components/Package/FileTreeView.tsx +3 -0
  76. package/src/components/Package/Models.tsx +3 -0
  77. package/src/components/Package/Package.tsx +3 -0
  78. package/src/components/Package/index.ts +3 -0
  79. package/src/components/QueryResult/QueryResult.tsx +3 -0
  80. package/src/components/QueryResult/index.ts +3 -0
  81. package/src/components/RenderedResult/RenderedResult.tsx +3 -0
  82. package/src/components/RenderedResult/ResultContainer.tsx +3 -0
  83. package/src/components/RenderedResult/index.ts +3 -0
  84. package/src/components/RenderedResult/renderLogs.spec.ts +3 -0
  85. package/src/components/RenderedResult/renderLogs.ts +3 -0
  86. package/src/components/ResultsDialog.tsx +3 -0
  87. package/src/components/ServerProvider.tsx +3 -0
  88. package/src/components/Workbook/BrowserWorkbookStorage.ts +3 -0
  89. package/src/components/Workbook/EditableMalloyCell.tsx +3 -0
  90. package/src/components/Workbook/ModelPicker.tsx +3 -0
  91. package/src/components/Workbook/MutableCell.tsx +3 -0
  92. package/src/components/Workbook/Workbook.tsx +3 -0
  93. package/src/components/Workbook/WorkbookList.tsx +3 -0
  94. package/src/components/Workbook/WorkbookManager.ts +3 -0
  95. package/src/components/Workbook/WorkbookStorage.ts +3 -0
  96. package/src/components/Workbook/WorkbookStorageProvider.tsx +3 -0
  97. package/src/components/Workbook/index.ts +3 -0
  98. package/src/components/click_helper.ts +3 -0
  99. package/src/components/drill/index.ts +3 -0
  100. package/src/components/drill/markDrillableCells.dom.spec.ts +3 -0
  101. package/src/components/drill/markDrillableCells.spec.ts +3 -0
  102. package/src/components/drill/markDrillableCells.ts +3 -0
  103. package/src/components/drill/resolveDrill.spec.ts +3 -0
  104. package/src/components/drill/resolveDrill.ts +3 -0
  105. package/src/components/drill/useDrill.tsx +3 -0
  106. package/src/components/filter/DimensionFilter.tsx +3 -0
  107. package/src/components/filter/index.ts +3 -0
  108. package/src/components/filter/utils.ts +16 -5
  109. package/src/components/given/GivenInput.spec.tsx +3 -0
  110. package/src/components/given/GivenInput.tsx +3 -0
  111. package/src/components/given/GivensPanel.spec.tsx +3 -0
  112. package/src/components/given/GivensPanel.tsx +3 -0
  113. package/src/components/given/filterValue.spec.ts +3 -0
  114. package/src/components/given/filterValue.ts +3 -0
  115. package/src/components/given/index.ts +3 -0
  116. package/src/components/given/paramCodec.spec.ts +3 -0
  117. package/src/components/given/paramCodec.ts +3 -0
  118. package/src/components/given/utils.spec.ts +3 -0
  119. package/src/components/given/utils.ts +3 -0
  120. package/src/components/highlighter.ts +3 -0
  121. package/src/components/index.ts +3 -0
  122. package/src/components/styles.ts +15 -4
  123. package/src/constants/docLinks.spec.ts +3 -0
  124. package/src/constants/docLinks.ts +3 -0
  125. package/src/hooks/givenValue.ts +3 -0
  126. package/src/hooks/index.ts +3 -0
  127. package/src/hooks/useDimensionFilters.ts +4 -7
  128. package/src/hooks/useDimensionFiltersFromSpec.ts +3 -0
  129. package/src/hooks/useDimensionFiltersQuery.ts +4 -7
  130. package/src/hooks/useDimensionalFilterRangeData.ts +4 -7
  131. package/src/hooks/useGivensState.spec.ts +3 -0
  132. package/src/hooks/useGivensState.ts +3 -0
  133. package/src/hooks/useModelGivens.ts +3 -0
  134. package/src/hooks/useQueryWithApiError.ts +3 -0
  135. package/src/hooks/useRawQueryData.ts +3 -0
  136. package/src/hooks/useSuggestOptions.spec.ts +3 -0
  137. package/src/hooks/useSuggestOptions.ts +3 -0
  138. package/src/index.ts +3 -0
  139. package/src/react-app-env.d.ts +3 -0
  140. package/src/theme/ThemeContext.tsx +3 -0
  141. package/src/theme/buildMalloyExplicitTheme.ts +3 -0
  142. package/src/theme/buildTableCssVars.spec.ts +3 -0
  143. package/src/theme/buildTableCssVars.ts +3 -0
  144. package/src/theme/buildVegaThemeOverride.spec.ts +3 -0
  145. package/src/theme/buildVegaThemeOverride.ts +3 -0
  146. package/src/theme/defaults.ts +3 -0
  147. package/src/theme/index.ts +3 -0
  148. package/src/theme/keys.ts +3 -0
  149. package/src/theme/readChartAnnotations.spec.ts +3 -0
  150. package/src/theme/readChartAnnotations.ts +3 -0
  151. package/src/theme/resolveTheme.spec.ts +3 -0
  152. package/src/theme/resolveTheme.ts +3 -0
  153. package/src/theme/types.ts +3 -0
  154. package/src/utils/dataAppEmbed.spec.ts +3 -0
  155. package/src/utils/dataAppEmbed.ts +3 -0
  156. package/src/utils/formatting.spec.ts +3 -0
  157. package/src/utils/formatting.ts +3 -0
  158. package/src/utils/malloyString.spec.ts +24 -0
  159. package/src/utils/malloyString.ts +12 -0
  160. package/src/utils/parsing.spec.ts +3 -0
  161. package/src/utils/parsing.ts +3 -0
  162. package/src/utils/queryClient.ts +3 -0
  163. package/test/README.md +5 -0
  164. package/test/setup.ts +3 -0
  165. package/vite.config.ts +3 -0
package/dist/index.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CWQXhe0D.cjs.js"),r=require("./ServerProvider-CcfeBpt3.cjs.js");exports.AnalyzePackageButton=e.AnalyzePackageButton;exports.BrowserWorkbookStorage=e.BrowserWorkbookStorage;exports.ConnectionExplorer=e.ConnectionExplorer;exports.DOC_LINKS=e.DOC_LINKS;exports.DRILL_CELL_CLASS=e.DRILL_CELL_CLASS;exports.DRILL_SELF=e.DRILL_SELF;exports.Dashboard=e.Dashboard;exports.DashboardTile=e.DashboardTile;exports.DataAppViewer=e.DataAppViewer;exports.DimensionFilter=e.DimensionFilter;exports.EmbeddedQueryResult=e.EmbeddedQueryResult;exports.Environment=e.Environment;exports.EnvironmentMaterializations=e.EnvironmentMaterializations;exports.GivenInput=e.GivenInput;exports.GivensPanel=e.GivensPanel;exports.Home=e.Home;exports.Loading=e.Loading;exports.Materializations=e.Materializations;exports.Model=e.Model;exports.ModelExplorer=e.ModelExplorer;exports.ModelExplorerDialog=e.ModelExplorerDialog;exports.Models=e.Models;exports.Notebook=e.Notebook;exports.Package=e.Package;exports.Packages=e.Packages;exports.QueryResult=e.QueryResult;exports.RenderedResult=e.RenderedResult;exports.ResultContainer=e.ResultContainer;exports.SourceExplorerComponent=e.SourceExplorerComponent;exports.SourcesExplorer=e.SourcesExplorer;exports.Workbook=e.Workbook;exports.WorkbookList=e.WorkbookList;exports.WorkbookManager=e.WorkbookManager;exports.WorkbookStorageProvider=e.WorkbookStorageProvider;exports.buildMalloyExplicitTheme=e.buildMalloyExplicitTheme;exports.buildTableCssVars=e.buildTableCssVars;exports.buildVegaThemeOverride=e.buildVegaThemeOverride;exports.createEmbeddedQueryResult=e.createEmbeddedQueryResult;exports.drillDestinations=e.drillDestinations;exports.drillValueToFilter=e.drillValueToFilter;exports.drillableFieldNames=e.drillableFieldNames;exports.encodeDrillValue=e.encodeDrillValue;exports.encodeResourceUri=e.encodeResourceUri;exports.extractDimensionSpecs=e.extractDimensionSpecs;exports.extractSourceFromQuery=e.extractSourceFromQuery;exports.generateFilterClause=e.generateFilterClause;exports.getDimensionKey=e.getDimensionKey;exports.getJoinedSources=e.getJoinedSources;exports.humanizeSlug=e.humanizeSlug;exports.injectWhereClause=e.injectWhereClause;exports.makeDimensionKey=e.makeDimensionKey;exports.markDrillableCells=e.markDrillableCells;exports.packageFileUrl=e.packageFileUrl;exports.parseAllSourceInfos=e.parseAllSourceInfos;exports.parseDimensionFilterAnnotation=e.parseDimensionFilterAnnotation;exports.parseNotebookFilterAnnotation=e.parseNotebookFilterAnnotation;exports.parseResourceUri=e.parseResourceUri;exports.readChartAnnotations=e.readChartAnnotations;exports.resolveDrill=e.resolveDrill;exports.useDimensionFilters=e.useDimensionFilters;exports.useDimensionFiltersFromSpec=e.useDimensionFiltersFromSpec;exports.useDimensionFiltersQuery=e.useDimensionFiltersQuery;exports.useDimensionalFilterRangeData=e.useDimensionalFilterRangeData;exports.useDrill=e.useDrill;exports.useGivensState=e.useGivensState;exports.useModelData=e.useModelData;exports.useModelGivens=e.useModelGivens;exports.useRawQueryData=e.useRawQueryData;exports.useRouterClickHandler=e.useRouterClickHandler;exports.useSuggestOptions=e.useSuggestOptions;exports.DEFAULT_THEME=r.DEFAULT_THEME;exports.ServerProvider=r.ServerProvider;exports.ThemeProvider=r.ThemeProvider;exports.resolveMode=r.resolveMode;exports.resolveTheme=r.resolveTheme;exports.usePublisherTheme=r.usePublisherTheme;exports.useServer=r.useServer;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C-KeIwsG.cjs.js"),r=require("./ServerProvider-CcfeBpt3.cjs.js");exports.AnalyzePackageButton=e.AnalyzePackageButton;exports.BrowserWorkbookStorage=e.BrowserWorkbookStorage;exports.ConnectionExplorer=e.ConnectionExplorer;exports.DOC_LINKS=e.DOC_LINKS;exports.DRILL_CELL_CLASS=e.DRILL_CELL_CLASS;exports.DRILL_SELF=e.DRILL_SELF;exports.Dashboard=e.Dashboard;exports.DashboardTile=e.DashboardTile;exports.DataAppViewer=e.DataAppViewer;exports.DimensionFilter=e.DimensionFilter;exports.EmbeddedQueryResult=e.EmbeddedQueryResult;exports.Environment=e.Environment;exports.EnvironmentMaterializations=e.EnvironmentMaterializations;exports.GivenInput=e.GivenInput;exports.GivensPanel=e.GivensPanel;exports.Home=e.Home;exports.Loading=e.Loading;exports.Materializations=e.Materializations;exports.Model=e.Model;exports.ModelExplorer=e.ModelExplorer;exports.ModelExplorerDialog=e.ModelExplorerDialog;exports.Models=e.Models;exports.Notebook=e.Notebook;exports.Package=e.Package;exports.Packages=e.Packages;exports.QueryResult=e.QueryResult;exports.RenderedResult=e.RenderedResult;exports.ResultContainer=e.ResultContainer;exports.SourceExplorerComponent=e.SourceExplorerComponent;exports.SourcesExplorer=e.SourcesExplorer;exports.Workbook=e.Workbook;exports.WorkbookList=e.WorkbookList;exports.WorkbookManager=e.WorkbookManager;exports.WorkbookStorageProvider=e.WorkbookStorageProvider;exports.buildMalloyExplicitTheme=e.buildMalloyExplicitTheme;exports.buildTableCssVars=e.buildTableCssVars;exports.buildVegaThemeOverride=e.buildVegaThemeOverride;exports.createEmbeddedQueryResult=e.createEmbeddedQueryResult;exports.drillDestinations=e.drillDestinations;exports.drillValueToFilter=e.drillValueToFilter;exports.drillableFieldNames=e.drillableFieldNames;exports.encodeDrillValue=e.encodeDrillValue;exports.encodeResourceUri=e.encodeResourceUri;exports.extractDimensionSpecs=e.extractDimensionSpecs;exports.extractSourceFromQuery=e.extractSourceFromQuery;exports.generateFilterClause=e.generateFilterClause;exports.getDimensionKey=e.getDimensionKey;exports.getJoinedSources=e.getJoinedSources;exports.humanizeSlug=e.humanizeSlug;exports.injectWhereClause=e.injectWhereClause;exports.makeDimensionKey=e.makeDimensionKey;exports.markDrillableCells=e.markDrillableCells;exports.packageFileUrl=e.packageFileUrl;exports.parseAllSourceInfos=e.parseAllSourceInfos;exports.parseDimensionFilterAnnotation=e.parseDimensionFilterAnnotation;exports.parseNotebookFilterAnnotation=e.parseNotebookFilterAnnotation;exports.parseResourceUri=e.parseResourceUri;exports.readChartAnnotations=e.readChartAnnotations;exports.resolveDrill=e.resolveDrill;exports.useDimensionFilters=e.useDimensionFilters;exports.useDimensionFiltersFromSpec=e.useDimensionFiltersFromSpec;exports.useDimensionFiltersQuery=e.useDimensionFiltersQuery;exports.useDimensionalFilterRangeData=e.useDimensionalFilterRangeData;exports.useDrill=e.useDrill;exports.useGivensState=e.useGivensState;exports.useModelData=e.useModelData;exports.useModelGivens=e.useModelGivens;exports.useRawQueryData=e.useRawQueryData;exports.useRouterClickHandler=e.useRouterClickHandler;exports.useSuggestOptions=e.useSuggestOptions;exports.DEFAULT_THEME=r.DEFAULT_THEME;exports.ServerProvider=r.ServerProvider;exports.ThemeProvider=r.ThemeProvider;exports.resolveMode=r.resolveMode;exports.resolveTheme=r.resolveTheme;exports.usePublisherTheme=r.usePublisherTheme;exports.useServer=r.useServer;
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, a7 as r, C as o, ao as i, j as l, l as n, D as t, g as u, i as d, x as m, a0 as D, E as c, R as k, L as p, M as S, N as b, O as g, Q as v, S as E, T as F, U as R, _ as C, Y as L, Z as M, P as h, $ as T, a2 as x, a3 as y, W as A, V as P, a4 as Q, a5 as W, a8 as I, a6 as V, ai as _, aj as G, ak as N, a1 as U, n as f, o as z, k as B, q as H, an as K, y as O, B as j, F as w, ad as J, G as q, r as X, H as Y, ae as Z, m as $, p as aa, I as ea, J as sa, K as ra, am as oa, al as ia, t as la, a9 as na, aa as ta, ab as ua, ac as da, v as ma, ag as Da, X as ca, af as ka, u as pa, e as Sa, ah as ba } from "./index-CLcRrkxd.es.js";
1
+ import { A as s, a7 as r, C as o, ao as i, j as l, l as n, D as t, g as u, i as d, x as m, a0 as D, E as c, R as k, L as p, M as S, N as b, O as g, Q as v, S as E, T as F, U as R, _ as C, Y as L, Z as M, P as h, $ as T, a2 as x, a3 as y, W as A, V as P, a4 as Q, a5 as W, a8 as I, a6 as V, ai as _, aj as G, ak as N, a1 as U, n as f, o as z, k as B, q as H, an as K, y as O, B as j, F as w, ad as J, G as q, r as X, H as Y, ae as Z, m as $, p as aa, I as ea, J as sa, K as ra, am as oa, al as ia, t as la, a9 as na, aa as ta, ab as ua, ac as da, v as ma, ag as Da, X as ca, af as ka, u as pa, e as Sa, ah as ba } from "./index-DVkelll3.es.js";
2
2
  import { aR as va, S as Ea, aT as Fa, aS as Ra, aQ as Ca, aB as La, u as Ma } from "./ServerProvider-EqBlMMqx.es.js";
3
3
  export {
4
4
  s as AnalyzePackageButton,
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Escape a value for use inside a single-quoted Malloy string literal.
3
+ *
4
+ * Backslashes are escaped first, then quotes: doing it the other way round
5
+ * would re-escape the backslash that the quote escape introduced.
6
+ */
7
+ export declare function escapeMalloyString(value: string): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/sdk",
3
3
  "description": "Malloy Publisher SDK",
4
- "version": "0.0.249",
4
+ "version": "0.0.250",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.es.js",
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  // Lightweight client entry point for better code splitting
2
5
  // This module contains essential client functionality without heavy UI components
3
6
 
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Add, Launch } from "@mui/icons-material";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Typography } from "@mui/material";
2
5
 
3
6
  export interface ApiError extends Error {
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import AddIcon from "@mui/icons-material/Add";
2
5
  import DeleteIcon from "@mui/icons-material/Delete";
3
6
  import Box from "@mui/material/Box";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Delete } from "@mui/icons-material";
2
5
  import CloseIcon from "@mui/icons-material/Close";
3
6
  import { Snackbar } from "@mui/material";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import AddIcon from "@mui/icons-material/Add";
2
5
  import DeleteIcon from "@mui/icons-material/Delete";
3
6
  import Box from "@mui/material/Box";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { HTMLInputTypeAttribute } from "react";
2
5
  import { ConnectionTypeEnum } from "../../client/api";
3
6
  import type {
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { useEffect, useRef } from "react";
2
5
 
3
6
  interface DOMElement {
@@ -1 +1,4 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as DOMElement } from "./DOMElement";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Alert, Box, Stack, Typography } from "@mui/material";
2
5
  import { useCallback, useMemo } from "react";
3
6
  import type { DashboardManifest } from "../../client";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Paper, Typography } from "@mui/material";
2
5
  import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
6
  import type { GivenValue } from "../../hooks/givenValue";
@@ -1,2 +1,5 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { Dashboard, type DashboardProps } from "./Dashboard";
2
5
  export { DashboardTile, type DashboardTileProps } from "./DashboardTile";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import OpenInNewIcon from "@mui/icons-material/OpenInNew";
2
5
  import { Box, IconButton, Stack, Tooltip, Typography } from "@mui/material";
3
6
  import { useEffect, useMemo, useRef, useState } from "react";
@@ -1 +1,4 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as DataAppViewer } from "./DataAppViewer";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Button } from "@mui/material";
2
5
  import Markdown from "markdown-to-jsx";
3
6
  import { useState } from "react";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Add } from "@mui/icons-material";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import {
2
5
  Box,
3
6
  Divider,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { MoreVert } from "@mui/icons-material";
2
5
  import StorageOutlinedIcon from "@mui/icons-material/StorageOutlined";
3
6
  import {
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import React, { useState } from "react";
2
5
  import Button from "@mui/material/Button";
3
6
  import Dialog from "@mui/material/Dialog";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Edit } from "@mui/icons-material";
2
5
  import { ListItemIcon, ListItemText, MenuItem, Snackbar } from "@mui/material";
3
6
  import Button from "@mui/material/Button";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Container, Stack, Typography } from "@mui/material";
2
5
  import { useEffect } from "react";
3
6
  import { parseResourceUri } from "../../utils/formatting";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { MoreVert } from "@mui/icons-material";
2
5
  import Inventory2OutlinedIcon from "@mui/icons-material/Inventory2Outlined";
3
6
  import {
@@ -1,2 +1,5 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Environment } from "./Environment";
2
5
  export { default as Packages } from "./Packages";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { AddCircleRounded } from "@mui/icons-material";
2
5
  import Button from "@mui/material/Button";
3
6
  import Dialog from "@mui/material/Dialog";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import React, { useState } from "react";
2
5
  import Button from "@mui/material/Button";
3
6
  import Dialog from "@mui/material/Dialog";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import React from "react";
2
5
  import Button from "@mui/material/Button";
3
6
  import TextField from "@mui/material/TextField";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { MoreVert } from "@mui/icons-material";
2
5
  import FolderOutlinedIcon from "@mui/icons-material/FolderOutlined";
3
6
  import {
@@ -75,27 +78,26 @@ const FEATURES: Array<{ title: string; body: string; href: string }> = [
75
78
  },
76
79
  ];
77
80
 
81
+ /**
82
+ * Always a new tab. `Home` is exported from the SDK, so it renders inside other
83
+ * people's pages as well as the standalone console, and same-tab navigation
84
+ * there unloads the host application. That includes the API spec, which is
85
+ * served by the Publisher server but not necessarily by the page's own origin.
86
+ * `target` and `rel` are set together so they cannot desynchronise.
87
+ */
78
88
  function InlineLink({
79
89
  href,
80
- external = true,
81
90
  children,
82
91
  }: {
83
92
  href: string;
84
- /**
85
- * Whether to open in a new tab. False for the API spec, which is served by
86
- * the Publisher server and replaces the console deliberately; true for
87
- * off-site targets. `target` and `rel` are both driven from this one flag so
88
- * they cannot desynchronise.
89
- */
90
- external?: boolean;
91
93
  children: React.ReactNode;
92
94
  }) {
93
95
  return (
94
96
  <Box
95
97
  component="a"
96
98
  href={href}
97
- target={external ? "_blank" : undefined}
98
- rel={external ? "noopener noreferrer" : undefined}
99
+ target="_blank"
100
+ rel="noopener noreferrer"
99
101
  sx={{ color: "text.primary", textDecoration: "underline" }}
100
102
  >
101
103
  {children}
@@ -285,10 +287,7 @@ export default function Home({ onClickEnvironment }: HomeProps) {
285
287
  server's root, and an SDK consumer's page origin need not be
286
288
  that server: a root-relative href resolves against the host and
287
289
  404s. serverBaseUrl exists for exactly this. */}
288
- <InlineLink
289
- href={`${serverBaseUrl(server)}/api-doc.html`}
290
- external={false}
291
- >
290
+ <InlineLink href={`${serverBaseUrl(server)}/api-doc.html`}>
292
291
  REST API
293
292
  </InlineLink>{" "}
294
293
  that does everything this console does.
@@ -1 +1,4 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Home } from "./Home";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, CircularProgress, Typography } from "@mui/material";
2
5
 
3
6
  export interface LoadingProps {
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import AddIcon from "@mui/icons-material/Add";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import AddIcon from "@mui/icons-material/Add";
2
5
  import {
3
6
  Button,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Delete } from "@mui/icons-material";
2
5
  import CloseIcon from "@mui/icons-material/Close";
3
6
  import Button from "@mui/material/Button";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Button, Snackbar, Stack, Typography } from "@mui/material";
2
5
  import { useQueryClient } from "@tanstack/react-query";
3
6
  import React, { useState } from "react";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import {
2
5
  Box,
3
6
  Stack,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import CloseIcon from "@mui/icons-material/Close";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { MoreVert } from "@mui/icons-material";
2
5
  import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
3
6
  import StopIcon from "@mui/icons-material/Stop";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import ScheduleIcon from "@mui/icons-material/Schedule";
2
5
  import {
3
6
  Box,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Typography } from "@mui/material";
2
5
  import { ReactNode } from "react";
3
6
 
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import ScheduleIcon from "@mui/icons-material/Schedule";
2
5
  import {
3
6
  Alert,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import ScheduleIcon from "@mui/icons-material/Schedule";
2
5
  import TouchAppIcon from "@mui/icons-material/TouchApp";
3
6
  import { Chip, Tooltip } from "@mui/material";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { CronExpressionParser } from "cron-parser";
2
5
  import cronstrue from "cronstrue";
3
6
 
@@ -1,2 +1,5 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Materializations } from "./Materializations";
2
5
  export { default as EnvironmentMaterializations } from "./EnvironmentMaterializations";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Materialization, MaterializationStatus } from "../../client";
2
5
 
3
6
  /**
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import "@malloydata/malloy-explorer/styles.css";
2
5
  import LinkOutlinedIcon from "@mui/icons-material/LinkOutlined";
3
6
  import SearchIcon from "@mui/icons-material/Search";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import PlayArrowIcon from "@mui/icons-material/PlayArrow";
2
5
  import SearchIcon from "@mui/icons-material/Search";
3
6
  import { Box, Button, IconButton, Typography } from "@mui/material";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Stack } from "@mui/material";
2
5
  import Autocomplete from "@mui/material/Autocomplete";
3
6
  import TextField from "@mui/material/TextField";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import React from "react";
2
5
  import { Dialog, DialogTitle, DialogContent, IconButton } from "@mui/material";
3
6
  import CloseIcon from "@mui/icons-material/Close";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import * as Malloy from "@malloydata/malloy-interfaces";
2
5
  import { Box, Stack } from "@mui/system";
3
6
  import {
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Model } from "./Model";
2
5
  export { ModelExplorer } from "./ModelExplorer";
3
6
  export { ModelExplorerDialog } from "./ModelExplorerDialog";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { CompiledModel } from "../../client";
2
5
  import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
6
  import { parseResourceUri } from "../../utils/formatting";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import "@malloydata/malloy-explorer/styles.css";
2
5
  import { Stack, Typography } from "@mui/material";
3
6
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import CloseIcon from "@mui/icons-material/Close";
2
5
  import CodeIcon from "@mui/icons-material/Code";
3
6
  import ContentCopyIcon from "@mui/icons-material/ContentCopy";
@@ -1 +1,4 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Notebook } from "./Notebook";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { describe, expect, it } from "bun:test";
2
5
  import { planRun } from "./runPlan";
3
6
 
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  /**
2
5
  * What the notebook's run effect should do about the state it just observed.
3
6
  *
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { NotebookCell as ClientNotebookCell } from "../../client";
2
5
 
3
6
  /**
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { describe, expect, it } from "bun:test";
2
5
  import { MALLOY_ACCENT } from "../styles";
3
6
  import { CONTENT_TINT, type ContentType } from "./ContentTypeIcon";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon";
2
5
  import { MALLOY_ACCENT, MALLOY_BRAND } from "../styles";
3
6
 
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import * as React from "react";
2
5
  import {
3
6
  TreeItem2Content,
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box, Typography } from "@mui/material";
2
5
  import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
6
  import { ApiErrorDisplay } from "../ApiErrorDisplay";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import ArrowBackIcon from "@mui/icons-material/ArrowBack";
2
5
  import CloseIcon from "@mui/icons-material/Close";
3
6
  import OpenInNewIcon from "@mui/icons-material/OpenInNew";
@@ -1,2 +1,5 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as Package } from "./Package";
2
5
  export { default as Models } from "./Models";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Suspense } from "react";
2
5
  import { useQueryWithApiError } from "../../hooks/useQueryWithApiError";
3
6
  import { parseResourceUri } from "../../utils/formatting";
@@ -1,2 +1,5 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  export { default as QueryResult } from "./QueryResult";
2
5
  export { EmbeddedQueryResult, createEmbeddedQueryResult } from "./QueryResult";
@@ -1,3 +1,6 @@
1
+ // Copyright (c) Credible Data Inc.
2
+ // SPDX-License-Identifier: MIT
3
+
1
4
  import { Box } from "@mui/material";
2
5
  import React, {
3
6
  Suspense,