@malloydata/malloy-explorer 0.0.285-dev250530165648 → 0.0.285-dev250611150446
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/dist/cjs/index.cjs +429 -39
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +429 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +4 -33
- package/dist/types/components/QueryPanel/RendererPopover.d.ts +20 -0
- package/dist/types/components/ResultPanel/ResultDisplay.d.ts +0 -8
- package/dist/types/components/filters/DateTimeFilterCore.d.ts +1 -1
- package/dist/types/components/primitives/utils/icon.d.ts +18 -0
- package/dist/types/components/utils/renderer.d.ts +33 -3
- package/package.json +8 -8
- package/vite.config.mts +0 -2
package/dist/malloy-explorer.css
CHANGED
|
@@ -300,10 +300,12 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
300
300
|
.mly52fmzj{grid-template-columns:1fr auto}
|
|
301
301
|
.mly1g3yg12{grid-template-columns:auto 1fr auto}
|
|
302
302
|
.mlybyjr8{grid-template-columns:auto}
|
|
303
|
+
.mly17bnpya{grid-template-columns:min-content 1fr}
|
|
303
304
|
.mlyl56j7k{justify-content:center}
|
|
304
305
|
.mly13a6bvl{justify-content:flex-end}
|
|
305
306
|
.mly1nhvcw1{justify-content:flex-start}
|
|
306
307
|
.mly1rfj78v{justify-content:left}
|
|
308
|
+
.mly1lvf691{justify-content:right}
|
|
307
309
|
.mly1l1ennw{justify-content:space-around}
|
|
308
310
|
.mly1qughib{justify-content:space-between}
|
|
309
311
|
.mlylqzeqv{justify-content:start}
|
|
@@ -336,6 +338,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
336
338
|
.mly1so62im{will-change:transform}
|
|
337
339
|
.mly1vvkbs{word-wrap:break-word}
|
|
338
340
|
.mly35i7{writing-mode:sideways-lr}
|
|
341
|
+
.mly1ja2u2z{z-index:0}
|
|
339
342
|
.mly1vjfegm{z-index:1}
|
|
340
343
|
.mly11uqc5h{z-index:100}
|
|
341
344
|
.mlyhtitgo{z-index:2}
|
|
@@ -375,6 +378,7 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
375
378
|
.mlydk7pt{height:8px}
|
|
376
379
|
.mlylo07zb{height:90px}
|
|
377
380
|
.mlyt7dq6l{height:auto}
|
|
381
|
+
.mly1ktj5wk{height:calc(100% - 8px)}
|
|
378
382
|
.mlyu96u03{left:0}
|
|
379
383
|
.mly12nagc{margin-bottom:4px}
|
|
380
384
|
.mlyu06os2{margin-bottom:5px}
|
|
@@ -462,36 +466,3 @@ html[dir='rtl'] .mly17fq3gk{box-shadow:0 2px 12px 0 rgba(0,0,0,.1), 0 1px 2px 0
|
|
|
462
466
|
div[data-radix-popper-content-wrapper] {
|
|
463
467
|
z-index: 100 !important;
|
|
464
468
|
}
|
|
465
|
-
.malloy-render_result-wrapper malloy-render::part(table-container) {
|
|
466
|
-
width: 100%;
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
.malloy-render_result-wrapper {
|
|
470
|
-
height: 100%;
|
|
471
|
-
position: 'relative';
|
|
472
|
-
z-index: 0;
|
|
473
|
-
overflow: hidden;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.malloy-tooltip {
|
|
477
|
-
background: rgba(255, 255, 255, 0.95);
|
|
478
|
-
padding: 8px;
|
|
479
|
-
border-radius: 4px;
|
|
480
|
-
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
|
|
481
|
-
height: fit-content;
|
|
482
|
-
width: fit-content;
|
|
483
|
-
transform: translate(10px, 10px);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.malloy-tooltip--table {
|
|
487
|
-
th,
|
|
488
|
-
td {
|
|
489
|
-
text-wrap: nowrap;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
th {
|
|
493
|
-
text-align: left;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
font-size: 12px;
|
|
497
|
-
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
2
|
import { SubmittedQuery } from './SubmittedQuery';
|
|
3
|
-
import './result_display.css';
|
|
4
|
-
import '@malloydata/render/webcomponent';
|
|
5
|
-
import type { MalloyRenderProps } from '@malloydata/render';
|
|
6
|
-
declare global {
|
|
7
|
-
interface HTMLElementTagNameMap {
|
|
8
|
-
'malloy-render': HTMLElement & MalloyRenderProps;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
3
|
export interface DrillData {
|
|
12
4
|
stableQuery: Malloy.Query | undefined;
|
|
13
5
|
stableDrillClauses: Malloy.DrillOperation[] | undefined;
|
|
@@ -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' | 'not_before';
|
|
5
5
|
export interface DateTimeFilterCoreProps {
|
|
6
6
|
filter: TemporalFilter | null;
|
|
7
7
|
setFilter: (filter: TemporalFilter) => void;
|
|
@@ -71,6 +71,12 @@ export declare const ICON_MAP: {
|
|
|
71
71
|
desc?: string;
|
|
72
72
|
descId?: string;
|
|
73
73
|
}>;
|
|
74
|
+
readonly gear: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
75
|
+
title?: string;
|
|
76
|
+
titleId?: string;
|
|
77
|
+
desc?: string;
|
|
78
|
+
descId?: string;
|
|
79
|
+
}>;
|
|
74
80
|
readonly info: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
75
81
|
title?: string;
|
|
76
82
|
titleId?: string;
|
|
@@ -251,6 +257,12 @@ export declare const ICON_MAP: {
|
|
|
251
257
|
desc?: string;
|
|
252
258
|
descId?: string;
|
|
253
259
|
}>;
|
|
260
|
+
readonly viz_bar: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
261
|
+
title?: string;
|
|
262
|
+
titleId?: string;
|
|
263
|
+
desc?: string;
|
|
264
|
+
descId?: string;
|
|
265
|
+
}>;
|
|
254
266
|
readonly viz_boolean: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
255
267
|
title?: string;
|
|
256
268
|
titleId?: string;
|
|
@@ -305,6 +317,12 @@ export declare const ICON_MAP: {
|
|
|
305
317
|
desc?: string;
|
|
306
318
|
descId?: string;
|
|
307
319
|
}>;
|
|
320
|
+
readonly viz_line: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
321
|
+
title?: string;
|
|
322
|
+
titleId?: string;
|
|
323
|
+
desc?: string;
|
|
324
|
+
descId?: string;
|
|
325
|
+
}>;
|
|
308
326
|
readonly viz_link: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
309
327
|
title?: string;
|
|
310
328
|
titleId?: string;
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
import { Tag } from '@malloydata/malloy-tag';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const RENDERER_PREFIX = "# ";
|
|
3
|
+
export declare const VIZ_RENDERERS: VizName[];
|
|
4
|
+
export declare const QUERY_RENDERERS: QueryRendererName[];
|
|
5
|
+
export declare const ATOMIC_RENDERERS: AtomicRendererName[];
|
|
4
6
|
export declare const RENDERERS: RendererName[];
|
|
5
|
-
export type
|
|
7
|
+
export type VizName = 'table' | 'bar' | 'dashboard' | 'json' | 'line' | 'list' | 'list_detail' | 'point_map' | 'scatter_chart' | 'segment_map' | 'shape_map';
|
|
8
|
+
export type QueryRendererName = 'table' | 'bar_chart' | 'dashboard' | 'json' | 'line_chart' | 'list' | 'list_detail' | 'point_map' | 'scatter_chart' | 'segment_map' | 'shape_map';
|
|
9
|
+
export type AtomicRendererName = 'number' | 'boolean' | 'currency' | 'image' | 'url' | 'percent' | 'text' | 'time';
|
|
10
|
+
export type RendererName = QueryRendererName | AtomicRendererName;
|
|
6
11
|
export declare function tagToRenderer(tag: Tag | undefined): RendererName | null;
|
|
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>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@malloydata/malloy-explorer",
|
|
3
|
-
"version": "0.0.285-
|
|
3
|
+
"version": "0.0.285-dev250611150446",
|
|
4
4
|
"description": "Malloy visual query builder",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -113,12 +113,12 @@
|
|
|
113
113
|
"vite-plugin-svgr": "^4.3.0"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@malloydata/malloy-filter": ">=
|
|
117
|
-
"@malloydata/malloy-interfaces": ">=
|
|
118
|
-
"@malloydata/malloy-query-builder": ">=
|
|
119
|
-
"@malloydata/malloy-tag": ">=
|
|
120
|
-
"@malloydata/render": ">=
|
|
121
|
-
"react": ">=
|
|
122
|
-
"react-dom": ">=
|
|
116
|
+
"@malloydata/malloy-filter": ">=0.0.291",
|
|
117
|
+
"@malloydata/malloy-interfaces": ">=0.0.291",
|
|
118
|
+
"@malloydata/malloy-query-builder": ">=0.0.291",
|
|
119
|
+
"@malloydata/malloy-tag": ">=0.0.291",
|
|
120
|
+
"@malloydata/render": ">=0.0.291",
|
|
121
|
+
"react": ">=19.0.0",
|
|
122
|
+
"react-dom": ">=19.0.0"
|
|
123
123
|
}
|
|
124
124
|
}
|
package/vite.config.mts
CHANGED
|
@@ -38,7 +38,6 @@ export default defineConfig({
|
|
|
38
38
|
'@malloydata/malloy-interfaces',
|
|
39
39
|
'@malloydata/malloy-query-builder',
|
|
40
40
|
'@malloydata/render',
|
|
41
|
-
'@malloydata/render/webcomponent',
|
|
42
41
|
],
|
|
43
42
|
output: {
|
|
44
43
|
manualChunks: _id => {
|
|
@@ -60,7 +59,6 @@ export default defineConfig({
|
|
|
60
59
|
'@malloydata/malloy-filter',
|
|
61
60
|
'@malloydata/malloy-interfaces',
|
|
62
61
|
'@malloydata/malloy-query-builder',
|
|
63
|
-
'@malloydata/render/webcomponent',
|
|
64
62
|
],
|
|
65
63
|
},
|
|
66
64
|
});
|