@malloydata/malloy-explorer 0.0.257-dev250412010850 → 0.0.264-dev250417011542
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/@flowtypes/components/QueryPanel/QueryActionBar.flow.js +0 -3
- package/@flowtypes/components/QueryPanel/QueryEditor.flow.js +3 -3
- package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +11 -2
- package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +3 -9
- package/babel.config.mjs +1 -1
- package/dist/cjs/index.cjs +6507 -5826
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +23960 -23279
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +410 -392
- package/dist/types/components/QueryPanel/AddMenu/AddFieldItem.d.ts +2 -1
- package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +1 -1
- package/dist/types/components/QueryPanel/AddMenu/FieldList.d.ts +2 -1
- package/dist/types/components/QueryPanel/AddMenu/FieldMenu.d.ts +2 -1
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +4 -1
- package/dist/types/components/QueryPanel/LiteralValueEditor.d.ts +1 -1
- package/dist/types/components/QueryPanel/QueryActionBar.d.ts +1 -4
- package/dist/types/components/QueryPanel/QueryEditor.d.ts +1 -1
- package/dist/types/components/QueryPanel/QueryPanel.d.ts +1 -5
- package/dist/types/components/QueryPanel/operations/FilterOperations.d.ts +6 -0
- package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +13 -2
- package/dist/types/components/SourcePanel/AddFieldDropdownMenu.d.ts +7 -8
- package/dist/types/components/SourcePanel/FieldTokenWithActions.d.ts +1 -1
- package/dist/types/components/SourcePanel/NestFieldDropdownMenu.d.ts +3 -3
- package/dist/types/components/SourcePanel/OperationDropdownMenuItems.d.ts +3 -3
- package/dist/types/components/SourcePanel/SourcePanel.d.ts +1 -7
- package/dist/types/components/SourcePanel/hooks/useOperations.d.ts +2 -2
- package/dist/types/components/filters/BooleanFilterCore.d.ts +7 -0
- package/dist/types/components/filters/{DateTimeFilterToken.d.ts → DateTimeFilterCore.d.ts} +3 -4
- package/dist/types/components/filters/FilterDialog.d.ts +10 -0
- package/dist/types/components/filters/{NumberFilterToken.d.ts → NumberFilterCore.d.ts} +2 -4
- package/dist/types/components/filters/PillInput.d.ts +1 -1
- package/dist/types/components/filters/StringFilterCore.d.ts +14 -0
- package/dist/types/components/filters/hooks/useFilterModal.d.ts +24 -0
- package/dist/types/components/filters/hooks/useFilterPopup.d.ts +8 -0
- package/dist/types/components/filters/styles.d.ts +22 -0
- package/dist/types/components/primitives/Button.d.ts +6 -1
- package/dist/types/components/primitives/DropdownMenu.d.ts +8 -3
- package/dist/types/components/primitives/HoverText.d.ts +12 -0
- package/dist/types/components/primitives/colors.stylex.d.ts +1 -0
- package/dist/types/components/primitives/styles.d.ts +8 -0
- package/dist/types/components/utils/annotations.d.ts +2 -0
- package/dist/types/components/utils/icon.d.ts +2 -2
- package/dist/types/contexts/QueryEditorContext.d.ts +2 -0
- package/package.json +11 -11
- package/dist/types/components/QueryPanel/operations/WhereOperations.d.ts +0 -6
- package/dist/types/components/filters/BooleanFilterToken.d.ts +0 -11
- package/dist/types/components/filters/StringFilterToken.d.ts +0 -14
- package/dist/types/types/error.d.ts +0 -8
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
3
|
import { FieldInfo } from '@malloydata/malloy-interfaces';
|
|
3
4
|
import { IconType } from '../../primitives';
|
|
@@ -7,7 +8,7 @@ export interface AddGroupByProps {
|
|
|
7
8
|
icon: IconType;
|
|
8
9
|
view: ViewParent;
|
|
9
10
|
fields: FieldInfo[];
|
|
10
|
-
onClick(field: FieldInfo, path: string[]): void;
|
|
11
|
+
onClick(field: FieldInfo, path: string[], event: React.MouseEvent): void;
|
|
11
12
|
types: Array<'dimension' | 'measure' | 'view'>;
|
|
12
13
|
filter?: (view: ViewParent, field: Malloy.FieldInfo, path: string[]) => boolean;
|
|
13
14
|
disabledMessage?: string;
|
|
@@ -4,4 +4,4 @@ export interface AddWhereProps {
|
|
|
4
4
|
rootQuery: ASTQuery;
|
|
5
5
|
view: ViewParent;
|
|
6
6
|
}
|
|
7
|
-
export declare function AddWhere({
|
|
7
|
+
export declare function AddWhere({ view }: AddWhereProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
3
|
import { ViewParent } from '../../utils/fields';
|
|
3
4
|
export interface FieldListProps {
|
|
4
5
|
view: ViewParent;
|
|
5
6
|
fields: Malloy.FieldInfo[];
|
|
6
7
|
search: string;
|
|
7
|
-
onClick: (field: Malloy.FieldInfo, path: string[]) => void;
|
|
8
|
+
onClick: (field: Malloy.FieldInfo, path: string[], event: React.MouseEvent) => void;
|
|
8
9
|
types: Array<'dimension' | 'measure' | 'view'>;
|
|
9
10
|
filter?: (view: ViewParent, field: Malloy.FieldInfo, path: string[]) => boolean;
|
|
10
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
3
|
import { ViewParent } from '../../utils/fields';
|
|
3
4
|
export interface FieldMenuProps {
|
|
@@ -5,6 +6,6 @@ export interface FieldMenuProps {
|
|
|
5
6
|
fields: Array<Malloy.FieldInfo>;
|
|
6
7
|
types: Array<'dimension' | 'measure' | 'view'>;
|
|
7
8
|
filter?: (view: ViewParent, field: Malloy.FieldInfo, path: string[]) => boolean;
|
|
8
|
-
onClick: (field: Malloy.FieldInfo, path: string[]) => void;
|
|
9
|
+
onClick: (field: Malloy.FieldInfo, path: string[], event: React.MouseEvent) => void;
|
|
9
10
|
}
|
|
10
11
|
export declare function FieldMenu({ view, fields, types, filter, onClick, }: FieldMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { SearchIndexResult } from './hooks/useSearch';
|
|
2
3
|
export interface FieldListProps {
|
|
3
4
|
search: string;
|
|
4
5
|
onClick: (value: SearchIndexResult) => void;
|
|
6
|
+
fieldPath?: string;
|
|
7
|
+
ref?: React.RefObject<HTMLDivElement | null>;
|
|
5
8
|
}
|
|
6
|
-
export declare function ValueList({ onClick, search }: FieldListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function ValueList({ onClick, search, fieldPath, ref }: FieldListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
10
|
export interface ValueProps {
|
|
8
11
|
value: SearchIndexResult;
|
|
9
12
|
}
|
|
@@ -6,4 +6,4 @@ export interface LiteralValueEditorProps {
|
|
|
6
6
|
setValue: (value: RawLiteralValue) => void;
|
|
7
7
|
customStyle?: StyleXStyles;
|
|
8
8
|
}
|
|
9
|
-
export declare function LiteralValueEditor({ value, setValue, customStyle, }: LiteralValueEditorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare function LiteralValueEditor({ value, setValue, customStyle, }: LiteralValueEditorProps): import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
@@ -3,9 +3,6 @@ import * as Malloy from '@malloydata/malloy-interfaces';
|
|
|
3
3
|
* Source
|
|
4
4
|
*/
|
|
5
5
|
export interface QueryActionBarProps {
|
|
6
|
-
source: Malloy.SourceInfo;
|
|
7
|
-
query?: Malloy.Query;
|
|
8
|
-
clearQuery: () => void;
|
|
9
6
|
runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
|
|
10
7
|
}
|
|
11
|
-
export declare function QueryActionBar({
|
|
8
|
+
export declare function QueryActionBar({ runQuery }: QueryActionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,4 +12,4 @@ export interface QueryEditorProps {
|
|
|
12
12
|
* @param query A query to be edited. Omit for a new query.
|
|
13
13
|
* @returns
|
|
14
14
|
*/
|
|
15
|
-
export declare function QueryEditor(
|
|
15
|
+
export declare function QueryEditor(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
interface QueryPanelProps {
|
|
3
|
-
source: Malloy.SourceInfo;
|
|
4
|
-
query?: Malloy.Query;
|
|
5
|
-
showSource?: boolean;
|
|
6
|
-
setQuery: (query: Malloy.Query | undefined) => void;
|
|
7
3
|
runQuery: (source: Malloy.SourceInfo, query: Malloy.Query) => void;
|
|
8
4
|
}
|
|
9
|
-
export default function QueryPanel({
|
|
5
|
+
export default function QueryPanel({ runQuery }: QueryPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
10
6
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ASTQuery, ASTWhereViewOperation, ASTHavingViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
|
+
export interface FilterOperationsProps {
|
|
3
|
+
rootQuery: ASTQuery;
|
|
4
|
+
filters: Array<ASTWhereViewOperation | ASTHavingViewOperation>;
|
|
5
|
+
}
|
|
6
|
+
export declare function FilterOperations({ rootQuery, filters }: FilterOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import { ExplorerError } from '../../types/error';
|
|
3
2
|
export declare const EXECUTION_STATES: {
|
|
4
3
|
compiling: string;
|
|
5
4
|
running: string;
|
|
@@ -22,7 +21,19 @@ export type RunStats = {
|
|
|
22
21
|
queryId: string;
|
|
23
22
|
};
|
|
24
23
|
export type QueryResponse = {
|
|
25
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated use 'messages'
|
|
26
|
+
*/
|
|
27
|
+
error?: Message;
|
|
26
28
|
result?: Malloy.Result;
|
|
27
29
|
runStats?: RunStats;
|
|
30
|
+
messages?: Array<Message>;
|
|
31
|
+
};
|
|
32
|
+
export type SeverityLevel = 'INFO' | 'DEBUG' | 'WARN' | 'ERROR' | 'FATAL';
|
|
33
|
+
export type Message = {
|
|
34
|
+
severity: SeverityLevel;
|
|
35
|
+
title: string;
|
|
36
|
+
description?: string;
|
|
37
|
+
content?: string;
|
|
38
|
+
customRenderer?: React.ReactNode;
|
|
28
39
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import { FieldInfo } from '@malloydata/malloy-interfaces';
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
6
8
|
field: FieldInfo;
|
|
7
9
|
path: string[];
|
|
8
|
-
trigger: React.ReactElement;
|
|
9
|
-
onOpenChange: (open: boolean) => void;
|
|
10
|
-
tooltip?: ReactElement;
|
|
11
10
|
}
|
|
12
|
-
export declare function AddFieldDropdownMenu({
|
|
11
|
+
export declare function AddFieldDropdownMenu({ view, field, path, ...props }: AddFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -3,5 +3,5 @@ interface FieldTokenWithActionsProps {
|
|
|
3
3
|
field: Malloy.FieldInfo;
|
|
4
4
|
path: string[];
|
|
5
5
|
}
|
|
6
|
-
export declare function FieldTokenWithActions({ field, path, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function FieldTokenWithActions({ field, path, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
3
2
|
import { FieldInfo } from '@malloydata/malloy-interfaces';
|
|
3
|
+
import { ViewParent } from '../utils/fields';
|
|
4
4
|
interface NestFieldDropdownMenuProps {
|
|
5
|
-
|
|
5
|
+
view: ViewParent;
|
|
6
6
|
field: FieldInfo;
|
|
7
7
|
path: string[];
|
|
8
8
|
trigger: React.ReactElement;
|
|
9
9
|
onOpenChange: (open: boolean) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function NestFieldDropdownMenu({
|
|
11
|
+
export declare function NestFieldDropdownMenu({ view, field, path, trigger, onOpenChange, }: NestFieldDropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { FieldInfo } from '@malloydata/malloy-interfaces';
|
|
2
|
+
import { ViewParent } from '../utils/fields';
|
|
3
3
|
interface OperationDropdownMenuItemsProps {
|
|
4
|
-
|
|
4
|
+
view: ViewParent;
|
|
5
5
|
field: FieldInfo;
|
|
6
6
|
path: string[];
|
|
7
7
|
withEmptyNest?: boolean;
|
|
8
8
|
}
|
|
9
|
-
export declare function OperationDropdownMenuItems({
|
|
9
|
+
export declare function OperationDropdownMenuItems({ view, field, path, withEmptyNest, }: OperationDropdownMenuItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface SourcePanelProps {
|
|
3
|
-
source: Malloy.SourceInfo;
|
|
4
|
-
query?: Malloy.Query;
|
|
5
|
-
setQuery: (query: Malloy.Query | undefined) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function SourcePanel({ source }: SourcePanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
|
+
export declare function SourcePanel(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as QueryBuilder from '@malloydata/malloy-query-builder';
|
|
2
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
-
|
|
2
|
+
import { ViewParent } from '../../utils/fields';
|
|
3
|
+
export declare function useOperations(view: ViewParent, field: Malloy.FieldInfo, path: string[]): {
|
|
4
4
|
isGroupByAllowed: boolean;
|
|
5
5
|
isAggregateAllowed: boolean;
|
|
6
6
|
isFilterAllowed: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BooleanFilter } from '@malloydata/malloy-filter';
|
|
2
|
+
export type BooleanFilterType = 'is_true' | 'is_false' | 'is_null' | 'is_not_null' | 'is_false_or_null';
|
|
3
|
+
export interface BooleanFilterDialogProps {
|
|
4
|
+
filter: BooleanFilter;
|
|
5
|
+
setFilter: (filter: BooleanFilter) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function BooleanFilterCore({ filter, setFilter, }: BooleanFilterDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
2
|
import { TemporalFilter } from '@malloydata/malloy-filter';
|
|
4
3
|
type DateTimeFilterType = 'is_equal_to' | 'is_before' | 'is_after' | 'is_between' | 'is_null' | 'is_not_null';
|
|
5
|
-
export interface
|
|
6
|
-
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
4
|
+
export interface DateTimeFilterCoreProps {
|
|
7
5
|
filter: TemporalFilter | null;
|
|
8
6
|
setFilter: (filter: TemporalFilter) => void;
|
|
7
|
+
isDateTime: boolean;
|
|
9
8
|
}
|
|
10
|
-
export declare const
|
|
9
|
+
export declare const DateTimeFilterCore: React.FC<DateTimeFilterCoreProps>;
|
|
11
10
|
export declare function dateTimeFilterChangeType(filter: TemporalFilter, type: DateTimeFilterType): TemporalFilter;
|
|
12
11
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
import { ParsedFilter } from '@malloydata/malloy-query-builder';
|
|
3
|
+
export interface FilterDialogProps {
|
|
4
|
+
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
5
|
+
path: string[];
|
|
6
|
+
filter: ParsedFilter;
|
|
7
|
+
setFilter: (filter: ParsedFilter) => void;
|
|
8
|
+
setOpen: (open: boolean) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function FilterDialog({ fieldInfo, path, filter, setFilter, setOpen, }: FilterDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
2
|
import { Null, NumberCondition, NumberFilter } from '@malloydata/malloy-filter';
|
|
4
3
|
type NumberFilterType = 'is_equal_to' | 'is_greater_than' | 'is_less_than' | 'is_greater_than_or_equal_to' | 'is_less_than_or_equal_to' | 'is_null' | 'is_not_equal_to' | 'is_not_null';
|
|
5
4
|
type BasicNumberFilter = NumberCondition | Null;
|
|
6
|
-
export interface
|
|
7
|
-
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
5
|
+
export interface NumberFilterCoreProps {
|
|
8
6
|
filter: NumberFilter | null;
|
|
9
7
|
setFilter: (filter: NumberFilter) => void;
|
|
10
8
|
}
|
|
11
|
-
export declare const
|
|
9
|
+
export declare const NumberFilterCore: React.FC<NumberFilterCoreProps>;
|
|
12
10
|
export declare function makeFilterWithNewType(filter: NumberFilter, type: NumberFilterType): BasicNumberFilter;
|
|
13
11
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
+
import { Null, StringCondition, StringEmpty, StringMatch } from '@malloydata/malloy-filter';
|
|
4
|
+
export type BasicStringFilter = StringCondition | StringMatch | Null | StringEmpty;
|
|
5
|
+
type StringFilterType = 'is_equal_to' | 'starts_with' | 'ends_with' | 'contains' | 'matches' | 'is_blank' | 'is_null' | 'is_not_equal_to' | 'does_not_start_with' | 'does_not_end_with' | 'does_not_contain' | 'does_not_match' | 'is_not_blank' | 'is_not_null';
|
|
6
|
+
export interface StringFilterCoreProps {
|
|
7
|
+
filter: BasicStringFilter | null;
|
|
8
|
+
setFilter: (filter: BasicStringFilter) => void;
|
|
9
|
+
field: Malloy.FieldInfo;
|
|
10
|
+
path: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const StringFilterCore: React.FC<StringFilterCoreProps>;
|
|
13
|
+
export declare function stringFilterChangeType(filter: BasicStringFilter, type: StringFilterType): BasicStringFilter;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
+
import { ASTQuery, ParsedFilter } from '@malloydata/malloy-query-builder';
|
|
4
|
+
import { ViewParent } from '../../utils/fields';
|
|
5
|
+
export interface OpenFilterModalParams {
|
|
6
|
+
view: ViewParent;
|
|
7
|
+
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
8
|
+
path: string[];
|
|
9
|
+
filter?: ParsedFilter;
|
|
10
|
+
x?: number;
|
|
11
|
+
y?: number;
|
|
12
|
+
}
|
|
13
|
+
export type OpenFilterModalCallback = ({ view, fieldInfo, path, filter, }: OpenFilterModalParams) => void;
|
|
14
|
+
export interface UseFilterModelProps {
|
|
15
|
+
setQuery: ((rootQuery: Malloy.Query | undefined) => void) | undefined;
|
|
16
|
+
rootQuery: ASTQuery | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function useFilterModal({ setQuery, rootQuery }: UseFilterModelProps): {
|
|
19
|
+
openFilterModal: React.Dispatch<React.SetStateAction<OpenFilterModalParams | undefined>>;
|
|
20
|
+
FilterModal: () => null;
|
|
21
|
+
} | {
|
|
22
|
+
openFilterModal: React.Dispatch<React.SetStateAction<OpenFilterModalParams | undefined>>;
|
|
23
|
+
FilterModal: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
+
import { ParsedFilter } from '@malloydata/malloy-query-builder';
|
|
4
|
+
export declare function useFilterPopup(fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure, path: string[], filter: ParsedFilter, setFilter: (filter: ParsedFilter) => void): {
|
|
5
|
+
FilterPopup: ({ trigger }: {
|
|
6
|
+
trigger: React.ReactElement;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const filterStyles: Readonly<{
|
|
2
|
+
readonly filterDialog: Readonly<{
|
|
3
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
4
|
+
readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
|
|
5
|
+
readonly boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", "0 1px 2px 0 rgba(0, 0, 0, 0.1), 0 2px 12px 0 rgba(0, 0, 0, 0.1)">;
|
|
6
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "white">;
|
|
7
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 8>;
|
|
8
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 8>;
|
|
9
|
+
readonly minWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"minWidth", 200>;
|
|
10
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
11
|
+
}>;
|
|
12
|
+
readonly filterDialogHeader: Readonly<{
|
|
13
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", "bold">;
|
|
14
|
+
}>;
|
|
15
|
+
readonly filterTypeDropdown: Readonly<{
|
|
16
|
+
readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", "100%">;
|
|
17
|
+
}>;
|
|
18
|
+
readonly buttonGroup: Readonly<{
|
|
19
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
20
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
21
|
+
}>;
|
|
22
|
+
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
3
|
import { IconType } from './utils/icon';
|
|
3
4
|
type Variant = keyof typeof colorVariants;
|
|
4
5
|
type Size = keyof typeof sizeVariants;
|
|
@@ -33,8 +34,12 @@ interface ButtonProps extends React.ComponentProps<'button'> {
|
|
|
33
34
|
* Whether the button is disabled.
|
|
34
35
|
*/
|
|
35
36
|
isDisabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Custom styling
|
|
39
|
+
*/
|
|
40
|
+
customStyle?: StyleXStyles;
|
|
36
41
|
}
|
|
37
|
-
export default function Button({ variant, size, icon, label, tooltip, onClick, isDisabled, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export default function Button({ variant, size, icon, label, tooltip, onClick, isDisabled, customStyle, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
38
43
|
declare const colorVariants: Readonly<{
|
|
39
44
|
readonly default: Readonly<{
|
|
40
45
|
readonly [x: string]: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<string, {
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { IconType } from '.';
|
|
4
|
-
type Modifiers = Pick<React.MouseEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey'>;
|
|
5
4
|
type DropdownMenuChild = React.ReactElement<DropdownMenuItemProps, typeof DropdownMenuItem> | React.ReactElement<DropdownSubMenuItemProps, typeof DropdownSubMenuItem> | React.ReactElement<DropdownMenuLabelProps, typeof DropdownMenuLabel>;
|
|
6
5
|
interface DropdownMenuProps {
|
|
7
6
|
trigger: ReactElement;
|
|
8
7
|
tooltip?: string | ReactElement;
|
|
9
8
|
onOpenChange?: (open: boolean) => void;
|
|
10
9
|
children: DropdownMenuChild | DropdownMenuChild[];
|
|
10
|
+
tooltipProps?: {
|
|
11
|
+
align?: 'start' | 'center' | 'end';
|
|
12
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
13
|
+
alignOffset?: number;
|
|
14
|
+
sideOffset?: number;
|
|
15
|
+
};
|
|
11
16
|
}
|
|
12
|
-
export declare function DropdownMenu({ trigger, tooltip, onOpenChange, children, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function DropdownMenu({ trigger, tooltip, onOpenChange, children, tooltipProps, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
13
18
|
interface DropdownMenuItemProps {
|
|
14
19
|
icon?: IconType;
|
|
15
20
|
label: string;
|
|
16
21
|
sublabel?: string;
|
|
17
|
-
onClick?: (
|
|
22
|
+
onClick?: (event: React.MouseEvent) => void;
|
|
18
23
|
disabled?: boolean;
|
|
19
24
|
}
|
|
20
25
|
export declare function DropdownMenuItem({ icon, label, sublabel, onClick, disabled, }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface HoverTextProps {
|
|
2
|
+
text: string;
|
|
3
|
+
align?: 'start' | 'center' | 'end';
|
|
4
|
+
side?: 'top' | 'bottom' | 'left' | 'right';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Displays tooltip if text is truncated.
|
|
8
|
+
* Works in hovered parent.
|
|
9
|
+
* Works with formatted text.
|
|
10
|
+
*/
|
|
11
|
+
export declare function HoverText({ text, align, side, }: HoverTextProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -10,6 +10,7 @@ export declare const backgroundColors: import("@stylexjs/stylex").VarGroup<Reado
|
|
|
10
10
|
negativeDeemphasized: string;
|
|
11
11
|
divider: string;
|
|
12
12
|
token: string;
|
|
13
|
+
tooltip: string;
|
|
13
14
|
}>, symbol>;
|
|
14
15
|
export declare const textColors: import("@stylexjs/stylex").VarGroup<Readonly<{
|
|
15
16
|
primary: string;
|
|
@@ -71,4 +71,12 @@ export declare const fontStyles: Readonly<{
|
|
|
71
71
|
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "16px">;
|
|
72
72
|
readonly letterSpacing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"letterSpacing", "-0.24px">;
|
|
73
73
|
}>;
|
|
74
|
+
readonly tooltipText: Readonly<{
|
|
75
|
+
readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "SF Pro Text, -apple-system, system-ui, sans-serif">;
|
|
76
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgba(221, 226, 232, 1)">;
|
|
77
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "14px">;
|
|
78
|
+
readonly fontStyle: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontStyle", "normal">;
|
|
79
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", 400>;
|
|
80
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "20px">;
|
|
81
|
+
}>;
|
|
74
82
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import { AtomicTypeType } from '@malloydata/malloy-interfaces';
|
|
2
|
+
import { AtomicTypeType, ParameterTypeType } from '@malloydata/malloy-interfaces';
|
|
3
3
|
import { IconType } from '../primitives';
|
|
4
|
-
export declare function atomicTypeToIcon(type: AtomicTypeType): IconType;
|
|
4
|
+
export declare function atomicTypeToIcon(type: AtomicTypeType | ParameterTypeType): IconType;
|
|
5
5
|
export declare function fieldKindToColor(kind: 'dimension' | 'measure' | 'join' | 'view'): "purple" | "green" | "cyan" | undefined;
|
|
6
6
|
export declare function fieldToIcon(field: Malloy.FieldInfo): IconType;
|
|
7
7
|
export declare function relationshipToIcon(relationship: Malloy.Relationship): IconType;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
3
|
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
4
|
+
import { OpenFilterModalCallback } from '../components/filters/hooks/useFilterModal';
|
|
4
5
|
export interface SearchValueMapResult {
|
|
5
6
|
fieldName: string;
|
|
6
7
|
cardinality: number;
|
|
@@ -17,6 +18,7 @@ export interface QueryEditorContextProps {
|
|
|
17
18
|
/** Provide to allow editing of the query */
|
|
18
19
|
setQuery?: (rootQuery: Malloy.Query | undefined) => void;
|
|
19
20
|
topValues?: SearchValueMapResult[];
|
|
21
|
+
openFilterModal: OpenFilterModalCallback;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* QueryEditorContext enables query editing by providing the setQuery
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/malloy-explorer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.264-dev250417011542",
|
|
4
4
|
"description": "Malloy visual query builder",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"dev": "vite",
|
|
26
26
|
"preview": "vite preview",
|
|
27
27
|
"lint": "tsc --noEmit && eslint .",
|
|
28
|
-
"malloy-update-next": "npm install
|
|
29
|
-
"malloy-update": "npm install
|
|
28
|
+
"malloy-update-next": "npm install --no-fund --no-audit $(./scripts/malloy-packages.ts next)",
|
|
29
|
+
"malloy-update": "npm install --no-fund --no-audit $(./scripts/malloy-packages.ts latest)",
|
|
30
30
|
"malloy-link": "npm --no-fund --no-audit link $(./scripts/malloy-packages.ts)",
|
|
31
31
|
"malloy-unlink": "npm --no-fund --no-save --no-audit unlink $(./scripts/malloy-packages.ts) && npm --no-fund --no-audit install --force",
|
|
32
32
|
"malloy-build-and-link": "cd ../malloy && npm run -ws build --workspace=@malloydata/malloy-query-builder --workspace=@malloydata/malloy-filter --workspace=@malloydata/malloy-interfaces --workspace=@malloydata/malloy-tag && npm link -ws",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"@stylexjs/stylex": "^0.10.1",
|
|
68
68
|
"assert": "^2.1.0",
|
|
69
69
|
"moment": "^2.30.1",
|
|
70
|
-
"react": "
|
|
71
|
-
"react-dom": "
|
|
70
|
+
"react": ">= 19.0.0",
|
|
71
|
+
"react-dom": ">= 19.0.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@babel/preset-react": "^7.26.3",
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
"vite-plugin-svgr": "^4.3.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
|
+
"@malloydata/malloy-filter": ">=0.0.264",
|
|
102
|
+
"@malloydata/malloy-interfaces": ">=0.0.264",
|
|
103
|
+
"@malloydata/malloy-query-builder": ">=0.0.264",
|
|
104
|
+
"@malloydata/malloy-tag": ">=0.0.264",
|
|
105
|
+
"@malloydata/render": ">=0.0.264",
|
|
101
106
|
"react": ">= 19.0.0",
|
|
102
|
-
"react-dom": ">= 19.0.0"
|
|
103
|
-
"@malloydata/malloy-filter": ">= 0.0.257",
|
|
104
|
-
"@malloydata/malloy-interfaces": ">= 0.0.257",
|
|
105
|
-
"@malloydata/malloy-query-builder": ">= 0.0.257",
|
|
106
|
-
"@malloydata/malloy-tag": ">= 0.0.257",
|
|
107
|
-
"@malloydata/render": ">= 0.0.257"
|
|
107
|
+
"react-dom": ">= 19.0.0"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ASTQuery, ASTWhereViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
|
-
export interface WhereOperationsProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
|
-
wheres: ASTWhereViewOperation[];
|
|
5
|
-
}
|
|
6
|
-
export declare function WhereOperations({ rootQuery, wheres }: WhereOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
-
import { BooleanFilter } from '@malloydata/malloy-filter';
|
|
4
|
-
export type BooleanFilterType = 'is_true' | 'is_false' | 'is_null' | 'is_not_null' | 'is_false_or_null';
|
|
5
|
-
interface BooleanFilterTokenProps {
|
|
6
|
-
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
7
|
-
filter: BooleanFilter;
|
|
8
|
-
setFilter: (filter: BooleanFilter) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const BooleanFilterToken: React.FC<BooleanFilterTokenProps>;
|
|
11
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
-
import { Null, StringCondition, StringEmpty, StringFilter, StringMatch } from '@malloydata/malloy-filter';
|
|
4
|
-
type StringFilterType = 'is_equal_to' | 'starts_with' | 'ends_with' | 'contains' | 'matches' | 'is_blank' | 'is_null' | 'is_not_equal_to' | 'does_not_start_with' | 'does_not_end_with' | 'does_not_contain' | 'does_not_match' | 'is_not_blank' | 'is_not_null';
|
|
5
|
-
type BasicStringFilter = StringCondition | StringMatch | Null | StringEmpty;
|
|
6
|
-
export interface StringFilterBuilderProps {
|
|
7
|
-
fieldInfo: Malloy.FieldInfoWithDimension | Malloy.FieldInfoWithMeasure;
|
|
8
|
-
filter: StringFilter | null;
|
|
9
|
-
path: string[];
|
|
10
|
-
setFilter: (filter: StringFilter) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const StringFilterToken: React.FC<StringFilterBuilderProps>;
|
|
13
|
-
export declare function stringFilterChangeType(filter: StringFilter, type: StringFilterType): BasicStringFilter;
|
|
14
|
-
export {};
|