@sprig-technologies/sprig-bundled 1.1.6 → 1.1.8

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.cjs CHANGED
@@ -1 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CY2H9MX9.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-MkVSshrN.cjs");exports.DismissReason=e.DismissReason,exports.SprigAPI=e.SprigAPI,exports.SprigEvent=e.SprigEvent,exports.sprig=e.sprig;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -1028,6 +1028,7 @@ interface BaseCard {
1028
1028
  updatedAt: string;
1029
1029
  value?: unknown;
1030
1030
  type: CardType;
1031
+ groupId?: number;
1031
1032
  }
1032
1033
  type Comparator = "answered" | "contains" | "notcontains" | "list_dni" | "eq" | "given_up" | "gt" | "gte" | "lt" | "lte" | "list_all" | "list_alo" | "list_exact" | "neq" | "partial" | "skipped";
1033
1034
  type DefaultComparator = Extract<Comparator, "answered" | "skipped">;
@@ -1340,12 +1341,15 @@ declare enum DismissReason {
1340
1341
  API = "api",// JS called Sprig('dismissActiveSurvey')
1341
1342
  Override = "override"
1342
1343
  }
1343
- type StudyType = "feedbackButton" | "inProductSurvey";
1344
+ type StudyType = "feedbackButton" | "inProductSurvey" | "longFormSurvey";
1344
1345
  declare enum SprigEvent {
1345
1346
  ReplayCapture = "replay.capture",
1347
+ ReplayPaused = "replay.paused",
1348
+ ReplayResumed = "replay.resumed",
1346
1349
  FeedbackButtonLoaded = "feedback.button.loaded",
1347
1350
  SDKReady = "sdk.ready",
1348
1351
  SurveyAppeared = "survey.appeared",
1352
+ SurveyCloseRequested = "survey.closeRequested",//This event signals to mobile the survey overlay can close
1349
1353
  SurveyClosed = "survey.closed",
1350
1354
  SurveyDimensions = "survey.dimensions",
1351
1355
  SurveyFadingOut = "survey.fadingOut",
@@ -1485,6 +1489,14 @@ type SprigEventMap = {
1485
1489
  "survey.id": number;
1486
1490
  }
1487
1491
  ];
1492
+ [SprigEvent.SurveyCloseRequested]: [
1493
+ {
1494
+ initiator: DismissReason;
1495
+ name?: string;
1496
+ studyType?: StudyType;
1497
+ "survey.id": number;
1498
+ }
1499
+ ];
1488
1500
  [SprigEvent.SurveyWillClose]: [
1489
1501
  {
1490
1502
  initiator: DismissReason;
@@ -1530,6 +1542,8 @@ type SprigEventMap = {
1530
1542
  surveyId: number;
1531
1543
  }
1532
1544
  ];
1545
+ [SprigEvent.ReplayPaused]: [];
1546
+ [SprigEvent.ReplayResumed]: [];
1533
1547
  "av.permission": [
1534
1548
  {
1535
1549
  "stream.ready": (avStream: MediaStream | null, captureStream?: MediaStream | null) => void;
@@ -1663,6 +1677,7 @@ interface Config extends MobileReplayConfig {
1663
1677
  mode?: string;
1664
1678
  mute?: boolean;
1665
1679
  optimizelyEnabled?: boolean;
1680
+ outstandingTransactionLimit?: number | null;
1666
1681
  overlayStyle: "light";
1667
1682
  overlayStyleMobile: "none";
1668
1683
  pageUrlEvents: PageUrlEvent[];
@@ -1740,6 +1755,12 @@ type EventDigest = {
1740
1755
  timestamp: number;
1741
1756
  surveyId: string;
1742
1757
  type: "Sprig_SubmitSurvey";
1758
+ } | {
1759
+ timestamp: number;
1760
+ type: "Sprig_ReplayPaused";
1761
+ } | {
1762
+ timestamp: number;
1763
+ type: "Sprig_ReplayResumed";
1743
1764
  };
1744
1765
 
1745
1766
  declare namespace optimizely {
@@ -1888,7 +1909,10 @@ declare namespace sprigConfig {
1888
1909
  showSurveyCallback?: (surveyId?: number) => Promise<boolean>,
1889
1910
  calledFromApi?: boolean,
1890
1911
  ) => void;
1912
+ trackHistory?: ({ event: string }) => void;
1891
1913
  unmute: () => void;
1914
+ pauseReplayRecording: () => void;
1915
+ resumeReplayRecording: () => void;
1892
1916
  }
1893
1917
 
1894
1918
  type SprigCommand = keyof SprigAPIActions;
@@ -1924,6 +1948,7 @@ declare namespace sprigConfig {
1924
1948
  locale?: string;
1925
1949
  maxHeight?: number | string;
1926
1950
  maxInflightReplayRequests?: number;
1951
+ outstandingTransactionLimit?: number | null;
1927
1952
  mobileHeadersJSON?: string;
1928
1953
  nonce?: string;
1929
1954
  partnerAnonymousId: string | null;
@@ -2003,22 +2028,24 @@ declare class SprigAPI {
2003
2028
  SURVEY_DIMENSIONS: SprigEvent;
2004
2029
  SURVEY_FADING_OUT: SprigEvent;
2005
2030
  SURVEY_HEIGHT: SprigEvent;
2006
- SURVEY_WIDTH: SprigEvent; /**
2007
- * Track an event to show survey if eligible
2008
- * @param eventName name of event to track
2009
- */
2031
+ SURVEY_WIDTH: SprigEvent;
2010
2032
  SURVEY_PRESENTED: SprigEvent;
2011
2033
  SURVEY_LIFE_CYCLE: SprigEvent;
2012
2034
  SURVEY_WILL_CLOSE: SprigEvent;
2013
2035
  SURVEY_WILL_PRESENT: SprigEvent;
2014
2036
  QUESTION_ANSWERED: SprigEvent;
2015
2037
  REPLAY_CAPTURE: SprigEvent;
2016
- CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent;
2038
+ CLOSE_SURVEY_ON_OVERLAY_CLICK: SprigEvent; /**
2039
+ * Tracks a page view with the provided URL and additional event properties.
2040
+ */
2017
2041
  VISITOR_ID_UPDATED: SprigEvent;
2018
2042
  DATA: {
2019
2043
  DISMISS_REASONS: {
2020
2044
  API: DismissReason;
2021
2045
  CLOSED: DismissReason;
2046
+ /**
2047
+ * Apply a css string representing the customized styles
2048
+ */
2022
2049
  COMPLETE: DismissReason;
2023
2050
  PAGE_CHANGE: DismissReason;
2024
2051
  OVERRIDE: DismissReason;
@@ -2120,6 +2147,14 @@ declare class SprigAPI {
2120
2147
  * Clears Sprig from window
2121
2148
  */
2122
2149
  teardown(): void;
2150
+ /**
2151
+ * Pause replay recording
2152
+ */
2153
+ pauseReplayRecording(): void;
2154
+ /**
2155
+ * Resume replay recording
2156
+ */
2157
+ resumeReplayRecording(): void;
2123
2158
  }
2124
2159
  type NpmConfig = {
2125
2160
  envId?: string;
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
- import { D as i, j as r, S as p, k as e } from "./index-_6NzDQiF.js";
1
+ import { b as i, l as r, S as p, m as e } from "./index-BnOajwL7.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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}