diff --git a/angular.json b/angular.json index bbe0693c..650ede16 100644 --- a/angular.json +++ b/angular.json @@ -69,13 +69,27 @@ "maximumError": "15kb" } ], + "optimization": { + "scripts": true, + "styles": { + "minify": false, + "inlineCritical": true + }, + "fonts": true + }, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "aot": true, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, "fileReplacements": [ { "replace": "src/environments/environment.ts", "with": "src/environments/environment.prod.ts" } - ], - "outputHashing": "all" + ] }, "pre": { "optimization": { diff --git a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-widget/cds-panel-widget.component.ts b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-widget/cds-panel-widget.component.ts index 22ba24b1..6b6d0bda 100644 --- a/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-widget/cds-panel-widget.component.ts +++ b/src/app/chatbot-design-studio/cds-dashboard/cds-canvas/cds-panel-widget/cds-panel-widget.component.ts @@ -98,7 +98,8 @@ export class CdsPanelWidgetComponent implements OnInit, OnDestroy { window.addEventListener('message', (event_data)=> { if(event_data && event_data.origin.includes('widget')){ let message = event_data.data.message - if(message && message.attributes && message.attributes.intentName){ + //publish ACTIVE INTENT only if widget-panel is visible + if(message && message.attributes && message.attributes.intentName && this.isPanelVisible){ let intentName = message.attributes.intentName this.intentService.setLiveActiveIntent(intentName) }else{ diff --git a/src/index.html b/src/index.html index 53886adc..2c9d32bd 100644 --- a/src/index.html +++ b/src/index.html @@ -3,7 +3,7 @@ Tiledesk Design Studio - +