@product7/feedback-sdk 1.2.6 → 1.2.8
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 +35 -35
- package/dist/README.md +35 -35
- package/dist/feedback-sdk.js +717 -663
- 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 +66 -41
- package/src/core/FeedbackSDK.js +5 -3
- package/src/core/WebSocketService.js +3 -1
- package/src/widgets/BaseWidget.js +6 -4
- package/src/widgets/ChangelogWidget.js +0 -5
- package/src/widgets/MessengerWidget.js +22 -7
- package/src/widgets/messenger/views/ChatView.js +12 -4
- package/src/widgets/messenger/views/HomeView.js +7 -2
- package/types/index.d.ts +49 -0
package/README.md
CHANGED
|
@@ -149,15 +149,15 @@ messenger.mount();
|
|
|
149
149
|
|
|
150
150
|
### SDK Configuration
|
|
151
151
|
|
|
152
|
-
| Option | Type | Required | Default
|
|
153
|
-
| ------------- | ------- | -------- |
|
|
154
|
-
| `workspace` | string | ✅ | -
|
|
155
|
-
| `boardId` | string | ❌ | 'general'
|
|
156
|
-
| `userContext` | object | ❌ | null
|
|
157
|
-
| `mock` | boolean | ❌ | false
|
|
158
|
-
| `debug` | boolean | ❌ | false
|
|
159
|
-
| `env` | string | ❌ | auto-detect
|
|
160
|
-
| `apiUrl` | string | ❌ | null
|
|
152
|
+
| Option | Type | Required | Default | Description |
|
|
153
|
+
| ------------- | ------- | -------- | ----------- | -------------------------------------- |
|
|
154
|
+
| `workspace` | string | ✅ | - | Your workspace subdomain |
|
|
155
|
+
| `boardId` | string | ❌ | 'general' | Target board for feedback |
|
|
156
|
+
| `userContext` | object | ❌ | null | User identification data |
|
|
157
|
+
| `mock` | boolean | ❌ | false | Enable mock mode for development |
|
|
158
|
+
| `debug` | boolean | ❌ | false | Enable debug logging |
|
|
159
|
+
| `env` | string | ❌ | auto-detect | Environment: 'production' or 'staging' |
|
|
160
|
+
| `apiUrl` | string | ❌ | null | Custom API URL (overrides env) |
|
|
161
161
|
|
|
162
162
|
### Widget Configuration
|
|
163
163
|
|
|
@@ -433,32 +433,32 @@ messenger.mount();
|
|
|
433
433
|
|
|
434
434
|
### Messenger Configuration Options
|
|
435
435
|
|
|
436
|
-
| Option | Type | Default
|
|
437
|
-
| ------------------ | -------- |
|
|
438
|
-
| `position` | string | 'bottom-right'
|
|
439
|
-
| `theme` | string | 'light'
|
|
440
|
-
| `teamName` | string | 'Support'
|
|
441
|
-
| `teamAvatars` | array | []
|
|
442
|
-
| `welcomeMessage` | string | 'How can we help?' | Welcome message on home view
|
|
443
|
-
| `enableHelp` | boolean | true
|
|
444
|
-
| `enableChangelog` | boolean | true
|
|
445
|
-
| `logoUrl` | string | -
|
|
446
|
-
| `primaryColor` | string | '#1c1c1e'
|
|
447
|
-
| `onSendMessage` | function | null
|
|
448
|
-
| `onArticleClick` | function | null
|
|
449
|
-
| `onChangelogClick` | function | null
|
|
436
|
+
| Option | Type | Default | Description |
|
|
437
|
+
| ------------------ | -------- | ------------------ | --------------------------------------- |
|
|
438
|
+
| `position` | string | 'bottom-right' | Widget position on screen |
|
|
439
|
+
| `theme` | string | 'light' | 'light' or 'dark' |
|
|
440
|
+
| `teamName` | string | 'Support' | Team name displayed in header |
|
|
441
|
+
| `teamAvatars` | array | [] | Array of team member avatar URLs |
|
|
442
|
+
| `welcomeMessage` | string | 'How can we help?' | Welcome message on home view |
|
|
443
|
+
| `enableHelp` | boolean | true | Show help articles section |
|
|
444
|
+
| `enableChangelog` | boolean | true | Show changelog section |
|
|
445
|
+
| `logoUrl` | string | - | Custom logo URL |
|
|
446
|
+
| `primaryColor` | string | '#1c1c1e' | Primary accent color |
|
|
447
|
+
| `onSendMessage` | function | null | Callback when message is sent |
|
|
448
|
+
| `onArticleClick` | function | null | Callback when help article is clicked |
|
|
449
|
+
| `onChangelogClick` | function | null | Callback when changelog item is clicked |
|
|
450
450
|
|
|
451
451
|
### Messenger Views
|
|
452
452
|
|
|
453
453
|
The messenger widget includes multiple views:
|
|
454
454
|
|
|
455
|
-
| View
|
|
456
|
-
|
|
|
457
|
-
| `home`
|
|
458
|
-
| `messages`
|
|
459
|
-
| `chat`
|
|
460
|
-
| `help`
|
|
461
|
-
| `changelog`
|
|
455
|
+
| View | Description |
|
|
456
|
+
| ----------- | --------------------------------- |
|
|
457
|
+
| `home` | Welcome screen with quick actions |
|
|
458
|
+
| `messages` | List of all conversations |
|
|
459
|
+
| `chat` | Individual conversation chat view |
|
|
460
|
+
| `help` | Help articles and collections |
|
|
461
|
+
| `changelog` | Product updates and announcements |
|
|
462
462
|
|
|
463
463
|
### Programmatic Control
|
|
464
464
|
|
|
@@ -515,11 +515,11 @@ The WebSocket connection is managed automatically and reconnects on disconnectio
|
|
|
515
515
|
|
|
516
516
|
The SDK automatically detects the environment based on the hostname:
|
|
517
517
|
|
|
518
|
-
| Hostname Pattern
|
|
519
|
-
|
|
|
520
|
-
| `localhost`, `127.0.0.1`, `*.local`
|
|
521
|
-
| Contains `staging`
|
|
522
|
-
| All other hostnames
|
|
518
|
+
| Hostname Pattern | Environment |
|
|
519
|
+
| ----------------------------------- | ----------- |
|
|
520
|
+
| `localhost`, `127.0.0.1`, `*.local` | staging |
|
|
521
|
+
| Contains `staging` | staging |
|
|
522
|
+
| All other hostnames | production |
|
|
523
523
|
|
|
524
524
|
```javascript
|
|
525
525
|
// Auto-detection (recommended)
|
package/dist/README.md
CHANGED
|
@@ -149,15 +149,15 @@ messenger.mount();
|
|
|
149
149
|
|
|
150
150
|
### SDK Configuration
|
|
151
151
|
|
|
152
|
-
| Option | Type | Required | Default
|
|
153
|
-
| ------------- | ------- | -------- |
|
|
154
|
-
| `workspace` | string | ✅ | -
|
|
155
|
-
| `boardId` | string | ❌ | 'general'
|
|
156
|
-
| `userContext` | object | ❌ | null
|
|
157
|
-
| `mock` | boolean | ❌ | false
|
|
158
|
-
| `debug` | boolean | ❌ | false
|
|
159
|
-
| `env` | string | ❌ | auto-detect
|
|
160
|
-
| `apiUrl` | string | ❌ | null
|
|
152
|
+
| Option | Type | Required | Default | Description |
|
|
153
|
+
| ------------- | ------- | -------- | ----------- | -------------------------------------- |
|
|
154
|
+
| `workspace` | string | ✅ | - | Your workspace subdomain |
|
|
155
|
+
| `boardId` | string | ❌ | 'general' | Target board for feedback |
|
|
156
|
+
| `userContext` | object | ❌ | null | User identification data |
|
|
157
|
+
| `mock` | boolean | ❌ | false | Enable mock mode for development |
|
|
158
|
+
| `debug` | boolean | ❌ | false | Enable debug logging |
|
|
159
|
+
| `env` | string | ❌ | auto-detect | Environment: 'production' or 'staging' |
|
|
160
|
+
| `apiUrl` | string | ❌ | null | Custom API URL (overrides env) |
|
|
161
161
|
|
|
162
162
|
### Widget Configuration
|
|
163
163
|
|
|
@@ -433,32 +433,32 @@ messenger.mount();
|
|
|
433
433
|
|
|
434
434
|
### Messenger Configuration Options
|
|
435
435
|
|
|
436
|
-
| Option | Type | Default
|
|
437
|
-
| ------------------ | -------- |
|
|
438
|
-
| `position` | string | 'bottom-right'
|
|
439
|
-
| `theme` | string | 'light'
|
|
440
|
-
| `teamName` | string | 'Support'
|
|
441
|
-
| `teamAvatars` | array | []
|
|
442
|
-
| `welcomeMessage` | string | 'How can we help?' | Welcome message on home view
|
|
443
|
-
| `enableHelp` | boolean | true
|
|
444
|
-
| `enableChangelog` | boolean | true
|
|
445
|
-
| `logoUrl` | string | -
|
|
446
|
-
| `primaryColor` | string | '#1c1c1e'
|
|
447
|
-
| `onSendMessage` | function | null
|
|
448
|
-
| `onArticleClick` | function | null
|
|
449
|
-
| `onChangelogClick` | function | null
|
|
436
|
+
| Option | Type | Default | Description |
|
|
437
|
+
| ------------------ | -------- | ------------------ | --------------------------------------- |
|
|
438
|
+
| `position` | string | 'bottom-right' | Widget position on screen |
|
|
439
|
+
| `theme` | string | 'light' | 'light' or 'dark' |
|
|
440
|
+
| `teamName` | string | 'Support' | Team name displayed in header |
|
|
441
|
+
| `teamAvatars` | array | [] | Array of team member avatar URLs |
|
|
442
|
+
| `welcomeMessage` | string | 'How can we help?' | Welcome message on home view |
|
|
443
|
+
| `enableHelp` | boolean | true | Show help articles section |
|
|
444
|
+
| `enableChangelog` | boolean | true | Show changelog section |
|
|
445
|
+
| `logoUrl` | string | - | Custom logo URL |
|
|
446
|
+
| `primaryColor` | string | '#1c1c1e' | Primary accent color |
|
|
447
|
+
| `onSendMessage` | function | null | Callback when message is sent |
|
|
448
|
+
| `onArticleClick` | function | null | Callback when help article is clicked |
|
|
449
|
+
| `onChangelogClick` | function | null | Callback when changelog item is clicked |
|
|
450
450
|
|
|
451
451
|
### Messenger Views
|
|
452
452
|
|
|
453
453
|
The messenger widget includes multiple views:
|
|
454
454
|
|
|
455
|
-
| View
|
|
456
|
-
|
|
|
457
|
-
| `home`
|
|
458
|
-
| `messages`
|
|
459
|
-
| `chat`
|
|
460
|
-
| `help`
|
|
461
|
-
| `changelog`
|
|
455
|
+
| View | Description |
|
|
456
|
+
| ----------- | --------------------------------- |
|
|
457
|
+
| `home` | Welcome screen with quick actions |
|
|
458
|
+
| `messages` | List of all conversations |
|
|
459
|
+
| `chat` | Individual conversation chat view |
|
|
460
|
+
| `help` | Help articles and collections |
|
|
461
|
+
| `changelog` | Product updates and announcements |
|
|
462
462
|
|
|
463
463
|
### Programmatic Control
|
|
464
464
|
|
|
@@ -515,11 +515,11 @@ The WebSocket connection is managed automatically and reconnects on disconnectio
|
|
|
515
515
|
|
|
516
516
|
The SDK automatically detects the environment based on the hostname:
|
|
517
517
|
|
|
518
|
-
| Hostname Pattern
|
|
519
|
-
|
|
|
520
|
-
| `localhost`, `127.0.0.1`, `*.local`
|
|
521
|
-
| Contains `staging`
|
|
522
|
-
| All other hostnames
|
|
518
|
+
| Hostname Pattern | Environment |
|
|
519
|
+
| ----------------------------------- | ----------- |
|
|
520
|
+
| `localhost`, `127.0.0.1`, `*.local` | staging |
|
|
521
|
+
| Contains `staging` | staging |
|
|
522
|
+
| All other hostnames | production |
|
|
523
523
|
|
|
524
524
|
```javascript
|
|
525
525
|
// Auto-detection (recommended)
|