@chat21/chat21-web-widget 5.0.53-rc.1 → 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 +8 -0
- package/Dockerfile +2 -2
- package/angular.json +3 -18
- 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.module.ts +3 -3
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +0 -10
- 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/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/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/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/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/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/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/base_script.html +0 -57
- 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 -371
- 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-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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.53-rc.2
|
|
4
|
+
- added: angular 15 engine
|
|
5
|
+
- added: custom tooltip directive
|
|
6
|
+
- changed: buildOptimization ng build parameter to build-optimization
|
|
7
|
+
- removed: ng2-tooltip-directive and ng2-tooltip-directive-ng13fix
|
|
8
|
+
- removed: initializatoin of abstract variables in chat21-core abstract providers
|
|
9
|
+
- removed: enableIvy parameter from tsconfig.json
|
|
10
|
+
|
|
3
11
|
### 5.0.53-rc.1
|
|
4
12
|
- added: Rules class (work in progress)
|
|
5
13
|
- added: base_script.html to load element inside tiledesk-iframe
|
package/Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
### STAGE 1: Build ###
|
|
2
2
|
|
|
3
3
|
# We label our stage as ‘builder’
|
|
4
|
-
FROM node:
|
|
4
|
+
FROM node:14.21.2-alpine as builder
|
|
5
5
|
|
|
6
6
|
COPY package.json package-lock.json ./
|
|
7
7
|
|
|
@@ -15,7 +15,7 @@ COPY . .
|
|
|
15
15
|
|
|
16
16
|
## Build the angular app in production mode and store the artifacts in dist folder
|
|
17
17
|
|
|
18
|
-
RUN npm run ng build -- --configuration="prod" --output-path=dist --base-href="./" --output-hashing=none --
|
|
18
|
+
RUN npm run ng build -- --configuration="prod" --output-path=dist --base-href="./" --output-hashing=none --build-optimizer=false --vendor-chunk
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
### STAGE 2: Setup ###
|
package/angular.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
3
|
"version": 1,
|
|
4
|
-
"defaultProject": "widget",
|
|
5
4
|
"newProjectRoot": "projects",
|
|
6
5
|
"projects": {
|
|
7
6
|
"widget": {
|
|
@@ -43,14 +42,13 @@
|
|
|
43
42
|
],
|
|
44
43
|
"styles": [
|
|
45
44
|
"src/app/sass/styles.scss",
|
|
46
|
-
"node_modules/@ctrl/ngx-emoji-mart/picker.css"
|
|
47
|
-
"node_modules/bootstrap/dist/js/bootstrap.min.js",
|
|
48
|
-
"node_modules/popper.js/dist/umd/popper.min.js"
|
|
45
|
+
"node_modules/@ctrl/ngx-emoji-mart/picker.css"
|
|
49
46
|
],
|
|
50
47
|
"scripts": [
|
|
51
48
|
"src/assets/js/mqtt/4.2.6/mqtt.min.js",
|
|
52
49
|
"node_modules/jquery/dist/jquery.min.js",
|
|
53
|
-
"node_modules/bootstrap/dist/js/bootstrap.min.js"
|
|
50
|
+
"node_modules/bootstrap/dist/js/bootstrap.min.js",
|
|
51
|
+
"node_modules/popper.js/dist/umd/popper.min.js"
|
|
54
52
|
],
|
|
55
53
|
"vendorChunk": true,
|
|
56
54
|
"extractLicenses": false,
|
|
@@ -159,19 +157,6 @@
|
|
|
159
157
|
"codeCoverage": true
|
|
160
158
|
}
|
|
161
159
|
},
|
|
162
|
-
"lint": {
|
|
163
|
-
"builder": "@angular-devkit/build-angular:tslint",
|
|
164
|
-
"options": {
|
|
165
|
-
"tsConfig": [
|
|
166
|
-
"tsconfig.app.json",
|
|
167
|
-
"tsconfig.spec.json",
|
|
168
|
-
"e2e/tsconfig.json"
|
|
169
|
-
],
|
|
170
|
-
"exclude": [
|
|
171
|
-
"**/node_modules/**"
|
|
172
|
-
]
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
160
|
"e2e": {
|
|
176
161
|
"builder": "@angular-devkit/build-angular:protractor",
|
|
177
162
|
"options": {
|
package/deploy_amazon_beta.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
version=`node -e 'console.log(require("./package.json").version)'`
|
|
3
3
|
echo "version $version"
|
|
4
4
|
|
|
5
|
-
ng build --configuration="pre" --aot=true --base-href --output-hashing none --
|
|
5
|
+
ng build --configuration="pre" --aot=true --base-href --output-hashing none --build-optimizer=true
|
|
6
6
|
|
|
7
7
|
# ########## --->>>> NATIVE-MQTT folder START <<<<<------ ########## #
|
|
8
8
|
|
package/deploy_amazon_prod.sh
CHANGED
|
@@ -3,7 +3,7 @@ version=`node -e 'console.log(require("./package.json").version)'`
|
|
|
3
3
|
echo "version $version"
|
|
4
4
|
|
|
5
5
|
# --build-optimizer=false if localstorage is disabled (webview) appears https://github.com/firebase/angularfire/issues/970
|
|
6
|
-
ng build --configuration="prod" --aot=true --base-href --output-hashing none --
|
|
6
|
+
ng build --configuration="prod" --aot=true --base-href --output-hashing none --build-optimizer=true --vendor-chunk=true
|
|
7
7
|
|
|
8
8
|
cd dist
|
|
9
9
|
# aws s3 sync . s3://tiledesk-widget/v5/latest/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chat21/chat21-web-widget",
|
|
3
3
|
"author": "Tiledesk SRL",
|
|
4
|
-
"version": "5.0.53-rc.
|
|
4
|
+
"version": "5.0.53-rc.2",
|
|
5
5
|
"license": "MIT License",
|
|
6
6
|
"homepage": "https://www.tiledesk.com",
|
|
7
7
|
"repository": {
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
},
|
|
19
19
|
"private": false,
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular/animations": "^
|
|
22
|
-
"@angular/cdk": "^
|
|
23
|
-
"@angular/common": "^
|
|
24
|
-
"@angular/compiler": "
|
|
25
|
-
"@angular/core": "
|
|
26
|
-
"@angular/forms": "
|
|
27
|
-
"@angular/localize": "^
|
|
28
|
-
"@angular/platform-browser": "^
|
|
29
|
-
"@angular/platform-browser-dynamic": "
|
|
30
|
-
"@angular/router": "
|
|
21
|
+
"@angular/animations": "^15.0.4",
|
|
22
|
+
"@angular/cdk": "^15.0.3",
|
|
23
|
+
"@angular/common": "^15.0.4",
|
|
24
|
+
"@angular/compiler": "^15.0.4",
|
|
25
|
+
"@angular/core": "^15.0.4",
|
|
26
|
+
"@angular/forms": "^15.0.4",
|
|
27
|
+
"@angular/localize": "^15.0.4",
|
|
28
|
+
"@angular/platform-browser": "^15.0.4",
|
|
29
|
+
"@angular/platform-browser-dynamic": "^15.0.4",
|
|
30
|
+
"@angular/router": "^15.0.4",
|
|
31
31
|
"@ctrl/ngx-emoji-mart": "^5.1.2",
|
|
32
|
-
"@ngx-translate/core": "^
|
|
32
|
+
"@ngx-translate/core": "^14.0.0",
|
|
33
33
|
"@ngx-translate/http-loader": "^4.0.0",
|
|
34
34
|
"@popperjs/core": "^2.11.5",
|
|
35
35
|
"@types/marked": "^4.0.3",
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
"jquery": "^3.6.0",
|
|
42
42
|
"marked": "^4.0.16",
|
|
43
43
|
"moment": "^2.29.3",
|
|
44
|
-
"ng2-tooltip-directive": "^2.10.3",
|
|
45
44
|
"ngx-logger": "^5.0.11",
|
|
46
45
|
"ngx-moment": "^6.0.2",
|
|
47
46
|
"popper.js": "^1.16.1",
|
|
@@ -51,10 +50,10 @@
|
|
|
51
50
|
"zone.js": "~0.11.4"
|
|
52
51
|
},
|
|
53
52
|
"devDependencies": {
|
|
54
|
-
"@angular-devkit/build-angular": "
|
|
55
|
-
"@angular/cli": "
|
|
56
|
-
"@angular/compiler-cli": "
|
|
57
|
-
"@angular/language-service": "
|
|
53
|
+
"@angular-devkit/build-angular": "^15.0.4",
|
|
54
|
+
"@angular/cli": "^15.0.4",
|
|
55
|
+
"@angular/compiler-cli": "^15.0.4",
|
|
56
|
+
"@angular/language-service": "^15.0.4",
|
|
58
57
|
"@types/jasmine": "^3.6.11",
|
|
59
58
|
"@types/jasminewd2": "~2.0.3",
|
|
60
59
|
"@types/node": "^12.11.1",
|
|
@@ -69,6 +68,6 @@
|
|
|
69
68
|
"protractor": "~7.0.0",
|
|
70
69
|
"ts-node": "~7.0.0",
|
|
71
70
|
"tslint": "~6.1.0",
|
|
72
|
-
"typescript": "
|
|
71
|
+
"typescript": "4.8.4"
|
|
73
72
|
}
|
|
74
73
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@import 'src/app/sass/variables';
|
|
6
6
|
@import url('./sass/animations.scss');
|
|
7
7
|
@import url("./sass/hover.css");
|
|
8
|
-
@import '
|
|
8
|
+
@import '@ctrl/ngx-emoji-mart/picker';
|
|
9
9
|
// @import "~bootstrap/dist/css/bootstrap.css";
|
|
10
10
|
/** custom scroll bar **/
|
|
11
11
|
input, select:focus, textarea {
|
|
@@ -47,15 +47,6 @@ input, select:focus, textarea {
|
|
|
47
47
|
--button-in-msg-font-size: 15px;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.chat-tooltip {
|
|
51
|
-
font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
|
|
52
|
-
font-size: 12px;
|
|
53
|
-
font-style: normal;
|
|
54
|
-
letter-spacing: normal;
|
|
55
|
-
font-stretch: normal;
|
|
56
|
-
font-variant: normal;
|
|
57
|
-
font-weight: 300;
|
|
58
|
-
}
|
|
59
50
|
|
|
60
51
|
body {
|
|
61
52
|
margin:0px;
|
|
@@ -216,7 +207,44 @@ textarea::placeholder {
|
|
|
216
207
|
}
|
|
217
208
|
}
|
|
218
209
|
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.tooltip-container {
|
|
213
|
+
font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
|
|
214
|
+
font-size: 12px;
|
|
215
|
+
font-style: normal;
|
|
216
|
+
letter-spacing: normal;
|
|
217
|
+
font-stretch: normal;
|
|
218
|
+
font-variant: normal;
|
|
219
|
+
font-weight: 300;
|
|
220
|
+
z-index: 100;
|
|
221
|
+
position: fixed;
|
|
222
|
+
padding: 6px 12px;
|
|
223
|
+
line-height: initial;
|
|
224
|
+
color: black;
|
|
225
|
+
width: auto;
|
|
226
|
+
background:rgb(255, 255, 255);
|
|
227
|
+
border-radius: 10px;
|
|
228
|
+
-webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
|
|
229
|
+
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
opacity: 0;
|
|
232
|
+
transform: translate(-80%, -70%);
|
|
233
|
+
animation: tooltip-slide 0.18s ease-out 0.5s;
|
|
234
|
+
animation-fill-mode: forwards;
|
|
235
|
+
pointer-events: none;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
@keyframes tooltip-slide {
|
|
239
|
+
0% {
|
|
240
|
+
opacity: 0;
|
|
241
|
+
transform: translate(-50%, -70%);
|
|
219
242
|
}
|
|
243
|
+
100% {
|
|
244
|
+
opacity: 1;
|
|
245
|
+
transform: translate(-50%, -50%);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
220
248
|
|
|
221
249
|
chat-root {
|
|
222
250
|
position: absolute;
|
package/src/app/app.module.ts
CHANGED
|
@@ -57,7 +57,6 @@ import { environment } from 'src/environments/environment';
|
|
|
57
57
|
//THIRD-PART MODULES
|
|
58
58
|
import { TranslateModule } from '@ngx-translate/core';
|
|
59
59
|
import { MomentModule } from 'ngx-moment';
|
|
60
|
-
import { TooltipModule } from 'ng2-tooltip-directive';
|
|
61
60
|
import { PickerModule } from '@ctrl/ngx-emoji-mart';
|
|
62
61
|
import { INGXLoggerMetadata, LoggerModule, NGXLogger, NgxLoggerLevel, NGXLoggerServerService, TOKEN_LOGGER_SERVER_SERVICE } from "ngx-logger";
|
|
63
62
|
|
|
@@ -128,6 +127,7 @@ import { WaitingService } from './providers/waiting.service';
|
|
|
128
127
|
import { StarRatingWidgetService } from './providers/star-rating-widget.service';
|
|
129
128
|
import { LikeUnlikeComponent } from './component/message/like-unlike/like-unlike.component';
|
|
130
129
|
import { Rules } from './utils/rules';
|
|
130
|
+
import { TooltipDirective } from 'src/app/directives/tooltip.directive';
|
|
131
131
|
|
|
132
132
|
|
|
133
133
|
const appInitializerFn = (appConfig: AppConfigService, logger: NGXLogger) => {
|
|
@@ -283,7 +283,8 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
283
283
|
HtmlEntitiesEncodePipe,
|
|
284
284
|
MarkedPipe,
|
|
285
285
|
SafeHtmlPipe,
|
|
286
|
-
LikeUnlikeComponent
|
|
286
|
+
LikeUnlikeComponent,
|
|
287
|
+
TooltipDirective
|
|
287
288
|
],
|
|
288
289
|
imports: [
|
|
289
290
|
BrowserModule,
|
|
@@ -293,7 +294,6 @@ export function uploadFactory(http: HttpClient, appConfig: AppConfigService, app
|
|
|
293
294
|
FormsModule,
|
|
294
295
|
ReactiveFormsModule,
|
|
295
296
|
MomentModule,
|
|
296
|
-
TooltipModule,
|
|
297
297
|
PickerModule,
|
|
298
298
|
TranslateModule.forRoot(//),
|
|
299
299
|
{
|
|
@@ -144,16 +144,6 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
144
144
|
dropEvent: Event
|
|
145
145
|
// ========== end:: DRAG & DROP =======
|
|
146
146
|
|
|
147
|
-
tooltipOptions = {
|
|
148
|
-
'show-delay': 1500,
|
|
149
|
-
'tooltip-class': 'chat-tooltip',
|
|
150
|
-
'theme': 'light',
|
|
151
|
-
'shadow': false,
|
|
152
|
-
'hide-delay-mobile': 0,
|
|
153
|
-
'hideDelayAfterClick': 3000,
|
|
154
|
-
'hide-delay': 200
|
|
155
|
-
};
|
|
156
|
-
|
|
157
147
|
translationMapHeader: Map<string, string>;
|
|
158
148
|
translationMapFooter: Map<string, string>;
|
|
159
149
|
translationMapContent: Map<string, string>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { MomentModule } from 'ngx-moment';
|
|
2
|
-
import { TooltipModule } from 'ng2-tooltip-directive';
|
|
3
2
|
import { async, ComponentFixture, TestBed, waitForAsync, inject } from '@angular/core/testing';
|
|
4
3
|
|
|
5
4
|
import { ConversationContentComponent } from './conversation-content.component';
|
|
@@ -36,7 +35,6 @@ describe('ConversationContentComponent', () => {
|
|
|
36
35
|
HtmlEntitiesEncodePipe,
|
|
37
36
|
],
|
|
38
37
|
imports: [
|
|
39
|
-
TooltipModule,
|
|
40
38
|
MomentModule
|
|
41
39
|
],
|
|
42
40
|
providers: [
|
package/src/app/component/conversation-detail/conversation-content/conversation-content.component.ts
CHANGED
|
@@ -67,16 +67,6 @@ export class ConversationContentComponent implements OnInit {
|
|
|
67
67
|
MESSAGE_TYPE_OTHERS = MESSAGE_TYPE_OTHERS;
|
|
68
68
|
// ========== end:: check message type functions ======= //
|
|
69
69
|
|
|
70
|
-
tooltipOptions = {
|
|
71
|
-
'show-delay': 1500,
|
|
72
|
-
'tooltip-class': 'chat-tooltip',
|
|
73
|
-
'theme': 'light',
|
|
74
|
-
'shadow': false,
|
|
75
|
-
'hide-delay-mobile': 0,
|
|
76
|
-
'hideDelayAfterClick': 3000,
|
|
77
|
-
'hide-delay': 200
|
|
78
|
-
};
|
|
79
|
-
|
|
80
70
|
urlBOTImage = 'https://s3.eu-west-1.amazonaws.com/tiledesk-widget/dev/2.0.4-beta.7/assets/images/avatar_bot_tiledesk.svg'
|
|
81
71
|
uploadProgress: number;
|
|
82
72
|
showUploadProgress: boolean = false;
|
|
@@ -52,7 +52,7 @@ export class FormBuilderComponent implements OnInit {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
buildFormGroup(inputJson: Array<FormArray>): FormGroup {
|
|
55
|
+
buildFormGroup(inputJson: Array<FormArray>): FormGroup<any> {
|
|
56
56
|
let objectFormBuilder: { [key: string]: FormControl } = {}
|
|
57
57
|
let restoreDefault = false;
|
|
58
58
|
let initIndex:number = 1411;
|
|
@@ -17,7 +17,7 @@ export class FormCheckboxComponent implements OnInit {
|
|
|
17
17
|
@Input() hasSubmitted: boolean;
|
|
18
18
|
@Output() onKeyEnterPressed = new EventEmitter<any>();
|
|
19
19
|
|
|
20
|
-
form: FormGroup
|
|
20
|
+
form: FormGroup<any>;
|
|
21
21
|
constructor(private rootFormGroup: FormGroupDirective,
|
|
22
22
|
private elementRef: ElementRef) { }
|
|
23
23
|
|
|
@@ -18,13 +18,13 @@ export class FormTextComponent implements OnInit {
|
|
|
18
18
|
@Output() onKeyEnterPressed = new EventEmitter<any>();
|
|
19
19
|
|
|
20
20
|
@ViewChild('div_input') input: ElementRef;
|
|
21
|
-
form: FormGroup
|
|
21
|
+
form: FormGroup<any>;
|
|
22
22
|
inputType: string = 'text'
|
|
23
23
|
constructor(private rootFormGroup: FormGroupDirective,
|
|
24
24
|
private elementRef: ElementRef) { }
|
|
25
25
|
|
|
26
26
|
ngOnInit() {
|
|
27
|
-
this.form = this.rootFormGroup.control as FormGroup
|
|
27
|
+
this.form = this.rootFormGroup.control as FormGroup<any>;
|
|
28
28
|
if(this.form && this.form.controls && this.form.controls[this.controlName]){
|
|
29
29
|
this.form.controls[this.controlName].valueChanges.subscribe((value) => {
|
|
30
30
|
this.hasSubmitted= false;
|
|
@@ -17,12 +17,12 @@ export class FormTextareaComponent implements OnInit {
|
|
|
17
17
|
@Input() hasSubmitted: boolean;
|
|
18
18
|
@Output() onKeyEnterPressed = new EventEmitter<any>();
|
|
19
19
|
@ViewChild('div_input') input: ElementRef;
|
|
20
|
-
form: FormGroup
|
|
20
|
+
form: FormGroup<any>;
|
|
21
21
|
constructor(private rootFormGroup: FormGroupDirective,
|
|
22
22
|
private elementRef: ElementRef) { }
|
|
23
23
|
|
|
24
24
|
ngOnInit() {
|
|
25
|
-
this.form = this.rootFormGroup.control as FormGroup
|
|
25
|
+
this.form = this.rootFormGroup.control as FormGroup<any>;
|
|
26
26
|
if(this.form && this.form.controls && this.form.controls[this.controlName]){
|
|
27
27
|
this.form.controls[this.controlName].valueChanges.subscribe((value) => {
|
|
28
28
|
this.hasSubmitted= false;
|
|
@@ -23,7 +23,7 @@ export class PrechatFormComponent implements OnInit, AfterViewInit {
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
// ========= begin:: component variables ======= //
|
|
26
|
-
preChatFormGroup: FormGroup
|
|
26
|
+
preChatFormGroup: FormGroup<any>;
|
|
27
27
|
userFullname: string;
|
|
28
28
|
userEmail: string;
|
|
29
29
|
// ========= end:: component variables ======= //
|
|
@@ -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
|
+
}
|
|
@@ -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() {}
|