@chat21/chat21-web-widget 5.0.76 → 5.0.77-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +19 -2
- package/src/assets/twp/index-dev.html +18 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
*Dario De Pascalis*
|
|
6
6
|
### **Copyrigth**: *Tiledesk SRL*
|
|
7
7
|
|
|
8
|
+
### 5.0.77-rc.2
|
|
9
|
+
- bug-fixed: if user click on proactive attachment button, widget show prechatForm
|
|
10
|
+
|
|
11
|
+
### 5.0.77-rc.1
|
|
12
|
+
- added: ability to programmatically open an old conversation by request_id
|
|
13
|
+
|
|
8
14
|
### 5.0.76 in PROD
|
|
9
15
|
|
|
10
16
|
### 5.0.75 in PROD
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -1383,13 +1383,20 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1383
1383
|
});
|
|
1384
1384
|
};
|
|
1385
1385
|
|
|
1386
|
-
/**
|
|
1386
|
+
/** start new conversation */
|
|
1387
1387
|
windowContext['tiledesk'].startConversation = function (text: string) {
|
|
1388
1388
|
ngZone.run(() => {
|
|
1389
1389
|
windowContext['tiledesk']['angularcomponent'].component.onNewConversation(text);
|
|
1390
1390
|
});
|
|
1391
1391
|
};
|
|
1392
1392
|
|
|
1393
|
+
/** open widget with conversation ID */
|
|
1394
|
+
windowContext['tiledesk'].openConversationById = function (request_id: string) {
|
|
1395
|
+
ngZone.run(() => {
|
|
1396
|
+
windowContext['tiledesk']['angularcomponent'].component.openConversationById(request_id);
|
|
1397
|
+
});
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1393
1400
|
/** set state reinit */
|
|
1394
1401
|
windowContext['tiledesk'].reInit = function () {
|
|
1395
1402
|
ngZone.run(() => {
|
|
@@ -1701,7 +1708,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1701
1708
|
this.forceDisconnect = false;
|
|
1702
1709
|
}
|
|
1703
1710
|
//this.f21_open();
|
|
1704
|
-
this.
|
|
1711
|
+
this.f21_open();
|
|
1705
1712
|
}
|
|
1706
1713
|
// this.conversationSelected = $event;
|
|
1707
1714
|
if($event.channel_type === CHANNEL_TYPE.DIRECT){
|
|
@@ -1711,6 +1718,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1711
1718
|
this.g.setParameter('recipientId', $event.recipient);
|
|
1712
1719
|
this.appStorageService.setItem('recipientId', $event.recipient)
|
|
1713
1720
|
}
|
|
1721
|
+
this.g.isOpenPrechatForm = false;
|
|
1714
1722
|
this.isOpenConversation = true;
|
|
1715
1723
|
$event.archived? this.isConversationArchived = $event.archived : this.isConversationArchived = false;
|
|
1716
1724
|
this.logger.debug('[APP-COMP] onSelectConversation in APP COMPONENT: ', $event);
|
|
@@ -1787,6 +1795,15 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1787
1795
|
return;
|
|
1788
1796
|
}
|
|
1789
1797
|
|
|
1798
|
+
openConversationById(requestId){
|
|
1799
|
+
this.isOpenConversation = true;
|
|
1800
|
+
|
|
1801
|
+
this.g.setParameter('recipientId', requestId);
|
|
1802
|
+
this.appStorageService.setItem('recipientId', requestId)
|
|
1803
|
+
|
|
1804
|
+
this.isConversationArchived = false;
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1790
1807
|
/**
|
|
1791
1808
|
* MODAL HOME:
|
|
1792
1809
|
* open all-conversation
|
|
@@ -468,7 +468,7 @@
|
|
|
468
468
|
<meta property="og:locale" content="en">
|
|
469
469
|
|
|
470
470
|
<link rel="icon" type="image/png" href="./tiledesk_widget_files/logo-short.png">
|
|
471
|
-
<link href="https://
|
|
471
|
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" rel="stylesheet">
|
|
472
472
|
<script defer="" src="./tiledesk_widget_files/jquery.min.js"></script>
|
|
473
473
|
<script defer="" src="./tiledesk_widget_files/bootstrap.min.js"></script>
|
|
474
474
|
|
|
@@ -791,6 +791,11 @@
|
|
|
791
791
|
preChatFormTextArea.value = JSON.stringify(preChatFormJSON, null, 4)
|
|
792
792
|
}
|
|
793
793
|
|
|
794
|
+
function onClickOpenConversationById(){
|
|
795
|
+
let request_id = document.getElementById('request_id')
|
|
796
|
+
window.Tiledesk('openConversationById', request_id)
|
|
797
|
+
}
|
|
798
|
+
|
|
794
799
|
// function onClickParameter(elementName){
|
|
795
800
|
// console.log('onClickParameter: ',elementName)
|
|
796
801
|
// const radios = document.getElementsByName(elementName)
|
|
@@ -1753,10 +1758,21 @@
|
|
|
1753
1758
|
<textarea class="form-control" id="preChatFormGet" placeholder="Get preChatForm JSON..." rows="6" cols="60"></textarea>
|
|
1754
1759
|
</div>
|
|
1755
1760
|
<div class="row" style="text-align: right; margin:5px 0px">
|
|
1756
|
-
<button class="btn btn-light" onclick="onClickGetPreChatForm()">Get Form <i class="fa fa-sticky-note
|
|
1761
|
+
<button class="btn btn-light" onclick="onClickGetPreChatForm()">Get Form <i class="fa-regular fa-sticky-note" aria-hidden="true"></i></button>
|
|
1757
1762
|
</div>
|
|
1758
1763
|
|
|
1759
1764
|
</div>
|
|
1765
|
+
<div class="row section">
|
|
1766
|
+
<div><h3 style="line-height: 0.3;">OPEN <em><strong>conversation</strong></em></h3></div>
|
|
1767
|
+
|
|
1768
|
+
<div>Insert an <em><strong>existing</strong></em> request ID </div>
|
|
1769
|
+
<div class="row" style="margin: 0">
|
|
1770
|
+
<textarea class="form-control" id="request_id" placeholder="support-group-UUID" rows="1" cols="60"></textarea>
|
|
1771
|
+
</div>
|
|
1772
|
+
<div class="row" style="text-align: right; margin:5px 0px">
|
|
1773
|
+
<button class="btn btn-light" onclick="onClickOpenConversationById()">Open conversation <i class="fa-regular fa-comment" aria-hidden="true"></i></button>
|
|
1774
|
+
</div>
|
|
1775
|
+
</div>
|
|
1760
1776
|
<div class="row section c21-parameters">
|
|
1761
1777
|
<div><h3 style="line-height: 0.3;">MANAGE <em><strong>widget settings</strong></em></h3></div>
|
|
1762
1778
|
<div class="docs">Select an option for Tiledesk settings parameter</div>
|