@malloydata/malloy-explorer 0.0.269-dev250430234249 → 0.0.275-dev250509203914

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.
@@ -10,7 +10,7 @@
10
10
  @layer priority1{
11
11
  :root, .mly16bcggl{--mly1rtpqm4:rgba(10, 19, 23, 0.2);--mlywmj25p:rgba(121, 82, 255, 0.2);--mly1f95ebd:rgba(36, 187, 94, 0.2);--mly1jva6ta:rgba(3, 167, 215, 0.2);--mly1yr7ch6:rgba(241, 244, 247, 1);--mly1bs2mf7:rgba(0, 130, 251, 0.2);--mlywj8cgu:rgba(11, 153, 31, 0.2);--mlyhsum04:rgba(226, 164, 0, 0.2);--mly19gk0g3:rgba(227, 25, 59, 0.2);--mlyrbis2b:rgba(204, 211, 219, 1);--mly1eayp21:rgba(230, 235, 239, 1);--mly1bn1nfc:rgba(37, 54, 63, 1);}
12
12
  :root, .mly182du4u{--mly231nev:rgba(10, 19, 23, 1);--mly1i3blw4:rgba(78, 96, 111, 1);--mly16ir2n5:rgba(164, 176, 188, 1);--mly883cce:rgba(0, 100, 224, 1);--mlyy3jzoq:rgba(255, 255, 255, 1);--mly7qnfvx:rgba(10, 19, 23, 1);--mly3ib3qi:rgba(62, 6, 151, 1);--mlyndhcph:rgba(9, 68, 31, 1);--mlykotp7t:rgba(1, 73, 117, 1);--mlyf25c1a:rgba(66, 133, 244, 1);}
13
- :root, .mlyacbved{--mly8s4nhd:rgba(10, 19, 23, 1);--mly130oqjo:rgba(78, 96, 111, 1);--mlywh4rgx:rgba(164, 176, 188, 1);--mly1gq6bli:rgba(255, 255, 255, 1);--mly1jphivy:rgba(10, 19, 23, 1);--mly6i1qgk:rgba(121, 82, 255, 1);--mly1css67u:rgba(7, 109, 41, 1);--mly1fea1fg:rgba(2, 141, 193, 1);--mlyz9tc12:rgba(233, 175, 8, 1);--mly1dryxz7:rgba(0, 100, 224, 1);--mly176ansx:rgba(13, 134, 38, 1);--mlybq1dnb:rgba(227, 25, 59, 1);}
13
+ :root, .mlyacbved{--mly8s4nhd:rgba(10, 19, 23, 1);--mly130oqjo:rgba(78, 96, 111, 1);--mlywh4rgx:rgba(164, 176, 188, 1);--mly1gq6bli:rgba(255, 255, 255, 1);--mly1jphivy:rgba(164, 176, 188, 1);--mly6i1qgk:rgba(121, 82, 255, 1);--mly1css67u:rgba(7, 109, 41, 1);--mly1fea1fg:rgba(2, 141, 193, 1);--mlyz9tc12:rgba(233, 175, 8, 1);--mly1dryxz7:rgba(0, 100, 224, 1);--mly176ansx:rgba(13, 134, 38, 1);--mlybq1dnb:rgba(227, 25, 59, 1);}
14
14
  :root, .mlyugude9{--mlyiz2tia:#0064E0;--mly1nffz32:#0082FB32;--mly1mq821i:white;--mlyz6dflh:rgba(0, 0, 0, 0.10);--mly4a29vv:#0000000D;--mlyhoywqa:#050505;--mly1qcfjts:#A4B0BC;}
15
15
  :root, .mly18uf1kx{--mlynfhokh:none;}
16
16
  :root, .mly11fl7i8{--mlyvpnzvp:none;}
@@ -209,8 +209,10 @@
209
209
  .mly1x3oq6j{background-color:var(--mlywj8cgu)}
210
210
  .mly12peec7{background-color:white}
211
211
  .mly1mwwwfo{border-collapse:collapse}
212
+ .mlygbc89k{box-shadow:0 0 0 1px #CCD3DB}
212
213
  html:not([dir='rtl']) .mlyn8fsvk{box-shadow:0 0 0 1px rgb(0,100,224) inset,0 0 0 3px rgba(1,113,227,.3) inset}
213
214
  html[dir='rtl'] .mlyn8fsvk{box-shadow:0 0 0 1px rgb(0,100,224) inset, 0 0 0 3px rgba(1,113,227,.3) inset}
215
+ .mlybwr872{box-shadow:0 0 0 2px rgba(0,100,224,1)}
214
216
  html:not([dir='rtl']) .mly1kmqopl{box-shadow:0 0 5px 0 rgba(0,0,0,.1),0 0 1px 0 rgba(0,0,0,.1)}
215
217
  html[dir='rtl'] .mly1kmqopl{box-shadow:0 0 5px 0 rgba(0,0,0,.1), 0 0 1px 0 rgba(0,0,0,.1)}
216
218
  html:not([dir='rtl']) .mly5n1uv4{box-shadow:0 1px 2px 0 rgba(0,0,0,.1),0 2px 12px 0 rgba(0,0,0,.1)}
@@ -237,6 +239,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
237
239
  .mly1pc1dlx{color:var(--malloy-composer-form-foreground,#5f6368)}
238
240
  .mly1r0d382{color:var(--mly130oqjo)}
239
241
  .mly1xre2ib{color:var(--mly13n7235)}
242
+ .mlywzxoxx{color:var(--mly16ir2n5)}
240
243
  .mly1l99qkd{color:var(--mly176ansx)}
241
244
  .mly1evcnq1{color:var(--mly1css67u)}
242
245
  .mly1tw9ct1{color:var(--mly1dryxz7)}
@@ -350,6 +353,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
350
353
  .mlyt89l8w:hover{background-color:var(--malloy-composer-form-focusBackground,#f0f6ff)}
351
354
  .mlyk1j4u7:hover{background-color:var(--mly4a29vv)}
352
355
  .mlyk1e6ed:hover{box-shadow:rgba(204,211,219,.3) 0 0 0 3px inset}
356
+ .mlytw1abo:focus{background-color:white}
353
357
  }
354
358
 
355
359
  @layer priority5{
@@ -367,6 +371,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
367
371
  .mlyk2yuxw{height:209.5px}
368
372
  .mly1qx5ct2{height:20px}
369
373
  .mlyxk0z11{height:24px}
374
+ .mlyd7y6wv{height:26px}
370
375
  .mly1fgtraw{height:28px}
371
376
  .mlyc9qbxq{height:36px}
372
377
  .mlyng8ra{height:60px}
@@ -398,6 +403,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
398
403
  .mly1jkqq1h{max-width:280px}
399
404
  .mly1dc814f{max-width:350px}
400
405
  .mlyxc7z9f{max-width:360px}
406
+ .mly1j9u4d2{max-width:400px}
401
407
  .mlymcgfsh{max-width:60px}
402
408
  .mly2lwn1j{min-height:0}
403
409
  .mly4x6u8j{min-width:16.5px}
@@ -405,6 +411,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
405
411
  .mlyt4ypqs{min-width:20px}
406
412
  .mlyytlacd{min-width:224px}
407
413
  .mlylm99nl{min-width:240px}
414
+ .mly2ixbly{min-width:250px}
408
415
  .mlyfvyar9{min-width:60px}
409
416
  .mly1onzeue{min-width:95px}
410
417
  .mly1odjw0f{overflow-y:auto}
@@ -426,6 +433,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
426
433
  .mly13vifvy{top:0}
427
434
  .mlynalus7{width:0}
428
435
  .mlyh8yej3{width:100%}
436
+ .mlynrytzq{width:10em}
429
437
  .mly6jxa94{width:14px}
430
438
  .mly18kybhu{width:15em}
431
439
  .mlyjxf2f8{width:16.5px}
@@ -440,6 +448,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
440
448
  .mlygd8bvy{width:28px}
441
449
  .mlybl57os{width:323px}
442
450
  .mlyxsgkw5{width:350px}
451
+ .mly869kya{width:5.5em}
443
452
  .mly1ftt334{width:5px}
444
453
  .mly1247r65{width:60px}
445
454
  .mly1xc55vz{width:8px}
@@ -458,12 +467,35 @@ div[data-radix-popper-content-wrapper] {
458
467
  z-index: 100 !important;
459
468
  }
460
469
  .malloy-render_result-wrapper malloy-render::part(table-container) {
461
- width: 100%;
470
+ width: 100%;
462
471
  }
463
472
 
464
473
  .malloy-render_result-wrapper {
465
- height: 100%;
466
- position: 'relative';
467
- z-index: 0;
468
- overflow: hidden;
469
- }
474
+ height: 100%;
475
+ position: 'relative';
476
+ z-index: 0;
477
+ overflow: hidden;
478
+ }
479
+
480
+ .malloy-tooltip {
481
+ background: rgba(255, 255, 255, 0.95);
482
+ padding: 8px;
483
+ border-radius: 4px;
484
+ box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
485
+ height: fit-content;
486
+ width: fit-content;
487
+ transform: translate(10px, 10px);
488
+ }
489
+
490
+ .malloy-tooltip--table {
491
+ th,
492
+ td {
493
+ text-wrap: nowrap;
494
+ }
495
+
496
+ th {
497
+ text-align: left;
498
+ }
499
+
500
+ font-size: 12px;
501
+ }
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { RefObject } from 'react';
2
3
  import { StyleXStyles } from '@stylexjs/stylex';
3
4
  import { Moment, TemporalUnit } from '@malloydata/malloy-filter';
4
5
  interface DateInputProps {
@@ -12,6 +13,7 @@ interface DateInputProps {
12
13
  onBlur?: () => void;
13
14
  isActive?: boolean;
14
15
  customStyle?: StyleXStyles;
16
+ forwardRef?: RefObject<HTMLInputElement | null>;
15
17
  }
16
18
  export declare const formats: Record<TemporalUnit, string>;
17
19
  export declare const DateInput: React.FC<DateInputProps>;
@@ -0,0 +1,10 @@
1
+ import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { StyleXStyles } from '@stylexjs/stylex';
3
+ import { LiteralValueWithDateLiteral, LiteralValueWithTimestampLiteral } from '@malloydata/malloy-interfaces';
4
+ interface DateLiteralEditorProps {
5
+ value: LiteralValueWithDateLiteral | LiteralValueWithTimestampLiteral;
6
+ setValue: (value: Malloy.LiteralValue) => void;
7
+ customStyle?: StyleXStyles;
8
+ }
9
+ export declare function DateLiteralEditor({ value, setValue, customStyle, }: DateLiteralEditorProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,9 +1,8 @@
1
1
  import * as Malloy from '@malloydata/malloy-interfaces';
2
- import { RawLiteralValue } from '@malloydata/malloy-query-builder';
3
2
  import { StyleXStyles } from '@stylexjs/stylex';
4
3
  export interface LiteralValueEditorProps {
5
4
  value: Malloy.LiteralValue | undefined;
6
- setValue: (value: RawLiteralValue) => void;
5
+ setValue: (value: Malloy.LiteralValue) => void;
7
6
  customStyle?: StyleXStyles;
8
7
  }
9
8
  export declare function LiteralValueEditor({ value, setValue, customStyle, }: LiteralValueEditorProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,12 @@
1
1
  import { SubmittedQuery } from './SubmittedQuery';
2
2
  import './result_display.css';
3
+ import type { MalloyRenderProps } from '@malloydata/render';
3
4
  import '@malloydata/render/webcomponent';
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ 'malloy-render': HTMLElement & MalloyRenderProps;
8
+ }
9
+ }
4
10
  export interface ResultDisplayProps {
5
11
  query: SubmittedQuery;
6
12
  }
@@ -1,7 +1,9 @@
1
1
  import * as Malloy from '@malloydata/malloy-interfaces';
2
+ import { ASTArrowQueryDefinition } from '@malloydata/malloy-query-builder';
2
3
  interface FieldTokenWithActionsProps {
3
4
  field: Malloy.FieldInfo;
4
5
  path: string[];
6
+ viewDef: ASTArrowQueryDefinition;
5
7
  }
6
- export declare function FieldTokenWithActions({ field, path, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export declare function FieldTokenWithActions({ field, path, viewDef, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element;
7
9
  export {};
@@ -4,5 +4,5 @@ interface SearchResultListProps {
4
4
  source: SourceInfo;
5
5
  items: FieldItem[];
6
6
  }
7
- export default function SearchResultList({ source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element;
7
+ export default function SearchResultList({ source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element | null;
8
8
  export {};
@@ -14,6 +14,7 @@ interface FilterPopoverProps {
14
14
  alignOffset?: number;
15
15
  sideOffset?: number;
16
16
  };
17
+ onOpenChange?: (open: boolean) => void;
17
18
  }
18
- export declare function FilterPopover({ fieldInfo, path, filter, setFilter, trigger, anchor, layoutProps, }: FilterPopoverProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function FilterPopover({ fieldInfo, path, filter, setFilter, trigger, anchor, layoutProps, onOpenChange, }: FilterPopoverProps): import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -39,7 +39,7 @@ interface ButtonProps extends React.ComponentProps<'button'> {
39
39
  */
40
40
  customStyle?: StyleXStyles;
41
41
  }
42
- export default function Button({ variant, size, icon, label, tooltip, onClick, isDisabled, customStyle, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
42
+ export default function Button({ variant, size, icon, label, tooltip, isDisabled, customStyle, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
43
43
  declare const colorVariants: Readonly<{
44
44
  readonly default: Readonly<{
45
45
  readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
@@ -8,6 +8,7 @@ interface CollapsiblePanelProps {
8
8
  defaultOpen?: boolean;
9
9
  controls?: ReactNode;
10
10
  collapsedControls?: ReactNode;
11
+ isFocused?: boolean;
11
12
  }
12
- export default function CollapsiblePanel({ title, children, icon, defaultOpen, controls, collapsedControls, }: CollapsiblePanelProps): import("react/jsx-runtime").JSX.Element;
13
+ export default function CollapsiblePanel({ title, children, icon, defaultOpen, controls, collapsedControls, isFocused: isFocused, }: CollapsiblePanelProps): import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -1,3 +1,4 @@
1
+ import { RefObject } from 'react';
1
2
  import { StyleXStyles } from '@stylexjs/stylex';
2
3
  import { TemporalUnit } from '@malloydata/malloy-filter';
3
4
  interface DatePickerProps {
@@ -6,6 +7,7 @@ interface DatePickerProps {
6
7
  units: TemporalUnit;
7
8
  maxLevel: TemporalUnit;
8
9
  customStyle?: StyleXStyles;
10
+ forwardRef?: RefObject<HTMLDivElement | null>;
9
11
  }
10
- export default function DatePicker({ value, setValue, units, maxLevel, customStyle, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
12
+ export default function DatePicker({ value, setValue, units, maxLevel, customStyle, forwardRef, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -11,6 +11,7 @@ export { default as EditableToken } from './tokens/EditableToken';
11
11
  export { default as SelectorToken } from './tokens/SelectorToken';
12
12
  export { default as Card } from './Card';
13
13
  export { default as TextInput } from './TextInput';
14
+ export { default as CollapsiblePanel } from './CollapsiblePanel';
14
15
  export { default as CollapsibleListItem } from './lists/CollapsibleListItem';
15
16
  export { default as CodeBlock } from './CodeBlock';
16
17
  export { default as Spinner } from './Spinner';
@@ -1,5 +1,5 @@
1
1
  import * as Malloy from '@malloydata/malloy-interfaces';
2
- import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
2
+ import { ASTSegmentViewDefinition, ParsedFilter } from '@malloydata/malloy-query-builder';
3
3
  import { ViewParent } from './fields';
4
4
  export declare function segmentHasLimit(segment: ASTSegmentViewDefinition): boolean;
5
5
  export declare function segmentHasOrderBy(segment: ASTSegmentViewDefinition, name: string): boolean;
@@ -7,4 +7,6 @@ export declare function segmentNestNo(segment: ASTSegmentViewDefinition, name?:
7
7
  export declare function addGroupBy(view: ViewParent, field: Malloy.FieldInfo, path: string[]): void;
8
8
  export declare function addAggregate(view: ViewParent, field: Malloy.FieldInfo, path: string[]): void;
9
9
  export declare function addNest(view: ViewParent, field: Malloy.FieldInfo): void;
10
+ export declare function addOrderBy(view: ViewParent, field: Malloy.FieldInfo, direction?: Malloy.OrderByDirection): void;
11
+ export declare function addFilter(view: ViewParent, field: Malloy.FieldInfo, path: string[], filter: ParsedFilter): void;
10
12
  export declare function getSegmentIfPresent(parent: ViewParent): ASTSegmentViewDefinition | undefined;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import * as Malloy from '@malloydata/malloy-interfaces';
3
- import { ASTQuery } from '@malloydata/malloy-query-builder';
3
+ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
4
4
  export interface SearchValueMapResult {
5
5
  fieldName: string;
6
6
  cardinality: number;
@@ -17,6 +17,17 @@ export interface QueryEditorContextProps {
17
17
  /** Provide to allow editing of the query */
18
18
  setQuery?: (rootQuery: Malloy.Query | undefined) => void;
19
19
  topValues?: SearchValueMapResult[];
20
+ /** Currently focused nest query panel element */
21
+ currentNestQueryPanel?: HTMLElement | null;
22
+ /** Callback function for when the current focused nest query panel changes */
23
+ onCurrentNestQueryPanelChange?: (panel: HTMLElement | null) => void;
24
+ /** Nest view object corresponding to current focused nest query panel */
25
+ currentNestView?: ASTView | null;
26
+ /**
27
+ * Callback function for when the nest view object
28
+ * corresponding to current focused nest query panel changes
29
+ */
30
+ onCurrentNestViewChange?: (view: ASTView | null) => void;
20
31
  }
21
32
  /**
22
33
  * QueryEditorContext enables query editing by providing the setQuery
package/eslint.config.mjs CHANGED
@@ -91,13 +91,7 @@ export default [
91
91
 
92
92
  'no-throw-literal': 'error',
93
93
 
94
- '@typescript-eslint/consistent-type-imports': [
95
- 'error',
96
- {
97
- prefer: 'no-type-imports',
98
- },
99
- ],
100
-
94
+ '@typescript-eslint/consistent-type-imports': 'off',
101
95
  '@typescript-eslint/no-empty-function': 'off',
102
96
  '@typescript-eslint/no-non-null-assertion': 'off',
103
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@malloydata/malloy-explorer",
3
- "version": "0.0.269-dev250430234249",
3
+ "version": "0.0.275-dev250509203914",
4
4
  "description": "Malloy visual query builder",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "types": "dist/types/index.d.ts",
@@ -102,11 +102,11 @@
102
102
  "vite-plugin-svgr": "^4.3.0"
103
103
  },
104
104
  "peerDependencies": {
105
- "@malloydata/malloy-filter": ">= 0.0.269",
106
- "@malloydata/malloy-interfaces": ">= 0.0.269",
107
- "@malloydata/malloy-query-builder": ">= 0.0.269",
108
- "@malloydata/malloy-tag": ">= 0.0.269",
109
- "@malloydata/render": ">= 0.0.269",
105
+ "@malloydata/malloy-filter": ">=0.0.275",
106
+ "@malloydata/malloy-interfaces": ">=0.0.275",
107
+ "@malloydata/malloy-query-builder": ">=0.0.275",
108
+ "@malloydata/malloy-tag": ">=0.0.275",
109
+ "@malloydata/render": ">=0.0.275",
110
110
  "react": ">= 19.0.0",
111
111
  "react-dom": ">= 19.0.0"
112
112
  }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { FieldInfo } from '@malloydata/malloy-interfaces';
3
- import { DropdownMenu } from '../primitives';
4
- import { ViewParent } from '../utils/fields';
5
- type DropdownMenuProps = React.ComponentProps<typeof DropdownMenu>;
6
- interface AddFieldDropdownMenuProps extends Omit<DropdownMenuProps, 'children'> {
7
- view: ViewParent;
8
- field: FieldInfo;
9
- path: string[];
10
- }
11
- export declare function AddFieldDropdownMenu({ view, field, path, ...props }: AddFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { FieldInfo } from '@malloydata/malloy-interfaces';
3
- import { ViewParent } from '../utils/fields';
4
- interface NestFieldDropdownMenuProps {
5
- view: ViewParent;
6
- field: FieldInfo;
7
- path: string[];
8
- trigger: React.ReactElement;
9
- onOpenChange: (open: boolean) => void;
10
- }
11
- export declare function NestFieldDropdownMenu({ view, field, path, trigger, onOpenChange, }: NestFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
12
- export {};
@@ -1,10 +0,0 @@
1
- import { FieldInfo } from '@malloydata/malloy-interfaces';
2
- import { ViewParent } from '../utils/fields';
3
- interface OperationDropdownMenuItemsProps {
4
- view: ViewParent;
5
- field: FieldInfo;
6
- path: string[];
7
- withEmptyNest?: boolean;
8
- }
9
- export declare function OperationDropdownMenuItems({ view, field, path, withEmptyNest, }: OperationDropdownMenuItemsProps): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,9 +0,0 @@
1
- import { ASTQuery, ASTViewDefinition } from '@malloydata/malloy-query-builder';
2
- export type NestOperation = {
3
- name: string;
4
- view: ASTViewDefinition;
5
- };
6
- /**
7
- * Retrieves nest view operations from the root query.
8
- */
9
- export declare function useNestOperations(rootQuery?: ASTQuery): NestOperation[];