@product7/feedback-sdk 1.2.1 → 1.2.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/dist/feedback-sdk.js
CHANGED
|
@@ -1371,13 +1371,13 @@
|
|
|
1371
1371
|
<span class="feedback-text">Feedback</span>
|
|
1372
1372
|
|
|
1373
1373
|
<div class="feedback-minimize-icon">
|
|
1374
|
-
<svg viewBox="0 0 256 256"
|
|
1374
|
+
<svg viewBox="0 0 256 256">
|
|
1375
1375
|
<path d="M213.66,53.66,163.31,104H192a8,8,0,0,1,0,16H144a8,8,0,0,1-8-8V64a8,8,0,0,1,16,0V92.69l50.34-50.35a8,8,0,0,1,11.32,11.32ZM112,136H64a8,8,0,0,0,0,16H92.69L42.34,202.34a8,8,0,0,0,11.32,11.32L104,163.31V192a8,8,0,0,0,16,0V144A8,8,0,0,0,112,136Z"/>
|
|
1376
1376
|
</svg>
|
|
1377
1377
|
</div>
|
|
1378
1378
|
|
|
1379
1379
|
<div class="feedback-expand-icon">
|
|
1380
|
-
<svg viewBox="0 0 256 256"
|
|
1380
|
+
<svg viewBox="0 0 256 256">
|
|
1381
1381
|
<path d="M112,40V64.69L61.66,14.34A8,8,0,0,0,50.34,25.66L100.69,76H72a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V36A8,8,0,0,0,112,40Zm131.06,70.61a8,8,0,0,0-8.72,1.73L184,162.69V136a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8h48a8,8,0,0,0,0-16H195.31l50.35-50.34A8,8,0,0,0,243.06,110.61Z"/>
|
|
1382
1382
|
</svg>
|
|
1383
1383
|
</div>
|
|
@@ -1393,26 +1393,26 @@
|
|
|
1393
1393
|
|
|
1394
1394
|
_attachEvents() {
|
|
1395
1395
|
const button = this.element.querySelector('.feedback-trigger-btn');
|
|
1396
|
-
|
|
1397
|
-
|
|
1396
|
+
this.element.querySelector('.feedback-minimize-icon');
|
|
1397
|
+
this.element.querySelector('.feedback-expand-icon');
|
|
1398
1398
|
|
|
1399
1399
|
button.addEventListener('click', (e) => {
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1400
|
+
const clickedMinimize = e.target.closest('.feedback-minimize-icon');
|
|
1401
|
+
const clickedExpand = e.target.closest('.feedback-expand-icon');
|
|
1402
|
+
|
|
1403
|
+
if (clickedMinimize) {
|
|
1404
|
+
e.stopPropagation();
|
|
1405
|
+
this.minimize();
|
|
1406
|
+
} else if (clickedExpand) {
|
|
1407
|
+
e.stopPropagation();
|
|
1408
|
+
this.restore();
|
|
1409
|
+
} else {
|
|
1410
|
+
if (!this.isMinimized) {
|
|
1411
|
+
this.openPanel();
|
|
1412
|
+
}
|
|
1403
1413
|
}
|
|
1404
1414
|
});
|
|
1405
1415
|
|
|
1406
|
-
minimizeIcon.addEventListener('click', (e) => {
|
|
1407
|
-
e.stopPropagation();
|
|
1408
|
-
this.minimize();
|
|
1409
|
-
});
|
|
1410
|
-
|
|
1411
|
-
expandIcon.addEventListener('click', (e) => {
|
|
1412
|
-
e.stopPropagation();
|
|
1413
|
-
this.restore();
|
|
1414
|
-
});
|
|
1415
|
-
|
|
1416
1416
|
button.addEventListener('mouseenter', () => {
|
|
1417
1417
|
if (!this.state.isSubmitting && !this.isMinimized) {
|
|
1418
1418
|
button.style.transform = 'translateY(-2px)';
|
|
@@ -1420,7 +1420,9 @@
|
|
|
1420
1420
|
});
|
|
1421
1421
|
|
|
1422
1422
|
button.addEventListener('mouseleave', () => {
|
|
1423
|
-
|
|
1423
|
+
if (!this.isMinimized) {
|
|
1424
|
+
button.style.transform = 'translateY(0)';
|
|
1425
|
+
}
|
|
1424
1426
|
});
|
|
1425
1427
|
}
|
|
1426
1428
|
|