@sprig-technologies/sprig-browser 2.14.2 → 2.14.3

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.
@@ -1,4 +1,3 @@
1
- /* globals UserLeap */
2
1
  import 'core-js';
3
2
 
4
3
  // Queue is an intermediatator for calls from developers
@@ -10,7 +9,7 @@ import 'core-js';
10
9
  //
11
10
  // Pause functionality is used internally to enable UI actions
12
11
  // to be delayed while Userleap is 'muted'
13
- UserLeap.Queue = class {
12
+ export const UserLeapQueue = class {
14
13
  constructor(ul, queue) {
15
14
  this.ul = ul;
16
15
  this.paused = false;
package/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  /* global window */
2
2
 
3
3
  import { INSTALLATION_METHOD } from './shared/constants';
4
+ import sprigInitializer from './controller/controller';
5
+
4
6
  class SprigAPI {
5
7
  /**
6
8
  * Triggers displaying specified survey. Does submit answers!
@@ -200,7 +202,6 @@ export default {
200
202
  S.appId = config.envId;
201
203
  S._queue = [];
202
204
  window.UserLeap = S;
203
- const sprigInitializer = require('./controller/controller').default;
204
205
  sprigInitializer(config);
205
206
  return window.Sprig;
206
207
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprig-technologies/sprig-browser",
3
- "version": "2.14.2",
3
+ "version": "2.14.3",
4
4
  "description": "npm package for the sprig web sdk",
5
5
  "browser": "index.js",
6
6
  "scripts": {
package/shared/network.js CHANGED
@@ -25,7 +25,7 @@ export function getHttpHeaders(Sprig = {}) {
25
25
  const headers = {
26
26
  'Content-Type': 'application/json',
27
27
  'userleap-platform': 'web',
28
- 'x-ul-sdk-version': '2.14.2', //version here doesn't matter. it is string-replaced when compiled
28
+ 'x-ul-sdk-version': '2.14.3', //version here doesn't matter. it is string-replaced when compiled
29
29
  };
30
30
  if (Sprig.envId) headers[HEADERS.ENVIRONMENT_ID] = Sprig.envId;
31
31
  if (Sprig.token) headers['Authorization'] = 'Bearer ' + Sprig.token;