@product7/feedback-sdk 1.0.7 → 1.0.9
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 +23 -40
- package/dist/feedback-sdk.js.map +1 -1
- package/dist/feedback-sdk.min.js +1 -1
- package/dist/feedback-sdk.min.js.map +1 -1
- package/package.json +1 -1
- package/src/core/APIService.js +2 -2
- package/src/docs/example.md +1 -1
- package/src/styles/styles.js +15 -24
- package/src/widgets/ButtonWidget.js +6 -14
package/dist/feedback-sdk.js
CHANGED
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
if (config.apiUrl) {
|
|
90
90
|
this.baseURL = config.apiUrl;
|
|
91
91
|
} else if (this.workspace) {
|
|
92
|
-
this.baseURL = `https://${this.workspace}.api.
|
|
92
|
+
this.baseURL = `https://${this.workspace}.staging.api.product7.io/api/v1`;
|
|
93
93
|
} else {
|
|
94
|
-
this.baseURL = 'https://api.
|
|
94
|
+
this.baseURL = 'https://staging.api.product7.io/api/v1';
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
this._loadStoredSession();
|
|
@@ -970,12 +970,10 @@
|
|
|
970
970
|
const button = document.createElement('div');
|
|
971
971
|
button.className = `feedback-widget feedback-widget-button theme-${this.options.theme} position-${this.options.position}`;
|
|
972
972
|
button.innerHTML = `
|
|
973
|
-
<button class="feedback-trigger-btn" type="button">
|
|
974
|
-
<svg width="
|
|
975
|
-
<path d="
|
|
976
|
-
<path d="M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"/>
|
|
973
|
+
<button class="feedback-trigger-btn" type="button" aria-label="Send feedback">
|
|
974
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
975
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/>
|
|
977
976
|
</svg>
|
|
978
|
-
Feedback
|
|
979
977
|
</button>
|
|
980
978
|
`;
|
|
981
979
|
|
|
@@ -992,23 +990,17 @@
|
|
|
992
990
|
|
|
993
991
|
button.addEventListener('mouseenter', () => {
|
|
994
992
|
if (!this.state.isSubmitting) {
|
|
995
|
-
button.style.transform = '
|
|
993
|
+
button.style.transform = 'scale(1.1)';
|
|
996
994
|
}
|
|
997
995
|
});
|
|
998
996
|
|
|
999
997
|
button.addEventListener('mouseleave', () => {
|
|
1000
|
-
button.style.transform = '
|
|
998
|
+
button.style.transform = 'scale(1)';
|
|
1001
999
|
});
|
|
1002
1000
|
}
|
|
1003
1001
|
|
|
1004
1002
|
updateText(text) {
|
|
1005
|
-
|
|
1006
|
-
if (button) {
|
|
1007
|
-
const textNode = button.childNodes[button.childNodes.length - 1];
|
|
1008
|
-
if (textNode && textNode.nodeType === Node.TEXT_NODE) {
|
|
1009
|
-
textNode.textContent = text;
|
|
1010
|
-
}
|
|
1011
|
-
}
|
|
1003
|
+
console.warn('ButtonWidget: Text display is disabled for circular design');
|
|
1012
1004
|
}
|
|
1013
1005
|
|
|
1014
1006
|
updatePosition(position) {
|
|
@@ -1574,40 +1566,31 @@
|
|
|
1574
1566
|
left: 20px;
|
|
1575
1567
|
}
|
|
1576
1568
|
|
|
1569
|
+
/* Circular button design */
|
|
1577
1570
|
.feedback-trigger-btn {
|
|
1578
|
-
|
|
1571
|
+
width: 56px;
|
|
1572
|
+
height: 56px;
|
|
1573
|
+
border-radius: 50%; /* Makes it circular */
|
|
1574
|
+
border: none;
|
|
1575
|
+
cursor: pointer;
|
|
1579
1576
|
display: flex;
|
|
1580
1577
|
align-items: center;
|
|
1581
1578
|
justify-content: center;
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
border-radius: 0.5rem;
|
|
1586
|
-
border: none;
|
|
1587
|
-
padding: 10px 16px;
|
|
1588
|
-
font-size: 14px;
|
|
1589
|
-
font-weight: 500;
|
|
1590
|
-
font-family: inherit;
|
|
1591
|
-
cursor: pointer;
|
|
1592
|
-
transition: all 0.3s ease;
|
|
1593
|
-
color: white;
|
|
1594
|
-
background: #155EEF;
|
|
1595
|
-
box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
|
|
1579
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1580
|
+
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1581
|
+
padding: 0;
|
|
1596
1582
|
}
|
|
1597
1583
|
|
|
1598
|
-
.feedback-trigger-btn:hover
|
|
1599
|
-
|
|
1600
|
-
box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.1);
|
|
1584
|
+
.feedback-trigger-btn:hover {
|
|
1585
|
+
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
|
|
1601
1586
|
}
|
|
1602
1587
|
|
|
1603
|
-
.feedback-trigger-btn:
|
|
1604
|
-
|
|
1605
|
-
cursor: not-allowed;
|
|
1588
|
+
.feedback-trigger-btn:active {
|
|
1589
|
+
transform: scale(0.95);
|
|
1606
1590
|
}
|
|
1607
1591
|
|
|
1608
|
-
.feedback-trigger-btn
|
|
1609
|
-
|
|
1610
|
-
outline-offset: 2px;
|
|
1592
|
+
.feedback-trigger-btn svg {
|
|
1593
|
+
flex-shrink: 0;
|
|
1611
1594
|
}
|
|
1612
1595
|
|
|
1613
1596
|
/* Side Panel Styles */
|