@redacto.io/consent-sdk-react 9.2.0-beta.1 → 9.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/CHANGELOG.md +24 -0
- package/dist/privacy-center.d.mts +6 -10
- package/dist/privacy-center.d.ts +6 -10
- package/dist/privacy-center.js +208 -850
- package/dist/privacy-center.mjs +208 -850
- package/package.json +1 -1
- package/src/RedactoPrivacyCenter/components/DataRequest/ProductSelectionSection.tsx +4 -4
- package/src/RedactoPrivacyCenter/components/Form.tsx +214 -866
- package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +44 -219
- package/src/RedactoPrivacyCenter/components/types.ts +14 -20
- package/src/RedactoPrivacyCenter/lib/api.ts +23 -58
- package/src/RedactoPrivacyCenter/lib/types.ts +0 -31
- package/src/RedactoPrivacyCenter/locales/as/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/bho/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/bn/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/brx/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/doi/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/en/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/gom/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/gu/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/hi/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/kn/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/ks/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/mai/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/ml/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/mr/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/ne/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/or/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/pa/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/sa/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/sat/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/sd/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/ta/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/te/translation.json +2 -2
- package/src/RedactoPrivacyCenter/locales/ur/translation.json +2 -2
- package/tests/Form.test.tsx +123 -149
- package/tests/ProductSelectionSection.test.tsx +39 -4
- package/tests/RequestSubmit.test.tsx +27 -187
package/package.json
CHANGED
|
@@ -184,7 +184,7 @@ export function ProductSelectionSection({
|
|
|
184
184
|
>
|
|
185
185
|
{directGroups.map((group) => {
|
|
186
186
|
const key = productGroupKey(group);
|
|
187
|
-
const
|
|
187
|
+
const purposeCount = buildGroupPurposes(group).length;
|
|
188
188
|
return (
|
|
189
189
|
<ProductChip
|
|
190
190
|
key={key}
|
|
@@ -192,14 +192,14 @@ export function ProductSelectionSection({
|
|
|
192
192
|
isSelected={selectedProductKey === key || isSingleGroup}
|
|
193
193
|
isLocked={isSingleGroup}
|
|
194
194
|
onSelect={onSelect}
|
|
195
|
-
activePurposesLabel={t('activePurposes', { count:
|
|
195
|
+
activePurposesLabel={t('activePurposes', { count: purposeCount })}
|
|
196
196
|
/>
|
|
197
197
|
);
|
|
198
198
|
})}
|
|
199
199
|
|
|
200
200
|
{nominatedGroups.map((group) => {
|
|
201
201
|
const key = productGroupKey(group);
|
|
202
|
-
const
|
|
202
|
+
const purposeCount = buildGroupPurposes(group).length;
|
|
203
203
|
const nominatorLabel =
|
|
204
204
|
group.nominator?.name ?? group.nominator?.email ?? '';
|
|
205
205
|
return (
|
|
@@ -212,7 +212,7 @@ export function ProductSelectionSection({
|
|
|
212
212
|
nominationSuffix={t('nominationChipSuffix', {
|
|
213
213
|
nominator: nominatorLabel,
|
|
214
214
|
})}
|
|
215
|
-
activePurposesLabel={t('activePurposes', { count:
|
|
215
|
+
activePurposesLabel={t('activePurposes', { count: purposeCount })}
|
|
216
216
|
/>
|
|
217
217
|
);
|
|
218
218
|
})}
|