@sprig-technologies/sprig-bundled 1.1.8 → 2.35.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-MkVSshrN.cjs → index-Clr9gLre.cjs} +2 -3
- package/dist/{index-BnOajwL7.js → index-D8ZoPLNT.js} +4 -5
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +42 -13
- package/dist/index.js +1 -2
- package/dist/view-DNRNShTq.js +2039 -0
- package/dist/view-DkgdLDj2.cjs +12 -0
- package/package.json +1 -1
- package/dist/index-BnOajwL7.js.map +0 -1
- package/dist/index-MkVSshrN.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/view-UeZsENA_.js +0 -1960
- package/dist/view-UeZsENA_.js.map +0 -1
- package/dist/view-VQ3LPBC1.cjs +0 -13
- package/dist/view-VQ3LPBC1.cjs.map +0 -1
|
@@ -6029,7 +6029,7 @@ const Mf = (e) => e._config && e._config.installationMethod ? e._config.installa
|
|
|
6029
6029
|
eu = !0, tu = e;
|
|
6030
6030
|
};
|
|
6031
6031
|
function Te(e = {}) {
|
|
6032
|
-
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.
|
|
6032
|
+
const t = { "Content-Type": "application/json", "userleap-platform": "web", "x-ul-sdk-version": "2.35.0", "x-ul-installation-method": Mf(e), "sprig-modules": Of(), "x-ul-package-version": "2.35.0" };
|
|
6033
6033
|
if (e.envId && (t["x-ul-environment-id"] = e.envId), e.token && (t.Authorization = "Bearer " + e.token), e.userId && (t["x-ul-user-id"] = e.userId), e.visitorId && (t["x-ul-visitor-id"] = e.visitorId), e.partnerAnonymousId && (t["x-ul-anonymous-id"] = e.partnerAnonymousId), e.mobileHeadersJSON) {
|
|
6034
6034
|
const r = JSON.parse(e.mobileHeadersJSON);
|
|
6035
6035
|
Object.assign(t, r);
|
|
@@ -6158,7 +6158,7 @@ const Qt = async (e, t, r) => {
|
|
|
6158
6158
|
window.UserLeap.container && Object.assign(window.UserLeap.container.style, { display: "flex" });
|
|
6159
6159
|
};
|
|
6160
6160
|
if (S.installationMethod === "web-npm" || S.installationMethod === "web-npm-bundled") {
|
|
6161
|
-
const { default: F } = await import("./view-
|
|
6161
|
+
const { default: F } = await import("./view-DNRNShTq.js");
|
|
6162
6162
|
F.configure(S), k && window.UserLeap.container && T();
|
|
6163
6163
|
} else D && (w.src = D, k && w.addEventListener("load", () => {
|
|
6164
6164
|
window.UserLeap.container && T();
|
|
@@ -6968,7 +6968,7 @@ function sg(e = {}) {
|
|
|
6968
6968
|
var m;
|
|
6969
6969
|
await ze(Me("1", [it], "metrics"), { body: C, method: "POST", headers: { "x-ul-replay-enabled": `${!!((m = te.replay) != null && m.isReplayRecording())}` }, shouldDropOnRateLimit: !0 });
|
|
6970
6970
|
} }), !c) {
|
|
6971
|
-
const C = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.
|
|
6971
|
+
const C = u.alwaysOnReplay ? { userAgent: window.navigator.userAgent, surveyId: u.alwaysOnReplay.surveyId, responseGroupUuid: u.alwaysOnReplay.responseGroupUuid, sdkVersion: "2.35.0", maxDurationSeconds: u.alwaysOnReplay.maxDurationSeconds } : void 0;
|
|
6972
6972
|
await ((y = te.replay) == null ? void 0 : y.initializeReplay({ maxReplayDurationSeconds: u.maxReplayDurationSeconds, maxInflightRequests: window.UserLeap.maxInflightReplayRequests ?? 2, replaySettings: u.replaySettings, apiUrl: window.UserLeap._API_URL, alwaysOnConfig: C })), no = u.replaySettings;
|
|
6973
6973
|
}
|
|
6974
6974
|
rg(u), await tg(u), window.UserLeap._queue.unpause(), (h = window.SprigLoggerCallback) == null || h.call(window, "SdkReady"), j.emit(z.SDKReady, { mobileMetricsReportingEnabled: !!u.mobileMetricsReportingEnabled, metricsReportingInterval: u.metricsReportingIntervalSeconds || 0, metricsThresholds: u.metricThresholds || [], maxMobileReplayDurationSeconds: u.maxMobileReplayDurationSeconds, mobileReplaySettings: u.mobileReplaySettings }), j.emit(z.VisitorIDUpdated, { visitorId: window.UserLeap.visitorId }), j.on(z.VisitorIDUpdated, () => {
|
|
@@ -7738,7 +7738,7 @@ const Oi = async (e = !1) => {
|
|
|
7738
7738
|
_.debug("ReplayInit"), await ke(async () => {
|
|
7739
7739
|
var l;
|
|
7740
7740
|
r != null && r.minDuration && (qu = r.minDuration), r != null && r.batchDuration && (Ei = r.batchDuration), l = t, xu.setLimit(l), Fg(), Pg(o + 35, 1800, o + 35), _g();
|
|
7741
|
-
const c = window.UserLeap.replayLibraryURL ?? "
|
|
7741
|
+
const c = window.UserLeap.replayLibraryURL ?? "https://cdn.sprig.com/dependencies/record-2.0.0-alpha.17.min.js", u = window.rrwebRecord;
|
|
7742
7742
|
if (!u) return _.error("RecordScriptFailed");
|
|
7743
7743
|
let d = !0, p = 0;
|
|
7744
7744
|
const f = { checkoutEveryNms: 3e4, sampling: { input: "last", scroll: 250, media: 800 }, ...r };
|
|
@@ -7793,4 +7793,3 @@ export {
|
|
|
7793
7793
|
Zc as s,
|
|
7794
7794
|
Mt as v
|
|
7795
7795
|
};
|
|
7796
|
-
//# sourceMappingURL=index-BnOajwL7.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
2
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Clr9gLre.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
|
package/dist/index.d.ts
CHANGED
|
@@ -1020,7 +1020,7 @@ declare const BOOLEAN_OPERATOR: {
|
|
|
1020
1020
|
};
|
|
1021
1021
|
type BooleanOperator = (typeof BOOLEAN_OPERATOR)[keyof typeof BOOLEAN_OPERATOR];
|
|
1022
1022
|
|
|
1023
|
-
type CardType = "consentlegal" | "likert" | "matrix" | "multiplechoice" | "multipleselect" | "nps" | "open" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
|
|
1023
|
+
type CardType = "consentlegal" | "likert" | "matrix" | "multiplechoice" | "multipleselect" | "nps" | "open" | "rankorder" | "recordedtask" | "texturlprompt" | "thanks" | "uploading" | "videovoice";
|
|
1024
1024
|
type ConceptUrl = string | null;
|
|
1025
1025
|
interface BaseCard {
|
|
1026
1026
|
name: number;
|
|
@@ -1031,6 +1031,7 @@ interface BaseCard {
|
|
|
1031
1031
|
groupId?: number;
|
|
1032
1032
|
}
|
|
1033
1033
|
type Comparator = "answered" | "contains" | "notcontains" | "list_dni" | "eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "list_all" | "list_alo" | "list_exact" | "neq" | "partial" | "skipped";
|
|
1034
|
+
type Randomize = "none" | "all";
|
|
1034
1035
|
type DefaultComparator = Extract<Comparator, "answered" | "skipped">;
|
|
1035
1036
|
type RoutingOption<C extends Comparator = DefaultComparator> = OldRoutingOption<C> | GroupRoutingOption;
|
|
1036
1037
|
type OldRoutingOption<C extends Comparator = DefaultComparator> = {
|
|
@@ -1053,7 +1054,12 @@ type RoutingGroupOption = {
|
|
|
1053
1054
|
type RoutingOptions<C extends Comparator = DefaultComparator> = RoutingOption<C | DefaultComparator>[] | null;
|
|
1054
1055
|
/** @example <p>Body</p> */
|
|
1055
1056
|
type RichTextBody = string;
|
|
1056
|
-
|
|
1057
|
+
declare enum PromptActionTypeEnum {
|
|
1058
|
+
CONTINUE = "CONTINUE",
|
|
1059
|
+
EXTERNAL = "EXTERNAL",
|
|
1060
|
+
NO_BUTTON = "NO_BUTTON"
|
|
1061
|
+
}
|
|
1062
|
+
type PromptActionType = keyof typeof PromptActionTypeEnum;
|
|
1057
1063
|
interface TextUrlPromptCard extends BaseCard {
|
|
1058
1064
|
props: {
|
|
1059
1065
|
message: string;
|
|
@@ -1236,7 +1242,7 @@ interface CommonMultipleChoiceProps {
|
|
|
1236
1242
|
* Text when multiple items are selected, such as "2 items selected" / "3 items selected"
|
|
1237
1243
|
*/
|
|
1238
1244
|
dropdownMultiselectedText?: string;
|
|
1239
|
-
randomize:
|
|
1245
|
+
randomize: Randomize;
|
|
1240
1246
|
required: boolean;
|
|
1241
1247
|
};
|
|
1242
1248
|
}
|
|
@@ -1265,7 +1271,7 @@ interface MatrixCard extends BaseCard {
|
|
|
1265
1271
|
label: string;
|
|
1266
1272
|
value: string;
|
|
1267
1273
|
}[];
|
|
1268
|
-
randomize:
|
|
1274
|
+
randomize: Randomize;
|
|
1269
1275
|
required: boolean;
|
|
1270
1276
|
};
|
|
1271
1277
|
};
|
|
@@ -1273,26 +1279,49 @@ interface MatrixCard extends BaseCard {
|
|
|
1273
1279
|
}
|
|
1274
1280
|
interface NPSCard extends BaseCard {
|
|
1275
1281
|
props: {
|
|
1276
|
-
labels:
|
|
1277
|
-
left: string;
|
|
1278
|
-
right: string;
|
|
1279
|
-
};
|
|
1282
|
+
labels: Labels;
|
|
1280
1283
|
message: string;
|
|
1281
1284
|
options: [];
|
|
1282
1285
|
properties: {
|
|
1283
1286
|
buttonText?: string;
|
|
1284
1287
|
captionText: string;
|
|
1285
1288
|
conceptUrl: null;
|
|
1286
|
-
labels:
|
|
1287
|
-
left: string;
|
|
1288
|
-
right: string;
|
|
1289
|
-
};
|
|
1289
|
+
labels: Labels;
|
|
1290
1290
|
required: boolean;
|
|
1291
1291
|
};
|
|
1292
1292
|
routingOptions: RoutingOptions<"eq" | "gt" | "gte" | "lt" | "lte" | "neq">;
|
|
1293
1293
|
};
|
|
1294
1294
|
type: "nps";
|
|
1295
1295
|
}
|
|
1296
|
+
interface RankOrderOption {
|
|
1297
|
+
createdAt: string;
|
|
1298
|
+
deletedAt: null;
|
|
1299
|
+
id: number;
|
|
1300
|
+
label: string;
|
|
1301
|
+
order: number;
|
|
1302
|
+
productId: number;
|
|
1303
|
+
surveyId: number;
|
|
1304
|
+
surveyQuestionId: number;
|
|
1305
|
+
updatedAt: string;
|
|
1306
|
+
value: string;
|
|
1307
|
+
}
|
|
1308
|
+
interface RankOderType extends BaseCard {
|
|
1309
|
+
props: {
|
|
1310
|
+
labels: Labels;
|
|
1311
|
+
message: string;
|
|
1312
|
+
options: RankOrderOption[];
|
|
1313
|
+
properties: {
|
|
1314
|
+
captionText: string;
|
|
1315
|
+
buttonText?: string;
|
|
1316
|
+
conceptUrl: ConceptUrl;
|
|
1317
|
+
labels: Labels;
|
|
1318
|
+
required: boolean;
|
|
1319
|
+
randomize: Randomize;
|
|
1320
|
+
};
|
|
1321
|
+
routingOptions: RoutingOptions<"eq" | "gt" | "gte" | "lt" | "lte" | "neq">;
|
|
1322
|
+
};
|
|
1323
|
+
type: "rankorder";
|
|
1324
|
+
}
|
|
1296
1325
|
interface VideoVoiceCard extends BaseCard {
|
|
1297
1326
|
props: {
|
|
1298
1327
|
message: string;
|
|
@@ -1312,7 +1341,7 @@ interface VideoVoiceCard extends BaseCard {
|
|
|
1312
1341
|
};
|
|
1313
1342
|
type: "videovoice";
|
|
1314
1343
|
}
|
|
1315
|
-
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
|
|
1344
|
+
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | RankOderType | VideoVoiceCard;
|
|
1316
1345
|
|
|
1317
1346
|
type InteractiveMatchType = "exactly" | "legacy";
|
|
1318
1347
|
type PageUrlMatchType = "contains" | "exactly" | "legacy" | "notContains" | "regex" | "startsWith";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { b as i, l as r, S as p, m as e } from "./index-
|
|
1
|
+
import { b as i, l as r, S as p, m as e } from "./index-D8ZoPLNT.js";
|
|
2
2
|
export {
|
|
3
3
|
i as DismissReason,
|
|
4
4
|
r as SprigAPI,
|
|
5
5
|
p as SprigEvent,
|
|
6
6
|
e as sprig
|
|
7
7
|
};
|
|
8
|
-
//# sourceMappingURL=index.js.map
|