@chat21/chat21-ionic 3.0.76-rc.1 → 3.0.76-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.
Files changed (48) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  2. package/.github/ISSUE_TEMPLATE/custom.md +10 -0
  3. package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  4. package/CHANGELOG.md +10 -0
  5. package/package.json +1 -1
  6. package/src/app/app.component.html +2 -0
  7. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.html +1 -1
  8. package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +15 -1
  9. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +1 -1
  10. package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +9 -2
  11. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +8 -1
  12. package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +5 -3
  13. package/src/app/components/canned-response/canned-response.component.html +26 -0
  14. package/src/app/components/canned-response/canned-response.component.scss +141 -0
  15. package/src/app/components/canned-response/canned-response.component.spec.ts +24 -0
  16. package/src/app/components/canned-response/canned-response.component.ts +281 -0
  17. package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +9 -8
  18. package/src/app/components/image-viewer/image-viewer.component.html +22 -16
  19. package/src/app/components/image-viewer/image-viewer.component.scss +40 -56
  20. package/src/app/components/network-offline/network-offline.component.html +5 -0
  21. package/src/app/components/network-offline/network-offline.component.scss +30 -0
  22. package/src/app/components/network-offline/network-offline.component.spec.ts +24 -0
  23. package/src/app/components/network-offline/network-offline.component.ts +43 -0
  24. package/src/app/pages/conversation-detail/conversation-detail.module.ts +2 -0
  25. package/src/app/pages/conversation-detail/conversation-detail.page.html +25 -12
  26. package/src/app/pages/conversation-detail/conversation-detail.page.scss +14 -29
  27. package/src/app/pages/conversation-detail/conversation-detail.page.ts +81 -357
  28. package/src/app/pages/conversations-list/conversations-list.page.html +0 -23
  29. package/src/app/pages/conversations-list/conversations-list.page.ts +3 -21
  30. package/src/app/shared/shared.module.ts +4 -2
  31. package/src/assets/i18n/ar.json +2 -0
  32. package/src/assets/i18n/az.json +2 -0
  33. package/src/assets/i18n/de.json +2 -0
  34. package/src/assets/i18n/en.json +2 -0
  35. package/src/assets/i18n/es.json +2 -0
  36. package/src/assets/i18n/fr.json +2 -0
  37. package/src/assets/i18n/it.json +2 -0
  38. package/src/assets/i18n/kk.json +2 -0
  39. package/src/assets/i18n/pt.json +2 -0
  40. package/src/assets/i18n/ru.json +2 -0
  41. package/src/assets/i18n/sr.json +2 -0
  42. package/src/assets/i18n/sv.json +2 -0
  43. package/src/assets/i18n/tr.json +2 -0
  44. package/src/assets/i18n/uk.json +2 -0
  45. package/src/assets/i18n/uz.json +2 -0
  46. package/src/chat-config-mqtt-localhost.json +1 -1
  47. package/src/chat21-core/providers/firebase/firebase-conversations-handler.ts +2 -2
  48. package/src/global.scss +0 -137
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Describe the bug**
11
+ A clear and concise description of what the bug is.
12
+
13
+ **To Reproduce**
14
+ Steps to reproduce the behavior:
15
+ 1. Go to '...'
16
+ 2. Click on '....'
17
+ 3. Scroll down to '....'
18
+ 4. See error
19
+
20
+ **Expected behavior**
21
+ A clear and concise description of what you expected to happen.
22
+
23
+ **Screenshots**
24
+ If applicable, add screenshots to help explain your problem.
25
+
26
+ **Desktop (please complete the following information):**
27
+ - OS: [e.g. iOS]
28
+ - Browser [e.g. chrome, safari]
29
+ - Version [e.g. 22]
30
+
31
+ **Smartphone (please complete the following information):**
32
+ - Device: [e.g. iPhone6]
33
+ - OS: [e.g. iOS8.1]
34
+ - Browser [e.g. stock browser, safari]
35
+ - Version [e.g. 22]
36
+
37
+ **Additional context**
38
+ Add any other context about the problem here.
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: Describe this issue template's purpose here.
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # chat21-ionic ver 3.0
2
2
 
3
+ ### 3.0.76-rc.3
4
+ - bug-fixed: image-preview when agent click on image, don't fit the screen size
5
+ - added: network-connection component to manage no connections
6
+ - removed: no connection item in conversation-list page
7
+
8
+ ### 3.0.76-rc.2
9
+ - added: canned component to manage canned responses
10
+ - bug-fixed: if more than oe '/' is present in message-text-area and a canned is selected, replace canned text on the last '/' character in the message string
11
+ - bug-fixed: close canned component if user click again on canned-icon-button
12
+
3
13
  ### 3.0.76-rc.1
4
14
  - changed: senderFullName in list conversation for guest users with guest#uuid[0..5]
5
15
  - added: multi-language to MEMBER_LEFT_GROUP and LEAD_UPDATED info messages
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.76-rc.1",
4
+ "version": "3.0.76-rc.3",
5
5
  "license": "MIT License",
6
6
  "homepage": "https://tiledesk.com/",
7
7
  "repository": {
@@ -3,6 +3,8 @@
3
3
 
4
4
  <app-image-viewer></app-image-viewer>
5
5
 
6
+ <app-network-offline></app-network-offline>
7
+
6
8
  <div class="sidebar" [ngClass]="{'hide-sidebar': IS_ONLINE === false || IS_ON_MOBILE_DEVICE === true || SUPPORT_MODE === false}">
7
9
  <app-sidebar></app-sidebar>
8
10
  </div>
@@ -1,4 +1,4 @@
1
- <div class="c21-body" (click)="hideMenuOption()">
1
+ <div class="c21-body" (click)="hideOutsideElements()">
2
2
 
3
3
  <div class="c21-body-container">
4
4
 
@@ -256,7 +256,21 @@ export class ConversationContentComponent implements OnInit {
256
256
  return false;
257
257
  }
258
258
 
259
- hideMenuOption() {
259
+ isSameSender(senderId, index):boolean{
260
+ if(senderId && this.messages[index - 1] && (senderId === this.messages[index - 1].sender)){
261
+ return true;
262
+ }
263
+ return false;
264
+ }
265
+
266
+ isFirstMessage(senderId, index):boolean{
267
+ if(senderId && index == 0 && this.messages[index] && (this.messages[index] !== senderId)){
268
+ return true;
269
+ }
270
+ return false;
271
+ }
272
+
273
+ hideOutsideElements() {
260
274
  this.onMenuOptionShow.emit(false)
261
275
  }
262
276
 
@@ -102,7 +102,7 @@
102
102
  </div>
103
103
 
104
104
  <!-- message RECIPIENT:: -->
105
- <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && isChannelTypeGroup(channelType)"
105
+ <div role="messaggio" *ngIf="messageType(MESSAGE_TYPE_OTHERS, message) && isChannelTypeGroup(channelType) && !isSameSender(message?.sender, i)"
106
106
  class="message_sender_fullname">
107
107
  {{message.sender_fullname}}
108
108
  </div>
@@ -245,15 +245,22 @@ ion-item {
245
245
  // left: -26px;
246
246
  }
247
247
 
248
- :host .base_receive .msg_receive ::ng-deep div > div > ion-button {
248
+ :host .base_receive .msg_receive ::ng-deep div > div > div > ion-button.canned {
249
249
  display: none;
250
250
  position: absolute;
251
251
  top: -3px;
252
252
  right: -31px;
253
253
  }
254
254
 
255
+ :host .base_receive .msg_receive ::ng-deep div > div > div >ion-button.emoji {
256
+ display: none;
257
+ position: absolute;
258
+ top: -3px;
259
+ right: -51px;
260
+ }
261
+
255
262
  // :host .base_receive .msg_receive:hover ::ng-deep div > div > ion-button {
256
- :host .base_receive:hover .msg_receive ::ng-deep div > div > ion-button {
263
+ :host .base_receive:hover .msg_receive ::ng-deep div > div > div > ion-button {
257
264
  display: block;
258
265
  // position: absolute;
259
266
  // top: -11px;
@@ -61,12 +61,19 @@
61
61
  </chat-html>
62
62
 
63
63
  <ng-container *ngIf="areVisibleCAR && supportMode">
64
- <ion-button shape="round" size="small" class="btn-add-msg-as-canned-response" ion-button fill="clear"
64
+ <ion-button shape="round" size="small" class="btn-add-msg canned" ion-button fill="clear"
65
65
  (click)="presentCreateCannedResponseModal()" tooltip="{{addAsCannedResponseTooltipText}}"
66
66
  [options]="tooltipOptions" placement="bottom">
67
67
  <ion-icon slot="icon-only" name="flash-outline" style="font-size: 1em;"> </ion-icon>
68
68
  </ion-button>
69
69
  </ng-container>
70
+ <!-- <ng-container *ngIf="supportMode">
71
+ <ion-button shape="round" size="small" class="btn-add-msg emoji" ion-button fill="clear"
72
+ (click)="presentEmojiiModal()" tooltip="{{addAsCannedResponseTooltipText}}"
73
+ [options]="tooltipOptions" placement="bottom">
74
+ <ion-icon slot="icon-only" name="happy-outline" style="font-size: 1em;"> </ion-icon>
75
+ </ion-button>
76
+ </ng-container> -->
70
77
  </div>
71
78
  </div>
72
79
 
@@ -48,13 +48,15 @@
48
48
 
49
49
  }
50
50
  // > .button-native
51
- .btn-add-msg-as-canned-response {
52
- // padding-left: 5px ;
53
- // padding-right: 5px ;
51
+ .btn-add-msg {
54
52
  border-radius: 50%;
55
53
  --padding-end: 7px;
56
54
  --padding-start: 7px;
57
55
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
56
+
57
+ ion-icon{
58
+ font-size: 1.2em;
59
+ }
58
60
  }
59
61
 
60
62
 
@@ -0,0 +1,26 @@
1
+ <div id="canned">
2
+ <ion-list class="canned-list" *ngIf="tagsCannedFilter.length > 0">
3
+ <ion-item button="true" [ngClass]="{'is_active_item': i == arrowkeyLocation}" lines="none"
4
+ class="canned-item no-ripple border" id="{{'canned-item_'+ i }}"
5
+ *ngFor="let canned of tagsCannedFilter; let i = index;"
6
+ (click)="onClickCannedFN(canned, $event)">
7
+ <div class="cannedContent">
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>
10
+ </div>
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
+ <ion-icon class="canned-item-icon" name="pencil-sharp" slot=end *ngIf="canned.createdBy === loggedUser.uid && canned.disabled" (click)="onEditCanned(canned, $event)"></ion-icon>
13
+ <ion-icon class="canned-item-icon" name="trash-bin-outline" slot=end *ngIf="canned.createdBy === loggedUser.uid" (click)="onDeleteCanned(canned, $event)"></ion-icon>
14
+ </ion-item>
15
+ <ion-item class="canned-item add-canned-response-wpr" button="true" lines="none" (click)="onClickAddCannedResponseFN()">
16
+ <ion-icon class="add-canned-response-icon" name="flash-outline"></ion-icon>
17
+ <span class="add-canned-response-add-icon">+</span>
18
+ <label class="add-canned-response-label" >{{translationMap?.get('AddNewCannedResponse')}}</label>
19
+ </ion-item>
20
+ </ion-list>
21
+ <!-- <ion-list class="canned-list" *ngIf="tagsCannedFilter.length === 0 && HIDE_CANNED_RESPONSES === false">
22
+ <ion-item button="true" >
23
+ There are no canned responses available
24
+ </ion-item>
25
+ </ion-list> -->
26
+ </div>
@@ -0,0 +1,141 @@
1
+ .canned-item.add-canned-response-wpr:hover > span {
2
+ color: #1877f2;
3
+ }
4
+
5
+ .canned-item.add-canned-response-wpr:hover > ion-icon {
6
+ color: #1877f2;
7
+ }
8
+
9
+ .canned-item.add-canned-response-wpr:hover > label {
10
+ color: #1877f2;
11
+ }
12
+
13
+ .is_active_item {
14
+ // background-color: #eaf1fd!important;
15
+ --background: #eaf1fd !important;
16
+ }
17
+
18
+
19
+
20
+ .header {
21
+ display: flex;
22
+ flex-direction: row;
23
+ -webkit-box-pack: start;
24
+ justify-content: flex-end;
25
+ -webkit-box-align: center;
26
+ align-items: center;
27
+ border-bottom: 1px solid rgb(239, 242, 246);
28
+ padding: 0px 10px;
29
+ background: white;
30
+ width: 100%;
31
+ box-shadow: rgb(0, 27, 71, .24) 0px 8px 20px;
32
+ .canned-response-icon-header{
33
+ color: #3880ff !important;
34
+ font-size: 1.4em;
35
+ margin: 8px 5px;
36
+ }
37
+
38
+ }
39
+
40
+ .add-canned-response-icon {
41
+ color: #b3bfd0;
42
+ cursor: pointer;
43
+ font-size: 18px;
44
+ }
45
+ .add-canned-response-label {
46
+ color: #b3bfd0;
47
+ cursor: pointer;
48
+ }
49
+ .add-canned-response-add-icon {
50
+ color: #b3bfd0;
51
+ cursor: pointer;
52
+ position: relative;
53
+ top: 4px;
54
+ left: -6px;
55
+ }
56
+
57
+ .canned-list {
58
+ // position: absolute;
59
+ // bottom: 0;
60
+ background-color: white !important;
61
+ width: 100%;
62
+ max-height: 310px;
63
+ overflow-y: auto;
64
+ // padding: 10px 0;
65
+ // margin: 0;
66
+ margin-bottom: 1px;
67
+ font-size: 14px;
68
+ line-height: 1.42857143;
69
+ color: #080f1a;
70
+ box-sizing: border-box;
71
+ -webkit-font-smoothing: antialiased;
72
+ // list-style: none;
73
+ z-index: 999999;
74
+
75
+ .cannedContent{
76
+ width: 100%;
77
+ }
78
+
79
+ ion-input {
80
+ --padding-bottom: 0px;
81
+ --padding-top: 0px;
82
+ &.text{
83
+ font-style: italic;
84
+ }
85
+ &.title {
86
+ font-weight: 500;
87
+ }
88
+ }
89
+ .native-input[disabled] {
90
+ opacity: 10 !important;
91
+ }
92
+ ion-icon {
93
+ zoom: 0.7;
94
+ }
95
+ .no-ripple {
96
+ --ripple-color: transparent;
97
+ --background-activated: transparent;
98
+ }
99
+
100
+ .border{
101
+ border-bottom: 1px dashed rgb(211, 219, 229) !important;
102
+ margin: 0px 4px
103
+ }
104
+
105
+
106
+ }
107
+
108
+ .canned-item {
109
+ -webkit-tap-highlight-color: transparent;
110
+ font-family: Lato, sans-serif;
111
+ font-size: 14px;
112
+ line-height: 1.42857143;
113
+ list-style: none;
114
+ box-sizing: border-box;
115
+ -webkit-font-smoothing: antialiased;
116
+ // margin: 0 10px;
117
+ position: relative;
118
+ outline: none;
119
+ color: #434a54;
120
+ // padding: 10px;
121
+ padding: 5px;
122
+ width: auto;
123
+ cursor: pointer;
124
+ // .item-inner{
125
+ // border: none!important;
126
+ // }
127
+ }
128
+
129
+ ion-item {
130
+ --background-hover: #1877f2 !important;
131
+
132
+ .nocannedTitle {
133
+ color: #f44336;
134
+ }
135
+ .no-canned-available-text {
136
+ color: #1877f2 !important;
137
+ }
138
+ .no-canned-available-text:hover {
139
+ text-decoration: underline;
140
+ }
141
+ }
@@ -0,0 +1,24 @@
1
+ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2
+ import { IonicModule } from '@ionic/angular';
3
+
4
+ import { CannedResponseComponent } from './canned-response.component';
5
+
6
+ describe('CannedResponseComponent', () => {
7
+ let component: CannedResponseComponent;
8
+ let fixture: ComponentFixture<CannedResponseComponent>;
9
+
10
+ beforeEach(async(() => {
11
+ TestBed.configureTestingModule({
12
+ declarations: [ CannedResponseComponent ],
13
+ imports: [IonicModule.forRoot()]
14
+ }).compileComponents();
15
+
16
+ fixture = TestBed.createComponent(CannedResponseComponent);
17
+ component = fixture.componentInstance;
18
+ fixture.detectChanges();
19
+ }));
20
+
21
+ it('should create', () => {
22
+ expect(component).toBeTruthy();
23
+ });
24
+ });