@redacto.io/consent-sdk-react 9.2.0-beta.1 → 9.2.0-beta.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/privacy-center.d.mts +6 -10
  3. package/dist/privacy-center.d.ts +6 -10
  4. package/dist/privacy-center.js +208 -850
  5. package/dist/privacy-center.mjs +208 -850
  6. package/package.json +1 -1
  7. package/src/RedactoPrivacyCenter/components/DataRequest/ProductSelectionSection.tsx +4 -4
  8. package/src/RedactoPrivacyCenter/components/Form.tsx +214 -866
  9. package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +44 -219
  10. package/src/RedactoPrivacyCenter/components/types.ts +14 -20
  11. package/src/RedactoPrivacyCenter/lib/api.ts +23 -58
  12. package/src/RedactoPrivacyCenter/lib/types.ts +0 -31
  13. package/src/RedactoPrivacyCenter/locales/as/translation.json +2 -2
  14. package/src/RedactoPrivacyCenter/locales/bho/translation.json +2 -2
  15. package/src/RedactoPrivacyCenter/locales/bn/translation.json +2 -2
  16. package/src/RedactoPrivacyCenter/locales/brx/translation.json +2 -2
  17. package/src/RedactoPrivacyCenter/locales/doi/translation.json +2 -2
  18. package/src/RedactoPrivacyCenter/locales/en/translation.json +2 -2
  19. package/src/RedactoPrivacyCenter/locales/gom/translation.json +2 -2
  20. package/src/RedactoPrivacyCenter/locales/gu/translation.json +2 -2
  21. package/src/RedactoPrivacyCenter/locales/hi/translation.json +2 -2
  22. package/src/RedactoPrivacyCenter/locales/kn/translation.json +2 -2
  23. package/src/RedactoPrivacyCenter/locales/ks/translation.json +2 -2
  24. package/src/RedactoPrivacyCenter/locales/mai/translation.json +2 -2
  25. package/src/RedactoPrivacyCenter/locales/ml/translation.json +2 -2
  26. package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +2 -2
  27. package/src/RedactoPrivacyCenter/locales/mr/translation.json +2 -2
  28. package/src/RedactoPrivacyCenter/locales/ne/translation.json +2 -2
  29. package/src/RedactoPrivacyCenter/locales/or/translation.json +2 -2
  30. package/src/RedactoPrivacyCenter/locales/pa/translation.json +2 -2
  31. package/src/RedactoPrivacyCenter/locales/sa/translation.json +2 -2
  32. package/src/RedactoPrivacyCenter/locales/sat/translation.json +2 -2
  33. package/src/RedactoPrivacyCenter/locales/sd/translation.json +2 -2
  34. package/src/RedactoPrivacyCenter/locales/ta/translation.json +2 -2
  35. package/src/RedactoPrivacyCenter/locales/te/translation.json +2 -2
  36. package/src/RedactoPrivacyCenter/locales/ur/translation.json +2 -2
  37. package/tests/Form.test.tsx +123 -149
  38. package/tests/ProductSelectionSection.test.tsx +39 -4
  39. package/tests/RequestSubmit.test.tsx +27 -187
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redacto.io/consent-sdk-react",
3
- "version": "9.2.0-beta.1",
3
+ "version": "9.2.0-beta.2",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",
@@ -184,7 +184,7 @@ export function ProductSelectionSection({
184
184
  >
185
185
  {directGroups.map((group) => {
186
186
  const key = productGroupKey(group);
187
- const activeCount = buildGroupPurposes(group).length;
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: activeCount })}
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 activeCount = buildGroupPurposes(group).length;
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: activeCount })}
215
+ activePurposesLabel={t('activePurposes', { count: purposeCount })}
216
216
  />
217
217
  );
218
218
  })}