Skip to content

Commit db32999

Browse files
authored
Merge pull request #803 from aws-samples/development
v0.22.2
2 parents be500a6 + e922bca commit db32999

19 files changed

+72
-45
lines changed

dist/lex-web-ui-loader.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44365,7 +44365,6 @@ class IframeComponentLoader {
4436544365

4436644366
// SECURITY: origin check
4436744367
if (evt.origin !== iframeOrigin) {
44368-
console.warn('postMessage from invalid origin', evt.origin);
4436944368
return;
4437044369
}
4437144370
// ignore events not produced by the lex web ui

dist/lex-web-ui-loader.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui-loader.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui-loader.min.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* lex-web-ui v0.22.1
2+
* lex-web-ui v0.22.2
33
* (c) 2017-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
* Released under the Amazon Software License.
55
*/
@@ -36515,7 +36515,6 @@ class IframeComponentLoader {
3651536515

3651636516
// SECURITY: origin check
3651736517
if (evt.origin !== iframeOrigin) {
36518-
console.warn('postMessage from invalid origin', evt.origin);
3651936518
return;
3652036519
}
3652136520
// ignore events not produced by the lex web ui

dist/lex-web-ui-loader.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui.js

Lines changed: 25 additions & 10 deletions
Large diffs are not rendered by default.

dist/lex-web-ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/lex-web-ui.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wav-worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wav-worker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lex-web-ui/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lex-web-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lex-web-ui",
3-
"version": "0.22.1",
3+
"version": "0.22.2",
44
"description": "Amazon Lex Web Interface",
55
"author": "AWS",
66
"license": "Amazon Software License",

lex-web-ui/src/components/LexWeb.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ export default {
193193
return Promise.reject(new Error('no cognito.poolId found in config'))
194194
}
195195
196-
196+
if (!this.$lexWebUi.awsConfig.credentials) {
197+
this.$lexWebUi.awsConfig.credentials = this.$store.dispatch('getCredentials', this.$store.state.config).then((creds) => {
198+
return creds;
199+
});
200+
};
197201
const awsConfig = {
198202
region: region,
199203
credentials: this.$lexWebUi.awsConfig.credentials,

lex-web-ui/src/store/actions.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,20 @@ export default {
6464
switch (context.state.awsCreds.provider) {
6565
case 'cognito':
6666
case 'parentWindow':
67-
awsCredentials = credentials;
68-
if (lexClient) {
69-
lexClient.initCredentials(awsCredentials);
67+
if (!credentials) {
68+
context.dispatch('getCredentials', context.state.config)
69+
.then((creds) => {
70+
awsCredentials = creds;
71+
if (lexClient) {
72+
lexClient.initCredentials(awsCredentials);
73+
}
74+
});
75+
}
76+
else {
77+
awsCredentials = credentials;
78+
if (lexClient) {
79+
lexClient.initCredentials(awsCredentials);
80+
}
7081
}
7182
break;
7283
default:
@@ -1447,4 +1458,4 @@ export default {
14471458
removeAttachments(context) {
14481459
context.commit('removeAttachments');
14491460
}
1450-
};
1461+
};

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-lex-web-ui",
3-
"version": "0.22.1",
3+
"version": "0.22.2",
44
"description": "Sample Amazon Lex Web Interface",
55
"main": "dist/lex-web-ui.min.js",
66
"repository": {

src/lex-web-ui-loader/js/lib/iframe-component-loader.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,9 @@ export class IframeComponentLoader {
310310
) ?
311311
this.config.iframe.iframeOrigin :
312312
window.location.origin;
313-
313+
314314
// SECURITY: origin check
315315
if (evt.origin !== iframeOrigin) {
316-
console.warn('postMessage from invalid origin', evt.origin);
317316
return;
318317
}
319318
// ignore events not produced by the lex web ui
@@ -322,7 +321,7 @@ export class IframeComponentLoader {
322321
&& evt.data.source !== 'lex-web-ui'
323322
) {
324323
return;
325-
}
324+
}
326325
if (!evt.ports || !Array.isArray(evt.ports) || !evt.ports.length) {
327326
console.warn('postMessage not sent over MessageChannel', evt);
328327
return;

templates/master.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
AWSTemplateFormatVersion: 2010-09-09
22
Description: |
3-
Master Lex Web UI CloudFormation template (v0.22.1)
3+
Master Lex Web UI CloudFormation template (v0.22.2)
44
The Lex Web Ui can be deployed to operate against either a Lex V2 Bot OR a Lex V1 Bot BUT NOT BOTH.
55
Please configure either the Lex V2 bot information OR the Lex V1 bot information and leave the other
66
version input parameters as defaulted.
@@ -760,7 +760,7 @@ Resources:
760760
ShouldDeleteBot: !Ref ShouldDeleteBot
761761
ParentStackName: !Ref "AWS::StackName"
762762
SourceBucket: !Ref BootstrapBucket
763-
QBusinessLambdaCodeObject: !Sub "${BootstrapPrefix}/qbusiness-lambda-v0.22.1.zip"
763+
QBusinessLambdaCodeObject: !Sub "${BootstrapPrefix}/qbusiness-lambda-v0.22.2.zip"
764764
AmazonQAppId: !Ref AmazonQAppId
765765
IDCApplicationARN: !Ref IDCApplicationARN
766766
VpcSubnetId: !Ref VpcSubnetId
@@ -804,10 +804,10 @@ Resources:
804804
SourceBucket: !Ref BootstrapBucket
805805
SourcePrefix: !Ref BootstrapPrefix
806806
StreamingWebSocketEndpoint: !Ref StreamingWebSocketEndpoint
807-
SourceObject: !Sub "${BootstrapPrefix}/src-v0.22.1.zip"
808-
CustomResourceCodeObject: !Sub "${BootstrapPrefix}/custom-resources-v0.22.1.zip"
809-
InitiateChatLambdaCodeObject: !Sub "${BootstrapPrefix}/initiate-chat-lambda-v0.22.1.zip"
810-
StreamingLambdaCodeObject: !Sub "${BootstrapPrefix}/streaming-lambda-v0.22.1.zip"
807+
SourceObject: !Sub "${BootstrapPrefix}/src-v0.22.2.zip"
808+
CustomResourceCodeObject: !Sub "${BootstrapPrefix}/custom-resources-v0.22.2.zip"
809+
InitiateChatLambdaCodeObject: !Sub "${BootstrapPrefix}/initiate-chat-lambda-v0.22.2.zip"
810+
StreamingLambdaCodeObject: !Sub "${BootstrapPrefix}/streaming-lambda-v0.22.2.zip"
811811
CleanupBuckets: !Ref CleanupBuckets
812812
BotName:
813813
!If
@@ -904,7 +904,7 @@ Resources:
904904
UploadBucket: !Ref UploadBucket
905905
VpcSubnetId: !Ref VpcSubnetId
906906
VpcSecurityGroupId: !Ref VpcSecurityGroupId
907-
Timestamp: 1746810585
907+
Timestamp: 1747665565
908908

909909
CognitoIdentityPoolConfig:
910910
Type: AWS::CloudFormation::Stack
@@ -920,7 +920,7 @@ Resources:
920920
CognitoUserPoolClient: !GetAtt CognitoIdentityPool.Outputs.CognitoUserPoolClientId
921921
VpcSubnetId: !Ref VpcSubnetId
922922
VpcSecurityGroupId: !Ref VpcSecurityGroupId
923-
Timestamp: 1746810585
923+
Timestamp: 1747665565
924924

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

0 commit comments

Comments
 (0)