@chat21/chat21-ionic 3.0.79 → 3.0.80

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 CHANGED
@@ -1,5 +1,8 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ## 3.0.80 in PROD
4
+ - bug-fixed: if search a canned response, after clicked it does not replaced into text-area
5
+
3
6
  ## 3.0.79 in PROD
4
7
  - added: segment analytics events
5
8
 
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.79",
4
+ "version": "3.0.80",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -119,4 +119,4 @@
119
119
  "android"
120
120
  ]
121
121
  }
122
- }
122
+ }
@@ -6,7 +6,7 @@
6
6
  (click)="onClickCannedFN(canned, $event)">
7
7
  <div class="cannedContent">
8
8
  <ion-input [(ngModel)]="canned.title" class="title" id="{{'titleCanned_'+canned._id}}" [disabled]="canned.disabled"></ion-input>
9
- <ion-input [(ngModel)]="canned.text" *ngIf="canned.text" class="text" [disabled]="canned.disabled"></ion-input>
9
+ <ion-input [(ngModel)]="canned.text" *ngIf="canned.text" class="text truncate" [disabled]="canned.disabled"></ion-input>
10
10
  </div>
11
11
  <ion-icon class="canned-item-icon" name="checkmark-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && !canned.disabled" (click)="onConfirmEditCanned(canned, $event)"></ion-icon>
12
12
  <ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && canned.disabled" (click)="onEditCanned(canned, $event)"></ion-icon>
@@ -1282,18 +1282,23 @@ export class ConversationDetailPage implements OnInit, OnDestroy, AfterViewInit
1282
1282
  this.logger.log('[CONVS-DETAIL] replaceTagInMessage canned text ', canned.text)
1283
1283
 
1284
1284
  // replace text
1285
- var strTEMP = textArea.value.replace(/\/$/ig, canned.text)
1285
+ var strTEMP = textArea.value.replace(/\/.*/ig, canned.text)
1286
1286
  strTEMP = this.replacePlaceholderInCanned(strTEMP)
1287
- this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch ', strTEMP)
1287
+ this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch before', strTEMP, textArea)
1288
1288
  // strTEMP = this.replacePlaceholderInCanned(strTEMP);
1289
1289
  // textArea.value = '';
1290
1290
  // that.messageString = strTEMP;
1291
1291
  textArea.value = strTEMP
1292
- setTimeout(() => {
1293
- // textArea.focus();
1294
- textArea.setFocus()
1295
- // this.resizeTextArea()
1296
- }, 200)
1292
+ this.logger.log('[CONVS-DETAIL] replaceTagInMessage strSearch after', strTEMP, textArea)
1293
+ this.insertAtCursor(textArea, '')
1294
+ this.setCaretPosition(textArea)
1295
+ // setTimeout(() => {
1296
+ // // textArea.focus();
1297
+ // textArea.selectionEnd = textArea.value.length;
1298
+ // textArea.setFocus()
1299
+ // // this.resizeTextArea()
1300
+ // // this.setCaretPosition(textArea)
1301
+ // }, 200)
1297
1302
 
1298
1303
  }
1299
1304
 
package/src/global.scss CHANGED
@@ -434,6 +434,7 @@ select:-webkit-autofill:focus {
434
434
  .canned-list {
435
435
  .native-input[disabled] {
436
436
  opacity: 10 !important;
437
+ cursor: pointer;
437
438
  }
438
439
  }
439
440
 
@@ -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
@@ -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
@@ -1,116 +0,0 @@
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>
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>