@chat21/chat21-ionic 3.0.59-rc2 → 3.0.59-rc21
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 +72 -1
- package/README.md +5 -0
- package/config.xml +2 -2
- package/env.sample +3 -1
- package/package.json +1 -1
- package/resources/Android/splash/drawable-land-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-land-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-hdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-ldpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-mdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxhdpi-screen.png +0 -0
- package/resources/Android/splash/drawable-port-xxxhdpi-screen.png +0 -0
- package/resources/Android/splash.png +0 -0
- package/src/app/app-routing.module.ts +21 -17
- package/src/app/app.component.scss +10 -5
- package/src/app/app.component.ts +339 -65
- package/src/app/app.module.ts +16 -8
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.html +1 -1
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +20 -8
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +0 -144
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -17
- package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.html +1 -1
- package/src/app/components/authentication/login/login.component.html +10 -10
- package/src/app/components/authentication/login/login.component.ts +2 -1
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +2 -4
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +7 -2
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +20 -15
- package/src/app/components/ddp-header/ddp-header.component.html +1 -1
- package/src/app/components/ddp-header/ddp-header.component.ts +4 -2
- package/src/app/components/project-item/project-item.component.html +147 -0
- package/src/app/components/project-item/project-item.component.scss +669 -0
- package/src/app/components/project-item/project-item.component.spec.ts +24 -0
- package/src/app/components/project-item/project-item.component.ts +317 -0
- package/src/app/components/utils/avatar-profile/avatar-profile.component.html +9 -3
- package/src/app/pages/authentication/login/login.page.html +1 -2
- package/src/app/pages/authentication/login/login.page.ts +1 -1
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +26 -22
- package/src/app/pages/conversations-list/conversations-list.page.html +45 -23
- package/src/app/pages/conversations-list/conversations-list.page.scss +290 -127
- package/src/app/pages/conversations-list/conversations-list.page.ts +189 -17
- package/src/app/pages/unassigned-conversations/unassigned-conversations-routing.module.ts +17 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.module.ts +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +22 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +79 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.spec.ts +24 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +108 -0
- package/src/app/services/app-config.ts +77 -5
- package/src/app/services/tiledesk/tiledesk.service.ts +22 -1
- package/src/app/services/websocket/websocket-js.ts +557 -0
- package/src/app/services/websocket/websocket.service.spec.ts +12 -0
- package/src/app/services/websocket/websocket.service.ts +274 -0
- package/src/app/shared/shared.module.ts +3 -0
- package/src/assets/i18n/en.json +9 -1
- package/src/assets/i18n/it.json +9 -1
- package/src/assets/js/chat21client.js +144 -82
- package/src/assets/logo.png +0 -0
- package/src/assets/transparent.png +0 -0
- package/src/chat-config-pre-test.json +3 -1
- package/src/chat-config-template.json +4 -1
- package/src/chat-config.json +4 -1
- package/src/chat21-core/providers/firebase/firebase-auth-service.ts +2 -2
- package/src/chat21-core/providers/firebase/firebase-notifications.ts +31 -23
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +27 -27
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +3 -5
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +13 -5
- package/src/chat21-core/providers/mqtt/mqtt-notifications.ts +101 -11
- package/src/chat21-core/providers/tiledesk/tiledesk-auth.service.ts +13 -4
- package/src/chat21-core/utils/utils-message.ts +2 -2
- package/src/firebase-messaging-sw-template.js +1 -1
- package/src/assets/images/tiledesk_logo_50x50.png +0 -0
|
@@ -18,18 +18,90 @@ export class AppConfigProvider {
|
|
|
18
18
|
|
|
19
19
|
/** */
|
|
20
20
|
loadAppConfig() {
|
|
21
|
-
const that = this;
|
|
22
|
-
return this.http.get(this.appConfig.remoteConfigUrl).toPromise().then(data => {
|
|
23
|
-
|
|
21
|
+
// const that = this;
|
|
22
|
+
// return this.http.get(this.appConfig.remoteConfigUrl).toPromise().then(data => {
|
|
23
|
+
// that.appConfig = data;
|
|
24
|
+
// }).catch(err => {
|
|
25
|
+
// console.log('error loadAppConfig' + err);
|
|
26
|
+
// });
|
|
27
|
+
|
|
28
|
+
// ---- new
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
return this.http.get(this.appConfig.remoteConfigUrl)
|
|
32
|
+
.toPromise().then((data: any ) => {
|
|
33
|
+
// console.log('AppConfigService loadAppConfig data: ', data);
|
|
34
|
+
|
|
35
|
+
const allconfig = data
|
|
36
|
+
// console.log('[APP-CONFIG-SERVICE] - loadAppConfig allconfig: ', allconfig);
|
|
37
|
+
|
|
38
|
+
if (allconfig.hasOwnProperty('wsUrlRel')) {
|
|
39
|
+
|
|
40
|
+
// console.log('[APP-CONFIG-SERVICE] - loadAppConfig allconfig !!!! exist wsUrlRel ->: ', allconfig.wsUrlRel);
|
|
41
|
+
var wsUrlRelIsEmpty = this.isEmpty(allconfig.wsUrlRel)
|
|
42
|
+
// console.log('[APP-CONFIG-SERVICE] - loadAppConfig allconfig !!!! exist wsUrlRel -> wsUrlRelIsEmpty ?', wsUrlRelIsEmpty);
|
|
43
|
+
|
|
44
|
+
if (wsUrlRelIsEmpty === false) {
|
|
45
|
+
// console.log('[APP-CONFIG-SERVICE]- loadAppConfig allconfig !!!! exist - SERVER_BASE_URL', data.apiUrl);
|
|
46
|
+
|
|
47
|
+
// if (allconfig.apiUrl.indexOf("http://") !== -1) {
|
|
48
|
+
|
|
49
|
+
// const ws_url = allconfig.apiUrl.replace("http://", "ws://").slice(0, -1) + allconfig.wsUrlRel;
|
|
50
|
+
// // console.log('AppConfigService loadAppConfig allconfig !!!! exist - SERVER_BASE_URL protocol is HTTP - wsUrl', ws_url);
|
|
51
|
+
|
|
52
|
+
// allconfig.wsUrl = ws_url
|
|
53
|
+
|
|
54
|
+
// } else if (allconfig.apiUrl.indexOf("https://") !== -1) {
|
|
55
|
+
|
|
56
|
+
// const ws_url = allconfig.apiUrl.replace("https://", "wss://").slice(0, -1) + allconfig.wsUrlRel;
|
|
57
|
+
|
|
58
|
+
// allconfig.wsUrl = ws_url
|
|
59
|
+
|
|
60
|
+
// // console.log('AppConfigService loadAppConfig allconfig !!!! exist - SERVER_BASE_URL protocol is HTTPS - wsUrl', ws_url);
|
|
61
|
+
// } else {
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
// console.log('AppConfigService loadAppConfig allconfig !!!! exist - SERVER_BASE_URL !!! IS RELATIVE - window.location ', window.location);
|
|
65
|
+
|
|
66
|
+
// console.log(window.location)
|
|
67
|
+
|
|
68
|
+
if (window.location.protocol === 'http:') {
|
|
69
|
+
allconfig.wsUrl = 'ws://' + window.location.hostname + allconfig.wsUrlRel
|
|
70
|
+
|
|
71
|
+
} else if (window.location.protocol === 'https:') {
|
|
72
|
+
|
|
73
|
+
allconfig.wsUrl = 'wss://' + window.location.hostname + allconfig.wsUrlRel
|
|
74
|
+
} else {
|
|
75
|
+
|
|
76
|
+
allconfig.wsUrl = 'ws://' + window.location.hostname + allconfig.wsUrlRel
|
|
77
|
+
}
|
|
78
|
+
// }
|
|
79
|
+
|
|
80
|
+
} else {
|
|
81
|
+
// console.log('[APP-CONFIG-SERVICE] loadAppConfig allconfig !!!! exist wsUrlRel but IS EMPTY');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
} else {
|
|
85
|
+
|
|
86
|
+
// console.log('[APP-CONFIG-SERVICE] loadAppConfig allconfig !!!! does not exist wsUrlRel');
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.appConfig = allconfig;
|
|
90
|
+
|
|
91
|
+
|
|
24
92
|
}).catch(err => {
|
|
25
|
-
|
|
93
|
+
console.error('error loadAppConfig' + err);
|
|
26
94
|
});
|
|
27
95
|
}
|
|
28
96
|
|
|
97
|
+
isEmpty(wsUrlRel: string) {
|
|
98
|
+
return (wsUrlRel === undefined || wsUrlRel == null || wsUrlRel.length <= 0) ? true : false;
|
|
99
|
+
}
|
|
100
|
+
|
|
29
101
|
/** */
|
|
30
102
|
getConfig() {
|
|
31
103
|
return this.appConfig;
|
|
32
104
|
}
|
|
33
|
-
|
|
105
|
+
|
|
34
106
|
|
|
35
107
|
}
|
|
@@ -21,6 +21,8 @@ export class TiledeskService {
|
|
|
21
21
|
public appConfigProvider: AppConfigProvider
|
|
22
22
|
) {
|
|
23
23
|
this.apiUrl = appConfigProvider.getConfig().apiUrl;
|
|
24
|
+
// const projectUrl = this.apiUrl + 'projects/'
|
|
25
|
+
// console.log('[TILEDESK-SERVICE] projectUrl' ,projectUrl )
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
|
|
@@ -51,7 +53,7 @@ export class TiledeskService {
|
|
|
51
53
|
|
|
52
54
|
// http://tiledesk-server-pre.herokuapp.com/requests_util/lookup/id_project/support-group-60ffe291f725db00347661ef-b4cb6875785c4a23b27244fe498eecf44
|
|
53
55
|
public getProjectIdByConvRecipient(token: string ,conversationWith: string ) {
|
|
54
|
-
const lookupUrl =this.apiUrl + 'requests_util/lookup/id_project/' + conversationWith;
|
|
56
|
+
const lookupUrl = this.apiUrl + 'requests_util/lookup/id_project/' + conversationWith;
|
|
55
57
|
|
|
56
58
|
this.logger.log('[TILEDESK-SERVICE] GET PROJECTID BY CONV RECIPIENT - URL ', lookupUrl);
|
|
57
59
|
|
|
@@ -70,6 +72,25 @@ export class TiledeskService {
|
|
|
70
72
|
}))
|
|
71
73
|
}
|
|
72
74
|
|
|
75
|
+
public getProjects(token: string) {
|
|
76
|
+
const url = this.apiUrl + 'projects/';
|
|
77
|
+
this.logger.log('[TILEDESK-SERVICE] - GET PROJECTS URL', url);
|
|
78
|
+
|
|
79
|
+
const httpOptions = {
|
|
80
|
+
headers: new HttpHeaders({
|
|
81
|
+
'Content-Type': 'application/json',
|
|
82
|
+
Authorization: token
|
|
83
|
+
})
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return this.http
|
|
87
|
+
.get(url, httpOptions)
|
|
88
|
+
.pipe(map((res: any) => {
|
|
89
|
+
this.logger.log('[TILEDESK-SERVICE] GET PROJECTS - RES ', res);
|
|
90
|
+
return res
|
|
91
|
+
}))
|
|
92
|
+
}
|
|
93
|
+
|
|
73
94
|
|
|
74
95
|
|
|
75
96
|
|