@chat21/chat21-web-widget 5.0.76 → 5.0.77-rc.1
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 +3 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +17 -1
- package/src/assets/twp/index-dev.html +18 -2
package/CHANGELOG.md
CHANGED
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(() => {
|
|
@@ -1787,6 +1794,15 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1787
1794
|
return;
|
|
1788
1795
|
}
|
|
1789
1796
|
|
|
1797
|
+
openConversationById(requestId){
|
|
1798
|
+
this.isOpenConversation = true;
|
|
1799
|
+
|
|
1800
|
+
this.g.setParameter('recipientId', requestId);
|
|
1801
|
+
this.appStorageService.setItem('recipientId', requestId)
|
|
1802
|
+
|
|
1803
|
+
this.isConversationArchived = false;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1790
1806
|
/**
|
|
1791
1807
|
* MODAL HOME:
|
|
1792
1808
|
* 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>
|