@chat21/chat21-web-widget 5.0.52 → 5.0.53-rc.2
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/.github/workflows/docker-community-push-latest.yml +1 -0
- package/.github/workflows/docker-image-tag-community-tag-push.yml +1 -0
- package/CHANGELOG.md +16 -0
- package/Dockerfile +2 -2
- package/angular.json +4 -21
- package/deploy_amazon_beta.sh +1 -1
- package/deploy_amazon_prod.sh +1 -1
- package/package.json +17 -18
- package/src/app/app.component.scss +38 -10
- package/src/app/app.component.ts +2 -0
- package/src/app/app.module.ts +5 -3
- package/src/app/component/conversation-detail/conversation/conversation.component.html +13 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +19 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +50 -9
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.spec.ts +0 -2
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts +0 -10
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +22 -0
- package/src/app/component/form/form-builder/form-builder.component.ts +1 -1
- package/src/app/component/form/inputs/form-checkbox/form-checkbox.component.ts +1 -1
- package/src/app/component/form/inputs/form-label/form-label.component.ts +1 -1
- package/src/app/component/form/inputs/form-text/form-text.component.ts +2 -2
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.ts +2 -2
- package/src/app/component/form/prechat-form/prechat-form.component.ts +1 -1
- package/src/app/component/home/home.component.html +7 -15
- package/src/app/component/message/bubble-message/bubble-message.component.html +1 -4
- package/src/app/component/message/bubble-message/bubble-message.component.ts +1 -37
- package/src/app/component/message/image/image.component.ts +1 -9
- package/src/app/component/message/info-message/info-message.component.html +3 -3
- package/src/app/component/message/info-message/info-message.component.ts +0 -10
- package/src/app/directives/tooltip.directive.spec.ts +8 -0
- package/src/app/directives/tooltip.directive.ts +46 -0
- package/src/app/providers/global-settings.service.ts +2 -2
- package/src/app/utils/rules.ts +13 -0
- package/src/base_script.html +57 -0
- package/src/chat21-core/providers/abstract/archivedconversations-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/conversation-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/conversations-handler.service.ts +6 -6
- package/src/chat21-core/providers/abstract/groups-handler.service.ts +5 -5
- package/src/chat21-core/providers/abstract/logger.service.ts +1 -0
- package/src/chat21-core/providers/abstract/messagingAuth.service.ts +2 -2
- package/src/chat21-core/providers/abstract/presence.service.ts +2 -2
- package/src/chat21-core/providers/abstract/typing.service.ts +2 -2
- package/src/chat21-core/providers/abstract/upload.service.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/firebase/firebase-groups-handler.ts +1 -1
- package/src/chat21-core/providers/logger/customLogger.ts +4 -0
- package/src/chat21-core/providers/mqtt/mqtt-archivedconversations-handler.ts +1 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversations-handler.ts +0 -1
- package/src/chat21-core/providers/mqtt/mqtt-groups-handler.ts +1 -1
- package/src/chat21-core/utils/constants.ts +3 -2
- package/src/chat21-core/utils/utils.ts +2 -0
- package/src/launch.js +4 -61
- package/src/polyfills.ts +0 -10
- package/src/test.ts +3 -1
- package/tsconfig.json +5 -3
- package/dist/3rdpartylicenses.txt +0 -942
- package/dist/assets/i18n/en.json +0 -94
- package/dist/assets/i18n/es.json +0 -90
- package/dist/assets/i18n/fr.json +0 -90
- package/dist/assets/i18n/it.json +0 -90
- package/dist/assets/images/avatar_bot_tiledesk.svg +0 -1
- package/dist/assets/images/chat_human_avatar.svg +0 -12
- package/dist/assets/images/f21ico-done.svg +0 -1
- package/dist/assets/images/f21ico-done_all.svg +0 -1
- package/dist/assets/images/f21ico-schedule.svg +0 -1
- package/dist/assets/images/file-alt-solid.png +0 -0
- package/dist/assets/images/light_avatar_placeholder.svg +0 -1
- package/dist/assets/images/tommy_bot_tiledesk.svg +0 -48
- package/dist/assets/images/website_mockup.jpg +0 -0
- package/dist/assets/js/chat21client.js +0 -1066
- package/dist/assets/js/mqtt/4.1.0/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.6/mqtt.min.js +0 -1
- package/dist/assets/js/mqtt/4.2.8/mqtt.min.js +0 -1
- package/dist/assets/sounds/Carme.mp3 +0 -0
- package/dist/assets/sounds/justsaying.mp3 +0 -0
- package/dist/assets/sounds/pling.mp3 +0 -0
- package/dist/assets/styles/tiledesk_v1.scss +0 -22
- package/dist/assets/twp/chatbot-panel.html +0 -424
- package/dist/assets/twp/index-dev.html +0 -2430
- package/dist/assets/twp/index.html +0 -603
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.css +0 -5
- package/dist/assets/twp/tiledesk_widget_files/bootstrap.min.js +0 -7
- package/dist/assets/twp/tiledesk_widget_files/facebook.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/font-awesome.min.css +0 -4
- package/dist/assets/twp/tiledesk_widget_files/icon +0 -23
- package/dist/assets/twp/tiledesk_widget_files/jquery.min.js +0 -2
- package/dist/assets/twp/tiledesk_widget_files/linkedin.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-mobile.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo-short.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/logo@2x-black.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/telegram.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/twitter.png +0 -0
- package/dist/assets/twp/tiledesk_widget_files/website-poly.min.css +0 -5623
- package/dist/assets/twp/tiledesk_widget_files/whatsapp.png +0 -0
- package/dist/environments/real_data/widget-config-docker.json +0 -28
- package/dist/environments/real_data/widget-config-firebase.json +0 -30
- package/dist/environments/real_data/widget-config-mqtt.json +0 -27
- package/dist/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/dist/environments/real_data/widget-config-native-prod.json +0 -27
- package/dist/f21ico-done.svg +0 -1
- package/dist/f21ico-done_all.svg +0 -1
- package/dist/f21ico-schedule.svg +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/iframe-style.css +0 -189
- package/dist/index.html +0 -16
- package/dist/launch.js +0 -428
- package/dist/main.js +0 -1
- package/dist/polyfills-es5.js +0 -1
- package/dist/polyfills.js +0 -1
- package/dist/runtime.js +0 -1
- package/dist/scripts.js +0 -1
- package/dist/styles.css +0 -1
- package/dist/styles.js +0 -1
- package/dist/test-auth-remote.html +0 -95
- package/dist/test-auth.html +0 -49
- package/dist/test-buttons.html +0 -147
- package/dist/test-custom-auth.html +0 -50
- package/dist/test-new.html +0 -231
- package/dist/test.html +0 -142
- package/dist/tiledesk.js +0 -72
- package/dist/vendor.js +0 -1
- package/dist/widget-config-template.json +0 -29
- package/dist/widget-config.json +0 -29
- package/e2e/protractor.conf.js +0 -32
- package/src/environments/environment.pre.ts +0 -42
- package/src/environments/environment.prod.ts +0 -40
- package/src/environments/environment.ts +0 -41
- package/src/environments/real_data/widget-config-docker.json +0 -28
- package/src/environments/real_data/widget-config-firebase.json +0 -30
- package/src/environments/real_data/widget-config-mqtt.json +0 -27
- package/src/environments/real_data/widget-config-native-mqtt.json +0 -28
- package/src/environments/real_data/widget-config-native-prod.json +0 -27
- package/src/test-auth-remote.html +0 -95
- package/src/test-auth.html +0 -49
- package/src/test-buttons.html +0 -147
|
@@ -73,9 +73,6 @@
|
|
|
73
73
|
<div id="c21-whatsapp" *ngIf="g?.whatsappNumber && g?.whatsappNumber.trim() !== ''">
|
|
74
74
|
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('whatsapp')">
|
|
75
75
|
<span class="v-align-center">
|
|
76
|
-
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
77
|
-
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
78
|
-
</svg> -->
|
|
79
76
|
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" viewBox="0 0 1219.547 1225.016">
|
|
80
77
|
<path fill="#E0E0E0" d="M1041.858 178.02C927.206 63.289 774.753.07 612.325 0 277.617 0 5.232 272.298 5.098 606.991c-.039 106.986 27.915 211.42 81.048 303.476L0 1225.016l321.898-84.406c88.689 48.368 188.547 73.855 290.166 73.896h.258.003c334.654 0 607.08-272.346 607.222-607.023.056-162.208-63.052-314.724-177.689-429.463zm-429.533 933.963h-.197c-90.578-.048-179.402-24.366-256.878-70.339l-18.438-10.93-191.021 50.083 51-186.176-12.013-19.087c-50.525-80.336-77.198-173.175-77.16-268.504.111-278.186 226.507-504.503 504.898-504.503 134.812.056 261.519 52.604 356.814 147.965 95.289 95.36 147.728 222.128 147.688 356.948-.118 278.195-226.522 504.543-504.693 504.543z"/>
|
|
81
78
|
<linearGradient id="a" gradientUnits="userSpaceOnUse" x1="609.77" y1="1190.114" x2="609.77" y2="21.084">
|
|
@@ -87,6 +84,9 @@
|
|
|
87
84
|
<path fill="#FFF" d="M1036.898 176.091C923.562 62.677 772.859.185 612.297.114 281.43.114 12.172 269.286 12.039 600.137 12 705.896 39.633 809.13 92.156 900.13L7 1211.067l318.203-83.438c87.672 47.812 186.383 73.008 286.836 73.047h.255.003c330.812 0 600.109-269.219 600.25-600.055.055-160.343-62.328-311.108-175.649-424.53zm-424.601 923.242h-.195c-89.539-.047-177.344-24.086-253.93-69.531l-18.227-10.805-188.828 49.508 50.414-184.039-11.875-18.867c-49.945-79.414-76.312-171.188-76.273-265.422.109-274.992 223.906-498.711 499.102-498.711 133.266.055 258.516 52 352.719 146.266 94.195 94.266 146.031 219.578 145.992 352.852-.118 274.999-223.923 498.749-498.899 498.749z"/>
|
|
88
85
|
<title id="altIconTitle">Whatsapp</title>
|
|
89
86
|
</svg>
|
|
87
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28" height="28" focusable="false" viewBox="0 0 448 512" xml:space="preserve">
|
|
88
|
+
<path stroke="#5f6368" stroke-width="8px" fill="#5f6368" d="M380.9,97.1C339,55.1,283.2,32,223.9,32c-122.4,0-222,99.6-222,222c0,39.1,10.2,77.3,29.6,111L0,480l117.7-30.9 c32.4,17.7,68.9,27,106.1,27h0.1c122.3,0,224.1-99.6,224.1-222C448,194.8,422.8,139.1,380.9,97.1z M223.9,438.7 c-33.2,0-65.7-8.9-94-25.7l-6.7-4l-69.8,18.3L72,359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2c0-101.7,82.8-184.5,184.6-184.5 c49.3,0,95.6,19.2,130.4,54.1s56.2,81.2,56.1,130.5C410.5,355.9,325.6,438.7,223.9,438.7z M325.1,300.5c-5.5-2.8-32.8-16.2-37.9-18 c-5.1-1.9-8.8-2.8-12.5,2.8c-3.7,5.6-14.3,18-17.6,21.8c-3.2,3.7-6.5,4.2-12,1.4c-32.6-16.3-54-29.1-75.5-66 c-5.7-9.8,5.7-9.1,16.3-30.3c1.8-3.7,0.9-6.9-0.5-9.7s-12.5-30.1-17.1-41.2c-4.5-10.8-9.1-9.3-12.5-9.5c-3.2-0.2-6.9-0.2-10.6-0.2 c-3.7,0-9.7,1.4-14.8,6.9c-5.1,5.6-19.4,19-19.4,46.3s19.9,53.7,22.6,57.4c2.8,3.7,39.1,59.7,94.8,83.8c35.2,15.2,49,16.5,66.6,13.9 c10.7-1.6,32.8-13.4,37.4-26.4s4.6-24.1,3.2-26.4C334.3,304.6,330.6,303.2,325.1,300.5z"/>
|
|
89
|
+
</svg> -->
|
|
90
90
|
</span>
|
|
91
91
|
<div class="clear"></div>
|
|
92
92
|
</button>
|
|
@@ -94,9 +94,6 @@
|
|
|
94
94
|
<div id="c21-telegram" *ngIf="g?.telegramUsername && g?.telegramUsername.trim() !== ''">
|
|
95
95
|
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('telegram')">
|
|
96
96
|
<span class="v-align-center">
|
|
97
|
-
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
98
|
-
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
99
|
-
</svg> -->
|
|
100
97
|
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26" height="26" viewBox="0 0 368 368" style="enable-background:new 0 0 368 368;" xml:space="preserve">
|
|
101
98
|
<g id="XMLID_1_">
|
|
102
99
|
<linearGradient id="XMLID_7_" gradientUnits="userSpaceOnUse" x1="-66.831" y1="-68.1757" x2="-65.3102" y2="-68.1757" gradientTransform="matrix(-60 139.992 -139.992 -60 -13316.416 5324.4634)">
|
|
@@ -114,9 +111,8 @@
|
|
|
114
111
|
</g>
|
|
115
112
|
<title id="altIconTitle">Telegram</title>
|
|
116
113
|
</svg>
|
|
117
|
-
<!-- <svg xmlns="http://www.w3.org/2000/svg"
|
|
118
|
-
<path
|
|
119
|
-
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M10.14,1.83a8,8,0,0,0-8,8,7.86,7.86,0,0,0,1.1,4L1.85,17.89a.19.19,0,0,0,0,.21.21.21,0,0,0,.15.07h.06l4.24-1.35a8,8,0,0,0,11.82-7A8,8,0,0,0,10.14,1.83Zm0,14.27a6.37,6.37,0,0,1-3.49-1,.19.19,0,0,0-.12,0H6.47l-2.12.68.68-2a.22.22,0,0,0,0-.19A6.22,6.22,0,0,1,3.79,9.8a6.36,6.36,0,1,1,6.35,6.3Z" transform="translate(-1.83 -1.83)"/>
|
|
114
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26" height="26" viewBox="0 0 448 512" xml:space="preserve">
|
|
115
|
+
<path fill="#5f6368" d="M446.7,98.6l-67.6,318.8c-5.1,22.5-18.4,28.1-37.3,17.5l-103-75.9l-49.7,47.8c-5.5,5.5-10.1,10.1-20.7,10.1 l7.4-104.9l190.9-172.5c8.3-7.4-1.8-11.5-12.9-4.1L117.8,284L16.2,252.2c-22.1-6.9-22.5-22.1,4.6-32.7L418.2,66.4 C436.6,59.5,452.7,70.5,446.7,98.6z"/>
|
|
120
116
|
</svg> -->
|
|
121
117
|
</span>
|
|
122
118
|
<div class="clear"></div>
|
|
@@ -125,9 +121,6 @@
|
|
|
125
121
|
<div id="c21-messanger" *ngIf="g?.messangerPageTitle && g?.messangerPageTitle.trim() !== ''">
|
|
126
122
|
<button tabindex="1040" aflistconv #aflistconv class="c21-button-primary" (click)="openConversationOnPlatform('messanger')">
|
|
127
123
|
<span class="v-align-center">
|
|
128
|
-
<!-- <svg [ngStyle]="{'fill': 'yellow' }" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24">
|
|
129
|
-
<path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" [ngStyle]="{'fill': g.themeForegroundColor}"/>
|
|
130
|
-
</svg> -->
|
|
131
124
|
<svg aria-labelledby="altIconTitle" xmlns="http://www.w3.org/2000/svg" width="26" height="26" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 800 800">
|
|
132
125
|
<radialGradient id="Gradient" cx="101.925" cy="809.0079" r="1.0896" gradientTransform="matrix(800 0 0 -799.9985 -81386 648000.75)" gradientUnits="userSpaceOnUse">
|
|
133
126
|
<stop offset="0" style="stop-color:#0099FF"/>
|
|
@@ -139,9 +132,8 @@
|
|
|
139
132
|
<path fill="#FFFFFF" d="M159.8,501.5l117.5-186.4c18.7-29.7,58.7-37,86.8-16l93.5,70.1c8.6,6.4,20.4,6.4,28.9-0.1 l126.2-95.8c16.8-12.8,38.8,7.4,27.6,25.3L522.7,484.9c-18.7,29.7-58.7,37-86.8,16l-93.5-70.1c-8.6-6.4-20.4-6.4-28.9,0.1 l-126.2,95.8C170.5,539.5,148.5,519.4,159.8,501.5z"/>
|
|
140
133
|
<title id="altIconTitle">Facebook Messanger</title>
|
|
141
134
|
</svg>
|
|
142
|
-
<!-- <svg xmlns="http://www.w3.org/2000/svg"
|
|
143
|
-
<path
|
|
144
|
-
<path [ngStyle]="{'fill': g.themeForegroundColor}" d="M10.14,1.83a8,8,0,0,0-8,8,7.86,7.86,0,0,0,1.1,4L1.85,17.89a.19.19,0,0,0,0,.21.21.21,0,0,0,.15.07h.06l4.24-1.35a8,8,0,0,0,11.82-7A8,8,0,0,0,10.14,1.83Zm0,14.27a6.37,6.37,0,0,1-3.49-1,.19.19,0,0,0-.12,0H6.47l-2.12.68.68-2a.22.22,0,0,0,0-.19A6.22,6.22,0,0,1,3.79,9.8a6.36,6.36,0,1,1,6.35,6.3Z" transform="translate(-1.83 -1.83)"/>
|
|
135
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="26" height="26" focusable="false" viewBox="0 0 512 512" xml:space="preserve">
|
|
136
|
+
<path fill="#5f6368" d="M256.5,8C116.5,8,8,110.3,8,248.6c0,72.3,29.7,134.8,78.1,177.9c8.3,7.5,6.6,11.9,8.1,58.2 c0.4,11,9.6,19.6,20.6,19.2c2.5-0.1,5-0.6,7.3-1.7c52.9-23.3,53.6-25.1,62.6-22.7c153.3,42.2,319.4-55.9,319.4-231 C504,110.3,396.6,8,256.5,8z M405.8,193.1l-73,115.6c-11.1,17.4-34.1,22.6-51.6,11.5c-0.8-0.5-1.6-1-2.3-1.6l-58.1-43.5 c-5.3-4-12.7-4-18,0l-78.4,59.4c-10.5,7.9-24.2-4.6-17.1-15.7l73-115.6c11-17.4,34.1-22.6,51.6-11.6c0.8,0.5,1.6,1.1,2.4,1.6 l58.1,43.5c5.3,4,12.7,4,18,0l78.4-59.4C399.1,169.5,412.8,182,405.8,193.1L405.8,193.1z"/>
|
|
145
137
|
</svg> -->
|
|
146
138
|
</span>
|
|
147
139
|
<div class="clear"></div>
|
|
@@ -46,10 +46,7 @@
|
|
|
46
46
|
<!-- <div *ngIf="message.type == 'text'"> -->
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
<div *ngIf="message?.text"
|
|
50
|
-
<ng-template #timeTooltipLeft>
|
|
51
|
-
<span>{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})</span>
|
|
52
|
-
</ng-template>
|
|
49
|
+
<div *ngIf="message?.text" tooltip="{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})">
|
|
53
50
|
|
|
54
51
|
|
|
55
52
|
<!-- [htmlEnabled]="(message?.type==='html')? true : false" -->
|
|
@@ -6,7 +6,7 @@ import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance'
|
|
|
6
6
|
import { MESSAGE_TYPE_MINE, MESSAGE_TYPE_OTHERS } from 'src/chat21-core/utils/constants';
|
|
7
7
|
import { convertColorToRGBA } from 'src/chat21-core/utils/utils';
|
|
8
8
|
import { isFile, isFrame, isImage, messageType } from 'src/chat21-core/utils/utils-message';
|
|
9
|
-
import { MAX_WIDTH_IMAGES, MIN_WIDTH_IMAGES} from '
|
|
9
|
+
import { MAX_WIDTH_IMAGES, MIN_WIDTH_IMAGES} from 'src/chat21-core/utils/constants';
|
|
10
10
|
|
|
11
11
|
@Component({
|
|
12
12
|
selector: 'chat-bubble-message',
|
|
@@ -35,16 +35,6 @@ export class BubbleMessageComponent implements OnInit {
|
|
|
35
35
|
MESSAGE_TYPE_MINE = MESSAGE_TYPE_MINE;
|
|
36
36
|
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
|
|
37
37
|
// ========== end:: check message type functions ======= //
|
|
38
|
-
|
|
39
|
-
tooltipOptions = {
|
|
40
|
-
'show-delay': 500,
|
|
41
|
-
'tooltip-class': 'chat-tooltip',
|
|
42
|
-
'theme': 'light',
|
|
43
|
-
'shadow': false,
|
|
44
|
-
'hide-delay-mobile': 0,
|
|
45
|
-
'hideDelayAfterClick': 3000,
|
|
46
|
-
'hide-delay': 200
|
|
47
|
-
};
|
|
48
38
|
sizeImage : { width: number, height: number}
|
|
49
39
|
|
|
50
40
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
@@ -119,32 +109,6 @@ export class BubbleMessageComponent implements OnInit {
|
|
|
119
109
|
return sizeImage
|
|
120
110
|
}
|
|
121
111
|
|
|
122
|
-
/**
|
|
123
|
-
* function customize tooltip
|
|
124
|
-
*/
|
|
125
|
-
handleTooltipEvents(event) {
|
|
126
|
-
const that = this;
|
|
127
|
-
const showDelay = this.tooltipOptions['showDelay'];
|
|
128
|
-
setTimeout(function () {
|
|
129
|
-
try {
|
|
130
|
-
const domRepresentation = document.getElementsByClassName('chat-tooltip');
|
|
131
|
-
if (domRepresentation) {
|
|
132
|
-
const item = domRepresentation[0] as HTMLInputElement;
|
|
133
|
-
if (!item.classList.contains('tooltip-show')) {
|
|
134
|
-
item.classList.add('tooltip-show');
|
|
135
|
-
}
|
|
136
|
-
setTimeout(function () {
|
|
137
|
-
if (item.classList.contains('tooltip-show')) {
|
|
138
|
-
item.classList.remove('tooltip-show');
|
|
139
|
-
}
|
|
140
|
-
}, that.tooltipOptions['hideDelayAfterClick']);
|
|
141
|
-
}
|
|
142
|
-
} catch (err) {
|
|
143
|
-
that.logger.error('[BUBBLE-MESSAGE] handleTooltipEvents >>>> Error :' + err);
|
|
144
|
-
}
|
|
145
|
-
}, showDelay);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
112
|
// ========= begin:: event emitter function ============//
|
|
149
113
|
|
|
150
114
|
// returnOpenAttachment(event: String) {
|
|
@@ -17,15 +17,7 @@ export class ImageComponent implements OnInit {
|
|
|
17
17
|
|
|
18
18
|
loading: boolean = true
|
|
19
19
|
tooltipMessage: string;
|
|
20
|
-
|
|
21
|
-
'show-delay': 0,
|
|
22
|
-
'tooltip-class': 'chat-tooltip',
|
|
23
|
-
'theme': 'light',
|
|
24
|
-
'shadow': false,
|
|
25
|
-
'hide-delay-mobile': 0,
|
|
26
|
-
'hideDelayAfterClick': 3000,
|
|
27
|
-
'hide-delay': 200
|
|
28
|
-
};
|
|
20
|
+
|
|
29
21
|
|
|
30
22
|
popupUrl = popupUrl;
|
|
31
23
|
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
|
|
8
8
|
<div style="max-width: 70%;">
|
|
9
|
-
<span class="base_info" [innerHTML]="message?.text | marked"
|
|
10
|
-
<ng-template #timeTooltipLeft>
|
|
9
|
+
<span class="base_info" [innerHTML]="message?.text | marked" tooltip="{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})" placement="left" contentType="template"></span>
|
|
10
|
+
<!-- <ng-template #timeTooltipLeft>
|
|
11
11
|
<span>{{message.timestamp | amTimeAgo}} ({{message.timestamp | amLocal | amDateFormat: 'L HH:mm:ss'}})</span>
|
|
12
|
-
</ng-template>
|
|
12
|
+
</ng-template> -->
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
15
|
<div class="spinner">
|
|
@@ -15,16 +15,6 @@ export class InfoMessageComponent implements OnInit {
|
|
|
15
15
|
|
|
16
16
|
public message_text: string
|
|
17
17
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
18
|
-
|
|
19
|
-
tooltipOptions = {
|
|
20
|
-
'show-delay': 500,
|
|
21
|
-
'tooltip-class': 'chat-tooltip',
|
|
22
|
-
'theme': 'light',
|
|
23
|
-
'shadow': false,
|
|
24
|
-
'hide-delay-mobile': 0,
|
|
25
|
-
'hideDelayAfterClick': 3000,
|
|
26
|
-
'hide-delay': 200
|
|
27
|
-
};
|
|
28
18
|
|
|
29
19
|
constructor() { }
|
|
30
20
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Directive, ElementRef, HostListener, Input, OnDestroy } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Directive({
|
|
4
|
+
selector: '[tooltip]'
|
|
5
|
+
})
|
|
6
|
+
export class TooltipDirective implements OnDestroy{
|
|
7
|
+
|
|
8
|
+
@Input() tooltip: any; // The text for the tooltip to display
|
|
9
|
+
@Input() delay? = 190; // Optional delay input, in ms
|
|
10
|
+
|
|
11
|
+
private myPopup;
|
|
12
|
+
private timer;
|
|
13
|
+
|
|
14
|
+
constructor(private el: ElementRef) { }
|
|
15
|
+
|
|
16
|
+
ngOnDestroy(): void {
|
|
17
|
+
if (this.myPopup) { this.myPopup.remove() }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@HostListener('mouseenter') onMouseEnter() {
|
|
21
|
+
this.timer = setTimeout(() => {
|
|
22
|
+
let x = this.el.nativeElement.getBoundingClientRect().left + this.el.nativeElement.offsetWidth / 2; // Get the middle of the element
|
|
23
|
+
let y = this.el.nativeElement.getBoundingClientRect().top + this.el.nativeElement.offsetHeight + 6; // Get the bottom of the element, plus a little extra
|
|
24
|
+
this.createTooltipPopup(x, y);
|
|
25
|
+
}, this.delay)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@HostListener('mouseleave') onMouseLeave() {
|
|
29
|
+
if (this.timer) clearTimeout(this.timer);
|
|
30
|
+
if (this.myPopup) { this.myPopup.remove() }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
private createTooltipPopup(x: number, y: number) {
|
|
34
|
+
let popup = document.createElement('div');
|
|
35
|
+
popup.innerHTML = this.tooltip;
|
|
36
|
+
popup.setAttribute("class", "tooltip-container");
|
|
37
|
+
popup.style.top = y.toString() + "px";
|
|
38
|
+
popup.style.left = x.toString() + "px";
|
|
39
|
+
document.body.appendChild(popup);
|
|
40
|
+
this.myPopup = popup;
|
|
41
|
+
setTimeout(() => {
|
|
42
|
+
if (this.myPopup) this.myPopup.remove();
|
|
43
|
+
}, 5000); // Remove tooltip after 5 seconds
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
}
|
|
@@ -1673,12 +1673,12 @@ export class GlobalSettingsService {
|
|
|
1673
1673
|
|
|
1674
1674
|
TEMP = getParameterByName(windowContext, 'tiledesk_singleConversation');
|
|
1675
1675
|
if (TEMP) {
|
|
1676
|
-
globals.singleConversation = stringToBoolean(TEMP)
|
|
1676
|
+
globals.singleConversation = stringToBoolean(TEMP);
|
|
1677
1677
|
}
|
|
1678
1678
|
|
|
1679
1679
|
TEMP = getParameterByName(windowContext, 'tiledesk_restartConversation');
|
|
1680
1680
|
if (TEMP) {
|
|
1681
|
-
globals.restartConversation = TEMP;
|
|
1681
|
+
globals.restartConversation = stringToBoolean(TEMP);
|
|
1682
1682
|
}
|
|
1683
1683
|
|
|
1684
1684
|
TEMP = getParameterByName(windowContext, 'tiledesk_nativeRating');
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LoggerInstance } from 'src/chat21-core/providers/logger/loggerInstance';
|
|
2
|
+
import { LoggerService } from 'src/chat21-core/providers/abstract/logger.service';
|
|
3
|
+
export class Rules {
|
|
4
|
+
|
|
5
|
+
private url = window.location
|
|
6
|
+
|
|
7
|
+
private logger: LoggerService = LoggerInstance.getInstance()
|
|
8
|
+
constructor(){}
|
|
9
|
+
|
|
10
|
+
initRules(){
|
|
11
|
+
console.log('locationnnnnnn', this.url)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<html lang="en">
|
|
2
|
+
<head>
|
|
3
|
+
<meta charset="utf-8">
|
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
|
5
|
+
<title>Tilechat Widget</title>
|
|
6
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
7
|
+
<script>
|
|
8
|
+
var tiledeskScriptBaseLocation = window.location.href.replace("/base_script.html","");
|
|
9
|
+
|
|
10
|
+
var link_2 = document.createElement('link')
|
|
11
|
+
link_2.setAttribute('rel', 'stylesheet')
|
|
12
|
+
link_2.setAttribute('type', 'text/css')
|
|
13
|
+
link_2.setAttribute('href', tiledeskScriptBaseLocation + '/assets/styles/tiledesk_v1.scss')
|
|
14
|
+
link_2.setAttribute('media','all')
|
|
15
|
+
|
|
16
|
+
var script_1 = document.createElement('script')
|
|
17
|
+
script_1.setAttribute('type','text/javascript')
|
|
18
|
+
script_1.setAttribute('src',tiledeskScriptBaseLocation + '/runtime.js')
|
|
19
|
+
var script_2 = document.createElement('script')
|
|
20
|
+
script_2.setAttribute('type','text/javascript')
|
|
21
|
+
script_2.setAttribute('src',tiledeskScriptBaseLocation + '/polyfills.js')
|
|
22
|
+
var link = document.createElement('link')
|
|
23
|
+
link.setAttribute('type','text/css')
|
|
24
|
+
link.setAttribute('rel','stylesheet')
|
|
25
|
+
link.setAttribute('href',tiledeskScriptBaseLocation + '/styles.css')
|
|
26
|
+
link.setAttribute('media','all')
|
|
27
|
+
var script_4 = document.createElement('script')
|
|
28
|
+
script_4.setAttribute('type','text/javascript')
|
|
29
|
+
script_4.setAttribute('src',tiledeskScriptBaseLocation + '/vendor.js')
|
|
30
|
+
var script_5 = document.createElement('script')
|
|
31
|
+
script_5.setAttribute('type','text/javascript')
|
|
32
|
+
script_5.setAttribute('src',tiledeskScriptBaseLocation + '/main.js')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
window.addEventListener("load", (event) => {
|
|
36
|
+
|
|
37
|
+
let head = document.getElementsByTagName('head')[0]
|
|
38
|
+
head.appendChild(link_2)
|
|
39
|
+
|
|
40
|
+
let body = document.getElementsByTagName('body')[0]
|
|
41
|
+
body.appendChild(script_1)
|
|
42
|
+
body.appendChild(script_2)
|
|
43
|
+
body.appendChild(link)
|
|
44
|
+
body.appendChild(script_4)
|
|
45
|
+
body.appendChild(script_5)
|
|
46
|
+
});
|
|
47
|
+
</script>
|
|
48
|
+
</head>
|
|
49
|
+
<body>
|
|
50
|
+
<chat-root></chat-root>
|
|
51
|
+
<!-- <script type="text/javascript" src="http://localhost:4202/runtime.js"></script>
|
|
52
|
+
<script type="text/javascript" src="http://localhost:4202/polyfills.js"></script>
|
|
53
|
+
<script type="text/css" src="http://localhost:4202/styles.css"></script>
|
|
54
|
+
<script type="text/javascript" src="http://localhost:4202/vendor.js"></script>
|
|
55
|
+
<script type="text/javascript" src="http://localhost:4202/main.js"></script> -->
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -7,14 +7,14 @@ import { ImageRepoService } from './image-repo.service';
|
|
|
7
7
|
export abstract class ArchivedConversationsHandlerService {
|
|
8
8
|
|
|
9
9
|
// BehaviorSubject
|
|
10
|
-
abstract BSConversationDetail: BehaviorSubject<ConversationModel
|
|
11
|
-
abstract archivedConversationAdded: BehaviorSubject<ConversationModel
|
|
12
|
-
abstract archivedConversationChanged: BehaviorSubject<ConversationModel
|
|
13
|
-
abstract archivedConversationRemoved: BehaviorSubject<ConversationModel
|
|
10
|
+
abstract BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
11
|
+
abstract archivedConversationAdded: BehaviorSubject<ConversationModel>;
|
|
12
|
+
abstract archivedConversationChanged: BehaviorSubject<ConversationModel>;
|
|
13
|
+
abstract archivedConversationRemoved: BehaviorSubject<ConversationModel>;
|
|
14
14
|
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
15
15
|
|
|
16
16
|
// params
|
|
17
|
-
abstract archivedConversations: Array<ConversationModel
|
|
17
|
+
abstract archivedConversations: Array<ConversationModel>;
|
|
18
18
|
abstract uidConvSelected: string;
|
|
19
19
|
//abstract imageRepo: ImageRepoService;
|
|
20
20
|
|
|
@@ -12,15 +12,15 @@ import { UserModel } from 'src/chat21-core/models/user';
|
|
|
12
12
|
export abstract class ConversationHandlerService {
|
|
13
13
|
|
|
14
14
|
// BehaviorSubject
|
|
15
|
-
abstract messageAdded: BehaviorSubject<MessageModel
|
|
16
|
-
abstract messageChanged: BehaviorSubject<MessageModel
|
|
17
|
-
abstract messageRemoved: BehaviorSubject<string
|
|
18
|
-
abstract messageWait: BehaviorSubject<any
|
|
19
|
-
abstract messageInfo: BehaviorSubject<MessageModel
|
|
15
|
+
abstract messageAdded: BehaviorSubject<MessageModel>;
|
|
16
|
+
abstract messageChanged: BehaviorSubject<MessageModel>;
|
|
17
|
+
abstract messageRemoved: BehaviorSubject<string>;
|
|
18
|
+
abstract messageWait: BehaviorSubject<any>;
|
|
19
|
+
abstract messageInfo: BehaviorSubject<MessageModel>;
|
|
20
20
|
|
|
21
21
|
// params
|
|
22
22
|
abstract attributes: any;
|
|
23
|
-
abstract messages: Array<MessageModel
|
|
23
|
+
abstract messages: Array<MessageModel>;
|
|
24
24
|
abstract conversationWith: string;
|
|
25
25
|
|
|
26
26
|
constructor() {}
|
|
@@ -14,15 +14,15 @@ import { ConversationModel } from './../../models/conversation';
|
|
|
14
14
|
export abstract class ConversationsHandlerService {
|
|
15
15
|
|
|
16
16
|
// BehaviorSubject
|
|
17
|
-
abstract BSConversationDetail: BehaviorSubject<ConversationModel
|
|
18
|
-
abstract conversationAdded: BehaviorSubject<ConversationModel
|
|
19
|
-
abstract conversationChanged: BehaviorSubject<ConversationModel
|
|
20
|
-
abstract conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}
|
|
21
|
-
abstract conversationRemoved: BehaviorSubject<ConversationModel
|
|
17
|
+
abstract BSConversationDetail: BehaviorSubject<ConversationModel>;
|
|
18
|
+
abstract conversationAdded: BehaviorSubject<ConversationModel>;
|
|
19
|
+
abstract conversationChanged: BehaviorSubject<ConversationModel>;
|
|
20
|
+
abstract conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}>;
|
|
21
|
+
abstract conversationRemoved: BehaviorSubject<ConversationModel>;
|
|
22
22
|
// abstract readAllMessages: BehaviorSubject<string> = new BehaviorSubject<string>(null);
|
|
23
23
|
|
|
24
24
|
// params
|
|
25
|
-
abstract conversations: Array<ConversationModel
|
|
25
|
+
abstract conversations: Array<ConversationModel>;
|
|
26
26
|
abstract uidConvSelected: string;
|
|
27
27
|
|
|
28
28
|
// functions
|
|
@@ -8,11 +8,11 @@ import { GroupModel } from '../../models/group';
|
|
|
8
8
|
export abstract class GroupsHandlerService {
|
|
9
9
|
|
|
10
10
|
// BehaviorSubject
|
|
11
|
-
abstract BSgroupDetail: BehaviorSubject<GroupModel
|
|
12
|
-
abstract SgroupDetail: Subject<GroupModel
|
|
13
|
-
abstract groupAdded: BehaviorSubject<GroupModel
|
|
14
|
-
abstract groupChanged: BehaviorSubject<GroupModel
|
|
15
|
-
abstract groupRemoved: BehaviorSubject<GroupModel
|
|
11
|
+
abstract BSgroupDetail: BehaviorSubject<GroupModel>;
|
|
12
|
+
abstract SgroupDetail: Subject<GroupModel>;
|
|
13
|
+
abstract groupAdded: BehaviorSubject<GroupModel>;
|
|
14
|
+
abstract groupChanged: BehaviorSubject<GroupModel>;
|
|
15
|
+
abstract groupRemoved: BehaviorSubject<GroupModel>;
|
|
16
16
|
|
|
17
17
|
abstract initialize(tenant: string, loggedUserId: string): void;
|
|
18
18
|
abstract connect(): void;
|
|
@@ -9,6 +9,7 @@ export abstract class LoggerService {
|
|
|
9
9
|
constructor() { }
|
|
10
10
|
|
|
11
11
|
abstract setLoggerConfig(isLogEnabled: boolean, logLevel: string);
|
|
12
|
+
abstract getLoggerConfig(): {isLogEnabled: boolean, logLevel: number};
|
|
12
13
|
abstract debug(...message: any[])
|
|
13
14
|
abstract log(...message: any[])
|
|
14
15
|
abstract warn(...message: any[])
|
|
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
9
9
|
export abstract class MessagingAuthService {
|
|
10
10
|
|
|
11
11
|
// BehaviorSubject
|
|
12
|
-
abstract BSAuthStateChanged: BehaviorSubject<any
|
|
13
|
-
abstract BSSignOut: BehaviorSubject<any
|
|
12
|
+
abstract BSAuthStateChanged: BehaviorSubject<any>;
|
|
13
|
+
abstract BSSignOut: BehaviorSubject<any>;
|
|
14
14
|
|
|
15
15
|
// params
|
|
16
16
|
public DEFAULT_PERSISTENCE: string = 'NONE';
|
|
@@ -8,8 +8,8 @@ import { BehaviorSubject, Observable } from 'rxjs';
|
|
|
8
8
|
export abstract class PresenceService {
|
|
9
9
|
|
|
10
10
|
// BehaviorSubject
|
|
11
|
-
abstract BSIsOnline: BehaviorSubject<any
|
|
12
|
-
abstract BSLastOnline: BehaviorSubject<any
|
|
11
|
+
abstract BSIsOnline: BehaviorSubject<any>;
|
|
12
|
+
abstract BSLastOnline: BehaviorSubject<any>;
|
|
13
13
|
|
|
14
14
|
// params
|
|
15
15
|
// private DEFAULT_TENANT: string = environment.firebaseConfig.tenant;
|
|
@@ -9,8 +9,8 @@ import { BehaviorSubject } from 'rxjs';
|
|
|
9
9
|
export abstract class TypingService {
|
|
10
10
|
|
|
11
11
|
// BehaviorSubject
|
|
12
|
-
BSIsTyping: BehaviorSubject<any
|
|
13
|
-
BSSetTyping: BehaviorSubject<any
|
|
12
|
+
BSIsTyping: BehaviorSubject<any>;
|
|
13
|
+
BSSetTyping: BehaviorSubject<any>;
|
|
14
14
|
|
|
15
15
|
// params
|
|
16
16
|
// private DEFAULT_TENANT: string = environment.firebaseConfig.tenant;
|
|
@@ -27,7 +27,7 @@ export class FirebaseArchivedConversationsHandler extends ArchivedConversationsH
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
// BehaviorSubject
|
|
30
|
-
BSConversationDetail: BehaviorSubject<ConversationModel
|
|
30
|
+
BSConversationDetail: BehaviorSubject<ConversationModel>= new BehaviorSubject<ConversationModel>(null);
|
|
31
31
|
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
32
32
|
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
33
33
|
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
@@ -28,7 +28,7 @@ export class FirebaseGroupsHandler extends GroupsHandlerService {
|
|
|
28
28
|
|
|
29
29
|
// BehaviorSubject
|
|
30
30
|
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
31
|
-
SgroupDetail: Subject<GroupModel> = new
|
|
31
|
+
SgroupDetail: Subject<GroupModel> = new Subject<GroupModel>();
|
|
32
32
|
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
33
33
|
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
34
34
|
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
@@ -23,6 +23,10 @@ export class CustomLogger extends LoggerService{
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
getLoggerConfig(): {isLogEnabled: boolean, logLevel: number}{
|
|
27
|
+
return {isLogEnabled: this.isLogEnabled, logLevel: this.logLevel}
|
|
28
|
+
}
|
|
29
|
+
|
|
26
30
|
error(message: any, ...optionalParams: any[]) {
|
|
27
31
|
if (this.isLogEnabled && this.logLevel >= LogLevel.ERROR) {
|
|
28
32
|
this.logger.error(message, ...optionalParams)
|
|
@@ -20,7 +20,7 @@ import { LoggerInstance } from '../logger/loggerInstance';
|
|
|
20
20
|
export class MQTTArchivedConversationsHandler extends ArchivedConversationsHandlerService {
|
|
21
21
|
|
|
22
22
|
// BehaviorSubject
|
|
23
|
-
BSConversationDetail: BehaviorSubject<ConversationModel
|
|
23
|
+
BSConversationDetail: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
24
24
|
archivedConversationAdded: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
25
25
|
archivedConversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
26
26
|
archivedConversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
@@ -25,7 +25,6 @@ export class MQTTConversationsHandler extends ConversationsHandlerService {
|
|
|
25
25
|
conversationChanged: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);;
|
|
26
26
|
conversationChangedDetailed: BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}> = new BehaviorSubject<{value: ConversationModel, previousValue: ConversationModel}>(null);
|
|
27
27
|
conversationRemoved: BehaviorSubject<ConversationModel> = new BehaviorSubject<ConversationModel>(null);
|
|
28
|
-
BSConversations: BehaviorSubject<ConversationModel[]>
|
|
29
28
|
// readAllMessages: BehaviorSubject<string>;
|
|
30
29
|
|
|
31
30
|
// public variables
|
|
@@ -14,7 +14,7 @@ export class MQTTGroupsHandler extends GroupsHandlerService {
|
|
|
14
14
|
|
|
15
15
|
// BehaviorSubject
|
|
16
16
|
BSgroupDetail: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
17
|
-
SgroupDetail: Subject<GroupModel> = new
|
|
17
|
+
SgroupDetail: Subject<GroupModel> = new Subject<GroupModel>();
|
|
18
18
|
groupAdded: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
19
19
|
groupChanged: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
20
20
|
groupRemoved: BehaviorSubject<GroupModel> = new BehaviorSubject<GroupModel>(null);
|
|
@@ -45,7 +45,8 @@ export const TYPE_MSG_IMAGE = 'image';
|
|
|
45
45
|
export const TYPE_MSG_FILE = 'file';
|
|
46
46
|
export const TYPE_MSG_BUTTON = 'button';
|
|
47
47
|
|
|
48
|
-
export const MAX_WIDTH_IMAGES =
|
|
48
|
+
export const MAX_WIDTH_IMAGES = 230;
|
|
49
|
+
export const MIN_WIDTH_IMAGES = 130;
|
|
49
50
|
export const TIME_TYPING_MESSAGE = 2000;
|
|
50
51
|
export const TYPE_DIRECT = 'direct';
|
|
51
52
|
export const TYPE_GROUP = 'group';
|
|
@@ -105,4 +106,4 @@ export const LogLevel = {
|
|
|
105
106
|
'WARN' : 1,
|
|
106
107
|
'INFO' : 2,
|
|
107
108
|
'DEBUG' : 3
|
|
108
|
-
}
|
|
109
|
+
}
|