cm-sdk-react-native-v3 3.6.1 → 3.6.2

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.
@@ -1,4 +1,3 @@
1
- import type { TurboModule } from 'react-native';
2
1
  export type ConsentReceivedEvent = {
3
2
  consent: string;
4
3
  jsonObject: Object;
@@ -21,16 +20,55 @@ export type UrlConfig = {
21
20
  appName: string;
22
21
  noHash?: boolean;
23
22
  };
23
+ export declare enum WebViewPosition {
24
+ FullScreen = "fullScreen",
25
+ HalfScreenTop = "halfScreenTop",
26
+ HalfScreenBottom = "halfScreenBottom",
27
+ Custom = "custom"
28
+ }
29
+ export type WebViewRect = {
30
+ x: number;
31
+ y: number;
32
+ width: number;
33
+ height: number;
34
+ };
35
+ export declare enum BackgroundStyleType {
36
+ Dimmed = "dimmed",
37
+ Color = "color",
38
+ Blur = "blur",
39
+ None = "none"
40
+ }
41
+ export declare enum BlurEffectStyle {
42
+ Light = "light",
43
+ Dark = "dark",
44
+ ExtraLight = "extraLight"
45
+ }
46
+ export declare enum ATTStatus {
47
+ NotDetermined = 0,
48
+ Restricted = 1,
49
+ Denied = 2,
50
+ Authorized = 3
51
+ }
52
+ export type WebViewBackgroundStyle = {
53
+ type: BackgroundStyleType.Dimmed;
54
+ color?: string | number;
55
+ opacity?: number;
56
+ } | {
57
+ type: BackgroundStyleType.Color;
58
+ color: string | number;
59
+ } | {
60
+ type: BackgroundStyleType.Blur;
61
+ blurEffectStyle?: BlurEffectStyle;
62
+ } | {
63
+ type: BackgroundStyleType.None;
64
+ };
24
65
  export type WebViewConfig = {
25
- position?: string;
66
+ position?: WebViewPosition;
67
+ customRect?: WebViewRect;
26
68
  cornerRadius?: number;
27
69
  respectsSafeArea?: boolean;
28
70
  allowsOrientationChanges?: boolean;
29
- backgroundStyle?: {
30
- type?: string;
31
- color?: string;
32
- opacity?: number;
33
- };
71
+ backgroundStyle?: WebViewBackgroundStyle;
34
72
  };
35
73
  export type UserStatus = {
36
74
  status: string;
@@ -41,10 +79,10 @@ export type UserStatus = {
41
79
  regulation: string;
42
80
  };
43
81
  export type GoogleConsentModeStatus = Object;
44
- export interface Spec extends TurboModule {
82
+ export interface CmSdkReactNativeV3Module {
45
83
  setUrlConfig(config: UrlConfig): Promise<void>;
46
84
  setWebViewConfig(config: WebViewConfig): Promise<void>;
47
- setATTStatus(status: number): Promise<void>;
85
+ setATTStatus(status: ATTStatus | number): Promise<void>;
48
86
  checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
49
87
  forceOpen(jumpToSettings: boolean): Promise<boolean>;
50
88
  getUserStatus(): Promise<UserStatus>;
@@ -63,6 +101,6 @@ export interface Spec extends TurboModule {
63
101
  addListener(eventName: string): void;
64
102
  removeListeners(count: number): void;
65
103
  }
66
- declare const _default: Spec;
104
+ declare const _default: CmSdkReactNativeV3Module;
67
105
  export default _default;
68
106
  //# sourceMappingURL=NativeCmSdkReactNativeV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeCmSdkReactNativeV3.d.ts","sourceRoot":"","sources":["../../../../src/NativeCmSdkReactNativeV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,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;IACtD,0BAA0B,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC/D,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,0BAA0B,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAG/C,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5E,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAG9B,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;wBAIoC,wBAAwB;AAA7D,wBAA8D"}
@@ -1,6 +1,6 @@
1
- import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type UserStatus, type GoogleConsentModeStatus } from './NativeCmSdkReactNativeV3';
2
- declare const CmSdkReactNativeV3: import("./NativeCmSdkReactNativeV3").Spec;
3
- export declare const isTurboModuleEnabled: boolean;
1
+ import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type WebViewRect, type WebViewBackgroundStyle, WebViewPosition, BackgroundStyleType, BlurEffectStyle, ATTStatus, type UserStatus, type GoogleConsentModeStatus, type CmSdkReactNativeV3Module } from './NativeCmSdkReactNativeV3';
2
+ export { WebViewPosition, BackgroundStyleType, BlurEffectStyle, ATTStatus };
3
+ declare const CmSdkReactNativeV3: CmSdkReactNativeV3Module;
4
4
  export declare const addConsentListener: (callback: (consent: string, jsonObject: Object) => void) => import("react-native").EmitterSubscription;
5
5
  export declare const addShowConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
6
6
  export declare const addCloseConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
@@ -9,7 +9,7 @@ export declare const addClickLinkListener: (callback: (url: string) => void) =>
9
9
  export declare const addATTStatusChangeListener: (callback: (event: ATTStatusChangeEvent) => void) => import("react-native").EmitterSubscription;
10
10
  export declare const setUrlConfig: (config: UrlConfig) => Promise<void>;
11
11
  export declare const setWebViewConfig: (config: WebViewConfig) => Promise<void>;
12
- export declare const setATTStatus: (status: number) => Promise<void>;
12
+ export declare const setATTStatus: (status: ATTStatus | number) => Promise<void>;
13
13
  export declare const checkAndOpen: (jumpToSettings: boolean) => Promise<boolean>;
14
14
  export declare const forceOpen: (jumpToSettings: boolean) => Promise<boolean>;
15
15
  export declare const getUserStatus: () => Promise<UserStatus>;
@@ -25,7 +25,15 @@ export declare const acceptPurposes: (purposes: string[], updatePurpose: boolean
25
25
  export declare const rejectPurposes: (purposes: string[], updateVendor: boolean) => Promise<boolean>;
26
26
  export declare const rejectAll: () => Promise<boolean>;
27
27
  export declare const acceptAll: () => Promise<boolean>;
28
- export declare const isNewArchitectureEnabled: () => boolean;
29
- export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
28
+ export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewRect, WebViewBackgroundStyle, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
29
+ /**
30
+ * Helper factory to build strongly-typed background styles.
31
+ */
32
+ export declare const BackgroundStyle: {
33
+ readonly dimmed: (color?: string | number, opacity?: number) => WebViewBackgroundStyle;
34
+ readonly color: (color: string | number) => WebViewBackgroundStyle;
35
+ readonly blur: (blurEffectStyle?: BlurEffectStyle) => WebViewBackgroundStyle;
36
+ readonly none: () => WebViewBackgroundStyle;
37
+ };
30
38
  export default CmSdkReactNativeV3;
31
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAiC,EAC/B,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AASpC,QAAA,MAAM,kBAAkB,2CASlB,CAAC;AAEP,eAAO,MAAM,oBAAoB,SAAmC,CAAC;AAIrE,eAAO,MAAM,kBAAkB,GAC7B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,+CAKxD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,IAAI,+CAE/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,IAAI,+CAEhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,+CAIjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,+CAInE,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,UAAU,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,+CAEzF,CAAC;AAGF,eAAO,MAAM,YAAY,GAAI,QAAQ,SAAS,KAAG,OAAO,CAAC,IAAI,CAE5D,CAAC;AAEF,eAAO,MAAM,gBAAgB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,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,cAAc,OAAO,KAAG,OAAO,CAAC,OAAO,CAEzF,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,UAAU,EACV,uBAAuB,GACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;8BACT,MAAM,GAAG,MAAM,YAAY,MAAM,KAAG,sBAAsB;4BAK5D,MAAM,GAAG,MAAM,KAAG,sBAAsB;sCAI/B,eAAe,KAA0B,sBAAsB;yBAI7E,sBAAsB;CACxB,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
@@ -1,4 +1,3 @@
1
- import type { TurboModule } from 'react-native';
2
1
  export type ConsentReceivedEvent = {
3
2
  consent: string;
4
3
  jsonObject: Object;
@@ -21,16 +20,55 @@ export type UrlConfig = {
21
20
  appName: string;
22
21
  noHash?: boolean;
23
22
  };
23
+ export declare enum WebViewPosition {
24
+ FullScreen = "fullScreen",
25
+ HalfScreenTop = "halfScreenTop",
26
+ HalfScreenBottom = "halfScreenBottom",
27
+ Custom = "custom"
28
+ }
29
+ export type WebViewRect = {
30
+ x: number;
31
+ y: number;
32
+ width: number;
33
+ height: number;
34
+ };
35
+ export declare enum BackgroundStyleType {
36
+ Dimmed = "dimmed",
37
+ Color = "color",
38
+ Blur = "blur",
39
+ None = "none"
40
+ }
41
+ export declare enum BlurEffectStyle {
42
+ Light = "light",
43
+ Dark = "dark",
44
+ ExtraLight = "extraLight"
45
+ }
46
+ export declare enum ATTStatus {
47
+ NotDetermined = 0,
48
+ Restricted = 1,
49
+ Denied = 2,
50
+ Authorized = 3
51
+ }
52
+ export type WebViewBackgroundStyle = {
53
+ type: BackgroundStyleType.Dimmed;
54
+ color?: string | number;
55
+ opacity?: number;
56
+ } | {
57
+ type: BackgroundStyleType.Color;
58
+ color: string | number;
59
+ } | {
60
+ type: BackgroundStyleType.Blur;
61
+ blurEffectStyle?: BlurEffectStyle;
62
+ } | {
63
+ type: BackgroundStyleType.None;
64
+ };
24
65
  export type WebViewConfig = {
25
- position?: string;
66
+ position?: WebViewPosition;
67
+ customRect?: WebViewRect;
26
68
  cornerRadius?: number;
27
69
  respectsSafeArea?: boolean;
28
70
  allowsOrientationChanges?: boolean;
29
- backgroundStyle?: {
30
- type?: string;
31
- color?: string;
32
- opacity?: number;
33
- };
71
+ backgroundStyle?: WebViewBackgroundStyle;
34
72
  };
35
73
  export type UserStatus = {
36
74
  status: string;
@@ -41,10 +79,10 @@ export type UserStatus = {
41
79
  regulation: string;
42
80
  };
43
81
  export type GoogleConsentModeStatus = Object;
44
- export interface Spec extends TurboModule {
82
+ export interface CmSdkReactNativeV3Module {
45
83
  setUrlConfig(config: UrlConfig): Promise<void>;
46
84
  setWebViewConfig(config: WebViewConfig): Promise<void>;
47
- setATTStatus(status: number): Promise<void>;
85
+ setATTStatus(status: ATTStatus | number): Promise<void>;
48
86
  checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
49
87
  forceOpen(jumpToSettings: boolean): Promise<boolean>;
50
88
  getUserStatus(): Promise<UserStatus>;
@@ -63,6 +101,6 @@ export interface Spec extends TurboModule {
63
101
  addListener(eventName: string): void;
64
102
  removeListeners(count: number): void;
65
103
  }
66
- declare const _default: Spec;
104
+ declare const _default: CmSdkReactNativeV3Module;
67
105
  export default _default;
68
106
  //# sourceMappingURL=NativeCmSdkReactNativeV3.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeCmSdkReactNativeV3.d.ts","sourceRoot":"","sources":["../../../../src/NativeCmSdkReactNativeV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,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C;IAG9B,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAA4E"}
1
+ {"version":3,"file":"NativeCmSdkReactNativeV3.d.ts","sourceRoot":"","sources":["../../../../src/NativeCmSdkReactNativeV3.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,oBAAY,eAAe;IACzB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,gBAAgB,qBAAqB;IACrC,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,mBAAmB;IAC7B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;I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AM,GAAG,IAAI,CAAC;CACtC;wBAIoC,wBAAwB;AAA7D,wBAA8D"}
@@ -1,6 +1,6 @@
1
- import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type UserStatus, type GoogleConsentModeStatus } from './NativeCmSdkReactNativeV3';
2
- declare const CmSdkReactNativeV3: import("./NativeCmSdkReactNativeV3").Spec;
3
- export declare const isTurboModuleEnabled: boolean;
1
+ import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type WebViewRect, type WebViewBackgroundStyle, WebViewPosition, BackgroundStyleType, BlurEffectStyle, ATTStatus, type UserStatus, type GoogleConsentModeStatus, type CmSdkReactNativeV3Module } from './NativeCmSdkReactNativeV3';
2
+ export { WebViewPosition, BackgroundStyleType, BlurEffectStyle, ATTStatus };
3
+ declare const CmSdkReactNativeV3: CmSdkReactNativeV3Module;
4
4
  export declare const addConsentListener: (callback: (consent: string, jsonObject: Object) => void) => import("react-native").EmitterSubscription;
5
5
  export declare const addShowConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
6
6
  export declare const addCloseConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
@@ -9,7 +9,7 @@ export declare const addClickLinkListener: (callback: (url: string) => void) =>
9
9
  export declare const addATTStatusChangeListener: (callback: (event: ATTStatusChangeEvent) => void) => import("react-native").EmitterSubscription;
10
10
  export declare const setUrlConfig: (config: UrlConfig) => Promise<void>;
11
11
  export declare const setWebViewConfig: (config: WebViewConfig) => Promise<void>;
12
- export declare const setATTStatus: (status: number) => Promise<void>;
12
+ export declare const setATTStatus: (status: ATTStatus | number) => Promise<void>;
13
13
  export declare const checkAndOpen: (jumpToSettings: boolean) => Promise<boolean>;
14
14
  export declare const forceOpen: (jumpToSettings: boolean) => Promise<boolean>;
15
15
  export declare const getUserStatus: () => Promise<UserStatus>;
@@ -25,7 +25,15 @@ export declare const acceptPurposes: (purposes: string[], updatePurpose: boolean
25
25
  export declare const rejectPurposes: (purposes: string[], updateVendor: boolean) => Promise<boolean>;
26
26
  export declare const rejectAll: () => Promise<boolean>;
27
27
  export declare const acceptAll: () => Promise<boolean>;
28
- export declare const isNewArchitectureEnabled: () => boolean;
29
- export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
28
+ export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewRect, WebViewBackgroundStyle, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
29
+ /**
30
+ * Helper factory to build strongly-typed background styles.
31
+ */
32
+ export declare const BackgroundStyle: {
33
+ readonly dimmed: (color?: string | number, opacity?: number) => WebViewBackgroundStyle;
34
+ readonly color: (color: string | number) => WebViewBackgroundStyle;
35
+ readonly blur: (blurEffectStyle?: BlurEffectStyle) => WebViewBackgroundStyle;
36
+ readonly none: () => WebViewBackgroundStyle;
37
+ };
30
38
  export default CmSdkReactNativeV3;
31
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AACA,OAAiC,EAC/B,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AASpC,QAAA,MAAM,kBAAkB,2CASlB,CAAC;AAEP,eAAO,MAAM,oBAAoB,SAAmC,CAAC;AAIrE,eAAO,MAAM,kBAAkB,GAC7B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,+CAKxD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,IAAI,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MAAM,CAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAO,OAAO,CAAC,OAAO,CAE5D,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,eAAe,OAAO,KAAG,OAAO,CAAC,OAAO,CAE1F,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,cAAc,OAAO,KAAG,OAAO,CAAC,OAAO,CAEzF,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,aAAa,EACb,UAAU,EACV,uBAAuB,GACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe;8BACT,MAAM,GAAG,MAAM,YAAY,MAAM,KAAG,sBAAsB;4BAK5D,MAAM,GAAG,MAAM,KAAG,sBAAsB;sCAI/B,eAAe,KAA0B,sBAAsB;yBAI7E,sBAAsB;CACxB,CAAC;AAEX,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-sdk-react-native-v3",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "Consent Management React Native Library by consentmanager.net",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -69,6 +69,7 @@
69
69
  "del-cli": "^5.1.0",
70
70
  "eslint": "^8.51.0",
71
71
  "eslint-config-prettier": "^9.0.0",
72
+ "eslint-plugin-prettier": "^5.5.4",
72
73
  "jest": "^29.7.0",
73
74
  "prettier": "^3.0.3",
74
75
  "react": "18.3.1",
@@ -176,10 +177,5 @@
176
177
  "type": "module-legacy",
177
178
  "languages": "kotlin-swift",
178
179
  "version": "0.41.2"
179
- },
180
- "codegenConfig": {
181
- "name": "CmSdkReactNativeV3Spec",
182
- "type": "modules",
183
- "jsSrcsDir": "src"
184
180
  }
185
181
  }
@@ -1,7 +1,6 @@
1
1
  require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
4
 
6
5
  Pod::Spec.new do |s|
7
6
  s.name = "react-native-cm-sdk-react-native-v3"
@@ -16,27 +15,5 @@ Pod::Spec.new do |s|
16
15
 
17
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
17
  s.dependency "cm-sdk-ios-v3", "3.6.0"
19
-
20
- # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
- # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
22
- if respond_to?(:install_modules_dependencies, true)
23
- install_modules_dependencies(s)
24
- else
25
- s.dependency "React-Core"
26
-
27
- # Don't install the dependencies when we run `pod install` in the old architecture.
28
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
29
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
30
- s.pod_target_xcconfig = {
31
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
32
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
33
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
34
- }
35
- s.dependency "React-Codegen"
36
- s.dependency "RCT-Folly"
37
- s.dependency "RCTRequired"
38
- s.dependency "RCTTypeSafety"
39
- s.dependency "ReactCommon/turbomodule/core"
40
- end
41
- end
18
+ s.dependency "React-Core"
42
19
  end
@@ -1,5 +1,4 @@
1
- import type { TurboModule } from 'react-native';
2
- import { TurboModuleRegistry } from 'react-native';
1
+ import { NativeModules } from 'react-native';
3
2
 
4
3
  // Event payload types for better TypeScript support
5
4
  export type ConsentReceivedEvent = {
@@ -30,16 +29,53 @@ export type UrlConfig = {
30
29
  noHash?: boolean;
31
30
  };
32
31
 
32
+ export enum WebViewPosition {
33
+ FullScreen = 'fullScreen',
34
+ HalfScreenTop = 'halfScreenTop',
35
+ HalfScreenBottom = 'halfScreenBottom',
36
+ Custom = 'custom',
37
+ }
38
+
39
+ export type WebViewRect = {
40
+ x: number;
41
+ y: number;
42
+ width: number;
43
+ height: number;
44
+ };
45
+
46
+ export enum BackgroundStyleType {
47
+ Dimmed = 'dimmed',
48
+ Color = 'color',
49
+ Blur = 'blur',
50
+ None = 'none',
51
+ }
52
+
53
+ export enum BlurEffectStyle {
54
+ Light = 'light',
55
+ Dark = 'dark',
56
+ ExtraLight = 'extraLight',
57
+ }
58
+
59
+ export enum ATTStatus {
60
+ NotDetermined = 0,
61
+ Restricted = 1,
62
+ Denied = 2,
63
+ Authorized = 3,
64
+ }
65
+
66
+ export type WebViewBackgroundStyle =
67
+ | { type: BackgroundStyleType.Dimmed; color?: string | number; opacity?: number }
68
+ | { type: BackgroundStyleType.Color; color: string | number }
69
+ | { type: BackgroundStyleType.Blur; blurEffectStyle?: BlurEffectStyle }
70
+ | { type: BackgroundStyleType.None };
71
+
33
72
  export type WebViewConfig = {
34
- position?: string;
73
+ position?: WebViewPosition;
74
+ customRect?: WebViewRect;
35
75
  cornerRadius?: number;
36
76
  respectsSafeArea?: boolean;
37
77
  allowsOrientationChanges?: boolean;
38
- backgroundStyle?: {
39
- type?: string;
40
- color?: string;
41
- opacity?: number;
42
- };
78
+ backgroundStyle?: WebViewBackgroundStyle;
43
79
  };
44
80
 
45
81
  export type UserStatus = {
@@ -53,14 +89,14 @@ export type UserStatus = {
53
89
 
54
90
  export type GoogleConsentModeStatus = Object;
55
91
 
56
- export interface Spec extends TurboModule {
92
+ export interface CmSdkReactNativeV3Module {
57
93
  // Configuration methods
58
94
  setUrlConfig(config: UrlConfig): Promise<void>;
59
-
95
+
60
96
  setWebViewConfig(config: WebViewConfig): Promise<void>;
61
97
 
62
98
  // iOS-only ATT status method
63
- setATTStatus(status: number): Promise<void>;
99
+ setATTStatus(status: ATTStatus | number): Promise<void>;
64
100
 
65
101
  // Main interaction methods
66
102
  checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
@@ -84,9 +120,11 @@ export interface Spec extends TurboModule {
84
120
  rejectAll(): Promise<boolean>;
85
121
  acceptAll(): Promise<boolean>;
86
122
 
87
- // Event emitter methods (required for TurboModule)
123
+ // Event emitter methods used by NativeEventEmitter
88
124
  addListener(eventName: string): void;
89
125
  removeListeners(count: number): void;
90
126
  }
91
127
 
92
- export default TurboModuleRegistry.getEnforcing<Spec>('CmSdkReactNativeV3');
128
+ const { CmSdkReactNativeV3 } = NativeModules;
129
+
130
+ export default CmSdkReactNativeV3 as CmSdkReactNativeV3Module;