@redacto.io/consent-sdk-react 3.6.0 → 5.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/CHANGELOG.md +12 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +36 -7
- package/dist/index.mjs +36 -7
- package/dist/privacy-center.d.mts +134 -51
- package/dist/privacy-center.d.ts +134 -51
- package/dist/privacy-center.js +6391 -2741
- package/dist/privacy-center.mjs +6135 -2482
- package/package.json +1 -1
- package/src/RedactoNoticeConsent/RedactoNoticeConsent.tsx +5 -5
- package/src/RedactoNoticeConsent/language-codes.ts +37 -1
- package/src/RedactoNoticeConsentInline/RedactoNoticeConsentInline.tsx +0 -3
- package/src/RedactoNoticeConsentInline/api/index.ts +0 -1
- package/src/RedactoPrivacyCenter/PrivacyCenterCaseDetailsPage.tsx +154 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterHomePage.tsx +3 -0
- package/src/RedactoPrivacyCenter/PrivacyCenterLayout.tsx +81 -50
- package/src/RedactoPrivacyCenter/RedactoPrivacyCenter.tsx +4 -0
- package/src/RedactoPrivacyCenter/api/actions.ts +68 -36
- package/src/RedactoPrivacyCenter/api/client.ts +125 -14
- package/src/RedactoPrivacyCenter/components/CaseDetails/AttachmentCard.tsx +38 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/ChatBubble.tsx +31 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/DocumentRequestCard.tsx +73 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessageComposer.tsx +87 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessageItem.tsx +95 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/MessagesTab.tsx +147 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/RequestDetailsTab.tsx +171 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/StatusEvent.tsx +23 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/useFileUpload.ts +116 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/useMessagePolling.ts +36 -0
- package/src/RedactoPrivacyCenter/components/CaseDetails/utils.ts +56 -0
- package/src/RedactoPrivacyCenter/components/CaseDetailsModal.tsx +1 -0
- package/src/RedactoPrivacyCenter/components/CaseHistory.tsx +6 -13
- package/src/RedactoPrivacyCenter/components/ConsentManager.tsx +6 -0
- package/src/RedactoPrivacyCenter/components/ConsentManagerColumns.tsx +0 -1
- package/src/RedactoPrivacyCenter/components/DataRequest/CorrectionDataSection.tsx +2 -2
- package/src/RedactoPrivacyCenter/components/DataRequest/PurposeSelectionSection.tsx +2 -3
- package/src/RedactoPrivacyCenter/components/Form.tsx +152 -11
- package/src/RedactoPrivacyCenter/components/GrievanceTable.tsx +4 -6
- package/src/RedactoPrivacyCenter/components/GrievanceTablePagination.tsx +9 -2
- package/src/RedactoPrivacyCenter/components/ModifyConsentModal.tsx +1 -0
- package/src/RedactoPrivacyCenter/components/Pagination.tsx +12 -12
- package/src/RedactoPrivacyCenter/components/PrivacyCenterLayout.tsx +3 -1
- package/src/RedactoPrivacyCenter/components/RequestSubmit.tsx +15 -1
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideBarPC.tsx +8 -8
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/SideMenuPC.tsx +7 -11
- package/src/RedactoPrivacyCenter/components/SideMenuBarPC/types.ts +1 -1
- package/src/RedactoPrivacyCenter/components/activitiesColumns.tsx +1 -1
- package/src/RedactoPrivacyCenter/components/caseHistoryColumns.tsx +4 -24
- package/src/RedactoPrivacyCenter/components/constant.ts +3 -7
- package/src/RedactoPrivacyCenter/components/types.ts +12 -4
- package/src/RedactoPrivacyCenter/context/AuthContext.tsx +30 -16
- package/src/RedactoPrivacyCenter/context/BaseUrlContext.tsx +3 -6
- package/src/RedactoPrivacyCenter/context/NavigationContext.tsx +35 -3
- package/src/RedactoPrivacyCenter/context/OrganizationContext.tsx +1 -1
- package/src/RedactoPrivacyCenter/context/types.ts +14 -0
- package/src/RedactoPrivacyCenter/lib/api.ts +101 -3
- package/src/RedactoPrivacyCenter/lib/constants.ts +46 -1
- package/src/RedactoPrivacyCenter/lib/i18n.ts +1 -1
- package/src/RedactoPrivacyCenter/lib/queries.ts +106 -2
- package/src/RedactoPrivacyCenter/lib/types.ts +186 -1
- package/src/RedactoPrivacyCenter/lib/utils.ts +1 -0
- package/src/RedactoPrivacyCenter/locales/as/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/bho/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/bn/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/brx/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/doi/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/en/translation.json +69 -2
- package/src/RedactoPrivacyCenter/locales/gom/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/gu/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/hi/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/kn/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/ks/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/mai/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/ml/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/mni-Mtei/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/mr/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/ne/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/or/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/pa/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/sa/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/sat/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/sd/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/ta/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/te/translation.json +93 -1
- package/src/RedactoPrivacyCenter/locales/ur/translation.json +93 -1
- package/src/RedactoPrivacyCenter/styles/injectStyles.ts +725 -0
- package/src/RedactoPrivacyCenter/styles/pcStyles.ts +0 -6
- package/src/RedactoPrivacyCenter/table/AdvancedTable.tsx +5 -3
- package/src/RedactoPrivacyCenter/table/AdvancedTablePagination.tsx +9 -12
- package/src/RedactoPrivacyCenter/ui/Footer.tsx +4 -2
- package/src/RedactoPrivacyCenter/ui/PCAccordion.tsx +24 -18
- package/src/RedactoPrivacyCenter/ui/PCCollapse.tsx +30 -20
- package/src/RedactoPrivacyCenter/ui/PCInput.tsx +17 -13
- package/src/RedactoPrivacyCenter/ui/PCLoader.tsx +3 -2
- package/src/RedactoPrivacyCenter/ui/PCModal.tsx +3 -1
- package/src/RedactoPrivacyCenter/ui/PCPopover.tsx +0 -2
- package/src/RedactoPrivacyCenter/ui/PCSelect.tsx +10 -4
- package/src/RedactoPrivacyCenter/ui/PCTable.tsx +44 -32
- package/src/RedactoPrivacyCenter/ui/PCText.tsx +5 -3
- package/src/RedactoPrivacyCenter/ui/StatusBadge.tsx +0 -2
- package/src/RedactoPrivacyCenter/ui/ThemeToggle.tsx +4 -2
- package/src/privacy-center.ts +1 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default from 'react';
|
|
4
4
|
|
|
5
5
|
type Settings$1 = {
|
|
6
6
|
button: {
|
|
@@ -111,7 +111,7 @@ type Props = Readonly<{
|
|
|
111
111
|
applicationId?: string;
|
|
112
112
|
}>;
|
|
113
113
|
|
|
114
|
-
declare const RedactoConsentInline:
|
|
114
|
+
declare const RedactoConsentInline: react.MemoExoticComponent<{
|
|
115
115
|
({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): react_jsx_runtime.JSX.Element | null;
|
|
116
116
|
displayName: string;
|
|
117
117
|
}>;
|
|
@@ -144,6 +144,6 @@ declare const RedactoConsentInline: React.MemoExoticComponent<{
|
|
|
144
144
|
* - error_code: (if failed) Error code like GUARDIAN_UNDER_18, SESSION_EXPIRED, etc.
|
|
145
145
|
*/
|
|
146
146
|
|
|
147
|
-
declare const DigiLockerCallback:
|
|
147
|
+
declare const DigiLockerCallback: react__default.FC<DigiLockerCallbackProps>;
|
|
148
148
|
|
|
149
149
|
export { type ConsentFlowState, DigiLockerCallback, type DigiLockerCallbackProps, type GuardianVerificationErrorCode, RedactoNoticeConsent, RedactoConsentInline as RedactoNoticeConsentInline };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import react__default from 'react';
|
|
4
4
|
|
|
5
5
|
type Settings$1 = {
|
|
6
6
|
button: {
|
|
@@ -111,7 +111,7 @@ type Props = Readonly<{
|
|
|
111
111
|
applicationId?: string;
|
|
112
112
|
}>;
|
|
113
113
|
|
|
114
|
-
declare const RedactoConsentInline:
|
|
114
|
+
declare const RedactoConsentInline: react.MemoExoticComponent<{
|
|
115
115
|
({ org_uuid, workspace_uuid, notice_uuid, accessToken, baseUrl, language, onAccept, onError, onValidationChange, settings, applicationId, }: Props): react_jsx_runtime.JSX.Element | null;
|
|
116
116
|
displayName: string;
|
|
117
117
|
}>;
|
|
@@ -144,6 +144,6 @@ declare const RedactoConsentInline: React.MemoExoticComponent<{
|
|
|
144
144
|
* - error_code: (if failed) Error code like GUARDIAN_UNDER_18, SESSION_EXPIRED, etc.
|
|
145
145
|
*/
|
|
146
146
|
|
|
147
|
-
declare const DigiLockerCallback:
|
|
147
|
+
declare const DigiLockerCallback: react__default.FC<DigiLockerCallbackProps>;
|
|
148
148
|
|
|
149
149
|
export { type ConsentFlowState, DigiLockerCallback, type DigiLockerCallbackProps, type GuardianVerificationErrorCode, RedactoNoticeConsent, RedactoConsentInline as RedactoNoticeConsentInline };
|
package/dist/index.js
CHANGED
|
@@ -452,17 +452,48 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
452
452
|
];
|
|
453
453
|
|
|
454
454
|
// src/RedactoNoticeConsent/language-codes.ts
|
|
455
|
+
var LANGUAGE_NATIVE_LABELS = {
|
|
456
|
+
English: "English",
|
|
457
|
+
Assamese: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE (Assamese)",
|
|
458
|
+
Bengali: "\u09AC\u09BE\u0982\u09B2\u09BE (Bengali)",
|
|
459
|
+
Bhojpuri: "\u092D\u094B\u091C\u092A\u0941\u0930\u0940 (Bhojpuri)",
|
|
460
|
+
Bodo: "\u092C\u0921\u093C\u094B (Bodo)",
|
|
461
|
+
Dogri: "\u0921\u094B\u0917\u0930\u0940 (Dogri)",
|
|
462
|
+
Gujarati: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0 (Gujarati)",
|
|
463
|
+
Hindi: "\u0939\u093F\u0928\u094D\u0926\u0940 (Hindi)",
|
|
464
|
+
Kannada: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (Kannada)",
|
|
465
|
+
Kashmiri: "\u0643\u0672\u0634\u064F\u0631 (Kashmiri)",
|
|
466
|
+
"Goan Konkani": "\u0915\u094B\u0902\u0915\u0923\u0940 (Goan Konkani)",
|
|
467
|
+
Maithili: "\u092E\u0948\u0925\u093F\u0932\u0940 (Maithili)",
|
|
468
|
+
Malayalam: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02 (Malayalam)",
|
|
469
|
+
Manipuri: "\uABC3\uABE9\uABC7\uABE9\uABC2\uABE3\uABDF (Manipuri)",
|
|
470
|
+
Marathi: "\u092E\u0930\u093E\u0920\u0940 (Marathi)",
|
|
471
|
+
Nepali: "\u0928\u0947\u092A\u093E\u0932\u0940 (Nepali)",
|
|
472
|
+
Odia: "\u0B13\u0B21\u0B3C\u0B3F\u0B06 (Odia)",
|
|
473
|
+
Punjabi: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (Punjabi)",
|
|
474
|
+
Sanskrit: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D (Sanskrit)",
|
|
475
|
+
Santali: "\u1C65\u1C5F\u1C71\u1C5B\u1C5F\u1C72\u1C64 (Santali)",
|
|
476
|
+
Sindhi: "\u0633\u0646\u068C\u064A (Sindhi)",
|
|
477
|
+
Tamil: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (Tamil)",
|
|
478
|
+
Telugu: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41 (Telugu)",
|
|
479
|
+
Urdu: "\u0627\u0631\u062F\u0648 (Urdu)"
|
|
480
|
+
};
|
|
481
|
+
var toNativeLabel = (name) => {
|
|
482
|
+
var _a;
|
|
483
|
+
return (_a = LANGUAGE_NATIVE_LABELS[name]) != null ? _a : name;
|
|
484
|
+
};
|
|
455
485
|
var LANGUAGE_NAME_TO_BCP47 = {
|
|
456
486
|
English: "en",
|
|
457
487
|
Assamese: "as",
|
|
458
488
|
Bengali: "bn",
|
|
489
|
+
Bhojpuri: "bho",
|
|
459
490
|
Bodo: "brx",
|
|
460
491
|
Dogri: "doi",
|
|
461
492
|
Gujarati: "gu",
|
|
462
493
|
Hindi: "hi",
|
|
463
494
|
Kannada: "kn",
|
|
464
495
|
Kashmiri: "ks",
|
|
465
|
-
Konkani: "gom",
|
|
496
|
+
"Goan Konkani": "gom",
|
|
466
497
|
Maithili: "mai",
|
|
467
498
|
Malayalam: "ml",
|
|
468
499
|
Manipuri: "mni-Mtei",
|
|
@@ -4167,9 +4198,9 @@ var RedactoNoticeConsent = ({
|
|
|
4167
4198
|
"aria-expanded": isLanguageDropdownOpen,
|
|
4168
4199
|
"aria-haspopup": "listbox",
|
|
4169
4200
|
"aria-controls": "language-listbox",
|
|
4170
|
-
"aria-label": `Select language. Current language: ${selectedLanguage}`,
|
|
4201
|
+
"aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
|
|
4171
4202
|
children: [
|
|
4172
|
-
selectedLanguage,
|
|
4203
|
+
toNativeLabel(selectedLanguage),
|
|
4173
4204
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
4174
4205
|
"svg",
|
|
4175
4206
|
{
|
|
@@ -4216,8 +4247,8 @@ var RedactoNoticeConsent = ({
|
|
|
4216
4247
|
role: "option",
|
|
4217
4248
|
"aria-selected": selectedLanguage === lang,
|
|
4218
4249
|
tabIndex: 0,
|
|
4219
|
-
"aria-label": `Select ${lang} language`,
|
|
4220
|
-
children: lang
|
|
4250
|
+
"aria-label": `Select ${toNativeLabel(lang)} language`,
|
|
4251
|
+
children: toNativeLabel(lang)
|
|
4221
4252
|
},
|
|
4222
4253
|
lang
|
|
4223
4254
|
))
|
|
@@ -4576,7 +4607,6 @@ var fetchConsentContent2 = async ({
|
|
|
4576
4607
|
workspace_uuid,
|
|
4577
4608
|
notice_uuid,
|
|
4578
4609
|
baseUrl,
|
|
4579
|
-
language = "en",
|
|
4580
4610
|
specific_uuid
|
|
4581
4611
|
}) => {
|
|
4582
4612
|
try {
|
|
@@ -5153,7 +5183,6 @@ var RedactoConsentInlineComponent = ({
|
|
|
5153
5183
|
(0, import_react4.useEffect)(() => {
|
|
5154
5184
|
onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
|
|
5155
5185
|
}, [areAllRequiredElementsChecked, onValidationChange]);
|
|
5156
|
-
const acceptDisabled = isSubmitting || !areAllRequiredElementsChecked || !accessToken;
|
|
5157
5186
|
(0, import_react4.useEffect)(() => {
|
|
5158
5187
|
if (hasAlreadyConsented) {
|
|
5159
5188
|
onAccept == null ? void 0 : onAccept();
|
package/dist/index.mjs
CHANGED
|
@@ -424,17 +424,48 @@ var DPO_AUDIO_ELEMENT_MAP = [
|
|
|
424
424
|
];
|
|
425
425
|
|
|
426
426
|
// src/RedactoNoticeConsent/language-codes.ts
|
|
427
|
+
var LANGUAGE_NATIVE_LABELS = {
|
|
428
|
+
English: "English",
|
|
429
|
+
Assamese: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE (Assamese)",
|
|
430
|
+
Bengali: "\u09AC\u09BE\u0982\u09B2\u09BE (Bengali)",
|
|
431
|
+
Bhojpuri: "\u092D\u094B\u091C\u092A\u0941\u0930\u0940 (Bhojpuri)",
|
|
432
|
+
Bodo: "\u092C\u0921\u093C\u094B (Bodo)",
|
|
433
|
+
Dogri: "\u0921\u094B\u0917\u0930\u0940 (Dogri)",
|
|
434
|
+
Gujarati: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0 (Gujarati)",
|
|
435
|
+
Hindi: "\u0939\u093F\u0928\u094D\u0926\u0940 (Hindi)",
|
|
436
|
+
Kannada: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1 (Kannada)",
|
|
437
|
+
Kashmiri: "\u0643\u0672\u0634\u064F\u0631 (Kashmiri)",
|
|
438
|
+
"Goan Konkani": "\u0915\u094B\u0902\u0915\u0923\u0940 (Goan Konkani)",
|
|
439
|
+
Maithili: "\u092E\u0948\u0925\u093F\u0932\u0940 (Maithili)",
|
|
440
|
+
Malayalam: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02 (Malayalam)",
|
|
441
|
+
Manipuri: "\uABC3\uABE9\uABC7\uABE9\uABC2\uABE3\uABDF (Manipuri)",
|
|
442
|
+
Marathi: "\u092E\u0930\u093E\u0920\u0940 (Marathi)",
|
|
443
|
+
Nepali: "\u0928\u0947\u092A\u093E\u0932\u0940 (Nepali)",
|
|
444
|
+
Odia: "\u0B13\u0B21\u0B3C\u0B3F\u0B06 (Odia)",
|
|
445
|
+
Punjabi: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40 (Punjabi)",
|
|
446
|
+
Sanskrit: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D (Sanskrit)",
|
|
447
|
+
Santali: "\u1C65\u1C5F\u1C71\u1C5B\u1C5F\u1C72\u1C64 (Santali)",
|
|
448
|
+
Sindhi: "\u0633\u0646\u068C\u064A (Sindhi)",
|
|
449
|
+
Tamil: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD (Tamil)",
|
|
450
|
+
Telugu: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41 (Telugu)",
|
|
451
|
+
Urdu: "\u0627\u0631\u062F\u0648 (Urdu)"
|
|
452
|
+
};
|
|
453
|
+
var toNativeLabel = (name) => {
|
|
454
|
+
var _a;
|
|
455
|
+
return (_a = LANGUAGE_NATIVE_LABELS[name]) != null ? _a : name;
|
|
456
|
+
};
|
|
427
457
|
var LANGUAGE_NAME_TO_BCP47 = {
|
|
428
458
|
English: "en",
|
|
429
459
|
Assamese: "as",
|
|
430
460
|
Bengali: "bn",
|
|
461
|
+
Bhojpuri: "bho",
|
|
431
462
|
Bodo: "brx",
|
|
432
463
|
Dogri: "doi",
|
|
433
464
|
Gujarati: "gu",
|
|
434
465
|
Hindi: "hi",
|
|
435
466
|
Kannada: "kn",
|
|
436
467
|
Kashmiri: "ks",
|
|
437
|
-
Konkani: "gom",
|
|
468
|
+
"Goan Konkani": "gom",
|
|
438
469
|
Maithili: "mai",
|
|
439
470
|
Malayalam: "ml",
|
|
440
471
|
Manipuri: "mni-Mtei",
|
|
@@ -4139,9 +4170,9 @@ var RedactoNoticeConsent = ({
|
|
|
4139
4170
|
"aria-expanded": isLanguageDropdownOpen,
|
|
4140
4171
|
"aria-haspopup": "listbox",
|
|
4141
4172
|
"aria-controls": "language-listbox",
|
|
4142
|
-
"aria-label": `Select language. Current language: ${selectedLanguage}`,
|
|
4173
|
+
"aria-label": `Select language. Current language: ${toNativeLabel(selectedLanguage)}`,
|
|
4143
4174
|
children: [
|
|
4144
|
-
selectedLanguage,
|
|
4175
|
+
toNativeLabel(selectedLanguage),
|
|
4145
4176
|
/* @__PURE__ */ jsx(
|
|
4146
4177
|
"svg",
|
|
4147
4178
|
{
|
|
@@ -4188,8 +4219,8 @@ var RedactoNoticeConsent = ({
|
|
|
4188
4219
|
role: "option",
|
|
4189
4220
|
"aria-selected": selectedLanguage === lang,
|
|
4190
4221
|
tabIndex: 0,
|
|
4191
|
-
"aria-label": `Select ${lang} language`,
|
|
4192
|
-
children: lang
|
|
4222
|
+
"aria-label": `Select ${toNativeLabel(lang)} language`,
|
|
4223
|
+
children: toNativeLabel(lang)
|
|
4193
4224
|
},
|
|
4194
4225
|
lang
|
|
4195
4226
|
))
|
|
@@ -4548,7 +4579,6 @@ var fetchConsentContent2 = async ({
|
|
|
4548
4579
|
workspace_uuid,
|
|
4549
4580
|
notice_uuid,
|
|
4550
4581
|
baseUrl,
|
|
4551
|
-
language = "en",
|
|
4552
4582
|
specific_uuid
|
|
4553
4583
|
}) => {
|
|
4554
4584
|
try {
|
|
@@ -5125,7 +5155,6 @@ var RedactoConsentInlineComponent = ({
|
|
|
5125
5155
|
useEffect4(() => {
|
|
5126
5156
|
onValidationChange == null ? void 0 : onValidationChange(areAllRequiredElementsChecked);
|
|
5127
5157
|
}, [areAllRequiredElementsChecked, onValidationChange]);
|
|
5128
|
-
const acceptDisabled = isSubmitting || !areAllRequiredElementsChecked || !accessToken;
|
|
5129
5158
|
useEffect4(() => {
|
|
5130
5159
|
if (hasAlreadyConsented) {
|
|
5131
5160
|
onAccept == null ? void 0 : onAccept();
|
|
@@ -2,45 +2,6 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
|
|
5
|
-
type InternalPage = 'consent-manager' | 'form' | 'activity';
|
|
6
|
-
interface NavigationContextType {
|
|
7
|
-
currentPage: InternalPage;
|
|
8
|
-
navigateTo: (page: InternalPage) => void;
|
|
9
|
-
}
|
|
10
|
-
declare const NavigationProvider: ({ children, initialPage }: {
|
|
11
|
-
children: ReactNode;
|
|
12
|
-
initialPage?: InternalPage;
|
|
13
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare const useInternalNavigation: () => NavigationContextType;
|
|
15
|
-
|
|
16
|
-
interface RedactoPrivacyCenterProps {
|
|
17
|
-
baseUrl: string;
|
|
18
|
-
slug: string;
|
|
19
|
-
theme?: 'light' | 'dark';
|
|
20
|
-
accessToken: string;
|
|
21
|
-
refreshToken: string;
|
|
22
|
-
onError: (error: Error) => boolean;
|
|
23
|
-
initialPage?: InternalPage;
|
|
24
|
-
onBack?: 'back' | 'signout';
|
|
25
|
-
}
|
|
26
|
-
declare function RedactoPrivacyCenter({ baseUrl, slug, theme, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
interface PrivacyCenterLayoutProps {
|
|
29
|
-
children: ReactNode;
|
|
30
|
-
defaultTheme?: 'light' | 'dark';
|
|
31
|
-
slug: string;
|
|
32
|
-
onBack?: 'back' | 'signout';
|
|
33
|
-
}
|
|
34
|
-
declare function PrivacyCenterLayout({ children, defaultTheme, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
|
|
35
|
-
|
|
36
|
-
declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
|
|
37
|
-
|
|
38
|
-
declare function PrivacyCenterConsentManagerPage(): react_jsx_runtime.JSX.Element;
|
|
39
|
-
|
|
40
|
-
declare function PrivacyCenterFormPage(): react_jsx_runtime.JSX.Element;
|
|
41
|
-
|
|
42
|
-
declare function PrivacyCenterActivityPage(): react_jsx_runtime.JSX.Element;
|
|
43
|
-
|
|
44
5
|
/**
|
|
45
6
|
* Options for apiFetch function
|
|
46
7
|
*/
|
|
@@ -120,7 +81,27 @@ declare function createConsentClient(baseUrl: string): {
|
|
|
120
81
|
/**
|
|
121
82
|
* Get case history (privacy center)
|
|
122
83
|
*/
|
|
123
|
-
getCaseHistory(baseRequest: BaseRequest,
|
|
84
|
+
getCaseHistory(baseRequest: BaseRequest, _contact: string, offset?: number, limit?: number, language?: string, authToken?: string, options?: Omit<ApiFetchOptions, "getAuthToken">): Promise<unknown>;
|
|
85
|
+
/**
|
|
86
|
+
* Get messages for a case (privacy center)
|
|
87
|
+
*/
|
|
88
|
+
getCaseMessages(baseRequest: BaseRequest, caseUuid: string, authToken?: string): Promise<CaseMessage[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Send a message on a case (privacy center)
|
|
91
|
+
*/
|
|
92
|
+
sendCaseMessage(baseRequest: BaseRequest, caseUuid: string, body: string, documentUuids: string[], authToken?: string): Promise<CaseMessage>;
|
|
93
|
+
/**
|
|
94
|
+
* Upload a document on a case (multipart/form-data, privacy center)
|
|
95
|
+
*/
|
|
96
|
+
uploadCaseDocument(baseRequest: BaseRequest, caseUuid: string, file: File, authToken?: string): Promise<UploadDocumentResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* Submit a document against a handler document request (privacy center)
|
|
99
|
+
*/
|
|
100
|
+
submitDocumentForRequest(baseRequest: BaseRequest, caseUuid: string, requestEventUuid: string, documentUuid: string, body: string, authToken?: string): Promise<CaseMessage>;
|
|
101
|
+
/**
|
|
102
|
+
* Get document info/download URL for a case document (privacy center)
|
|
103
|
+
*/
|
|
104
|
+
getCaseDocument(baseRequest: BaseRequest, caseUuid: string, documentUuid: string, authToken?: string): Promise<MessageDocument>;
|
|
124
105
|
};
|
|
125
106
|
|
|
126
107
|
type Workspace = {
|
|
@@ -238,6 +219,7 @@ type UserDataRequest = {
|
|
|
238
219
|
};
|
|
239
220
|
time_period: number | null;
|
|
240
221
|
requestor_note: string;
|
|
222
|
+
revoke_consent_on_fulfilment?: boolean;
|
|
241
223
|
};
|
|
242
224
|
type CreateCaseResponse = {
|
|
243
225
|
code: number;
|
|
@@ -382,6 +364,12 @@ type ActivityResponse = {
|
|
|
382
364
|
detail: ActivityDetail;
|
|
383
365
|
};
|
|
384
366
|
type ActivityBadgeStatus$1 = 'success' | 'warning' | 'error' | 'info' | 'pending';
|
|
367
|
+
type CaseRequestDetails = {
|
|
368
|
+
purposes: RawPurposeWrapper[];
|
|
369
|
+
correction_data: UpdateCorrectionDataItem[];
|
|
370
|
+
grievance_types?: GrievanceTypeElement[];
|
|
371
|
+
nomination_data?: NominationData;
|
|
372
|
+
};
|
|
385
373
|
type CaseRequest = {
|
|
386
374
|
uuid: string;
|
|
387
375
|
case_id: string;
|
|
@@ -394,7 +382,7 @@ type CaseRequest = {
|
|
|
394
382
|
created_at: string;
|
|
395
383
|
completed_at?: string;
|
|
396
384
|
due_date?: string;
|
|
397
|
-
request_details?:
|
|
385
|
+
request_details?: CaseRequestDetails;
|
|
398
386
|
};
|
|
399
387
|
type CaseHistoryDetail = {
|
|
400
388
|
data: CaseRequest[];
|
|
@@ -405,16 +393,117 @@ type CaseHistoryResponse = {
|
|
|
405
393
|
status: string;
|
|
406
394
|
detail: CaseRequest[];
|
|
407
395
|
};
|
|
396
|
+
type MessageType = 'message_sent' | 'document_requested' | 'document_submitted' | 'document_replaced' | 'document_replacement_requested' | 'document_approved' | 'document_rejected';
|
|
397
|
+
type DocumentRequestStatus = 'pending' | 'under_review' | 'approved' | 'rejected' | 'replacement_requested';
|
|
398
|
+
type FileUrlMap = {
|
|
399
|
+
url?: string;
|
|
400
|
+
download_url?: string;
|
|
401
|
+
};
|
|
402
|
+
type MessageDocument = {
|
|
403
|
+
uuid: string;
|
|
404
|
+
file_name: string | null;
|
|
405
|
+
content_type: string | null;
|
|
406
|
+
file_size: number | null;
|
|
407
|
+
file_url: FileUrlMap | null;
|
|
408
|
+
};
|
|
409
|
+
type DocumentRequestMetadata = {
|
|
410
|
+
title: string;
|
|
411
|
+
accepted_document: string;
|
|
412
|
+
document_request_status: DocumentRequestStatus;
|
|
413
|
+
document_request_uuid: string | null;
|
|
414
|
+
rejection_reason: string;
|
|
415
|
+
};
|
|
416
|
+
type CaseMessage = {
|
|
417
|
+
uuid: string;
|
|
418
|
+
case_uuid: string;
|
|
419
|
+
sender_role: 'data_fiduciary' | 'data_principal';
|
|
420
|
+
triggered_by_email: string;
|
|
421
|
+
created_at: string;
|
|
422
|
+
body: string;
|
|
423
|
+
document_uuids: string[];
|
|
424
|
+
documents: MessageDocument[];
|
|
425
|
+
message_type: MessageType;
|
|
426
|
+
document_request_metadata: DocumentRequestMetadata | null;
|
|
427
|
+
};
|
|
428
|
+
type UploadDocumentResponse = {
|
|
429
|
+
uuid: string;
|
|
430
|
+
suid: string;
|
|
431
|
+
file_name: string;
|
|
432
|
+
file_type: string;
|
|
433
|
+
content_type: string;
|
|
434
|
+
file_size: number;
|
|
435
|
+
created_at: string;
|
|
436
|
+
is_public: boolean;
|
|
437
|
+
file: string;
|
|
438
|
+
file_hash: string | null;
|
|
439
|
+
status: string;
|
|
440
|
+
allow_ai_processing: boolean;
|
|
441
|
+
metadata: Record<string, string> | null;
|
|
442
|
+
};
|
|
443
|
+
|
|
444
|
+
type InternalPage = 'consent-manager' | 'form' | 'activity' | 'case-details';
|
|
445
|
+
interface NavigationContextType {
|
|
446
|
+
currentPage: InternalPage;
|
|
447
|
+
navigateTo: (page: InternalPage) => void;
|
|
448
|
+
selectedCase: CaseRequest | null;
|
|
449
|
+
setSelectedCase: (c: CaseRequest | null) => void;
|
|
450
|
+
pendingCaseUuid: string | null;
|
|
451
|
+
}
|
|
452
|
+
declare const NavigationProvider: ({ children, initialPage }: {
|
|
453
|
+
children: ReactNode;
|
|
454
|
+
initialPage?: InternalPage;
|
|
455
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
456
|
+
declare const useInternalNavigation: () => NavigationContextType;
|
|
408
457
|
|
|
409
|
-
interface
|
|
458
|
+
interface RedactoPrivacyCenterProps {
|
|
410
459
|
baseUrl: string;
|
|
411
|
-
|
|
460
|
+
slug: string;
|
|
461
|
+
theme?: 'light' | 'dark';
|
|
462
|
+
accessToken: string;
|
|
463
|
+
refreshToken: string;
|
|
464
|
+
onError: (error: Error) => boolean;
|
|
465
|
+
initialPage?: InternalPage;
|
|
466
|
+
onBack?: 'back' | 'signout';
|
|
412
467
|
}
|
|
468
|
+
declare function RedactoPrivacyCenter({ baseUrl, slug, theme, accessToken, refreshToken, onError, initialPage, onBack, }: RedactoPrivacyCenterProps): react_jsx_runtime.JSX.Element;
|
|
469
|
+
|
|
470
|
+
interface PrivacyCenterLayoutProps {
|
|
471
|
+
children: ReactNode;
|
|
472
|
+
defaultTheme?: 'light' | 'dark';
|
|
473
|
+
slug: string;
|
|
474
|
+
onBack?: 'back' | 'signout';
|
|
475
|
+
}
|
|
476
|
+
declare function PrivacyCenterLayout({ children, defaultTheme, slug, onBack }: PrivacyCenterLayoutProps): react_jsx_runtime.JSX.Element;
|
|
477
|
+
|
|
478
|
+
declare function PrivacyCenterHomePage(): react_jsx_runtime.JSX.Element;
|
|
479
|
+
|
|
480
|
+
declare function PrivacyCenterConsentManagerPage(): react_jsx_runtime.JSX.Element;
|
|
481
|
+
|
|
482
|
+
declare function PrivacyCenterFormPage(): react_jsx_runtime.JSX.Element;
|
|
483
|
+
|
|
484
|
+
declare function PrivacyCenterActivityPage(): react_jsx_runtime.JSX.Element;
|
|
485
|
+
|
|
486
|
+
declare const PrivacyCenterCaseDetailsPage: () => react_jsx_runtime.JSX.Element | null;
|
|
487
|
+
|
|
488
|
+
type AuthContextValue = Readonly<{
|
|
489
|
+
accessToken: string;
|
|
490
|
+
refreshToken: string;
|
|
491
|
+
onError: (error: Error) => boolean;
|
|
492
|
+
updateTokens: (accessToken: string, refreshToken?: string) => void;
|
|
493
|
+
}>;
|
|
494
|
+
type BaseUrlContextValue = Readonly<{
|
|
495
|
+
baseUrl: string;
|
|
496
|
+
consentClient: ReturnType<typeof createConsentClient>;
|
|
497
|
+
}>;
|
|
498
|
+
|
|
413
499
|
declare const BaseUrlProvider: ({ children, baseUrl, }: {
|
|
414
500
|
children: ReactNode;
|
|
415
501
|
baseUrl: string;
|
|
416
502
|
}) => react_jsx_runtime.JSX.Element;
|
|
417
|
-
declare const useBaseUrl: () =>
|
|
503
|
+
declare const useBaseUrl: () => Readonly<{
|
|
504
|
+
baseUrl: string;
|
|
505
|
+
consentClient: ReturnType<typeof createConsentClient>;
|
|
506
|
+
}>;
|
|
418
507
|
|
|
419
508
|
declare function createOtpServer(email: string, organizationId: string, workspaceId: string, consentClient?: ReturnType<typeof createConsentClient>): Promise<OtpResponse>;
|
|
420
509
|
declare function verifyOtpServer(otpId: string, otp: string, organizationId: string, workspaceId: string, consentClient?: ReturnType<typeof createConsentClient>): Promise<OtpVerificationResponse>;
|
|
@@ -537,12 +626,6 @@ declare const fetchCaseHistory: (organizationId: string, workspaceId: string, co
|
|
|
537
626
|
|
|
538
627
|
declare const useCaseHistory: (organizationId: string | undefined, workspaceId: string | undefined, contact: string | undefined, authContext?: AuthContext) => _tanstack_react_query.UseQueryResult<CaseRequest[], Error>;
|
|
539
628
|
|
|
540
|
-
interface AuthContextValue {
|
|
541
|
-
accessToken: string;
|
|
542
|
-
refreshToken: string;
|
|
543
|
-
onError: (error: Error) => boolean;
|
|
544
|
-
updateTokens: (accessToken: string, refreshToken?: string) => void;
|
|
545
|
-
}
|
|
546
629
|
interface AuthProviderProps {
|
|
547
630
|
children: ReactNode;
|
|
548
631
|
accessToken: string;
|
|
@@ -563,4 +646,4 @@ declare const useAuth: () => AuthContextValue;
|
|
|
563
646
|
*/
|
|
564
647
|
declare const injectPCStyles: () => void;
|
|
565
648
|
|
|
566
|
-
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, PrivacyCenterActivityPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type ProductConsentHistoryGroup, type Purpose, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsent, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
|
|
649
|
+
export { type Activity, type ActivityBadgeStatus$1 as ActivityBadgeStatus, type ActivityDetail, type ActivityResponse, type ApiFetchOptions, type ApiResponse, type AuthContext, AuthProvider, type BaseRequest, BaseUrlProvider, type CaseHistoryDetail, type CaseHistoryResponse, type CaseRequest, type ConsentAction, type ConsentDataElement, type ConsentHistoryStatusSummary, ConsentStatusEnum, type CreateCaseResponse, type DataElement, type FetchOrgParams, type FormData, type FormDataResponse, type GrievanceOptions, type GrievanceTypeElement, GrievanceTypeEnum, type GrievanceValue, type InternalPage, type ManageConsentParams, type ManageConsentResponse, NavigationProvider, type NominatedPurposesGroup, type NominationData, type NominatorInfo, type OrganizationDetail, type OrganizationResponse, type OtpResponse, type OtpVerificationResponse, type Pagination, PrivacyCenterActivityPage, PrivacyCenterCaseDetailsPage, PrivacyCenterConsentManagerPage, PrivacyCenterFormPage, PrivacyCenterHomePage, PrivacyCenterLayout, type ProductConsentHistoryGroup, type Purpose, type RawPurposeWrapper, RedactoPrivacyCenter, RequestTypeEnum, type TokenExchangeResponse, type UpdateCorrectionDataItem, type UpdatePurpose, type UpdateRequestDetails, type UserConsent, type UserConsentDetail, type UserConsentResponse, type UserDataRequest, type Workspace, checkAndRefreshAuth, compareEmails, createCaseRequest, createConsentClient, createOtpServer as createOtp, decodeJwtToken, ensureValidToken, exchangeTokenServer as exchangeToken, fetchActivities, fetchCaseHistory, fetchProducts, fetchUserConsents, formatActivityType, getActivityTypeStatus, getCookieValue, getFormData, getInitialState, injectPCStyles, isJwtExpired, isUserAuthenticated, manageConsent, setRefreshTokenCookie, signOutPrivacyCenter, useAuth, useBaseUrl, useCaseHistory, useInternalNavigation, verifyOtpServer as verifyOtp };
|