Skip to content

Commit

Permalink
Merge pull request #929 from chatatechnologies/develop
Browse files Browse the repository at this point in the history
Production release
  • Loading branch information
alexzhou-chata authored Nov 8, 2024
2 parents 7379925 + e66c379 commit 5463216
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 74 deletions.
78 changes: 39 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-autoql",
"version": "8.8.26",
"version": "8.8.33",
"description": "React Widget Library",
"main": "dist/autoql.cjs.js",
"module": "dist/autoql.esm.js",
Expand Down Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"@react-icons/all-files": "^4.1.0",
"autoql-fe-utils": "1.6.5",
"autoql-fe-utils": "1.6.8",
"axios": "^1.4.0",
"classnames": "^2.5.1",
"d3-array": "^2.3.3",
Expand Down Expand Up @@ -172,4 +172,4 @@
}
},
"cacheDirectories": []
}
}
2 changes: 0 additions & 2 deletions src/components/ChatContent/ChatContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ export default class ChatContent extends React.Component {
authentication: authenticationType.isRequired,
autoQLConfig: autoQLConfigType.isRequired,
dataFormatting: dataFormattingType,
clearOnClose: PropTypes.bool.isRequired,
enableVoiceRecord: PropTypes.bool.isRequired,
maxMessages: PropTypes.number.isRequired,
introMessage: PropTypes.string.isRequired,
inputPlaceholder: PropTypes.string.isRequired,
enableDynamicCharting: PropTypes.bool.isRequired,
autoChartAggregations: PropTypes.bool.isRequired,
Expand Down
6 changes: 5 additions & 1 deletion src/components/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { FiCheck } from '@react-icons/all-files/fi/FiCheck'
import { FiDatabase } from '@react-icons/all-files/fi/FiDatabase'
import { FiDownload } from '@react-icons/all-files/fi/FiDownload'
import { FiEye } from '@react-icons/all-files/fi/FiEye'
import { FiLayers } from '@react-icons/all-files/fi/FiLayers'
import { FiMoreHorizontal } from '@react-icons/all-files/fi/FiMoreHorizontal'
import { FiMoreVertical } from '@react-icons/all-files/fi/FiMoreVertical'
import { FiPauseCircle } from '@react-icons/all-files/fi/FiPauseCircle'
Expand All @@ -49,7 +50,6 @@ import { FiMinimize } from '@react-icons/all-files/fi/FiMinimize'
import { FiRefreshCw } from '@react-icons/all-files/fi/FiRefreshCw'
import { FiTool } from '@react-icons/all-files/fi/FiTool'
import { FiMinus } from '@react-icons/all-files/fi/FiMinus'

import { RiFilterLine } from '@react-icons/all-files/ri/RiFilterLine'
import { RiFilterOffLine } from '@react-icons/all-files/ri/RiFilterOffLine'
import { RiListSettingsLine } from '@react-icons/all-files/ri/RiListSettingsLine'
Expand Down Expand Up @@ -212,6 +212,10 @@ export default class Icon extends React.Component {
icon = <MdClose />
break
}
case 'layers': {
icon = <FiLayers />
break
}
case 'mark-read': {
icon = <BiEnvelopeOpen />
break
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@
.add-second-join-icon,
.remove-second-join-icon {
position: absolute;
top: 37px;
left: -10px;
bottom: -6px;
right: -6px;
cursor: pointer;
background-color: var(--react-autoql-accent-color);
border-radius: 50%;
width: 20px;
height: 20px;
width: 12px;
height: 12px;
display: flex;
justify-content: center;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@ export default class NotificationItem extends React.Component {
)
}

return <span>{this.props.notification.title}</span>
return (
<span>
{this.props.notification?.project?.id === 'composite' && <Icon type='layers' style={{ marginRight: '5px' }} />}
{this.props.notification.title}
</span>
)
}

renderNotificationMessage = () => {
Expand Down Expand Up @@ -556,7 +561,8 @@ export default class NotificationItem extends React.Component {
${this.isUnread() ? 'unread' : ''}
${this.isError() ? 'is-error' : ''}
${this.state.isMoreOptionsMenuOpen ? 'menu-open' : ''}
${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''}`}
${this.state.deleted ? 'react-autoql-notification-item-deleted' : ''}
${this.props.notification?.project?.id === 'composite' ? 'composite-project' : ''}`}
>
{!this.props.tooltipID && <Tooltip tooltipId={this.TOOLTIP_ID} delayShow={500} />}
{!this.props.chartTooltipID && <Tooltip tooltipId={this.CHART_TOOLTIP_ID} delayShow={0} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ import OptionsToolbar from '../../OptionsToolbar/OptionsToolbar'
import { authenticationType, autoQLConfigType, dataFormattingType } from '../../../props/types'

export default class NotificationQueryResponse extends React.Component {
constructor(props) {
super(props)
this.state = {
isMounted: false,
outputRef: null,
}
}
setOutputRef = (r) => {
this.setState({ outputRef: r })
}
static propTypes = {
authentication: authenticationType,
autoQLConfig: autoQLConfigType,
Expand Down Expand Up @@ -43,26 +53,24 @@ export default class NotificationQueryResponse extends React.Component {
<div className='react-autoql-notification-chart-container'>
<div ref={(r) => (this.dataContainer = r)} className='react-autoql-notification-query-data-container'>
{queryResponse ? (
queryResponse.data.hasQueryResult === false ? null : (
<QueryOutput
ref={(r) => (this.OUTPUT_REF = r)}
vizToolbarRef={this.vizToolbarRef}
optionsToolbarRef={this.optionsToolbarRef}
authentication={this.props.authentication}
autoQLConfig={this.props.autoQLConfig}
dataFormatting={this.props.dataFormatting}
queryResponse={queryResponse}
autoChartAggregations={this.props.autoChartAggregations}
isResizing={this.props.isResizing || !this.props.shouldRender}
popoverParentElement={this.props.popoverParentElement}
showSingleValueResponseTitle={true}
tooltipID={this.props.tooltipID}
chartTooltipID={this.props.chartTooltipID}
showQueryInterpretation={false}
enableDynamicCharting={true}
useInfiniteScroll={false}
/>
)
<QueryOutput
ref={this.setOutputRef}
vizToolbarRef={this.vizToolbarRef}
optionsToolbarRef={this.optionsToolbarRef}
authentication={this.props.authentication}
autoQLConfig={this.props.autoQLConfig}
dataFormatting={this.props.dataFormatting}
queryResponse={queryResponse}
autoChartAggregations={this.props.autoChartAggregations}
isResizing={this.props.isResizing || !this.props.shouldRender}
popoverParentElement={this.props.popoverParentElement}
showSingleValueResponseTitle={true}
tooltipID={this.props.tooltipID}
chartTooltipID={this.props.chartTooltipID}
showQueryInterpretation={false}
enableDynamicCharting={true}
useInfiniteScroll={false}
/>
) : (
<div style={{ position: 'absolute', top: 0 }} className='loading-container-centered'>
<LoadingDots />
Expand All @@ -84,15 +92,15 @@ export default class NotificationQueryResponse extends React.Component {
<VizToolbar
autoQLConfig={this.props.autoQLConfig}
ref={(r) => (this.vizToolbarRef = r)}
responseRef={this.OUTPUT_REF}
responseRef={this.state.outputRef}
/>
</div>
<div>
<OptionsToolbar
authentication={this.props.authentication}
autoQLConfig={this.props.autoQLConfig}
ref={(r) => (this.optionsToolbarRef = r)}
responseRef={this.OUTPUT_REF}
responseRef={this.state.outputRef}
onSuccessAlert={this.props.onSuccessCallback}
onErrorCallback={this.props.onErrorCallback}
popoverPositions={['top', 'left', 'bottom', 'right']}
Expand Down
7 changes: 6 additions & 1 deletion src/components/Notifications/RuleSimple/RuleSimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,12 @@ export default class RuleSimple extends React.Component {
})
.then((response) => {
this.onValidationResponse(response)
this.setState({ isLoadingSecondQuery: false })
const secondQueryCompareColumnIndex = this.getCompareColumnIndex(response, this.state.storedInitialData, 1)
this.setState({
isLoadingSecondQuery: false,
secondQuerySelectedColumns:
secondQueryCompareColumnIndex !== undefined ? [secondQueryCompareColumnIndex] : [],
})
})
.catch((error) => {
if (error?.response?.data?.message !== REQUEST_CANCELLED_ERROR) {
Expand Down

0 comments on commit 5463216

Please sign in to comment.