@sprig-technologies/sprig-browser 2.26.1 → 2.26.2
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/electron.js +2 -1
- package/dist/index-FFayU6Cl.js +5179 -0
- package/dist/index.d.ts +170 -225
- package/dist/index.js +6 -12592
- package/dist/view-0V5XIs3c.js +5285 -0
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -992,38 +992,7 @@ declare const utils_d_shadowHostInDom: typeof shadowHostInDom;
|
|
|
992
992
|
declare const utils_d_throttle: typeof throttle;
|
|
993
993
|
declare const utils_d_uniqueTextMutations: typeof uniqueTextMutations;
|
|
994
994
|
declare namespace utils_d {
|
|
995
|
-
export {
|
|
996
|
-
utils_d_AppendedIframe as AppendedIframe,
|
|
997
|
-
utils_d_StyleSheetMirror as StyleSheetMirror,
|
|
998
|
-
utils_d__mirror as _mirror,
|
|
999
|
-
utils_d_getBaseDimension as getBaseDimension,
|
|
1000
|
-
utils_d_getNestedRule as getNestedRule,
|
|
1001
|
-
utils_d_getPositionsAndIndex as getPositionsAndIndex,
|
|
1002
|
-
utils_d_getRootShadowHost as getRootShadowHost,
|
|
1003
|
-
utils_d_getShadowHost as getShadowHost,
|
|
1004
|
-
utils_d_getWindowHeight as getWindowHeight,
|
|
1005
|
-
utils_d_getWindowScroll as getWindowScroll,
|
|
1006
|
-
utils_d_getWindowWidth as getWindowWidth,
|
|
1007
|
-
utils_d_hasShadowRoot as hasShadowRoot,
|
|
1008
|
-
utils_d_hookSetter as hookSetter,
|
|
1009
|
-
utils_d_inDom as inDom,
|
|
1010
|
-
utils_d_isAncestorRemoved as isAncestorRemoved,
|
|
1011
|
-
utils_d_isBlocked as isBlocked,
|
|
1012
|
-
utils_d_isIgnored as isIgnored,
|
|
1013
|
-
utils_d_isSerialized as isSerialized,
|
|
1014
|
-
utils_d_isSerializedIframe as isSerializedIframe,
|
|
1015
|
-
utils_d_isSerializedStylesheet as isSerializedStylesheet,
|
|
1016
|
-
utils_d_iterateResolveTree as iterateResolveTree,
|
|
1017
|
-
utils_d_legacy_isTouchEvent as legacy_isTouchEvent,
|
|
1018
|
-
utils_d_nowTimestamp as nowTimestamp,
|
|
1019
|
-
utils_d_on as on,
|
|
1020
|
-
utils_d_patch as patch,
|
|
1021
|
-
utils_d_polyfill as polyfill,
|
|
1022
|
-
utils_d_queueToResolveTrees as queueToResolveTrees,
|
|
1023
|
-
utils_d_shadowHostInDom as shadowHostInDom,
|
|
1024
|
-
utils_d_throttle as throttle,
|
|
1025
|
-
utils_d_uniqueTextMutations as uniqueTextMutations,
|
|
1026
|
-
};
|
|
995
|
+
export { type utils_d_AppendedIframe as AppendedIframe, utils_d_StyleSheetMirror as StyleSheetMirror, utils_d__mirror as _mirror, utils_d_getBaseDimension as getBaseDimension, utils_d_getNestedRule as getNestedRule, utils_d_getPositionsAndIndex as getPositionsAndIndex, utils_d_getRootShadowHost as getRootShadowHost, utils_d_getShadowHost as getShadowHost, utils_d_getWindowHeight as getWindowHeight, utils_d_getWindowScroll as getWindowScroll, utils_d_getWindowWidth as getWindowWidth, utils_d_hasShadowRoot as hasShadowRoot, utils_d_hookSetter as hookSetter, utils_d_inDom as inDom, utils_d_isAncestorRemoved as isAncestorRemoved, utils_d_isBlocked as isBlocked, utils_d_isIgnored as isIgnored, utils_d_isSerialized as isSerialized, utils_d_isSerializedIframe as isSerializedIframe, utils_d_isSerializedStylesheet as isSerializedStylesheet, utils_d_iterateResolveTree as iterateResolveTree, utils_d_legacy_isTouchEvent as legacy_isTouchEvent, utils_d_nowTimestamp as nowTimestamp, utils_d_on as on, utils_d_patch as patch, utils_d_polyfill as polyfill, utils_d_queueToResolveTrees as queueToResolveTrees, utils_d_shadowHostInDom as shadowHostInDom, utils_d_throttle as throttle, utils_d_uniqueTextMutations as uniqueTextMutations };
|
|
1027
996
|
}
|
|
1028
997
|
|
|
1029
998
|
declare class Timer {
|
|
@@ -1458,28 +1427,7 @@ declare const rrweb_record: typeof record;
|
|
|
1458
1427
|
type rrweb_recordOptions<T> = recordOptions<T>;
|
|
1459
1428
|
declare const rrweb_unpack: typeof unpack;
|
|
1460
1429
|
declare namespace rrweb {
|
|
1461
|
-
export {
|
|
1462
|
-
rrweb_EventType as EventType,
|
|
1463
|
-
rrweb_IncrementalSource as IncrementalSource,
|
|
1464
|
-
rrweb_LogData as LogData,
|
|
1465
|
-
rrweb_LogLevel as LogLevel,
|
|
1466
|
-
rrweb_Logger as Logger,
|
|
1467
|
-
rrweb_MouseInteractions as MouseInteractions,
|
|
1468
|
-
rrweb_PLUGIN_NAME as PLUGIN_NAME,
|
|
1469
|
-
rrweb_Replayer as Replayer,
|
|
1470
|
-
rrweb_ReplayerEvents as ReplayerEvents,
|
|
1471
|
-
rrweb_StringifyOptions as StringifyOptions,
|
|
1472
|
-
rrweb_addCustomEvent as addCustomEvent,
|
|
1473
|
-
rrweb_freezePage as freezePage,
|
|
1474
|
-
rrweb_getRecordConsolePlugin as getRecordConsolePlugin,
|
|
1475
|
-
rrweb_getReplayConsolePlugin as getReplayConsolePlugin,
|
|
1476
|
-
_mirror as mirror,
|
|
1477
|
-
rrweb_pack as pack,
|
|
1478
|
-
rrweb_record as record,
|
|
1479
|
-
rrweb_recordOptions as recordOptions,
|
|
1480
|
-
rrweb_unpack as unpack,
|
|
1481
|
-
utils_d as utils,
|
|
1482
|
-
};
|
|
1430
|
+
export { rrweb_EventType as EventType, rrweb_IncrementalSource as IncrementalSource, type rrweb_LogData as LogData, type rrweb_LogLevel as LogLevel, type rrweb_Logger as Logger, rrweb_MouseInteractions as MouseInteractions, rrweb_PLUGIN_NAME as PLUGIN_NAME, rrweb_Replayer as Replayer, rrweb_ReplayerEvents as ReplayerEvents, type rrweb_StringifyOptions as StringifyOptions, rrweb_addCustomEvent as addCustomEvent, rrweb_freezePage as freezePage, rrweb_getRecordConsolePlugin as getRecordConsolePlugin, rrweb_getReplayConsolePlugin as getReplayConsolePlugin, _mirror as mirror, rrweb_pack as pack, rrweb_record as record, type rrweb_recordOptions as recordOptions, rrweb_unpack as unpack, utils_d as utils };
|
|
1483
1431
|
}
|
|
1484
1432
|
|
|
1485
1433
|
interface XhrResponse {
|
|
@@ -1608,7 +1556,7 @@ declare class UpChunk {
|
|
|
1608
1556
|
*/
|
|
1609
1557
|
private sendChunks;
|
|
1610
1558
|
}
|
|
1611
|
-
declare
|
|
1559
|
+
declare function createUpload$1(options: UpChunkOptions): UpChunk;
|
|
1612
1560
|
|
|
1613
1561
|
type _mux_upchunk_ChunkedStreamIterable = ChunkedStreamIterable;
|
|
1614
1562
|
declare const _mux_upchunk_ChunkedStreamIterable: typeof ChunkedStreamIterable;
|
|
@@ -1619,15 +1567,7 @@ type _mux_upchunk_UpChunkOptions = UpChunkOptions;
|
|
|
1619
1567
|
declare const _mux_upchunk_getChunkSizeError: typeof getChunkSizeError;
|
|
1620
1568
|
declare const _mux_upchunk_isValidChunkSize: typeof isValidChunkSize;
|
|
1621
1569
|
declare namespace _mux_upchunk {
|
|
1622
|
-
export {
|
|
1623
|
-
_mux_upchunk_ChunkedStreamIterable as ChunkedStreamIterable,
|
|
1624
|
-
_mux_upchunk_ChunkedStreamIterableOptions as ChunkedStreamIterableOptions,
|
|
1625
|
-
_mux_upchunk_UpChunk as UpChunk,
|
|
1626
|
-
_mux_upchunk_UpChunkOptions as UpChunkOptions,
|
|
1627
|
-
createUpload$1 as createUpload,
|
|
1628
|
-
_mux_upchunk_getChunkSizeError as getChunkSizeError,
|
|
1629
|
-
_mux_upchunk_isValidChunkSize as isValidChunkSize,
|
|
1630
|
-
};
|
|
1570
|
+
export { _mux_upchunk_ChunkedStreamIterable as ChunkedStreamIterable, type _mux_upchunk_ChunkedStreamIterableOptions as ChunkedStreamIterableOptions, _mux_upchunk_UpChunk as UpChunk, type _mux_upchunk_UpChunkOptions as UpChunkOptions, createUpload$1 as createUpload, _mux_upchunk_getChunkSizeError as getChunkSizeError, _mux_upchunk_isValidChunkSize as isValidChunkSize };
|
|
1631
1571
|
}
|
|
1632
1572
|
|
|
1633
1573
|
declare enum NOTIFICATION_TYPES {
|
|
@@ -1876,74 +1816,6 @@ declare class Emitter<Events extends EventMap> {
|
|
|
1876
1816
|
rawListeners<EventName extends keyof Events>(eventName: EventName): Array<Listener<Events[EventName]>>;
|
|
1877
1817
|
}
|
|
1878
1818
|
|
|
1879
|
-
declare enum DismissReason {
|
|
1880
|
-
Closed = "close.click",
|
|
1881
|
-
Complete = "survey.completed",
|
|
1882
|
-
PageChange = "page.change",
|
|
1883
|
-
API = "api",
|
|
1884
|
-
Override = "override"
|
|
1885
|
-
}
|
|
1886
|
-
declare enum SprigEvent {
|
|
1887
|
-
ReplayCapture = "replay.capture",
|
|
1888
|
-
SDKReady = "sdk.ready",
|
|
1889
|
-
SurveyAppeared = "survey.appeared",
|
|
1890
|
-
SurveyClosed = "survey.closed",
|
|
1891
|
-
SurveyDimensions = "survey.dimensions",
|
|
1892
|
-
SurveyFadingOut = "survey.fadingOut",
|
|
1893
|
-
SurveyHeight = "survey.height",
|
|
1894
|
-
SurveyPresented = "survey.presented",
|
|
1895
|
-
SurveyLifeCycle = "survey.lifeCycle",
|
|
1896
|
-
SurveyWidth = "survey.width",
|
|
1897
|
-
SurveyWillClose = "survey.willClose",
|
|
1898
|
-
SurveyWillPresent = "survey.will.present",
|
|
1899
|
-
CloseSurveyOnOverlayClick = "close.survey.overlayClick",
|
|
1900
|
-
VisitorIDUpdated = "visitor.id.updated",
|
|
1901
|
-
QuestionAnswered = "question.answered"
|
|
1902
|
-
}
|
|
1903
|
-
declare enum SprigEventData {
|
|
1904
|
-
SurveyId = "survey.id"
|
|
1905
|
-
}
|
|
1906
|
-
declare const EVENTS: {
|
|
1907
|
-
SDK_READY: SprigEvent;
|
|
1908
|
-
SURVEY_APPEARED: SprigEvent;
|
|
1909
|
-
SURVEY_CLOSED: SprigEvent;
|
|
1910
|
-
SURVEY_DIMENSIONS: SprigEvent;
|
|
1911
|
-
SURVEY_FADING_OUT: SprigEvent;
|
|
1912
|
-
SURVEY_HEIGHT: SprigEvent;
|
|
1913
|
-
SURVEY_PRESENTED: SprigEvent;
|
|
1914
|
-
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
1915
|
-
SURVEY_WILL_CLOSE: SprigEvent;
|
|
1916
|
-
SURVEY_WILL_PRESENT: SprigEvent;
|
|
1917
|
-
QUESTION_ANSWERED: SprigEvent;
|
|
1918
|
-
REPLAY_CAPTURE: SprigEvent;
|
|
1919
|
-
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
1920
|
-
VISITOR_ID_UPDATED: SprigEvent;
|
|
1921
|
-
DATA: {
|
|
1922
|
-
DISMISS_REASONS: {
|
|
1923
|
-
API: DismissReason;
|
|
1924
|
-
CLOSED: DismissReason;
|
|
1925
|
-
COMPLETE: DismissReason;
|
|
1926
|
-
PAGE_CHANGE: DismissReason;
|
|
1927
|
-
OVERRIDE: DismissReason;
|
|
1928
|
-
};
|
|
1929
|
-
SURVEY_ID: SprigEventData;
|
|
1930
|
-
};
|
|
1931
|
-
};
|
|
1932
|
-
declare const enum InternalEventName {
|
|
1933
|
-
VerifyViewVersion = "verify.view.version",
|
|
1934
|
-
CurrentQuestion = "survey.question",
|
|
1935
|
-
ViewPrototypeClick = "question.prototype.click",
|
|
1936
|
-
ViewAgreementClick = "question.agreement.click",
|
|
1937
|
-
RecordedTaskStart = "recorded.task.start",
|
|
1938
|
-
RecordedTaskPermissionScreen = "recorded.task.permission.screen",
|
|
1939
|
-
SurveyComplete = "survey.complete"
|
|
1940
|
-
}
|
|
1941
|
-
declare const enum InternalEventData {
|
|
1942
|
-
ViewVersion = "view.version",
|
|
1943
|
-
QuestionId = "qid",
|
|
1944
|
-
Props = "props"
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
1819
|
declare const enum MediaType {
|
|
1948
1820
|
Video = "video",
|
|
1949
1821
|
Audio = "audio",
|
|
@@ -1986,34 +1858,6 @@ interface PassthroughData {
|
|
|
1986
1858
|
responseGroupUid: UUID;
|
|
1987
1859
|
}
|
|
1988
1860
|
|
|
1989
|
-
interface Experiment {
|
|
1990
|
-
id: string;
|
|
1991
|
-
variation?: string;
|
|
1992
|
-
}
|
|
1993
|
-
|
|
1994
|
-
type QueueItem = [string, ...unknown[]] | (() => void);
|
|
1995
|
-
declare class SprigQueue {
|
|
1996
|
-
paused: boolean;
|
|
1997
|
-
queue: QueueItem[];
|
|
1998
|
-
ul: WindowSprig;
|
|
1999
|
-
constructor(ul: WindowSprig, queue: QueueItem[]);
|
|
2000
|
-
flush(queue: QueueItem[]): void;
|
|
2001
|
-
isPaused(): boolean;
|
|
2002
|
-
pause(): void;
|
|
2003
|
-
unpause(): void;
|
|
2004
|
-
push(action: QueueItem): void;
|
|
2005
|
-
perform(func: () => void): void | Promise<unknown>;
|
|
2006
|
-
/**
|
|
2007
|
-
* Removes all queued items
|
|
2008
|
-
*/
|
|
2009
|
-
empty(): void;
|
|
2010
|
-
}
|
|
2011
|
-
|
|
2012
|
-
declare enum SurveyState {
|
|
2013
|
-
Ready = "ready",
|
|
2014
|
-
NoSurvey = "no survey"
|
|
2015
|
-
}
|
|
2016
|
-
|
|
2017
1861
|
interface RecordedTaskResponseValueType {
|
|
2018
1862
|
mediaRecordingUids?: string[] | null;
|
|
2019
1863
|
taskDurationMillisecond?: number;
|
|
@@ -2253,7 +2097,9 @@ interface MultipleChoiceOption {
|
|
|
2253
2097
|
id: number;
|
|
2254
2098
|
label: string;
|
|
2255
2099
|
optionProperties: null | {
|
|
2256
|
-
allowsTextEntry
|
|
2100
|
+
allowsTextEntry?: boolean;
|
|
2101
|
+
noneOfTheAbove?: boolean;
|
|
2102
|
+
isPinned?: boolean;
|
|
2257
2103
|
};
|
|
2258
2104
|
order: number;
|
|
2259
2105
|
productId: number;
|
|
@@ -2269,7 +2115,7 @@ interface CommonMultipleChoiceProps {
|
|
|
2269
2115
|
buttonText?: string;
|
|
2270
2116
|
captionText: string;
|
|
2271
2117
|
conceptUrl: ConceptUrl;
|
|
2272
|
-
randomize: "none" | "
|
|
2118
|
+
randomize: "none" | "all";
|
|
2273
2119
|
required: boolean;
|
|
2274
2120
|
};
|
|
2275
2121
|
}
|
|
@@ -2345,12 +2191,132 @@ interface VideoVoiceCard extends BaseCard {
|
|
|
2345
2191
|
}
|
|
2346
2192
|
type Card = TextUrlPromptCard | ConsentLegalCard | RecordedTaskCard | LikertCard | OpenTextCard | MatrixCard | MultipleChoiceSingleSelectCard | MultipleChoiceMultiSelectCard | NPSCard | VideoVoiceCard;
|
|
2347
2193
|
|
|
2194
|
+
type MatchType = "exactly" | "legacy";
|
|
2195
|
+
interface InteractiveEvent {
|
|
2196
|
+
id: number;
|
|
2197
|
+
matchType: MatchType;
|
|
2198
|
+
name: string;
|
|
2199
|
+
pattern: string;
|
|
2200
|
+
properties: {
|
|
2201
|
+
innerText: string;
|
|
2202
|
+
selector?: string;
|
|
2203
|
+
type?: "click";
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2206
|
+
interface PageUrlEvent {
|
|
2207
|
+
id: number;
|
|
2208
|
+
matchType: MatchType | "contains" | "notContains" | "regex" | "startsWith";
|
|
2209
|
+
pattern: string;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
declare enum DismissReason {
|
|
2213
|
+
Closed = "close.click",
|
|
2214
|
+
Complete = "survey.completed",
|
|
2215
|
+
PageChange = "page.change",
|
|
2216
|
+
API = "api",
|
|
2217
|
+
Override = "override"
|
|
2218
|
+
}
|
|
2219
|
+
declare enum SprigEvent {
|
|
2220
|
+
ReplayCapture = "replay.capture",
|
|
2221
|
+
SDKReady = "sdk.ready",
|
|
2222
|
+
SurveyAppeared = "survey.appeared",
|
|
2223
|
+
SurveyClosed = "survey.closed",
|
|
2224
|
+
SurveyDimensions = "survey.dimensions",
|
|
2225
|
+
SurveyFadingOut = "survey.fadingOut",
|
|
2226
|
+
SurveyHeight = "survey.height",
|
|
2227
|
+
SurveyPresented = "survey.presented",
|
|
2228
|
+
SurveyLifeCycle = "survey.lifeCycle",
|
|
2229
|
+
SurveyWidth = "survey.width",
|
|
2230
|
+
SurveyWillClose = "survey.willClose",
|
|
2231
|
+
SurveyWillPresent = "survey.will.present",
|
|
2232
|
+
CloseSurveyOnOverlayClick = "close.survey.overlayClick",
|
|
2233
|
+
VisitorIDUpdated = "visitor.id.updated",
|
|
2234
|
+
QuestionAnswered = "question.answered"
|
|
2235
|
+
}
|
|
2236
|
+
declare enum SprigEventData {
|
|
2237
|
+
SurveyId = "survey.id"
|
|
2238
|
+
}
|
|
2239
|
+
declare const EVENTS: {
|
|
2240
|
+
SDK_READY: SprigEvent;
|
|
2241
|
+
SURVEY_APPEARED: SprigEvent;
|
|
2242
|
+
SURVEY_CLOSED: SprigEvent;
|
|
2243
|
+
SURVEY_DIMENSIONS: SprigEvent;
|
|
2244
|
+
SURVEY_FADING_OUT: SprigEvent;
|
|
2245
|
+
SURVEY_HEIGHT: SprigEvent;
|
|
2246
|
+
SURVEY_PRESENTED: SprigEvent;
|
|
2247
|
+
SURVEY_LIFE_CYCLE: SprigEvent;
|
|
2248
|
+
SURVEY_WILL_CLOSE: SprigEvent;
|
|
2249
|
+
SURVEY_WILL_PRESENT: SprigEvent;
|
|
2250
|
+
QUESTION_ANSWERED: SprigEvent;
|
|
2251
|
+
REPLAY_CAPTURE: SprigEvent;
|
|
2252
|
+
CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
|
|
2253
|
+
VISITOR_ID_UPDATED: SprigEvent;
|
|
2254
|
+
DATA: {
|
|
2255
|
+
DISMISS_REASONS: {
|
|
2256
|
+
API: DismissReason;
|
|
2257
|
+
CLOSED: DismissReason;
|
|
2258
|
+
COMPLETE: DismissReason;
|
|
2259
|
+
PAGE_CHANGE: DismissReason;
|
|
2260
|
+
OVERRIDE: DismissReason;
|
|
2261
|
+
};
|
|
2262
|
+
SURVEY_ID: SprigEventData;
|
|
2263
|
+
};
|
|
2264
|
+
};
|
|
2265
|
+
declare const enum InternalEventName {
|
|
2266
|
+
VerifyViewVersion = "verify.view.version",
|
|
2267
|
+
CurrentQuestion = "survey.question",
|
|
2268
|
+
ViewPrototypeClick = "question.prototype.click",
|
|
2269
|
+
ViewAgreementClick = "question.agreement.click",
|
|
2270
|
+
RecordedTaskStart = "recorded.task.start",
|
|
2271
|
+
RecordedTaskPermissionScreen = "recorded.task.permission.screen",
|
|
2272
|
+
SurveyComplete = "survey.complete"
|
|
2273
|
+
}
|
|
2274
|
+
declare const enum InternalEventData {
|
|
2275
|
+
ViewVersion = "view.version",
|
|
2276
|
+
QuestionId = "qid",
|
|
2277
|
+
Props = "props"
|
|
2278
|
+
}
|
|
2279
|
+
|
|
2348
2280
|
interface RecordedTaskResponseType {
|
|
2349
2281
|
questionId: number;
|
|
2350
2282
|
type: CardType;
|
|
2351
2283
|
value: RecordedTaskResponseValueType;
|
|
2352
2284
|
}
|
|
2353
2285
|
|
|
2286
|
+
declare enum ReplayDurationType {
|
|
2287
|
+
After = "after",
|
|
2288
|
+
Before = "before",
|
|
2289
|
+
BeforeAndAfter = "beforeAndAfter"
|
|
2290
|
+
}
|
|
2291
|
+
declare enum ReplayEventType {
|
|
2292
|
+
Click = "Sprig_Click",
|
|
2293
|
+
Event = "Sprig_TrackEvent",
|
|
2294
|
+
PageView = "Sprig_PageView",
|
|
2295
|
+
SurveyShown = "Sprig_ShowSurvey",
|
|
2296
|
+
SurveySubmitted = "Sprig_SubmitSurvey",
|
|
2297
|
+
Noop = "Sprig_Noop"
|
|
2298
|
+
}
|
|
2299
|
+
type EventDigest = {
|
|
2300
|
+
timestamp: number;
|
|
2301
|
+
type: ReplayEventType.Click;
|
|
2302
|
+
} | {
|
|
2303
|
+
timestamp: number;
|
|
2304
|
+
name: string;
|
|
2305
|
+
type: ReplayEventType.Event;
|
|
2306
|
+
} | {
|
|
2307
|
+
timestamp: number;
|
|
2308
|
+
type: ReplayEventType.PageView;
|
|
2309
|
+
url: string;
|
|
2310
|
+
} | {
|
|
2311
|
+
timestamp: number;
|
|
2312
|
+
surveyId: string;
|
|
2313
|
+
type: ReplayEventType.SurveyShown;
|
|
2314
|
+
} | {
|
|
2315
|
+
timestamp: number;
|
|
2316
|
+
surveyId: string;
|
|
2317
|
+
type: ReplayEventType.SurveySubmitted;
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2354
2320
|
interface MobileReplayConfig {
|
|
2355
2321
|
maxMobileReplayDurationSeconds?: number;
|
|
2356
2322
|
mobileReplaySettings?: {
|
|
@@ -2491,24 +2457,6 @@ type SprigEventMap = {
|
|
|
2491
2457
|
declare const eventEmitter: Emitter<SprigEventMap>;
|
|
2492
2458
|
type SprigEventEmitter = typeof eventEmitter;
|
|
2493
2459
|
|
|
2494
|
-
type MatchType = "exactly" | "legacy";
|
|
2495
|
-
interface InteractiveEvent {
|
|
2496
|
-
id: number;
|
|
2497
|
-
matchType: MatchType;
|
|
2498
|
-
name: string;
|
|
2499
|
-
pattern: string;
|
|
2500
|
-
properties: {
|
|
2501
|
-
innerText: string;
|
|
2502
|
-
selector?: string;
|
|
2503
|
-
type?: "click";
|
|
2504
|
-
};
|
|
2505
|
-
}
|
|
2506
|
-
interface PageUrlEvent {
|
|
2507
|
-
id: number;
|
|
2508
|
-
matchType: MatchType | "contains" | "notContains" | "regex" | "startsWith";
|
|
2509
|
-
pattern: string;
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
2460
|
declare const enum FramePosition {
|
|
2513
2461
|
BottomLeft = "bottomLeft",
|
|
2514
2462
|
BottomRight = "bottomRight",
|
|
@@ -2598,7 +2546,7 @@ interface Config extends MobileReplayConfig {
|
|
|
2598
2546
|
/** @example "2.18.0" */
|
|
2599
2547
|
"x-ul-sdk-version": string;
|
|
2600
2548
|
/** For web-bundled sdk */
|
|
2601
|
-
"x-ul-
|
|
2549
|
+
"x-ul-package-version"?: string;
|
|
2602
2550
|
[HttpHeader.UserID]?: string;
|
|
2603
2551
|
[HttpHeader.VisitorID]?: UUID;
|
|
2604
2552
|
};
|
|
@@ -2651,39 +2599,33 @@ interface Config extends MobileReplayConfig {
|
|
|
2651
2599
|
};
|
|
2652
2600
|
}
|
|
2653
2601
|
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
BeforeAndAfter = "beforeAndAfter"
|
|
2602
|
+
interface Experiment {
|
|
2603
|
+
id: string;
|
|
2604
|
+
variation?: string;
|
|
2658
2605
|
}
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2606
|
+
|
|
2607
|
+
type QueueItem = [string, ...unknown[]] | (() => void);
|
|
2608
|
+
declare class SprigQueue {
|
|
2609
|
+
paused: boolean;
|
|
2610
|
+
queue: QueueItem[];
|
|
2611
|
+
ul: WindowSprig;
|
|
2612
|
+
constructor(ul: WindowSprig, queue: QueueItem[]);
|
|
2613
|
+
flush(queue: QueueItem[]): void;
|
|
2614
|
+
isPaused(): boolean;
|
|
2615
|
+
pause(): void;
|
|
2616
|
+
unpause(): void;
|
|
2617
|
+
push(action: QueueItem): void;
|
|
2618
|
+
perform(func: () => void): void | Promise<unknown>;
|
|
2619
|
+
/**
|
|
2620
|
+
* Removes all queued items
|
|
2621
|
+
*/
|
|
2622
|
+
empty(): void;
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
declare enum SurveyState {
|
|
2626
|
+
Ready = "ready",
|
|
2627
|
+
NoSurvey = "no survey"
|
|
2666
2628
|
}
|
|
2667
|
-
type EventDigest = {
|
|
2668
|
-
timestamp: number;
|
|
2669
|
-
type: ReplayEventType.Click;
|
|
2670
|
-
} | {
|
|
2671
|
-
timestamp: number;
|
|
2672
|
-
name: string;
|
|
2673
|
-
type: ReplayEventType.Event;
|
|
2674
|
-
} | {
|
|
2675
|
-
timestamp: number;
|
|
2676
|
-
type: ReplayEventType.PageView;
|
|
2677
|
-
url: string;
|
|
2678
|
-
} | {
|
|
2679
|
-
timestamp: number;
|
|
2680
|
-
surveyId: string;
|
|
2681
|
-
type: ReplayEventType.SurveyShown;
|
|
2682
|
-
} | {
|
|
2683
|
-
timestamp: number;
|
|
2684
|
-
surveyId: string;
|
|
2685
|
-
type: ReplayEventType.SurveySubmitted;
|
|
2686
|
-
};
|
|
2687
2629
|
|
|
2688
2630
|
declare namespace optimizely {
|
|
2689
2631
|
interface Optimizely {
|
|
@@ -2780,7 +2722,7 @@ declare namespace sprigConfig {
|
|
|
2780
2722
|
importLaunchDarklyData: (data: Record<string, number | undefined>) => void;
|
|
2781
2723
|
integrateOptimizely: (
|
|
2782
2724
|
strData: string | { experiments: Experiment[] },
|
|
2783
|
-
isOverride?: boolean
|
|
2725
|
+
isOverride?: boolean,
|
|
2784
2726
|
) => void;
|
|
2785
2727
|
integrateOptimizelyClient: (client: Client) => void;
|
|
2786
2728
|
logoutUser: () => void;
|
|
@@ -2790,22 +2732,22 @@ declare namespace sprigConfig {
|
|
|
2790
2732
|
removeAttributes: (attributes: SprigAttributes) => IdentifyResult;
|
|
2791
2733
|
removeListener: (
|
|
2792
2734
|
event: SprigEvent,
|
|
2793
|
-
listener: SprigListener
|
|
2735
|
+
listener: SprigListener,
|
|
2794
2736
|
) => Promise<void>;
|
|
2795
2737
|
removeSurveyListener: (listener: SprigListener) => Promise<void>;
|
|
2796
2738
|
reviewSurvey: (surveyId: number) => void;
|
|
2797
2739
|
setAttribute: (attribute: string, value: string | number) => IdentifyResult;
|
|
2798
2740
|
setAttributes: (attributes?: SprigAttributes) => IdentifyResult;
|
|
2799
2741
|
setPartnerAnonymousId: (
|
|
2800
|
-
partnerAnonymousId: string
|
|
2742
|
+
partnerAnonymousId: string,
|
|
2801
2743
|
) => Promise<{ success: boolean; message?: string }>;
|
|
2802
2744
|
setVisitorAttribute: (
|
|
2803
2745
|
attribute: string,
|
|
2804
|
-
value: string | number
|
|
2746
|
+
value: string | number,
|
|
2805
2747
|
) => IdentifyResult;
|
|
2806
2748
|
setWindowDimensions: (
|
|
2807
2749
|
width: number | string,
|
|
2808
|
-
height: number | string
|
|
2750
|
+
height: number | string,
|
|
2809
2751
|
) => void;
|
|
2810
2752
|
setEmail: (email: string) => IdentifyResult;
|
|
2811
2753
|
setPreviewKey: (previewKey: string) => void;
|
|
@@ -2817,12 +2759,12 @@ declare namespace sprigConfig {
|
|
|
2817
2759
|
eventName: string,
|
|
2818
2760
|
properties?: TrackPayload["properties"],
|
|
2819
2761
|
metadata?: SprigMetadata,
|
|
2820
|
-
showSurveyCallback?: (surveyId?: number) => Promise<boolean
|
|
2762
|
+
showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
|
|
2821
2763
|
) => IdentifyResult;
|
|
2822
2764
|
trackPageView: (
|
|
2823
2765
|
url: string,
|
|
2824
2766
|
properties?: SprigProperties,
|
|
2825
|
-
showSurveyCallback?: (surveyId?: number) => Promise<boolean
|
|
2767
|
+
showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
|
|
2826
2768
|
) => void;
|
|
2827
2769
|
unmute: () => void;
|
|
2828
2770
|
}
|
|
@@ -2874,16 +2816,19 @@ type ArgumentType<T> = T extends (arg1: infer U, ...args: unknown[]) => unknown
|
|
|
2874
2816
|
? U
|
|
2875
2817
|
: unknown;
|
|
2876
2818
|
type PublicOf<T> = { [K in keyof T]: T[K] };
|
|
2877
|
-
type createUpload = typeof _mux_upchunk["createUpload"];
|
|
2878
|
-
type rrwebRecord = typeof rrweb["record"];
|
|
2879
|
-
type rrwebCustomEvent = typeof rrweb["record"]["addCustomEvent"];
|
|
2819
|
+
type createUpload = (typeof _mux_upchunk)["createUpload"];
|
|
2820
|
+
type rrwebRecord = (typeof rrweb)["record"];
|
|
2821
|
+
type rrwebCustomEvent = (typeof rrweb)["record"]["addCustomEvent"];
|
|
2880
2822
|
declare global {
|
|
2881
2823
|
interface Window {
|
|
2882
2824
|
__cfg: Config;
|
|
2883
2825
|
attachEvent?: typeof window.addEventListener;
|
|
2826
|
+
Backbone: {
|
|
2827
|
+
history: typeof window.history;
|
|
2828
|
+
};
|
|
2884
2829
|
Intercom: { ul_wasVisible?: boolean } & ((
|
|
2885
2830
|
method: string,
|
|
2886
|
-
data: unknown
|
|
2831
|
+
data: unknown,
|
|
2887
2832
|
) => void);
|
|
2888
2833
|
optimizely?: optimizely.Optimizely;
|
|
2889
2834
|
optimizelyDatafile?: object;
|
|
@@ -2901,7 +2846,7 @@ declare global {
|
|
|
2901
2846
|
...args: ArgumentTypes<rrwebCustomEvent>
|
|
2902
2847
|
) => PublicOf<ReturnType<rrwebCustomEvent>>;
|
|
2903
2848
|
} & ((
|
|
2904
|
-
arg: Omit<ArgumentType<rrwebRecord>, "hooks"
|
|
2849
|
+
arg: Omit<ArgumentType<rrwebRecord>, "hooks">,
|
|
2905
2850
|
) => PublicOf<ReturnType<rrwebRecord>>);
|
|
2906
2851
|
sprigAPI?: object;
|
|
2907
2852
|
}
|
|
@@ -3072,4 +3017,4 @@ declare const _default: {
|
|
|
3072
3017
|
configure: (config: NpmConfig) => sprigConfig.WindowSprig;
|
|
3073
3018
|
};
|
|
3074
3019
|
|
|
3075
|
-
export { DismissReason, SprigAPI, SprigEvent, WindowSprig$1 as WindowSprig, _default as default, sprig };
|
|
3020
|
+
export { DismissReason, SprigAPI, SprigEvent, type WindowSprig$1 as WindowSprig, _default as default, sprig };
|