@redacto.io/consent-sdk-react 7.0.0 → 7.2.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 +25 -24
- package/CHANGELOG.md +16 -0
- package/dist/index.js +228 -166
- package/dist/index.mjs +228 -166
- package/dist/privacy-center.d.mts +3 -2
- package/dist/privacy-center.d.ts +3 -2
- package/dist/privacy-center.js +18 -12
- package/dist/privacy-center.mjs +18 -12
- package/package.json +1 -1
- package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +209 -155
- package/src/RedactoNoticeConsent/styles.ts +10 -1
- package/src/RedactoPrivacyCenter/api/actions.ts +3 -1
- package/src/RedactoPrivacyCenter/api/client.ts +5 -1
- package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +3 -5
- package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +2 -1
- package/src/RedactoPrivacyCenter/components/types.ts +2 -1
- package/src/RedactoPrivacyCenter/lib/api.ts +4 -0
- package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +1 -1
package/dist/index.mjs
CHANGED
|
@@ -683,7 +683,8 @@ var styles = {
|
|
|
683
683
|
topSection: {
|
|
684
684
|
display: "flex",
|
|
685
685
|
justifyContent: "space-between",
|
|
686
|
-
alignItems: "
|
|
686
|
+
alignItems: "flex-start",
|
|
687
|
+
gap: "10px",
|
|
687
688
|
paddingBottom: "15px",
|
|
688
689
|
borderBottom: "none",
|
|
689
690
|
backgroundColor: "#ffffff",
|
|
@@ -695,6 +696,8 @@ var styles = {
|
|
|
695
696
|
display: "flex",
|
|
696
697
|
alignItems: "center",
|
|
697
698
|
gap: "10px",
|
|
699
|
+
flex: "1 1 0",
|
|
700
|
+
minWidth: 0,
|
|
698
701
|
margin: 0,
|
|
699
702
|
padding: 0,
|
|
700
703
|
boxSizing: "border-box"
|
|
@@ -702,7 +705,9 @@ var styles = {
|
|
|
702
705
|
logo: {
|
|
703
706
|
height: "32px",
|
|
704
707
|
width: "auto",
|
|
708
|
+
maxWidth: "140px",
|
|
705
709
|
objectFit: "contain",
|
|
710
|
+
flexShrink: 0,
|
|
706
711
|
margin: 0,
|
|
707
712
|
padding: 0,
|
|
708
713
|
display: "block"
|
|
@@ -714,6 +719,10 @@ var styles = {
|
|
|
714
719
|
letterSpacing: "0.2px",
|
|
715
720
|
verticalAlign: "middle",
|
|
716
721
|
color: "#101828",
|
|
722
|
+
flex: "1 1 auto",
|
|
723
|
+
minWidth: 0,
|
|
724
|
+
wordBreak: "normal",
|
|
725
|
+
overflowWrap: "anywhere",
|
|
717
726
|
margin: 0,
|
|
718
727
|
padding: 0,
|
|
719
728
|
textAlign: "left"
|
|
@@ -2268,7 +2277,7 @@ var RedactoNoticeConsent = ({
|
|
|
2268
2277
|
includeFullyConsentedData = false,
|
|
2269
2278
|
reviewModeButtonText = "Continue"
|
|
2270
2279
|
}) => {
|
|
2271
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q
|
|
2280
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
|
|
2272
2281
|
const propValidationError = useMemo(() => {
|
|
2273
2282
|
if (!(noticeId == null ? void 0 : noticeId.trim())) {
|
|
2274
2283
|
return "RedactoNoticeConsent: 'noticeId' prop is required and cannot be empty";
|
|
@@ -2415,6 +2424,15 @@ var RedactoNoticeConsent = ({
|
|
|
2415
2424
|
height: isMobile ? "auto" : void 0,
|
|
2416
2425
|
width: isMobile ? "auto" : void 0
|
|
2417
2426
|
},
|
|
2427
|
+
topSection: {
|
|
2428
|
+
flexDirection: isMobile ? "column" : "row",
|
|
2429
|
+
alignItems: isMobile ? "stretch" : "flex-start",
|
|
2430
|
+
gap: isMobile ? "12px" : "10px"
|
|
2431
|
+
},
|
|
2432
|
+
logo: {
|
|
2433
|
+
maxWidth: isMobile ? "96px" : "140px",
|
|
2434
|
+
maxHeight: isMobile ? "28px" : "32px"
|
|
2435
|
+
},
|
|
2418
2436
|
languageItem: {
|
|
2419
2437
|
fontSize: isMobile ? "11px" : "12px",
|
|
2420
2438
|
padding: isMobile ? "6px 10px" : "8px 12px"
|
|
@@ -4037,174 +4055,218 @@ var RedactoNoticeConsent = ({
|
|
|
4037
4055
|
]
|
|
4038
4056
|
}
|
|
4039
4057
|
),
|
|
4040
|
-
/* @__PURE__ */
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
style: {
|
|
4072
|
-
display: "flex",
|
|
4073
|
-
alignItems: "center",
|
|
4074
|
-
gap: "8px"
|
|
4058
|
+
/* @__PURE__ */ jsx(
|
|
4059
|
+
"div",
|
|
4060
|
+
{
|
|
4061
|
+
style: {
|
|
4062
|
+
...styles.topSection,
|
|
4063
|
+
...responsiveStyles.topSection,
|
|
4064
|
+
...sectionStyle
|
|
4065
|
+
},
|
|
4066
|
+
children: (() => {
|
|
4067
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
4068
|
+
const logoNode = /* @__PURE__ */ jsx(
|
|
4069
|
+
"img",
|
|
4070
|
+
{
|
|
4071
|
+
style: { ...styles.logo, ...responsiveStyles.logo },
|
|
4072
|
+
src: (content == null ? void 0 : content.logo_url) || redacto_logo_default,
|
|
4073
|
+
alt: "Redacto Logo"
|
|
4074
|
+
}
|
|
4075
|
+
);
|
|
4076
|
+
const titleNode = /* @__PURE__ */ jsx(
|
|
4077
|
+
"h2",
|
|
4078
|
+
{
|
|
4079
|
+
id: "privacy-notice-title",
|
|
4080
|
+
style: {
|
|
4081
|
+
...styles.title,
|
|
4082
|
+
...responsiveStyles.title,
|
|
4083
|
+
...componentHeadingStyle
|
|
4084
|
+
},
|
|
4085
|
+
children: getTranslatedText(
|
|
4086
|
+
"notice_banner_heading",
|
|
4087
|
+
(content == null ? void 0 : content.notice_banner_heading) || "Privacy Notice"
|
|
4088
|
+
)
|
|
4075
4089
|
},
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4090
|
+
`privacy-notice-title-${selectedLanguage}`
|
|
4091
|
+
);
|
|
4092
|
+
const controlsBlock = /* @__PURE__ */ jsxs("div", { style: styles.languageSelectorContainer, children: [
|
|
4093
|
+
/* @__PURE__ */ jsxs(
|
|
4094
|
+
"div",
|
|
4095
|
+
{
|
|
4096
|
+
style: {
|
|
4097
|
+
display: "flex",
|
|
4098
|
+
alignItems: "center",
|
|
4099
|
+
gap: "8px"
|
|
4100
|
+
},
|
|
4101
|
+
children: [
|
|
4102
|
+
isTTSAvailable && /* @__PURE__ */ jsx(
|
|
4103
|
+
"button",
|
|
4104
|
+
{
|
|
4105
|
+
onClick: toggleAudio,
|
|
4106
|
+
style: {
|
|
4107
|
+
...styles.topRight,
|
|
4108
|
+
...responsiveStyles.topRight,
|
|
4109
|
+
...languageSelectorStyle,
|
|
4110
|
+
padding: "3px 9px",
|
|
4111
|
+
display: "flex",
|
|
4112
|
+
alignItems: "center",
|
|
4113
|
+
justifyContent: "center"
|
|
4114
|
+
},
|
|
4115
|
+
"aria-label": isPlaying && !isPaused ? "Pause audio playback" : isPaused ? "Resume audio playback" : "Start audio playback",
|
|
4116
|
+
title: isPlaying && !isPaused ? "Pause Talkback" : isPaused ? "Resume Talkback" : "Start Talkback",
|
|
4117
|
+
children: isPlaying && !isPaused ? (
|
|
4118
|
+
// Pause icon
|
|
4119
|
+
/* @__PURE__ */ jsxs(
|
|
4120
|
+
"svg",
|
|
4121
|
+
{
|
|
4122
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4123
|
+
width: "16",
|
|
4124
|
+
height: "16",
|
|
4125
|
+
viewBox: "0 0 24 24",
|
|
4126
|
+
fill: "none",
|
|
4127
|
+
stroke: ((_b2 = (_a2 = settings == null ? void 0 : settings.button) == null ? void 0 : _a2.language) == null ? void 0 : _b2.textColor) || "currentColor",
|
|
4128
|
+
strokeWidth: "2",
|
|
4129
|
+
strokeLinecap: "round",
|
|
4130
|
+
strokeLinejoin: "round",
|
|
4131
|
+
"aria-hidden": "true",
|
|
4132
|
+
children: [
|
|
4133
|
+
/* @__PURE__ */ jsx("rect", { x: "6", y: "4", width: "4", height: "16" }),
|
|
4134
|
+
/* @__PURE__ */ jsx("rect", { x: "14", y: "4", width: "4", height: "16" })
|
|
4135
|
+
]
|
|
4136
|
+
}
|
|
4137
|
+
)
|
|
4138
|
+
) : (
|
|
4139
|
+
// Play/Sound icon
|
|
4140
|
+
/* @__PURE__ */ jsxs(
|
|
4141
|
+
"svg",
|
|
4142
|
+
{
|
|
4143
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4144
|
+
width: "16",
|
|
4145
|
+
height: "16",
|
|
4146
|
+
viewBox: "0 0 24 24",
|
|
4147
|
+
fill: "none",
|
|
4148
|
+
stroke: ((_d2 = (_c2 = settings == null ? void 0 : settings.button) == null ? void 0 : _c2.language) == null ? void 0 : _d2.textColor) || "currentColor",
|
|
4149
|
+
strokeWidth: "2",
|
|
4150
|
+
strokeLinecap: "round",
|
|
4151
|
+
strokeLinejoin: "round",
|
|
4152
|
+
"aria-hidden": "true",
|
|
4153
|
+
children: [
|
|
4154
|
+
/* @__PURE__ */ jsx("polygon", { points: "11 5 6 9 2 9 2 15 6 15 11 19 11 5" }),
|
|
4155
|
+
/* @__PURE__ */ jsx("path", { d: "M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07" })
|
|
4156
|
+
]
|
|
4157
|
+
}
|
|
4158
|
+
)
|
|
4159
|
+
)
|
|
4160
|
+
}
|
|
4161
|
+
),
|
|
4162
|
+
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(
|
|
4163
|
+
"button",
|
|
4164
|
+
{
|
|
4165
|
+
ref: firstFocusableRef,
|
|
4166
|
+
style: {
|
|
4167
|
+
...styles.topRight,
|
|
4168
|
+
...responsiveStyles.topRight,
|
|
4169
|
+
...languageSelectorStyle
|
|
4170
|
+
},
|
|
4171
|
+
onClick: toggleLanguageDropdown,
|
|
4172
|
+
"aria-expanded": isLanguageDropdownOpen,
|
|
4173
|
+
"aria-haspopup": "listbox",
|
|
4174
|
+
"aria-controls": "language-listbox",
|
|
4175
|
+
"aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
|
|
4176
|
+
children: [
|
|
4177
|
+
toNativeLabel(selectedLanguage),
|
|
4178
|
+
/* @__PURE__ */ jsx(
|
|
4179
|
+
"svg",
|
|
4180
|
+
{
|
|
4181
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4182
|
+
width: "16",
|
|
4183
|
+
height: "16",
|
|
4184
|
+
viewBox: "0 0 16 16",
|
|
4185
|
+
fill: "none",
|
|
4186
|
+
stroke: ((_f2 = (_e2 = settings == null ? void 0 : settings.button) == null ? void 0 : _e2.language) == null ? void 0 : _f2.textColor) || "currentColor",
|
|
4187
|
+
strokeWidth: "2",
|
|
4188
|
+
strokeLinecap: "round",
|
|
4189
|
+
strokeLinejoin: "round",
|
|
4190
|
+
style: { flexShrink: 0, marginLeft: "4px" },
|
|
4191
|
+
"aria-hidden": "true",
|
|
4192
|
+
children: /* @__PURE__ */ jsx("path", { d: "M4 6l4 4 4-4" })
|
|
4193
|
+
}
|
|
4194
|
+
)
|
|
4195
|
+
]
|
|
4196
|
+
}
|
|
4197
|
+
) })
|
|
4198
|
+
]
|
|
4199
|
+
}
|
|
4200
|
+
),
|
|
4201
|
+
isLanguageDropdownOpen && /* @__PURE__ */ jsx(
|
|
4202
|
+
"ul",
|
|
4203
|
+
{
|
|
4204
|
+
id: "language-listbox",
|
|
4205
|
+
style: {
|
|
4206
|
+
...styles.languageDropdown,
|
|
4207
|
+
...languageSelectorStyle
|
|
4208
|
+
},
|
|
4209
|
+
role: "listbox",
|
|
4210
|
+
"aria-label": "Select language",
|
|
4211
|
+
children: availableLanguages.map((lang) => /* @__PURE__ */ jsx(
|
|
4212
|
+
"li",
|
|
4213
|
+
{
|
|
4214
|
+
style: {
|
|
4215
|
+
...styles.languageItem,
|
|
4216
|
+
...responsiveStyles.languageItem,
|
|
4217
|
+
...selectedLanguage === lang ? selectedLanguageItemStyle : languageSelectorStyle,
|
|
4218
|
+
listStyle: "none"
|
|
4219
|
+
},
|
|
4220
|
+
onClick: () => handleLanguageSelect(lang),
|
|
4221
|
+
role: "option",
|
|
4222
|
+
"aria-selected": selectedLanguage === lang,
|
|
4223
|
+
tabIndex: 0,
|
|
4224
|
+
"aria-label": `Select ${toNativeLabel(lang)} language`,
|
|
4225
|
+
children: toNativeLabel(lang)
|
|
4145
4226
|
},
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
"svg",
|
|
4155
|
-
{
|
|
4156
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4157
|
-
width: "16",
|
|
4158
|
-
height: "16",
|
|
4159
|
-
viewBox: "0 0 16 16",
|
|
4160
|
-
fill: "none",
|
|
4161
|
-
stroke: ((_v = (_u = settings == null ? void 0 : settings.button) == null ? void 0 : _u.language) == null ? void 0 : _v.textColor) || "currentColor",
|
|
4162
|
-
strokeWidth: "2",
|
|
4163
|
-
strokeLinecap: "round",
|
|
4164
|
-
strokeLinejoin: "round",
|
|
4165
|
-
style: { flexShrink: 0, marginLeft: "4px" },
|
|
4166
|
-
"aria-hidden": "true",
|
|
4167
|
-
children: /* @__PURE__ */ jsx("path", { d: "M4 6l4 4 4-4" })
|
|
4168
|
-
}
|
|
4169
|
-
)
|
|
4170
|
-
]
|
|
4171
|
-
}
|
|
4172
|
-
) })
|
|
4173
|
-
]
|
|
4174
|
-
}
|
|
4175
|
-
),
|
|
4176
|
-
isLanguageDropdownOpen && /* @__PURE__ */ jsx(
|
|
4177
|
-
"ul",
|
|
4178
|
-
{
|
|
4179
|
-
id: "language-listbox",
|
|
4180
|
-
style: {
|
|
4181
|
-
...styles.languageDropdown,
|
|
4182
|
-
...languageSelectorStyle
|
|
4183
|
-
},
|
|
4184
|
-
role: "listbox",
|
|
4185
|
-
"aria-label": "Select language",
|
|
4186
|
-
children: availableLanguages.map((lang) => /* @__PURE__ */ jsx(
|
|
4187
|
-
"li",
|
|
4227
|
+
lang
|
|
4228
|
+
))
|
|
4229
|
+
}
|
|
4230
|
+
)
|
|
4231
|
+
] });
|
|
4232
|
+
return isMobile ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4233
|
+
/* @__PURE__ */ jsxs(
|
|
4234
|
+
"div",
|
|
4188
4235
|
{
|
|
4189
4236
|
style: {
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4237
|
+
display: "flex",
|
|
4238
|
+
alignItems: "center",
|
|
4239
|
+
gap: "10px",
|
|
4240
|
+
width: "100%"
|
|
4194
4241
|
},
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4242
|
+
children: [
|
|
4243
|
+
logoNode,
|
|
4244
|
+
/* @__PURE__ */ jsx(
|
|
4245
|
+
"div",
|
|
4246
|
+
{
|
|
4247
|
+
style: {
|
|
4248
|
+
marginLeft: "auto",
|
|
4249
|
+
display: "flex",
|
|
4250
|
+
alignItems: "center",
|
|
4251
|
+
flexShrink: 0
|
|
4252
|
+
},
|
|
4253
|
+
children: controlsBlock
|
|
4254
|
+
}
|
|
4255
|
+
)
|
|
4256
|
+
]
|
|
4257
|
+
}
|
|
4258
|
+
),
|
|
4259
|
+
titleNode
|
|
4260
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4261
|
+
/* @__PURE__ */ jsxs("div", { style: styles.topLeft, children: [
|
|
4262
|
+
logoNode,
|
|
4263
|
+
titleNode
|
|
4264
|
+
] }),
|
|
4265
|
+
controlsBlock
|
|
4266
|
+
] });
|
|
4267
|
+
})()
|
|
4268
|
+
}
|
|
4269
|
+
),
|
|
4208
4270
|
/* @__PURE__ */ jsxs(
|
|
4209
4271
|
"div",
|
|
4210
4272
|
{
|
|
@@ -4324,7 +4386,7 @@ var RedactoNoticeConsent = ({
|
|
|
4324
4386
|
))
|
|
4325
4387
|
] }) : (
|
|
4326
4388
|
/* Regular consent UI */
|
|
4327
|
-
/* @__PURE__ */ jsx("div", { style: styles.optionsContainer, children: (
|
|
4389
|
+
/* @__PURE__ */ jsx("div", { style: styles.optionsContainer, children: (_q = content == null ? void 0 : content.purposes) == null ? void 0 : _q.map((purpose) => /* @__PURE__ */ jsx(
|
|
4328
4390
|
PurposeItem,
|
|
4329
4391
|
{
|
|
4330
4392
|
purpose,
|
|
@@ -94,7 +94,7 @@ declare function createConsentClient(baseUrl: string): {
|
|
|
94
94
|
/**
|
|
95
95
|
* Manage consent (privacy center) - revoke, regrant, or renew
|
|
96
96
|
*/
|
|
97
|
-
manageConsent(baseRequest: BaseRequest, purposeId: string, contact: string, status: "revoke" | "regrant" | "renew", authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">, nominatorContact?: string, dataElementUuids?: string[]): Promise<unknown>;
|
|
97
|
+
manageConsent(baseRequest: BaseRequest, purposeId: string, contact: string, status: "revoke" | "regrant" | "renew", authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">, nominatorContact?: string, dataElementUuids?: string[], productUuid?: string): Promise<unknown>;
|
|
98
98
|
/**
|
|
99
99
|
* Get activities (privacy center)
|
|
100
100
|
*/
|
|
@@ -747,7 +747,7 @@ type FetchGroupPurposesParams = {
|
|
|
747
747
|
consentClient?: BaseUrlContextValue['consentClient'];
|
|
748
748
|
};
|
|
749
749
|
declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
|
|
750
|
-
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
|
|
750
|
+
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, productUuid, }: {
|
|
751
751
|
organizationId: string;
|
|
752
752
|
workspaceId: string;
|
|
753
753
|
purposeId: string;
|
|
@@ -757,6 +757,7 @@ declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact,
|
|
|
757
757
|
consentClient?: BaseUrlContextValue["consentClient"];
|
|
758
758
|
nominatorContact?: string;
|
|
759
759
|
dataElementUuids?: string[];
|
|
760
|
+
productUuid?: string;
|
|
760
761
|
}) => Promise<boolean | null>;
|
|
761
762
|
declare const fetchActivities: (organizationId: string, workspaceId: string, offset?: number, limit?: number, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<ActivityDetail | null>;
|
|
762
763
|
declare const fetchCaseHistory: (organizationId: string, workspaceId: string, contact: string, offset?: number, limit?: number, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<CaseHistoryDetail | null>;
|
package/dist/privacy-center.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ declare function createConsentClient(baseUrl: string): {
|
|
|
94
94
|
/**
|
|
95
95
|
* Manage consent (privacy center) - revoke, regrant, or renew
|
|
96
96
|
*/
|
|
97
|
-
manageConsent(baseRequest: BaseRequest, purposeId: string, contact: string, status: "revoke" | "regrant" | "renew", authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">, nominatorContact?: string, dataElementUuids?: string[]): Promise<unknown>;
|
|
97
|
+
manageConsent(baseRequest: BaseRequest, purposeId: string, contact: string, status: "revoke" | "regrant" | "renew", authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">, nominatorContact?: string, dataElementUuids?: string[], productUuid?: string): Promise<unknown>;
|
|
98
98
|
/**
|
|
99
99
|
* Get activities (privacy center)
|
|
100
100
|
*/
|
|
@@ -747,7 +747,7 @@ type FetchGroupPurposesParams = {
|
|
|
747
747
|
consentClient?: BaseUrlContextValue['consentClient'];
|
|
748
748
|
};
|
|
749
749
|
declare const fetchGroupPurposes: (params: FetchGroupPurposesParams) => Promise<GroupPurposesOut | null>;
|
|
750
|
-
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, }: {
|
|
750
|
+
declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact, action, authContext, consentClient, nominatorContact, dataElementUuids, productUuid, }: {
|
|
751
751
|
organizationId: string;
|
|
752
752
|
workspaceId: string;
|
|
753
753
|
purposeId: string;
|
|
@@ -757,6 +757,7 @@ declare const manageConsent: ({ organizationId, workspaceId, purposeId, contact,
|
|
|
757
757
|
consentClient?: BaseUrlContextValue["consentClient"];
|
|
758
758
|
nominatorContact?: string;
|
|
759
759
|
dataElementUuids?: string[];
|
|
760
|
+
productUuid?: string;
|
|
760
761
|
}) => Promise<boolean | null>;
|
|
761
762
|
declare const fetchActivities: (organizationId: string, workspaceId: string, offset?: number, limit?: number, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<ActivityDetail | null>;
|
|
762
763
|
declare const fetchCaseHistory: (organizationId: string, workspaceId: string, contact: string, offset?: number, limit?: number, authContext?: AuthContext, consentClient?: BaseUrlContextValue["consentClient"], language?: string) => Promise<CaseHistoryDetail | null>;
|
package/dist/privacy-center.js
CHANGED
|
@@ -7480,7 +7480,8 @@ async function manageConsentServer(params) {
|
|
|
7480
7480
|
params.authToken,
|
|
7481
7481
|
void 0,
|
|
7482
7482
|
params.nominatorContact,
|
|
7483
|
-
params.dataElementUuids
|
|
7483
|
+
params.dataElementUuids,
|
|
7484
|
+
params.productUuid
|
|
7484
7485
|
);
|
|
7485
7486
|
return (_a = result == null ? void 0 : result.success) != null ? _a : null;
|
|
7486
7487
|
} catch (error) {
|
|
@@ -7845,7 +7846,8 @@ var manageConsent = async ({
|
|
|
7845
7846
|
authContext,
|
|
7846
7847
|
consentClient,
|
|
7847
7848
|
nominatorContact,
|
|
7848
|
-
dataElementUuids
|
|
7849
|
+
dataElementUuids,
|
|
7850
|
+
productUuid
|
|
7849
7851
|
}) => {
|
|
7850
7852
|
try {
|
|
7851
7853
|
const accessToken = await ensureValidToken(organizationId, workspaceId, void 0, authContext, consentClient);
|
|
@@ -7861,7 +7863,8 @@ var manageConsent = async ({
|
|
|
7861
7863
|
authToken: accessToken,
|
|
7862
7864
|
consentClient,
|
|
7863
7865
|
nominatorContact,
|
|
7864
|
-
dataElementUuids
|
|
7866
|
+
dataElementUuids,
|
|
7867
|
+
productUuid
|
|
7865
7868
|
});
|
|
7866
7869
|
return result;
|
|
7867
7870
|
} catch (error) {
|
|
@@ -7880,7 +7883,8 @@ var manageConsent = async ({
|
|
|
7880
7883
|
authToken: newAccessToken || void 0,
|
|
7881
7884
|
consentClient,
|
|
7882
7885
|
nominatorContact,
|
|
7883
|
-
dataElementUuids
|
|
7886
|
+
dataElementUuids,
|
|
7887
|
+
productUuid
|
|
7884
7888
|
});
|
|
7885
7889
|
}
|
|
7886
7890
|
console.error(`Error ${action} consent:`, error);
|
|
@@ -8756,7 +8760,7 @@ function createConsentClient(baseUrl) {
|
|
|
8756
8760
|
/**
|
|
8757
8761
|
* Manage consent (privacy center) - revoke, regrant, or renew
|
|
8758
8762
|
*/
|
|
8759
|
-
async manageConsent(baseRequest, purposeId, contact, status, authToken, options, nominatorContact, dataElementUuids) {
|
|
8763
|
+
async manageConsent(baseRequest, purposeId, contact, status, authToken, options, nominatorContact, dataElementUuids, productUuid) {
|
|
8760
8764
|
const url = privacyCenterUrl(baseRequest, `/manage-consent?status=${status}`);
|
|
8761
8765
|
const body = { purpose_uuid: purposeId, contact };
|
|
8762
8766
|
if (nominatorContact) {
|
|
@@ -8765,6 +8769,9 @@ function createConsentClient(baseUrl) {
|
|
|
8765
8769
|
if (Array.isArray(dataElementUuids) && dataElementUuids.length > 0) {
|
|
8766
8770
|
body.data_element_uuids = dataElementUuids;
|
|
8767
8771
|
}
|
|
8772
|
+
if (productUuid) {
|
|
8773
|
+
body.product_uuid = productUuid;
|
|
8774
|
+
}
|
|
8768
8775
|
return privacyCenterApiFetch(url, {
|
|
8769
8776
|
...options,
|
|
8770
8777
|
method: "POST",
|
|
@@ -13515,7 +13522,7 @@ function AdvancedTable({
|
|
|
13515
13522
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(PCTable.Body, { className: classNames == null ? void 0 : classNames.bodyClassName, children: table.getRowModel().rows.map((row) => {
|
|
13516
13523
|
const meta = table.options.meta || {};
|
|
13517
13524
|
const onRowClick = meta.onRowClick;
|
|
13518
|
-
const handleRowClick = onRowClick ? (
|
|
13525
|
+
const handleRowClick = onRowClick ? () => {
|
|
13519
13526
|
onRowClick(row.original, row);
|
|
13520
13527
|
} : void 0;
|
|
13521
13528
|
const rowExpandedComponent = expandedComponent || meta.expandedComponent;
|
|
@@ -14766,7 +14773,8 @@ var ModifyConsentModal = ({
|
|
|
14766
14773
|
selectedRecord.purpose_uuid,
|
|
14767
14774
|
actionConfig.action,
|
|
14768
14775
|
nomContact,
|
|
14769
|
-
isRegrantAction ? selectedDataElementUuids : void 0
|
|
14776
|
+
isRegrantAction ? selectedDataElementUuids : void 0,
|
|
14777
|
+
selectedRecord.product_uuid
|
|
14770
14778
|
);
|
|
14771
14779
|
}
|
|
14772
14780
|
},
|
|
@@ -16164,9 +16172,6 @@ function ConsentManager({ variant }) {
|
|
|
16164
16172
|
(0, import_react28.useEffect)(() => {
|
|
16165
16173
|
fetchData();
|
|
16166
16174
|
}, [fetchData]);
|
|
16167
|
-
const hasActiveFilters = Boolean(
|
|
16168
|
-
debouncedSearch.trim() || (statusFilter == null ? void 0 : statusFilter.value) || (productFilter == null ? void 0 : productFilter.value)
|
|
16169
|
-
);
|
|
16170
16175
|
const groupedPurposeCount = (0, import_react28.useMemo)(
|
|
16171
16176
|
() => consentGroups.reduce((sum, group) => sum + group.purposes.length, 0),
|
|
16172
16177
|
[consentGroups]
|
|
@@ -16366,7 +16371,7 @@ function ConsentManager({ variant }) {
|
|
|
16366
16371
|
]
|
|
16367
16372
|
);
|
|
16368
16373
|
const handleManageConsent = (0, import_react28.useCallback)(
|
|
16369
|
-
async (purposeId, action, nominatorContact, dataElementUuids) => {
|
|
16374
|
+
async (purposeId, action, nominatorContact, dataElementUuids, productUuid) => {
|
|
16370
16375
|
if (!organizationId || !workspaceId || !contact) {
|
|
16371
16376
|
toast.error(t("missingInfoToManage"));
|
|
16372
16377
|
return;
|
|
@@ -16392,7 +16397,8 @@ function ConsentManager({ variant }) {
|
|
|
16392
16397
|
authContext,
|
|
16393
16398
|
consentClient,
|
|
16394
16399
|
nominatorContact,
|
|
16395
|
-
dataElementUuids
|
|
16400
|
+
dataElementUuids,
|
|
16401
|
+
productUuid
|
|
16396
16402
|
});
|
|
16397
16403
|
if (response) {
|
|
16398
16404
|
toast.success(successMessages[action]);
|