@malloy-publisher/sdk 0.9.9 → 0.9.10

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 (26) hide show
  1. package/dist/{RenderedResult-Bw7EQc42.cjs.js → RenderedResult-BcgYjkZ0.cjs.js} +1 -1
  2. package/dist/{RenderedResult-BHuJpdSn.es.js → RenderedResult-Dp1Qdajz.es.js} +1 -1
  3. package/dist/builder/index.cjs.js +61 -61
  4. package/dist/builder/index.es.js +782 -793
  5. package/dist/components/Dashboard/DashboardView.d.ts +11 -0
  6. package/dist/components/Dashboard/useStuck.d.ts +14 -0
  7. package/dist/components/DocumentCreate/newNotebook.d.ts +9 -5
  8. package/dist/components/ReportBuilder/FilterStrip.d.ts +3 -1
  9. package/dist/components/ReportBuilder/TileMenu.d.ts +7 -2
  10. package/dist/index.cjs.js +1 -1
  11. package/dist/index.es.js +3 -3
  12. package/dist/{useCompiledDocument-1dgF5CC9.es.js → useCompiledDocument-BMPDvdFx.es.js} +2348 -2310
  13. package/dist/{useCompiledDocument-BKyRnXmA.cjs.js → useCompiledDocument-UY28ITET.cjs.js} +34 -34
  14. package/package.json +1 -1
  15. package/src/components/Dashboard/DashboardView.tsx +62 -13
  16. package/src/components/Dashboard/useStuck.ts +38 -0
  17. package/src/components/DocumentCreate/newNotebook.spec.ts +8 -6
  18. package/src/components/DocumentCreate/newNotebook.ts +26 -12
  19. package/src/components/ReportBuilder/BuilderDialogs.tsx +5 -3
  20. package/src/components/ReportBuilder/BuilderGrid.tsx +13 -3
  21. package/src/components/ReportBuilder/FilterStrip.tsx +118 -118
  22. package/src/components/ReportBuilder/ReportBuilder.inline.spec.tsx +0 -1
  23. package/src/components/ReportBuilder/ReportBuilder.spec.tsx +5 -6
  24. package/src/components/ReportBuilder/ReportBuilder.tsx +1 -0
  25. package/src/components/ReportBuilder/TileMenu.tsx +8 -3
  26. package/src/components/ReportBuilder/newDashboard.spec.ts +2 -3
@@ -34,8 +34,13 @@ export interface TileMenuProps {
34
34
  onRemove: () => void;
35
35
  /** Why removing is refused, shown beside a Remove that stays focusable; absent when it is allowed. */
36
36
  removeBlocked?: string;
37
- /** Open the clickable-cells window for this tile's source. */
38
- onDrills: () => void;
37
+ /**
38
+ * Open the clickable-cells window for this tile's source. Absent when the
39
+ * source declares no dimension in this file, so there is nothing a drill
40
+ * could go on: the menu then offers no Drill, rather than a window that
41
+ * explains why its own Apply is off.
42
+ */
43
+ onDrills?: () => void;
39
44
  /** The catalog's view the tile shows, when the catalog knows it: what decides which charts are offered. */
40
45
  view?: Pick<CatalogView, "chart" | "aggregateOnly">;
41
46
  }
@@ -164,7 +169,7 @@ export function TileMenu({
164
169
  </Typography>
165
170
  )}
166
171
  <Stack direction="row" sx={{ justifyContent: "space-between" }}>
167
- {editable ? (
172
+ {editable && onDrills ? (
168
173
  <Button
169
174
  size="small"
170
175
  startIcon={<AdsClickIcon />}
@@ -17,7 +17,7 @@ describe("a new dashboard", () => {
17
17
  expect(slugFor("***")).toBe("");
18
18
  });
19
19
 
20
- it("is a grid report the builder opens: an intro text tile, then the picked view", async () => {
20
+ it("is a grid report the builder opens: the picked view as its one tile", async () => {
21
21
  const text = newDashboardSource({
22
22
  title: 'Sales "West"',
23
23
  modelPath: "models/storefront.malloy",
@@ -39,10 +39,9 @@ describe("a new dashboard", () => {
39
39
  expect(document.layout).toBe("grid");
40
40
  expect(document.columns).toBe(12);
41
41
  expect(document.tiles.map((tile) => tile.name)).toEqual([
42
- "intro",
43
42
  "by_category_tile",
44
43
  ]);
45
- expect(queryTile(document, 1).declaration).toEqual({
44
+ expect(queryTile(document, 0).declaration).toEqual({
46
45
  kind: "reference",
47
46
  from: "by_category",
48
47
  });