@chat21/chat21-web-widget 5.1.0-rc9 → 5.1.1-rc1
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 +110 -8
- package/angular.json +2 -2
- package/deploy_beta.sh +10 -0
- package/deploy_prod.sh +9 -0
- package/package.json +2 -2
- package/src/app/app.component.html +7 -1
- package/src/app/app.component.scss +11 -102
- package/src/app/app.component.ts +60 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.html +4 -2
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +70 -7
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +106 -65
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.html +3 -2
- package/src/app/component/conversation-detail/conversation-audio-recorder/conversation-audio-recorder.component.scss +7 -15
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.html +1 -5
- package/src/app/component/conversation-detail/conversation-content/conversation-content.component.scss +48 -33
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.html +13 -8
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +17 -18
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.ts +11 -15
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.html +54 -17
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.scss +1 -2
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts +7 -5
- package/src/app/component/conversation-detail/conversation-preview/conversation-preview.component.scss +0 -3
- package/src/app/component/eyeeye-catcher-card/eyeeye-catcher-card.component.scss +1 -3
- package/src/app/component/form/form-builder/form-builder.component.scss +0 -1
- package/src/app/component/form/inputs/form-text/form-text.component.scss +0 -1
- package/src/app/component/form/inputs/form-textarea/form-textarea.component.scss +0 -1
- package/src/app/component/form/prechat-form/prechat-form.component.scss +1 -3
- package/src/app/component/home/home.component.html +41 -0
- package/src/app/component/home/home.component.scss +34 -8
- package/src/app/component/home/home.component.ts +17 -0
- package/src/app/component/home-conversations/home-conversations.component.scss +0 -3
- package/src/app/component/last-message/last-message.component.html +0 -2
- package/src/app/component/last-message/last-message.component.scss +0 -2
- package/src/app/component/list-all-conversations/list-all-conversations.component.scss +2 -5
- package/src/app/component/list-conversations/list-conversations.component.scss +0 -2
- package/src/app/component/menu-options/menu-options.component.scss +0 -2
- package/src/app/component/message/audio/audio.component.html +1 -1
- package/src/app/component/message/audio/audio.component.scss +1 -0
- package/src/app/component/message/audio/audio.component.ts +0 -1
- package/src/app/component/message/avatar/avatar.component.scss +4 -4
- package/src/app/component/message/bubble-message/bubble-message.component.html +1 -4
- package/src/app/component/message/bubble-message/bubble-message.component.scss +0 -1
- package/src/app/component/message/bubble-message/bubble-message.component.ts +0 -2
- package/src/app/component/message/buttons/action-button/action-button.component.scss +6 -6
- package/src/app/component/message/buttons/link-button/link-button.component.scss +5 -5
- package/src/app/component/message/buttons/text-button/text-button.component.scss +5 -6
- package/src/app/component/message/carousel/carousel.component.html +2 -1
- package/src/app/component/message/carousel/carousel.component.scss +5 -6
- package/src/app/component/message/frame/frame.component.scss +0 -2
- package/src/app/component/message/html/html.component.scss +1 -3
- package/src/app/component/message/image/image.component.scss +0 -2
- package/src/app/component/message/info-message/info-message.component.scss +0 -2
- package/src/app/component/message/like-unlike/like-unlike.component.scss +0 -2
- package/src/app/component/message/text/text.component.html +4 -4
- package/src/app/component/message/text/text.component.scss +2 -4
- package/src/app/component/message/text/text.component.ts +0 -2
- package/src/app/component/message-attachment/message-attachment.component.scss +2 -1
- package/src/app/component/selection-department/selection-department.component.scss +1 -5
- package/src/app/component/star-rating-widget/star-rating-widget.component.scss +0 -7
- package/src/app/pipe/marked.pipe.ts +18 -7
- package/src/app/providers/global-settings.service.ts +108 -9
- package/src/app/sass/_variables.scss +15 -2
- package/src/app/utils/constants.ts +2 -1
- package/src/app/utils/globals.ts +101 -101
- package/src/app/utils/utils.ts +0 -85
- package/src/assets/i18n/en.json +5 -4
- package/src/assets/i18n/es.json +3 -2
- package/src/assets/i18n/fr.json +3 -2
- package/src/assets/i18n/it.json +3 -2
- package/src/assets/twp/chatbot-panel.html +39 -0
- package/src/assets/twp/index-dev.html +177 -121
- package/src/chat21-core/providers/firebase/firebase-conversation-handler.ts +8 -1
- package/src/chat21-core/providers/mqtt/mqtt-conversation-handler.ts +9 -1
- package/src/chat21-core/providers/tiledesk/tiledesk-requests.service.ts +14 -0
- package/src/chat21-core/utils/constants.ts +2 -0
- package/src/chat21-core/utils/user-typing/user-typing.component.scss +0 -1
- package/src/chat21-core/utils/utils-message.ts +12 -1
- package/src/chat21-core/utils/utils.ts +85 -0
- package/src/iframe-style.css +54 -35
package/CHANGELOG.md
CHANGED
|
@@ -6,27 +6,129 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
-
# 5.1.
|
|
9
|
+
# 5.1.1-rc1
|
|
10
|
+
- **bug-fixed**: marked pipe not renders urls
|
|
11
|
+
|
|
12
|
+
# 5.1.0-rc34
|
|
13
|
+
- **bug-fixed**: css fixed carousel
|
|
14
|
+
|
|
15
|
+
# 5.1.0-rc33
|
|
16
|
+
- **changed**: updated "marked library" from 4.0.16 to 16.3.0 - enabled list and table
|
|
17
|
+
|
|
18
|
+
# 5.1.0-rc32
|
|
19
|
+
- **bug-fixed**: overlay--popup
|
|
20
|
+
|
|
21
|
+
# 5.1.0-rc31
|
|
22
|
+
- **bug-fixed**: fixed the text area css
|
|
23
|
+
|
|
24
|
+
# 5.1.0-rc30
|
|
25
|
+
- **changed**: left-aligned buttons with variable widths, like UIPath
|
|
26
|
+
- **changed**: input text area, CSS changed, like ChatGPT style
|
|
27
|
+
- **changed**: increased chatbot width in top-size view with maximum width like UIPath
|
|
28
|
+
- **changed**: added dark screen in top-size view
|
|
29
|
+
|
|
30
|
+
# 5.1.0-rc29
|
|
31
|
+
- **bug-fixed**: Bug fix for vertical position of widget ball
|
|
32
|
+
|
|
33
|
+
# 5.1.0-rc28
|
|
34
|
+
- **changed**: added buttons to change widget size in header
|
|
35
|
+
- **bug-fixed**: fixed bug widget's balloon position when closed
|
|
36
|
+
|
|
37
|
+
# 5.1.0-rc27
|
|
38
|
+
- **bug-fixed**: minor fix on avatar image and textarea style
|
|
39
|
+
|
|
40
|
+
# 5.1.0-rc26
|
|
41
|
+
- **added**: buttons attachments aligned to bubble message
|
|
42
|
+
- **changed**: enable new textarea style if width is grather than 688px
|
|
43
|
+
- **bug-fixed**: fullscreenMode is not enabled (css class override fullscreen style)
|
|
44
|
+
|
|
45
|
+
# 5.1.0-rc25
|
|
46
|
+
- **added**: allowedUploadExtentions property from api call
|
|
47
|
+
|
|
48
|
+
# 5.1.0-rc24
|
|
49
|
+
- **added**: size tiledeskSettings property
|
|
50
|
+
|
|
51
|
+
# 5.1.0-rc23
|
|
52
|
+
- **added**: hideHeaderConversation tiledeskSettings property
|
|
53
|
+
|
|
54
|
+
# 5.1.0-rc22
|
|
55
|
+
- **changed**: footer UI if fullscreenMode is enabled
|
|
56
|
+
- **changed**: buttons alignment if fullscreenMode is enabled
|
|
57
|
+
- **changed**: animation while increase/descrease widget size
|
|
58
|
+
|
|
59
|
+
# 5.1.0-rc21
|
|
60
|
+
- **bug-fixed**: shadow is visible while decrease widget size
|
|
61
|
+
|
|
62
|
+
# 5.1.0-rc20
|
|
63
|
+
- **added**: fontFamilySource settings variable
|
|
64
|
+
- **added**: --font-family-bubble-message as variable to manage custom font
|
|
65
|
+
- **removed**: fontSize and fontFamily as input property in bubble-message component
|
|
66
|
+
|
|
67
|
+
# 5.1.0-rc19
|
|
68
|
+
- **added**: ability to maximize, minimize and fullscreen the widget window
|
|
69
|
+
- **added**: variable for font-family attribute css value
|
|
70
|
+
|
|
71
|
+
# 5.0.102
|
|
72
|
+
- **bug-fixed**: cannot add message if array is empty
|
|
73
|
+
|
|
74
|
+
# 5.0.101
|
|
75
|
+
- **bug-fixed**: removed private note msgs
|
|
76
|
+
|
|
77
|
+
# 5.1.0-rc18
|
|
78
|
+
- **bug-fixed**: allowedOnSpecificUrl
|
|
79
|
+
|
|
80
|
+
# 5.1.0-rc17
|
|
81
|
+
- **added**: allowedOnSpecificUrl and allowedOnSpecificUrlList to manage list of pattern url to allow to load the widget
|
|
82
|
+
|
|
83
|
+
# 5.1.0-rc16
|
|
84
|
+
- **added**: hideOnSpecificUrlList replaced in favour of hideOnSpecificDomainList
|
|
85
|
+
|
|
86
|
+
# 5.1.0-rc15
|
|
87
|
+
# 5.1.0-rc14
|
|
88
|
+
- **added**: ability to hide widget on selected domains based on hideOnSpecificDomainList variable
|
|
89
|
+
|
|
90
|
+
# 5.1.0-rc13
|
|
91
|
+
- **added**: ability to manage embedded chatbot-panel.html page into an iframe and hide some elements
|
|
92
|
+
|
|
93
|
+
# 5.1.0-rc12
|
|
94
|
+
- **added**: ability to get all my request from Tiledesk API
|
|
95
|
+
|
|
96
|
+
# 5.1.0-rc11
|
|
97
|
+
- **bug-fixed**: removed private note msgs
|
|
98
|
+
|
|
99
|
+
# 5.1.0-rc10
|
|
100
|
+
- **bug-fixed**: minor fix allowed urls
|
|
101
|
+
|
|
102
|
+
# 5.1.0-rc9
|
|
10
103
|
- **bug-fixed**: minor fix allowed urls
|
|
11
104
|
|
|
12
|
-
# 5.1.0-
|
|
105
|
+
# 5.1.0-rc8
|
|
13
106
|
- **added**: ability to filter on urls attached to message textarea
|
|
14
107
|
|
|
15
|
-
# 5.1.0-
|
|
108
|
+
# 5.1.0-rc7
|
|
16
109
|
- **added**: ability to allows emoji after message is sent
|
|
17
110
|
|
|
18
|
-
# 5.1.0-
|
|
111
|
+
# 5.1.0-rc6
|
|
19
112
|
- **removed**: hideRestartConversationOptionsMenu
|
|
20
113
|
|
|
21
|
-
# 5.1.0-
|
|
22
|
-
# 5.1.0-
|
|
114
|
+
# 5.1.0-rc5
|
|
115
|
+
# 5.1.0-rc4
|
|
23
116
|
- **bug-fixed**: Dockerfile for angular 18
|
|
24
117
|
|
|
25
|
-
# 5.1.0-
|
|
118
|
+
# 5.1.0-rc3
|
|
26
119
|
- **added**: angular 18
|
|
27
120
|
|
|
28
|
-
# 5.1.0-
|
|
121
|
+
# 5.1.0-rc2
|
|
29
122
|
- **added**: angular 17
|
|
123
|
+
# 5.0.99
|
|
124
|
+
|
|
125
|
+
# 5.0.99-rc1
|
|
126
|
+
- **bug-fixed**: audio duration not showed in mobile browser
|
|
127
|
+
|
|
128
|
+
# 5.0.98
|
|
129
|
+
- **bug-fixed**: meta info not rendered correctly
|
|
130
|
+
|
|
131
|
+
# 5.0.97
|
|
30
132
|
|
|
31
133
|
# 5.0.96
|
|
32
134
|
|
package/angular.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"index": "src/index.html",
|
|
25
25
|
"polyfills": [
|
|
26
26
|
"src/polyfills.ts",
|
|
27
|
-
"@angular/localize/init"
|
|
27
|
+
"@angular/localize/init"
|
|
28
28
|
],
|
|
29
29
|
"tsConfig": "tsconfig.app.json",
|
|
30
30
|
"assets": [
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
],
|
|
52
52
|
"scripts": [
|
|
53
53
|
"src/assets/js/mqtt/4.2.6/mqtt.min.js",
|
|
54
|
-
"node_modules/bootstrap/dist/js/bootstrap.min.js"
|
|
54
|
+
"node_modules/bootstrap/dist/js/bootstrap.min.js"
|
|
55
55
|
],
|
|
56
56
|
"extractLicenses": false,
|
|
57
57
|
"allowedCommonJsDependencies": [
|
package/deploy_beta.sh
CHANGED
|
@@ -4,6 +4,16 @@ echo "version $version"
|
|
|
4
4
|
echo "____________WIDGET-V5______________"
|
|
5
5
|
echo "CREATING TAG ON GIT FOR version: $version"
|
|
6
6
|
|
|
7
|
+
# Get curent branch name
|
|
8
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
9
|
+
remote_name=$(git config --get branch.$current_branch.remote)
|
|
10
|
+
|
|
11
|
+
## Push commit to git
|
|
12
|
+
git add .
|
|
13
|
+
git commit -m "version added: ### $version"
|
|
14
|
+
git push "$remote_name" "$current_branch"
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
# Get curent branch name
|
|
8
18
|
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
9
19
|
remote_name=$(git config --get branch.$current_branch.remote)
|
package/deploy_prod.sh
CHANGED
|
@@ -13,6 +13,15 @@ git add .
|
|
|
13
13
|
git commit -m "version added: ### $version"
|
|
14
14
|
git push "$remote_name" "$current_branch"
|
|
15
15
|
|
|
16
|
+
# Get curent branch name
|
|
17
|
+
current_branch=$(git rev-parse --abbrev-ref HEAD)
|
|
18
|
+
remote_name=$(git config --get branch.$current_branch.remote)
|
|
19
|
+
|
|
20
|
+
## Push commit to git
|
|
21
|
+
git add .
|
|
22
|
+
git commit -m "version added: ### $version"
|
|
23
|
+
git push "$remote_name" "$current_branch"
|
|
24
|
+
|
|
16
25
|
if [ "$version" != "" ]; then
|
|
17
26
|
git tag -a "$version" -m "`git log -1 --format=%s`"
|
|
18
27
|
echo "Created a new tag, $version"
|
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.1.
|
|
4
|
+
"version": "5.1.1-rc1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.tiledesk.com",
|
|
7
7
|
"repository": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"file-saver": "^2.0.5",
|
|
40
40
|
"firebase": "^8.6.7",
|
|
41
41
|
"humanize-duration-ts": "^2.1.1",
|
|
42
|
-
"marked": "^
|
|
42
|
+
"marked": "^16.3.0",
|
|
43
43
|
"ngx-logger": "^5.0.11",
|
|
44
44
|
"replace": "^1.2.2",
|
|
45
45
|
"rxjs": "^7.8.2",
|
|
@@ -11,13 +11,19 @@
|
|
|
11
11
|
[archivedConversations]="archivedConversations"
|
|
12
12
|
[hideSettings]="g.hideSettings"
|
|
13
13
|
[stylesMap]="styleMapConversation"
|
|
14
|
+
[size]="g.size"
|
|
15
|
+
[fullscreenMode]="g.fullscreenMode"
|
|
16
|
+
[hideHeaderConversationOptionsMenu]="g.hideHeaderConversationOptionsMenu"
|
|
17
|
+
[isButtonsDisabled]="isButtonsDisabled"
|
|
18
|
+
[translationMap]="translationMap"
|
|
14
19
|
(onNewConversation)="onNewConversation()"
|
|
15
20
|
(onConversationSelected)="onSelectedConversation($event)"
|
|
16
21
|
(onOpenAllConvesations)="onOpenAllConversation()"
|
|
17
22
|
(onCloseWidget)="onCloseWidget()"
|
|
18
23
|
(onSignOut)="onSignOut()"
|
|
19
24
|
(onImageLoaded)="onImageLoaded($event)"
|
|
20
|
-
(onConversationLoaded)="onConversationLoaded($event)"
|
|
25
|
+
(onConversationLoaded)="onConversationLoaded($event)"
|
|
26
|
+
(onMenuOptionClick)="onMenuOptionClick($event)">
|
|
21
27
|
</chat-home>
|
|
22
28
|
</div>
|
|
23
29
|
|
|
@@ -43,7 +43,6 @@ input, select:focus, textarea {
|
|
|
43
43
|
|
|
44
44
|
:host {
|
|
45
45
|
--button-in-msg-background-color: --black;
|
|
46
|
-
--button-in-msg-font-size: 15px;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
48
|
|
|
@@ -57,6 +56,7 @@ body {
|
|
|
57
56
|
|
|
58
57
|
|
|
59
58
|
|
|
59
|
+
|
|
60
60
|
// .btn-new-conversation:hover{
|
|
61
61
|
// -webkit-animation: jello-horizontal 0.8s 0.1s both;
|
|
62
62
|
// animation: jello-horizontal 0.8s 0.1s both;
|
|
@@ -134,39 +134,6 @@ textarea::placeholder {
|
|
|
134
134
|
font-weight: 300;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.msg_container{
|
|
138
|
-
.button-in-msg {
|
|
139
|
-
color: white!important;
|
|
140
|
-
background: var(--button-in-msg-background-color) !important;
|
|
141
|
-
|
|
142
|
-
position: relative;
|
|
143
|
-
max-width: 300px;
|
|
144
|
-
min-width: inherit;
|
|
145
|
-
padding: 8px 16px;
|
|
146
|
-
cursor: auto;
|
|
147
|
-
border: 1px solid rgb(255, 255, 255);
|
|
148
|
-
border-radius: 20px!important;
|
|
149
|
-
margin: 3px;
|
|
150
|
-
overflow: hidden;
|
|
151
|
-
font-family: 'Muli', sans-serif;
|
|
152
|
-
font-size: 15px;
|
|
153
|
-
-o-text-overflow: ellipsis;
|
|
154
|
-
text-overflow: ellipsis;
|
|
155
|
-
white-space: normal;
|
|
156
|
-
letter-spacing: -0.24px;
|
|
157
|
-
-webkit-font-smoothing: antialiased;
|
|
158
|
-
.message_innerhtml{
|
|
159
|
-
// padding: 0px 14px!important;
|
|
160
|
-
}
|
|
161
|
-
p{
|
|
162
|
-
font-size: var(--button-in-msg-font-size)!important;
|
|
163
|
-
font-family: 'Muli', sans-serif!important;
|
|
164
|
-
font-weight: normal!important;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
}
|
|
169
|
-
|
|
170
137
|
|
|
171
138
|
// TOOLTIP: start
|
|
172
139
|
.tooltip-container {
|
|
@@ -282,6 +249,10 @@ chat-root {
|
|
|
282
249
|
cursor: pointer;
|
|
283
250
|
}
|
|
284
251
|
|
|
252
|
+
table {
|
|
253
|
+
color: inherit;
|
|
254
|
+
}
|
|
255
|
+
|
|
285
256
|
textarea,
|
|
286
257
|
textarea:visited,
|
|
287
258
|
textarea:focus,
|
|
@@ -307,7 +278,7 @@ chat-root {
|
|
|
307
278
|
position: absolute;
|
|
308
279
|
width: 100%;
|
|
309
280
|
height: 100%;
|
|
310
|
-
font-family:
|
|
281
|
+
font-family: var(--font-family-bubble-message);
|
|
311
282
|
font-size: 10px;
|
|
312
283
|
text-align: left;
|
|
313
284
|
background-color: transparent;
|
|
@@ -507,59 +478,7 @@ chat-root {
|
|
|
507
478
|
}
|
|
508
479
|
}
|
|
509
480
|
}
|
|
510
|
-
|
|
511
|
-
/*http://tobiasahlin.com/spinkit/*/
|
|
512
|
-
#chat21-spinner {
|
|
513
|
-
display: none;
|
|
514
|
-
width: 70px;
|
|
515
|
-
min-height: 20px;
|
|
516
|
-
margin: 20px auto 0;
|
|
517
|
-
text-align: center;
|
|
518
|
-
}
|
|
519
|
-
#chat21-spinner.active {
|
|
520
|
-
display: block;
|
|
521
|
-
}
|
|
522
|
-
#chat21-spinner > div {
|
|
523
|
-
width: 12px;
|
|
524
|
-
height: 12px;
|
|
525
|
-
background-color: var(--blue);
|
|
526
|
-
border-radius: 100%;
|
|
527
|
-
display: inline-block;
|
|
528
|
-
-webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
529
|
-
animation: sk-bouncedelay 1.4s infinite ease-in-out both;
|
|
530
|
-
}
|
|
531
|
-
#chat21-spinner .chat21-bounce1 {
|
|
532
|
-
-webkit-animation-delay: -0.32s;
|
|
533
|
-
animation-delay: -0.32s;
|
|
534
|
-
}
|
|
535
|
-
#chat21-spinner .chat21-bounce2 {
|
|
536
|
-
-webkit-animation-delay: -0.16s;
|
|
537
|
-
animation-delay: -0.16s;
|
|
538
|
-
}
|
|
539
|
-
#chat21-spinner span {
|
|
540
|
-
display: block;
|
|
541
|
-
margin: 0.5em 0 0 0;
|
|
542
|
-
color: var(--black);
|
|
543
|
-
/* text-transform: uppercase; */
|
|
544
|
-
font-family: 'Roboto', sans-serif;
|
|
545
|
-
-webkit-animation: pulse 2000ms linear infinite;
|
|
546
|
-
-moz-animation: pulse 2000ms linear infinite;
|
|
547
|
-
animation: pulse 2000ms linear infinite;
|
|
548
|
-
text-align: center;
|
|
549
|
-
}
|
|
550
|
-
@-webkit-keyframes sk-bouncedelay {
|
|
551
|
-
0%, 80%, 100% { -webkit-transform: scale(0) }
|
|
552
|
-
40% { -webkit-transform: scale(1.0) }
|
|
553
|
-
}
|
|
554
|
-
@keyframes sk-bouncedelay {
|
|
555
|
-
0%, 80%, 100% {
|
|
556
|
-
-webkit-transform: scale(0);
|
|
557
|
-
transform: scale(0);
|
|
558
|
-
} 40% {
|
|
559
|
-
-webkit-transform: scale(1.0);
|
|
560
|
-
transform: scale(1.0);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
481
|
+
|
|
563
482
|
// ========= END: GENERIC CSS ========= //
|
|
564
483
|
|
|
565
484
|
/* CSS BOX CONTAINER */
|
|
@@ -601,16 +520,6 @@ chat-root {
|
|
|
601
520
|
border-radius: 16px;
|
|
602
521
|
}
|
|
603
522
|
|
|
604
|
-
.chat21-fullscreen {
|
|
605
|
-
width: 100%;
|
|
606
|
-
height: 100%;
|
|
607
|
-
right: 0px;
|
|
608
|
-
left: 0px;
|
|
609
|
-
bottom: 0px;
|
|
610
|
-
border-radius: 0px;
|
|
611
|
-
max-height: none;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
523
|
|
|
615
524
|
/***************************
|
|
616
525
|
******** PAGE MODAL ********
|
|
@@ -682,7 +591,7 @@ chat-root {
|
|
|
682
591
|
.c21-header {
|
|
683
592
|
overflow: hidden;
|
|
684
593
|
width: 100%;
|
|
685
|
-
height:
|
|
594
|
+
height: var(--chat-header-height);
|
|
686
595
|
position: relative;
|
|
687
596
|
margin: 0;
|
|
688
597
|
padding: 0;
|
|
@@ -703,7 +612,7 @@ chat-root {
|
|
|
703
612
|
|
|
704
613
|
.c21-header-container{
|
|
705
614
|
position: relative;
|
|
706
|
-
height:
|
|
615
|
+
height: 100%;
|
|
707
616
|
width: 100%;
|
|
708
617
|
margin: 0 auto;
|
|
709
618
|
|
|
@@ -722,7 +631,7 @@ chat-root {
|
|
|
722
631
|
// margin: 0 10px 0 10px;
|
|
723
632
|
width: 35px;//40px;
|
|
724
633
|
height: 35px;//40px;
|
|
725
|
-
margin: 9px; //6px;
|
|
634
|
+
margin: 9px 0px; //6px;
|
|
726
635
|
padding: 0px;
|
|
727
636
|
border-radius: 8px;
|
|
728
637
|
|
|
@@ -774,7 +683,7 @@ chat-root {
|
|
|
774
683
|
}
|
|
775
684
|
.c21-body {
|
|
776
685
|
position: absolute;
|
|
777
|
-
top:
|
|
686
|
+
top: var(--chat-header-height);
|
|
778
687
|
bottom: 0;
|
|
779
688
|
left: 0;
|
|
780
689
|
right: 0;
|
package/src/app/app.component.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { AfterViewInit, Component, ElementRef, HostListener, NgZone, OnDestroy,
|
|
|
4
4
|
import { environment } from 'src/environments/environment';
|
|
5
5
|
import { Subscription } from 'rxjs/internal/Subscription';
|
|
6
6
|
import { v4 as uuidv4 } from 'uuid';
|
|
7
|
+
import { HEADER_MENU_OPTION } from './utils/constants';
|
|
7
8
|
//COMPONENTS
|
|
8
9
|
import { EyeeyeCatcherCardComponent } from './component/eyeeye-catcher-card/eyeeye-catcher-card.component';
|
|
9
10
|
//MODELS
|
|
@@ -66,7 +67,6 @@ interface MessageObj {
|
|
|
66
67
|
// providers: [AgentAvailabilityService, TranslatorService]
|
|
67
68
|
})
|
|
68
69
|
export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
69
|
-
|
|
70
70
|
|
|
71
71
|
// ========= begin:: sottoscrizioni ======= //
|
|
72
72
|
subscriptions: Subscription[] = []; /** */
|
|
@@ -100,6 +100,8 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
100
100
|
|
|
101
101
|
@ViewChild(EyeeyeCatcherCardComponent, { static: false }) eyeeyeCatcherCardComponent: EyeeyeCatcherCardComponent
|
|
102
102
|
styleMapConversation: Map<string, string> = new Map();
|
|
103
|
+
translationMap: Map<string, string> = new Map();
|
|
104
|
+
isButtonsDisabled: boolean = true;
|
|
103
105
|
marginBottom: number;
|
|
104
106
|
|
|
105
107
|
forceDisconnect: boolean = false;
|
|
@@ -129,7 +131,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
129
131
|
public imageRepoService: ImageRepoService,
|
|
130
132
|
public typingService: TypingService,
|
|
131
133
|
public presenceService: PresenceService,
|
|
132
|
-
public uploadService: UploadService
|
|
134
|
+
public uploadService: UploadService
|
|
133
135
|
){}
|
|
134
136
|
|
|
135
137
|
ngOnInit(): void {
|
|
@@ -139,6 +141,12 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
139
141
|
|
|
140
142
|
ngAfterViewInit(): void {
|
|
141
143
|
this.logger.info('[APP-CONF]---------------- ngAfterViewInit: APP.COMPONENT ---------------- ')
|
|
144
|
+
|
|
145
|
+
// Initialize translation map and enable buttons
|
|
146
|
+
const keys = ['MAXIMIZE', 'MINIMIZE', 'CENTER', 'BUTTON_CLOSE_TO_ICON'];
|
|
147
|
+
this.translationMap = this.translateService.translateLanguage(keys);
|
|
148
|
+
this.isButtonsDisabled = false;
|
|
149
|
+
|
|
142
150
|
this.ngZone.run(() => {
|
|
143
151
|
const that = this;
|
|
144
152
|
const subAddedConversation = this.conversationsHandlerService.conversationAdded.subscribe((conversation) => {
|
|
@@ -262,6 +270,14 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
262
270
|
this.tabTitle = this.g.windowContext.window.document.title
|
|
263
271
|
this.appStorageService.initialize(environment.storage_prefix, this.g.persistence, this.g.projectid)
|
|
264
272
|
|
|
273
|
+
//check if allowed to load
|
|
274
|
+
let canLoad = this.globalSettingsService.manageLoadingDomains();
|
|
275
|
+
if(!canLoad){
|
|
276
|
+
console.error('[Check canLoad] Widget is not able to load on this domain!!!')
|
|
277
|
+
this.hideWidget()
|
|
278
|
+
this.disposeWidget();
|
|
279
|
+
}
|
|
280
|
+
|
|
265
281
|
//set visibility
|
|
266
282
|
if((this.g.isMobile && !this.g.displayOnMobile) || (!this.g.isMobile && !this.g.displayOnDesktop)){
|
|
267
283
|
this.disposeWidget()
|
|
@@ -1980,6 +1996,43 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1980
1996
|
this.signOut();
|
|
1981
1997
|
}
|
|
1982
1998
|
|
|
1999
|
+
onMenuOptionClick(event: string) {
|
|
2000
|
+
this.logger.debug('[APP-COMP] onMenuOptionClick', event);
|
|
2001
|
+
switch(event) {
|
|
2002
|
+
case HEADER_MENU_OPTION.MAXIMIZE:
|
|
2003
|
+
this.onWidgetSizeChange('max');
|
|
2004
|
+
break;
|
|
2005
|
+
case HEADER_MENU_OPTION.MINIMIZE:
|
|
2006
|
+
this.onWidgetSizeChange('min');
|
|
2007
|
+
break;
|
|
2008
|
+
case HEADER_MENU_OPTION.TOP:
|
|
2009
|
+
this.onWidgetSizeChange('top');
|
|
2010
|
+
break;
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
onWidgetSizeChange(mode: 'min' | 'max' | 'top') {
|
|
2015
|
+
var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv');
|
|
2016
|
+
this.g.size = mode
|
|
2017
|
+
const parent = tiledeskDiv.parentElement as HTMLElement | null;
|
|
2018
|
+
if(mode==='max'){
|
|
2019
|
+
tiledeskDiv.classList.add('max-size')
|
|
2020
|
+
tiledeskDiv.classList.remove('min-size')
|
|
2021
|
+
tiledeskDiv.classList.remove('top-size')
|
|
2022
|
+
if(parent) parent.classList.remove('overlay--popup');
|
|
2023
|
+
} else if(mode==='min'){
|
|
2024
|
+
tiledeskDiv.classList.add('min-size')
|
|
2025
|
+
tiledeskDiv.classList.remove('max-size')
|
|
2026
|
+
tiledeskDiv.classList.remove('top-size')
|
|
2027
|
+
if(parent) parent.classList.remove('overlay--popup');
|
|
2028
|
+
} else if(mode=== 'top'){
|
|
2029
|
+
tiledeskDiv.classList.add('top-size')
|
|
2030
|
+
tiledeskDiv.classList.remove('max-size')
|
|
2031
|
+
tiledeskDiv.classList.remove('min-size')
|
|
2032
|
+
if(parent) parent.classList.add('overlay--popup');
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
|
|
1983
2036
|
/**
|
|
1984
2037
|
* MODAL RATING WIDGET:
|
|
1985
2038
|
* close modal page
|
|
@@ -2110,6 +2163,11 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
2110
2163
|
|
|
2111
2164
|
this.el.nativeElement.style.setProperty('--button-in-msg-background-color', this.g.bubbleSentBackground)
|
|
2112
2165
|
this.el.nativeElement.style.setProperty('--button-in-msg-font-size', this.g.buttonFontSize)
|
|
2166
|
+
this.el.nativeElement.style.setProperty('--font-size-bubble-message', this.g.fontSize)
|
|
2167
|
+
this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
|
|
2168
|
+
this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
|
|
2169
|
+
|
|
2170
|
+
this.el.nativeElement.style.setProperty('--chat-header-height', this.g.hideHeaderConversation? '0px': null)
|
|
2113
2171
|
}
|
|
2114
2172
|
|
|
2115
2173
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<!-- HEADER -->
|
|
10
10
|
<chat-conversation-header
|
|
11
|
+
*ngIf="!g?.hideHeaderConversation"
|
|
11
12
|
[idConversation]= "conversationWith"
|
|
12
13
|
[senderId]="senderId"
|
|
13
14
|
[soundEnabled]="g?.soundEnabled"
|
|
@@ -18,6 +19,8 @@
|
|
|
18
19
|
[hideHeaderConversationOptionsMenu]="g?.hideHeaderConversationOptionsMenu"
|
|
19
20
|
[hideSignOutOptionMenu]="(!g?.singleConversation || !g?.showLogoutOption)"
|
|
20
21
|
[hideChatDetailOptionMenu]="(!g?.isDevMode)"
|
|
22
|
+
[fullscreenMode]="g?.fullscreenMode"
|
|
23
|
+
[size]="g?.size"
|
|
21
24
|
[stylesMap]="stylesMap"
|
|
22
25
|
[translationMap]="translationMapHeader"
|
|
23
26
|
[widgetTitle]="g?.project?.widgetTitle"
|
|
@@ -135,8 +138,7 @@
|
|
|
135
138
|
(onAfterSendMessage)="onAfterSendMessageFN($event)"
|
|
136
139
|
(onChangeTextArea)="onChangeTextArea($event)"
|
|
137
140
|
(onAttachmentFileButtonClicked)="onAttachmentFileButtonClicked($event)"
|
|
138
|
-
(onNewConversationButtonClicked)="onNewConversationButtonClickedFN($event)"
|
|
139
|
-
(onBackButton)="onBackButton($event)">
|
|
141
|
+
(onNewConversationButtonClicked)="onNewConversationButtonClickedFN($event)">
|
|
140
142
|
</chat-conversation-footer>
|
|
141
143
|
|
|
142
144
|
</div>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// $f21ico-schedule: image-url('f21ico-schedule.svg', false, false);
|
|
2
2
|
// $f21ico-done: image-url('../assets/images/f21ico-done.svg', false, false);
|
|
3
3
|
// $f21ico-done_all: image-url('../assets/images/f21ico-done_all.svg', false, false);
|
|
4
|
-
// @import 'src/app/sass/variables';
|
|
5
|
-
// @import '../../../sass/normalize.css';
|
|
6
4
|
|
|
7
5
|
:host {
|
|
8
6
|
--themeColor: var(--bck-msg-sent);
|
|
@@ -60,7 +58,7 @@
|
|
|
60
58
|
font-weight: 500;
|
|
61
59
|
line-height: 22px;
|
|
62
60
|
|
|
63
|
-
font-family:
|
|
61
|
+
font-family: var(--font-family-powered-by);
|
|
64
62
|
letter-spacing: -0.24px;
|
|
65
63
|
-webkit-font-smoothing: antialiased;
|
|
66
64
|
|
|
@@ -91,16 +89,13 @@
|
|
|
91
89
|
left: 0px;
|
|
92
90
|
right: 0px;
|
|
93
91
|
margin: 0px;
|
|
92
|
+
margin: 12px 8px;
|
|
94
93
|
// padding: 0;
|
|
95
94
|
|
|
96
95
|
// box-shadow: 0 -1px 0px 0px $trasp-light-gray;
|
|
97
96
|
background: white;
|
|
98
97
|
min-height: 40px;
|
|
99
98
|
|
|
100
|
-
&.maximize-width{
|
|
101
|
-
padding: 8px 0px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
99
|
&.hideFooterReply{
|
|
105
100
|
padding: 0px;
|
|
106
101
|
}
|
|
@@ -186,4 +181,72 @@ dialog:-internal-dialog-in-top-layer{
|
|
|
186
181
|
}
|
|
187
182
|
}
|
|
188
183
|
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@media(min-width:688px){
|
|
187
|
+
|
|
188
|
+
#chat21-footer{
|
|
189
|
+
left: 20%;
|
|
190
|
+
right: 20%;
|
|
191
|
+
margin: 12px 0px 30px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
:host-context(#chat21-conversations.full-screen-mode){
|
|
195
|
+
--button-in-msg-padding: 10px 16px;
|
|
196
|
+
|
|
197
|
+
chat-conversation-content ::ng-deep{
|
|
198
|
+
.attachment_container,
|
|
199
|
+
.buttons-wrapper {
|
|
200
|
+
justify-content: flex-start;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.button-in-message{
|
|
204
|
+
padding: 14px 22px !important
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
chat-message-attachment {
|
|
208
|
+
margin: auto 20px auto 10px; //0 20px 4px 10px;
|
|
209
|
+
margin-left: calc( var(--avatar-width) + 10px )
|
|
210
|
+
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
chat-conversation-footer ::ng-deep {
|
|
218
|
+
.textarea-container {
|
|
219
|
+
padding: 8px 24px;
|
|
220
|
+
background-color: var(--chat-footer-background-color);
|
|
221
|
+
border-radius: 28px;
|
|
222
|
+
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
225
|
+
justify-content: space-between;
|
|
226
|
+
width: 100%;
|
|
227
|
+
padding: 0.75rem 1rem;
|
|
228
|
+
border: 0px solid #e5e7eb;
|
|
229
|
+
border-radius: 2rem;
|
|
230
|
+
background-color: #ffffff;
|
|
231
|
+
box-shadow: 0px 4px 4px 0px var(--tw-shadow-color, var(--shadow-color-1, #0000000a)), 0px 0px 1px 0px var(--tw-shadow-color, var(--shadow-color-2, #0000009e));
|
|
232
|
+
transition: border-color 0.2s
|
|
233
|
+
ease, box-shadow 0.2s
|
|
234
|
+
ease;
|
|
235
|
+
|
|
236
|
+
.visible-text-area {
|
|
237
|
+
background-color: #ffffff;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
#hiddenFooter,
|
|
241
|
+
#emoji-mart-container {
|
|
242
|
+
bottom: calc(100% + 6px);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
::ng-deep .chat21-sheet-content{
|
|
249
|
+
bottom: calc(var(--chat-footer-logo-height) + var(--chat-footer-height) + 34px)!important;
|
|
250
|
+
}
|
|
251
|
+
|
|
189
252
|
}
|