@malloydata/malloy-explorer 0.0.284-dev250528183401 → 0.0.285-dev250529220510
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 +5 -0
- package/dist/cjs/index.cjs +21 -8
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +21 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/MalloyExplorerProvider.d.ts +5 -1
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +2 -1
- package/dist/types/contexts/QueryEditorContext.d.ts +4 -0
- package/package.json +6 -6
|
@@ -9,6 +9,11 @@ declare export interface MalloyExplorerProviderProps {
|
|
|
9
9
|
onFocusedNestViewPathChange: (path: string[]) => void;
|
|
10
10
|
children: ReactNode | ReactNode[];
|
|
11
11
|
topValues?: SearchValueMapResult[];
|
|
12
|
+
onDrill?: ($$param0$: {
|
|
13
|
+
stableQuery: Malloy.Query | void,
|
|
14
|
+
stableDrillClauses: Malloy.DrillOperation[] | void,
|
|
15
|
+
...
|
|
16
|
+
}) => void;
|
|
12
17
|
}
|
|
13
18
|
declare export function MalloyExplorerProvider(
|
|
14
19
|
$$param0$: MalloyExplorerProviderProps,
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3424,7 +3424,8 @@ function MalloyExplorerProvider({
|
|
|
3424
3424
|
focusedNestViewPath,
|
|
3425
3425
|
onFocusedNestViewPathChange,
|
|
3426
3426
|
children,
|
|
3427
|
-
topValues
|
|
3427
|
+
topValues,
|
|
3428
|
+
onDrill
|
|
3428
3429
|
}) {
|
|
3429
3430
|
const rootQuery = useQueryBuilder(source, query);
|
|
3430
3431
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipProvider, {
|
|
@@ -3437,7 +3438,8 @@ function MalloyExplorerProvider({
|
|
|
3437
3438
|
source,
|
|
3438
3439
|
rootQuery,
|
|
3439
3440
|
setQuery: onQueryChange,
|
|
3440
|
-
topValues
|
|
3441
|
+
topValues,
|
|
3442
|
+
onDrill
|
|
3441
3443
|
},
|
|
3442
3444
|
children
|
|
3443
3445
|
})
|
|
@@ -31220,7 +31222,8 @@ function ValueList({
|
|
|
31220
31222
|
search,
|
|
31221
31223
|
fieldPath,
|
|
31222
31224
|
ref,
|
|
31223
|
-
customStyle
|
|
31225
|
+
customStyle,
|
|
31226
|
+
showPath = true
|
|
31224
31227
|
}) {
|
|
31225
31228
|
const {
|
|
31226
31229
|
searchResults
|
|
@@ -31236,12 +31239,12 @@ function ValueList({
|
|
|
31236
31239
|
onClick: () => onClick(value),
|
|
31237
31240
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Value, {
|
|
31238
31241
|
value
|
|
31239
|
-
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31242
|
+
}), showPath ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31240
31243
|
...{
|
|
31241
31244
|
className: "mly1jwwhvr"
|
|
31242
31245
|
},
|
|
31243
31246
|
children: value.fieldName
|
|
31244
|
-
})]
|
|
31247
|
+
}) : null]
|
|
31245
31248
|
}, value.fieldName + ":" + value.fieldValue)) : search ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31246
31249
|
..._stylex.props(addMenuStyles.item),
|
|
31247
31250
|
"data-disabled": "true",
|
|
@@ -31435,7 +31438,8 @@ const StringFilterCore = ({
|
|
|
31435
31438
|
setSearchValue("");
|
|
31436
31439
|
}
|
|
31437
31440
|
},
|
|
31438
|
-
customStyle: styles$i.valueList
|
|
31441
|
+
customStyle: styles$i.valueList,
|
|
31442
|
+
showPath: false
|
|
31439
31443
|
})
|
|
31440
31444
|
})]
|
|
31441
31445
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsxRuntime.jsx(StringEditor, {
|
|
@@ -35676,14 +35680,23 @@ function RenderedResult({
|
|
|
35676
35680
|
}) {
|
|
35677
35681
|
const [renderer, setRenderer] = React.useState();
|
|
35678
35682
|
const {
|
|
35683
|
+
onDrill,
|
|
35679
35684
|
setQuery
|
|
35680
35685
|
} = React.useContext(QueryEditorContext);
|
|
35681
35686
|
React.useEffect(() => {
|
|
35682
35687
|
const renderer2 = document.createElement("malloy-render");
|
|
35683
35688
|
renderer2.malloyResult = result;
|
|
35684
35689
|
renderer2.onDrill = ({
|
|
35685
|
-
stableQuery
|
|
35690
|
+
stableQuery,
|
|
35691
|
+
stableDrillClauses
|
|
35686
35692
|
}) => {
|
|
35693
|
+
if (onDrill) {
|
|
35694
|
+
onDrill({
|
|
35695
|
+
stableQuery,
|
|
35696
|
+
stableDrillClauses
|
|
35697
|
+
});
|
|
35698
|
+
return;
|
|
35699
|
+
}
|
|
35687
35700
|
const rootQuery = new QB.ASTQuery({
|
|
35688
35701
|
query: stableQuery,
|
|
35689
35702
|
source
|
|
@@ -35694,7 +35707,7 @@ function RenderedResult({
|
|
|
35694
35707
|
enableDrill: true
|
|
35695
35708
|
};
|
|
35696
35709
|
setRenderer(renderer2);
|
|
35697
|
-
}, [result, source, setQuery]);
|
|
35710
|
+
}, [onDrill, result, source, setQuery]);
|
|
35698
35711
|
if (renderer) {
|
|
35699
35712
|
return /* @__PURE__ */ jsxRuntime.jsx(DOMElement, {
|
|
35700
35713
|
element: renderer,
|