@chat21/chat21-ionic 3.4.19-rc1 → 3.4.19-rc2
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
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
### **Copyrigth**:
|
|
9
9
|
*Tiledesk SRL*
|
|
10
10
|
|
|
11
|
+
# 3.4.19-rc2
|
|
12
|
+
- **bug-fixed**: minor fix on ion-texarea element with allowed url domain
|
|
13
|
+
|
|
11
14
|
# 3.4.19-rc1
|
|
12
15
|
- added: ability to check for if emoji is allowd to be sent in message textarea
|
|
13
16
|
- added: ability to check for if url domain is allowd to be sent in message textarea
|
package/package.json
CHANGED
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html
CHANGED
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
</ion-textarea>
|
|
142
142
|
</div>
|
|
143
143
|
<div class="buttons-right">
|
|
144
|
-
<ion-button [disabled]="conversationEnabled === false" class="send-button right active" ion-button fill="clear"
|
|
144
|
+
<ion-button [disabled]="(conversationEnabled === false || showAlertEmoji || showAlertUrl )" class="send-button right active" ion-button fill="clear"
|
|
145
145
|
(click)="sendMessage(messageString)">
|
|
146
146
|
<ion-icon
|
|
147
147
|
[ngClass]="{'send-msg-disabled': conversationEnabled === false,'send-msg-activated': conversationEnabled === true }"
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -504,6 +504,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
504
504
|
this.conversationEnabled = false;
|
|
505
505
|
}
|
|
506
506
|
|
|
507
|
+
this.showAlertEmoji= false;
|
|
508
|
+
this.showAlertUrl = false;
|
|
507
509
|
let check = this.checkForEmojii(e.detail.value)
|
|
508
510
|
if(!check){
|
|
509
511
|
return;
|
|
@@ -623,14 +625,15 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
|
|
|
623
625
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage text', text);
|
|
624
626
|
this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] sendMessage conve width', this.conversationWith);
|
|
625
627
|
// text.replace(/\s/g, "")
|
|
626
|
-
this.messageString = '';
|
|
627
|
-
// text = text.replace(/(\r\n|\n|\r)/gm, '');
|
|
628
|
-
|
|
629
628
|
let checkUrlDomain = this.checkForUrlDomain(text)
|
|
630
629
|
if(!checkUrlDomain){
|
|
631
630
|
return
|
|
632
631
|
}
|
|
633
632
|
|
|
633
|
+
this.messageString = '';
|
|
634
|
+
// text = text.replace(/(\r\n|\n|\r)/gm, '');
|
|
635
|
+
|
|
636
|
+
|
|
634
637
|
if (text && text.trim() !== '') {
|
|
635
638
|
this.eventSendMessage.emit({ msg: text, type: TYPE_MSG_TEXT, metadata: null, attributes: null });
|
|
636
639
|
}
|