@chat21/chat21-web-widget 5.0.94-rc6 → 5.0.94

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,11 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
+ # 5.0.94
10
+
11
+ # 5.0.94-rc7
12
+ - **added**: touchstart and touchend events for mobile mic footer button
13
+
9
14
  # 5.0.94-rc6
10
15
  - **bug-fixed**: logoChat is not rendered if contains special characters (ex. "(" or ")" ) in the name of the resource
11
16
 
package/angular.json CHANGED
@@ -39,7 +39,8 @@
39
39
  "src/environments/real_data/widget-config-mqtt.json",
40
40
  "src/environments/real_data/widget-config-docker.json",
41
41
  "src/environments/real_data/widget-config-native-mqtt.json",
42
- "src/environments/real_data/widget-config-native-prod.json"
42
+ "src/environments/real_data/widget-config-native-prod.json",
43
+ "src/environments/real_data/widget-config-aws-stage.json"
43
44
  ],
44
45
  "styles": [
45
46
  "src/app/sass/styles.scss"
package/deploy_prod.sh CHANGED
@@ -4,9 +4,18 @@ ECHO "____________WIDGET-V5______________"
4
4
  echo "CREATING TAG ON GIT FOR version: $version"
5
5
  # echo "version $version"
6
6
 
7
+ # Get curent branch name
8
+ current_branch=$(git rev-parse --abbrev-ref HEAD)
9
+ remote_name=$(git config --get branch.$current_branch.remote)
10
+
11
+ ## Push commit to git
12
+ git add .
13
+ git commit -m "version added: ### $version"
14
+ git push "$remote_name" "$current_branch"
15
+
7
16
  if [ "$version" != "" ]; then
8
17
  git tag -a "$version" -m "`git log -1 --format=%s`"
9
18
  echo "Created a new tag, $version"
10
- git push remoteTiledesk --tags
19
+ git push --tags
11
20
  npm publish
12
21
  fi
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.0.94-rc6",
4
+ "version": "5.0.94",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -1,31 +1,31 @@
1
1
  <div class="audio-recorder">
2
- <button *ngIf="audioUrl" (click)="deleteRecording()">
3
- <span class="v-align-center">
4
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm80-160h80v-360h-80v360Zm160 0h80v-360h-80v360Z"/></svg>
5
- <!-- <i class="material-icons">delete_outline</i> -->
6
- </span>
7
- </button>
2
+ <button *ngIf="audioUrl" (click)="deleteRecording()">
3
+ <span class="v-align-center">
4
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm80-160h80v-360h-80v360Zm160 0h80v-360h-80v360Z"/></svg>
5
+ <!-- <i class="material-icons">delete_outline</i> -->
6
+ </span>
7
+ </button>
8
8
 
9
- <chat-audio class="test" *ngIf="audioBlob && audioUrl"
10
- [audioBlob] = "audioBlob"
11
- [color]="'var(--chat-footer-color)'"
12
- [fontSize]="stylesMap.get('fontSize')"
13
- [stylesMap]="stylesMap">
14
- </chat-audio>
15
-
16
- <button *ngIf="!audioUrl" class="mic-button" (mousedown)="startRecording()" (mouseup)="stopRecording()">
17
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px">
18
- <path d="M480-400q-50 0-85-35t-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35Zm0-240Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm40-360q17 0 28.5-11.5T520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480Z"/>
19
- </svg>
20
- </button>
21
- <!-- <button *ngIf="isRecording" (click)="stopRecording()"><i class="material-icons">pause_circle_outline</i></button> -->
9
+ <chat-audio class="test" *ngIf="audioBlob && audioUrl"
10
+ [audioBlob] = "audioBlob"
11
+ [color]="'var(--chat-footer-color)'"
12
+ [fontSize]="stylesMap.get('fontSize')"
13
+ [stylesMap]="stylesMap">
14
+ </chat-audio>
22
15
 
23
- <button *ngIf="audioUrl" (click)="sendMessage()">
24
- <span class="v-align-center">
25
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="20" width="24" viewBox="0 0 24 20" xml:space="preserve">
26
- <path d="M1.8,18.9V1.7L22,10.3L1.8,18.9z M3.9,15.6l12.6-5.4L3.9,4.9v3.7l6.4,1.6l-6.4,1.6V15.6z M3.9,15.6V4.9v7V15.6z"/>
27
- </svg>
28
- </span>
29
- </button>
16
+ <button *ngIf="!audioUrl" class="mic-button" (mousedown)="startRecording($event)" (mouseup)="stopRecording($event)" (touchstart)="startRecording($event)" (touchend)="stopRecording($event)">
17
+ <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px">
18
+ <path d="M480-400q-50 0-85-35t-35-85v-240q0-50 35-85t85-35q50 0 85 35t35 85v240q0 50-35 85t-85 35Zm0-240Zm-40 520v-123q-104-14-172-93t-68-184h80q0 83 58.5 141.5T480-320q83 0 141.5-58.5T680-520h80q0 105-68 184t-172 93v123h-80Zm40-360q17 0 28.5-11.5T520-520v-240q0-17-11.5-28.5T480-800q-17 0-28.5 11.5T440-760v240q0 17 11.5 28.5T480-480Z"/>
19
+ </svg>
20
+ </button>
21
+ <!-- <button *ngIf="isRecording" (click)="stopRecording()"><i class="material-icons">pause_circle_outline</i></button> -->
22
+
23
+ <button *ngIf="audioUrl" (click)="sendMessage()">
24
+ <span class="v-align-center">
25
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="20" width="24" viewBox="0 0 24 20" xml:space="preserve">
26
+ <path d="M1.8,18.9V1.7L22,10.3L1.8,18.9z M3.9,15.6l12.6-5.4L3.9,4.9v3.7l6.4,1.6l-6.4,1.6V15.6z M3.9,15.6V4.9v7V15.6z"/>
27
+ </svg>
28
+ </span>
29
+ </button>
30
30
 
31
31
  </div>
@@ -29,8 +29,12 @@ export class ConversationAudioRecorderComponent {
29
29
  constructor(private sanitizer: DomSanitizer) {}
30
30
 
31
31
 
32
- startRecording() {
32
+ startRecording(event: Event) {
33
33
  // console.log('startRecording');
34
+ if (event.type === 'touchstart') {
35
+ event.preventDefault(); // Blocca il successivo mousedown
36
+ }
37
+
34
38
  this.startTime = Date.now();
35
39
  navigator.mediaDevices.getUserMedia({ audio: true })
36
40
  .then(stream => {
@@ -55,7 +59,12 @@ export class ConversationAudioRecorderComponent {
55
59
  });
56
60
  }
57
61
 
58
- stopRecording() {
62
+ stopRecording(event: Event) {
63
+
64
+ if (event.type === 'touchend') {
65
+ event.preventDefault(); // Previene il mouseup successivo
66
+ }
67
+
59
68
  let endTime = Date.now();
60
69
  let time = endTime - this.startTime;
61
70
  if(time > 500){