@sprig-technologies/sprig-bundled 2.40.3 → 2.41.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/{conversational-ui-BXidfSdu.js → conversational-ui-BMaVlQM7.js} +604 -590
- package/dist/{conversational-ui-DUGOWcXj.cjs → conversational-ui-Dfwwfe2B.cjs} +2 -2
- package/dist/getAttributedUrl-BI712lA1.js +195 -0
- package/dist/getAttributedUrl-CuAx8r1V.cjs +12 -0
- package/dist/index-CEpl_fRY.cjs +1 -0
- package/dist/{index-B0SmBCWR.cjs → index-DZZhe9UA.cjs} +2 -2
- package/dist/{index-B-1ZVEfz.js → index-YBebm7NT.js} +3 -3
- package/dist/index-cT-GmgDY.js +712 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +64 -5
- package/dist/index.js +1 -1
- package/dist/view-BHOd3THT.js +1713 -0
- package/dist/view-Btk1gSAI.cjs +1 -0
- package/package.json +1 -1
- package/dist/getAttributedUrl-B28r1ayG.js +0 -188
- package/dist/getAttributedUrl-C_nBQU9-.cjs +0 -12
- package/dist/index-BM-ZKnlM.js +0 -658
- package/dist/index-DuLz6-LB.cjs +0 -1
- package/dist/view-CwyS6VJ8.js +0 -1494
- package/dist/view-IVflCEcd.cjs +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DZZhe9UA.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
|
package/dist/index.d.ts
CHANGED
|
@@ -1012,18 +1012,56 @@ interface PassthroughData {
|
|
|
1012
1012
|
type MultiChoiceSecondaryValueType = Record<string, {
|
|
1013
1013
|
userText: string;
|
|
1014
1014
|
}> | null;
|
|
1015
|
+
declare const enum MaxDiffChoice {
|
|
1016
|
+
RIGHT = "right",
|
|
1017
|
+
LEFT = "left"
|
|
1018
|
+
}
|
|
1019
|
+
type MaxDiffValueType = {
|
|
1020
|
+
id: number;
|
|
1021
|
+
option: string;
|
|
1022
|
+
selected: MaxDiffChoice | null;
|
|
1023
|
+
};
|
|
1024
|
+
type MaxDiffResponseType = Array<Array<MaxDiffValueType>>;
|
|
1015
1025
|
interface RecordedTaskResponseValueType {
|
|
1016
1026
|
mediaRecordingUids?: string[] | null;
|
|
1017
1027
|
taskDurationMillisecond?: number;
|
|
1018
1028
|
taskStatus: TaskStatus;
|
|
1019
1029
|
}
|
|
1030
|
+
type TextUrlPromptResponse = undefined | {
|
|
1031
|
+
skipped?: true;
|
|
1032
|
+
};
|
|
1033
|
+
type ConsentLegalResponse = {
|
|
1034
|
+
submitted: true;
|
|
1035
|
+
} | null;
|
|
1036
|
+
type RecordedTaskResponse = {
|
|
1037
|
+
mediaRecordingUids: string[];
|
|
1038
|
+
taskDurationMillisecond: number;
|
|
1039
|
+
taskStatus: TaskStatus;
|
|
1040
|
+
};
|
|
1041
|
+
type LikertResponse = number | null;
|
|
1042
|
+
type OpenTextResponse = string;
|
|
1043
|
+
type AiDynamicFollowUpResponse = string;
|
|
1044
|
+
type MultiChoiceresponse = string | undefined;
|
|
1045
|
+
type MultiSelectResponse = string[];
|
|
1046
|
+
type MatrixResponse = {
|
|
1047
|
+
[rowId: number]: string | null;
|
|
1048
|
+
};
|
|
1049
|
+
type NpsResponse = number | null;
|
|
1050
|
+
type RankOrderResponse = {
|
|
1051
|
+
[optionId: string]: number | null;
|
|
1052
|
+
};
|
|
1053
|
+
type VideoVoiceResponse = {
|
|
1054
|
+
mediaRecordingUid: string;
|
|
1055
|
+
};
|
|
1056
|
+
type CardResponse = TextUrlPromptResponse | ConsentLegalResponse | RecordedTaskResponse | LikertResponse | OpenTextResponse | AiDynamicFollowUpResponse | MultiChoiceresponse | MultiSelectResponse | MatrixResponse | NpsResponse | RankOrderResponse | MaxDiffResponseType | VideoVoiceResponse;
|
|
1057
|
+
|
|
1020
1058
|
declare const BOOLEAN_OPERATOR: {
|
|
1021
1059
|
readonly And: 1;
|
|
1022
1060
|
readonly Or: 2;
|
|
1023
1061
|
};
|
|
1024
1062
|
type BooleanOperator = (typeof BOOLEAN_OPERATOR)[keyof typeof BOOLEAN_OPERATOR];
|
|
1025
1063
|
|
|
1026
|
-
type CardType = "consentlegal" | "likert" | "matrix" | "maxdiff" | "multiplechoice" | "multipleselect" | "nps" | "open" | "rankorder" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
|
|
1064
|
+
type CardType = "aidynamicfollowup" | "consentlegal" | "likert" | "matrix" | "maxdiff" | "multiplechoice" | "multipleselect" | "nps" | "open" | "rankorder" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
|
|
1027
1065
|
type ConceptUrl = string | null;
|
|
1028
1066
|
type GroupType = "page";
|
|
1029
1067
|
interface BaseCard {
|
|
@@ -1032,9 +1070,11 @@ interface BaseCard {
|
|
|
1032
1070
|
updatedAt: string;
|
|
1033
1071
|
value?: unknown;
|
|
1034
1072
|
type: CardType;
|
|
1035
|
-
groupId?: number;
|
|
1073
|
+
groupId?: number | null;
|
|
1036
1074
|
secondaryValue?: MultiChoiceSecondaryValueType | null;
|
|
1037
1075
|
groupType?: GroupType;
|
|
1076
|
+
childId?: number | null;
|
|
1077
|
+
parentId?: number | null;
|
|
1038
1078
|
}
|
|
1039
1079
|
type Comparator = "answered" | "contains" | "notcontains" | "list_dni" | "eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "list_all" | "list_alo" | "list_exact" | "neq" | "partial" | "skipped";
|
|
1040
1080
|
type Randomize = "none" | "all";
|
|
@@ -1052,7 +1092,7 @@ type GroupRoutingOption = {
|
|
|
1052
1092
|
};
|
|
1053
1093
|
type RoutingGroupOption = {
|
|
1054
1094
|
comparator: Comparator;
|
|
1055
|
-
questionIndex: number;
|
|
1095
|
+
questionIndex: number | string;
|
|
1056
1096
|
value: number | string | string[] | {
|
|
1057
1097
|
skipped: true;
|
|
1058
1098
|
} | null | undefined;
|
|
@@ -1220,6 +1260,19 @@ interface OpenTextCard extends BaseCard {
|
|
|
1220
1260
|
};
|
|
1221
1261
|
type: "open";
|
|
1222
1262
|
}
|
|
1263
|
+
/**
|
|
1264
|
+
* DynamicQuestionCard loading:
|
|
1265
|
+
* - `true` — DQ network request inflight
|
|
1266
|
+
* - `false` - successful DQ network request
|
|
1267
|
+
* - `undefined` - network call not yet triggered
|
|
1268
|
+
* - `null` - unsuccessful DQ network call
|
|
1269
|
+
*/
|
|
1270
|
+
interface DynamicQuestionCard extends BaseCard {
|
|
1271
|
+
props: OpenTextCard["props"] & {
|
|
1272
|
+
loading?: boolean | null;
|
|
1273
|
+
};
|
|
1274
|
+
type: "aidynamicfollowup";
|
|
1275
|
+
}
|
|
1223
1276
|
interface MultipleChoiceOption {
|
|
1224
1277
|
createdAt: string;
|
|
1225
1278
|
deletedAt: null;
|
|
@@ -1402,7 +1455,7 @@ interface VideoVoiceCard extends BaseCard {
|
|
|
1402
1455
|
};
|
|
1403
1456
|
type: "videovoice";
|
|
1404
1457
|
}
|
|
1405
|
-
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MaxDiffType | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | RankOrderType | VideoVoiceCard;
|
|
1458
|
+
type Card = TextUrlPromptCard | ConsentLegalCard | DynamicQuestionCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MaxDiffType | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | RankOrderType | VideoVoiceCard;
|
|
1406
1459
|
|
|
1407
1460
|
type InteractiveMatchType = "exactly" | "legacy";
|
|
1408
1461
|
type PageUrlMatchType = "contains" | "exactly" | "legacy" | "notContains" | "regex" | "startsWith";
|
|
@@ -1703,7 +1756,8 @@ interface AppProductConfig {
|
|
|
1703
1756
|
}
|
|
1704
1757
|
interface Config extends MobileReplayConfig {
|
|
1705
1758
|
addResponseGroupMeta?: () => Promise<JSONObject>;
|
|
1706
|
-
allResponses:
|
|
1759
|
+
allResponses: CardResponse[];
|
|
1760
|
+
allResponsesRaw: Record<string | number, string>;
|
|
1707
1761
|
answers?: Answer[];
|
|
1708
1762
|
apiURL: string;
|
|
1709
1763
|
avatars: Avatars;
|
|
@@ -1720,6 +1774,10 @@ interface Config extends MobileReplayConfig {
|
|
|
1720
1774
|
outcome: string;
|
|
1721
1775
|
};
|
|
1722
1776
|
};
|
|
1777
|
+
createDynamicQuestion: (s: {
|
|
1778
|
+
parentQuestionId: number;
|
|
1779
|
+
parentResponseConfig?: Config["allResponsesRaw"];
|
|
1780
|
+
}) => void;
|
|
1723
1781
|
customMetadata?: Record<string, unknown>;
|
|
1724
1782
|
customStyles?: string;
|
|
1725
1783
|
dismissOnPageChange: boolean;
|
|
@@ -2088,6 +2146,7 @@ declare namespace sprigConfig {
|
|
|
2088
2146
|
declare global {
|
|
2089
2147
|
interface Window {
|
|
2090
2148
|
__cfg: Config;
|
|
2149
|
+
__sprigReinitialize?: () => void;
|
|
2091
2150
|
attachEvent?: typeof window.addEventListener;
|
|
2092
2151
|
Backbone: {
|
|
2093
2152
|
history: typeof window.history;
|
package/dist/index.js
CHANGED