@chat21/chat21-web-widget 5.0.89-rc.1 → 5.0.89

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +8 -3
  2. package/package.json +1 -1
  3. package/src/app/app.module.ts +2 -5
  4. package/src/app/component/conversation-detail/conversation/conversation.component.html +1 -0
  5. package/src/app/component/conversation-detail/conversation/conversation.component.ts +3 -1
  6. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +3 -14
  7. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +10 -26
  8. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +41 -123
  9. package/src/app/component/message/audio/audio.component.html +20 -0
  10. package/src/app/component/message/audio/audio.component.scss +122 -0
  11. package/src/app/component/message/{audio-track/audio-track.component.spec.ts → audio/audio.component.spec.ts} +6 -6
  12. package/src/app/component/message/audio/audio.component.ts +122 -0
  13. package/src/app/component/message/bubble-message/bubble-message.component.html +5 -30
  14. package/src/app/component/message/bubble-message/bubble-message.component.scss +0 -7
  15. package/src/app/component/message/bubble-message/bubble-message.component.ts +0 -1
  16. package/src/app/modals/confirm-close/confirm-close.component.html +6 -6
  17. package/src/app/modals/confirm-close/confirm-close.component.scss +14 -3
  18. package/src/app/modals/confirm-close/confirm-close.component.ts +19 -4
  19. package/src/app/utils/globals.ts +1 -1
  20. package/src/assets/twp/index-dev.html +0 -1
  21. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +0 -29
  22. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +0 -103
  23. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +0 -23
  24. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -96
  25. package/src/app/component/message/audio-track/audio-track.component.html +0 -32
  26. package/src/app/component/message/audio-track/audio-track.component.scss +0 -107
  27. package/src/app/component/message/audio-track/audio-track.component.ts +0 -147
@@ -0,0 +1,122 @@
1
+ #audio_container{
2
+ display: flex;
3
+ }
4
+
5
+ #play-icon,
6
+ #pause-icon {
7
+ margin: 20px 2.5% 10px 2.5%;
8
+ }
9
+
10
+ .time {
11
+ display: inline-block;
12
+ width: 37px;
13
+ text-align: center;
14
+ font-size: 20px;
15
+ margin: 28.5px 0 18.5px 0;
16
+ float: left;
17
+ }
18
+ output {
19
+ display: inline-block;
20
+ width: 32px;
21
+ text-align: center;
22
+ font-size: 20px;
23
+ margin: 10px 2.5% 0 5%;
24
+ float: left;
25
+ clear: left;
26
+ }
27
+
28
+ input[type="range"] {
29
+ position: relative;
30
+ -webkit-appearance: none;
31
+ width: 48%;
32
+ margin: 0;
33
+ padding: 0;
34
+ height: 19px;
35
+ margin: 30px 2.5% 20px 2.5%;
36
+ float: left;
37
+ outline: none;
38
+ }
39
+ input[type="range"]::-webkit-slider-runnable-track {
40
+ width: 100%;
41
+ height: 3px;
42
+ cursor: pointer;
43
+ background: linear-gradient(to right, rgba(0, 125, 181, 0.6) var(--buffered-width), rgba(0, 125, 181, 0.2) var(--buffered-width));
44
+ }
45
+ input[type="range"]::before {
46
+ position: absolute;
47
+ content: "";
48
+ top: 8px;
49
+ left: 0;
50
+ width: var(--seek-before-width);
51
+ height: 3px;
52
+ background-color: #007db5;
53
+ cursor: pointer;
54
+ }
55
+ input[type="range"]::-webkit-slider-thumb {
56
+ position: relative;
57
+ -webkit-appearance: none;
58
+ box-sizing: content-box;
59
+ border: 1px solid #007db5;
60
+ height: 15px;
61
+ width: 15px;
62
+ border-radius: 50%;
63
+ background-color: #fff;
64
+ cursor: pointer;
65
+ margin: -7px 0 0 0;
66
+ }
67
+ input[type="range"]:active::-webkit-slider-thumb {
68
+ transform: scale(1.2);
69
+ background: #007db5;
70
+ }
71
+ input[type="range"]::-moz-range-track {
72
+ width: 100%;
73
+ height: 3px;
74
+ cursor: pointer;
75
+ background: linear-gradient(to right, rgba(0, 125, 181, 0.6) var(--buffered-width), rgba(0, 125, 181, 0.2) var(--buffered-width));
76
+ }
77
+ input[type="range"]::-moz-range-progress {
78
+ background-color: #007db5;
79
+ }
80
+ input[type="range"]::-moz-focus-outer {
81
+ border: 0;
82
+ }
83
+ input[type="range"]::-moz-range-thumb {
84
+ box-sizing: content-box;
85
+ border: 1px solid #007db5;
86
+ height: 15px;
87
+ width: 15px;
88
+ border-radius: 50%;
89
+ background-color: #fff;
90
+ cursor: pointer;
91
+ }
92
+ input[type="range"]:active::-moz-range-thumb {
93
+ transform: scale(1.2);
94
+ background: #007db5;
95
+ }
96
+ input[type="range"]::-ms-track {
97
+ width: 100%;
98
+ height: 3px;
99
+ cursor: pointer;
100
+ background: transparent;
101
+ border: solid transparent;
102
+ color: transparent;
103
+ }
104
+ input[type="range"]::-ms-fill-lower {
105
+ background-color: #007db5;
106
+ }
107
+ input[type="range"]::-ms-fill-upper {
108
+ background: linear-gradient(to right, rgba(0, 125, 181, 0.6) var(--buffered-width), rgba(0, 125, 181, 0.2) var(--buffered-width));
109
+ }
110
+ input[type="range"]::-ms-thumb {
111
+ box-sizing: content-box;
112
+ border: 1px solid #007db5;
113
+ height: 15px;
114
+ width: 15px;
115
+ border-radius: 50%;
116
+ background-color: #fff;
117
+ cursor: pointer;
118
+ }
119
+ input[type="range"]:active::-ms-thumb {
120
+ transform: scale(1.2);
121
+ background: #007db5;
122
+ }
@@ -1,18 +1,18 @@
1
1
  import { ComponentFixture, TestBed } from '@angular/core/testing';
2
2
 
3
- import { AudioTrackComponent } from './audio-track.component';
3
+ import { AudioComponent } from './audio.component';
4
4
 
5
- describe('AudioTrackComponent', () => {
6
- let component: AudioTrackComponent;
7
- let fixture: ComponentFixture<AudioTrackComponent>;
5
+ describe('AudioComponent', () => {
6
+ let component: AudioComponent;
7
+ let fixture: ComponentFixture<AudioComponent>;
8
8
 
9
9
  beforeEach(async () => {
10
10
  await TestBed.configureTestingModule({
11
- declarations: [ AudioTrackComponent ]
11
+ declarations: [ AudioComponent ]
12
12
  })
13
13
  .compileComponents();
14
14
 
15
- fixture = TestBed.createComponent(AudioTrackComponent);
15
+ fixture = TestBed.createComponent(AudioComponent);
16
16
  component = fixture.componentInstance;
17
17
  fixture.detectChanges();
18
18
  });
@@ -0,0 +1,122 @@
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
2
+ // import lottieWeb from 'https://cdn.skypack.dev/lottie-web';
3
+
4
+ @Component({
5
+ selector: 'chat-audio',
6
+ templateUrl: './audio.component.html',
7
+ styleUrls: ['./audio.component.scss']
8
+ })
9
+ export class AudioComponent implements OnInit {
10
+
11
+ @Input() metadata: any;
12
+ @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
13
+
14
+ uidAudioPlayng: string = ''
15
+ divPlay: HTMLAudioElement
16
+ playState: HTMLElement
17
+ status: 'play' | 'pause' = 'play'
18
+
19
+ constructor(private elementRef: ElementRef) { }
20
+
21
+ ngOnInit() {
22
+ // this.divPlay = this.elementRef.nativeElement.querySelector('#audio_container').querySelector('#audio_msg')
23
+ // this.playState= this.elementRef.nativeElement.querySelector('#audio_container').querySelector('#duration')
24
+ }
25
+
26
+ onPlayPause(status: string){
27
+ // const divPlay = (<HTMLAudioElement>document.getElementById('audio_msg'));
28
+ if(status === 'play') {
29
+ this.divPlay.play();
30
+ this.status = 'pause'
31
+ } else {
32
+ this.divPlay.pause();
33
+ this.status = 'play'
34
+ }
35
+ }
36
+
37
+ pauseAudioMsg(e) {
38
+ try {
39
+ // stop all audio
40
+ if (this.uidAudioPlayng) {
41
+ const divPlay = (<HTMLAudioElement>document.getElementById(this.uidAudioPlayng));
42
+ divPlay.pause();
43
+ // console.log('> pausa: ', divPlay);
44
+ }
45
+ } catch (error) {
46
+ console.log('> Error is: ', error);
47
+ }
48
+
49
+ try {
50
+ // console.log(e.target.id);
51
+ if (this.uidAudioPlayng) {
52
+ this.uidAudioPlayng = '';
53
+ }
54
+ } catch (error) {
55
+ console.log('> Error is: ', error);
56
+ }
57
+ }
58
+
59
+ playAudioMsg(e) {
60
+ // stop all audio
61
+ if (this.uidAudioPlayng) {
62
+ const divPlay = (<HTMLAudioElement>document.getElementById(this.uidAudioPlayng));
63
+ divPlay.pause();
64
+ // console.log('> pausa: ', divPlay);
65
+ }
66
+ try {
67
+ // console.log(e.target.id);
68
+ // set uid audio playng
69
+ this.uidAudioPlayng = e.target.id;
70
+ } catch (error) {
71
+ console.log('> Error is: ', error);
72
+ }
73
+ }
74
+
75
+ updateTimeAudioMsg(ev){
76
+ var currTime = Math.floor(ev.target.currentTime);
77
+ var duration = Math.floor(ev.target.duration);
78
+
79
+ let minutes = 0;
80
+ if(currTime > 60){
81
+ minutes = Math.floor(currTime / 60);
82
+ }
83
+ const seconds = currTime - minutes * 60
84
+ // console.log('timeeee', minutes + ':' + seconds )
85
+ // this.playState.innerHTML = minutes + ':' + seconds
86
+ }
87
+
88
+
89
+
90
+ /**
91
+ *
92
+ * @param uid
93
+ */
94
+ playPausaAudioMsg(uid: string) {
95
+ // console.log('playPausaAudioMsg: ', uid);
96
+ const that = this;
97
+ try {
98
+ const divPause = (<HTMLAudioElement>document.getElementById(that.uidAudioPlayng));
99
+ const divPlay = (<HTMLAudioElement>document.getElementById(uid));
100
+ if (divPause) {
101
+ divPause.pause();
102
+ }
103
+
104
+ if (that.uidAudioPlayng === uid) {
105
+ that.uidAudioPlayng = '';
106
+ } else {
107
+ if (divPlay) {
108
+ setTimeout(function() {
109
+ // if (that.g.autoplay_activated) {
110
+ // divPlay.play();
111
+ // }
112
+ this.uidAudioPlayng = uid;
113
+ }, 300);
114
+ }
115
+ }
116
+
117
+ } catch (error) {
118
+ console.log('> Error is: ', error);
119
+ }
120
+ }
121
+
122
+ }
@@ -1,26 +1,9 @@
1
1
  <!-- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" -->
2
2
  <!-- ngStyle]="{'padding': (isImage(message) || isFrame(message))?'1px':'0 8px'}" -->
3
3
  <!-- 'width': (isImage(message) || isFrame(message))? sizeImage?.width + 'px': null -->
4
-
5
-
4
+ <div id="bubble-message" [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0 0px':'0 8px'}" class="messages primary-color">
5
+
6
6
 
7
- <!-- <div id="bubble-message" *ngIf="isAudio(message)" [ngStyle]="{'padding': '0'}" class="messages primary-color">
8
- <div>
9
- <chat-audio-track *ngIf="isAudio(message)"
10
- [metadata]="message.metadata"
11
- ></chat-audio-track>
12
- </div>
13
- </div>
14
-
15
-
16
- [ngStyle]="{'padding': (isImage(message) || isFrame(message) || isAudio(message))?'0 0px':'0 8px'}"
17
- -->
18
-
19
-
20
-
21
-
22
-
23
- <div id="bubble-message" class="messages primary-color">
24
7
  <div>
25
8
 
26
9
  <div *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && !isSameSender"
@@ -53,18 +36,10 @@
53
36
  (onElementRendered)="onElementRenderedFN($event)">
54
37
  </chat-frame>
55
38
 
56
- <!-- <chat-audio *ngIf="isAudio(message)"
39
+ <chat-audio *ngIf="isAudio(message)"
57
40
  [metadata]="message.metadata"
58
41
  (onElementRendered)="onElementRenderedFN($event)">
59
- </chat-audio> -->
60
-
61
- <chat-audio-track *ngIf="isAudio(message)"
62
- [metadata]="message.metadata"
63
- [color]="fontColor"
64
- [fontSize]="fontSize"
65
- [stylesMap]="stylesMap">
66
- </chat-audio-track>
67
-
42
+ </chat-audio>
68
43
 
69
44
  <!-- <chat-frame *ngIf="message.metadata && message.metadata.type && message.metadata.type.includes('video')"
70
45
  [metadata]="message.metadata"
@@ -76,7 +51,7 @@
76
51
  <!-- <div *ngIf="message.type == 'text'"> -->
77
52
 
78
53
  <!-- tooltip="{{message.timestamp | dateAgo}} ({{message.timestamp | date:'shortDate'}} {{message.timestamp | date:'HH:mm:ss'}})" placement="bottom" -->
79
- <div *ngIf="message?.text && !isAudio(message)" >
54
+ <div *ngIf="message?.text" >
80
55
 
81
56
  <!-- [htmlEnabled]="(message?.type==='html')? true : false" -->
82
57
  <chat-text *ngIf="message?.type !=='html'"
@@ -5,9 +5,6 @@
5
5
  border-radius: var(--border-radius-bubble-message);
6
6
  padding: 0;
7
7
  word-wrap: break-word;
8
-
9
- background: transparent;
10
-
11
8
  // padding: 14px;
12
9
  // padding: 6px 6px 6px 6px;
13
10
  // box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
@@ -29,8 +26,4 @@
29
26
  height: auto;
30
27
  object-fit: cover;
31
28
  }
32
-
33
- chat-audio-track {
34
- display: flex;
35
- }
36
29
  }
@@ -42,7 +42,6 @@ export class BubbleMessageComponent implements OnInit {
42
42
  constructor(public sanitizer: DomSanitizer) { }
43
43
 
44
44
  ngOnInit() {
45
- // console.log("---- > MSG:", this.message);
46
45
  }
47
46
 
48
47
  ngOnChanges() {
@@ -10,20 +10,20 @@
10
10
  </button>
11
11
  </div>
12
12
  <div class="content">
13
- <div class="text">Are you sure you wanna close this chat?</div>
13
+ <div class="text">{{ translationMap?.get('CONFIRM_CLOSE_CHAT') }}</div>
14
14
  <div class="options">
15
15
 
16
16
  <!-- BUTTON CANCEL-->
17
- <span class="v-align-center c21-label-button back-button" (click)="onBack()">
17
+ <span class="v-align-center c21-label-button back-button" [class.disabled]="isLoadingActive" (click)="onBack()">
18
18
  {{translationMap?.get('BACK')}}
19
19
  </span>
20
20
 
21
21
  <!-- BUTTON CLOSE-->
22
- <button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="onConfirm()" [ngStyle]="{'background-color': stylesMap?.get('themeColor'), 'border-color': stylesMap?.get('themeColor'), 'color': stylesMap?.get('themeForegroundColor') }">
23
- <span *ngIf="isLoadingActive" style="height: inherit; width: inherit;">
24
- <svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" with="25" height="25"
22
+ <button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="onConfirm()" [ngStyle]="{'background-color': stylesMap?.get('themeColor'), 'border-color': stylesMap?.get('themeColor'), 'color': stylesMap?.get('foregroundColor') }">
23
+ <span *ngIf="isLoadingActive" class="spinner-container">
24
+ <svg xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="25" height="25" [ngStyle]="{'fill': stylesMap?.get('foregroundColor') }"
25
25
  viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve">
26
- <path fill="#fff" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
26
+ <path fill="inherit" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50">
27
27
  <animateTransform
28
28
  attributeName="transform"
29
29
  attributeType="XML"
@@ -28,12 +28,23 @@
28
28
  }
29
29
 
30
30
  .back-button{
31
- color: #777777
31
+ color: #777777;
32
+
33
+ &.disabled{
34
+ cursor: not-allowed;
35
+ pointer-events: none;
36
+ opacity: 0.6
37
+ }
32
38
  }
33
39
 
34
- }
40
+ .spinner-container{
41
+ width: inherit;
42
+ height: inherit;
43
+ display: flex;
44
+ align-items: center;
45
+ }
35
46
 
36
-
47
+ }
37
48
  }
38
49
 
39
50
  .c21-header-button{
@@ -1,4 +1,6 @@
1
- import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
1
+ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, SimpleChange, SimpleChanges, ViewChild, OnDestroy } from '@angular/core';
2
+ import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
3
+ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
2
4
 
3
5
 
4
6
  @Component({
@@ -7,20 +9,33 @@ import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild }
7
9
  styleUrls: ['./confirm-close.component.scss']
8
10
  })
9
11
  export class ConfirmCloseComponent implements OnInit{
10
-
11
- isLoadingActive: boolean = false;
12
+
13
+ @Input() isLoadingActive: boolean;
14
+ @Input() conversationId: string;
12
15
 
13
16
  @Input() translationMap: Map< string, string>;
14
17
  @Input() stylesMap: Map<string, string>;
15
18
  @Output() onDiaglogClosed = new EventEmitter<{type: string, data: any}>();
16
19
 
20
+ private logger: LoggerService = LoggerInstance.getInstance();
17
21
  constructor() { }
18
22
 
19
23
  ngOnInit(): void {
20
- console.log('[CONFIRM CLOSE MODAL] onInit');
24
+ this.logger.log('[CONFIRM CLOSE MODAL] onInit', this.isLoadingActive, this.stylesMap);
21
25
  // this.dialog.showModal();
22
26
  }
23
27
 
28
+ ngOnChanges(changes: SimpleChanges){
29
+ if(changes &&
30
+ changes['conversationId'] &&
31
+ changes['conversationId'].previousValue !== undefined &&
32
+ (changes['conversationId'].previousValue !== changes['conversationId'].currentValue) &&
33
+ changes['conversationId'].currentValue
34
+ ){
35
+ this.isLoadingActive = false;
36
+ }
37
+ }
38
+
24
39
  ngAfterViewInit(){
25
40
  }
26
41
 
@@ -388,7 +388,7 @@ export class Globals {
388
388
  /**enable user to set a facebook messanger page to chat with */
389
389
  this.telegramUsername = ''
390
390
  /**enable user to set a telegram number to chat with */
391
- this.fileUploadAccept = "image/*,.pdf,.txt,.mp3"
391
+ this.fileUploadAccept = "image/*,.pdf,.txt"
392
392
  /**enable auto disconnect from messaging after a defined amount of time (s)*/
393
393
  this.disconnetTime = 0
394
394
 
@@ -131,7 +131,6 @@
131
131
  display: -webkit-box;
132
132
  max-height: 258px; /* Fallback for non-webkit */
133
133
  line-height: 2.3;
134
- line-clamp: 8;
135
134
  -webkit-line-clamp: 8;
136
135
  -webkit-box-orient: vertical;
137
136
  overflow: hidden;
@@ -1,29 +0,0 @@
1
- <div class="audio-recorder">
2
- <button *ngIf="audioUrl" (click)="deleteRecording()">
3
- <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>
4
- <!-- <i class="material-icons">delete_outline</i> -->
5
- </button>
6
-
7
- <chat-audio-track *ngIf="audioBlob && audioUrl"
8
- [audioBlob] = "audioBlob"
9
- [color]="stylesMap.get('themeColor')"
10
- [fontSize]="stylesMap.get('fontSize')"
11
- [stylesMap]="stylesMap">
12
- </chat-audio-track>
13
-
14
- <button *ngIf="!audioUrl" class="mic-button" (mousedown)="startRecording()" (mouseup)="stopRecording()">
15
- <svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px">
16
- <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"/>
17
- </svg>
18
- </button>
19
- <!-- <button *ngIf="isRecording" (click)="stopRecording()"><i class="material-icons">pause_circle_outline</i></button> -->
20
-
21
- <button *ngIf="audioUrl" (click)="sendMessage()">
22
- <span class="v-align-center">
23
- <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">
24
- <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"/>
25
- </svg>
26
- </span>
27
- </button>
28
-
29
- </div>
@@ -1,103 +0,0 @@
1
-
2
- @font-face {
3
- font-family: 'Material Icons';
4
- src: url('https://fonts.googleapis.com/icon?family=Material+Icons');
5
- }
6
-
7
- .material-icons.mic_none::before {
8
- content: 'mic_none';
9
- }
10
-
11
- .audio-recorder {
12
- text-align: center;
13
- margin: 0px;
14
- display: inline-flex;
15
- align-items: center;
16
- justify-content: center;
17
- height: 100%;
18
- width: 100%;
19
- float: left;
20
- gap: 10px
21
- }
22
-
23
- chat-audio-track {
24
- display: flex;
25
- width: 70%;
26
- margin: 8px 0;
27
- pointer-events: auto;
28
- border-radius: var(--chat-footer-border-radius);
29
- background-color: var(--chat-footer-background-color);
30
- }
31
-
32
- button {
33
- margin: 0px;
34
- padding: 0px;
35
- font-size: 16px;
36
- border: none;
37
- background-color: transparent;
38
- color: var(--icon-fill-color);
39
- fill: var(--icon-fill-color);
40
- height: var(--chat-footer-height);
41
- }
42
-
43
- .mic-button {
44
- position: relative;
45
- background-color: transparent;
46
- border: none;
47
- outline: none;
48
- cursor: pointer;
49
- padding: 20px;
50
- border-radius: 50%;
51
- overflow: hidden;
52
- display: inline-flex;
53
- justify-content: center;
54
- align-items: center;
55
- }
56
-
57
- .mic-button svg {
58
- width: 24px;
59
- height: 24px;
60
- fill: var(--icon-fill-color);
61
- }
62
-
63
- .mic-button::before {
64
- content: '';
65
- position: absolute;
66
- top: auto;
67
- left: auto;
68
- width: 35px;
69
- height: 35px;
70
- background-color: var(--icon-fill-color);
71
- border-radius: 50%;
72
- transform: scale(0);
73
- transition: transform 0.3s ease;
74
- transform-origin: center;
75
- z-index: -1;
76
- }
77
-
78
- .mic-button:active::before {
79
- transform: scale(0.5);
80
- animation: pulse 1s infinite ease-in-out;
81
- }
82
-
83
- .mic-button:active {
84
- svg {
85
- color: #fff;
86
- fill: #fff;
87
- }
88
- }
89
-
90
- @keyframes pulse {
91
- 0% {
92
- transform: scale(1);
93
- opacity: 1;
94
- }
95
- 50% {
96
- transform: scale(0.9);
97
- opacity: 0.7;
98
- }
99
- 100% {
100
- transform: scale(1);
101
- opacity: 1;
102
- }
103
- }
@@ -1,23 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { ConversationAudioRecorderComponent } from './conversation-audio-recorder.component';
4
-
5
- describe('AudioRecorderComponent', () => {
6
- let component: ConversationAudioRecorderComponent;
7
- let fixture: ComponentFixture<ConversationAudioRecorderComponent>;
8
-
9
- beforeEach(async () => {
10
- await TestBed.configureTestingModule({
11
- declarations: [ ConversationAudioRecorderComponent ]
12
- })
13
- .compileComponents();
14
-
15
- fixture = TestBed.createComponent(ConversationAudioRecorderComponent);
16
- component = fixture.componentInstance;
17
- fixture.detectChanges();
18
- });
19
-
20
- it('should create', () => {
21
- expect(component).toBeTruthy();
22
- });
23
- });