@chat21/chat21-ionic 3.0.64-rc1 → 3.0.65-rc2

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 (27) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/deploy_amazon_beta.sh +29 -0
  3. package/deploy_amazon_prod.sh +26 -0
  4. package/deploy_pre.sh +5 -44
  5. package/deploy_prod.sh +6 -54
  6. package/package.json +1 -1
  7. package/publiccode.yml +110 -0
  8. package/src/app/app.component.ts +6 -1
  9. package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +1 -1
  10. package/src/app/chatlib/list-conversations-component/list-conversations/list-conversations.component.ts +0 -1
  11. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +6 -4
  12. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +19 -0
  13. package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +116 -0
  14. package/src/app/directives/truncate.pipe.spec.ts +8 -0
  15. package/src/app/directives/truncate.pipe.ts +16 -0
  16. package/src/app/pages/conversation-detail/conversation-detail.module.ts +3 -2
  17. package/src/app/pages/conversation-detail/conversation-detail.page.ts +4 -4
  18. package/src/app/pages/conversations-list/conversations-list.page.ts +52 -177
  19. package/src/assets/js/chat21client.js +57 -59
  20. package/src/{chat-config-mqtt-ver-uploaded.json → chat-config-mqtt-localhost.json} +10 -6
  21. package/src/chat-config-mqtt.json +18 -28
  22. package/src/chat-config-native-mqtt.json +30 -0
  23. package/src/chat-config-pre.json +9 -13
  24. package/src/chat21-core/models/conversation.ts +1 -1
  25. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +10 -1
  26. package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +16 -13
  27. package/src/chat-config-pre-test.json +0 -37
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+
4
+ ### 3.0.65-rc2 - LATEST
5
+ - changed: behaviour of is_new of a conversation (not update 'is_new' conversation property if conv is the selected one or if sender is me)
6
+
7
+ ### 3.0.65-rc1 - LATEST
8
+ - added: improves chat performance by caching conversations
9
+ - added: Displays balloon messages with a light orange background for "internal notes" type message
10
+ - added: the html component
11
+ - bug-fixed: if archive conversation and do a refresh, url not change from active to archived
12
+ - bug-fixed: truncate sender_fullname in conversation-list and conversation-detail header components
13
+ - bug-fixed: on conversation removed, update local conversations on storage
14
+
15
+ ### 3.0.64 IN PROD
16
+ - Fixes the bug: in the conversation list, for the direct convesations, the name of the requester changes according to the order of arrival of the conversations
17
+
3
18
  ### 3.0.64-rc1
4
19
  - Fixes the bug: in the conversation list, for the direct convesations, the name of the requester changes according to the order of arrival of the conversations
5
20
  - Displays balloon messages with a light orange background for "internal notes" type message
@@ -0,0 +1,29 @@
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 --env=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/
23
+ aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
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
@@ -0,0 +1,26 @@
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
+ ionic cordova platform add browser --save
11
+ #ionic cordova build --env=prod browser -- --base-href /www/ --prod
12
+ ionic cordova build --env=prod browser --prod
13
+ cp -p src/firebase-messaging-sw.js platforms/browser/www/
14
+ cp -p src/manifest.json platforms/browser/www/
15
+ cp -p src/chat-config.json platforms/browser/www/
16
+
17
+ cd platforms/browser/www
18
+ # aws s3 sync . s3://tiledesk-console/v2/chat/
19
+ # aws s3 sync . s3://tiledesk-console/v2/chat/$version/
20
+ aws s3 sync . s3://tiledesk-console/v2/chat/latest/
21
+ cd ../../../
22
+ # aws cloudfront create-invalidation --distribution-id E36UIP90GOSFPM --paths "/*"
23
+
24
+ # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
25
+ echo new version deployed on s3://tiledesk-console/v2/chat-ionic5/$version/
26
+ echo available on https://console.tiledesk.com/v2/chat-ionic5/$version/index.html
package/deploy_pre.sh CHANGED
@@ -27,57 +27,18 @@ sed -i -e "s/$URL_VER/g" src/utils/constants.ts
27
27
 
28
28
  ionic cordova platform add browser --save
29
29
  #ionic cordova build browser --prod --release
30
- # ionic cordova build --env=pre browser --prod #--verbose
31
- ionic cordova build -c=pre browser --prod
30
+ ionic cordova build --env=pre browser #--prod --verbose
31
+
32
32
  cp -p src/firebase-messaging-sw.js platforms/browser/www/
33
33
  cp -p src/manifest.json platforms/browser/www/
34
34
  cp -p src/chat-config.json platforms/browser/www/
35
- # cp -p config.xml platforms/browser/www/
36
-
37
- ######### chat-ionic5 - the good one - publish in pre
35
+
38
36
  cd platforms/browser/www
39
37
  aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/$version/
40
38
  aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5/
41
39
  cd ../../../
42
40
 
43
- aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
41
+ #aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
44
42
 
45
43
  echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5/$version/
46
- echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
47
- echo available on https://support-pre.tiledesk.com/chat-ionic5/$version/index.html
48
- echo available on https://support-pre.tiledesk.com/chat-ionic5/index.html
49
-
50
- ######### chat-ionic5-panel - publish in pre with the projects right panel
51
- # cd platforms/browser/www
52
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
53
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat-ionic5-panel/
54
- # cd ../../../
55
-
56
- # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
57
-
58
- # echo new version deployed on s3://tiledesk-dashboard-pre/chat-ionic5-panel/$version/
59
- # echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5-panel/$version/index.html
60
- # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/$version/index.html
61
- # echo available on https://support-pre.tiledesk.com/chat-ionic5-panel/index.html
62
-
63
-
64
- ####### chat ionic MQTT in pre da aggiungere in deploy_pre.sh
65
- # cd platforms/browser/www
66
- # aws s3 sync . s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/
67
- # aws s3 sync . s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/$version
68
- # cd ../../../
69
- # echo new version deployed on s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/
70
- # echo new version deployed on s3://tiledesk-dashboard-pre/native-mqtt/chat-ionic5/$version
71
- # echo http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/chat-ionic5/index.html
72
- # echo http://tiledesk-dashboard-pre.s3-eu-west-1.amazonaws.com/native-mqtt/chat-ionic5/$version/index.html
73
-
74
-
75
- ####### chat ionic FIREBASE in pre da aggiungere in deploy_pre.sh
76
- # cd platforms/browser/www
77
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat5/
78
- # aws s3 sync . s3://tiledesk-dashboard-pre/chat5/$version
79
- # cd ../../../
80
- # echo new version deployed on s3://tiledesk-dashboard-pre/chat5/$version
81
- # echo new version deployed on s3://tiledesk-dashboard-pre/chat5/
82
- # echo available on http://support-pre.tiledesk.com/chat5/index.html
83
- # echo available on http://support-pre.tiledesk.com/chat5/$version/index.html
44
+ echo available on https://s3.eu-west-1.amazonaws.com/tiledesk-dashboard-pre/chat-ionic5/$version/index.html
package/deploy_prod.sh CHANGED
@@ -5,58 +5,10 @@ echo "version $version"
5
5
  URL_VER=${version//[.]//}
6
6
  echo 'URL_VER: ---->'$URL_VER
7
7
 
8
- # if [ "$version" != "" ]; then
9
- # git tag -a "$version" -m "`git log -1 --format=%s`"
10
- # echo "Created a new tag, $version"
11
- # git push --tags
12
- # npm publish
13
- # fi
8
+ if [ "$version" != "" ]; then
9
+ git tag -a "$version" -m "`git log -1 --format=%s`"
10
+ echo "Created a new tag, $version"
11
+ git push remoteTiledesk--tags
12
+ npm publish
13
+ fi
14
14
 
15
- sed -i -e "s/$URL_VER/g" src/utils/constants.ts
16
-
17
- ionic cordova platform add browser --save
18
- #ionic cordova build --env=prod browser -- --base-href /www/ --prod
19
- ionic cordova build --env=prod browser --prod
20
- cp -p src/firebase-messaging-sw.js platforms/browser/www/
21
- cp -p src/manifest.json platforms/browser/www/
22
- cp -p src/chat-config.json platforms/browser/www/
23
- cp -p config.xml platforms/browser/www/
24
-
25
-
26
- ###### CHAT in prod
27
- cd platforms/browser/www
28
- aws s3 sync . s3://tiledesk-console/v2/chat/
29
- aws s3 sync . s3://tiledesk-console/v2/chat/$version/
30
- echo new version deployed on s3://tiledesk-console/v2/chat/$version/
31
- echo available on https://console.tiledesk.com/v2/chat/$version/index.html
32
- echo available on https://console.tiledesk.com/v2/chat/index.html
33
-
34
-
35
- ###### CHAT in prod under latest
36
- # cd platforms/browser/www
37
- # aws s3 sync . s3://tiledesk-console/v2/chat/latest
38
- # echo available on https://console.tiledesk.com/v2/chat/latest/index.html
39
-
40
- ###### CHAT-IONIC5
41
- # cd platforms/browser/www
42
- # #aws s3 sync . s3://tiledesk-dashboard/chat/
43
- # aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/
44
- # aws s3 sync . s3://tiledesk-console/v2/chat-ionic5/$version/
45
- # cd ../../../
46
- # # aws cloudfront create-invalidation --distribution-id E2DTAKWHWQ7C3J --paths "/*"
47
-
48
- # # echo new version deployed on s3://tiledesk-dashboard/chat/$NEW_BUILD/
49
- # echo new version deployed on s3://tiledesk-console/v2/chat-ionic5/$version/
50
- # echo available on https://console.tiledesk.com/v2/chat-ionic5/$version/index.html
51
-
52
-
53
-
54
- ####### chat ionic FIREBASE in PROD IN SUBFOLDER
55
- # cd platforms/browser/www
56
- # aws s3 sync . s3://tiledesk-console/v2/chat5-dev/
57
- # aws s3 sync . s3://tiledesk-console/v2/chat5-dev/$version
58
- # cd ../../../
59
- # echo new version deployed on s3://console.tiledesk.com/v2/chat5-dev/$version
60
- # echo new version deployed on s3://console.tiledesk.com/v2/chat5-dev/
61
- # echo available on http://console.tiledesk.com/v2/chat5-dev/index.html
62
- # echo available on http://console.tiledesk.com/v2/chat5-dev/$version/index.html
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@chat21/chat21-ionic",
3
3
  "author": "Tiledesk SRL",
4
- "version": "3.0.64-rc1",
4
+ "version": "3.0.65-rc2",
5
5
  "license": "AGPL-3.0",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
package/publiccode.yml ADDED
@@ -0,0 +1,110 @@
1
+ # This repository adheres to the publiccode.yml standard by including this
2
+ # metadata file that makes public software easily discoverable.
3
+ # More info at https://github.com/italia/publiccode.yml
4
+
5
+ publiccodeYmlVersion: '0.2'
6
+ categories:
7
+ - customer-service-and-support
8
+ - communications
9
+ - marketing
10
+ - mobile-marketing
11
+ description:
12
+ it:
13
+ apiDocumentation: 'https://developer.tiledesk.com/apis/rest-api'
14
+ documentation: 'https://gethelp.tiledesk.com'
15
+ features:
16
+ - live chat widget
17
+ - chatbot
18
+ - 'integration with DialogFlow, Rasa and all major AI solutions'
19
+ - ticketing
20
+ - multi-project management
21
+ - SLAs setting
22
+ - 'smart assignment of the queues '
23
+ - seamless conversation
24
+ - dashboard
25
+ - knowledge base
26
+ - mobile apps
27
+ genericName: Live chat with integrated chatbots
28
+ longDescription: |
29
+ To have fully satisfied customers is complex. Conversation’s actors
30
+ (chatbots and humans) should handoff to each other many times during a
31
+ chat to address customers needs.
32
+
33
+
34
+ Tiledesk provides a solution **orchestrating instant, asynchronous and
35
+ multichannel communication among all stakeholders of a typical
36
+ conversational architecture**: chatbots, support operators, end users,
37
+ colleagues, applications, etc.
38
+
39
+
40
+ **Main Features**:
41
+
42
+
43
+ - Live Chat Widget with full multichannel experience on Web and Mobile;
44
+
45
+ - Resolution Bot to automate customer support;
46
+
47
+ - Easy Integration with all major AI-platforms, cloud and Open source,
48
+ from DialogFlow to RASA;
49
+
50
+ - Ticketing Management system fully integrated into the platform and
51
+ instant conversation flow;
52
+
53
+ - Team Organization with multi-project management, SLAs setting, smart
54
+ assignment of the
55
+ queues, departments organization and much more;
56
+ - Seamless conversation to “jump” between different channels in a
57
+ transparent way for end
58
+ customers and agents;
59
+ - Chat Tools like typing indicator, off-line access, delivery receipts,
60
+ contact list and much more;
61
+
62
+ - Dashboard with real time analytics;
63
+
64
+ - Knowledge base.
65
+
66
+
67
+
68
+ Tiledesk is an **open source **project, made with passion in Salento
69
+ (Southern Italy).
70
+ shortDescription: |-
71
+ Tiledesk delivers scalable customer service to your mobile apps and your
72
+ website. It is a conversational platform that connects chatbots and
73
+ humans
74
+ developmentStatus: stable
75
+ it:
76
+ conforme:
77
+ gdpr: false
78
+ lineeGuidaDesign: false
79
+ misureMinimeSicurezza: false
80
+ modelloInteroperabilita: false
81
+ countryExtensionVersion: '0.2'
82
+ piattaforme:
83
+ anpr: false
84
+ cie: false
85
+ pagopa: false
86
+ spid: false
87
+ landingURL: 'https://tiledesk.com/install'
88
+ legal:
89
+ license: AGPL-3.0-only
90
+ localisation:
91
+ availableLanguages:
92
+ - it
93
+ - en
94
+ - es
95
+ - fr
96
+ - pt
97
+ - de
98
+ - ru
99
+ - tr
100
+ localisationReady: true
101
+ maintenance:
102
+ contacts:
103
+ - name: Andrea Sponziello
104
+ type: internal
105
+ name: Tiledesk
106
+ platforms:
107
+ - web
108
+ releaseDate: '2022-06-15'
109
+ softwareType: standalone/web
110
+ url: 'https://github.com/Tiledesk/tiledesk-deployment'
@@ -935,9 +935,14 @@ export class AppComponent implements OnInit {
935
935
  if (conversation && conversation.sender !== currentUser.uid) {
936
936
  this.manageTabNotification();
937
937
  }
938
-
939
938
  }
940
939
  });
940
+
941
+ this.conversationsHandlerService.conversationRemoved.subscribe((conversation: ConversationModel) => {
942
+ this.logger.log('[APP-COMP] ***** conversationRemoved *****', conversation);
943
+ // that.conversationsChanged(conversations);
944
+ if(conversation) this.updateConversationsOnStorage();
945
+ });
941
946
  }
942
947
 
943
948
  /**
@@ -90,7 +90,7 @@
90
90
  <!-- <div *ngIf="getImageAvatar(conversation.sender)" #avatarImage class="avatar-profile" [style.background-image]="'url(' + getImageAvatar(conversation.sender) + ')'"></div> -->
91
91
  </ion-avatar>
92
92
  <ion-label>
93
- <div class="conversation_with truncate" [innerHTML]="conversation.conversation_with_fullname"></div>
93
+ <div class="conversation_with truncate">{{conversation.conversation_with_fullname}}</div>
94
94
  <div class="conversation_message truncate-conv-msg" [ngClass]="{'truncate-on-desktop': !isApp}">
95
95
 
96
96
  <!-- -------------------------------------------------------------------------- -->
@@ -59,7 +59,6 @@ export class ListConversationsComponent implements OnInit {
59
59
  public openConversationByID(conversation) {
60
60
  this.logger.log('[LISTCONVERSATIONS-W] openConversationByID: ', conversation);
61
61
  if (conversation) {
62
- this.logger.log(conversation.recipient_fullname)
63
62
  // this.conversationsService.updateIsNew(conversation);
64
63
  // this.conversationsService.updateConversationBadge();
65
64
  this.uidConvSelected = conversation.uid
@@ -1,8 +1,8 @@
1
1
  <ion-header no-border class="ion-no-border">
2
2
  <ion-toolbar style="height:60px">
3
- <ion-buttons slot="start" style="height:60px">
3
+ <ion-buttons slot="start" style="height:60px" *ngIf="isMobile">
4
4
  <!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
5
- <ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
5
+ <ion-back-button style="display: block;" text="" (click)="goBackToConversationList()">
6
6
  </ion-back-button>
7
7
  </ion-buttons>
8
8
 
@@ -12,7 +12,9 @@
12
12
  <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
13
13
  <div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
14
14
  [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
15
- <app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
15
+ <app-avatar-profile
16
+ [itemAvatar]=conversationAvatar>
17
+ </app-avatar-profile>
16
18
  </div>
17
19
  <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
18
20
  <div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
@@ -32,7 +34,7 @@
32
34
  <!-- (click)="onOpenCloseInfoConversation()" -->
33
35
  <div *ngIf="conversationAvatar" class="tile-info-with"
34
36
  [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
35
- <span class="tile-username">{{ conversationAvatar.conversation_with_fullname }} </span>
37
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
36
38
  <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
37
39
 
38
40
  </div>
@@ -4,6 +4,25 @@ ion-header {
4
4
  border-bottom-style: solid;
5
5
  border-color: var(--light-gray);
6
6
  border-bottom-width: thin;
7
+ ion-toolbar{
8
+ height: 60px;
9
+ .flex-container{
10
+ display: flex;
11
+ }
12
+
13
+ .back-flex-container{
14
+ flex: 0 1 auto;
15
+ order: 0;
16
+ }
17
+ .user-info-flex-container{
18
+ flex: 0 1 auto;
19
+ order: 1;
20
+ }
21
+ .resolve-flex-container{
22
+ flex: 0 1 auto;
23
+ order: 2;
24
+ }
25
+ }
7
26
  ion-title {
8
27
  text-align: left;
9
28
  height: 40px;
@@ -0,0 +1,116 @@
1
+ <ion-header no-border class="ion-no-border">
2
+ <ion-toolbar style="height:60px">
3
+ <div class="flex-container">
4
+ <div class="back-flex-container">
5
+ <ion-buttons slot="start" style="height:60px">
6
+ <!-- (click)="pushPage('conversations-list')" defaultHref="/conversations-list" -->
7
+ <ion-back-button style="display: block;" text="" *ngIf="isMobile" (click)="goBackToConversationList()">
8
+ </ion-back-button>
9
+ </ion-buttons>
10
+ </div>
11
+ <div class="user-info-flex-container">
12
+ <div style="display: flex;">
13
+ <div>1</div>
14
+ <div>2</div>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="resolve-flex-container">
19
+ <ion-buttons slot="end">
20
+
21
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
22
+ <ion-icon name="ticket-outline"></ion-icon>
23
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
24
+ </ion-button> -->
25
+
26
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
27
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
28
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
29
+ <ion-icon name="archive-outline"></ion-icon>
30
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
31
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
32
+ </ion-button>
33
+
34
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
35
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
36
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
37
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
38
+
39
+ </ion-button>
40
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
41
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
42
+ </ion-button>
43
+
44
+ </ion-buttons>
45
+ </div>
46
+
47
+ </div>
48
+ </ion-toolbar>
49
+ </ion-header>
50
+
51
+
52
+
53
+
54
+ <ion-title [class.info-open]="openInfoConversation || openInfoMessage">
55
+
56
+ <div *ngIf="conversationAvatar" class="avatar-and-typing-wpr" >
57
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '55px' : '' }" -->
58
+ <div *ngIf="conversationAvatar" class="avatar-container" (click)="onOpenCloseInfoConversation()" style="cursor: pointer"
59
+ [ngClass]="{ 'avatar-container-ios': platformName === 'ios' }">
60
+ <app-avatar-profile [itemAvatar]=conversationAvatar></app-avatar-profile>
61
+ </div>
62
+ <!-- [ngStyle] = "{ 'left': platformName === 'ios' ? '63px' : '' }" -->
63
+ <div *ngIf="isDirect" class="user-presence" [ngClass]="{ 'user-presence-ios': platformName === 'ios' }">
64
+ <app-user-presence [idUser]=conversationAvatar.conversation_with [translationMap]=translationMap
65
+ [borderColor]=borderColor [fontColor]=fontColor>
66
+ </app-user-presence>
67
+ </div>
68
+
69
+ <div *ngIf="conversationAvatar" class="user-typing">
70
+ <app-user-typing [idConversation]=conversationAvatar.uid [idCurrentUser]=idLoggedUser [isDirect]=isDirect
71
+ [translationMap]=translationMap [color]=fontColor [membersConversation]=membersConversation>
72
+ </app-user-typing>
73
+ </div>
74
+
75
+ </div>
76
+ <!-- [ngClass] = "{ 'tile-info-with-ios': platformName === 'ios' ? '82px' : ''82px'' }" -->
77
+ <!-- (click)="onOpenCloseInfoConversation()" -->
78
+ <div *ngIf="conversationAvatar" class="tile-info-with"
79
+ [ngClass]="{ 'tile-info-with-ios': platformName === 'ios' }">
80
+ <span class="tile-username">{{ conversationAvatar.conversation_with_fullname | truncate:50 }} </span>
81
+ <!-- <span class="tile-username">{{ conversation_with_fullname }} </span> -->
82
+
83
+ </div>
84
+
85
+ <!-- <div *ngIf="conversationWithFullname" class="tile-info-with" (click)="onOpenCloseInfoConversation()">
86
+ <span class="tile-username">{{ conversationWithFullname }} </span>
87
+ </div> -->
88
+
89
+ </ion-title>
90
+ <!-- openInfoConversation {{openInfoConversation}} -->
91
+ <ion-buttons slot="end">
92
+
93
+ <!-- <ion-button ion-button fill="clear" color="primary" size="small" (click)="presentCreateTicketModal()" [ngClass]="{'resolve-conv-margin-right': !isMobile}">
94
+ <ion-icon name="ticket-outline"></ion-icon>
95
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Crea ticket' | translate}} </span>
96
+ </ion-button> -->
97
+
98
+ <ion-button *ngIf="conversationUid?.startsWith('support-group') && conv_type !== 'archived'" ion-button fill="clear" color="primary" size="small"
99
+ (click)="closeConversation()" [ngClass]="{'resolve-conv-margin-right': !isMobile}" [disabled]="conv_closed === true">
100
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
101
+ <ion-icon name="archive-outline"></ion-icon>
102
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
103
+ <span style="text-transform: capitalize; margin-left: 5px;"> {{ 'Resolve' | translate}} </span>
104
+ </ion-button>
105
+
106
+ <ion-button *ngIf="!openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
107
+ <!-- <ion-icon slot="icon-only" name="alert-circle-outline"></ion-icon> -->
108
+ <ion-icon slot="icon-only" name="information-circle-outline"></ion-icon>
109
+ <!-- <ion-icon slot="icon-only" name="information-outline"></ion-icon> -->
110
+
111
+ </ion-button>
112
+ <ion-button *ngIf="openInfoConversation" ion-button fill="clear" (click)="onOpenCloseInfoConversation()">
113
+ <ion-icon slot="icon-only" name="close-circle-outline"></ion-icon>
114
+ </ion-button>
115
+
116
+ </ion-buttons>
@@ -0,0 +1,8 @@
1
+ import { TruncatePipe } from './truncate.pipe';
2
+
3
+ describe('TruncatePipe', () => {
4
+ it('create an instance', () => {
5
+ const pipe = new TruncatePipe();
6
+ expect(pipe).toBeTruthy();
7
+ });
8
+ });
@@ -0,0 +1,16 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+
3
+ @Pipe({
4
+ name: 'truncate'
5
+ })
6
+ export class TruncatePipe implements PipeTransform {
7
+
8
+ transform(value: string, character: number): any {
9
+ console.log('stringggg', value, character)
10
+ if(value && value.length > character)
11
+ return value.substring(0, character) + ' ...'
12
+ else
13
+ return value;
14
+ }
15
+
16
+ }
@@ -1,3 +1,4 @@
1
+ import { TruncatePipe } from './../../directives/truncate.pipe';
1
2
  import { IonConversationDetailComponent } from '../../chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component';
2
3
  import { TooltipModule } from 'ng2-tooltip-directive';
3
4
  import { NgModule } from '@angular/core';
@@ -32,7 +33,6 @@ import { InfoGroupComponent } from 'src/app/components/conversation-info/info-gr
32
33
 
33
34
 
34
35
  import { SharedModule } from 'src/app/shared/shared.module';
35
- // import { SharedConversationInfoModule } from 'src/app/shared/shared-conversation-info.module';
36
36
  import { NgxLinkifyjsModule } from 'ngx-linkifyjs';
37
37
  import { ScrollbarThemeModule } from '../../utils/scrollbar-theme.directive';
38
38
  import { PickerModule } from '@ctrl/ngx-emoji-mart';
@@ -62,7 +62,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
62
62
  declarations: [
63
63
  ConversationDetailPage,
64
64
  HeaderConversationDetailComponent,
65
- MessageTextAreaComponent
65
+ MessageTextAreaComponent,
66
66
  // BubbleDayMessageComponent,
67
67
  // BubbleSystemMessageComponent,
68
68
  // BubbleMyMessageComponent,
@@ -71,6 +71,7 @@ import { PickerModule } from '@ctrl/ngx-emoji-mart';
71
71
  // InfoSupportGroupComponent,
72
72
  // InfoDirectComponent,
73
73
  // InfoGroupComponent,
74
+ TruncatePipe
74
75
  ]
75
76
  })
76
77
  export class ConversationDetailPageModule {}
@@ -327,10 +327,10 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
327
327
  this.logger.log('[CONVS-DETAIL] subscribe to BSConversationsChange showButtonToBottom ', this.showButtonToBottom)
328
328
  // UPDATE THE CONVERSATION TO 'READ' IF IT IS ME WHO WRITES THE LAST MESSAGE OF THE CONVERSATION
329
329
  // AND IF THE POSITION OF THE SCROLL IS AT THE END
330
- if (!this.showButtonToBottom && conv.is_new) {
331
- // ARE AT THE END
332
- this.updateConversationBadge()
333
- }
330
+ // if (!this.showButtonToBottom && conv.is_new) {
331
+ // // ARE AT THE END
332
+ // this.updateConversationBadge()
333
+ // }
334
334
  if(conv.uid && conv.uid === this.conversationWith){
335
335
  this.conversationAvatar = setConversationAvatar(conv.conversation_with,conv.conversation_with_fullname,conv.channel_type)
336
336
  }