@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
package/dist/dashboard.esm.js
CHANGED
|
@@ -14562,7 +14562,6 @@ var initial = function initial(attributes) {
|
|
|
14562
14562
|
return {
|
|
14563
14563
|
attributes: attributes,
|
|
14564
14564
|
localFilters: [],
|
|
14565
|
-
results: [],
|
|
14566
14565
|
colSpan: POPULATE_ONE_CELL,
|
|
14567
14566
|
reports: []
|
|
14568
14567
|
};
|
|
@@ -15006,10 +15005,12 @@ var load$2 = function load$1(dumped, componentInterfaceConfig) {
|
|
|
15006
15005
|
delete dumped['addOns'];
|
|
15007
15006
|
// @ts-ignore
|
|
15008
15007
|
delete attributes['addOns'];
|
|
15008
|
+
|
|
15009
|
+
// @ts-ignore
|
|
15010
|
+
delete attributes['results'];
|
|
15009
15011
|
return _extends({}, dumped, {
|
|
15010
15012
|
localFilters: localFilters,
|
|
15011
|
-
attributes: attributes
|
|
15012
|
-
results: []
|
|
15013
|
+
attributes: attributes
|
|
15013
15014
|
});
|
|
15014
15015
|
};
|
|
15015
15016
|
var dump$2 = function dump$1(hydrated) {
|
|
@@ -15036,7 +15037,6 @@ var saveable = function saveable(component, protectedComponent) {
|
|
|
15036
15037
|
}),
|
|
15037
15038
|
localFilters: (_component$localFilte = component.localFilters) != null ? _component$localFilte : [],
|
|
15038
15039
|
colSpan: 1,
|
|
15039
|
-
results: [],
|
|
15040
15040
|
reports: []
|
|
15041
15041
|
};
|
|
15042
15042
|
};
|
|
@@ -23103,18 +23103,6 @@ var pickComponentFromLibraryForDisplay = function pickComponentFromLibraryForDis
|
|
|
23103
23103
|
pickFromComponentLibrary: null
|
|
23104
23104
|
});
|
|
23105
23105
|
};
|
|
23106
|
-
var setResultsForComponentInDisplay = function setResultsForComponentInDisplay(state, action) {
|
|
23107
|
-
var results = action.results,
|
|
23108
|
-
rowIndex = action.rowIndex,
|
|
23109
|
-
cellIndex = action.cellIndex;
|
|
23110
|
-
var currentComponent = state.dashboard.display[rowIndex].components[cellIndex];
|
|
23111
|
-
if (!currentComponent) throw 'We can only set results on an existing component on the dashboard.';
|
|
23112
|
-
var newComponent = _extends({}, currentComponent, {
|
|
23113
|
-
results: results
|
|
23114
|
-
});
|
|
23115
|
-
var newState = _setComponentInDisplayHelper(state, newComponent, rowIndex, cellIndex);
|
|
23116
|
-
return _extends({}, newState);
|
|
23117
|
-
};
|
|
23118
23106
|
var updateComponentLibraryAttributes = function updateComponentLibraryAttributes(state, action) {
|
|
23119
23107
|
var libraryIndex = action.libraryIndex,
|
|
23120
23108
|
attributes = action.attributes;
|
|
@@ -23128,31 +23116,6 @@ var updateComponentLibraryAttributes = function updateComponentLibraryAttributes
|
|
|
23128
23116
|
})
|
|
23129
23117
|
});
|
|
23130
23118
|
};
|
|
23131
|
-
var setResultsForComponentInEditor = function setResultsForComponentInEditor(state, action) {
|
|
23132
|
-
if (!state.componentEditor) throw 'Cannot set results for a closed editor.';
|
|
23133
|
-
if (!state.componentEditor.component) throw 'Cannot set results for a non-existant component in editor.';
|
|
23134
|
-
var results = action.results;
|
|
23135
|
-
return _extends({}, state, {
|
|
23136
|
-
componentEditor: _extends({}, state.componentEditor, {
|
|
23137
|
-
component: _extends({}, state.componentEditor.component, {
|
|
23138
|
-
results: results
|
|
23139
|
-
})
|
|
23140
|
-
})
|
|
23141
|
-
});
|
|
23142
|
-
};
|
|
23143
|
-
var setResultsForComponentInLibrary = function setResultsForComponentInLibrary(state, action) {
|
|
23144
|
-
var libraryIndex = action.libraryIndex,
|
|
23145
|
-
results = action.results;
|
|
23146
|
-
var componentLibrary = [].concat(state.dashboard.componentLibrary);
|
|
23147
|
-
componentLibrary[libraryIndex] = _extends({}, componentLibrary[libraryIndex], {
|
|
23148
|
-
results: results
|
|
23149
|
-
});
|
|
23150
|
-
return _extends({}, state, {
|
|
23151
|
-
dashboard: _extends({}, state.dashboard, {
|
|
23152
|
-
componentLibrary: componentLibrary
|
|
23153
|
-
})
|
|
23154
|
-
});
|
|
23155
|
-
};
|
|
23156
23119
|
var clearModal = function clearModal(state, _action) {
|
|
23157
23120
|
return _extends({}, state, {
|
|
23158
23121
|
pickFromComponentLibrary: null,
|
|
@@ -23548,12 +23511,6 @@ var reducer = function reducer(pipelineTransformationOptions) {
|
|
|
23548
23511
|
return clearModal(state);
|
|
23549
23512
|
case 'updateEditorComponent':
|
|
23550
23513
|
return updateEditorComponent(state, action);
|
|
23551
|
-
case 'setResultsForComponentInDisplay':
|
|
23552
|
-
return setResultsForComponentInDisplay(state, action);
|
|
23553
|
-
case 'setResultsForComponentInLibrary':
|
|
23554
|
-
return setResultsForComponentInLibrary(state, action);
|
|
23555
|
-
case 'setResultsForComponentInEditor':
|
|
23556
|
-
return setResultsForComponentInEditor(state, action);
|
|
23557
23514
|
case 'pickComponentFromLibraryForDisplay':
|
|
23558
23515
|
return pickComponentFromLibraryForDisplay(state, action);
|
|
23559
23516
|
case 'setDashboard':
|
|
@@ -26130,9 +26087,16 @@ var watchDataSetFieldChanges = function watchDataSetFieldChanges(dataSet, querya
|
|
|
26130
26087
|
// Custom fields are the only ones that can have their definition changed. So
|
|
26131
26088
|
// we only need to watch them.
|
|
26132
26089
|
var watchedCustomFields = watchFields.flatMap(function (fieldId) {
|
|
26133
|
-
|
|
26134
|
-
|
|
26135
|
-
|
|
26090
|
+
try {
|
|
26091
|
+
var dataSetField = findField(dataSet, fieldId);
|
|
26092
|
+
if (isCustomField(dataSetField)) return [dataSetField];
|
|
26093
|
+
return [];
|
|
26094
|
+
} catch (err) {
|
|
26095
|
+
if (err instanceof FieldNotFoundInDataSet) {
|
|
26096
|
+
return [];
|
|
26097
|
+
}
|
|
26098
|
+
throw err;
|
|
26099
|
+
}
|
|
26136
26100
|
});
|
|
26137
26101
|
return JSON.stringify(watchedCustomFields);
|
|
26138
26102
|
} else {
|
|
@@ -26292,78 +26256,70 @@ var useVariablesInDataSet = function useVariablesInDataSet(dataSet, queryable, v
|
|
|
26292
26256
|
// How to make sure the queries run when a field in a data set has been changed.
|
|
26293
26257
|
// need to pass in the data sets here
|
|
26294
26258
|
|
|
26295
|
-
var useQueryEffect = function useQueryEffect(queries, runQueriesCallback,
|
|
26296
|
-
var _useState = useState(
|
|
26297
|
-
|
|
26298
|
-
|
|
26259
|
+
var useQueryEffect = function useQueryEffect(queries, runQueriesCallback, filterConfig, dataSet, componentType, variables) {
|
|
26260
|
+
var _useState = useState([]),
|
|
26261
|
+
results = _useState[0],
|
|
26262
|
+
setResults = _useState[1];
|
|
26263
|
+
var _useState2 = useState(false),
|
|
26264
|
+
queriesAreChanging = _useState2[0],
|
|
26265
|
+
setQueriesAreChanging = _useState2[1];
|
|
26299
26266
|
var _useVariablesInDataSe = useVariablesInDataSet(dataSet, queries, variables),
|
|
26300
26267
|
noOfVariableChanges = _useVariablesInDataSe.noOfVariableChanges;
|
|
26301
|
-
|
|
26302
|
-
|
|
26303
|
-
|
|
26304
|
-
|
|
26305
|
-
var
|
|
26306
|
-
var
|
|
26307
|
-
|
|
26308
|
-
|
|
26309
|
-
|
|
26310
|
-
|
|
26311
|
-
|
|
26312
|
-
|
|
26313
|
-
|
|
26314
|
-
|
|
26315
|
-
|
|
26316
|
-
|
|
26317
|
-
|
|
26318
|
-
if
|
|
26319
|
-
|
|
26320
|
-
|
|
26321
|
-
|
|
26268
|
+
var watchCustomFieldChangesKey = watchDataSetFieldChanges(dataSet, queries);
|
|
26269
|
+
useEffect(function () {
|
|
26270
|
+
var abortController = new AbortController();
|
|
26271
|
+
var fetch$1 = /*#__PURE__*/function () {
|
|
26272
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
26273
|
+
var hasResults;
|
|
26274
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
26275
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26276
|
+
case 0:
|
|
26277
|
+
setQueriesAreChanging(true);
|
|
26278
|
+
_context.next = 3;
|
|
26279
|
+
return fetch(queries, runQueriesCallback, abortController.signal, filterConfig);
|
|
26280
|
+
case 3:
|
|
26281
|
+
hasResults = _context.sent;
|
|
26282
|
+
if (hasResults) {
|
|
26283
|
+
setQueriesAreChanging(false);
|
|
26284
|
+
if (!abortController.signal.aborted) {
|
|
26285
|
+
// Only set the results if the signal was not aborted...
|
|
26286
|
+
setResults(hasResults);
|
|
26287
|
+
}
|
|
26288
|
+
} else {
|
|
26289
|
+
if (Array.isArray(queries)) {
|
|
26290
|
+
setResults(queries.map(function (_q) {
|
|
26291
|
+
return null;
|
|
26292
|
+
}));
|
|
26322
26293
|
} else {
|
|
26323
|
-
|
|
26324
|
-
onResultsCallback(queries.map(function (_q) {
|
|
26325
|
-
return null;
|
|
26326
|
-
}));
|
|
26327
|
-
} else {
|
|
26328
|
-
onResultsCallback([null]);
|
|
26329
|
-
}
|
|
26294
|
+
setResults([null]);
|
|
26330
26295
|
}
|
|
26331
|
-
|
|
26332
|
-
|
|
26333
|
-
|
|
26334
|
-
|
|
26335
|
-
}
|
|
26336
|
-
})
|
|
26337
|
-
|
|
26338
|
-
|
|
26339
|
-
|
|
26340
|
-
}();
|
|
26341
|
-
fetch$1();
|
|
26342
|
-
return function () {
|
|
26343
|
-
abortController.abort('useQueryEffect unmounted');
|
|
26296
|
+
}
|
|
26297
|
+
case 5:
|
|
26298
|
+
case "end":
|
|
26299
|
+
return _context.stop();
|
|
26300
|
+
}
|
|
26301
|
+
}, _callee);
|
|
26302
|
+
}));
|
|
26303
|
+
return function fetch() {
|
|
26304
|
+
return _ref.apply(this, arguments);
|
|
26344
26305
|
};
|
|
26345
|
-
}
|
|
26346
|
-
|
|
26347
|
-
|
|
26348
|
-
|
|
26349
|
-
filterConfig: filterConfig,
|
|
26350
|
-
watchCustomFieldChangesKey: watchCustomFieldChangesKey,
|
|
26351
|
-
noOfVariableChanges: noOfVariableChanges
|
|
26352
|
-
})]);
|
|
26353
|
-
return {
|
|
26354
|
-
queriesAreChanging: queriesAreChanging
|
|
26306
|
+
}();
|
|
26307
|
+
fetch$1();
|
|
26308
|
+
return function () {
|
|
26309
|
+
abortController.abort('useQueryEffect unmounted');
|
|
26355
26310
|
};
|
|
26356
|
-
}
|
|
26357
|
-
|
|
26358
|
-
|
|
26359
|
-
|
|
26360
|
-
|
|
26361
|
-
|
|
26362
|
-
|
|
26363
|
-
|
|
26364
|
-
|
|
26365
|
-
|
|
26366
|
-
|
|
26311
|
+
}, [JSON.stringify({
|
|
26312
|
+
componentType: componentType,
|
|
26313
|
+
dataSetId: dataSet.id,
|
|
26314
|
+
queries: queries,
|
|
26315
|
+
filterConfig: filterConfig,
|
|
26316
|
+
watchCustomFieldChangesKey: watchCustomFieldChangesKey,
|
|
26317
|
+
noOfVariableChanges: noOfVariableChanges
|
|
26318
|
+
})]);
|
|
26319
|
+
return {
|
|
26320
|
+
results: results,
|
|
26321
|
+
queriesAreChanging: queriesAreChanging
|
|
26322
|
+
};
|
|
26367
26323
|
};
|
|
26368
26324
|
|
|
26369
26325
|
/** Fetches unique field values for a given field. */
|
|
@@ -26372,9 +26328,6 @@ var useUniqueFieldValues = function useUniqueFieldValues(dataSet, fieldId) {
|
|
|
26372
26328
|
runQueriesCallback = _useDashboardContext.runQueriesCallback;
|
|
26373
26329
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
26374
26330
|
variables = _useDashboardBehaviou.variables;
|
|
26375
|
-
var _useState = useState(undefined),
|
|
26376
|
-
result = _useState[0],
|
|
26377
|
-
setResult = _useState[1];
|
|
26378
26331
|
var queries = [];
|
|
26379
26332
|
var dataSetField = findField(dataSet, fieldId);
|
|
26380
26333
|
if (dataSetField.dataType == 'string[]') {
|
|
@@ -26386,10 +26339,9 @@ var useUniqueFieldValues = function useUniqueFieldValues(dataSet, fieldId) {
|
|
|
26386
26339
|
var filterQuery = buildFilterQuery(dataSet, fieldId);
|
|
26387
26340
|
queries = [filterQuery];
|
|
26388
26341
|
}
|
|
26389
|
-
useQueryEffect(queries, runQueriesCallback,
|
|
26390
|
-
|
|
26391
|
-
|
|
26392
|
-
}, {}, dataSet, undefined, variables);
|
|
26342
|
+
var _useQueryEffect = useQueryEffect(queries, runQueriesCallback, {}, dataSet, undefined, variables),
|
|
26343
|
+
_useQueryEffect$resul = _useQueryEffect.results,
|
|
26344
|
+
result = _useQueryEffect$resul[0];
|
|
26393
26345
|
return {
|
|
26394
26346
|
result: result != null ? result : null,
|
|
26395
26347
|
loading: result === undefined,
|
|
@@ -26811,7 +26763,7 @@ var useEditor = function useEditor() {
|
|
|
26811
26763
|
/* Infinite re-render loop
|
|
26812
26764
|
- When chaning dataset
|
|
26813
26765
|
- If not using default metric / grouping
|
|
26814
|
-
- Only when switching to 'Stock data' not to another dataset
|
|
26766
|
+
- Only when switching to 'Stock data' not to another dataset
|
|
26815
26767
|
*/
|
|
26816
26768
|
|
|
26817
26769
|
dispatch({
|
|
@@ -26828,12 +26780,6 @@ var useEditor = function useEditor() {
|
|
|
26828
26780
|
return _ref2.apply(this, arguments);
|
|
26829
26781
|
};
|
|
26830
26782
|
}();
|
|
26831
|
-
var setResults = function setResults(results) {
|
|
26832
|
-
dispatch({
|
|
26833
|
-
type: 'setResultsForComponentInEditor',
|
|
26834
|
-
results: results
|
|
26835
|
-
});
|
|
26836
|
-
};
|
|
26837
26783
|
var setDataSets = function setDataSets(dataSets) {
|
|
26838
26784
|
dispatch({
|
|
26839
26785
|
type: 'setDataSets',
|
|
@@ -26905,7 +26851,6 @@ var useEditor = function useEditor() {
|
|
|
26905
26851
|
numberFormatOptions: numberFormatOptions,
|
|
26906
26852
|
setAttributes: setAttributes,
|
|
26907
26853
|
setPartialAttributes: setPartialAttributes,
|
|
26908
|
-
setResults: setResults,
|
|
26909
26854
|
mode: mode,
|
|
26910
26855
|
origin: origin,
|
|
26911
26856
|
componentEditor: componentEditor,
|
|
@@ -35301,9 +35246,6 @@ var HeadlineStats = function HeadlineStats(props) {
|
|
|
35301
35246
|
var _props$component$attr, _props$component$attr2, _attributes$viewId, _props$dashboardBehav;
|
|
35302
35247
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
35303
35248
|
queryEngineConfig = _useDashboardBehaviou.queryEngineConfig;
|
|
35304
|
-
var _useState = useState([]),
|
|
35305
|
-
results = _useState[0],
|
|
35306
|
-
setResults = _useState[1];
|
|
35307
35249
|
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';
|
|
35308
35250
|
var deltaTimeDimension = function () {
|
|
35309
35251
|
if (!comparisonEnabled) return null;
|
|
@@ -35325,11 +35267,12 @@ var HeadlineStats = function HeadlineStats(props) {
|
|
|
35325
35267
|
measure: measure,
|
|
35326
35268
|
filter: props.component.attributes.filter
|
|
35327
35269
|
});
|
|
35328
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
35270
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
35329
35271
|
localFilters: props.component.localFilters,
|
|
35330
35272
|
globalFilters: props.globalFilters
|
|
35331
35273
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
35332
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
35274
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
35275
|
+
results = _useQueryEffect.results;
|
|
35333
35276
|
return jsx(View, {
|
|
35334
35277
|
minHeight: comparisonEnabled ? 80 : 56,
|
|
35335
35278
|
children: jsx(SingleStatView, _extends({}, attributes, {
|
|
@@ -35617,14 +35560,14 @@ var AreaChart$4 = function AreaChart(props) {
|
|
|
35617
35560
|
onDrilldown = _useState[0],
|
|
35618
35561
|
setOnDrilldown = _useState[1];
|
|
35619
35562
|
var _props$component = props.component,
|
|
35620
|
-
results = _props$component.results,
|
|
35621
35563
|
attributes = _props$component.attributes,
|
|
35622
35564
|
localFilters = _props$component.localFilters;
|
|
35623
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
35565
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
35624
35566
|
localFilters: props.component.localFilters,
|
|
35625
35567
|
globalFilters: props.globalFilters
|
|
35626
35568
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
35627
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
35569
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
35570
|
+
results = _useQueryEffect.results;
|
|
35628
35571
|
return jsxs(Fragment, {
|
|
35629
35572
|
children: [jsx(memoized, _extends({
|
|
35630
35573
|
id: props.id
|
|
@@ -36857,16 +36800,18 @@ var usePreAggregatedDataSet = function usePreAggregatedDataSet(dataSet, attribut
|
|
|
36857
36800
|
})]);
|
|
36858
36801
|
};
|
|
36859
36802
|
|
|
36860
|
-
var useComponentEffect = function useComponentEffect(attributes, dataSet, queryEngineConfig, filterConfig, updateComponentAttributes, runQueriesCallback,
|
|
36803
|
+
var useComponentEffect = function useComponentEffect(attributes, dataSet, queryEngineConfig, filterConfig, updateComponentAttributes, runQueriesCallback, variables) {
|
|
36861
36804
|
var queryable = attributes;
|
|
36862
36805
|
if (dataSet.preAggregated) {
|
|
36863
36806
|
queryable = [buildViewOnlyQuery(dataSet)];
|
|
36864
36807
|
}
|
|
36865
36808
|
usePreAggregatedDataSet(dataSet, attributes, queryEngineConfig, updateComponentAttributes);
|
|
36866
|
-
var _useQueryEffect = useQueryEffect(queryable, runQueriesCallback,
|
|
36867
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
36809
|
+
var _useQueryEffect = useQueryEffect(queryable, runQueriesCallback, filterConfig, dataSet, attributes.type, variables),
|
|
36810
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
36811
|
+
results = _useQueryEffect.results;
|
|
36868
36812
|
return {
|
|
36869
|
-
queriesAreChanging: queriesAreChanging
|
|
36813
|
+
queriesAreChanging: queriesAreChanging,
|
|
36814
|
+
results: results
|
|
36870
36815
|
};
|
|
36871
36816
|
};
|
|
36872
36817
|
|
|
@@ -36918,9 +36863,7 @@ function useDrilldownSelection(results, attributes, setAttributes, dataSet, quer
|
|
|
36918
36863
|
|
|
36919
36864
|
var BarChart$4 = function BarChart(props) {
|
|
36920
36865
|
var _props$dashboardBehav;
|
|
36921
|
-
var
|
|
36922
|
-
localFilters = _props$component.localFilters,
|
|
36923
|
-
results = _props$component.results;
|
|
36866
|
+
var localFilters = props.component.localFilters;
|
|
36924
36867
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
36925
36868
|
var _useState = useState(props.component.attributes),
|
|
36926
36869
|
attributes = _useState[0],
|
|
@@ -36931,17 +36874,18 @@ var BarChart$4 = function BarChart(props) {
|
|
|
36931
36874
|
setDrilldownSelections([]);
|
|
36932
36875
|
}
|
|
36933
36876
|
}, [JSON.stringify(props.component.attributes)]);
|
|
36877
|
+
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
36878
|
+
localFilters: localFilters,
|
|
36879
|
+
globalFilters: props.globalFilters
|
|
36880
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
36881
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
36882
|
+
results = _useComponentEffect.results;
|
|
36934
36883
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
36935
36884
|
return setAttributes(newAttributes);
|
|
36936
36885
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig),
|
|
36937
36886
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
36938
36887
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
36939
36888
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
36940
|
-
var _useComponentEffect = useComponentEffect(drilldownSelections.length > 0 ? attributes : props.component.attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
36941
|
-
localFilters: localFilters,
|
|
36942
|
-
globalFilters: props.globalFilters
|
|
36943
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.setResults, props.dashboardBehaviour.variables),
|
|
36944
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging;
|
|
36945
36889
|
var runViewClickQuery = /*#__PURE__*/function () {
|
|
36946
36890
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queries, existingField) {
|
|
36947
36891
|
var filter, attributes, abortController, queryResults;
|
|
@@ -37248,14 +37192,14 @@ var LineChart$4 = function LineChart(props) {
|
|
|
37248
37192
|
onDrilldown = _useState[0],
|
|
37249
37193
|
setOnDrilldown = _useState[1];
|
|
37250
37194
|
var _props$component = props.component,
|
|
37251
|
-
results = _props$component.results,
|
|
37252
37195
|
attributes = _props$component.attributes,
|
|
37253
37196
|
localFilters = _props$component.localFilters;
|
|
37254
37197
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
37255
37198
|
localFilters: localFilters,
|
|
37256
37199
|
globalFilters: props.globalFilters
|
|
37257
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.
|
|
37258
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
37200
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
37201
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
37202
|
+
results = _useComponentEffect.results;
|
|
37259
37203
|
return jsxs(Fragment, {
|
|
37260
37204
|
children: [jsx(memoized$1, _extends({
|
|
37261
37205
|
id: props.id
|
|
@@ -37469,14 +37413,14 @@ var memoized$2 = /*#__PURE__*/memo(ScatterChartView, shouldUpdate);
|
|
|
37469
37413
|
var ScatterChart$3 = function ScatterChart(props) {
|
|
37470
37414
|
var _props$dashboardBehav;
|
|
37471
37415
|
var _props$component = props.component,
|
|
37472
|
-
results = _props$component.results,
|
|
37473
37416
|
attributes = _props$component.attributes,
|
|
37474
37417
|
localFilters = _props$component.localFilters;
|
|
37475
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
37418
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
37476
37419
|
localFilters: localFilters,
|
|
37477
37420
|
globalFilters: props.globalFilters
|
|
37478
37421
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
37479
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
37422
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
37423
|
+
results = _useQueryEffect.results;
|
|
37480
37424
|
return jsx(memoized$2, _extends({
|
|
37481
37425
|
id: props.id
|
|
37482
37426
|
}, attributes, {
|
|
@@ -38852,9 +38796,7 @@ var memoized$3 = /*#__PURE__*/memo(PieChartView, shouldUpdate);
|
|
|
38852
38796
|
|
|
38853
38797
|
var PieChart$3 = function PieChart(props) {
|
|
38854
38798
|
var _props$dashboardBehav;
|
|
38855
|
-
var
|
|
38856
|
-
results = _props$component.results,
|
|
38857
|
-
localFilters = _props$component.localFilters;
|
|
38799
|
+
var localFilters = props.component.localFilters;
|
|
38858
38800
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
38859
38801
|
var _useState = useState(props.component.attributes),
|
|
38860
38802
|
attributes = _useState[0],
|
|
@@ -38865,17 +38807,18 @@ var PieChart$3 = function PieChart(props) {
|
|
|
38865
38807
|
setDrilldownSelections([]);
|
|
38866
38808
|
}
|
|
38867
38809
|
}, [JSON.stringify(props.component.attributes)]);
|
|
38810
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
38811
|
+
localFilters: localFilters,
|
|
38812
|
+
globalFilters: props.globalFilters
|
|
38813
|
+
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
38814
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
38815
|
+
results = _useQueryEffect.results;
|
|
38868
38816
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
38869
38817
|
return setAttributes(newAttributes);
|
|
38870
38818
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig),
|
|
38871
38819
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
38872
38820
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
38873
38821
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
38874
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, props.setResults, {
|
|
38875
|
-
localFilters: localFilters,
|
|
38876
|
-
globalFilters: props.globalFilters
|
|
38877
|
-
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
38878
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging;
|
|
38879
38822
|
var runViewClickQuery = /*#__PURE__*/function () {
|
|
38880
38823
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(queries, existingField) {
|
|
38881
38824
|
var filter, attributes, abortController, queryResults;
|
|
@@ -43005,14 +42948,14 @@ var memoized$4 = /*#__PURE__*/memo(BubbleChartView, shouldUpdate);
|
|
|
43005
42948
|
var BubbleChart$3 = function BubbleChart(props) {
|
|
43006
42949
|
var _props$dashboardBehav;
|
|
43007
42950
|
var _props$component = props.component,
|
|
43008
|
-
results = _props$component.results,
|
|
43009
42951
|
attributes = _props$component.attributes,
|
|
43010
42952
|
localFilters = _props$component.localFilters;
|
|
43011
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
42953
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
43012
42954
|
localFilters: localFilters,
|
|
43013
42955
|
globalFilters: props.globalFilters
|
|
43014
42956
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
43015
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
42957
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
42958
|
+
results = _useQueryEffect.results;
|
|
43016
42959
|
return jsx(memoized$4, _extends({
|
|
43017
42960
|
id: props.id
|
|
43018
42961
|
}, attributes, {
|
|
@@ -46687,15 +46630,15 @@ var BubbleChartV2View = function BubbleChartV2View(props) {
|
|
|
46687
46630
|
|
|
46688
46631
|
var BubbleChartV2$1 = function BubbleChartV2(props) {
|
|
46689
46632
|
var _props$component = props.component,
|
|
46690
|
-
results = _props$component.results,
|
|
46691
46633
|
attributes = _props$component.attributes,
|
|
46692
46634
|
localFilters = _props$component.localFilters;
|
|
46693
46635
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
46694
46636
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
46695
46637
|
localFilters: localFilters,
|
|
46696
46638
|
globalFilters: props.globalFilters
|
|
46697
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
46698
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
46639
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
46640
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
46641
|
+
results = _useComponentEffect.results;
|
|
46699
46642
|
return jsx(BubbleChartV2View, {
|
|
46700
46643
|
id: props.id,
|
|
46701
46644
|
attributes: attributes,
|
|
@@ -47721,15 +47664,15 @@ var LineChartV2View = function LineChartV2View(props) {
|
|
|
47721
47664
|
|
|
47722
47665
|
var LineChartV2 = function LineChartV2(props) {
|
|
47723
47666
|
var _props$component = props.component,
|
|
47724
|
-
results = _props$component.results,
|
|
47725
47667
|
attributes = _props$component.attributes,
|
|
47726
47668
|
localFilters = _props$component.localFilters;
|
|
47727
47669
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
47728
47670
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
47729
47671
|
localFilters: localFilters,
|
|
47730
47672
|
globalFilters: props.globalFilters
|
|
47731
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
47732
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
47673
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
47674
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
47675
|
+
results = _useComponentEffect.results;
|
|
47733
47676
|
return jsx(LineChartV2View, {
|
|
47734
47677
|
id: props.id,
|
|
47735
47678
|
attributes: attributes,
|
|
@@ -48093,15 +48036,15 @@ var AreaChartV2View = function AreaChartV2View(props) {
|
|
|
48093
48036
|
|
|
48094
48037
|
var AreaChartV2 = function AreaChartV2(props) {
|
|
48095
48038
|
var _props$component = props.component,
|
|
48096
|
-
results = _props$component.results,
|
|
48097
48039
|
attributes = _props$component.attributes,
|
|
48098
48040
|
localFilters = _props$component.localFilters;
|
|
48099
48041
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
48100
48042
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48101
48043
|
localFilters: localFilters,
|
|
48102
48044
|
globalFilters: props.globalFilters
|
|
48103
|
-
}, props.updateComponentAttributes, props.runQueriesCallback,
|
|
48104
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
48045
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
48046
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
48047
|
+
results = _useComponentEffect.results;
|
|
48105
48048
|
return jsx(AreaChartV2View, {
|
|
48106
48049
|
id: props.id,
|
|
48107
48050
|
attributes: attributes,
|
|
@@ -48486,9 +48429,7 @@ var BarChartV2View = function BarChartV2View(props) {
|
|
|
48486
48429
|
};
|
|
48487
48430
|
|
|
48488
48431
|
var BarChartV2 = function BarChartV2(props) {
|
|
48489
|
-
var
|
|
48490
|
-
results = _props$component.results,
|
|
48491
|
-
localFilters = _props$component.localFilters;
|
|
48432
|
+
var localFilters = props.component.localFilters;
|
|
48492
48433
|
var dashboardBehaviour = props.dashboardBehaviour;
|
|
48493
48434
|
var _useState = useState(props.component.attributes),
|
|
48494
48435
|
attributes = _useState[0],
|
|
@@ -48499,17 +48440,18 @@ var BarChartV2 = function BarChartV2(props) {
|
|
|
48499
48440
|
setDrilldownSelections([]);
|
|
48500
48441
|
}
|
|
48501
48442
|
}, [JSON.stringify(props.component.attributes)]);
|
|
48443
|
+
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48444
|
+
localFilters: localFilters,
|
|
48445
|
+
globalFilters: props.globalFilters
|
|
48446
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, dashboardBehaviour.variables),
|
|
48447
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
48448
|
+
results = _useComponentEffect.results;
|
|
48502
48449
|
var _useDrilldownSelectio = useDrilldownSelection(results, attributes, function (newAttributes) {
|
|
48503
48450
|
return setAttributes(newAttributes);
|
|
48504
48451
|
}, props.dataSet, dashboardBehaviour.queryEngineConfig, props.component.attributes.type === 'barChartV2'),
|
|
48505
48452
|
onDrilldownChange = _useDrilldownSelectio.onDrilldownChange,
|
|
48506
48453
|
setDrilldownSelections = _useDrilldownSelectio.setDrilldownSelections,
|
|
48507
48454
|
drilldownSelections = _useDrilldownSelectio.drilldownSelections;
|
|
48508
|
-
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
48509
|
-
localFilters: localFilters,
|
|
48510
|
-
globalFilters: props.globalFilters
|
|
48511
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.setResults, dashboardBehaviour.variables),
|
|
48512
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging;
|
|
48513
48455
|
return jsx(BarChartV2View, {
|
|
48514
48456
|
id: props.id,
|
|
48515
48457
|
attributes: attributes,
|
|
@@ -48671,16 +48613,16 @@ var LINE_QUERY_INDEX = 0,
|
|
|
48671
48613
|
BAR_QUERY_INDEX = 1;
|
|
48672
48614
|
var ComboChart$3 = function ComboChart(props) {
|
|
48673
48615
|
var _props$component = props.component,
|
|
48674
|
-
results = _props$component.results,
|
|
48675
48616
|
attributes = _props$component.attributes,
|
|
48676
48617
|
localFilters = _props$component.localFilters;
|
|
48677
48618
|
var _useDashboardContext = useDashboardContext(),
|
|
48678
48619
|
dashboard = _useDashboardContext.dashboard;
|
|
48679
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
48620
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
48680
48621
|
localFilters: localFilters,
|
|
48681
48622
|
globalFilters: props.globalFilters
|
|
48682
48623
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
48683
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
48624
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
48625
|
+
results = _useQueryEffect.results;
|
|
48684
48626
|
return jsx(ComboChartView$1, _extends({
|
|
48685
48627
|
id: props.id
|
|
48686
48628
|
}, attributes, {
|
|
@@ -49181,16 +49123,16 @@ var LINE_QUERY_INDEX$1 = 0,
|
|
|
49181
49123
|
BAR_QUERY_INDEX$1 = 1;
|
|
49182
49124
|
var ComboChartV2$1 = function ComboChartV2(props) {
|
|
49183
49125
|
var _props$component = props.component,
|
|
49184
|
-
results = _props$component.results,
|
|
49185
49126
|
attributes = _props$component.attributes,
|
|
49186
49127
|
localFilters = _props$component.localFilters;
|
|
49187
49128
|
var _useDashboardContext = useDashboardContext(),
|
|
49188
49129
|
dashboard = _useDashboardContext.dashboard;
|
|
49189
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
49130
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
49190
49131
|
localFilters: localFilters,
|
|
49191
49132
|
globalFilters: props.globalFilters
|
|
49192
49133
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
49193
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
49134
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
49135
|
+
results = _useQueryEffect.results;
|
|
49194
49136
|
return jsx(ComboChartView$2, _extends({
|
|
49195
49137
|
id: props.id
|
|
49196
49138
|
}, attributes, {
|
|
@@ -50982,9 +50924,6 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
50982
50924
|
useEffect(function () {
|
|
50983
50925
|
return setSelectedRow(undefined);
|
|
50984
50926
|
}, [props.queriesAreChanging]);
|
|
50985
|
-
var _useState = useState(),
|
|
50986
|
-
results = _useState[0],
|
|
50987
|
-
_setResults = _useState[1];
|
|
50988
50927
|
var expanded = selectedRow !== undefined;
|
|
50989
50928
|
var hasDrilldown = drilldown && (drilldown == null ? void 0 : drilldown.length) > 0;
|
|
50990
50929
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
@@ -51010,13 +50949,7 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
51010
50949
|
renderTableCell: handleRenderTableCell
|
|
51011
50950
|
}))
|
|
51012
50951
|
}), (props == null ? void 0 : props.drilldownInputProps) && expanded && hasDrilldown && jsx(DrilldownRow, {
|
|
51013
|
-
setResults: function setResults(value) {
|
|
51014
|
-
return _setResults({
|
|
51015
|
-
results: value
|
|
51016
|
-
});
|
|
51017
|
-
},
|
|
51018
50952
|
dataSet: dataSet,
|
|
51019
|
-
result: results == null ? void 0 : results.results[0],
|
|
51020
50953
|
drilldownInputProps: props == null ? void 0 : props.drilldownInputProps,
|
|
51021
50954
|
drilldown: drilldown,
|
|
51022
50955
|
selectedRow: selectedRow,
|
|
@@ -51029,10 +50962,10 @@ var DataTableRow = function DataTableRow(props) {
|
|
|
51029
50962
|
});
|
|
51030
50963
|
};
|
|
51031
50964
|
var DrilldownRow = function DrilldownRow(props) {
|
|
51032
|
-
var
|
|
51033
|
-
var
|
|
51034
|
-
offset =
|
|
51035
|
-
setOffset =
|
|
50965
|
+
var _tableRepresentation$;
|
|
50966
|
+
var _useState = useState(0),
|
|
50967
|
+
offset = _useState[0],
|
|
50968
|
+
setOffset = _useState[1];
|
|
51036
50969
|
var _props$drilldownInput = props.drilldownInputProps,
|
|
51037
50970
|
component = _props$drilldownInput.component,
|
|
51038
50971
|
runQueriesCallback = _props$drilldownInput.runQueriesCallback;
|
|
@@ -51046,10 +50979,12 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51046
50979
|
variables = _useDashboardBehaviou2.variables,
|
|
51047
50980
|
valueAlias = _useDashboardBehaviou2.valueAlias;
|
|
51048
50981
|
var updatedAttributes = buildDrilldownAttributes(component.attributes, decodeId(props.drilldown[0].subsetDimension, queryEngineConfig), props.dimension, props.selectedRow, offset);
|
|
51049
|
-
useQueryEffect(updatedAttributes, runQueriesCallback,
|
|
51050
|
-
|
|
51051
|
-
|
|
51052
|
-
|
|
50982
|
+
var _useQueryEffect = useQueryEffect(updatedAttributes, runQueriesCallback, {
|
|
50983
|
+
localFilters: component.localFilters,
|
|
50984
|
+
globalFilters: props.drilldownInputProps.globalFilters
|
|
50985
|
+
}, props.dataSet, undefined, variables),
|
|
50986
|
+
_useQueryEffect$resul = _useQueryEffect.results,
|
|
50987
|
+
result = _useQueryEffect$resul[0];
|
|
51053
50988
|
var nullReplacementWithFieldId = function nullReplacementWithFieldId(fieldId) {
|
|
51054
50989
|
return checkForNullValue(props.dataSet.id, [{
|
|
51055
50990
|
field: fieldId,
|
|
@@ -51059,7 +50994,7 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51059
50994
|
var tableRepresentation = useMemo(function () {
|
|
51060
50995
|
return buildTableRepresentation({
|
|
51061
50996
|
type: updatedAttributes.type,
|
|
51062
|
-
result:
|
|
50997
|
+
result: result,
|
|
51063
50998
|
exportNames: updatedAttributes.exportNames,
|
|
51064
50999
|
prefixes: updatedAttributes.prefixes,
|
|
51065
51000
|
dateTimeFormat: updatedAttributes.dateTimeFormat,
|
|
@@ -51079,10 +51014,10 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51079
51014
|
hiddenFields: updatedAttributes.hiddenFields,
|
|
51080
51015
|
valueAlias: valueAlias
|
|
51081
51016
|
});
|
|
51082
|
-
}, [updatedAttributes.type,
|
|
51017
|
+
}, [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]);
|
|
51083
51018
|
var TableFooter = useMemo(function () {
|
|
51084
51019
|
return jsx(Fragment$1, {
|
|
51085
|
-
children:
|
|
51020
|
+
children: result && jsx(Pagination, {
|
|
51086
51021
|
offset: offset,
|
|
51087
51022
|
limit: limit,
|
|
51088
51023
|
onNext: function onNext() {
|
|
@@ -51102,10 +51037,10 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51102
51037
|
textOverride: textOverride
|
|
51103
51038
|
})
|
|
51104
51039
|
});
|
|
51105
|
-
}, [offset, limit,
|
|
51040
|
+
}, [offset, limit, result == null ? void 0 : result.content.length, setOffset, tableRepresentation == null ? void 0 : tableRepresentation.content.length]);
|
|
51106
51041
|
var hidePaginations = offset === 0 && ((_tableRepresentation$ = tableRepresentation == null ? void 0 : tableRepresentation.content.length) != null ? _tableRepresentation$ : 0) < (limit != null ? limit : 0);
|
|
51107
51042
|
var columnsNumber = props == null ? void 0 : props.tableRowProps.row.length;
|
|
51108
|
-
if (isLoading(
|
|
51043
|
+
if (isLoading(result)) return jsx(Table.TR, {
|
|
51109
51044
|
level: 2,
|
|
51110
51045
|
children: jsx(Table.TH, {
|
|
51111
51046
|
colSpan: columnsNumber,
|
|
@@ -51114,7 +51049,7 @@ var DrilldownRow = function DrilldownRow(props) {
|
|
|
51114
51049
|
})
|
|
51115
51050
|
})
|
|
51116
51051
|
});
|
|
51117
|
-
if (hasFailed(
|
|
51052
|
+
if (hasFailed(result)) return jsx(FailedToLoadDataNotice, {});
|
|
51118
51053
|
return jsxs(Fragment, {
|
|
51119
51054
|
children: [(tableRepresentation == null ? void 0 : tableRepresentation.content) && jsx(Fragment, {
|
|
51120
51055
|
children: (tableRepresentation == null ? void 0 : tableRepresentation.content.length) > 0 ? jsx(Fragment, {
|
|
@@ -51570,14 +51505,14 @@ var DataTableView$1 = (function (props) {
|
|
|
51570
51505
|
|
|
51571
51506
|
var DataTable$2 = function DataTable(props) {
|
|
51572
51507
|
var _props$component = props.component,
|
|
51573
|
-
results = _props$component.results,
|
|
51574
51508
|
attributes = _props$component.attributes,
|
|
51575
51509
|
localFilters = _props$component.localFilters;
|
|
51576
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
51510
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
51577
51511
|
localFilters: localFilters,
|
|
51578
51512
|
globalFilters: props.globalFilters
|
|
51579
51513
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
51580
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
51514
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
51515
|
+
results = _useQueryEffect.results;
|
|
51581
51516
|
var onNext = function onNext() {
|
|
51582
51517
|
var _attributes$limit, _attributes$offset, _results$0$content$le, _results$;
|
|
51583
51518
|
if (!hasNext({
|
|
@@ -51839,14 +51774,13 @@ var FunnelChart$2 = function FunnelChart(props) {
|
|
|
51839
51774
|
var _useState = useState(props.component.attributes),
|
|
51840
51775
|
attributes = _useState[0],
|
|
51841
51776
|
setAttributes = _useState[1];
|
|
51842
|
-
var
|
|
51843
|
-
localFilters = _props$component.localFilters,
|
|
51844
|
-
results = _props$component.results;
|
|
51777
|
+
var localFilters = props.component.localFilters;
|
|
51845
51778
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
51846
51779
|
localFilters: localFilters,
|
|
51847
51780
|
globalFilters: props.globalFilters
|
|
51848
|
-
}, props.updateComponentAttributes, props.runQueriesCallback
|
|
51849
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
51781
|
+
}, props.updateComponentAttributes, props.runQueriesCallback),
|
|
51782
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
51783
|
+
results = _useComponentEffect.results;
|
|
51850
51784
|
useEffect(function () {
|
|
51851
51785
|
if (!queriesAreChanging) {
|
|
51852
51786
|
setAttributes(props.component.attributes);
|
|
@@ -51956,14 +51890,14 @@ var View$2 = (function (props) {
|
|
|
51956
51890
|
|
|
51957
51891
|
var MercatorMap$3 = function MercatorMap(props) {
|
|
51958
51892
|
var _props$component = props.component,
|
|
51959
|
-
results = _props$component.results,
|
|
51960
51893
|
attributes = _props$component.attributes,
|
|
51961
51894
|
localFilters = _props$component.localFilters;
|
|
51962
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
51895
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
51963
51896
|
localFilters: localFilters,
|
|
51964
51897
|
globalFilters: props.globalFilters
|
|
51965
51898
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
51966
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
51899
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
51900
|
+
results = _useQueryEffect.results;
|
|
51967
51901
|
return jsx(View$2, _extends({}, attributes, {
|
|
51968
51902
|
id: props.id,
|
|
51969
51903
|
result: results && results[0],
|
|
@@ -52222,14 +52156,14 @@ ProgressView$1.defaultProps = defaultProps$9;
|
|
|
52222
52156
|
var Progress$2 = function Progress(props) {
|
|
52223
52157
|
var _props$dashboardBehav;
|
|
52224
52158
|
var _props$component = props.component,
|
|
52225
|
-
results = _props$component.results,
|
|
52226
52159
|
attributes = _props$component.attributes,
|
|
52227
52160
|
localFilters = _props$component.localFilters;
|
|
52228
|
-
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback,
|
|
52161
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
52229
52162
|
localFilters: localFilters,
|
|
52230
52163
|
globalFilters: props.globalFilters
|
|
52231
52164
|
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
52232
|
-
queriesAreChanging = _useQueryEffect.queriesAreChanging
|
|
52165
|
+
queriesAreChanging = _useQueryEffect.queriesAreChanging,
|
|
52166
|
+
results = _useQueryEffect.results;
|
|
52233
52167
|
return jsx(ProgressView$1, _extends({}, attributes, {
|
|
52234
52168
|
id: props.id,
|
|
52235
52169
|
dataSet: props.dataSet,
|
|
@@ -52718,18 +52652,17 @@ var RadarChart$3 = function RadarChart(_ref) {
|
|
|
52718
52652
|
runQueriesCallback = _ref.runQueriesCallback,
|
|
52719
52653
|
setLocalFilters = _ref.setLocalFilters,
|
|
52720
52654
|
_setPartialAttributes = _ref.setPartialAttributes,
|
|
52721
|
-
setResults = _ref.setResults,
|
|
52722
52655
|
updateComponentAttributes = _ref.updateComponentAttributes;
|
|
52723
|
-
var localFilters = component.localFilters
|
|
52724
|
-
results = component.results;
|
|
52656
|
+
var localFilters = component.localFilters;
|
|
52725
52657
|
var _useState = useState(component.attributes),
|
|
52726
52658
|
attributes = _useState[0],
|
|
52727
52659
|
setAttributes = _useState[1];
|
|
52728
52660
|
var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
52729
52661
|
localFilters: localFilters,
|
|
52730
52662
|
globalFilters: globalFilters
|
|
52731
|
-
}, updateComponentAttributes, runQueriesCallback,
|
|
52732
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
52663
|
+
}, updateComponentAttributes, runQueriesCallback, dashboardBehaviour.variables),
|
|
52664
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
52665
|
+
results = _useComponentEffect.results;
|
|
52733
52666
|
useEffect(function () {
|
|
52734
52667
|
if (!queriesAreChanging) {
|
|
52735
52668
|
setAttributes(component.attributes);
|
|
@@ -52802,14 +52735,14 @@ var RichText$2 = function RichText(_props) {
|
|
|
52802
52735
|
var SingleStat$2 = function SingleStat(props) {
|
|
52803
52736
|
var _props$dashboardBehav;
|
|
52804
52737
|
var _props$component = props.component,
|
|
52805
|
-
results = _props$component.results,
|
|
52806
52738
|
attributes = _props$component.attributes,
|
|
52807
52739
|
localFilters = _props$component.localFilters;
|
|
52808
52740
|
var _useComponentEffect = useComponentEffect(attributes, props.dataSet, props.dashboardBehaviour.queryEngineConfig, {
|
|
52809
52741
|
localFilters: localFilters,
|
|
52810
52742
|
globalFilters: props.globalFilters
|
|
52811
|
-
}, props.updateComponentAttributes, props.runQueriesCallback, props.
|
|
52812
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
52743
|
+
}, props.updateComponentAttributes, props.runQueriesCallback, props.dashboardBehaviour.variables),
|
|
52744
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
52745
|
+
results = _useComponentEffect.results;
|
|
52813
52746
|
return jsx(SingleStatView, _extends({}, attributes, {
|
|
52814
52747
|
id: props.id,
|
|
52815
52748
|
dataSet: props.dataSet,
|
|
@@ -53172,13 +53105,12 @@ var SunburstChartView = function SunburstChartView(props) {
|
|
|
53172
53105
|
};
|
|
53173
53106
|
|
|
53174
53107
|
var SunburstChart$2 = function SunburstChart(props) {
|
|
53175
|
-
var
|
|
53176
|
-
|
|
53177
|
-
|
|
53178
|
-
|
|
53179
|
-
|
|
53180
|
-
|
|
53181
|
-
}, props.dataSet, undefined, props.dashboardBehaviour.variables);
|
|
53108
|
+
var attributes = props.component.attributes;
|
|
53109
|
+
var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, {
|
|
53110
|
+
localFilters: props.component.localFilters,
|
|
53111
|
+
globalFilters: props.globalFilters
|
|
53112
|
+
}, props.dataSet, undefined, props.dashboardBehaviour.variables),
|
|
53113
|
+
results = _useQueryEffect.results;
|
|
53182
53114
|
var params = {
|
|
53183
53115
|
defaultFormats: props.dashboardBehaviour.defaultFormats,
|
|
53184
53116
|
dateTimeFormatOptions: props.dashboardBehaviour.dateTimeFormatOptions,
|
|
@@ -54141,18 +54073,17 @@ var WaterfallChart$3 = function WaterfallChart(_ref) {
|
|
|
54141
54073
|
runQueriesCallback = _ref.runQueriesCallback,
|
|
54142
54074
|
setLocalFilters = _ref.setLocalFilters,
|
|
54143
54075
|
_setPartialAttributes = _ref.setPartialAttributes,
|
|
54144
|
-
setResults = _ref.setResults,
|
|
54145
54076
|
updateComponentAttributes = _ref.updateComponentAttributes;
|
|
54146
|
-
var localFilters = component.localFilters
|
|
54147
|
-
results = component.results;
|
|
54077
|
+
var localFilters = component.localFilters;
|
|
54148
54078
|
var _useState = useState(component.attributes),
|
|
54149
54079
|
attributes = _useState[0],
|
|
54150
54080
|
setAttributes = _useState[1];
|
|
54151
54081
|
var _useComponentEffect = useComponentEffect(component.attributes, dataSet, dashboardBehaviour.queryEngineConfig, {
|
|
54152
54082
|
localFilters: localFilters,
|
|
54153
54083
|
globalFilters: globalFilters
|
|
54154
|
-
}, updateComponentAttributes, runQueriesCallback,
|
|
54155
|
-
queriesAreChanging = _useComponentEffect.queriesAreChanging
|
|
54084
|
+
}, updateComponentAttributes, runQueriesCallback, dashboardBehaviour.variables),
|
|
54085
|
+
queriesAreChanging = _useComponentEffect.queriesAreChanging,
|
|
54086
|
+
results = _useComponentEffect.results;
|
|
54156
54087
|
useEffect(function () {
|
|
54157
54088
|
if (!queriesAreChanging) {
|
|
54158
54089
|
setAttributes(component.attributes);
|
|
@@ -54251,7 +54182,6 @@ var Component = function Component(props) {
|
|
|
54251
54182
|
dataSet: dataSet,
|
|
54252
54183
|
runQueriesCallback: props.runQueriesCallback,
|
|
54253
54184
|
component: props.component,
|
|
54254
|
-
setResults: props.setResults,
|
|
54255
54185
|
globalFilters: dashboard.globalFilters,
|
|
54256
54186
|
dashboardBehaviour: dashboardBehaviour,
|
|
54257
54187
|
sm: smallVersion,
|
|
@@ -54275,7 +54205,6 @@ var Component = function Component(props) {
|
|
|
54275
54205
|
dataSet: dataSet,
|
|
54276
54206
|
runQueriesCallback: props.runQueriesCallback,
|
|
54277
54207
|
component: props.component,
|
|
54278
|
-
setResults: props.setResults,
|
|
54279
54208
|
globalFilters: dashboard.globalFilters,
|
|
54280
54209
|
dashboardBehaviour: dashboardBehaviour,
|
|
54281
54210
|
sm: smallVersion,
|
|
@@ -54302,7 +54231,6 @@ var Component = function Component(props) {
|
|
|
54302
54231
|
},
|
|
54303
54232
|
runQueriesCallback: props.runQueriesCallback,
|
|
54304
54233
|
component: props.component,
|
|
54305
|
-
setResults: props.setResults,
|
|
54306
54234
|
globalFilters: dashboard.globalFilters,
|
|
54307
54235
|
dashboardBehaviour: dashboardBehaviour,
|
|
54308
54236
|
library: props == null ? void 0 : props.library,
|
|
@@ -54328,7 +54256,6 @@ var Component = function Component(props) {
|
|
|
54328
54256
|
return _updateComponentAttributes(newAttributes);
|
|
54329
54257
|
},
|
|
54330
54258
|
component: props.component,
|
|
54331
|
-
setResults: props.setResults,
|
|
54332
54259
|
globalFilters: dashboard.globalFilters,
|
|
54333
54260
|
dashboardBehaviour: dashboardBehaviour,
|
|
54334
54261
|
sm: smallVersion,
|
|
@@ -54354,7 +54281,6 @@ var Component = function Component(props) {
|
|
|
54354
54281
|
dataSet: dataSet,
|
|
54355
54282
|
runQueriesCallback: props.runQueriesCallback,
|
|
54356
54283
|
component: props.component,
|
|
54357
|
-
setResults: props.setResults,
|
|
54358
54284
|
globalFilters: dashboard.globalFilters,
|
|
54359
54285
|
dashboardBehaviour: dashboardBehaviour,
|
|
54360
54286
|
sm: smallVersion,
|
|
@@ -54384,7 +54310,6 @@ var Component = function Component(props) {
|
|
|
54384
54310
|
},
|
|
54385
54311
|
runQueriesCallback: props.runQueriesCallback,
|
|
54386
54312
|
component: props.component,
|
|
54387
|
-
setResults: props.setResults,
|
|
54388
54313
|
globalFilters: dashboard.globalFilters,
|
|
54389
54314
|
dashboardBehaviour: dashboardBehaviour,
|
|
54390
54315
|
sm: smallVersion,
|
|
@@ -54411,7 +54336,6 @@ var Component = function Component(props) {
|
|
|
54411
54336
|
},
|
|
54412
54337
|
runQueriesCallback: props.runQueriesCallback,
|
|
54413
54338
|
component: props.component,
|
|
54414
|
-
setResults: props.setResults,
|
|
54415
54339
|
globalFilters: dashboard.globalFilters,
|
|
54416
54340
|
dashboardBehaviour: dashboardBehaviour,
|
|
54417
54341
|
library: props == null ? void 0 : props.library,
|
|
@@ -54437,7 +54361,6 @@ var Component = function Component(props) {
|
|
|
54437
54361
|
},
|
|
54438
54362
|
runQueriesCallback: props.runQueriesCallback,
|
|
54439
54363
|
component: props.component,
|
|
54440
|
-
setResults: props.setResults,
|
|
54441
54364
|
globalFilters: dashboard.globalFilters,
|
|
54442
54365
|
dashboardBehaviour: dashboardBehaviour,
|
|
54443
54366
|
library: props == null ? void 0 : props.library,
|
|
@@ -54463,7 +54386,6 @@ var Component = function Component(props) {
|
|
|
54463
54386
|
},
|
|
54464
54387
|
runQueriesCallback: props.runQueriesCallback,
|
|
54465
54388
|
component: props.component,
|
|
54466
|
-
setResults: props.setResults,
|
|
54467
54389
|
globalFilters: dashboard.globalFilters,
|
|
54468
54390
|
dashboardBehaviour: dashboardBehaviour,
|
|
54469
54391
|
library: props == null ? void 0 : props.library,
|
|
@@ -54486,7 +54408,6 @@ var Component = function Component(props) {
|
|
|
54486
54408
|
dataSet: dataSet,
|
|
54487
54409
|
runQueriesCallback: props.runQueriesCallback,
|
|
54488
54410
|
component: props.component,
|
|
54489
|
-
setResults: props.setResults,
|
|
54490
54411
|
globalFilters: dashboard.globalFilters,
|
|
54491
54412
|
dashboardBehaviour: dashboardBehaviour,
|
|
54492
54413
|
library: props == null ? void 0 : props.library,
|
|
@@ -54510,7 +54431,6 @@ var Component = function Component(props) {
|
|
|
54510
54431
|
dataSet: dataSet,
|
|
54511
54432
|
runQueriesCallback: props.runQueriesCallback,
|
|
54512
54433
|
component: props.component,
|
|
54513
|
-
setResults: props.setResults,
|
|
54514
54434
|
globalFilters: dashboard.globalFilters,
|
|
54515
54435
|
dashboardBehaviour: dashboardBehaviour,
|
|
54516
54436
|
library: props == null ? void 0 : props.library,
|
|
@@ -54534,7 +54454,6 @@ var Component = function Component(props) {
|
|
|
54534
54454
|
dataSet: dataSet,
|
|
54535
54455
|
runQueriesCallback: props.runQueriesCallback,
|
|
54536
54456
|
component: props.component,
|
|
54537
|
-
setResults: props.setResults,
|
|
54538
54457
|
globalFilters: dashboard.globalFilters,
|
|
54539
54458
|
dashboardBehaviour: dashboardBehaviour,
|
|
54540
54459
|
library: props == null ? void 0 : props.library,
|
|
@@ -54558,7 +54477,6 @@ var Component = function Component(props) {
|
|
|
54558
54477
|
dataSet: dataSet,
|
|
54559
54478
|
runQueriesCallback: props.runQueriesCallback,
|
|
54560
54479
|
component: props.component,
|
|
54561
|
-
setResults: props.setResults,
|
|
54562
54480
|
globalFilters: dashboard.globalFilters,
|
|
54563
54481
|
dashboardBehaviour: dashboardBehaviour,
|
|
54564
54482
|
library: props == null ? void 0 : props.library,
|
|
@@ -54585,7 +54503,6 @@ var Component = function Component(props) {
|
|
|
54585
54503
|
dataSet: dataSet,
|
|
54586
54504
|
runQueriesCallback: props.runQueriesCallback,
|
|
54587
54505
|
component: props.component,
|
|
54588
|
-
setResults: props.setResults,
|
|
54589
54506
|
globalFilters: dashboard.globalFilters,
|
|
54590
54507
|
dashboardBehaviour: dashboardBehaviour,
|
|
54591
54508
|
library: props == null ? void 0 : props.library,
|
|
@@ -54609,7 +54526,6 @@ var Component = function Component(props) {
|
|
|
54609
54526
|
dataSet: dataSet,
|
|
54610
54527
|
runQueriesCallback: props.runQueriesCallback,
|
|
54611
54528
|
component: props.component,
|
|
54612
|
-
setResults: props.setResults,
|
|
54613
54529
|
globalFilters: dashboard.globalFilters,
|
|
54614
54530
|
updateComponentAttributes: function updateComponentAttributes(newAttributes) {
|
|
54615
54531
|
return _updateComponentAttributes(newAttributes);
|
|
@@ -54636,7 +54552,6 @@ var Component = function Component(props) {
|
|
|
54636
54552
|
dataSet: dataSet,
|
|
54637
54553
|
runQueriesCallback: props.runQueriesCallback,
|
|
54638
54554
|
component: props.component,
|
|
54639
|
-
setResults: props.setResults,
|
|
54640
54555
|
globalFilters: dashboard.globalFilters,
|
|
54641
54556
|
dashboardBehaviour: dashboardBehaviour,
|
|
54642
54557
|
sm: smallVersion,
|
|
@@ -54684,7 +54599,6 @@ var Component = function Component(props) {
|
|
|
54684
54599
|
dataSet: dataSet,
|
|
54685
54600
|
runQueriesCallback: props.runQueriesCallback,
|
|
54686
54601
|
component: props.component,
|
|
54687
|
-
setResults: props.setResults,
|
|
54688
54602
|
globalFilters: dashboard.globalFilters,
|
|
54689
54603
|
dashboardBehaviour: dashboardBehaviour
|
|
54690
54604
|
})
|
|
@@ -54707,7 +54621,6 @@ var Component = function Component(props) {
|
|
|
54707
54621
|
return _updateComponentAttributes(newAttributes);
|
|
54708
54622
|
},
|
|
54709
54623
|
component: props.component,
|
|
54710
|
-
setResults: props.setResults,
|
|
54711
54624
|
globalFilters: dashboard.globalFilters,
|
|
54712
54625
|
dashboardBehaviour: dashboardBehaviour,
|
|
54713
54626
|
sm: smallVersion,
|
|
@@ -54734,7 +54647,6 @@ var Component = function Component(props) {
|
|
|
54734
54647
|
dataSet: dataSet,
|
|
54735
54648
|
runQueriesCallback: props.runQueriesCallback,
|
|
54736
54649
|
component: props.component,
|
|
54737
|
-
setResults: props.setResults,
|
|
54738
54650
|
globalFilters: dashboard.globalFilters,
|
|
54739
54651
|
dashboardBehaviour: dashboardBehaviour,
|
|
54740
54652
|
library: props == null ? void 0 : props.library,
|
|
@@ -54762,7 +54674,6 @@ var Component = function Component(props) {
|
|
|
54762
54674
|
return _updateComponentAttributes(newAttributes);
|
|
54763
54675
|
},
|
|
54764
54676
|
component: props.component,
|
|
54765
|
-
setResults: props.setResults,
|
|
54766
54677
|
globalFilters: dashboard.globalFilters,
|
|
54767
54678
|
dashboardBehaviour: dashboardBehaviour,
|
|
54768
54679
|
library: props == null ? void 0 : props.library,
|
|
@@ -54788,7 +54699,6 @@ var Component = function Component(props) {
|
|
|
54788
54699
|
return _updateComponentAttributes(newAttributes);
|
|
54789
54700
|
},
|
|
54790
54701
|
component: props.component,
|
|
54791
|
-
setResults: props.setResults,
|
|
54792
54702
|
globalFilters: dashboard.globalFilters,
|
|
54793
54703
|
dashboardBehaviour: dashboardBehaviour,
|
|
54794
54704
|
library: props == null ? void 0 : props.library,
|
|
@@ -57594,18 +57504,6 @@ var ModalType = /*#__PURE__*/function (ModalType) {
|
|
|
57594
57504
|
----------------------------------------------
|
|
57595
57505
|
*/
|
|
57596
57506
|
|
|
57597
|
-
/*
|
|
57598
|
-
----------------------------------------------
|
|
57599
|
-
----------------------------------------------
|
|
57600
|
-
----------------------------------------------
|
|
57601
|
-
|
|
57602
|
-
Setting results
|
|
57603
|
-
|
|
57604
|
-
----------------------------------------------
|
|
57605
|
-
----------------------------------------------
|
|
57606
|
-
----------------------------------------------
|
|
57607
|
-
*/
|
|
57608
|
-
|
|
57609
57507
|
/*
|
|
57610
57508
|
----------------------------------------------
|
|
57611
57509
|
----------------------------------------------
|
|
@@ -58643,65 +58541,6 @@ var ParametersModalView = function ParametersModalView(props) {
|
|
|
58643
58541
|
});
|
|
58644
58542
|
};
|
|
58645
58543
|
|
|
58646
|
-
var ViewRawResultsModal = function ViewRawResultsModal(props) {
|
|
58647
|
-
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58648
|
-
textOverride = _useDashboardBehaviou.textOverride;
|
|
58649
|
-
var _useToastContext = useToastContext(),
|
|
58650
|
-
addToast = _useToastContext.addToast;
|
|
58651
|
-
return jsxs(Modal, {
|
|
58652
|
-
width: "4xl",
|
|
58653
|
-
isOpen: props == null ? void 0 : props.show,
|
|
58654
|
-
onClose: function onClose() {
|
|
58655
|
-
return props == null ? void 0 : props.onClose(false);
|
|
58656
|
-
},
|
|
58657
|
-
children: [jsx(Modal.Header, {
|
|
58658
|
-
title: textOverride('json_results', 'Data in raw JSON format'),
|
|
58659
|
-
show: true
|
|
58660
|
-
}), jsx(Modal.Content, {
|
|
58661
|
-
children: jsx(View, {
|
|
58662
|
-
maxHeight: "400px",
|
|
58663
|
-
overflowY: "scroll",
|
|
58664
|
-
children: jsx("pre", {
|
|
58665
|
-
"data-testid": "raw-results-" + props.rowIndex + "-" + props.cellIndex,
|
|
58666
|
-
children: JSON.stringify(props.results, null, 2)
|
|
58667
|
-
})
|
|
58668
|
-
})
|
|
58669
|
-
}), jsx(Modal.Footer, {
|
|
58670
|
-
buttons: "end",
|
|
58671
|
-
children: jsxs(ButtonGroup, {
|
|
58672
|
-
children: [jsx(Button, {
|
|
58673
|
-
secondary: true,
|
|
58674
|
-
testId: "modal-close-btn",
|
|
58675
|
-
onClick: function onClick() {
|
|
58676
|
-
return props == null ? void 0 : props.onClose(false);
|
|
58677
|
-
},
|
|
58678
|
-
children: textOverride('close', 'Close')
|
|
58679
|
-
}), jsx(Button, {
|
|
58680
|
-
primary: true,
|
|
58681
|
-
testId: "modal-copy-json-results-btn",
|
|
58682
|
-
onClick: function onClick() {
|
|
58683
|
-
var copied = copy(JSON.stringify(props.results));
|
|
58684
|
-
if (copied) {
|
|
58685
|
-
addToast(function () {
|
|
58686
|
-
return jsx(ToastSuccess, {
|
|
58687
|
-
message: "Copied results"
|
|
58688
|
-
});
|
|
58689
|
-
});
|
|
58690
|
-
} else {
|
|
58691
|
-
addToast(function () {
|
|
58692
|
-
return jsx(ToastError, {
|
|
58693
|
-
message: "Failed to copy results"
|
|
58694
|
-
});
|
|
58695
|
-
});
|
|
58696
|
-
}
|
|
58697
|
-
},
|
|
58698
|
-
children: textOverride('copy', 'Copy')
|
|
58699
|
-
})]
|
|
58700
|
-
})
|
|
58701
|
-
})]
|
|
58702
|
-
});
|
|
58703
|
-
};
|
|
58704
|
-
|
|
58705
58544
|
var ViewRawAttributesModal = function ViewRawAttributesModal(props) {
|
|
58706
58545
|
var _useDashboardBehaviou = useDashboardBehaviourContext(),
|
|
58707
58546
|
textOverride = _useDashboardBehaviou.textOverride;
|
|
@@ -59083,7 +58922,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59083
58922
|
localFiltersModal = _useState2[0],
|
|
59084
58923
|
showLocalFiltersModal = _useState2[1];
|
|
59085
58924
|
var _useState3 = useState(false),
|
|
59086
|
-
viewRawJSONResults = _useState3[0],
|
|
59087
58925
|
showViewRawJSONResults = _useState3[1];
|
|
59088
58926
|
var _useState4 = useState(false),
|
|
59089
58927
|
viewRawAttributes = _useState4[0],
|
|
@@ -59258,7 +59096,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59258
59096
|
isBeingSizeAdjusted: props.isBeingSizeAdjusted,
|
|
59259
59097
|
runQueriesCallback: props.runQueriesCallback,
|
|
59260
59098
|
component: props.component,
|
|
59261
|
-
setResults: props.setResults,
|
|
59262
59099
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
59263
59100
|
height: props.height
|
|
59264
59101
|
}), !showComponent && jsx(LoadingComponent, {})]
|
|
@@ -59284,14 +59121,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59284
59121
|
onClose: function onClose() {
|
|
59285
59122
|
return showParametersModal(false);
|
|
59286
59123
|
}
|
|
59287
|
-
}), jsx(ViewRawResultsModal, {
|
|
59288
|
-
cellIndex: props.cellIndex,
|
|
59289
|
-
rowIndex: props.rowIndex,
|
|
59290
|
-
show: viewRawJSONResults,
|
|
59291
|
-
results: props.component.results,
|
|
59292
|
-
onClose: function onClose() {
|
|
59293
|
-
return showViewRawJSONResults(false);
|
|
59294
|
-
}
|
|
59295
59124
|
}), jsx(ViewRawAttributesModal, {
|
|
59296
59125
|
cellIndex: props.cellIndex,
|
|
59297
59126
|
rowIndex: props.rowIndex,
|
|
@@ -59321,7 +59150,6 @@ var PopulatedCell = function PopulatedCell(props) {
|
|
|
59321
59150
|
isBeingSizeAdjusted: props.isBeingSizeAdjusted,
|
|
59322
59151
|
runQueriesCallback: props.runQueriesCallback,
|
|
59323
59152
|
component: props.component,
|
|
59324
|
-
setResults: props.setResults,
|
|
59325
59153
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
59326
59154
|
height: props.height
|
|
59327
59155
|
})
|
|
@@ -59987,14 +59815,6 @@ var ResizableRowCell = function ResizableRowCell(props) {
|
|
|
59987
59815
|
});
|
|
59988
59816
|
},
|
|
59989
59817
|
height: props.height,
|
|
59990
|
-
setResults: function setResults(results) {
|
|
59991
|
-
dispatch({
|
|
59992
|
-
type: 'setResultsForComponentInDisplay',
|
|
59993
|
-
rowIndex: rowIndex,
|
|
59994
|
-
cellIndex: cellIndex,
|
|
59995
|
-
results: results
|
|
59996
|
-
});
|
|
59997
|
-
},
|
|
59998
59818
|
onEdit: function onEdit() {
|
|
59999
59819
|
trackEvent('component.startEditing');
|
|
60000
59820
|
dispatch({
|
|
@@ -61299,9 +61119,6 @@ var ComponentInLibrary = function ComponentInLibrary(props) {
|
|
|
61299
61119
|
setLocalFilters: function setLocalFilters() {},
|
|
61300
61120
|
runQueriesCallback: props.runQueriesCallback,
|
|
61301
61121
|
component: component,
|
|
61302
|
-
setResults: function setResults(results) {
|
|
61303
|
-
return props.setResults(results, libraryIndex);
|
|
61304
|
-
},
|
|
61305
61122
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
61306
61123
|
library: true
|
|
61307
61124
|
})]
|
|
@@ -61624,7 +61441,6 @@ var ViewsInLibrary = function ViewsInLibrary(props) {
|
|
|
61624
61441
|
refIndex = _ref.refIndex;
|
|
61625
61442
|
return jsx(ComponentInLibrary, {
|
|
61626
61443
|
updateComponentAttributes: props.updateComponentAttributes,
|
|
61627
|
-
setResults: props.setResults,
|
|
61628
61444
|
component: item.component,
|
|
61629
61445
|
libraryIndex: refIndex,
|
|
61630
61446
|
onSelectComponent: props == null ? void 0 : props.onSelectComponent,
|
|
@@ -61667,20 +61483,6 @@ var Library = function Library() {
|
|
|
61667
61483
|
featureToggles = _useDashboardBehaviou.featureToggles,
|
|
61668
61484
|
textOverride = _useDashboardBehaviou.textOverride;
|
|
61669
61485
|
var canEditComponentLibrary = featureToggles.canEditComponentLibrary;
|
|
61670
|
-
var setResults = function setResults(results, libraryIndex) {
|
|
61671
|
-
dispatch({
|
|
61672
|
-
type: 'setResultsForComponentInLibrary',
|
|
61673
|
-
results: results,
|
|
61674
|
-
libraryIndex: libraryIndex
|
|
61675
|
-
});
|
|
61676
|
-
};
|
|
61677
|
-
var setFocussedComponentResults = function setFocussedComponentResults(results) {
|
|
61678
|
-
dispatch({
|
|
61679
|
-
type: 'setResultsForComponentInLibrary',
|
|
61680
|
-
results: results,
|
|
61681
|
-
libraryIndex: selectedLibraryIndex
|
|
61682
|
-
});
|
|
61683
|
-
};
|
|
61684
61486
|
var selectComponentFromLibrary = function selectComponentFromLibrary() {
|
|
61685
61487
|
dispatch({
|
|
61686
61488
|
type: 'pickComponentFromLibraryForDisplay',
|
|
@@ -61748,10 +61550,8 @@ var Library = function Library() {
|
|
|
61748
61550
|
onClose: clearModal,
|
|
61749
61551
|
onSelect: selectComponentFromLibrary,
|
|
61750
61552
|
updateComponentAttributes: updateComponentAttributes,
|
|
61751
|
-
setFocussedComponentResults: setFocussedComponentResults,
|
|
61752
61553
|
dashboard: dashboard,
|
|
61753
61554
|
selectedLibraryIndex: selectedLibraryIndex,
|
|
61754
|
-
setResults: setResults,
|
|
61755
61555
|
canEditComponentLibrary: canEditComponentLibrary,
|
|
61756
61556
|
onEdit: startEditingSelectedComponent,
|
|
61757
61557
|
onDelete: setShowDeleteConfirmationModal,
|
|
@@ -61794,7 +61594,6 @@ var ViewLibraryDisplay = function ViewLibraryDisplay(props) {
|
|
|
61794
61594
|
"data-component": "library-content",
|
|
61795
61595
|
children: jsx(ViewsInLibrary, {
|
|
61796
61596
|
runQueriesCallback: props == null ? void 0 : props.runQueriesCallback,
|
|
61797
|
-
setResults: props == null ? void 0 : props.setResults,
|
|
61798
61597
|
components: props.dashboard.componentLibrary,
|
|
61799
61598
|
onSelectComponent: function onSelectComponent(index) {
|
|
61800
61599
|
return props == null ? void 0 : props.onSelectComponent(index);
|
|
@@ -65046,14 +64845,12 @@ var handleFeedbackMessage = function handleFeedbackMessage(_ref) {
|
|
|
65046
64845
|
|
|
65047
64846
|
// By using message ids we ensure there will only be 1 message of a type, and it can be easily removed
|
|
65048
64847
|
var chartDimensionMessageId = 'grouping';
|
|
65049
|
-
var limitWarningMessageId = 'limit';
|
|
65050
64848
|
var EditorComponent = function EditorComponent(props) {
|
|
65051
64849
|
var _theme$editor$gap, _theme$editor, _theme$editor2, _props$usingBeta, _theme$editor3;
|
|
65052
64850
|
var theme = useTheme();
|
|
65053
64851
|
var editorFeedback = useEditorFeedback();
|
|
65054
64852
|
var _props$editor = props.editor,
|
|
65055
64853
|
setAttributes = _props$editor.setAttributes,
|
|
65056
|
-
setResults = _props$editor.setResults,
|
|
65057
64854
|
runQueriesCallback = _props$editor.runQueriesCallback,
|
|
65058
64855
|
component = _props$editor.component,
|
|
65059
64856
|
dataSet = _props$editor.dataSet,
|
|
@@ -65074,26 +64871,25 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65074
64871
|
editorFeedback.removeFeedbackMessage(chartDimensionMessageId);
|
|
65075
64872
|
};
|
|
65076
64873
|
}, [component.attributes]);
|
|
65077
|
-
|
|
65078
|
-
|
|
65079
|
-
|
|
65080
|
-
|
|
65081
|
-
|
|
65082
|
-
|
|
65083
|
-
|
|
65084
|
-
|
|
65085
|
-
|
|
65086
|
-
|
|
65087
|
-
|
|
65088
|
-
|
|
65089
|
-
|
|
65090
|
-
|
|
65091
|
-
|
|
65092
|
-
|
|
65093
|
-
|
|
65094
|
-
|
|
65095
|
-
|
|
65096
|
-
}, [component.results]);
|
|
64874
|
+
|
|
64875
|
+
// useEffect(() => {
|
|
64876
|
+
// handleFeedbackMessage({
|
|
64877
|
+
// message: {
|
|
64878
|
+
// id: limitWarningMessageId,
|
|
64879
|
+
// type: 'info',
|
|
64880
|
+
// children: `More data is available for this view. Increase 'Limit' (Advanced Options) to show all data.`,
|
|
64881
|
+
// },
|
|
64882
|
+
// showCondition: component.results.some((result) => result?.hasMoreResults),
|
|
64883
|
+
// hideCondition: !component.results.some((result) => result?.hasMoreResults),
|
|
64884
|
+
// addFeedbackMessage: editorFeedback.addFeedbackMessage,
|
|
64885
|
+
// removeFeedbackMessage: editorFeedback.removeFeedbackMessage,
|
|
64886
|
+
// });
|
|
64887
|
+
|
|
64888
|
+
// return () => {
|
|
64889
|
+
// editorFeedback.removeFeedbackMessage(limitWarningMessageId);
|
|
64890
|
+
// };
|
|
64891
|
+
// }, [component.results]);
|
|
64892
|
+
|
|
65097
64893
|
return jsx(RichTextEditorContextProvider, {
|
|
65098
64894
|
setContent: function setContent(content) {
|
|
65099
64895
|
// @ts-ignore
|
|
@@ -65132,7 +64928,6 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65132
64928
|
isBeingSizeAdjusted: false,
|
|
65133
64929
|
setLocalFilters: props.editor.setLocalFilters,
|
|
65134
64930
|
runQueriesCallback: runQueriesCallback,
|
|
65135
|
-
setResults: setResults,
|
|
65136
64931
|
component: component,
|
|
65137
64932
|
updateComponentAttributes: setAttributes,
|
|
65138
64933
|
editor: true
|
|
@@ -65146,10 +64941,10 @@ var EditorComponent = function EditorComponent(props) {
|
|
|
65146
64941
|
|
|
65147
64942
|
var EditorModal = function EditorModal(props) {
|
|
65148
64943
|
var _theme$modals, _theme$modals2;
|
|
65149
|
-
var editor = useEditor();
|
|
65150
64944
|
var _React$useState = React__default.useState(false),
|
|
65151
64945
|
ai = _React$useState[0],
|
|
65152
64946
|
openAI = _React$useState[1];
|
|
64947
|
+
var editor = useEditor();
|
|
65153
64948
|
var usingBeta = useBetaFeatures();
|
|
65154
64949
|
var _useAIBehaviour = useAIBehaviour(),
|
|
65155
64950
|
fetchSuggestions = _useAIBehaviour.fetchSuggestions;
|
|
@@ -71053,7 +70848,6 @@ var buildComponentLibrary = function buildComponentLibrary(cells) {
|
|
|
71053
70848
|
newComponentLibrary.push({
|
|
71054
70849
|
attributes: cell.component.attributes,
|
|
71055
70850
|
localFilters: (_cell$localFilters2 = cell.localFilters) != null ? _cell$localFilters2 : [],
|
|
71056
|
-
results: [],
|
|
71057
70851
|
colSpan: 1,
|
|
71058
70852
|
reports: []
|
|
71059
70853
|
});
|