@product7/feedback-sdk 1.1.4 → 1.1.6
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/README.md +20 -16
- package/dist/README.md +20 -16
- package/dist/feedback-sdk.js +392 -410
- 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 +14 -11
- package/src/core/FeedbackSDK.js +28 -11
- package/src/docs/api.md +46 -12
- package/src/docs/example.md +33 -31
- package/src/docs/installation.md +50 -41
- package/src/index.js +5 -2
- package/src/styles/styles.js +82 -226
- package/src/widgets/BaseWidget.js +37 -31
- package/src/widgets/ButtonWidget.js +10 -8
- package/src/widgets/SurveyWidget.js +221 -126
- package/types/index.d.ts +67 -62
package/README.md
CHANGED
|
@@ -110,11 +110,11 @@ widget.mount();
|
|
|
110
110
|
```javascript
|
|
111
111
|
const widget = feedback.createWidget('button', {
|
|
112
112
|
position: 'bottom-right',
|
|
113
|
-
displayMode: 'modal',
|
|
113
|
+
displayMode: 'modal',
|
|
114
114
|
size: 'large',
|
|
115
115
|
backgroundColor: '#ffffff',
|
|
116
116
|
textColor: '#1F2937',
|
|
117
|
-
primaryColor: '#
|
|
117
|
+
primaryColor: '#21244A',
|
|
118
118
|
});
|
|
119
119
|
widget.mount();
|
|
120
120
|
```
|
|
@@ -132,24 +132,24 @@ inline.mount('#feedback-container');
|
|
|
132
132
|
|
|
133
133
|
### SDK Configuration
|
|
134
134
|
|
|
135
|
-
| Option | Type | Required | Default
|
|
136
|
-
| ------------- | ------- | -------- |
|
|
137
|
-
| `workspace` | string | ✅ | -
|
|
138
|
-
| `boardId` | string | ❌ | 'general'
|
|
139
|
-
| `userContext` | object | ❌ | null
|
|
140
|
-
| `mock` | boolean | ❌ | false
|
|
141
|
-
| `debug` | boolean | ❌ | false
|
|
135
|
+
| Option | Type | Required | Default | Description |
|
|
136
|
+
| ------------- | ------- | -------- | --------- | -------------------------------- |
|
|
137
|
+
| `workspace` | string | ✅ | - | Your workspace subdomain |
|
|
138
|
+
| `boardId` | string | ❌ | 'general' | Target board for feedback |
|
|
139
|
+
| `userContext` | object | ❌ | null | User identification data |
|
|
140
|
+
| `mock` | boolean | ❌ | false | Enable mock mode for development |
|
|
141
|
+
| `debug` | boolean | ❌ | false | Enable debug logging |
|
|
142
142
|
|
|
143
143
|
### Widget Configuration
|
|
144
144
|
|
|
145
|
-
| Option | Type | Default | Description
|
|
146
|
-
| ----------------- | ------ | -------------- |
|
|
145
|
+
| Option | Type | Default | Description |
|
|
146
|
+
| ----------------- | ------ | -------------- | ---------------------------------------------- |
|
|
147
147
|
| `displayMode` | string | 'panel' | `'panel'` (side slide) or `'modal'` (centered) |
|
|
148
|
-
| `size` | string | 'medium' | `'small'`, `'medium'`, or `'large'`
|
|
149
|
-
| `position` | string | 'bottom-right' | Button position (see below)
|
|
150
|
-
| `backgroundColor` | string | '#ffffff' | Panel/modal background color
|
|
151
|
-
| `textColor` | string | '#1F2937' | Text color
|
|
152
|
-
| `primaryColor` | string | '#
|
|
148
|
+
| `size` | string | 'medium' | `'small'`, `'medium'`, or `'large'` |
|
|
149
|
+
| `position` | string | 'bottom-right' | Button position (see below) |
|
|
150
|
+
| `backgroundColor` | string | '#ffffff' | Panel/modal background color |
|
|
151
|
+
| `textColor` | string | '#1F2937' | Text color |
|
|
152
|
+
| `primaryColor` | string | ''#21244A | Button and accent color |
|
|
153
153
|
|
|
154
154
|
### Position Options
|
|
155
155
|
|
|
@@ -185,6 +185,7 @@ const widget = feedback.createWidget('button', {
|
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
This approach works better than predefined themes because:
|
|
188
|
+
|
|
188
189
|
- Supports any brand color
|
|
189
190
|
- Works with both light and dark designs
|
|
190
191
|
- No restrictions on color combinations
|
|
@@ -229,6 +230,7 @@ window.FeedbackSDKConfig = {
|
|
|
229
230
|
```
|
|
230
231
|
|
|
231
232
|
Mock mode simulates:
|
|
233
|
+
|
|
232
234
|
- Session initialization
|
|
233
235
|
- Feedback submission (with 500ms delay)
|
|
234
236
|
- Default configuration values
|
|
@@ -249,6 +251,7 @@ const feedback = new FeedbackSDK({
|
|
|
249
251
|
```
|
|
250
252
|
|
|
251
253
|
**API URLs:**
|
|
254
|
+
|
|
252
255
|
- `https://api.product7.io/api/v1`
|
|
253
256
|
- `https://{workspace}.api.product7.io/api/v1`
|
|
254
257
|
|
|
@@ -262,6 +265,7 @@ const feedback = new FeedbackSDK({
|
|
|
262
265
|
```
|
|
263
266
|
|
|
264
267
|
**API URLs:**
|
|
268
|
+
|
|
265
269
|
- `https://staging.api.product7.io/api/v1`
|
|
266
270
|
- `https://{workspace}.staging.api.product7.io/api/v1`
|
|
267
271
|
|
package/dist/README.md
CHANGED
|
@@ -110,11 +110,11 @@ widget.mount();
|
|
|
110
110
|
```javascript
|
|
111
111
|
const widget = feedback.createWidget('button', {
|
|
112
112
|
position: 'bottom-right',
|
|
113
|
-
displayMode: 'modal',
|
|
113
|
+
displayMode: 'modal',
|
|
114
114
|
size: 'large',
|
|
115
115
|
backgroundColor: '#ffffff',
|
|
116
116
|
textColor: '#1F2937',
|
|
117
|
-
primaryColor: '#
|
|
117
|
+
primaryColor: '#21244A',
|
|
118
118
|
});
|
|
119
119
|
widget.mount();
|
|
120
120
|
```
|
|
@@ -132,24 +132,24 @@ inline.mount('#feedback-container');
|
|
|
132
132
|
|
|
133
133
|
### SDK Configuration
|
|
134
134
|
|
|
135
|
-
| Option | Type | Required | Default
|
|
136
|
-
| ------------- | ------- | -------- |
|
|
137
|
-
| `workspace` | string | ✅ | -
|
|
138
|
-
| `boardId` | string | ❌ | 'general'
|
|
139
|
-
| `userContext` | object | ❌ | null
|
|
140
|
-
| `mock` | boolean | ❌ | false
|
|
141
|
-
| `debug` | boolean | ❌ | false
|
|
135
|
+
| Option | Type | Required | Default | Description |
|
|
136
|
+
| ------------- | ------- | -------- | --------- | -------------------------------- |
|
|
137
|
+
| `workspace` | string | ✅ | - | Your workspace subdomain |
|
|
138
|
+
| `boardId` | string | ❌ | 'general' | Target board for feedback |
|
|
139
|
+
| `userContext` | object | ❌ | null | User identification data |
|
|
140
|
+
| `mock` | boolean | ❌ | false | Enable mock mode for development |
|
|
141
|
+
| `debug` | boolean | ❌ | false | Enable debug logging |
|
|
142
142
|
|
|
143
143
|
### Widget Configuration
|
|
144
144
|
|
|
145
|
-
| Option | Type | Default | Description
|
|
146
|
-
| ----------------- | ------ | -------------- |
|
|
145
|
+
| Option | Type | Default | Description |
|
|
146
|
+
| ----------------- | ------ | -------------- | ---------------------------------------------- |
|
|
147
147
|
| `displayMode` | string | 'panel' | `'panel'` (side slide) or `'modal'` (centered) |
|
|
148
|
-
| `size` | string | 'medium' | `'small'`, `'medium'`, or `'large'`
|
|
149
|
-
| `position` | string | 'bottom-right' | Button position (see below)
|
|
150
|
-
| `backgroundColor` | string | '#ffffff' | Panel/modal background color
|
|
151
|
-
| `textColor` | string | '#1F2937' | Text color
|
|
152
|
-
| `primaryColor` | string | '#
|
|
148
|
+
| `size` | string | 'medium' | `'small'`, `'medium'`, or `'large'` |
|
|
149
|
+
| `position` | string | 'bottom-right' | Button position (see below) |
|
|
150
|
+
| `backgroundColor` | string | '#ffffff' | Panel/modal background color |
|
|
151
|
+
| `textColor` | string | '#1F2937' | Text color |
|
|
152
|
+
| `primaryColor` | string | ''#21244A | Button and accent color |
|
|
153
153
|
|
|
154
154
|
### Position Options
|
|
155
155
|
|
|
@@ -185,6 +185,7 @@ const widget = feedback.createWidget('button', {
|
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
This approach works better than predefined themes because:
|
|
188
|
+
|
|
188
189
|
- Supports any brand color
|
|
189
190
|
- Works with both light and dark designs
|
|
190
191
|
- No restrictions on color combinations
|
|
@@ -229,6 +230,7 @@ window.FeedbackSDKConfig = {
|
|
|
229
230
|
```
|
|
230
231
|
|
|
231
232
|
Mock mode simulates:
|
|
233
|
+
|
|
232
234
|
- Session initialization
|
|
233
235
|
- Feedback submission (with 500ms delay)
|
|
234
236
|
- Default configuration values
|
|
@@ -249,6 +251,7 @@ const feedback = new FeedbackSDK({
|
|
|
249
251
|
```
|
|
250
252
|
|
|
251
253
|
**API URLs:**
|
|
254
|
+
|
|
252
255
|
- `https://api.product7.io/api/v1`
|
|
253
256
|
- `https://{workspace}.api.product7.io/api/v1`
|
|
254
257
|
|
|
@@ -262,6 +265,7 @@ const feedback = new FeedbackSDK({
|
|
|
262
265
|
```
|
|
263
266
|
|
|
264
267
|
**API URLs:**
|
|
268
|
+
|
|
265
269
|
- `https://staging.api.product7.io/api/v1`
|
|
266
270
|
- `https://{workspace}.staging.api.product7.io/api/v1`
|
|
267
271
|
|