@blotoutio/providers-live-intent-sdk 0.26.5 → 0.27.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/index.cjs.js ADDED
@@ -0,0 +1,51 @@
1
+ 'use strict';
2
+
3
+ const getCookieValue = (key) => {
4
+ try {
5
+ if (!document || !document.cookie) {
6
+ return '';
7
+ }
8
+ const name = `${key}=`;
9
+ const decodedCookie = decodeURIComponent(document.cookie);
10
+ const ca = decodedCookie.split(';');
11
+ for (let i = 0; i < ca.length; i++) {
12
+ let c = ca[i];
13
+ while (c.charAt(0) === ' ') {
14
+ c = c.substring(1);
15
+ }
16
+ if (c.indexOf(name) === 0) {
17
+ return c.substring(name.length, c.length);
18
+ }
19
+ }
20
+ return '';
21
+ }
22
+ catch {
23
+ return '';
24
+ }
25
+ };
26
+
27
+ const tag = () => {
28
+ const isLoaded = window && window.LI && !!getCookieValue('lidid');
29
+ return {
30
+ loaded: isLoaded,
31
+ sdkVersion: "0.27.0" ,
32
+ };
33
+ };
34
+
35
+ const data = {
36
+ name: 'liveIntent',
37
+ tag,
38
+ };
39
+ try {
40
+ if (window) {
41
+ if (!window.edgetagProviders) {
42
+ window.edgetagProviders = [];
43
+ }
44
+ window.edgetagProviders.push(data);
45
+ }
46
+ }
47
+ catch {
48
+ // No window
49
+ }
50
+
51
+ module.exports = data;
package/index.js CHANGED
@@ -29,7 +29,7 @@ var ProvidersLiveIntentSdk = (function () {
29
29
  const isLoaded = window && window.LI && !!getCookieValue('lidid');
30
30
  return {
31
31
  loaded: isLoaded,
32
- sdkVersion: "0.26.5" ,
32
+ sdkVersion: "0.27.0" ,
33
33
  };
34
34
  };
35
35
 
package/index.mjs ADDED
@@ -0,0 +1,49 @@
1
+ const getCookieValue = (key) => {
2
+ try {
3
+ if (!document || !document.cookie) {
4
+ return '';
5
+ }
6
+ const name = `${key}=`;
7
+ const decodedCookie = decodeURIComponent(document.cookie);
8
+ const ca = decodedCookie.split(';');
9
+ for (let i = 0; i < ca.length; i++) {
10
+ let c = ca[i];
11
+ while (c.charAt(0) === ' ') {
12
+ c = c.substring(1);
13
+ }
14
+ if (c.indexOf(name) === 0) {
15
+ return c.substring(name.length, c.length);
16
+ }
17
+ }
18
+ return '';
19
+ }
20
+ catch {
21
+ return '';
22
+ }
23
+ };
24
+
25
+ const tag = () => {
26
+ const isLoaded = window && window.LI && !!getCookieValue('lidid');
27
+ return {
28
+ loaded: isLoaded,
29
+ sdkVersion: "0.27.0" ,
30
+ };
31
+ };
32
+
33
+ const data = {
34
+ name: 'liveIntent',
35
+ tag,
36
+ };
37
+ try {
38
+ if (window) {
39
+ if (!window.edgetagProviders) {
40
+ window.edgetagProviders = [];
41
+ }
42
+ window.edgetagProviders.push(data);
43
+ }
44
+ }
45
+ catch {
46
+ // No window
47
+ }
48
+
49
+ export { data as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-live-intent-sdk",
3
- "version": "0.26.5",
3
+ "version": "0.27.0",
4
4
  "description": "LiveIntent Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",
@@ -8,13 +8,16 @@
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
11
- "main": "./index.js",
11
+ "main": "./index.cjs.js",
12
+ "module": "./index.mjs",
12
13
  "repository": {
13
14
  "type": "git",
14
15
  "url": "git+https://github.com/blotoutio/edgetag-sdk.git"
15
16
  },
16
17
  "files": [
17
18
  "index.js",
19
+ "index.cjs.js",
20
+ "index.mjs",
18
21
  "package.json",
19
22
  "README.md"
20
23
  ]