@vizzly/dashboard 0.15.0-dev-68f3aa73261b3c9e5fbc59ed0692867816aab61a → 0.15.0-dev-e5d1984979f104ca58fe63facbc70695fbc48fa1
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.cjs.development.js +199 -405
- package/dist/dashboard.cjs.production.min.js +1 -1
- package/dist/dashboard.esm.js +199 -405
- package/dist/shared-logic/src/Component/types.d.ts +0 -1
- package/dist/shared-ui/src/api/useQueryEffect.d.ts +2 -1
- package/dist/shared-ui/src/components/Component/types.d.ts +0 -2
- package/dist/shared-ui/src/components/Component.d.ts +0 -2
- package/dist/shared-ui/src/components/Studio/StudioApp/Cell.d.ts +0 -2
- package/dist/shared-ui/src/components/useComponentEffect.d.ts +2 -2
- package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +1 -17
- package/dist/shared-ui/src/library/Editor/useEditor.d.ts +0 -2
- package/dist/shared-ui/src/library/Library/ComponentInLibrary.d.ts +0 -1
- package/dist/shared-ui/src/library/Library/Library.d.ts +0 -4
- package/dist/shared-ui/src/library/Library/types.d.ts +0 -2
- package/package.json +1 -1
|
@@ -14567,7 +14567,6 @@ var initial = function initial(attributes) {
|
|
|
14567
14567
|
return {
|
|
14568
14568
|
attributes: attributes,
|
|
14569
14569
|
localFilters: [],
|
|
14570
|
-
results: [],
|
|
14571
14570
|
colSpan: POPULATE_ONE_CELL,
|
|
14572
14571
|
reports: []
|
|
14573
14572
|
};
|
|
@@ -15011,10 +15010,12 @@ var load$2 = function load$1(dumped, componentInterfaceConfig) {
|
|
|
15011
15010
|
delete dumped['addOns'];
|
|
15012
15011
|
// @ts-ignore
|
|
15013
15012
|
delete attributes['addOns'];
|
|
15013
|
+
|
|
15014
|
+
// @ts-ignore
|
|
15015
|
+
delete attributes['results'];
|
|
15014
15016
|
return _extends({}, dumped, {
|
|
15015
15017
|
localFilters: localFilters,
|
|
15016
|
-
attributes: attributes
|
|
15017
|
-
results: []
|
|
15018
|
+
attributes: attributes
|
|
15018
15019
|
});
|
|
15019
15020
|
};
|
|
15020
15021
|
var dump$2 = function dump$1(hydrated) {
|
|
@@ -15041,7 +15042,6 @@ var saveable = function saveable(component, protectedComponent) {
|
|
|
15041
15042
|
}),
|
|
15042
15043
|
localFilters: (_component$localFilte = component.localFilters) != null ? _component$localFilte : [],
|
|
15043
15044
|
colSpan: 1,
|
|
15044
|
-
results: [],
|
|
15045
15045
|
reports: []
|
|
15046
15046
|
};
|
|
15047
15047
|
};
|
|
@@ -23075,18 +23075,6 @@ var pickComponentFromLibraryForDisplay = function pickComponentFromLibraryForDis
|
|
|
23075
23075
|
pickFromComponentLibrary: null
|
|
23076
23076
|
});
|
|
23077
23077
|
};
|
|
23078
|
-
var setResultsForComponentInDisplay = function setResultsForComponentInDisplay(state, action) {
|
|
23079
|
-
var results = action.results,
|
|
23080
|
-
rowIndex = action.rowIndex,
|
|
23081
|
-
cellIndex = action.cellIndex;
|
|
23082
|
-
var currentComponent = state.dashboard.display[rowIndex].components[cellIndex];
|
|
23083
|
-
if (!currentComponent) throw 'We can only set results on an existing component on the dashboard.';
|
|
23084
|
-
var newComponent = _extends({}, currentComponent, {
|
|
23085
|
-
results: results
|
|
23086
|
-
});
|
|
23087
|
-
var newState = _setComponentInDisplayHelper(state, newComponent, rowIndex, cellIndex);
|
|
23088
|
-
return _extends({}, newState);
|
|
23089
|
-
};
|
|
23090
23078
|
var updateComponentLibraryAttributes = function updateComponentLibraryAttributes(state, action) {
|
|
23091
23079
|
var libraryIndex = action.libraryIndex,
|
|
23092
23080
|
attributes = action.attributes;
|
|
@@ -23100,31 +23088,6 @@ var updateComponentLibraryAttributes = function updateComponentLibraryAttributes
|
|
|
23100
23088
|
})
|
|
23101
23089
|
});
|
|
23102
23090
|
};
|
|
23103
|
-
var setResultsForComponentInEditor = function setResultsForComponentInEditor(state, action) {
|
|
23104
|
-
if (!state.componentEditor) throw 'Cannot set results for a closed editor.';
|
|
23105
|
-
if (!state.componentEditor.component) throw 'Cannot set results for a non-existant component in editor.';
|
|
23106
|
-
var results = action.results;
|
|
23107
|
-
return _extends({}, state, {
|
|
23108
|
-
componentEditor: _extends({}, state.componentEditor, {
|
|
23109
|
-
component: _extends({}, state.componentEditor.component, {
|
|
23110
|
-
results: results
|
|
23111
|
-
})
|
|
23112
|
-
})
|
|
23113
|
-
});
|
|
23114
|
-
};
|
|
23115
|
-
var setResultsForComponentInLibrary = function setResultsForComponentInLibrary(state, action) {
|
|
23116
|
-
var libraryIndex = action.libraryIndex,
|
|
23117
|
-
results = action.results;
|
|
23118
|
-
var componentLibrary = [].concat(state.dashboard.componentLibrary);
|
|
23119
|
-
componentLibrary[libraryIndex] = _extends({}, componentLibrary[libraryIndex], {
|
|
23120
|
-
results: results
|
|
23121
|
-
});
|
|
23122
|
-
return _extends({}, state, {
|
|
23123
|
-
dashboard: _extends({}, state.dashboard, {
|
|
23124
|
-
componentLibrary: componentLibrary
|
|
23125
|
-
})
|
|
23126
|
-
});
|
|
23127
|
-
};
|
|
23128
23091
|
var clearModal = function clearModal(state, _action) {
|
|
23129
23092
|
return _extends({}, state, {
|
|
23130
23093
|
pickFromComponentLibrary: null,
|
|
@@ -23520,12 +23483,6 @@ var reducer = function reducer(pipelineTransformationOptions) {
|
|
|
23520
23483
|
return clearModal(state);
|
|
23521
23484
|
case 'updateEditorComponent':
|
|
23522
23485
|
return updateEditorComponent(state, action);
|
|
23523
|
-
case 'setResultsForComponentInDisplay':
|
|
23524
|
-
return setResultsForComponentInDisplay(state, action);
|
|
23525
|
-
case 'setResultsForComponentInLibrary':
|
|
23526
|
-
return setResultsForComponentInLibrary(state, action);
|
|
23527
|
-
case 'setResultsForComponentInEditor':
|
|
23528
|
-
return setResultsForComponentInEditor(state, action);
|
|
23529
23486
|
case 'pickComponentFromLibraryForDisplay':
|
|
23530
23487
|
return pickComponentFromLibraryForDisplay(state, action);
|
|
23531
23488
|
case 'setDashboard':
|
|
@@ -26102,9 +26059,16 @@ var watchDataSetFieldChanges = function watchDataSetFieldChanges(dataSet, querya
|
|
|
26102
26059
|
// Custom fields are the only ones that can have their definition changed. So
|
|
26103
26060
|
// we only need to watch them.
|
|
26104
26061
|
var watchedCustomFields = watchFields.flatMap(function (fieldId) {
|
|
26105
|
-
|
|
26106
|
-
|
|
26107
|
-
|
|
26062
|
+
try {
|
|
26063
|
+
var dataSetField = findField(dataSet, fieldId);
|
|
26064
|
+
if (isCustomField(dataSetField)) return [dataSetField];
|
|
26065
|
+
return [];
|
|
26066
|
+
} catch (err) {
|
|
26067
|
+
if (err instanceof FieldNotFoundInDataSet) {
|
|
26068
|
+
return [];
|
|
26069
|
+
}
|
|
26070
|
+
throw err;
|
|
26071
|
+
}
|
|
26108
26072
|
});
|
|
26109
26073
|
return JSON.stringify(watchedCustomFields);
|
|
26110
26074
|
} else {
|
|
@@ -26264,78 +26228,70 @@ var useVariablesInDataSet = function useVariablesInDataSet(dataSet, queryable, v
|
|
|
26264
26228
|
// How to make sure the queries run when a field in a data set has been changed.
|
|
26265
26229
|
// need to pass in the data sets here
|
|
26266
26230
|
|
|
26267
|
-
var useQueryEffect = function useQueryEffect(queries, runQueriesCallback,
|
|
26268
|
-
var _useState = React.useState(
|
|
26269
|
-
|
|
26270
|
-
|
|
26231
|
+
var useQueryEffect = function useQueryEffect(queries, runQueriesCallback, filterConfig, dataSet, componentType, variables) {
|
|
26232
|
+
var _useState = React.useState([]),
|
|
26233
|
+
results = _useState[0],
|
|
26234
|
+
setResults = _useState[1];
|
|
26235
|
+
var _useState2 = React.useState(false),
|
|
26236
|
+
queriesAreChanging = _useState2[0],
|
|
26237
|
+
setQueriesAreChanging = _useState2[1];
|
|
26271
26238
|
var _useVariablesInDataSe = useVariablesInDataSet(dataSet, queries, variables),
|
|
26272
26239
|
noOfVariableChanges = _useVariablesInDataSe.noOfVariableChanges;
|
|
26273
|
-
|
|
26274
|
-
|
|
26275
|
-
|
|
26276
|
-
|
|
26277
|
-
var
|
|
26278
|
-
var
|
|
26279
|
-
|
|
26280
|
-
|
|
26281
|
-
|
|
26282
|
-
|
|
26283
|
-
|
|
26284
|
-
|
|
26285
|
-
|
|
26286
|
-
|
|
26287
|
-
|
|
26288
|
-
|
|
26289
|
-
|
|
26290
|
-
if
|
|
26291
|
-
|
|
26292
|
-
|
|
26293
|
-
|
|
26240
|
+
var watchCustomFieldChangesKey = watchDataSetFieldChanges(dataSet, queries);
|
|
26241
|
+
React.useEffect(function () {
|
|
26242
|
+
var abortController = new AbortController();
|
|
26243
|
+
var fetch$1 = /*#__PURE__*/function () {
|
|
26244
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
26245
|
+
var hasResults;
|
|
26246
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
26247
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26248
|
+
case 0:
|
|
26249
|
+
setQueriesAreChanging(true);
|
|
26250
|
+
_context.next = 3;
|
|
26251
|
+
return fetch(queries, runQueriesCallback, abortController.signal, filterConfig);
|
|
26252
|
+
case 3:
|
|
26253
|
+
hasResults = _context.sent;
|
|
26254
|
+
if (hasResults) {
|
|
26255
|
+
setQueriesAreChanging(false);
|
|
26256
|
+
if (!abortController.signal.aborted) {
|
|
26257
|
+
// Only set the results if the signal was not aborted...
|
|
26258
|
+
setResults(hasResults);
|
|
26259
|
+
}
|
|
26260
|
+
} else {
|
|
26261
|
+
if (Array.isArray(queries)) {
|
|
26262
|
+
setResults(queries.map(function (_q) {
|
|
26263
|
+
return null;
|
|
26264
|
+
}));
|
|
26294
26265
|
} else {
|
|
26295
|
-
|
|
26296
|
-
onResultsCallback(queries.map(function (_q) {
|
|
26297
|
-
return null;
|
|
26298
|
-
}));
|
|
26299
|
-
} else {
|
|
26300
|
-
onResultsCallback([null]);
|
|
26301
|
-
}
|
|
26266
|
+
setResults([null]);
|
|
26302
26267
|
}
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
|
|
26306
|
-
|
|
26307
|
-
}
|
|
26308
|
-
})
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
}();
|
|
26313
|
-
fetch$1();
|
|
26314
|
-
return function () {
|
|
26315
|
-
abortController.abort('useQueryEffect unmounted');
|
|
26268
|
+
}
|
|
26269
|
+
case 5:
|
|
26270
|
+
case "end":
|
|
26271
|
+
return _context.stop();
|
|
26272
|
+
}
|
|
26273
|
+
}, _callee);
|
|
26274
|
+
}));
|
|
26275
|
+
return function fetch() {
|
|
26276
|
+
return _ref.apply(this, arguments);
|
|
26316
26277
|
};
|
|
26317
|
-
}
|
|
26318
|
-
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
filterConfig: filterConfig,
|
|
26322
|
-
watchCustomFieldChangesKey: watchCustomFieldChangesKey,
|
|
26323
|
-
noOfVariableChanges: noOfVariableChanges
|
|
26324
|
-
})]);
|
|
26325
|
-
return {
|
|
26326
|
-
queriesAreChanging: queriesAreChanging
|
|
26278
|
+
}();
|
|
26279
|
+
fetch$1();
|
|
26280
|
+
return function () {
|
|
26281
|
+
abortController.abort('useQueryEffect unmounted');
|
|
26327
26282
|
};
|
|
26328
|
-
}
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
|
|
26334
|
-
|
|
26335
|
-
|
|
26336
|
-
|
|
26337
|
-
|
|
26338
|
-
|
|
26283
|
+
}, [JSON.stringify({
|
|
26284
|
+
componentType: componentType,
|
|
26285
|
+
dataSetId: dataSet.id,
|
|
26286
|
+
queries: queries,
|
|
26287
|
+
filterConfig: filterConfig,
|
|
26288
|
+
watchCustomFieldChangesKey: watchCustomFieldChangesKey,
|
|
26289
|
+
noOfVariableChanges: noOfVariableChanges
|
|
26290
|
+
})]);
|
|
26291
|
+
return {
|
|
26292
|
+
results: results,
|
|
26293
|
+
queriesAreChanging: queriesAreChanging
|
|
26294
|
+
};
|
|
26339
26295
|
};
|
|
26340
26296
|
|
|
26341
26297
|
/** Fetches unique field values for a given field. */
|
|
@@ -26344,9 +26300,6 @@ var useUniqueFieldValues = function useUniqueFieldValues(dataSet, fieldId) {
|
|
|
26344
26300
|
runQueriesCallback = _useDashboardContext.runQueriesCallback;
|
|
26345
26301
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
26346
26302
|
variables = _useDashboardBehaviou.variables;
|
|
26347
|
-
var _useState = React.useState(undefined),
|
|
26348
|
-
result = _useState[0],
|
|
26349
|
-
setResult = _useState[1];
|
|
26350
26303
|
var queries = [];
|
|
26351
26304
|
var dataSetField = findField(dataSet, fieldId);
|
|
26352
26305
|
if (dataSetField.dataType == 'string[]') {
|
|
@@ -26358,10 +26311,9 @@ var useUniqueFieldValues = function useUniqueFieldValues(dataSet, fieldId) {
|
|
|
26358
26311
|
var filterQuery = buildFilterQuery(dataSet, fieldId);
|
|
26359
26312
|
queries = [filterQuery];
|
|
26360
26313
|
}
|
|
26361
|
-
useQueryEffect(queries, runQueriesCallback,
|
|
26362
|
-
|
|
26363
|
-
|
|
26364
|
-
}, {}, dataSet, undefined, variables);
|
|
26314
|
+
var _useQueryEffect = useQueryEffect(queries, runQueriesCallback, {}, dataSet, undefined, variables),
|
|
26315
|
+
_useQueryEffect$resul = _useQueryEffect.results,
|
|
26316
|
+
result = _useQueryEffect$resul[0];
|
|
26365
26317
|
return {
|
|
26366
26318
|
result: result != null ? result : null,
|
|
26367
26319
|
loading: result === undefined,
|
|
@@ -26783,7 +26735,7 @@ var useEditor = function useEditor() {
|
|
|
26783
26735
|
/* Infinite re-render loop
|
|
26784
26736
|
- When chaning dataset
|
|
26785
26737
|
- If not using default metric / grouping
|
|
26786
|
-
- Only when switching to 'Stock data' not to another dataset
|
|
26738
|
+
- Only when switching to 'Stock data' not to another dataset
|
|
26787
26739
|
*/
|
|
26788
26740
|
|
|
26789
26741
|
dispatch({
|
|
@@ -26800,12 +26752,6 @@ var useEditor = function useEditor() {
|
|
|
26800
26752
|
return _ref2.apply(this, arguments);
|
|
26801
26753
|
};
|
|
26802
26754
|
}();
|
|
26803
|
-
var setResults = function setResults(results) {
|
|
26804
|
-
dispatch({
|
|
26805
|
-
type: 'setResultsForComponentInEditor',
|
|
26806
|
-
results: results
|
|
26807
|
-
});
|
|
26808
|
-
};
|
|
26809
26755
|
var setDataSets = function setDataSets(dataSets) {
|
|
26810
26756
|
dispatch({
|
|
26811
26757
|
type: 'setDataSets',
|
|
@@ -26877,7 +26823,6 @@ var useEditor = function useEditor() {
|
|
|
26877
26823
|
numberFormatOptions: numberFormatOptions,
|
|
26878
26824
|
setAttributes: setAttributes,
|
|
26879
26825
|
setPartialAttributes: setPartialAttributes,
|
|
26880
|
-
setResults: setResults,
|
|
26881
26826
|
mode: mode,
|
|
26882
26827
|
origin: origin,
|
|
26883
26828
|
componentEditor: componentEditor,
|
|
@@ -35264,9 +35209,6 @@ var HeadlineStats = function HeadlineStats(props) {
|
|
|
35264
35209
|
var _props$component$attr, _props$component$attr2, _attributes$viewId, _props$dashboardBehav;
|
|
35265
35210
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
35266
35211
|
queryEngineConfig = _useDashboardBehaviou.queryEngineConfig;
|
|
35267
|
-
var _useState = React.useState([]),
|
|
35268
|
-
results = _useState[0],
|
|
35269
|
-
setResults = _useState[1];
|
|
35270
35212
|
var comparisonEnabled = Object.keys(props.component.attributes.timeDimension || {}).length !== 0 && ((_props$component$attr = props.component.attributes.headline) == null ? void 0 : _props$component$attr.func) === 'current';
|
|
35271
35213
|
var deltaTimeDimension = function () {
|
|
35272
35214
|
if (!comparisonEnabled) return null;
|
|
@@ -35288,11 +35230,12 @@ var HeadlineStats = function HeadlineStats(props) {
|
|
|
35288
35230
|
measure: measure,
|
|
35289
35231
|
filter: props.component.attributes.filter
|
|
35290
35232
|
});
|
|
35291
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
35233
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
35292
35234
|
localFilters: props.component.localFilters,
|
|
35293
35235
|
globalFilters: props.globalFilters
|
|
35294
35236
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
35295
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
35237
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
35238
|
+
results = _useQueryEffect.results;
|
|
35296
35239
|
return jsxRuntime.jsx(View, {
|
|
35297
35240
|
minHeight: comparisonEnabled ? 80 : 56,
|
|
35298
35241
|
children: jsxRuntime.jsx(SingleStatView, _extends({}, attributes, {
|
|
@@ -35580,14 +35523,14 @@ var AreaChart$4 = function AreaChart(props) {
|
|
|
35580
35523
|
onDrilldown = _useState[0],
|
|
35581
35524
|
setOnDrilldown = _useState[1];
|
|
35582
35525
|
var _props$component = props.component,
|
|
35583
|
-
results = _props$component.results,
|
|
35584
35526
|
attributes = _props$component.attributes,
|
|
35585
35527
|
localFilters = _props$component.localFilters;
|
|
35586
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
35528
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
35587
35529
|
localFilters: props.component.localFilters,
|
|
35588
35530
|
globalFilters: props.globalFilters
|
|
35589
35531
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
35590
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
35532
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
35533
|
+
results = _useQueryEffect.results;
|
|
35591
35534
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
35592
35535
|
children: [jsxRuntime.jsx(memoized, _extends({
|
|
35593
35536
|
id: props.id
|
|
@@ -36820,16 +36763,18 @@ var usePreAggregatedDataSet = function usePreAggregatedDataSet(dataSet, attribut
|
|
|
36820
36763
|
})]);
|
|
36821
36764
|
};
|
|
36822
36765
|
|
|
36823
|
-
var useComponentEffect = function useComponentEffect(attributes, dataSet, queryEngineConfig, filterConfig, updateComponentAttributes, runQueriesCallback,
|
|
36766
|
+
var useComponentEffect = function useComponentEffect(attributes, dataSet, queryEngineConfig, filterConfig, updateComponentAttributes, runQueriesCallback, variables) {
|
|
36824
36767
|
var queryable = attributes;
|
|
36825
36768
|
if (dataSet.preAggregated) {
|
|
36826
36769
|
queryable = [buildViewOnlyQuery(dataSet)];
|
|
36827
36770
|
}
|
|
36828
36771
|
usePreAggregatedDataSet(dataSet, attributes, queryEngineConfig, updateComponentAttributes);
|
|
36829
|
-
var _useQueryEffect = useQueryEffect(queryable, runQueriesCallback,
|
|
36830
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
36772
|
+
var _useQueryEffect = useQueryEffect(queryable, runQueriesCallback, filterConfig, dataSet, attributes.type, variables),
|
|
36773
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
36774
|
+
results = _useQueryEffect.results;
|
|
36831
36775
|
return {
|
|
36832
|
-
queriesAreChanging: queriesAreChanging
|
|
36776
|
+
queriesAreChanging: queriesAreChanging,
|
|
36777
|
+
results: results
|
|
36833
36778
|
};
|
|
36834
36779
|
};
|
|
36835
36780
|
|
|
@@ -36881,9 +36826,7 @@ function useDrilldownSelection(results, attributes, setAttributes, dataSet, quer
|
|
|
36881
36826
|
|
|
36882
36827
|
var BarChart$4 = function BarChart(props) {
|
|
36883
36828
|
var _props$dashboardBehav;
|
|
36884
|
-
var
|
|
36885
|
-
localFilters = _props$component.localFilters,
|
|
36886
|
-
results = _props$component.results;
|
|
36829
|
+
var localFilters = props.component.localFilters;
|
|
36887
36830
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
36888
36831
|
var _useState = React.useState(props.component.attributes),
|
|
36889
36832
|
attributes = _useState[0],
|
|
@@ -36894,17 +36837,18 @@ var BarChart$4 = function BarChart(props) {
|
|
|
36894
36837
|
setDrilldownSelections([]);
|
|
36895
36838
|
}
|
|
36896
36839
|
}, [JSON.stringify(props.component.attributes)]);
|
|
36840
|
+
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
36841
|
+
localFilters: localFilters,
|
|
36842
|
+
globalFilters: props.globalFilters
|
|
36843
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
36844
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
36845
|
+
results = _useComponentEffect.results;
|
|
36897
36846
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
36898
36847
|
return setAttributes(newAttributes);
|
|
36899
36848
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig),
|
|
36900
36849
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
36901
36850
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
36902
36851
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
36903
|
-
var _useComponentEffect = useComponentEffect(drilldownSelections.length > 0 ? attributes : props.component.attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
36904
|
-
localFilters: localFilters,
|
|
36905
|
-
globalFilters: props.globalFilters
|
|
36906
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.setResults, props.dashboardBehaviour.variables),
|
|
36907
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging;
|
|
36908
36852
|
var runViewClickQuery = /*#__PURE__*/function () {
|
|
36909
36853
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queries, existingField) {
|
|
36910
36854
|
var filter, attributes, abortController, queryResults;
|
|
@@ -37211,14 +37155,14 @@ var LineChart$4 = function LineChart(props) {
|
|
|
37211
37155
|
onDrilldown = _useState[0],
|
|
37212
37156
|
setOnDrilldown = _useState[1];
|
|
37213
37157
|
var _props$component = props.component,
|
|
37214
|
-
results = _props$component.results,
|
|
37215
37158
|
attributes = _props$component.attributes,
|
|
37216
37159
|
localFilters = _props$component.localFilters;
|
|
37217
37160
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
37218
37161
|
localFilters: localFilters,
|
|
37219
37162
|
globalFilters: props.globalFilters
|
|
37220
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.
|
|
37221
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
37163
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
37164
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
37165
|
+
results = _useComponentEffect.results;
|
|
37222
37166
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
37223
37167
|
children: [jsxRuntime.jsx(memoized$1, _extends({
|
|
37224
37168
|
id: props.id
|
|
@@ -37432,14 +37376,14 @@ var memoized$2 = /*#__PURE__*/React.memo(ScatterChartView, shouldUpdate);
|
|
|
37432
37376
|
var ScatterChart$3 = function ScatterChart(props) {
|
|
37433
37377
|
var _props$dashboardBehav;
|
|
37434
37378
|
var _props$component = props.component,
|
|
37435
|
-
results = _props$component.results,
|
|
37436
37379
|
attributes = _props$component.attributes,
|
|
37437
37380
|
localFilters = _props$component.localFilters;
|
|
37438
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
37381
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
37439
37382
|
localFilters: localFilters,
|
|
37440
37383
|
globalFilters: props.globalFilters
|
|
37441
37384
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
37442
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
37385
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
37386
|
+
results = _useQueryEffect.results;
|
|
37443
37387
|
return jsxRuntime.jsx(memoized$2, _extends({
|
|
37444
37388
|
id: props.id
|
|
37445
37389
|
}, attributes, {
|
|
@@ -38815,9 +38759,7 @@ var memoized$3 = /*#__PURE__*/React.memo(PieChartView, shouldUpdate);
|
|
|
38815
38759
|
|
|
38816
38760
|
var PieChart$3 = function PieChart(props) {
|
|
38817
38761
|
var _props$dashboardBehav;
|
|
38818
|
-
var
|
|
38819
|
-
results = _props$component.results,
|
|
38820
|
-
localFilters = _props$component.localFilters;
|
|
38762
|
+
var localFilters = props.component.localFilters;
|
|
38821
38763
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
38822
38764
|
var _useState = React.useState(props.component.attributes),
|
|
38823
38765
|
attributes = _useState[0],
|
|
@@ -38828,17 +38770,18 @@ var PieChart$3 = function PieChart(props) {
|
|
|
38828
38770
|
setDrilldownSelections([]);
|
|
38829
38771
|
}
|
|
38830
38772
|
}, [JSON.stringify(props.component.attributes)]);
|
|
38773
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
38774
|
+
localFilters: localFilters,
|
|
38775
|
+
globalFilters: props.globalFilters
|
|
38776
|
+
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
38777
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
38778
|
+
results = _useQueryEffect.results;
|
|
38831
38779
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
38832
38780
|
return setAttributes(newAttributes);
|
|
38833
38781
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig),
|
|
38834
38782
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
38835
38783
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
38836
38784
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
38837
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, props.setResults, {
|
|
38838
|
-
localFilters: localFilters,
|
|
38839
|
-
globalFilters: props.globalFilters
|
|
38840
|
-
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
38841
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging;
|
|
38842
38785
|
var runViewClickQuery = /*#__PURE__*/function () {
|
|
38843
38786
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queries, existingField) {
|
|
38844
38787
|
var filter, attributes, abortController, queryResults;
|
|
@@ -42968,14 +42911,14 @@ var memoized$4 = /*#__PURE__*/React.memo(BubbleChartView, shouldUpdate);
|
|
|
42968
42911
|
var BubbleChart$3 = function BubbleChart(props) {
|
|
42969
42912
|
var _props$dashboardBehav;
|
|
42970
42913
|
var _props$component = props.component,
|
|
42971
|
-
results = _props$component.results,
|
|
42972
42914
|
attributes = _props$component.attributes,
|
|
42973
42915
|
localFilters = _props$component.localFilters;
|
|
42974
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
42916
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
42975
42917
|
localFilters: localFilters,
|
|
42976
42918
|
globalFilters: props.globalFilters
|
|
42977
42919
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
42978
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
42920
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
42921
|
+
results = _useQueryEffect.results;
|
|
42979
42922
|
return jsxRuntime.jsx(memoized$4, _extends({
|
|
42980
42923
|
id: props.id
|
|
42981
42924
|
}, attributes, {
|
|
@@ -46629,15 +46572,15 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46629
46572
|
|
|
46630
46573
|
var BubbleChartV2$1 = function BubbleChartV2(props) {
|
|
46631
46574
|
var _props$component = props.component,
|
|
46632
|
-
results = _props$component.results,
|
|
46633
46575
|
attributes = _props$component.attributes,
|
|
46634
46576
|
localFilters = _props$component.localFilters;
|
|
46635
46577
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
46636
46578
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
46637
46579
|
localFilters: localFilters,
|
|
46638
46580
|
globalFilters: props.globalFilters
|
|
46639
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
46640
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
46581
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
46582
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
46583
|
+
results = _useComponentEffect.results;
|
|
46641
46584
|
return jsxRuntime.jsx(BubbleChartV2View, {
|
|
46642
46585
|
id: props.id,
|
|
46643
46586
|
attributes: attributes,
|
|
@@ -47663,15 +47606,15 @@ var LineChartV2View = function LineChartV2View(props) {
|
|
|
47663
47606
|
|
|
47664
47607
|
var LineChartV2 = function LineChartV2(props) {
|
|
47665
47608
|
var _props$component = props.component,
|
|
47666
|
-
results = _props$component.results,
|
|
47667
47609
|
attributes = _props$component.attributes,
|
|
47668
47610
|
localFilters = _props$component.localFilters;
|
|
47669
47611
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
47670
47612
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
47671
47613
|
localFilters: localFilters,
|
|
47672
47614
|
globalFilters: props.globalFilters
|
|
47673
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
47674
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
47615
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
47616
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
47617
|
+
results = _useComponentEffect.results;
|
|
47675
47618
|
return jsxRuntime.jsx(LineChartV2View, {
|
|
47676
47619
|
id: props.id,
|
|
47677
47620
|
attributes: attributes,
|
|
@@ -48035,15 +47978,15 @@ var AreaChartV2View = function AreaChartV2View(props) {
|
|
|
48035
47978
|
|
|
48036
47979
|
var AreaChartV2 = function AreaChartV2(props) {
|
|
48037
47980
|
var _props$component = props.component,
|
|
48038
|
-
results = _props$component.results,
|
|
48039
47981
|
attributes = _props$component.attributes,
|
|
48040
47982
|
localFilters = _props$component.localFilters;
|
|
48041
47983
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
48042
47984
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48043
47985
|
localFilters: localFilters,
|
|
48044
47986
|
globalFilters: props.globalFilters
|
|
48045
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
48046
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
47987
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
47988
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
47989
|
+
results = _useComponentEffect.results;
|
|
48047
47990
|
return jsxRuntime.jsx(AreaChartV2View, {
|
|
48048
47991
|
id: props.id,
|
|
48049
47992
|
attributes: attributes,
|
|
@@ -48428,9 +48371,7 @@ var BarChartV2View = function BarChartV2View(props) {
|
|
|
48428
48371
|
};
|
|
48429
48372
|
|
|
48430
48373
|
var BarChartV2 = function BarChartV2(props) {
|
|
48431
|
-
var
|
|
48432
|
-
results = _props$component.results,
|
|
48433
|
-
localFilters = _props$component.localFilters;
|
|
48374
|
+
var localFilters = props.component.localFilters;
|
|
48434
48375
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
48435
48376
|
var _useState = React.useState(props.component.attributes),
|
|
48436
48377
|
attributes = _useState[0],
|
|
@@ -48441,17 +48382,18 @@ var BarChartV2 = function BarChartV2(props) {
|
|
|
48441
48382
|
setDrilldownSelections([]);
|
|
48442
48383
|
}
|
|
48443
48384
|
}, [JSON.stringify(props.component.attributes)]);
|
|
48385
|
+
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48386
|
+
localFilters: localFilters,
|
|
48387
|
+
globalFilters: props.globalFilters
|
|
48388
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
48389
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
48390
|
+
results = _useComponentEffect.results;
|
|
48444
48391
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
48445
48392
|
return setAttributes(newAttributes);
|
|
48446
48393
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig, props.component.attributes.type === 'barChartV2'),
|
|
48447
48394
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
48448
48395
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
48449
48396
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
48450
|
-
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48451
|
-
localFilters: localFilters,
|
|
48452
|
-
globalFilters: props.globalFilters
|
|
48453
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.setResults, dashboardBehaviour.variables),
|
|
48454
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging;
|
|
48455
48397
|
return jsxRuntime.jsx(BarChartV2View, {
|
|
48456
48398
|
id: props.id,
|
|
48457
48399
|
attributes: attributes,
|
|
@@ -48613,16 +48555,16 @@ var LINE_QUERY_INDEX = 0,
|
|
|
48613
48555
|
BAR_QUERY_INDEX = 1;
|
|
48614
48556
|
var ComboChart$3 = function ComboChart(props) {
|
|
48615
48557
|
var _props$component = props.component,
|
|
48616
|
-
results = _props$component.results,
|
|
48617
48558
|
attributes = _props$component.attributes,
|
|
48618
48559
|
localFilters = _props$component.localFilters;
|
|
48619
48560
|
var _useDashboardContext = useDashboardContext(),
|
|
48620
48561
|
dashboard = _useDashboardContext.dashboard;
|
|
48621
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
48562
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
48622
48563
|
localFilters: localFilters,
|
|
48623
48564
|
globalFilters: props.globalFilters
|
|
48624
48565
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
48625
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
48566
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
48567
|
+
results = _useQueryEffect.results;
|
|
48626
48568
|
return jsxRuntime.jsx(ComboChartView$1, _extends({
|
|
48627
48569
|
id: props.id
|
|
48628
48570
|
}, attributes, {
|
|
@@ -49123,16 +49065,16 @@ var LINE_QUERY_INDEX$1 = 0,
|
|
|
49123
49065
|
BAR_QUERY_INDEX$1 = 1;
|
|
49124
49066
|
var ComboChartV2$1 = function ComboChartV2(props) {
|
|
49125
49067
|
var _props$component = props.component,
|
|
49126
|
-
results = _props$component.results,
|
|
49127
49068
|
attributes = _props$component.attributes,
|
|
49128
49069
|
localFilters = _props$component.localFilters;
|
|
49129
49070
|
var _useDashboardContext = useDashboardContext(),
|
|
49130
49071
|
dashboard = _useDashboardContext.dashboard;
|
|
49131
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
49072
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
49132
49073
|
localFilters: localFilters,
|
|
49133
49074
|
globalFilters: props.globalFilters
|
|
49134
49075
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
49135
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
49076
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
49077
|
+
results = _useQueryEffect.results;
|
|
49136
49078
|
return jsxRuntime.jsx(ComboChartView$2, _extends({
|
|
49137
49079
|
id: props.id
|
|
49138
49080
|
}, attributes, {
|
|
@@ -50924,9 +50866,6 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
50924
50866
|
React.useEffect(function () {
|
|
50925
50867
|
return setSelectedRow(undefined);
|
|
50926
50868
|
}, [props.queriesAreChanging]);
|
|
50927
|
-
var _useState = React.useState(),
|
|
50928
|
-
results = _useState[0],
|
|
50929
|
-
_setResults = _useState[1];
|
|
50930
50869
|
var expanded = selectedRow !== undefined;
|
|
50931
50870
|
var hasDrilldown = drilldown && (drilldown == null ? void 0 : drilldown.length) > 0;
|
|
50932
50871
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
@@ -50952,13 +50891,7 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
50952
50891
|
renderTableCell: handleRenderTableCell
|
|
50953
50892
|
}))
|
|
50954
50893
|
}), (props == null ? void 0 : props.drilldownInputProps) && expanded && hasDrilldown && jsxRuntime.jsx(DrilldownRow, {
|
|
50955
|
-
setResults: function setResults(value) {
|
|
50956
|
-
return _setResults({
|
|
50957
|
-
results: value
|
|
50958
|
-
});
|
|
50959
|
-
},
|
|
50960
50894
|
dataSet: dataSet,
|
|
50961
|
-
result: results == null ? void 0 : results.results[0],
|
|
50962
50895
|
drilldownInputProps: props == null ? void 0 : props.drilldownInputProps,
|
|
50963
50896
|
drilldown: drilldown,
|
|
50964
50897
|
selectedRow: selectedRow,
|
|
@@ -50971,10 +50904,10 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
50971
50904
|
});
|
|
50972
50905
|
};
|
|
50973
50906
|
var DrilldownRow = function DrilldownRow(props) {
|
|
50974
|
-
var
|
|
50975
|
-
var
|
|
50976
|
-
offset =
|
|
50977
|
-
setOffset =
|
|
50907
|
+
var _tableRepresentation$;
|
|
50908
|
+
var _useState = React.useState(0),
|
|
50909
|
+
offset = _useState[0],
|
|
50910
|
+
setOffset = _useState[1];
|
|
50978
50911
|
var _props$drilldownInput = props.drilldownInputProps,
|
|
50979
50912
|
component = _props$drilldownInput.component,
|
|
50980
50913
|
runQueriesCallback = _props$drilldownInput.runQueriesCallback;
|
|
@@ -50988,10 +50921,12 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
50988
50921
|
variables = _useDashboardBehaviou2.variables,
|
|
50989
50922
|
valueAlias = _useDashboardBehaviou2.valueAlias;
|
|
50990
50923
|
var updatedAttributes = buildDrilldownAttributes(component.attributes, decodeId(props.drilldown[0].subsetDimension, queryEngineConfig), props.dimension, props.selectedRow, offset);
|
|
50991
|
-
useQueryEffect(updatedAttributes, runQueriesCallback,
|
|
50992
|
-
|
|
50993
|
-
|
|
50994
|
-
|
|
50924
|
+
var _useQueryEffect = useQueryEffect(updatedAttributes, runQueriesCallback, {
|
|
50925
|
+
localFilters: component.localFilters,
|
|
50926
|
+
globalFilters: props.drilldownInputProps.globalFilters
|
|
50927
|
+
}, props.dataSet, undefined, variables),
|
|
50928
|
+
_useQueryEffect$resul = _useQueryEffect.results,
|
|
50929
|
+
result = _useQueryEffect$resul[0];
|
|
50995
50930
|
var nullReplacementWithFieldId = function nullReplacementWithFieldId(fieldId) {
|
|
50996
50931
|
return checkForNullValue(props.dataSet.id, [{
|
|
50997
50932
|
field: fieldId,
|
|
@@ -51001,7 +50936,7 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51001
50936
|
var tableRepresentation = React.useMemo(function () {
|
|
51002
50937
|
return buildTableRepresentation({
|
|
51003
50938
|
type: updatedAttributes.type,
|
|
51004
|
-
result:
|
|
50939
|
+
result: result,
|
|
51005
50940
|
exportNames: updatedAttributes.exportNames,
|
|
51006
50941
|
prefixes: updatedAttributes.prefixes,
|
|
51007
50942
|
dateTimeFormat: updatedAttributes.dateTimeFormat,
|
|
@@ -51021,10 +50956,10 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51021
50956
|
hiddenFields: updatedAttributes.hiddenFields,
|
|
51022
50957
|
valueAlias: valueAlias
|
|
51023
50958
|
});
|
|
51024
|
-
}, [updatedAttributes.type,
|
|
50959
|
+
}, [updatedAttributes.type, result, updatedAttributes.exportNames, updatedAttributes.prefixes, updatedAttributes.dateTimeFormat, dateTimeFormatOptions, updatedAttributes.numberFormat, numberFormatOptions, queryEngineConfig.supportedAggregates, queryEngineConfig.supportedTimeTruncFunctions, undefined, updatedAttributes.measure, updatedAttributes.xMeasure, updatedAttributes.yMeasure, updatedAttributes.dimension]);
|
|
51025
50960
|
var TableFooter = React.useMemo(function () {
|
|
51026
50961
|
return jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
51027
|
-
children:
|
|
50962
|
+
children: result && jsxRuntime.jsx(Pagination, {
|
|
51028
50963
|
offset: offset,
|
|
51029
50964
|
limit: limit,
|
|
51030
50965
|
onNext: function onNext() {
|
|
@@ -51044,10 +50979,10 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51044
50979
|
textOverride: textOverride
|
|
51045
50980
|
})
|
|
51046
50981
|
});
|
|
51047
|
-
}, [offset, limit,
|
|
50982
|
+
}, [offset, limit, result == null ? void 0 : result.content.length, setOffset, tableRepresentation == null ? void 0 : tableRepresentation.content.length]);
|
|
51048
50983
|
var hidePaginations = offset === 0 && ((_tableRepresentation$ = tableRepresentation == null ? void 0 : tableRepresentation.content.length) != null ? _tableRepresentation$ : 0) < (limit != null ? limit : 0);
|
|
51049
50984
|
var columnsNumber = props == null ? void 0 : props.tableRowProps.row.length;
|
|
51050
|
-
if (isLoading(
|
|
50985
|
+
if (isLoading(result)) return jsxRuntime.jsx(Table.TR, {
|
|
51051
50986
|
level: 2,
|
|
51052
50987
|
children: jsxRuntime.jsx(Table.TH, {
|
|
51053
50988
|
colSpan: columnsNumber,
|
|
@@ -51056,7 +50991,7 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51056
50991
|
})
|
|
51057
50992
|
})
|
|
51058
50993
|
});
|
|
51059
|
-
if (hasFailed(
|
|
50994
|
+
if (hasFailed(result)) return jsxRuntime.jsx(FailedToLoadDataNotice, {});
|
|
51060
50995
|
return jsxRuntime.jsxs(React.Fragment, {
|
|
51061
50996
|
children: [(tableRepresentation == null ? void 0 : tableRepresentation.content) && jsxRuntime.jsx(React.Fragment, {
|
|
51062
50997
|
children: (tableRepresentation == null ? void 0 : tableRepresentation.content.length) > 0 ? jsxRuntime.jsx(React.Fragment, {
|
|
@@ -51512,14 +51447,14 @@ var DataTableView$1 = (function (props) {
|
|
|
51512
51447
|
|
|
51513
51448
|
var DataTable$2 = function DataTable(props) {
|
|
51514
51449
|
var _props$component = props.component,
|
|
51515
|
-
results = _props$component.results,
|
|
51516
51450
|
attributes = _props$component.attributes,
|
|
51517
51451
|
localFilters = _props$component.localFilters;
|
|
51518
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
51452
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
51519
51453
|
localFilters: localFilters,
|
|
51520
51454
|
globalFilters: props.globalFilters
|
|
51521
51455
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
51522
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
51456
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
51457
|
+
results = _useQueryEffect.results;
|
|
51523
51458
|
var onNext = function onNext() {
|
|
51524
51459
|
var _attributes$limit, _attributes$offset, _results$0$content$le, _results$;
|
|
51525
51460
|
if (!hasNext({
|
|
@@ -51781,14 +51716,13 @@ var FunnelChart$2 = function FunnelChart(props) {
|
|
|
51781
51716
|
var _useState = React.useState(props.component.attributes),
|
|
51782
51717
|
attributes = _useState[0],
|
|
51783
51718
|
setAttributes = _useState[1];
|
|
51784
|
-
var
|
|
51785
|
-
localFilters = _props$component.localFilters,
|
|
51786
|
-
results = _props$component.results;
|
|
51719
|
+
var localFilters = props.component.localFilters;
|
|
51787
51720
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
51788
51721
|
localFilters: localFilters,
|
|
51789
51722
|
globalFilters: props.globalFilters
|
|
51790
|
-
}, props.updateComponentAttributes, props.runQueriesCallback
|
|
51791
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
51723
|
+
}, props.updateComponentAttributes, props.runQueriesCallback),
|
|
51724
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
51725
|
+
results = _useComponentEffect.results;
|
|
51792
51726
|
React.useEffect(function () {
|
|
51793
51727
|
if (!queriesAreChanging) {
|
|
51794
51728
|
setAttributes(props.component.attributes);
|
|
@@ -51898,14 +51832,14 @@ var View$2 = (function (props) {
|
|
|
51898
51832
|
|
|
51899
51833
|
var MercatorMap$3 = function MercatorMap(props) {
|
|
51900
51834
|
var _props$component = props.component,
|
|
51901
|
-
results = _props$component.results,
|
|
51902
51835
|
attributes = _props$component.attributes,
|
|
51903
51836
|
localFilters = _props$component.localFilters;
|
|
51904
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
51837
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
51905
51838
|
localFilters: localFilters,
|
|
51906
51839
|
globalFilters: props.globalFilters
|
|
51907
51840
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
51908
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
51841
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
51842
|
+
results = _useQueryEffect.results;
|
|
51909
51843
|
return jsxRuntime.jsx(View$2, _extends({}, attributes, {
|
|
51910
51844
|
id: props.id,
|
|
51911
51845
|
result: results && results[0],
|
|
@@ -52164,14 +52098,14 @@ ProgressView$1.defaultProps = defaultProps$9;
|
|
|
52164
52098
|
var Progress$2 = function Progress(props) {
|
|
52165
52099
|
var _props$dashboardBehav;
|
|
52166
52100
|
var _props$component = props.component,
|
|
52167
|
-
results = _props$component.results,
|
|
52168
52101
|
attributes = _props$component.attributes,
|
|
52169
52102
|
localFilters = _props$component.localFilters;
|
|
52170
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
52103
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
52171
52104
|
localFilters: localFilters,
|
|
52172
52105
|
globalFilters: props.globalFilters
|
|
52173
52106
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
52174
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
52107
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
52108
|
+
results = _useQueryEffect.results;
|
|
52175
52109
|
return jsxRuntime.jsx(ProgressView$1, _extends({}, attributes, {
|
|
52176
52110
|
id: props.id,
|
|
52177
52111
|
dataSet: props.dataSet,
|
|
@@ -52660,18 +52594,17 @@ var RadarChart$3 = function RadarChart(_ref) {
|
|
|
52660
52594
|
runQueriesCallback = _ref.runQueriesCallback,
|
|
52661
52595
|
setLocalFilters = _ref.setLocalFilters,
|
|
52662
52596
|
_setPartialAttributes = _ref.setPartialAttributes,
|
|
52663
|
-
setResults = _ref.setResults,
|
|
52664
52597
|
updateComponentAttributes = _ref.updateComponentAttributes;
|
|
52665
|
-
var localFilters = component.localFilters
|
|
52666
|
-
results = component.results;
|
|
52598
|
+
var localFilters = component.localFilters;
|
|
52667
52599
|
var _useState = React.useState(component.attributes),
|
|
52668
52600
|
attributes = _useState[0],
|
|
52669
52601
|
setAttributes = _useState[1];
|
|
52670
52602
|
var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
52671
52603
|
localFilters: localFilters,
|
|
52672
52604
|
globalFilters: globalFilters
|
|
52673
|
-
}, updateComponentAttributes, runQueriesCallback,
|
|
52674
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
52605
|
+
}, updateComponentAttributes, runQueriesCallback, dashboardBehaviour.variables),
|
|
52606
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
52607
|
+
results = _useComponentEffect.results;
|
|
52675
52608
|
React.useEffect(function () {
|
|
52676
52609
|
if (!queriesAreChanging) {
|
|
52677
52610
|
setAttributes(component.attributes);
|
|
@@ -52744,14 +52677,14 @@ var RichText$2 = function RichText(_props) {
|
|
|
52744
52677
|
var SingleStat$2 = function SingleStat(props) {
|
|
52745
52678
|
var _props$dashboardBehav;
|
|
52746
52679
|
var _props$component = props.component,
|
|
52747
|
-
results = _props$component.results,
|
|
52748
52680
|
attributes = _props$component.attributes,
|
|
52749
52681
|
localFilters = _props$component.localFilters;
|
|
52750
52682
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
52751
52683
|
localFilters: localFilters,
|
|
52752
52684
|
globalFilters: props.globalFilters
|
|
52753
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.
|
|
52754
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
52685
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
52686
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
52687
|
+
results = _useComponentEffect.results;
|
|
52755
52688
|
return jsxRuntime.jsx(SingleStatView, _extends({}, attributes, {
|
|
52756
52689
|
id: props.id,
|
|
52757
52690
|
dataSet: props.dataSet,
|
|
@@ -53114,13 +53047,12 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53114
53047
|
};
|
|
53115
53048
|
|
|
53116
53049
|
var SunburstChart$2 = function SunburstChart(props) {
|
|
53117
|
-
var
|
|
53118
|
-
|
|
53119
|
-
|
|
53120
|
-
|
|
53121
|
-
|
|
53122
|
-
|
|
53123
|
-
}, props.dataSet, undefined, props.dashboardBehaviour.variables);
|
|
53050
|
+
var attributes = props.component.attributes;
|
|
53051
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
53052
|
+
localFilters: props.component.localFilters,
|
|
53053
|
+
globalFilters: props.globalFilters
|
|
53054
|
+
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
53055
|
+
results = _useQueryEffect.results;
|
|
53124
53056
|
var params = {
|
|
53125
53057
|
defaultFormats: props.dashboardBehaviour.defaultFormats,
|
|
53126
53058
|
dateTimeFormatOptions: props.dashboardBehaviour.dateTimeFormatOptions,
|
|
@@ -54083,18 +54015,17 @@ var WaterfallChart$3 = function WaterfallChart(_ref) {
|
|
|
54083
54015
|
runQueriesCallback = _ref.runQueriesCallback,
|
|
54084
54016
|
setLocalFilters = _ref.setLocalFilters,
|
|
54085
54017
|
_setPartialAttributes = _ref.setPartialAttributes,
|
|
54086
|
-
setResults = _ref.setResults,
|
|
54087
54018
|
updateComponentAttributes = _ref.updateComponentAttributes;
|
|
54088
|
-
var localFilters = component.localFilters
|
|
54089
|
-
results = component.results;
|
|
54019
|
+
var localFilters = component.localFilters;
|
|
54090
54020
|
var _useState = React.useState(component.attributes),
|
|
54091
54021
|
attributes = _useState[0],
|
|
54092
54022
|
setAttributes = _useState[1];
|
|
54093
54023
|
var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
54094
54024
|
localFilters: localFilters,
|
|
54095
54025
|
globalFilters: globalFilters
|
|
54096
|
-
}, updateComponentAttributes, runQueriesCallback,
|
|
54097
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
54026
|
+
}, updateComponentAttributes, runQueriesCallback, dashboardBehaviour.variables),
|
|
54027
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
54028
|
+
results = _useComponentEffect.results;
|
|
54098
54029
|
React.useEffect(function () {
|
|
54099
54030
|
if (!queriesAreChanging) {
|
|
54100
54031
|
setAttributes(component.attributes);
|
|
@@ -54193,7 +54124,6 @@ var Component = function Component(props) {
|
|
|
54193
54124
|
dataSet: dataSet,
|
|
54194
54125
|
runQueriesCallback: props.runQueriesCallback,
|
|
54195
54126
|
component: props.component,
|
|
54196
|
-
setResults: props.setResults,
|
|
54197
54127
|
globalFilters: dashboard.globalFilters,
|
|
54198
54128
|
dashboardBehaviour: dashboardBehaviour,
|
|
54199
54129
|
sm: smallVersion,
|
|
@@ -54217,7 +54147,6 @@ var Component = function Component(props) {
|
|
|
54217
54147
|
dataSet: dataSet,
|
|
54218
54148
|
runQueriesCallback: props.runQueriesCallback,
|
|
54219
54149
|
component: props.component,
|
|
54220
|
-
setResults: props.setResults,
|
|
54221
54150
|
globalFilters: dashboard.globalFilters,
|
|
54222
54151
|
dashboardBehaviour: dashboardBehaviour,
|
|
54223
54152
|
sm: smallVersion,
|
|
@@ -54244,7 +54173,6 @@ var Component = function Component(props) {
|
|
|
54244
54173
|
},
|
|
54245
54174
|
runQueriesCallback: props.runQueriesCallback,
|
|
54246
54175
|
component: props.component,
|
|
54247
|
-
setResults: props.setResults,
|
|
54248
54176
|
globalFilters: dashboard.globalFilters,
|
|
54249
54177
|
dashboardBehaviour: dashboardBehaviour,
|
|
54250
54178
|
library: props == null ? void 0 : props.library,
|
|
@@ -54270,7 +54198,6 @@ var Component = function Component(props) {
|
|
|
54270
54198
|
return _updateComponentAttributes(newAttributes);
|
|
54271
54199
|
},
|
|
54272
54200
|
component: props.component,
|
|
54273
|
-
setResults: props.setResults,
|
|
54274
54201
|
globalFilters: dashboard.globalFilters,
|
|
54275
54202
|
dashboardBehaviour: dashboardBehaviour,
|
|
54276
54203
|
sm: smallVersion,
|
|
@@ -54296,7 +54223,6 @@ var Component = function Component(props) {
|
|
|
54296
54223
|
dataSet: dataSet,
|
|
54297
54224
|
runQueriesCallback: props.runQueriesCallback,
|
|
54298
54225
|
component: props.component,
|
|
54299
|
-
setResults: props.setResults,
|
|
54300
54226
|
globalFilters: dashboard.globalFilters,
|
|
54301
54227
|
dashboardBehaviour: dashboardBehaviour,
|
|
54302
54228
|
sm: smallVersion,
|
|
@@ -54326,7 +54252,6 @@ var Component = function Component(props) {
|
|
|
54326
54252
|
},
|
|
54327
54253
|
runQueriesCallback: props.runQueriesCallback,
|
|
54328
54254
|
component: props.component,
|
|
54329
|
-
setResults: props.setResults,
|
|
54330
54255
|
globalFilters: dashboard.globalFilters,
|
|
54331
54256
|
dashboardBehaviour: dashboardBehaviour,
|
|
54332
54257
|
sm: smallVersion,
|
|
@@ -54353,7 +54278,6 @@ var Component = function Component(props) {
|
|
|
54353
54278
|
},
|
|
54354
54279
|
runQueriesCallback: props.runQueriesCallback,
|
|
54355
54280
|
component: props.component,
|
|
54356
|
-
setResults: props.setResults,
|
|
54357
54281
|
globalFilters: dashboard.globalFilters,
|
|
54358
54282
|
dashboardBehaviour: dashboardBehaviour,
|
|
54359
54283
|
library: props == null ? void 0 : props.library,
|
|
@@ -54379,7 +54303,6 @@ var Component = function Component(props) {
|
|
|
54379
54303
|
},
|
|
54380
54304
|
runQueriesCallback: props.runQueriesCallback,
|
|
54381
54305
|
component: props.component,
|
|
54382
|
-
setResults: props.setResults,
|
|
54383
54306
|
globalFilters: dashboard.globalFilters,
|
|
54384
54307
|
dashboardBehaviour: dashboardBehaviour,
|
|
54385
54308
|
library: props == null ? void 0 : props.library,
|
|
@@ -54405,7 +54328,6 @@ var Component = function Component(props) {
|
|
|
54405
54328
|
},
|
|
54406
54329
|
runQueriesCallback: props.runQueriesCallback,
|
|
54407
54330
|
component: props.component,
|
|
54408
|
-
setResults: props.setResults,
|
|
54409
54331
|
globalFilters: dashboard.globalFilters,
|
|
54410
54332
|
dashboardBehaviour: dashboardBehaviour,
|
|
54411
54333
|
library: props == null ? void 0 : props.library,
|
|
@@ -54428,7 +54350,6 @@ var Component = function Component(props) {
|
|
|
54428
54350
|
dataSet: dataSet,
|
|
54429
54351
|
runQueriesCallback: props.runQueriesCallback,
|
|
54430
54352
|
component: props.component,
|
|
54431
|
-
setResults: props.setResults,
|
|
54432
54353
|
globalFilters: dashboard.globalFilters,
|
|
54433
54354
|
dashboardBehaviour: dashboardBehaviour,
|
|
54434
54355
|
library: props == null ? void 0 : props.library,
|
|
@@ -54452,7 +54373,6 @@ var Component = function Component(props) {
|
|
|
54452
54373
|
dataSet: dataSet,
|
|
54453
54374
|
runQueriesCallback: props.runQueriesCallback,
|
|
54454
54375
|
component: props.component,
|
|
54455
|
-
setResults: props.setResults,
|
|
54456
54376
|
globalFilters: dashboard.globalFilters,
|
|
54457
54377
|
dashboardBehaviour: dashboardBehaviour,
|
|
54458
54378
|
library: props == null ? void 0 : props.library,
|
|
@@ -54476,7 +54396,6 @@ var Component = function Component(props) {
|
|
|
54476
54396
|
dataSet: dataSet,
|
|
54477
54397
|
runQueriesCallback: props.runQueriesCallback,
|
|
54478
54398
|
component: props.component,
|
|
54479
|
-
setResults: props.setResults,
|
|
54480
54399
|
globalFilters: dashboard.globalFilters,
|
|
54481
54400
|
dashboardBehaviour: dashboardBehaviour,
|
|
54482
54401
|
library: props == null ? void 0 : props.library,
|
|
@@ -54500,7 +54419,6 @@ var Component = function Component(props) {
|
|
|
54500
54419
|
dataSet: dataSet,
|
|
54501
54420
|
runQueriesCallback: props.runQueriesCallback,
|
|
54502
54421
|
component: props.component,
|
|
54503
|
-
setResults: props.setResults,
|
|
54504
54422
|
globalFilters: dashboard.globalFilters,
|
|
54505
54423
|
dashboardBehaviour: dashboardBehaviour,
|
|
54506
54424
|
library: props == null ? void 0 : props.library,
|
|
@@ -54527,7 +54445,6 @@ var Component = function Component(props) {
|
|
|
54527
54445
|
dataSet: dataSet,
|
|
54528
54446
|
runQueriesCallback: props.runQueriesCallback,
|
|
54529
54447
|
component: props.component,
|
|
54530
|
-
setResults: props.setResults,
|
|
54531
54448
|
globalFilters: dashboard.globalFilters,
|
|
54532
54449
|
dashboardBehaviour: dashboardBehaviour,
|
|
54533
54450
|
library: props == null ? void 0 : props.library,
|
|
@@ -54551,7 +54468,6 @@ var Component = function Component(props) {
|
|
|
54551
54468
|
dataSet: dataSet,
|
|
54552
54469
|
runQueriesCallback: props.runQueriesCallback,
|
|
54553
54470
|
component: props.component,
|
|
54554
|
-
setResults: props.setResults,
|
|
54555
54471
|
globalFilters: dashboard.globalFilters,
|
|
54556
54472
|
updateComponentAttributes: function updateComponentAttributes(newAttributes) {
|
|
54557
54473
|
return _updateComponentAttributes(newAttributes);
|
|
@@ -54578,7 +54494,6 @@ var Component = function Component(props) {
|
|
|
54578
54494
|
dataSet: dataSet,
|
|
54579
54495
|
runQueriesCallback: props.runQueriesCallback,
|
|
54580
54496
|
component: props.component,
|
|
54581
|
-
setResults: props.setResults,
|
|
54582
54497
|
globalFilters: dashboard.globalFilters,
|
|
54583
54498
|
dashboardBehaviour: dashboardBehaviour,
|
|
54584
54499
|
sm: smallVersion,
|
|
@@ -54626,7 +54541,6 @@ var Component = function Component(props) {
|
|
|
54626
54541
|
dataSet: dataSet,
|
|
54627
54542
|
runQueriesCallback: props.runQueriesCallback,
|
|
54628
54543
|
component: props.component,
|
|
54629
|
-
setResults: props.setResults,
|
|
54630
54544
|
globalFilters: dashboard.globalFilters,
|
|
54631
54545
|
dashboardBehaviour: dashboardBehaviour
|
|
54632
54546
|
})
|
|
@@ -54649,7 +54563,6 @@ var Component = function Component(props) {
|
|
|
54649
54563
|
return _updateComponentAttributes(newAttributes);
|
|
54650
54564
|
},
|
|
54651
54565
|
component: props.component,
|
|
54652
|
-
setResults: props.setResults,
|
|
54653
54566
|
globalFilters: dashboard.globalFilters,
|
|
54654
54567
|
dashboardBehaviour: dashboardBehaviour,
|
|
54655
54568
|
sm: smallVersion,
|
|
@@ -54676,7 +54589,6 @@ var Component = function Component(props) {
|
|
|
54676
54589
|
dataSet: dataSet,
|
|
54677
54590
|
runQueriesCallback: props.runQueriesCallback,
|
|
54678
54591
|
component: props.component,
|
|
54679
|
-
setResults: props.setResults,
|
|
54680
54592
|
globalFilters: dashboard.globalFilters,
|
|
54681
54593
|
dashboardBehaviour: dashboardBehaviour,
|
|
54682
54594
|
library: props == null ? void 0 : props.library,
|
|
@@ -54704,7 +54616,6 @@ var Component = function Component(props) {
|
|
|
54704
54616
|
return _updateComponentAttributes(newAttributes);
|
|
54705
54617
|
},
|
|
54706
54618
|
component: props.component,
|
|
54707
|
-
setResults: props.setResults,
|
|
54708
54619
|
globalFilters: dashboard.globalFilters,
|
|
54709
54620
|
dashboardBehaviour: dashboardBehaviour,
|
|
54710
54621
|
library: props == null ? void 0 : props.library,
|
|
@@ -54730,7 +54641,6 @@ var Component = function Component(props) {
|
|
|
54730
54641
|
return _updateComponentAttributes(newAttributes);
|
|
54731
54642
|
},
|
|
54732
54643
|
component: props.component,
|
|
54733
|
-
setResults: props.setResults,
|
|
54734
54644
|
globalFilters: dashboard.globalFilters,
|
|
54735
54645
|
dashboardBehaviour: dashboardBehaviour,
|
|
54736
54646
|
library: props == null ? void 0 : props.library,
|
|
@@ -57536,18 +57446,6 @@ var ModalType = /*#__PURE__*/function (ModalType) {
|
|
|
57536
57446
|
----------------------------------------------
|
|
57537
57447
|
*/
|
|
57538
57448
|
|
|
57539
|
-
/*
|
|
57540
|
-
----------------------------------------------
|
|
57541
|
-
----------------------------------------------
|
|
57542
|
-
----------------------------------------------
|
|
57543
|
-
|
|
57544
|
-
Setting results
|
|
57545
|
-
|
|
57546
|
-
----------------------------------------------
|
|
57547
|
-
----------------------------------------------
|
|
57548
|
-
----------------------------------------------
|
|
57549
|
-
*/
|
|
57550
|
-
|
|
57551
57449
|
/*
|
|
57552
57450
|
----------------------------------------------
|
|
57553
57451
|
----------------------------------------------
|
|
@@ -58585,65 +58483,6 @@ var ParametersModalView = function ParametersModalView(props) {
|
|
|
58585
58483
|
});
|
|
58586
58484
|
};
|
|
58587
58485
|
|
|
58588
|
-
var ViewRawResultsModal = function ViewRawResultsModal(props) {
|
|
58589
|
-
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58590
|
-
textOverride = _useDashboardBehaviou.textOverride;
|
|
58591
|
-
var _useToastContext = useToastContext(),
|
|
58592
|
-
addToast = _useToastContext.addToast;
|
|
58593
|
-
return jsxRuntime.jsxs(Modal, {
|
|
58594
|
-
width: "4xl",
|
|
58595
|
-
isOpen: props == null ? void 0 : props.show,
|
|
58596
|
-
onClose: function onClose() {
|
|
58597
|
-
return props == null ? void 0 : props.onClose(false);
|
|
58598
|
-
},
|
|
58599
|
-
children: [jsxRuntime.jsx(Modal.Header, {
|
|
58600
|
-
title: textOverride('json_results', 'Data in raw JSON format'),
|
|
58601
|
-
show: true
|
|
58602
|
-
}), jsxRuntime.jsx(Modal.Content, {
|
|
58603
|
-
children: jsxRuntime.jsx(View, {
|
|
58604
|
-
maxHeight: "400px",
|
|
58605
|
-
overflowY: "scroll",
|
|
58606
|
-
children: jsxRuntime.jsx("pre", {
|
|
58607
|
-
"data-testid": "raw-results-" + props.rowIndex + "-" + props.cellIndex,
|
|
58608
|
-
children: JSON.stringify(props.results, null, 2)
|
|
58609
|
-
})
|
|
58610
|
-
})
|
|
58611
|
-
}), jsxRuntime.jsx(Modal.Footer, {
|
|
58612
|
-
buttons: "end",
|
|
58613
|
-
children: jsxRuntime.jsxs(ButtonGroup, {
|
|
58614
|
-
children: [jsxRuntime.jsx(Button, {
|
|
58615
|
-
secondary: true,
|
|
58616
|
-
testId: "modal-close-btn",
|
|
58617
|
-
onClick: function onClick() {
|
|
58618
|
-
return props == null ? void 0 : props.onClose(false);
|
|
58619
|
-
},
|
|
58620
|
-
children: textOverride('close', 'Close')
|
|
58621
|
-
}), jsxRuntime.jsx(Button, {
|
|
58622
|
-
primary: true,
|
|
58623
|
-
testId: "modal-copy-json-results-btn",
|
|
58624
|
-
onClick: function onClick() {
|
|
58625
|
-
var copied = copy(JSON.stringify(props.results));
|
|
58626
|
-
if (copied) {
|
|
58627
|
-
addToast(function () {
|
|
58628
|
-
return jsxRuntime.jsx(ToastSuccess, {
|
|
58629
|
-
message: "Copied results"
|
|
58630
|
-
});
|
|
58631
|
-
});
|
|
58632
|
-
} else {
|
|
58633
|
-
addToast(function () {
|
|
58634
|
-
return jsxRuntime.jsx(ToastError, {
|
|
58635
|
-
message: "Failed to copy results"
|
|
58636
|
-
});
|
|
58637
|
-
});
|
|
58638
|
-
}
|
|
58639
|
-
},
|
|
58640
|
-
children: textOverride('copy', 'Copy')
|
|
58641
|
-
})]
|
|
58642
|
-
})
|
|
58643
|
-
})]
|
|
58644
|
-
});
|
|
58645
|
-
};
|
|
58646
|
-
|
|
58647
58486
|
var ViewRawAttributesModal = function ViewRawAttributesModal(props) {
|
|
58648
58487
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58649
58488
|
textOverride = _useDashboardBehaviou.textOverride;
|
|
@@ -59025,7 +58864,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59025
58864
|
localFiltersModal = _useState2[0],
|
|
59026
58865
|
showLocalFiltersModal = _useState2[1];
|
|
59027
58866
|
var _useState3 = React.useState(false),
|
|
59028
|
-
viewRawJSONResults = _useState3[0],
|
|
59029
58867
|
showViewRawJSONResults = _useState3[1];
|
|
59030
58868
|
var _useState4 = React.useState(false),
|
|
59031
58869
|
viewRawAttributes = _useState4[0],
|
|
@@ -59200,7 +59038,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59200
59038
|
isBeingSizeAdjusted: props.isBeingSizeAdjusted,
|
|
59201
59039
|
runQueriesCallback: props.runQueriesCallback,
|
|
59202
59040
|
component: props.component,
|
|
59203
|
-
setResults: props.setResults,
|
|
59204
59041
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
59205
59042
|
height: props.height
|
|
59206
59043
|
}), !showComponent && jsxRuntime.jsx(LoadingComponent, {})]
|
|
@@ -59226,14 +59063,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59226
59063
|
onClose: function onClose() {
|
|
59227
59064
|
return showParametersModal(false);
|
|
59228
59065
|
}
|
|
59229
|
-
}), jsxRuntime.jsx(ViewRawResultsModal, {
|
|
59230
|
-
cellIndex: props.cellIndex,
|
|
59231
|
-
rowIndex: props.rowIndex,
|
|
59232
|
-
show: viewRawJSONResults,
|
|
59233
|
-
results: props.component.results,
|
|
59234
|
-
onClose: function onClose() {
|
|
59235
|
-
return showViewRawJSONResults(false);
|
|
59236
|
-
}
|
|
59237
59066
|
}), jsxRuntime.jsx(ViewRawAttributesModal, {
|
|
59238
59067
|
cellIndex: props.cellIndex,
|
|
59239
59068
|
rowIndex: props.rowIndex,
|
|
@@ -59263,7 +59092,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59263
59092
|
isBeingSizeAdjusted: props.isBeingSizeAdjusted,
|
|
59264
59093
|
runQueriesCallback: props.runQueriesCallback,
|
|
59265
59094
|
component: props.component,
|
|
59266
|
-
setResults: props.setResults,
|
|
59267
59095
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
59268
59096
|
height: props.height
|
|
59269
59097
|
})
|
|
@@ -59929,14 +59757,6 @@ var ResizableRowCell = function ResizableRowCell(props) {
|
|
|
59929
59757
|
});
|
|
59930
59758
|
},
|
|
59931
59759
|
height: props.height,
|
|
59932
|
-
setResults: function setResults(results) {
|
|
59933
|
-
dispatch({
|
|
59934
|
-
type: 'setResultsForComponentInDisplay',
|
|
59935
|
-
rowIndex: rowIndex,
|
|
59936
|
-
cellIndex: cellIndex,
|
|
59937
|
-
results: results
|
|
59938
|
-
});
|
|
59939
|
-
},
|
|
59940
59760
|
onEdit: function onEdit() {
|
|
59941
59761
|
trackEvent('component.startEditing');
|
|
59942
59762
|
dispatch({
|
|
@@ -61241,9 +61061,6 @@ var ComponentInLibrary = function ComponentInLibrary(props) {
|
|
|
61241
61061
|
setLocalFilters: function setLocalFilters() {},
|
|
61242
61062
|
runQueriesCallback: props.runQueriesCallback,
|
|
61243
61063
|
component: component,
|
|
61244
|
-
setResults: function setResults(results) {
|
|
61245
|
-
return props.setResults(results, libraryIndex);
|
|
61246
|
-
},
|
|
61247
61064
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
61248
61065
|
library: true
|
|
61249
61066
|
})]
|
|
@@ -61566,7 +61383,6 @@ var ViewsInLibrary = function ViewsInLibrary(props) {
|
|
|
61566
61383
|
refIndex = _ref.refIndex;
|
|
61567
61384
|
return jsxRuntime.jsx(ComponentInLibrary, {
|
|
61568
61385
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
61569
|
-
setResults: props.setResults,
|
|
61570
61386
|
component: item.component,
|
|
61571
61387
|
libraryIndex: refIndex,
|
|
61572
61388
|
onSelectComponent: props == null ? void 0 : props.onSelectComponent,
|
|
@@ -61609,20 +61425,6 @@ var Library = function Library() {
|
|
|
61609
61425
|
featureToggles = _useDashboardBehaviou.featureToggles,
|
|
61610
61426
|
textOverride = _useDashboardBehaviou.textOverride;
|
|
61611
61427
|
var canEditComponentLibrary = featureToggles.canEditComponentLibrary;
|
|
61612
|
-
var setResults = function setResults(results, libraryIndex) {
|
|
61613
|
-
dispatch({
|
|
61614
|
-
type: 'setResultsForComponentInLibrary',
|
|
61615
|
-
results: results,
|
|
61616
|
-
libraryIndex: libraryIndex
|
|
61617
|
-
});
|
|
61618
|
-
};
|
|
61619
|
-
var setFocussedComponentResults = function setFocussedComponentResults(results) {
|
|
61620
|
-
dispatch({
|
|
61621
|
-
type: 'setResultsForComponentInLibrary',
|
|
61622
|
-
results: results,
|
|
61623
|
-
libraryIndex: selectedLibraryIndex
|
|
61624
|
-
});
|
|
61625
|
-
};
|
|
61626
61428
|
var selectComponentFromLibrary = function selectComponentFromLibrary() {
|
|
61627
61429
|
dispatch({
|
|
61628
61430
|
type: 'pickComponentFromLibraryForDisplay',
|
|
@@ -61690,10 +61492,8 @@ var Library = function Library() {
|
|
|
61690
61492
|
onClose: clearModal,
|
|
61691
61493
|
onSelect: selectComponentFromLibrary,
|
|
61692
61494
|
updateComponentAttributes: updateComponentAttributes,
|
|
61693
|
-
setFocussedComponentResults: setFocussedComponentResults,
|
|
61694
61495
|
dashboard: dashboard,
|
|
61695
61496
|
selectedLibraryIndex: selectedLibraryIndex,
|
|
61696
|
-
setResults: setResults,
|
|
61697
61497
|
canEditComponentLibrary: canEditComponentLibrary,
|
|
61698
61498
|
onEdit: startEditingSelectedComponent,
|
|
61699
61499
|
onDelete: setShowDeleteConfirmationModal,
|
|
@@ -61736,7 +61536,6 @@ var ViewLibraryDisplay = function ViewLibraryDisplay(props) {
|
|
|
61736
61536
|
"data-component": "library-content",
|
|
61737
61537
|
children: jsxRuntime.jsx(ViewsInLibrary, {
|
|
61738
61538
|
runQueriesCallback: props == null ? void 0 : props.runQueriesCallback,
|
|
61739
|
-
setResults: props == null ? void 0 : props.setResults,
|
|
61740
61539
|
components: props.dashboard.componentLibrary,
|
|
61741
61540
|
onSelectComponent: function onSelectComponent(index) {
|
|
61742
61541
|
return props == null ? void 0 : props.onSelectComponent(index);
|
|
@@ -64988,14 +64787,12 @@ var handleFeedbackMessage = function handleFeedbackMessage(_ref) {
|
|
|
64988
64787
|
|
|
64989
64788
|
// By using message ids we ensure there will only be 1 message of a type, and it can be easily removed
|
|
64990
64789
|
var chartDimensionMessageId = 'grouping';
|
|
64991
|
-
var limitWarningMessageId = 'limit';
|
|
64992
64790
|
var EditorComponent = function EditorComponent(props) {
|
|
64993
64791
|
var _theme$editor$gap, _theme$editor, _theme$editor2, _props$usingBeta, _theme$editor3;
|
|
64994
64792
|
var theme = useTheme();
|
|
64995
64793
|
var editorFeedback = useEditorFeedback();
|
|
64996
64794
|
var _props$editor = props.editor,
|
|
64997
64795
|
setAttributes = _props$editor.setAttributes,
|
|
64998
|
-
setResults = _props$editor.setResults,
|
|
64999
64796
|
runQueriesCallback = _props$editor.runQueriesCallback,
|
|
65000
64797
|
component = _props$editor.component,
|
|
65001
64798
|
dataSet = _props$editor.dataSet,
|
|
@@ -65016,26 +64813,25 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65016
64813
|
editorFeedback.removeFeedbackMessage(chartDimensionMessageId);
|
|
65017
64814
|
};
|
|
65018
64815
|
}, [component.attributes]);
|
|
65019
|
-
|
|
65020
|
-
|
|
65021
|
-
|
|
65022
|
-
|
|
65023
|
-
|
|
65024
|
-
|
|
65025
|
-
|
|
65026
|
-
|
|
65027
|
-
|
|
65028
|
-
|
|
65029
|
-
|
|
65030
|
-
|
|
65031
|
-
|
|
65032
|
-
|
|
65033
|
-
|
|
65034
|
-
|
|
65035
|
-
|
|
65036
|
-
|
|
65037
|
-
|
|
65038
|
-
}, [component.results]);
|
|
64816
|
+
|
|
64817
|
+
// useEffect(() => {
|
|
64818
|
+
// handleFeedbackMessage({
|
|
64819
|
+
// message: {
|
|
64820
|
+
// id: limitWarningMessageId,
|
|
64821
|
+
// type: 'info',
|
|
64822
|
+
// children: `More data is available for this view. Increase 'Limit' (Advanced Options) to show all data.`,
|
|
64823
|
+
// },
|
|
64824
|
+
// showCondition: component.results.some((result) => result?.hasMoreResults),
|
|
64825
|
+
// hideCondition: !component.results.some((result) => result?.hasMoreResults),
|
|
64826
|
+
// addFeedbackMessage: editorFeedback.addFeedbackMessage,
|
|
64827
|
+
// removeFeedbackMessage: editorFeedback.removeFeedbackMessage,
|
|
64828
|
+
// });
|
|
64829
|
+
|
|
64830
|
+
// return () => {
|
|
64831
|
+
// editorFeedback.removeFeedbackMessage(limitWarningMessageId);
|
|
64832
|
+
// };
|
|
64833
|
+
// }, [component.results]);
|
|
64834
|
+
|
|
65039
64835
|
return jsxRuntime.jsx(RichTextEditorContextProvider, {
|
|
65040
64836
|
setContent: function setContent(content) {
|
|
65041
64837
|
// @ts-ignore
|
|
@@ -65074,7 +64870,6 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65074
64870
|
isBeingSizeAdjusted: false,
|
|
65075
64871
|
setLocalFilters: props.editor.setLocalFilters,
|
|
65076
64872
|
runQueriesCallback: runQueriesCallback,
|
|
65077
|
-
setResults: setResults,
|
|
65078
64873
|
component: component,
|
|
65079
64874
|
updateComponentAttributes: setAttributes,
|
|
65080
64875
|
editor: true
|
|
@@ -65088,10 +64883,10 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65088
64883
|
|
|
65089
64884
|
var EditorModal = function EditorModal(props) {
|
|
65090
64885
|
var _theme$modals, _theme$modals2;
|
|
65091
|
-
var editor = useEditor();
|
|
65092
64886
|
var _React$useState = React__default.useState(false),
|
|
65093
64887
|
ai = _React$useState[0],
|
|
65094
64888
|
openAI = _React$useState[1];
|
|
64889
|
+
var editor = useEditor();
|
|
65095
64890
|
var usingBeta = useBetaFeatures();
|
|
65096
64891
|
var _useAIBehaviour = useAIBehaviour(),
|
|
65097
64892
|
fetchSuggestions = _useAIBehaviour.fetchSuggestions;
|
|
@@ -70995,7 +70790,6 @@ var buildComponentLibrary = function buildComponentLibrary(cells) {
|
|
|
70995
70790
|
newComponentLibrary.push({
|
|
70996
70791
|
attributes: cell.component.attributes,
|
|
70997
70792
|
localFilters: (_cell$localFilters2 = cell.localFilters) != null ? _cell$localFilters2 : [],
|
|
70998
|
-
results: [],
|
|
70999
70793
|
colSpan: 1,
|
|
71000
70794
|
reports: []
|
|
71001
70795
|
});
|