@vizzly/dashboard 0.14.4-dev-cbf41394775302d8f6b4a782f78abbf7128ea991 → 0.14.4-dev-470d6f9c95d1b6422dbe1be22378ce12cdf6580a

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.
Files changed (44) hide show
  1. package/dist/charts/src/BubbleChart/BubbleChart.d.ts +5 -0
  2. package/dist/charts/src/BubbleChart/VizzlyBubbleChart.d.ts +3 -0
  3. package/dist/charts/src/BubbleChart/index.d.ts +1 -0
  4. package/dist/charts/src/BubbleChart/types.d.ts +32 -0
  5. package/dist/charts/src/XYChart/types.d.ts +2 -0
  6. package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +6 -6
  7. package/dist/dashboard.cjs.development.js +1355 -102
  8. package/dist/dashboard.cjs.production.min.js +1 -1
  9. package/dist/dashboard.esm.js +1358 -105
  10. package/dist/results-driver/src/driver/VizzlyQuery/BubbleChart/toQueries.d.ts +10 -0
  11. package/dist/services/src/Services/View.d.ts +5 -1
  12. package/dist/shared-logic/src/BubbleChart/adjustTicks.d.ts +3 -0
  13. package/dist/shared-logic/src/BubbleChart/attributesSchema.d.ts +3 -0
  14. package/dist/shared-logic/src/BubbleChart/buildBubbleChartRepresentation.d.ts +39 -0
  15. package/dist/shared-logic/src/BubbleChart/buildTrendAndForecast.d.ts +25 -0
  16. package/dist/shared-logic/src/BubbleChart/constants.d.ts +3 -0
  17. package/dist/shared-logic/src/BubbleChart/getAxisFormattingFunction.d.ts +13 -0
  18. package/dist/shared-logic/src/BubbleChart/getConditionalFormatting.d.ts +7 -0
  19. package/dist/shared-logic/src/BubbleChart/getGoalLines.d.ts +8 -0
  20. package/dist/shared-logic/src/BubbleChart/getMinAndMax.d.ts +15 -0
  21. package/dist/shared-logic/src/BubbleChart/getScaleAndTicks.d.ts +42 -0
  22. package/dist/shared-logic/src/BubbleChart/getStyleDefinition.d.ts +8 -0
  23. package/dist/shared-logic/src/BubbleChart/getTrendsAndForecastsData.d.ts +41 -0
  24. package/dist/shared-logic/src/BubbleChart/index.d.ts +4 -0
  25. package/dist/shared-logic/src/BubbleChart/setAttributes.d.ts +4 -0
  26. package/dist/shared-logic/src/BubbleChart/types.d.ts +74 -0
  27. package/dist/shared-logic/src/Component/setAttributes.d.ts +1 -1
  28. package/dist/shared-logic/src/Component/types.d.ts +20 -3
  29. package/dist/shared-logic/src/ComponentInterface/types/namespaces.types.d.ts +8 -1
  30. package/dist/shared-logic/src/DataPanelConfig/types.d.ts +1 -1
  31. package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -1
  32. package/dist/shared-logic/src/getComponentInterface.d.ts +1 -0
  33. package/dist/shared-ui/src/api/useQueryEffect.d.ts +1 -1
  34. package/dist/shared-ui/src/components/BubbleChart/BubbleChart.d.ts +3 -0
  35. package/dist/shared-ui/src/components/BubbleChart/BubbleChartView.d.ts +16 -0
  36. package/dist/shared-ui/src/components/BubbleChart/index.d.ts +2 -0
  37. package/dist/shared-ui/src/components/Component/types.d.ts +3 -0
  38. package/dist/shared-ui/src/components/Icons/ComponentIcons.d.ts +1 -0
  39. package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +1 -1
  40. package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
  41. package/dist/shared-ui/src/components/Parameters/useParameters.d.ts +1 -1
  42. package/dist/shared-ui/src/library/DataPanel/FieldCollectorInput.d.ts +1 -1
  43. package/dist/shared-ui/src/library/DataPanel/MeasuresInput.d.ts +1 -1
  44. package/package.json +1 -1
@@ -28,7 +28,7 @@ import { preserveOffsetOnSource } from '@atlaskit/pragmatic-drag-and-drop/elemen
28
28
  import { dropTargetForExternal } from '@atlaskit/pragmatic-drag-and-drop/external/adapter';
29
29
  import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
30
30
  import { ParentSize } from '@visx/responsive';
31
- import { Annotation, AnnotationConnector, AnnotationLabel, DataContext, buildChartTheme, lightTheme, XYChart, Grid as Grid$1, Axis, AreaSeries, AreaStack, BarGroup, BarSeries, BarStack, GlyphSeries, LineSeries, Tooltip as Tooltip$2 } from '@visx/xychart';
31
+ import { Annotation, AnnotationConnector, AnnotationLabel, DataContext, buildChartTheme, lightTheme, XYChart, Grid as Grid$1, Axis, AreaSeries, AreaStack, BarGroup, BarSeries, BarStack, GlyphSeries, LineSeries, Tooltip as Tooltip$3 } from '@visx/xychart';
32
32
  import { LinearGradient } from '@visx/gradient';
33
33
  import { LegendItem as LegendItem$1, LegendLabel } from '@visx/legend';
34
34
  import { scaleOrdinal, scaleQuantize, scalePoint, scaleTime, scaleLinear, scaleBand } from '@visx/scale';
@@ -48,6 +48,7 @@ import { useWindowWidth } from '@react-hook/window-size';
48
48
  import copy from 'copy-to-clipboard';
49
49
  import html2canvas from 'html2canvas';
50
50
  import jsPDF from 'jspdf';
51
+ import { BubbleChart as BubbleChart$3 } from './charts/src/BubbleChart';
51
52
  import { RectClipPath } from '@visx/clip-path';
52
53
  import { localPoint } from '@visx/event';
53
54
  import { bisector } from '@visx/vendor/d3-array';
@@ -55,7 +56,6 @@ import { AxisBottom as AxisBottom$1, AxisLeft as AxisLeft$1 } from '@visx/axis';
55
56
  import { Text } from '@visx/text';
56
57
  import { GridRows as GridRows$1 } from '@visx/grid';
57
58
  import '@visx/point';
58
- import { WaterfallChart as WaterfallChart$4 } from './charts/src/v2/components/WaterfallChart';
59
59
  import VisibilitySensor from 'react-visibility-sensor';
60
60
  import ExcelJS from 'exceljs';
61
61
  import { saveAs } from 'file-saver';
@@ -8163,7 +8163,7 @@ var RichText = function RichText(config) {
8163
8163
  };
8164
8164
  };
8165
8165
 
8166
- var componentTypes = ['areaChart', 'barChart', 'basicTable', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8166
+ var componentTypes = ['areaChart', 'barChart', 'basicTable', 'bubbleChart', 'comboChart', 'custom', 'dataTable', 'funnelChart', 'horizontalBarChart', 'lineChart', 'lineChartV2', 'barChartV2', 'mercatorMap', 'pieChart', 'progress', 'richText', 'scatterChart', 'singleStat', 'waterfallChart'];
8167
8167
  /** @deprecated */
8168
8168
 
8169
8169
  var ProgressType = /*#__PURE__*/function (ProgressType) {
@@ -8931,6 +8931,405 @@ function isStatsLabels(panel) {
8931
8931
  }
8932
8932
 
8933
8933
  var attributesSchema$e = function attributesSchema(config) {
8934
+ return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), {
8935
+ xMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8936
+ yMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8937
+ zMeasure: measureSchema(config.queryEngineConfig.supportedAggregates, config.attributesSchemaOptions).allow(null),
8938
+ dimension: dimensionSchema(config.queryEngineConfig.supportedTimeTruncFunctions, config.attributesSchemaOptions),
8939
+ order: Joi.array().items(orderSchema(config.queryEngineConfig)),
8940
+ limit: queryAttributesLimit(),
8941
+ legend: Joi.valid(true, false),
8942
+ offset: Joi.number().min(0),
8943
+ filter: queryAttributesFilter(config.queryEngineConfig),
8944
+ type: Joi.valid('bubbleChart').required(),
8945
+ timeDimension: Joi.valid(null),
8946
+ xAxisPrefix: Joi.string().allow(''),
8947
+ yAxisPrefix: Joi.string().allow(''),
8948
+ xAxisPostfix: Joi.string().allow(''),
8949
+ yAxisPostfix: Joi.string().allow(''),
8950
+ yAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
8951
+ xAxisFormat: Joi.alternatives(Joi.string(), Joi.valid(null)),
8952
+ approxYAxisLabelCount: approxAxisLabelCountSchema,
8953
+ approxXAxisLabelCount: approxAxisLabelCountSchema,
8954
+ goalLines: goalLinesSchema(),
8955
+ axisTitles: axisTitleSchema(),
8956
+ tags: tagsSchema()
8957
+ }));
8958
+ };
8959
+
8960
+ var setAttributes$d = (function (config) {
8961
+ return function (bubbleChart, partial) {
8962
+ var newAttributes = setAttributes(bubbleChart, partial, attributesSchema$e(config));
8963
+ console.log(newAttributes, 'HERE');
8964
+ var allowedOrderSpec = [];
8965
+ if (newAttributes.xMeasure) {
8966
+ allowedOrderSpec.push(newAttributes.xMeasure);
8967
+ }
8968
+ if (newAttributes.yMeasure) {
8969
+ allowedOrderSpec.push(newAttributes.yMeasure);
8970
+ }
8971
+ if (newAttributes.zMeasure) {
8972
+ allowedOrderSpec.push(newAttributes.zMeasure);
8973
+ }
8974
+
8975
+ // Add dimension fields as valid to keep in order
8976
+ newAttributes.dimension.forEach(function (dimension) {
8977
+ allowedOrderSpec.push({
8978
+ field: dimension.field,
8979
+ "function": dimension["function"]
8980
+ });
8981
+ });
8982
+ newAttributes = trimFieldsInOrder(newAttributes, allowedOrderSpec);
8983
+ return newAttributes;
8984
+ };
8985
+ });
8986
+
8987
+ var CONSTANTS$g = {
8988
+ title: 'Bubble chart',
8989
+ description: 'Displays data points on a Cartesian plane, with a third metric corresponding to bubble size.',
8990
+ namespace: 'bubble_chart',
8991
+ data_panel: {
8992
+ data_set: {
8993
+ type: 'dataSet',
8994
+ title: 'Data set',
8995
+ description: 'What data do you want to use in this bubble chart?'
8996
+ },
8997
+ views: {
8998
+ type: 'views',
8999
+ title: 'View',
9000
+ description: ''
9001
+ },
9002
+ labelled_metrics: {
9003
+ type: 'labelledMetrics',
9004
+ title: 'Metric - Y Axis',
9005
+ description: '',
9006
+ subSectionDefinition: {
9007
+ xAxis: {
9008
+ type: 'metrics',
9009
+ title: 'X axis',
9010
+ namespace: 'metrics.xAxis'
9011
+ },
9012
+ yAxis: {
9013
+ type: 'metrics',
9014
+ title: 'Y axis',
9015
+ namespace: 'metrics.yAxis'
9016
+ },
9017
+ zAxis: {
9018
+ type: 'metrics',
9019
+ title: 'Metric - Bubble Size',
9020
+ namespace: 'metrics.zAxis'
9021
+ }
9022
+ }
9023
+ },
9024
+ field_grouping: {
9025
+ type: 'fieldCollector',
9026
+ title: 'Grouping',
9027
+ description: 'What do you want each bubble to represent?',
9028
+ callToAction: 'Add comparison'
9029
+ },
9030
+ filter: {
9031
+ type: 'filter',
9032
+ title: 'Filters',
9033
+ description: 'Only include the information you want in this bubble chart.'
9034
+ },
9035
+ custom_metrics: {
9036
+ type: 'customMetrics',
9037
+ title: 'Custom metrics',
9038
+ description: 'Build your own metrics, such as a percentage.'
9039
+ },
9040
+ limit: {
9041
+ type: 'limit',
9042
+ title: 'Limit',
9043
+ description: 'Limit the number of data points shown on this bubble chart.'
9044
+ }
9045
+ },
9046
+ format_panel: {
9047
+ heading: {
9048
+ type: 'heading',
9049
+ title: 'Heading',
9050
+ description: '',
9051
+ subSectionDefinition: {
9052
+ title: {
9053
+ type: 'title',
9054
+ title: 'Title',
9055
+ description: '',
9056
+ namespace: 'title'
9057
+ },
9058
+ subject: {
9059
+ title: 'Subject',
9060
+ type: 'subject',
9061
+ description: '',
9062
+ namespace: 'subject'
9063
+ }
9064
+ }
9065
+ },
9066
+ chart_styles: {
9067
+ type: 'chartStyles',
9068
+ title: 'Chart Settings',
9069
+ description: '',
9070
+ subSectionDefinition: {
9071
+ legend: {
9072
+ type: 'legend',
9073
+ title: 'Show Legend',
9074
+ description: '',
9075
+ namespace: 'legend'
9076
+ }
9077
+ }
9078
+ },
9079
+ axis_labels: {
9080
+ type: 'axisLabels',
9081
+ title: 'Axis Preferences',
9082
+ description: '',
9083
+ subSectionDefinition: {
9084
+ x: {
9085
+ title: 'X Axis',
9086
+ description: '',
9087
+ namespace: 'x'
9088
+ },
9089
+ 'x.prefix': {
9090
+ title: 'Prefix',
9091
+ description: '',
9092
+ namespace: 'x.prefix'
9093
+ },
9094
+ 'x.postfix': {
9095
+ title: 'Postfix',
9096
+ description: '',
9097
+ namespace: 'x.postfix'
9098
+ },
9099
+ 'x.format': {
9100
+ title: 'Format',
9101
+ description: '',
9102
+ namespace: 'x.format'
9103
+ },
9104
+ 'x.count': {
9105
+ title: 'Label count',
9106
+ description: '',
9107
+ namespace: 'x.count'
9108
+ },
9109
+ 'x.axis_title': {
9110
+ title: 'Title',
9111
+ description: '',
9112
+ namespace: 'x.axis_title'
9113
+ },
9114
+ y: {
9115
+ title: 'Y Axis',
9116
+ description: '',
9117
+ namespace: 'y'
9118
+ },
9119
+ 'y.prefix': {
9120
+ title: 'Prefix',
9121
+ description: '',
9122
+ namespace: 'y.prefix'
9123
+ },
9124
+ 'y.postfix': {
9125
+ title: 'Postfix',
9126
+ description: '',
9127
+ namespace: 'y.postfix'
9128
+ },
9129
+ 'y.format': {
9130
+ title: 'Format',
9131
+ description: '',
9132
+ namespace: 'y.format'
9133
+ },
9134
+ 'y.count': {
9135
+ title: 'Label count',
9136
+ description: '',
9137
+ namespace: 'y.count'
9138
+ },
9139
+ 'y.axis_title': {
9140
+ title: 'Title',
9141
+ description: '',
9142
+ namespace: 'y.axis_title'
9143
+ },
9144
+ z: {
9145
+ title: 'Metric - Bubble Size',
9146
+ description: '',
9147
+ namespace: 'z'
9148
+ },
9149
+ 'z.prefix': {
9150
+ title: 'Prefix',
9151
+ description: '',
9152
+ namespace: 'z.prefix'
9153
+ },
9154
+ 'z.postfix': {
9155
+ title: 'Postfix',
9156
+ description: '',
9157
+ namespace: 'z.postfix'
9158
+ },
9159
+ 'z.format': {
9160
+ title: 'Format',
9161
+ description: '',
9162
+ namespace: 'z.format'
9163
+ },
9164
+ 'z.count': {
9165
+ title: 'Label count',
9166
+ description: '',
9167
+ namespace: 'z.count'
9168
+ },
9169
+ 'z.axis_title': {
9170
+ title: 'Title',
9171
+ description: '',
9172
+ namespace: 'z.axis_title'
9173
+ }
9174
+ }
9175
+ },
9176
+ goal_line: {
9177
+ type: 'goalLine',
9178
+ title: 'Goal Lines',
9179
+ description: ''
9180
+ }
9181
+ }
9182
+ };
9183
+
9184
+ var BubbleChart = function BubbleChart(config) {
9185
+ return {
9186
+ title: CONSTANTS$g.title,
9187
+ description: CONSTANTS$g.description,
9188
+ servicesClass: 'BubbleChart',
9189
+ namespace: CONSTANTS$g.namespace,
9190
+ dump: function dump(hydrated) {
9191
+ return hydrated;
9192
+ },
9193
+ load: function load(dumped) {
9194
+ var _dumped$tags;
9195
+ return {
9196
+ type: dumped.type,
9197
+ xMeasure: upcastMeasure(dumped.xMeasure ? [dumped.xMeasure] : [])[0] || null,
9198
+ yMeasure: upcastMeasure(dumped.yMeasure ? [dumped.yMeasure] : [])[0] || null,
9199
+ zMeasure: upcastMeasure(dumped.zMeasure ? [dumped.zMeasure] : [])[0] || null,
9200
+ dimension: upcastStringDimensionsToObject(dumped.dimension),
9201
+ viewId: upcastViewId(dumped.viewId),
9202
+ timeDimension: dumped.timeDimension,
9203
+ displayTitle: dumped.displayTitle,
9204
+ displaySubject: dumped.displaySubject,
9205
+ protectedByOrganisation: dumped.protectedByOrganisation,
9206
+ filter: upcastFilter(dumped.filter),
9207
+ order: upcastOrder(dumped.order, dumped.timeDimension),
9208
+ dataSetId: dumped.dataSetId,
9209
+ limit: dumped.limit,
9210
+ legend: dumped.legend,
9211
+ xAxisFormat: dumped.xAxisFormat,
9212
+ yAxisFormat: dumped.yAxisFormat,
9213
+ yAxisPostfix: dumped.yAxisPostfix,
9214
+ yAxisPrefix: dumped.yAxisPrefix,
9215
+ xAxisPostfix: dumped.xAxisPostfix,
9216
+ xAxisPrefix: dumped.xAxisPrefix,
9217
+ approxXAxisLabelCount: upcastAxisLabel(dumped.approxXAxisLabelCount),
9218
+ approxYAxisLabelCount: upcastAxisLabel(dumped.approxYAxisLabelCount),
9219
+ goalLines: dumped.goalLines,
9220
+ axisTitles: dumped.axisTitles,
9221
+ tags: (_dumped$tags = dumped.tags) != null ? _dumped$tags : []
9222
+ };
9223
+ },
9224
+ setAttributes: setAttributes$d(config),
9225
+ validate: function validate(attrs, dataSets) {
9226
+ return validateView(attrs, dataSets, config.queryEngineConfig);
9227
+ },
9228
+ init: function init(dataSetId, overrides) {
9229
+ return _extends({
9230
+ type: 'bubbleChart',
9231
+ xMeasure: null,
9232
+ yMeasure: null,
9233
+ zMeasure: null,
9234
+ dimension: [],
9235
+ timeDimension: null,
9236
+ displayTitle: '',
9237
+ displaySubject: '',
9238
+ protectedByOrganisation: undefined,
9239
+ viewId: upcastViewId(overrides == null ? void 0 : overrides.viewId),
9240
+ filter: [],
9241
+ order: [],
9242
+ dataSetId: dataSetId,
9243
+ limit: 5000,
9244
+ legend: true,
9245
+ xAxisPostfix: '',
9246
+ xAxisPrefix: '',
9247
+ yAxisPostfix: '',
9248
+ yAxisPrefix: '',
9249
+ yAxisFormat: null,
9250
+ xAxisFormat: null,
9251
+ approxXAxisLabelCount: 'auto',
9252
+ approxYAxisLabelCount: 'auto',
9253
+ goalLines: undefined,
9254
+ axisTitles: undefined,
9255
+ tags: []
9256
+ }, overrides);
9257
+ },
9258
+ createFeedback: createFeedback,
9259
+ schema: attributesSchema$e(config),
9260
+ removeField: function removeField(attrs, fieldId) {
9261
+ return removeField$1(attrs, fieldId, config.queryEngineConfig);
9262
+ },
9263
+ isRunnable: function isRunnable(hydrated) {
9264
+ return !!hydrated.xMeasure && !!hydrated.yMeasure && !!hydrated.zMeasure && hydrated.dimension.length > 0;
9265
+ },
9266
+ autoGenerate: function autoGenerate(dataSet) {
9267
+ var _DataSet$buildQueryAt = buildQueryAttributes(dataSet, config.queryEngineConfig, 'bubbleChart'),
9268
+ measure = _DataSet$buildQueryAt.measure,
9269
+ dimension = _DataSet$buildQueryAt.dimension;
9270
+ return this.init(dataSet.id, {
9271
+ xMeasure: measure[0],
9272
+ yMeasure: measure[1],
9273
+ dimension: dimension
9274
+ });
9275
+ },
9276
+ dataPanelConfig: function dataPanelConfig() {
9277
+ var _CONSTANTS$data_panel, _CONSTANTS$data_panel2, _CONSTANTS$data_panel3;
9278
+ return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'labelled_metrics'), {
9279
+ subSection: [_extends({}, (_CONSTANTS$data_panel = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel.subSectionDefinition['xAxis'], {
9280
+ propKey: 'xMeasure',
9281
+ allowsMultiple: false
9282
+ }), _extends({}, (_CONSTANTS$data_panel2 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel2.subSectionDefinition['yAxis'], {
9283
+ propKey: 'yMeasure',
9284
+ allowsMultiple: false
9285
+ }), _extends({}, (_CONSTANTS$data_panel3 = CONSTANTS$g.data_panel.labelled_metrics) == null ? void 0 : _CONSTANTS$data_panel3.subSectionDefinition['zAxis'], {
9286
+ propKey: 'zMeasure',
9287
+ allowsMultiple: false
9288
+ })]
9289
+ }), _extends({}, namespace(CONSTANTS$g, 'field_grouping'), {
9290
+ fieldFilterOptions: {
9291
+ onlyDimensions: true,
9292
+ onlyFieldTypes: ['boolean', 'number', 'string'],
9293
+ removePercentage: true,
9294
+ removeSimpleMaths: true,
9295
+ removeAggregateMaths: true
9296
+ },
9297
+ maxAllowed: 1,
9298
+ preSetPartialAttributes: function preSetPartialAttributes(values) {
9299
+ return {
9300
+ dimension: values
9301
+ };
9302
+ },
9303
+ getValues: function getValues(attrs) {
9304
+ return attrs.dimension;
9305
+ },
9306
+ testId: 'add-dimension'
9307
+ }), namespace(CONSTANTS$g, 'filter'), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9308
+ },
9309
+ formatPanelConfig: function formatPanelConfig() {
9310
+ var _CONSTANTS$format_pan;
9311
+ return [headingConstant(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'chart_styles'), {
9312
+ subSection: [(_CONSTANTS$format_pan = CONSTANTS$g.format_panel.chart_styles) == null ? void 0 : _CONSTANTS$format_pan.subSectionDefinition.legend]
9313
+ }), axisLabelsConstants(CONSTANTS$g), namespace(CONSTANTS$g, 'goal_line')];
9314
+ },
9315
+ supportedCustomFields: {
9316
+ percentages: true,
9317
+ dateCalculations: true,
9318
+ simpleMaths: true,
9319
+ rules: true,
9320
+ aggregateMaths: true,
9321
+ roundedNumbers: true,
9322
+ conditional: true,
9323
+ calculatedField: [AcceptedTypes.Maths, AcceptedTypes.IfStatement]
9324
+ },
9325
+ supportedFeatures: {
9326
+ parameters: false,
9327
+ colorGradient: false
9328
+ }
9329
+ };
9330
+ };
9331
+
9332
+ var attributesSchema$f = function attributesSchema(config) {
8934
9333
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
8935
9334
  stacked: Joi.valid(true, false, '100%'),
8936
9335
  legend: Joi.valid(true, false),
@@ -8945,15 +9344,15 @@ var attributesSchema$e = function attributesSchema(config) {
8945
9344
  }));
8946
9345
  };
8947
9346
 
8948
- var setAttributes$d = (function (config) {
9347
+ var setAttributes$e = (function (config) {
8949
9348
  return function (barChart, partial) {
8950
- var newAttributes = setAttributes(barChart, partial, attributesSchema$e(config));
9349
+ var newAttributes = setAttributes(barChart, partial, attributesSchema$f(config));
8951
9350
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
8952
9351
  return newAttributes;
8953
9352
  };
8954
9353
  });
8955
9354
 
8956
- var CONSTANTS$g = {
9355
+ var CONSTANTS$h = {
8957
9356
  title: 'Bar Chart V2',
8958
9357
  description: 'Ideal for illustrating changes and trends over time with bar graphs.',
8959
9358
  namespace: 'bar_chart',
@@ -9175,7 +9574,7 @@ var BarChart$1 = function BarChart(config) {
9175
9574
  drilldownOptions: dumped.drilldownOptions
9176
9575
  };
9177
9576
  },
9178
- setAttributes: setAttributes$d(config),
9577
+ setAttributes: setAttributes$e(config),
9179
9578
  validate: function validate(attrs, dataSets) {
9180
9579
  return validateView(attrs, dataSets, config.queryEngineConfig);
9181
9580
  },
@@ -9213,7 +9612,7 @@ var BarChart$1 = function BarChart(config) {
9213
9612
  }, overrides);
9214
9613
  },
9215
9614
  createFeedback: createFeedback,
9216
- schema: attributesSchema$e(config),
9615
+ schema: attributesSchema$f(config),
9217
9616
  removeField: function removeField(attrs, fieldId) {
9218
9617
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9219
9618
  },
@@ -9230,7 +9629,7 @@ var BarChart$1 = function BarChart(config) {
9230
9629
  });
9231
9630
  },
9232
9631
  dataPanelConfig: function dataPanelConfig() {
9233
- return [namespace(CONSTANTS$g, 'data_set'), namespace(CONSTANTS$g, 'views'), _extends({}, namespace(CONSTANTS$g, 'field_y_axis'), {
9632
+ return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9234
9633
  fieldFilterOptions: {
9235
9634
  forComponent: 'barChart'
9236
9635
  },
@@ -9243,7 +9642,7 @@ var BarChart$1 = function BarChart(config) {
9243
9642
  return attrs.measure;
9244
9643
  },
9245
9644
  testId: 'metric-input'
9246
- }), _extends({}, namespace(CONSTANTS$g, 'field_x_axis'), {
9645
+ }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9247
9646
  fieldFilterOptions: {
9248
9647
  forComponent: 'barChart',
9249
9648
  onlyDimensions: true
@@ -9261,16 +9660,16 @@ var BarChart$1 = function BarChart(config) {
9261
9660
  },
9262
9661
  maxAllowed: 2,
9263
9662
  testId: 'add-dimension'
9264
- }), namespace(CONSTANTS$g, 'sort'), namespace(CONSTANTS$g, 'filter'), _extends({}, namespace(CONSTANTS$g, 'drilldown'), {
9663
+ }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), _extends({}, namespace(CONSTANTS$h, 'drilldown'), {
9265
9664
  options: {
9266
9665
  property: 'drilldownOptions'
9267
9666
  }
9268
- }), namespace(CONSTANTS$g, 'custom_metrics'), namespace(CONSTANTS$g, 'limit')];
9667
+ }), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9269
9668
  },
9270
9669
  formatPanelConfig: function formatPanelConfig() {
9271
- return [headingConstant(CONSTANTS$g), chartStylesConstant(CONSTANTS$g, false, true), axisLabelsConstants(CONSTANTS$g), _extends({}, namespace(CONSTANTS$g, 'conditional_formatting'), {
9670
+ return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, true), axisLabelsConstants(CONSTANTS$h), _extends({}, namespace(CONSTANTS$h, 'conditional_formatting'), {
9272
9671
  ruleType: 'lineColor'
9273
- }), namespace(CONSTANTS$g, 'goal_line')];
9672
+ }), namespace(CONSTANTS$h, 'goal_line')];
9274
9673
  },
9275
9674
  supportedCustomFields: {
9276
9675
  calculatedField: false,
@@ -9292,7 +9691,7 @@ var BarChart$1 = function BarChart(config) {
9292
9691
  };
9293
9692
  };
9294
9693
 
9295
- var attributesSchema$f = function attributesSchema(config) {
9694
+ var attributesSchema$g = function attributesSchema(config) {
9296
9695
  return Joi.object(_extends({}, baseAttributesSchema(config.attributesSchemaOptions), timeDimensionQuerySchema(config.queryEngineConfig, config.attributesSchemaOptions), {
9297
9696
  legend: Joi.valid(true, false),
9298
9697
  type: Joi.valid('waterfallChart').required(),
@@ -9303,15 +9702,15 @@ var attributesSchema$f = function attributesSchema(config) {
9303
9702
  }));
9304
9703
  };
9305
9704
 
9306
- var setAttributes$e = (function (config) {
9705
+ var setAttributes$f = (function (config) {
9307
9706
  return function (waterfallChart, partial) {
9308
- var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$f(config));
9707
+ var newAttributes = setAttributes(waterfallChart, partial, attributesSchema$g(config));
9309
9708
  newAttributes = removeUnusedOrderFieldsFromTimeSeriesComponent(newAttributes);
9310
9709
  return newAttributes;
9311
9710
  };
9312
9711
  });
9313
9712
 
9314
- var CONSTANTS$h = {
9713
+ var CONSTANTS$i = {
9315
9714
  title: 'Waterfall chart',
9316
9715
  description: "Shows a running total as values are added or subtracted. It's useful for understanding how an initial value is affected by a series of positive and negative values.",
9317
9716
  namespace: 'waterfall_chart',
@@ -9469,10 +9868,10 @@ var CONSTANTS$h = {
9469
9868
 
9470
9869
  var WaterfallChart = function WaterfallChart(config) {
9471
9870
  return {
9472
- title: CONSTANTS$h.title,
9473
- description: CONSTANTS$h.description,
9871
+ title: CONSTANTS$i.title,
9872
+ description: CONSTANTS$i.description,
9474
9873
  servicesClass: 'WaterfallChart',
9475
- namespace: CONSTANTS$h.namespace,
9874
+ namespace: CONSTANTS$i.namespace,
9476
9875
  dump: function dump(hydrated) {
9477
9876
  return hydrated;
9478
9877
  },
@@ -9507,7 +9906,7 @@ var WaterfallChart = function WaterfallChart(config) {
9507
9906
  offset: dumped.offset
9508
9907
  };
9509
9908
  },
9510
- setAttributes: setAttributes$e(config),
9909
+ setAttributes: setAttributes$f(config),
9511
9910
  validate: function validate(attrs, dataSets) {
9512
9911
  return validateView(attrs, dataSets, config.queryEngineConfig);
9513
9912
  },
@@ -9542,7 +9941,7 @@ var WaterfallChart = function WaterfallChart(config) {
9542
9941
  }, overrides);
9543
9942
  },
9544
9943
  createFeedback: createFeedback,
9545
- schema: attributesSchema$f(config),
9944
+ schema: attributesSchema$g(config),
9546
9945
  removeField: function removeField(attrs, fieldId) {
9547
9946
  return removeField$1(attrs, fieldId, config.queryEngineConfig);
9548
9947
  },
@@ -9559,7 +9958,7 @@ var WaterfallChart = function WaterfallChart(config) {
9559
9958
  });
9560
9959
  },
9561
9960
  dataPanelConfig: function dataPanelConfig() {
9562
- return [namespace(CONSTANTS$h, 'data_set'), namespace(CONSTANTS$h, 'views'), _extends({}, namespace(CONSTANTS$h, 'field_y_axis'), {
9961
+ return [namespace(CONSTANTS$i, 'data_set'), namespace(CONSTANTS$i, 'views'), _extends({}, namespace(CONSTANTS$i, 'field_y_axis'), {
9563
9962
  fieldFilterOptions: {
9564
9963
  forComponent: 'waterfallChart',
9565
9964
  onlyMeasures: true
@@ -9573,7 +9972,7 @@ var WaterfallChart = function WaterfallChart(config) {
9573
9972
  return attrs.measure;
9574
9973
  },
9575
9974
  testId: 'metric-input'
9576
- }), _extends({}, namespace(CONSTANTS$h, 'field_x_axis'), {
9975
+ }), _extends({}, namespace(CONSTANTS$i, 'field_x_axis'), {
9577
9976
  fieldFilterOptions: {
9578
9977
  forComponent: 'waterfallChart',
9579
9978
  onlyDimensions: true
@@ -9587,10 +9986,10 @@ var WaterfallChart = function WaterfallChart(config) {
9587
9986
  },
9588
9987
  maxAllowed: 2,
9589
9988
  testId: 'add-dimension'
9590
- }), namespace(CONSTANTS$h, 'sort'), namespace(CONSTANTS$h, 'filter'), namespace(CONSTANTS$h, 'custom_metrics'), namespace(CONSTANTS$h, 'limit')];
9989
+ }), namespace(CONSTANTS$i, 'sort'), namespace(CONSTANTS$i, 'filter'), namespace(CONSTANTS$i, 'custom_metrics'), namespace(CONSTANTS$i, 'limit')];
9591
9990
  },
9592
9991
  formatPanelConfig: function formatPanelConfig() {
9593
- return [headingConstant(CONSTANTS$h), chartStylesConstant(CONSTANTS$h, false, false), axisLabelsConstants(CONSTANTS$h)];
9992
+ return [headingConstant(CONSTANTS$i), chartStylesConstant(CONSTANTS$i, false, false), axisLabelsConstants(CONSTANTS$i)];
9594
9993
  },
9595
9994
  supportedCustomFields: {
9596
9995
  percentages: true,
@@ -9628,6 +10027,7 @@ function getComponentInterface(type, config) {
9628
10027
  if (type == 'areaChart') return textOverrideComponent(AreaChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9629
10028
  if (type == 'barChart') return textOverrideComponent(BarChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9630
10029
  if (type == 'basicTable') return textOverrideComponent(BasicTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
10030
+ if (type == 'bubbleChart') return textOverrideComponent(BubbleChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9631
10031
  if (type == 'comboChart') return textOverrideComponent(ComboChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9632
10032
  if (type == 'custom') return textOverrideComponent(CustomChart(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
9633
10033
  if (type == 'dataTable') return textOverrideComponent(DataTable(config || EMPTY_CONFIG), config == null ? void 0 : config.textOverride);
@@ -12793,7 +13193,7 @@ var buildDefaults = function buildDefaults(partialFeatureToggles) {
12793
13193
  };
12794
13194
  };
12795
13195
 
12796
- var ALL_COMPONENT_TYPES = ['barChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
13196
+ var ALL_COMPONENT_TYPES = ['barChart', 'bubbleChart', 'horizontalBarChart', 'funnelChart', 'areaChart', 'lineChart', 'lineChartV2', 'barChartV2', 'scatterChart', 'pieChart', 'singleStat', 'dataTable', 'basicTable', 'comboChart', 'mercatorMap', 'progress', 'richText', 'custom', 'waterfallChart'];
12797
13197
  var ALL_VIZZLY_COMPONENT_TYPES = /*#__PURE__*/[].concat(ALL_COMPONENT_TYPES).filter(function (type) {
12798
13198
  return type != 'custom';
12799
13199
  });
@@ -13133,7 +13533,7 @@ var saveable = function saveable(component, protectedComponent) {
13133
13533
  };
13134
13534
  };
13135
13535
 
13136
- var attributesSchema$g = function attributesSchema(config) {
13536
+ var attributesSchema$h = function attributesSchema(config) {
13137
13537
  return Joi.alternatives().conditional('.type', {
13138
13538
  is: 'barChart',
13139
13539
  then: BarChart(config).schema
@@ -13164,6 +13564,9 @@ var attributesSchema$g = function attributesSchema(config) {
13164
13564
  }).conditional('.type', {
13165
13565
  is: 'pieChart',
13166
13566
  then: PieChart(config).schema
13567
+ }).conditional('.type', {
13568
+ is: 'bubbleChart',
13569
+ then: BubbleChart(config).schema
13167
13570
  }).conditional('.type', {
13168
13571
  is: 'scatterChart',
13169
13572
  then: ScatterChart(config).schema
@@ -20530,7 +20933,7 @@ var Combobox = function Combobox(props) {
20530
20933
  });
20531
20934
  };
20532
20935
 
20533
- var attributesSchema$h = /*#__PURE__*/Joi.object({
20936
+ var attributesSchema$i = /*#__PURE__*/Joi.object({
20534
20937
  displayTitle: /*#__PURE__*/Joi.string().min(1).required(),
20535
20938
  colSpan: /*#__PURE__*/Joi.number().valid(12).required()
20536
20939
  });
@@ -20547,7 +20950,7 @@ var isEmptyCell = /*#__PURE__*/Joi.object({
20547
20950
  });
20548
20951
  var isPopulatedCell = function isPopulatedCell(queryEngineConfig) {
20549
20952
  return Joi.object({
20550
- attributes: attributesSchema$g({
20953
+ attributes: attributesSchema$h({
20551
20954
  queryEngineConfig: queryEngineConfig
20552
20955
  }),
20553
20956
  colSpan: colSpanSchema
@@ -20558,7 +20961,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
20558
20961
  id: Joi.string(),
20559
20962
  display: displaySchema(queryEngineConfig),
20560
20963
  componentLibrary: Joi.array().required().items(Joi.object({
20561
- attributes: attributesSchema$g({
20964
+ attributes: attributesSchema$h({
20562
20965
  queryEngineConfig: queryEngineConfig
20563
20966
  })
20564
20967
  })),
@@ -20569,7 +20972,7 @@ var saveableDashboardDefinitionSchema = function saveableDashboardDefinitionSche
20569
20972
  function displaySchema(queryEngineConfig) {
20570
20973
  return Joi.array().required().items(Joi.object({
20571
20974
  height: Joi.number().required(),
20572
- components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$h))
20975
+ components: Joi.array().required().min(1).items(Joi.alternatives(isEmptyCell, isPopulatedCell(queryEngineConfig), attributesSchema$i))
20573
20976
  }));
20574
20977
  }
20575
20978
 
@@ -21291,7 +21694,7 @@ var setHeaderComponent = function setHeaderComponent(state, action) {
21291
21694
  newDisplayState.dashboard.display[rowIndex].components[cellIndex] = component;
21292
21695
  return newDisplayState;
21293
21696
  };
21294
- var setAttributes$f = function setAttributes(state, action) {
21697
+ var setAttributes$g = function setAttributes(state, action) {
21295
21698
  var attributes = action.attributes,
21296
21699
  rowIndex = action.rowIndex,
21297
21700
  cellIndex = action.cellIndex;
@@ -21576,7 +21979,7 @@ var reducer = function reducer(pipelineTransformationOptions) {
21576
21979
  case 'swapComponents':
21577
21980
  return swapComponents$1(state, action);
21578
21981
  case 'setAttributes':
21579
- return setAttributes$f(state, action);
21982
+ return setAttributes$g(state, action);
21580
21983
  case 'addComponentToLibrary':
21581
21984
  return addComponentToLibrary(state, action);
21582
21985
  case 'setLocalFilters':
@@ -25039,6 +25442,59 @@ var ScatterChart$1 = function ScatterChart(props) {
25039
25442
  })]
25040
25443
  }));
25041
25444
  };
25445
+ var BubbleChart$1 = function BubbleChart(props) {
25446
+ return jsxs("svg", _extends({
25447
+ viewBox: "0 0 2134 2134",
25448
+ xmlns: "http://www.w3.org/2000/svg",
25449
+ xmlSpace: "preserve",
25450
+ style: {
25451
+ fillRule: 'evenodd',
25452
+ clipRule: 'evenodd',
25453
+ strokeLinecap: 'round',
25454
+ strokeLinejoin: 'round',
25455
+ strokeMiterlimit: 1.5
25456
+ }
25457
+ }, props, {
25458
+ children: [jsx("path", {
25459
+ d: "M208.333 208.334v1716.66M214.91 1926.73h1716.66",
25460
+ style: {
25461
+ strokeWidth: '166.67px'
25462
+ }
25463
+ }), jsx("circle", {
25464
+ cx: 987.916,
25465
+ cy: 920.416,
25466
+ r: 187.917,
25467
+ style: {
25468
+ strokeWidth: '8.33px',
25469
+ strokeLinecap: 'square'
25470
+ }
25471
+ }), jsx("circle", {
25472
+ cx: 708.749,
25473
+ cy: 1516.25,
25474
+ r: 187.917,
25475
+ style: {
25476
+ strokeWidth: '8.33px',
25477
+ strokeLinecap: 'square'
25478
+ }
25479
+ }), jsx("circle", {
25480
+ cx: 1633.75,
25481
+ cy: 907.916,
25482
+ r: 187.917,
25483
+ style: {
25484
+ strokeWidth: '8.33px',
25485
+ strokeLinecap: 'square'
25486
+ }
25487
+ }), jsx("circle", {
25488
+ cx: 1775.42,
25489
+ cy: 307.916,
25490
+ r: 187.917,
25491
+ style: {
25492
+ strokeWidth: '8.33px',
25493
+ strokeLinecap: 'square'
25494
+ }
25495
+ })]
25496
+ }));
25497
+ };
25042
25498
  var Funnel = function Funnel(props) {
25043
25499
  return jsx("svg", _extends({
25044
25500
  fill: "none",
@@ -25160,6 +25616,9 @@ var componentTypeToIconMapping = {
25160
25616
  scatterChart: function scatterChart(props) {
25161
25617
  return ScatterChart$1(props);
25162
25618
  },
25619
+ bubbleChart: function bubbleChart(props) {
25620
+ return BubbleChart$1(props);
25621
+ },
25163
25622
  singleStat: function singleStat(props) {
25164
25623
  return SingleStat$1(props);
25165
25624
  },
@@ -31748,7 +32207,7 @@ var accessors = function accessors(xAxisIsTime, xKey, yKey, horizontal) {
31748
32207
  };
31749
32208
  var DEFAULT_Y_AXIS_LABEL_COUNT = 5;
31750
32209
  var VizzlyXYChart = function VizzlyXYChart(props) {
31751
- var _props$height, _theme$axis$stroke, _theme$axis, _ref, _props$lines$data$len, _props$lines, _props$areas, _props$bars, _props$lines$threshol, _props$lines2, _props$areas2, _props$forceXAxisAsTi, _props$bars2, _props$lines3, _theme$grid$stroke, _theme$grid, _props$axisTitles, _props$axisTitles2, _props$axisTitles3, _props$axisTitles4, _props$areas7, _props$bars3, _props$bars7, _props$lines4, _props$lines7, _props$trends2, _props$lines13, _props$lines16, _props$bars14, _props$goalLine, _props$bars15, _props$bars16, _props$bars17;
32210
+ var _props$height, _theme$axis$stroke, _theme$axis, _ref, _props$lines$data$len, _props$lines, _props$areas, _props$bars, _props$lines$threshol, _props$lines2, _props$areas2, _props$forceXAxisAsTi, _props$bars2, _props$lines3, _theme$grid$stroke, _theme$grid, _props$axisTitles, _props$axisTitles2, _props$axisTitles3, _props$axisTitles4, _props$areas7, _props$bars3, _props$bars7, _props$lines4, _props$lines7, _props$trends2, _props$lines13, _props$bars14, _props$goalLine, _props$bars15, _props$bars16, _props$bars17;
31752
32211
  var height = adjustHeight((_props$height = props == null ? void 0 : props.height) != null ? _props$height : 300, props == null ? void 0 : props.legend);
31753
32212
  var _props$approxYAxisLab = props.approxYAxisLabelCount,
31754
32213
  approxYAxisLabelCount = _props$approxYAxisLab === void 0 ? 'auto' : _props$approxYAxisLab,
@@ -32109,27 +32568,12 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
32109
32568
  data: props == null || (_props$trends7 = props.trends) == null ? void 0 : _props$trends7.data
32110
32569
  }, accessors(xAxisIsTime, x, key, horizontal)), "trends_line_on_line_chart_" + props.uniqueId + "_" + keyIndex);
32111
32570
  }), props.lines && (props == null || (_props$lines13 = props.lines) == null ? void 0 : _props$lines13.scatter) && props.lines.keys.map(function (key, keyIndex) {
32112
- var _props$lines14;
32571
+ var _props$lines14, _props$lines15;
32113
32572
  return jsx(GlyphSeries, _extends({
32114
32573
  dataKey: key,
32115
32574
  data: (_props$lines14 = props.lines) == null ? void 0 : _props$lines14.data
32116
32575
  }, accessors(xAxisIsTime, x, key, horizontal), {
32117
- colorAccessor: function colorAccessor(d) {
32118
- var _props$lines15;
32119
- if (props != null && (_props$lines15 = props.lines) != null && _props$lines15.formatter) {
32120
- var color = getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)(d);
32121
- return color;
32122
- }
32123
- return undefined;
32124
- }
32125
- }), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
32126
- }), props.lines && (props == null || (_props$lines16 = props.lines) == null ? void 0 : _props$lines16.scatter) && props.lines.keys.map(function (key, keyIndex) {
32127
- var _props$lines17, _props$lines18;
32128
- return jsx(GlyphSeries, _extends({
32129
- dataKey: key,
32130
- data: (_props$lines17 = props.lines) == null ? void 0 : _props$lines17.data
32131
- }, accessors(xAxisIsTime, x, key, horizontal), {
32132
- colorAccessor: (props == null || (_props$lines18 = props.lines) == null ? void 0 : _props$lines18.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
32576
+ colorAccessor: (props == null || (_props$lines15 = props.lines) == null ? void 0 : _props$lines15.formatter) && getColorFromDatum(key, props == null ? void 0 : props.lines.formatter, colors, keyIndex)
32133
32577
  }), "scatter_chart_" + props.uniqueId + "_" + keyIndex);
32134
32578
  }), ['areas', 'lines'].map(function (seriesType, indexOne) {
32135
32579
  var chartProps = props;
@@ -32144,7 +32588,7 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
32144
32588
  }, "area_lines_" + props.uniqueId + "_" + indexOne + "_" + indexTwo);
32145
32589
  })
32146
32590
  }, "area_lines_" + props.uniqueId + "_" + indexOne);
32147
- }), props != null && (_props$bars14 = props.bars) != null && _props$bars14.funnelChart ? jsx(Tooltip$2, {
32591
+ }), props != null && (_props$bars14 = props.bars) != null && _props$bars14.funnelChart ? jsx(Tooltip$3, {
32148
32592
  showVerticalCrosshair: true,
32149
32593
  showSeriesGlyphs: true,
32150
32594
  style: tooltipStyles,
@@ -32175,7 +32619,7 @@ var VizzlyXYChart = function VizzlyXYChart(props) {
32175
32619
  formatValue: formatYAxisLabel$1(props)
32176
32620
  });
32177
32621
  }
32178
- }) : jsx(Tooltip$2, {
32622
+ }) : jsx(Tooltip$3, {
32179
32623
  showVerticalCrosshair: true,
32180
32624
  style: tooltipStyles,
32181
32625
  showSeriesGlyphs: props.bars == undefined,
@@ -40340,6 +40784,172 @@ var IconText = function IconText(props) {
40340
40784
  });
40341
40785
  };
40342
40786
 
40787
+ var defaultProps$6 = {
40788
+ type: 'bubbleChart',
40789
+ xMeasure: null,
40790
+ yMeasure: null,
40791
+ dimension: [],
40792
+ timeDimension: null,
40793
+ order: [],
40794
+ displayTitle: '',
40795
+ displaySubject: '',
40796
+ xAxisPostfix: '',
40797
+ xAxisPrefix: '',
40798
+ yAxisPostfix: '',
40799
+ yAxisPrefix: '',
40800
+ yAxisFormat: null,
40801
+ xAxisFormat: null,
40802
+ filter: [],
40803
+ limit: 500,
40804
+ legend: false,
40805
+ approxXAxisLabelCount: 'auto',
40806
+ approxYAxisLabelCount: 'auto',
40807
+ tags: []
40808
+ };
40809
+ var BubbleChartView = function BubbleChartView(props) {
40810
+ var _props$library, _props$viewId, _props$library2, _props$viewId2, _theme$charts;
40811
+ var _props = props,
40812
+ displayTitle = _props.displayTitle,
40813
+ displaySubject = _props.displaySubject;
40814
+ var _useDashboardBehaviou = useDashboardBehaviourContext(),
40815
+ textOverride = _useDashboardBehaviou.textOverride,
40816
+ labelFormat = _useDashboardBehaviou.labelFormat,
40817
+ variables = _useDashboardBehaviou.variables;
40818
+ var ref = useChartRenderHelper({
40819
+ title: displayTitle,
40820
+ subject: displaySubject
40821
+ });
40822
+ var headerProps = {
40823
+ displayTitle: displayTitle,
40824
+ displaySubject: displaySubject,
40825
+ library: (_props$library = props.library) != null ? _props$library : false,
40826
+ verified: props.protectedByOrganisation,
40827
+ localFilters: props.localFilters,
40828
+ setLocalFilters: props.setLocalFilters,
40829
+ dataSet: props.dataSet,
40830
+ componentType: props.type,
40831
+ viewId: (_props$viewId = props.viewId) != null ? _props$viewId : '',
40832
+ order: props.order,
40833
+ setPartialAttributes: props.setPartialAttributes
40834
+ };
40835
+ var theme = useTheme();
40836
+ var BubbleChartComponent = getComponentInterface(props.type);
40837
+ if (!BubbleChartComponent.isRunnable(props)) {
40838
+ return jsx(QueryUnderConstructionNotice, {
40839
+ title: "Missing parameters",
40840
+ children: emptyScatterChartMessage(props)
40841
+ });
40842
+ }
40843
+ if (isLoading(props.result)) return jsx(LoadingComponent, {});
40844
+ if (hasFailed(props.result)) return jsx(FailedToLoadDataNotice, {});
40845
+ if (isEmpty(props.result)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
40846
+ props = mergeProps(props, {}, defaultProps$6);
40847
+ var keys = props.result && props.xMeasure ? scatterXKeys(props.dimension, props.xMeasure, props.result) : [];
40848
+ if (!props.xMeasure || !props.yMeasure) return null;
40849
+ var measure = [];
40850
+ measure.push(props.xMeasure);
40851
+ measure.push(props.yMeasure);
40852
+ var pivotConfig = init$c(props);
40853
+ var bubbleData = props.result ? resultSet(props.result, measure, pivotConfig) : [];
40854
+ var xField = key([], [], props.xMeasure.field, props.xMeasure["function"]);
40855
+ var zField = props.zMeasure ? key([], [], props.zMeasure.field, props.zMeasure["function"]) : '';
40856
+ bubbleData.forEach(function (d) {
40857
+ var dimensionValues = [].concat(props.dimension.map(function (dimension) {
40858
+ return d[dimension.field];
40859
+ }));
40860
+ var yMeasure = props.yMeasure;
40861
+ var xMeasure = props.xMeasure;
40862
+ var yKeyWithoutDimension = key([], [], yMeasure.field, yMeasure["function"]);
40863
+ var xKeyWithDimension = key(props.dimension.map(function (d) {
40864
+ return d.field;
40865
+ }), dimensionValues, xMeasure.field, xMeasure["function"]);
40866
+ d[xKeyWithDimension] = d[yKeyWithoutDimension];
40867
+ });
40868
+ return jsx(Suspense, {
40869
+ fallback: jsx(LoadingComponent, {}),
40870
+ children: jsxs(ViewWrapper, {
40871
+ queriesAreChanging: props.queriesAreChanging,
40872
+ children: [jsx(ViewHeader, _extends({}, headerProps)), jsx(ChartWrapper, {
40873
+ disabledFeatures: (_props$library2 = props.library) != null ? _props$library2 : false,
40874
+ children: jsx(BubbleChart$3, {
40875
+ ref: ref,
40876
+ approxXAxisLabelCount: props.approxXAxisLabelCount,
40877
+ approxYAxisLabelCount: props.approxYAxisLabelCount,
40878
+ uniqueId: props.id,
40879
+ x: xField,
40880
+ z: zField,
40881
+ keys: keys,
40882
+ colors: themeToColorScale(theme == null ? void 0 : theme.colors, keys.length),
40883
+ data: bubbleData,
40884
+ legend: showLegend(props.legend, (theme == null ? void 0 : theme.detail) === 'verbose'),
40885
+ horizontal: false,
40886
+ removeStroke: false,
40887
+ forceXAxisAsTime: false,
40888
+ sparkline: false,
40889
+ formatYAxisLabel: formatYAxisLabel(textOverride, {
40890
+ prefix: props.yAxisPrefix,
40891
+ postfix: props.yAxisPostfix,
40892
+ format: props.yAxisFormat,
40893
+ numberFormatOptions: props.numberFormatOptions,
40894
+ dateTimeFormatOptions: props.dateTimeFormatOptions,
40895
+ defaultFormats: props.defaultFormats
40896
+ }),
40897
+ formatXAxisLabel: formatXAxisLabel(null, {
40898
+ prefix: props.xAxisPrefix,
40899
+ postfix: props.xAxisPostfix,
40900
+ format: props.xAxisFormat,
40901
+ numberFormatOptions: props.numberFormatOptions,
40902
+ dateTimeFormatOptions: props.dateTimeFormatOptions,
40903
+ defaultFormats: props.defaultFormats
40904
+ }),
40905
+ theme: theme == null ? void 0 : theme.charts,
40906
+ formatSeriesName: formatSeriesName(props.result, textOverride, props.type, (_props$viewId2 = props.viewId) != null ? _props$viewId2 : '', labelFormat),
40907
+ goalLine: buildGoalLine(variables, props.goalLines),
40908
+ axisTitles: props.axisTitles,
40909
+ idPrefix: props.idPrefix,
40910
+ popOverMenuStyles: theme == null || (_theme$charts = theme.charts) == null ? void 0 : _theme$charts.popoverMenus
40911
+ })
40912
+ })]
40913
+ })
40914
+ });
40915
+ };
40916
+ BubbleChartView.defaultProps = defaultProps$6;
40917
+ var memoized$4 = /*#__PURE__*/memo(BubbleChartView, shouldUpdate);
40918
+
40919
+ var BubbleChart$2 = function BubbleChart(props) {
40920
+ var _props$dashboardBehav;
40921
+ var _props$component = props.component,
40922
+ results = _props$component.results,
40923
+ attributes = _props$component.attributes,
40924
+ localFilters = _props$component.localFilters;
40925
+ var _useQueryEffect = useQueryEffect(attributes, props.runQueriesCallback, props.setResults, {
40926
+ localFilters: localFilters,
40927
+ globalFilters: props.globalFilters
40928
+ }, props.dataSet, undefined, props.dashboardBehaviour.variables),
40929
+ queriesAreChanging = _useQueryEffect.queriesAreChanging;
40930
+ return jsx(memoized$4, _extends({
40931
+ id: props.id
40932
+ }, attributes, {
40933
+ dataSet: props.dataSet,
40934
+ localFilters: localFilters,
40935
+ setLocalFilters: props.setLocalFilters,
40936
+ setPartialAttributes: function setPartialAttributes(changes) {
40937
+ return props.setPartialAttributes(changes);
40938
+ },
40939
+ result: results && results[0],
40940
+ queriesAreChanging: queriesAreChanging,
40941
+ supportedAggregates: props.dashboardBehaviour.queryEngineConfig.supportedAggregates,
40942
+ supportedTimeTruncFunctions: props.dashboardBehaviour.queryEngineConfig.supportedTimeTruncFunctions,
40943
+ sm: props.sm,
40944
+ library: props == null ? void 0 : props.library,
40945
+ supportedTransformationFunctions: props == null || (_props$dashboardBehav = props.dashboardBehaviour) == null || (_props$dashboardBehav = _props$dashboardBehav.queryEngineConfig) == null ? void 0 : _props$dashboardBehav.supportedTransformationFunctions,
40946
+ numberFormatOptions: props.dashboardBehaviour.numberFormatOptions,
40947
+ dateTimeFormatOptions: props.dashboardBehaviour.dateTimeFormatOptions,
40948
+ idPrefix: props.idPrefix,
40949
+ defaultFormats: props.dashboardBehaviour.defaultFormats
40950
+ }));
40951
+ };
40952
+
40343
40953
  var takeRenderOverrideFunctions = function takeRenderOverrideFunctions(props) {
40344
40954
  return {
40345
40955
  renderCloseIcon: props.renderCloseIcon || null,
@@ -43245,7 +43855,7 @@ var MercatorMap$3 = function MercatorMap(props) {
43245
43855
  }));
43246
43856
  };
43247
43857
 
43248
- var defaultProps$6 = {
43858
+ var defaultProps$7 = {
43249
43859
  type: 'funnelChart',
43250
43860
  measure: [],
43251
43861
  dimension: [],
@@ -43284,7 +43894,7 @@ var FunnelChartView = function FunnelChartView(props) {
43284
43894
  headline: props.headline
43285
43895
  });
43286
43896
  var theme = useTheme();
43287
- props = mergeProps(props, {}, defaultProps$6);
43897
+ props = mergeProps(props, {}, defaultProps$7);
43288
43898
  var headerProps = {
43289
43899
  displayTitle: displayTitle,
43290
43900
  displaySubject: displaySubject,
@@ -43378,7 +43988,7 @@ var FunnelChartView = function FunnelChartView(props) {
43378
43988
  })
43379
43989
  });
43380
43990
  };
43381
- FunnelChartView.defaultProps = defaultProps$6;
43991
+ FunnelChartView.defaultProps = defaultProps$7;
43382
43992
  var FunnelChartView$1 = /*#__PURE__*/memo(FunnelChartView, shouldUpdate);
43383
43993
 
43384
43994
  var FunnelChart$2 = function FunnelChart(props) {
@@ -43508,7 +44118,7 @@ var SingleStat$2 = function SingleStat(props) {
43508
44118
  }));
43509
44119
  };
43510
44120
 
43511
- var defaultProps$7 = {
44121
+ var defaultProps$8 = {
43512
44122
  type: 'dataTable',
43513
44123
  measure: [],
43514
44124
  dimension: [],
@@ -43539,13 +44149,13 @@ function hasNext(_ref) {
43539
44149
  return total >= limit;
43540
44150
  }
43541
44151
  function nextOffset(offset, limit) {
43542
- return (offset || 0) + (limit || defaultProps$7.limit);
44152
+ return (offset || 0) + (limit || defaultProps$8.limit);
43543
44153
  }
43544
44154
  function previousOffset(offset, limit) {
43545
44155
  if (offset === undefined && limit === undefined) {
43546
44156
  return undefined;
43547
44157
  }
43548
- return (offset || 0) - (limit || defaultProps$7.limit);
44158
+ return (offset || 0) - (limit || defaultProps$8.limit);
43549
44159
  }
43550
44160
 
43551
44161
  var wrapper$8 = /*#__PURE__*/buildStyleOverrides( /*#__PURE__*/_extends({
@@ -45829,7 +46439,7 @@ var DataTableView = function DataTableView(props) {
45829
46439
  })]
45830
46440
  });
45831
46441
  };
45832
- DataTableView.defaultProps = defaultProps$7;
46442
+ DataTableView.defaultProps = defaultProps$8;
45833
46443
  var DataTableView$1 = (function (props) {
45834
46444
  return jsx(DataTableView, _extends({}, props));
45835
46445
  });
@@ -46118,7 +46728,7 @@ var IndividualProgress = function IndividualProgress(props) {
46118
46728
  radius: props.progressType === ProgressType.Linear ? undefined : props.radius
46119
46729
  });
46120
46730
  };
46121
- var defaultProps$8 = {
46731
+ var defaultProps$9 = {
46122
46732
  type: 'progress',
46123
46733
  measure: [],
46124
46734
  displayTitle: '',
@@ -46164,7 +46774,7 @@ var ProgressView$1 = function ProgressView(props) {
46164
46774
  if (isLoading(mainResult)) return jsx(LoadingComponent, {});
46165
46775
  if (hasFailed(mainResult)) return jsx(FailedToLoadDataNotice, {});
46166
46776
  if (isEmpty(mainResult)) return jsx(NoResultContentToShowNotice, _extends({}, headerProps));
46167
- props = mergeProps(props, {}, defaultProps$8);
46777
+ props = mergeProps(props, {}, defaultProps$9);
46168
46778
  var noOfMeasures = props.measure.length;
46169
46779
  var progressType = defaultProgressType(props.progressType);
46170
46780
  var _useState2 = useState(0),
@@ -46226,7 +46836,7 @@ var ProgressView$1 = function ProgressView(props) {
46226
46836
  })]
46227
46837
  });
46228
46838
  };
46229
- ProgressView$1.defaultProps = defaultProps$8;
46839
+ ProgressView$1.defaultProps = defaultProps$9;
46230
46840
 
46231
46841
  var Progress$2 = function Progress(props) {
46232
46842
  var _props$dashboardBehav;
@@ -46860,6 +47470,608 @@ var BarChartV2 = function BarChartV2(props) {
46860
47470
  });
46861
47471
  };
46862
47472
 
47473
+ function getBarFill$1(bars, conditionalFormattingRules, barKey, barValues) {
47474
+ var _bars$find;
47475
+ // Default fill color from the corresponding bar
47476
+ var fill = (_bars$find = bars.find(function (chartBar) {
47477
+ return chartBar.yKey === barKey;
47478
+ })) == null ? void 0 : _bars$find.color;
47479
+
47480
+ // Determine the value based on barValues type
47481
+ var value = typeof barValues === 'number' ? barValues : barValues == null ? void 0 : barValues[barKey];
47482
+ if (typeof value === 'number') {
47483
+ for (var _iterator = _createForOfIteratorHelperLoose(conditionalFormattingRules), _step; !(_step = _iterator()).done;) {
47484
+ var rule = _step.value;
47485
+ if (compare({
47486
+ op: rule.operator,
47487
+ value: rule.value
47488
+ }, value)) {
47489
+ fill = rule.color;
47490
+ break;
47491
+ }
47492
+ }
47493
+ }
47494
+ return fill;
47495
+ }
47496
+
47497
+ var ASSUMED_AVERAGE_CHAR_WIDTH$2 = 8.8;
47498
+ function calculateWordWidth$2(word, avgCharWidth) {
47499
+ if (avgCharWidth === void 0) {
47500
+ avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
47501
+ }
47502
+ return word.length * avgCharWidth;
47503
+ }
47504
+
47505
+ /** Reduce width proportionally to simulate spacing / padding between ticks. */
47506
+ var widthWithSpacing$2 = function widthWithSpacing(width) {
47507
+ var THIRTY_PERCENT = 0.3;
47508
+ return width - width * THIRTY_PERCENT;
47509
+ };
47510
+ function howManyTicksFitInWidth$2(ticks, maxWidth, avgCharWidth) {
47511
+ if (avgCharWidth === void 0) {
47512
+ avgCharWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
47513
+ }
47514
+ var fittedTicks = [];
47515
+ var currentWidth = 0;
47516
+ for (var _iterator = _createForOfIteratorHelperLoose(ticks), _step; !(_step = _iterator()).done;) {
47517
+ var tick = _step.value;
47518
+ var word = (tick == null ? void 0 : tick.formattedValue) || '';
47519
+ var wordWidth = calculateWordWidth$2(word, avgCharWidth);
47520
+ if (currentWidth + wordWidth <= widthWithSpacing$2(maxWidth)) {
47521
+ fittedTicks.push(tick);
47522
+ currentWidth += wordWidth + avgCharWidth; // Add space between words
47523
+ } else {
47524
+ break; // Stop if adding the word exceeds maxWidth
47525
+ }
47526
+ }
47527
+ return fittedTicks.length;
47528
+ }
47529
+ function pickEquallySpaced$2(arr, numPicks) {
47530
+ if (numPicks >= arr.length) {
47531
+ return arr; // If numPicks is greater than or equal to the array length, return the whole array
47532
+ }
47533
+ var result = [];
47534
+ var interval = (arr.length - 1) / (numPicks - 1);
47535
+ for (var i = 0; i < numPicks; i++) {
47536
+ var index = Math.round(i * interval); // Calculate index and round it
47537
+ result.push(arr[index]);
47538
+ }
47539
+ return result;
47540
+ }
47541
+ var adjustTicks$2 = function adjustTicks(waterfallChartRepresentation, width) {
47542
+ waterfallChartRepresentation = cloneDeep(waterfallChartRepresentation);
47543
+
47544
+ // TODO; take this from the theme override...
47545
+ var averageCharacterWidth = ASSUMED_AVERAGE_CHAR_WIDTH$2;
47546
+ var numberOfTicksFittingIntoSpace = howManyTicksFitInWidth$2(waterfallChartRepresentation.x.ticks || [], width, averageCharacterWidth);
47547
+ var MINIMUM_NUMBER_OF_TICKS = 2;
47548
+ if (numberOfTicksFittingIntoSpace < MINIMUM_NUMBER_OF_TICKS) {
47549
+ numberOfTicksFittingIntoSpace = MINIMUM_NUMBER_OF_TICKS;
47550
+ }
47551
+
47552
+ // @ts-ignore
47553
+ waterfallChartRepresentation.x.ticks = pickEquallySpaced$2(waterfallChartRepresentation.x.ticks, numberOfTicksFittingIntoSpace);
47554
+ return waterfallChartRepresentation;
47555
+ };
47556
+
47557
+ var Tooltip$2 = function Tooltip(_ref) {
47558
+ var _tooltipData$xKey$for, _tooltipData$yKey$for;
47559
+ var showTooltip = _ref.showTooltip,
47560
+ tooltipData = _ref.tooltipData,
47561
+ tooltipLeft = _ref.tooltipLeft,
47562
+ tooltipTop = _ref.tooltipTop,
47563
+ xKey = _ref.xKey,
47564
+ yKey = _ref.yKey,
47565
+ theme = _ref.theme;
47566
+ var tooltipRowContainerClasses = buildStyleOverrides({
47567
+ display: 'grid',
47568
+ gridTemplateColumns: 'auto 1fr',
47569
+ gap: 12,
47570
+ fontWeight: 500,
47571
+ color: 'inherit',
47572
+ alignItems: 'center'
47573
+ });
47574
+ var rowClasses = buildStyleOverrides({
47575
+ borderBottom: '1px dotted rgba(0,0,0,0.025)'
47576
+ });
47577
+ var rowLabelClasses = buildStyleOverrides({
47578
+ alignItems: 'center',
47579
+ display: 'flex',
47580
+ fontFamily: 'inherit',
47581
+ letterSpacing: 'inherit',
47582
+ gap: 6
47583
+ });
47584
+ var rowValueClasses = buildStyleOverrides({
47585
+ display: 'block',
47586
+ fontFamily: 'inherit',
47587
+ letterSpacing: 'inherit',
47588
+ margin: 0,
47589
+ padding: 0,
47590
+ textAlign: 'right'
47591
+ });
47592
+ var highlightedClasses = buildStyleOverrides({
47593
+ wordBreak: 'break-all'
47594
+ });
47595
+ if (!showTooltip || !tooltipData) return null;
47596
+ var value = tooltipData[yKey].value;
47597
+ var isPositiveValue = Number(value) > 0;
47598
+ return jsx(TooltipWithBounds, {
47599
+ left: tooltipLeft,
47600
+ top: tooltipTop,
47601
+ style: theme,
47602
+ children: jsxs("div", {
47603
+ style: {
47604
+ wordBreak: 'break-all'
47605
+ },
47606
+ children: [jsx("div", {
47607
+ style: {
47608
+ fontFamily: 'inherit',
47609
+ lineHeight: 'inherit',
47610
+ letterSpacing: 'inherit',
47611
+ fontWeight: 'bold',
47612
+ fontSize: '15px',
47613
+ width: '100%'
47614
+ },
47615
+ children: (_tooltipData$xKey$for = tooltipData[xKey].formattedValue) != null ? _tooltipData$xKey$for : tooltipData[xKey].value
47616
+ }), jsxs("div", {
47617
+ style: {
47618
+ fontWeight: 700
47619
+ },
47620
+ className: "" + tooltipRowContainerClasses,
47621
+ children: [jsx("span", {
47622
+ className: rowClasses + " " + rowLabelClasses,
47623
+ children: jsx("span", {
47624
+ className: "" + highlightedClasses,
47625
+ children: isPositiveValue ? jsx(IconNarrowRight$1, {}) : jsx(IconTrendingDown$1, {})
47626
+ })
47627
+ }), jsx("p", {
47628
+ className: rowClasses + " " + rowValueClasses,
47629
+ children: (_tooltipData$yKey$for = tooltipData[yKey].formattedValue) != null ? _tooltipData$yKey$for : tooltipData[yKey].value
47630
+ })]
47631
+ })]
47632
+ })
47633
+ }, Math.random());
47634
+ };
47635
+ var IconNarrowRight$1 = function IconNarrowRight() {
47636
+ var style = {
47637
+ width: 20,
47638
+ height: 20,
47639
+ display: 'block'
47640
+ };
47641
+ var fill = "#12B76A";
47642
+ return jsx("svg", {
47643
+ fill: "none",
47644
+ xmlns: "http://www.w3.org/2000/svg",
47645
+ viewBox: "0 0 256 256",
47646
+ style: style,
47647
+ children: jsx("path", {
47648
+ fillRule: "evenodd",
47649
+ clipRule: "evenodd",
47650
+ d: "M244 56v64a12 12 0 0 1-24 0V85l-75.51 75.52a12 12 0 0 1-17 0L96 129l-63.51 63.49a12 12 0 0 1-17-17l72-72a12 12 0 0 1 17 0L136 135l67-67h-35a12 12 0 0 1 0-24h64a12 12 0 0 1 12 12",
47651
+ fill: fill
47652
+ })
47653
+ });
47654
+ };
47655
+ var IconTrendingDown$1 = function IconTrendingDown() {
47656
+ var style = {
47657
+ width: 20,
47658
+ height: 20,
47659
+ display: 'block'
47660
+ };
47661
+ var fill = "#F04438";
47662
+ return jsx("svg", {
47663
+ fill: "none",
47664
+ xmlns: "http://www.w3.org/2000/svg",
47665
+ viewBox: "0 0 20 20",
47666
+ style: style,
47667
+ children: jsx("path", {
47668
+ fillRule: "evenodd",
47669
+ clipRule: "evenodd",
47670
+ d: "M12 13a1 1 0 1 0 0 2h5a1 1 0 0 0 1-1V9a1 1 0 1 0-2 0v2.586l-4.293-4.293a1 1 0 0 0-1.414 0L8 9.586 3.707 5.293a1 1 0 0 0-1.414 1.414l5 5a1 1 0 0 0 1.414 0L11 9.414 14.586 13H12Z",
47671
+ fill: fill
47672
+ })
47673
+ });
47674
+ };
47675
+
47676
+ var Legend$2 = function Legend(_ref) {
47677
+ var showLegend = _ref.showLegend,
47678
+ margin = _ref.margin;
47679
+ var items = [{
47680
+ color: 'green',
47681
+ yKey: 'increase',
47682
+ style: {
47683
+ type: 'line',
47684
+ strokeDasharray: null,
47685
+ strokeWidth: 2
47686
+ }
47687
+ }, {
47688
+ color: 'red',
47689
+ yKey: 'decrease',
47690
+ style: {
47691
+ type: 'line',
47692
+ strokeDasharray: null,
47693
+ strokeWidth: 2
47694
+ }
47695
+ }];
47696
+ var keys = {
47697
+ increase: {
47698
+ key: 'increase',
47699
+ keyFormatted: 'Increase',
47700
+ dataType: 'string'
47701
+ },
47702
+ decrease: {
47703
+ key: 'decrease',
47704
+ keyFormatted: 'Decrease',
47705
+ dataType: 'string'
47706
+ }
47707
+ };
47708
+ if (!showLegend) return null;
47709
+ return jsx(Legend$1, {
47710
+ legendItems: items,
47711
+ visibleYKeys: ['increase', 'decrease'],
47712
+ keys: keys,
47713
+ marginLeft: margin.left - margin.leftTitleOffset,
47714
+ conditionalFormattingRules: [],
47715
+ setVisibleYKeys: function setVisibleYKeys() {}
47716
+ });
47717
+ };
47718
+
47719
+ var _excluded$g = ["formattedValue"],
47720
+ _excluded2$4 = ["formattedValue"];
47721
+ var AXIS_TITLE_STYLES$1 = {
47722
+ opacity: '0.75',
47723
+ fontWeight: 'bold'
47724
+ };
47725
+ var WaterfallChart$2 = function WaterfallChart(_ref) {
47726
+ var _theme$axis$stroke, _theme$axis;
47727
+ var height = _ref.height,
47728
+ width = _ref.width,
47729
+ options = _ref.options,
47730
+ chart = _ref.chart,
47731
+ theme = _ref.theme;
47732
+ //Waterfall TODO: fix chart for other x types
47733
+ if (chart.x.scale.dataType === 'date_time' || chart.x.scale.dataType === 'number') {
47734
+ return null;
47735
+ }
47736
+ var _useTooltip = useTooltip$1(),
47737
+ tooltipOpen = _useTooltip.tooltipOpen,
47738
+ _useTooltip$tooltipLe = _useTooltip.tooltipLeft,
47739
+ tooltipLeft = _useTooltip$tooltipLe === void 0 ? 0 : _useTooltip$tooltipLe,
47740
+ _useTooltip$tooltipTo = _useTooltip.tooltipTop,
47741
+ tooltipTop = _useTooltip$tooltipTo === void 0 ? 0 : _useTooltip$tooltipTo,
47742
+ tooltipData = _useTooltip.tooltipData,
47743
+ hideTooltip = _useTooltip.hideTooltip,
47744
+ showTooltip = _useTooltip.showTooltip;
47745
+ var chartCopy = cloneDeep(chart);
47746
+ var data = chartCopy.data,
47747
+ x = chartCopy.x,
47748
+ y = chartCopy.y;
47749
+ var showTotalBar = options.showTotalBar;
47750
+ var conditionalFormattingRules = [{
47751
+ yKey: y.key,
47752
+ operator: '>',
47753
+ value: 0,
47754
+ color: 'green'
47755
+ }, {
47756
+ yKey: y.key,
47757
+ operator: '<',
47758
+ value: 0,
47759
+ color: 'red'
47760
+ }];
47761
+ var xKey = x.key;
47762
+ var yKey = y.key;
47763
+ var cumulativeTotal = 0;
47764
+ var steps = data.map(function (item) {
47765
+ var xValue = item[xKey].value;
47766
+ var yValue = Number(item[yKey].value);
47767
+ var prevTotal = cumulativeTotal;
47768
+ cumulativeTotal += yValue;
47769
+ return {
47770
+ x: xValue,
47771
+ y: yValue,
47772
+ start: prevTotal,
47773
+ end: cumulativeTotal
47774
+ };
47775
+ });
47776
+ if (showTotalBar) {
47777
+ var _data$push;
47778
+ steps.push({
47779
+ x: "Total",
47780
+ y: cumulativeTotal,
47781
+ start: 0,
47782
+ end: cumulativeTotal
47783
+ });
47784
+ data.push((_data$push = {}, _data$push[x.key] = {
47785
+ value: "Total",
47786
+ formattedValue: "Total"
47787
+ }, _data$push[y.key] = {
47788
+ value: cumulativeTotal,
47789
+ formattedValue: null
47790
+ }, _data$push));
47791
+ x.ticks.push({
47792
+ value: "Total",
47793
+ formattedValue: "Total",
47794
+ scaleValue: "Total"
47795
+ });
47796
+ }
47797
+ var formattedYAxisForBarChart = _extends({}, y, {
47798
+ keys: [y.key]
47799
+ });
47800
+ var adjustedChartRepresentation = useMemo(function () {
47801
+ return adjustTicks$2(_extends({}, chartCopy), width);
47802
+ }, [chartCopy, width]);
47803
+ var formattedChartDataForBarChart = _extends({}, adjustedChartRepresentation, {
47804
+ y: formattedYAxisForBarChart,
47805
+ steps: steps,
47806
+ conditionalFormattingRules: conditionalFormattingRules,
47807
+ bars: []
47808
+ });
47809
+ var margin = useMemo(function () {
47810
+ return buildMargin(formattedChartDataForBarChart.y.ticks, options.axis.showYAxisLabels, formattedChartDataForBarChart.y.title != null, formattedChartDataForBarChart.x.title != null);
47811
+ }, [formattedChartDataForBarChart.y.ticks, options.axis.showYAxisLabels, formattedChartDataForBarChart.y.title, formattedChartDataForBarChart.x.title]);
47812
+ var innerWidth = width - margin.left - margin.right;
47813
+ var innerHeight = height - margin.top - margin.bottom - (options.showLegend ? 40 : 0);
47814
+ var xScaleKey = formattedChartDataForBarChart.x.scale.key;
47815
+ var yScaleKeys = formattedChartDataForBarChart.y.keys;
47816
+ var xScaleDataType = formattedChartDataForBarChart.x.scale.dataType;
47817
+ var xScale = useMemo(function () {
47818
+ return scaleBand({
47819
+ range: [0, innerWidth],
47820
+ domain: xScaleKey ? [].concat(formattedChartDataForBarChart.data.map(function (d) {
47821
+ return d[xScaleKey] && d[xScaleKey].value !== null ? String(d[xScaleKey].value) : '';
47822
+ })) : [],
47823
+ paddingOuter: 0,
47824
+ paddingInner: 0
47825
+ });
47826
+ }, [innerWidth, formattedChartDataForBarChart.x, formattedChartDataForBarChart.data]);
47827
+ var yScale = useMemo(function () {
47828
+ return scaleLinear({
47829
+ range: [innerHeight, 0],
47830
+ domain: formattedChartDataForBarChart.y.scale.ordering === 'asc' ? [formattedChartDataForBarChart.y.scale.min, formattedChartDataForBarChart.y.scale.max] : [formattedChartDataForBarChart.y.scale.max, formattedChartDataForBarChart.y.scale.min],
47831
+ nice: true
47832
+ });
47833
+ }, [innerHeight, formattedChartDataForBarChart.y]);
47834
+ var xBandwidth = xScale.bandwidth();
47835
+ var innerXScale = useMemo(function () {
47836
+ return scaleBand({
47837
+ range: [0, xBandwidth],
47838
+ domain: yScaleKeys,
47839
+ padding: 0.1
47840
+ });
47841
+ }, [xScale, yScaleKeys, xScaleDataType]);
47842
+ var dataFlattened = useMemo(function () {
47843
+ if (xScaleKey) {
47844
+ return flattenData({
47845
+ data: formattedChartDataForBarChart.data,
47846
+ xScaleKey: xScaleKey,
47847
+ xScaleDataType: xScaleDataType,
47848
+ yKeys: formattedChartDataForBarChart.y.keys
47849
+ });
47850
+ }
47851
+ return [];
47852
+ }, [formattedChartDataForBarChart.data, xScaleKey, xScaleDataType, formattedChartDataForBarChart.y.keys]);
47853
+ var themeCSS = useMemo(function () {
47854
+ return getChartThemeCSS(theme);
47855
+ }, [theme]);
47856
+ var yTickValues = formattedChartDataForBarChart.y.ticks.map(function (tick) {
47857
+ return Number(tick.value);
47858
+ });
47859
+ var xTickValues = formattedChartDataForBarChart.x.ticks.length > 0 ? formattedChartDataForBarChart.x.ticks.map(function (tick) {
47860
+ var _tick$scaleValue;
47861
+ return (_tick$scaleValue = tick.scaleValue) != null ? _tick$scaleValue : 0;
47862
+ }) : undefined;
47863
+ var handleMouseMove = useCallback(function (event) {
47864
+ if (!xKey || !xScaleKey || xScale === null) return;
47865
+ var tooltipData = getTooltipData({
47866
+ data: formattedChartDataForBarChart.data,
47867
+ event: event,
47868
+ margin: margin,
47869
+ xScaleKey: xScaleKey,
47870
+ xScaleDataType: xScaleDataType,
47871
+ xOrdering: formattedChartDataForBarChart.x.scale.ordering,
47872
+ xScale: xScale,
47873
+ chartType: 'bar'
47874
+ });
47875
+ showTooltip({
47876
+ tooltipLeft: tooltipData == null ? void 0 : tooltipData.tooltipLeft,
47877
+ tooltipTop: tooltipData == null ? void 0 : tooltipData.tooltipTop,
47878
+ tooltipData: tooltipData == null ? void 0 : tooltipData.tooltipData
47879
+ });
47880
+ }, [showTooltip, xScale, margin, xKey, xScaleKey, xScaleDataType, formattedChartDataForBarChart.x.scale.ordering, formattedChartDataForBarChart.data]);
47881
+ var handleMouseLeave = useCallback(function () {
47882
+ hideTooltip();
47883
+ }, [hideTooltip]);
47884
+ var getXTickFormat = useCallback(function (value) {
47885
+ var tick = null;
47886
+ if (xScaleDataType === 'date_time' && value instanceof Date) {
47887
+ var matchingTickValue = formattedChartDataForBarChart.x.ticks.find(function (tickValue) {
47888
+ return tickValue.scaleValue && new Date(tickValue.scaleValue).valueOf() === value.valueOf();
47889
+ });
47890
+ tick = matchingTickValue || null;
47891
+ } else {
47892
+ var _matchingTickValue = formattedChartDataForBarChart.x.ticks.find(function (tickValue) {
47893
+ return tickValue.scaleValue === value;
47894
+ });
47895
+ tick = _matchingTickValue || null;
47896
+ }
47897
+ if (tick) {
47898
+ if (tick.formattedValue) {
47899
+ return tick.formattedValue;
47900
+ }
47901
+ return tick.value.toString();
47902
+ }
47903
+ return '';
47904
+ }, [formattedChartDataForBarChart.x.ticks, xScaleDataType]);
47905
+ var getYTickFormat = useCallback(function (value) {
47906
+ var item = formattedChartDataForBarChart.y.ticks.filter(function (tick) {
47907
+ return tick.value === value;
47908
+ })[0];
47909
+ if (item) {
47910
+ if (item.formattedValue) {
47911
+ return item.formattedValue;
47912
+ }
47913
+ return item.value.toString();
47914
+ }
47915
+ return '';
47916
+ }, [formattedChartDataForBarChart.y.ticks]);
47917
+ var getBarGroupPosition = useCallback(function (d) {
47918
+ if (xScaleKey == null || d == null) return;
47919
+ var xValue = d[xScaleKey];
47920
+ if (xScaleDataType === 'string') return xValue;
47921
+ return;
47922
+ }, [xScaleKey, xScaleDataType]);
47923
+ return jsxs(Fragment$1, {
47924
+ children: [jsxs("svg", {
47925
+ width: width,
47926
+ height: height - (options.showLegend ? 40 : 0),
47927
+ onMouseMove: handleMouseMove,
47928
+ onMouseLeave: handleMouseLeave,
47929
+ style: {
47930
+ display: 'block'
47931
+ },
47932
+ children: [jsxs(Group$2, {
47933
+ left: margin.left,
47934
+ top: margin.top,
47935
+ children: [jsx(GridRows$1, {
47936
+ tickValues: yTickValues.length > 0 ? yTickValues : undefined,
47937
+ scale: yScale,
47938
+ width: innerWidth,
47939
+ height: innerHeight,
47940
+ pointerEvents: "none",
47941
+ strokeDasharray: "0.5 5",
47942
+ strokeWidth: options.removeStroke ? 0 : 2,
47943
+ lineStyle: {
47944
+ strokeLinecap: 'round',
47945
+ stroke: themeCSS.grid.stroke
47946
+ }
47947
+ }), options.axis.showXAxisLabels && jsx(AxisBottom$1, {
47948
+ label: formattedChartDataForBarChart.x.title || undefined,
47949
+ labelProps: {
47950
+ style: AXIS_TITLE_STYLES$1
47951
+ },
47952
+ labelOffset: margin.bottomTitleOffset,
47953
+ hideTicks: true,
47954
+ top: innerHeight,
47955
+ scale: xScale,
47956
+ tickFormat: getXTickFormat,
47957
+ tickValues: xTickValues,
47958
+ tickComponent: function tickComponent(_ref2) {
47959
+ var formattedValue = _ref2.formattedValue,
47960
+ tickProps = _objectWithoutPropertiesLoose(_ref2, _excluded$g);
47961
+ return jsx(Text, _extends({
47962
+ style: themeCSS.labels
47963
+ }, tickProps, {
47964
+ children: formattedValue
47965
+ }));
47966
+ },
47967
+ stroke: themeCSS.axis.stroke,
47968
+ strokeWidth: options.removeStroke ? 0 : 1
47969
+ }), options.axis.showYAxisLabels && jsx(AxisLeft$1, {
47970
+ labelOffset: margin.leftTitleOffset,
47971
+ label: formattedChartDataForBarChart.y.title || undefined,
47972
+ labelProps: {
47973
+ style: AXIS_TITLE_STYLES$1
47974
+ },
47975
+ hideTicks: true,
47976
+ left: 0,
47977
+ top: 0,
47978
+ scale: yScale,
47979
+ tickFormat: getYTickFormat,
47980
+ tickValues: yTickValues,
47981
+ tickComponent: function tickComponent(_ref3) {
47982
+ var formattedValue = _ref3.formattedValue,
47983
+ tickProps = _objectWithoutPropertiesLoose(_ref3, _excluded2$4);
47984
+ return jsx(Text, _extends({
47985
+ width: 10,
47986
+ style: themeCSS.labels
47987
+ }, tickProps, {
47988
+ children: formattedValue
47989
+ }));
47990
+ },
47991
+ stroke: (_theme$axis$stroke = theme == null || (_theme$axis = theme.axis) == null ? void 0 : _theme$axis.stroke) != null ? _theme$axis$stroke : 'transparent'
47992
+ }), jsx(Group$2, {
47993
+ children: jsx(BarGroup$1, {
47994
+ data: dataFlattened,
47995
+ keys: yScaleKeys,
47996
+ height: innerHeight,
47997
+ x0: getBarGroupPosition
47998
+ // @ts-ignore
47999
+ ,
48000
+ x0Scale: xScale
48001
+ // @ts-ignore
48002
+ ,
48003
+ x1Scale: innerXScale,
48004
+ yScale: yScale,
48005
+ color: function color() {
48006
+ return '';
48007
+ },
48008
+ children: function children(barGroups) {
48009
+ return barGroups.map(function (barGroup) {
48010
+ return jsx(Group$2, {
48011
+ left: barGroup.x0,
48012
+ children: barGroup.bars.map(function (bar) {
48013
+ return jsx(Bar$1, {
48014
+ bar: bar,
48015
+ barGroup: barGroup,
48016
+ yScale: yScale,
48017
+ formattedChartDataForBarChart: formattedChartDataForBarChart
48018
+ });
48019
+ })
48020
+ }, "bar-group-" + barGroup.index + "-" + barGroup.x0);
48021
+ });
48022
+ }
48023
+ })
48024
+ })]
48025
+ }), tooltipData && jsx("g", {
48026
+ children: jsx(Line, {
48027
+ from: {
48028
+ x: tooltipLeft,
48029
+ y: margin.top
48030
+ },
48031
+ to: {
48032
+ x: tooltipLeft,
48033
+ y: innerHeight + margin.top
48034
+ },
48035
+ stroke: '#aaa',
48036
+ strokeWidth: 2,
48037
+ pointerEvents: "none",
48038
+ opacity: 0.8
48039
+ })
48040
+ })]
48041
+ }), jsx(Legend$2, {
48042
+ showLegend: options.showLegend,
48043
+ margin: margin
48044
+ }), jsx(Tooltip$2, {
48045
+ showTooltip: tooltipOpen,
48046
+ tooltipData: tooltipData,
48047
+ tooltipLeft: tooltipLeft,
48048
+ tooltipTop: tooltipTop,
48049
+ xKey: xKey,
48050
+ yKey: yKey,
48051
+ theme: themeCSS.popoverMenus
48052
+ })]
48053
+ });
48054
+ };
48055
+ var Bar$1 = function Bar(_ref4) {
48056
+ var bar = _ref4.bar,
48057
+ barGroup = _ref4.barGroup,
48058
+ yScale = _ref4.yScale,
48059
+ formattedChartDataForBarChart = _ref4.formattedChartDataForBarChart;
48060
+ var step = formattedChartDataForBarChart.steps[barGroup.index];
48061
+ var y = yScale(Math.max(step.start, step.end));
48062
+ var barHeight = Math.abs(yScale(step.start) - yScale(step.end));
48063
+ return jsx(Fragment$1, {
48064
+ children: jsx("rect", {
48065
+ x: bar.x,
48066
+ y: y,
48067
+ width: bar.width,
48068
+ height: barHeight,
48069
+ fill: getBarFill$1(formattedChartDataForBarChart.bars, formattedChartDataForBarChart.conditionalFormattingRules, bar.key, bar.value),
48070
+ rx: 4
48071
+ }, "bar-group-bar-" + barGroup.index + "-" + bar.index + "-" + bar.value + "-" + bar.key)
48072
+ });
48073
+ };
48074
+
46863
48075
  function getNiceInterval$2(interval) {
46864
48076
  // Round the interval to a "nice" value (1, 2, 5, etc.)
46865
48077
  var exponent = Math.floor(Math.log10(interval));
@@ -47144,7 +48356,7 @@ var WaterfallChartView = function WaterfallChartView(props) {
47144
48356
  overflowX: 'hidden'
47145
48357
  },
47146
48358
  children: function children(parent) {
47147
- return jsx(WaterfallChart$4, {
48359
+ return jsx(WaterfallChart$2, {
47148
48360
  width: parent.width,
47149
48361
  height: parent.height,
47150
48362
  options: {
@@ -47169,7 +48381,7 @@ var WaterfallChartView = function WaterfallChartView(props) {
47169
48381
  };
47170
48382
  var WaterfallChartView$1 = /*#__PURE__*/memo(WaterfallChartView, shouldUpdate);
47171
48383
 
47172
- var WaterfallChart$2 = function WaterfallChart(_ref) {
48384
+ var WaterfallChart$3 = function WaterfallChart(_ref) {
47173
48385
  var component = _ref.component,
47174
48386
  dataSet = _ref.dataSet,
47175
48387
  dashboardBehaviour = _ref.dashboardBehaviour,
@@ -47298,6 +48510,30 @@ var Component = function Component(props) {
47298
48510
  })
47299
48511
  });
47300
48512
  }
48513
+ if (props.component.attributes.type == 'bubbleChart') {
48514
+ return jsx(ErrorBoundary, {
48515
+ renderOnError: function renderOnError(onManualRetry) {
48516
+ return jsx(ComponentErrorNotice, {
48517
+ onManualRetry: onManualRetry
48518
+ });
48519
+ },
48520
+ onError: dashboardBehaviour.onError,
48521
+ children: jsx(BubbleChart$2, {
48522
+ id: props.id,
48523
+ setLocalFilters: props.setLocalFilters,
48524
+ dataSet: dataSet,
48525
+ runQueriesCallback: props.runQueriesCallback,
48526
+ component: props.component,
48527
+ setResults: props.setResults,
48528
+ globalFilters: dashboard.globalFilters,
48529
+ dashboardBehaviour: dashboardBehaviour,
48530
+ sm: smallVersion,
48531
+ library: props == null ? void 0 : props.library,
48532
+ idPrefix: idPrefix,
48533
+ setPartialAttributes: setPartialAttributes
48534
+ })
48535
+ });
48536
+ }
47301
48537
  if (['horizontalBarChart', 'barChart'].includes(props.component.attributes.type)) {
47302
48538
  return jsx(ErrorBoundary, {
47303
48539
  renderOnError: function renderOnError(onManualRetry) {
@@ -47666,7 +48902,7 @@ var Component = function Component(props) {
47666
48902
  });
47667
48903
  },
47668
48904
  onError: dashboardBehaviour.onError,
47669
- children: jsx(WaterfallChart$2, {
48905
+ children: jsx(WaterfallChart$3, {
47670
48906
  id: props.id,
47671
48907
  dataSet: dataSet,
47672
48908
  setLocalFilters: props.setLocalFilters,
@@ -63886,109 +65122,109 @@ var PieChart$4 = /*#__PURE__*/function (_View5) {
63886
65122
  };
63887
65123
  return PieChart;
63888
65124
  }(View$3);
63889
- var ScatterChart$4 = /*#__PURE__*/function (_View6) {
65125
+ var ScatterChart$4 = /*#__PURE__*/function (_View7) {
63890
65126
  function ScatterChart(attributes) {
63891
- return _View6.call(this, _extends({}, attributes, {
65127
+ return _View7.call(this, _extends({}, attributes, {
63892
65128
  type: 'scatterChart'
63893
65129
  })) || this;
63894
65130
  }
63895
- _inheritsLoose(ScatterChart, _View6);
65131
+ _inheritsLoose(ScatterChart, _View7);
63896
65132
  ScatterChart.type = function type() {
63897
65133
  return 'scatterChart';
63898
65134
  };
63899
65135
  return ScatterChart;
63900
65136
  }(View$3);
63901
- var ComboChart$4 = /*#__PURE__*/function (_View7) {
65137
+ var ComboChart$4 = /*#__PURE__*/function (_View8) {
63902
65138
  function ComboChart(attributes) {
63903
- return _View7.call(this, _extends({}, attributes, {
65139
+ return _View8.call(this, _extends({}, attributes, {
63904
65140
  type: 'comboChart'
63905
65141
  })) || this;
63906
65142
  }
63907
- _inheritsLoose(ComboChart, _View7);
65143
+ _inheritsLoose(ComboChart, _View8);
63908
65144
  ComboChart.type = function type() {
63909
65145
  return 'comboChart';
63910
65146
  };
63911
65147
  return ComboChart;
63912
65148
  }(View$3);
63913
- var PivotTable = /*#__PURE__*/function (_View8) {
65149
+ var PivotTable = /*#__PURE__*/function (_View9) {
63914
65150
  function PivotTable(attributes) {
63915
- return _View8.call(this, _extends({}, attributes, {
65151
+ return _View9.call(this, _extends({}, attributes, {
63916
65152
  type: 'dataTable'
63917
65153
  })) || this;
63918
65154
  }
63919
- _inheritsLoose(PivotTable, _View8);
65155
+ _inheritsLoose(PivotTable, _View9);
63920
65156
  PivotTable.type = function type() {
63921
65157
  return 'dataTable';
63922
65158
  };
63923
65159
  return PivotTable;
63924
65160
  }(View$3);
63925
- var BasicTable$1 = /*#__PURE__*/function (_View9) {
65161
+ var BasicTable$1 = /*#__PURE__*/function (_View10) {
63926
65162
  function BasicTable(attributes) {
63927
- return _View9.call(this, _extends({}, attributes, {
65163
+ return _View10.call(this, _extends({}, attributes, {
63928
65164
  type: 'basicTable'
63929
65165
  })) || this;
63930
65166
  }
63931
- _inheritsLoose(BasicTable, _View9);
65167
+ _inheritsLoose(BasicTable, _View10);
63932
65168
  BasicTable.type = function type() {
63933
65169
  return 'basicTable';
63934
65170
  };
63935
65171
  return BasicTable;
63936
65172
  }(View$3);
63937
- var HorizontalBarChart$2 = /*#__PURE__*/function (_View10) {
65173
+ var HorizontalBarChart$2 = /*#__PURE__*/function (_View11) {
63938
65174
  function HorizontalBarChart(attributes) {
63939
- return _View10.call(this, _extends({}, attributes, {
65175
+ return _View11.call(this, _extends({}, attributes, {
63940
65176
  type: 'horizontalBarChart'
63941
65177
  })) || this;
63942
65178
  }
63943
- _inheritsLoose(HorizontalBarChart, _View10);
65179
+ _inheritsLoose(HorizontalBarChart, _View11);
63944
65180
  HorizontalBarChart.type = function type() {
63945
65181
  return 'horizontalBarChart';
63946
65182
  };
63947
65183
  return HorizontalBarChart;
63948
65184
  }(View$3);
63949
- var MercatorMap$4 = /*#__PURE__*/function (_View11) {
65185
+ var MercatorMap$4 = /*#__PURE__*/function (_View12) {
63950
65186
  function MercatorMap(attributes) {
63951
- return _View11.call(this, _extends({}, attributes, {
65187
+ return _View12.call(this, _extends({}, attributes, {
63952
65188
  type: 'mercatorMap'
63953
65189
  })) || this;
63954
65190
  }
63955
- _inheritsLoose(MercatorMap, _View11);
65191
+ _inheritsLoose(MercatorMap, _View12);
63956
65192
  MercatorMap.type = function type() {
63957
65193
  return 'mercatorMap';
63958
65194
  };
63959
65195
  return MercatorMap;
63960
65196
  }(View$3);
63961
- var SingleStat$3 = /*#__PURE__*/function (_View12) {
65197
+ var SingleStat$3 = /*#__PURE__*/function (_View13) {
63962
65198
  function SingleStat(attributes) {
63963
- return _View12.call(this, _extends({}, attributes, {
65199
+ return _View13.call(this, _extends({}, attributes, {
63964
65200
  type: 'singleStat'
63965
65201
  })) || this;
63966
65202
  }
63967
- _inheritsLoose(SingleStat, _View12);
65203
+ _inheritsLoose(SingleStat, _View13);
63968
65204
  SingleStat.type = function type() {
63969
65205
  return 'singleStat';
63970
65206
  };
63971
65207
  return SingleStat;
63972
65208
  }(View$3);
63973
- var Progress$3 = /*#__PURE__*/function (_View13) {
65209
+ var Progress$3 = /*#__PURE__*/function (_View14) {
63974
65210
  function Progress(attributes) {
63975
- return _View13.call(this, _extends({}, attributes, {
65211
+ return _View14.call(this, _extends({}, attributes, {
63976
65212
  type: 'progress'
63977
65213
  })) || this;
63978
65214
  }
63979
- _inheritsLoose(Progress, _View13);
65215
+ _inheritsLoose(Progress, _View14);
63980
65216
  Progress.type = function type() {
63981
65217
  return 'progress';
63982
65218
  };
63983
65219
  return Progress;
63984
65220
  }(View$3);
63985
- var WaterfallChart$3 = /*#__PURE__*/function (_View15) {
65221
+ var WaterfallChart$4 = /*#__PURE__*/function (_View16) {
63986
65222
  function WaterfallChart(attributes) {
63987
- return _View15.call(this, _extends({}, attributes, {
65223
+ return _View16.call(this, _extends({}, attributes, {
63988
65224
  type: 'waterfallChart'
63989
65225
  })) || this;
63990
65226
  }
63991
- _inheritsLoose(WaterfallChart, _View15);
65227
+ _inheritsLoose(WaterfallChart, _View16);
63992
65228
  WaterfallChart.type = function type() {
63993
65229
  return 'waterfallChart';
63994
65230
  };
@@ -64298,7 +65534,21 @@ var toQueries$d = function toQueries(attributes, dataSet, queryEngineConfig, par
64298
65534
  };
64299
65535
  };
64300
65536
 
64301
- var toQueries$e = function toQueries$1(attributes, dataSet, queryEngineConfig, params) {
65537
+ var toQueries$e = function toQueries(attributes, dataSet, queryEngineConfig, params) {
65538
+ var measures = [];
65539
+ attributes.xMeasure && measures.push(attributes.xMeasure);
65540
+ attributes.yMeasure && measures.push(attributes.yMeasure);
65541
+ var _Query$build = build$a(dataSet, measures, attributes.order, attributes.dimension, attributes.timeDimension, attributes.limit, attributes.offset, queryEngineConfig, params),
65542
+ query = _Query$build.query,
65543
+ measureDescription = _Query$build.measureDescription;
65544
+ var resultFields = toResultFields([measureDescription], queryEngineConfig);
65545
+ return {
65546
+ queries: [query],
65547
+ resultFields: resultFields
65548
+ };
65549
+ };
65550
+
65551
+ var toQueries$f = function toQueries$1(attributes, dataSet, queryEngineConfig, params) {
64302
65552
  return toQueries([dataSet], [{
64303
65553
  measure: attributes.measure,
64304
65554
  dataSetId: dataSet.id,
@@ -64310,12 +65560,12 @@ var toQueries$e = function toQueries$1(attributes, dataSet, queryEngineConfig, p
64310
65560
  }], queryEngineConfig, params);
64311
65561
  };
64312
65562
 
64313
- var toQueries$f = commonToQueries;
64314
-
64315
65563
  var toQueries$g = commonToQueries;
64316
65564
 
64317
65565
  var toQueries$h = commonToQueries;
64318
65566
 
65567
+ var toQueries$i = commonToQueries;
65568
+
64319
65569
  var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet, queryEngineConfig, params) {
64320
65570
  switch (attributes.type) {
64321
65571
  case 'areaChart':
@@ -64344,14 +65594,16 @@ var buildVizzlyViewQueries = function buildVizzlyViewQueries(attributes, dataSet
64344
65594
  return toQueries$c(attributes, dataSet, queryEngineConfig, params);
64345
65595
  case 'scatterChart':
64346
65596
  return toQueries$d(attributes, dataSet, queryEngineConfig, params);
64347
- case 'mercatorMap':
65597
+ case 'bubbleChart':
64348
65598
  return toQueries$e(attributes, dataSet, queryEngineConfig, params);
64349
- case 'funnelChart':
65599
+ case 'mercatorMap':
64350
65600
  return toQueries$f(attributes, dataSet, queryEngineConfig, params);
64351
- case 'richText':
65601
+ case 'funnelChart':
64352
65602
  return toQueries$g(attributes, dataSet, queryEngineConfig, params);
64353
- case 'waterfallChart':
65603
+ case 'richText':
64354
65604
  return toQueries$h(attributes, dataSet, queryEngineConfig, params);
65605
+ case 'waterfallChart':
65606
+ return toQueries$i(attributes, dataSet, queryEngineConfig, params);
64355
65607
  default:
64356
65608
  throw 'Unsupported view when building query.';
64357
65609
  }
@@ -65911,7 +67163,7 @@ VizzlyServices.HorizontalBarChart = HorizontalBarChart$2;
65911
67163
  VizzlyServices.MercatorMap = MercatorMap$4;
65912
67164
  VizzlyServices.SingleStat = SingleStat$3;
65913
67165
  VizzlyServices.Progress = Progress$3;
65914
- VizzlyServices.WaterfallChart = WaterfallChart$3;
67166
+ VizzlyServices.WaterfallChart = WaterfallChart$4;
65915
67167
  // @ts-ignore
65916
67168
  if (typeof window !== 'undefined' && !window.Vizzly) {
65917
67169
  // @ts-ignore
@@ -67222,6 +68474,7 @@ var attributesToAiView = function attributesToAiView(dataSet, originalAttributes
67222
68474
  if (attributes.type === 'funnelChart') throw 'Funnel chart views are not supported by Vizzly AI.';
67223
68475
  if (attributes.type === 'richText') throw 'Rich text views are not supported by Vizzly AI.';
67224
68476
  if (attributes.type === 'lineChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
68477
+ if (attributes.type === 'bubbleChart') throw 'Bubble Chart views are not supported by Vizzly AI.';
67225
68478
  if (attributes.type === 'barChartV2') throw 'Line Chart V2 views are not supported by Vizzly AI.';
67226
68479
  if (attributes.type === 'waterfallChart') throw 'Waterfall chart views are not supported by Vizzly AI.';
67227
68480
  var select = [];
@@ -68737,7 +69990,7 @@ var GlobalProviderContents = function GlobalProviderContents(props) {
68737
69990
  });
68738
69991
  };
68739
69992
 
68740
- var _excluded$g = ["view"];
69993
+ var _excluded$h = ["view"];
68741
69994
  var Dashboard$2 = function Dashboard(props) {
68742
69995
  var handleOnError = function handleOnError(error, errorInfo) {
68743
69996
  return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
@@ -68758,7 +70011,7 @@ var Editor$1 = function Editor(props) {
68758
70011
  var handleOnError = function handleOnError(error, errorInfo) {
68759
70012
  return (props == null ? void 0 : props.onError) && (props == null ? void 0 : props.onError(error, errorInfo));
68760
70013
  };
68761
- var resetProps = _objectWithoutPropertiesLoose(props, _excluded$g);
70014
+ var resetProps = _objectWithoutPropertiesLoose(props, _excluded$h);
68762
70015
  return jsxs(ErrorBoundary, {
68763
70016
  renderOnError: function renderOnError() {
68764
70017
  return jsx("p", {