react-autoql 3.5.2 → 3.5.5

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.
@@ -66,14 +66,9 @@ function ownKeys(object, enumerableOnly) {
66
66
 
67
67
  if (Object.getOwnPropertySymbols) {
68
68
  var symbols = Object.getOwnPropertySymbols(object);
69
-
70
- if (enumerableOnly) {
71
- symbols = symbols.filter(function (sym) {
72
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
73
- });
74
- }
75
-
76
- keys.push.apply(keys, symbols);
69
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
70
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
71
+ })), keys.push.apply(keys, symbols);
77
72
  }
78
73
 
79
74
  return keys;
@@ -81,19 +76,12 @@ function ownKeys(object, enumerableOnly) {
81
76
 
82
77
  function _objectSpread2(target) {
83
78
  for (var i = 1; i < arguments.length; i++) {
84
- var source = arguments[i] != null ? arguments[i] : {};
85
-
86
- if (i % 2) {
87
- ownKeys(Object(source), true).forEach(function (key) {
88
- _defineProperty(target, key, source[key]);
89
- });
90
- } else if (Object.getOwnPropertyDescriptors) {
91
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
92
- } else {
93
- ownKeys(Object(source)).forEach(function (key) {
94
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
95
- });
96
- }
79
+ var source = null != arguments[i] ? arguments[i] : {};
80
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
81
+ _defineProperty(target, key, source[key]);
82
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
83
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
84
+ });
97
85
  }
98
86
 
99
87
  return target;
@@ -102,17 +90,11 @@ function _objectSpread2(target) {
102
90
  function _typeof(obj) {
103
91
  "@babel/helpers - typeof";
104
92
 
105
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
106
- _typeof = function (obj) {
107
- return typeof obj;
108
- };
109
- } else {
110
- _typeof = function (obj) {
111
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
112
- };
113
- }
114
-
115
- return _typeof(obj);
93
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
94
+ return typeof obj;
95
+ } : function (obj) {
96
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
97
+ }, _typeof(obj);
116
98
  }
117
99
 
118
100
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -170,6 +152,9 @@ function _defineProperties(target, props) {
170
152
  function _createClass(Constructor, protoProps, staticProps) {
171
153
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
172
154
  if (staticProps) _defineProperties(Constructor, staticProps);
155
+ Object.defineProperty(Constructor, "prototype", {
156
+ writable: false
157
+ });
173
158
  return Constructor;
174
159
  }
175
160
 
@@ -218,6 +203,9 @@ function _inherits(subClass, superClass) {
218
203
  configurable: true
219
204
  }
220
205
  });
206
+ Object.defineProperty(subClass, "prototype", {
207
+ writable: false
208
+ });
221
209
  if (superClass) _setPrototypeOf(subClass, superClass);
222
210
  }
223
211
 
@@ -464,7 +452,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
464
452
  return _this;
465
453
  }
466
454
 
467
- return ErrorBoundary;
455
+ return _createClass(ErrorBoundary);
468
456
  }(React.Component);
469
457
 
470
458
  _defineProperty(ErrorBoundary, "propTypes", {
@@ -2628,7 +2616,7 @@ var Icon = /*#__PURE__*/function (_React$Component) {
2628
2616
  return _this;
2629
2617
  }
2630
2618
 
2631
- return Icon;
2619
+ return _createClass(Icon);
2632
2620
  }(React.Component);
2633
2621
 
2634
2622
  _defineProperty(Icon, "propTypes", {
@@ -2803,7 +2791,7 @@ var runQueryOnly = function runQueryOnly() {
2803
2791
 
2804
2792
  var url = "".concat(domain, "/autoql/api/v1/query?key=").concat(apiKey);
2805
2793
  var finalUserSelection = transformUserSelection(userSelection);
2806
- var sessionConditions = JSON.parse(sessionStorage.getItem("conditions"));
2794
+ var sessionConditions = JSON.parse(sessionStorage.getItem('conditions'));
2807
2795
  var conditions = {};
2808
2796
 
2809
2797
  if (sessionConditions !== null) {
@@ -2915,9 +2903,6 @@ var runQuery = function runQuery() {
2915
2903
  source = _ref5.source,
2916
2904
  skipQueryValidation = _ref5.skipQueryValidation,
2917
2905
  AutoAEId = _ref5.AutoAEId;
2918
-
2919
- // Temp for demo: decode token to get project id
2920
- var id;
2921
2906
  var base64Url;
2922
2907
 
2923
2908
  if (token) {
@@ -2928,38 +2913,35 @@ var runQuery = function runQuery() {
2928
2913
  var buff = Buffer.from(base64, 'base64');
2929
2914
  var payloadinit = buff.toString('ascii');
2930
2915
  var payload = JSON.parse(payloadinit);
2931
- id = _get(payload, 'project_id');
2916
+ _get(payload, 'project_id');
2932
2917
  }
2933
- } // temp ignore validation for these projects
2918
+ }
2934
2919
 
2920
+ if (enableQueryValidation && !skipQueryValidation && !isQandA) {
2921
+ return runQueryValidation({
2922
+ text: query,
2923
+ domain: domain,
2924
+ apiKey: apiKey,
2925
+ token: token
2926
+ }).then(function (response) {
2927
+ if (failedValidation(response)) {
2928
+ return Promise.resolve(response);
2929
+ }
2935
2930
 
2936
- if (id !== 'accounting-demo' && id !== 'operational-demo' && id !== 'stockmarket-demo') {
2937
- if (enableQueryValidation && !skipQueryValidation && !isQandA) {
2938
- return runQueryValidation({
2939
- text: query,
2931
+ return runQueryOnly({
2932
+ query: query,
2933
+ userSelection: userSelection,
2934
+ debug: debug,
2935
+ test: test,
2940
2936
  domain: domain,
2941
2937
  apiKey: apiKey,
2942
- token: token
2943
- }).then(function (response) {
2944
- if (failedValidation(response)) {
2945
- return Promise.resolve(response);
2946
- }
2947
-
2948
- return runQueryOnly({
2949
- query: query,
2950
- userSelection: userSelection,
2951
- debug: debug,
2952
- test: test,
2953
- domain: domain,
2954
- apiKey: apiKey,
2955
- token: token,
2956
- source: source,
2957
- AutoAEId: AutoAEId
2958
- });
2959
- }).catch(function (error) {
2960
- return Promise.reject(error);
2938
+ token: token,
2939
+ source: source,
2940
+ AutoAEId: AutoAEId
2961
2941
  });
2962
- }
2942
+ }).catch(function (error) {
2943
+ return Promise.reject(error);
2944
+ });
2963
2945
  }
2964
2946
 
2965
2947
  return runQueryOnly({
@@ -3390,7 +3372,7 @@ var Dictaphone = /*#__PURE__*/function (_React$Component) {
3390
3372
  return _this;
3391
3373
  }
3392
3374
 
3393
- return Dictaphone;
3375
+ return _createClass(Dictaphone);
3394
3376
  }(React.Component);
3395
3377
 
3396
3378
  _defineProperty(Dictaphone, "propTypes", {
@@ -3455,7 +3437,7 @@ var QueryInput = /*#__PURE__*/function (_React$Component) {
3455
3437
  setCSSVars(getThemeConfig(_this.props.themeConfig));
3456
3438
  }
3457
3439
 
3458
- if (_this.props.inputValue && _this.props.inputValue !== prevProps.inputValue) {
3440
+ if (_this.props.inputValue !== prevProps.inputValue) {
3459
3441
  _this.setState({
3460
3442
  inputValue: _this.props.inputValue
3461
3443
  });
@@ -3847,7 +3829,7 @@ var QueryInput = /*#__PURE__*/function (_React$Component) {
3847
3829
  return _this;
3848
3830
  }
3849
3831
 
3850
- return QueryInput;
3832
+ return _createClass(QueryInput);
3851
3833
  }(React.Component);
3852
3834
 
3853
3835
  _defineProperty(QueryInput, "propTypes", {
@@ -4047,7 +4029,7 @@ var ChataTable = /*#__PURE__*/function (_React$Component) {
4047
4029
  return _this;
4048
4030
  }
4049
4031
 
4050
- return ChataTable;
4032
+ return _createClass(ChataTable);
4051
4033
  }(React.Component);
4052
4034
 
4053
4035
  _defineProperty(ChataTable, "propTypes", {
@@ -4344,7 +4326,7 @@ var Axis$1 = /*#__PURE__*/function (_Component) {
4344
4326
  return _this;
4345
4327
  }
4346
4328
 
4347
- return Axis;
4329
+ return _createClass(Axis);
4348
4330
  }(Component);
4349
4331
 
4350
4332
  _defineProperty(Axis$1, "propTypes", {
@@ -4583,7 +4565,7 @@ var Axes = /*#__PURE__*/function (_React$Component) {
4583
4565
  return _this;
4584
4566
  }
4585
4567
 
4586
- return Axes;
4568
+ return _createClass(Axes);
4587
4569
  }(React.Component);
4588
4570
 
4589
4571
  _defineProperty(Axes, "propTypes", {
@@ -4741,7 +4723,7 @@ var Columns = /*#__PURE__*/function (_Component) {
4741
4723
  return _this;
4742
4724
  }
4743
4725
 
4744
- return Columns;
4726
+ return _createClass(Columns);
4745
4727
  }(Component);
4746
4728
 
4747
4729
  _defineProperty(Columns, "propTypes", {});
@@ -4893,9 +4875,9 @@ var ChataColumnChart = /*#__PURE__*/function (_Component) {
4893
4875
  numberColumnIndices = _this$props.numberColumnIndices,
4894
4876
  stringColumnIndices = _this$props.stringColumnIndices,
4895
4877
  onLegendTitleClick = _this$props.onLegendTitleClick,
4896
- bottomLegendMargin = _this$props.bottomLegendMargin;
4897
- _this$props.stringColumnIndex;
4898
- var numberColumnIndex = _this$props.numberColumnIndex,
4878
+ bottomLegendMargin = _this$props.bottomLegendMargin,
4879
+ stringColumnIndex = _this$props.stringColumnIndex,
4880
+ numberColumnIndex = _this$props.numberColumnIndex,
4899
4881
  numberAxisTitle = _this$props.numberAxisTitle,
4900
4882
  stringAxisTitle = _this$props.stringAxisTitle,
4901
4883
  dataFormatting = _this$props.dataFormatting,
@@ -4945,7 +4927,7 @@ var ChataColumnChart = /*#__PURE__*/function (_Component) {
4945
4927
  xScale: xScale,
4946
4928
  yScale: yScale
4947
4929
  },
4948
- xCol: columns[0],
4930
+ xCol: columns[stringColumnIndex],
4949
4931
  yCol: columns[numberColumnIndex],
4950
4932
  margins: {
4951
4933
  left: leftMargin,
@@ -4998,7 +4980,7 @@ var ChataColumnChart = /*#__PURE__*/function (_Component) {
4998
4980
  return _this;
4999
4981
  }
5000
4982
 
5001
- return ChataColumnChart;
4983
+ return _createClass(ChataColumnChart);
5002
4984
  }(Component);
5003
4985
 
5004
4986
  _defineProperty(ChataColumnChart, "propTypes", {
@@ -5142,7 +5124,7 @@ var Bars = /*#__PURE__*/function (_Component) {
5142
5124
  return _this;
5143
5125
  }
5144
5126
 
5145
- return Bars;
5127
+ return _createClass(Bars);
5146
5128
  }(Component);
5147
5129
 
5148
5130
  _defineProperty(Bars, "propTypes", {
@@ -5304,7 +5286,7 @@ var ChataBarChart = /*#__PURE__*/function (_Component) {
5304
5286
  return _this;
5305
5287
  }
5306
5288
 
5307
- return ChataBarChart;
5289
+ return _createClass(ChataBarChart);
5308
5290
  }(Component);
5309
5291
 
5310
5292
  _defineProperty(ChataBarChart, "propTypes", {
@@ -5466,7 +5448,7 @@ var Line = /*#__PURE__*/function (_Component) {
5466
5448
  return _this;
5467
5449
  }
5468
5450
 
5469
- return Line;
5451
+ return _createClass(Line);
5470
5452
  }(Component);
5471
5453
 
5472
5454
  _defineProperty(Line, "propTypes", {});
@@ -5614,7 +5596,7 @@ var ChataLineChart = /*#__PURE__*/function (_Component) {
5614
5596
  return _this;
5615
5597
  }
5616
5598
 
5617
- return ChataLineChart;
5599
+ return _createClass(ChataLineChart);
5618
5600
  }(Component);
5619
5601
 
5620
5602
  _defineProperty(ChataLineChart, "propTypes", {
@@ -5955,7 +5937,7 @@ var Axis = /*#__PURE__*/function (_Component) {
5955
5937
  return _this;
5956
5938
  }
5957
5939
 
5958
- return Axis;
5940
+ return _createClass(Axis);
5959
5941
  }(Component);
5960
5942
 
5961
5943
  _defineProperty(Axis, "propTypes", {
@@ -6043,7 +6025,7 @@ var Squares = /*#__PURE__*/function (_Component) {
6043
6025
  return _this;
6044
6026
  }
6045
6027
 
6046
- return Squares;
6028
+ return _createClass(Squares);
6047
6029
  }(Component);
6048
6030
 
6049
6031
  _defineProperty(Squares, "propTypes", {
@@ -6230,7 +6212,7 @@ var ChataHeatmapChart = /*#__PURE__*/function (_Component) {
6230
6212
  return _this;
6231
6213
  }
6232
6214
 
6233
- return ChataHeatmapChart;
6215
+ return _createClass(ChataHeatmapChart);
6234
6216
  }(Component);
6235
6217
 
6236
6218
  _defineProperty(ChataHeatmapChart, "propTypes", {
@@ -6331,7 +6313,7 @@ var Circles = /*#__PURE__*/function (_Component) {
6331
6313
  return _this;
6332
6314
  }
6333
6315
 
6334
- return Circles;
6316
+ return _createClass(Circles);
6335
6317
  }(Component);
6336
6318
 
6337
6319
  _defineProperty(Circles, "propTypes", {
@@ -6530,7 +6512,7 @@ var ChataBubbleChart = /*#__PURE__*/function (_Component) {
6530
6512
  return _this;
6531
6513
  }
6532
6514
 
6533
- return ChataBubbleChart;
6515
+ return _createClass(ChataBubbleChart);
6534
6516
  }(Component);
6535
6517
 
6536
6518
  _defineProperty(ChataBubbleChart, "propTypes", {
@@ -6662,7 +6644,7 @@ var StackedColumns$1 = /*#__PURE__*/function (_Component) {
6662
6644
  return _this;
6663
6645
  }
6664
6646
 
6665
- return StackedColumns;
6647
+ return _createClass(StackedColumns);
6666
6648
  }(Component);
6667
6649
 
6668
6650
  _defineProperty(StackedColumns$1, "propTypes", {});
@@ -6813,7 +6795,7 @@ var ChataStackedBarChart = /*#__PURE__*/function (_Component) {
6813
6795
  return _this;
6814
6796
  }
6815
6797
 
6816
- return ChataStackedBarChart;
6798
+ return _createClass(ChataStackedBarChart);
6817
6799
  }(Component);
6818
6800
 
6819
6801
  _defineProperty(ChataStackedBarChart, "propTypes", {
@@ -6943,7 +6925,7 @@ var StackedColumns = /*#__PURE__*/function (_Component) {
6943
6925
  return _this;
6944
6926
  }
6945
6927
 
6946
- return StackedColumns;
6928
+ return _createClass(StackedColumns);
6947
6929
  }(Component);
6948
6930
 
6949
6931
  _defineProperty(StackedColumns, "propTypes", {});
@@ -7085,7 +7067,7 @@ var ChataStackedColumnChart = /*#__PURE__*/function (_Component) {
7085
7067
  return _this;
7086
7068
  }
7087
7069
 
7088
- return ChataStackedColumnChart;
7070
+ return _createClass(ChataStackedColumnChart);
7089
7071
  }(Component);
7090
7072
 
7091
7073
  _defineProperty(ChataStackedColumnChart, "propTypes", {
@@ -7207,7 +7189,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component) {
7207
7189
  return _this;
7208
7190
  }
7209
7191
 
7210
- return Checkbox;
7192
+ return _createClass(Checkbox);
7211
7193
  }(React.Component);
7212
7194
 
7213
7195
  _defineProperty(Checkbox, "propTypes", {
@@ -7409,7 +7391,7 @@ var SelectableList = /*#__PURE__*/function (_React$Component) {
7409
7391
  return _this;
7410
7392
  }
7411
7393
 
7412
- return SelectableList;
7394
+ return _createClass(SelectableList);
7413
7395
  }(React.Component);
7414
7396
 
7415
7397
  _defineProperty(SelectableList, "propTypes", {
@@ -7512,7 +7494,7 @@ var Button = /*#__PURE__*/function (_React$Component) {
7512
7494
  return _this;
7513
7495
  }
7514
7496
 
7515
- return Button;
7497
+ return _createClass(Button);
7516
7498
  }(React.Component);
7517
7499
 
7518
7500
  _defineProperty(Button, "propTypes", {
@@ -7683,7 +7665,7 @@ var StackedLines = /*#__PURE__*/function (_Component) {
7683
7665
  return _this;
7684
7666
  }
7685
7667
 
7686
- return StackedLines;
7668
+ return _createClass(StackedLines);
7687
7669
  }(Component);
7688
7670
 
7689
7671
  _defineProperty(StackedLines, "propTypes", {});
@@ -7824,7 +7806,7 @@ var ChataStackedLineChart = /*#__PURE__*/function (_Component) {
7824
7806
  return _this;
7825
7807
  }
7826
7808
 
7827
- return ChataStackedLineChart;
7809
+ return _createClass(ChataStackedLineChart);
7828
7810
  }(Component);
7829
7811
 
7830
7812
  _defineProperty(ChataStackedLineChart, "propTypes", {
@@ -8300,7 +8282,8 @@ var ChataChart = /*#__PURE__*/function (_Component) {
8300
8282
 
8301
8283
  _defineProperty(_assertThisInitialized(_this), "renderStringColumnSelectorContent", function () {
8302
8284
  return /*#__PURE__*/React.createElement("div", {
8303
- className: "axis-selector-container"
8285
+ className: "axis-selector-container",
8286
+ id: "string-column-selector-content"
8304
8287
  }, /*#__PURE__*/React.createElement("ul", {
8305
8288
  className: "axis-selector-content"
8306
8289
  }, _this.props.dataConfig.stringColumnIndices.map(function (colIndex, i) {
@@ -8468,7 +8451,8 @@ var ChataChart = /*#__PURE__*/function (_Component) {
8468
8451
  }
8469
8452
 
8470
8453
  return /*#__PURE__*/React.createElement("div", {
8471
- className: "axis-selector-container"
8454
+ className: "axis-selector-container",
8455
+ id: "legend-selector-content"
8472
8456
  }, /*#__PURE__*/React.createElement("ul", {
8473
8457
  className: "axis-selector-content"
8474
8458
  }, _this.props.dataConfig.stringColumnIndices.map(function (colIndex, i) {
@@ -8705,7 +8689,7 @@ var ChataChart = /*#__PURE__*/function (_Component) {
8705
8689
  return _this;
8706
8690
  }
8707
8691
 
8708
- return ChataChart;
8692
+ return _createClass(ChataChart);
8709
8693
  }(Component);
8710
8694
 
8711
8695
  _defineProperty(ChataChart, "propTypes", {
@@ -8836,7 +8820,7 @@ var Select$1 = /*#__PURE__*/function (_React$Component) {
8836
8820
  return _this;
8837
8821
  }
8838
8822
 
8839
- return Select;
8823
+ return _createClass(Select);
8840
8824
  }(React.Component);
8841
8825
 
8842
8826
  _defineProperty(Select$1, "propTypes", {
@@ -9170,7 +9154,7 @@ var QueryValidationMessage = /*#__PURE__*/function (_React$Component) {
9170
9154
  return _this;
9171
9155
  }
9172
9156
 
9173
- return QueryValidationMessage;
9157
+ return _createClass(QueryValidationMessage);
9174
9158
  }(React.Component);
9175
9159
 
9176
9160
  _defineProperty(QueryValidationMessage, "propTypes", {
@@ -9457,6 +9441,20 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
9457
9441
 
9458
9442
 
9459
9443
  if (!aDate || !bDate) {
9444
+ //If one is a YYYY-WW
9445
+ if (a.includes('W')) {
9446
+ var aDateYear = a.substring(0, 4);
9447
+ var bDateYear = b.substring(0, 4);
9448
+
9449
+ if (aDateYear !== bDateYear) {
9450
+ return bDateYear - aDateYear;
9451
+ } else {
9452
+ var aDateWeek = a.substring(6, 8);
9453
+ var bDateWeek = b.substring(6, 8);
9454
+ return bDateWeek - aDateWeek;
9455
+ }
9456
+ }
9457
+
9460
9458
  return b - a;
9461
9459
  }
9462
9460
 
@@ -10306,8 +10304,8 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
10306
10304
  // displayed differently than the data (ie. dates)
10307
10305
 
10308
10306
  col.headerFilterFunc = _this.setFilterFunction(col); // Allow proper chronological sorting for date strings
10309
-
10310
- col.sorter = _this.setSorterFunction(col); // Context menu when right clicking on column header
10307
+ // col.sorter = this.setSorterFunction(col)
10308
+ // Context menu when right clicking on column header
10311
10309
 
10312
10310
  col.headerContext = function (e, column) {
10313
10311
  // Do not show native context menu
@@ -10385,7 +10383,6 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
10385
10383
  title: 'Month',
10386
10384
  name: 'Month',
10387
10385
  field: '0',
10388
- // sorter: 'date',
10389
10386
  frozen: true,
10390
10387
  visible: true
10391
10388
  }];
@@ -10702,13 +10699,11 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
10702
10699
  });
10703
10700
 
10704
10701
  _defineProperty(_assertThisInitialized(_this), "renderChart", function (width, height, displayType) {
10705
- var _React$createElement;
10706
-
10707
10702
  if (!_this.chartData) {
10708
10703
  return 'Error: There was no data supplied for this chart';
10709
10704
  }
10710
10705
 
10711
- return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ChataChart, (_React$createElement = {
10706
+ return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(ChataChart, {
10712
10707
  themeConfig: getThemeConfig(_this.props.themeConfig),
10713
10708
  ref: function ref(_ref8) {
10714
10709
  return _this.chartRef = _ref8;
@@ -10724,8 +10719,14 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
10724
10719
  backgroundColor: _this.props.backgroundColor,
10725
10720
  activeChartElementKey: _this.props.activeChartElementKey,
10726
10721
  onLegendClick: _this.onLegendClick,
10727
- dataConfig: _cloneDeep(_this.dataConfig)
10728
- }, _defineProperty(_React$createElement, "themeConfig", getThemeConfig(_this.props.themeConfig)), _defineProperty(_React$createElement, "changeStringColumnIndex", _this.onChangeStringColumnIndex), _defineProperty(_React$createElement, "changeLegendColumnIndex", _this.onChangeLegendColumnIndex), _defineProperty(_React$createElement, "changeNumberColumnIndices", _this.onChangeNumberColumnIndices), _defineProperty(_React$createElement, "onChartClick", _this.onChartClick), _defineProperty(_React$createElement, "isResizing", _this.props.isResizing), _defineProperty(_React$createElement, "enableDynamicCharting", _this.props.enableDynamicCharting), _React$createElement)));
10722
+ dataConfig: _cloneDeep(_this.dataConfig),
10723
+ changeStringColumnIndex: _this.onChangeStringColumnIndex,
10724
+ changeLegendColumnIndex: _this.onChangeLegendColumnIndex,
10725
+ changeNumberColumnIndices: _this.onChangeNumberColumnIndices,
10726
+ onChartClick: _this.onChartClick,
10727
+ isResizing: _this.props.isResizing,
10728
+ enableDynamicCharting: _this.props.enableDynamicCharting
10729
+ }));
10729
10730
  });
10730
10731
 
10731
10732
  _defineProperty(_assertThisInitialized(_this), "renderHelpResponse", function () {
@@ -11032,7 +11033,7 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
11032
11033
  onRest: _this.handleShowHide,
11033
11034
  isOpened: true // isOpened={this.state.isShowingInterpretation}
11034
11035
 
11035
- }, /*#__PURE__*/React.createElement("strong", null, "Interpreted as:", ' '), /*#__PURE__*/React.createElement("span", {
11036
+ }, /*#__PURE__*/React.createElement("strong", null, "Interpreted as: "), /*#__PURE__*/React.createElement("span", {
11036
11037
  onClick: function onClick(e) {
11037
11038
  return _this.props.onConditionClickCallback(e);
11038
11039
  },
@@ -11081,7 +11082,7 @@ var QueryOutput = /*#__PURE__*/function (_React$Component) {
11081
11082
  return _this;
11082
11083
  }
11083
11084
 
11084
- return QueryOutput;
11085
+ return _createClass(QueryOutput);
11085
11086
  }(React.Component);
11086
11087
 
11087
11088
  _defineProperty(QueryOutput, "propTypes", (_defineProperty2$1 = {
@@ -11194,7 +11195,7 @@ var VizToolbar = /*#__PURE__*/function (_React$Component) {
11194
11195
  return _this;
11195
11196
  }
11196
11197
 
11197
- return VizToolbar;
11198
+ return _createClass(VizToolbar);
11198
11199
  }(React.Component);
11199
11200
 
11200
11201
  _defineProperty(VizToolbar, "propTypes", {
@@ -11278,7 +11279,7 @@ var ConfirmModal = /*#__PURE__*/function (_React$Component) {
11278
11279
  return _this;
11279
11280
  }
11280
11281
 
11281
- return ConfirmModal;
11282
+ return _createClass(ConfirmModal);
11282
11283
  }(React.Component);
11283
11284
 
11284
11285
  _defineProperty(ConfirmModal, "propTypes", {
@@ -11414,7 +11415,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
11414
11415
  return _this;
11415
11416
  }
11416
11417
 
11417
- return Modal;
11418
+ return _createClass(Modal);
11418
11419
  }(React.Component);
11419
11420
 
11420
11421
  _defineProperty(Modal, "propTypes", {
@@ -11539,7 +11540,7 @@ var ColumnVisibilityModal = /*#__PURE__*/function (_React$Component) {
11539
11540
  return _this;
11540
11541
  }
11541
11542
 
11542
- return ColumnVisibilityModal;
11543
+ return _createClass(ColumnVisibilityModal);
11543
11544
  }(React.Component);
11544
11545
 
11545
11546
  _defineProperty(ColumnVisibilityModal, "propTypes", {
@@ -11601,7 +11602,7 @@ var fetchNotificationCount = function fetchNotificationCount(_ref2) {
11601
11602
  Authorization: "Bearer ".concat(token)
11602
11603
  }
11603
11604
  });
11604
- var url = "".concat(domain, "/autoql/api/v1/data-alerts/notifications/summary/poll?key=").concat(apiKey, "&unacknowledged=").concat(unacknowledged);
11605
+ var url = "".concat(domain, "/autoql/api/v1/data-alerts/notifications/summary?key=").concat(apiKey, "&unacknowledged=").concat(unacknowledged);
11605
11606
  var config = {
11606
11607
  timeout: 180000
11607
11608
  };
@@ -12148,6 +12149,8 @@ var NotificationIcon = /*#__PURE__*/function (_React$Component) {
12148
12149
  count: 0
12149
12150
  });
12150
12151
 
12152
+ _defineProperty(_assertThisInitialized(_this), "timerID", void 0);
12153
+
12151
12154
  _defineProperty(_assertThisInitialized(_this), "componentDidMount", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
12152
12155
  return _regeneratorRuntime.wrap(function _callee$(_context) {
12153
12156
  while (1) {
@@ -12177,6 +12180,7 @@ var NotificationIcon = /*#__PURE__*/function (_React$Component) {
12177
12180
 
12178
12181
  _defineProperty(_assertThisInitialized(_this), "componentWillUnmount", function () {
12179
12182
  _this._isMounted = false;
12183
+ clearInterval(_this.timerID);
12180
12184
  });
12181
12185
 
12182
12186
  _defineProperty(_assertThisInitialized(_this), "getNotificationCount", function (currentCount) {
@@ -12202,35 +12206,46 @@ var NotificationIcon = /*#__PURE__*/function (_React$Component) {
12202
12206
 
12203
12207
  _defineProperty(_assertThisInitialized(_this), "subscribeToNotificationCount", function (count) {
12204
12208
  if (_this._isMounted) {
12205
- _this.getNotificationCount(count).then(function (newCount) {
12206
- // Got a new count, now we want to reconnect
12207
- _this.subscribeToNotificationCount(newCount);
12209
+ /**
12210
+ * For short polling notifications, we needed to set the interval on FE side.
12211
+ * Interval set to trigger every 90 seconds.
12212
+ */
12213
+ if (_this.timerID) {
12214
+ clearInterval(_this.timerID);
12215
+ }
12208
12216
 
12209
- _this.FAILED_POLL_ATTEMPTS = 0;
12210
- }).catch(function (error) {
12211
- if (_this.FAILED_POLL_ATTEMPTS === 5) {
12212
- var _error = new Error('There were 5 failed attempts to poll for notifications. Unsubscribing from notification count.');
12217
+ _this.timerID = setInterval(function () {
12218
+ _this.getNotificationCount(count).then(function (newCount) {
12219
+ // Got a new count, now we want to reconnect
12220
+ _this.subscribeToNotificationCount(newCount);
12221
+
12222
+ _this.FAILED_POLL_ATTEMPTS = 0;
12223
+ }).catch(function (error) {
12224
+ if (_this.FAILED_POLL_ATTEMPTS === 5) {
12225
+ var _error = new Error('There were 5 failed attempts to poll for notifications. Unsubscribing from notification count.');
12213
12226
 
12214
- console.error(_error);
12227
+ console.error(_error);
12215
12228
 
12216
- _this.props.onErrorCallback(_error);
12229
+ _this.props.onErrorCallback(_error);
12217
12230
 
12218
- return;
12219
- } else if (_get(error, 'response.status') == 504) {
12220
- // Timed out because there were no changes
12221
- // Let's connect again
12222
- _this.subscribeToNotificationCount();
12223
- } else {
12224
- // Something else went wrong, wait one second and reconnect
12225
- new Promise(function (resolve) {
12226
- return setTimeout(resolve, 1000);
12227
- }).then(function () {
12231
+ clearInterval(_this.timerID);
12232
+ throw new Error(_error);
12233
+ } else if (_get(error, 'response.status') == 504) {
12234
+ // Timed out because there were no changes
12235
+ // Let's connect again
12228
12236
  _this.subscribeToNotificationCount();
12229
- });
12230
- }
12237
+ } else {
12238
+ // Something else went wrong, wait one second and reconnect
12239
+ new Promise(function (resolve) {
12240
+ return setTimeout(resolve, 1000);
12241
+ }).then(function () {
12242
+ _this.subscribeToNotificationCount();
12243
+ });
12244
+ }
12231
12245
 
12232
- _this.FAILED_POLL_ATTEMPTS += 1;
12233
- });
12246
+ _this.FAILED_POLL_ATTEMPTS += 1;
12247
+ });
12248
+ }, 90 * 1000);
12234
12249
  }
12235
12250
  });
12236
12251
 
@@ -12288,7 +12303,7 @@ var NotificationIcon = /*#__PURE__*/function (_React$Component) {
12288
12303
  return _this;
12289
12304
  }
12290
12305
 
12291
- return NotificationIcon;
12306
+ return _createClass(NotificationIcon);
12292
12307
  }(React.Component);
12293
12308
 
12294
12309
  _defineProperty(NotificationIcon, "propTypes", {
@@ -12395,7 +12410,7 @@ var Input$1 = /*#__PURE__*/function (_React$Component) {
12395
12410
  return _this;
12396
12411
  }
12397
12412
 
12398
- return Input;
12413
+ return _createClass(Input);
12399
12414
  }(React.Component);
12400
12415
 
12401
12416
  _defineProperty(Input$1, "propTypes", {
@@ -12757,7 +12772,7 @@ var RuleSimple = /*#__PURE__*/function (_React$Component) {
12757
12772
  return _this;
12758
12773
  }
12759
12774
 
12760
- return RuleSimple;
12775
+ return _createClass(RuleSimple);
12761
12776
  }(React.Component);
12762
12777
 
12763
12778
  _defineProperty(RuleSimple, "propTypes", {
@@ -12966,7 +12981,7 @@ var ExpressionBuilderSimple = /*#__PURE__*/function (_React$Component) {
12966
12981
  return _this;
12967
12982
  }
12968
12983
 
12969
- return ExpressionBuilderSimple;
12984
+ return _createClass(ExpressionBuilderSimple);
12970
12985
  }(React.Component);
12971
12986
 
12972
12987
  _defineProperty(ExpressionBuilderSimple, "propTypes", {
@@ -13329,7 +13344,7 @@ var NotificationItem = /*#__PURE__*/function (_React$Component) {
13329
13344
  return _this;
13330
13345
  }
13331
13346
 
13332
- return NotificationItem;
13347
+ return _createClass(NotificationItem);
13333
13348
  }(React.Component);
13334
13349
 
13335
13350
  _defineProperty(NotificationItem, "propTypes", {
@@ -13537,7 +13552,7 @@ var Steps = /*#__PURE__*/function (_React$Component) {
13537
13552
  return _this;
13538
13553
  }
13539
13554
 
13540
- return Steps;
13555
+ return _createClass(Steps);
13541
13556
  }(React.Component);
13542
13557
 
13543
13558
  _defineProperty(Steps, "propTypes", {
@@ -13645,7 +13660,7 @@ var Radio = /*#__PURE__*/function (_React$Component) {
13645
13660
  return _this;
13646
13661
  }
13647
13662
 
13648
- return Radio;
13663
+ return _createClass(Radio);
13649
13664
  }(React.Component);
13650
13665
 
13651
13666
  _defineProperty(Radio, "propTypes", {
@@ -13725,7 +13740,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
13725
13740
  return _this;
13726
13741
  }
13727
13742
 
13728
- return Select;
13743
+ return _createClass(Select);
13729
13744
  }(React.Component);
13730
13745
 
13731
13746
  _defineProperty(Select, "propTypes", {
@@ -13795,7 +13810,7 @@ var DataAlertModal$1 = /*#__PURE__*/function (_React$Component) {
13795
13810
  return _this;
13796
13811
  }
13797
13812
 
13798
- return DataAlertModal;
13813
+ return _createClass(DataAlertModal);
13799
13814
  }(React.Component);
13800
13815
 
13801
13816
  _defineProperty(DataAlertModal$1, "propTypes", {
@@ -13947,7 +13962,7 @@ var ScheduleBuilder = /*#__PURE__*/function (_React$Component) {
13947
13962
  return _this;
13948
13963
  }
13949
13964
 
13950
- return ScheduleBuilder;
13965
+ return _createClass(ScheduleBuilder);
13951
13966
  }(React.Component);
13952
13967
 
13953
13968
  _defineProperty(ScheduleBuilder, "propTypes", {
@@ -14581,7 +14596,7 @@ var DataAlertModal = /*#__PURE__*/function (_React$Component) {
14581
14596
  return _this;
14582
14597
  }
14583
14598
 
14584
- return DataAlertModal;
14599
+ return _createClass(DataAlertModal);
14585
14600
  }(React.Component);
14586
14601
 
14587
14602
  _defineProperty(DataAlertModal, "propTypes", {
@@ -14963,7 +14978,7 @@ var NotificationFeed = /*#__PURE__*/function (_React$Component) {
14963
14978
  return _this;
14964
14979
  }
14965
14980
 
14966
- return NotificationFeed;
14981
+ return _createClass(NotificationFeed);
14967
14982
  }(React.Component);
14968
14983
 
14969
14984
  _defineProperty(NotificationFeed, "propTypes", {
@@ -15358,7 +15373,7 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
15358
15373
  return _this;
15359
15374
  }
15360
15375
 
15361
- return DataAlerts;
15376
+ return _createClass(DataAlerts);
15362
15377
  }(React.Component);
15363
15378
 
15364
15379
  _defineProperty(DataAlerts, "propTypes", {
@@ -15775,7 +15790,7 @@ var Rule = /*#__PURE__*/function (_React$Component) {
15775
15790
  return _this;
15776
15791
  }
15777
15792
 
15778
- return Rule;
15793
+ return _createClass(Rule);
15779
15794
  }(React.Component);
15780
15795
 
15781
15796
  _defineProperty(Rule, "propTypes", {
@@ -16154,7 +16169,7 @@ var Group = /*#__PURE__*/function (_React$Component) {
16154
16169
  return _this;
16155
16170
  }
16156
16171
 
16157
- return Group;
16172
+ return _createClass(Group);
16158
16173
  }(React.Component);
16159
16174
 
16160
16175
  _defineProperty(Group, "propTypes", {
@@ -16465,7 +16480,7 @@ var ExpressionBuilder = /*#__PURE__*/function (_React$Component) {
16465
16480
  return _this;
16466
16481
  }
16467
16482
 
16468
- return ExpressionBuilder;
16483
+ return _createClass(ExpressionBuilder);
16469
16484
  }(React.Component);
16470
16485
 
16471
16486
  _defineProperty(ExpressionBuilder, "propTypes", {
@@ -17379,7 +17394,8 @@ var Input = /*#__PURE__*/function (_React$Component) {
17379
17394
 
17380
17395
  _defineProperty(_assertThisInitialized(_this), "state", {
17381
17396
  isHideColumnsModalVisible: false,
17382
- isSettingColumnVisibility: false
17397
+ isSettingColumnVisibility: false,
17398
+ reportProblemMessage: undefined
17383
17399
  });
17384
17400
 
17385
17401
  _defineProperty(_assertThisInitialized(_this), "componentDidMount", function () {
@@ -17710,23 +17726,29 @@ var Input = /*#__PURE__*/function (_React$Component) {
17710
17726
  isVisible: _this.state.activeMenu === 'other-problem',
17711
17727
  onClose: function onClose() {
17712
17728
  _this.setState({
17713
- activeMenu: undefined
17729
+ activeMenu: undefined,
17730
+ reportProblemMessage: undefined
17714
17731
  });
17715
17732
  },
17716
17733
  onConfirm: function onConfirm() {
17717
- _this.reportQueryProblem(_this.reportProblemMessage);
17734
+ _this.reportQueryProblem(_this.state.reportProblemMessage);
17718
17735
 
17719
- _this.reportProblemMessage = undefined;
17736
+ _this.setState({
17737
+ reportProblemMessage: undefined
17738
+ });
17720
17739
  },
17721
17740
  confirmLoading: _this.state.isReportingProblem,
17722
17741
  title: "Report a Problem",
17723
17742
  enableBodyScroll: true,
17724
17743
  width: "600px",
17725
- confirmText: "Report"
17744
+ confirmText: "Report",
17745
+ confirmDisabled: _this.state.reportProblemMessage ? false : true
17726
17746
  }, "Please tell us more about the problem you are experiencing:", /*#__PURE__*/React.createElement("textarea", {
17727
17747
  className: "report-problem-text-area",
17728
17748
  onChange: function onChange(e) {
17729
- return _this.reportProblemMessage = e.target.value;
17749
+ return _this.setState({
17750
+ reportProblemMessage: e.target.value
17751
+ });
17730
17752
  }
17731
17753
  })));
17732
17754
  });
@@ -18104,7 +18126,7 @@ var Input = /*#__PURE__*/function (_React$Component) {
18104
18126
  return _this;
18105
18127
  }
18106
18128
 
18107
- return Input;
18129
+ return _createClass(Input);
18108
18130
  }(React.Component);
18109
18131
 
18110
18132
  _defineProperty(Input, "propTypes", {
@@ -18528,7 +18550,7 @@ var ChatMessage = /*#__PURE__*/function (_React$Component) {
18528
18550
  return _this;
18529
18551
  }
18530
18552
 
18531
- return ChatMessage;
18553
+ return _createClass(ChatMessage);
18532
18554
  }(React.Component);
18533
18555
 
18534
18556
  _defineProperty(ChatMessage, "propTypes", (_defineProperty2 = {
@@ -18693,7 +18715,7 @@ var QueryTipsTab = /*#__PURE__*/function (_React$Component) {
18693
18715
  return _this;
18694
18716
  }
18695
18717
 
18696
- return QueryTipsTab;
18718
+ return _createClass(QueryTipsTab);
18697
18719
  }(React.Component);
18698
18720
 
18699
18721
  _defineProperty(QueryTipsTab, "propTypes", {
@@ -18843,7 +18865,7 @@ var Cascader = /*#__PURE__*/function (_React$Component) {
18843
18865
  return _this;
18844
18866
  }
18845
18867
 
18846
- return Cascader;
18868
+ return _createClass(Cascader);
18847
18869
  }(React.Component);
18848
18870
 
18849
18871
  _defineProperty(Cascader, "propTypes", {
@@ -18858,6 +18880,24 @@ _defineProperty(Cascader, "defaultProps", {
18858
18880
  onSeeMoreClick: undefined
18859
18881
  });
18860
18882
 
18883
+ function accentColorAssist(col, amt) {
18884
+ var usePound = false;
18885
+
18886
+ if (col[0] == "#") {
18887
+ col = col.slice(1);
18888
+ usePound = true;
18889
+ }
18890
+
18891
+ var num = parseInt(col, 16);
18892
+ var r = (num >> 16) + amt;
18893
+ if (r > 255) r = 255;else if (r < 0) r = 0;
18894
+ var b = (num >> 8 & 0x00FF) + amt;
18895
+ if (b > 255) b = 255;else if (b < 0) b = 0;
18896
+ var g = (num & 0x0000FF) + amt;
18897
+ if (g > 255) g = 255;else if (g < 0) g = 0;
18898
+ return (usePound ? "#" : "") + (g | b << 8 | r << 16).toString(16);
18899
+ }
18900
+
18861
18901
  var autoCompleteArray$1 = [];
18862
18902
 
18863
18903
  var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
@@ -18933,9 +18973,13 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18933
18973
  }
18934
18974
  }
18935
18975
 
18976
+ array.sort(function (a, b) {
18977
+ return a.keyword.toUpperCase() < b.keyword.toUpperCase() ? -1 : a.keyword > b.keyword ? 1 : 0;
18978
+ });
18979
+
18936
18980
  if (_this.props.initFilterText && _this.props.initFilterText !== '') {
18937
18981
  _this.setState({
18938
- selectedConditions: array.sort(),
18982
+ selectedConditions: array,
18939
18983
  isFetchingConditions: false
18940
18984
  });
18941
18985
 
@@ -18950,7 +18994,7 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18950
18994
  _this.animateInputTextAndSubmit(_this.props.initFilterText);
18951
18995
  } else {
18952
18996
  _this.setState({
18953
- selectedConditions: array.sort(),
18997
+ selectedConditions: array,
18954
18998
  inputValue: '',
18955
18999
  isFetchingConditions: false
18956
19000
  });
@@ -18961,9 +19005,14 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18961
19005
  }
18962
19006
  });
18963
19007
 
19008
+ _defineProperty(_assertThisInitialized(_this), "componentDidUpdate", function (prevProps, predState) {
19009
+ if (!_isEqual(getThemeConfig(_this.props.themeConfig), getThemeConfig(prevProps.themeConfig))) {
19010
+ setCSSVars(getThemeConfig(_this.props.themeConfig));
19011
+ }
19012
+ });
19013
+
18964
19014
  _defineProperty(_assertThisInitialized(_this), "getSuggestionValue", function (suggestion) {
18965
19015
  var array = _this.state.selectedConditions;
18966
- var tempId = uuid.v4();
18967
19016
 
18968
19017
  if (array.some(function (item) {
18969
19018
  return item.key === suggestion.name.canonical && item.value === suggestion.name.keyword;
@@ -18971,7 +19020,6 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18971
19020
  _this.handleShowMessage('warning', 'This condition has already been applied.');
18972
19021
  } else {
18973
19022
  array.push({
18974
- id: tempId,
18975
19023
  keyword: suggestion.name.keyword,
18976
19024
  value: suggestion.name.keyword,
18977
19025
  show_message: suggestion.name.show_message,
@@ -18981,7 +19029,6 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18981
19029
  });
18982
19030
 
18983
19031
  _this.setState({
18984
- selectedConditions: array,
18985
19032
  inputValue: ''
18986
19033
  });
18987
19034
 
@@ -18989,6 +19036,8 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
18989
19036
  conditions: array
18990
19037
  })).then(function () {
18991
19038
  _this.handleShowMessage('lock', "".concat(suggestion.name.keyword, " has been locked"));
19039
+
19040
+ _this.handleFetchFilteredList();
18992
19041
  });
18993
19042
  }
18994
19043
  });
@@ -19026,11 +19075,7 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19026
19075
  }
19027
19076
 
19028
19077
  var array = _this.state.selectedConditions;
19029
- array.splice(index, 1);
19030
-
19031
- _this.setState({
19032
- selectedConditions: array
19033
- });
19078
+ array.splice(index, 1); // this.setState({ selectedConditions: array })
19034
19079
 
19035
19080
  _this.handleShowMessage('unlock', 'Filter removed.');
19036
19081
 
@@ -19050,7 +19095,9 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19050
19095
  }, function () {
19051
19096
  setConditions(_objectSpread2(_objectSpread2({}, getAuthentication(_this.props.authentication)), {}, {
19052
19097
  conditions: _this.state.selectedConditions
19053
- }));
19098
+ })).then(function () {
19099
+ _this.handleFetchFilteredList();
19100
+ });
19054
19101
 
19055
19102
  if (item.lock_flag === 0) {
19056
19103
  if (sessionConditions == null) sessionConditions = [];
@@ -19178,32 +19225,10 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19178
19225
  }), " ", _this.state.showMessage.message);
19179
19226
  });
19180
19227
 
19181
- _defineProperty(_assertThisInitialized(_this), "renderAcceptConditionsButton", function () {
19182
- return /*#__PURE__*/React.createElement("div", {
19183
- key: "accept-conditions-btn",
19184
- className: "react-autoql-accept-conditions-button"
19185
- }, /*#__PURE__*/React.createElement("span", {
19186
- onClick: function onClick() {
19187
- setConditions(_objectSpread2(_objectSpread2({}, getAuthentication(_this.props.authentication)), {}, {
19188
- conditions: _this.state.selectedConditions
19189
- })).then(function () {
19190
- _this.props.onClose(true);
19191
- }).catch(function (e) {
19192
- //WIP showErrorMessage
19193
- console.error(e);
19194
- });
19195
- }
19196
- }, /*#__PURE__*/React.createElement(Icon, {
19197
- type: "lock",
19198
- style: {
19199
- verticalAlign: 'middle'
19200
- }
19201
- }), " Save"));
19202
- });
19203
-
19204
19228
  _defineProperty(_assertThisInitialized(_this), "render", function () {
19205
19229
  var containerWidth = _this.props.containerWidth;
19206
19230
  return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement("div", {
19231
+ "data-test": "react-autoql-filter-menu-container",
19207
19232
  className: "react-autoql-condition-lock-menu",
19208
19233
  style: {
19209
19234
  width: containerWidth
@@ -19312,8 +19337,8 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19312
19337
  return _this.handlePersistConditionToggle(item, index);
19313
19338
  },
19314
19339
  checked: item.lock_flag,
19315
- onColor: "#86d3ff",
19316
- onHandleColor: "#2693e6",
19340
+ onColor: accentColorAssist(getThemeConfig(_this.props.themeConfig).accentColor, 180),
19341
+ onHandleColor: getThemeConfig(getThemeConfig(_this.props.themeConfig)).accentColor,
19317
19342
  uncheckedIcon: false,
19318
19343
  checkedIcon: false,
19319
19344
  boxShadow: "0px 1px 5px rgba(0, 0, 0, 0.6)",
@@ -19363,6 +19388,60 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19363
19388
  }
19364
19389
 
19365
19390
  _createClass(ConditionLockMenu, [{
19391
+ key: "handleFetchFilteredList",
19392
+ value: function handleFetchFilteredList() {
19393
+ var _this2 = this;
19394
+
19395
+ fetchConditions(_objectSpread2({}, getAuthentication(this.props.authentication))).then(function (response) {
19396
+ var conditions = _get(response, 'data.data.data');
19397
+
19398
+ var array = [];
19399
+
19400
+ for (var i = 0; i < conditions.length; i++) {
19401
+ array.push({
19402
+ id: conditions[i].id,
19403
+ keyword: conditions[i].value,
19404
+ value: conditions[i].value,
19405
+ show_message: conditions[i].show_message,
19406
+ key: conditions[i].key,
19407
+ lock_flag: conditions[i].lock_flag
19408
+ });
19409
+ }
19410
+
19411
+ if (JSON.parse(sessionStorage.getItem("conditions")) !== null) {
19412
+ var sessionConditions = JSON.parse(sessionStorage.getItem("conditions"));
19413
+
19414
+ for (var _i3 = 0; _i3 < sessionConditions.length; _i3++) {
19415
+ array.push({
19416
+ id: sessionConditions[_i3].id,
19417
+ keyword: sessionConditions[_i3].value,
19418
+ value: sessionConditions[_i3].value,
19419
+ show_message: sessionConditions[_i3].show_message,
19420
+ key: sessionConditions[_i3].key,
19421
+ lock_flag: sessionConditions[_i3].lock_flag
19422
+ });
19423
+ }
19424
+ }
19425
+
19426
+ array.sort(function (a, b) {
19427
+ return a.keyword.toUpperCase() < b.keyword.toUpperCase() ? -1 : a.keyword > b.keyword ? 1 : 0;
19428
+ });
19429
+
19430
+ _this2.setState({
19431
+ selectedConditions: array,
19432
+ inputValue: '',
19433
+ isFetchingConditions: false
19434
+ });
19435
+ });
19436
+ }
19437
+ /**
19438
+ * When suggestion is clicked, Autosuggest populates the input
19439
+ * based on the clicked suggestion. Teach Autosuggest how to calculate the
19440
+ * input value for every given suggestion.
19441
+ * @param {*} suggestion
19442
+ */
19443
+
19444
+ }, {
19366
19445
  key: "handleShowMessage",
19367
19446
  value: function handleShowMessage(type, message) {
19368
19447
  var el = document.getElementById('react-autoql-condition-show-message');
@@ -19400,11 +19479,12 @@ var ConditionLockMenu = /*#__PURE__*/function (_React$Component) {
19400
19479
  }(React.Component);
19401
19480
 
19402
19481
  _defineProperty(ConditionLockMenu, "propTypes", {
19403
- containerWidth: PropTypes.number,
19482
+ containerWidth: PropTypes.string,
19404
19483
  isOpen: PropTypes.bool,
19405
19484
  onClose: PropTypes.func,
19406
19485
  authentication: authenticationType,
19407
- initFilterText: PropTypes.string
19486
+ initFilterText: PropTypes.string,
19487
+ themeConfig: themeConfigType
19408
19488
  });
19409
19489
 
19410
19490
  _defineProperty(ConditionLockMenu, "defaultProps", {
@@ -19412,7 +19492,8 @@ _defineProperty(ConditionLockMenu, "defaultProps", {
19412
19492
  onClose: function onClose() {},
19413
19493
  isOpen: false,
19414
19494
  authentication: undefined,
19415
- initFilterText: undefined
19495
+ initFilterText: undefined,
19496
+ themeConfig: themeConfigDefault
19416
19497
  });
19417
19498
 
19418
19499
  var DataMessenger = /*#__PURE__*/function (_React$Component) {
@@ -19469,8 +19550,7 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
19469
19550
  _this.setState({
19470
19551
  hasError: true
19471
19552
  });
19472
- } // WIP
19473
-
19553
+ }
19474
19554
 
19475
19555
  try {
19476
19556
  fetchConditions(_objectSpread2({}, getAuthentication(_this.props.authentication))).then(function (response) {
@@ -19509,6 +19589,10 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
19509
19589
  _this.clearMessages();
19510
19590
  }
19511
19591
 
19592
+ if (_this.state.messages.length === 0) {
19593
+ _this.setintroMessages();
19594
+ }
19595
+
19512
19596
  var thisTheme = getThemeConfig(getThemeConfig(_this.props.themeConfig)).theme;
19513
19597
  var prevTheme = getThemeConfig(prevProps.themeConfig).theme;
19514
19598
 
@@ -19881,10 +19965,12 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
19881
19965
  }); // If there is a query message right above it (not a drilldown), delete the query message also
19882
19966
 
19883
19967
 
19884
- var messageAbove = _this.state.messages[messageIndex - 1];
19968
+ var messageAbove = _this.state.messages[messageIndex - 1]; // If the messageAbove is not undefined
19885
19969
 
19886
- if (!messageAbove.isResponse) {
19887
- messagesToDelete.push(messageAbove.id);
19970
+ if (messageAbove) {
19971
+ if (!messageAbove.isResponse) {
19972
+ messagesToDelete.push(messageAbove.id);
19973
+ }
19888
19974
  }
19889
19975
 
19890
19976
  var newMessages = _this.state.messages.filter(function (message) {
@@ -20222,7 +20308,7 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
20222
20308
  * Because the popover anchor is over the header title instead of the button,
20223
20309
  * the button is considered part of an "outside" event. This also includes
20224
20310
  * some elements inside of the popover as well for some reason.
20225
- *
20311
+ *
20226
20312
  * This is a hacky solution, but it works.
20227
20313
  */
20228
20314
  if (_get(e, 'target.id') !== 'react-autoql-interpreted-value-label' && _get(e, 'target.parentElement.parentElement.parentElement.id') !== 'react-autoql-filter-menu-dropdown-button' && _get(e, 'target.parentElement.parentElement.parentElement.id') !== 'react-autoql-filter-menu-dropdown' && _get(e, 'target.parentElement.id') !== 'react-autoql-filter-table-row' && _get(e, 'target.parentElement.id') !== 'react-autoql-remove-filtered-condition-icon' && _get(e, 'target.parentElement.parentElement.id') !== 'react-autoql-remove-filtered-condition-icon' && _get(e, 'target.parentElement.id') !== 'react-autoql-remove-filter-container' && !_get(e, 'target.classList.value').includes('react-autoql-drawer-resize-handle')) {
@@ -20240,9 +20326,12 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
20240
20326
  display: 'block'
20241
20327
  }
20242
20328
  }, /*#__PURE__*/React.createElement(ConditionLockMenu, {
20329
+ "data-test": "react-autoql-filter-menu",
20330
+ id: "react-autoql-filter-menu",
20243
20331
  authentication: getAuthentication(getAuthentication(_this.props.authentication)),
20244
20332
  containerWidth: _this.getDrawerWidth(),
20245
20333
  isOpen: _this.state.isFilterLockingMenuOpen,
20334
+ themeConfig: getThemeConfig(getThemeConfig(_this.props.themeConfig)),
20246
20335
  initFilterText: _this.state.selectedValueLabel,
20247
20336
  onClose: function onClose() {
20248
20337
  _this.setState({
@@ -20852,7 +20941,7 @@ _defineProperty(DataMessenger, "defaultProps", {
20852
20941
  maxMessages: undefined,
20853
20942
  introMessage: undefined,
20854
20943
  enableExploreQueriesTab: true,
20855
- enableNotificationsTab: true,
20944
+ enableNotificationsTab: false,
20856
20945
  resizable: true,
20857
20946
  inputPlaceholder: undefined,
20858
20947
  queryQuickStartTopics: undefined,
@@ -21823,6 +21912,11 @@ var DashboardTile = /*#__PURE__*/function (_React$Component) {
21823
21912
  _defineProperty(_assertThisInitialized(_this), "renderBottomResponse", function () {
21824
21913
  var queryResponse = _this.props.tile.secondQueryResponse || _this.props.queryResponse;
21825
21914
  var displayType = isDisplayTypeValid(queryResponse, _this.props.secondDisplayType) ? _this.props.secondDisplayType : getDefaultDisplayType(queryResponse, _this.props.autoChartAggregations);
21915
+
21916
+ _this.props.setParamsForTile({
21917
+ secondDisplayType: displayType
21918
+ }, _this.props.tile.i);
21919
+
21826
21920
  return _this.renderQueryOutput({
21827
21921
  queryOutputProps: {
21828
21922
  key: "dashboard-tile-query-bottom-".concat(_this.COMPONENT_KEY),
@@ -21952,7 +22046,7 @@ var DashboardTile = /*#__PURE__*/function (_React$Component) {
21952
22046
  return _this;
21953
22047
  }
21954
22048
 
21955
- return DashboardTile;
22049
+ return _createClass(DashboardTile);
21956
22050
  }(React.Component);
21957
22051
 
21958
22052
  _defineProperty(DashboardTile, "propTypes", {
@@ -22646,7 +22740,7 @@ var Dashboard = /*#__PURE__*/function (_React$Component) {
22646
22740
  return _this;
22647
22741
  }
22648
22742
 
22649
- return Dashboard;
22743
+ return _createClass(Dashboard);
22650
22744
  }(React.Component);
22651
22745
 
22652
22746
  _defineProperty(Dashboard, "propTypes", {
@@ -22879,7 +22973,7 @@ var SpeechToTextBtn = /*#__PURE__*/function (_React$Component) {
22879
22973
  return _this;
22880
22974
  }
22881
22975
 
22882
- return SpeechToTextBtn;
22976
+ return _createClass(SpeechToTextBtn);
22883
22977
  }(React.Component);
22884
22978
 
22885
22979
  _defineProperty(SpeechToTextBtn, "propTypes", {
@@ -22898,4 +22992,4 @@ _defineProperty(SpeechToTextBtn, "defaultProps", {
22898
22992
  themeConfig: themeConfigDefault
22899
22993
  });
22900
22994
 
22901
- export { Dashboard, DashboardTile, DataAlertModal, DataAlerts, DataMessenger, ExpressionBuilder, ExpressionBuilderSimple, Icon, LoadingDots, NotificationFeed, NotificationIcon, NotificationItem, QueryInput, QueryOutput, ScheduleBuilder, SpeechToTextBtn as SpeechToTextButton, SpeechToTextButtonBrowser, executeDashboard, fetchQueryTips, getDefaultDisplayType, getSupportedDisplayTypes, isDisplayTypeValid, unExecuteDashboard };
22995
+ export { ConditionLockMenu, Dashboard, DashboardTile, DataAlertModal, DataAlerts, DataMessenger, ExpressionBuilder, ExpressionBuilderSimple, Icon, LoadingDots, NotificationFeed, NotificationIcon, NotificationItem, QueryInput, QueryOutput, ScheduleBuilder, SpeechToTextBtn as SpeechToTextButton, SpeechToTextButtonBrowser, executeDashboard, fetchQueryTips, getDefaultDisplayType, getSupportedDisplayTypes, isDisplayTypeValid, unExecuteDashboard };