Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.22.5] - 2025-09-10
- Update live chat text transcription applying redaction when required.
- Fix issue with live chat not closing on browser or window closing.

## [0.22.4] - 2025-08-09
- Fix issue where full page loader was pulling iniitate-loader as a dependency improperly
- Allow empty promptForNameMessage to skip prompting for a name (for Talkdesk integration only). This must be manually updated on the config file.
Expand Down
2 changes: 1 addition & 1 deletion dist/lex-web-ui-loader.min.css

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

2 changes: 1 addition & 1 deletion dist/lex-web-ui-loader.min.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* lex-web-ui v0.22.4
* lex-web-ui v0.22.5
* (c) 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Released under the Amazon Software License.
*/
Expand Down
33 changes: 23 additions & 10 deletions dist/lex-web-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lex-web-ui.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lex-web-ui.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/lex-web-ui.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/wav-worker.js

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

2 changes: 1 addition & 1 deletion dist/wav-worker.min.js

Large diffs are not rendered by default.

48 changes: 28 additions & 20 deletions lex-web-ui/package-lock.json

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

2 changes: 1 addition & 1 deletion lex-web-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lex-web-ui",
"version": "0.22.4",
"version": "0.22.5",
"description": "Amazon Lex Web Interface",
"author": "AWS",
"license": "Amazon Software License",
Expand Down
16 changes: 12 additions & 4 deletions lex-web-ui/src/components/LexWeb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default {
if (!this.isMobile) {
document.documentElement.style.overflowY = 'hidden';
}

this.initConfig()
.then(() => Promise.all([
this.$store.dispatch(
Expand Down Expand Up @@ -192,7 +192,7 @@ export default {
if (!poolId) {
return Promise.reject(new Error('no cognito.poolId found in config'))
}

if (!this.$lexWebUi.awsConfig.credentials) {
this.$lexWebUi.awsConfig.credentials = this.$store.dispatch('getCredentials', this.$store.state.config).then((creds) => {
return creds;
Expand Down Expand Up @@ -273,6 +273,7 @@ export default {
}
this.onResize();
window.addEventListener('resize', this.onResize, { passive: true });
window.addEventListener('beforeunload', this.handleBeforeUnload);
},
methods: {
onResize() {
Expand Down Expand Up @@ -348,6 +349,13 @@ export default {
console.info('handleRequestLiveChat');
this.$store.dispatch('requestLiveChat');
},
handleBeforeUnload() {
console.info('handleBeforeUnload'); //state.chatMode === chatMode.LIVECHAT
if (this.$store.state.chatMode === 'livechat') {
console.info('disconnecting from livechat');
this.handleEndLiveChat();
}
},
handleEndLiveChat() {
console.info('LexWeb: handleEndLiveChat');
try {
Expand Down Expand Up @@ -573,6 +581,6 @@ NOTE: not using var() for different heights due to IE11 compatibility
background: transparent;
}

html { font-size: 14px !important; }
html { font-size: 14px !important; }

</style>
</style>
14 changes: 8 additions & 6 deletions lex-web-ui/src/store/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,9 @@ export default {
const regex = redactionEnabled ? new RegExp(`${state.config.connect.transcriptRedactRegex}`, "g") : undefined;
state.messages.forEach((message) => {
var nextMessage = message.date.toLocaleTimeString() + ' ' + (message.type === 'bot' ? 'Bot' : 'Human') + ': ' + message.text + '\n';

if (redactionEnabled && regex) {
shouldRedactNextMessage = regex.test(nextMessage);
}

if (redactionEnabled && shouldRedactNextMessage) {
nextMessage = message.date.toLocaleTimeString() + ' ' + (message.type === 'bot' ? 'Bot' : 'Human') + ': ' + '###' + '\n';
}

if((text + nextMessage).length > 400) {
messageTextArray.push(text);
//this is over 1k chars by itself, so we must break it up.
Expand All @@ -89,7 +83,15 @@ export default {
messageTextArray.push(subMsg);
});
text = "";
if (redactionEnabled && regex) {
shouldRedactNextMessage = regex.test(nextMessage);
}
nextMessage = "";
} else {
if (redactionEnabled && regex) {
// if we are redacting, check if the next message should be redacted
shouldRedactNextMessage = regex.test(nextMessage);
}
}
text = text + nextMessage;
});
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-lex-web-ui",
"version": "0.22.4",
"version": "0.22.5",
"description": "Sample Amazon Lex Web Interface",
"main": "dist/lex-web-ui.min.js",
"repository": {
Expand Down
16 changes: 8 additions & 8 deletions templates/master.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: 2010-09-09
Description: |
Master Lex Web UI CloudFormation template (v0.22.4)
Master Lex Web UI CloudFormation template (v0.22.5)
The Lex Web Ui can be deployed to operate against either a Lex V2 Bot OR a Lex V1 Bot BUT NOT BOTH.
Please configure either the Lex V2 bot information OR the Lex V1 bot information and leave the other
version input parameters as defaulted.
Expand Down Expand Up @@ -760,7 +760,7 @@ Resources:
ShouldDeleteBot: !Ref ShouldDeleteBot
ParentStackName: !Ref "AWS::StackName"
SourceBucket: !Ref BootstrapBucket
QBusinessLambdaCodeObject: !Sub "${BootstrapPrefix}/qbusiness-lambda-v0.22.4.zip"
QBusinessLambdaCodeObject: !Sub "${BootstrapPrefix}/qbusiness-lambda-v0.22.5.zip"
AmazonQAppId: !Ref AmazonQAppId
IDCApplicationARN: !Ref IDCApplicationARN
VpcSubnetId: !Ref VpcSubnetId
Expand Down Expand Up @@ -804,10 +804,10 @@ Resources:
SourceBucket: !Ref BootstrapBucket
SourcePrefix: !Ref BootstrapPrefix
StreamingWebSocketEndpoint: !Ref StreamingWebSocketEndpoint
SourceObject: !Sub "${BootstrapPrefix}/src-v0.22.4.zip"
CustomResourceCodeObject: !Sub "${BootstrapPrefix}/custom-resources-v0.22.4.zip"
InitiateChatLambdaCodeObject: !Sub "${BootstrapPrefix}/initiate-chat-lambda-v0.22.4.zip"
StreamingLambdaCodeObject: !Sub "${BootstrapPrefix}/streaming-lambda-v0.22.4.zip"
SourceObject: !Sub "${BootstrapPrefix}/src-v0.22.5.zip"
CustomResourceCodeObject: !Sub "${BootstrapPrefix}/custom-resources-v0.22.5.zip"
InitiateChatLambdaCodeObject: !Sub "${BootstrapPrefix}/initiate-chat-lambda-v0.22.5.zip"
StreamingLambdaCodeObject: !Sub "${BootstrapPrefix}/streaming-lambda-v0.22.5.zip"
CleanupBuckets: !Ref CleanupBuckets
BotName:
!If
Expand Down Expand Up @@ -904,7 +904,7 @@ Resources:
UploadBucket: !Ref UploadBucket
VpcSubnetId: !Ref VpcSubnetId
VpcSecurityGroupId: !Ref VpcSecurityGroupId
Timestamp: 1754657573
Timestamp: 1757519732

CognitoIdentityPoolConfig:
Type: AWS::CloudFormation::Stack
Expand All @@ -920,7 +920,7 @@ Resources:
CognitoUserPoolClient: !GetAtt CognitoIdentityPool.Outputs.CognitoUserPoolClientId
VpcSubnetId: !Ref VpcSubnetId
VpcSecurityGroupId: !Ref VpcSecurityGroupId
Timestamp: 1754657573
Timestamp: 1757519732

##########################################################################
# Lambda that will validate if user has put in an invalid CSS color/Hex string and fail deployment
Expand Down