react-autoql 3.4.1 → 3.4.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.
- package/dist/autoql.esm.css +2230 -2230
- package/dist/autoql.esm.js +33 -58
- package/package.json +1 -1
package/dist/autoql.esm.js
CHANGED
|
@@ -11595,7 +11595,7 @@ var fetchDataAlerts = function fetchDataAlerts(_ref5) {
|
|
|
11595
11595
|
Authorization: "Bearer ".concat(token)
|
|
11596
11596
|
}
|
|
11597
11597
|
});
|
|
11598
|
-
var url = "".concat(domain, "/autoql/
|
|
11598
|
+
var url = "".concat(domain, "/autoql/api/v1/data-alerts?key=").concat(apiKey);
|
|
11599
11599
|
return axiosInstance.get(url).then(function (response) {
|
|
11600
11600
|
return Promise.resolve(_get(response, 'data'));
|
|
11601
11601
|
}).catch(function (error) {
|
|
@@ -11933,7 +11933,7 @@ var updateDataAlert = function updateDataAlert(_ref18) {
|
|
|
11933
11933
|
Authorization: "Bearer ".concat(token)
|
|
11934
11934
|
}
|
|
11935
11935
|
});
|
|
11936
|
-
var url = "".concat(domain, "/autoql/
|
|
11936
|
+
var url = "".concat(domain, "/autoql/api/v1/data-alerts/").concat(dataAlert.id, "?key=").concat(apiKey);
|
|
11937
11937
|
return axiosInstance.put(url, dataAlert).then(function (response) {
|
|
11938
11938
|
return Promise.resolve(response);
|
|
11939
11939
|
}).catch(function (error) {
|
|
@@ -11994,7 +11994,7 @@ var validateExpression = function validateExpression(_ref20) {
|
|
|
11994
11994
|
});
|
|
11995
11995
|
}; // DELETE
|
|
11996
11996
|
|
|
11997
|
-
var deleteDataAlert = function deleteDataAlert(dataAlertId,
|
|
11997
|
+
var deleteDataAlert = function deleteDataAlert(dataAlertId, authObject) {
|
|
11998
11998
|
// If there is missing data, dont bother making the call
|
|
11999
11999
|
var domain = authObject.domain,
|
|
12000
12000
|
apiKey = authObject.apiKey,
|
|
@@ -12009,7 +12009,7 @@ var deleteDataAlert = function deleteDataAlert(dataAlertId, projectId, authObjec
|
|
|
12009
12009
|
Authorization: "Bearer ".concat(token)
|
|
12010
12010
|
}
|
|
12011
12011
|
});
|
|
12012
|
-
var url = "".concat(domain, "/autoql/
|
|
12012
|
+
var url = "".concat(domain, "/autoql/api/v1/data-alerts/").concat(dataAlertId, "?key=").concat(apiKey);
|
|
12013
12013
|
return axiosInstance.delete(url).then(function (response) {
|
|
12014
12014
|
return Promise.resolve(response);
|
|
12015
12015
|
}).catch(function (error) {
|
|
@@ -14358,13 +14358,13 @@ var DataAlertModal = /*#__PURE__*/function (_React$Component) {
|
|
|
14358
14358
|
isDeletingDataAlert: true
|
|
14359
14359
|
});
|
|
14360
14360
|
|
|
14361
|
-
deleteDataAlert(dataAlertId, _this.props.
|
|
14361
|
+
deleteDataAlert(dataAlertId, getAuthentication(_this.props.authentication)).then(function () {
|
|
14362
14362
|
_this.setState({
|
|
14363
14363
|
isDeletingDataAlert: false,
|
|
14364
14364
|
isConfirmDeleteModalVisible: false
|
|
14365
14365
|
});
|
|
14366
14366
|
|
|
14367
|
-
_this.props.
|
|
14367
|
+
_this.props.onDelete(dataAlertId);
|
|
14368
14368
|
|
|
14369
14369
|
_this.props.onClose(false);
|
|
14370
14370
|
}).catch(function (error) {
|
|
@@ -14941,7 +14941,7 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
14941
14941
|
_this.getDataAlerts();
|
|
14942
14942
|
}
|
|
14943
14943
|
|
|
14944
|
-
if (!_isEqual(_this.state.projectAlertsList, prevState.projectAlertsList)) {
|
|
14944
|
+
if (!_isEqual(_this.state.projectAlertsList, prevState.projectAlertsList) || !_isEqual(_this.state.customAlertsList, prevState.customAlertsList)) {
|
|
14945
14945
|
_this.getDataAlerts();
|
|
14946
14946
|
}
|
|
14947
14947
|
});
|
|
@@ -14955,12 +14955,8 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
14955
14955
|
type: type
|
|
14956
14956
|
})).then(function (response) {
|
|
14957
14957
|
_this._isMounted && _this.setState({
|
|
14958
|
-
customAlertsList:
|
|
14959
|
-
projectAlertsList: response
|
|
14960
|
-
return _$1.find(al.projects, function (p) {
|
|
14961
|
-
return p.id === _this.props.selectedDemoProjectId;
|
|
14962
|
-
});
|
|
14963
|
-
})
|
|
14958
|
+
customAlertsList: _get(response, 'data.custom_alerts'),
|
|
14959
|
+
projectAlertsList: _get(response, 'data.project_alerts')
|
|
14964
14960
|
});
|
|
14965
14961
|
}).catch(function (error) {
|
|
14966
14962
|
console.error(error);
|
|
@@ -15022,20 +15018,13 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
15022
15018
|
_defineProperty(_assertThisInitialized(_this), "onEnableSwitchChange", function (e, dataAlert) {
|
|
15023
15019
|
var newStatus = e.target.checked ? 'ACTIVE' : 'INACTIVE';
|
|
15024
15020
|
var listType = dataAlert.type === 'CUSTOM' ? 'customAlertsList' : 'projectAlertsList';
|
|
15025
|
-
var newProjects = dataAlert.projects.map(function (p) {
|
|
15026
|
-
if (p.id === _this.props.selectedDemoProjectId) {
|
|
15027
|
-
p.status = newStatus;
|
|
15028
|
-
}
|
|
15029
|
-
|
|
15030
|
-
return p;
|
|
15031
|
-
});
|
|
15032
15021
|
|
|
15033
15022
|
var oldList = _cloneDeep(_this.state[listType]);
|
|
15034
15023
|
|
|
15035
15024
|
var newList = _this.state[listType].map(function (n) {
|
|
15036
15025
|
if (dataAlert.id === n.id) {
|
|
15037
15026
|
return _objectSpread2(_objectSpread2({}, n), {}, {
|
|
15038
|
-
|
|
15027
|
+
status: newStatus
|
|
15039
15028
|
});
|
|
15040
15029
|
}
|
|
15041
15030
|
|
|
@@ -15130,13 +15119,7 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
15130
15119
|
});
|
|
15131
15120
|
|
|
15132
15121
|
_defineProperty(_assertThisInitialized(_this), "hasError", function (dataAlert) {
|
|
15133
|
-
return dataAlert.
|
|
15134
|
-
return p.id === _this.props.selectedDemoProjectId;
|
|
15135
|
-
})[0].status === 'GENERAL_ERROR' || dataAlert.projects.map(function (p) {
|
|
15136
|
-
return p.id === _this.props.selectedDemoProjectId;
|
|
15137
|
-
})[0].status === 'EVALUATION_ERROR' || dataAlert.projects.map(function (p) {
|
|
15138
|
-
return p.id === _this.props.selectedDemoProjectId;
|
|
15139
|
-
})[0].status === 'DATA_RETURN_ERROR';
|
|
15122
|
+
return dataAlert.status === 'GENERAL_ERROR' || dataAlert.status === 'EVALUATION_ERROR' || dataAlert.status === 'DATA_RETURN_ERROR';
|
|
15140
15123
|
});
|
|
15141
15124
|
|
|
15142
15125
|
_defineProperty(_assertThisInitialized(_this), "renderNotificationlist", function (type, list) {
|
|
@@ -15148,7 +15131,7 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
15148
15131
|
className: "data-alerts-list-container"
|
|
15149
15132
|
}, type === 'custom' && _this.renderNotificationGroupTitle('Custom Data Alerts', 'View and manage your custom Data Alerts', true), type === 'custom' && !_get(list, 'length') && _this.renderEmptyListMessage(), type === 'project' && _this.renderNotificationGroupTitle('Subscribe to a Data Alert', 'Choose from a range of ready-to-use Alerts that have been set up for you'), /*#__PURE__*/React.createElement("div", {
|
|
15150
15133
|
className: "react-autoql-notification-settings-container"
|
|
15151
|
-
}, list.map(function (notification, i) {
|
|
15134
|
+
}, list && list.map(function (notification, i) {
|
|
15152
15135
|
return /*#__PURE__*/React.createElement("div", {
|
|
15153
15136
|
key: "react-autoql-notification-setting-item-".concat(i),
|
|
15154
15137
|
className: "react-autoql-notification-setting-item ".concat(notification.type)
|
|
@@ -15205,16 +15188,12 @@ var DataAlerts = /*#__PURE__*/function (_React$Component) {
|
|
|
15205
15188
|
})) : /*#__PURE__*/React.createElement(Checkbox, {
|
|
15206
15189
|
themeConfig: getThemeConfig(_this.props.themeConfig),
|
|
15207
15190
|
type: "switch",
|
|
15208
|
-
checked: notification.
|
|
15209
|
-
return p.status === 'ACTIVE' && p.id === _this.props.selectedDemoProjectId || p.status === 'WAITING' && p.id === _this.props.selectedDemoProjectId;
|
|
15210
|
-
}).length > 0,
|
|
15191
|
+
checked: notification.status === 'ACTIVE' || notification.status === 'WAITING',
|
|
15211
15192
|
className: "react-autoql-notification-enable-checkbox",
|
|
15212
15193
|
onClick: function onClick(e) {
|
|
15213
15194
|
return e.stopPropagation();
|
|
15214
15195
|
},
|
|
15215
|
-
"data-tip": notification.
|
|
15216
|
-
return p.status === 'ACTIVE' && p.id === _this.props.selectedDemoProjectId || p.status === 'WAITING' && p.id === _this.props.selectedDemoProjectId;
|
|
15217
|
-
}).length > 0 ? 'Turn Data Alert off' : 'Turn Data Alert on',
|
|
15196
|
+
"data-tip": notification.status === 'ACTIVE' || notification.status === 'WAITING',
|
|
15218
15197
|
"data-for": "react-autoql-notification-settings-tooltip",
|
|
15219
15198
|
onChange: function onChange(e) {
|
|
15220
15199
|
_this.onEnableSwitchChange(e, notification);
|
|
@@ -19153,7 +19132,6 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
|
|
|
19153
19132
|
} // WIP
|
|
19154
19133
|
// fetchConditions({ ...getAuthentication(this.props.authentication) }).then(
|
|
19155
19134
|
// (response) => {
|
|
19156
|
-
// console.log(_get(response, 'data.data.data'))
|
|
19157
19135
|
// this.setState({ conditions: _get(response, 'data.data.data') })
|
|
19158
19136
|
// }
|
|
19159
19137
|
// )
|
|
@@ -19763,7 +19741,23 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
|
|
|
19763
19741
|
},
|
|
19764
19742
|
position: "bottom" // preferred position
|
|
19765
19743
|
,
|
|
19766
|
-
content: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
19744
|
+
content: /*#__PURE__*/React.createElement("div", null, window.location.href.includes('chata-ai-test-page') && /*#__PURE__*/React.createElement("div", {
|
|
19745
|
+
className: "clear-messages-confirm-popover"
|
|
19746
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19747
|
+
className: "react-autoql-menu-text",
|
|
19748
|
+
onClick: function onClick() {
|
|
19749
|
+
_this.setState({
|
|
19750
|
+
isConditionLockingMenuOpen: true,
|
|
19751
|
+
isOptionsDropdownOpen: false
|
|
19752
|
+
});
|
|
19753
|
+
}
|
|
19754
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19755
|
+
type: "lock"
|
|
19756
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
19757
|
+
style: {
|
|
19758
|
+
marginLeft: 5
|
|
19759
|
+
}
|
|
19760
|
+
}, lang.openConditionLocking))), /*#__PURE__*/React.createElement("div", {
|
|
19767
19761
|
className: "clear-messages-confirm-popover"
|
|
19768
19762
|
}, /*#__PURE__*/React.createElement("div", {
|
|
19769
19763
|
className: "react-autoql-menu-text",
|
|
@@ -19804,7 +19798,7 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
|
|
|
19804
19798
|
"data-tip": lang.dataMessengerOptions,
|
|
19805
19799
|
"data-for": "react-autoql-header-tooltip"
|
|
19806
19800
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19807
|
-
type: "
|
|
19801
|
+
type: "trash"
|
|
19808
19802
|
})));
|
|
19809
19803
|
}
|
|
19810
19804
|
});
|
|
@@ -19977,26 +19971,7 @@ var DataMessenger = /*#__PURE__*/function (_React$Component) {
|
|
|
19977
19971
|
className: "response-loading"
|
|
19978
19972
|
}, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", null))), /*#__PURE__*/React.createElement("div", {
|
|
19979
19973
|
className: "chat-bar-container"
|
|
19980
|
-
},
|
|
19981
|
-
id: "conditionListContent",
|
|
19982
|
-
className: "condition-list-display"
|
|
19983
|
-
}, /*#__PURE__*/React.createElement("h5", null, "Content:"), /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", null, "thing 1"), /*#__PURE__*/React.createElement("li", null, "thing 2"))), /*#__PURE__*/React.createElement("span", {
|
|
19984
|
-
className: "condition-list-container",
|
|
19985
|
-
onMouseEnter: function onMouseEnter() {
|
|
19986
|
-
return document.getElementById('conditionListContent').style.display = 'block';
|
|
19987
|
-
},
|
|
19988
|
-
onMouseLeave: function onMouseLeave() {
|
|
19989
|
-
return document.getElementById('conditionListContent').style.display = 'none';
|
|
19990
|
-
},
|
|
19991
|
-
onClick: function onClick() {
|
|
19992
|
-
_this.setState({
|
|
19993
|
-
isConditionLockingMenuOpen: true,
|
|
19994
|
-
isOptionsDropdownOpen: false
|
|
19995
|
-
});
|
|
19996
|
-
}
|
|
19997
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
19998
|
-
type: "lock"
|
|
19999
|
-
}), " Conditions")), /*#__PURE__*/React.createElement("div", {
|
|
19974
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20000
19975
|
className: "watermark"
|
|
20001
19976
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
20002
19977
|
type: "react-autoql-bubbles-outlined"
|