@vizzly/dashboard 0.15.0-dev-d3bd0732844c4da88caabbe74f25416da8b21c02 → 0.15.0-dev-c5f05b4321b2456a7b799661438c1d9b99f79de4
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/dashboard.esm.js
CHANGED
|
@@ -26770,7 +26770,16 @@ var useQueryEffect = function useQueryEffect(queries, runQueriesCallback, filter
|
|
|
26770
26770
|
var _useVariablesInDataSe = useVariablesInDataSet(dataSet, queries, variables),
|
|
26771
26771
|
noOfVariableChanges = _useVariablesInDataSe.noOfVariableChanges;
|
|
26772
26772
|
var watchCustomFieldChangesKey = watchDataSetFieldChanges(dataSet, queries);
|
|
26773
|
+
var hasMeasures = function () {
|
|
26774
|
+
if (typeof queries === 'object' && queries !== null && 'measure' in queries) {
|
|
26775
|
+
return Array.isArray(queries.measure) && queries.measure.length > 0;
|
|
26776
|
+
}
|
|
26777
|
+
return false;
|
|
26778
|
+
}();
|
|
26773
26779
|
useEffect(function () {
|
|
26780
|
+
if (queriesAreChanging) {
|
|
26781
|
+
setResults([]);
|
|
26782
|
+
}
|
|
26774
26783
|
var abortController = new AbortController();
|
|
26775
26784
|
var fetch$1 = /*#__PURE__*/function () {
|
|
26776
26785
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
@@ -26782,36 +26791,30 @@ var useQueryEffect = function useQueryEffect(queries, runQueriesCallback, filter
|
|
|
26782
26791
|
_context.next = 3;
|
|
26783
26792
|
break;
|
|
26784
26793
|
}
|
|
26785
|
-
|
|
26794
|
+
setQueriesAreChanging(false);
|
|
26786
26795
|
return _context.abrupt("return");
|
|
26787
26796
|
case 3:
|
|
26788
26797
|
setQueriesAreChanging(true);
|
|
26789
|
-
|
|
26798
|
+
if (hasMeasures) {
|
|
26799
|
+
setResults([]);
|
|
26800
|
+
}
|
|
26801
|
+
_context.next = 7;
|
|
26790
26802
|
return fetch(queries, runQueriesCallback, abortController.signal, filterConfig);
|
|
26791
|
-
case
|
|
26803
|
+
case 7:
|
|
26792
26804
|
hasResults = _context.sent;
|
|
26793
|
-
if (
|
|
26794
|
-
|
|
26795
|
-
|
|
26796
|
-
|
|
26797
|
-
|
|
26798
|
-
|
|
26799
|
-
|
|
26800
|
-
setResults(
|
|
26801
|
-
|
|
26802
|
-
|
|
26803
|
-
|
|
26804
|
-
if (!Array.isArray(queries)) {
|
|
26805
|
-
_context.next = 14;
|
|
26806
|
-
break;
|
|
26805
|
+
if (hasResults) {
|
|
26806
|
+
if (!abortController.signal.aborted) {
|
|
26807
|
+
// Only set the results if the signal was not aborted...
|
|
26808
|
+
setResults(hasResults);
|
|
26809
|
+
}
|
|
26810
|
+
setQueriesAreChanging(false);
|
|
26811
|
+
} else {
|
|
26812
|
+
setResults(Array.isArray(queries) ? queries.map(function () {
|
|
26813
|
+
return null;
|
|
26814
|
+
}) : [null]);
|
|
26815
|
+
setQueriesAreChanging(false);
|
|
26807
26816
|
}
|
|
26808
|
-
|
|
26809
|
-
return null;
|
|
26810
|
-
}));
|
|
26811
|
-
return _context.abrupt("return");
|
|
26812
|
-
case 14:
|
|
26813
|
-
setResults([null]);
|
|
26814
|
-
case 15:
|
|
26817
|
+
case 9:
|
|
26815
26818
|
case "end":
|
|
26816
26819
|
return _context.stop();
|
|
26817
26820
|
}
|
|
@@ -26823,7 +26826,7 @@ var useQueryEffect = function useQueryEffect(queries, runQueriesCallback, filter
|
|
|
26823
26826
|
}();
|
|
26824
26827
|
fetch$1();
|
|
26825
26828
|
return function () {
|
|
26826
|
-
abortController.abort('useQueryEffect unmounted');
|
|
26829
|
+
return abortController.abort('useQueryEffect unmounted');
|
|
26827
26830
|
};
|
|
26828
26831
|
}, [JSON.stringify({
|
|
26829
26832
|
componentType: componentType,
|
|
@@ -39471,12 +39474,12 @@ var PieChart$3 = function PieChart(props) {
|
|
|
39471
39474
|
setDrilldownSelections([]);
|
|
39472
39475
|
}
|
|
39473
39476
|
}, [JSON.stringify(props.component.attributes)]);
|
|
39474
|
-
var
|
|
39477
|
+
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
39475
39478
|
localFilters: localFilters,
|
|
39476
39479
|
globalFilters: props.globalFilters
|
|
39477
|
-
}, props.
|
|
39478
|
-
queriesAreChanging =
|
|
39479
|
-
results =
|
|
39480
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
39481
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
39482
|
+
results = _useComponentEffect.results;
|
|
39480
39483
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
39481
39484
|
return setAttributes(newAttributes);
|
|
39482
39485
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig),
|
|
@@ -57027,6 +57030,9 @@ var Component = function Component(props) {
|
|
|
57027
57030
|
dataSet: dataSet,
|
|
57028
57031
|
runQueriesCallback: props.runQueriesCallback,
|
|
57029
57032
|
component: props.component,
|
|
57033
|
+
updateComponentAttributes: function updateComponentAttributes(newAttributes) {
|
|
57034
|
+
return _updateComponentAttributes(newAttributes);
|
|
57035
|
+
},
|
|
57030
57036
|
globalFilters: dashboard.globalFilters,
|
|
57031
57037
|
dashboardBehaviour: dashboardBehaviour,
|
|
57032
57038
|
library: props == null ? void 0 : props.library,
|
|
@@ -44,7 +44,7 @@ export declare type LineChartV2Props = ChartPropsWithPartialAttributes<Component
|
|
|
44
44
|
export declare type AreaChartV2Props = ChartPropsWithPartialAttributes<ComponentType.AreaChartV2Attributes> & ChartPropsWithAttributesUpdate<ComponentType.AreaChartV2Attributes>;
|
|
45
45
|
export declare type BarChartV2Props = ChartPropsWithPartialAttributes<ComponentType.BarChartV2Attributes> & ChartPropsWithAttributesUpdate<ComponentType.BarChartV2Attributes>;
|
|
46
46
|
export declare type RadarChartProps = ChartPropsWithPartialAttributes<ComponentType.RadarChartAttributes> & ChartPropsWithAttributesUpdate<ComponentType.RadarChartAttributes>;
|
|
47
|
-
export declare type PieChartProps = ChartPropsWithPartialAttributes<ComponentType.PieChartAttributes> & {
|
|
47
|
+
export declare type PieChartProps = ChartPropsWithPartialAttributes<ComponentType.PieChartAttributes> & ChartPropsWithAttributesUpdate<ComponentType.PieChartAttributes> & {
|
|
48
48
|
editor?: boolean;
|
|
49
49
|
};
|
|
50
50
|
export declare type SunburstChartProps = ChartPropsWithPartialAttributes<ComponentType.SunburstChartAttributes> & {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.15.0-dev-
|
|
4
|
+
"version": "0.15.0-dev-c5f05b4321b2456a7b799661438c1d9b99f79de4",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"module": "./dist/dashboard.esm.js",
|