@malloydata/malloy-explorer 0.0.285-dev250611150446 → 0.0.295-dev250710213205
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/.gitmodules +3 -0
- package/@flowtypes/components/MalloyExplorerProvider.flow.js +2 -5
- package/README.md +7 -0
- package/dist/cjs/index.cjs +1985 -1317
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1988 -1320
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +18 -1
- package/dist/types/components/MalloyExplorerProvider.d.ts +2 -4
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +3 -1
- package/dist/types/components/QueryPanel/VizEditor/ArrayEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/BooleanEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/FieldEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/InfoHover.d.ts +4 -0
- package/dist/types/components/QueryPanel/VizEditor/NumberEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/ObjectEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/OneOfEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/StringEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditor.d.ts +11 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorDialog.d.ts +12 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorPopover.d.ts +10 -0
- package/dist/types/components/QueryPanel/VizEditor/styles.d.ts +72 -0
- package/dist/types/components/QueryPanel/VizEditor/types.d.ts +11 -0
- package/dist/types/components/QueryPanel/dialogStyles.d.ts +60 -0
- package/dist/types/components/ResultPanel/ResultDisplay.d.ts +0 -4
- package/dist/types/components/filters/DateTimeFilterCore.d.ts +1 -1
- package/dist/types/components/primitives/ScrollableArea.d.ts +3 -0
- package/dist/types/components/utils/renderer.d.ts +0 -24
- package/dist/types/contexts/QueryEditorContext.d.ts +2 -4
- package/package.json +10 -8
- package/vite.config.mts +5 -0
- package/dist/types/components/QueryPanel/RendererPopover.d.ts +0 -20
package/dist/malloy-explorer.css
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
.mlym9y5t7{--mlynfhokh:block}
|
|
36
36
|
.mly28fmrt{--mlynfhokh:none}
|
|
37
37
|
.mly1bo1i26{--mlyri8z08:0}
|
|
38
|
+
.mly1ae5hkt{--mlyvpnzvp:block}
|
|
38
39
|
.mly11ogjb6{--mlyvpnzvp:none}
|
|
39
40
|
.mlyf8wvcd{--mlyvygx4q:var(--mly1css67u)}
|
|
40
41
|
.mlyrtwgpv{--mlyvygx4q:var(--mly1fea1fg)}
|
|
@@ -53,6 +54,7 @@
|
|
|
53
54
|
.mly1u5txqc:hover{--mly1by112x:.3}
|
|
54
55
|
.mly1x0xcia:hover{--mlynfhokh:block}
|
|
55
56
|
.mly1fzkygm:hover{--mlyri8z08:.3}
|
|
57
|
+
.mly1g9of4s:hover{--mlyvpnzvp:block}
|
|
56
58
|
.mly157rht3:hover{--mlyvpnzvp:inline-flex}
|
|
57
59
|
}
|
|
58
60
|
|
|
@@ -129,6 +131,8 @@
|
|
|
129
131
|
}
|
|
130
132
|
|
|
131
133
|
@layer priority3{
|
|
134
|
+
.mlyllpv0l{border-bottom:1px solid #e0e0e0}
|
|
135
|
+
.mlyv3yj8d{border-bottom:1px solid var(--malloy-color-border,#e0e0e0)}
|
|
132
136
|
.mly1akygb0{border-color:none}
|
|
133
137
|
.mly1y5yj0f{border-color:rgb(0,100,224)}
|
|
134
138
|
.mly10bk7bj{border-color:var(--malloy-composer-focus,#c3d7f7)}
|
|
@@ -151,6 +155,7 @@
|
|
|
151
155
|
.mly1roky18{border-right:1px solid rgba(204,211,219,1)}
|
|
152
156
|
.mlyng3xce{border-style:none}
|
|
153
157
|
.mly1y0btm7{border-style:solid}
|
|
158
|
+
.mlye536se{border-top:1px solid #e0e0e0}
|
|
154
159
|
.mly77krkw{border-top:1px solid var(--malloy-composer-form-border,#ececec)}
|
|
155
160
|
.mlyc342km{border-width:0}
|
|
156
161
|
.mlymkeg23{border-width:1px}
|
|
@@ -165,6 +170,8 @@
|
|
|
165
170
|
.mly1jnr06f{gap:4px}
|
|
166
171
|
.mly1nejdyq{gap:5px}
|
|
167
172
|
.mly167g77z{gap:8px}
|
|
173
|
+
.mly623te4{grid-column:span 2}
|
|
174
|
+
.mly1a80n4u{grid-column:span 3}
|
|
168
175
|
.mly1a2a7pz{outline:none}
|
|
169
176
|
.mlyysyzu8{overflow:auto}
|
|
170
177
|
.mlyb3r6kr{overflow:hidden}
|
|
@@ -183,6 +190,7 @@
|
|
|
183
190
|
.mlypqajaz{align-items:end}
|
|
184
191
|
.mly1cy8zhl{align-items:flex-start}
|
|
185
192
|
.mly7a106z{align-items:start}
|
|
193
|
+
.mly1071x5a{align-items:top}
|
|
186
194
|
.mly7v9bd0{animation-duration:.75s}
|
|
187
195
|
.mlya4qsjk{animation-iteration-count:infinite}
|
|
188
196
|
.mly8jsasv{animation-name:mlyqng64z-B}
|
|
@@ -196,6 +204,7 @@
|
|
|
196
204
|
.mly1gzqxud{background-color:rgba(255,255,255,1)}
|
|
197
205
|
.mly1jmk7v{background-color:rgba(37,54,63,1)}
|
|
198
206
|
.mlyjbqb8w{background-color:transparent}
|
|
207
|
+
.mly9nb4jr{background-color:var(--malloy-color-background,white)}
|
|
199
208
|
.mly1jjku57{background-color:var(--malloy-composer-form-disabledBackground,#f6f6f6)}
|
|
200
209
|
.mly6wxqrg{background-color:var(--malloy-composer-form-focusBackground,#f0f6ff)}
|
|
201
210
|
.mly12azwz9{background-color:var(--malloy-composer-menu-background,white)}
|
|
@@ -296,11 +305,12 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
296
305
|
.mly117nqv4{font-weight:bold}
|
|
297
306
|
.mly1fcty0u{font-weight:normal}
|
|
298
307
|
.mly1mt1orb{grid-auto-flow:column}
|
|
308
|
+
.mlysd5ean{grid-auto-rows:max-content}
|
|
299
309
|
.mly15396mt{grid-template-columns:100px auto 100px}
|
|
300
310
|
.mly52fmzj{grid-template-columns:1fr auto}
|
|
301
311
|
.mly1g3yg12{grid-template-columns:auto 1fr auto}
|
|
302
312
|
.mlybyjr8{grid-template-columns:auto}
|
|
303
|
-
.
|
|
313
|
+
.mly16kridx{grid-template-columns:min-content 1fr min-content}
|
|
304
314
|
.mlyl56j7k{justify-content:center}
|
|
305
315
|
.mly13a6bvl{justify-content:flex-end}
|
|
306
316
|
.mly1nhvcw1{justify-content:flex-start}
|
|
@@ -313,6 +323,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
313
323
|
.mly1gu5id8{letter-spacing:-0.24px}
|
|
314
324
|
.mly12oo3zp{letter-spacing:0}
|
|
315
325
|
.mly1d3mw78{line-height:16px}
|
|
326
|
+
.mly1rl49lg{line-height:2.2em}
|
|
316
327
|
.mly1fc57z9{line-height:20px}
|
|
317
328
|
.mly1o2sk6j{line-height:24px}
|
|
318
329
|
.mly1vqud6w{opacity:70%}
|
|
@@ -322,6 +333,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
322
333
|
.mly10l6tqk{position:absolute}
|
|
323
334
|
.mlyixxii4{position:fixed}
|
|
324
335
|
.mly1n2onr6{position:relative}
|
|
336
|
+
.mly7wzq59{position:sticky}
|
|
325
337
|
.mly2b8uid{text-align:center}
|
|
326
338
|
.mlydpxx8g{text-align:left}
|
|
327
339
|
.mly1vqy1sf{text-edge:cap}
|
|
@@ -396,7 +408,9 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
396
408
|
.mlyq3t0pi{max-height:280px}
|
|
397
409
|
.mlyuyqlj2{max-height:300px}
|
|
398
410
|
.mly1phlbz0{max-height:400px}
|
|
411
|
+
.mly1jcbksy{max-height:420px}
|
|
399
412
|
.mly3d5gib{max-height:50vh}
|
|
413
|
+
.mly1l4ul0t{max-height:75vh}
|
|
400
414
|
.mly1kbvuzt{max-height:var(--radix-tooltip-content-available-height)}
|
|
401
415
|
.mlyqyhut4{max-width:16.5px}
|
|
402
416
|
.mly1pdpmub{max-width:264px}
|
|
@@ -404,7 +418,9 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
404
418
|
.mly1dc814f{max-width:350px}
|
|
405
419
|
.mlyxc7z9f{max-width:360px}
|
|
406
420
|
.mly1j9u4d2{max-width:400px}
|
|
421
|
+
.mly1lr1uin{max-width:420px}
|
|
407
422
|
.mlymcgfsh{max-width:60px}
|
|
423
|
+
.mly14zcgw3{max-width:75vw}
|
|
408
424
|
.mly2lwn1j{min-height:0}
|
|
409
425
|
.mly4x6u8j{min-width:16.5px}
|
|
410
426
|
.mlygc0pbm{min-width:1px}
|
|
@@ -450,6 +466,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
450
466
|
.mlyxsgkw5{width:350px}
|
|
451
467
|
.mly869kya{width:5.5em}
|
|
452
468
|
.mly1ftt334{width:5px}
|
|
469
|
+
.mly14rvwrp{width:600px}
|
|
453
470
|
.mly1247r65{width:60px}
|
|
454
471
|
.mly1xc55vz{width:8px}
|
|
455
472
|
.mlym6i5cn{width:90%}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
3
|
+
import type { DrillData } from '@malloydata/render';
|
|
3
4
|
import { SearchValueMapResult } from '../contexts/QueryEditorContext';
|
|
4
5
|
export interface MalloyExplorerProviderProps {
|
|
5
6
|
source: Malloy.SourceInfo;
|
|
@@ -9,9 +10,6 @@ export interface MalloyExplorerProviderProps {
|
|
|
9
10
|
onFocusedNestViewPathChange: (path: string[]) => void;
|
|
10
11
|
children: ReactNode | ReactNode[];
|
|
11
12
|
topValues?: SearchValueMapResult[];
|
|
12
|
-
onDrill?: ({ stableQuery, stableDrillClauses
|
|
13
|
-
stableQuery: Malloy.Query | undefined;
|
|
14
|
-
stableDrillClauses: Malloy.DrillOperation[] | undefined;
|
|
15
|
-
}) => void;
|
|
13
|
+
onDrill?: ({ stableQuery, stableDrillClauses }: DrillData) => void;
|
|
16
14
|
}
|
|
17
15
|
export declare function MalloyExplorerProvider({ source, query, onQueryChange, focusedNestViewPath, onFocusedNestViewPathChange, children, topValues, onDrill, }: MalloyExplorerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,13 +3,15 @@ import { StyleXStyles } from '@stylexjs/stylex';
|
|
|
3
3
|
import { SearchIndexResult } from './hooks/useSearch';
|
|
4
4
|
export interface FieldListProps {
|
|
5
5
|
search: string;
|
|
6
|
+
filter?: (value: string) => boolean;
|
|
6
7
|
onClick: (value: SearchIndexResult) => void;
|
|
7
8
|
fieldPath?: string;
|
|
8
9
|
ref?: React.RefObject<HTMLDivElement | null>;
|
|
9
10
|
customStyle?: StyleXStyles;
|
|
10
11
|
showPath?: boolean;
|
|
12
|
+
hideNoMatchMessage?: boolean;
|
|
11
13
|
}
|
|
12
|
-
export declare function ValueList({ onClick, search, fieldPath, ref, customStyle, showPath, }: FieldListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function ValueList({ onClick, search, filter, fieldPath, ref, customStyle, showPath, hideNoMatchMessage, }: FieldListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export interface ValueProps {
|
|
14
16
|
value: SearchIndexResult;
|
|
15
17
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { JSONSchemaObject } from '@malloydata/render';
|
|
2
|
+
import { EditorProps } from './types';
|
|
3
|
+
export default function ObjectEditor({ view, name, path, current, option, updateCurrent, }: EditorProps<JSONSchemaObject, Record<string, unknown>>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
2
|
+
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
3
|
+
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
4
|
+
export interface VizEditorProps {
|
|
5
|
+
rootQuery: ASTQuery;
|
|
6
|
+
plugin: CoreVizPluginInstance;
|
|
7
|
+
view: ASTQuery | ASTView;
|
|
8
|
+
customStyle?: StyleXStyles;
|
|
9
|
+
setOpen: (open: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function VizEditor({ rootQuery, view, plugin, setOpen }: VizEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
2
|
+
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
3
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
|
+
export interface VizEditorDialogProps {
|
|
5
|
+
rootQuery: ASTQuery;
|
|
6
|
+
plugin?: CoreVizPluginInstance;
|
|
7
|
+
view: ASTQuery | ASTView;
|
|
8
|
+
customStyle?: StyleXStyles;
|
|
9
|
+
open: boolean;
|
|
10
|
+
setOpen: (open: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function VizEditorDialog({ rootQuery, plugin, view, customStyle, open, setOpen, }: VizEditorDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
2
|
+
import { CoreVizPluginInstance } from '@malloydata/render';
|
|
3
|
+
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
|
+
export interface VizEditorPopoverProps {
|
|
5
|
+
rootQuery: ASTQuery;
|
|
6
|
+
plugin: CoreVizPluginInstance;
|
|
7
|
+
view: ASTQuery | ASTView;
|
|
8
|
+
customStyle?: StyleXStyles;
|
|
9
|
+
}
|
|
10
|
+
export declare function VizEditorPopover({ rootQuery, plugin, view, customStyle, }: VizEditorPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export declare const styles: Readonly<{
|
|
2
|
+
readonly trigger: Readonly<{
|
|
3
|
+
readonly height: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"height", "calc(100% - 8px)">;
|
|
4
|
+
}>;
|
|
5
|
+
readonly left: Readonly<{
|
|
6
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
7
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "right">;
|
|
8
|
+
}>;
|
|
9
|
+
readonly right: Readonly<{
|
|
10
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
11
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "left">;
|
|
12
|
+
}>;
|
|
13
|
+
readonly heading: Readonly<{
|
|
14
|
+
readonly gridColumn: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridColumn", "span 2">;
|
|
15
|
+
readonly fontWeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontWeight", "bold">;
|
|
16
|
+
}>;
|
|
17
|
+
readonly label: Readonly<{
|
|
18
|
+
readonly whiteSpace: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
19
|
+
}>;
|
|
20
|
+
readonly divider: Readonly<{
|
|
21
|
+
readonly gridColumn: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridColumn", "span 3">;
|
|
22
|
+
readonly borderTop: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderTop", "1px solid #e0e0e0">;
|
|
23
|
+
}>;
|
|
24
|
+
readonly content: Readonly<{
|
|
25
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
26
|
+
readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
|
|
27
|
+
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)">;
|
|
28
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "white">;
|
|
29
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 8>;
|
|
30
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 8>;
|
|
31
|
+
readonly minWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"minWidth", 240>;
|
|
32
|
+
readonly maxWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxWidth", 420>;
|
|
33
|
+
readonly maxHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxHeight", 420>;
|
|
34
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
35
|
+
}>;
|
|
36
|
+
readonly editor: Readonly<{
|
|
37
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
38
|
+
readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
|
|
39
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
40
|
+
readonly overflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"overflow", "hidden">;
|
|
41
|
+
}>;
|
|
42
|
+
readonly editorGrid: Readonly<{
|
|
43
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "grid">;
|
|
44
|
+
readonly gridTemplateColumns: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridTemplateColumns", "min-content 1fr min-content">;
|
|
45
|
+
readonly gridAutoRows: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gridAutoRows", "max-content">;
|
|
46
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
47
|
+
readonly overflowY: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"overflowY", "auto">;
|
|
48
|
+
}>;
|
|
49
|
+
readonly editorRow: Readonly<{
|
|
50
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
51
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
52
|
+
}>;
|
|
53
|
+
readonly editorCell: Readonly<{
|
|
54
|
+
readonly flexGrow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexGrow", 1>;
|
|
55
|
+
}>;
|
|
56
|
+
readonly input: Readonly<{
|
|
57
|
+
readonly border: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"border", "1px solid rgb(239, 239, 239)">;
|
|
58
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 4>;
|
|
59
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgb(95, 99, 104)">;
|
|
60
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "3px 3px 3px 10px">;
|
|
61
|
+
}>;
|
|
62
|
+
readonly card: Readonly<{
|
|
63
|
+
readonly maxWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxWidth", "350px">;
|
|
64
|
+
}>;
|
|
65
|
+
readonly infoTrigger: Readonly<{
|
|
66
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "inline-flex">;
|
|
67
|
+
readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "top">;
|
|
68
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "center">;
|
|
69
|
+
readonly paddingRight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingRight", "8px">;
|
|
70
|
+
readonly paddingTop: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingTop", "4px">;
|
|
71
|
+
}>;
|
|
72
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
2
|
+
import { TagSetValue } from '@malloydata/malloy-tag';
|
|
3
|
+
import { JSONSchemaProperty } from '@malloydata/render';
|
|
4
|
+
export interface EditorProps<T extends JSONSchemaProperty, C = TagSetValue> {
|
|
5
|
+
view: ASTQuery | ASTView;
|
|
6
|
+
name: string;
|
|
7
|
+
path: string[];
|
|
8
|
+
option: T;
|
|
9
|
+
current: C;
|
|
10
|
+
updateCurrent: (path: string[], value: unknown) => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const dialogStyles: Readonly<{
|
|
2
|
+
readonly displayNone: Readonly<{
|
|
3
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "none">;
|
|
4
|
+
}>;
|
|
5
|
+
readonly overlay: Readonly<{
|
|
6
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "rgba(0 0 0 / 0.0)">;
|
|
7
|
+
readonly position: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"position", "fixed">;
|
|
8
|
+
readonly top: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"top", 0>;
|
|
9
|
+
readonly left: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"left", 0>;
|
|
10
|
+
readonly right: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"right", 0>;
|
|
11
|
+
readonly bottom: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"bottom", 0>;
|
|
12
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "grid">;
|
|
13
|
+
readonly placeItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"placeItems", "center">;
|
|
14
|
+
readonly zIndex: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"zIndex", 100>;
|
|
15
|
+
}>;
|
|
16
|
+
readonly title: Readonly<{
|
|
17
|
+
readonly fontSize: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontSize", "16px">;
|
|
18
|
+
readonly margin: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"margin", 0>;
|
|
19
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
20
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "space-between">;
|
|
21
|
+
readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
|
|
22
|
+
readonly borderBottom: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderBottom", "1px solid #e0e0e0">;
|
|
23
|
+
readonly lineHeight: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"lineHeight", "2.2em">;
|
|
24
|
+
}>;
|
|
25
|
+
readonly close: Readonly<{
|
|
26
|
+
readonly border: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"border", "none">;
|
|
27
|
+
readonly background: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"background", "transparent" | "rgba(0, 0, 0, 0.05)" | "rgba(0, 0, 0, 0.1)">;
|
|
28
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 4>;
|
|
29
|
+
}>;
|
|
30
|
+
readonly content: Readonly<{
|
|
31
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
32
|
+
readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
|
|
33
|
+
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)">;
|
|
34
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "white">;
|
|
35
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 8>;
|
|
36
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", 8>;
|
|
37
|
+
readonly minWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"minWidth", 240>;
|
|
38
|
+
readonly maxWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"maxWidth", 280>;
|
|
39
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
40
|
+
}>;
|
|
41
|
+
readonly editor: Readonly<{
|
|
42
|
+
readonly width: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"width", 250>;
|
|
43
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
44
|
+
readonly flexDirection: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexDirection", "column">;
|
|
45
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
46
|
+
}>;
|
|
47
|
+
readonly editorRow: Readonly<{
|
|
48
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "flex">;
|
|
49
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", 8>;
|
|
50
|
+
}>;
|
|
51
|
+
readonly editorCell: Readonly<{
|
|
52
|
+
readonly flexGrow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"flexGrow", 1>;
|
|
53
|
+
}>;
|
|
54
|
+
readonly input: Readonly<{
|
|
55
|
+
readonly border: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"border", "1px solid #e0e0e0">;
|
|
56
|
+
readonly color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", "rgb(95, 99, 104)">;
|
|
57
|
+
readonly padding: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"padding", "4px 8px 4px 8px">;
|
|
58
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", 5>;
|
|
59
|
+
}>;
|
|
60
|
+
}>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
import { SubmittedQuery } from './SubmittedQuery';
|
|
3
|
-
export interface DrillData {
|
|
4
|
-
stableQuery: Malloy.Query | undefined;
|
|
5
|
-
stableDrillClauses: Malloy.DrillOperation[] | undefined;
|
|
6
|
-
}
|
|
7
3
|
export interface ResultDisplayProps {
|
|
8
4
|
source: Malloy.SourceInfo;
|
|
9
5
|
query: SubmittedQuery;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TemporalFilter, TemporalUnit } from '@malloydata/malloy-filter';
|
|
3
3
|
type TemporalFilterOperator = TemporalFilter['operator'];
|
|
4
|
-
type TemporalFilterType = TemporalFilterOperator | '-null' | '
|
|
4
|
+
type TemporalFilterType = TemporalFilterOperator | '-null' | '-before' | '-after';
|
|
5
5
|
export interface DateTimeFilterCoreProps {
|
|
6
6
|
filter: TemporalFilter | null;
|
|
7
7
|
setFilter: (filter: TemporalFilter) => void;
|
|
@@ -10,27 +10,3 @@ export type AtomicRendererName = 'number' | 'boolean' | 'currency' | 'image' | '
|
|
|
10
10
|
export type RendererName = QueryRendererName | AtomicRendererName;
|
|
11
11
|
export declare function tagToRenderer(tag: Tag | undefined): RendererName | null;
|
|
12
12
|
export declare function legacyToViz(name: QueryRendererName): VizName;
|
|
13
|
-
export interface BaseVizOption {
|
|
14
|
-
name: string;
|
|
15
|
-
label: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface VizBooleanOption extends BaseVizOption {
|
|
19
|
-
type: 'boolean';
|
|
20
|
-
default: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface VizStringOption extends BaseVizOption {
|
|
23
|
-
type: 'string';
|
|
24
|
-
default: string;
|
|
25
|
-
}
|
|
26
|
-
export interface VizSelectOption extends BaseVizOption {
|
|
27
|
-
type: 'select';
|
|
28
|
-
default: string;
|
|
29
|
-
options: Array<{
|
|
30
|
-
label: string;
|
|
31
|
-
description?: string;
|
|
32
|
-
value: string;
|
|
33
|
-
}>;
|
|
34
|
-
}
|
|
35
|
-
export type VizOption = VizBooleanOption | VizStringOption | VizSelectOption;
|
|
36
|
-
export declare const VISUALIZATION_OPTIONS: Record<VizName, VizOption[] | null>;
|
|
@@ -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 type { DrillData } from '@malloydata/render';
|
|
4
5
|
export interface SearchValueMapResult {
|
|
5
6
|
fieldName: string;
|
|
6
7
|
cardinality: number;
|
|
@@ -17,10 +18,7 @@ export interface QueryEditorContextProps {
|
|
|
17
18
|
/** Provide to allow editing of the query */
|
|
18
19
|
setQuery?: (query: Malloy.Query | undefined) => void;
|
|
19
20
|
topValues?: SearchValueMapResult[];
|
|
20
|
-
onDrill?: ({ stableQuery, stableDrillClauses
|
|
21
|
-
stableQuery: Malloy.Query | undefined;
|
|
22
|
-
stableDrillClauses: Malloy.DrillOperation[] | undefined;
|
|
23
|
-
}) => void;
|
|
21
|
+
onDrill?: ({ stableQuery, stableDrillClauses }: DrillData) => void;
|
|
24
22
|
}
|
|
25
23
|
/**
|
|
26
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.295-dev250710213205",
|
|
4
4
|
"description": "Malloy visual query builder",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
"@stylexjs/stylex": "^0.10.1",
|
|
74
74
|
"assert": "^2.1.0",
|
|
75
75
|
"moment": "^2.30.1",
|
|
76
|
-
"react": ">=
|
|
77
|
-
"react-dom": ">=
|
|
76
|
+
"react": ">=19.0.0",
|
|
77
|
+
"react-dom": ">=19.0.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/preset-env": "^7.27.2",
|
|
@@ -82,6 +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.295",
|
|
86
|
+
"@malloydata/malloy": "^0.0.295",
|
|
85
87
|
"@rollup/plugin-replace": "^6.0.2",
|
|
86
88
|
"@stylexjs/eslint-plugin": "^0.11.1",
|
|
87
89
|
"@stylexjs/postcss-plugin": "^0.11.1",
|
|
@@ -113,11 +115,11 @@
|
|
|
113
115
|
"vite-plugin-svgr": "^4.3.0"
|
|
114
116
|
},
|
|
115
117
|
"peerDependencies": {
|
|
116
|
-
"@malloydata/malloy-filter": ">=0.0.
|
|
117
|
-
"@malloydata/malloy-interfaces": ">=0.0.
|
|
118
|
-
"@malloydata/malloy-query-builder": ">=0.0.
|
|
119
|
-
"@malloydata/malloy-tag": ">=0.0.
|
|
120
|
-
"@malloydata/render": ">=0.0.
|
|
118
|
+
"@malloydata/malloy-filter": ">=0.0.295",
|
|
119
|
+
"@malloydata/malloy-interfaces": ">=0.0.295",
|
|
120
|
+
"@malloydata/malloy-query-builder": ">=0.0.295",
|
|
121
|
+
"@malloydata/malloy-tag": ">=0.0.295",
|
|
122
|
+
"@malloydata/render": ">=0.0.295",
|
|
121
123
|
"react": ">=19.0.0",
|
|
122
124
|
"react-dom": ">=19.0.0"
|
|
123
125
|
}
|
package/vite.config.mts
CHANGED
|
@@ -33,6 +33,8 @@ export default defineConfig({
|
|
|
33
33
|
'react',
|
|
34
34
|
'react-dom',
|
|
35
35
|
'react/jsx-runtime',
|
|
36
|
+
'@malloydata/db-duckdb/wasm',
|
|
37
|
+
'@malloydata/malloy',
|
|
36
38
|
'@malloydata/malloy-tag',
|
|
37
39
|
'@malloydata/malloy-filter',
|
|
38
40
|
'@malloydata/malloy-interfaces',
|
|
@@ -54,11 +56,14 @@ export default defineConfig({
|
|
|
54
56
|
optimizeDeps: {
|
|
55
57
|
force: true,
|
|
56
58
|
include: [
|
|
59
|
+
'@malloydata/db-duckdb/wasm',
|
|
57
60
|
'@malloydata/render',
|
|
61
|
+
'@malloydata/malloy',
|
|
58
62
|
'@malloydata/malloy-tag',
|
|
59
63
|
'@malloydata/malloy-filter',
|
|
60
64
|
'@malloydata/malloy-interfaces',
|
|
61
65
|
'@malloydata/malloy-query-builder',
|
|
62
66
|
],
|
|
67
|
+
exclude: ['@mapbox/node-pre-gyp'],
|
|
63
68
|
},
|
|
64
69
|
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { VizOption, VizName } from '../utils/renderer';
|
|
2
|
-
import { ASTQuery, ASTView } from '@malloydata/malloy-query-builder';
|
|
3
|
-
import { StyleXStyles } from '@stylexjs/stylex';
|
|
4
|
-
export interface RendererPopoverProps {
|
|
5
|
-
rootQuery: ASTQuery;
|
|
6
|
-
viz: VizName;
|
|
7
|
-
options: VizOption[];
|
|
8
|
-
view: ASTQuery | ASTView;
|
|
9
|
-
customStyle?: StyleXStyles;
|
|
10
|
-
}
|
|
11
|
-
export declare function RendererPopover({ rootQuery, viz, options, view, customStyle, }: RendererPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export interface RendererEditorProps {
|
|
13
|
-
rootQuery: ASTQuery;
|
|
14
|
-
viz: VizName;
|
|
15
|
-
options: VizOption[];
|
|
16
|
-
view: ASTQuery | ASTView;
|
|
17
|
-
customStyle?: StyleXStyles;
|
|
18
|
-
setOpen: (open: boolean) => void;
|
|
19
|
-
}
|
|
20
|
-
export declare function RendererEditor({ rootQuery, view, viz, options, setOpen, }: RendererEditorProps): import("react/jsx-runtime").JSX.Element | null;
|