@chat21/chat21-web-widget 5.0.85-rc.2 → 5.0.86

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 (31) hide show
  1. package/CHANGELOG.md +1 -19
  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.ts +15 -14
  5. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +3 -14
  6. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +10 -26
  7. package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +77 -168
  8. package/src/app/component/message/audio/audio.component.html +20 -0
  9. package/src/app/component/message/audio/audio.component.scss +122 -0
  10. package/src/app/component/message/{audio-track/audio-track.component.spec.ts → audio/audio.component.spec.ts} +6 -6
  11. package/src/app/component/message/audio/audio.component.ts +122 -0
  12. package/src/app/component/message/bubble-message/bubble-message.component.html +15 -31
  13. package/src/app/component/message/bubble-message/bubble-message.component.scss +0 -7
  14. package/src/app/component/message/bubble-message/bubble-message.component.ts +0 -1
  15. package/src/app/modals/confirm-close/confirm-close.component.html +1 -1
  16. package/src/app/utils/globals.ts +1 -1
  17. package/src/app/utils/utils.ts +0 -45
  18. package/src/assets/twp/blank.html +6 -3
  19. package/src/assets/twp/chatbot-panel.html +13 -5
  20. package/src/assets/twp/index-dev.html +15 -8
  21. package/src/assets/twp/index.html +13 -7
  22. package/src/assets/twp/tiledesk_widget_files/bootstrap.min.css +3 -4
  23. package/src/assets/twp/tiledesk_widget_files/bootstrap.min.js +4 -3
  24. package/src/assets/twp/tiledesk_widget_files/jquery.min.js +2 -2
  25. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +0 -29
  26. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +0 -103
  27. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.spec.ts +0 -23
  28. package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.ts +0 -96
  29. package/src/app/component/message/audio-track/audio-track.component.html +0 -32
  30. package/src/app/component/message/audio-track/audio-track.component.scss +0 -107
  31. package/src/app/component/message/audio-track/audio-track.component.ts +0 -147
package/CHANGELOG.md CHANGED
@@ -6,28 +6,10 @@
6
6
  ### **Copyrigth**:
7
7
  *Tiledesk SRL*
8
8
 
9
- # 5.0.85-rc.2
10
- - **added**: loading progress indicator while closing a conversation
11
-
12
- # 5.0.85-rc.1
13
- - **added**: hide header restart menu option if conversation is closed
14
- - **removed**: continueConversationBeforeTime settings property
9
+ # 5.0.86 in PROD
15
10
 
16
11
  # 5.0.85 in PROD
17
12
 
18
- # 5.0.84-rc.4
19
- - **added**: checkAcceptedFile fn on dragleave event conversation-content component
20
- - **added**: checkAcceptedFile fn in conversation-footer component
21
-
22
- # 5.0.84-rc.3
23
- - **changed**: index-dev lib order import
24
-
25
- # 5.0.84-rc.2
26
- - **changed**: bootstrap, jquery and font-awesome libs
27
-
28
- # 5.0.84-rc.1
29
- - **removed**: innerHtml from document element
30
-
31
13
  # 5.0.83 in PROD
32
14
 
33
15
  # 5.0.83-rc.4
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.85-rc.2",
4
+ "version": "5.0.86",
5
5
  "license": "MIT",
6
6
  "homepage": "https://www.tiledesk.com",
7
7
  "repository": {
@@ -15,7 +15,6 @@ import { ConversationContentComponent } from './component/conversation-detail/co
15
15
  import { ConversationFooterComponent } from './component/conversation-detail/conversation-footer/conversation-footer.component';
16
16
  import { ConversationInternalFrameComponent } from './component/conversation-detail/conversation-internal-frame/conversation-internal-frame.component';
17
17
  import { ConversationPreviewComponent } from './component/conversation-detail/conversation-preview/conversation-preview.component';
18
- import { ConversationAudioRecorderComponent } from './component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component';
19
18
  /** CONVERSATION-DETAIL COMPONENTS */
20
19
  import { BubbleMessageComponent } from './component/message/bubble-message/bubble-message.component';
21
20
  import { AvatarComponent } from './component/message/avatar/avatar.component';
@@ -24,7 +23,7 @@ import { ImageComponent } from './component/message/image/image.component';
24
23
  import { InfoMessageComponent } from './component/message/info-message/info-message.component';
25
24
  import { HtmlComponent } from './component/message/html/html.component';
26
25
  import { FrameComponent } from './component/message/frame/frame.component';
27
- import { AudioTrackComponent } from './component/message/audio-track/audio-track.component';
26
+ import { AudioComponent } from './component/message/audio/audio.component';
28
27
  import { UserTypingComponent } from './../chat21-core/utils/user-typing/user-typing.component';
29
28
  /** MESSAGE ATTACHMENTS COMPONENTS */
30
29
  import { MessageAttachmentComponent } from './component/message-attachment/message-attachment.component';
@@ -139,7 +138,6 @@ import { ConfirmCloseComponent } from './modals/confirm-close/confirm-close.comp
139
138
 
140
139
 
141
140
 
142
-
143
141
  const appInitializerFn = (appConfig: AppConfigService, brandService: BrandService, logger: NGXLogger) => {
144
142
  return async() => {
145
143
  let customLogger = new CustomLogger(logger)
@@ -278,7 +276,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
278
276
  ConversationFooterComponent,
279
277
  ConversationPreviewComponent,
280
278
  ConversationInternalFrameComponent,
281
- ConversationAudioRecorderComponent,
282
279
  BubbleMessageComponent,
283
280
  AvatarComponent,
284
281
  FrameComponent,
@@ -290,7 +287,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
290
287
  ActionButtonComponent,
291
288
  LinkButtonComponent,
292
289
  TextButtonComponent,
293
- AudioTrackComponent,
294
290
  UserTypingComponent,
295
291
  /**DIRECTIVES */
296
292
  HtmlEntitiesEncodePipe,
@@ -299,6 +295,7 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
299
295
  SafeHtmlPipe,
300
296
  LikeUnlikeComponent,
301
297
  TooltipDirective,
298
+ AudioComponent,
302
299
  CarouselComponent,
303
300
  NetworkOfflineComponent,
304
301
  ConfirmCloseComponent
@@ -39,7 +39,6 @@ import { CustomTranslateService } from 'src/chat21-core/providers/custom-transla
39
39
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
40
40
  import { TiledeskRequestsService } from 'src/chat21-core/providers/tiledesk/tiledesk-requests.service';
41
41
  import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
42
- import { checkAcceptedFile } from 'src/app/utils/utils';
43
42
  // import { TranslateService } from '@ngx-translate/core';
44
43
 
45
44
  @Component({
@@ -1347,32 +1346,34 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
1347
1346
  var mimeType = fileList[0].type
1348
1347
  this.logger.log('[CONV-COMP] ----> FILE - DROP mimeType files ', mimeType)
1349
1348
 
1349
+ // if (mimeType.startsWith("image") || mimeType.startsWith("application")) {
1350
+ // this.logger.log('[CONV-COMP] ----> FILE - DROP mimeType files: ', this.appConfigProvider.getConfig().fileUploadAccept);
1351
+ // this.checkAcceptedFile(mimeType);
1352
+ // const isAccepted = this.checkAcceptedFile(mimeType)
1353
+ // this.logger.log('[CONV-COMP] > checkAcceptedFile - fileUploadAccept isAcceptFile FILE - DROP',isAccepted)
1354
+ // if (isAccepted === true) {
1350
1355
  this.dropEvent = event
1356
+ // } else {
1357
+ // this.logger.log( '[CONV-COMP] ----> FILE - DROP mimeType files ', mimeType,'NOT SUPPORTED FILE TYPE')
1358
+ // this.presentToast(this.translationsMap.get('FAILED_TO_UPLOAD_THE_FORMAT_IS_NOT_SUPPORTED'), 'danger','toast-custom-class', 5000 )
1359
+ // // this.presentToastOnlyImageFilesAreAllowedToDrag()
1360
+ // }
1351
1361
 
1352
1362
  }
1353
1363
  }
1354
1364
 
1355
1365
  allowDrop(event: any) {
1356
- event.preventDefault();
1357
- event.stopPropagation();
1366
+ event.preventDefault()
1367
+ event.stopPropagation()
1358
1368
  this.logger.log('[CONV-COMP] ----> FILE - (dragover) allowDrop ev ', event)
1359
1369
  this.isHovering = true
1360
1370
  }
1361
1371
 
1362
1372
  drag(event){
1363
- event.preventDefault();
1364
- this.logger.log('[CONV-COMP] ----> FILE - (dragleave) drag ev ', event)
1365
- if (event.dataTransfer && event.dataTransfer.files) {
1366
- const files = event.dataTransfer.files;
1367
- const canUploadFile = checkAcceptedFile(files[0].type, this.appConfigService.getConfig().fileUploadAccept)
1368
- if(!canUploadFile){
1369
- this.logger.error('[IMAGE-UPLOAD] detectFiles: can not upload current file type--> NOT ALLOWED', this.appConfigService.getConfig().fileUploadAccept)
1370
- return;
1371
- }
1372
- }
1373
+ event.preventDefault()
1373
1374
  event.stopPropagation()
1375
+ console.log('dragleave-->', event)
1374
1376
  this.isHovering = false
1375
1377
  }
1376
1378
 
1377
1379
  }
1378
-
@@ -7,7 +7,7 @@
7
7
  <!-- TEXTAREA + ICONS: conv active-->
8
8
  <div class="textarea-container" *ngIf="!hideTextAreaContent && !hideTextReply">
9
9
 
10
- <div *ngIf="!isStopRec" class="icons-container">
10
+ <div class="icons-container">
11
11
  <!-- ICON ATTACHMENT -->
12
12
  <label *ngIf="showAttachmentButton == true" tabindex="1502" aria-label="allegati" for="chat21-file" class="chat21-textarea-button" [class.active]="!isFilePendingToUpload && !hideTextReply" id="chat21-start-upload-doc">
13
13
  <span class="v-align-center">
@@ -44,7 +44,7 @@
44
44
 
45
45
 
46
46
 
47
- <div *ngIf="!isStopRec" class="visible-text-area" [class.disabled] = "( isConversationArchived || hideTextReply)? true : null">
47
+ <div class="visible-text-area" [class.disabled] = "( isConversationArchived || hideTextReply)? true : null">
48
48
  <!-- isFilePendingToUpload || -->
49
49
  <textarea
50
50
  [attr.disabled] = "(hideTextReply)? true : null"
@@ -67,24 +67,13 @@
67
67
  </div>
68
68
 
69
69
  <!-- ICON SEND -->
70
- <div *ngIf="textInputTextArea && !isStopRec" tabindex="-1" class="chat21-textarea-button" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
70
+ <div tabindex="-1" class="chat21-textarea-button" [class.active]="textInputTextArea && !hideTextReply" id="chat21-button-send" (click)="onSendPressed($event)">
71
71
  <span class="v-align-center">
72
72
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="24" width="24" viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve">
73
73
  <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"/>
74
74
  </svg>
75
75
  </span>
76
76
  </div>
77
-
78
- <!-- ICON REC -->
79
- <div *ngIf="!textInputTextArea" tabindex="-1" class="chat21-audio-button" [class.active]="isStopRec" id="chat21-button-rec">
80
- <chat-audio-recorder
81
- (startRecordingEvent)="onStartRecording()"
82
- (deleteRecordingEvent)="onDeleteRecording()"
83
- (endRecordingEvent)="onEndRecording($event)"
84
- (sendRecordingEvent)="onSendRecording($event)"
85
- [stylesMap]="stylesMap">
86
- </chat-audio-recorder>
87
- </div>
88
77
  </div>
89
78
 
90
79
 
@@ -7,16 +7,14 @@
7
7
  display: flex;
8
8
  width: 100%;
9
9
  align-items: center;
10
- gap: 0px;
10
+ gap: 10px;
11
11
  justify-content: space-between;
12
12
  }
13
13
 
14
14
  .icons-container{
15
15
  display: flex;
16
16
  align-self: flex-end;
17
- margin-left: 8px;
18
- gap: 2px;
19
- margin-right: 8px;
17
+ margin-left: 8px
20
18
  }
21
19
 
22
20
  .visible-text-area {
@@ -33,6 +31,7 @@
33
31
  .chat21-textarea-button {
34
32
  fill: var(--icon-fill-color);
35
33
  pointer-events: auto;
34
+
36
35
  height: var(--chat-footer-height);
37
36
  bottom: 22px;
38
37
  opacity: 0.3;
@@ -186,29 +185,11 @@ textarea:active{
186
185
  }
187
186
 
188
187
  #chat21-button-send {
188
+ // right: 8px;
189
+ // bottom: 0;
189
190
  display: flex;
190
191
  align-self: flex-end;
191
- margin: 0 8px;
192
- width: 34px;
193
- text-align: center;
194
- justify-content: center;
195
- }
196
-
197
- #chat21-button-rec {
198
- display: flex;
199
- width: 34px;
200
- text-align: center;
201
- justify-content: center;
202
- height: var(--chat-footer-height);
203
- &.active{
204
- width: 100%;
205
- }
206
- chat-audio-recorder {
207
- width: 100%;
208
- display: flex;
209
- align-items: center;
210
- justify-content: center;
211
- }
192
+ margin: 0 8px
212
193
  }
213
194
 
214
195
  #chat21-file{
@@ -356,4 +337,7 @@ textarea:active{
356
337
  // left: 10px;
357
338
  border: none;
358
339
  margin: -2px -2px 0px;
359
- }
340
+
341
+ }
342
+
343
+