@chat21/chat21-web-widget 5.1.7-rc9 → 5.1.8-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 +6 -2
- package/package.json +1 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +1 -2
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +1 -1
- package/src/app/providers/global-settings.service.ts +1 -1
- package/src/chat21-core/utils/utils.ts +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
-
# 5.1.
|
|
10
|
-
- **
|
|
9
|
+
# 5.1.8-ar
|
|
10
|
+
- **changed**: update emoji detection logic in conversation-footer and utils
|
|
11
|
+
- **bug-fixed**: 'DOMAIN_NOT_ALLOWED' in textarea footer component
|
|
12
|
+
- **bug-fixed**: departmentId and departmentName is incorrect in attributes
|
|
13
|
+
|
|
14
|
+
# 5.1.8
|
|
11
15
|
|
|
12
16
|
# 5.1.7-rc8
|
|
13
17
|
- **changed**: Updated the translations of the tooltips in the footer-component
|
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
|
|
@@ -1983,7 +1983,7 @@ export class GlobalSettingsService {
|
|
|
1983
1983
|
this.logger.debug('[GLOBAL-SET] setDepartment > setAttributes: ', JSON.stringify(attributes));
|
|
1984
1984
|
this.globals.setParameter('departmentSelected', department);
|
|
1985
1985
|
this.globals.setParameter('attributes', attributes);
|
|
1986
|
-
|
|
1986
|
+
this.appStorageService.setItem('attributes', JSON.stringify(attributes));
|
|
1987
1987
|
|
|
1988
1988
|
}
|
|
1989
1989
|
// ========= end:: GET DEPARTEMENTS ============//
|
|
@@ -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) {
|