Skip to content

Commit

Permalink
### 1.0.0 in PROD
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriele Panico committed Nov 15, 2023
1 parent 2ede676 commit 1a4a2dc
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*Dario De Pascalis*
### **Copyrigth**: *Tiledesk SRL*


### 1.0.0 in PROD

### 0.0.8
- added: retrocompatibility with intent that already contains an action of type 'connect block'
- changed: routing path /cds/ to /chatbot/
Expand Down
2 changes: 1 addition & 1 deletion 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,7 +1,7 @@
{
"name": "@tiledesk/cds",
"author": "Tiledesk SRL",
"version": "0.0.8",
"version": "1.0.0",
"license": "MIT",
"homepage": "https://www.tiledesk.com",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ export class CdsActionDescriptionComponent implements OnInit {
}

ngOnChanges(){
this.logger.log('ActionDescriptionComponent ngOnChanges:: ', this.actionSelected, this.elementType);
this.logger.log('[ActionDescriptionComponent] ngOnChanges:: ', this.actionSelected, this.elementType);
if(this.actionSelected){
this.elementType = this.actionSelected._tdActionType;

if(this.actionSelected._tdActionTitle && this.actionSelected._tdActionTitle != ""){
this.dataInput = this.actionSelected._tdActionTitle;
}
}
try {

Expand All @@ -46,13 +50,9 @@ export class CdsActionDescriptionComponent implements OnInit {
break;
}
// this.element = ELEMENTS_LIST.find(item => item.type === this.elementType);

if(this.actionSelected._tdActionTitle && this.actionSelected._tdActionTitle != ""){
this.dataInput = this.actionSelected._tdActionTitle;
}
this.logger.log('ActionDescriptionComponent action:: ', this.element);
this.logger.log('[ActionDescriptionComponent] action:: ', this.element);
} catch (error) {
this.logger.log("error ", error);
this.logger.log("[ActionDescriptionComponent] error ", error);
}
}

Expand All @@ -65,7 +65,7 @@ export class CdsActionDescriptionComponent implements OnInit {
// }

onChangeText(text: string){
this.logger.log('ActionDescriptionComponent onChangeText:: ', text);
this.logger.log('[ActionDescriptionComponent] onChangeText:: ', text);
this.actionSelected._tdActionTitle = text;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class CDSImageUploadComponent implements OnInit {
// this.logger.log(`[WS-REQUESTS-MSGS] - upload native metadata `, this.metadata);
// this.fileUpload.nativeElement.value = '';
}).catch(error => {
this.logger.log("error", error);
this.logger.log("[IMAGE-UPLOAD] error", error);
// this.logger.error(`[WS-REQUESTS-MSGS] - upload native Failed to upload file and get link `, error);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges {
}

ngOnInit(): void {
console.log('CdsPanelIntentComponent ngAfterViewInit-->', this.intent);
console.log('CdsPanelIntentComponent ngOnInit-->', this.intent);
// this.patchActionIntent();
if (this.intent.actions && this.intent.actions.length === 1 && this.intent.actions[0]._tdActionType === TYPE_ACTION.INTENT && this.intent.intent_display_name === 'start') {
this.logger.log('CdsPanelIntentComponent START-->',this.intent.actions[0]);
Expand All @@ -201,6 +201,22 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges {
this.addEventListener();
}


ngAfterViewInit(){
new ResizeObserver(function(entries) {
// since we are observing only a single element, so we access the first element in entries array
let rect = entries[0].contentRect;

// current width & height
let width = rect.width;
let height = rect.height;

console.log('Current Width : ' + width);
console.log('Current Height : ' + height);
}).observe(document.querySelector(`#intent-content-${this.intent.intent_id}`));

}

private setActionIntent(){
try {
let connectorID = '';
Expand Down Expand Up @@ -260,6 +276,8 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges {

}

ngAfter

// ---------------------------------------------------------
// Event listener
// ---------------------------------------------------------
Expand Down Expand Up @@ -321,6 +339,10 @@ export class CdsIntentComponent implements OnInit, OnDestroy, OnChanges {
},
true
);

document.addEventListener('load', (event)=>{
console.log('event loadeddddddd')
})
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class CdsPanelWidgetComponent implements OnInit, OnDestroy {

setIframeUrl(){
this.WIDGET_BASE_URL = this.appConfigService.getConfig().widgetBaseUrl;
const testItOutUrl = this.WIDGET_BASE_URL + "assets/twp" + '/chatbot-panel.html'
const testItOutUrl = this.WIDGET_BASE_URL + "5.0.71/assets/twp" + '/chatbot-panel.html'
// const testItOutUrl = "https://widget.tiledesk.com/v6/5.0.71/assets/twp"+ '/chatbot-panel.html'
// const testItOutUrl = 'http://localhost:4203/assets/twp'+ '/chatbot-panel.html'
let url = testItOutUrl + '?tiledesk_projectid=' + this.projectID +
Expand Down

0 comments on commit 1a4a2dc

Please sign in to comment.