@sidebandai/sideband-web 1.4.6 → 1.4.7-rc.1
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 +16 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +258 -188
- package/dist/sideband.iife.js +1 -1
- package/dist/ui/snackbar-ui.d.ts +3 -2
- package/dist/ui/snackbar-ui.d.ts.map +1 -1
- package/dist/ui/survey-ui.d.ts +7 -1
- package/dist/ui/survey-ui.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,11 +44,9 @@ If your site sends a Content Security Policy, allow the Sideband API origin in
|
|
|
44
44
|
`connect-src`. Without it, the browser blocks every send: no events arrive and
|
|
45
45
|
no pulses show.
|
|
46
46
|
|
|
47
|
-
|
|
|
47
|
+
| Channel | `connect-src` | `img-src` (pulse images) |
|
|
48
48
|
| --- | --- | --- |
|
|
49
|
-
| Production
|
|
50
|
-
| Development (`syncEndpoint: 'dev'`) | `https://api.dev-sideband.ai` | `https://images-dev.sideband.ai` |
|
|
51
|
-
| A custom `baseUrl` | That URL's origin, and the final origin if it redirects | That environment's image host |
|
|
49
|
+
| Development or Production | `https://api.sideband.ai` | `https://images.sideband.ai` |
|
|
52
50
|
|
|
53
51
|
The SDK also needs these, if your policy restricts them:
|
|
54
52
|
|
|
@@ -378,6 +376,20 @@ Switching from user A to user B sends `system_logout` for A, then `system_login`
|
|
|
378
376
|
for B, with the same timestamp. Repeating the same ID, clearing an ID that is
|
|
379
377
|
not set, and restoring the stored ID on a page load send nothing.
|
|
380
378
|
|
|
379
|
+
## Feedback bar
|
|
380
|
+
|
|
381
|
+
When a Pulse uses a toolbar, the first two-answer yes/no question appears in a
|
|
382
|
+
bar at the bottom of the page. Selecting an answer opens the survey and follows
|
|
383
|
+
that answer's route to the next question or completion. For a single-question
|
|
384
|
+
survey, route the answers directly to completion in the Pulse. **Not Now**
|
|
385
|
+
declines an unanswered Pulse; closing after an answer sends a partial response.
|
|
386
|
+
|
|
387
|
+
To show bars at the top, pass `barPosition: 'top'` to `Sideband.configure`.
|
|
388
|
+
To use a bar for a Pulse with no presentation specified,
|
|
389
|
+
set `sentimentPresentation: 'bar'`. An explicit Pulse presentation or root
|
|
390
|
+
`isSnackBar` flag takes precedence. To preview a toolbar Pulse at the top,
|
|
391
|
+
call `Sideband.presentSimulatedPulse({ pulse, barPosition: 'top' })`.
|
|
392
|
+
|
|
381
393
|
## Other options
|
|
382
394
|
|
|
383
395
|
The SDK sends events in batches, by default about once a second. Set
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventMetadata, SidebandCoreConfig, SidebandRuntime, SimulatedPulseDefinition, TrackOptions } from '@sidebandai/sideband-core';
|
|
2
2
|
export { createSidebandClient, getDeviceId, getSessionId, PendingInteractionStorageError, SidebandApiError, SurveySessionStore, buildFabTitle, getChoiceValue, SyncEngine, } from '@sidebandai/sideband-core';
|
|
3
|
-
export type { AnsweredInteraction, ApiErrorDetail, ClientContext, CompletionActionStyle, CompletionActionType, CompletionIconType, CompletionType, DismissedInteraction, EventMetadata, EventRecord, Fab, FabOffset, FabPlacement, FabPoint, FabState, Interaction, Platform, PendingInteractionStorageReason, PendingPulse, SyncEndpoint, Pulse, PulseAnswer, PulseCompletion, PulseCompletionAction, PulseQuestion, QuestionType, SentimentPresentation, SentimentPresentationOptions, BarPosition,
|
|
3
|
+
export type { AnsweredInteraction, ApiErrorDetail, ClientContext, CompletionActionStyle, CompletionActionType, CompletionIconType, CompletionType, DismissedInteraction, EventMetadata, EventRecord, Fab, FabOffset, FabPlacement, FabPoint, FabState, Interaction, Platform, PendingInteractionStorageReason, PendingPulse, SyncEndpoint, Pulse, PulseAnswer, PulseCompletion, PulseCompletionAction, PulseQuestion, QuestionType, SentimentPresentation, SentimentPresentationOptions, BarPosition, SimulatedPulseDefinition, SidebandClient, SidebandClientConfig, SidebandCoreConfig, SurveyAnswerDraft, SurveyAnswerMap, SurveyAnswerValue, SurveySessionState, SurveyStoreSnapshot, SurveyStoreUpdateReason, SyncEngineDeps, SyncEngineOptions, SyncErrorResponse, ServiceUnavailableError, SyncOptions, SyncRequest, SyncResponse, TrackedEvent, TrackOptions, Theme, ThemeColor, TimerStyle, SurveyPresentationDecision, PresentedPulseKind, SurveyPresentationKind, } from '@sidebandai/sideband-core';
|
|
4
4
|
export type SidebandWebConfig = SidebandCoreConfig & {
|
|
5
5
|
ui?: boolean;
|
|
6
6
|
};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,wBAAwB,EACxB,YAAY,EACb,MAAM,2BAA2B,CAAA;AAIlC,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,YAAY,EACZ,8BAA8B,EAC9B,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,UAAU,GACX,MAAM,2BAA2B,CAAA;AAClC,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,oBAAoB,EACpB,aAAa,EACb,WAAW,EACX,GAAG,EACH,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,+BAA+B,EAC/B,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,YAAY,EACZ,qBAAqB,EACrB,4BAA4B,EAC5B,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,wBAAwB,E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