@mparticle/web-sdk 2.79.2 → 2.80.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.
@@ -285,6 +285,7 @@ export interface IMParticleInstanceManager extends MParticleWebSDK {
285
285
  _BatchValidator: _BatchValidator;
286
286
  _instances: Dictionary<IMParticleWebSDKInstance>;
287
287
  _isTestEnv?: boolean;
288
+ _forceNoLocalStorage?: boolean;
288
289
 
289
290
  // Public Properties
290
291
  config: SDKInitConfig;
@@ -297,6 +298,7 @@ export interface IMParticleInstanceManager extends MParticleWebSDK {
297
298
 
298
299
  // Public Methods
299
300
  getInstance(instanceName?: string): IMParticleWebSDKInstance;
301
+ uiwebviewBridgeName?: string;
300
302
  }
301
303
 
302
304
  // Used in cases where server requires booleans as strings
@@ -373,7 +375,7 @@ export interface SDKHelpersApi {
373
375
  createXHR?(cb: () => void): XMLHttpRequest;
374
376
  extend?(...args: any[]);
375
377
  findKeyInObject?(obj: any, key: string): string;
376
- parseNumber?(value: string | number): number;
378
+ parseNumber(value: string | number): number;
377
379
  generateUniqueId();
378
380
  generateHash?(value: string): number;
379
381
  // https://go.mparticle.com/work/SQDSDKS-6317
@@ -382,11 +384,11 @@ export interface SDKHelpersApi {
382
384
  parseStringOrNumber?(value: string | number): string | number | null;
383
385
  inArray?(items: any[], value: any): boolean;
384
386
  converted?(s: string): string;
385
- filterUserIdentitiesForForwarders?(
387
+ filterUserIdentitiesForForwarders(
386
388
  userIdentities: Dictionary,
387
389
  filterList: number[]
388
390
  ): Dictionary;
389
- filterUserAttributes?(
391
+ filterUserAttributes(
390
392
  userAttributes: Dictionary,
391
393
  filterList: number[]
392
394
  ): Dictionary;
package/src/store.ts CHANGED
@@ -69,6 +69,7 @@ export interface SDKConfig {
69
69
  kits: Dictionary<UnregisteredKit>;
70
70
  logLevel?: LogLevelType;
71
71
  cookieDomain?: string;
72
+ cookieExpiration?: number;
72
73
  maxCookieSize?: number | undefined;
73
74
  minWebviewBridgeVersion: 1 | 2 | undefined;
74
75
  identifyRequest: IdentifyRequest;
@@ -207,6 +208,8 @@ export interface IStore {
207
208
  pixelConfigurations: IPixelConfiguration[];
208
209
  integrationDelayTimeoutStart: number; // UNIX Timestamp
209
210
  webviewBridgeEnabled?: boolean;
211
+ bridgeV1Available?: boolean;
212
+ bridgeV2Available?: boolean;
210
213
  wrapperSDKInfo: WrapperSDKInfo;
211
214
  roktAccountId: string | null;
212
215
  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
- }