@chat21/chat21-ionic 3.0.79 → 3.0.80-rc.1
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 +62 -2
- package/README.md +2 -2
- package/package.json +1 -1
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +18 -2
- package/src/app/app.component.ts +73 -15
- package/src/app/app.module.ts +3 -1
- package/src/app/chatlib/conversation-detail/conversation-content/conversation-content.component.ts +8 -1
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.html +75 -23
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.scss +162 -85
- package/src/app/chatlib/conversation-detail/ion-conversation-detail/ion-conversation-detail.component.ts +39 -2
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.html +7 -19
- package/src/app/chatlib/conversation-detail/message/bubble-message/bubble-message.component.scss +6 -10
- 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 +16 -25
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.html +5 -1
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.scss +22 -15
- package/src/app/chatlib/conversation-detail/message/buttons/action-button/action-button.component.ts +25 -5
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.html +2 -1
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.scss +14 -15
- package/src/app/chatlib/conversation-detail/message/buttons/link-button/link-button.component.ts +24 -5
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.html +6 -1
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.scss +12 -13
- package/src/app/chatlib/conversation-detail/message/buttons/text-button/text-button.component.ts +26 -5
- package/src/app/chatlib/conversation-detail/message/html/html.component.ts +0 -1
- package/src/app/chatlib/conversation-detail/message/info-message/info-message.component.scss +2 -2
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.html +16 -6
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.scss +1 -3
- package/src/app/chatlib/conversation-detail/message/message-attachment/message-attachment.component.ts +2 -0
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.html +78 -52
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.scss +62 -20
- package/src/app/chatlib/list-conversations-component/ion-list-conversations/ion-list-conversations.component.ts +14 -10
- package/src/app/components/canned-response/canned-response.component.html +4 -4
- package/src/app/components/canned-response/canned-response.component.scss +1 -1
- package/src/app/components/canned-response/canned-response.component.ts +1 -0
- package/src/app/components/contacts-directory/contacts-directory.component.html +22 -26
- package/src/app/components/contacts-directory/contacts-directory.component.scss +8 -6
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.html +61 -42
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.scss +98 -61
- package/src/app/components/conversation-detail/header-conversation-detail/header-conversation-detail.component.ts +9 -25
- package/src/app/components/conversation-detail/message-text-area/message-text-area.component.html +6 -5
- 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 +4 -83
- package/src/app/components/conversation-info/info-content/info-content.component.html +2 -1
- package/src/app/components/conversation-info/info-content/info-content.component.ts +3 -2
- package/src/app/components/conversation-info/info-direct/info-direct.component.html +1 -9
- package/src/app/components/conversation-info/info-direct/info-direct.component.ts +0 -2
- package/src/app/components/conversation-info/info-group/info-group.component.html +44 -108
- package/src/app/components/conversation-info/info-group/info-group.component.scss +101 -61
- package/src/app/components/conversation-info/info-group/info-group.component.ts +1 -0
- package/src/app/components/{ddp-header/ddp-header.component.html → conversations-list/header-conversations-list/header-conversations-list.component.html} +3 -3
- package/src/app/components/{ddp-header/ddp-header.component.scss → conversations-list/header-conversations-list/header-conversations-list.component.scss} +16 -4
- package/src/app/components/{conversation-detail/bubble-my-message/bubble-my-message.component.spec.ts → conversations-list/header-conversations-list/header-conversations-list.component.spec.ts} +6 -6
- package/src/app/components/{ddp-header/ddp-header.component.ts → conversations-list/header-conversations-list/header-conversations-list.component.ts} +7 -16
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.html +12 -0
- package/src/app/components/conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.scss +14 -0
- package/src/app/components/{conversation-detail/option-header/option-header.component.spec.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.spec.ts} +5 -5
- package/src/app/components/{conversation-detail/option-header/option-header.component.ts → conversations-list/header-conversations-list-archived/header-conversations-list-archived.component.ts} +5 -4
- package/src/app/components/navbar/navbar.component.html +103 -0
- package/src/app/components/navbar/navbar.component.scss +249 -0
- package/src/app/components/{ddp-header/ddp-header.component.spec.ts → navbar/navbar.component.spec.ts} +6 -6
- package/src/app/components/navbar/navbar.component.ts +189 -0
- package/src/app/components/project-item/project-item.component.html +98 -149
- package/src/app/components/project-item/project-item.component.scss +42 -35
- package/src/app/components/project-item/project-item.component.ts +16 -4
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.html +3 -3
- package/src/app/components/sidebar-user-details/sidebar-user-details.component.ts +2 -7
- package/src/app/components/utils/user-presence/user-presence.component.html +7 -2
- package/src/app/components/utils/user-presence/user-presence.component.scss +35 -18
- package/src/app/components/utils/user-presence/user-presence.component.ts +6 -10
- package/src/app/pages/contacts-directory/contacts-directory.page.html +1 -1
- package/src/app/pages/contacts-directory/contacts-directory.page.scss +41 -0
- package/src/app/pages/contacts-directory/contacts-directory.page.ts +2 -0
- package/src/app/pages/conversation-detail/conversation-detail.module.ts +0 -8
- package/src/app/pages/conversation-detail/conversation-detail.page.html +40 -23
- package/src/app/pages/conversation-detail/conversation-detail.page.scss +40 -250
- package/src/app/pages/conversation-detail/conversation-detail.page.ts +183 -72
- package/src/app/pages/conversations-list/conversations-list.page.html +11 -8
- package/src/app/pages/conversations-list/conversations-list.page.scss +11 -2
- package/src/app/pages/conversations-list/conversations-list.page.ts +25 -22
- 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 +4 -0
- package/src/app/pages/loader-preview/loader-preview.page.ts +1 -2
- package/src/app/pages/profile-info/profile-info.page.html +2 -4
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.html +1 -1
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.scss +42 -0
- package/src/app/pages/unassigned-conversations/unassigned-conversations.page.ts +1 -0
- package/src/app/services/canned-responses/canned-responses.service.ts +26 -0
- package/src/app/services/projects/projects.service.spec.ts +12 -0
- package/src/app/services/projects/projects.service.ts +43 -0
- package/src/app/services/tiledesk/tiledesk.service.ts +1 -25
- package/src/app/shared/shared.module.ts +24 -33
- package/src/assets/i18n/ar.json +278 -265
- package/src/assets/i18n/az.json +14 -1
- package/src/assets/i18n/de.json +15 -2
- package/src/assets/i18n/en.json +15 -2
- package/src/assets/i18n/es.json +15 -2
- package/src/assets/i18n/fr.json +14 -1
- package/src/assets/i18n/it.json +14 -1
- package/src/assets/i18n/kk.json +15 -2
- package/src/assets/i18n/pt.json +15 -2
- package/src/assets/i18n/ru.json +14 -1
- package/src/assets/i18n/sr.json +277 -264
- package/src/assets/i18n/sv.json +15 -2
- package/src/assets/i18n/tr.json +15 -2
- package/src/assets/i18n/uk.json +15 -2
- package/src/assets/i18n/uz.json +14 -1
- package/src/assets/sounds/wheep-wheep.mp3 +0 -0
- package/src/chat21-core/models/conversation.ts +0 -1
- package/src/chat21-core/models/projects.ts +27 -0
- package/src/chat21-core/providers/firebase/firebase-typing.service.ts +7 -9
- package/src/chat21-core/utils/constants.ts +5 -1
- package/src/chat21-core/utils/convertRequestToConversation.ts +41 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.html +8 -5
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +87 -17
- package/src/chat21-core/utils/user-typing/user-typing.component.ts +12 -94
- package/src/chat21-core/utils/utils.ts +38 -10
- package/src/global.scss +48 -56
- package/src/index.html +2 -2
- package/src/variables.scss +30 -10
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss +0 -21
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts +0 -14
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html +0 -54
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss +0 -98
- package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts +0 -84
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.html +0 -30
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.scss +0 -83
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-others-message/bubble-others-message.component.ts +0 -68
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.html +0 -3
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.scss +0 -10
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.spec.ts +0 -24
- package/src/app/components/conversation-detail/bubble-system-message/bubble-system-message.component.ts +0 -14
- package/src/app/components/conversation-detail/option-header/option-header.component.html +0 -13
- package/src/app/components/conversation-detail/option-header/option-header.component.scss +0 -0
|
@@ -590,8 +590,10 @@ export function setConversationAvatar(
|
|
|
590
590
|
conversationWith: string,
|
|
591
591
|
conversationWithFullname: string,
|
|
592
592
|
conversationChannelType: string,
|
|
593
|
+
projectId?: string,
|
|
594
|
+
project_name?: string,
|
|
593
595
|
width?: string,
|
|
594
|
-
height?: string
|
|
596
|
+
height?: string,
|
|
595
597
|
): any {
|
|
596
598
|
const conversationWidth = (width) ? width : '40px';
|
|
597
599
|
const conversationHeight = (height) ? height : '40px';
|
|
@@ -602,6 +604,8 @@ export function setConversationAvatar(
|
|
|
602
604
|
channelType: conversationChannelType,
|
|
603
605
|
avatar: avatarPlaceholder(conversationWithFullname),
|
|
604
606
|
color: getColorBck(conversationWithFullname),
|
|
607
|
+
projectId: projectId,
|
|
608
|
+
project_name: project_name,
|
|
605
609
|
width: conversationWidth,
|
|
606
610
|
height: conversationHeight
|
|
607
611
|
};
|
|
@@ -694,15 +698,35 @@ export function isURL(str: string) {
|
|
|
694
698
|
}
|
|
695
699
|
}
|
|
696
700
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
701
|
+
export function convertColorToRGBA(color, opacity) {
|
|
702
|
+
let result = color;
|
|
703
|
+
// console.log('convertColorToRGBA' + color, opacity);
|
|
704
|
+
if ( color.indexOf('#') > -1 ) {
|
|
705
|
+
color = color.replace('#', '');
|
|
706
|
+
const r = parseInt(color.substring(0, 2), 16);
|
|
707
|
+
const g = parseInt(color.substring(2, 4), 16);
|
|
708
|
+
const b = parseInt(color.substring(4, 6), 16);
|
|
709
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
710
|
+
} else if ( color.indexOf('rgba') > -1 ) {
|
|
711
|
+
const rgb = color.split(',');
|
|
712
|
+
const r = rgb[0].substring(5);
|
|
713
|
+
const g = rgb[1];
|
|
714
|
+
const b = rgb[2];
|
|
715
|
+
// const b = rgb[2].substring(1, rgb[2].length - 1);
|
|
716
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
717
|
+
} else if ( color.indexOf('rgb(') > -1 ) {
|
|
718
|
+
const rgb = color.split(',');
|
|
719
|
+
// console.log(rgb);
|
|
720
|
+
const r = rgb[0].substring(4);
|
|
721
|
+
const g = rgb[1];
|
|
722
|
+
const b = rgb[2].substring(0, rgb[2].length - 1);
|
|
723
|
+
// console.log(b);
|
|
724
|
+
// console.log(rgb[2].length);
|
|
725
|
+
result = 'rgba(' + r + ',' + g + ',' + b + ',' + opacity / 100 + ')';
|
|
726
|
+
}
|
|
727
|
+
// console.log('convertColorToRGBA' + color + result);
|
|
728
|
+
return result;
|
|
729
|
+
}
|
|
706
730
|
|
|
707
731
|
export function getParameterByName(name: string) {
|
|
708
732
|
var url = window.location.href;
|
|
@@ -810,6 +834,10 @@ export function redirect2(router, IDConv, conversationSelected) {
|
|
|
810
834
|
/** */
|
|
811
835
|
export function checkPlatformIsMobile() {
|
|
812
836
|
// console.log('UTILS - checkPlatformIsMobile:: ', window.innerWidth);
|
|
837
|
+
// if (/Android|iPhone/i.test(window.navigator.userAgent)) {
|
|
838
|
+
// return true
|
|
839
|
+
// }
|
|
840
|
+
// return false
|
|
813
841
|
if (window.innerWidth < 768) {
|
|
814
842
|
return true;
|
|
815
843
|
}
|
package/src/global.scss
CHANGED
|
@@ -362,19 +362,7 @@ app-message-text-area {
|
|
|
362
362
|
z-index: 99999; // nk
|
|
363
363
|
background: #fff; // nk
|
|
364
364
|
}
|
|
365
|
-
|
|
366
|
-
width: 100%;
|
|
367
|
-
}
|
|
368
|
-
app-bubble-system-message {
|
|
369
|
-
max-width: 80%;
|
|
370
|
-
margin: 0 auto;
|
|
371
|
-
}
|
|
372
|
-
app-bubble-my-message {
|
|
373
|
-
width: 100%;
|
|
374
|
-
}
|
|
375
|
-
app-bubble-others-message {
|
|
376
|
-
width: 100%;
|
|
377
|
-
}
|
|
365
|
+
|
|
378
366
|
app-conversation-info {
|
|
379
367
|
height: calc(100% - 60px);
|
|
380
368
|
}
|
|
@@ -794,66 +782,70 @@ select:-webkit-autofill:focus {
|
|
|
794
782
|
}
|
|
795
783
|
|
|
796
784
|
// select teammate status in user detail drawer
|
|
797
|
-
.
|
|
785
|
+
.teammate-status-in-drawer {
|
|
786
|
+
|
|
787
|
+
&.ng-select {
|
|
798
788
|
|
|
799
|
-
.ng-select-container {
|
|
800
|
-
background-color: #2d323e;
|
|
801
|
-
color: #fff;
|
|
802
|
-
border: 1px solid #2d323e;
|
|
803
|
-
}
|
|
804
|
-
&.ng-select-opened{
|
|
805
789
|
.ng-select-container {
|
|
806
790
|
background-color: #2d323e;
|
|
791
|
+
color: #fff;
|
|
807
792
|
border: 1px solid #2d323e;
|
|
808
793
|
}
|
|
794
|
+
&.ng-select-opened{
|
|
795
|
+
.ng-select-container {
|
|
796
|
+
background-color: #2d323e;
|
|
797
|
+
border: 1px solid #2d323e;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
&.ng-select-focused:not(.ng-select-opened){
|
|
802
|
+
>.ng-select-container{
|
|
803
|
+
border: 1px solid #2d323e;
|
|
804
|
+
box-shadow: unset;
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
-
|
|
812
|
-
|
|
811
|
+
.ng-dropdown-panel {
|
|
812
|
+
background-color: #2d323e;
|
|
813
|
+
border: 1px solid #2d323e;
|
|
814
|
+
|
|
815
|
+
&.ng-select-bottom {
|
|
813
816
|
border: 1px solid #2d323e;
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
817
|
+
margin-top: 8px;
|
|
818
|
+
border-top-right-radius: 4px;
|
|
819
|
+
border-top-left-radius: 4px;
|
|
820
|
+
}
|
|
818
821
|
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
.ng-dropdown-panel {
|
|
822
|
-
background-color: #2d323e;
|
|
823
|
-
border: 1px solid #2d323e;
|
|
824
|
-
|
|
825
|
-
&.ng-select-bottom {
|
|
826
|
-
border: 1px solid #2d323e;
|
|
827
|
-
margin-top: 8px;
|
|
828
|
-
border-top-right-radius: 4px;
|
|
829
|
-
border-top-left-radius: 4px;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
.ng-dropdown-panel-items {
|
|
833
|
-
.ng-option {
|
|
834
|
-
background-color: #2d323e;
|
|
835
|
-
color: #fff;
|
|
836
|
-
|
|
837
|
-
&.ng-option-marked {
|
|
838
|
-
background-color: rgba(30, 33, 41, 0.3);
|
|
839
|
-
color: #fff;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
&.ng-option-selected {
|
|
822
|
+
.ng-dropdown-panel-items {
|
|
823
|
+
.ng-option {
|
|
843
824
|
background-color: #2d323e;
|
|
844
825
|
color: #fff;
|
|
826
|
+
|
|
827
|
+
&.ng-option-marked {
|
|
828
|
+
background-color: rgba(30, 33, 41, 0.3);
|
|
829
|
+
color: #fff;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
&.ng-option-selected {
|
|
833
|
+
background-color: #2d323e;
|
|
834
|
+
color: #fff;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
&.ng-option-marked.ng-option-selected{
|
|
838
|
+
background-color: rgba(30, 33, 41, 0.3);
|
|
839
|
+
color: #fff;
|
|
840
|
+
}
|
|
845
841
|
}
|
|
846
|
-
|
|
847
|
-
&.ng-option-marked.ng-option-selected{
|
|
848
|
-
background-color: rgba(30, 33, 41, 0.3);
|
|
849
|
-
color: #fff;
|
|
850
|
-
}
|
|
842
|
+
|
|
851
843
|
}
|
|
852
|
-
|
|
853
844
|
}
|
|
854
845
|
}
|
|
855
846
|
|
|
856
847
|
|
|
848
|
+
|
|
857
849
|
/* *** SMALL SIDEBAR STYLE *** */
|
|
858
850
|
.small-sidebar-tiledesk-nav-user {
|
|
859
851
|
height: 40px;
|
package/src/index.html
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<!-- <script src="https://unpkg.com/mqtt@4.1.0/dist/mqtt.min.js"></script> -->
|
|
34
34
|
<!-- <script src="./assets/js/watchToConnectionAtStartUp.js"></script> -->
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
<!-- segment analytics -->
|
|
38
38
|
<script>
|
|
39
39
|
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware"];analytics.factory=function(e){return function(){var t=Array.prototype.slice.call(arguments);t.unshift(e);analytics.push(t);return analytics}};for(var e=0;e<analytics.methods.length;e++){var key=analytics.methods[e];analytics[key]=analytics.factory(key)}analytics.load=function(key,e){var t=document.createElement("script");t.type="text/javascript";t.async=!0;t.src="https://cdn.segment.com/analytics.js/v1/" + key + "/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n);analytics._loadOptions=e};analytics._writeKey="qaTU0wG6VH6xPAhOzD2kneI70Txg1fTB";;analytics.SNIPPET_VERSION="4.15.3";
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
analytics.page();
|
|
42
42
|
}}();
|
|
43
43
|
</script>
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
<!-- add to homescreen for ios -->
|
|
46
46
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
47
47
|
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
package/src/variables.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
body {
|
|
2
2
|
/* Color palette */
|
|
3
3
|
--white: #ffffff;
|
|
4
4
|
--black: #000000;
|
|
@@ -7,27 +7,47 @@
|
|
|
7
7
|
--basic-green: #0A7D41;
|
|
8
8
|
--dark-green: #005f3b;
|
|
9
9
|
--light-green: #8cc841;
|
|
10
|
-
|
|
11
10
|
--light-gray: #F2F2F2;
|
|
12
11
|
--basic-gray: #666666;
|
|
13
12
|
--dark-gray: #363636;
|
|
14
|
-
|
|
15
|
-
|
|
16
13
|
--light-blue: #C9E4F6;
|
|
17
14
|
--basic-blue: #2a69c1;
|
|
18
15
|
--bubble-blue: rgb(0, 153, 255);
|
|
19
|
-
|
|
20
|
-
--bubble-privateMsg: rgb(254, 214, 168);
|
|
21
|
-
--bubble-privateMsgColor: rgb(47, 57, 65);
|
|
16
|
+
|
|
22
17
|
|
|
23
18
|
--basic-yellow: #FFC627;
|
|
24
19
|
--basic-red: #EB1E23;
|
|
25
20
|
|
|
26
|
-
--bck-msg-sent: #
|
|
21
|
+
--bck-msg-sent: #2a6ac1;
|
|
27
22
|
--col-msg-sent:#ffffff;
|
|
23
|
+
|
|
24
|
+
--bck-msg-received: #f0f2f7;
|
|
25
|
+
--col-msg-received: #06132b;
|
|
26
|
+
|
|
27
|
+
--bubble-lightyellow: rgb(255, 247, 237);
|
|
28
|
+
--bubble-privateMsg: rgb(254, 214, 168);
|
|
29
|
+
--bubble-privateMsgColor: rgb(47, 57, 65);
|
|
30
|
+
|
|
28
31
|
--light-white: #f7f7f7;
|
|
29
32
|
--black: #1a1a1a;
|
|
30
33
|
--gray: #aaaaaa;
|
|
31
34
|
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
--header-height: 60px;
|
|
36
|
+
--list-bkg-color: #f8fafc;
|
|
37
|
+
--list-bkg-color-selected: rgba(24, 119, 242, 0.12); //rgba(24, 119, 242, 0.04);
|
|
38
|
+
|
|
39
|
+
--button-in-msg-font-size: 15px;
|
|
40
|
+
--buttonBackgroundColor: #ffffff;
|
|
41
|
+
--buttonTextColor: #2a6ac1;
|
|
42
|
+
--buttonHoverBackgroundColor: #2a6ac1;
|
|
43
|
+
--buttonHoverTextColor: #ffffff;
|
|
44
|
+
|
|
45
|
+
--padding-conversation-detail: 10px;
|
|
46
|
+
|
|
47
|
+
--border-radius-item: 16px;
|
|
48
|
+
--border-radius-content: 16px;
|
|
49
|
+
|
|
50
|
+
--sidebar-width: 60px;
|
|
51
|
+
--nav-bar-heigth: 60px;
|
|
52
|
+
|
|
53
|
+
}
|
package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.scss
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.row-day {
|
|
2
|
-
padding: 0 10px;
|
|
3
|
-
text-align: center;
|
|
4
|
-
width: 100%;
|
|
5
|
-
margin-top: 15px;
|
|
6
|
-
margin-bottom: 5px;
|
|
7
|
-
}
|
|
8
|
-
.header-day {
|
|
9
|
-
background-color: var(--transparent);
|
|
10
|
-
padding-top: 4px;
|
|
11
|
-
padding-bottom: 4px;
|
|
12
|
-
padding-left: 12px;
|
|
13
|
-
padding-right: 12px;
|
|
14
|
-
vertical-align: middle;
|
|
15
|
-
border-radius: 13px;
|
|
16
|
-
font-size: 14px;
|
|
17
|
-
font-weight: bold;
|
|
18
|
-
color: var(--basic-gray);
|
|
19
|
-
display: inline-block;
|
|
20
|
-
}
|
|
21
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { IonicModule } from '@ionic/angular';
|
|
3
|
-
|
|
4
|
-
import { BubbleDayMessageComponent } from './bubble-day-message.component';
|
|
5
|
-
|
|
6
|
-
describe('BubbleDayMessageComponent', () => {
|
|
7
|
-
let component: BubbleDayMessageComponent;
|
|
8
|
-
let fixture: ComponentFixture<BubbleDayMessageComponent>;
|
|
9
|
-
|
|
10
|
-
beforeEach(async(() => {
|
|
11
|
-
TestBed.configureTestingModule({
|
|
12
|
-
declarations: [ BubbleDayMessageComponent ],
|
|
13
|
-
imports: [IonicModule.forRoot()]
|
|
14
|
-
}).compileComponents();
|
|
15
|
-
|
|
16
|
-
fixture = TestBed.createComponent(BubbleDayMessageComponent);
|
|
17
|
-
component = fixture.componentInstance;
|
|
18
|
-
fixture.detectChanges();
|
|
19
|
-
}));
|
|
20
|
-
|
|
21
|
-
it('should create', () => {
|
|
22
|
-
expect(component).toBeTruthy();
|
|
23
|
-
});
|
|
24
|
-
});
|
package/src/app/components/conversation-detail/bubble-day-message/bubble-day-message.component.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Component({
|
|
4
|
-
selector: 'app-bubble-day-message',
|
|
5
|
-
templateUrl: './bubble-day-message.component.html',
|
|
6
|
-
styleUrls: ['./bubble-day-message.component.scss'],
|
|
7
|
-
})
|
|
8
|
-
export class BubbleDayMessageComponent implements OnInit {
|
|
9
|
-
@Input() messageDate = '';
|
|
10
|
-
constructor() { }
|
|
11
|
-
|
|
12
|
-
ngOnInit() {}
|
|
13
|
-
|
|
14
|
-
}
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.html
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<div class="message message-my" [class.first-message]="isFirstMessage" >
|
|
2
|
-
|
|
3
|
-
<div class="bubble-message"
|
|
4
|
-
[class.image]="message.type == 'image'"
|
|
5
|
-
[class.no-text]="!message.text"
|
|
6
|
-
(mouseover)="showButtonInfo()">
|
|
7
|
-
<span class="buttonInfo" (click)="presentPopover($event, message)"> </span>
|
|
8
|
-
|
|
9
|
-
<div *ngIf="message.type == 'image';"
|
|
10
|
-
(click)="popupUrl(message.metadata.src,'windowName')"
|
|
11
|
-
>
|
|
12
|
-
<img
|
|
13
|
-
class="message-content message-content-image"
|
|
14
|
-
[src]="message.metadata.src"
|
|
15
|
-
[width]="getSizeImg(message).width"
|
|
16
|
-
[height]="getSizeImg(message).height" />
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<div *ngIf="message.type == 'file';" class="message-content message-content-text"
|
|
20
|
-
[innerHTML]="urlify(message.metadata.src, message.metadata.name)"
|
|
21
|
-
></div>
|
|
22
|
-
|
|
23
|
-
<div>
|
|
24
|
-
|
|
25
|
-
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
26
|
-
<div *ngIf="isPopupUrl(message.text); then contentPopup else contentNewTab">here is ignored</div>
|
|
27
|
-
<ng-template #contentPopup>
|
|
28
|
-
<div style="text-decoration: underline; padding:8px; cursor: pointer;" (click)="popupUrl(message.text,'windowName')">{{stripTags(message.text)}}</div>
|
|
29
|
-
</ng-template>
|
|
30
|
-
<ng-template #contentNewTab>
|
|
31
|
-
<div class="message-content message-content-text" [innerHTML]="message.text"></div>
|
|
32
|
-
</ng-template>
|
|
33
|
-
<!-- </div> -->
|
|
34
|
-
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
<div class="timestamp-message right">{{message.timestamp | date: 'H:mm'}}</div>
|
|
38
|
-
</div>
|
|
39
|
-
|
|
40
|
-
<div class="attribute-message">
|
|
41
|
-
<div class="status-message">
|
|
42
|
-
<span *ngIf="!message.status" class="material-icons">
|
|
43
|
-
<ion-icon name="time-outline"></ion-icon>
|
|
44
|
-
</span>
|
|
45
|
-
<span *ngIf="message.status==MSG_STATUS_SENT" class="material-icons">
|
|
46
|
-
<ion-icon name="checkmark-outline"></ion-icon>
|
|
47
|
-
</span>
|
|
48
|
-
<span *ngIf="message.status==MSG_STATUS_RETURN_RECEIPT" class="material-icons">
|
|
49
|
-
<ion-icon name="checkmark-done-outline"></ion-icon>
|
|
50
|
-
</span>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
</div>
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.scss
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
.message {
|
|
2
|
-
.bubble-message {
|
|
3
|
-
position: relative;
|
|
4
|
-
border-radius: 15px;
|
|
5
|
-
font-size: 15px;
|
|
6
|
-
// padding: 5px 10px 10px 10px;
|
|
7
|
-
display: block;
|
|
8
|
-
width: auto;
|
|
9
|
-
max-width: 80%;
|
|
10
|
-
line-height: 1.34;
|
|
11
|
-
direction: ltr;
|
|
12
|
-
padding: 0px;
|
|
13
|
-
.message-content-image {
|
|
14
|
-
border-radius: 15px 6px 0px 0px;
|
|
15
|
-
}
|
|
16
|
-
&.no-text {
|
|
17
|
-
line-height: 0;
|
|
18
|
-
.message-content-image {
|
|
19
|
-
border-radius: 15px 6px 0px 15px;
|
|
20
|
-
}
|
|
21
|
-
.message-content.message-content-text{
|
|
22
|
-
padding: 0px;
|
|
23
|
-
height: 0px;
|
|
24
|
-
}
|
|
25
|
-
.timestamp-message {
|
|
26
|
-
background-color: #00000045;
|
|
27
|
-
padding: 4px;
|
|
28
|
-
color: white;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
&.image{
|
|
32
|
-
max-width: 300px;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
.message-content:after {
|
|
40
|
-
content: "\00a0\00a0\00a0\00a0\00a0\00a0";
|
|
41
|
-
}
|
|
42
|
-
.timestamp-message {
|
|
43
|
-
font-size: 10px;
|
|
44
|
-
padding: 0px;
|
|
45
|
-
position: absolute;
|
|
46
|
-
bottom: 2px;
|
|
47
|
-
right: 6px;
|
|
48
|
-
line-height: 15px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.message-my {
|
|
52
|
-
width: 100%;
|
|
53
|
-
margin-top: 4px;
|
|
54
|
-
.message-content.message-content-text{
|
|
55
|
-
color: var(--white)!important;
|
|
56
|
-
padding: 5px 20px 5px 10px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
.bubble-message {
|
|
61
|
-
background-color: var(--bubble-blue);
|
|
62
|
-
color: white;
|
|
63
|
-
margin-right: 24px;
|
|
64
|
-
float: right;
|
|
65
|
-
border-top-right-radius: 6px;
|
|
66
|
-
border-bottom-right-radius: 6px;
|
|
67
|
-
}
|
|
68
|
-
&.first-message {
|
|
69
|
-
margin-top: 10px;
|
|
70
|
-
.bubble-message {
|
|
71
|
-
border-top-right-radius: 12px;
|
|
72
|
-
border-bottom-right-radius: 0px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.timestamp-message {
|
|
76
|
-
color: var(--white);
|
|
77
|
-
}
|
|
78
|
-
.attribute-message {
|
|
79
|
-
position: absolute;
|
|
80
|
-
width: 100%;
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
bottom: 0;
|
|
83
|
-
right: 0;
|
|
84
|
-
.status-message {
|
|
85
|
-
position: absolute;
|
|
86
|
-
top: 0;
|
|
87
|
-
right: 0;
|
|
88
|
-
width: 15px;
|
|
89
|
-
.material-icons {
|
|
90
|
-
font-size: 15px;
|
|
91
|
-
color: var(--basic-blue);
|
|
92
|
-
position: absolute;
|
|
93
|
-
bottom: 4px;
|
|
94
|
-
right: 2px;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
package/src/app/components/conversation-detail/bubble-my-message/bubble-my-message.component.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Input } from '@angular/core';
|
|
2
|
-
import { MessageModel } from 'src/chat21-core/models/message';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// utils
|
|
7
|
-
import {
|
|
8
|
-
popupUrl,
|
|
9
|
-
urlify,
|
|
10
|
-
isPopupUrl,
|
|
11
|
-
stripTags
|
|
12
|
-
} from 'src/chat21-core/utils/utils';
|
|
13
|
-
|
|
14
|
-
import {
|
|
15
|
-
getSizeImg
|
|
16
|
-
} from 'src/chat21-core/utils/utils-message';
|
|
17
|
-
|
|
18
|
-
import {
|
|
19
|
-
MSG_STATUS_SENT,
|
|
20
|
-
MSG_STATUS_RETURN_RECEIPT,
|
|
21
|
-
MAX_WIDTH_IMAGES
|
|
22
|
-
} from 'src/chat21-core/utils/constants';
|
|
23
|
-
|
|
24
|
-
@Component({
|
|
25
|
-
selector: 'app-bubble-my-message',
|
|
26
|
-
templateUrl: './bubble-my-message.component.html',
|
|
27
|
-
styleUrls: ['./bubble-my-message.component.scss'],
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
export class BubbleMyMessageComponent implements OnInit {
|
|
31
|
-
@Input() message: MessageModel;
|
|
32
|
-
@Input() isFirstMessage = true;
|
|
33
|
-
|
|
34
|
-
// utils functions
|
|
35
|
-
popupUrl = popupUrl;
|
|
36
|
-
urlify = urlify;
|
|
37
|
-
isPopupUrl = isPopupUrl;
|
|
38
|
-
stripTags = stripTags;
|
|
39
|
-
|
|
40
|
-
// utils-message functions
|
|
41
|
-
getSizeImg = getSizeImg;
|
|
42
|
-
|
|
43
|
-
MSG_STATUS_SENT = MSG_STATUS_SENT;
|
|
44
|
-
MSG_STATUS_RETURN_RECEIPT = MSG_STATUS_RETURN_RECEIPT;
|
|
45
|
-
MAX_WIDTH_IMAGES = MAX_WIDTH_IMAGES;
|
|
46
|
-
|
|
47
|
-
constructor() { }
|
|
48
|
-
|
|
49
|
-
ngOnInit() {
|
|
50
|
-
// console.log('msg::::', JSON.stringify(this.message));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/** */
|
|
54
|
-
showButtonInfo() {
|
|
55
|
-
//console.log('showButtonInfo');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* apro il menu delle opzioni
|
|
60
|
-
* (metodo richiamato da html)
|
|
61
|
-
* alla chiusura controllo su quale opzione ho premuto e attivo l'azione corrispondete
|
|
62
|
-
*/
|
|
63
|
-
presentPopover(event, msg) {
|
|
64
|
-
// console.log('presentPopover');
|
|
65
|
-
// let popover = this.popoverCtrl.create(PopoverPage, { typePopup: TYPE_POPUP_DETAIL_MESSAGE, message: msg });
|
|
66
|
-
// popover.present({
|
|
67
|
-
// ev: event
|
|
68
|
-
// });
|
|
69
|
-
// /**
|
|
70
|
-
// *
|
|
71
|
-
// */
|
|
72
|
-
// popover.onDidDismiss((data: string) => {
|
|
73
|
-
// console.log(" ********* data::: ", data);
|
|
74
|
-
// if (data == 'logOut') {
|
|
75
|
-
// //this.logOut();
|
|
76
|
-
// }
|
|
77
|
-
// else if (data == 'ProfilePage') {
|
|
78
|
-
// if (this.chatManager.getLoggedUser()) {
|
|
79
|
-
// this.navCtrl.push(ProfilePage);
|
|
80
|
-
// }
|
|
81
|
-
// }
|
|
82
|
-
// });
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<div class="message message-other" [class.first-message]="isFirstMessage">
|
|
2
|
-
|
|
3
|
-
<span class="button-info" [ngClass]="message.uid" (click)="presentPopover($event, message)"></span>
|
|
4
|
-
|
|
5
|
-
<div class="bubble-message"
|
|
6
|
-
[class.image]="message.type == 'image'"
|
|
7
|
-
[class.no-text]="!message.text"
|
|
8
|
-
(mouseover)="showButtonInfo()">
|
|
9
|
-
|
|
10
|
-
<div *ngIf="isChannelTypeGroup(channelType)" class="message-sender-fullname" [style.color]="getColorBck(message.sender_fullname)">{{message.sender_fullname}}</div>
|
|
11
|
-
|
|
12
|
-
<div *ngIf="isImage(message);" (click)="popupUrl(message.metadata.src,'windowName')">
|
|
13
|
-
<img class="message-content message-content-image" [src]="message.metadata.src" [width]="getSizeImg(message).width" [height]="getSizeImg(message).height" />
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div *ngIf="isFile(message);" class="message-content message-content-text" [innerHTML]="urlify(message.metadata.src, message.metadata.name)"></div>
|
|
17
|
-
|
|
18
|
-
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
19
|
-
<div *ngIf="isPopupUrl(message.text); then contentPopup else contentNewTab">here is ignored</div>
|
|
20
|
-
<ng-template #contentPopup>
|
|
21
|
-
<div style="text-decoration: underline; padding:8px; cursor: pointer;" (click)="popupUrl(message.text,'windowName')">{{stripTags(message.text)}}contentOther</div>
|
|
22
|
-
</ng-template>
|
|
23
|
-
<ng-template #contentNewTab>
|
|
24
|
-
<div class="message-content message-content-text" [innerHTML]="message.text"></div>
|
|
25
|
-
</ng-template>
|
|
26
|
-
<!-- </div> -->
|
|
27
|
-
<div class="timestamp-message right">{{message.timestamp | date: 'H:mm'}}</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
</div>
|