@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 CHANGED
@@ -6,8 +6,12 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
- # 5.1.7-rc9
10
- - **removed**: 'DOMAIN_NOT_ALLOWED' in textarea footer component
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-web-widget",
3
3
  "author": "Tiledesk SRL",
4
- "version": "5.1.7-rc9",
4
+ "version": "5.1.8-ar",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -1441,5 +1441,4 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1441
1441
  this.isHovering = false
1442
1442
  }
1443
1443
 
1444
- }
1445
-
1444
+ }
@@ -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.project && this.project.settings?.allow_send_emoji === false){
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
- // this.appStorageService.setItem('attributes', JSON.stringify(attributes));
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
- return true;
339
- } else {
340
- return false;
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) {