Skip to content

Commit af16531

Browse files
author
Gabriele Panico
committed
Merge branch 'master' into features/roles-PROD
2 parents 75d3f29 + db44587 commit af16531

168 files changed

Lines changed: 2246 additions & 452 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,81 @@
55
*Dario De Pascalis* <br>
66
*Giovanni Troisi* <br>
77
*Nicola Lanzilotto* <br>
8-
### **Copyrigth**:
8+
### **Copyright**:
99
*Tiledesk SRL*
1010

11+
# 3.4.33 in PROD
12+
13+
# 3.4.32 in PROD
14+
15+
# 3.4.32-rc10
16+
- **bug-fixed**: minor ui fix
17+
18+
# 3.4.32-rc9
19+
- **added**: sidebar-user-details — MutationObserver to close dropdowns when user details panel is hidden (watches #user-details class); cleanup in ngOnDestroy to prevent memory leaks.
20+
- **changed**: sidebar-user-details — refined closeDropdowns for better dropdown management when panel closes.
21+
- **added**: sidebar-user-details — hover to open status dropdown; improved status dropdown positioning logic.
22+
- **changed**: sidebar-user-details — flexbox layout (justify-content: space-between) for improved project item spacing.
23+
- **changed**: sidebar-user-details — HTML structure for conditional rendering of teammate status images and titles; cleaned up unused SCSS.
24+
25+
# 3.4.32-rc8
26+
- **bug-fixed**: sidebar-user-details — status dropdown not visible when clicking first/last project; moved outside #user-details container to avoid overflow clipping.
27+
- **bug-fixed**: sidebar-user-details — replaced `transform` on #user-details with `left` animation to fix `position: fixed` containing block (dropdown positioning).
28+
- **changed**: sidebar-user-details — projects_dropdown_container and status-dropdown now use same colors as ng-select teammate-status-in-drawer.
29+
- **changed**: sidebar-user-details — projects-dropdown-wrapper styled to match ng-select container.
30+
- **added**: sidebar-user-details — MPA feature flag in featuresToken: if MPA is true show projects_dropdown_container, else show availability_dropdown_container.
31+
- **bug-fixed**: RouterModule.forRoot() called twice when clicking conversation — SharedModule now imports RouterModule.forChild([]) instead of AppRoutingModule.
32+
- **changed**: FindPipe and FilterPipe moved from AppModule to SharedModule for app-wide availability.
33+
- **added**: conversations-list — postMessage to hosting app on conversation selection (event: `onConversationChanged`, data: full conversation object).
34+
35+
# 3.4.32-rc7
36+
- **added**: ability to change availability status per project for the logged-in user in sidebar-user-detail
37+
38+
# 3.4.32-rc6
39+
- **bug-fixed**: convertRequestToConversation timestamp wrong unit
40+
41+
# 3.4.32-rc5
42+
- **added**: conversations-list — on init, fetches all projects via `getProjects` and stores them in AppStorageService under `all_projects`; before saving, checks that the key does not already contain each project (avoids duplicates).
43+
- **changed**: conversations-list `onConversationLoaded` — project name and id are now resolved from the `all_projects` storage key instead of per-project localStorage entries.
44+
45+
# 3.4.32-rc4
46+
- **changed**: unassigned conversations page — `onImageLoaded` and `onConversationLoaded` are now invoked for each conversation in the list (avatar URLs, last message formatting, project name).
47+
- **bug-fixed**: navbar project dropdown — descenders (letters like g, p, q) were being clipped; added `line-height: 1.4` and vertical padding to prevent clipping.
48+
49+
# 3.4.32-rc3
50+
- **bug-fixed**: unassigned conversations list was reset on each WebSocket subscription; conversations from other projects were lost when subscribing to multiple online projects. Added `skipClear` parameter to `subscriptionToWsConversations` so the list is cleared only once when subscribing to all online projects.
51+
- **changed**: unassigned conversations empty state — centered the "no conversations" label both vertically and horizontally within the full viewport height.
52+
53+
# 3.4.32-rc2
54+
55+
# 3.4.32-rc1
56+
- **added**: ability to change availability status for each project the logged-in user belongs to.
57+
- **changed**: unserved-request.page refactor html and ts refactor
58+
59+
# 3.4.31 in PROD
60+
- **changed**: enhance HTML entities encoding by normalizing line breaks and handling null/undefined inputs
61+
- **changed**: API for upload a file/image into chat
62+
63+
# 3.4.30 in PROD
64+
- **changed**: when the app is in background, play a sound whenever a new message arrives.
65+
66+
# 3.4.29 in PROD
67+
- **bug-fixed**: web (Chrome >= 144) `ion-content` stopped scrolling on some pages (conversation list / contacts directory / unassigned); removed the forced `--overflow: hidden` and handled scrolling on Ionic’s internal scroll container via `ion-content::part(scroll)`
68+
69+
# 3.4.28 in PROD
70+
- **bug-fixed**: cannot do project subscription if last_project object is not a project_user obj
71+
72+
# 3.4.27 in PROD
73+
- **bug-fixed**: cannot find route if userFullname contains /
74+
1175
# 3.4.26 in PROD
1276

1377
# 3.4.26-rc2
1478
- **removed**: archive button on list conversations if is not on mobile device
1579

1680
# 3.4.26-rc1
1781
- **added**: tiledesk_projectID query param to manage user status
18-
- **added**: token to managane ticket feature
82+
- **added**: token to manage ticket feature
1983

2084
# 3.4.25 in PROD
2185
- **changed**: pipe marked to support malicious text input
@@ -1627,7 +1691,7 @@
16271691
- bug-fix: info conversation right sidebar
16281692

16291693
# 3.0.8
1630-
- new: added Scrivi a...
1694+
- new: added “Write to…” (contact list label)
16311695

16321696
# 3.0.7
16331697
- bug fix: navigation and routing

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@chat21/chat21-ionic",
33
"author": "Tiledesk SRL",
4-
"version": "3.4.26",
4+
"version": "3.4.33",
55
"license": "MIT License",
66
"homepage": "https://tiledesk.com/",
77
"repository": {

src/app/app.component.ts

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export class AppComponent implements OnInit {
120120
private navService: NavProxyService,
121121
// public chatPresenceHandler: ChatPresenceHandler,
122122
public typingService: TypingService,
123-
public uploadService: UploadService,
124123
public appStorageService: AppStorageService,
125124

126125
// public chatConversationsHandler: ChatConversationsHandler,
@@ -344,7 +343,7 @@ export class AppComponent implements OnInit {
344343

345344
if (event && event.data && event.data.action && event.data.parameter) {
346345
if (event.data.action === 'resolveConversation') {
347-
this.conversationsHandlerService.archiveConversation(event.data.patameter)
346+
this.conversationsHandlerService.archiveConversation(event.data.parameter)
348347
}
349348
}
350349
// if (event && event.data && event.data.action && event.data.parameter) {
@@ -549,7 +548,6 @@ export class AppComponent implements OnInit {
549548
if (pushEngine && pushEngine !== 'none') {
550549
this.notificationsService.initialize(this.tenant, vap_id_Key, platform)
551550
}
552-
this.uploadService.initialize();
553551

554552
this.setLanguage(null)
555553
this.initAuthentication();
@@ -888,10 +886,15 @@ export class AppComponent implements OnInit {
888886

889887
let pageUrl = 'conversation-detail/'
890888
if (IDConv && FullNameConv) {
891-
pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
889+
pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
892890
}
891+
892+
const queryParams = this.route.snapshot.queryParams;
893+
const queryString = new URLSearchParams(queryParams).toString();
894+
pageUrl += queryString ? `?${queryString}` : '';
895+
893896
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
894-
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
897+
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
895898

896899

897900
// const DASHBOARD_URL = this.appConfigProvider.getConfig().DASHBOARD_URL;
@@ -1129,6 +1132,10 @@ export class AppComponent implements OnInit {
11291132
if (changes.value && changes.value.sender !== currentUser.uid) {
11301133
let checkIfStatusChanged = changes.value.is_new === changes.previousValue.is_new? true: false
11311134
let checkIfUidChanged = changes.value.uid === changes.previousValue.uid? true: false
1135+
if(!this.isTabVisible){
1136+
this.manageTabNotification('new_message', true);
1137+
return
1138+
}
11321139
if(changes.value.is_new && checkIfStatusChanged && checkIfUidChanged){
11331140
this.manageTabNotification('new_message', true);
11341141
}
@@ -1166,7 +1173,7 @@ export class AppComponent implements OnInit {
11661173
// if (supportmode === true) {
11671174
// this.connetWebsocket() // moved in the comp project-item
11681175
// }
1169-
this.events.publish('go:online', true);
1176+
11701177
const currentUser = this.tiledeskAuthService.getCurrentUser();
11711178
this.setLanguage(currentUser);
11721179
// this.logger.printDebug('APP-COMP - goOnLine****', currentUser);
@@ -1178,6 +1185,9 @@ export class AppComponent implements OnInit {
11781185
this.projectService.initialize(serverBaseURL)
11791186
this.projectUsersService.initialize(serverBaseURL)
11801187
this.contactsService.initialize(serverBaseURL)
1188+
1189+
1190+
this.events.publish('go:online', true);
11811191
// this.chatManager.startApp();
11821192

11831193
// ----------------------------------------------
@@ -1299,7 +1309,7 @@ export class AppComponent implements OnInit {
12991309
subscribeChangedConversationSelected = (user: UserModel, type: string) => {
13001310
this.logger.log('[APP-COMP] subscribeUidConvSelectedChanged navigateByUrl', user, type);
13011311
// this.router.navigateByUrl('conversation-detail/' + user.uid + '?conversationWithFullname=' + user.fullname);
1302-
this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + user.fullname + '/' + type);
1312+
this.router.navigateByUrl('conversation-detail/' + user.uid + '/' + encodeURIComponent(user.fullname) + '/' + type);
13031313
}
13041314

13051315
subscribeProfileInfoButtonLogOut = (hasClickedLogout) => {
@@ -1338,7 +1348,6 @@ export class AppComponent implements OnInit {
13381348

13391349
subscribeUnservedRequestCount = (unservedRequestCount) => {
13401350
if(unservedRequestCount && unservedRequestCount > 0){
1341-
this.logger.debug("subscribeUnservedRequestCount appIsInitialized::::",this.isInitialized)
13421351
if(this.isInitialized){
13431352
this.manageTabNotification('conv_unassigned', true, unservedRequestCount) //sound and alternate title
13441353
}
@@ -1471,10 +1480,10 @@ export class AppComponent implements OnInit {
14711480
let Convtype = 'active'
14721481

14731482
if (IDConv && FullNameConv) {
1474-
pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
1483+
pageUrl += IDConv + '/' + encodeURIComponent(FullNameConv) + '/' + Convtype
14751484
}
14761485
// replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
1477-
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
1486+
this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
14781487
} else {
14791488
console.log("FCM: Received in foreground", JSON.stringify(data));
14801489
// let IDConv = data.recipient
@@ -1485,7 +1494,7 @@ export class AppComponent implements OnInit {
14851494
// pageUrl += IDConv + '/' + FullNameConv + '/' + Convtype
14861495
// }
14871496
// // replace(/\(/g, '%28').replace(/\)/g, '%29') -> used for the encoder of any round brackets
1488-
// this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29').replace( /#/g, "%23" ));
1497+
// this.router.navigateByUrl(pageUrl.replace(/\(/g, '%28').replace(/\)/g, '%29'));
14891498
};
14901499
});
14911500
}

src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@
205205
// overflow-x: hidden;
206206
// }
207207
// .c21-ico-schedule {
208-
// background-image: url("src/assets/images/f21ico-schedule.svg");
208+
// background-image: url("src/assets/img/f21ico-schedule.svg");
209209
// }
210210
// .c21-ico-done {
211-
// background-image: url("src/assets/images/f21ico-done.svg");
211+
// background-image: url("src/assets/img/f21ico-done.svg");
212212
// }
213213
// .c21-ico-done_all {
214-
// background-image: url("src/assets/images/f21ico-done_all.svg");
214+
// background-image: url("src/assets/img/f21ico-done_all.svg");
215215
// }
216216
// }
217217

src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export class ConversationContentComponent implements OnInit {
5858
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
5959
// ========== end:: check message type functions ======= //
6060

61-
urlBOTImage = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/images/avatar_bot_tiledesk.svg'
61+
urlBOTImage = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/img/avatar_bot_tiledesk.svg'
6262
uploadProgress: number;
6363
showUploadProgress: boolean = false;
6464
fileType: string;

src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
<ng-container *ngIf="isCopilotEnabled">
185185
<ion-button shape="round" size="small" class="btn-info-msg btn-copilot" ion-button fill="clear"
186186
(click)="onClickOptionsCopilot(message, i)">
187-
<ion-icon id="copilot" src="assets/images/icons/copilot.svg"></ion-icon>
187+
<ion-icon id="copilot" src="assets/img/icons/copilot.svg"></ion-icon>
188188
</ion-button>
189189
</ng-container>
190190

src/app/chatlib/conversation-detail/message/avatar/avatar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="c21-icon-avatar">
22
<div class="c21-avatar-image profile_image">
3-
<!-- <img src="getUrlImgProfile(message.sender) {{getUrlImgProfile(message.sender)}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v2/assets/images/line_avatar_male_tiledesk.svg'" /> -->
3+
<!-- <img src="getUrlImgProfile(message.sender) {{getUrlImgProfile(message.sender)}}" onError="this.src = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/v2/assets/img/line_avatar_male_tiledesk.svg'" /> -->
44
<!-- <img [src]="url" (error)="onBotImgError($event)" /> -->
55
<img *ngIf="senderID?.indexOf('bot_') !== -1 || senderFullname === 'Bot'" [src]="url" (error)="onBotImgError($event)" (load)="onLoadedBot($event)"/>
66
<!-- is a HUMAN -->

src/app/chatlib/conversation-detail/message/avatar/avatar.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ export class AvatarComponent implements OnInit {
1717
if(this.senderID){
1818
this.url = this.imageRepoService.getImagePhotoUrl(this.senderID)
1919
if(!this.url && (this.senderID.indexOf('bot_') !== -1 || this.senderFullname === 'Bot')){
20-
this.url = this.baseLocation +'/assets/images/avatar_bot_tiledesk.svg'
20+
this.url = this.baseLocation +'/assets/img/avatar_bot_tiledesk.svg'
2121
}else if(!this.url && this.senderID.indexOf('bot_') == -1){
22-
this.url = this.baseLocation +'/assets/images/light_avatar_placeholder.svg'
22+
this.url = this.baseLocation +'/assets/img/light_avatar_placeholder.svg'
2323
}
2424
}
2525
}
2626

2727
onBotImgError(event){
28-
event.target.src = this.baseLocation +'/assets/images/avatar_bot_tiledesk.svg'
28+
event.target.src = this.baseLocation +'/assets/img/avatar_bot_tiledesk.svg'
2929
}
3030
onHumanImgError(event) {
31-
event.target.src = this.baseLocation + "/assets/images/light_avatar_placeholder.svg"
31+
event.target.src = this.baseLocation + "/assets/img/light_avatar_placeholder.svg"
3232
}
3333

3434
onLoadedBot(event){

src/app/chatlib/conversation-detail/message/image/image.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
[height]="height"
99
[src]="metadata.src"
1010
(load)="onLoaded($event)"
11+
(error)="onError($event)"
1112
(click)="openImageViewerModal(metadata.src, metadata.name)" />
1213
</div>

0 commit comments

Comments
 (0)