@chat21/chat21-ionic 3.0.82-rc.7 → 3.0.82
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 -99
- package/README.md +2 -2
- package/package.json +3 -4
- package/src/app/app.component.html +1 -7
- package/src/app/app.component.scss +2 -20
- package/src/app/app.component.ts +18 -129
- package/src/app/app.module.ts +1 -3
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +1 -8
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +23 -77
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +88 -171
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +2 -40
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +24 -11
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +10 -6
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.spec.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.ts +25 -16
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +1 -5
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +15 -22
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +5 -25
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +1 -2
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +15 -14
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +5 -24
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +1 -6
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +13 -12
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +5 -26
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.html +2 -8
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.scss +0 -36
- package/src/app/chatlib/conversation-detail/message/frame/frame.component.ts +2 -2
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +1 -0
- package/src/app/chatlib/conversation-detail/message/image/image.component.html +2 -3
- package/src/app/chatlib/conversation-detail/message/image/image.component.scss +5 -17
- package/src/app/chatlib/conversation-detail/message/image/image.component.ts +1 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +6 -16
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +3 -1
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +0 -2
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +52 -78
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +20 -63
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +10 -14
- package/src/app/components/canned-response/canned-response.component.html +9 -9
- package/src/app/components/canned-response/canned-response.component.scss +7 -14
- package/src/app/components/canned-response/canned-response.component.ts +1 -1
- package/src/app/components/contacts-directory/contacts-directory.component.html +26 -22
- package/src/app/components/contacts-directory/contacts-directory.component.scss +6 -8
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +21 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +14 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +54 -0
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +98 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.spec.ts → conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts} +6 -6
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +84 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +30 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +83 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +68 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +3 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +10 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +24 -0
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +14 -0
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +42 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +61 -98
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +25 -9
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +8 -17
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.scss +4 -4
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.ts +84 -24
- package/src/app/components/conversation-detail/option-header/option-header.component.html +13 -0
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts → conversation-detail/option-header/option-header.component.spec.ts} +5 -5
- package/src/app/components/{conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts → conversation-detail/option-header/option-header.component.ts} +4 -5
- package/src/app/components/conversation-info/info-content/info-content.component.html +4 -8
- package/src/app/components/conversation-info/info-content/info-content.component.ts +6 -3
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +13 -7
- package/src/app/components/conversation-info/info-direct/info-direct.component.scss +0 -23
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +6 -1
- package/src/app/components/conversation-info/info-group/info-group.component.html +108 -44
- package/src/app/components/conversation-info/info-group/info-group.component.scss +61 -101
- package/src/app/components/conversation-info/info-group/info-group.component.ts +0 -1
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.html +1 -2
- package/src/app/components/conversation-info/info-support-group/info-support-group.component.ts +1 -0
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.html → ddp-header/ddp-header.component.html} +3 -3
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.scss → ddp-header/ddp-header.component.scss} +4 -16
- package/src/app/components/{navbar/navbar.component.spec.ts → ddp-header/ddp-header.component.spec.ts} +6 -6
- package/src/app/components/{conversations-list/header-conversations-list/header-conversations-list.component.ts → ddp-header/ddp-header.component.ts} +16 -7
- package/src/app/components/project-item/project-item.component.html +149 -98
- package/src/app/components/project-item/project-item.component.scss +35 -43
- package/src/app/components/project-item/project-item.component.ts +4 -16
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +5 -5
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +10 -23
- package/src/app/components/utils/user-presence/user-presence.component.html +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.scss +18 -35
- package/src/app/components/utils/user-presence/user-presence.component.ts +10 -6
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +0 -47
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +0 -2
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +8 -0
- package/src/app/pages/conversation-detail/conversation-detail.page.html +23 -41
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +250 -40
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +112 -186
- package/src/app/pages/conversations-list/conversations-list.page.html +8 -11
- package/src/app/pages/conversations-list/conversations-list.page.scss +2 -18
- package/src/app/pages/conversations-list/conversations-list.page.ts +22 -25
- package/src/app/pages/create-canned-response/create-canned-response.page.ts +13 -13
- package/src/app/pages/loader-preview/loader-preview.page.html +1 -1
- package/src/app/pages/loader-preview/loader-preview.page.scss +0 -4
- package/src/app/pages/loader-preview/loader-preview.page.ts +2 -1
- package/src/app/pages/profile-info/profile-info.page.html +4 -2
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +0 -42
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +0 -1
- package/src/app/services/canned-responses/canned-responses.service.ts +0 -26
- package/src/app/services/tiledesk/tiledesk.service.ts +25 -1
- package/src/app/services/websocket/websocket.service.ts +1 -1
- package/src/app/shared/shared.module.ts +33 -24
- package/src/assets/i18n/ar.json +265 -278
- package/src/assets/i18n/az.json +1 -14
- package/src/assets/i18n/de.json +2 -15
- package/src/assets/i18n/en.json +2 -15
- package/src/assets/i18n/es.json +2 -15
- package/src/assets/i18n/fr.json +1 -14
- package/src/assets/i18n/it.json +1 -14
- package/src/assets/i18n/kk.json +2 -15
- package/src/assets/i18n/pt.json +2 -15
- package/src/assets/i18n/ru.json +1 -14
- package/src/assets/i18n/sr.json +264 -277
- package/src/assets/i18n/sv.json +2 -15
- package/src/assets/i18n/tr.json +2 -15
- package/src/assets/i18n/uk.json +2 -15
- package/src/assets/i18n/uz.json +1 -14
- package/src/assets/js/chat21client.js +148 -175
- package/src/chat-config-mqtt-localhost.json +2 -2
- package/src/chat-config-native-mqtt.json +0 -3
- package/src/chat21-core/models/conversation.ts +1 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +9 -7
- package/src/chat21-core/providers/mqtt/mqtt-auth-service.ts +8 -7
- package/src/chat21-core/utils/constants.ts +1 -6
- package/src/chat21-core/utils/user-typing/user-typing.component.html +5 -8
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +17 -87
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +94 -12
- package/src/chat21-core/utils/utils.ts +10 -38
- package/src/global.scss +255 -52
- package/src/index.html +9 -0
- package/src/variables.scss +10 -30
- package/deploy_amazon_beta.sh +0 -29
- package/deploy_amazon_prod.sh +0 -30
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component_2.html +0 -116
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +0 -12
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +0 -14
- package/src/app/components/navbar/navbar.component.html +0 -103
- package/src/app/components/navbar/navbar.component.scss +0 -249
- package/src/app/components/navbar/navbar.component.ts +0 -190
- package/src/app/services/projects/projects.service.spec.ts +0 -12
- package/src/app/services/projects/projects.service.ts +0 -43
- package/src/assets/sounds/interface-start.mp3 +0 -0
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/projects.ts +0 -27
- package/src/chat21-core/utils/convertRequestToConversation.ts +0 -41
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
<ion-navbar class="navbar navbar-absolute">
|
|
2
|
-
<div class="container-fluid">
|
|
3
|
-
<!-- <div class="navbar-left">
|
|
4
|
-
left
|
|
5
|
-
</div> -->
|
|
6
|
-
<div class="navbar-right">
|
|
7
|
-
<!-- test site -->
|
|
8
|
-
<ng-container *ngIf="project">
|
|
9
|
-
<button class="btn simulate-visitor-btn btn-success-no-boxshadow " (click)="testWidgetPage()">
|
|
10
|
-
<i class="material-icons" style="padding-top: 0px;font-size: 24px;">play_arrow</i>
|
|
11
|
-
{{translationsMap.get('NAVBAR.SIMULATE_VISITOR')}}
|
|
12
|
-
</button>
|
|
13
|
-
</ng-container>
|
|
14
|
-
|
|
15
|
-
<!-- ------ PROJECTS DROPDOWN ------ -->
|
|
16
|
-
<ng-container *ngIf="project">
|
|
17
|
-
<li>
|
|
18
|
-
<button class="btn dropdown-toggle project-dropdown" (click)="openDropdownProjects = !openDropdownProjects">
|
|
19
|
-
<i class="material-icons" style="margin-right: 3px;">keyboard_arrow_down</i>
|
|
20
|
-
<span style="text-transform: none"> {{ project?.id_project?.name }} </span>
|
|
21
|
-
</button>
|
|
22
|
-
<div class="ripple-container"></div>
|
|
23
|
-
<div id="navbar_dropdown" class="dropdown-menu" [ngClass]="{'open': openDropdownProjects}">
|
|
24
|
-
|
|
25
|
-
<!-- PROJECT SETTINGS -->
|
|
26
|
-
<!-- <li *ngIf="USER_ROLE !== 'agent'">
|
|
27
|
-
<a (click)="onClickDropdownOption('projectSettings')">
|
|
28
|
-
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">settings</i>
|
|
29
|
-
{{translationsMap?.get('NAVBAR.PROJECT_SETTINGS')}}
|
|
30
|
-
</a>
|
|
31
|
-
</li> -->
|
|
32
|
-
|
|
33
|
-
<!-- ALL PROJECTS -->
|
|
34
|
-
<li (click)="onClickDropdownOption('allProjects')">
|
|
35
|
-
<a style="cursor: pointer">
|
|
36
|
-
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">view_list</i>
|
|
37
|
-
{{translationsMap?.get('NAVBAR.VIEW_ALL_PROJECTS')}}
|
|
38
|
-
</a>
|
|
39
|
-
</li>
|
|
40
|
-
|
|
41
|
-
<!-- ADD PROJECT -->
|
|
42
|
-
<li id="navbar_create_prjct" *ngIf="MT === true" (click)="onClickDropdownOption('addProject')">
|
|
43
|
-
<a style="cursor: pointer">
|
|
44
|
-
<i class="material-icons" style="padding-right: 5px; margin-bottom: 2px; font-size: 20px">add_circle_outline </i>
|
|
45
|
-
{{translationsMap?.get('NAVBAR.ADD_PROJECT')}}
|
|
46
|
-
</a>
|
|
47
|
-
</li>
|
|
48
|
-
|
|
49
|
-
<li class="divider"></li>
|
|
50
|
-
|
|
51
|
-
<!-- RECENT PROJECTS -->
|
|
52
|
-
<li>
|
|
53
|
-
<span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
|
|
54
|
-
{{translationsMap?.get('NAVBAR.RECENT_PROJECTS')}}
|
|
55
|
-
</span>
|
|
56
|
-
</li>
|
|
57
|
-
<!--
|
|
58
|
-
***** ngFor - reverse order of output using the index *****
|
|
59
|
-
Reverse() works in place. It means, it will change the original array.
|
|
60
|
-
Slice without parameters returns a copy of projects, so original array, in this case, stays unchanged.
|
|
61
|
-
let prjct of projects?.reverse()
|
|
62
|
-
-->
|
|
63
|
-
<!-- *ngFor="let prjct of projects?.slice().reverse() | slice:0:5; let i=index" -->
|
|
64
|
-
<li *ngFor="let prjct of projects?.slice() | slice:0:5; let i=index" style="cursor: pointer">
|
|
65
|
-
<a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)"
|
|
66
|
-
[ngClass]="{'li-selected' : prjct?.id_project?._id === project?.id_project?.id }">
|
|
67
|
-
|
|
68
|
-
<span> {{ prjct?.id_project?.name }} </span>
|
|
69
|
-
</a>
|
|
70
|
-
</li>
|
|
71
|
-
|
|
72
|
-
<ng-container *ngIf="projects?.length > 5">
|
|
73
|
-
<li class="divider"></li>
|
|
74
|
-
<li>
|
|
75
|
-
<span style="padding-left: 24px;font-size: 12px; color: rgb(118,149,165);font-weight: 400">
|
|
76
|
-
{{translationsMap?.get('NAVBAR.OTHER_PROJECTS')}}
|
|
77
|
-
</span>
|
|
78
|
-
</li>
|
|
79
|
-
|
|
80
|
-
<!-- *ngFor="let prjct of projects?.slice().reverse() | slice:5:10; let i=index" -->
|
|
81
|
-
<li *ngFor="let prjct of projects?.slice() | slice:5:10; let i=index" style="cursor: pointer">
|
|
82
|
-
<a (click)="goToHome(prjct?.id_project?._id, prjct?.id_project?.name)">
|
|
83
|
-
{{ prjct?.id_project?.name }}
|
|
84
|
-
</a>
|
|
85
|
-
</li>
|
|
86
|
-
</ng-container>
|
|
87
|
-
|
|
88
|
-
</div>
|
|
89
|
-
</li>
|
|
90
|
-
</ng-container>
|
|
91
|
-
|
|
92
|
-
<!-- Sound on / off -->
|
|
93
|
-
<ng-container *ngIf="project">
|
|
94
|
-
<button class="btn volume" style="cursor: pointer;" *ngIf="isSoundEnabled" (click)="onClickSound('disabled')">
|
|
95
|
-
<i class="material-icons">volume_up</i>
|
|
96
|
-
</button>
|
|
97
|
-
<button class="btn volume" style="cursor: pointer;" *ngIf="!isSoundEnabled" (click)="onClickSound('enabled')">
|
|
98
|
-
<i class="material-icons">volume_off</i>
|
|
99
|
-
</button>
|
|
100
|
-
</ng-container>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</ion-navbar>
|
|
@@ -1,249 +0,0 @@
|
|
|
1
|
-
.navbar-absolute{
|
|
2
|
-
position: absolute;
|
|
3
|
-
width: calc(100% - var(--sidebar-width));
|
|
4
|
-
margin-left: var(--sidebar-width);
|
|
5
|
-
padding-top: 5px;
|
|
6
|
-
z-index: 1;
|
|
7
|
-
padding-bottom: 5px;
|
|
8
|
-
border-bottom: 1px solid #e7e7e7;
|
|
9
|
-
top: 0;
|
|
10
|
-
|
|
11
|
-
-webkit-font-smoothing: auto;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.navbar{
|
|
15
|
-
background-color: #fff;
|
|
16
|
-
color: #555;
|
|
17
|
-
min-height: var(--nav-bar-heigth);
|
|
18
|
-
transition: all 150ms ease 0s;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.container-fluid{
|
|
22
|
-
padding-right: 15px;
|
|
23
|
-
padding-left: 15px;
|
|
24
|
-
margin-right: auto;
|
|
25
|
-
margin-left: auto;
|
|
26
|
-
|
|
27
|
-
width: 100%;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
ion-navbar{
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.navbar-collapse{
|
|
36
|
-
border-top: none;
|
|
37
|
-
box-shadow: none;
|
|
38
|
-
|
|
39
|
-
padding-right: 15px;
|
|
40
|
-
padding-left: 15px;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.navbar-right{
|
|
44
|
-
float: right;
|
|
45
|
-
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.navbar-left{
|
|
51
|
-
float: left;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.simulate-visitor-btn{
|
|
55
|
-
font-size: 12px;
|
|
56
|
-
padding: 0px 11px 0px 4px !important;
|
|
57
|
-
max-height: 24px;
|
|
58
|
-
border-radius: 30px;
|
|
59
|
-
font-family: 'Poppins';
|
|
60
|
-
|
|
61
|
-
box-shadow: unset!important;
|
|
62
|
-
text-transform: none!important;
|
|
63
|
-
background: #3ecf8e!important;
|
|
64
|
-
color: #fff;
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.btn{
|
|
69
|
-
display: flex;
|
|
70
|
-
position: relative;
|
|
71
|
-
flex-flow: row nowrap;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: center;
|
|
74
|
-
|
|
75
|
-
border: 1px solid transparent;
|
|
76
|
-
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
.dropdown-toggle, .volume{
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
color: inherit;
|
|
83
|
-
|
|
84
|
-
padding: 0px 15px;
|
|
85
|
-
font-weight: 400;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.project-dropdown {
|
|
89
|
-
max-width: 180px;
|
|
90
|
-
white-space: nowrap;
|
|
91
|
-
overflow: hidden;
|
|
92
|
-
text-overflow: ellipsis;
|
|
93
|
-
font-size: 12px;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
li{
|
|
97
|
-
position: relative;
|
|
98
|
-
display: block
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.dropdown-menu {
|
|
102
|
-
border-radius: 3px;
|
|
103
|
-
box-shadow: 0 2px 5px 0 rgb(0, 0, 0, 0.26);
|
|
104
|
-
|
|
105
|
-
position: absolute;
|
|
106
|
-
top: 100%;
|
|
107
|
-
right: 0;
|
|
108
|
-
left: auto;
|
|
109
|
-
z-index: 1000;
|
|
110
|
-
display: none;
|
|
111
|
-
float: left;
|
|
112
|
-
min-width: 160px;
|
|
113
|
-
padding: 5px 0;
|
|
114
|
-
margin: 2px 0 0;
|
|
115
|
-
font-size: 14px;
|
|
116
|
-
text-align: left;
|
|
117
|
-
list-style: none;
|
|
118
|
-
background-color: #fff;
|
|
119
|
-
-webkit-background-clip: padding-box;
|
|
120
|
-
background-clip: padding-box;
|
|
121
|
-
}
|
|
122
|
-
.dropdown-menu{
|
|
123
|
-
max-height: 240px;
|
|
124
|
-
overflow-y: auto;
|
|
125
|
-
}
|
|
126
|
-
.dropdown-menu:not(.open){
|
|
127
|
-
margin-top: -20px;
|
|
128
|
-
opacity: 0;
|
|
129
|
-
visibility: hidden;
|
|
130
|
-
display: block;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.dropdown-menu.open{
|
|
134
|
-
margin-top: 12px; //0;
|
|
135
|
-
opacity: 1;
|
|
136
|
-
visibility: visible;
|
|
137
|
-
display: block;
|
|
138
|
-
transition: all 150ms linear;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.dropdown-menu li {
|
|
142
|
-
position: relative;
|
|
143
|
-
|
|
144
|
-
.li-selected{
|
|
145
|
-
color: #4285f4;
|
|
146
|
-
background-color: #eee;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.dropdown-menu .divider{
|
|
151
|
-
background-color: rgba(0,0,0,.12);
|
|
152
|
-
margin: 5px 0;
|
|
153
|
-
|
|
154
|
-
height: 1px;
|
|
155
|
-
overflow: hidden;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.dropdown-menu li>a{
|
|
159
|
-
font-size: 13px;
|
|
160
|
-
padding: 10px 20px;
|
|
161
|
-
margin: 0 5px;
|
|
162
|
-
border-radius: 2px;
|
|
163
|
-
transition: all 150ms linear;
|
|
164
|
-
|
|
165
|
-
display: block;
|
|
166
|
-
clear: both;
|
|
167
|
-
font-weight: 400;
|
|
168
|
-
line-height: 1.42857143;
|
|
169
|
-
color: #333;
|
|
170
|
-
white-space: nowrap;
|
|
171
|
-
text-decoration: none;
|
|
172
|
-
|
|
173
|
-
cursor: pointer;
|
|
174
|
-
|
|
175
|
-
.material-icons {
|
|
176
|
-
vertical-align: middle;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
&:hover{
|
|
180
|
-
background-color: #3ea9f5;
|
|
181
|
-
color: #fff;
|
|
182
|
-
box-shadow: 0 12px 20px -10px rgba(62, 169, 245, 0.28), 0 4px 20px 0 rgba(0, 0, 0, 0.12), 0 7px 8px -5px rgba(62, 169, 245, 0.2);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
.material-icons {
|
|
188
|
-
font-family: "Material Icons";
|
|
189
|
-
font-weight: 400;
|
|
190
|
-
font-style: normal;
|
|
191
|
-
font-size: 24px;
|
|
192
|
-
line-height: 1;
|
|
193
|
-
letter-spacing: normal;
|
|
194
|
-
text-transform: none;
|
|
195
|
-
display: inline-block;
|
|
196
|
-
white-space: nowrap;
|
|
197
|
-
word-wrap: normal;
|
|
198
|
-
direction: ltr;
|
|
199
|
-
-webkit-font-smoothing: antialiased;
|
|
200
|
-
-moz-osx-font-smoothing: grayscale;
|
|
201
|
-
text-rendering: optimizeLegibility;
|
|
202
|
-
font-feature-settings: "liga";
|
|
203
|
-
|
|
204
|
-
top: 0;
|
|
205
|
-
position: relative;
|
|
206
|
-
font-size: 20px;
|
|
207
|
-
vertical-align: middle;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
.ripple-container {
|
|
211
|
-
position: absolute;
|
|
212
|
-
top: 0;
|
|
213
|
-
left: 0;
|
|
214
|
-
z-index: 1;
|
|
215
|
-
width: 100%;
|
|
216
|
-
height: 100%;
|
|
217
|
-
overflow: hidden;
|
|
218
|
-
border-radius: inherit;
|
|
219
|
-
pointer-events: none;
|
|
220
|
-
|
|
221
|
-
.disabled &{
|
|
222
|
-
display: none;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
.ripple {
|
|
226
|
-
position: absolute;
|
|
227
|
-
width: 20px;
|
|
228
|
-
height: 20px;
|
|
229
|
-
margin-left: -10px;
|
|
230
|
-
margin-top: -10px;
|
|
231
|
-
border-radius: 100%;
|
|
232
|
-
background-color: #000; // fallback color
|
|
233
|
-
background-color: rgba(0,0,0,0.05);
|
|
234
|
-
transform: scale(1);
|
|
235
|
-
transform-origin: 50%;
|
|
236
|
-
opacity: 0;
|
|
237
|
-
pointer-events: none;
|
|
238
|
-
}
|
|
239
|
-
.ripple.ripple-on {
|
|
240
|
-
transition: opacity 0.15s ease-in 0s, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
|
|
241
|
-
opacity: 0.1;
|
|
242
|
-
}
|
|
243
|
-
.ripple.ripple-out {
|
|
244
|
-
transition: opacity 0.1s linear 0s !important;
|
|
245
|
-
opacity: 0;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import { AppConfigProvider } from 'src/app/services/app-config';
|
|
2
|
-
import { TiledeskAuthService } from 'src/chat21-core/providers/tiledesk/tiledesk-auth.service';
|
|
3
|
-
import { EventsService } from 'src/app/services/events-service';
|
|
4
|
-
import { ProjectsService } from './../../services/projects/projects.service';
|
|
5
|
-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
|
6
|
-
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
7
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
8
|
-
import { Project } from 'src/chat21-core/models/projects';
|
|
9
|
-
import { CustomTranslateService } from 'src/chat21-core/providers/custom-translate.service';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'app-navbar',
|
|
13
|
-
templateUrl: './navbar.component.html',
|
|
14
|
-
styleUrls: ['./navbar.component.scss'],
|
|
15
|
-
})
|
|
16
|
-
export class NavbarComponent implements OnInit {
|
|
17
|
-
|
|
18
|
-
@Input() isSoundEnabled: boolean;
|
|
19
|
-
@Output() onSoundChange = new EventEmitter<string>();
|
|
20
|
-
|
|
21
|
-
private logger: LoggerService = LoggerInstance.getInstance();
|
|
22
|
-
private tiledeskToken: string;
|
|
23
|
-
|
|
24
|
-
public projects: Project[];
|
|
25
|
-
public project: any;
|
|
26
|
-
private USER_ROLE: string;
|
|
27
|
-
|
|
28
|
-
public translationsMap: Map<string, string> = new Map();
|
|
29
|
-
|
|
30
|
-
public openDropdownProjects: boolean = false
|
|
31
|
-
private public_Key: string;
|
|
32
|
-
public isVisible: boolean;
|
|
33
|
-
public MT: boolean;
|
|
34
|
-
|
|
35
|
-
constructor(
|
|
36
|
-
private projectsService: ProjectsService,
|
|
37
|
-
private tiledeskAuthService: TiledeskAuthService,
|
|
38
|
-
private appConfigProvider: AppConfigProvider,
|
|
39
|
-
private translateService: CustomTranslateService,
|
|
40
|
-
private events: EventsService,
|
|
41
|
-
) { }
|
|
42
|
-
|
|
43
|
-
ngOnInit() {
|
|
44
|
-
this.listenToUserGoOnline();
|
|
45
|
-
this.getStoredProjectAndUserRole();
|
|
46
|
-
this.initTranslations();
|
|
47
|
-
this.getOSCODE();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
initTranslations(){
|
|
51
|
-
let keys= [
|
|
52
|
-
"NAVBAR.SIMULATE_VISITOR",
|
|
53
|
-
"NAVBAR.PROJECT_SETTINGS",
|
|
54
|
-
"NAVBAR.VIEW_ALL_PROJECTS",
|
|
55
|
-
"NAVBAR.ADD_PROJECT",
|
|
56
|
-
"NAVBAR.RECENT_PROJECTS",
|
|
57
|
-
"NAVBAR.OTHER_PROJECTS"
|
|
58
|
-
]
|
|
59
|
-
|
|
60
|
-
this.translationsMap = this.translateService.translateLanguage(keys)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
listenToUserGoOnline(){
|
|
64
|
-
this.events.subscribe('go:online', (isOnline)=> {
|
|
65
|
-
this.logger.log('[NAVBAR] listen to go:online --> ', isOnline);
|
|
66
|
-
if(isOnline){
|
|
67
|
-
this.tiledeskToken = this.tiledeskAuthService.getTiledeskToken();
|
|
68
|
-
this.getProjects()
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
getProjects() {
|
|
74
|
-
this.logger.log('[NAVBAR] calling getProjects ... ');
|
|
75
|
-
this.projectsService.getProjects(this.tiledeskToken).subscribe((projects: any) => {
|
|
76
|
-
this.logger.log('[NAVBAR] getProjects PROJECTS ', projects);
|
|
77
|
-
if (projects) {
|
|
78
|
-
// this.projects = projects;
|
|
79
|
-
this.projects = projects.filter((project: any) => {
|
|
80
|
-
// this.logger.log('[NAVBAR] getProjects PROJECTS status ', project.id_project.status);
|
|
81
|
-
return project.id_project.status === 100;
|
|
82
|
-
});
|
|
83
|
-
this.logger.log('[NAVBAR] getProjects this.projects ', this.projects);
|
|
84
|
-
}
|
|
85
|
-
}, (error) => {
|
|
86
|
-
this.logger.error('[NAVBAR] getProjects - ERROR ', error)
|
|
87
|
-
}, () => {
|
|
88
|
-
this.logger.log('[NAVBAR] getProjects - COMPLETE')
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
getStoredProjectAndUserRole() {
|
|
93
|
-
this.events.subscribe('storage:last_project',project =>{
|
|
94
|
-
this.logger.log('[NAVBAR] stored_project ', project)
|
|
95
|
-
if (project && project !== 'undefined') {
|
|
96
|
-
this.project = project;
|
|
97
|
-
this.USER_ROLE = project.role;
|
|
98
|
-
}
|
|
99
|
-
})
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
getOSCODE() {
|
|
103
|
-
this.public_Key = this.appConfigProvider.getConfig().t2y12PruGU9wUtEGzBJfolMIgK;
|
|
104
|
-
this.logger.log('[NAVBAR] AppConfigService getAppConfig public_Key', this.public_Key)
|
|
105
|
-
this.logger.log('[NAVBAR] public_Key', this.public_Key)
|
|
106
|
-
|
|
107
|
-
let keys = this.public_Key.split("-");
|
|
108
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - public_Key keys', keys)
|
|
109
|
-
|
|
110
|
-
keys.forEach(key => {
|
|
111
|
-
// this.logger.log('NavbarComponent public_Key key', key)
|
|
112
|
-
if (key.includes("PAY")) {
|
|
113
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - key', key);
|
|
114
|
-
let pay = key.split(":");
|
|
115
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay key&value', pay);
|
|
116
|
-
if (pay[1] === "F") {
|
|
117
|
-
this.isVisible = false;
|
|
118
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay isVisible', this.isVisible);
|
|
119
|
-
} else {
|
|
120
|
-
this.isVisible = true;
|
|
121
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - pay isVisible', this.isVisible);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (key.includes("MTT")) {
|
|
126
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - key', key);
|
|
127
|
-
let mt = key.split(":");
|
|
128
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt key&value', mt);
|
|
129
|
-
if (mt[1] === "F") {
|
|
130
|
-
this.MT = false;
|
|
131
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt is', this.MT);
|
|
132
|
-
} else {
|
|
133
|
-
this.MT = true;
|
|
134
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt is', this.MT);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
if (!this.public_Key.includes("MTT")) {
|
|
140
|
-
this.MT = false;
|
|
141
|
-
// this.logger.log('PUBLIC-KEY (Navbar) - mt is', this.MT);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
onClickSound(event: string){
|
|
148
|
-
this.onSoundChange.emit(event)
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
testWidgetPage() {
|
|
153
|
-
const simulateVisitorBtnElem = <HTMLElement>document.querySelector('.simulate-visitor-btn');
|
|
154
|
-
simulateVisitorBtnElem.blur();
|
|
155
|
-
// + '&isOpen=true'
|
|
156
|
-
const url = this.appConfigProvider.getConfig().testsiteBaseUrl + '?tiledesk_projectid=' + this.project.id_project.id + '&project_name=' + this.project.id_project.name + '&role=' + this.USER_ROLE
|
|
157
|
-
window.open(url, '_blank');
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
onClickDropdownOption(event: string){
|
|
161
|
-
const baseUrl = this.appConfigProvider.getConfig().dashboardUrl
|
|
162
|
-
let url = baseUrl
|
|
163
|
-
if(event === 'projectSettings'){
|
|
164
|
-
url = baseUrl + '#/project/' + this.project.id_project.id + '/project-settings/general' + '?token=' + this.tiledeskToken
|
|
165
|
-
}else if(event ==='allProjects'){
|
|
166
|
-
url = baseUrl + '#/projects/' + '?token=' + this.tiledeskToken
|
|
167
|
-
}else if('addProject'){
|
|
168
|
-
url = baseUrl + '#/create-new-project/' + '?token=' + this.tiledeskToken
|
|
169
|
-
}
|
|
170
|
-
console.log('onClickDropdownOption-->', url)
|
|
171
|
-
window.open(url, '_blank');
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
goToHome(id_project: string, project_name: string,) {
|
|
175
|
-
// this.logger.log('!NAVBAR goToHome prjct ', prjct)
|
|
176
|
-
this.logger.log('[NAVBAR] goToHome id_project ', id_project, 'project_name', project_name)
|
|
177
|
-
// RUNS ONLY IF THE THE USER CLICK OVER A PROJECT WITH THE ID DIFFERENT FROM THE CURRENT PROJECT ID
|
|
178
|
-
const baseUrl = this.appConfigProvider.getConfig().dashboardUrl
|
|
179
|
-
if (id_project !== this.project.id_project.id) {
|
|
180
|
-
// this.subscription.unsubscribe();
|
|
181
|
-
// this.unsubscribe$.next();
|
|
182
|
-
// this.unsubscribe$.complete();
|
|
183
|
-
|
|
184
|
-
const url = this.appConfigProvider.getConfig().dashboardUrl + `#/project/${id_project}/home`
|
|
185
|
-
window.open(url, '_blank');
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ProjectsService } from './projects.service';
|
|
4
|
-
|
|
5
|
-
describe('ProjectsService', () => {
|
|
6
|
-
beforeEach(() => TestBed.configureTestingModule({}));
|
|
7
|
-
|
|
8
|
-
it('should be created', () => {
|
|
9
|
-
const service: ProjectsService = TestBed.get(ProjectsService);
|
|
10
|
-
expect(service).toBeTruthy();
|
|
11
|
-
});
|
|
12
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
|
2
|
-
import { Injectable } from '@angular/core';
|
|
3
|
-
import { map } from 'rxjs/operators';
|
|
4
|
-
import { Project } from 'src/chat21-core/models/projects';
|
|
5
|
-
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
6
|
-
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
7
|
-
import { AppConfigProvider } from '../app-config';
|
|
8
|
-
|
|
9
|
-
@Injectable({
|
|
10
|
-
providedIn: 'root'
|
|
11
|
-
})
|
|
12
|
-
export class ProjectsService {
|
|
13
|
-
|
|
14
|
-
private apiUrl: string;
|
|
15
|
-
private logger: LoggerService = LoggerInstance.getInstance();
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
-
public http: HttpClient,
|
|
19
|
-
public appConfigProvider: AppConfigProvider
|
|
20
|
-
) {
|
|
21
|
-
|
|
22
|
-
this.logger.log('[PROJECTS-SERVICE] HELLO !');
|
|
23
|
-
this.apiUrl = appConfigProvider.getConfig().apiUrl;
|
|
24
|
-
this.logger.log('[PROJECTS-SERVICE] apiUrl ', this.apiUrl);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public getProjects(token: string) {
|
|
28
|
-
const url = this.apiUrl + "projects/";
|
|
29
|
-
this.logger.log('[PROJECTS-SERVICE] getProjects - URL ', url);
|
|
30
|
-
|
|
31
|
-
const httpOptions = {
|
|
32
|
-
headers: new HttpHeaders({
|
|
33
|
-
'Content-Type': 'application/json',
|
|
34
|
-
Authorization: token
|
|
35
|
-
})
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
return this.http.get(url, httpOptions).pipe(map((res: Project[]) => {
|
|
39
|
-
this.logger.log('[PROJECTS-SERVICE] getProjects - RES ', res);
|
|
40
|
-
return res
|
|
41
|
-
}))
|
|
42
|
-
}
|
|
43
|
-
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface Project {
|
|
2
|
-
_id: string;
|
|
3
|
-
updatedAt?: any;
|
|
4
|
-
createdAt?: any;
|
|
5
|
-
name?: string;
|
|
6
|
-
activeOperatingHours?: boolean;
|
|
7
|
-
operatingHours?: any
|
|
8
|
-
createdBy?: string;
|
|
9
|
-
id_project?: any;
|
|
10
|
-
widget?: any;
|
|
11
|
-
settings?: any;
|
|
12
|
-
role?: string;
|
|
13
|
-
user_available?: boolean;
|
|
14
|
-
profile_name?: any;
|
|
15
|
-
profile_agents?: any;
|
|
16
|
-
trial_expired?: any;
|
|
17
|
-
trial_days_left?: number;
|
|
18
|
-
trial_days?: number;
|
|
19
|
-
profile_type?: string;
|
|
20
|
-
subscription_is_active?: any;
|
|
21
|
-
profile?: any;
|
|
22
|
-
subscription_end_date?: any;
|
|
23
|
-
subscription_id?: any;
|
|
24
|
-
subscription_creation_date?: any;
|
|
25
|
-
subscription_start_date?: any;
|
|
26
|
-
__v?: any;
|
|
27
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { TYPE_DIRECT, TYPE_SUPPORT_GROUP } from 'src/chat21-core/utils/constants';
|
|
2
|
-
import { ConversationModel } from 'src/chat21-core/models/conversation';
|
|
3
|
-
import { Inject, Injectable, OnInit } from '@angular/core';
|
|
4
|
-
import { avatarPlaceholder, getColorBck } from './utils-user';
|
|
5
|
-
import moment from 'moment';
|
|
6
|
-
|
|
7
|
-
@Injectable()
|
|
8
|
-
export class ConvertRequestToConversation {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
initialize(){
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
getConvFromRequest(request: any): ConversationModel{
|
|
17
|
-
return new ConversationModel(
|
|
18
|
-
request.request_id,
|
|
19
|
-
request.attributes,
|
|
20
|
-
request.request_id && (request.request_id.startsWith('group-') || request.request_id.startsWith('support-group'))? TYPE_SUPPORT_GROUP: TYPE_DIRECT,
|
|
21
|
-
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
22
|
-
request.requester_id,
|
|
23
|
-
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
24
|
-
request.requester_id,
|
|
25
|
-
'',
|
|
26
|
-
true,
|
|
27
|
-
request.first_text,
|
|
28
|
-
request.first_text,
|
|
29
|
-
request.requester_id,
|
|
30
|
-
'',
|
|
31
|
-
request.lead && request.lead.fullname ? request.lead.fullname: null,
|
|
32
|
-
'0',
|
|
33
|
-
moment(request.createdAt).unix(),
|
|
34
|
-
getColorBck(request.lead.fullname),
|
|
35
|
-
avatarPlaceholder(request.lead.fullname),
|
|
36
|
-
false,
|
|
37
|
-
'text'
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
}
|