@chat21/chat21-web-widget 5.1.0-rc20 → 5.1.0-rc21
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 +3 -0
- package/package.json +1 -1
- package/src/app/app.component.ts +2 -0
- package/src/app/component/conversation-detail/conversation/conversation.component.scss +1 -1
- package/src/app/component/conversation-detail/conversation/conversation.component.ts +6 -0
- package/src/app/component/conversation-detail/conversation-footer/conversation-footer.component.scss +1 -1
- package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts +2 -2
- package/src/app/component/home/home.component.scss +1 -1
- package/src/app/component/message/buttons/action-button/action-button.component.scss +1 -1
- package/src/app/component/message/buttons/link-button/link-button.component.scss +1 -1
- package/src/app/component/message/buttons/text-button/text-button.component.scss +1 -1
- package/src/app/providers/global-settings.service.ts +9 -9
- package/src/app/sass/_variables.scss +3 -1
- package/src/assets/twp/index-dev.html +21 -13
- package/src/iframe-style.css +14 -31
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
### **Copyrigth**:
|
|
7
7
|
*Tiledesk SRL*
|
|
8
8
|
|
|
9
|
+
# 5.1.0-rc21
|
|
10
|
+
- **bug-fixed**: shadow is visible while decrease widget size
|
|
11
|
+
|
|
9
12
|
# 5.1.0-rc20
|
|
10
13
|
- **added**: fontFamilySource settings variable
|
|
11
14
|
- **added**: --font-family-bubble-message as variable to manage custom font
|
package/package.json
CHANGED
package/src/app/app.component.ts
CHANGED
|
@@ -2120,6 +2120,8 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
2120
2120
|
this.el.nativeElement.style.setProperty('--button-in-msg-font-size', this.g.buttonFontSize)
|
|
2121
2121
|
this.el.nativeElement.style.setProperty('--font-size-bubble-message', this.g.fontSize)
|
|
2122
2122
|
this.el.nativeElement.style.setProperty('--font-family-bubble-message', this.g.fontFamily)
|
|
2123
|
+
this.el.nativeElement.style.setProperty('--button-in-msg-font-family', this.g.fontFamily)
|
|
2124
|
+
|
|
2123
2125
|
|
|
2124
2126
|
}
|
|
2125
2127
|
|
|
@@ -1018,6 +1018,12 @@ export class ConversationComponent implements OnInit, AfterViewInit, OnChanges {
|
|
|
1018
1018
|
/** CALLED BY: conv-header component */
|
|
1019
1019
|
onCloseWidgetFN() {
|
|
1020
1020
|
//this.g.setParameter('activeConversation', null, false);
|
|
1021
|
+
/** remove Min/Max/fullscreen css classes */
|
|
1022
|
+
var tiledeskDiv = this.g.windowContext.window.document.getElementById('tiledeskdiv')
|
|
1023
|
+
tiledeskDiv.classList.remove('increaseSize')
|
|
1024
|
+
tiledeskDiv.classList.remove('decreaseSize')
|
|
1025
|
+
tiledeskDiv.classList.remove('fullscreen')
|
|
1026
|
+
|
|
1021
1027
|
this.onCloseWidget.emit();
|
|
1022
1028
|
}
|
|
1023
1029
|
/** CALLED BY: conv-header component */
|
package/src/app/component/conversation-detail/conversation-header/conversation-header.component.ts
CHANGED
|
@@ -58,8 +58,8 @@ export class ConversationHeaderComponent implements OnInit, OnChanges {
|
|
|
58
58
|
private API_URL: string;
|
|
59
59
|
private logger: LoggerService = LoggerInstance.getInstance()
|
|
60
60
|
constructor(
|
|
61
|
-
public
|
|
62
|
-
|
|
61
|
+
public appConfigService: AppConfigService
|
|
62
|
+
) {
|
|
63
63
|
this.API_URL = this.appConfigService.getConfig().apiUrl;
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -387,20 +387,20 @@ export class GlobalSettingsService {
|
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
389
|
loadFont(family: string, href: string,) {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
390
|
+
const mainFont = family.split(",")[0].replace(/['"]/g, "").trim(); // es. "Montserrat"
|
|
391
|
+
|
|
392
|
+
if (document.querySelector(`link[data-font='${mainFont}']`)) {
|
|
393
|
+
return;
|
|
393
394
|
}
|
|
394
|
-
|
|
395
|
+
|
|
395
396
|
const link = document.createElement('link');
|
|
396
397
|
link.rel = 'stylesheet';
|
|
397
398
|
link.href = href;
|
|
398
|
-
link.setAttribute('data-font',
|
|
399
|
+
link.setAttribute('data-font', mainFont); // marker pulito
|
|
399
400
|
document.head.appendChild(link);
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
401
|
+
|
|
402
|
+
document.documentElement.style.setProperty('--font-family', family);
|
|
403
|
+
}
|
|
404
404
|
/**
|
|
405
405
|
* A: setVariablesFromService
|
|
406
406
|
*/
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
--border-radius-bubble-message: 20px;
|
|
22
22
|
--button-in-msg-font-size: 15px;
|
|
23
|
+
--button-in-msg-font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
|
|
23
24
|
--button-in-msg-max-width: 280px;
|
|
24
25
|
|
|
25
26
|
--max-width-images: 230px; //change also MAX_WIDTH_IMAGES in constants.ts
|
|
@@ -41,9 +42,10 @@
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
44
|
-
--font-family: Mulish, sans-serif;
|
|
45
|
+
--font-family: 'Roboto','Google Sans', Helvetica, Arial, sans-serif; //Mulish, sans-serif;
|
|
45
46
|
--font-family-bubble-message: 'Roboto','Google Sans', Helvetica, Arial, sans-serif;
|
|
46
47
|
--font-family-callout: 'Helvetica Neue', 'Apple Color Emoji', Helvetica, Arial, sans-serif;
|
|
48
|
+
--font-family-powered-by: Mulish, sans-serif;
|
|
47
49
|
|
|
48
50
|
--font-size-bubble-message: 1.4em
|
|
49
51
|
|
|
@@ -1361,9 +1361,6 @@
|
|
|
1361
1361
|
window.Tiledesk('restart')
|
|
1362
1362
|
}
|
|
1363
1363
|
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
1364
|
function onClickFontSize(){
|
|
1368
1365
|
let text = document.getElementById('fontSize').value
|
|
1369
1366
|
text === ""? text= '1.4em': text
|
|
@@ -1372,6 +1369,17 @@
|
|
|
1372
1369
|
window.Tiledesk('restart')
|
|
1373
1370
|
}
|
|
1374
1371
|
|
|
1372
|
+
function onClickFontFamily(){
|
|
1373
|
+
let text = document.getElementById('fontFamily').value
|
|
1374
|
+
window.tiledeskSettings['fontFamily'] = text
|
|
1375
|
+
|
|
1376
|
+
let source = document.getElementById('fontFamilySource').value
|
|
1377
|
+
// text === ""? text= '1.4em': text
|
|
1378
|
+
window.tiledeskSettings['fontFamilySource'] = source
|
|
1379
|
+
|
|
1380
|
+
console.log('onClickFontFamily:',window.tiledeskSettings);
|
|
1381
|
+
window.Tiledesk('restart')
|
|
1382
|
+
}
|
|
1375
1383
|
|
|
1376
1384
|
function onClickButtonFontSize(){
|
|
1377
1385
|
let text = document.getElementById('buttonFontSize').value
|
|
@@ -1383,16 +1391,6 @@
|
|
|
1383
1391
|
|
|
1384
1392
|
|
|
1385
1393
|
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
1394
|
|
|
1397
1395
|
function onClickTestAll(){
|
|
1398
1396
|
inputs = document.getElementsByTagName('input');
|
|
@@ -2455,6 +2453,16 @@
|
|
|
2455
2453
|
<button class="btn btn-light" onclick="onClickFontSize()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
|
|
2456
2454
|
</div>
|
|
2457
2455
|
</div>
|
|
2456
|
+
<div class="row">
|
|
2457
|
+
<div class="col-md-5 formElement"><span><em><strong>fontFamily</strong></em></span></div>
|
|
2458
|
+
<div class="col-md-5 formElement">
|
|
2459
|
+
<input class="form-control col-sm-2" type="text" id="fontFamily" name="fontFamily" placeholder="Family">
|
|
2460
|
+
<input class="form-control col-sm-2" type="text" id="fontFamilySource" name="fontFamilySource" placeholder="Source">
|
|
2461
|
+
</div>
|
|
2462
|
+
<div class="col-md-2">
|
|
2463
|
+
<button class="btn btn-light" onclick="onClickFontFamily()">Test this setting <i class="fa fa-magic" aria-hidden="true"></i></button>
|
|
2464
|
+
</div>
|
|
2465
|
+
</div>
|
|
2458
2466
|
|
|
2459
2467
|
|
|
2460
2468
|
<div><h3 style="line-height: 0.3;">MANAGE <em><strong>BUTTON STYLES</strong></em></h3></div>
|
package/src/iframe-style.css
CHANGED
|
@@ -34,27 +34,10 @@
|
|
|
34
34
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
#tiledeskdiv.decreaseSize {
|
|
38
|
-
/* transition: width 1s, height 1s; */
|
|
39
|
-
transition: all 1s ease-out;
|
|
40
|
-
width: var(--iframeMinWidth);
|
|
41
|
-
height: var(--iframeMinHeight);
|
|
42
|
-
/* animation: right-animate 1s ease infinite alternate; */
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#tiledeskdiv.increaseSize {
|
|
47
|
-
/* transition: width 1s, height 1s; */
|
|
48
|
-
transition: all 3s ease-in;
|
|
49
|
-
width: var(--iframeMaxWidth);
|
|
50
|
-
height: var(--iframeMaxHeight);
|
|
51
|
-
/* animation: right-animate 1s ease infinite alternate; */
|
|
52
|
-
|
|
53
|
-
}
|
|
54
37
|
|
|
55
38
|
#tiledeskdiv.fullscreen {
|
|
56
39
|
/* transition: width 1s, height 1s; */
|
|
57
|
-
transition: all
|
|
40
|
+
/* transition: all 0.5s ease-in !important; */
|
|
58
41
|
right: 0px;
|
|
59
42
|
left: 0px;
|
|
60
43
|
top: 0px;
|
|
@@ -110,30 +93,30 @@
|
|
|
110
93
|
#tiledesk-container.open #tiledeskiframe {
|
|
111
94
|
display: block;
|
|
112
95
|
/*width: 376px;*/
|
|
113
|
-
/* -webkit-animation: fade-in-shadow 0.4s ease-in 0.0s both;
|
|
114
|
-
animation: fade-in-shadow 0.4s ease-in 0.0s both; */
|
|
115
|
-
/* border-radius: 16px; */
|
|
116
|
-
/* box-shadow: rgba(0, 18, 46, 0.16) 0px 8px 36px 0px; */
|
|
117
|
-
/* margin: 10px; */
|
|
118
96
|
}
|
|
119
97
|
#tiledesk-container.open #tiledeskdiv.shadow {
|
|
120
98
|
transition: box-shadow 0.8s ease-in;
|
|
121
99
|
box-shadow: rgba(0, 0, 0, 0.16) 0px 8px 36px 0px; /*NEW GAB*/
|
|
122
100
|
}
|
|
123
|
-
|
|
124
|
-
0% { box-shadow: rgba(0, 0, 0, 0.0) 0 0 0px; }
|
|
125
|
-
100% { box-shadow: rgba(0, 0, 0, 0.1) 0 0 6px; }
|
|
126
|
-
}
|
|
127
|
-
@keyframes sk-bouncedelay {
|
|
128
|
-
0% { box-shadow: rgba(0, 0, 0, 0.0) 0 0 0px; }
|
|
129
|
-
100% { box-shadow: rgba(0, 0, 0, 0.1) 0 0 6px; }
|
|
130
|
-
} */
|
|
101
|
+
|
|
131
102
|
|
|
132
103
|
#tiledesk-container.closed #tiledeskiframe {
|
|
133
104
|
display: block;
|
|
134
105
|
box-shadow: none;
|
|
135
106
|
}
|
|
136
107
|
|
|
108
|
+
#tiledesk-container.open #tiledeskdiv.decreaseSize {
|
|
109
|
+
transition: all 0.5s ease-in;
|
|
110
|
+
width: var(--iframeMinWidth);
|
|
111
|
+
height: var(--iframeMinHeight);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
#tiledesk-container.open #tiledeskdiv.increaseSize {
|
|
115
|
+
/* transition: width 1s, height 1s; */
|
|
116
|
+
transition: all 0.5s ease-in;
|
|
117
|
+
width: var(--iframeMaxWidth);
|
|
118
|
+
height: var(--iframeMaxHeight);
|
|
119
|
+
}
|
|
137
120
|
|
|
138
121
|
#tiledeskiframe .full-screen-mode {
|
|
139
122
|
width: 100%;
|