@chat21/chat21-ionic 3.0.86-rc.1 → 3.0.86-rc.2
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 +5 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +3 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +3 -3
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +1 -1
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +0 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +0 -2
- package/src/app/components/navbar/navbar.component.ts +8 -3
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +23 -21
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/chat21-core/providers/logger/customLogger.ts +1 -1
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# chat21-ionic ver 3.0
|
|
2
2
|
|
|
3
|
+
### 3.0.86 in PROD
|
|
4
|
+
|
|
5
|
+
### 3.0.86-rc.2
|
|
6
|
+
- bug-fixed: undefined reading 'channel' while render email icon in ion-conversation-detail component
|
|
7
|
+
|
|
3
8
|
### 3.0.86-rc.1
|
|
4
9
|
- added: send-email modal on Email footer option click
|
|
5
10
|
- added: handle window['analytics'] error
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP, URL_SOUND_CONVERSATION_UNASSIGNED } from 'src/chat21-core/utils/constants';
|
|
3
|
-
import { tranlatedLanguage, URL_SOUND_CONVERSATION_ADDED, URL_SOUND_LIST_CONVERSATION } from '
|
|
3
|
+
import { tranlatedLanguage, URL_SOUND_CONVERSATION_ADDED, URL_SOUND_LIST_CONVERSATION } from 'src/chat21-core/utils/constants';
|
|
4
4
|
import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/abstract/archivedconversations-handler.service';
|
|
5
5
|
import { AppStorageService } from 'src/chat21-core/providers/abstract/app-storage.service';
|
|
6
6
|
|
|
@@ -39,8 +39,8 @@ import { LoginPage } from './pages/authentication/login/login.page';
|
|
|
39
39
|
import { ConversationListPage } from './pages/conversations-list/conversations-list.page';
|
|
40
40
|
|
|
41
41
|
// utils
|
|
42
|
-
import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues, stripTags } from '
|
|
43
|
-
import { STORAGE_PREFIX, PLATFORM_MOBILE, PLATFORM_DESKTOP, CHAT_ENGINE_FIREBASE, AUTH_STATE_OFFLINE, AUTH_STATE_ONLINE } from '
|
|
42
|
+
import { checkPlatformIsMobile, isGroup, getParameterByName, searchIndexInArrayForUid, compareValues, stripTags } from 'src/chat21-core/utils/utils';
|
|
43
|
+
import { STORAGE_PREFIX, PLATFORM_MOBILE, PLATFORM_DESKTOP, CHAT_ENGINE_FIREBASE, AUTH_STATE_OFFLINE, AUTH_STATE_ONLINE } from 'src/chat21-core/utils/constants';
|
|
44
44
|
import { environment } from '../environments/environment';
|
|
45
45
|
import { UserModel } from '../chat21-core/models/user';
|
|
46
46
|
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeDetectorRef, Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { MessageModel } from '
|
|
3
|
-
import { isPopupUrl, popupUrl, stripTags } from '
|
|
4
|
-
import { MSG_STATUS_SENT, MSG_STATUS_RETURN_RECEIPT, MSG_STATUS_SENT_SERVER, MAX_WIDTH_IMAGES, MESSAGE_TYPE_INFO, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from '
|
|
2
|
+
import { MessageModel } from 'src/chat21-core/models/message';
|
|
3
|
+
import { isPopupUrl, popupUrl, stripTags } from 'src/chat21-core/utils/utils';
|
|
4
|
+
import { MSG_STATUS_SENT, MSG_STATUS_RETURN_RECEIPT, MSG_STATUS_SENT_SERVER, MAX_WIDTH_IMAGES, MESSAGE_TYPE_INFO, MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
|
|
5
5
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
6
6
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
7
7
|
import { UploadService } from 'src/chat21-core/providers/abstract/upload.service';
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
<!--backgroundColor non viene ancora usato -->
|
|
103
103
|
<div style="display: contents;">
|
|
104
104
|
|
|
105
|
-
<div class="email-logo" *ngIf="message
|
|
105
|
+
<div class="email-logo" *ngIf="message?.attributes?.channel && message?.attributes?.channel === TYPE_MSG_EMAIL">
|
|
106
106
|
<ion-icon name="mail"></ion-icon>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
@@ -13,10 +13,6 @@ import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.
|
|
|
13
13
|
// Logger
|
|
14
14
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service'
|
|
15
15
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
16
|
-
import {
|
|
17
|
-
setConversationAvatar,
|
|
18
|
-
setChannelType,
|
|
19
|
-
} from 'src/chat21-core/utils/utils'
|
|
20
16
|
import { Platform } from '@ionic/angular'
|
|
21
17
|
|
|
22
18
|
import { ModalController } from '@ionic/angular'
|
package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts
CHANGED
|
@@ -14,8 +14,6 @@ import { UploadService } from 'src/chat21-core/providers/abstract/upload.service
|
|
|
14
14
|
import { TYPE_MSG_EMAIL, TYPE_MSG_TEXT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
|
|
15
15
|
// Models
|
|
16
16
|
import { UploadModel } from 'src/chat21-core/models/upload';
|
|
17
|
-
import { Observable } from 'rxjs';
|
|
18
|
-
import { checkPlatformIsMobile } from 'src/chat21-core/utils/utils';
|
|
19
17
|
|
|
20
18
|
// Logger
|
|
21
19
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
@@ -2,7 +2,7 @@ import { AppConfigProvider } from 'src/app/services/app-config';
|
|
|
2
2
|
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
3
3
|
import { EventsService } from 'src/app/services/events-service';
|
|
4
4
|
import { ProjectsService } from './../../services/projects/projects.service';
|
|
5
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
5
|
+
import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
6
6
|
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
7
7
|
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
8
|
import { Project } from 'src/chat21-core/models/projects';
|
|
@@ -22,7 +22,7 @@ export class NavbarComponent implements OnInit {
|
|
|
22
22
|
private tiledeskToken: string;
|
|
23
23
|
|
|
24
24
|
public projects: Project[];
|
|
25
|
-
public project: any;
|
|
25
|
+
public project: any = [];
|
|
26
26
|
private USER_ROLE: string;
|
|
27
27
|
|
|
28
28
|
public translationsMap: Map<string, string> = new Map();
|
|
@@ -37,7 +37,8 @@ export class NavbarComponent implements OnInit {
|
|
|
37
37
|
private tiledeskAuthService: TiledeskAuthService,
|
|
38
38
|
private appConfigProvider: AppConfigProvider,
|
|
39
39
|
private translateService: CustomTranslateService,
|
|
40
|
-
private events: EventsService,
|
|
40
|
+
private events: EventsService,
|
|
41
|
+
private cdref: ChangeDetectorRef,
|
|
41
42
|
) { }
|
|
42
43
|
|
|
43
44
|
ngOnInit() {
|
|
@@ -47,6 +48,10 @@ export class NavbarComponent implements OnInit {
|
|
|
47
48
|
this.getOSCODE();
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
ngAfterContentChecked() {
|
|
52
|
+
this.cdref.detectChanges();
|
|
53
|
+
}
|
|
54
|
+
|
|
50
55
|
initTranslations(){
|
|
51
56
|
let keys= [
|
|
52
57
|
"NAVBAR.SIMULATE_VISITOR",
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { TYPE_DIRECT } from 'src/chat21-core/utils/constants';
|
|
2
|
-
import { URL_SOUND_LIST_CONVERSATION } from './../../../chat21-core/utils/constants'
|
|
3
1
|
import {
|
|
4
2
|
Component,
|
|
5
3
|
OnInit,
|
|
@@ -47,7 +45,7 @@ import { ArchivedConversationsHandlerService } from 'src/chat21-core/providers/a
|
|
|
47
45
|
import { ConversationHandlerService } from 'src/chat21-core/providers/abstract/conversation-handler.service'
|
|
48
46
|
import { ContactsService } from 'src/app/services/contacts/contacts.service'
|
|
49
47
|
import { CannedResponsesService } from '../../services/canned-responses/canned-responses.service'
|
|
50
|
-
import { compareValues, getDateDifference, htmlEntities } from '
|
|
48
|
+
import { compareValues, getDateDifference, htmlEntities } from 'src/chat21-core/utils/utils'
|
|
51
49
|
import { ImageRepoService } from 'src/chat21-core/providers/abstract/image-repo.service'
|
|
52
50
|
import { PresenceService } from 'src/chat21-core/providers/abstract/presence.service'
|
|
53
51
|
import { CreateCannedResponsePage } from 'src/app/modals/create-canned-response/create-canned-response.page'
|
|
@@ -57,7 +55,9 @@ import {
|
|
|
57
55
|
MESSAGE_TYPE_INFO,
|
|
58
56
|
MESSAGE_TYPE_MINE,
|
|
59
57
|
MESSAGE_TYPE_OTHERS,
|
|
60
|
-
|
|
58
|
+
URL_SOUND_LIST_CONVERSATION,
|
|
59
|
+
TYPE_DIRECT
|
|
60
|
+
} from 'src/chat21-core/utils/constants'
|
|
61
61
|
import {
|
|
62
62
|
checkPlatformIsMobile,
|
|
63
63
|
checkWindowWidthIsLessThan991px,
|
|
@@ -521,10 +521,10 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
521
521
|
this.initConversationHandler()
|
|
522
522
|
this.initGroupsHandler()
|
|
523
523
|
this.initSubscriptions()
|
|
524
|
+
this.startConversation()
|
|
524
525
|
this.getLeadDetail()
|
|
525
526
|
}
|
|
526
527
|
this.addEventsKeyboard()
|
|
527
|
-
this.startConversation()
|
|
528
528
|
this.updateConversationBadge() // AGGIORNO STATO DELLA CONVERSAZIONE A 'LETTA' (is_new = false)
|
|
529
529
|
|
|
530
530
|
this.initializeTyping();
|
|
@@ -887,20 +887,22 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
887
887
|
|
|
888
888
|
|
|
889
889
|
getLeadDetail(){
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
this.
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
890
|
+
if(this.channelType !== TYPE_DIRECT){
|
|
891
|
+
const tiledeskToken= this.tiledeskAuthService.getTiledeskToken();
|
|
892
|
+
const projectId = this.getProjectIdSelectedConversation(this.conversationWith)
|
|
893
|
+
this.logger.debug('[CONVS-DETAIL] getLeadDetail - section ', projectId)
|
|
894
|
+
this.tiledeskService.getRequest(this.conversationWith, projectId, tiledeskToken).subscribe((request: any)=>{
|
|
895
|
+
this.logger.debug('[CONVS-DETAIL] getLeadDetail - selected REQUEST detail', request)
|
|
896
|
+
if(request.lead && request.lead.email){
|
|
897
|
+
this.leadInfo = {lead_id: request.lead.lead_id, hasEmail: true, email: request.lead.email, projectId: projectId}
|
|
898
|
+
this.presenceService.userIsOnline(this.leadInfo.lead_id);
|
|
899
|
+
}
|
|
900
|
+
}, (error)=>{
|
|
901
|
+
this.logger.error('[CONVS-DETAIL] - getLeadDetail - GET REQUEST DETAIL - ERROR ', error)
|
|
902
|
+
}, ()=>{
|
|
903
|
+
this.logger.debug('[CONVS-DETAIL] - getLeadDetail - GET REQUEST DETAIL * COMPLETE *')
|
|
904
|
+
})
|
|
905
|
+
}
|
|
904
906
|
|
|
905
907
|
}
|
|
906
908
|
|
|
@@ -1002,8 +1004,8 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
|
|
|
1002
1004
|
this.channelType,
|
|
1003
1005
|
attributes,
|
|
1004
1006
|
)
|
|
1005
|
-
|
|
1006
|
-
if(!this.leadIsOnline && this.leadInfo.email){
|
|
1007
|
+
|
|
1008
|
+
if(!this.leadIsOnline && this.leadInfo && this.leadInfo.email){
|
|
1007
1009
|
this.logger.log('[CONVS-DETAIL] - SEND MESSAGE --> SENDING EMAIL', msg, this.leadInfo.email)
|
|
1008
1010
|
this.sendEmail(msg)
|
|
1009
1011
|
}
|
|
@@ -41,7 +41,7 @@ export class WebsocketService {
|
|
|
41
41
|
|
|
42
42
|
self.webSocketJs.ref(path, 'subscriptionToWsCurrentUser_allProject',
|
|
43
43
|
function (data, notification) {
|
|
44
|
-
console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
44
|
+
// console.log("[WS-SERV] SUBSCR TO WS CURRENT PROJECT-USER AVAILABILITY - CREATE - data ", data);
|
|
45
45
|
resolve(data)
|
|
46
46
|
// self.currentUserWsAvailability$.next(data.user_available);
|
|
47
47
|
self.currentProjectUserAvailability$.next(data)
|
|
@@ -20,7 +20,7 @@ export class CustomLogger implements LoggerService {
|
|
|
20
20
|
this.isLogEnabled = isLogEnabled;
|
|
21
21
|
if (logLevel) {
|
|
22
22
|
this.logLevel = LogLevel[logLevel.toUpperCase()];
|
|
23
|
-
console.log('LoggerService this.logLevel ', this.logLevel)
|
|
23
|
+
// console.log('LoggerService this.logLevel ', this.logLevel)
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
package/deploy_amazon_beta.sh
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#npm version prerelease --preid=beta
|
|
2
|
-
version=`node -e 'console.log(require("./package.json").version)'`
|
|
3
|
-
echo "version $version"
|
|
4
|
-
|
|
5
|
-
URL_VER=${version//[.]//}
|
|
6
|
-
echo 'URL_VER: ---->'$URL_VER
|
|
7
|
-
|
|
8
|
-
sed -i -e "s/$URL_VER/g" src/utils/constants.ts
|
|
9
|
-
|
|
10
|
-
# ng build --prod --base-href /$NEW_BUILD/
|
|
11
|
-
#ionic cordova build browser --prod
|
|
12
|
-
|
|
13
|
-
ionic cordova platform add browser --save
|
|
14
|
-
#ionic cordova build browser --prod --release
|
|
15
|
-
ionic cordova build --configuration="pre" browser #--prod --verbose
|
|
16
|
-
|
|
17
|
-
cp -p src/firebase-messaging-sw.js platforms/browser/www/
|
|
18
|
-
cp -p src/manifest.json platforms/browser/www/
|
|
19
|
-
cp -p src/chat-config.json platforms/browser/www/
|
|
20
|
-
|
|
21
|
-
cd platforms/browser/www
|
|
22
|
-
aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/ --cache-control max-age=300
|
|
23
|
-
aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/ --cache-control max-age=300
|
|
24
|
-
cd ../../../
|
|
25
|
-
|
|
26
|
-
#aws cloudfront create-invalidation --distribution-id E13L8CUUKUWAJF --paths "/*"
|
|
27
|
-
|
|
28
|
-
echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
|
|
29
|
-
echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
|
package/deploy_amazon_prod.sh
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# npm version patch
|
|
2
|
-
version=`node -e 'console.log(require("./package.json").version)'`
|
|
3
|
-
echo "version $version"
|
|
4
|
-
|
|
5
|
-
URL_VER=${version//[.]//}
|
|
6
|
-
echo 'URL_VER: ---->'$URL_VER
|
|
7
|
-
|
|
8
|
-
# sed -i -e "s/$start$ver.$build/$start$NEW_VER.$NEW_BUILD/g" src/utils/constants.ts
|
|
9
|
-
sed -i -e "s/$URL_VER/g" src/utils/constants.ts
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
ionic cordova platform add browser --save
|
|
13
|
-
#ionic cordova build --env=prod browser -- --base-href /www/ --prod
|
|
14
|
-
ionic cordova build --env=prod browser --prod
|
|
15
|
-
|
|
16
|
-
cp -p src/firebase-messaging-sw.js platforms/browser/www/
|
|
17
|
-
cp -p src/manifest.json platforms/browser/www/
|
|
18
|
-
cp -p src/chat-config.json platforms/browser/www/
|
|
19
|
-
|
|
20
|
-
cd platforms/browser/www
|
|
21
|
-
aws s3 sync . s3://tiledesk-console/v2/chat/ --cache-control max-age=172800
|
|
22
|
-
aws s3 sync . s3://tiledesk-console/v2/chat/$version/ --cache-control max-age=172800
|
|
23
|
-
# aws s3 sync . s3://tiledesk-console/v2/chat/latest/ --cache-control max-age=172800
|
|
24
|
-
cd ../../../
|
|
25
|
-
|
|
26
|
-
# aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
|
|
27
|
-
|
|
28
|
-
# echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
|
|
29
|
-
echo new version deployed on s3://tiledesk-console/v2/chat/$version/
|
|
30
|
-
echo available on https://console.tiledesk.com/v2/chat/$version/index.html
|