@redacto.io/consent-sdk-react 0.0.2 → 1.0.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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +11 -0
- package/dist/index.d.mts +58 -4
- package/dist/index.d.ts +58 -4
- package/dist/index.js +3125 -1014
- package/dist/index.mjs +3131 -1014
- package/package.json +2 -3
- package/src/RedactoNoticeConsent/RedactoNoticeConsent.test.tsx +504 -17
- package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +1286 -269
- package/src/RedactoNoticeConsent/api/index.ts +267 -46
- package/src/RedactoNoticeConsent/api/types.ts +76 -0
- package/src/RedactoNoticeConsent/injectStyles.ts +102 -0
- package/src/RedactoNoticeConsent/styles.ts +13 -1
- package/src/RedactoNoticeConsent/types.ts +2 -0
- package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.test.tsx +369 -0
- package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +597 -0
- package/src/RedactoNoticeConsentInline/api/index.ts +159 -0
- package/src/RedactoNoticeConsentInline/api/types.ts +190 -0
- package/src/RedactoNoticeConsentInline/assets/redacto-logo.png +0 -0
- package/src/RedactoNoticeConsentInline/index.ts +1 -0
- package/src/RedactoNoticeConsentInline/injectStyles.ts +40 -0
- package/src/RedactoNoticeConsentInline/styles.ts +397 -0
- package/src/RedactoNoticeConsentInline/types.ts +45 -0
- package/src/RedactoNoticeConsentInline/useMediaQuery.ts +36 -0
- package/src/index.ts +1 -0
- package/tests/mocks.ts +98 -2
- package/tests/setup.ts +15 -0
- package/.changeset/README.md +0 -8
- package/.changeset/config.json +0 -11
- package/.changeset/fifty-candies-drop.md +0 -5
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @redacto.io/consent-sdk-react@0.0.
|
|
3
|
+
> @redacto.io/consent-sdk-react@0.0.3 build /Users/abhishekashyap/Documents/redacto/consent-sdk/packages/consent-sdk-react
|
|
4
4
|
> tsup
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: {"index":"src/index.ts"}
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
[34mCLI[39m Cleaning output folder
|
|
12
12
|
[34mESM[39m Build start
|
|
13
13
|
[34mCJS[39m Build start
|
|
14
|
-
[
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
14
|
+
[32mCJS[39m [1mdist/index.js [22m[32m103.01 KB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 14ms
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m99.59 KB[39m
|
|
17
|
+
[32mESM[39m ⚡️ Build success in 14ms
|
|
18
18
|
DTS Build start
|
|
19
|
-
DTS ⚡️ Build success in
|
|
20
|
-
DTS dist/index.d.mts
|
|
21
|
-
DTS dist/index.d.ts
|
|
19
|
+
DTS ⚡️ Build success in 645ms
|
|
20
|
+
DTS dist/index.d.mts 2.40 KB
|
|
21
|
+
DTS dist/index.d.ts 2.40 KB
|
package/CHANGELOG.md
ADDED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
|
|
3
|
-
type Settings = {
|
|
4
|
+
type Settings$1 = {
|
|
4
5
|
button: {
|
|
5
6
|
accept: {
|
|
6
7
|
backgroundColor: string;
|
|
@@ -23,6 +24,7 @@ type Settings = {
|
|
|
23
24
|
headingColor?: string;
|
|
24
25
|
textColor?: string;
|
|
25
26
|
borderColor?: string;
|
|
27
|
+
font?: string;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
type Props = Readonly<{
|
|
@@ -30,15 +32,67 @@ type Props = Readonly<{
|
|
|
30
32
|
accessToken: string;
|
|
31
33
|
refreshToken: string;
|
|
32
34
|
baseUrl?: string;
|
|
33
|
-
settings?: Partial<Settings>;
|
|
35
|
+
settings?: Partial<Settings$1>;
|
|
34
36
|
language?: string;
|
|
35
37
|
blockUI?: boolean;
|
|
36
38
|
onAccept: () => void;
|
|
37
39
|
onDecline: () => void;
|
|
38
40
|
onError?: (error: Error) => void;
|
|
39
41
|
applicationId?: string;
|
|
42
|
+
checkMode?: "all" | "required";
|
|
40
43
|
}>;
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
/**
|
|
46
|
+
* RedactoNoticeConsent
|
|
47
|
+
*
|
|
48
|
+
* Main consent management component that provides a comprehensive UI for users
|
|
49
|
+
* to view and manage their consent preferences. Supports both initial consent
|
|
50
|
+
* collection and reconsent flows.
|
|
51
|
+
*/
|
|
52
|
+
declare const RedactoNoticeConsent: ({ noticeId, accessToken, refreshToken, baseUrl, language, blockUI, onAccept, onDecline, onError, settings, applicationId, checkMode, }: Props) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
|
|
54
|
+
type Settings = {
|
|
55
|
+
button: {
|
|
56
|
+
accept: {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
textColor: string;
|
|
59
|
+
};
|
|
60
|
+
decline: {
|
|
61
|
+
backgroundColor: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
};
|
|
64
|
+
language: {
|
|
65
|
+
backgroundColor: string;
|
|
66
|
+
textColor: string;
|
|
67
|
+
selectedBackgroundColor?: string;
|
|
68
|
+
selectedTextColor?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
link: string;
|
|
72
|
+
borderRadius?: string;
|
|
73
|
+
backgroundColor?: string;
|
|
74
|
+
headingColor?: string;
|
|
75
|
+
textColor?: string;
|
|
76
|
+
borderColor?: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const RedactoConsentInline: react.NamedExoticComponent<Readonly<{
|
|
80
|
+
org_uuid: string;
|
|
81
|
+
workspace_uuid: string;
|
|
82
|
+
notice_uuid: string;
|
|
83
|
+
accessToken?: string;
|
|
84
|
+
refreshToken?: string;
|
|
85
|
+
baseUrl?: string;
|
|
86
|
+
settings?: Partial<Settings>;
|
|
87
|
+
language?: string;
|
|
88
|
+
onAccept?: () => void;
|
|
89
|
+
onDecline?: () => void;
|
|
90
|
+
onError?: (error: Error) => void;
|
|
91
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
92
|
+
applicationId?: string;
|
|
93
|
+
}> & react.RefAttributes<{
|
|
94
|
+
submitConsent: (accessTokenOverride?: string) => Promise<void>;
|
|
95
|
+
areAllRequiredElementsChecked: boolean;
|
|
96
|
+
}>>;
|
|
43
97
|
|
|
44
|
-
export { RedactoNoticeConsent };
|
|
98
|
+
export { RedactoNoticeConsent, RedactoConsentInline as RedactoNoticeConsentInline };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
|
|
3
|
-
type Settings = {
|
|
4
|
+
type Settings$1 = {
|
|
4
5
|
button: {
|
|
5
6
|
accept: {
|
|
6
7
|
backgroundColor: string;
|
|
@@ -23,6 +24,7 @@ type Settings = {
|
|
|
23
24
|
headingColor?: string;
|
|
24
25
|
textColor?: string;
|
|
25
26
|
borderColor?: string;
|
|
27
|
+
font?: string;
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
type Props = Readonly<{
|
|
@@ -30,15 +32,67 @@ type Props = Readonly<{
|
|
|
30
32
|
accessToken: string;
|
|
31
33
|
refreshToken: string;
|
|
32
34
|
baseUrl?: string;
|
|
33
|
-
settings?: Partial<Settings>;
|
|
35
|
+
settings?: Partial<Settings$1>;
|
|
34
36
|
language?: string;
|
|
35
37
|
blockUI?: boolean;
|
|
36
38
|
onAccept: () => void;
|
|
37
39
|
onDecline: () => void;
|
|
38
40
|
onError?: (error: Error) => void;
|
|
39
41
|
applicationId?: string;
|
|
42
|
+
checkMode?: "all" | "required";
|
|
40
43
|
}>;
|
|
41
44
|
|
|
42
|
-
|
|
45
|
+
/**
|
|
46
|
+
* RedactoNoticeConsent
|
|
47
|
+
*
|
|
48
|
+
* Main consent management component that provides a comprehensive UI for users
|
|
49
|
+
* to view and manage their consent preferences. Supports both initial consent
|
|
50
|
+
* collection and reconsent flows.
|
|
51
|
+
*/
|
|
52
|
+
declare const RedactoNoticeConsent: ({ noticeId, accessToken, refreshToken, baseUrl, language, blockUI, onAccept, onDecline, onError, settings, applicationId, checkMode, }: Props) => react_jsx_runtime.JSX.Element;
|
|
53
|
+
|
|
54
|
+
type Settings = {
|
|
55
|
+
button: {
|
|
56
|
+
accept: {
|
|
57
|
+
backgroundColor: string;
|
|
58
|
+
textColor: string;
|
|
59
|
+
};
|
|
60
|
+
decline: {
|
|
61
|
+
backgroundColor: string;
|
|
62
|
+
textColor: string;
|
|
63
|
+
};
|
|
64
|
+
language: {
|
|
65
|
+
backgroundColor: string;
|
|
66
|
+
textColor: string;
|
|
67
|
+
selectedBackgroundColor?: string;
|
|
68
|
+
selectedTextColor?: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
link: string;
|
|
72
|
+
borderRadius?: string;
|
|
73
|
+
backgroundColor?: string;
|
|
74
|
+
headingColor?: string;
|
|
75
|
+
textColor?: string;
|
|
76
|
+
borderColor?: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
declare const RedactoConsentInline: react.NamedExoticComponent<Readonly<{
|
|
80
|
+
org_uuid: string;
|
|
81
|
+
workspace_uuid: string;
|
|
82
|
+
notice_uuid: string;
|
|
83
|
+
accessToken?: string;
|
|
84
|
+
refreshToken?: string;
|
|
85
|
+
baseUrl?: string;
|
|
86
|
+
settings?: Partial<Settings>;
|
|
87
|
+
language?: string;
|
|
88
|
+
onAccept?: () => void;
|
|
89
|
+
onDecline?: () => void;
|
|
90
|
+
onError?: (error: Error) => void;
|
|
91
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
92
|
+
applicationId?: string;
|
|
93
|
+
}> & react.RefAttributes<{
|
|
94
|
+
submitConsent: (accessTokenOverride?: string) => Promise<void>;
|
|
95
|
+
areAllRequiredElementsChecked: boolean;
|
|
96
|
+
}>>;
|
|
43
97
|
|
|
44
|
-
export { RedactoNoticeConsent };
|
|
98
|
+
export { RedactoNoticeConsent, RedactoConsentInline as RedactoNoticeConsentInline };
|