@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
package/dist/esm/index.js
CHANGED
|
@@ -3406,7 +3406,8 @@ function MalloyExplorerProvider({
|
|
|
3406
3406
|
focusedNestViewPath,
|
|
3407
3407
|
onFocusedNestViewPathChange,
|
|
3408
3408
|
children,
|
|
3409
|
-
topValues
|
|
3409
|
+
topValues,
|
|
3410
|
+
onDrill
|
|
3410
3411
|
}) {
|
|
3411
3412
|
const rootQuery = useQueryBuilder(source, query);
|
|
3412
3413
|
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
@@ -3419,7 +3420,8 @@ function MalloyExplorerProvider({
|
|
|
3419
3420
|
source,
|
|
3420
3421
|
rootQuery,
|
|
3421
3422
|
setQuery: onQueryChange,
|
|
3422
|
-
topValues
|
|
3423
|
+
topValues,
|
|
3424
|
+
onDrill
|
|
3423
3425
|
},
|
|
3424
3426
|
children
|
|
3425
3427
|
})
|
|
@@ -31202,7 +31204,8 @@ function ValueList({
|
|
|
31202
31204
|
search,
|
|
31203
31205
|
fieldPath,
|
|
31204
31206
|
ref,
|
|
31205
|
-
customStyle
|
|
31207
|
+
customStyle,
|
|
31208
|
+
showPath = true
|
|
31206
31209
|
}) {
|
|
31207
31210
|
const {
|
|
31208
31211
|
searchResults
|
|
@@ -31218,12 +31221,12 @@ function ValueList({
|
|
|
31218
31221
|
onClick: () => onClick(value),
|
|
31219
31222
|
children: [/* @__PURE__ */ jsx(Value, {
|
|
31220
31223
|
value
|
|
31221
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
31224
|
+
}), showPath ? /* @__PURE__ */ jsx("div", {
|
|
31222
31225
|
...{
|
|
31223
31226
|
className: "mly1jwwhvr"
|
|
31224
31227
|
},
|
|
31225
31228
|
children: value.fieldName
|
|
31226
|
-
})]
|
|
31229
|
+
}) : null]
|
|
31227
31230
|
}, value.fieldName + ":" + value.fieldValue)) : search ? /* @__PURE__ */ jsx("div", {
|
|
31228
31231
|
..._stylex.props(addMenuStyles.item),
|
|
31229
31232
|
"data-disabled": "true",
|
|
@@ -31417,7 +31420,8 @@ const StringFilterCore = ({
|
|
|
31417
31420
|
setSearchValue("");
|
|
31418
31421
|
}
|
|
31419
31422
|
},
|
|
31420
|
-
customStyle: styles$i.valueList
|
|
31423
|
+
customStyle: styles$i.valueList,
|
|
31424
|
+
showPath: false
|
|
31421
31425
|
})
|
|
31422
31426
|
})]
|
|
31423
31427
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsx(StringEditor, {
|
|
@@ -35658,14 +35662,23 @@ function RenderedResult({
|
|
|
35658
35662
|
}) {
|
|
35659
35663
|
const [renderer, setRenderer] = useState();
|
|
35660
35664
|
const {
|
|
35665
|
+
onDrill,
|
|
35661
35666
|
setQuery
|
|
35662
35667
|
} = useContext(QueryEditorContext);
|
|
35663
35668
|
useEffect(() => {
|
|
35664
35669
|
const renderer2 = document.createElement("malloy-render");
|
|
35665
35670
|
renderer2.malloyResult = result;
|
|
35666
35671
|
renderer2.onDrill = ({
|
|
35667
|
-
stableQuery
|
|
35672
|
+
stableQuery,
|
|
35673
|
+
stableDrillClauses
|
|
35668
35674
|
}) => {
|
|
35675
|
+
if (onDrill) {
|
|
35676
|
+
onDrill({
|
|
35677
|
+
stableQuery,
|
|
35678
|
+
stableDrillClauses
|
|
35679
|
+
});
|
|
35680
|
+
return;
|
|
35681
|
+
}
|
|
35669
35682
|
const rootQuery = new ASTQuery({
|
|
35670
35683
|
query: stableQuery,
|
|
35671
35684
|
source
|
|
@@ -35676,7 +35689,7 @@ function RenderedResult({
|
|
|
35676
35689
|
enableDrill: true
|
|
35677
35690
|
};
|
|
35678
35691
|
setRenderer(renderer2);
|
|
35679
|
-
}, [result, source, setQuery]);
|
|
35692
|
+
}, [onDrill, result, source, setQuery]);
|
|
35680
35693
|
if (renderer) {
|
|
35681
35694
|
return /* @__PURE__ */ jsx(DOMElement, {
|
|
35682
35695
|
element: renderer,
|