@chat21/chat21-ionic 3.0.58 → 3.0.59-rc15

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 (96) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +9 -0
  3. package/config.xml +11 -2
  4. package/env.sample +2 -0
  5. package/package.json +1 -1
  6. package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
  7. package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
  8. package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
  9. package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
  10. package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
  11. package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
  12. package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
  13. package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
  14. package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
  15. package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
  16. package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
  17. package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
  18. package/resources/Android/splash.png +0 -0
  19. package/src/app/app-routing.module.ts +21 -17
  20. package/src/app/app.component.html +6 -3
  21. package/src/app/app.component.ts +259 -55
  22. package/src/app/app.module.ts +16 -8
  23. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.html +1 -1
  24. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +4 -4
  25. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +8 -2
  26. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +6 -1
  27. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -2
  28. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +47 -2
  29. package/src/app/chatlib/conversation-detail/message/image/image.component.html +7 -6
  30. package/src/app/chatlib/conversation-detail/message/image/image.component.ts +20 -1
  31. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +39 -9
  32. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +8 -144
  33. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -17
  34. package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.html +1 -1
  35. package/src/app/components/authentication/login/login.component.html +10 -10
  36. package/src/app/components/authentication/login/login.component.ts +2 -1
  37. package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
  38. package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +1 -1
  39. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +17 -12
  40. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +12 -0
  41. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +21 -5
  42. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +3 -2
  43. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +22 -17
  44. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +46 -5
  45. package/src/app/components/ddp-header/ddp-header.component.html +1 -1
  46. package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
  47. package/src/app/components/image-viewer/image-viewer.component.html +23 -0
  48. package/src/app/components/image-viewer/image-viewer.component.scss +107 -0
  49. package/src/app/components/image-viewer/image-viewer.component.spec.ts +24 -0
  50. package/src/app/components/image-viewer/image-viewer.component.ts +38 -0
  51. package/src/app/components/project-item/project-item.component.html +147 -0
  52. package/src/app/components/project-item/project-item.component.scss +669 -0
  53. package/src/app/components/project-item/project-item.component.spec.ts +24 -0
  54. package/src/app/components/project-item/project-item.component.ts +317 -0
  55. package/src/app/components/utils/avatar-profile/avatar-profile.component.html +7 -0
  56. package/src/app/components/utils/avatar-profile/avatar-profile.component.ts +22 -5
  57. package/src/app/pages/authentication/login/login.page.html +1 -2
  58. package/src/app/pages/authentication/login/login.page.ts +1 -1
  59. package/src/app/pages/conversation-detail/conversation-detail.page.html +5 -3
  60. package/src/app/pages/conversation-detail/conversation-detail.page.ts +122 -30
  61. package/src/app/pages/conversations-list/conversations-list.page.html +44 -23
  62. package/src/app/pages/conversations-list/conversations-list.page.scss +290 -127
  63. package/src/app/pages/conversations-list/conversations-list.page.ts +172 -12
  64. package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
  65. package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
  66. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +22 -0
  67. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +79 -0
  68. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
  69. package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +108 -0
  70. package/src/app/services/nav-proxy.service.ts +1 -1
  71. package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
  72. package/src/app/services/websocket/websocket-js.ts +557 -0
  73. package/src/app/services/websocket/websocket.service.spec.ts +12 -0
  74. package/src/app/services/websocket/websocket.service.ts +274 -0
  75. package/src/app/shared/shared.module.ts +7 -1
  76. package/src/assets/i18n/en.json +9 -1
  77. package/src/assets/i18n/it.json +9 -1
  78. package/src/assets/js/chat21client.js +141 -67
  79. package/src/assets/transparent.png +0 -0
  80. package/src/chat-config-pre-test.json +3 -1
  81. package/src/chat-config-template.json +3 -1
  82. package/src/chat-config.json +3 -1
  83. package/src/chat21-core/providers/chat-manager.ts +3 -3
  84. package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
  85. package/src/chat21-core/providers/firebase/firebase-auth-service.ts +6 -6
  86. package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +1 -1
  87. package/src/chat21-core/providers/firebase/firebase-notifications.ts +1 -1
  88. package/src/chat21-core/providers/firebase/firebase-presence.service.ts +2 -2
  89. package/src/chat21-core/providers/firebase/firebase-typing.service.ts +1 -1
  90. package/src/chat21-core/providers/firebase/firebase-upload.service.ts +1 -1
  91. package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +27 -27
  92. package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +13 -5
  93. package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +101 -11
  94. package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +13 -4
  95. package/src/chat21-core/utils/utils.ts +1 -1
  96. package/src/firebase-messaging-sw-template.js +1 -1
@@ -1,7 +1,7 @@
1
1
  <!-- [ngClass]="{'button-in-msg' : message.metadata && message.metadata.button}" -->
2
2
  <!-- [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px'}" -->
3
3
  <!-- isImage >{{isImage(message) }} message.metadata.width {{message?.metadata?.width }} -->
4
- <div [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px', 'width': (isImage(message) || isFrame(message))? message?.metadata?.width + 'px' : null }"
4
+ <div id="bubble-message" [ngStyle]="{'padding': (isImage(message) || isFrame(message))?'0px':'0 8px', 'width': (isImage(message) || isFrame(message))? message?.metadata?.width + 'px' : null }"
5
5
  class="messages primary-color"
6
6
  [class.emoticon]="message?.emoticon">
7
7
 
@@ -42,10 +42,15 @@
42
42
 
43
43
  <!-- message type:: text -->
44
44
  <!-- <div *ngIf="message.type == 'text'"> -->
45
+
45
46
  <div *ngIf="message?.text" [tooltip]="timeTooltipLeft" [options]="tooltipOptions" placement="left"
46
47
  content-type="template" (click)="handleTooltipEvents($event)">
47
48
  <ng-template #timeTooltipLeft>
48
- <span>{{message.timestamp | amTimeAgo}}</span>
49
+ <!-- <span>{{message.timestamp | amTimeAgo}}</span> -->
50
+ <!-- <span> {{browserLang === 'it' ? (message.timestamp| amDateFormat:'DD MMM') : (message.timestamp |
51
+ amDateFormat:'MMM DD')}} </span> amCalendar -->
52
+
53
+ <span> {{message.timestamp | amCalendar }} </span>
49
54
  </ng-template>
50
55
 
51
56
  <chat-text
@@ -5,6 +5,8 @@ import { MAX_WIDTH_IMAGES } from 'src/chat21-core/utils/constants';
5
5
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
6
6
  import { isFile, isFrame, isImage } from 'src/chat21-core/utils/utils-message';
7
7
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
8
+ import { TranslateService } from '@ngx-translate/core';
9
+ import * as moment from 'moment';
8
10
  @Component({
9
11
  selector: 'chat-bubble-message',
10
12
  templateUrl: './bubble-message.component.html',
@@ -21,6 +23,8 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
21
23
  isFile = isFile;
22
24
  isFrame = isFrame;
23
25
 
26
+ public browserLang: string;
27
+
24
28
  tooltipOptions = {
25
29
  'show-delay': 500,
26
30
  'tooltip-class': 'chat-tooltip',
@@ -32,17 +36,58 @@ export class BubbleMessageComponent implements OnInit, OnChanges {
32
36
  };
33
37
 
34
38
  private logger: LoggerService = LoggerInstance.getInstance()
35
- constructor(public sanitizer: DomSanitizer) {
39
+ constructor(
40
+ public sanitizer: DomSanitizer,
41
+ private translate: TranslateService) {
36
42
  // console.log('BUBBLE-MSG Hello !!!!')
37
43
  }
38
44
 
39
45
  ngOnInit() {
46
+ this.browserLang = this.translate.getBrowserLang();
47
+ // console.log('BUBBLE-MSG ngOnInit browserLang ', this.browserLang)
48
+ if (this.browserLang) {
49
+ if (this.browserLang === 'it') {
50
+ // console.log('BUBBLE-MSG browserLang ', this.browserLang)
51
+ // moment.locale('it')
52
+
53
+ moment.locale('it', {
54
+ calendar: {
55
+ lastDay: '[Ieri alle] LT',
56
+ sameDay: '[Oggi alle] LT',
57
+ nextDay: '[Domani alle] LT',
58
+ lastWeek: '[Ultimo] dddd [alle] LT',
59
+ nextWeek: 'dddd [alle] LT',
60
+ sameElse: 'lll'
61
+ }
62
+ });
63
+
64
+ } else {
65
+ // console.log('BUBBLE-MSG browserLang ', this.browserLang)
66
+ // moment.locale('en')
67
+
68
+ moment.locale('en', {
69
+ calendar: {
70
+ lastDay: '[Yesterday at] LT',
71
+ sameDay: '[Today at] LT',
72
+ nextDay: '[Tomorrow at] LT',
73
+ lastWeek: '[last] dddd [at] LT',
74
+ nextWeek: 'dddd [at] LT',
75
+ sameElse: 'lll'
76
+ }
77
+ });
78
+ }
79
+ }
80
+
81
+
82
+
83
+ // const yesterday = moment().subtract(1, 'day')
84
+ // console.log('BUBBLE-MSG yesterday ', yesterday)
40
85
 
41
86
  }
42
87
 
43
88
  ngOnChanges() {
44
89
  // console.log('BUBBLE-MSG Hello !!!! this.message ', this.message)
45
- if (this.message && this.message.metadata) {
90
+ if (this.message && this.message.metadata && typeof this.message.metadata === 'object') {
46
91
  this.getMetadataSize(this.message.metadata)
47
92
  // console.log('BUBBLE-MSG ngOnChanges message > metadata', this.message.metadata)
48
93
  }
@@ -1,9 +1,10 @@
1
1
  <div [ngStyle]="{ 'max-width': width +'px', 'max-height': height +'px' }" style="position: relative; ">
2
2
  <div *ngIf="loading" class="loader" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }"></div>
3
- <img [ngStyle]="{ 'width': width +'px', 'height': height +'px' }" style="cursor:pointer" [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom"
4
- content-type="template" class="message-contentX message-content-imageX" [ngClass]="{'isLoadingImage': loading}"
5
- [src]="metadata.src" (load)="onLoaded($event)" (click)="downloadImage(metadata.src, metadata.name)" />
6
- <ng-template #timeTooltipRight>
3
+ <!-- [tooltip]="timeTooltipRight" [options]="tooltipOptions" placement="bottom" content-type="template" -->
4
+ <img id="myImg" [ngStyle]="{ 'width': width +'px', 'height': height +'px' }" style="cursor:pointer"
5
+ class="message-contentX message-content-imageX" [ngClass]="{'isLoadingImage': loading}"
6
+ [src]="metadata.src" (load)="onLoaded($event)" (click)="openImageViewerModal(metadata.src, metadata.name)" />
7
+ <!-- <ng-template #timeTooltipRight>
7
8
  <span>{{ tooltipMessage }}</span>
8
- </ng-template>
9
- </div>
9
+ </ng-template> -->
10
+ </div>
@@ -14,6 +14,8 @@ export class ImageComponent implements OnInit {
14
14
 
15
15
  loading: boolean = true
16
16
  tooltipMessage: string;
17
+ modal: any
18
+ span: any
17
19
 
18
20
  tooltipOptions = {
19
21
  'show-delay': 0,
@@ -45,7 +47,7 @@ export class ImageComponent implements OnInit {
45
47
  this.onImageRendered.emit(true)
46
48
  }
47
49
 
48
- downloadImage(url: string, fileName: string) {
50
+ _downloadImage(url: string, fileName: string) {
49
51
  // console.log('Image COMP - IMAGE URL ', url)
50
52
  // console.log('Image COMP - IMAGE FILENAME ', fileName)
51
53
  const a: any = document.createElement('a');
@@ -56,4 +58,21 @@ export class ImageComponent implements OnInit {
56
58
  a.click();
57
59
  a.remove();
58
60
  }
61
+
62
+ openImageViewerModal(url: string, fileName: string) {
63
+ this.modal = document.getElementById("image-viewer-modal");
64
+ // console.log('has clicked open image-viewer modal ', this.modal)
65
+ this.modal.style.display = "block";
66
+ var modalImg = <HTMLImageElement>document.getElementById("image-viewer-img");
67
+ var captionText = document.getElementById("caption");
68
+ modalImg.src = url
69
+ captionText.innerHTML = fileName;
70
+
71
+ }
72
+
73
+
74
+
75
+
59
76
  }
77
+
78
+
@@ -25,7 +25,8 @@
25
25
  <!-- -------------------------------------------------------------------------- -->
26
26
  <!-- New <ion-spinner class="spinner-middle" style="margin-left: 19px;"></ion-spinner> -->
27
27
  <!-- -------------------------------------------------------------------------- -->
28
- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
28
+ <!-- <ion-item *ngIf="isOnline === false" button="true" lines="none" class="ion-no-padding waiting-for-connection">
29
+ <div tabindex="0"></div>
29
30
  <ion-avatar item-start>
30
31
  <div class="sk-fading-circle">
31
32
  <div class="sk-circle1 sk-circle"></div>
@@ -43,10 +44,39 @@
43
44
  </div>
44
45
  </ion-avatar>
45
46
  <ion-label part="message-text" class="waiting-for-network-msg"> Waiting for network</ion-label>
46
- </ion-item>
47
+ </ion-item> -->
48
+
49
+ <!-- <ion-item>
50
+ <div tabindex="0"></div>
51
+ <iframe loading="lazy" width="100%" height="70px" style="border: unset;" [src]="PROJECT_FOR_PANEL"></iframe>
52
+ </ion-item> -->
53
+ <!-- <ion-item button="true" (click)="openUnsevedConversationIframe()">
54
+ <app-project-item
55
+ (projectIdEvent)="getLastProjectId($event)"></app-project-item>
56
+ </ion-item> -->
57
+
58
+
59
+ <!-- <ion-item-sliding disabled>
60
+ <ion-item>
61
+ <ion-label>
62
+ Sliding Item, Icons Start
63
+ </ion-label>
64
+ </ion-item>
65
+ <ion-item-options>
66
+ <ion-item-option color="primary">
67
+ <ion-icon slot="start" ios="ellipsis-horizontal" md="ellipsis-vertical"></ion-icon>
68
+ More
69
+ </ion-item-option>
70
+ <ion-item-option color="secondary">
71
+ <ion-icon slot="start" name="archive"></ion-icon>
72
+ Archive
73
+ </ion-item-option>
74
+ </ion-item-options>
75
+ </ion-item-sliding> -->
76
+
47
77
 
48
78
  <ion-item button="true" lines="none" class="ion-no-padding" [class.ion-selected]="conversation.uid === uidConvSelected"
49
- *ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)">
79
+ *ngFor="let conversation of listConversations" (click)="openConversationByID(conversation)" detail=false>
50
80
  <div tabindex="0"></div>
51
81
 
52
82
  <!-- <div [class.selected]="conversation.uid === uidConvSelected"></div> -->
@@ -88,7 +118,8 @@
88
118
  <ion-note *ngIf="!conversation.archived" class="conversation_time">{{conversation.timestamp | amTimeAgo}}</ion-note>
89
119
 
90
120
  <ion-buttons slot="end">
91
- <ion-button *ngIf="!conversation.archived" [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp }"
121
+ <ion-button *ngIf="!conversation.archived"
122
+ [ngClass]="{'hide': !isApp, 'button-on-desktop': !isApp, 'button-on-mobile': isApp }"
92
123
  id="{{ 'close_conversation_button' + conversation.uid }}" class="close-conversation-button" ion-button clear
93
124
  item-end (click)="closeConversation(conversation);$event.stopPropagation();" padding>
94
125
  <ion-icon slot="icon-only" style="display:block;" id="{{ 'close_button_icon' + conversation.uid }}"
@@ -103,21 +134,20 @@
103
134
 
104
135
  <div item-end *ngIf="conversation?.archived" class="achived-icon-wpr">
105
136
  <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') === currentYear" class="time-in-archived">
106
- {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp |
107
- amDateFormat:'MMM DD')}}
137
+ {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD') : (conversation.timestamp| amDateFormat:'DD MMM')}}
108
138
 
109
139
  <!-- {{conversation.timestamp | amDateFormat:'DD MMM'}} -->
110
140
  </span>
111
141
  <span *ngIf="(conversation.timestamp | amDateFormat:'YYYY') !== currentYear" class="time-in-archived">
112
- {{browserLang === 'it' ? (conversation.timestamp| amDateFormat:'DD MMM') : (conversation.timestamp |
113
- amDateFormat:'MMM DD YYYY')}}
142
+ {{browserLang === 'en' ? (conversation.timestamp | amDateFormat:'MMM DD YYYY') : (conversation.timestamp| amDateFormat:'DD MMM YYYY') }}
114
143
  <!-- {{conversation.timestamp | amDateFormat:'DD MMM YYYY'}} -->
115
144
  </span>
116
145
  <i class="material-icons" item-end style="font-size: 15px;font-weight: 400;color: #666666;"> history </i>
117
146
  </div>
118
147
 
119
148
  <!-- && !conversation?.archived -->
120
- <div item-end class="notification_point" [ngClass]="{'notification_point-on-desktop': !isApp }"
149
+ <div item-end class="notification_point"
150
+ [ngClass]="{'notification_point-on-desktop': !isApp, 'notification_point-on-mobile': isApp }"
121
151
  *ngIf="conversation.is_new">
122
152
  </div>
123
153
 
@@ -142,6 +142,10 @@ ion-item {
142
142
  .notification_point-on-desktop {
143
143
  bottom: 29px !important;
144
144
  }
145
+ .notification_point-on-mobile {
146
+ bottom: 29px !important;
147
+ right: 8px;
148
+ }
145
149
  }
146
150
 
147
151
  // ion-item {
@@ -171,6 +175,10 @@ ion-item:hover {
171
175
  }
172
176
  }
173
177
 
178
+ .button-on-mobile {
179
+ margin-right: 31px !important;
180
+ }
181
+
174
182
  .truncate-on-desktop {
175
183
  width: 88% !important
176
184
  }
@@ -212,147 +220,3 @@ ion-item:hover {
212
220
  }
213
221
 
214
222
 
215
- .waiting-for-connection {
216
- --background: #fdd764;
217
- }
218
-
219
- // -------------------------------
220
- // Spinner
221
- // -------------------------------
222
- .sk-fading-circle {
223
- // margin: 100px auto;
224
- width: 40px;
225
- height: 40px;
226
- position: relative;
227
- margin-left: 5px;
228
- margin-top: 5px;
229
- }
230
-
231
- .sk-fading-circle .sk-circle {
232
- width: 100%;
233
- height: 100%;
234
- position: absolute;
235
- left: 0;
236
- top: 0;
237
- }
238
-
239
- .sk-fading-circle .sk-circle:before {
240
- content: '';
241
- display: block;
242
- margin: 0 auto;
243
- width: 15%;
244
- height: 15%;
245
- background-color: #333;
246
- border-radius: 100%;
247
- -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
248
- animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
249
- }
250
- .sk-fading-circle .sk-circle2 {
251
- -webkit-transform: rotate(30deg);
252
- -ms-transform: rotate(30deg);
253
- transform: rotate(30deg);
254
- }
255
- .sk-fading-circle .sk-circle3 {
256
- -webkit-transform: rotate(60deg);
257
- -ms-transform: rotate(60deg);
258
- transform: rotate(60deg);
259
- }
260
- .sk-fading-circle .sk-circle4 {
261
- -webkit-transform: rotate(90deg);
262
- -ms-transform: rotate(90deg);
263
- transform: rotate(90deg);
264
- }
265
- .sk-fading-circle .sk-circle5 {
266
- -webkit-transform: rotate(120deg);
267
- -ms-transform: rotate(120deg);
268
- transform: rotate(120deg);
269
- }
270
- .sk-fading-circle .sk-circle6 {
271
- -webkit-transform: rotate(150deg);
272
- -ms-transform: rotate(150deg);
273
- transform: rotate(150deg);
274
- }
275
- .sk-fading-circle .sk-circle7 {
276
- -webkit-transform: rotate(180deg);
277
- -ms-transform: rotate(180deg);
278
- transform: rotate(180deg);
279
- }
280
- .sk-fading-circle .sk-circle8 {
281
- -webkit-transform: rotate(210deg);
282
- -ms-transform: rotate(210deg);
283
- transform: rotate(210deg);
284
- }
285
- .sk-fading-circle .sk-circle9 {
286
- -webkit-transform: rotate(240deg);
287
- -ms-transform: rotate(240deg);
288
- transform: rotate(240deg);
289
- }
290
- .sk-fading-circle .sk-circle10 {
291
- -webkit-transform: rotate(270deg);
292
- -ms-transform: rotate(270deg);
293
- transform: rotate(270deg);
294
- }
295
- .sk-fading-circle .sk-circle11 {
296
- -webkit-transform: rotate(300deg);
297
- -ms-transform: rotate(300deg);
298
- transform: rotate(300deg);
299
- }
300
- .sk-fading-circle .sk-circle12 {
301
- -webkit-transform: rotate(330deg);
302
- -ms-transform: rotate(330deg);
303
- transform: rotate(330deg);
304
- }
305
- .sk-fading-circle .sk-circle2:before {
306
- -webkit-animation-delay: -1.1s;
307
- animation-delay: -1.1s;
308
- }
309
- .sk-fading-circle .sk-circle3:before {
310
- -webkit-animation-delay: -1s;
311
- animation-delay: -1s;
312
- }
313
- .sk-fading-circle .sk-circle4:before {
314
- -webkit-animation-delay: -0.9s;
315
- animation-delay: -0.9s;
316
- }
317
- .sk-fading-circle .sk-circle5:before {
318
- -webkit-animation-delay: -0.8s;
319
- animation-delay: -0.8s;
320
- }
321
- .sk-fading-circle .sk-circle6:before {
322
- -webkit-animation-delay: -0.7s;
323
- animation-delay: -0.7s;
324
- }
325
- .sk-fading-circle .sk-circle7:before {
326
- -webkit-animation-delay: -0.6s;
327
- animation-delay: -0.6s;
328
- }
329
- .sk-fading-circle .sk-circle8:before {
330
- -webkit-animation-delay: -0.5s;
331
- animation-delay: -0.5s;
332
- }
333
- .sk-fading-circle .sk-circle9:before {
334
- -webkit-animation-delay: -0.4s;
335
- animation-delay: -0.4s;
336
- }
337
- .sk-fading-circle .sk-circle10:before {
338
- -webkit-animation-delay: -0.3s;
339
- animation-delay: -0.3s;
340
- }
341
- .sk-fading-circle .sk-circle11:before {
342
- -webkit-animation-delay: -0.2s;
343
- animation-delay: -0.2s;
344
- }
345
- .sk-fading-circle .sk-circle12:before {
346
- -webkit-animation-delay: -0.1s;
347
- animation-delay: -0.1s;
348
- }
349
-
350
- @-webkit-keyframes sk-circleFadeDelay {
351
- 0%, 39%, 100% { opacity: 0; }
352
- 40% { opacity: 1; }
353
- }
354
-
355
- @keyframes sk-circleFadeDelay {
356
- 0%, 39%, 100% { opacity: 0; }
357
- 40% { opacity: 1; }
358
- }
@@ -7,10 +7,13 @@ import { Platform } from '@ionic/angular';
7
7
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
8
8
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
9
9
  import { TranslateService } from '@ngx-translate/core';
10
+
10
11
  import * as moment from 'moment';
11
12
  // import { EventsService } from 'src/app/services/events-service';
12
13
  // import { TiledeskService } from '../../../services/tiledesk/tiledesk.service';
13
14
  import { NetworkService } from '../../../services/network-service/network.service';
15
+ import { AppConfigProvider } from 'src/app/services/app-config';
16
+ import { DomSanitizer } from '@angular/platform-browser'
14
17
  // import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
15
18
  // import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
16
19
 
@@ -29,8 +32,8 @@ export class IonListConversationsComponent extends ListConversationsComponent im
29
32
  public logger: LoggerService = LoggerInstance.getInstance();
30
33
  public currentYear: any;
31
34
  public browserLang: string;
32
- public isOnline: boolean = true;
33
- public checkInternet: boolean;
35
+
36
+ public PROJECT_FOR_PANEL: any;
34
37
 
35
38
  /**
36
39
  *
@@ -45,7 +48,9 @@ export class IonListConversationsComponent extends ListConversationsComponent im
45
48
  private translate: TranslateService,
46
49
  // private events: EventsService,
47
50
  // private tiledeskService: TiledeskService,
48
- private networkService: NetworkService
51
+ private networkService: NetworkService,
52
+ private appConfigProvider: AppConfigProvider,
53
+ private sanitizer: DomSanitizer,
49
54
  ) {
50
55
  super(iterableDiffers, kvDiffers)
51
56
  this.browserLang = this.translate.getBrowserLang();
@@ -62,31 +67,23 @@ export class IonListConversationsComponent extends ListConversationsComponent im
62
67
 
63
68
  this.currentYear = moment().format('YYYY');
64
69
  this.logger.log('[ION-LIST-CONVS-COMP] - currentYear ', this.currentYear)
70
+
71
+ const DASHBOARD_BASE_URL = this.appConfigProvider.getConfig().dashboardUrl;
72
+
73
+ // console.log('[ION-LIST-CONVS-COMP] - DASHBOARD_BASE_URL ', DASHBOARD_BASE_URL)
74
+ this.PROJECT_FOR_PANEL = this.sanitizer.bypassSecurityTrustResourceUrl(DASHBOARD_BASE_URL + '#/project-for-panel');
65
75
  }
66
76
 
67
77
  ngOnInit() {
68
78
  this.isApp = this.platform.is('ios') || this.platform.is('android')
69
79
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - IS-APP ', this.isApp)
70
80
  this.logger.log('[ION-LIST-CONVS-COMP] - ngOnInit - Platform', this.platform.platforms());
71
- this.watchToConnectionStatus();
72
81
  }
73
82
 
83
+
74
84
 
75
- watchToConnectionStatus() {
76
-
77
- this.networkService.checkInternetFunc().subscribe(isOnline => {
78
- this.checkInternet = isOnline
79
- this.logger.log('[ION-LIST-CONVS-COMP] - watchToConnectionStatus - isOnline', this.checkInternet)
80
85
 
81
- // checking internet connection
82
- if (this.checkInternet == true) {
83
86
 
84
- this.isOnline = true;
85
- } else {
86
- this.isOnline = false;
87
- }
88
- });
89
- }
90
87
  // --------------------------------------------------
91
88
  // subdsribe to event
92
89
  // --------------------------------------------------
@@ -34,7 +34,7 @@
34
34
  width="24px" height="24px" viewBox="0 0 24 24">
35
35
  <path fill="none" d="M0 0h24v24H0z"/>
36
36
  <path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>
37
- <title id="altIconTitle">{{ translationMap.get('CLOSED') }}</title>
37
+ <title id="altIconTitle">{{ translationMap?.get('CLOSED') }}</title>
38
38
  </svg>
39
39
  </button>
40
40
  </div>
@@ -8,25 +8,25 @@
8
8
 
9
9
  <div class="signin-title" style="text-align:center">
10
10
  <h2 style="font-family: 'Montserrat', sans-serif; font-weight: 400;">
11
- {{ translationMap.get('LABEL_SIGNIN_TO') }}
11
+ {{ translationMap?.get('LABEL_SIGNIN_TO') }}
12
12
  {{companyName}}
13
13
  </h2>
14
14
  </div>
15
15
  <div class="login-container">
16
16
  <form [formGroup]="userForm" (ngSubmit)="signInWithEmailAndPassword()" novalidate>
17
17
 
18
- <ion-label stacked for="email">{{ translationMap.get('LABEL_EMAIL') }}</ion-label>
18
+ <ion-label stacked for="email">{{ translationMap?.get('LABEL_EMAIL') }}</ion-label>
19
19
  <ion-input #email formControlName="email" type="email" id="email" required autocapitalize="off" spellcheck="false"
20
- placeholder="{{ translationMap.get('LABEL_PLACEHOLDER_EMAIL') }}"
20
+ placeholder="{{ translationMap?.get('LABEL_PLACEHOLDER_EMAIL') }}"
21
21
  [class.invalid]="!userForm.controls.email.valid" ></ion-input>
22
22
  <div *ngIf="formErrors.email" class="is-danger">
23
23
  {{ formErrors.email }}
24
24
  </div>
25
25
 
26
26
 
27
- <ion-label stacked for="password">{{ translationMap.get('LABEL_PASSWORD') }}</ion-label>
27
+ <ion-label stacked for="password">{{ translationMap?.get('LABEL_PASSWORD') }}</ion-label>
28
28
  <ion-input #password formControlName="password" type="password" id="password" required
29
- placeholder="{{ translationMap.get('LABEL_PLACEHOLDER_PASSWORD') }}"
29
+ placeholder="{{ translationMap?.get('LABEL_PLACEHOLDER_PASSWORD') }}"
30
30
  [class.invalid]="!userForm.controls.password.valid"></ion-input>
31
31
 
32
32
  <div *ngIf="formErrors.password" class="is-danger">
@@ -36,23 +36,23 @@
36
36
 
37
37
  <button type="submit" class="btn signin-button ion-activatable ripple-parent" [ngClass]="{'signin-button-is-disabled': !userForm.valid}" [disabled]="!userForm.valid">
38
38
  <span class="signin-button-label" *ngIf="showSpinnerInLoginBtn === false" >
39
- {{ translationMap.get('LABEL_SIGNIN') }}
39
+ {{ translationMap?.get('LABEL_SIGNIN') }}
40
40
  </span>
41
41
  <ion-ripple-effect type="unbounded"></ion-ripple-effect>
42
42
  <ion-spinner *ngIf="showSpinnerInLoginBtn === true" name="bubbles" color="white" duration="2" ></ion-spinner>
43
43
  </button>
44
44
 
45
- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
45
+ <!-- <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
46
46
  {{ translationMap.get('LABEL_DONT_HAVE_AN_ACCOUNT_YET') }}
47
47
  <span style="color: #03a5e8; cursor:pointer" (click)="goToSignupPage()">
48
48
  {{ translationMap.get('LABEL_SIGNUP') }}
49
49
  </span>
50
- </p>
50
+ </p> -->
51
51
 
52
52
  <p style="color: #666666; font-size: 1.1em; text-align: center; margin-top: 16px;">
53
- {{ translationMap.get('LABEL_FORGOT_YOUR_PASSWORD') }}
53
+ {{ translationMap?.get('LABEL_FORGOT_YOUR_PASSWORD') }}
54
54
  <span style="color: #03a5e8; cursor:pointer" (click)="goToResetPsw()">
55
- {{ translationMap.get('LABEL_CLICK_HERE') }}
55
+ {{ translationMap?.get('LABEL_CLICK_HERE') }}
56
56
  </span>
57
57
  </p>
58
58
 
@@ -3,6 +3,7 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
3
3
  import { ToastController, IonInput } from '@ionic/angular';
4
4
  import { AppConfigProvider } from '../../../services/app-config';
5
5
 
6
+
6
7
  // Logger
7
8
  import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
8
9
  import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
@@ -59,7 +60,7 @@ export class LoginComponent implements OnInit {
59
60
  this.buildForm();
60
61
  this.DASHBOARD_URL = this.appConfig.getConfig().dashboardUrl;
61
62
  this.logger.log('LOGIN-COMP OnInit DASHBOARD_URL', this.DASHBOARD_URL)
62
- this.showSpinnerInLoginBtn = false;
63
+ // this.showSpinnerInLoginBtn = false;
63
64
  }
64
65
  // ngAfterViewChecked() {
65
66
  // this.emailInputEl.setFocus()
@@ -61,7 +61,7 @@ export class BubbleMyMessageComponent implements OnInit {
61
61
  * alla chiusura controllo su quale opzione ho premuto e attivo l'azione corrispondete
62
62
  */
63
63
  presentPopover(event, msg) {
64
- console.log('presentPopover');
64
+ // console.log('presentPopover');
65
65
  // let popover = this.popoverCtrl.create(PopoverPage, { typePopup: TYPE_POPUP_DETAIL_MESSAGE, message: msg });
66
66
  // popover.present({
67
67
  // ev: event
@@ -62,7 +62,7 @@ export class BubbleOthersMessageComponent implements OnInit {
62
62
  }
63
63
 
64
64
  presentPopover(event, msg) {
65
- console.log('presentPopover');
65
+ // console.log('presentPopover');
66
66
  }
67
67
 
68
68
  }
@@ -1,25 +1,27 @@
1
+
1
2
  <ion-header no-border class="ion-no-border">
2
3
  <ion-toolbar>
3
4
 
4
5
  <ion-buttons slot="start">
5
- <ion-back-button *ngIf="isMobile"
6
- defaultHref="conversations-list"
7
- (click)="pushPage('conversations-list')">
6
+ <!-- (click)="pushPage('conversations-list')" -->
7
+ <ion-back-button text="" *ngIf="isMobile"
8
+ defaultHref="/conversations-list"
9
+ >
8
10
  </ion-back-button>
9
11
  </ion-buttons>
10
12
 
11
13
  <ion-title [class.info-open]="openInfoConversation || openInfoMessage">
12
14
 
13
- <div *ngIf="conversationAvatar" class="">
14
-
15
- <div *ngIf="conversationAvatar" class="avatar-container">
15
+ <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr">
16
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
17
+ <div *ngIf="conversationAvatar" class="avatar-container" [ngClass] = "{ 'avatar-container-ios': platformName === 'ios' }">
16
18
  <app-avatar-profile
17
19
  [itemAvatar] = conversationAvatar
18
20
  ></app-avatar-profile>
19
21
  </div>
20
-
21
- <div *ngIf="isDirect" class="user-presence">
22
- <app-user-presence
22
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
23
+ <div *ngIf="isDirect" class="user-presence" [ngClass] = "{ 'user-presence-ios': platformName === 'ios' }">
24
+ <app-user-presence
23
25
  [idUser] = conversationAvatar.conversation_with
24
26
  [translationMap] = translationMap
25
27
  [borderColor] = borderColor
@@ -39,9 +41,12 @@
39
41
  </div>
40
42
 
41
43
  </div>
42
-
43
- <div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
44
- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
44
+ <!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
45
+ <div *ngIf="conversationAvatar" class="tile-info-with" (click)="onOpenCloseInfoConversation()"
46
+ [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' }">
47
+ <!-- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span> -->
48
+ <span class="tile-username">{{ conversation_with_fullname }} </span>
49
+
45
50
  </div>
46
51
 
47
52
  <!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">