@chat21/chat21-web-widget 5.1.11 → 5.1.12-ar
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
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
+
# 5.1.12-ar
|
|
10
|
+
- **bug-fixed**: check showEmojiFooterButton to enable/disable emojii
|
|
11
|
+
- **bug-fixed**: markdown is fired as an emojii and blocked by isEmojii check fn
|
|
12
|
+
|
|
9
13
|
# 5.1.11
|
|
10
14
|
- **bug-fixed**: departmentId and departmentName is incorrect in attributes
|
|
11
15
|
|
package/package.json
CHANGED
package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts
CHANGED
|
@@ -570,7 +570,7 @@ export class ConversationFooterComponent implements OnInit, OnChanges {
|
|
|
570
570
|
|
|
571
571
|
checkForEmojii(text){
|
|
572
572
|
//remove emojii only if "emojii" exist and is set to false
|
|
573
|
-
if(this.
|
|
573
|
+
if(!this.showEmojiFooterButton){
|
|
574
574
|
this.showAlertEmoji = isEmoji(text);
|
|
575
575
|
if(this.showAlertEmoji){
|
|
576
576
|
return false
|
|
@@ -333,12 +333,15 @@ export function replaceEndOfLine(text) {
|
|
|
333
333
|
|
|
334
334
|
export function isEmoji(str: string) {
|
|
335
335
|
// tslint:disable-next-line:max-line-length
|
|
336
|
-
const ranges = ['(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])'];
|
|
337
|
-
if (str.match(ranges.join('|'))) {
|
|
338
|
-
|
|
339
|
-
} else {
|
|
340
|
-
|
|
341
|
-
}
|
|
336
|
+
// const ranges = ['(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c[\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c[\ude32-\ude3a]|[\ud83c[\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])'];
|
|
337
|
+
// if (str.match(ranges.join('|'))) {
|
|
338
|
+
// return true;
|
|
339
|
+
// } else {
|
|
340
|
+
// return false;
|
|
341
|
+
// }
|
|
342
|
+
const emojiRegex = /\p{Extended_Pictographic}/u;
|
|
343
|
+
return emojiRegex.test(str);
|
|
344
|
+
|
|
342
345
|
}
|
|
343
346
|
|
|
344
347
|
export function setColorFromString(str: string) {
|