@blotoutio/edgetag-sdk-js 1.42.0 → 1.44.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.
Files changed (3) hide show
  1. package/index.cjs.js +11 -11
  2. package/index.mjs +11 -11
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -26,8 +26,8 @@ const hasUserConsent = (consent, provider, tagName) => {
26
26
  var _a, _b;
27
27
  let allowed = false;
28
28
  if (isRecord(consent.consentChannel)) {
29
- allowed = isBool(consent.consentChannel.all)
30
- ? consent.consentChannel.all
29
+ allowed = isBool(consent.consentChannel['all'])
30
+ ? consent.consentChannel['all']
31
31
  : false;
32
32
  if (provider in consent.consentChannel) {
33
33
  const providerSpecific = consent.consentChannel[provider];
@@ -35,8 +35,8 @@ const hasUserConsent = (consent, provider, tagName) => {
35
35
  allowed = providerSpecific;
36
36
  }
37
37
  else if (isRecord(providerSpecific)) {
38
- if ('all' in providerSpecific && isBool(providerSpecific.all)) {
39
- allowed = providerSpecific.all;
38
+ if ('all' in providerSpecific && isBool(providerSpecific['all'])) {
39
+ allowed = providerSpecific['all'];
40
40
  }
41
41
  if (tagName in providerSpecific && isBool(providerSpecific[tagName])) {
42
42
  allowed = providerSpecific[tagName];
@@ -49,8 +49,8 @@ const hasUserConsent = (consent, provider, tagName) => {
49
49
  }
50
50
  if (isRecord(consent.consentCategory) &&
51
51
  isRecord((_a = consent.consentSettings) === null || _a === void 0 ? void 0 : _a.channels)) {
52
- allowed = isBool(consent.consentCategory.all)
53
- ? consent.consentCategory.all
52
+ allowed = isBool(consent.consentCategory['all'])
53
+ ? consent.consentCategory['all']
54
54
  : false;
55
55
  const category = (_b = Object.entries(consent.consentSettings.channels).find(([, value]) => {
56
56
  return value.includes(provider);
@@ -79,14 +79,14 @@ const isProviderInstanceAllowed = (providersConfig, provider, tagName) => {
79
79
  if (tagName in providerSpecific && isBool(providerSpecific[tagName])) {
80
80
  return providerSpecific[tagName];
81
81
  }
82
- return isBool(providerSpecific.all)
83
- ? providerSpecific.all
82
+ return isBool(providerSpecific['all'])
83
+ ? providerSpecific['all']
84
84
  : tagKeys.length == 0;
85
85
  }
86
86
  }
87
87
  const providerKeys = Object.keys(providersConfig).filter((k) => k != 'all');
88
- return isBool(providersConfig.all)
89
- ? providersConfig.all
88
+ return isBool(providersConfig['all'])
89
+ ? providersConfig['all']
90
90
  : providerKeys.length == 0;
91
91
  };
92
92
 
@@ -1306,7 +1306,7 @@ const getStandardPayload = (destination, payload) => {
1306
1306
  referrer: getReferrer(destination),
1307
1307
  search: getSearch(destination),
1308
1308
  locale: getLocale(),
1309
- sdkVersion: "1.42.0" ,
1309
+ sdkVersion: "1.44.0" ,
1310
1310
  ...(payload || {}),
1311
1311
  };
1312
1312
  let storage = {};
package/index.mjs CHANGED
@@ -24,8 +24,8 @@ const hasUserConsent = (consent, provider, tagName) => {
24
24
  var _a, _b;
25
25
  let allowed = false;
26
26
  if (isRecord(consent.consentChannel)) {
27
- allowed = isBool(consent.consentChannel.all)
28
- ? consent.consentChannel.all
27
+ allowed = isBool(consent.consentChannel['all'])
28
+ ? consent.consentChannel['all']
29
29
  : false;
30
30
  if (provider in consent.consentChannel) {
31
31
  const providerSpecific = consent.consentChannel[provider];
@@ -33,8 +33,8 @@ const hasUserConsent = (consent, provider, tagName) => {
33
33
  allowed = providerSpecific;
34
34
  }
35
35
  else if (isRecord(providerSpecific)) {
36
- if ('all' in providerSpecific && isBool(providerSpecific.all)) {
37
- allowed = providerSpecific.all;
36
+ if ('all' in providerSpecific && isBool(providerSpecific['all'])) {
37
+ allowed = providerSpecific['all'];
38
38
  }
39
39
  if (tagName in providerSpecific && isBool(providerSpecific[tagName])) {
40
40
  allowed = providerSpecific[tagName];
@@ -47,8 +47,8 @@ const hasUserConsent = (consent, provider, tagName) => {
47
47
  }
48
48
  if (isRecord(consent.consentCategory) &&
49
49
  isRecord((_a = consent.consentSettings) === null || _a === void 0 ? void 0 : _a.channels)) {
50
- allowed = isBool(consent.consentCategory.all)
51
- ? consent.consentCategory.all
50
+ allowed = isBool(consent.consentCategory['all'])
51
+ ? consent.consentCategory['all']
52
52
  : false;
53
53
  const category = (_b = Object.entries(consent.consentSettings.channels).find(([, value]) => {
54
54
  return value.includes(provider);
@@ -77,14 +77,14 @@ const isProviderInstanceAllowed = (providersConfig, provider, tagName) => {
77
77
  if (tagName in providerSpecific && isBool(providerSpecific[tagName])) {
78
78
  return providerSpecific[tagName];
79
79
  }
80
- return isBool(providerSpecific.all)
81
- ? providerSpecific.all
80
+ return isBool(providerSpecific['all'])
81
+ ? providerSpecific['all']
82
82
  : tagKeys.length == 0;
83
83
  }
84
84
  }
85
85
  const providerKeys = Object.keys(providersConfig).filter((k) => k != 'all');
86
- return isBool(providersConfig.all)
87
- ? providersConfig.all
86
+ return isBool(providersConfig['all'])
87
+ ? providersConfig['all']
88
88
  : providerKeys.length == 0;
89
89
  };
90
90
 
@@ -1304,7 +1304,7 @@ const getStandardPayload = (destination, payload) => {
1304
1304
  referrer: getReferrer(destination),
1305
1305
  search: getSearch(destination),
1306
1306
  locale: getLocale(),
1307
- sdkVersion: "1.42.0" ,
1307
+ sdkVersion: "1.44.0" ,
1308
1308
  ...(payload || {}),
1309
1309
  };
1310
1310
  let storage = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-js",
3
- "version": "1.42.0",
3
+ "version": "1.44.0",
4
4
  "description": "JS SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",