@sprig-technologies/sprig-bundled 1.0.2 → 1.1.0
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/index.d.ts +46 -13
- package/dist/index.js +4142 -3934
- package/package.json +2 -5
- package/dist/index.cjs +0 -65
package/dist/index.d.ts
CHANGED
|
@@ -1893,6 +1893,7 @@ declare enum SprigEvent {
|
|
|
1893
1893
|
SurveyHeight = "survey.height",
|
|
1894
1894
|
SurveyPresented = "survey.presented",
|
|
1895
1895
|
SurveyLifeCycle = "survey.lifeCycle",
|
|
1896
|
+
SurveyWidth = "survey.width",
|
|
1896
1897
|
SurveyWillClose = "survey.willClose",
|
|
1897
1898
|
SurveyWillPresent = "survey.will.present",
|
|
1898
1899
|
CloseSurveyOnOverlayClick = "close.survey.overlayClick",
|
|
@@ -2026,6 +2027,7 @@ declare enum BooleanOperator {
|
|
|
2026
2027
|
declare const enum CardType {
|
|
2027
2028
|
ConsentLegal = "consentlegal",
|
|
2028
2029
|
Likert = "likert",
|
|
2030
|
+
Matrix = "matrix",
|
|
2029
2031
|
MultipleChoice = "multiplechoice",
|
|
2030
2032
|
MultipleSelect = "multipleselect",
|
|
2031
2033
|
NPS = "nps",
|
|
@@ -2045,20 +2047,21 @@ interface BaseCard {
|
|
|
2045
2047
|
}
|
|
2046
2048
|
declare const enum Comparator {
|
|
2047
2049
|
Answered = "answered",
|
|
2050
|
+
Contains = "contains",
|
|
2051
|
+
DoesNotContain = "notcontains",
|
|
2052
|
+
DoesNotInclude = "list_dni",
|
|
2048
2053
|
Equal = "eq",
|
|
2049
|
-
NotEqual = "neq",
|
|
2050
|
-
Skipped = "skipped",
|
|
2051
|
-
LessThan = "lt",
|
|
2052
|
-
LessThanOrEqual = "lte",
|
|
2053
2054
|
GivenUp = "given_up",
|
|
2054
2055
|
GreaterThan = "gt",
|
|
2055
2056
|
GreaterThanOrEqual = "gte",
|
|
2057
|
+
LessThan = "lt",
|
|
2058
|
+
LessThanOrEqual = "lte",
|
|
2056
2059
|
ListAll = "list_all",
|
|
2057
2060
|
ListAtLeastOne = "list_alo",
|
|
2058
2061
|
ListExact = "list_exact",
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
+
NotEqual = "neq",
|
|
2063
|
+
Partial = "partial",
|
|
2064
|
+
Skipped = "skipped"
|
|
2062
2065
|
}
|
|
2063
2066
|
type DefaultComparator = Comparator.Answered | Comparator.Skipped;
|
|
2064
2067
|
type RoutingOption<C extends Comparator = DefaultComparator> = OldRoutingOption<C> | GroupRoutingOption;
|
|
@@ -2281,6 +2284,25 @@ interface MultipleChoiceSingleSelectCard extends MultiChoiceCard<Comparator.Equa
|
|
|
2281
2284
|
interface MultipleChoiceMultiSelectCard extends MultiChoiceCard<Comparator.ListAll | Comparator.ListAtLeastOne | Comparator.ListExact | Comparator.DoesNotInclude> {
|
|
2282
2285
|
type: CardType.MultipleSelect;
|
|
2283
2286
|
}
|
|
2287
|
+
interface MatrixCard extends BaseCard {
|
|
2288
|
+
props: {
|
|
2289
|
+
options: MultipleChoiceOption[];
|
|
2290
|
+
message: string;
|
|
2291
|
+
routingOptions: RoutingOptions<Comparator.Skipped | Comparator.Partial | Comparator.Answered>;
|
|
2292
|
+
properties: {
|
|
2293
|
+
buttonText?: string;
|
|
2294
|
+
captionText: string;
|
|
2295
|
+
conceptUrl: ConceptUrl;
|
|
2296
|
+
matrixColumn: {
|
|
2297
|
+
label: string;
|
|
2298
|
+
value: string;
|
|
2299
|
+
}[];
|
|
2300
|
+
randomize: "none" | "all";
|
|
2301
|
+
required: boolean;
|
|
2302
|
+
};
|
|
2303
|
+
};
|
|
2304
|
+
type: CardType.Matrix;
|
|
2305
|
+
}
|
|
2284
2306
|
interface NPSCard extends BaseCard {
|
|
2285
2307
|
props: {
|
|
2286
2308
|
labels: {
|
|
@@ -2321,7 +2343,7 @@ interface VideoVoiceCard extends BaseCard {
|
|
|
2321
2343
|
};
|
|
2322
2344
|
type: CardType.VideoVoice;
|
|
2323
2345
|
}
|
|
2324
|
-
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
|
|
2346
|
+
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
|
|
2325
2347
|
|
|
2326
2348
|
interface RecordedTaskResponseType {
|
|
2327
2349
|
questionId: number;
|
|
@@ -2354,7 +2376,12 @@ type SprigEventMap = {
|
|
|
2354
2376
|
];
|
|
2355
2377
|
[SprigEvent.CloseSurveyOnOverlayClick]: [];
|
|
2356
2378
|
[SprigEvent.SDKReady]: [MobileReplayConfig];
|
|
2357
|
-
[SprigEvent.SurveyAppeared]: [
|
|
2379
|
+
[SprigEvent.SurveyAppeared]: [
|
|
2380
|
+
{
|
|
2381
|
+
name: string;
|
|
2382
|
+
[SprigEventData.SurveyId]: number;
|
|
2383
|
+
}
|
|
2384
|
+
];
|
|
2358
2385
|
[SprigEvent.SurveyDimensions]: [
|
|
2359
2386
|
{
|
|
2360
2387
|
contentFrameHeight: number;
|
|
@@ -2375,12 +2402,19 @@ type SprigEventMap = {
|
|
|
2375
2402
|
contentFrameHeight: number;
|
|
2376
2403
|
}
|
|
2377
2404
|
];
|
|
2405
|
+
[SprigEvent.SurveyWidth]: [
|
|
2406
|
+
{
|
|
2407
|
+
name: string;
|
|
2408
|
+
contentFrameWidth: number;
|
|
2409
|
+
}
|
|
2410
|
+
];
|
|
2378
2411
|
[SprigEvent.SurveyLifeCycle]: [{
|
|
2379
2412
|
state: string;
|
|
2380
2413
|
}];
|
|
2381
2414
|
[SprigEvent.SurveyPresented]: [
|
|
2382
2415
|
{
|
|
2383
2416
|
name: string;
|
|
2417
|
+
[SprigEventData.SurveyId]: number;
|
|
2384
2418
|
}
|
|
2385
2419
|
];
|
|
2386
2420
|
[SprigEvent.SurveyWillClose]: [
|
|
@@ -2392,7 +2426,7 @@ type SprigEventMap = {
|
|
|
2392
2426
|
[SprigEvent.SurveyWillPresent]: [
|
|
2393
2427
|
{
|
|
2394
2428
|
name: string;
|
|
2395
|
-
|
|
2429
|
+
[SprigEventData.SurveyId]: number;
|
|
2396
2430
|
}
|
|
2397
2431
|
];
|
|
2398
2432
|
[SprigEvent.VisitorIDUpdated]: [{
|
|
@@ -2547,6 +2581,7 @@ interface Config extends MobileReplayConfig {
|
|
|
2547
2581
|
frame: HTMLIFrameElement & {
|
|
2548
2582
|
eventEmitter?: SprigEventEmitter;
|
|
2549
2583
|
setHeight?: (height: number) => void;
|
|
2584
|
+
setWidth?: (width: number) => void;
|
|
2550
2585
|
};
|
|
2551
2586
|
framePosition: FramePosition;
|
|
2552
2587
|
headers: {
|
|
@@ -2901,9 +2936,7 @@ declare class SprigAPI {
|
|
|
2901
2936
|
SURVEY_WILL_PRESENT: SprigEvent;
|
|
2902
2937
|
QUESTION_ANSWERED: SprigEvent;
|
|
2903
2938
|
REPLAY_CAPTURE: SprigEvent;
|
|
2904
|
-
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
2905
|
-
* Attach a user id to the visitor
|
|
2906
|
-
*/
|
|
2939
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
2907
2940
|
VISITOR_ID_UPDATED: SprigEvent;
|
|
2908
2941
|
DATA: {
|
|
2909
2942
|
DISMISS_REASONS: {
|