@amedia/user 0.8.0 → 0.9.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/src/types.ts CHANGED
@@ -6,7 +6,6 @@ export type UserAttributes = {
6
6
  extraData?: { [index: string]: unknown };
7
7
  access?: string[];
8
8
  privacyPreferences?: PrivacyPreferences;
9
- storage?: { [index: string]: unknown };
10
9
  };
11
10
 
12
11
  export type State = {
@@ -14,13 +13,9 @@ export type State = {
14
13
  emergencyMode?: string[];
15
14
  };
16
15
 
17
- export type AnonymousAttributes = {
18
- age: number;
19
- };
20
-
21
16
  export type PrivacyPreferences = {
22
- allowResearchUsage: Boolean;
23
- connectWithSurveys: Boolean;
24
- personalizedAds: Boolean;
25
- personalizedContent: Boolean;
17
+ allowResearchUsage: boolean;
18
+ connectWithSurveys: boolean;
19
+ personalizedAds: boolean;
20
+ personalizedContent: boolean;
26
21
  };
@@ -28,7 +28,7 @@ export const listenWithExclusivity = <T extends keyof WindowEventMap>(
28
28
  rootElement.addEventListener(type, (evt) => {
29
29
  // Since this lib might me loaded multiple times, we need to prevent all other processing of this event.
30
30
  evt.stopImmediatePropagation();
31
- listener.apply(window, [evt]);
31
+ listener.apply(rootElement, [evt]);
32
32
  });
33
33
  };
34
34
 
@@ -47,7 +47,7 @@ export const listenForAllEvents = <T extends keyof WindowEventMap>(
47
47
  return;
48
48
  }
49
49
  rootElement.addEventListener(type, (evt) => {
50
- listener.apply(window, [evt]);
50
+ listener.apply(rootElement, [evt]);
51
51
  });
52
52
  };
53
53