@chat21/chat21-ionic 3.0.97-rc.1 → 3.0.97-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.
- package/CHANGELOG.md +19 -0
- package/Dockerfile +1 -1
- package/GoogleService-Info.plist +36 -0
- package/config.xml +6 -3
- package/google-services.json +40 -0
- package/package.json +8 -13
- package/resources/ios/icon/icon-1024.png +0 -0
- package/resources/ios/icon/icon-108@2x.png +0 -0
- package/resources/ios/icon/icon-20.png +0 -0
- package/resources/ios/icon/icon-20@2x.png +0 -0
- package/resources/ios/icon/icon-20@3x.png +0 -0
- package/resources/ios/icon/icon-24@2x.png +0 -0
- package/resources/ios/icon/icon-27.5@2x.png +0 -0
- package/resources/ios/icon/icon-29.png +0 -0
- package/resources/ios/icon/icon-29@2x.png +0 -0
- package/resources/ios/icon/icon-29@3x.png +0 -0
- package/resources/ios/icon/icon-40.png +0 -0
- package/resources/ios/icon/icon-40@2x.png +0 -0
- package/resources/ios/icon/icon-40@3x.png +0 -0
- package/resources/ios/icon/icon-44@2x.png +0 -0
- package/resources/ios/icon/icon-50.png +0 -0
- package/resources/ios/icon/icon-50@2x.png +0 -0
- package/resources/ios/icon/icon-60.png +0 -0
- package/resources/ios/icon/icon-60@2x.png +0 -0
- package/resources/ios/icon/icon-60@3x.png +0 -0
- package/resources/ios/icon/icon-72.png +0 -0
- package/resources/ios/icon/icon-72@2x.png +0 -0
- package/resources/ios/icon/icon-76.png +0 -0
- package/resources/ios/icon/icon-76@2x.png +0 -0
- package/resources/ios/icon/icon-83.5@2x.png +0 -0
- package/resources/ios/icon/icon-86@2x.png +0 -0
- package/resources/ios/icon/icon-98@2x.png +0 -0
- package/resources/ios/icon/icon.png +0 -0
- package/resources/ios/icon/icon@2x.png +0 -0
- package/resources/ios/icon.jpg +0 -0
- package/resources/ios/splash/Default-1792h~iphone.png +0 -0
- package/resources/ios/splash/Default-2436h.png +0 -0
- package/resources/ios/splash/Default-2688h~iphone.png +0 -0
- package/resources/ios/splash/Default-568h@2x~iphone.png +0 -0
- package/resources/ios/splash/Default-667h.png +0 -0
- package/resources/ios/splash/Default-736h.png +0 -0
- package/resources/ios/splash/Default-Landscape-1792h~iphone.png +0 -0
- package/resources/ios/splash/Default-Landscape-2436h.png +0 -0
- package/resources/ios/splash/Default-Landscape-2688h~iphone.png +0 -0
- package/resources/ios/splash/Default-Landscape-736h.png +0 -0
- package/resources/ios/splash/Default-Landscape@2x~ipad.png +0 -0
- package/resources/ios/splash/Default-Landscape@~ipadpro.png +0 -0
- package/resources/ios/splash/Default-Landscape~ipad.png +0 -0
- package/resources/ios/splash/Default-Portrait@2x~ipad.png +0 -0
- package/resources/ios/splash/Default-Portrait@~ipadpro.png +0 -0
- package/resources/ios/splash/Default-Portrait~ipad.png +0 -0
- package/resources/ios/splash/Default@2x~iphone.png +0 -0
- package/resources/ios/splash/Default@2x~universal~anyany.png +0 -0
- package/resources/ios/splash/Default~iphone.png +0 -0
- package/src/app/app-routing.module.ts +6 -5
- package/src/app/app.component.html +0 -1
- package/src/app/app.component.ts +58 -26
- package/src/app/app.module.ts +3 -7
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -4
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +0 -38
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +10 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +1 -37
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +0 -4
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +0 -21
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.html +3 -3
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.ts +0 -10
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +14 -12
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +4 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +13 -13
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +14 -9
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +4 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +20 -14
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +11 -13
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +12 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +3 -24
- package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.html +0 -13
- package/src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component.ts +0 -9
- package/src/app/components/conversation-info/conversation-info.module.ts +0 -2
- package/src/app/components/conversation-info/info-content/info-content.component.ts +0 -1
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -11
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.html +4 -10
- package/src/app/components/conversations-list/header-conversations-list/header-conversations-list.component.ts +1 -9
- package/src/app/components/project-item/project-item.component.html +2 -4
- package/src/app/components/project-item/project-item.component.ts +1 -19
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +1 -1
- package/src/app/directives/tooltip.directive.spec.ts +20 -0
- package/src/app/directives/tooltip.directive.ts +134 -0
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -4
- package/src/app/pages/conversation-detail/conversation-detail.page.html +3 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +63 -33
- package/src/app/pages/conversations-list/conversations-list.page.scss +0 -1
- package/src/app/pages/conversations-list/conversations-list.page.ts +101 -19
- package/src/app/pages/profile-info/profile-info.module.ts +4 -2
- package/src/app/pages/profile-info/profile-info.page.html +76 -16
- package/src/app/pages/profile-info/profile-info.page.scss +71 -0
- package/src/app/pages/profile-info/profile-info.page.ts +89 -18
- package/src/app/shared/shared.module.ts +4 -4
- package/src/assets/chat21-logo.png +0 -0
- package/src/assets/images/channel_icons/chat21.svg +3 -0
- package/src/assets/images/channel_icons/direct.svg +3 -0
- package/src/assets/images/channel_icons/email-logo.svg +9 -0
- package/src/assets/images/channel_icons/form-logo_v2.svg +13 -0
- package/src/assets/images/channel_icons/group.svg +3 -0
- package/src/assets/images/channel_icons/messenger-logo.svg +8 -0
- package/src/assets/images/channel_icons/telegram-logo.svg +7 -0
- package/src/assets/images/channel_icons/whatsapp-logo.svg +12 -0
- package/src/assets/logo.png +0 -0
- package/src/assets/tiledesk-solo-logo.png +0 -0
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +1 -16
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +1 -0
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +2 -2
- package/src/chat21-core/utils/constants.ts +7 -0
- package/src/chat21-core/utils/utils.ts +22 -12
- package/src/global.scss +134 -22
- package/src/index.html +1 -2
- package/resources/ios/icon.png +0 -0
- package/src/app/pages/details/details-routing.module.ts +0 -17
- package/src/app/pages/details/details.module.ts +0 -21
- package/src/app/pages/details/details.page.html +0 -28
- package/src/app/pages/details/details.page.scss +0 -23
- package/src/app/pages/details/details.page.spec.ts +0 -24
- package/src/app/pages/details/details.page.ts +0 -65
- package/src/assets/chat21-logo.svg +0 -78
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
1
2
|
import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service';
|
|
2
3
|
import { Component, OnInit, Input, EventEmitter, Output, ViewChild, Renderer2 } from '@angular/core';
|
|
3
4
|
import { ModalController } from '@ionic/angular';
|
|
@@ -20,6 +21,9 @@ import { EventsService } from 'src/app/services/events-service';
|
|
|
20
21
|
// Logger
|
|
21
22
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
22
23
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
24
|
+
import { WebsocketService } from 'src/app/services/websocket/websocket.service';
|
|
25
|
+
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
26
|
+
import { skip } from 'rxjs/operators';
|
|
23
27
|
|
|
24
28
|
@Component({
|
|
25
29
|
selector: 'app-profile-info',
|
|
@@ -27,27 +31,29 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
27
31
|
styleUrls: ['./profile-info.page.scss'],
|
|
28
32
|
})
|
|
29
33
|
export class ProfileInfoPage implements OnInit {
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
|
|
32
35
|
loggedUser: UserModel;
|
|
33
36
|
version: string;
|
|
34
37
|
itemAvatar: any;
|
|
35
|
-
|
|
38
|
+
|
|
39
|
+
public translationsMap: Map<string, string>;
|
|
36
40
|
private logger: LoggerService = LoggerInstance.getInstance();
|
|
37
41
|
|
|
38
42
|
private subscriptions = [];
|
|
39
43
|
borderColor = '#2d323e';
|
|
40
44
|
fontColor = '#949494';
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'
|
|
50
|
-
|
|
45
|
+
|
|
46
|
+
@Input() selectedStatus: number;
|
|
47
|
+
@Input() profile_name_translated: string;
|
|
48
|
+
@Input() token: string;
|
|
49
|
+
@Input() project: { _id: string, name: string, type: string, isActiveSubscription: boolean, plan_name: string}
|
|
50
|
+
|
|
51
|
+
isVisiblePAY: boolean;
|
|
52
|
+
teammateStatus = [
|
|
53
|
+
{ id: 1, name: 'Available', avatar: 'assets/images/teammate-status/avaible.svg', label: "LABEL_AVAILABLE" },
|
|
54
|
+
{ id: 2, name: 'Unavailable', avatar: 'assets/images/teammate-status/unavaible.svg', label: "LABEL_NOT_AVAILABLE" },
|
|
55
|
+
{ id: 3, name: 'Inactive', avatar: 'assets/images/teammate-status/inactive.svg', label: "LABEL_INACTIVE" },
|
|
56
|
+
];
|
|
51
57
|
|
|
52
58
|
constructor(
|
|
53
59
|
private modalController: ModalController,
|
|
@@ -57,7 +63,9 @@ export class ProfileInfoPage implements OnInit {
|
|
|
57
63
|
public presenceService: PresenceService,
|
|
58
64
|
public events: EventsService,
|
|
59
65
|
private imageRepo: ImageRepoService,
|
|
60
|
-
public renderer: Renderer2
|
|
66
|
+
public renderer: Renderer2,
|
|
67
|
+
public wsService: WebsocketService,
|
|
68
|
+
public appConfigProvider: AppConfigProvider,
|
|
61
69
|
) { }
|
|
62
70
|
|
|
63
71
|
/** */
|
|
@@ -79,6 +87,7 @@ export class ProfileInfoPage implements OnInit {
|
|
|
79
87
|
/** */
|
|
80
88
|
initialize() {
|
|
81
89
|
this.setUser();
|
|
90
|
+
this.getOSCODE();
|
|
82
91
|
this.setSubscriptions();
|
|
83
92
|
}
|
|
84
93
|
|
|
@@ -114,8 +123,13 @@ export class ProfileInfoPage implements OnInit {
|
|
|
114
123
|
'ARRAY_DAYS',
|
|
115
124
|
'LABEL_IS_WRITING',
|
|
116
125
|
'LABEL_LOGOUT'
|
|
126
|
+
|
|
117
127
|
];
|
|
118
|
-
this.
|
|
128
|
+
this.translationsMap = this.translateService.translateLanguage(keys);
|
|
129
|
+
|
|
130
|
+
this.teammateStatus.forEach(element => {
|
|
131
|
+
element.label = this.translationsMap.get(element.label)
|
|
132
|
+
});
|
|
119
133
|
}
|
|
120
134
|
|
|
121
135
|
|
|
@@ -155,9 +169,9 @@ export class ProfileInfoPage implements OnInit {
|
|
|
155
169
|
this.logger.log('[PROFILE-INFO-PAGE] userIsOnLine - userId ', userId, ' - isOnline ', isOnline);
|
|
156
170
|
this.itemAvatar.online = isOnline;
|
|
157
171
|
if (isOnline) {
|
|
158
|
-
this.itemAvatar.status = this.
|
|
172
|
+
this.itemAvatar.status = this.translationsMap.get('LABEL_AVAILABLE');
|
|
159
173
|
} else {
|
|
160
|
-
this.itemAvatar.status = this.
|
|
174
|
+
this.itemAvatar.status = this.translationsMap.get('LABEL_NOT_AVAILABLE');
|
|
161
175
|
}
|
|
162
176
|
}
|
|
163
177
|
|
|
@@ -165,7 +179,7 @@ export class ProfileInfoPage implements OnInit {
|
|
|
165
179
|
userLastConnection = (userId: string, timestamp: string) => {
|
|
166
180
|
this.logger.log('[PROFILE-INFO-PAGE] userLastConnection - userId ', userId, ' - timestamp ', timestamp);
|
|
167
181
|
if (timestamp && timestamp !== '') {
|
|
168
|
-
const lastConnectionDate = setLastDateWithLabels(this.
|
|
182
|
+
const lastConnectionDate = setLastDateWithLabels(this.translationsMap, timestamp);
|
|
169
183
|
this.itemAvatar.lastConnection = lastConnectionDate;
|
|
170
184
|
if (!this.itemAvatar.online) {
|
|
171
185
|
this.itemAvatar.status = lastConnectionDate;
|
|
@@ -208,6 +222,63 @@ export class ProfileInfoPage implements OnInit {
|
|
|
208
222
|
this.events.publish('profileInfoButtonClick:logout', true);
|
|
209
223
|
}
|
|
210
224
|
|
|
225
|
+
changeAvailabilityStateInUserDetailsSidebar(selectedStatusID) {
|
|
226
|
+
this.logger.log('[PROFILE-INFO-PAGE] - changeAvailabilityState projectid', this.project._id, ' available 1: ', selectedStatusID);
|
|
227
|
+
|
|
228
|
+
let IS_AVAILABLE = null
|
|
229
|
+
let profilestatus = ''
|
|
230
|
+
if (selectedStatusID === 1) {
|
|
231
|
+
IS_AVAILABLE = true
|
|
232
|
+
} else if (selectedStatusID === 2) {
|
|
233
|
+
IS_AVAILABLE = false
|
|
234
|
+
} else if (selectedStatusID === 3) {
|
|
235
|
+
IS_AVAILABLE = false
|
|
236
|
+
profilestatus = 'inactive'
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
this.wsService.updateCurrentUserAvailability(this.token, this.project._id, IS_AVAILABLE, profilestatus).subscribe((projectUser: any) => {
|
|
240
|
+
|
|
241
|
+
this.logger.log('[PROFILE-INFO-PAGE] - PROJECT-USER UPDATED ', projectUser)
|
|
242
|
+
|
|
243
|
+
}, (error) => {
|
|
244
|
+
this.logger.error('[PROFILE-INFO-PAGE] - PROJECT-USER UPDATED - ERROR ', error);
|
|
245
|
+
|
|
246
|
+
}, () => {
|
|
247
|
+
this.logger.log('[PROFILE-INFO-PAGE] - PROJECT-USER UPDATED * COMPLETE *');
|
|
248
|
+
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
getOSCODE() {
|
|
254
|
+
let public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK;
|
|
255
|
+
this.logger.log('[PROFILE-INFO-PAGE] AppConfigService getAppConfig public_Key', public_Key);
|
|
256
|
+
this.logger.log('[PROFILE-INFO-PAGE] AppConfigService getAppConfig', this.appConfigProvider.getConfig());
|
|
257
|
+
if (public_Key) {
|
|
258
|
+
let keys = public_Key.split("-");
|
|
259
|
+
this.logger.log('[PROFILE-INFO-PAGE] PUBLIC-KEY - public_Key keys', keys)
|
|
260
|
+
|
|
261
|
+
keys.forEach(key => {
|
|
262
|
+
if (key.includes("PAY")) {
|
|
263
|
+
|
|
264
|
+
let pay = key.split(":");
|
|
265
|
+
|
|
266
|
+
if (pay[1] === "F") {
|
|
267
|
+
this.isVisiblePAY = false;
|
|
268
|
+
} else {
|
|
269
|
+
this.isVisiblePAY = true;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
if (!public_Key.includes("PAY")) {
|
|
275
|
+
this.isVisiblePAY = false;
|
|
276
|
+
}
|
|
277
|
+
} else {
|
|
278
|
+
this.isVisiblePAY = false;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
211
282
|
copyLoggedUserUID() {
|
|
212
283
|
var copyText = document.createElement("input");
|
|
213
284
|
copyText.setAttribute("type", "text");
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TooltipDirective } from './../directives/tooltip.directive';
|
|
1
2
|
import { OptionsComponent } from './../chatlib/conversation-detail/message/options/options.component';
|
|
2
3
|
import { HeaderConversationsListUnassigned } from './../components/conversations-list/header-conversations-list-unassigned/header-conversations-list-unassigned.component';
|
|
3
4
|
import { NavbarComponent } from './../components/navbar/navbar.component';
|
|
@@ -29,7 +30,7 @@ import { HeaderConversationsListArchived } from 'src/app/components/conversation
|
|
|
29
30
|
import { UserPresenceComponent } from 'src/app/components/utils/user-presence/user-presence.component';
|
|
30
31
|
import { UserTypingComponent } from 'src/chat21-core/utils/user-typing/user-typing.component';
|
|
31
32
|
import { ListConversationsComponent } from '../chatlib/list-conversations-component/list-conversations/list-conversations.component';
|
|
32
|
-
import { MomentModule } from '
|
|
33
|
+
import { MomentModule } from 'ngx-moment';
|
|
33
34
|
import { AvatarComponent } from 'src/app/chatlib/conversation-detail/message/avatar/avatar.component';
|
|
34
35
|
import { MarkedPipe } from 'src/app/directives/marked.pipe';
|
|
35
36
|
import { AutofocusDirective } from 'src/app/directives/autofocus.directive';
|
|
@@ -40,13 +41,11 @@ import { InfoSupportGroupComponent } from 'src/app/components/conversation-info/
|
|
|
40
41
|
import { InfoDirectComponent } from 'src/app/components/conversation-info/info-direct/info-direct.component';
|
|
41
42
|
import { AdvancedInfoAccordionComponent } from 'src/app/components/conversation-info/advanced-info-accordion/advanced-info-accordion.component';
|
|
42
43
|
import { InfoGroupComponent } from 'src/app/components/conversation-info/info-group/info-group.component';
|
|
43
|
-
import { TooltipModule, TooltipOptions } from 'ng2-tooltip-directive';
|
|
44
44
|
import { MessageAttachmentComponent } from 'src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component';
|
|
45
45
|
import { ImageViewerComponent } from 'src/app/components/image-viewer/image-viewer.component';
|
|
46
46
|
import { SidebarComponent } from 'src/app/components/sidebar/sidebar.component';
|
|
47
47
|
import { SidebarUserDetailsComponent } from 'src/app/components/sidebar-user-details/sidebar-user-details.component';
|
|
48
48
|
import { ProjectItemComponent } from 'src/app/components/project-item/project-item.component';
|
|
49
|
-
import { DefaultTooltipOptions } from 'src/chat21-core/utils/utils';
|
|
50
49
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
51
50
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
52
51
|
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
@@ -92,6 +91,7 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
92
91
|
AutofocusDirective,
|
|
93
92
|
HtmlEntitiesEncodePipe,
|
|
94
93
|
SafeHtmlPipe,
|
|
94
|
+
TooltipDirective,
|
|
95
95
|
HeaderConversationsListArchived,
|
|
96
96
|
HeaderConversationsListUnassigned,
|
|
97
97
|
NetworkOfflineComponent
|
|
@@ -99,6 +99,7 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
99
99
|
exports: [
|
|
100
100
|
// MessageTextAreaComponent,
|
|
101
101
|
AutofocusDirective,
|
|
102
|
+
TooltipDirective,
|
|
102
103
|
AvatarProfileComponent,
|
|
103
104
|
HeaderConversationsList,
|
|
104
105
|
ImageViewerComponent,
|
|
@@ -141,7 +142,6 @@ import { SafeHtmlPipe } from '../directives/safe-html.pipe';
|
|
|
141
142
|
MomentModule,
|
|
142
143
|
NgSelectModule,
|
|
143
144
|
FormsModule,
|
|
144
|
-
TooltipModule.forRoot(DefaultTooltipOptions as TooltipOptions)
|
|
145
145
|
|
|
146
146
|
],
|
|
147
147
|
schemas: [
|
|
Binary file
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" data-v-78d18411="" width="15" height="15" fill="none" viewBox="0 0 24 24" class="inbox-icon">
|
|
2
|
+
<path d="M22.002 12C22.002 6.477 17.524 2 12 2 6.476 1.999 2 6.477 2 12.001c0 5.186 3.947 9.45 9.001 9.952V20.11c-.778-.612-1.478-1.905-1.939-3.61h1.94V15H8.737a18.969 18.969 0 0 1-.135-5h6.794c.068.64.105 1.31.105 2h1.5c0-.684-.033-1.353-.095-2h3.358c.154.64.237 1.31.237 2h1.5ZM4.786 16.5h2.722l.102.396c.317 1.17.748 2.195 1.27 3.015a8.532 8.532 0 0 1-4.094-3.41ZM3.736 10h3.358a20.847 20.847 0 0 0-.095 2c0 1.043.075 2.051.217 3H4.043a8.483 8.483 0 0 1-.544-3c0-.682.08-1.347.232-1.983L3.736 10Zm5.122-5.902.023-.008C8.16 5.222 7.611 6.748 7.298 8.5H4.25c.905-2 2.56-3.587 4.608-4.402Zm3.026-.594L12 3.5l.126.006c1.262.126 2.48 2.125 3.045 4.995H8.83c.568-2.878 1.79-4.88 3.055-4.996Zm3.343.76-.107-.174.291.121a8.533 8.533 0 0 1 4.339 4.29h-3.048c-.298-1.665-.806-3.125-1.475-4.237Z M12 19a1 1 0 0 0 1 1h3v2h-.5a.5.5 0 1 0 0 1h4a.5.5 0 0 0 0-1H19v-2h3a1 1 0 0 0 1-1v-5a1 1 0 0 0-1-1h-9a1 1 0 0 0-1 1v5Z" fill="currentColor"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="15" width="15" viewBox="0 0 512 512"
|
|
3
|
+
style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#2C3E48" d="M502.3,190.8c3.9-3.1,9.7-0.2,9.7,4.7V400c0,26.5-21.5,48-48,48H48c-26.5,0-48-21.5-48-48V195.6
|
|
5
|
+
c0-5,5.7-7.8,9.7-4.7c22.4,17.4,52.1,39.5,154.1,113.6c21.1,15.4,56.7,47.8,92.2,47.6c35.7,0.3,72-32.8,92.3-47.6
|
|
6
|
+
C450.3,230.4,479.9,208.2,502.3,190.8z M256,320c23.2,0.4,56.6-29.2,73.4-41.4c132.7-96.3,142.8-104.7,173.4-128.7
|
|
7
|
+
c5.8-4.5,9.2-11.5,9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5,64,0,85.5,0,112v19c0,7.4,3.4,14.3,9.2,18.9
|
|
8
|
+
c30.6,23.9,40.7,32.4,173.4,128.7C199.4,290.8,232.8,320.4,256,320L256,320z"/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#779bbb" d="M450,432V80c0-26.5-21.5-48-48-48H50C23.5,32,2,53.5,2,80v352c0,26.5,21.5,48,48,48h352
|
|
5
|
+
C428.5,480,450,458.5,450,432z M114,192c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h226c8.8,0,16,7.2,16,16l1,32
|
|
6
|
+
c0,8.8-8.2,16-17,16H114z M114,288c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h155c8.8,0,16,7.2,16,16v32c0,8.8-7.2,16-16,16H114z
|
|
7
|
+
M114,384c-8.8,0-16-7.2-16-16v-32c0-8.8,7.2-16,16-16h111c8.8,0,16,7.2,16,16v32c0,8.8-7.2,16-16,16H114z"/>
|
|
8
|
+
<g>
|
|
9
|
+
<polygon fill="#779bbb" points="405.1,237.6 365,204.1 262.4,336.1 262.3,378.6 302.4,369.6 "/>
|
|
10
|
+
<path fill="#779bbb" d="M427.8,197L398,172.1c-2.8-2.4-7-1.9-9.2,1L371.8,195l40.1,33.5l17.1-21.9C431.1,203.7,430.7,199.4,427.8,197z
|
|
11
|
+
"/>
|
|
12
|
+
</g>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="15" width="15" viewBox="0 0 24 24" fill="#000000">
|
|
2
|
+
<path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" height="15" width="15" viewBox="0 0 512 512"
|
|
2
|
+
style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
3
|
+
<path fill="#2C3E48" d="M256.5,8C116.5,8,8,110.3,8,248.6c0,72.3,29.7,134.8,78.1,177.9c8.3,7.5,6.6,11.9,8.1,58.2
|
|
4
|
+
c0.4,11,9.6,19.6,20.6,19.2c2.5-0.1,5-0.6,7.3-1.7c52.9-23.3,53.6-25.1,62.6-22.7c153.3,42.2,319.4-55.9,319.4-231
|
|
5
|
+
C504,110.3,396.6,8,256.5,8z M405.8,193.1l-73,115.6c-11.1,17.4-34.1,22.6-51.6,11.5c-0.8-0.5-1.6-1-2.3-1.6l-58.1-43.5
|
|
6
|
+
c-5.3-4-12.7-4-18,0l-78.4,59.4c-10.5,7.9-24.2-4.6-17.1-15.7l73-115.6c11-17.4,34.1-22.6,51.6-11.6c0.8,0.5,1.6,1.1,2.4,1.6
|
|
7
|
+
l58.1,43.5c5.3,4,12.7,4,18,0l78.4-59.4C399.1,169.5,412.8,182,405.8,193.1L405.8,193.1z"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="#2C3E48" d="M446.7,98.6l-67.6,318.8c-5.1,22.5-18.4,28.1-37.3,17.5l-103-75.9l-49.7,47.8c-5.5,5.5-10.1,10.1-20.7,10.1
|
|
5
|
+
l7.4-104.9l190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8,284L16.2,252.2c-22.1-6.9-22.5-22.1,4.6-32.7L418.2,66.4
|
|
6
|
+
C436.6,59.5,452.7,70.5,446.7,98.6z"/>
|
|
7
|
+
</svg>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg focusable="false"
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 448 512" height="15" width="15"
|
|
3
|
+
style="enable-background:new 0 0 448 512;" xml:space="preserve">
|
|
4
|
+
<path fill="2C3E48" d="M380.9,97.1C339,55.1,283.2,32,223.9,32c-122.4,0-222,99.6-222,222c0,39.1,10.2,77.3,29.6,111L0,480l117.7-30.9
|
|
5
|
+
c32.4,17.7,68.9,27,106.1,27h0.1c122.3,0,224.1-99.6,224.1-222C448,194.8,422.8,139.1,380.9,97.1z M223.9,438.7
|
|
6
|
+
c-33.2,0-65.7-8.9-94-25.7l-6.7-4l-69.8,18.3L72,359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2c0-101.7,82.8-184.5,184.6-184.5
|
|
7
|
+
c49.3,0,95.6,19.2,130.4,54.1s56.2,81.2,56.1,130.5C410.5,355.9,325.6,438.7,223.9,438.7z M325.1,300.5c-5.5-2.8-32.8-16.2-37.9-18
|
|
8
|
+
c-5.1-1.9-8.8-2.8-12.5,2.8c-3.7,5.6-14.3,18-17.6,21.8c-3.2,3.7-6.5,4.2-12,1.4c-32.6-16.3-54-29.1-75.5-66
|
|
9
|
+
c-5.7-9.8,5.7-9.1,16.3-30.3c1.8-3.7,0.9-6.9-0.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5c-3.2-0.2-6.9-0.2-10.6-0.2
|
|
10
|
+
c-3.7,0-9.7,1.4-14.8,6.9c-5.1,5.6-19.4,19-19.4,46.3s19.9,53.7,22.6,57.4c2.8,3.7,39.1,59.7,94.8,83.8c35.2,15.2,49,16.5,66.6,13.9
|
|
11
|
+
c10.7-1.6,32.8-13.4,37.4-26.4s4.6-24.1,3.2-26.4C334.3,304.6,330.6,303.2,325.1,300.5z"/>
|
|
12
|
+
</svg>
|
package/src/assets/logo.png
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
2
|
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { ActivatedRoute } from '@angular/router';
|
|
5
|
-
import { ConnectionService } from 'ng-connection-service';
|
|
6
4
|
// firebase
|
|
7
5
|
// import * as firebase from 'firebase/app';
|
|
8
6
|
import firebase from "firebase/app";
|
|
@@ -19,21 +17,10 @@ import { MessagingAuthService } from '../abstract/messagingAuth.service';
|
|
|
19
17
|
import { UserModel } from '../../models/user';
|
|
20
18
|
|
|
21
19
|
// utils
|
|
22
|
-
import {
|
|
23
|
-
avatarPlaceholder,
|
|
24
|
-
getColorBck,
|
|
25
|
-
} from '../../utils/utils-user';
|
|
26
|
-
import { resolve } from 'url';
|
|
27
20
|
import { CustomLogger } from '../logger/customLogger';
|
|
28
21
|
import { AppStorageService } from '../abstract/app-storage.service';
|
|
29
22
|
import { LoggerInstance } from '../logger/loggerInstance';
|
|
30
23
|
import { LoggerService } from '../abstract/logger.service';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
import { Observable, Observer, fromEvent, merge } from 'rxjs';
|
|
34
|
-
import { map } from 'rxjs/operators'
|
|
35
|
-
import { Network } from '@ionic-native/network/ngx';
|
|
36
|
-
|
|
37
24
|
// @Injectable({ providedIn: 'root' })
|
|
38
25
|
@Injectable()
|
|
39
26
|
export class FirebaseAuthService extends MessagingAuthService {
|
|
@@ -57,9 +44,7 @@ export class FirebaseAuthService extends MessagingAuthService {
|
|
|
57
44
|
isConnected = true;
|
|
58
45
|
unsubscribe: any;
|
|
59
46
|
constructor(
|
|
60
|
-
public http: HttpClient
|
|
61
|
-
private network: Network,
|
|
62
|
-
private connectionService: ConnectionService
|
|
47
|
+
public http: HttpClient
|
|
63
48
|
) {
|
|
64
49
|
super();
|
|
65
50
|
// this.initialize()
|
|
@@ -98,6 +98,7 @@ export class MQTTConversationHandler extends ConversationHandlerService {
|
|
|
98
98
|
}
|
|
99
99
|
this.chat21Service.chatClient.lastMessages(this.conversationWith, (err, messages) => {
|
|
100
100
|
if (!err) {
|
|
101
|
+
messages.sort(compareValues('timestamp', 'asc'));
|
|
101
102
|
messages.forEach(message => {
|
|
102
103
|
const msg: MessageModel = message;
|
|
103
104
|
msg.uid = message.message_id;
|
|
@@ -36,10 +36,10 @@ export class MQTTNotifications extends NotificationsService {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
getNotificationPermissionAndSaveToken(currentUserUid) {
|
|
39
|
-
|
|
39
|
+
this.logger.log("[MQTTNotificationService] getNotificationPermissionAndSaveToken()",currentUserUid );
|
|
40
40
|
this.userId = currentUserUid;
|
|
41
41
|
if (firebase.messaging.isSupported()) {
|
|
42
|
-
|
|
42
|
+
this.logger.log("[MQTTNotificationService] firebase.messaging.isSupported -> YES");
|
|
43
43
|
const messaging = firebase.messaging();
|
|
44
44
|
// messaging.requestPermission()
|
|
45
45
|
Notification.requestPermission().then((permission) => {
|
|
@@ -39,6 +39,12 @@ export const BCK_COLOR_CONVERSATION_UNSELECTED = '#FFFFFF ';
|
|
|
39
39
|
|
|
40
40
|
export const TYPE_SUPPORT_GROUP = 'support-group';
|
|
41
41
|
export const CHANNEL_TYPE_GROUP = 'group';
|
|
42
|
+
export const CHANNEL_TYPE_CHAT21 = 'chat21';
|
|
43
|
+
export const CHANNEL_TYPE_EMAIL = 'email';
|
|
44
|
+
export const CHANNEL_TYPE_FORM = 'form';
|
|
45
|
+
export const CHANNEL_TYPE_MESSANGER = 'messanger';
|
|
46
|
+
export const CHANNEL_TYPE_WHATSAPP = 'whatsapp';
|
|
47
|
+
export const CHANNEL_TYPE_TELEGRAM = 'telegram';
|
|
42
48
|
|
|
43
49
|
// TYPES MESSAGES
|
|
44
50
|
export const TYPE_MSG_TEXT = 'text';
|
|
@@ -46,6 +52,7 @@ export const TYPE_MSG_IMAGE = 'image';
|
|
|
46
52
|
export const TYPE_MSG_FILE = 'file';
|
|
47
53
|
export const TYPE_MSG_BUTTON = 'button';
|
|
48
54
|
export const TYPE_MSG_EMAIL = 'email';
|
|
55
|
+
export const TYPE_MSG_FORM = 'form';
|
|
49
56
|
|
|
50
57
|
export const MAX_WIDTH_IMAGES = 300;
|
|
51
58
|
export const MIN_WIDTH_IMAGES = 130;
|
|
@@ -12,7 +12,6 @@ import { ConversationModel } from '../models/conversation';
|
|
|
12
12
|
import { MAX_WIDTH_IMAGES, TYPE_DIRECT, TYPE_SUPPORT_GROUP } from './constants';
|
|
13
13
|
|
|
14
14
|
import { avatarPlaceholder, getColorBck } from './utils-user';
|
|
15
|
-
import { TooltipOptions } from 'ng2-tooltip-directive';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Shortest description for phone and tablet
|
|
@@ -30,17 +29,6 @@ export function windowsMatchMedia() {
|
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
export const DefaultTooltipOptions: TooltipOptions = {
|
|
35
|
-
'show-delay': 500,
|
|
36
|
-
'tooltip-class': 'chat-tooltip',
|
|
37
|
-
'theme': 'light',
|
|
38
|
-
'shadow': false,
|
|
39
|
-
'hide-delay-mobile': 0,
|
|
40
|
-
'hideDelayAfterClick': 3000,
|
|
41
|
-
'hide-delay': 200
|
|
42
|
-
}
|
|
43
|
-
|
|
44
32
|
/**
|
|
45
33
|
* chiamata da ChatConversationsHandler
|
|
46
34
|
* restituisce url '/conversations'
|
|
@@ -585,11 +573,14 @@ export function setConversationAvatar(
|
|
|
585
573
|
conversationWithEmail?: string,
|
|
586
574
|
projectId?: string,
|
|
587
575
|
project_name?: string,
|
|
576
|
+
channel?: string,
|
|
588
577
|
width?: string,
|
|
589
578
|
height?: string,
|
|
590
579
|
): any {
|
|
591
580
|
const conversationWidth = (width) ? width : '40px';
|
|
592
581
|
const conversationHeight = (height) ? height : '40px';
|
|
582
|
+
const conversationChannel = (channel) ? channel : 'chat21';
|
|
583
|
+
|
|
593
584
|
const conversationAvatar = {
|
|
594
585
|
uid: conversationWith,
|
|
595
586
|
conversation_with: conversationWith,
|
|
@@ -600,6 +591,7 @@ export function setConversationAvatar(
|
|
|
600
591
|
color: getColorBck(conversationWithFullname),
|
|
601
592
|
projectId: projectId,
|
|
602
593
|
project_name: project_name,
|
|
594
|
+
channel: conversationChannel,
|
|
603
595
|
width: conversationWidth,
|
|
604
596
|
height: conversationHeight
|
|
605
597
|
};
|
|
@@ -824,6 +816,24 @@ export function checkPlatformIsMobile() {
|
|
|
824
816
|
return false;
|
|
825
817
|
}
|
|
826
818
|
|
|
819
|
+
export function isOniOSMobileDevice(): boolean {
|
|
820
|
+
let IS_ON_IOS_MOBILE_DEVICE = false;
|
|
821
|
+
if (/iPad|iPhone|iPod/i.test(window.navigator.userAgent)) {
|
|
822
|
+
IS_ON_IOS_MOBILE_DEVICE = true;
|
|
823
|
+
|
|
824
|
+
}
|
|
825
|
+
// console.log('[CONVS-DETAIL][HEADER] IS_ON_IOS_MOBILE_DEVICE ', this.IS_ON_IOS_MOBILE_DEVICE)
|
|
826
|
+
return IS_ON_IOS_MOBILE_DEVICE;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export function isOnMobileDevice() {
|
|
830
|
+
let IS_ON_MOBILE_DEVICE = false;
|
|
831
|
+
if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
832
|
+
IS_ON_MOBILE_DEVICE = true;
|
|
833
|
+
}
|
|
834
|
+
// this.logger.log('[APP-COMP] IS_ON_MOBILE_DEVICE', this.IS_ON_MOBILE_DEVICE)
|
|
835
|
+
return IS_ON_MOBILE_DEVICE;
|
|
836
|
+
}
|
|
827
837
|
|
|
828
838
|
export function checkWindowWidthIsLessThan991px() {
|
|
829
839
|
// console.log('UTILS - checkWindowWidthIsLessThan991px:: ', window.innerWidth);
|