@malloydata/malloy-explorer 0.0.295-dev250710213205 → 0.0.299-dev250804170242
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/MalloyExplorerProvider.flow.js +1 -1
- package/dist/cjs/index.cjs +448 -285
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +415 -252
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/FieldToken.d.ts +5 -1
- package/dist/types/components/MalloyExplorerProvider.d.ts +1 -1
- package/dist/types/components/QueryPanel/AddMenu/AddAggregate.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddEmptyNest.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddGroupBy.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddLimit.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddMenu.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddOrderBy.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddView.d.ts +1 -3
- package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +0 -2
- package/dist/types/components/QueryPanel/Operations.d.ts +2 -3
- package/dist/types/components/QueryPanel/Parameters.d.ts +3 -3
- package/dist/types/components/QueryPanel/Query.d.ts +3 -4
- package/dist/types/components/QueryPanel/Source.d.ts +3 -3
- package/dist/types/components/QueryPanel/View.d.ts +2 -3
- package/dist/types/components/QueryPanel/ViewDefinition.d.ts +2 -3
- package/dist/types/components/QueryPanel/Visualization.d.ts +1 -2
- package/dist/types/components/QueryPanel/VizEditor/VizEditor.d.ts +1 -2
- package/dist/types/components/QueryPanel/VizEditor/VizEditorDialog.d.ts +1 -2
- package/dist/types/components/QueryPanel/VizEditor/VizEditorPopover.d.ts +1 -2
- package/dist/types/components/QueryPanel/VizEditor/styles.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/utils.d.ts +3 -0
- package/dist/types/components/QueryPanel/operations/AggregateOperations.d.ts +3 -4
- package/dist/types/components/QueryPanel/operations/DrillOperations.d.ts +1 -2
- package/dist/types/components/QueryPanel/operations/FilterOperations.d.ts +2 -3
- package/dist/types/components/QueryPanel/operations/GroupByOperations.d.ts +2 -3
- package/dist/types/components/QueryPanel/operations/LimitOperation.d.ts +2 -3
- package/dist/types/components/QueryPanel/operations/NestOperation.d.ts +3 -5
- package/dist/types/components/QueryPanel/operations/OperationActionTitle.d.ts +0 -2
- package/dist/types/components/QueryPanel/operations/OrderByOperations.d.ts +2 -3
- package/dist/types/components/QueryPanel/operations/RenameDialog.d.ts +3 -4
- package/dist/types/components/QueryPanel/operations/SortableOperations.d.ts +3 -4
- package/dist/types/components/SourcePanel/FieldGroupList.d.ts +3 -1
- package/dist/types/components/SourcePanel/FieldTokenWithActions.d.ts +3 -2
- package/dist/types/components/SourcePanel/SearchResultList.d.ts +3 -1
- package/dist/types/components/SourcePanel/hooks/useOperations.d.ts +0 -4
- package/dist/types/components/primitives/DropdownMenu.d.ts +1 -1
- package/dist/types/components/utils/axis.d.ts +10 -0
- package/dist/types/components/utils/icon.d.ts +3 -3
- package/dist/types/components/utils/segment.d.ts +1 -0
- package/dist/types/contexts/QueryEditorContext.d.ts +1 -10
- package/dist/types/hooks/useQueryBuilder.d.ts +2 -2
- package/dist/types/hooks/useQueryUpdate.d.ts +10 -0
- package/dist/types/hooks/useTopValues.d.ts +18 -0
- package/jest.config.ts +1 -1
- package/package.json +8 -8
|
@@ -14,6 +14,10 @@ interface FieldTokenProps extends React.ComponentProps<typeof Token> {
|
|
|
14
14
|
* The controlled visible state of the hover actions.
|
|
15
15
|
*/
|
|
16
16
|
hoverActionsVisible?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Optional sibling elements to render before the hover actions.
|
|
19
|
+
*/
|
|
20
|
+
additionalSiblings?: React.ReactNode;
|
|
17
21
|
}
|
|
18
|
-
export default function FieldToken({ field, hoverActions, hoverActionsVisible, ...props }: FieldTokenProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export default function FieldToken({ field, additionalSiblings, hoverActions, hoverActionsVisible, ...props }: FieldTokenProps): import("react/jsx-runtime").JSX.Element;
|
|
19
23
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
3
|
import type { DrillData } from '@malloydata/render';
|
|
4
|
-
import { SearchValueMapResult } from '../
|
|
4
|
+
import { SearchValueMapResult } from '../hooks/useTopValues';
|
|
5
5
|
export interface MalloyExplorerProviderProps {
|
|
6
6
|
source: Malloy.SourceInfo;
|
|
7
7
|
query?: Malloy.Query;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddAggregateProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
search: string;
|
|
7
5
|
}
|
|
8
|
-
export declare function AddAggregate({
|
|
6
|
+
export declare function AddAggregate({ view, search }: AddAggregateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddEmptyNestProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
}
|
|
7
|
-
export declare function AddEmptyNest({
|
|
5
|
+
export declare function AddEmptyNest({ view }: AddEmptyNestProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddGroupByProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
search: string;
|
|
7
5
|
}
|
|
8
|
-
export declare function AddGroupBy({
|
|
6
|
+
export declare function AddGroupBy({ view, search }: AddGroupByProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddLimitProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
}
|
|
7
|
-
export declare function AddLimit({
|
|
5
|
+
export declare function AddLimit({ view }: AddLimitProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddMenuProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
}
|
|
7
|
-
export declare function AddMenu({
|
|
5
|
+
export declare function AddMenu({ view }: AddMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddEmptyNestProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
search: string;
|
|
7
5
|
}
|
|
8
|
-
export declare function AddOrderBy({
|
|
6
|
+
export declare function AddOrderBy({ view, search }: AddEmptyNestProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
1
|
import { ViewParent } from '../../utils/fields';
|
|
3
2
|
export interface AddViewProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
3
|
view: ViewParent;
|
|
6
4
|
search: string;
|
|
7
5
|
}
|
|
8
|
-
export declare function AddView({
|
|
6
|
+
export declare function AddView({ view, search }: AddViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../utils/fields';
|
|
3
3
|
export interface OperationsProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
view: ViewParent;
|
|
6
5
|
viewDef: ASTViewDefinition;
|
|
7
6
|
}
|
|
8
|
-
export declare function Operations({
|
|
7
|
+
export declare function Operations({ view, viewDef }: OperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTQueryDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
/**
|
|
3
3
|
* Source
|
|
4
4
|
*/
|
|
5
5
|
export interface ParametersProps {
|
|
6
|
-
|
|
6
|
+
definition: ASTQueryDefinition;
|
|
7
7
|
}
|
|
8
|
-
export declare function Parameters({
|
|
8
|
+
export declare function Parameters({ definition }: ParametersProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import {
|
|
2
|
+
import { ASTQueryDefinition } from '@malloydata/malloy-query-builder';
|
|
3
3
|
export interface QueryProps {
|
|
4
|
-
|
|
5
|
-
query: ASTQuery;
|
|
4
|
+
definition: ASTQueryDefinition;
|
|
6
5
|
setQuery?: (query: Malloy.Query | undefined) => void;
|
|
7
6
|
}
|
|
8
|
-
export declare function Query({
|
|
7
|
+
export declare function Query({ definition }: QueryProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTQueryDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
/**
|
|
3
3
|
* Source
|
|
4
4
|
*/
|
|
5
5
|
export interface SourceProps {
|
|
6
|
-
|
|
6
|
+
definition: ASTQueryDefinition;
|
|
7
7
|
}
|
|
8
|
-
export declare function Source({
|
|
8
|
+
export declare function Source({ definition }: SourceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTView } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface ViewProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
view: ASTView;
|
|
5
4
|
}
|
|
6
|
-
export declare function View({
|
|
5
|
+
export declare function View({ view }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../utils/fields';
|
|
3
3
|
export interface ViewProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
view: ViewParent;
|
|
6
5
|
viewDef: ASTViewDefinition;
|
|
7
6
|
}
|
|
8
|
-
export declare function ViewDefinition({
|
|
7
|
+
export declare function ViewDefinition({ view, viewDef }: ViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface VisualizationProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
view: ASTQuery | ASTView;
|
|
5
4
|
}
|
|
6
|
-
export declare function Visualization({
|
|
5
|
+
export declare function Visualization({ view }: VisualizationProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export declare function snakeToTitle(snake: string): string;
|
|
@@ -2,10 +2,9 @@ import { StyleXStyles } from '@stylexjs/stylex';
|
|
|
2
2
|
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
3
3
|
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
4
4
|
export interface VizEditorProps {
|
|
5
|
-
rootQuery: ASTQuery;
|
|
6
5
|
plugin: CoreVizPluginInstance;
|
|
7
6
|
view: ASTQuery | ASTView;
|
|
8
7
|
customStyle?: StyleXStyles;
|
|
9
8
|
setOpen: (open: boolean) => void;
|
|
10
9
|
}
|
|
11
|
-
export declare function VizEditor({
|
|
10
|
+
export declare function VizEditor({ view, plugin, setOpen }: VizEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,11 +2,10 @@ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
|
2
2
|
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
3
3
|
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
4
|
export interface VizEditorDialogProps {
|
|
5
|
-
rootQuery: ASTQuery;
|
|
6
5
|
plugin?: CoreVizPluginInstance;
|
|
7
6
|
view: ASTQuery | ASTView;
|
|
8
7
|
customStyle?: StyleXStyles;
|
|
9
8
|
open: boolean;
|
|
10
9
|
setOpen: (open: boolean) => void;
|
|
11
10
|
}
|
|
12
|
-
export declare function VizEditorDialog({
|
|
11
|
+
export declare function VizEditorDialog({ plugin, view, customStyle, open, setOpen, }: VizEditorDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,9 +2,8 @@ import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
|
2
2
|
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
3
3
|
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
4
|
export interface VizEditorPopoverProps {
|
|
5
|
-
rootQuery: ASTQuery;
|
|
6
5
|
plugin: CoreVizPluginInstance;
|
|
7
6
|
view: ASTQuery | ASTView;
|
|
8
7
|
customStyle?: StyleXStyles;
|
|
9
8
|
}
|
|
10
|
-
export declare function VizEditorPopover({
|
|
9
|
+
export declare function VizEditorPopover({ plugin, view, customStyle, }: VizEditorPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,9 @@ export declare const styles: Readonly<{
|
|
|
10
10
|
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
11
11
|
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "left">;
|
|
12
12
|
}>;
|
|
13
|
+
readonly nest: Readonly<{
|
|
14
|
+
readonly gridColumn: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridColumn", "span 2">;
|
|
15
|
+
}>;
|
|
13
16
|
readonly heading: Readonly<{
|
|
14
17
|
readonly gridColumn: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridColumn", "span 2">;
|
|
15
18
|
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", "bold">;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ASTAggregateViewOperation,
|
|
1
|
+
import { ASTAggregateViewOperation, ASTCalculateViewOperation, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export interface AggregateOperationsProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
segment: ASTSegmentViewDefinition;
|
|
6
5
|
view: ViewParent;
|
|
7
|
-
aggregates: ASTAggregateViewOperation[];
|
|
6
|
+
aggregates: (ASTAggregateViewOperation | ASTCalculateViewOperation)[];
|
|
8
7
|
}
|
|
9
|
-
export declare function AggregateOperations({
|
|
8
|
+
export declare function AggregateOperations({ segment, view, aggregates, }: AggregateOperationsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ASTDrillViewOperation
|
|
1
|
+
import { ASTDrillViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface DrillOperationsProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
drills: ASTDrillViewOperation[];
|
|
5
4
|
}
|
|
6
5
|
export declare function DrillOperations({ drills }: DrillOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTWhereViewOperation, ASTHavingViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface FilterOperationsProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
filters: Array<ASTWhereViewOperation | ASTHavingViewOperation>;
|
|
5
4
|
}
|
|
6
|
-
export declare function FilterOperations({
|
|
5
|
+
export declare function FilterOperations({ filters }: FilterOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ASTGroupByViewOperation,
|
|
1
|
+
import { ASTGroupByViewOperation, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export interface GroupByOperationsProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
segment: ASTSegmentViewDefinition;
|
|
6
5
|
view: ViewParent;
|
|
7
6
|
groupBys: ASTGroupByViewOperation[];
|
|
8
7
|
}
|
|
9
|
-
export declare function GroupByOperations({
|
|
8
|
+
export declare function GroupByOperations({ segment, view, groupBys, }: GroupByOperationsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ASTLimitViewOperation
|
|
1
|
+
import { ASTLimitViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface LimitOperationProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
limit: ASTLimitViewOperation | undefined;
|
|
5
4
|
}
|
|
6
|
-
export declare function LimitOperation({
|
|
5
|
+
export declare function LimitOperation({ limit }: LimitOperationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { ASTNestViewOperation
|
|
1
|
+
import { ASTNestViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export interface NestOperationsProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
view: ViewParent;
|
|
6
5
|
nests: ASTNestViewOperation[];
|
|
7
6
|
}
|
|
8
|
-
export declare function NestOperations({
|
|
7
|
+
export declare function NestOperations({ view, nests }: NestOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
8
|
export interface NestOperationProps {
|
|
10
|
-
rootQuery: ASTQuery;
|
|
11
9
|
view: ViewParent;
|
|
12
10
|
nest: ASTNestViewOperation;
|
|
13
11
|
}
|
|
14
|
-
export declare function NestOperation({
|
|
12
|
+
export declare function NestOperation({ view, nest }: NestOperationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
3
2
|
import { ViewParent } from '../../utils/fields';
|
|
4
3
|
export interface OperationActionTitleProps {
|
|
5
|
-
rootQuery: ASTQuery;
|
|
6
4
|
view: ViewParent;
|
|
7
5
|
title: string;
|
|
8
6
|
actionTitle: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ASTOrderByViewOperation
|
|
1
|
+
import { ASTOrderByViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
export interface OrderByOperationsProps {
|
|
3
|
-
rootQuery: ASTQuery;
|
|
4
3
|
orderBys: ASTOrderByViewOperation[];
|
|
5
4
|
}
|
|
6
|
-
export declare function OrderByOperations({
|
|
5
|
+
export declare function OrderByOperations({ orderBys }: OrderByOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ASTAggregateViewOperation, ASTGroupByViewOperation, ASTNestViewOperation
|
|
1
|
+
import { ASTAggregateViewOperation, ASTCalculateViewOperation, ASTGroupByViewOperation, ASTNestViewOperation } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export interface RenameDialogProps {
|
|
4
|
-
rootQuery: ASTQuery | undefined;
|
|
5
4
|
view: ViewParent;
|
|
6
|
-
target: ASTGroupByViewOperation | ASTAggregateViewOperation | ASTNestViewOperation | undefined;
|
|
5
|
+
target: ASTGroupByViewOperation | ASTAggregateViewOperation | ASTNestViewOperation | ASTCalculateViewOperation | undefined;
|
|
7
6
|
open: boolean;
|
|
8
7
|
setOpen: (open: boolean) => void;
|
|
9
8
|
}
|
|
10
|
-
export declare function RenameDialog({
|
|
9
|
+
export declare function RenameDialog({ view, target, open, setOpen }: RenameDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ASTAggregateViewOperation,
|
|
1
|
+
import { ASTAggregateViewOperation, ASTCalculateViewOperation, ASTGroupByViewOperation, ASTSegmentViewDefinition } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export interface SortableOperationsProps {
|
|
4
|
-
rootQuery: ASTQuery;
|
|
5
4
|
segment: ASTSegmentViewDefinition;
|
|
6
5
|
view: ViewParent;
|
|
7
|
-
operations: Array<ASTAggregateViewOperation | ASTGroupByViewOperation>;
|
|
6
|
+
operations: Array<ASTAggregateViewOperation | ASTGroupByViewOperation | ASTCalculateViewOperation>;
|
|
8
7
|
kind: 'aggregate' | 'group_by';
|
|
9
8
|
}
|
|
10
|
-
export declare function SortableOperations({
|
|
9
|
+
export declare function SortableOperations({ segment, view, operations, kind, }: SortableOperationsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldItem } from './utils';
|
|
3
3
|
import { SourceInfo } from '@malloydata/malloy-interfaces';
|
|
4
|
+
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
4
5
|
interface FieldGroupListProps {
|
|
6
|
+
rootQuery: ASTQuery;
|
|
5
7
|
source: SourceInfo;
|
|
6
8
|
fieldItems: FieldItem[];
|
|
7
9
|
fieldGroupType: 'view' | 'measure' | 'dimension';
|
|
8
10
|
}
|
|
9
|
-
export default function FieldGroupList({ source, fieldItems, fieldGroupType, }: FieldGroupListProps): React.ReactNode;
|
|
11
|
+
export default function FieldGroupList({ rootQuery, source, fieldItems, fieldGroupType, }: FieldGroupListProps): React.ReactNode;
|
|
10
12
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
-
import { ASTArrowQueryDefinition } from '@malloydata/malloy-query-builder';
|
|
2
|
+
import { ASTArrowQueryDefinition, ASTQuery } from '@malloydata/malloy-query-builder';
|
|
3
3
|
interface FieldTokenWithActionsProps {
|
|
4
|
+
rootQuery: ASTQuery;
|
|
4
5
|
field: Malloy.FieldInfo;
|
|
5
6
|
path: string[];
|
|
6
7
|
viewDef: ASTArrowQueryDefinition;
|
|
7
8
|
}
|
|
8
|
-
export declare function FieldTokenWithActions({ field, path, viewDef, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function FieldTokenWithActions({ rootQuery, field, path, viewDef, }: FieldTokenWithActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { FieldItem } from './utils';
|
|
2
2
|
import { SourceInfo } from '@malloydata/malloy-interfaces';
|
|
3
|
+
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
3
4
|
interface SearchResultListProps {
|
|
5
|
+
rootQuery: ASTQuery;
|
|
4
6
|
source: SourceInfo;
|
|
5
7
|
items: FieldItem[];
|
|
6
8
|
}
|
|
7
|
-
export default function SearchResultList({ source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export default function SearchResultList({ rootQuery, source, items, }: SearchResultListProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
10
|
export {};
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
import { ViewParent } from '../../utils/fields';
|
|
3
3
|
export declare function useOperations(view: ViewParent, field: Malloy.FieldInfo, path: string[]): {
|
|
4
|
-
isGroupByAllowed: boolean;
|
|
5
4
|
groupByDisabledReason: string;
|
|
6
|
-
isAggregateAllowed: boolean;
|
|
7
5
|
aggregateDisabledReason: string;
|
|
8
|
-
isFilterAllowed: boolean;
|
|
9
6
|
filterDisabledReason: string;
|
|
10
|
-
isOrderByAllowed: boolean;
|
|
11
7
|
orderByDisabledReason: string;
|
|
12
8
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
import { IconType } from '.';
|
|
4
|
-
type DropdownMenuChild = React.ReactElement<DropdownMenuItemProps, typeof DropdownMenuItem> | React.ReactElement<DropdownSubMenuItemProps, typeof DropdownSubMenuItem> | React.ReactElement<DropdownMenuLabelProps, typeof DropdownMenuLabel
|
|
4
|
+
type DropdownMenuChild = React.ReactElement<DropdownMenuItemProps, typeof DropdownMenuItem> | React.ReactElement<DropdownSubMenuItemProps, typeof DropdownSubMenuItem> | React.ReactElement<DropdownMenuLabelProps, typeof DropdownMenuLabel> | null;
|
|
5
5
|
interface DropdownMenuProps {
|
|
6
6
|
trigger: ReactElement;
|
|
7
7
|
tooltip?: string | ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FieldInfo, Schema } from '@malloydata/malloy-interfaces';
|
|
2
|
+
import { ViewParent } from './fields';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the computed primary axis from the root query. Roughly follows this logic:
|
|
5
|
+
* - Find the first output field with the `# x` annotation
|
|
6
|
+
* - Otherwise find the first output field with a time or date type'
|
|
7
|
+
* - Otherwise, find the first output field
|
|
8
|
+
*/
|
|
9
|
+
export declare const getPrimaryAxis: (view: ViewParent) => FieldInfo | undefined;
|
|
10
|
+
export declare const getPrimaryAxisFromSchema: (schema: Schema) => FieldInfo | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
import { AtomicTypeType, ParameterTypeType } from '@malloydata/malloy-interfaces';
|
|
3
3
|
import { IconType } from '../primitives';
|
|
4
|
-
import {
|
|
4
|
+
import { Tag } from '@malloydata/malloy-tag';
|
|
5
5
|
export declare function atomicTypeToIcon(type: AtomicTypeType | ParameterTypeType): IconType;
|
|
6
|
-
export declare function fieldKindToColor(kind: 'dimension' | 'measure' | 'join' | 'view'): "purple" | "green" | "cyan" | undefined;
|
|
6
|
+
export declare function fieldKindToColor(kind: 'dimension' | 'measure' | 'join' | 'view' | 'calculate'): "purple" | "green" | "cyan" | undefined;
|
|
7
7
|
export declare function fieldToIcon(field: Malloy.FieldInfo): IconType;
|
|
8
8
|
export declare function relationshipToIcon(relationship: Malloy.Relationship): IconType;
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function tagToVisualization(currentTag: Tag): IconType;
|
|
@@ -8,6 +8,7 @@ export declare function segmentHasOrderBySourceField(segment: ASTSegmentViewDefi
|
|
|
8
8
|
export declare function segmentHasFieldInOutputSpace(segment: ASTSegmentViewDefinition, path: string[], name: string): boolean;
|
|
9
9
|
export declare function segmentNestNo(segment: ASTSegmentViewDefinition, name?: string): number;
|
|
10
10
|
export declare function addGroupBy(view: ViewParent, field: Malloy.FieldInfo, path: string[]): void;
|
|
11
|
+
export declare function recomputePartitionByAndPrimaryAxis(segment: ASTSegmentViewDefinition): void;
|
|
11
12
|
export declare function addAggregate(view: ViewParent, field: Malloy.FieldInfo, path: string[]): void;
|
|
12
13
|
export declare function addNest(view: ViewParent, field: Malloy.FieldInfo): void;
|
|
13
14
|
export declare function addOrderByFromSource(view: ViewParent, path: string[], name: string, direction?: Malloy.OrderByDirection): void;
|
|
@@ -2,22 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
3
|
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
4
4
|
import type { DrillData } from '@malloydata/render';
|
|
5
|
-
export interface SearchValueMapResult {
|
|
6
|
-
fieldName: string;
|
|
7
|
-
cardinality: number;
|
|
8
|
-
values: {
|
|
9
|
-
fieldValue: string | null;
|
|
10
|
-
weight: number;
|
|
11
|
-
}[];
|
|
12
|
-
}
|
|
13
5
|
export interface QueryEditorContextProps {
|
|
14
6
|
/** Source object at the root level */
|
|
15
7
|
source?: Malloy.SourceInfo;
|
|
16
8
|
/** Query object to represent current state at the root level */
|
|
17
9
|
rootQuery?: ASTQuery;
|
|
18
10
|
/** Provide to allow editing of the query */
|
|
19
|
-
setQuery
|
|
20
|
-
topValues?: SearchValueMapResult[];
|
|
11
|
+
setQuery: (query: Malloy.Query | undefined) => void;
|
|
21
12
|
onDrill?: ({ stableQuery, stableDrillClauses }: DrillData) => void;
|
|
22
13
|
}
|
|
23
14
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ASTQuery } from '@malloydata/malloy-query-builder';
|
|
2
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
-
export declare function useQueryBuilder(source?: Malloy.SourceInfo, query?: Malloy.Query):
|
|
3
|
+
export declare function useQueryBuilder(source?: Malloy.SourceInfo, query?: Malloy.Query): ASTQuery | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface UpdateQueryContextProps {
|
|
2
|
+
updateQuery: () => void;
|
|
3
|
+
}
|
|
4
|
+
export declare const UpdateQueryContext: import("react").Context<UpdateQueryContextProps>;
|
|
5
|
+
/**
|
|
6
|
+
* A layer of indirection should we ever decide to optimize
|
|
7
|
+
* this behavior
|
|
8
|
+
*/
|
|
9
|
+
export declare function useUpdateQuery(): () => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface SearchValueMapResult {
|
|
2
|
+
fieldName: string;
|
|
3
|
+
cardinality: number;
|
|
4
|
+
values: {
|
|
5
|
+
fieldValue: string | null;
|
|
6
|
+
weight: number;
|
|
7
|
+
}[];
|
|
8
|
+
}
|
|
9
|
+
interface TopValuesContextProps {
|
|
10
|
+
topValues?: SearchValueMapResult[];
|
|
11
|
+
}
|
|
12
|
+
export declare const TopValuesContext: import("react").Context<TopValuesContextProps>;
|
|
13
|
+
/**
|
|
14
|
+
* A layer of indirection should we ever decide to optimize
|
|
15
|
+
* this behavior
|
|
16
|
+
*/
|
|
17
|
+
export declare function useTopValues(): SearchValueMapResult[] | undefined;
|
|
18
|
+
export {};
|
package/jest.config.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
module.exports = {
|
|
9
9
|
setupFilesAfterEnv: ['<rootDir>/src/test/jest.setup.ts'],
|
|
10
10
|
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
11
|
-
testMatch: ['
|
|
11
|
+
testMatch: ['<rootDir>/src/**/?(*.)spec.(ts|js)?(x)'],
|
|
12
12
|
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/dev/', '/src/test/'],
|
|
13
13
|
transform: {
|
|
14
14
|
'^.+\\.tsx?$': ['babel-jest'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/malloy-explorer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.299-dev250804170242",
|
|
4
4
|
"description": "Malloy visual query builder",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@babel/preset-typescript": "^7.27.1",
|
|
83
83
|
"@eslint/compat": "^1.2.7",
|
|
84
84
|
"@eslint/js": "^9.21.0",
|
|
85
|
-
"@malloydata/db-duckdb": "^0.0.
|
|
86
|
-
"@malloydata/malloy": "^0.0.
|
|
85
|
+
"@malloydata/db-duckdb": "^0.0.299",
|
|
86
|
+
"@malloydata/malloy": "^0.0.299",
|
|
87
87
|
"@rollup/plugin-replace": "^6.0.2",
|
|
88
88
|
"@stylexjs/eslint-plugin": "^0.11.1",
|
|
89
89
|
"@stylexjs/postcss-plugin": "^0.11.1",
|
|
@@ -115,11 +115,11 @@
|
|
|
115
115
|
"vite-plugin-svgr": "^4.3.0"
|
|
116
116
|
},
|
|
117
117
|
"peerDependencies": {
|
|
118
|
-
"@malloydata/malloy-filter": "
|
|
119
|
-
"@malloydata/malloy-interfaces": "
|
|
120
|
-
"@malloydata/malloy-query-builder": "
|
|
121
|
-
"@malloydata/malloy-tag": "
|
|
122
|
-
"@malloydata/render": "
|
|
118
|
+
"@malloydata/malloy-filter": "^0.0.299",
|
|
119
|
+
"@malloydata/malloy-interfaces": "^0.0.299",
|
|
120
|
+
"@malloydata/malloy-query-builder": "^0.0.299",
|
|
121
|
+
"@malloydata/malloy-tag": "^0.0.299",
|
|
122
|
+
"@malloydata/render": "^0.0.299",
|
|
123
123
|
"react": ">=19.0.0",
|
|
124
124
|
"react-dom": ">=19.0.0"
|
|
125
125
|
}
|