@mparticle/web-sdk 2.79.2 → 2.79.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.
@@ -297,6 +297,7 @@ export interface IMParticleInstanceManager extends MParticleWebSDK {
297
297
 
298
298
  // Public Methods
299
299
  getInstance(instanceName?: string): IMParticleWebSDKInstance;
300
+ uiwebviewBridgeName?: string;
300
301
  }
301
302
 
302
303
  // Used in cases where server requires booleans as strings
@@ -373,7 +374,7 @@ export interface SDKHelpersApi {
373
374
  createXHR?(cb: () => void): XMLHttpRequest;
374
375
  extend?(...args: any[]);
375
376
  findKeyInObject?(obj: any, key: string): string;
376
- parseNumber?(value: string | number): number;
377
+ parseNumber(value: string | number): number;
377
378
  generateUniqueId();
378
379
  generateHash?(value: string): number;
379
380
  // https://go.mparticle.com/work/SQDSDKS-6317
@@ -382,11 +383,11 @@ export interface SDKHelpersApi {
382
383
  parseStringOrNumber?(value: string | number): string | number | null;
383
384
  inArray?(items: any[], value: any): boolean;
384
385
  converted?(s: string): string;
385
- filterUserIdentitiesForForwarders?(
386
+ filterUserIdentitiesForForwarders(
386
387
  userIdentities: Dictionary,
387
388
  filterList: number[]
388
389
  ): Dictionary;
389
- filterUserAttributes?(
390
+ filterUserAttributes(
390
391
  userAttributes: Dictionary,
391
392
  filterList: number[]
392
393
  ): Dictionary;
package/src/store.ts CHANGED
@@ -207,6 +207,8 @@ export interface IStore {
207
207
  pixelConfigurations: IPixelConfiguration[];
208
208
  integrationDelayTimeoutStart: number; // UNIX Timestamp
209
209
  webviewBridgeEnabled?: boolean;
210
+ bridgeV1Available?: boolean;
211
+ bridgeV2Available?: boolean;
210
212
  wrapperSDKInfo: WrapperSDKInfo;
211
213
  roktAccountId: string | null;
212
214
  integrationName: string | null;
@@ -1,101 +0,0 @@
1
- import Types from './types';
2
-
3
- export default function filteredMparticleUser(
4
- mpid,
5
- forwarder,
6
- mpInstance,
7
- kitBlocker
8
- ) {
9
- var self = this;
10
- return {
11
- getUserIdentities: function() {
12
- var currentUserIdentities = {};
13
- var identities = mpInstance._Store.getUserIdentities(mpid);
14
-
15
- for (var identityType in identities) {
16
- if (identities.hasOwnProperty(identityType)) {
17
- var identityName = Types.IdentityType.getIdentityName(
18
- mpInstance._Helpers.parseNumber(identityType)
19
- );
20
- if (
21
- !kitBlocker ||
22
- (kitBlocker &&
23
- !kitBlocker.isIdentityBlocked(identityName))
24
- )
25
- //if identity type is not blocked
26
- currentUserIdentities[identityName] =
27
- identities[identityType];
28
- }
29
- }
30
-
31
- currentUserIdentities = mpInstance._Helpers.filterUserIdentitiesForForwarders(
32
- currentUserIdentities,
33
- forwarder.userIdentityFilters
34
- );
35
-
36
- return {
37
- userIdentities: currentUserIdentities,
38
- };
39
- },
40
- getMPID: function() {
41
- return mpid;
42
- },
43
- getUserAttributesLists: function(forwarder) {
44
- var userAttributes,
45
- userAttributesLists = {};
46
-
47
- userAttributes = self.getAllUserAttributes();
48
- for (var key in userAttributes) {
49
- if (
50
- userAttributes.hasOwnProperty(key) &&
51
- Array.isArray(userAttributes[key])
52
- ) {
53
- if (
54
- !kitBlocker ||
55
- (kitBlocker && !kitBlocker.isAttributeKeyBlocked(key))
56
- ) {
57
- userAttributesLists[key] = userAttributes[key].slice();
58
- }
59
- }
60
- }
61
-
62
- userAttributesLists = mpInstance._Helpers.filterUserAttributes(
63
- userAttributesLists,
64
- forwarder.userAttributeFilters
65
- );
66
-
67
- return userAttributesLists;
68
- },
69
- getAllUserAttributes: function() {
70
- var userAttributesCopy = {};
71
- var userAttributes = mpInstance._Store.getUserAttributes(mpid);
72
-
73
- if (userAttributes) {
74
- for (var prop in userAttributes) {
75
- if (userAttributes.hasOwnProperty(prop)) {
76
- if (
77
- !kitBlocker ||
78
- (kitBlocker &&
79
- !kitBlocker.isAttributeKeyBlocked(prop))
80
- ) {
81
- if (Array.isArray(userAttributes[prop])) {
82
- userAttributesCopy[prop] = userAttributes[
83
- prop
84
- ].slice();
85
- } else {
86
- userAttributesCopy[prop] = userAttributes[prop];
87
- }
88
- }
89
- }
90
- }
91
- }
92
-
93
- userAttributesCopy = mpInstance._Helpers.filterUserAttributes(
94
- userAttributesCopy,
95
- forwarder.userAttributeFilters
96
- );
97
-
98
- return userAttributesCopy;
99
- },
100
- };
101
- }