@chat21/chat21-ionic 3.0.79-rc.1 → 3.0.79-rc.3

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 (83) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +1 -0
  3. package/env.sample +1 -0
  4. package/package.json +1 -1
  5. package/src/app/app.component.html +7 -1
  6. package/src/app/app.component.scss +16 -1
  7. package/src/app/app.component.ts +182 -11
  8. package/src/app/app.module.ts +3 -1
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +37 -12
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +55 -50
  11. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +24 -0
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +0 -18
  13. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +1 -10
  14. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -22
  15. package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
  16. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +1 -0
  17. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +1 -2
  18. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +8 -5
  19. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -5
  20. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +3 -82
  21. package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +1 -1
  22. package/src/app/components/navbar/navbar.component.html +103 -0
  23. package/src/app/components/navbar/navbar.component.scss +249 -0
  24. package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
  25. package/src/app/components/navbar/navbar.component.ts +189 -0
  26. package/src/app/components/project-item/project-item.component.ts +11 -1
  27. package/src/app/pages/contacts-directory/contacts-directory.page.scss +1 -1
  28. package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
  29. package/src/app/pages/conversation-detail/conversation-detail.page.ts +71 -2
  30. package/src/app/pages/conversations-list/conversations-list.page.scss +1 -0
  31. package/src/app/pages/conversations-list/conversations-list.page.ts +51 -22
  32. package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
  33. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
  34. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
  35. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
  36. package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
  37. package/src/app/services/projects/projects.service.spec.ts +12 -0
  38. package/src/app/services/projects/projects.service.ts +43 -0
  39. package/src/app/services/tiledesk/tiledesk.service.ts +1 -25
  40. package/src/app/shared/shared.module.ts +3 -12
  41. package/src/assets/i18n/ar.json +10 -2
  42. package/src/assets/i18n/az.json +9 -1
  43. package/src/assets/i18n/de.json +10 -2
  44. package/src/assets/i18n/en.json +10 -2
  45. package/src/assets/i18n/es.json +10 -2
  46. package/src/assets/i18n/fr.json +9 -1
  47. package/src/assets/i18n/it.json +9 -1
  48. package/src/assets/i18n/kk.json +10 -2
  49. package/src/assets/i18n/pt.json +10 -2
  50. package/src/assets/i18n/ru.json +9 -1
  51. package/src/assets/i18n/sr.json +277 -269
  52. package/src/assets/i18n/sv.json +10 -2
  53. package/src/assets/i18n/tr.json +10 -2
  54. package/src/assets/i18n/uk.json +10 -2
  55. package/src/assets/i18n/uz.json +9 -1
  56. package/src/assets/sounds/wheep-wheep.mp3 +0 -0
  57. package/src/chat-config-mqtt-localhost.json +1 -0
  58. package/src/chat-config-native-mqtt.json +1 -0
  59. package/src/chat-config-pre.json +2 -1
  60. package/src/chat-config-template.json +1 -0
  61. package/src/chat-config.json +1 -0
  62. package/src/chat21-core/models/conversation.ts +0 -1
  63. package/src/chat21-core/models/projects.ts +27 -0
  64. package/src/chat21-core/utils/constants.ts +1 -1
  65. package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
  66. package/src/global.scss +1 -13
  67. package/src/index.html +6 -47
  68. package/src/variables.scss +5 -2
  69. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
  70. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
  71. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
  72. package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
  73. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
  74. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
  75. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
  76. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
  77. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
  78. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
  79. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
  80. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
  81. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
  82. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
  83. package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
@@ -1,3 +1,4 @@
1
+ import { MessageModel } from 'src/chat21-core/models/message';
1
2
  import { ConversationContentComponent } from '../conversation-content/conversation-content.component';
2
3
  import { ChangeDetectorRef, Component, Input, OnInit, Output, EventEmitter, SimpleChange, SimpleChanges } from '@angular/core';
3
4
 
@@ -13,6 +14,8 @@ import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk
13
14
  import { TranslateService } from '@ngx-translate/core';
14
15
  import * as moment from 'moment';
15
16
  import { AppConfigProvider } from 'src/app/services/app-config';
17
+ import { ModalController } from '@ionic/angular';
18
+ import { CreateCannedResponsePage } from 'src/app/pages/create-canned-response/create-canned-response.page';
16
19
  @Component({
17
20
  selector: 'ion-conversation-detail',
18
21
  templateUrl: './ion-conversation-detail.component.html',
@@ -61,6 +64,7 @@ export class IonConversationDetailComponent extends ConversationContentComponent
61
64
  public tiledeskAuthService: TiledeskAuthService,
62
65
  private translate: TranslateService,
63
66
  public appConfigProvider: AppConfigProvider,
67
+ public modalController: ModalController,
64
68
  ) {
65
69
  super(cdref, uploadService)
66
70
 
@@ -160,4 +164,24 @@ export class IonConversationDetailComponent extends ConversationContentComponent
160
164
  // console.log('[CONVS-DETAIL][ION-CONVS-DETAIL] - trackByFn item', item)
161
165
  return item.uid || index;
162
166
  }
167
+
168
+
169
+ async presentCreateCannedResponseModal(message: MessageModel): Promise<any> {
170
+ this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
171
+ const attributes = {
172
+ message: message,
173
+ }
174
+ const modal: HTMLIonModalElement = await this.modalController.create({
175
+ component: CreateCannedResponsePage,
176
+ componentProps: attributes,
177
+ swipeToClose: false,
178
+ backdropDismiss: false,
179
+ })
180
+ modal.onDidDismiss().then((dataReturned: any) => {
181
+ //
182
+ this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
183
+ })
184
+
185
+ return await modal.present()
186
+ }
163
187
  }
@@ -43,10 +43,6 @@
43
43
 
44
44
  <!-- [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left" content-type="template" (click)="handleTooltipEvents($event)" -->
45
45
  <div *ngIf="message?.text">
46
- <span class="message-date"> {{message.timestamp | date:'HH:mm' }} </span>
47
- <!-- <ng-template #timeTooltipLeft>
48
- <span> {{message.timestamp | amCalendar }} </span>
49
- </ng-template> -->
50
46
 
51
47
  <chat-text *ngIf="message?.type !=='html'"
52
48
  [text]="message?.text"
@@ -60,20 +56,6 @@
60
56
  [htmlText]="message?.text">
61
57
  </chat-html>
62
58
 
63
- <ng-container *ngIf="areVisibleCAR && supportMode">
64
- <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
65
- (click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
66
- [options]="tooltipOptions" placement="bottom">
67
- <ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
68
- </ion-button>
69
- </ng-container>
70
- <!-- <ng-container *ngIf="supportMode">
71
- <ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
72
- (click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
73
- [options]="tooltipOptions" placement="bottom">
74
- <ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
75
- </ion-button>
76
- </ng-container> -->
77
59
  </div>
78
60
  </div>
79
61
 
@@ -48,16 +48,7 @@
48
48
 
49
49
  }
50
50
  // > .button-native
51
- .btn-add-msg {
52
- border-radius: 50%;
53
- --padding-end: 7px;
54
- --padding-start: 7px;
55
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
56
-
57
- ion-icon{
58
- font-size: 1.2em;
59
- }
60
- }
51
+
61
52
 
62
53
 
63
54
 
@@ -21,15 +21,13 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
21
21
  @Input() fontColor: string;
22
22
  @Input() fontSize: string;
23
23
  @Input() fontFamily: string;
24
- @Input() areVisibleCAR: boolean;
25
- @Input() supportMode: boolean;
26
24
  @Output() onBeforeMessageRender = new EventEmitter();
27
25
  @Output() onAfterMessageRender = new EventEmitter();
28
26
  @Output() onElementRendered = new EventEmitter<{element: string, status: boolean}>();
27
+
29
28
  isImage = isImage;
30
29
  isFile = isFile;
31
30
  isFrame = isFrame;
32
- @Input() addAsCannedResponseTooltipText : string;
33
31
  public browserLang: string;
34
32
 
35
33
  tooltipOptions = {
@@ -196,25 +194,6 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
196
194
  this.onElementRendered.emit({element: event.element, status: event.status})
197
195
  }
198
196
 
199
- async presentCreateCannedResponseModal(): Promise<any> {
200
- this.logger.log('[BUBBLE-MESSAGE] PRESENT CREATE CANNED RESPONSE MODAL ')
201
- const attributes = {
202
- message: this.message,
203
- }
204
- const modal: HTMLIonModalElement = await this.modalController.create({
205
- component: CreateCannedResponsePage,
206
- componentProps: attributes,
207
- swipeToClose: false,
208
- backdropDismiss: false,
209
- })
210
- modal.onDidDismiss().then((dataReturned: any) => {
211
- //
212
- this.logger.log('[BUBBLE-MESSAGE] ', dataReturned.data)
213
- })
214
-
215
- return await modal.present()
216
- }
217
-
218
197
 
219
198
  // printMessage(message, messageEl, component) {
220
199
  // const messageOBJ = { message: message, sanitizer: this.sanitizer, messageEl: messageEl, component: component}
@@ -1,10 +1,8 @@
1
1
  #buttons-in-message {
2
2
  text-align: left;
3
3
  display: block;
4
- margin-top: -6px;
5
- margin-bottom: 5px;
6
4
  height: auto;
7
- padding-left: 8px;
5
+ margin: 0px 20px 5px 10px;
8
6
 
9
7
  .div-button {
10
8
  display: inline-block;
@@ -112,6 +112,7 @@ ion-item {
112
112
  }
113
113
 
114
114
  .conversation_message {
115
+ margin: 5px 0px;
115
116
  p {
116
117
  color: #6e6f73; //#3c4858;
117
118
  font-size: 15px;
@@ -10,8 +10,7 @@
10
10
 
11
11
  <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" [ngClass]="{'mobile': isMobile}">
12
12
  <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
13
- <div class="avatar-container" style="cursor: pointer"
14
- [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
13
+ <div class="avatar-container" [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
15
14
  <app-avatar-profile
16
15
  [itemAvatar]=conversationAvatar>
17
16
  </app-avatar-profile>
@@ -141,7 +141,7 @@ ion-header {
141
141
  }
142
142
 
143
143
  .avatar-container {
144
- background-color: #fff;
144
+ // background-color: #fff;
145
145
  color: #fff;
146
146
  text-align: center;
147
147
  width: 44px;
@@ -158,6 +158,12 @@ ion-header {
158
158
  border-width: 0px;
159
159
  line-height: 40px;
160
160
  display: inline-block;
161
+ cursor: pointer;
162
+ }
163
+
164
+ .avatar-container-ios {
165
+ left: 55px;
166
+ top: 10px;
161
167
  }
162
168
 
163
169
  .info-container{
@@ -216,7 +222,4 @@ ion-header {
216
222
  left: 63px;
217
223
  }
218
224
 
219
- .avatar-container-ios {
220
- left: 55px;
221
- top: 10px;
222
- }
225
+
@@ -40,27 +40,28 @@
40
40
 
41
41
  <div class="start-buttons" style="position: absolute;display: flex; top: 2px;">
42
42
 
43
+ <!-- CANNED RESPONSES -->
43
44
  <ng-container *ngIf="areVisibleCAR && supportMode">
44
45
  <div class="canned-responses-btn-wpr" style="margin-left: -5px;"
45
46
  tooltip="{{translationMap?.get('CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top">
46
47
  <ion-button ion-button fill="clear" class="canned-responses-btn" (click)="openCannedResponses()"
47
- [disabled]="!IS_SUPPORT_GROUP_CONVERSATION || disableTextarea">
48
+ [disabled]="!conversationWith?.startsWith(TYPE_SUPPORT_GROUP) || disableTextarea">
48
49
  <ion-icon slot="icon-only" lazy="true" name="flash-outline" style="font-size: 24px;"></ion-icon>
49
50
  </ion-button>
50
51
  </div>
51
- <div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount === 0"
52
+ <div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount === 0"
52
53
  tooltip="{{translationMap?.get('NO_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
53
54
  class="no-canned-responses-btn-badge">
54
55
  <ion-icon name="alert-sharp" style="vertical-align: middle;"></ion-icon>
55
56
  </div>
56
- <div *ngIf="IS_SUPPORT_GROUP_CONVERSATION && tagsCannedCount > 0"
57
+ <div *ngIf="conversationWith?.startsWith(TYPE_SUPPORT_GROUP) && tagsCannedCount > 0"
57
58
  tooltip="{{translationMap?.get('YES_CANNED_RESPONSES')}}" [options]="tooltipOptions" placement="top"
58
59
  class="canned-responses-btn-badge">
59
60
  <ion-icon name="information-sharp" style="vertical-align: middle;"></ion-icon>
60
61
  </div>
61
62
  </ng-container>
62
63
 
63
-
64
+ <!-- UPLOAD ATTACHMENT -->
64
65
  <div class="upload-image-btn-wpr" tooltip="{{translationMap?.get('UPLOAD')}}" [options]="tooltipOptions"
65
66
  placement="top">
66
67
  <ion-button ion-button fill="clear" class="upload-image-btn" [disabled]="disableTextarea">
@@ -110,7 +111,7 @@
110
111
 
111
112
  <div class="text-message" [ngClass]="{'text-message-no-cr': areVisibleCAR === false || supportMode === false}">
112
113
  <ion-textarea id="ion-textarea" #messageTextArea #message_text_area #textArea rows="1"
113
- [placeholder]="TEXAREA_PLACEHOLDER" autosize="false" auto-grow="true" autofocus="true" [value]=""
114
+ [placeholder]="translationMap?.get('LABEL_ENTER_MSG_SHORT')" autosize="false" auto-grow="true" autofocus="true" [value]=""
114
115
  [(ngModel)]="messageString" (ionChange)="ionChange($event);" [disabled]="disableTextarea"
115
116
  (keydown.enter)="onKeydown($event, messageString)" (paste)="onPaste($event)">
116
117
  </ion-textarea>
@@ -9,7 +9,7 @@ import { LoaderPreviewPage } from 'src/app/pages/loader-preview/loader-preview.p
9
9
  // Services
10
10
  import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
11
11
  // utils
12
- import { TYPE_MSG_TEXT } from 'src/chat21-core/utils/constants';
12
+ import { TYPE_MSG_TEXT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
13
13
  // Models
14
14
  import { UploadModel } from 'src/chat21-core/models/upload';
15
15
  import { Observable } from 'rxjs';
@@ -62,16 +62,12 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
62
62
  public messageString: string;
63
63
  public HAS_PASTED: boolean = false;
64
64
  public toastMsg: string;
65
- public TEXAREA_PLACEHOLDER: string;
66
- public LONG_TEXAREA_PLACEHOLDER: string;
67
- public SHORT_TEXAREA_PLACEHOLDER: string;
68
- public SHORTER_TEXAREA_PLACEHOLDER: string;
69
- public currentWindowWidth: any;
70
65
  private logger: LoggerService = LoggerInstance.getInstance();
71
66
  public countClicks: number = 0;
72
67
  public openCanned: boolean = false;
73
- public IS_SUPPORT_GROUP_CONVERSATION: boolean;
74
68
  public IS_ON_MOBILE_DEVICE: boolean;
69
+
70
+ TYPE_SUPPORT_GROUP = TYPE_SUPPORT_GROUP;
75
71
  TYPE_MSG_TEXT = TYPE_MSG_TEXT;
76
72
  msg: string
77
73
 
@@ -118,15 +114,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
118
114
  if (this.areVisibleCAR === false) {
119
115
  this.emojiPerLine = 7
120
116
  }
121
- // this.events.subscribe((cannedmessage) => {
122
- // this.logger.log("[CONVS-DETAIL] [MSG-TEXT-AREA] events.subscribe cannedmessage ", cannedmessage);
123
- // })
124
117
 
125
- // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] LONG_TEXAREA_PLACEHOLDER ", this.LONG_TEXAREA_PLACEHOLDER);
126
- // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORT_TEXAREA_PLACEHOLDER ", this.SHORT_TEXAREA_PLACEHOLDER);
127
- // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] SHORTER_TEXAREA_PLACEHOLDER ", this.SHORTER_TEXAREA_PLACEHOLDER);
128
118
  this.listenToNewCannedResponseCreated()
129
- this.getWindowWidth();
130
119
  this.isOnMobileDevice()
131
120
  }
132
121
 
@@ -147,15 +136,8 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
147
136
  // this.SHORT_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
148
137
  // this.SHORTER_TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORTER')
149
138
 
150
- this.TEXAREA_PLACEHOLDER = this.translationMap.get('LABEL_ENTER_MSG_SHORT')
151
-
152
139
  }
153
140
 
154
- if (this.conversationWith.startsWith("support-group")) {
155
- this.IS_SUPPORT_GROUP_CONVERSATION = true
156
- } else {
157
- this.IS_SUPPORT_GROUP_CONVERSATION = false
158
- }
159
141
  // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges supportMode ', this.supportMode)
160
142
  // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges disableTextarea ', this.disableTextarea)
161
143
  // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] ngOnChanges DROP EVENT ", this.dropEvent);
@@ -206,36 +188,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
206
188
  }
207
189
  }
208
190
 
209
-
210
- getWindowWidth(): any {
211
- this.currentWindowWidth = window.innerWidth;
212
-
213
-
214
- // if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
215
- // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
216
- // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] currentWindowWidth', this.currentWindowWidth, ' - DISPLAY LONG_TEXAREA_PLACEHOLDER ');
217
- // } else if (this.currentWindowWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
218
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
219
- // } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
220
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
221
- // } else if (this.currentWindowWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
222
- // this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
223
- // } else if (!this.conversationWith.startsWith("support-group")) {
224
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
225
- // }
226
-
227
- // this.logger.log("[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ", checkPlatformIsMobile());
228
- if (checkPlatformIsMobile() === true) {
229
-
230
- if (this.currentWindowWidth <= 430 && this.currentWindowWidth >= 274) {
231
- this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
232
-
233
- } else if (this.currentWindowWidth <= 273) {
234
- this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
235
- }
236
- }
237
- }
238
-
239
191
  // -------------------------------------------------------------------------------------------
240
192
  // Change the placeholder of the 'send message' textarea according to the width of the window
241
193
  // -------------------------------------------------------------------------------------------
@@ -243,37 +195,6 @@ export class MessageTextAreaComponent implements OnInit, AfterViewInit, OnChange
243
195
  onResize(event) {
244
196
  // this.getIfTexareaIsEmpty('onResize')
245
197
  // console.log("[CONVS-DETAIL][MSG-TEXT-AREA] event.target.innerWidth; ", event.target.innerWidth);
246
-
247
-
248
-
249
- // if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
250
- // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
251
- // } else if (event.target.innerWidth >= 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
252
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
253
- // } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === false && this.conversationWith.startsWith("support-group")) {
254
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
255
- // } else if (event.target.innerWidth < 844 && this.isOpenInfoConversation === true && this.conversationWith.startsWith("support-group")) {
256
- // this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
257
- // } else if (!this.conversationWith.startsWith("support-group")) {
258
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
259
- // }
260
-
261
- // this.logger.log('[CONVS-DETAIL][MSG-TEXT-AREA] checkPlatformIsMobile() ', checkPlatformIsMobile());
262
- if (checkPlatformIsMobile() === true) {
263
-
264
- if (event.target.innerWidth <= 430 && event.target.innerWidth >= 274) {
265
- this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
266
- } else if (this.currentWindowWidth <= 273) {
267
- this.TEXAREA_PLACEHOLDER = this.SHORTER_TEXAREA_PLACEHOLDER;
268
- }
269
-
270
- }
271
-
272
- // if (checkPlatformIsMobile && event.target.innerWidth <= 430) {
273
- // this.TEXAREA_PLACEHOLDER = this.SHORT_TEXAREA_PLACEHOLDER;
274
- // } else if (checkPlatformIsMobile && event.target.innerWidth > 430) {
275
- // this.TEXAREA_PLACEHOLDER = this.LONG_TEXAREA_PLACEHOLDER;
276
- // }
277
198
  }
278
199
 
279
200
 
@@ -11,7 +11,7 @@
11
11
  <div *ngIf="numberOpenConv > 0" class="number-open-conv">({{numberOpenConv}})</div>
12
12
  </ion-title>
13
13
 
14
- <ion-buttons slot="start">
14
+ <ion-buttons slot="start" *ngIf="isMobile">
15
15
  <ion-button *ngIf="sound_btn==='enabled'" ion-button fill="clear" (click)="onSoundChangeFN('disabled')">
16
16
  <ion-icon slot="icon-only" name="volume-high-outline" ></ion-icon>
17
17
  </ion-button>
@@ -0,0 +1,103 @@
1
+ <ion-navbar class="navbar navbar-absolute">
2
+ <div class="container-fluid">
3
+ <!-- <div class="navbar-left">
4
+ left
5
+ </div> -->
6
+ <div class="navbar-right">
7
+ <!-- test site -->
8
+ <ng-container *ngIf="project">
9
+ <button class="btn simulate-visitor-btn btn-success-no-boxshadow " (click)="testWidgetPage()">
10
+ <i class="material-icons" style="padding-top: 0px;font-size: 24px;">play_arrow</i>
11
+ {{translationsMap.get('NAVBAR.SIMULATE_VISITOR')}}
12
+ </button>
13
+ </ng-container>
14
+
15
+ <!-- ------ PROJECTS DROPDOWN ------ -->
16
+ <ng-container *ngIf="project">
17
+ <li>
18
+ <button class="btn dropdown-toggle project-dropdown" (click)="openDropdownProjects = !openDropdownProjects">
19
+ <i class="material-icons" style="margin-right: 3px;">keyboard_arrow_down</i>
20
+ <span style="text-transform: none"> {{ project?.id_project?.name }} </span>
21
+ </button>
22
+ <div class="ripple-container"></div>
23
+ <div id="navbar_dropdown" class="dropdown-menu" [ngClass]="{'open': openDropdownProjects}">
24
+
25
+ <!-- PROJECT SETTINGS -->
26
+ <!-- <li *ngIf="USER_ROLE !== 'agent'">
27
+ <a (click)="onClickDropdownOption('projectSettings')">
28
+ <i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">settings</i>
29
+ {{translationsMap?.get('NAVBAR.PROJECT_SETTINGS')}}
30
+ </a>
31
+ </li> -->
32
+
33
+ <!-- ALL PROJECTS -->
34
+ <li (click)="onClickDropdownOption('allProjects')">
35
+ <a style="cursor: pointer">
36
+ <i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">view_list</i>
37
+ {{translationsMap?.get('NAVBAR.VIEW_ALL_PROJECTS')}}
38
+ </a>
39
+ </li>
40
+
41
+ <!-- ADD PROJECT -->
42
+ <li id="navbar_create_prjct" *ngIf="MT === true" (click)="onClickDropdownOption('addProject')">
43
+ <a style="cursor: pointer">
44
+ <i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">add_circle_outline </i>
45
+ {{translationsMap?.get('NAVBAR.ADD_PROJECT')}}
46
+ </a>
47
+ </li>
48
+
49
+ <li class="divider"></li>
50
+
51
+ <!-- RECENT PROJECTS -->
52
+ <li>
53
+ <span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
54
+ {{translationsMap?.get('NAVBAR.RECENT_PROJECTS')}}
55
+ </span>
56
+ </li>
57
+ <!--
58
+ ***** ngFor - reverse order of output using the index *****
59
+ Reverse() works in place. It means, it will change the original array.
60
+ Slice without parameters returns a copy of projects, so original array, in this case, stays unchanged.
61
+ let prjct of projects?.reverse()
62
+ -->
63
+ <!-- *ngFor="let prjct of projects?.slice().reverse() | slice:0:5; let i=index" -->
64
+ <li *ngFor="let prjct of projects?.slice() | slice:0:5; let i=index" style="cursor: pointer">
65
+ <a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)"
66
+ [ngClass]="{'li-selected' : prjct?.id_project?._id === project?.id_project?.id }">
67
+
68
+ <span> {{ prjct?.id_project?.name }} </span>
69
+ </a>
70
+ </li>
71
+
72
+ <ng-container *ngIf="projects?.length > 5">
73
+ <li class="divider"></li>
74
+ <li>
75
+ <span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
76
+ {{translationsMap?.get('NAVBAR.OTHER_PROJECTS')}}
77
+ </span>
78
+ </li>
79
+
80
+ <!-- *ngFor="let prjct of projects?.slice().reverse() | slice:5:10; let i=index" -->
81
+ <li *ngFor="let prjct of projects?.slice() | slice:5:10; let i=index" style="cursor: pointer">
82
+ <a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)">
83
+ {{ prjct?.id_project?.name }}
84
+ </a>
85
+ </li>
86
+ </ng-container>
87
+
88
+ </div>
89
+ </li>
90
+ </ng-container>
91
+
92
+ <!-- Sound on / off -->
93
+ <ng-container *ngIf="project">
94
+ <button class="btn volume" style="cursor: pointer;" *ngIf="isSoundEnabled" (click)="onClickSound('disabled')">
95
+ <i class="material-icons">volume_up</i>
96
+ </button>
97
+ <button class="btn volume" style="cursor: pointer;" *ngIf="!isSoundEnabled" (click)="onClickSound('enabled')">
98
+ <i class="material-icons">volume_off</i>
99
+ </button>
100
+ </ng-container>
101
+ </div>
102
+ </div>
103
+ </ion-navbar>