ethyca-fides 2.69.3b2__py2.py3-none-any.whl → 2.70.0rc1__py2.py3-none-any.whl
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.
Potentially problematic release.
This version of ethyca-fides might be problematic. Click here for more details.
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/METADATA +1 -1
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/RECORD +220 -214
- fides/_version.py +3 -3
- fides/api/alembic/migrations/versions/4d8c0fcc5771_adding_default_system_groups.py +78 -0
- fides/api/api/v1/endpoints/privacy_request_endpoints.py +87 -23
- fides/api/util/cache.py +1 -1
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{155-b5e4370b158e5ee3.js → 155-88303b05c6e115a5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/2121.1de2fa060eae34aa.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3585-451504ea5ed7a1ea.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3700-2a7094f112a1608a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3855-12ee1dfbbe47fd28.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/409-c1256ecda1b15db6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/431-78bf05f35d7eec4f.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4558-de5ced790b3380dc.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4608-96f480766541124b.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/4718-6585c97c26647e65.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/502-a40d39e615f7b664.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/504-afd3588f1908ac33.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5309-3b6cf0cc9d0c6a83.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/5574-b8c4cba5a6938c00.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{5596-bb601cbf40e47a0f.js → 5596-29a7c8322530b7cf.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/5698.2135391a128cc373.js +164 -0
- fides/ui-build/static/admin/_next/static/chunks/{6416-79eee298a5b3f80f.js → 6416-18d438ff85d807f8.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7045-f15044a4d4525946.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7158-835ba42fd881d8dd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7202.3febe9e89640c712.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/7929-919e2dff24e40397.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9046-2a332fe338535c84.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/9226-2f960b7ca530642a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{9676.9fd9552ef744c717.js → 9676.b86ecbcfe5afd25d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/{9951-c389c51ca6353035.js → 9951-651d521d9a02b6df.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-c780470042750062.js → _app-e08a732e348aa667.js} +63 -226
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-fb9434d926ebf0b3.js → manual-939253f8daf349b2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-f90aa48500c1cbde.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-a94e19870fe3e210.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-09be5455ba85db39.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-6a196c704f1c6dd7.js → [resourceUrn]-293c1f2d9aefb447.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-9cee4e222ebb2b60.js → [resourceUrn]-18501152fa1e4f40.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/{[systemId]-db7f1a269d3e7fc2.js → [systemId]-758d51b4d37dbd09.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-0e4d9ff89c63793c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-2635ef588bf06145.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-9ae81f5c245b8a01.js → [resourceUrn]-0497f3ffdb632516.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-6537c93c69b597c7.js → detection-a780390da99f3e43.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-5db26067d921a94a.js → [resourceUrn]-1901c26cdde820da.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-9f6a62614d7eb113.js → discovery-0cea22af5929c81f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-619f27c745188adb.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-78e052c8f95110c4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-d6d7ee8bd8858a8a.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-6bf117315d909ad1.js → [id]-cc149157d290a94d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-1e2fa11f22dbc449.js → new-4c9fb068a5561658.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-8b13bb5f7bee61c6.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-6f109ef64304ef59.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-670b05b03ba11e0a.js → [id]-8566e3b7b2a632fa.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-1b38b656807ed0cd.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-65f0d5672041a202.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-b20c53b82a54f5ea.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-26ce8fc493993765.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{[key]-f8887b2b29aed1b9.js → [key]-b0d93bf478bf63ee.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{new-5473558807e94462.js → new-084f9756b9987285.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-6c51ffd46bb598e7.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-fbe7e8030d837aed.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-aa1ada4d4ac09759.js → test-datasets-a86bafe1b4e1205f.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-1895c6a13b543436.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-ae3f3470e2734933.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-1b9c4b2749e3ece4.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/webpack-2766492c5dbceb0a.js +1 -0
- fides/ui-build/static/admin/_next/static/mcntn488F1AKOmZCrH0tI/_buildManifest.js +1 -0
- fides/ui-build/static/admin/add-systems/manual.html +1 -1
- fides/ui-build/static/admin/add-systems/multiple.html +1 -1
- fides/ui-build/static/admin/add-systems.html +1 -1
- fides/ui-build/static/admin/consent/configure/add-vendors.html +1 -1
- fides/ui-build/static/admin/consent/configure.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-experience.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/[id].html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices/new.html +1 -1
- fides/ui-build/static/admin/consent/privacy-notices.html +1 -1
- fides/ui-build/static/admin/consent/properties.html +1 -1
- fides/ui-build/static/admin/consent/reporting.html +1 -1
- fides/ui-build/static/admin/consent.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn]/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects/[projectUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/projects.html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-catalog/[systemId]/resources.html +1 -1
- fides/ui-build/static/admin/data-catalog.html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId]/[systemId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center/[monitorId].html +1 -1
- fides/ui-build/static/admin/data-discovery/action-center.html +1 -1
- fides/ui-build/static/admin/data-discovery/activity.html +1 -1
- fides/ui-build/static/admin/data-discovery/detection/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/detection.html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery/[resourceUrn].html +1 -1
- fides/ui-build/static/admin/data-discovery/discovery.html +1 -1
- fides/ui-build/static/admin/datamap.html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName]/[...subfieldNames].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId]/[collectionName].html +1 -1
- fides/ui-build/static/admin/dataset/[datasetId].html +1 -1
- fides/ui-build/static/admin/dataset/new.html +1 -1
- fides/ui-build/static/admin/dataset.html +1 -1
- fides/ui-build/static/admin/datastore-connection/[id].html +1 -1
- fides/ui-build/static/admin/datastore-connection/new.html +1 -1
- fides/ui-build/static/admin/datastore-connection.html +1 -1
- fides/ui-build/static/admin/index.html +1 -1
- fides/ui-build/static/admin/integrations/[id].html +1 -1
- fides/ui-build/static/admin/integrations.html +1 -1
- fides/ui-build/static/admin/login/[provider].html +1 -1
- fides/ui-build/static/admin/login.html +1 -1
- fides/ui-build/static/admin/messaging/[id].html +1 -1
- fides/ui-build/static/admin/messaging/add-template.html +1 -1
- fides/ui-build/static/admin/messaging.html +1 -1
- fides/ui-build/static/admin/poc/ant-components.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/AntForm.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikAntFormItem.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikControlled.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikField.html +1 -1
- fides/ui-build/static/admin/poc/form-experiments/FormikSpreadField.html +1 -1
- fides/ui-build/static/admin/poc/forms.html +1 -1
- fides/ui-build/static/admin/poc/table-migration.html +1 -1
- fides/ui-build/static/admin/privacy-requests/[id].html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure/storage.html +1 -1
- fides/ui-build/static/admin/privacy-requests/configure.html +1 -1
- fides/ui-build/static/admin/privacy-requests.html +1 -1
- fides/ui-build/static/admin/properties/[id].html +1 -1
- fides/ui-build/static/admin/properties/add-property.html +1 -1
- fides/ui-build/static/admin/properties.html +1 -1
- fides/ui-build/static/admin/reporting/datamap.html +1 -1
- fides/ui-build/static/admin/settings/about/alpha.html +1 -1
- fides/ui-build/static/admin/settings/about.html +1 -1
- fides/ui-build/static/admin/settings/consent/[configuration_id]/[purpose_id].html +1 -1
- fides/ui-build/static/admin/settings/consent.html +1 -1
- fides/ui-build/static/admin/settings/custom-fields.html +1 -1
- fides/ui-build/static/admin/settings/domain-records.html +1 -1
- fides/ui-build/static/admin/settings/domains.html +1 -1
- fides/ui-build/static/admin/settings/email-templates.html +1 -1
- fides/ui-build/static/admin/settings/locations.html +1 -1
- fides/ui-build/static/admin/settings/messaging-providers/[key].html +1 -1
- fides/ui-build/static/admin/settings/messaging-providers/new.html +1 -1
- fides/ui-build/static/admin/settings/messaging-providers.html +1 -1
- fides/ui-build/static/admin/settings/organization.html +1 -1
- fides/ui-build/static/admin/settings/privacy-requests.html +1 -1
- fides/ui-build/static/admin/settings/regulations.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id]/test-datasets.html +1 -1
- fides/ui-build/static/admin/systems/configure/[id].html +1 -1
- fides/ui-build/static/admin/systems.html +1 -1
- fides/ui-build/static/admin/taxonomy.html +1 -1
- fides/ui-build/static/admin/user-management/new.html +1 -1
- fides/ui-build/static/admin/user-management/profile/[id].html +1 -1
- fides/ui-build/static/admin/user-management.html +1 -1
- fides/ui-build/static/admin/_next/static/86A8z6OnbTuDYww0DJkX0/_buildManifest.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/1841-2052c3239f2a0a1a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/2751-58285ccf50a0ba4b.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3377-c5e0cc3de1a5ffd1.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3855-8377b3fcbb3d93b0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/409-e1deab19fc7e6d99.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4230-c55d5531697a715c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/431-86ad2beeb93c95c9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4608-2fbc3389681f6924.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/4786-8d78ec773d171562.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/5309-e994c5195f99b1eb.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/6780-eeb7775eb21d7a12.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7929-4314e317b1717257.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/8373-bd50fa53cbcab2aa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9046-0f92802b0e3382a9.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/9226-49dbcdb135bf9793.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/add-systems-92034daafd2187a0.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-d7d9ff9ed28fa790.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/reporting-ddf6ba92355f81de.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]-de957913f9b47daa.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/activity-715064e1c9788e1a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/datamap-aed0e6dafc143b97.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset/new-5bb96c8684a38bbf.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/dataset-639046f6c76bc8bd.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/[id]-0159fbb2e0440709.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations-267d2742fffaebe5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/storage-482a7256925a6e06.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests-28083bfb2dec7b9f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-aed018025b09c045.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/custom-fields-128f952a49a0e8dc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers-1065fbefd449719c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/settings/privacy-requests-907bfbb71d84646f.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]-02b0dde03a1ad159.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-4a6ef2509e8cedfc.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-16b122b83e57bb8c.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/webpack-55e1c55932df2413.js +0 -1
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.69.3b2.dist-info → ethyca_fides-2.70.0rc1.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1115-d5a834cdaa717edc.js → 1115-7888473b3dc28cda.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1817-dc2bba3ca736d39e.js → 1817-17079d2f8cf94941.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2040-3f9c66c56a05b336.js → 2040-ab6212a3074f34f9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2921-cdc7a13973f4a0ba.js → 2921-66f65496c3a09316.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3696-fff4f944d7d5ff20.js → 3696-c25dc8d1b0e1aee1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3872-4786ccbe7c6f65b0.js → 3872-3514b712afd683c0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3923-db57401384d1de8f.js → 3923-a551756b413367ea.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{401-4e56e924f35317f2.js → 401-ffe4e8436e1eceb9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5185-a219b390ef17ff4b.js → 5185-33f50cf9ae17b42e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5783-c62c79e7be21be73.js → 5783-8de76df87af55e98.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6084-29cbe703bffdccfe.js → 6084-2cd165179c428a6f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6853-91a8641cd2784b54.js → 6853-7004a8c420b1ca02.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6882-55dbb142f7c40f53.js → 6882-447f15e87b8c48a5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-6dfafd38b02d5852.js → 6954-599f2de2c902e9b2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7476-3da7a490debad8e2.js → 7476-0b6e114658b15eaa.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7630-22f9c4b25d6aed29.js → 7630-e7ea13be69c118a1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7725-b2fa93d747d3d85d.js → 7725-dd6736855807936a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{796-8e4da90ae82dfebb.js → 796-e07ac2c543f569e3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8002-78d78545309b2c1c.js → 8002-25fd174aec9b077b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9826-f316eb1d61cb90b6.js → 9826-c02be5882205bbbc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{404-e4a1f93a7ce944f0.js → 404-2eb8aed4939f1142.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-a4f821c4902f2df8.js → multiple-83ed7da0bb90b0a5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-96245b63aafc5168.js → add-vendors-46b88bda3d7b15c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-87919c1192e68b1a.js → configure-c0db068d1863222f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-experience/{[id]-4fea66e59bd59de8.js → [id]-fd41ffaff543e05a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-ae8a64fffe3f8c66.js → privacy-experience-92a337ee96845af2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-c8038e05f35da8d1.js → [id]-1fd2cda8707314f6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-f3a40101a8f3fd00.js → new-2987e397445713c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{properties-c985ea8c1a0e0550.js → properties-069f4e3ee96ebf77.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-35c0ae9d5b5a940c.js → consent-e5a33654a2dfaf35.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-965af6c1fd01334e.js → [projectUrn]-6a4b0d49dcbf17a8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-06ba907e7d91a724.js → projects-be7b385073f22414.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-5afecf141308bfc5.js → resources-af80fdca3bbdc82f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-f99af5669b9ab44c.js → data-catalog-351caadeef03876a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-5868591ff1e5f881.js → action-center-1554afcb8b9da2ab.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-72b9878ea9b91529.js → [...subfieldNames]-ef71f387fbbab425.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-f36a46381a6c25d4.js → [collectionName]-d790553662caf5c3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-b653fd60e7db989b.js → [datasetId]-cb63db8594fe8dc1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-c55e3e0e19030f3f.js → datastore-connection-a832084ce294f8af.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{index-d66ea87b457af21e.js → index-269b8f81546dad66.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-4352e55f110556b4.js → [id]-d8c5c03fb2f31d65.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-c533120e94e049e3.js → add-template-0e0c06e3c8aabe02.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-b14f5f38b2d711a8.js → messaging-3f15804cf9625f01.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{ant-components-31d51e3b9227c8d5.js → ant-components-248ad9f65a872442.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{AntForm-8794a0d2e7554a05.js → AntForm-aedb66a62042b10a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikAntFormItem-90b31073e478c99c.js → FormikAntFormItem-018df38b7cd77fdb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikControlled-0a6859a0225b7e00.js → FormikControlled-6ca9099d03aab817.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/form-experiments/{FormikField-eb0552917907fe21.js → FormikField-0f2c90786ea005a4.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{forms-b2a2a084d8cfe22d.js → forms-200b51a725f8b2d1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-0c944cfa9c6acbff.js → table-migration-e551fccfcaae76e7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-331147598052f25c.js → configure-b00532a0ad4f6927.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-e02dc4b4b385c86f.js → [id]-322a01e2bceab3fb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-74c2a0ff4c992633.js → add-property-777ed2d73812043d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{properties-7459d56e548925b2.js → properties-08472b2a6bf1d392.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/consent/[configuration_id]/{[purpose_id]-7f2c50044806c094.js → [purpose_id]-f3e6e74e0efb005c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-e8cab942d09aa358.js → consent-55e36839d219a503.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-cca3d1a26e1269bb.js → domain-records-7ddf9d992fe714a6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-07e1b9937a169e32.js → domains-7c78ae51f0dd7102.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-3bc799dac8423f50.js → email-templates-05ffbda19ab894b9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-9f36b6c213ae524c.js → locations-77fb85bdd0be42b5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-3e23d92d789fff99.js → organization-44456bfe54ac4ad5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-f0f0ea35d0185ae3.js → regulations-2866ac99faa5a542.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-0a8ec3aa2ed59a33.js → [id]-ff4711db191099cd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-4036b023366b7eec.js → user-management-82fcf1151e2fe2ba.js} +0 -0
- /fides/ui-build/static/admin/_next/static/{86A8z6OnbTuDYww0DJkX0 → mcntn488F1AKOmZCrH0tI}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return i(50107)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var s=i(24246),n=i(96306),a=i(88038),l=i.n(a),r=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(42478),u=i(77830),m=()=>{let e=(0,r.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:a=!0,mainProps:u}=e,p=(0,o.hz)(),h=(0,r.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.messagingConfiguration&&x),{data:j}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,c.PW)(void 0,{skip:g}),y=p.flags.messagingConfiguration&&(!j||!v)&&x;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,s.jsx)(m,{}):null,t]})]})}},50107:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eK}});var s,n,a,l,r=i(24246),o=i(96306),c=i(86677),d=i(77213),u=i(77830),m=i(58754),p=i(99716),h=i(27378),x=i(21910),g=i(19904);(s=a||(a={})).IN_PROCESSING="in_processing",s.PENDING="pending",s.COMPLETE="complete",s.ERROR="error",s.PAUSED="paused",s.AWAITING_PROCESSING="awaiting_processing",s.RETRYING="retrying",s.SKIPPED="skipped";let j={in_processing:"In processing",pending:"Pending",complete:"Complete",error:"Error",paused:"Paused",awaiting_processing:"Awaiting input",retrying:"Retrying",skipped:"Skipped"},v={error:"error",skipped:"warning",awaiting_processing:"minos",in_processing:void 0,pending:void 0,complete:void 0,paused:void 0,retrying:void 0};(n=l||(l={})).REQUEST_UPDATE="Request update",n.INTERNAL_COMMENT="Internal comment",n.MANUAL_TASK="Manual task";let y={"Request update":"sandstone","Internal comment":"marble","Manual task":"nectar"};var f=i(90005),_=i.n(f),b=i(16394),T=i(38450),w=i.n(T);let E=e=>{let{attachments:t}=e;if(!t.length)return null;if(1===t.length){let e=t[0];return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.AntTypography.Text,{ellipsis:{tooltip:!0},className:"!max-w-[200px]",children:e.file_name})]})})}let i=(0,r.jsx)("ul",{className:"list-disc pl-4",children:t.map(e=>(0,r.jsx)("li",{children:e.file_name},e.id))});return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.esZ,{title:i,children:(0,r.jsxs)(o.AntTypography.Text,{ellipsis:!0,className:"!max-w-[200px]",children:[t.length," attachments"]})})]})})};var R=e=>{let{item:t}=e,{author:i,title:s,date:n,type:a,onClick:c,isError:d,isAwaitingInput:u,description:m,attachments:p,showViewLog:h}=t,x=(0,b.p6)(n),g=!!c,j=p&&p.length>0,v=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:w().header,children:[(0,r.jsxs)("span",{className:w().author,"data-testid":"activity-timeline-author",children:[i,":"]}),s&&(0,r.jsxs)(o.AntTypography.Text,{className:_()(w().title,{[w()["title--error"]]:d,[w()["title--awaiting-input"]]:u}),ellipsis:{tooltip:!0},"data-testid":"activity-timeline-title",children:[s,d&&" failed"]}),(0,r.jsx)("div",{className:"hidden xl:block",children:(0,r.jsx)(o.AntTypography.Text,{className:w().timestamp,"data-testid":"activity-timeline-timestamp",children:x})}),(0,r.jsx)("div",{className:"xl:hidden",children:(0,r.jsx)(o.esZ,{title:x,children:(0,r.jsx)(o.PJP.qpU,{"data-testid":"activity-timeline-timestamp-icon"})})}),(0,r.jsx)(o.j8w,{className:w().type,color:y[a],"data-testid":"activity-timeline-type",children:a}),h&&(0,r.jsx)("span",{className:w().viewLogs,"data-testid":"activity-timeline-view-logs",children:"View Log"})]}),(m||j)&&(0,r.jsxs)("div",{className:"mt-2 flex justify-between pl-2.5 align-top",children:[(0,r.jsx)(o.AntTypography.Paragraph,{className:"!mb-0 whitespace-pre-wrap","data-testid":"activity-timeline-description",children:m||""}),j&&(0,r.jsx)(E,{attachments:p})]})]}),f={className:_()(w().itemButton,{[w()["itemButton--error"]]:d,[w()["itemButton--awaiting-input"]]:u,[w()["itemButton--clickable"]]:g,[w()["itemButton--comment"]]:a===l.INTERNAL_COMMENT,[w()["itemButton--manual-task"]]:a===l.MANUAL_TASK}),"data-testid":"activity-timeline-item"};return g?(0,r.jsx)("button",{type:"button",onClick:c,...f,children:v}):(0,r.jsx)("div",{...f,children:v})},A=i(25980),k=i(54427),C=i(78780);let{useGetCommentsQuery:q,useCreateCommentMutation:S,useGetCommentDetailsQuery:N,useLazyGetCommentDetailsQuery:P}=C.u.injectEndpoints({endpoints:e=>({getComments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/comment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Comments"]}),createComment:e.mutation({query:e=>{let{privacy_request_id:t,comment_text:i,comment_type:s}=e,n=new FormData;return n.append("comment_text",i),n.append("comment_type",s),{url:"plus/privacy-request/".concat(t,"/comment"),method:"POST",body:n,formData:!0}},invalidatesTags:["Privacy Request Comments","Request"]}),getCommentDetails:e.query({query:e=>{let{privacy_request_id:t,comment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/comment/").concat(i),method:"GET"}}})})}),{reducer:I}=(0,k.oM)({name:"privacyRequestComments",initialState:{},reducers:{}}),D=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=q({privacy_request_id:e,size:100},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch the request comments")},[n]),{commentItems:(null==i?void 0:i.items)?i.items.map(e=>({author:e.user_first_name&&e.user_last_name?"".concat(e.user_first_name," ").concat(e.user_last_name):e.username||"Unknown",date:new Date(e.created_at),type:l.INTERNAL_COMMENT,showViewLog:!1,description:e.comment_text,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"comment-".concat(e.id)})):[],isLoading:s}},O=(e,t)=>{if(0===e.length)return!1;let i=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!i[0].collection_name)return i[0].status===t;let s={};return i.forEach(e=>{e.collection_name&&!s[e.collection_name]&&(s[e.collection_name]=e)}),Object.values(s).some(e=>e.status===t)},M=e=>O(e,a.ERROR),U=e=>O(e,a.SKIPPED),z=e=>O(e,a.AWAITING_PROCESSING),L=e=>{let t=!e;return{eventItems:e?Object.entries(e).map(e=>{let[t,i]=e,s=M(i),n=U(i),a=z(i);return{author:"Fides",title:t,date:new Date(i[0].updated_at),type:l.REQUEST_UPDATE,showViewLog:s||n||a,onClick:()=>{},isError:s,isSkipped:n,isAwaitingInput:a,id:"request-".concat(t)}}):[],isLoading:t}};var W=i(91317),B=i(45116);let F=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=(0,B.Ym)({page:1,size:100,privacyRequestId:e,status:void 0,includeFullSubmissionDetails:!0},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch manual tasks")},[n]),{manualTaskItems:i?i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).map(e=>{var t,i;let s=e.submission_user?(0,b.gJ)(e.submission_user):"Unknown User";(0,W.PN)(null===(t=e.submission_user)||void 0===t?void 0:t.id)&&(s=(null===(i=e.submission_user)||void 0===i?void 0:i.id)||"Unknown User");let n=e.status===x.OS.SKIPPED,a="Task ".concat(n?"skipped":"completed"," - ").concat(e.name),r=e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment_text:void 0,o=e.attachments||[];return{author:s,title:a,date:new Date(e.updated_at),type:l.MANUAL_TASK,showViewLog:!1,description:r,isError:!1,isSkipped:n,isAwaitingInput:!1,id:"manual-task-".concat(e.manual_field_id),attachments:o}}):[],taskCommentIds:(0,h.useMemo)(()=>{let e=new Set;return(null==i?void 0:i.items)&&i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).forEach(t=>{var i;null===(i=t.comments)||void 0===i||i.forEach(t=>{e.add(t.id)})}),e},[i]),isLoading:s}};var Z=i(88340),J=e=>{let{errorMessage:t,status:i=a.ERROR}=e;return(0,r.jsxs)(o.xuv,{height:"100%",id:"outer",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[(0,r.jsx)(o.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,r.jsx)(o.j8w,{color:v[i],children:j[i]}),(0,r.jsx)(o.xuv,{padding:"0px",marginBottom:"3px",children:(0,r.jsx)(Z.Z,{copyText:t})})]}),(0,r.jsx)(o.izJ,{marginTop:"4px",marginBottom:"6px"}),(0,r.jsx)(o.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,r.jsx)(o.xvT,{children:t})})]})},G=i(3124),K=i.n(G);let H=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}},Y=e=>{if(e.status!==a.COMPLETE||!e.collection_name)return"-";let t=(e.message||"").match(/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i);return t?parseInt(t[1],10).toLocaleString():"-"},V=(e,t)=>{let i=e.filter(e=>e.action_type===t&&e.status===a.COMPLETE&&e.collection_name).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()),s={};i.forEach(e=>{let t=e.collection_name||"unknown";s[t]||(s[t]=e)});let n=0,l=!1,r=/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i;return Object.values(s).forEach(e=>{if(e.message){let t=e.message.match(r);if(t){l=!0;let e=parseInt(t[1],10);n+=e}}}),l?n:null},Q=(e,t,i)=>{if("finished"===e.status&&!e.collection_name&&i){let e=V(t,i);return null!==e?e.toLocaleString():"-"}return Y(e)};var $=e=>{var t,i,s;let{eventLogs:n,allEventLogs:l,onDetailPanel:c,privacyRequest:d}=e,u=(null==n?void 0:n.some(e=>e.collection_name))||(null==n?void 0:n.some(e=>"finished"===e.status&&!e.collection_name))||!1,m=null==n?void 0:n.every(e=>"finished"===e.status&&!e.collection_name),p=null==d?void 0:null===(s=d.policy)||void 0===s?void 0:null===(i=s.rules)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.action_type,h=e=>e?H(e):p?H(p):"-",x=null==n?void 0:n.map(e=>(0,r.jsxs)(o.Tr,{backgroundColor:e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING?K().FIDESUI_NEUTRAL_50:"unset",onClick:()=>{(e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING)&&c(e.message,e.status)},style:{cursor:e.message?"pointer":"unset"},_hover:{backgroundColor:K().FIDESUI_NEUTRAL_50},children:[(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,b.p6)(e.updated_at)})}),(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:h(e.action_type)})}),(0,r.jsx)(o.Td,{children:j[e.status]?(0,r.jsx)(o.j8w,{color:v[e.status],children:j[e.status]}):(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),u&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:Q(e,l||n,p)})}),u&&!m&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"finished"===e.status?"Request completed":e.collection_name})})]},e.updated_at));return(0,r.jsx)(o.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,r.jsx)(o.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,r.jsxs)(o.iA_,{size:"sm",id:"table",position:"relative",children:[(0,r.jsx)(o.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",zIndex:10,children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),u&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Records"})}),u&&!m&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,r.jsx)(o.p3B,{id:"tableBody",children:x})]})})})},X=e=>{let{isOpen:t,onClose:i,currentLogs:s,allEventLogs:n,isViewingError:l,errorMessage:c,currentStatus:d=a.ERROR,onCloseErrorPanel:u,onOpenErrorPanel:m,privacyRequest:p}=e;return(0,r.jsxs)(o.dys,{isOpen:t,placement:"right",onClose:i,size:"full",autoFocus:!1,"data-testid":"log-drawer",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{style:{width:"50%"},"data-testid":"log-drawer",children:[(0,r.jsx)(o.OXI,{style:{paddingBottom:"0px"},children:(0,r.jsxs)(o.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[l&&(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:u}),(0,r.jsx)(o.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:l?"Event detail":"Event log"})]}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:i,"data-testid":"log-drawer-close"})]})}),(0,r.jsxs)(o.Ng0,{id:"drawerBody",overflow:"hidden",children:[s&&!l?(0,r.jsx)($,{eventLogs:s,allEventLogs:n,onDetailPanel:m,privacyRequest:p}):null,l?(0,r.jsx)(J,{errorMessage:c,status:d}):null]})]})]})},ee=e=>{let{subjectRequest:t}=e,{isOpen:i,onOpen:s,onClose:n}=(0,o.qY0)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,x]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[v,y]=(0,h.useState)(a.ERROR),{results:f,id:_}=t,{commentItems:b,isLoading:T}=D(_),{eventItems:E,isLoading:A}=L(f),{manualTaskItems:k,taskCommentIds:C,isLoading:q}=F(_);(0,h.useEffect)(()=>{u&&f&&f[u]&&d(f[u])},[f,u]);let S=()=>{x(!1)},N=(0,h.useCallback)((e,t)=>{m(e),d(t),s()},[s]),P=(0,h.useMemo)(()=>f?Object.values(f).flat():[],[f]),I=(0,h.useMemo)(()=>b.filter(e=>{let t=e.id.replace("comment-","");return!C.has(t)}),[b,C]),O=(0,h.useMemo)(()=>{let e=E.map(e=>{if("Request update"===e.type&&e.title&&f){let t=e.title;if(f[t])return{...e,onClick:()=>N(t,f[t])}}return e});return[{author:"Fides",title:"Access request received",date:new Date(t.created_at),type:l.REQUEST_UPDATE,showViewLog:!1,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"initial-request"},...e,...I,...k].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())},[E,I,k,f,N,t.created_at]);return(0,r.jsxs)(o.xuv,{width:"100%",children:[(0,r.jsx)(o.krs,{className:"!border-none",bordered:!1,split:!1,"data-testid":"activity-timeline-list",children:(0,r.jsx)("ul",{className:"!list-none",children:T||A||q?(0,r.jsx)("div",{className:w().itemButton,"data-testid":"timeline-skeleton",children:(0,r.jsx)(o.N_L,{paragraph:{rows:2},active:!0})}):O.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(R,{item:e})},e.id))})}),(0,r.jsx)(X,{isOpen:i,onClose:()=>{p&&S(),m(""),n()},currentLogs:c,allEventLogs:P,isViewingError:p,errorMessage:g,currentStatus:v,onOpenErrorPanel:(e,t)=>{j(e),t&&y(t),x(!0)},onCloseErrorPanel:S,privacyRequest:t})]})},et=i(66187);let ei=e=>{let{privacyRequestId:t,onCancel:i}=e,[s,n]=(0,h.useState)(""),a=(0,h.useRef)(null),[l,{isLoading:c}]=S();(0,h.useEffect)(()=>{a.current&&a.current.focus()},[]);let d=async()=>{if(s.trim())try{await l({privacy_request_id:t,comment_text:s,comment_type:et.i.NOTE}).unwrap(),n(""),i()}catch(e){console.error("Failed to add comment:",e),o.Pg3.error({content:"Failed to add comment",duration:5})}},u=[{key:"internal",label:"Internal comment",children:(0,r.jsx)(o.uFc.TextArea,{ref:a,value:s,onChange:e=>n(e.target.value),rows:3,className:"mb-3 h-[150px] w-full !resize-none","data-testid":"comment-input"})}];return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A5g,{items:u}),(0,r.jsxs)(o.jqI,{justify:"flex-end",className:"gap-2",children:[(0,r.jsx)(o.wpx,{onClick:i,"data-testid":"cancel-comment-button",children:"Cancel"}),(0,r.jsx)(o.wpx,{onClick:d,loading:c,disabled:!s.trim(),type:"primary",htmlType:"button","data-testid":"submit-comment-button",children:"Save"})]})]})};var es=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(ee,{subjectRequest:t}),i?(0,r.jsx)(ei,{privacyRequestId:t.id,onCancel:()=>s(!1)}):(0,r.jsx)(g.ZP,{scopes:[x.Sh.COMMENT_CREATE],children:(0,r.jsx)(o.jqI,{justify:"flex-start",className:"mt-2",children:(0,r.jsxs)(o.wpx,{type:"default",onClick:()=>s(!0),className:"flex items-center","data-testid":"add-comment-button",children:["Add comment ",(0,r.jsx)("span",{className:"ml-1",children:"+"})]})})})]})},en=i(14207),ea=i(46238),el=i(72281),er=i(41841),eo=i(90867),ec=i(16134);let ed=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var eu=e=>{let{rules:t}=e,i=ed(t).map(e=>(0,b.kC)(e)).map(e=>e);return(0,r.jsx)(o.AntTypography.Text,{children:i.join(" - ")})},em=i(34090),ep=i(55484),eh=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(em.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ep.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(em.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map((e,t)=>{let[i]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(em.gN,{id:i,name:i,children:e=>{let{field:s}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:i,w:"50%",children:i}),(0,r.jsx)(o.IIB,{...s,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(i),ref:0===t?d:void 0,size:"sm"})]})}})},i)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})},ex=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(em.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ep.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(em.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map(e=>{let[t]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(em.gN,{id:t,name:t,children:e=>{let{field:i}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,r.jsx)(o.XZJ,{...i,isChecked:!!i.value,onChange:i.onChange,name:t,id:t})]})}})},t)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})};let eg=(e,t,i)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:eh,uploadMutation:t,getUploadedWebhookDataEndpoint:eo.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:ex,uploadMutation:i,getUploadedWebhookDataEndpoint:eo.$I.endpoints.getUploadedManualErasureWebhookData}:null;var ej=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,ec.T)(),{errorAlert:n,successAlert:a}=(0,er.VY)(),{handleError:l}=(0,er.HK)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(!1),[p,g]=(0,h.useState)(!1),{data:j,isFetching:v,isLoading:y,isSuccess:f}=(0,en.W6)(),[_]=(0,eo.w3)(),b=ed(t.policy.rules),[T]=(0,eo.nL)(),[w]=(0,eo.UR)(),{ProcessingDetailComponent:E,uploadMutation:R,getUploadedWebhookDataEndpoint:A}=eg(b,T,w),k=async()=>{try{m(!0),await _(t.id).unwrap(),a("Manual request has been received. Request now processing."),i()}catch(e){l(e)}finally{m(!1)}},C=async e=>{try{g(!0),await R(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[i,s]=e;t.fields[i]=s||""});let i=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(i),a("Manual input successfully saved!")}catch(e){l(e)}finally{g(!1)}};return((0,h.useEffect)(()=>(f&&j.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],i=null==j?void 0:j.map(e=>e.connection_config.key);null==i||i.every(i=>e.push(s(A.initiate({connection_key:i,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,i)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let i={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,s]=e;i.fields[t]=s||""}),t.push(i)}else n("An error occurred while loading manual input data for ".concat(j[i].connection_config.name))}),d(t)})})(),()=>{}),[j,c.length,s,n,f,t.id,A]),b.includes(x.Us.ACCESS)||b.includes(x.Us.ERASURE))?(0,r.jsxs)(o.gCW,{align:"stretch",spacing:8,children:[(0,r.jsx)(o.xuv,{children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,r.jsxs)(o.xuv,{children:[(v||y)&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),f&&j?(0,r.jsx)(o.xJi,{children:(0,r.jsxs)(o.iA_,{size:"sm",variant:"unstyled",children:[(0,r.jsx)(o.hrZ,{children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,r.jsx)(o.Th,{})]})}),(0,r.jsxs)(o.p3B,{children:[j.length>0&&j.map(e=>(0,r.jsxs)(o.Tr,{display:"block",children:[(0,r.jsx)(o.Td,{pl:"0",children:e.connection_config.key}),(0,r.jsx)(o.Td,{children:c.length>0?(0,r.jsx)(E,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:p,onSaveClick:C}):null})]},e.id)),0===j.length&&(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Td,{colSpan:3,pl:"0",children:(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,r.jsx)(o.$RU,{children:(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Th,{pl:"0px",children:(0,r.jsx)(o.wpx,{type:"primary",loading:u,onClick:k,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},ev=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,c.useRouter)(),{data:n}=(0,en.AZ)({}),a=(0,h.useMemo)(()=>{var e;return(null==n?void 0:null===(e=n.items)||void 0===e?void 0:e.filter(e=>e.connection_type===x.Rj.MANUAL_TASK))||[]},[n]),{data:l}=(0,en.W6)(),d=(l||[]).length>0,{data:m}=(0,B.Ym)({page:1,size:100,privacyRequestId:t.id}),p=(null==m?void 0:m.items)||[],g=p.length,j=p.filter(e=>e.status===x.OS.NEW).length,v=a.length>0;return v||d?(0,r.jsxs)(o.Kqy,{spacing:6,children:[v&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{marginBottom:12},children:"Manual tasks"}),(0,r.jsxs)(o.Kqy,{spacing:2,children:[(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:g})," task",1!==g?"s":""," ","linked to this privacy request"]}),(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:j})," pending task",1!==j?"s":""]}),g>0&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.wpx,{type:"primary",onClick:()=>{s.push({pathname:u.Jw,query:{privacy_request_id:t.id,tab:el.G.MANUAL_TASK}})},children:"View all tasks for this request →"})})]})]}),d&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsxs)(o.kCb,{alignItems:"center",style:{marginBottom:12},children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{margin:0,marginRight:8},children:"Manual steps (legacy)"}),(0,r.jsx)(ea.b,{label:"This is the legacy manual steps feature. The new manual tasks feature provides more advanced capabilities and better user experience."})]}),(0,r.jsx)(ej,{subjectRequest:t,onComplete:i||(()=>{})})]})]}):(0,r.jsx)(o.xuv,{p:4,children:(0,r.jsx)(o.AntTypography.Text,{type:"secondary",children:"No manual tasks or legacy manual steps configured for this request."})})},ey=i(59969);let ef={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"minos",label:"Requires Input"},requires_manual_finalization:{color:"minos",label:"Requires Finalization"}};var e_=e=>{let{status:t}=e;return(0,r.jsx)(o.j8w,{color:ef[t].color,className:"justify-center","data-testid":"request-status-badge",children:ef[t].label})},eb=i(18225),eT=i(812),ew=i(7842);let{useGetAttachmentsQuery:eE,useUploadAttachmentMutation:eR,useGetAttachmentDetailsQuery:eA,useLazyGetAttachmentDetailsQuery:ek}=C.u.injectEndpoints({endpoints:e=>({getAttachments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/attachment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Attachments"]}),uploadAttachment:e.mutation({query:e=>{let{privacy_request_id:t,attachment_type:i,attachment_file:s}=e,n=new FormData;return n.append("attachment_type",i),n.append("attachment_file",s),{url:"plus/privacy-request/".concat(t,"/attachment"),method:"POST",body:n,params:{}}},invalidatesTags:["Privacy Request Attachments"]}),getAttachmentDetails:e.query({query:e=>{let{privacy_request_id:t,attachment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/attachment/").concat(i),method:"GET"}}})})}),{reducer:eC}=(0,k.oM)({name:"privacyRequestAttachments",initialState:{},reducers:{}}),eq=e=>{var t;let{file:i}=e,[s,n]=(0,h.useState)(!1),[a]=ek(),l=async()=>{var e,t,s;if((null===(e=i.customData)||void 0===e?void 0:e.attachment_id)&&(null===(t=i.customData)||void 0===t?void 0:t.privacy_request_id)){n(!0);try{let e=await a({privacy_request_id:i.customData.privacy_request_id,attachment_id:i.customData.attachment_id}),t=null===(s=e.data)||void 0===s?void 0:s.retrieved_attachment_url,n=null==t?void 0:t.startsWith("http");t&&n?window.open(t,"_blank"):t&&!n?o.Pg3.info("Download is not available when using local storage methods."):o.Pg3.error("No download URL available for ".concat(i.name))}catch(e){o.Pg3.error("Failed to fetch attachment download URL")}finally{n(!1)}}},c=(null===(t=i.customData)||void 0===t?void 0:t.attachment_type)===x.sf.INCLUDE_WITH_ACCESS_PACKAGE;return(0,r.jsxs)(o.jqI,{align:"center",gap:8,children:[(0,r.jsx)(o.PJP.PgN,{className:"shrink-0"}),(0,r.jsx)(o.lKn,{ellipsis:{tooltip:i.name},className:"grow",children:i.name}),c&&(0,r.jsx)(o.esZ,{title:"This attachment will be included in the access package.",children:(0,r.jsx)(o.PJP.wvC,{className:"shrink-0",title:"User icon"})}),(0,r.jsx)(o.wpx,{type:"text",icon:(0,r.jsx)(o.PJP.UWx,{}),onClick:l,loading:s,className:"shrink-0"})]})},eS=(e,t)=>(0,r.jsx)(eq,{file:t});var eN=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1),n=(0,g.Tg)([x.Sh.ATTACHMENT_READ]),a=(0,g.Tg)([x.Sh.ATTACHMENT_CREATE]),[l]=eR(),{data:c,isLoading:d,error:u}=(0,eo.PW)(),{data:m,isLoading:p}=eE({privacy_request_id:t.id}),{refetch:j}=eE({privacy_request_id:t.id}),v=(null==m?void 0:m.items.map(e=>({uid:e.id,name:e.file_name,status:"done",customData:{attachment_id:e.id,privacy_request_id:t.id,attachment_type:e.attachment_type}})))||[],y=(0,h.useCallback)(()=>(0,r.jsx)(o.PJP.PgN,{}),[]);if(!n)return null;let f=a&&(null==c?void 0:c.key),_=[".pdf",".doc",".docx",".xls",".xlsx",".txt",".csv",".jpg",".jpeg",".png",".zip"];return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.lQT,{level:3,children:"Attachments"})}),d||p?(0,r.jsx)(eb.Z,{size:"md",alignment:"start"}):(0,r.jsx)(o.pMK,{name:"attachment_file",fileList:v,iconRender:y,showUploadList:{showRemoveIcon:!1,showDownloadIcon:!1},itemRender:eS,accept:_.join(","),customRequest:async e=>{let{file:i,onSuccess:n,onError:a}=e,r=i.name;try{s(!0),await l({privacy_request_id:t.id,attachment_file:i,attachment_type:ew.s.INTERNAL_USE_ONLY}).unwrap(),o.Pg3.success("".concat(r," file uploaded successfully")),j(),null==n||n(i)}catch(e){o.Pg3.error("".concat(r," file upload failed.")),null==a||a(e)}finally{s(!1)}},disabled:!f,children:a&&(0,r.jsx)(o.esZ,{title:u&&"Add attachment not available: ".concat((0,eT.e$)(u)),placement:"top",children:(0,r.jsxs)(o.jqI,{align:"center",gap:12,className:"mb-4",children:[(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.mm_,{}),iconPosition:"end",disabled:!f||i,loading:i,children:i?"Uploading":"Add"}),(0,r.jsx)(ea.b,{label:"Uploaded attachments are for internal use and won't be send as part of the request package.\n Accepted filetypes: ".concat(_.join(", ")),placement:"top"})]})})})]})})},eP=i(15709),eI=i.n(eP),eD=e=>{let{label:t,children:i}=e;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(eI().label),children:(0,r.jsxs)(o.AntTypography.Text,{children:[t,":"]})}),(0,r.jsx)("div",{className:"min-w-0 shrink grow ".concat(eI().value),"data-testid":"request-detail-value-".concat(t),children:i})]})},eO=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:i}=t;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:i&&Object.keys(i).length>0&&Object.entries(i).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,i]=e;return(0,r.jsx)(eD,{label:i.label,children:(0,r.jsx)(o.AntTypography.Text,{children:Array.isArray(i.value)?i.value.join(", "):i.value})},t)})})},eM=e=>{let{subjectRequest:t}=e,{plus:i}=(0,A.hz)(),{id:s,status:n,policy:a,identity:l,identity_verified_at:c}=t;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.AntTypography.Title,{level:2,children:"Request details"})}),(0,r.jsxs)(o.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,r.jsx)(eD,{label:"Status",children:(0,r.jsx)(e_,{status:n})}),(0,r.jsx)(eD,{label:"Time remaining",children:(0,r.jsx)(ey.Z,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,r.jsx)(eD,{label:"Request type",children:(0,r.jsx)(eu,{rules:a.rules})}),(0,r.jsx)(eD,{label:"Source",children:i&&(0,r.jsx)(o.AntTypography.Text,{children:t.source||"-"})}),Object.entries(l).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:i="",label:s}]=e,n="".concat(i).concat(c?"":" (Unverified)");return(0,r.jsx)(eD,{label:"Subject ".concat(s.toLocaleLowerCase()),children:(0,r.jsx)(o.esZ,{title:n,trigger:"click",children:(0,r.jsx)(o.AntTypography.Text,{ellipsis:!0,children:n})})},t)}),(0,r.jsx)(eO,{subjectRequest:t})]}),(0,r.jsxs)(o.PPS,{layout:"vertical",children:[(0,r.jsx)(o.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,r.jsx)(o.jqI,{gap:1,children:(0,r.jsxs)(o.vyj.Compact,{style:{width:"100%"},children:[(0,r.jsx)(o.uFc,{readOnly:!0,value:s,"data-testid":"request-detail-value-id"}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(Z.Z,{copyText:s})})]})})}),(0,r.jsx)(o.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,r.jsx)(o.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]}),(0,r.jsx)(eN,{subjectRequest:t})]})};let eU=[x.q2.COMPLETE,x.q2.CANCELED,x.q2.DENIED,x.q2.ERROR];var ez=e=>{var t;let{data:i}=e,s=(0,h.useMemo)(()=>({id:i.id,verbose:!0}),[i.id]),{data:n}=(0,p.QA)(s,{pollingInterval:eU.includes(i.status)?0:2e3,skip:!i.id}),a=null!==(t=null==n?void 0:n.items[0])&&void 0!==t?t:i,l=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)("activity"),u=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,r.jsx)(es,{subjectRequest:a})},{key:"manual-tasks",label:"Manual tasks",children:(0,r.jsx)(ev,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!l}],[l,a]);return(0,r.jsxs)("div",{className:"flex gap-8",children:[(0,r.jsx)("div",{className:"w-0 grow",children:(0,r.jsx)(o.A5g,{items:u,activeKey:c,onChange:d})}),(0,r.jsx)("div",{className:"w-1/3 2xl:w-[432px]","data-testid":"privacy-request-details",children:(0,r.jsx)(eM,{subjectRequest:a})})]})},eL=i(57526),eW=i(66548),eB=i(45489),eF=e=>{let{privacyRequest:t,action:i}=e,{handleApproveRequest:s,handleDenyRequest:n}=(0,eB.Z)({subjectRequest:t}),a=t.status===x.q2.PENDING,l=(0,o.qY0)(),r=async e=>{let{reason:t}=e,a=o.Pg3.loading({content:"approve"===i?"Approving request...":"Denying request..."});"deny"===i&&await n(t),"approve"===i&&await s(),a()};return{showAction:a,closeModal:l.onClose,performAction:r,openConfirmationModal:l.onOpen,isModalOpen:l.isOpen}},eZ=e=>{var t,i,s;let{privacyRequest:n}=e,a=null===(i=(0,A.hz)())||void 0===i?void 0:null===(t=i.flags)||void 0===t?void 0:t.downloadAccessRequestResults,l=n.status===x.q2.COMPLETE,r=ed(n.policy.rules).includes(x.Us.ACCESS),o=(0,g.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:m}=(0,eo.br)({privacy_request_id:n.id}),p=null!==(s=null==c?void 0:c.access_result_urls[0])&&void 0!==s?s:"",h=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,eT.e$)(m,"Unable to resolve download URL"):h||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:a&&o&&r&&l,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!h}},eJ=e=>{let{privacyRequest:t}=e,{errorAlert:i,successAlert:s}=(0,er.VY)(),n=t.status===x.q2.ERROR,[a]=(0,eo.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=o.Pg3.loading("Reprocessing privacy request...",0),n=await a(t);"error"in n?i((0,eT.e$)(n.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):s("Privacy request is now being reprocessed."),e()},showReprocess:n}},eG=e=>{let{privacyRequest:t}=e,{showDownloadResults:i,downloadResults:s,infoTooltip:n,isDisabled:a}=eZ({privacyRequest:t}),{isModalOpen:l,closeModal:c,performAction:d,openConfirmationModal:u,showAction:m}=eF({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:v,showAction:y}=eF({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:f,showReprocess:_}=eJ({privacyRequest:t}),{handleFinalizeRequest:b,finalizeRequestResult:T}=(0,eB.Z)({subjectRequest:t}),w=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,r.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!m}),e.push({key:"deny",label:(0,r.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:v,disabled:!y}),e.push({key:"reprocess",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:f,disabled:!_}),t.status===x.q2.REQUIRES_MANUAL_FINALIZATION&&e.push({key:"finalize",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-finalize",children:"Finalize"}),onClick:b,disabled:T.isLoading}),i&&e.push({key:"download",label:(0,r.jsx)(o.esZ,{title:a?n:null,placement:"bottom",children:(0,r.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:s,disabled:a}),e},[i,s,n,a,m,y,u,v,_,f,t.status,b,T.isLoading]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.S0p,{menu:{items:w},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!w.length,size:"large",children:"Actions"})}),(0,r.jsx)(eL.Z,{isOpen:l,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,r.jsx)(eW.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},eK=()=>{let e=(0,c.useRouter)().query.id,{data:t,isLoading:i}=(0,p.QA)({id:e,verbose:!0},{skip:!e}),s=(null==t?void 0:t.items[0])||null;return(0,r.jsxs)(d.Z,{title:"Privacy Request - ".concat(e),children:[(0,r.jsx)(m.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Request details"}],rightContent:!!s&&(0,r.jsx)(eG,{privacyRequest:s})}),i&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),!i&&!s&&(0,r.jsx)(o.xvT,{children:"404 no privacy request found"}),!i&&s&&(0,r.jsx)(ez,{data:s})]})}},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},38450:function(e){e.exports={container:"ActivityTimelineEntry_container__tCva0","container--open":"ActivityTimelineEntry_container--open__1d9mA",itemButton:"ActivityTimelineEntry_itemButton__MlmWS","itemButton--error":"ActivityTimelineEntry_itemButton--error__UizD2","itemButton--comment":"ActivityTimelineEntry_itemButton--comment__g98SH","itemButton--awaiting-input":"ActivityTimelineEntry_itemButton--awaiting-input__6lB5t",header:"ActivityTimelineEntry_header__GYibj",title:"ActivityTimelineEntry_title__rm_g0","title--error":"ActivityTimelineEntry_title--error__fOi0s","title--awaiting-input":"ActivityTimelineEntry_title--awaiting-input__3sPAo",timestamp:"ActivityTimelineEntry_timestamp__uMEMT",viewLogs:"ActivityTimelineEntry_viewLogs___T4jN",logs:"ActivityTimelineEntry_logs__T7R0J","logs--open":"ActivityTimelineEntry_logs--open__o_9Io"}}},function(e){e.O(0,[431,1841,8373,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9650],{6554:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/[id]",function(){return i(50107)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return p}});var s=i(24246),n=i(96306),a=i(88038),l=i.n(a),r=i(86677);i(27378);var o=i(25980),c=i(90867),d=i(42478),u=i(77830),m=()=>{let e=(0,r.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(u.AD)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},p=e=>{let{children:t,title:i,padded:a=!0,mainProps:u}=e,p=(0,o.hz)(),h=(0,r.useRouter)(),x="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,g=!(p.flags.messagingConfiguration&&x),{data:j}=(0,d.JE)(void 0,{skip:g}),{data:v}=(0,c.PW)(void 0,{skip:g}),y=p.flags.messagingConfiguration&&(!j||!v)&&x;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...u,children:[y?(0,s.jsx)(m,{}):null,t]})]})}},50107:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return eK}});var s,n,a,l,r=i(24246),o=i(96306),c=i(86677),d=i(77213),u=i(77830),m=i(58754),p=i(99716),h=i(27378),x=i(21910),g=i(19904);(s=a||(a={})).IN_PROCESSING="in_processing",s.PENDING="pending",s.COMPLETE="complete",s.ERROR="error",s.PAUSED="paused",s.AWAITING_PROCESSING="awaiting_processing",s.RETRYING="retrying",s.SKIPPED="skipped";let j={in_processing:"In processing",pending:"Pending",complete:"Complete",error:"Error",paused:"Paused",awaiting_processing:"Awaiting input",retrying:"Retrying",skipped:"Skipped"},v={error:"error",skipped:"warning",awaiting_processing:"minos",in_processing:void 0,pending:void 0,complete:void 0,paused:void 0,retrying:void 0};(n=l||(l={})).REQUEST_UPDATE="Request update",n.INTERNAL_COMMENT="Internal comment",n.MANUAL_TASK="Manual task";let y={"Request update":"sandstone","Internal comment":"marble","Manual task":"nectar"};var f=i(90005),_=i.n(f),b=i(16394),T=i(38450),w=i.n(T);let E=e=>{let{attachments:t}=e;if(!t.length)return null;if(1===t.length){let e=t[0];return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.AntTypography.Text,{ellipsis:{tooltip:!0},className:"!max-w-[200px]",children:e.file_name})]})})}let i=(0,r.jsx)("ul",{className:"list-disc pl-4",children:t.map(e=>(0,r.jsx)("li",{children:e.file_name},e.id))});return(0,r.jsx)("div",{className:"flex flex-wrap gap-2 text-sm text-gray-600","data-testid":"activity-timeline-attachments",children:(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)(o.PJP.PgN,{className:"mr-1 size-4"}),(0,r.jsx)(o.esZ,{title:i,children:(0,r.jsxs)(o.AntTypography.Text,{ellipsis:!0,className:"!max-w-[200px]",children:[t.length," attachments"]})})]})})};var R=e=>{let{item:t}=e,{author:i,title:s,date:n,type:a,onClick:c,isError:d,isAwaitingInput:u,description:m,attachments:p,showViewLog:h}=t,x=(0,b.p6)(n),g=!!c,j=p&&p.length>0,v=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:w().header,children:[(0,r.jsxs)("span",{className:w().author,"data-testid":"activity-timeline-author",children:[i,":"]}),s&&(0,r.jsxs)(o.AntTypography.Text,{className:_()(w().title,{[w()["title--error"]]:d,[w()["title--awaiting-input"]]:u}),ellipsis:{tooltip:!0},"data-testid":"activity-timeline-title",children:[s,d&&" failed"]}),(0,r.jsx)("div",{className:"hidden xl:block",children:(0,r.jsx)(o.AntTypography.Text,{className:w().timestamp,"data-testid":"activity-timeline-timestamp",children:x})}),(0,r.jsx)("div",{className:"xl:hidden",children:(0,r.jsx)(o.esZ,{title:x,children:(0,r.jsx)(o.PJP.qpU,{"data-testid":"activity-timeline-timestamp-icon"})})}),(0,r.jsx)(o.j8w,{className:w().type,color:y[a],"data-testid":"activity-timeline-type",children:a}),h&&(0,r.jsx)("span",{className:w().viewLogs,"data-testid":"activity-timeline-view-logs",children:"View Log"})]}),(m||j)&&(0,r.jsxs)("div",{className:"mt-2 flex justify-between pl-2.5 align-top",children:[(0,r.jsx)(o.AntTypography.Paragraph,{className:"!mb-0 whitespace-pre-wrap","data-testid":"activity-timeline-description",children:m||""}),j&&(0,r.jsx)(E,{attachments:p})]})]}),f={className:_()(w().itemButton,{[w()["itemButton--error"]]:d,[w()["itemButton--awaiting-input"]]:u,[w()["itemButton--clickable"]]:g,[w()["itemButton--comment"]]:a===l.INTERNAL_COMMENT,[w()["itemButton--manual-task"]]:a===l.MANUAL_TASK}),"data-testid":"activity-timeline-item"};return g?(0,r.jsx)("button",{type:"button",onClick:c,...f,children:v}):(0,r.jsx)("div",{...f,children:v})},A=i(25980),k=i(54427),C=i(78780);let{useGetCommentsQuery:q,useCreateCommentMutation:S,useGetCommentDetailsQuery:N,useLazyGetCommentDetailsQuery:P}=C.u.injectEndpoints({endpoints:e=>({getComments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/comment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Comments"]}),createComment:e.mutation({query:e=>{let{privacy_request_id:t,comment_text:i,comment_type:s}=e,n=new FormData;return n.append("comment_text",i),n.append("comment_type",s),{url:"plus/privacy-request/".concat(t,"/comment"),method:"POST",body:n,formData:!0}},invalidatesTags:["Privacy Request Comments","Request"]}),getCommentDetails:e.query({query:e=>{let{privacy_request_id:t,comment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/comment/").concat(i),method:"GET"}}})})}),{reducer:I}=(0,k.oM)({name:"privacyRequestComments",initialState:{},reducers:{}}),D=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=q({privacy_request_id:e,size:100},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch the request comments")},[n]),{commentItems:(null==i?void 0:i.items)?i.items.map(e=>({author:e.user_first_name&&e.user_last_name?"".concat(e.user_first_name," ").concat(e.user_last_name):e.username||"Unknown",date:new Date(e.created_at),type:l.INTERNAL_COMMENT,showViewLog:!1,description:e.comment_text,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"comment-".concat(e.id)})):[],isLoading:s}},O=(e,t)=>{if(0===e.length)return!1;let i=Array.from(e).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!i[0].collection_name)return i[0].status===t;let s={};return i.forEach(e=>{e.collection_name&&!s[e.collection_name]&&(s[e.collection_name]=e)}),Object.values(s).some(e=>e.status===t)},M=e=>O(e,a.ERROR),U=e=>O(e,a.SKIPPED),z=e=>O(e,a.AWAITING_PROCESSING),L=e=>{let t=!e;return{eventItems:e?Object.entries(e).map(e=>{let[t,i]=e,s=M(i),n=U(i),a=z(i);return{author:"Fides",title:t,date:new Date(i[0].updated_at),type:l.REQUEST_UPDATE,showViewLog:s||n||a,onClick:()=>{},isError:s,isSkipped:n,isAwaitingInput:a,id:"request-".concat(t)}}):[],isLoading:t}};var W=i(91317),B=i(45116);let F=e=>{let{plus:t}=(0,A.hz)(),{data:i,isLoading:s,error:n}=(0,B.Ym)({page:1,size:100,privacyRequestId:e,status:void 0,includeFullSubmissionDetails:!0},{skip:!t});return(0,h.useEffect)(()=>{n&&o.Pg3.error("Failed to fetch manual tasks")},[n]),{manualTaskItems:i?i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).map(e=>{var t,i;let s=e.submission_user?(0,b.gJ)(e.submission_user):"Unknown User";(0,W.PN)(null===(t=e.submission_user)||void 0===t?void 0:t.id)&&(s=(null===(i=e.submission_user)||void 0===i?void 0:i.id)||"Unknown User");let n=e.status===x.OS.SKIPPED,a="Task ".concat(n?"skipped":"completed"," - ").concat(e.name),r=e.comments&&e.comments.length>0?e.comments[e.comments.length-1].comment_text:void 0,o=e.attachments||[];return{author:s,title:a,date:new Date(e.updated_at),type:l.MANUAL_TASK,showViewLog:!1,description:r,isError:!1,isSkipped:n,isAwaitingInput:!1,id:"manual-task-".concat(e.manual_field_id),attachments:o}}):[],taskCommentIds:(0,h.useMemo)(()=>{let e=new Set;return(null==i?void 0:i.items)&&i.items.filter(e=>e.status===x.OS.COMPLETED||e.status===x.OS.SKIPPED).forEach(t=>{var i;null===(i=t.comments)||void 0===i||i.forEach(t=>{e.add(t.id)})}),e},[i]),isLoading:s}};var Z=i(88340),J=e=>{let{errorMessage:t,status:i=a.ERROR}=e;return(0,r.jsxs)(o.xuv,{height:"100%",id:"outer",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[(0,r.jsx)(o.xvT,{size:"sm",color:"gray.700",fontWeight:"medium",marginRight:"8px",lineHeight:"20px",children:"Status"}),(0,r.jsx)(o.j8w,{color:v[i],children:j[i]}),(0,r.jsx)(o.xuv,{padding:"0px",marginBottom:"3px",children:(0,r.jsx)(Z.Z,{copyText:t})})]}),(0,r.jsx)(o.izJ,{marginTop:"4px",marginBottom:"6px"}),(0,r.jsx)(o.xuv,{id:"errorWrapper",overflow:"auto",height:"100%",children:(0,r.jsx)(o.xvT,{children:t})})]})},G=i(3124),K=i.n(G);let H=e=>{switch(e){case x.Us.ACCESS:return"Data Retrieval";case x.Us.ERASURE:return"Data Deletion";case x.Us.CONSENT:return"Consent";case x.Us.UPDATE:return"Data Update";default:return e}},Y=e=>{if(e.status!==a.COMPLETE||!e.collection_name)return"-";let t=(e.message||"").match(/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i);return t?parseInt(t[1],10).toLocaleString():"-"},V=(e,t)=>{let i=e.filter(e=>e.action_type===t&&e.status===a.COMPLETE&&e.collection_name).sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime()),s={};i.forEach(e=>{let t=e.collection_name||"unknown";s[t]||(s[t]=e)});let n=0,l=!1,r=/(?:retrieved|masked|processed)\s+(\d+)\s+records?$/i;return Object.values(s).forEach(e=>{if(e.message){let t=e.message.match(r);if(t){l=!0;let e=parseInt(t[1],10);n+=e}}}),l?n:null},Q=(e,t,i)=>{if("finished"===e.status&&!e.collection_name&&i){let e=V(t,i);return null!==e?e.toLocaleString():"-"}return Y(e)};var $=e=>{var t,i,s;let{eventLogs:n,allEventLogs:l,onDetailPanel:c,privacyRequest:d}=e,u=(null==n?void 0:n.some(e=>e.collection_name))||(null==n?void 0:n.some(e=>"finished"===e.status&&!e.collection_name))||!1,m=null==n?void 0:n.every(e=>"finished"===e.status&&!e.collection_name),p=null==d?void 0:null===(s=d.policy)||void 0===s?void 0:null===(i=s.rules)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.action_type,h=e=>e?H(e):p?H(p):"-",x=null==n?void 0:n.map(e=>(0,r.jsxs)(o.Tr,{backgroundColor:e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING?K().FIDESUI_NEUTRAL_50:"unset",onClick:()=>{(e.status===a.ERROR||e.status===a.SKIPPED&&e.message||e.status===a.AWAITING_PROCESSING)&&c(e.message,e.status)},style:{cursor:e.message?"pointer":"unset"},_hover:{backgroundColor:K().FIDESUI_NEUTRAL_50},children:[(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:(0,b.p6)(e.updated_at)})}),(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:h(e.action_type)})}),(0,r.jsx)(o.Td,{children:j[e.status]?(0,r.jsx)(o.j8w,{color:v[e.status],children:j[e.status]}):(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:e.status})}),u&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:Q(e,l||n,p)})}),u&&!m&&(0,r.jsx)(o.Td,{children:(0,r.jsx)(o.xvT,{color:"gray.600",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"finished"===e.status?"Request completed":e.collection_name})})]},e.updated_at));return(0,r.jsx)(o.xuv,{width:"100%",paddingTop:"0px",height:"100%",children:(0,r.jsx)(o.xJi,{id:"tableContainer",height:"100%",style:{overflowY:"auto"},children:(0,r.jsxs)(o.iA_,{size:"sm",id:"table",position:"relative",children:[(0,r.jsx)(o.hrZ,{id:"tableHeader",position:"sticky",top:"0px",backgroundColor:"white",zIndex:10,children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Time"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Action Type"})}),(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Status"})}),u&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Records"})}),u&&!m&&(0,r.jsx)(o.Th,{children:(0,r.jsx)(o.xvT,{color:"black",fontSize:"xs",lineHeight:"4",fontWeight:"medium",children:"Collection"})})]})}),(0,r.jsx)(o.p3B,{id:"tableBody",children:x})]})})})},X=e=>{let{isOpen:t,onClose:i,currentLogs:s,allEventLogs:n,isViewingError:l,errorMessage:c,currentStatus:d=a.ERROR,onCloseErrorPanel:u,onOpenErrorPanel:m,privacyRequest:p}=e;return(0,r.jsxs)(o.dys,{isOpen:t,placement:"right",onClose:i,size:"full",autoFocus:!1,"data-testid":"log-drawer",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{style:{width:"50%"},"data-testid":"log-drawer",children:[(0,r.jsx)(o.OXI,{style:{paddingBottom:"0px"},children:(0,r.jsxs)(o.kCb,{justifyContent:"space-between",alignItems:"center",height:"40px",children:[(0,r.jsxs)(o.kCb,{alignItems:"center",children:[l&&(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.Rpv,{}),"aria-label":"Close error logs",size:"small",onClick:u}),(0,r.jsx)(o.xvT,{color:"gray.900",fontSize:"md",lineHeight:"6",fontWeight:"medium",ml:1,children:l?"Event detail":"Event log"})]}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.LGN,{width:"17px"}),"aria-label":"Stop viewing error message",size:"small",onClick:i,"data-testid":"log-drawer-close"})]})}),(0,r.jsxs)(o.Ng0,{id:"drawerBody",overflow:"hidden",children:[s&&!l?(0,r.jsx)($,{eventLogs:s,allEventLogs:n,onDetailPanel:m,privacyRequest:p}):null,l?(0,r.jsx)(J,{errorMessage:c,status:d}):null]})]})]})},ee=e=>{let{subjectRequest:t}=e,{isOpen:i,onOpen:s,onClose:n}=(0,o.qY0)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(""),[p,x]=(0,h.useState)(!1),[g,j]=(0,h.useState)(""),[v,y]=(0,h.useState)(a.ERROR),{results:f,id:_}=t,{commentItems:b,isLoading:T}=D(_),{eventItems:E,isLoading:A}=L(f),{manualTaskItems:k,taskCommentIds:C,isLoading:q}=F(_);(0,h.useEffect)(()=>{u&&f&&f[u]&&d(f[u])},[f,u]);let S=()=>{x(!1)},N=(0,h.useCallback)((e,t)=>{m(e),d(t),s()},[s]),P=(0,h.useMemo)(()=>f?Object.values(f).flat():[],[f]),I=(0,h.useMemo)(()=>b.filter(e=>{let t=e.id.replace("comment-","");return!C.has(t)}),[b,C]),O=(0,h.useMemo)(()=>{let e=E.map(e=>{if("Request update"===e.type&&e.title&&f){let t=e.title;if(f[t])return{...e,onClick:()=>N(t,f[t])}}return e});return[{author:"Fides",title:"Access request received",date:new Date(t.created_at),type:l.REQUEST_UPDATE,showViewLog:!1,isError:!1,isSkipped:!1,isAwaitingInput:!1,id:"initial-request"},...e,...I,...k].sort((e,t)=>new Date(e.date).getTime()-new Date(t.date).getTime())},[E,I,k,f,N,t.created_at]);return(0,r.jsxs)(o.xuv,{width:"100%",children:[(0,r.jsx)(o.krs,{className:"!border-none",bordered:!1,split:!1,"data-testid":"activity-timeline-list",children:(0,r.jsx)("ul",{className:"!list-none",children:T||A||q?(0,r.jsx)("div",{className:w().itemButton,"data-testid":"timeline-skeleton",children:(0,r.jsx)(o.N_L,{paragraph:{rows:2},active:!0})}):O.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(R,{item:e})},e.id))})}),(0,r.jsx)(X,{isOpen:i,onClose:()=>{p&&S(),m(""),n()},currentLogs:c,allEventLogs:P,isViewingError:p,errorMessage:g,currentStatus:v,onOpenErrorPanel:(e,t)=>{j(e),t&&y(t),x(!0)},onCloseErrorPanel:S,privacyRequest:t})]})},et=i(66187);let ei=e=>{let{privacyRequestId:t,onCancel:i}=e,[s,n]=(0,h.useState)(""),a=(0,h.useRef)(null),[l,{isLoading:c}]=S();(0,h.useEffect)(()=>{a.current&&a.current.focus()},[]);let d=async()=>{if(s.trim())try{await l({privacy_request_id:t,comment_text:s,comment_type:et.i.NOTE}).unwrap(),n(""),i()}catch(e){console.error("Failed to add comment:",e),o.Pg3.error({content:"Failed to add comment",duration:5})}},u=[{key:"internal",label:"Internal comment",children:(0,r.jsx)(o.uFc.TextArea,{ref:a,value:s,onChange:e=>n(e.target.value),rows:3,className:"mb-3 h-[150px] w-full !resize-none","data-testid":"comment-input"})}];return(0,r.jsxs)("div",{children:[(0,r.jsx)(o.A5g,{items:u}),(0,r.jsxs)(o.jqI,{justify:"flex-end",className:"gap-2",children:[(0,r.jsx)(o.wpx,{onClick:i,"data-testid":"cancel-comment-button",children:"Cancel"}),(0,r.jsx)(o.wpx,{onClick:d,loading:c,disabled:!s.trim(),type:"primary",htmlType:"button","data-testid":"submit-comment-button",children:"Save"})]})]})};var es=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1);return(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)(ee,{subjectRequest:t}),i?(0,r.jsx)(ei,{privacyRequestId:t.id,onCancel:()=>s(!1)}):(0,r.jsx)(g.ZP,{scopes:[x.Sh.COMMENT_CREATE],children:(0,r.jsx)(o.jqI,{justify:"flex-start",className:"mt-2",children:(0,r.jsxs)(o.wpx,{type:"default",onClick:()=>s(!0),className:"flex items-center","data-testid":"add-comment-button",children:["Add comment ",(0,r.jsx)("span",{className:"ml-1",children:"+"})]})})})]})},en=i(14207),ea=i(46238),el=i(72281),er=i(17245),eo=i(90867),ec=i(16134);let ed=e=>Array.from(new Set(e.filter(e=>Object.values(x.Us).includes(e.action_type)).map(e=>e.action_type)));var eu=e=>{let{rules:t}=e,i=ed(t).map(e=>(0,b.kC)(e)).map(e=>e);return(0,r.jsx)(o.AntTypography.Text,{children:i.join(" - ")})},em=i(34090),ep=i(55484),eh=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(em.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ep.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual access"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please complete the following PII fields that have been collected for the selected subject."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(em.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map((e,t)=>{let[i]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(em.gN,{id:i,name:i,children:e=>{let{field:s}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:i,w:"50%",children:i}),(0,r.jsx)(o.IIB,{...s,autoComplete:"off",color:"gray.700",placeholder:"Please enter ".concat(i),ref:0===t?d:void 0,size:"sm"})]})}})},i)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})},ex=e=>{let{connectorName:t,data:i,isSubmitting:s=!1,onSaveClick:n}=e,{isOpen:a,onOpen:l,onClose:c}=(0,o.qY0)(),d=(0,h.useRef)(null),u=async(e,t)=>{n({connection_key:i.connection_key,privacy_request_id:i.privacy_request_id,body:{...e}}),c()};return(0,r.jsxs)(r.Fragment,{children:[(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",children:"Review"}),!(null==i?void 0:i.checked)&&(0,r.jsx)(o.wpx,{onClick:l,size:"small",type:"primary",children:"Begin manual input"}),(0,r.jsx)(em.J9,{enableReinitialize:!0,initialValues:{...i.fields},onSubmit:u,validateOnBlur:!1,validateOnChange:!1,validationSchema:ep.Ry().shape({}),children:e=>(0,r.jsxs)(o.dys,{isOpen:a,placement:"right",initialFocusRef:d,onClose:c,size:"lg",children:[(0,r.jsx)(o.P1B,{}),(0,r.jsxs)(o.scA,{children:[(0,r.jsx)(o.cCv,{}),(0,r.jsxs)(o.OXI,{color:"gray.900",children:[(0,r.jsx)(o.xvT,{fontSize:"xl",mb:8,children:t}),(0,r.jsx)(o.izJ,{}),(0,r.jsx)(o.xvT,{fontSize:"md",mt:"4",children:"Manual erasure"}),(0,r.jsx)(o.xuv,{mt:"8px",children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",fontWeight:"normal",children:"Please delete the following PII fields associated with the selected subject if they are available. Once deleted, check the box to confirm the deletion."})})]}),(0,r.jsx)(o.Ng0,{children:(0,r.jsx)(em.l0,{id:"manual-detail-form",noValidate:!0,children:(0,r.jsx)(o.gCW,{align:"stretch",gap:"16px",children:Object.entries(i.fields).map(e=>{let[t]=e;return(0,r.jsx)(o.Ugi,{children:(0,r.jsx)(em.gN,{id:t,name:t,children:e=>{let{field:i}=e;return(0,r.jsxs)(o.NIc,{alignItems:"baseline",display:"inline-flex",children:[(0,r.jsx)(o.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:t,w:"50%",children:t}),(0,r.jsx)(o.XZJ,{...i,isChecked:!!i.value,onChange:i.onChange,name:t,id:t})]})}})},t)})})})}),(0,r.jsx)(o.zeN,{justifyContent:"flex-start",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(o.wpx,{onClick:c,children:"Cancel"}),(0,r.jsx)(o.wpx,{form:"manual-detail-form",loading:s,htmlType:"submit",children:"Save"})]})})]})]})})]})};let eg=(e,t,i)=>e.includes(x.Us.ACCESS)?{ProcessingDetailComponent:eh,uploadMutation:t,getUploadedWebhookDataEndpoint:eo.$I.endpoints.getUploadedManualAccessWebhookData}:e.includes(x.Us.ERASURE)?{ProcessingDetailComponent:ex,uploadMutation:i,getUploadedWebhookDataEndpoint:eo.$I.endpoints.getUploadedManualErasureWebhookData}:null;var ej=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,ec.T)(),{errorAlert:n,successAlert:a}=(0,er.VY)(),{handleError:l}=(0,er.HK)(),[c,d]=(0,h.useState)([]),[u,m]=(0,h.useState)(!1),[p,g]=(0,h.useState)(!1),{data:j,isFetching:v,isLoading:y,isSuccess:f}=(0,en.W6)(),[_]=(0,eo.w3)(),b=ed(t.policy.rules),[T]=(0,eo.nL)(),[w]=(0,eo.UR)(),{ProcessingDetailComponent:E,uploadMutation:R,getUploadedWebhookDataEndpoint:A}=eg(b,T,w),k=async()=>{try{m(!0),await _(t.id).unwrap(),a("Manual request has been received. Request now processing."),i()}catch(e){l(e)}finally{m(!1)}},C=async e=>{try{g(!0),await R(e).unwrap();let t={connection_key:e.connection_key,fields:{}};Object.entries(e.body).forEach(e=>{let[i,s]=e;t.fields[i]=s||""});let i=c.map(e=>e.connection_key===t.connection_key?{...e,checked:!0,fields:{...t.fields}}:e);d(i),a("Manual input successfully saved!")}catch(e){l(e)}finally{g(!1)}};return((0,h.useEffect)(()=>(f&&j.length>0&&0===c.length&&(()=>{if(c.length>0)return;let e=[],i=null==j?void 0:j.map(e=>e.connection_config.key);null==i||i.every(i=>e.push(s(A.initiate({connection_key:i,privacy_request_id:t.id})))),Promise.allSettled(e).then(e=>{let t=[];e.forEach((e,i)=>{if("fulfilled"===e.status&&e.value.isSuccess&&e.value.data){let i={checked:e.value.data.checked,fields:{},connection_key:e.value.originalArgs.connection_key,privacy_request_id:e.value.originalArgs.privacy_request_id};Object.entries(e.value.data.fields).forEach(e=>{let[t,s]=e;i.fields[t]=s||""}),t.push(i)}else n("An error occurred while loading manual input data for ".concat(j[i].connection_config.name))}),d(t)})})(),()=>{}),[j,c.length,s,n,f,t.id,A]),b.includes(x.Us.ACCESS)||b.includes(x.Us.ERASURE))?(0,r.jsxs)(o.gCW,{align:"stretch",spacing:8,children:[(0,r.jsx)(o.xuv,{children:(0,r.jsx)(o.xvT,{color:"gray.700",fontSize:"sm",children:"The following table details the integrations that require manual input from you."})}),(0,r.jsxs)(o.xuv,{children:[(v||y)&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),f&&j?(0,r.jsx)(o.xJi,{children:(0,r.jsxs)(o.iA_,{size:"sm",variant:"unstyled",children:[(0,r.jsx)(o.hrZ,{children:(0,r.jsxs)(o.Tr,{children:[(0,r.jsx)(o.Th,{fontSize:"sm",fontWeight:"semibold",pl:"0",textTransform:"none",children:"Integration Identifier"}),(0,r.jsx)(o.Th,{})]})}),(0,r.jsxs)(o.p3B,{children:[j.length>0&&j.map(e=>(0,r.jsxs)(o.Tr,{display:"block",children:[(0,r.jsx)(o.Td,{pl:"0",children:e.connection_config.key}),(0,r.jsx)(o.Td,{children:c.length>0?(0,r.jsx)(E,{connectorName:e.connection_config.name,data:c.find(t=>t.connection_key===e.connection_config.key),isSubmitting:p,onSaveClick:C}):null})]},e.id)),0===j.length&&(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Td,{colSpan:3,pl:"0",children:(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.xvT,{children:"You don‘t have any Manual Process connections set up yet."})})})})]}),c.length>0&&c.every(e=>e.checked)?(0,r.jsx)(o.$RU,{children:(0,r.jsx)(o.Tr,{children:(0,r.jsx)(o.Th,{pl:"0px",children:(0,r.jsx)(o.wpx,{type:"primary",loading:u,onClick:k,className:"mt-2",children:"Complete DSR"})})})}):null]})}):null]})]}):null},ev=e=>{let{subjectRequest:t,onComplete:i}=e,s=(0,c.useRouter)(),{data:n}=(0,en.AZ)({}),a=(0,h.useMemo)(()=>{var e;return(null==n?void 0:null===(e=n.items)||void 0===e?void 0:e.filter(e=>e.connection_type===x.Rj.MANUAL_TASK))||[]},[n]),{data:l}=(0,en.W6)(),d=(l||[]).length>0,{data:m}=(0,B.Ym)({page:1,size:100,privacyRequestId:t.id}),p=(null==m?void 0:m.items)||[],g=p.length,j=p.filter(e=>e.status===x.OS.NEW).length,v=a.length>0;return v||d?(0,r.jsxs)(o.Kqy,{spacing:6,children:[v&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{marginBottom:12},children:"Manual tasks"}),(0,r.jsxs)(o.Kqy,{spacing:2,children:[(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:g})," task",1!==g?"s":""," ","linked to this privacy request"]}),(0,r.jsxs)(o.AntTypography.Text,{children:[(0,r.jsx)("strong",{children:j})," pending task",1!==j?"s":""]}),g>0&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(o.wpx,{type:"primary",onClick:()=>{s.push({pathname:u.Jw,query:{privacy_request_id:t.id,tab:el.G.MANUAL_TASK}})},children:"View all tasks for this request →"})})]})]}),d&&(0,r.jsxs)(o.xuv,{children:[(0,r.jsxs)(o.kCb,{alignItems:"center",style:{marginBottom:12},children:[(0,r.jsx)(o.AntTypography.Title,{level:4,style:{margin:0,marginRight:8},children:"Manual steps (legacy)"}),(0,r.jsx)(ea.b,{label:"This is the legacy manual steps feature. The new manual tasks feature provides more advanced capabilities and better user experience."})]}),(0,r.jsx)(ej,{subjectRequest:t,onComplete:i||(()=>{})})]})]}):(0,r.jsx)(o.xuv,{p:4,children:(0,r.jsx)(o.AntTypography.Text,{type:"secondary",children:"No manual tasks or legacy manual steps configured for this request."})})},ey=i(59969);let ef={approved:{color:"success",label:"Approved"},complete:{color:"success",label:"Completed"},awaiting_email_send:{color:"marble",label:"Awaiting Email Send"},denied:{color:"warning",label:"Denied"},canceled:{color:"marble",label:"Canceled"},error:{color:"error",label:"Error"},in_processing:{color:"caution",label:"In Progress"},paused:{color:"marble",label:"Paused"},pending:{color:"info",label:"New"},identity_unverified:{color:"marble",label:"Unverified"},requires_input:{color:"minos",label:"Requires Input"},requires_manual_finalization:{color:"minos",label:"Requires Finalization"}};var e_=e=>{let{status:t}=e;return(0,r.jsx)(o.j8w,{color:ef[t].color,className:"justify-center","data-testid":"request-status-badge",children:ef[t].label})},eb=i(18225),eT=i(812),ew=i(7842);let{useGetAttachmentsQuery:eE,useUploadAttachmentMutation:eR,useGetAttachmentDetailsQuery:eA,useLazyGetAttachmentDetailsQuery:ek}=C.u.injectEndpoints({endpoints:e=>({getAttachments:e.query({query:e=>{let{privacy_request_id:t,page:i=1,size:s}=e;return{url:"plus/privacy-request/".concat(t,"/attachment"),method:"GET",params:{page:i,size:s}}},providesTags:["Privacy Request Attachments"]}),uploadAttachment:e.mutation({query:e=>{let{privacy_request_id:t,attachment_type:i,attachment_file:s}=e,n=new FormData;return n.append("attachment_type",i),n.append("attachment_file",s),{url:"plus/privacy-request/".concat(t,"/attachment"),method:"POST",body:n,params:{}}},invalidatesTags:["Privacy Request Attachments"]}),getAttachmentDetails:e.query({query:e=>{let{privacy_request_id:t,attachment_id:i}=e;return{url:"plus/privacy-request/".concat(t,"/attachment/").concat(i),method:"GET"}}})})}),{reducer:eC}=(0,k.oM)({name:"privacyRequestAttachments",initialState:{},reducers:{}}),eq=e=>{var t;let{file:i}=e,[s,n]=(0,h.useState)(!1),[a]=ek(),l=async()=>{var e,t,s;if((null===(e=i.customData)||void 0===e?void 0:e.attachment_id)&&(null===(t=i.customData)||void 0===t?void 0:t.privacy_request_id)){n(!0);try{let e=await a({privacy_request_id:i.customData.privacy_request_id,attachment_id:i.customData.attachment_id}),t=null===(s=e.data)||void 0===s?void 0:s.retrieved_attachment_url,n=null==t?void 0:t.startsWith("http");t&&n?window.open(t,"_blank"):t&&!n?o.Pg3.info("Download is not available when using local storage methods."):o.Pg3.error("No download URL available for ".concat(i.name))}catch(e){o.Pg3.error("Failed to fetch attachment download URL")}finally{n(!1)}}},c=(null===(t=i.customData)||void 0===t?void 0:t.attachment_type)===x.sf.INCLUDE_WITH_ACCESS_PACKAGE;return(0,r.jsxs)(o.jqI,{align:"center",gap:8,children:[(0,r.jsx)(o.PJP.PgN,{className:"shrink-0"}),(0,r.jsx)(o.lKn,{ellipsis:{tooltip:i.name},className:"grow",children:i.name}),c&&(0,r.jsx)(o.esZ,{title:"This attachment will be included in the access package.",children:(0,r.jsx)(o.PJP.wvC,{className:"shrink-0",title:"User icon"})}),(0,r.jsx)(o.wpx,{type:"text",icon:(0,r.jsx)(o.PJP.UWx,{}),onClick:l,loading:s,className:"shrink-0"})]})},eS=(e,t)=>(0,r.jsx)(eq,{file:t});var eN=e=>{let{subjectRequest:t}=e,[i,s]=(0,h.useState)(!1),n=(0,g.Tg)([x.Sh.ATTACHMENT_READ]),a=(0,g.Tg)([x.Sh.ATTACHMENT_CREATE]),[l]=eR(),{data:c,isLoading:d,error:u}=(0,eo.PW)(),{data:m,isLoading:p}=eE({privacy_request_id:t.id}),{refetch:j}=eE({privacy_request_id:t.id}),v=(null==m?void 0:m.items.map(e=>({uid:e.id,name:e.file_name,status:"done",customData:{attachment_id:e.id,privacy_request_id:t.id,attachment_type:e.attachment_type}})))||[],y=(0,h.useCallback)(()=>(0,r.jsx)(o.PJP.PgN,{}),[]);if(!n)return null;let f=a&&(null==c?void 0:c.key),_=[".pdf",".doc",".docx",".xls",".xlsx",".txt",".csv",".jpg",".jpeg",".png",".zip"];return(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"mt-6",children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.lQT,{level:3,children:"Attachments"})}),d||p?(0,r.jsx)(eb.Z,{size:"md",alignment:"start"}):(0,r.jsx)(o.pMK,{name:"attachment_file",fileList:v,iconRender:y,showUploadList:{showRemoveIcon:!1,showDownloadIcon:!1},itemRender:eS,accept:_.join(","),customRequest:async e=>{let{file:i,onSuccess:n,onError:a}=e,r=i.name;try{s(!0),await l({privacy_request_id:t.id,attachment_file:i,attachment_type:ew.s.INTERNAL_USE_ONLY}).unwrap(),o.Pg3.success("".concat(r," file uploaded successfully")),j(),null==n||n(i)}catch(e){o.Pg3.error("".concat(r," file upload failed.")),null==a||a(e)}finally{s(!1)}},disabled:!f,children:a&&(0,r.jsx)(o.esZ,{title:u&&"Add attachment not available: ".concat((0,eT.e$)(u)),placement:"top",children:(0,r.jsxs)(o.jqI,{align:"center",gap:12,className:"mb-4",children:[(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.mm_,{}),iconPosition:"end",disabled:!f||i,loading:i,children:i?"Uploading":"Add"}),(0,r.jsx)(ea.b,{label:"Uploaded attachments are for internal use and won't be send as part of the request package.\n Accepted filetypes: ".concat(_.join(", ")),placement:"top"})]})})})]})})},eP=i(15709),eI=i.n(eP),eD=e=>{let{label:t,children:i}=e;return(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("div",{className:"shrink-0 grow-0 basis-1/2 pr-2 ".concat(eI().label),children:(0,r.jsxs)(o.AntTypography.Text,{children:[t,":"]})}),(0,r.jsx)("div",{className:"min-w-0 shrink grow ".concat(eI().value),"data-testid":"request-detail-value-".concat(t),children:i})]})},eO=e=>{let{subjectRequest:t}=e,{custom_privacy_request_fields:i}=t;return(0,r.jsx)("div",{className:"flex flex-col gap-2",children:i&&Object.keys(i).length>0&&Object.entries(i).filter(e=>{let[,t]=e;return t.value}).map(e=>{let[t,i]=e;return(0,r.jsx)(eD,{label:i.label,children:(0,r.jsx)(o.AntTypography.Text,{children:Array.isArray(i.value)?i.value.join(", "):i.value})},t)})})},eM=e=>{let{subjectRequest:t}=e,{plus:i}=(0,A.hz)(),{id:s,status:n,policy:a,identity:l,identity_verified_at:c}=t;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(o.AntTypography.Title,{level:2,children:"Request details"})}),(0,r.jsxs)(o.jqI,{vertical:!0,gap:12,className:"mb-6",children:[(0,r.jsx)(eD,{label:"Status",children:(0,r.jsx)(e_,{status:n})}),(0,r.jsx)(eD,{label:"Time remaining",children:(0,r.jsx)(ey.Z,{daysLeft:t.days_left,includeText:!0,status:t.status})}),(0,r.jsx)(eD,{label:"Request type",children:(0,r.jsx)(eu,{rules:a.rules})}),(0,r.jsx)(eD,{label:"Source",children:i&&(0,r.jsx)(o.AntTypography.Text,{children:t.source||"-"})}),Object.entries(l).filter(e=>{let[,{value:t}]=e;return null!==t}).map(e=>{let[t,{value:i="",label:s}]=e,n="".concat(i).concat(c?"":" (Unverified)");return(0,r.jsx)(eD,{label:"Subject ".concat(s.toLocaleLowerCase()),children:(0,r.jsx)(o.esZ,{title:n,trigger:"click",children:(0,r.jsx)(o.AntTypography.Text,{ellipsis:!0,children:n})})},t)}),(0,r.jsx)(eO,{subjectRequest:t})]}),(0,r.jsxs)(o.PPS,{layout:"vertical",children:[(0,r.jsx)(o.PPS.Item,{label:"Request ID:",className:"mb-4",children:(0,r.jsx)(o.jqI,{gap:1,children:(0,r.jsxs)(o.vyj.Compact,{style:{width:"100%"},children:[(0,r.jsx)(o.uFc,{readOnly:!0,value:s,"data-testid":"request-detail-value-id"}),(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(Z.Z,{copyText:s})})]})})}),(0,r.jsx)(o.PPS.Item,{label:"Policy key:",className:"mb-4",children:(0,r.jsx)(o.uFc,{readOnly:!0,value:t.policy.key,"data-testid":"request-detail-value-policy"})})]}),(0,r.jsx)(eN,{subjectRequest:t})]})};let eU=[x.q2.COMPLETE,x.q2.CANCELED,x.q2.DENIED,x.q2.ERROR];var ez=e=>{var t;let{data:i}=e,s=(0,h.useMemo)(()=>({id:i.id,verbose:!0}),[i.id]),{data:n}=(0,p.QA)(s,{pollingInterval:eU.includes(i.status)?0:2e3,skip:!i.id}),a=null!==(t=null==n?void 0:n.items[0])&&void 0!==t?t:i,l=a.status===x.q2.REQUIRES_INPUT,[c,d]=(0,h.useState)("activity"),u=(0,h.useMemo)(()=>[{key:"activity",label:"Activity",children:(0,r.jsx)(es,{subjectRequest:a})},{key:"manual-tasks",label:"Manual tasks",children:(0,r.jsx)(ev,{subjectRequest:a,onComplete:()=>d("activity")}),disabled:!l}],[l,a]);return(0,r.jsxs)("div",{className:"flex gap-8",children:[(0,r.jsx)("div",{className:"w-0 grow",children:(0,r.jsx)(o.A5g,{items:u,activeKey:c,onChange:d})}),(0,r.jsx)("div",{className:"w-1/3 2xl:w-[432px]","data-testid":"privacy-request-details",children:(0,r.jsx)(eM,{subjectRequest:a})})]})},eL=i(57526),eW=i(66548),eB=i(45489),eF=e=>{let{privacyRequest:t,action:i}=e,{handleApproveRequest:s,handleDenyRequest:n}=(0,eB.Z)({subjectRequest:t}),a=t.status===x.q2.PENDING,l=(0,o.qY0)(),r=async e=>{let{reason:t}=e,a=o.Pg3.loading({content:"approve"===i?"Approving request...":"Denying request..."});"deny"===i&&await n(t),"approve"===i&&await s(),a()};return{showAction:a,closeModal:l.onClose,performAction:r,openConfirmationModal:l.onOpen,isModalOpen:l.isOpen}},eZ=e=>{var t,i,s;let{privacyRequest:n}=e,a=null===(i=(0,A.hz)())||void 0===i?void 0:null===(t=i.flags)||void 0===t?void 0:t.downloadAccessRequestResults,l=n.status===x.q2.COMPLETE,r=ed(n.policy.rules).includes(x.Us.ACCESS),o=(0,g.Tg)([x.Sh.PRIVACY_REQUEST_ACCESS_RESULTS_READ]),{data:c,isLoading:d,isError:u,error:m}=(0,eo.br)({privacy_request_id:n.id}),p=null!==(s=null==c?void 0:c.access_result_urls[0])&&void 0!==s?s:"",h=!!p&&"your local fides_uploads folder"!==p,j=null;return u?j=(0,eT.e$)(m,"Unable to resolve download URL"):h||(j="Requests stored locally cannot be downloaded"),{showDownloadResults:a&&o&&r&&l,downloadResults:()=>{let e=document.createElement("a");e.href=p,e.target="_blank",e.rel="noopener noreferrer",e.click(),e.remove()},infoTooltip:j,isLoading:d,isDisabled:!h}},eJ=e=>{let{privacyRequest:t}=e,{errorAlert:i,successAlert:s}=(0,er.VY)(),n=t.status===x.q2.ERROR,[a]=(0,eo.Fq)();return{reprocessPrivacyRequest:async()=>{if(!t)return;let e=o.Pg3.loading("Reprocessing privacy request...",0),n=await a(t);"error"in n?i((0,eT.e$)(n.error),"DSR automation has failed for this privacy request due to the following:",{duration:null}):s("Privacy request is now being reprocessed."),e()},showReprocess:n}},eG=e=>{let{privacyRequest:t}=e,{showDownloadResults:i,downloadResults:s,infoTooltip:n,isDisabled:a}=eZ({privacyRequest:t}),{isModalOpen:l,closeModal:c,performAction:d,openConfirmationModal:u,showAction:m}=eF({privacyRequest:t,action:"approve"}),{isModalOpen:p,closeModal:g,performAction:j,openConfirmationModal:v,showAction:y}=eF({privacyRequest:t,action:"deny"}),{reprocessPrivacyRequest:f,showReprocess:_}=eJ({privacyRequest:t}),{handleFinalizeRequest:b,finalizeRequestResult:T}=(0,eB.Z)({subjectRequest:t}),w=(0,h.useMemo)(()=>{let e=[];return e.push({key:"approve",label:(0,r.jsx)("span",{"data-testid":"privacy-request-approve-btn",children:"Approve"}),onClick:u,disabled:!m}),e.push({key:"deny",label:(0,r.jsx)("span",{"data-testid":"privacy-request-deny-btn",children:"Deny"}),onClick:v,disabled:!y}),e.push({key:"reprocess",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-reprocess",children:"Reprocess"}),onClick:f,disabled:!_}),t.status===x.q2.REQUIRES_MANUAL_FINALIZATION&&e.push({key:"finalize",label:(0,r.jsx)("span",{"data-testid":"privacy-request-action-finalize",children:"Finalize"}),onClick:b,disabled:T.isLoading}),i&&e.push({key:"download",label:(0,r.jsx)(o.esZ,{title:a?n:null,placement:"bottom",children:(0,r.jsx)("span",{"data-testid":"download-results-btn",children:"Download request results"})}),onClick:s,disabled:a}),e},[i,s,n,a,m,y,u,v,_,f,t.status,b,T.isLoading]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.S0p,{menu:{items:w},trigger:["click"],overlayStyle:{minWidth:"160px"},children:(0,r.jsx)(o.wpx,{icon:(0,r.jsx)(o.PJP.pO,{}),"data-testid":"privacy-request-actions-dropdown-btn",iconPosition:"end",type:"primary",disabled:!w.length,size:"large",children:"Actions"})}),(0,r.jsx)(eL.Z,{isOpen:l,isLoading:!1,onClose:c,onApproveRequest:()=>d({reason:""}),subjectRequest:t}),(0,r.jsx)(eW.Z,{isOpen:p,onClose:g,onDenyRequest:e=>j({reason:e})})]})},eK=()=>{let e=(0,c.useRouter)().query.id,{data:t,isLoading:i}=(0,p.QA)({id:e,verbose:!0},{skip:!e}),s=(null==t?void 0:t.items[0])||null;return(0,r.jsxs)(d.Z,{title:"Privacy Request - ".concat(e),children:[(0,r.jsx)(m.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:u.Jw},{title:"Request details"}],rightContent:!!s&&(0,r.jsx)(eG,{privacyRequest:s})}),i&&(0,r.jsx)(o.M5Y,{children:(0,r.jsx)(o.$jN,{})}),!i&&!s&&(0,r.jsx)(o.xvT,{children:"404 no privacy request found"}),!i&&s&&(0,r.jsx)(ez,{data:s})]})}},15709:function(e){e.exports={value:"RequestDetailsRow_value__WMXn3",label:"RequestDetailsRow_label__dn3CQ"}},38450:function(e){e.exports={container:"ActivityTimelineEntry_container__tCva0","container--open":"ActivityTimelineEntry_container--open__1d9mA",itemButton:"ActivityTimelineEntry_itemButton__MlmWS","itemButton--error":"ActivityTimelineEntry_itemButton--error__UizD2","itemButton--comment":"ActivityTimelineEntry_itemButton--comment__g98SH","itemButton--awaiting-input":"ActivityTimelineEntry_itemButton--awaiting-input__6lB5t",header:"ActivityTimelineEntry_header__GYibj",title:"ActivityTimelineEntry_title__rm_g0","title--error":"ActivityTimelineEntry_title--error__fOi0s","title--awaiting-input":"ActivityTimelineEntry_title--awaiting-input__3sPAo",timestamp:"ActivityTimelineEntry_timestamp__uMEMT",viewLogs:"ActivityTimelineEntry_viewLogs___T4jN",logs:"ActivityTimelineEntry_logs__T7R0J","logs--open":"ActivityTimelineEntry_logs--open__o_9Io"}}},function(e){e.O(0,[431,4558,2888,9774,179],function(){return e(e.s=6554)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5979],{23663:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests/configure/storage",function(){return i(64665)}])},77213:function(e,t,i){"use strict";i.d(t,{Z:function(){return m}});var s=i(24246),n=i(96306),a=i(88038),r=i.n(a),l=i(86677);i(27378);var o=i(25980),d=i(90867),u=i(42478),c=i(77830),g=()=>{let e=(0,l.useRouter)();return(0,s.jsx)(n.xuv,{bg:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",p:5,mb:5,mt:5,children:(0,s.jsxs)(n.xuv,{children:[(0,s.jsxs)(n.Kqy,{direction:{base:"column",sm:"row"},justifyContent:"space-between",children:[(0,s.jsx)(n.xvT,{fontWeight:"semibold",children:"Configure your storage and messaging provider"}),(0,s.jsx)(n.wpx,{onClick:()=>{e.push(c.AD)},children:"Configure"})]}),(0,s.jsxs)(n.xvT,{children:["Before Fides can process your privacy requests we need two simple steps to configure your storage and email client."," "]})]})})},m=e=>{let{children:t,title:i,padded:a=!0,mainProps:c}=e,m=(0,o.hz)(),h=(0,l.useRouter)(),p="/privacy-requests"===h.pathname||"/datastore-connection"===h.pathname,v=!(m.flags.messagingConfiguration&&p),{data:f}=(0,u.JE)(void 0,{skip:v}),{data:x}=(0,d.PW)(void 0,{skip:v}),y=m.flags.messagingConfiguration&&(!f||!x)&&p;return(0,s.jsxs)(n.kCb,{"data-testid":i,direction:"column",h:"100vh",children:[(0,s.jsxs)(r(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",i]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsxs)(n.kCb,{as:"main",direction:"column",py:a?6:0,px:a?10:0,h:a?"calc(100% - 48px)":"full",flex:1,minWidth:0,overflow:"auto",...c,children:[y?(0,s.jsx)(g,{}):null,t]})]})}},58754:function(e,t,i){"use strict";var s=i(24246),n=i(96306),a=i(70788);t.Z=e=>{let{heading:t,breadcrumbItems:i,isSticky:r=!0,children:l,rightContent:o,style:d,...u}=e;return(0,s.jsxs)("div",{...u,style:r?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...d}:{paddingBottom:"24px",...d},children:[(0,s.jsxs)(n.jqI,{justify:"space-between",children:["string"==typeof t?(0,s.jsx)(n.lQT,{className:i||l?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,s.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!i&&(0,s.jsx)(a.m,{className:l?"pb-4":void 0,items:i,"data-testid":"page-breadcrumb"}),l]})}},97181:function(e,t,i){"use strict";i.d(t,{d:function(){return d}});var s=i(24246),n=i(96306),a=i(34090),r=i(27378),l=i(46238),o=i(40324);let d=e=>{let{name:t,label:i,labelProps:d,tooltip:u,isRequired:c,layout:g="inline",helperText:m,...h}=e,[p,v,{setValue:f}]=(0,a.U$)(t),x=!!(v.touched&&v.error),[y,j]=(0,r.useState)("");p.value||"tags"!==h.mode&&"multiple"!==h.mode||(p.value=[]),"tags"===h.mode&&"string"==typeof p.value&&(p.value=[p.value]);let _="tags"===h.mode?(e,t)=>e?e.value!==y||p.value.includes(y)?h.optionRender?h.optionRender(e,t):e.label:'Create "'.concat(y,'"'):void 0:h.optionRender||void 0,b=e=>{j(e),h.onSearch&&h.onSearch(e)},C=(e,t)=>{f(e),h.onChange&&h.onChange(e,t)};return"inline"===g?(0,s.jsx)(n.NIc,{isInvalid:x,isRequired:c,children:(0,s.jsxs)(n.rjZ,{templateColumns:i?"1fr 3fr":"1fr",children:[i?(0,s.jsx)(o.__,{htmlFor:h.id||t,...d,children:i}):null,(0,s.jsxs)(n.jqI,{align:"center",children:[(0,s.jsxs)(n.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,s.jsx)(n.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:x?"error":void 0}),m&&(0,s.jsx)(n.Q6r,{children:m}),(0,s.jsx)(o.Bc,{isInvalid:x,message:v.error,fieldName:p.name})]}),(0,s.jsx)(l.b,{label:u,className:x?"mt-2 self-start":void 0})]})]})}):(0,s.jsx)(n.NIc,{isInvalid:x,isRequired:c,children:(0,s.jsxs)(n.gCW,{alignItems:"start",children:[(0,s.jsxs)(n.jqI,{align:"center",children:[i?(0,s.jsx)(o.__,{htmlFor:h.id||t,fontSize:"xs",my:0,mr:1,...d,children:i}):null,(0,s.jsx)(l.b,{label:u})]}),(0,s.jsx)(n.WPr,{...p,id:h.id||t,"data-testid":"controlled-select-".concat(p.name),...h,optionRender:_,onSearch:"tags"===h.mode?b:void 0,onChange:C,value:p.value||void 0,status:x?"error":void 0}),m&&(0,s.jsx)(n.Q6r,{style:{marginTop:0},children:m}),(0,s.jsx)(o.Bc,{isInvalid:x,message:v.error,fieldName:p.name})]})})}},17245:function(e,t,i){"use strict";i.d(t,{HK:function(){return r},VY:function(){return n.V},pI:function(){return u},h0:function(){return s.h},Rx:function(){return m},rK:function(){return p}});var s=i(36866),n=i(84306),a=i(812);let r=()=>{let{errorAlert:e}=(0,n.V)();return{handleError:t=>{let i="An unexpected error occurred. Please try again.";(0,a.Ot)(t)?i=t.data.detail:(0,a.tB)(t)&&(i=t.data.detail[0].msg),e(i)}}};var l=i(27378),o=i(20682),d=i(21910);let u=e=>{let{data:t}=(0,o.$I)({}),i=(0,l.useMemo)(()=>(null==t?void 0:t.items)||[],[t]);return(0,l.useMemo)(()=>{var t;if(!e)return"";if(e.connection_type===d.Rj.SAAS&&(null===(t=e.saas_config)||void 0===t?void 0:t.type)){let t=i.find(t=>{var i;return t.identifier===(null===(i=e.saas_config)||void 0===i?void 0:i.type)});if(t)return t}return e},[e,i])};var c=i(40431);let g=()=>({search:c.Oi.withDefault("")}),m=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSearchQuery:t,onSearchChange:i}=e,s=(0,l.useMemo)(()=>g(),[]),[n,a]=(0,c.XI)(s,{history:"push"}),r=(0,l.useMemo)(()=>({searchQuery:n.search||t||void 0}),[n,t]),o=(0,l.useCallback)(e=>{a({search:e||null})},[a]),d=(0,l.useCallback)(()=>{a({search:null})},[a]);return(0,l.useEffect)(()=>{i&&i(r)},[r,i]),{...r,updateSearch:o,resetSearch:d,searchProps:{value:r.searchQuery||"",onChange:o,onClear:()=>o("")}}},h=e=>({sortKey:e?(0,c.jx)([...e]):c.Oi.withDefault(""),sortOrder:(0,c.km)(["ascend","descend"])}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultSortKey:t,defaultSortOrder:i,onSortingChange:s,validColumns:n}=e,a=(0,l.useMemo)(()=>h(n),[n]),[r,o]=(0,c.XI)(a,{history:"push"}),d=(0,l.useMemo)(()=>{var e;return{sortKey:r.sortKey||t,sortOrder:null!==(e=r.sortOrder)&&void 0!==e?e:i}},[r,t,i]),u=(0,l.useCallback)((e,t)=>{o({sortKey:e?String(e):null,sortOrder:null!=t?t:null})},[o]),g=(0,l.useCallback)(()=>{o({sortKey:null,sortOrder:null})},[o]);return(0,l.useEffect)(()=>{s&&s(d)},[d,s]),{...d,updateSorting:u,resetSorting:g,sortingProps:{sortDirections:["ascend","descend"],defaultSortOrder:d.sortOrder,sortedInfo:d.sortKey?{field:d.sortKey,order:d.sortOrder}:void 0}}}},84306:function(e,t,i){"use strict";i.d(t,{V:function(){return a}});var s=i(24246),n=i(96306);let a=()=>{let e=(0,n.pmc)();return{errorAlert:(t,i,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"error","data-testid":"error-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[i&&(0,s.jsx)(n.CdC,{children:i}),(0,s.jsx)(n.XaZ,{children:t})]}),(0,s.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,r):e(r)},successAlert:(t,i,a)=>{let r={...a,position:(null==a?void 0:a.position)||"top",render:e=>{let{onClose:a}=e;return(0,s.jsxs)(n.bZj,{alignItems:"normal",status:"success",variant:"subtle","data-testid":"success-alert",children:[(0,s.jsx)(n.zMQ,{}),(0,s.jsxs)(n.xuv,{children:[i&&(0,s.jsx)(n.CdC,{children:i}),(0,s.jsx)(n.XaZ,{children:t})]}),(0,s.jsx)(n.PZ7,{onClick:a,position:"relative",right:0,size:"sm",top:-1})]})}};(null==a?void 0:a.id)&&e.isActive(a.id)?e.update(a.id,r):e(r)}}}},70788:function(e,t,i){"use strict";i.d(t,{m:function(){return d}});var s=i(24246),n=i(96306),a=i(79894),r=i.n(a),l=i(27378);let{Text:o}=n.AntTypography,d=e=>{let{items:t,...i}=e,a=(0,l.useMemo)(()=>null==t?void 0:t.map((e,i)=>{let a=i===t.length-1,l={...e},d=l.onClick&&!l.href;return("string"==typeof l.title&&(l.title=(0,s.jsx)(o,{style:{color:"inherit",maxWidth:a?void 0:400},ellipsis:!a,id:a?"breadcrumb-current-page":void 0,children:l.title})),d)?l.title=(0,s.jsx)(n.wpx,{type:"text",size:"small",icon:l.icon,onClick:l.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:l.title}):(l.icon&&(l.title=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"anticon align-text-bottom",children:l.icon}),l.title]})),l.href&&l.title&&(l.title=(0,s.jsx)(r(),{href:l.href,className:"ant-breadcrumb-link",children:l.title}),delete l.href)),l}),[t]);return(0,s.jsx)(n.zrq,{items:a,...i})}},36866:function(e,t,i){"use strict";i.d(t,{h:function(){return d}});var s=i(40431),n=i(27378),a=i(55484);let r=(0,s.jo)({parse(e){let t=parseInt(e,10);try{return a.Rx().integer().positive().validateSync(t),t}catch(e){return null}},serialize:e=>e.toString()});var l=i(32735);let o=function(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{page:r.withDefault(l.Ej),size:i.pageSizeOptions?(0,s.bJ)(i.pageSizeOptions).withDefault(null!==(e=i.pageSize)&&void 0!==e?e:l.L8):r.withDefault(null!==(t=i.pageSize)&&void 0!==t?t:l.L8)}},d=function(){var e,t;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{defaultPageSize:a=l.L8,pageSizeOptions:r,showSizeChanger:d=!0}=i,u=null!=r?r:l.VZ,c=(0,n.useMemo)(()=>o({pageSize:a,pageSizeOptions:r}),[a,r]),[g,m]=(0,s.XI)(c,{history:"push"}),h={pageIndex:null!==(e=g.page)&&void 0!==e?e:l.Ej,pageSize:null!==(t=g.size)&&void 0!==t?t:a};return{...h,updatePageIndex:e=>{m({page:e})},updatePageSize:e=>{m({page:e!==h.pageSize?l.Ej:h.pageIndex,size:e})},resetPagination:()=>{m({page:l.Ej,size:a})},nextPage:()=>{m(e=>{let{page:t,size:i}=e;return{page:t+1,size:i}})},previousPage:()=>{m(e=>{let{page:t,size:i}=e;return{page:t-1,size:i}})},pageSizeOptions:u,showSizeChanger:d}}},42478:function(e,t,i){"use strict";i.d(t,{FU:function(){return d},JE:function(){return n},Ki:function(){return c},SU:function(){return g},W:function(){return m},h9:function(){return a},jc:function(){return s},qt:function(){return o},sn:function(){return u}});let{useGetEmailInviteStatusQuery:s,useGetActiveMessagingProviderQuery:n,useCreateMessagingConfigurationMutation:a,useCreateMessagingConfigurationSecretsMutation:r,useGetMessagingConfigurationDetailsQuery:l,useGetMessagingConfigurationsQuery:o,useGetMessagingConfigurationByKeyQuery:d,useUpdateMessagingConfigurationByKeyMutation:u,useUpdateMessagingConfigurationSecretsByKeyMutation:c,useCreateTestConnectionMessageMutation:g,useDeleteMessagingConfigurationByKeyMutation:m}=i(78780).u.injectEndpoints({endpoints:e=>({getEmailInviteStatus:e.query({query:()=>({url:"/messaging/email-invite/status"}),providesTags:()=>["Email Invite Status"]}),createMessagingConfiguration:e.mutation({query:e=>({url:"messaging/config",method:"POST",body:e}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getActiveMessagingProvider:e.query({queryFn:async(e,t,i,s)=>{let n=await s({url:"messaging/default/active"});return n.error&&404===n.error.status?{data:null}:n},providesTags:["Messaging Config"]}),createMessagingConfigurationSecrets:e.mutation({query:e=>({url:"messaging/default/".concat(e.service_type,"/secret"),method:"PUT",body:e.details}),invalidatesTags:["Messaging Config","Configuration Settings"]}),getMessagingConfigurationDetails:e.query({query:e=>({url:"messaging/default/".concat(e.type)}),providesTags:["Messaging Config"]}),getMessagingConfigurations:e.query({query:()=>({url:"messaging/config"}),providesTags:["Messaging Config"]}),getMessagingConfigurationByKey:e.query({query:e=>({url:"messaging/config/".concat(e.key)}),providesTags:["Messaging Config"]}),createTestConnectionMessage:e.mutation({query:e=>({url:"messaging/test/".concat(e.service_type),method:"POST",body:e.details}),invalidatesTags:["Messaging Config"]}),updateMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"PATCH",body:e.config}),invalidatesTags:["Messaging Config","Configuration Settings"]}),updateMessagingConfigurationSecretsByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key,"/secret"),method:"PUT",body:e.secrets}),invalidatesTags:["Messaging Config","Configuration Settings"]}),deleteMessagingConfigurationByKey:e.mutation({query:e=>({url:"messaging/config/".concat(e.key),method:"DELETE"}),invalidatesTags:["Messaging Config","Configuration Settings"]})})})},71784:function(e,t,i){"use strict";i.d(t,{DE:function(){return l},I3:function(){return n},kN:function(){return r},rE:function(){return a}});var s=i(21910);let n=[...new Map([[s.q2.APPROVED,"Approved"],[s.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[s.q2.CANCELED,"Canceled"],[s.q2.COMPLETE,"Completed"],[s.q2.DENIED,"Denied"],[s.q2.ERROR,"Error"],[s.q2.IN_PROCESSING,"In progress"],[s.q2.PENDING,"New"],[s.q2.PAUSED,"Paused"],[s.q2.IDENTITY_UNVERIFIED,"Unverified"],[s.q2.REQUIRES_INPUT,"Requires input"],[s.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,i]=e;return{label:i,value:t}}),a=new Map([[s.Us.ACCESS,"Access"],[s.Us.ERASURE,"Erasure"],[s.Us.CONSENT,"Consent"],[s.Us.UPDATE,"Update"]]),r=[...a].map(e=>{let[t,i]=e;return{label:i,value:t}}),l={local:"local",s3:"s3",gcs:"gcs"}},64665:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return j}});var s=i(24246),n=i(96306),a=i(27378),r=i(812),l=i(17245),o=i(77213),d=i(77830),u=i(58754),c=i(7426),g=i(71784),m=i(90867),h=i(34090),p=i(97181),v=i(40324),f=e=>{var t,i,o,d,u;let{storageDetails:c}=e,[f,x]=(0,a.useState)(""),[y]=(0,m.gC)(),[j]=(0,m.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:g.DE.gcs,auth_method:null!==(o=null==c?void 0:null===(t=c.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==c?void 0:null===(i=c.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(u=null==c?void 0:c.format)&&void 0!==u?u:""},S=async e=>{let t=await y({type:g.DE.gcs,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(x(e.auth_method),b("Google Cloud Storage credentials successfully updated."))},k=async e=>{let t=e.private_key.trim();t.includes("\\n")&&(t=t.replace(/\\n/g,"\n"));let i=await j({details:{type:e.type,project_id:e.project_id,private_key_id:e.private_key_id,private_key:t,client_email:e.client_email,client_id:e.client_id,auth_uri:e.auth_uri,token_uri:e.token_uri,auth_provider_x509_cert_url:e.auth_provider_x509_cert_url,client_x509_cert_url:e.client_x509_cert_url,universe_domain:e.universe_domain},type:g.DE.gcs});(0,r.D4)(i)?_(i.error):b("Google Cloud Storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Google Cloud Storage configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.d,{name:"auth_method",label:"Auth method",options:[{label:"Service Account Keys",value:"service_account_keys"},{label:"Application Default Credentials",value:"adc"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(n.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(n.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"service_account_keys"===f&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:5}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:{type:"",project_id:"",private_key_id:"",private_key:"",client_email:"",client_id:"",auth_uri:"",token_uri:"",auth_provider_x509_cert_url:"",client_x509_cert_url:"",universe_domain:""},onSubmit:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(v.j0,{name:"type",label:"Type"}),(0,s.jsx)(v.j0,{name:"project_id",label:"Project ID"}),(0,s.jsx)(v.j0,{name:"private_key_id",label:"Private key ID",type:"password"}),(0,s.jsx)(v.j0,{name:"private_key",label:"Private key",type:"password"}),(0,s.jsx)(v.j0,{name:"client_email",label:"Client email"}),(0,s.jsx)(v.j0,{name:"client_id",label:"Client ID"}),(0,s.jsx)(v.j0,{name:"auth_uri",label:"Auth URI"}),(0,s.jsx)(v.j0,{name:"token_uri",label:"Token URI"}),(0,s.jsx)(v.j0,{name:"auth_provider_x509_cert_url",label:"Auth provider x509 cert URL"}),(0,s.jsx)(v.j0,{name:"client_x509_cert_url",label:"Client x509 cert URL"}),(0,s.jsx)(v.j0,{name:"universe_domain",label:"Universe domain"})]}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]})]})},x=e=>{var t,i,o,d,u;let{storageDetails:c}=e,[f,x]=(0,a.useState)(""),[y]=(0,m.gC)(),[j]=(0,m.cf)(),{handleError:_}=(0,l.HK)(),{successAlert:b}=(0,l.VY)(),C={type:g.DE.s3,auth_method:null!==(o=null==c?void 0:null===(t=c.details)||void 0===t?void 0:t.auth_method)&&void 0!==o?o:"",bucket:null!==(d=null==c?void 0:null===(i=c.details)||void 0===i?void 0:i.bucket)&&void 0!==d?d:"",format:null!==(u=null==c?void 0:c.format)&&void 0!==u?u:""},S=async e=>{let t=await y({type:g.DE.s3,details:{auth_method:e.auth_method,bucket:e.bucket},format:e.format});(0,r.D4)(t)?_(t.error):(x(e.auth_method),b("S3 storage credentials successfully updated."))},k=async e=>{let t=await j({details:{aws_access_key_id:e.aws_access_key_id,aws_secret_access_key:e.aws_secret_access_key},type:g.DE.s3});(0,r.D4)(t)?_(t.error):b("S3 storage secrets successfully updated.")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"S3 storage configuration"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:C,onSubmit:S,enableReinitialize:!0,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(p.d,{name:"format",label:"Format",options:[{label:"json",value:"json"},{label:"csv",value:"csv"}],"data-testid":"format",isRequired:!0}),(0,s.jsx)(p.d,{name:"auth_method",label:"Auth method",options:[{label:"secret_keys",value:"secret_keys"},{label:"automatic",value:"automatic"}],"data-testid":"auth_method",isRequired:!0}),(0,s.jsx)(v.j0,{"data-testid":"bucket",name:"bucket",label:"Bucket",isRequired:!0})]}),(0,s.jsx)(n.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(n.wpx,{htmlType:"submit",className:"mt-5",disabled:t,type:"primary","data-testid":"save-btn",children:"Save"})]})}})}),"secret_keys"===f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.izJ,{mt:5}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:5,children:"Storage destination"}),(0,s.jsx)(n.Kqy,{children:(0,s.jsx)(h.J9,{initialValues:{aws_access_key_id:"",aws_secret_access_key:""},onSubmit:k,children:e=>{let{isSubmitting:t,handleReset:i}=e;return(0,s.jsxs)(h.l0,{children:[(0,s.jsxs)(n.Kqy,{mt:5,spacing:5,children:[(0,s.jsx)(v.j0,{name:"aws_access_key_id",label:"AWS access key ID"}),(0,s.jsx)(v.j0,{name:"aws_secret_access_key",label:"AWS secret access key",type:"password"})]}),(0,s.jsxs)(n.xuv,{mt:10,children:[(0,s.jsx)(n.wpx,{onClick:()=>i(),className:"mr-2 mt-5",children:"Cancel"}),(0,s.jsx)(n.wpx,{disabled:t,htmlType:"submit",type:"primary",className:"mt-5","data-testid":"save-btn",children:"Save"})]})]})}})})]}):null]})},y=()=>{let{successAlert:e}=(0,l.VY)(),{handleError:t}=(0,l.HK)(),[i,h]=(0,a.useState)(""),{data:p}=(0,m.PW)(),{data:v}=(0,m.Au)({type:i}),[y,{isLoading:j}]=(0,m.gC)(),[_]=(0,c.L)();(0,a.useEffect)(()=>{p&&h(p.type)},[p]);let b=async i=>{if(i===g.DE.local){let s=await y({type:i,details:{},format:"json"});(0,r.D4)(s)?t(s.error):e("Configured storage details successfully.")}let s=await _({storage:{active_default_storage_type:i}});(0,r.D4)(s)?t(s.error):h(i)},C={s3:x,gcs:f}[i];return(0,s.jsxs)(o.Z,{title:"Configure Privacy Requests - Storage",children:[(0,s.jsx)(u.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests",href:d.Jw},{title:"Configure requests",href:d.fz},{title:"Storage"}]}),(0,s.jsx)(n.X6q,{mb:5,fontSize:"md",fontWeight:"semibold",children:"Configure storage"}),(0,s.jsxs)(n.xuv,{display:"flex",flexDirection:"column",width:"50%",children:[(0,s.jsx)(n.xuv,{mb:5,children:"Fides requires a storage destination to store and share the results of privacy requests. For a production setup, it is highly recommended to have S3 as a storage destination. Ensure you have completed the setup for the storage destination and have the details handy prior to the following steps."}),(0,s.jsxs)(n.xuv,{children:["To configure a Storage destination, first choose a method to store your results. Fides currently supports"," ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"Local"}),", ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"S3"})," ","and"," ",(0,s.jsx)(n.xvT,{as:"span",color:"complimentary.500",children:"GCS"})," ","storage methods."]}),(0,s.jsx)(n.X6q,{fontSize:"md",fontWeight:"semibold",mt:10,children:"Choose storage type to configure"}),(0,s.jsx)(n.y02.Group,{disabled:j,onChange:e=>b(e.target.value),value:i,"data-testid":"privacy-requests-storage-selection",className:"p-3",children:(0,s.jsxs)(n.jqI,{children:[(0,s.jsx)(n.y02,{value:"local","data-testid":"option-local",children:"Local"},"local"),(0,s.jsx)(n.y02,{value:"s3","data-testid":"option-s3",children:"S3"},"s3"),(0,s.jsx)(n.y02,{value:"gcs","data-testid":"option-gcs",children:"GCS"},"gcs")]})}),C&&v&&(0,s.jsx)(C,{storageDetails:v})]})]})},j=()=>(0,s.jsx)(y,{})}},function(e){e.O(0,[431,2888,9774,179],function(){return e(e.s=23663)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2369],{1565:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/privacy-requests",function(){return s(19509)}])},35287:function(e,t,s){"use strict";var i=s(24246),l=s(96306),a=s(88038),r=s.n(a);s(27378),t.Z=e=>{let{children:t,title:s,mainProps:a}=e;return(0,i.jsxs)(l.kCb,{"data-testid":s,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,i.jsxs)(r(),{children:[(0,i.jsxs)("title",{children:["Fides Admin UI - ",s]}),(0,i.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,i.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,i.jsx)(l.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...a,children:t})]})}},87361:function(e,t,s){"use strict";var i=s(24246),l=s(96306);t.Z=e=>{let{title:t,text:s,onClose:a}=e;return(0,i.jsxs)(l.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderRadius:"md",justifyContent:"space-between",py:4,pr:6,pl:3,"data-testid":"empty-state",gap:2,position:"relative",children:[a&&(0,i.jsx)(l.Two,{boxSize:5,position:"absolute",right:3,top:3,zIndex:1,cursor:"pointer",p:1,onClick:a}),(0,i.jsx)(l.iid,{alignSelf:"start",color:"minos",mt:.5,flexGrow:0}),(0,i.jsxs)(l.kCb,{direction:"column",gap:2,flexGrow:1,children:[(0,i.jsx)(l.X6q,{fontSize:"md",children:t}),(0,i.jsx)(l.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:s})]})]})}},96718:function(e,t,s){"use strict";s.d(t,{z:function(){return a}});var i=s(24246),l=s(96306);let a=e=>{let{...t}=e;return(0,i.jsx)(l.WPr,{defaultActiveFirstOption:!1,maxTagCount:"responsive",allowClear:!0,styles:t.mode?void 0:{popup:{root:{width:"auto",minWidth:"200px"}}},className:"w-auto","data-testid":"filter-select",...t})}},97181:function(e,t,s){"use strict";s.d(t,{d:function(){return o}});var i=s(24246),l=s(96306),a=s(34090),r=s(27378),n=s(46238),d=s(40324);let o=e=>{let{name:t,label:s,labelProps:o,tooltip:c,isRequired:u,layout:p="inline",helperText:m,...x}=e,[h,y,{setValue:v}]=(0,a.U$)(t),j=!!(y.touched&&y.error),[g,_]=(0,r.useState)("");h.value||"tags"!==x.mode&&"multiple"!==x.mode||(h.value=[]),"tags"===x.mode&&"string"==typeof h.value&&(h.value=[h.value]);let f="tags"===x.mode?(e,t)=>e?e.value!==g||h.value.includes(g)?x.optionRender?x.optionRender(e,t):e.label:'Create "'.concat(g,'"'):void 0:x.optionRender||void 0,b=e=>{_(e),x.onSearch&&x.onSearch(e)},q=(e,t)=>{v(e),x.onChange&&x.onChange(e,t)};return"inline"===p?(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.rjZ,{templateColumns:s?"1fr 3fr":"1fr",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,...o,children:s}):null,(0,i.jsxs)(l.jqI,{align:"center",children:[(0,i.jsxs)(l.jqI,{vertical:!0,flex:1,className:"mr-2",children:[(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]}),(0,i.jsx)(n.b,{label:c,className:j?"mt-2 self-start":void 0})]})]})}):(0,i.jsx)(l.NIc,{isInvalid:j,isRequired:u,children:(0,i.jsxs)(l.gCW,{alignItems:"start",children:[(0,i.jsxs)(l.jqI,{align:"center",children:[s?(0,i.jsx)(d.__,{htmlFor:x.id||t,fontSize:"xs",my:0,mr:1,...o,children:s}):null,(0,i.jsx)(n.b,{label:c})]}),(0,i.jsx)(l.WPr,{...h,id:x.id||t,"data-testid":"controlled-select-".concat(h.name),...x,optionRender:f,onSearch:"tags"===x.mode?b:void 0,onChange:q,value:h.value||void 0,status:j?"error":void 0}),m&&(0,i.jsx)(l.Q6r,{style:{marginTop:0},children:m}),(0,i.jsx)(d.Bc,{isInvalid:j,message:y.error,fieldName:h.name})]})})}},71784:function(e,t,s){"use strict";s.d(t,{DE:function(){return n},I3:function(){return l},kN:function(){return r},rE:function(){return a}});var i=s(21910);let l=[...new Map([[i.q2.APPROVED,"Approved"],[i.q2.AWAITING_EMAIL_SEND,"Awaiting email send"],[i.q2.CANCELED,"Canceled"],[i.q2.COMPLETE,"Completed"],[i.q2.DENIED,"Denied"],[i.q2.ERROR,"Error"],[i.q2.IN_PROCESSING,"In progress"],[i.q2.PENDING,"New"],[i.q2.PAUSED,"Paused"],[i.q2.IDENTITY_UNVERIFIED,"Unverified"],[i.q2.REQUIRES_INPUT,"Requires input"],[i.q2.REQUIRES_MANUAL_FINALIZATION,"Requires finalization"]])].map(e=>{let[t,s]=e;return{label:s,value:t}}),a=new Map([[i.Us.ACCESS,"Access"],[i.Us.ERASURE,"Erasure"],[i.Us.CONSENT,"Consent"],[i.Us.UPDATE,"Update"]]),r=[...a].map(e=>{let[t,s]=e;return{label:s,value:t}}),n={local:"local",s3:"s3",gcs:"gcs"}},19509:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return eU}});var i,l,a=s(24246),r=s(35287),n=s(96306),d=s(65218),o=s.n(d),c=s(27378),u=s(25980),p=s(19904),m=s(56141),x=s.n(m),h=s(86677),y=s(16134),v=s(91317),j=s(18225),g=s(77830),_=s(28407),f=s(16394),b=s(21910),q=s(32735),C=s(59969),S=s(71784),k=s(45116);let E=e=>{let{label:t,children:s}=e;return(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("div",{className:"shrink-0 grow-0 basis-1/3 pr-2",children:(0,a.jsxs)(n.AntTypography.Text,{className:"text-gray-700",children:[t,":"]})}),(0,a.jsx)("div",{className:"min-w-0 shrink grow text-gray-600",children:s})]})},R=e=>{let{task:t}=e,s=t.request_type===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,i=S.rE.get(s)||t.request_type;return(0,a.jsxs)("div",{className:"flex flex-col space-y-3","data-testid":"task-details-container",children:[(0,a.jsx)(E,{label:"Name",children:(0,a.jsx)(n.AntTypography.Text,{children:t.name})}),(0,a.jsx)(E,{label:"Description",children:(0,a.jsx)(n.AntTypography.Text,{children:t.description||"-"})}),(0,a.jsx)(E,{label:"Request Type",children:(0,a.jsx)(n.AntTypography.Text,{children:i})}),(0,a.jsx)(E,{label:"Assigned To",children:t.assigned_users&&t.assigned_users.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1","data-testid":"assigned-users-tags",children:t.assigned_users.map(e=>(0,a.jsx)(n.j8w,{"data-testid":"assigned-user-tag-".concat(e.id),children:"".concat(e.first_name||""," ").concat(e.last_name||"").trim()||e.email_address||"Unknown User"},e.id))}):(0,a.jsx)(n.AntTypography.Text,{children:"No one assigned"})}),t.privacy_request.subject_identities&&Object.keys(t.privacy_request.subject_identities).length>0?(0,a.jsx)(E,{label:"Subject identities",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.subject_identities).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null,t.privacy_request.custom_fields&&Object.keys(t.privacy_request.custom_fields).length>0?(0,a.jsx)(E,{label:"Custom fields",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:Object.entries(t.privacy_request.custom_fields).filter(e=>{let[,t]=e;return t}).map(e=>{let[t,s]=e;return(0,a.jsxs)(n.j8w,{children:[t,": ",String(s)]},t)})})}):null]})},w=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.HP)(),[d,o]=(0,c.useState)(""),[u,p]=(0,c.useState)(!1),[m,x]=(0,c.useState)(""),[h,y]=(0,c.useState)([]),v=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,field_value:i.input_type===b.PF.TEXT?d:i.input_type===b.PF.CHECKBOX?u.toString():void 0,comment_text:m||void 0,attachments:h.length>0?h.map(e=>e.originFileObj).filter(Boolean):void 0}).unwrap(),o(""),p(!1),x(""),y([]),s()}catch(e){n.Pg3.error("Failed to complete task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"complete-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Complete Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-4",children:[(()=>{switch(i.input_type){case b.PF.TEXT:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Subject data"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Enter your response...",rows:4,"data-testid":"complete-modal-text-input"})]});case b.PF.CHECKBOX:return(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)(n.E_O,{checked:u,onChange:e=>p(e.target.checked),"data-testid":"complete-modal-checkbox",children:"The task has been completed"})});default:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Upload Files"}),(0,a.jsx)("div",{children:(0,a.jsx)(n.pMK,{fileList:h,onChange:e=>{let{fileList:t}=e;return y(t)},beforeUpload:()=>!1,"data-testid":"complete-modal-file-upload",multiple:!0,children:(0,a.jsx)(n.wpx,{"data-testid":"complete-modal-upload-button",children:"Click to Upload"})})})]})}})(),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Internal comment"}),(0,a.jsx)(n.uFc.TextArea,{value:m,onChange:e=>x(e.target.value),placeholder:"Add any additional comments...",rows:3,"data-testid":"complete-modal-comment-input"})]})]})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),p(!1),x(""),y([]),s()},disabled:r,"data-testid":"complete-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:v,loading:r,disabled:!(()=>{switch(i.input_type){case b.PF.TEXT:return d.trim().length>0;case b.PF.CHECKBOX:return u;default:return h.length>0}})(),"data-testid":"complete-modal-save-button",children:"Save"})]})})]})]})},T=e=>{let{isOpen:t,onClose:s,task:i}=e,[l,{isLoading:r}]=(0,k.DA)(),[d,o]=(0,c.useState)(""),u=async()=>{try{await l({privacy_request_id:i.privacy_request.id,manual_field_id:i.manual_field_id,skip_reason:d}).unwrap(),o(""),s()}catch(e){n.Pg3.error("Failed to skip task. Please try again.")}};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"700px",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{maxWidth:"700px","data-testid":"skip-task-modal",children:[(0,a.jsx)(n.xBx,{children:(0,a.jsx)(n.AntTypography.Title,{level:4,children:"Skip Task"})}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)("div",{className:"flex flex-col space-y-6",children:[(0,a.jsx)("div",{children:(0,a.jsx)(R,{task:i})}),(0,a.jsx)(n.htM,{}),(0,a.jsx)("div",{children:(0,a.jsx)("div",{className:"flex flex-col space-y-4",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-700",children:"Reason for skipping (Required)"}),(0,a.jsx)(n.uFc.TextArea,{value:d,onChange:e=>o(e.target.value),placeholder:"Please provide a reason for skipping this task...",rows:4,"data-testid":"skip-modal-comment-input"})]})})})]})}),(0,a.jsx)(n.mzw,{children:(0,a.jsxs)(n.vyj,{children:[(0,a.jsx)(n.wpx,{onClick:()=>{o(""),s()},disabled:r,"data-testid":"skip-modal-cancel-button",children:"Cancel"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:u,loading:r,disabled:!d.trim(),danger:!0,"data-testid":"skip-modal-skip-button",children:"Skip Task"})]})})]})]})},I=e=>{let{task:t}=e,s=(0,h.useRouter)(),{isOpen:i,onOpen:l,onClose:r}=(0,n.qY0)(),{isOpen:d,onOpen:o,onClose:c}=(0,n.qY0)(),u=(0,p.Tg)([b.Sh.PRIVACY_REQUEST_READ]);if(t.status!==b.OS.NEW)return null;let m=[{key:"skip",label:"Skip task",onClick:o}];return u&&m.push({key:"go-to-request",label:"Go to request",onClick:()=>{s.push({pathname:g.ld,query:{id:t.privacy_request.id}})}}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.vyj,{size:"small",children:[(0,a.jsx)(n.wpx,{type:"default",onClick:l,size:"small",children:"Complete"}),(0,a.jsx)(n.S0p,{menu:{items:m},trigger:["click"],placement:"bottomRight",overlayStyle:{minWidth:120},children:(0,a.jsx)(n.wpx,{size:"small",icon:(0,a.jsx)(n.PJP.r43,{}),"aria-label":"More actions"})})]}),(0,a.jsx)(w,{isOpen:i,onClose:r,task:t}),(0,a.jsx)(T,{isOpen:d,onClose:c,task:t})]})},A={[b.OS.NEW]:{color:"info",label:"New"},[b.OS.COMPLETED]:{color:"success",label:"Completed"},[b.OS.SKIPPED]:{color:"marble",label:"Skipped"}},N=[{text:"New",value:b.OS.NEW},{text:"Completed",value:b.OS.COMPLETED},{text:"Skipped",value:b.OS.SKIPPED}],P=[{text:"Access",value:b.k6.ACCESS},{text:"Erasure",value:b.k6.ERASURE}],O=e=>{let{systemFilters:t,userFilters:s,onUserClick:i,currentFilters:l,hasAccessToAllTasks:r}=e,d=[{title:"Task name",dataIndex:"name",key:"name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e})},{title:"Status",dataIndex:"status",key:"status",width:110,render:e=>(0,a.jsx)(n.j8w,{color:A[e].color,"data-testid":"manual-task-status-tag",children:A[e].label}),filters:N,filterMultiple:!1},{title:"System",dataIndex:["system","name"],key:"system_name",minWidth:100,render:e=>(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:e},children:e}),filters:t,filterMultiple:!1},{title:"Type",dataIndex:"request_type",key:"request_type",width:80,render:e=>{let t=e===b.k6.ACCESS?b.Us.ACCESS:b.Us.ERASURE,s=S.rE.get(t)||e;return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:s},children:s})},filters:P,filterMultiple:!1},{title:"Assigned to",dataIndex:"assigned_users",key:"assigned_users",minWidth:100,render:e=>{if(!e||0===e.length)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.map(e=>({label:(0,f.gJ)(e),value:e.id})),s=e.map(e=>e.id);return(0,a.jsx)(n.d3V,{value:s,options:t,readonly:!0,onTagClick:e=>i(String(e))})},filters:s,filterMultiple:!1,defaultFilteredValue:l.assignedUsers?[l.assignedUsers]:void 0},{title:"Days left",dataIndex:["privacy_request","days_left"],key:"days_left",width:90,render:e=>(0,a.jsx)(C.Z,{daysLeft:e||0,includeText:!1,status:b.q2.PENDING})},{title:"Subject identity",dataIndex:["privacy_request","subject_identities"],key:"subject_identities",minWidth:120,render:e=>{if(!e)return(0,a.jsx)(n.AntTypography.Text,{children:"-"});let t=e.email||e.phone_number||"";return(0,a.jsx)(n.AntTypography.Text,{ellipsis:{tooltip:t},children:t})}},{title:"Actions",key:"actions",width:145,render:(e,t)=>(0,a.jsx)(I,{task:t})}];return r?d:d.filter(e=>"assigned_users"!==e.key)},U=()=>{let e=(0,h.useRouter)(),t=(0,y.C)(v.dy),[s,i]=(0,c.useState)(1),[l,r]=(0,c.useState)(25),d=(0,p.Tg)([b.Sh.MANUAL_FIELD_READ_ALL]),o=e.query.privacy_request_id||void 0,u=(0,c.useMemo)(()=>{let e={};return(null==t?void 0:t.id)&&!o&&(e.assignedUsers=t.id),o&&"string"==typeof o&&(e.privacyRequestId=o),e},[null==t?void 0:t.id,o]),[m,C]=(0,c.useState)(u),{data:S,isLoading:E,isFetching:R}=(0,k.Ym)({page:s,size:l,status:m.status,systemName:m.systemName,requestType:m.requestType,assignedUserId:m.assignedUsers,privacyRequestId:m.privacyRequestId}),{data:w}=(0,k.Ym)({page:1,size:1}),{items:T,total:I}=(0,c.useMemo)(()=>S||{items:[],total:0,pages:0,filter_options:{assigned_users:[],systems:[]}},[S]),A=(0,c.useMemo)(()=>(null==w?void 0:w.filter_options)||{assigned_users:[],systems:[]},[w]),N=O({systemFilters:(0,c.useMemo)(()=>{var e;return(null==A?void 0:null===(e=A.systems)||void 0===e?void 0:e.map(e=>({text:e.name,value:e.name})))||[]},[null==A?void 0:A.systems]),userFilters:(0,c.useMemo)(()=>{var e;let s=(null==A?void 0:null===(e=A.assigned_users)||void 0===e?void 0:e.map(e=>({text:(0,f.gJ)(e),value:e.id})))||[];return(null==t?void 0:t.id)&&!s.some(e=>e.value===t.id)&&s.push({text:(0,f.gJ)(t,{fallbackToId:!0}),value:t.id}),s},[null==A?void 0:A.assigned_users,t]),onUserClick:t=>{e.push({pathname:g.fw,query:{id:t}})},currentFilters:m,hasAccessToAllTasks:d}),P=(0,c.useMemo)(()=>x()(m,u),[m,u]);return E?(0,a.jsx)(j.Z,{}):(0,a.jsxs)("div",{className:"mt-2 space-y-4",children:[(0,a.jsx)(n.kCb,{gap:3,align:"center",className:"mb-4",children:(0,a.jsx)(_.H,{globalFilter:m.privacyRequestId||"",setGlobalFilter:e=>{let t={...m};e&&e.trim()?t.privacyRequestId=e.trim():delete t.privacyRequestId,C(t),i(1)},placeholder:"Search by privacy request ID",testid:"privacy-request-id-filter"})}),(0,a.jsx)(n.V5H,{columns:N,dataSource:T,rowKey:e=>"".concat(e.privacy_request.id,"-").concat(e.manual_field_id),pagination:{current:s,pageSize:l,pageSizeOptions:q.VZ,total:I||0,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),onChange:(e,t)=>{i(e),t!==l&&(r(t),i(1))}},onChange:(e,t)=>{let s={privacyRequestId:m.privacyRequestId};t.status&&([s.status]=t.status),t.system_name&&([s.systemName]=t.system_name),t.request_type&&([s.requestType]=t.request_type),t.assigned_users&&([s.assignedUsers]=t.assigned_users),C(s),i(1)},locale:{emptyText:P?(0,a.jsx)("div",{"data-testid":"empty-state-current-user",className:"my-4",children:(0,a.jsxs)(n.AntTypography.Paragraph,{children:["You have no tasks assigned."," ",d&&(0,a.jsx)("span",{children:'You can modify the "Assigned to" column filter to view tasks assigned to other users.'})]})}):(0,a.jsx)("div",{"data-testid":"empty-state",className:"my-4",children:"No results found."})},loading:E||R,scroll:{scrollToFirstRowOnChange:!0},tableLayout:"fixed",className:"[&_th]:!break-normal"})]})};var F=s(59003),z=s(92222),D=s(40431),M=s(16125),Z=s(14048),L=s(47935),W=s(90867);let Y={approved:{colorScheme:"success",label:"Approved"},complete:{label:"Completed",colorScheme:"success"},awaiting_email_send:{label:"Awaiting Email Send",colorScheme:"marble"},denied:{label:"Denied",colorScheme:"warning"},canceled:{label:"Canceled",colorScheme:"marble"},error:{label:"Error",colorScheme:"error"},in_processing:{label:"In Progress",colorScheme:"caution"},paused:{label:"Paused",colorScheme:"marble"},pending:{label:"New",colorScheme:"info"},identity_unverified:{label:"Unverified",colorScheme:"marble"},requires_input:{colorScheme:"minos",label:"Requires Input"},requires_manual_finalization:{colorScheme:"minos",label:"Requires Finalization"}},B=e=>{let{value:t}=e;return(0,a.jsx)(L.A4,{color:Y[t].colorScheme,value:Y[t].label,"data-testid":"request-status-badge"})},V=e=>{let t,{daysLeft:s,timeframe:i=45,status:l,includeText:r=!1}=e;if(null==s||l===b.q2.COMPLETE||l===b.q2.CANCELED||l===b.q2.DENIED||l===b.q2.IDENTITY_UNVERIFIED)return null;let n=100*s/i;return n<25?t="error":n>=75?t="success":n>=25&&(t="warning"),(0,a.jsx)(L.A4,{value:r?"".concat(s," days left"):s.toString(),color:t})},K=e=>Array.from(new Set(e.filter(e=>Object.values(b.Us).includes(e.action_type)).map(e=>e.action_type))),G=e=>{let{value:t}=e,s=K(t).map(e=>S.rE.get(e));return(0,a.jsx)(L.WP,{value:s,cellState:{isExpanded:!0}})};var X=s(58452),Q=s(7426),J=s(57526),H=s(66548),$=s(45489),ee=s(42478);let et=e=>{var t;let{subjectRequest:s,...i}=e,l=(0,n.qY0)(),r=(0,n.qY0)(),d=(0,n.qY0)(),o=(0,n.qY0)(),{handleApproveRequest:c,handleDenyRequest:u,handleDeleteRequest:m,handleFinalizeRequest:x,isLoading:h}=(0,$.Z)({subjectRequest:s}),{data:y}=(0,Q.tB)({api_set:!1}),{data:v}=(0,ee.JE)(),j=null==y?void 0:null===(t=y.notifications)||void 0===t?void 0:t.send_request_completion_notification;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(n.Ugi,{...i,children:["pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Approve","aria-label":"Approve",icon:(0,a.jsx)(n.PJP.MCw,{}),onClick:l.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-approve-btn",size:"small"}),"pending"!==s.status?null:(0,a.jsx)(n.wpx,{title:"Deny","aria-label":"Deny",icon:(0,a.jsx)(n.PJP.x8P,{}),onClick:r.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-deny-btn",size:"small"}),s.status!==b.q2.REQUIRES_MANUAL_FINALIZATION?null:(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_REVIEW],children:(0,a.jsx)(n.wpx,{title:"Finalize","aria-label":"Finalize",icon:(0,a.jsx)(n.PJP.Ok8,{}),onClick:o.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-finalize-btn",size:"small"})}),(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_DELETE],children:(0,a.jsx)(n.wpx,{title:"Delete","aria-label":"Delete",icon:(0,a.jsx)(n.PJP.ZNm,{size:14}),onClick:d.onOpen,loading:h,disabled:h,"data-testid":"privacy-request-delete-btn",size:"small"})})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(J.Z,{isOpen:l.isOpen,isLoading:h,onClose:l.onClose,onApproveRequest:c,subjectRequest:s})}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(H.Z,{isOpen:r.isOpen,onClose:r.onClose,onDenyRequest:u})}),(0,a.jsx)(X.Z,{isOpen:d.isOpen,onClose:d.onClose,onConfirm:m,message:(0,a.jsx)(n.xvT,{children:"You are about to permanently delete the privacy request. Are you sure you would like to continue?"})}),(0,a.jsx)(X.Z,{isOpen:o.isOpen,onClose:o.onClose,onConfirm:()=>{x(),o.onClose()},title:"Finalize privacy request",message:(0,a.jsxs)(n.xvT,{children:['You are about to finalize this privacy request. The status will be updated to "Complete"',j&&(null==v?void 0:v.service_type)?" and the requesting user will be notified":"",". Would you like to continue?"]})})]})};(i=l||(l={})).STATUS="status",i.DAYS_LEFT="due_date",i.SOURCE="source",i.REQUEST_TYPE="request_type",i.SUBJECT_IDENTITY="subject_identity",i.TIME_RECEIVED="created_at",i.CREATED_BY="created_by",i.REVIEWER="reviewer",i.ID="id",i.ACTIONS="actions";let es=(0,z.Cl)(),ei=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return[es.accessor(e=>e.status,{id:"status",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(B,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Status",...e})}),es.accessor(e=>e.days_left,{id:"due_date",cell:e=>{let{row:t,getValue:s}=e;return(0,a.jsx)(V,{daysLeft:s(),timeframe:t.original.policy.execution_timeframe,status:t.original.status})},header:e=>(0,a.jsx)(L.Rr,{value:"Days left",...e})}),...e?[es.accessor(e=>e.source,{id:"source",cell:e=>e.getValue()?(0,a.jsx)(L.A4,{value:e.getValue()}):(0,a.jsx)(L.G3,{value:void 0}),header:e=>(0,a.jsx)(L.Rr,{value:"Source",...e}),enableSorting:!1})]:[],es.accessor(e=>e.policy.rules,{id:"request_type",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(G,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request type",...e}),enableSorting:!1}),es.accessor(e=>{var t,s;return(null===(t=e.identity)||void 0===t?void 0:t.email.value)||(null===(s=e.identity)||void 0===s?void 0:s.phone_number.value)||""},{id:"subject_identity",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Subject identity",...e}),enableSorting:!1}),es.accessor(e=>e.created_at,{id:"created_at",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:(0,f.p6)(t())})},header:e=>(0,a.jsx)(L.Rr,{value:"Time received",...e})}),es.accessor(e=>{var t;return(null===(t=e.reviewer)||void 0===t?void 0:t.username)||""},{id:"reviewer",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Reviewed by",...e}),enableSorting:!1}),es.accessor(e=>e.id,{id:"id",cell:e=>{let{getValue:t}=e;return(0,a.jsx)(L.G3,{value:t()})},header:e=>(0,a.jsx)(L.Rr,{value:"Request ID",...e}),enableSorting:!1}),es.display({id:"actions",cell:e=>{let{row:t}=e;return(0,a.jsx)(et,{subjectRequest:t.original})},header:e=>(0,a.jsx)(L.Rr,{value:"Actions",...e}),meta:{disableRowClick:!0}})]},el=e=>{let t=(0,M.v9)(W.dp),s=(0,M.I0)();return{handleStatusChange:t=>{s((0,W.CI)(t)),e()},handleActionTypeChange:t=>{s((0,W.aM)(t)),e()},handleFromChange:t=>{s((0,W.su)(null==t?void 0:t.target.value)),e()},handleToChange:t=>{s((0,W.Ue)(null==t?void 0:t.target.value)),e()},handleClearAllFilters:()=>{s((0,W.Mk)()),e()},...t}};var ea=s(96718);let er=e=>{let{onClose:t,onFilterChange:s,...i}=e,{handleStatusChange:l,handleActionTypeChange:r,handleFromChange:d,handleToChange:o,handleClearAllFilters:c,from:u,to:p,status:m,action_type:x}=el(s);return(0,a.jsxs)(n.u_l,{onClose:t,size:"xl",...i,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{borderBottomWidth:1,borderBottomColor:"gray.200",children:"All Filters"}),(0,a.jsx)(n.olH,{}),(0,a.jsx)(n.fef,{py:4,sx:{"& label":{mb:0}},children:(0,a.jsxs)(n.Kqy,{gap:4,children:[(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",id:"request-date-range-label",children:"Date range"}),(0,a.jsxs)(n.Ugi,{gap:3,children:[(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"from-date",borderRadius:"md",children:"From"}),(0,a.jsx)(n.IIB,{type:"date",name:"From",value:u,max:p||void 0,onChange:d,borderRadius:"md",id:"from-date","aria-describedby":"request-date-range-label"})]}),(0,a.jsxs)(n.BZy,{size:"sm",flex:1,children:[(0,a.jsx)(n.UiE,{as:"label",htmlFor:"to-date",borderRadius:"md",children:"To"}),(0,a.jsx)(n.IIB,{type:"date",borderRadius:"md",name:"To",value:p,min:u||void 0,onChange:o,id:"to-date","aria-describedby":"request-date-range-label"})]})]})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-status",children:"Status"}),(0,a.jsx)(ea.z,{id:"request-status",mode:"multiple",options:S.I3,value:m,onChange:l,"data-testid":"request-status-filter"})]}),(0,a.jsxs)(n.Kqy,{children:[(0,a.jsx)(n.lXp,{size:"md",htmlFor:"request-action-type",children:"Request Type"}),(0,a.jsx)(ea.z,{id:"request-action-type",mode:"multiple",options:S.kN,value:x,onChange:r,"data-testid":"request-action-type-filter"})]})]})}),(0,a.jsxs)(n.mzw,{justifyContent:"space-between",children:[(0,a.jsx)(n.wpx,{type:"text",onClick:c,children:"Clear all"}),(0,a.jsx)(n.wpx,{type:"primary",onClick:t,children:"Done"})]})]})]})};var en=s(36866);let ed=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,en.h)(e),{pageIndex:s,pageSize:i,updatePageIndex:l,updatePageSize:a,pageSizeOptions:r,showSizeChanger:n}=t,d=(0,c.useMemo)(()=>({current:s,pageSize:i,showSizeChanger:n,pageSizeOptions:r.map(String),onChange:l,onShowSizeChange:(e,t)=>{a(t)}}),[s,i,n,r,l,a]);return{...t,paginationProps:d}};var eo=s(812),ec=()=>{let e=(0,n.pmc)(),[t,{isFetching:s}]=(0,W.ZU)();return{downloadReport:async s=>{let i=await t(s);if(i.isError)e({status:"error",description:(0,eo.e$)(i.error,"A problem occurred while generating your privacy request report. Please try again.")});else{let t=document.createElement("a"),s=new Blob([i.data],{type:"text/csv"}),l=window.URL.createObjectURL(s);t.href=l,t.download="privacy-request-report.csv",t.click(),t.remove(),window.URL.revokeObjectURL(l),e({status:"success",description:"Successfully downloaded Privacy Request report."})}},isDownloadingReport:s}};let eu=e=>{let{...t}=e,{plus:s}=(0,u.hz)(),[i,l]=(0,D.v1)("search",D.Oi.withDefault("").withOptions({throttleMs:100})),r=(0,M.v9)(W.dp),d=(0,n.pmc)(),o=(0,h.useRouter)(),p=(0,M.I0)(),m=ed(),{pageIndex:x,pageSize:y,resetPagination:v}=m,{isOpen:j,onOpen:g,onClose:_}=(0,n.qY0)(),{data:f,isLoading:b,isFetching:q}=(0,W.QA)({...r,page:x,size:y,fuzzy_search_str:i}),{items:C,total:S}=(0,c.useMemo)(()=>f||{items:[],total:0,pages:0},[f]),{downloadReport:k}=ec(),E=(0,c.useCallback)(e=>{l(null!=e?e:""),v()},[v,l]),R=async()=>{let e;try{await k(r)}catch(t){e=t instanceof Error?t.message:"Unknown error occurred"}e&&d({description:"".concat(e),duration:5e3,status:"error"})},w=e=>{o.push("/privacy-requests/".concat(e))},T=(0,F.b7)({getCoreRowModel:(0,z.sC)(),data:C,columns:(0,c.useMemo)(()=>ei(s),[s]),getRowId:e=>"".concat(e.status,"-").concat(e.id),manualPagination:!0,columnResizeMode:"onChange"});return(0,a.jsxs)(n.xuv,{...t,children:[(0,a.jsxs)(L.Q$,{children:[(0,a.jsx)(L.HO,{globalFilter:i,setGlobalFilter:E,placeholder:"Search by request ID or identity value"}),(0,a.jsxs)(n.Ugi,{alignItems:"center",spacing:2,children:[(0,a.jsx)(n.wpx,{"data-testid":"filter-btn",onClick:g,children:"Filter"}),(0,a.jsx)(n.wpx,{"aria-label":"Export report","data-testid":"export-btn",icon:(0,a.jsx)(Z.nM,{ml:"1.5px"}),onClick:R})]}),(0,a.jsx)(n.h_i,{children:(0,a.jsx)(er,{isOpen:j,onClose:_,onFilterChange:v})})]}),b?(0,a.jsx)(n.xuv,{p:2,borderWidth:1,children:(0,a.jsx)(L.I4,{rowHeight:26,numRows:10})}):(0,a.jsxs)(n.jqI,{vertical:!0,gap:"middle",children:[(0,a.jsx)(L.ZK,{tableInstance:T,onRowClick:e=>w(e.id),onSort:e=>{if(!e){p((0,W.PS)());return}let{id:t,desc:s}=e;p((0,W.WR)(t)),p((0,W.iX)(s?"desc":"asc")),v()},loading:q}),(0,a.jsx)(n.B7X,{...m.paginationProps,showTotal:(e,t)=>"".concat(t[0],"-").concat(t[1]," of ").concat(e," items"),total:null!=S?S:0,align:"end"})]})]})};var ep=s(87361),em=s(46628),ex=s(32885),eh=s(34090),ey=s(55484),ev=s(40324);let ej=(e,t)=>null==t?void 0:t.find(t=>t.policy_key===e),eg=e=>{var t,s;if(!e)return ey.Ry().shape({policy_key:ey.Z_().required().label("Request type")});let i=e.custom_privacy_request_fields?Object.entries(e.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:ey.Ry().shape({value:s.required&&!s.hidden?ey.Z_().required().label(s.label):ey.Z_().nullable()})}}).reduce((e,t)=>({...e,...t}),{}):{};return ey.Ry().shape({policy_key:ey.Z_().required().label("Request type"),identity:ey.Ry().shape({email:(null===(t=e.identity_inputs)||void 0===t?void 0:t.email)==="required"?ey.Z_().email().required().label("Email address"):ey.Z_().nullable(),phone_number:(null===(s=e.identity_inputs)||void 0===s?void 0:s.phone)==="required"?ey.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").required().label("Phone number"):ey.Z_().matches(/^\+?[1-9]\d{1,14}$/,"Phone number must be formatted correctly (e.g. 15555555555)").nullable()}),custom_privacy_request_fields:ey.Ry().shape(i)})};var e_=s(97181);let ef={is_verified:!1,policy_key:"",identity:{}},eb=e=>{let{identityInputs:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[t.email?(0,a.jsx)(ev.j0,{name:"identity.email",label:"User email address",isRequired:"required"===t.email,variant:"stacked"}):null,t.phone?(0,a.jsx)(ev.j0,{name:"identity.phone_number",label:"User phone number",isRequired:"required"===t.phone,variant:"stacked"}):null]}):null},eq=e=>{let{customFieldInputs:t}=e;if(!t)return null;let s=Object.entries(t);return(0,a.jsx)(a.Fragment,{children:s.map(e=>{let[t,s]=e;return(0,a.jsx)(ev.j0,{name:"custom_privacy_request_fields.".concat(t,".value"),label:s.label,isRequired:!!s.required,variant:"stacked"},t)})})},eC=e=>{let{onSubmit:t,onCancel:s,privacyCenterUrl:i}=e,{onCopy:l}=(0,n.VPI)(""),r=(0,n.pmc)();return(0,a.jsx)(eh.J9,{initialValues:{identity:{email:""}},onSubmit:e=>{l("".concat(i,"?email=").concat(encodeURIComponent(e.identity.email))),t(e),r({status:"success",description:"DSR Link Copied!"})},validationSchema:()=>ey.Ry().shape({identity:ey.Ry().shape({email:ey.Z_().email().required().label("Email Address")})}),children:e=>{let{dirty:t,isValid:i}=e;return(0,a.jsx)(eh.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(eb,{identityInputs:{email:"required"}}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!t||!i,"data-testid":"submit-btn",icon:(0,a.jsx)(n.xPt,{}),children:"Copy"})]})]})})}})};var eS=e=>{let{onSubmit:t,onCancel:s}=e,{data:i}=(0,W.xv)();return(0,a.jsx)(eh.J9,{initialValues:ef,onSubmit:t,validationSchema:()=>(0,ey.Vo)(e=>eg(ej(e.policy_key,null==i?void 0:i.actions))),children:e=>{var t;let{values:l,dirty:r,isValid:d,isSubmitting:o,setFieldValue:c}=e,u=ej(l.policy_key,null==i?void 0:i.actions);return(0,a.jsx)(eh.l0,{children:(0,a.jsxs)(n.Kqy,{spacing:6,mb:2,children:[(0,a.jsx)(e_.d,{name:"policy_key",label:"Request type",options:null!==(t=null==i?void 0:i.actions.map(e=>({label:e.title,value:e.policy_key})))&&void 0!==t?t:[],onChange:e=>{let t=ej(e,null==i?void 0:i.actions);if(!(null==t?void 0:t.custom_privacy_request_fields)){c("custom_privacy_request_fields",void 0);return}c("custom_privacy_request_fields",Object.entries(t.custom_privacy_request_fields).map(e=>{let[t,s]=e;return{[t]:{label:s.label,value:s.default_value}}}).reduce((e,t)=>({...e,...t}),{}))},layout:"stacked",isRequired:!0}),(0,a.jsx)(eb,{identityInputs:null==u?void 0:u.identity_inputs}),(0,a.jsx)(eq,{customFieldInputs:null==u?void 0:u.custom_privacy_request_fields}),(0,a.jsx)(ev.Xl,{name:"is_verified",label:"I confirm that I have verified this user information"}),(0,a.jsxs)("div",{className:"flex gap-4 self-end",children:[(0,a.jsx)(n.wpx,{onClick:s,children:"Cancel"}),(0,a.jsx)(n.wpx,{htmlType:"submit",type:"primary",disabled:!l.is_verified||!r||!d,loading:o,"data-testid":"submit-btn",children:"Create"})]})]})})}})},ek=s(31883);let eE=e=>{let{isOpen:t,onClose:s}=e,[i]=(0,W.M6)(),l=(0,n.pmc)(),r=async e=>{let{is_verified:t,...a}=e,r=a.custom_privacy_request_fields?Object.entries(a.custom_privacy_request_fields).map(e=>{let[t,s]=e;return s.value?{[t]:s}:{}}).reduce((e,t)=>({...e,...t}),{}):void 0,n={...a,custom_privacy_request_fields:r},d=await i([n]);(0,ek.D4)(d)?l((0,em.Vo)((0,eo.e$)(d.error,"An error occurred while creating this privacy request. Please try again"))):l((0,em.t5)("Privacy request created")),s()};return(0,a.jsxs)(n.u_l,{isOpen:t,onClose:s,size:"2xl",isCentered:!0,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{"data-testid":"submit-request-modal",maxHeight:"80%",overflowY:"auto",children:[(0,a.jsx)(n.xBx,{children:"Create privacy request"}),(0,a.jsx)(n.fef,{children:(0,a.jsxs)(n.Kqy,{spacing:4,children:[(0,a.jsx)(ep.Z,{title:"Warning: You are bypassing identity verification",text:"You are bypassing Fides' built-in identity verification step. Please ensure that you are only entering information on behalf of a verified and approved user's privacy request."}),(0,a.jsx)(eS,{onSubmit:r,onCancel:()=>s()})]})})]})]})},eR=e=>{let{isOpen:t,onClose:s,privacyCenterUrl:i}=e;return(0,a.jsxs)(n.u_l,{size:"md",isOpen:t,onClose:s,children:[(0,a.jsx)(n.ZAr,{}),(0,a.jsxs)(n.hzk,{children:[(0,a.jsx)(n.xBx,{children:"Create a Privacy Request Link"}),(0,a.jsxs)(n.fef,{children:[(0,a.jsx)(n.Kqy,{spacing:4}),(0,a.jsx)(eC,{privacyCenterUrl:i,onSubmit:s,onCancel:s})]})]})]})};var ew=()=>{var e;let[t,s]=(0,c.useState)("closed"),i=()=>s("closed"),{data:l}=(0,ex.Vh)(),r=(null!==(e=null==l?void 0:l.privacy_center_url)&&void 0!==e?e:"").trim(),d=r.length>0;return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsx)(eR,{isOpen:"create-link"===t,onClose:i,privacyCenterUrl:r}):null,(0,a.jsx)(eE,{isOpen:"submit-request"===t,onClose:i}),(0,a.jsx)(n.S0p.Button,{type:"primary",onClick:()=>s("submit-request"),"data-testid":"submit-request-btn",menu:{items:[{label:"Create request link",key:"create-request-link",icon:(0,a.jsx)(n.xPt,{}),onClick:()=>s("create-link"),disabled:!d}]},icon:(0,a.jsx)(n.v4q,{}),children:"Create request"})]})},eT=s(58754),eI=s(17245);let eA=()=>{let{errorAlert:e}=(0,eI.VY)(),[t,s]=(0,c.useState)(!1),[i,l]=(0,c.useState)({count:0,total:0}),[r,d]=(0,c.useState)(!0),o=b.q2.ERROR,{data:u}=(0,W.tE)(),{data:p}=(0,W.QA)({status:[o]},{pollingInterval:15e3,skip:r});return(0,c.useEffect)(()=>{d(!(u&&u.notify_after_failures>0))},[u]),(0,c.useEffect)(()=>{let e=(null==p?void 0:p.total)||0;e>=((null==u?void 0:u.notify_after_failures)||0)&&e>i.total?(l({count:e-i.total,total:e}),s(!0)):s(!1)},[null==p?void 0:p.total,null==u?void 0:u.notify_after_failures,i.total]),{processing:()=>{t&&e((0,a.jsxs)(n.xuv,{children:["DSR automation has failed for"," ",(0,a.jsx)(n.xvT,{as:"span",fontWeight:"semibold",children:i.count})," ","privacy request(s). Please review the event log for further details."]}),void 0,{containerStyle:{maxWidth:"max-content"},duration:null,id:"dsrErrorAlert"})}}};var eN=s(72281);let eP=o()(()=>s.e(9676).then(s.bind(s,59676)),{loadableGenerated:{webpack:()=>[59676]},loading:()=>(0,a.jsx)("div",{children:"Loading..."})});var eO=()=>{let{processing:e}=eA(),{plus:t}=(0,u.hz)(),{activeTab:s,handleTabChange:i,availableTabs:l}=(0,eN.d)();(0,c.useEffect)(()=>{e()},[e]);let r=(0,c.useMemo)(()=>{let e=[];return l.request&&e.push({key:eN.G.REQUEST,label:"Request",children:(0,a.jsx)(eu,{})}),l.manualTask&&e.push({key:eN.G.MANUAL_TASK,label:"Manual tasks",children:(0,a.jsx)(U,{})}),e},[l.manualTask,l.request]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eT.Z,{heading:"Privacy Requests",breadcrumbItems:[{title:"All requests"}],rightContent:(0,a.jsxs)(n.vyj,{children:[t&&(0,a.jsx)(p.ZP,{scopes:[b.Sh.PRIVACY_REQUEST_CREATE],children:(0,a.jsx)(ew,{})}),(0,a.jsx)(eP,{})]}),"data-testid":"privacy-requests"}),(0,a.jsx)(n.A5g,{activeKey:s,onChange:i,items:r})]})},eU=()=>(0,a.jsx)(r.Z,{title:"Privacy Requests",children:(0,a.jsx)(eO,{})})},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return i.Bw},D4:function(){return i.D4}});var i=s(19043)}},function(e){e.O(0,[431,8765,3550,4558,2888,9774,179],function(){return e(e.s=1565)}),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9196],{6446:function(e){e.exports=function(e,t,a,s){var r=-1,i=null==e?0:e.length;for(s&&i&&(a=e[++r]);++r<i;)a=t(a,e[r],r,e);return a}},67375:function(e,t,a){var s=a(52033),r=a(80068);e.exports=function(e,t){var a=-1,i=r(e)?Array(e.length):[];return s(e,function(e,s,r){i[++a]=t(e,s,r)}),i}},74833:function(e,t,a){var s=a(56127),r=/^\s+/;e.exports=function(e){return e?e.slice(0,s(e)+1).replace(r,""):e}},56632:function(e,t,a){var s=a(89278),r=a(80068),i=a(50098);e.exports=function(e){return function(t,a,l){var n=Object(t);if(!r(t)){var o=s(a,3);t=i(t),a=function(e){return o(n[e],e,n)}}var c=e(t,a,l);return c>-1?n[o?t[c]:c]:void 0}}},56127:function(e){var t=/\s/;e.exports=function(e){for(var a=e.length;a--&&t.test(e.charAt(a)););return a}},64925:function(e,t,a){var s=a(56632)(a(66259));e.exports=s},66259:function(e,t,a){var s=a(95372),r=a(89278),i=a(47991),l=Math.max;e.exports=function(e,t,a){var n=null==e?0:e.length;if(!n)return -1;var o=null==a?0:i(a);return o<0&&(o=l(n+o,0)),s(e,r(t,3),o)}},55807:function(e,t,a){var s=a(66070),r=a(89278),i=a(67375),l=a(19785);e.exports=function(e,t){return(l(e)?s:i)(e,r(t,3))}},82846:function(e,t,a){var s=a(77400);e.exports=function(){return s.Date.now()}},32526:function(e,t,a){var s=a(68267)(function(e,t,a){return e+(a?"_":"")+t.toLowerCase()});e.exports=s},94919:function(e,t,a){var s=a(91936),r=1/0;e.exports=function(e){return e?(e=s(e))===r||e===-r?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,a){var s=a(94919);e.exports=function(e){var t=s(e),a=t%1;return t==t?a?t-a:t:0}},91936:function(e,t,a){var s=a(74833),r=a(11611),i=a(55193),l=0/0,n=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,c=/^0o[0-7]+$/i,d=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return l;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var a=o.test(e);return a||c.test(e)?d(e.slice(2),a?2:8):n.test(e)?l:+e}},86548:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/reporting/datamap",function(){return a(27901)}])},624:function(e,t,a){"use strict";var s=a(24246),r=a(96306),i=a(27378);let l=e=>{let t=e.split("."),a=[];return t.forEach(e=>{let t=a.length>0?a[a.length-1]:null;t?a.push("".concat(t,".").concat(e)):a.push(e)}),a},n=(e,t)=>{let a=l(t).filter(e=>e!==t);return e.filter(e=>a.includes(e)).length>0},o=(e,t)=>!!(e===t||e.startsWith("".concat(t,"."))),c=(e,t,a)=>{let s=null!=a?a:[];return e.forEach(e=>{e.children&&c(e.children,t,s),o(e.value,t)&&s.push(e)}),s},d=e=>{let{node:t,isChecked:a,onChecked:i,isExpanded:l,onExpanded:n,isIndeterminate:o,isDisabled:c,children:d}=e,{value:u,label:_}=t,p=!!t.children&&t.children.length>0;return(0,s.jsxs)(r.xuv,{children:[(0,s.jsxs)(r.xuv,{display:"flex",justifyContent:"space-between",_hover:{backgroundColor:"gray.100",cursor:"pointer"},onClick:()=>n(t),minHeight:8,children:[(0,s.jsx)(r.XZJ,{colorScheme:"complimentary",value:u,isChecked:!o&&a,isIndeterminate:o,isDisabled:c,onChange:()=>i(t),mx:2,"data-testid":"checkbox-".concat(_),children:_}),p?(0,s.jsx)(r.wpx,{"data-testid":"expand-".concat(_),"aria-label":l?"collapse":"expand",icon:(0,s.jsx)(r.v4q,{boxSize:5}),type:"text",onClick:()=>n(t),className:l?"rotate-180":void 0}):null]}),d&&(0,s.jsx)(r.xuv,{ml:5,children:d})]})};t.ZP=e=>{let{nodes:t,selected:a,onSelected:u,..._}=e,[p,m]=(0,i.useState)([]),[E,S]=(0,i.useState)([]);(0,i.useEffect)(()=>{let e=Array.from(new Set([...a.map(e=>l(e)).reduce((e,t)=>e.concat(t),[]),...a.map(e=>c(t,e)).reduce((e,t)=>e.concat(t),[]).map(e=>e.value)]));S(e),m(e)},[a,t]);let g=e=>{let s=[],r=[];p.indexOf(e.value)>=0?(s=p.filter(t=>!o(t,e.value)),r=a.filter(t=>!o(t,e.value))):(s=[...p,...c(t,e.value).map(e=>e.value)],r=[...a,e.value]),m(s),u(r)},h=e=>{E.indexOf(e.value)>=0?S(E.filter(t=>!o(t,e.value))):S([...E,e.value])},f=e=>{if(e.children){let r=p.indexOf(e.value)>=0,l=E.indexOf(e.value)>=0,o=c(t,e.value),u=r&&e.children.length>0&&p.filter(t=>t.startsWith("".concat(e.value,"."))).length+1!==o.length,_=n(a,e.value);return(0,s.jsx)(d,{node:e,isChecked:r,onChecked:g,isExpanded:l,onExpanded:h,isDisabled:_,isIndeterminate:u,children:l?e.children.map(e=>(0,s.jsx)(i.Fragment,{children:f(e)},e.value)):void 0})}return null};return(0,s.jsx)(r.xuv,{..._,children:t.map(e=>(0,s.jsx)(r.xuv,{children:f(e)},e.value))})}},35287:function(e,t,a){"use strict";var s=a(24246),r=a(96306),i=a(88038),l=a.n(i);a(27378),t.Z=e=>{let{children:t,title:a,mainProps:i}=e;return(0,s.jsxs)(r.kCb,{"data-testid":a,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(l(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",a]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(r.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...i,children:t})]})}},34929:function(e,t,a){"use strict";var s=a(24246),r=a(64925),i=a.n(r),l=a(27378),n=a(16134),o=a(30002),c=a(28079),d=a(57072);let u=()=>{let{isLoading:e}=(0,c.fd)(),t=(0,n.C)(c.U3),{isLoading:a}=(0,d.MO)(),s=(0,n.C)(d.qb),{isLoading:r}=(0,o.te)();return{dataUses:t,dataSubjects:(0,n.C)(o.ZL),dataCategories:s,isLoading:e||a||r}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:a,isLoading:r}=u(),n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.split(".").slice(0,t).join(".")},o=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let r=t(n(e,a)),i=!!s.parent_key;return{name:s.name||void 0,primaryName:i&&(null==r?void 0:r.name)!==s.name&&(null==r?void 0:r.name)||void 0}},c=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:r,primaryName:i}=o(e,t,a);return r?i?(0,s.jsxs)(l.Fragment,{children:[(0,s.jsxs)("strong",{children:[i,":"]})," ",r]},e):(0,s.jsx)("strong",{children:r},e):e},d=t=>i()(e,{fides_key:t}),_=e=>i()(t,{fides_key:e}),p=e=>i()(a,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:d,getDataUseDisplayName:e=>c(e,d,1),getDataUseDisplayNameProps:e=>o(e,d,1),getDataCategories:()=>t,getDataCategoryByKey:_,getDataCategoryDisplayName:e=>c(e,_,2),getDataCategoryDisplayNameProps:e=>o(e,_,2),getDataSubjects:()=>a,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:n,isLoading:r}}},2525:function(e,t,a){"use strict";a.d(t,{Q:function(){return n}});var s=a(24246),r=a(96306),i=a(27378),l=a(3110);let n=e=>{let{values:t,columnState:a,tagProps:n,onTagClose:o,...c}=e,{isExpanded:d,isWrapped:u,version:_}=a||{},[p,m]=(0,i.useState)(!d),[E,S]=(0,i.useState)(!!u),[g,h]=(0,i.useState)(d?t:null==t?void 0:t.slice(0,2));(0,i.useEffect)(()=>{m(!d)},[d,_]),(0,i.useEffect)(()=>{S(!!u)},[u]),(0,i.useEffect)(()=>{(null==t?void 0:t.length)&&h(p?t.slice(0,2):t)},[p,t]);let f=(0,i.useCallback)(()=>{h(null==t?void 0:t.slice(0,2)),m(!0)},[t]),A=(0,i.useCallback)(()=>{m(!1)},[]),T=(0,i.useCallback)(()=>{p?A():f()},[p,A,f]);return(0,i.useMemo)(()=>(null==g?void 0:g.length)?(0,s.jsxs)(r.jqI,{align:p?"center":"start",wrap:E?"wrap":"nowrap",vertical:!p,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...c.style},...c,children:[g.map(e=>(0,s.jsx)(r.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...n,...e.tagProps,children:(0,s.jsx)(r.lKn,{ellipsis:!!p&&{tooltip:!0},style:{color:"inherit",maxWidth:p?l.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),T()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:p?"+".concat(t.length-2," more"):l.T5})]}):(0,s.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[g,p,E,c,t,n,o,T])}},3110:function(e,t,a){"use strict";a.d(t,{DI:function(){return n},T5:function(){return i},TD:function(){return l}});var s=a(24246),r=a(96306);let i="show less",l=150,n=[{key:"expand-all",label:"Expand all",icon:(0,s.jsx)(r.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,s.jsx)(r.PJP.MVB,{})}]},26070:function(e,t,a){"use strict";a.d(t,{v:function(){return o},Q:function(){return c.Q}});var s=a(24246),r=a(96306),i=a(27378),l=a(3110);let{Text:n}=r.AntTypography,o=e=>{let{values:t,valueSuffix:a,columnState:o}=e,{isExpanded:c,version:d}=o||{},[u,_]=(0,i.useState)(!c);(0,i.useEffect)(()=>{_(!c)},[c,d]);let p=(0,i.useCallback)(()=>{_(!0)},[]),m=(0,i.useCallback)(()=>{_(!1)},[]),E=(0,i.useCallback)(()=>{u?m():p()},[u,m,p]);return(0,i.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,s.jsx)(n,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,s.jsxs)(r.jqI,{align:u?"center":"flex-start",vertical:!u,gap:u?"small":"none","data-testid":"list-expandable-cell",children:[u?(0,s.jsxs)(n,{ellipsis:!0,children:[t.length," ",a]}):(0,s.jsx)(r.krs,{dataSource:t,renderItem:e=>(0,s.jsx)("li",{children:e})}),(0,s.jsx)(r.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),E()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:u?"view":l.T5})]}):null,[u,t,a,E])};var c=a(2525)},59001:function(e,t,a){"use strict";a.d(t,{Ch:function(){return o},Lo:function(){return l},_g:function(){return c},ac:function(){return i},aq:function(){return d}});var s,r,i,l,n=a(21910);let o="root";(s=i||(i={})).DATA_CATEGORY="data_category",s.DATA_USE="data_use",s.DATA_SUBJECT="data_subject",s.SYSTEM_GROUP="system_group",(r=l||(l={})).DATA_CATEGORIES="Data categories",r.DATA_USES="Data uses",r.DATA_SUBJECTS="Data subjects",r.SYSTEM_GROUPS="System groups";let c=e=>{switch(e){case"data_category":return"Data categories";case"data_use":return"Data uses";case"data_subject":return"Data subjects";case"system_group":return"System groups";default:return e}},d=e=>{switch(e){case"data_category":return{UPDATE:n.Sh.DATA_CATEGORY_UPDATE,CREATE:n.Sh.DATA_CATEGORY_CREATE,DELETE:n.Sh.DATA_CATEGORY_DELETE,READ:n.Sh.DATA_CATEGORY_READ};case"data_use":return{UPDATE:n.Sh.DATA_USE_UPDATE,CREATE:n.Sh.DATA_USE_CREATE,DELETE:n.Sh.DATA_USE_DELETE,READ:n.Sh.DATA_USE_READ};case"data_subject":return{UPDATE:n.Sh.DATA_SUBJECT_UPDATE,CREATE:n.Sh.DATA_SUBJECT_CREATE,DELETE:n.Sh.DATA_SUBJECT_DELETE,READ:n.Sh.DATA_SUBJECT_READ};case"system_group":return{UPDATE:n.Sh.SYSTEM_GROUP_UPDATE,CREATE:n.Sh.SYSTEM_GROUP_CREATE,DELETE:n.Sh.SYSTEM_GROUP_DELETE,READ:n.Sh.SYSTEM_GROUP_READ};default:return{UPDATE:n.Sh.TAXONOMY_UPDATE,CREATE:n.Sh.TAXONOMY_CREATE,DELETE:n.Sh.TAXONOMY_DELETE,READ:n.Sh.TAXONOMY_READ}}}},90673:function(e,t,a){"use strict";a.d(t,{Cd:function(){return i},Xl:function(){return l}});var s=a(21910),r=a(59001);let i=(e,t)=>{let a;if(null==t&&e.every(e=>void 0===e.parent_key))a=e;else{let s=null!=t?t:null;a=e.filter(e=>e.parent_key===s)}return a.map(t=>{var a,s;let r=t.fides_key;return{value:t.fides_key,label:""===t.name||null==t.name?t.fides_key:t.name,description:t.description,children:i(e,r),is_default:null!==(a=t.is_default)&&void 0!==a&&a,active:null!==(s=t.active)&&void 0!==s&&s}})},l=e=>{switch(e){case r.ac.DATA_CATEGORY:return s.P6.DATA_CATEGORY;case r.ac.DATA_SUBJECT:return s.P6.DATA_SUBJECT;case r.ac.DATA_USE:return s.P6.DATA_USE;default:return}}},27901:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return eC}});var s,r,i,l,n=a(24246),o=a(27378),c=a(35287),d=a(58754),u=a(71795),_=a(21910);(s=i||(i={})).COLUMN_EXPANSION_STATE="datamap-column-expansion-state",s.COLUMN_NAMES="datamap-column-names",s.COLUMN_ORDER="datamap-column-order",s.COLUMN_SIZING="datamap-column-sizing",s.COLUMN_VISIBILITY="datamap-column-visibility",s.CUSTOM_REPORT_ID="datamap-custom-report-id",s.FILTERS="datamap-filters",s.GROUP_BY="datamap-group-by",s.SORTING_STATE="datamap-sorting-state",s.WRAPPING_COLUMNS="datamap-wrapping-columns",(r=l||(l={})).SYSTEM_NAME="system_name",r.DATA_USE="data_uses",r.DATA_CATEGORY="data_categories",r.DATA_SUBJECT="data_subjects",r.LEGAL_NAME="legal_name",r.DPO="dpo",r.LEGAL_BASIS_FOR_PROCESSING="legal_basis_for_processing",r.ADMINISTRATING_DEPARTMENT="administrating_department",r.COOKIE_MAX_AGE_SECONDS="cookie_max_age_seconds",r.PRIVACY_POLICY="privacy_policy",r.LEGAL_ADDRESS="legal_address",r.COOKIE_REFRESH="cookie_refresh",r.DATA_SECURITY_PRACTICES="data_security_practices",r.DATA_SHARED_WITH_THIRD_PARTIES="data_shared_with_third_parties",r.DATA_STEWARDS="data_stewards",r.DECLARATION_NAME="declaration_name",r.DOES_INTERNATIONAL_TRANSFERS="does_international_transfers",r.DPA_LOCATION="dpa_location",r.DESTINATIONS="egress",r.EXEMPT_FROM_PRIVACY_REGULATIONS="exempt_from_privacy_regulations",r.FEATURES="features",r.FIDES_KEY="fides_key",r.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING="flexible_legal_basis_for_processing",r.IMPACT_ASSESSMENT_LOCATION="impact_assessment_location",r.SOURCES="ingress",r.JOINT_CONTROLLER_INFO="joint_controller_info",r.LEGAL_BASIS_FOR_PROFILING="legal_basis_for_profiling",r.LEGAL_BASIS_FOR_TRANSFERS="legal_basis_for_transfers",r.LEGITIMATE_INTEREST_DISCLOSURE_URL="legitimate_interest_disclosure_url",r.PROCESSES_PERSONAL_DATA="processes_personal_data",r.REASON_FOR_EXEMPTION="reason_for_exemption",r.REQUIRES_DATA_PROTECTION_ASSESSMENTS="requires_data_protection_assessments",r.RESPONSIBILITY="responsibility",r.RETENTION_PERIOD="retention_period",r.SHARED_CATEGORIES="shared_categories",r.SPECIAL_CATEGORY_LEGAL_BASIS="special_category_legal_basis",r.THIRD_PARTIES="third_parties",r.COOKIES="cookies",r.USES_COOKIES="uses_cookies",r.USES_NON_COOKIE_ACCESS="uses_non_cookie_access",r.USES_PROFILING="uses_profiling",r.SYSTEM_UNDECLARED_DATA_CATEGORIES="system_undeclared_data_categories",r.DATA_USE_UNDECLARED_DATA_CATEGORIES="data_use_undeclared_data_categories",r.PROCESSES_SPECIAL_CATEGORY_DATA="processes_special_category_data",r.SYSTEM_GROUPS="system_groups",r.SYSTEM_GROUP="system_group_fides_key",r.SYSTEM_GROUP_DATA_USES="system_group_data_uses";let p={system_name:"System",data_uses:"Data use",data_categories:"Data categories",data_subjects:"Data subject",legal_name:"Legal name",dpo:"Data privacy officer",legal_basis_for_processing:"Legal basis for processing",administrating_department:"Administrating department",cookie_max_age_seconds:"Cookie max age seconds",privacy_policy:"Privacy policy",legal_address:"Legal address",cookie_refresh:"Cookie refresh",data_security_practices:"Data security practices",data_shared_with_third_parties:"Data shared with third parties",data_stewards:"Data stewards",declaration_name:"Declaration name",does_international_transfers:"Does international transfers",dpa_location:"DPA location",egress:"Destination",exempt_from_privacy_regulations:"Exempt from privacy regulations",features:"Features",fides_key:"Fides key",flexible_legal_basis_for_processing:"Flexible legal basis for processing",impact_assessment_location:"Impact assessment location",ingress:"Source",joint_controller_info:"Joint controller info",legal_basis_for_profiling:"Legal basis for profiling",legal_basis_for_transfers:"Legal basis for transfers",legitimate_interest_disclosure_url:"Legitimate interest disclosure URL",processes_personal_data:"Processes personal data",reason_for_exemption:"Reason for exemption",requires_data_protection_assessments:"Requires data protection assessments",responsibility:"Responsibility",retention_period:"Retention period",shared_categories:"Shared categories",special_category_legal_basis:"Special category legal basis",third_parties:"Third parties",system_undeclared_data_categories:"System undeclared data categories",data_use_undeclared_data_categories:"Data use undeclared data categories",cookies:"Cookies",uses_cookies:"Uses cookies",uses_non_cookie_access:"Uses non-cookie access",uses_profiling:"Uses profiling",processes_special_category_data:"Processes special category data",system_groups:"System groups",system_group_fides_key:"System group",system_group_data_uses:"Data uses"},m={[l.SYSTEM_UNDECLARED_DATA_CATEGORIES]:!1,[l.DATA_USE_UNDECLARED_DATA_CATEGORIES]:!1},E={dataUses:[],dataSubjects:[],dataCategories:[]},S=(0,o.createContext)({}),g=e=>{let{children:t}=e,[a,s]=(0,u._)(i.CUSTOM_REPORT_ID,""),[r,l]=(0,u._)(i.GROUP_BY,_.fI.SYSTEM_DATA_USE),[c,d]=(0,u._)(i.FILTERS,E),[p,g]=(0,u._)(i.COLUMN_ORDER,[]),[h,f]=(0,u._)(i.COLUMN_VISIBILITY,m),[A,T]=(0,u._)(i.COLUMN_SIZING,{}),[x,C]=(0,u._)(i.COLUMN_NAMES,{}),v=(0,o.useMemo)(()=>({savedCustomReportId:a,setSavedCustomReportId:s,groupBy:r,setGroupBy:l,selectedFilters:c,setSelectedFilters:d,columnOrder:p,setColumnOrder:g,columnVisibility:h,setColumnVisibility:f,columnSizing:A,setColumnSizing:T,columnNameMapOverrides:x,setColumnNameMapOverrides:C}),[a,s,r,l,c,d,p,g,h,f,A,T,x,C]);return(0,n.jsx)(S.Provider,{value:v,children:t})},h=()=>{let e=(0,o.useContext)(S);if(!e||0===Object.keys(e).length)throw Error("useDatamapReport must be used within a DatamapReportProvider");return e};var f=a(59003),A=a(92222),T=a(47935),x=a(96306),C=a(34090),v=a(66726),y=a.n(v),R=a(16134),O=a(34929),j=a(14048),b=a(19904),D=a(16394),I=a(38943),P=a(35258),N=e=>{let{children:t,heading:a,onCancel:s,onConfirm:r,isLoading:i,cancelButtonText:l,continueButtonText:o,"data-testid":c="standard-dialog",...d}=e,{onClose:u}=d;return(0,n.jsxs)(x.u_l,{closeOnOverlayClick:i,...d,children:[(0,n.jsx)(x.ZAr,{}),(0,n.jsxs)(x.hzk,{"data-testid":c,children:[a&&(0,n.jsx)(x.xBx,{children:a}),(0,n.jsx)(x.olH,{isDisabled:i,"data-testid":"standard-dialog-close-btn"}),t&&(0,n.jsx)(x.fef,{children:t}),(0,n.jsxs)(x.mzw,{gap:3,width:"100%",sx:{"& button":{width:"100%"}},children:[(0,n.jsx)(x.wpx,{onClick:()=>{s&&s(),u()},"data-testid":"".concat(c?"".concat(c,"-"):"","cancel-btn"),disabled:i,children:l||"Cancel"}),(0,n.jsx)(x.wpx,{onClick:r,type:"primary","data-testid":"".concat(c?"".concat(c,"-"):"","continue-btn"),loading:i,children:o||"Continue"})]})]})]})},M=a(22968),w=e=>{let[t,a]=(0,o.useState)(M.T2.csv),{onConfirm:s}=e;return(0,n.jsx)(N,{heading:"Export report",continueButtonText:"Download",size:"xl",...e,onConfirm:()=>s(t),"data-testid":"export-modal",children:(0,n.jsxs)(x.kCb,{direction:"column",gap:3,pb:3,children:[(0,n.jsx)(x.xvT,{textAlign:"left",children:"Export your data map report using the options below. Depending on the number of rows, the file may take a few minutes to process."}),(0,n.jsxs)(x.NIc,{children:[(0,n.jsx)(x.lXp,{htmlFor:"format",children:"Choose Format"}),(0,n.jsx)(x.WPr,{id:"format",value:t,onChange:a,"data-testid":"export-format-select",options:[{value:M.T2.csv,label:"CSV"},{value:M.T2.xlsx,label:"XLSX"}],className:"w-full"})]})]})})},U=a(624),L=a(30002),k=a(28079),G=a(5785),Y=a(90673);let F=e=>{let{label:t,children:a,...s}=e;return(0,n.jsxs)(x.Qdk,{...s,children:[(0,n.jsx)(x.X6q,{children:(0,n.jsxs)(x.KFZ,{height:"100%","data-testid":"filter-modal-accordion-button",textAlign:"left",fontWeight:600,children:[(0,n.jsx)(x.xuv,{flex:1,children:t}),(0,n.jsx)(x.XEm,{boxSize:7})]})}),(0,n.jsx)(x.Hk3,{children:a})]})},H=e=>{let{columnNameMap:t,selectedFilters:a,onFilterChange:s,onClose:r,...i}=e;(0,k.fd)(),(0,L.te)(),(0,G.MO)();let{dataUses:l,dataSubjects:c,dataCategories:d}=a,u=(0,R.C)(k.U3),_=(0,R.C)(L.ZL),p=(0,R.C)(G.qb),[m,E]=(0,o.useState)(l),[S,g]=(0,o.useState)(c),[h,f]=(0,o.useState)(d);(0,o.useEffect)(()=>{E(l)},[l]),(0,o.useEffect)(()=>{g(c)},[c]),(0,o.useEffect)(()=>{f(d)},[d]);let A=(0,o.useMemo)(()=>(0,Y.Cd)(u),[u]),T=(0,o.useMemo)(()=>(0,Y.Cd)(_),[_]),C=(0,o.useMemo)(()=>(0,Y.Cd)(p),[p]);return(0,n.jsx)(N,{heading:"Filter Datamap Report",...i,onCancel:()=>{E([]),g([]),f([]),s({dataUses:[],dataSubjects:[],dataCategories:[]}),r()},onConfirm:()=>{s({dataUses:m,dataSubjects:S,dataCategories:h}),r()},onClose:r,cancelButtonText:"Reset filters",continueButtonText:"Done","data-testid":"datamap-report-filter-modal",children:(0,n.jsxs)(x.UQy,{allowToggle:!0,children:[(0,n.jsx)(F,{label:t.data_uses,children:(0,n.jsx)(U.ZP,{nodes:A,selected:m,onSelected:E,"data-testid":"filter-modal-checkbox-tree-uses"})}),(0,n.jsx)(F,{label:t.data_categories,children:(0,n.jsx)(U.ZP,{nodes:C,selected:h,onSelected:f,"data-testid":"filter-modal-checkbox-tree-categories"})}),(0,n.jsx)(F,{label:t.data_subjects,children:(0,n.jsx)(U.ZP,{nodes:T,selected:S,onSelected:g,"data-testid":"filter-modal-checkbox-tree-subjects"})})]})})};var V=a(32885),z=a(69353),B=a(812);let{useGetMinimalCustomReportsQuery:Z,useLazyGetCustomReportByIdQuery:q,usePostCustomReportMutation:W,useDeleteCustomReportMutation:X}=a(78780).u.injectEndpoints({endpoints:e=>({getMinimalCustomReports:e.query({query:e=>{let{pageIndex:t=1,pageSize:a=50,report_type:s=_.C2.DATAMAP}=e,r="page=".concat(t,"&size=").concat(a,"&report_type=").concat(s);return{url:"plus/custom-report/minimal?".concat(r)}},providesTags:["Custom Reports"]}),getCustomReportById:e.query({query:e=>({url:"plus/custom-report/".concat(e)}),providesTags:(e,t,a)=>[{type:"Custom Reports",id:a}]}),postCustomReport:e.mutation({query:e=>({method:"POST",url:"plus/custom-report",body:e}),invalidatesTags:["Custom Reports"]}),deleteCustomReport:e.mutation({query:e=>({method:"DELETE",url:"plus/custom-report/".concat(e)}),invalidatesTags:["Custom Reports"]})})});var J=a(55484),K=a(40324);let Q="Report name",$=e=>{let{isOpen:t,handleClose:a,tableStateToSave:s,columnMapToSave:r={},unavailableNames:i,onCreateCustomReport:l}=e,c=(0,x.pmc)(),[d]=W(),u=(0,o.useMemo)(()=>J.Ry().shape({reportName:J.Z_().label(Q).required("Please provide a name for this report").test("is-unique","",async(e,t)=>null==i||!i.includes(e)||t.createError({message:"This name already exists"})).max(80,"Report name is too long (max 80 characters)")}),[i]),p=async e=>{var t;let i={};Object.entries(r).forEach(e=>{let[t,a]=e;i[t]={label:a,enabled:!0}}),Object.entries(null!==(t=null==s?void 0:s.columnVisibility)&&void 0!==t?t:{}).forEach(e=>{let[t,a]=e;i[t]||(i[t]={}),i[t].enabled=a});try{let t={name:e.trim(),type:_.C2.DATAMAP,config:{column_map:i,table_state:s}},r=await d(t);if((0,B.D4)(r))throw r.error;l(r.data),a()}catch(e){c({status:"error",description:(0,B.e$)(e,"A problem occurred while creating the report.")})}};return(0,n.jsxs)(x.u_l,{size:"lg",isOpen:t,onClose:a,motionPreset:"none",children:[(0,n.jsx)(x.ZAr,{}),(0,n.jsxs)(x.hzk,{children:[(0,n.jsx)(x.xBx,{pb:0,children:"Create a report"}),(0,n.jsx)(C.J9,{initialValues:{reportName:""},onSubmit:e=>p(e.reportName),onReset:a,validateOnBlur:!1,validationSchema:u,children:e=>{let{dirty:t,isValid:a}=e;return(0,n.jsxs)(C.l0,{"data-testid":"custom-report-form",children:[(0,n.jsxs)(x.fef,{children:[(0,n.jsx)(x.xvT,{fontSize:"sm",color:"gray.600",pb:6,children:"Customize and save your current filter settings for easy access in the future. This saved report will include the column layout and currently applied filter settings."}),(0,n.jsx)(K.j0,{id:"reportName",name:"reportName",isRequired:!0,label:Q,placeholder:"Enter a name for the report...",variant:"stacked",maxLength:80})]}),(0,n.jsxs)(x.mzw,{gap:2,children:[(0,n.jsx)(x.wpx,{size:"small",htmlType:"reset",children:"Cancel"}),(0,n.jsx)(x.wpx,{size:"small",disabled:!t||!a,type:"primary","data-testid":"custom-report-form-submit",htmlType:"submit",children:"Save"})]})]})}})]})]})},ee="Report",et="Reports",ea=e=>{var t;let{reportType:a,savedReportId:s,tableStateToSave:r,currentColumnMap:i,onCustomReportSaved:l,onSavedReportDeleted:c}=e,d=(0,b.Tg)([_.Sh.CUSTOM_REPORT_CREATE]),u=(0,b.Tg)([_.Sh.CUSTOM_REPORT_DELETE]),p=(0,x.pmc)({id:"custom-report-toast"}),{data:m,isLoading:E}=Z({report_type:a}),[S,g]=(0,o.useState)(),[h]=q(),[f]=X(),{isOpen:A,onOpen:T,onClose:v}=(0,x.qY0)(),{isOpen:y,onOpen:R,onClose:O}=(0,x.qY0)(),{isOpen:j,onOpen:D,onClose:I}=(0,x.qY0)(),[P,N]=(0,o.useState)(),[M,w]=(0,o.useState)(),[U,L]=(0,o.useState)(),[k,G]=(0,o.useState)(!1),{resetForm:Y}=(0,C.u6)(),F=(0,o.useMemo)(()=>{var e;let t=null==m?void 0:null===(e=m.items.find(e=>e.id===s))||void 0===e?void 0:e.name;return null!=t?t:et},[null==m?void 0:m.items,s]),H=!E&&!(null==m?void 0:null===(t=m.items)||void 0===t?void 0:t.length),V=e=>{g(null==m?void 0:m.items.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))},z=async e=>{N(e);let{data:t,isError:a,error:s}=await h(e);if(a){let e=(0,B.e$)(s,"A problem occurred while fetching the ".concat(ee,"."));e.includes("not found")&&c(),p({status:"error",description:e})}else w(t)},W=()=>{N(""),w(void 0),G(!1)},J=()=>{M?(G(!1),M.id!==s&&l(M,Y),v()):P?G(!0):(l(null,Y),v())},K=async e=>{e===(null==M?void 0:M.id)&&(W(),c()),f(e)};(0,o.useEffect)(()=>{m&&g(m.items)},[m]),(0,o.useEffect)(()=>{k&&(G(!1),J())},[M]),(0,o.useEffect)(()=>{s?z(s):W()},[s]),(0,o.useEffect)(()=>{U&&D()},[D,U]);let Q=!M&&!s||(null==M?void 0:M.id)===s,ea=(0,n.jsx)("div",{"data-testid":"custom-reports-popover",children:(0,n.jsx)(C.J9,{initialValues:{},onSubmit:J,onReset:W,children:(0,n.jsxs)(C.l0,{children:[(0,n.jsxs)("div",{className:"relative p-3",style:{borderBottom:"var(--ant-popover-title-border-bottom)"},children:[(0,n.jsx)(x.wpx,{size:"small",disabled:H,htmlType:"reset",className:"absolute left-3 top-3","data-testid":"custom-reports-reset-button",children:"Reset"}),(0,n.jsx)(x.wpx,{type:"text",size:"small",icon:(0,n.jsx)(x.PJP.x8P,{}),className:"absolute right-3 top-3",onClick:()=>{s?z(s):W(),v()},"data-testid":"custom-report-popover-cancel"}),(0,n.jsx)("div",{className:"text-center",style:{color:"var(--ant-color-text-heading)",fontWeight:"var(--ant-font-weight-strong)"},children:et}),(0,n.jsx)("div",{className:"mt-3",children:(0,n.jsx)(x.uFc,{size:"small",placeholder:"Search...",onChange:e=>V(e.target.value)})})]}),(0,n.jsxs)("div",{className:"px-5 pb-1 pt-3",children:[H&&(0,n.jsx)(x.oj8,{image:(0,n.jsx)(x.wpx,{type:"primary",shape:"circle",size:"small","aria-label":"add ".concat(ee),icon:(0,n.jsx)(x.PJP.mm_,{}),onClick:R,"data-testid":"add-report-button"}),description:"No ".concat(et.toLowerCase()," have been created. Start by applying your preferred filter and column settings, then create a ").concat(ee.toLowerCase()," for easy access later."),styles:{image:{height:"24px"}},"data-testid":"custom-reports-empty-state"}),!H&&(E?(0,n.jsx)(x.N_L,{active:!0,paragraph:{rows:3,width:"100%"},title:!1,className:"pt-2"}):(0,n.jsx)(x.y02.Group,{onChange:e=>z(e.target.value),value:P,style:{width:"100%"},children:(0,n.jsx)(x.vyj,{direction:"vertical",className:"w-full",size:"small",children:null==S?void 0:S.map(e=>(0,n.jsxs)(x.jqI,{justify:u?"space-between":"flex-start",align:"center",children:[(0,n.jsx)(x.y02,{value:e.id,name:"custom-report-id","data-testid":"custom-report-item",children:e.name}),u&&(0,n.jsx)(x.wpx,{type:"text",size:"small",icon:(0,n.jsx)(x.PJP.ZNm,{}),onClick:()=>L(e),"data-testid":"delete-report-button"})]},e.id))})}))]}),(0,n.jsxs)(x.jqI,{className:"px-5 py-4",gap:"small",children:[d&&r&&(0,n.jsxs)(x.wpx,{size:"small",onClick:R,className:"flex-1 gap-1 pl-0","data-testid":"create-report-button",htmlType:"button",icon:(0,n.jsx)(x.PJP.mm_,{}),iconPosition:"start",children:["Create ",ee.toLowerCase()]}),(0,n.jsx)(x.wpx,{size:"small",type:"primary",loading:k,disabled:Q,className:"flex-1","data-testid":"apply-report-button",htmlType:"submit",children:"Apply"})]})]})})});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(x.bPF,{content:ea,trigger:"click",placement:"bottomRight",open:A,onOpenChange:e=>{e?T():J()},styles:{root:{width:"320px","--ant-popover-inner-content-padding":"0"}},zIndex:1400,children:(0,n.jsx)(x.wpx,{className:"max-w-40",icon:(0,n.jsx)(x.v4q,{}),iconPosition:"end","data-testid":"custom-reports-trigger",children:(0,n.jsx)(x.lKn,{ellipsis:!0,children:F})})}),(0,n.jsx)($,{isOpen:y,handleClose:()=>{O(),setTimeout(()=>{T()},100)},tableStateToSave:r,columnMapToSave:i,unavailableNames:null==m?void 0:m.items.map(e=>e.name),onCreateCustomReport:e=>l(e,Y)}),(0,n.jsx)(x.cVQ,{isOpen:j,onClose:()=>{L(void 0),I()},onConfirm:()=>{U&&K(U.id),I()},title:"Delete ".concat(ee),message:(0,n.jsxs)(x.lKn,{children:["You are about to permanently delete the"," ",ee.toLowerCase()," named"," ",(0,n.jsx)("strong",{children:null==U?void 0:U.name}),". Are you sure you would like to continue?"]})})]})};var es=a(19785),er=a.n(es),ei=a(55807),el=a.n(ei),en=a(32526),eo=a.n(en),ec=a(26070),ed=a(72625),eu=a(43862),e_=a(22583);let ep=(0,A.Cl)(),em=(e,t)=>({cell:e=>(0,n.jsx)(T.G3,{value:e.getValue()}),header:a=>{let s={};return Object.keys(e).forEach(t=>{"string"==typeof e[t]?s[t]=e[t]:e[t].label&&(s[t]=e[t].label||"")}),(0,n.jsx)(ed.Hm,{value:(0,eu.AH)({columnId:a.column.id,columnNameMap:s}),defaultValue:p[a.column.id]||(0,eu.AH)({columnId:a.column.id}),isEditing:t,...a})}}),eE=(e,t)=>{var a;let s=(null==e?void 0:null===(a=e.items)||void 0===a?void 0:a.length)?Object.keys(e.items[0]):[],r=Object.values(l);return s.filter(e=>!r.includes(e)).filter(e=>e.startsWith("privacy_declaration_")||e.startsWith("system_")).map(e=>{let a=t.find(t=>e.includes(eo()(t.name)));return ep.accessor(t=>t[e],{id:e,cell:e=>Array.isArray(e.getValue())?(0,n.jsx)(T.WP,{value:e.getValue(),ignoreZero:!0,...e}):(0,n.jsx)(T.G3,{value:e.getValue()}),meta:{showHeaderMenu:(null==a?void 0:a.field_type)==="string[]"}})})},eS=e=>{let{onSelectRow:t,getDataUseDisplayName:a,getDataCategoryDisplayName:s,getDataSubjectDisplayName:r,datamapReport:i,customFields:o,systemGroups:c=[],isRenaming:d=!1,groupBy:u}=e,p=eE(i,o),m=e=>{let t=c.find(t=>t.fides_key===e);return(null==t?void 0:t.label_color)?e_.j[t.label_color]:void 0},E=e=>{if(e&&0!==e.length&&1===e.length)return m(e[0])},S=[ep.accessor(e=>e.system_name,{enableGrouping:!0,id:l.SYSTEM_NAME,meta:{onCellClick:t}}),ep.accessor(e=>e.data_uses,{id:l.DATA_USE,cell:e=>{let t=e.getValue();return(0,n.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?el()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto"}}),ep.accessor(e=>e.data_categories,{id:l.DATA_CATEGORY,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_subjects,{id:l.DATA_SUBJECT,cell:e=>{let t=e.getValue();return(0,n.jsx)(T.WP,{suffix:"data subjects",ignoreZero:!0,value:er()(t)?el()(t,r):r(t||""),tagProps:{color:"white"},...e})},meta:{showHeaderMenu:!d}}),ep.accessor(e=>e.legal_name,{id:l.LEGAL_NAME}),ep.accessor(e=>e.dpo,{id:l.DPO}),ep.accessor(e=>e.legal_basis_for_processing,{id:l.LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.administrating_department,{id:l.ADMINISTRATING_DEPARTMENT}),ep.accessor(e=>e.cookie_max_age_seconds,{id:l.COOKIE_MAX_AGE_SECONDS}),ep.accessor(e=>e.privacy_policy,{id:l.PRIVACY_POLICY}),ep.accessor(e=>e.legal_address,{id:l.LEGAL_ADDRESS}),ep.accessor(e=>e.cookie_refresh,{id:l.COOKIE_REFRESH}),ep.accessor(e=>e.data_security_practices,{id:l.DATA_SECURITY_PRACTICES}),ep.accessor(e=>e.data_shared_with_third_parties,{id:l.DATA_SHARED_WITH_THIRD_PARTIES}),ep.accessor(e=>e.processes_special_category_data,{id:l.PROCESSES_SPECIAL_CATEGORY_DATA}),ep.accessor(e=>e.data_stewards,{id:l.DATA_STEWARDS,cell:e=>(0,n.jsx)(T.WP,{suffix:"data stewards",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.declaration_name,{id:l.DECLARATION_NAME}),ep.accessor(e=>e.does_international_transfers,{id:l.DOES_INTERNATIONAL_TRANSFERS}),ep.accessor(e=>e.dpa_location,{id:l.DPA_LOCATION}),ep.accessor(e=>e.egress,{id:l.DESTINATIONS,cell:e=>(0,n.jsx)(T.WP,{suffix:"destinations",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.exempt_from_privacy_regulations,{id:l.EXEMPT_FROM_PRIVACY_REGULATIONS}),ep.accessor(e=>e.features,{id:l.FEATURES,cell:e=>(0,n.jsx)(T.WP,{suffix:"features",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.fides_key,{id:l.FIDES_KEY}),ep.accessor(e=>e.flexible_legal_basis_for_processing,{id:l.FLEXIBLE_LEGAL_BASIS_FOR_PROCESSING}),ep.accessor(e=>e.impact_assessment_location,{id:l.IMPACT_ASSESSMENT_LOCATION}),ep.accessor(e=>e.ingress,{id:l.SOURCES,cell:e=>(0,n.jsx)(T.WP,{suffix:"sources",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.joint_controller_info,{id:l.JOINT_CONTROLLER_INFO}),ep.accessor(e=>e.legal_basis_for_profiling,{id:l.LEGAL_BASIS_FOR_PROFILING,cell:e=>(0,n.jsx)(T.WP,{suffix:"profiles",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legal_basis_for_transfers,{id:l.LEGAL_BASIS_FOR_TRANSFERS,cell:e=>(0,n.jsx)(T.WP,{suffix:"transfers",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.legitimate_interest_disclosure_url,{id:l.LEGITIMATE_INTEREST_DISCLOSURE_URL}),ep.accessor(e=>e.processes_personal_data,{id:l.PROCESSES_PERSONAL_DATA}),ep.accessor(e=>e.reason_for_exemption,{id:l.REASON_FOR_EXEMPTION}),ep.accessor(e=>e.requires_data_protection_assessments,{id:l.REQUIRES_DATA_PROTECTION_ASSESSMENTS}),ep.accessor(e=>e.responsibility,{id:l.RESPONSIBILITY,cell:e=>(0,n.jsx)(T.WP,{suffix:"responsibilities",ignoreZero:!0,value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.retention_period,{id:l.RETENTION_PERIOD}),ep.accessor(e=>e.shared_categories,{id:l.SHARED_CATEGORIES,cell:e=>(0,n.jsx)(T.WP,{suffix:"shared categories",ignoreZero:!0,value:e.getValue(),tagProps:{color:"white"},...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.special_category_legal_basis,{id:l.SPECIAL_CATEGORY_LEGAL_BASIS}),ep.accessor(e=>e.third_parties,{id:l.THIRD_PARTIES}),ep.accessor(e=>e.system_undeclared_data_categories,{id:l.SYSTEM_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.data_use_undeclared_data_categories,{id:l.DATA_USE_UNDECLARED_DATA_CATEGORIES,cell:e=>{let t=e.getValue();if(!t||0===t.length)return null;let a=er()(t)?t.map(e=>({label:s(e),key:e})):[{label:s(t),key:t}];return(0,n.jsx)(ed.mb,{values:a,cellProps:e})},meta:{showHeaderMenu:!d,showHeaderMenuWrapOption:!0,width:"auto",overflow:"hidden"}}),ep.accessor(e=>e.cookies,{id:l.COOKIES,cell:e=>(0,n.jsx)(T.WP,{ignoreZero:!0,suffix:"cookies",value:e.getValue(),...e}),meta:{showHeaderMenu:!d,width:"auto"}}),ep.accessor(e=>e.uses_cookies,{id:l.USES_COOKIES}),ep.accessor(e=>e.uses_non_cookie_access,{id:l.USES_NON_COOKIE_ACCESS}),ep.accessor(e=>e.uses_profiling,{id:l.USES_PROFILING}),ep.accessor(e=>e.system_groups,{id:l.SYSTEM_GROUPS,cell:e=>{let t=e.getValue();if(!t||Array.isArray(t)&&0===t.length)return null;let a=(Array.isArray(t)?t:[t]).map(e=>{let t=c.find(t=>t.fides_key===e);return{label:(null==t?void 0:t.name)||e,key:e,tagProps:{color:(null==t?void 0:t.label_color)?e_.j[t.label_color]:"default",bordered:!1}}});return(0,n.jsx)(ec.Q,{values:a})},meta:{width:"auto"}}),...p],g=[];return u===_.fI.SYSTEM_GROUP&&g.push(ep.accessor(e=>e.system_group_fides_key,{id:l.SYSTEM_GROUP,cell:e=>{var t;let a=e.getValue();if(!a||Array.isArray(a)&&0===a.length)return null;let s=Array.isArray(a)?a.map(e=>{var t;return(null===(t=c.find(t=>t.fides_key===e))||void 0===t?void 0:t.name)||e}):[(null===(t=c.find(e=>e.fides_key===a))||void 0===t?void 0:t.name)||a],r=E(Array.isArray(a)?a:[a]);return(0,n.jsx)(T.WP,{suffix:"system group",ignoreZero:!0,value:s,tagProps:{color:r||"white",bordered:!1},...e})},meta:{width:"auto",showHeaderMenu:!d}}),ep.accessor(e=>e.system_group_data_uses,{id:l.SYSTEM_GROUP_DATA_USES,cell:e=>{let t=e.getValue();return!t||Array.isArray(t)&&0===t.length?null:(0,n.jsx)(T.WP,{suffix:"data uses",ignoreZero:!0,value:er()(t)?el()(t,a):a(t||""),tagProps:{color:"white"},...e})},meta:{width:"auto",showHeaderMenu:!d}})),[...S,...g]},eg=e=>{let{columnNameMapOverrides:t,setColumnNameMapOverrides:a,setSavedCustomReportId:s,setIsRenamingColumns:r}=e,{submitForm:i,resetForm:l}=(0,C.u6)();return(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-reset-btn",onClick:()=>{a({}),s(""),l({values:{}}),r(!1)},children:"Reset all"}),(0,n.jsx)(x.wpx,{size:"small","data-testid":"rename-columns-cancel-btn",onClick:()=>{l({values:t}),r(!1)},children:"Cancel"}),(0,n.jsx)(x.wpx,{size:"small",type:"primary",htmlType:"submit","data-testid":"rename-columns-apply-btn",onClick:i,children:"Apply"})]})},eh=e=>{switch(e){case _.fI.DATA_USE_SYSTEM:return[l.DATA_USE];case _.fI.SYSTEM_GROUP:return[l.SYSTEM_GROUP];default:return[l.SYSTEM_NAME]}},ef=e=>{let t=[];return _.fI.SYSTEM_DATA_USE===e&&(t=[l.SYSTEM_NAME,l.DATA_USE]),_.fI.DATA_USE_SYSTEM===e&&(t=[l.DATA_USE,l.SYSTEM_NAME]),_.fI.SYSTEM_GROUP===e&&(t=[l.SYSTEM_GROUP,l.SYSTEM_GROUP_DATA_USES,l.SYSTEM_NAME,l.DATA_USE]),t},eA=(e,t)=>{let a=ef(e),s=new Set(a);return[...a,...t.filter(e=>!s.has(e))]},eT={items:[],total:0,page:1,size:25,pages:1},ex=()=>{let e=(0,b.Tg)([_.Sh.CUSTOM_REPORT_READ]),{isLoading:t}=(0,V.x8)(),{data:a}=(0,z.QD)(),{PAGE_SIZES:s,pageSize:r,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u,onNextPageClick:S,isNextPageDisabled:g,startRange:v,endRange:N,pageIndex:M,setTotalPages:U,resetPageIndexToDefault:L}=(0,T.oi)(),k=(0,x.pmc)({id:"datamap-report-toast"}),{isOpen:G,onClose:Y,onOpen:F}=(0,x.qY0)(),{getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,isLoading:W}=(0,O.Z)(),[X,J]=(0,o.useState)(),{savedCustomReportId:K,setSavedCustomReportId:Q,groupBy:$,setGroupBy:ee,selectedFilters:et,setSelectedFilters:es,columnOrder:er,setColumnOrder:ei,columnVisibility:el,setColumnVisibility:en,columnSizing:eo,setColumnSizing:ec,columnNameMapOverrides:ed,setColumnNameMapOverrides:eu}=h(),[e_,ep]=(0,o.useState)(!1),eE=e=>{Q(""),ee(e),ep(!0),L()},[ex,eC]=(0,o.useState)(""),ev=(0,o.useCallback)(e=>{L(),eC(e)},[L,eC]),ey={pageIndex:M,pageSize:r,groupBy:$,search:ex,dataUses:(0,D.du)(et.dataUses,"data_uses"),dataSubjects:(0,D.du)(et.dataSubjects,"data_subjects"),dataCategories:(0,D.du)(et.dataCategories,"data_categories")},{data:eR,isLoading:eO,isFetching:ej}=(0,I.tH)(ey),[eb,{isLoading:eD,isError:eI}]=(0,I.Eo)(),{data:eP,totalRows:eN}=(0,o.useMemo)(()=>{let e=eR||eT,t=e.items;return e_&&ep(!1),U(e.pages),{totalRows:e.total,data:t}},[eR]);(0,V.GH)();let eM=(0,R.C)(V.fN),[ew,eU]=(0,o.useState)(!1),eL=(0,o.useMemo)(()=>eR?eS({onSelectRow:e=>J(e.fides_key),getDataUseDisplayName:B,getDataCategoryDisplayName:Z,getDataSubjectDisplayName:q,datamapReport:eR,customFields:eM,systemGroups:a,isRenaming:ew,groupBy:$}):[],[B,q,Z,eR,eM,a,ew,$]),{isOpen:ek,onOpen:eG,onClose:eY}=(0,x.qY0)(),{isOpen:eF,onOpen:eH,onClose:eV}=(0,x.qY0)(),ez=(0,f.b7)({getCoreRowModel:(0,A.sC)(),getGroupedRowModel:(0,A.qe)(),getExpandedRowModel:(0,A.rV)(),manualPagination:!0,enableColumnResizing:!0,columnResizeMode:"onChange",columns:eL,defaultColumn:em({...p,...ed},ew),data:eP,initialState:{expanded:!0,columnSizing:eo,columnOrder:er,columnVisibility:el,grouping:eh($)}});(0,o.useEffect)(()=>{$&&ez&&eR&&(0===ez.getState().columnOrder.length?ei(eA($,ez.getAllColumns().map(e=>e.id))):ei(eA($,ez.getState().columnOrder)))},[$,ez,eR]),(0,o.useEffect)(()=>{let e=eh($);eR&&ez.setGrouping(e)},[eR]);let eB=(0,o.useMemo)(()=>y()(ec,300),[ec]);(0,o.useEffect)(()=>{let e=ez.getState().columnSizing;e&&eB(e)},[ez.getState().columnSizing]);let eZ=()=>ed[l.SYSTEM_GROUP]||a&&a.length>0&&a[0].name||"System group",eq=(e,t)=>{if(e||K){if(!e){try{Q(""),en(m),ez.toggleAllColumnsVisible(!0),ez.setColumnVisibility(m),ei([]),ez.setColumnOrder([]),ee(_.fI.SYSTEM_DATA_USE),es(E),eu({}),t({values:{}})}catch(e){k({status:"error",description:"There was a problem resetting the report."})}return}try{var a,s,r,i;if(null===(a=e.config)||void 0===a?void 0:a.table_state){let{groupBy:t,filters:a,columnOrder:s}=e.config.table_state,i={};Object.entries(null!==(r=e.config.column_map)&&void 0!==r?r:{}).forEach(e=>{let[t,a]=e;i[t]=a.enabled||!1}),t&&ee(t),a&&es(a),s&&(ei(s),ez.setColumnOrder(s)),i&&(en(i),ez.setColumnVisibility(i))}if(null===(s=e.config)||void 0===s?void 0:s.column_map){let a={};Object.entries(null!==(i=e.config.column_map)&&void 0!==i?i:{}).forEach(e=>{let[t,s]=e;s.label&&(a[t]=s.label)}),eu(a),t({values:a})}Q(e.id),k({status:"success",description:"Report applied successfully."})}catch(e){k({status:"error",description:"There was a problem applying report."})}}};return eO||t||W?(0,n.jsx)(T.I4,{rowHeight:36,numRows:15}):(0,n.jsxs)(x.kCb,{flex:1,direction:"column",overflow:"auto",children:[(0,n.jsx)(H,{columnNameMap:{...p,...ed},selectedFilters:et,isOpen:G,onClose:Y,onFilterChange:e=>{Q(""),es(e)}}),(0,n.jsx)(T.F1,{isOpen:ek,onClose:eY,headerText:"Columns",columnNameMap:{...p,...ed},prefixColumns:ef($),tableInstance:ez,savedCustomReportId:K,onColumnOrderChange:e=>{Q(""),ez.setColumnOrder(e),ei(e)},onColumnVisibilityChange:e=>{Q(""),ez.setColumnVisibility(e),en(e)}}),(0,n.jsx)(w,{isOpen:eF,onClose:eV,onConfirm:e=>{let t={};Object.entries(el).forEach(e=>{let[a,s]=e;t[a]={enabled:s}}),Object.entries(ed).forEach(e=>{let[a,s]=e;if(t[a])t[a].label=s;else{var r;t[a]={label:s,enabled:null===(r=el[a])||void 0===r||r}}}),eb({...ey,format:e,report_id:K,report:{name:"",type:"datamap",config:{column_map:t,table_state:{groupBy:$,filters:et,columnOrder:er}}}}).then(()=>{eI||eV()})},isLoading:eD}),(0,n.jsx)(C.J9,{initialValues:ed,onSubmit:e=>{Q(""),eu(e),eU(!1)},children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(T.Q$,{children:[(0,n.jsx)(T.HO,{globalFilter:ex,setGlobalFilter:ev,placeholder:"System name, Fides key, or ID"}),(0,n.jsxs)(x.kCb,{alignItems:"center",gap:2,children:[e&&(0,n.jsx)(ea,{reportType:_.C2.DATAMAP,savedReportId:K,tableStateToSave:{groupBy:$,filters:et,columnOrder:er,columnVisibility:el},currentColumnMap:ed,onCustomReportSaved:(e,t)=>eq(e,t),onSavedReportDeleted:()=>{Q("")}}),(0,n.jsxs)(x.v2r,{children:[(0,n.jsxs)(x.j2t,{as:x.wpx,icon:(0,n.jsx)(x.v4q,{}),iconPosition:"end",loading:e_,"data-testid":"group-by-menu",children:["Group by ",(()=>{switch($){case _.fI.SYSTEM_DATA_USE:return"system";case _.fI.DATA_USE_SYSTEM:return"data use";case _.fI.SYSTEM_GROUP:{let e=eZ();return e.charAt(0).toLowerCase()+e.slice(1)}default:return"system"}})()]}),(0,n.jsxs)(x.qyq,{zIndex:11,"data-testid":"group-by-menu-list",children:[(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_DATA_USE)},isChecked:_.fI.SYSTEM_DATA_USE===$,value:_.fI.SYSTEM_DATA_USE,"data-testid":"group-by-system-data-use",children:"System"}),(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.DATA_USE_SYSTEM)},isChecked:_.fI.DATA_USE_SYSTEM===$,value:_.fI.DATA_USE_SYSTEM,"data-testid":"group-by-data-use-system",children:"Data use"}),(0,n.jsx)(x.iiZ,{onClick:()=>{eE(_.fI.SYSTEM_GROUP)},isChecked:_.fI.SYSTEM_GROUP===$,value:_.fI.SYSTEM_GROUP,"data-testid":"group-by-system-group",children:eZ()})]})]}),(0,n.jsx)(x.wpx,{"data-testid":"filter-multiple-systems-btn",onClick:F,children:"Filter"}),(0,n.jsx)(x.wpx,{"aria-label":"Export report","data-testid":"export-btn",onClick:eH,icon:(0,n.jsx)(j.nM,{ml:"1.5px"})}),(0,n.jsxs)(x.v2r,{placement:"bottom-end",children:[(0,n.jsx)(x.j2t,{as:x.wpx,icon:(0,n.jsx)(x.nXP,{className:"rotate-90"}),"data-testid":"more-menu","aria-label":"More options",className:"w-6 gap-0"}),(0,n.jsxs)(x.qyq,{"data-testid":"more-menu-list",children:[(0,n.jsx)(x.sNh,{onClick:eG,"data-testid":"edit-columns-btn",children:"Edit columns"}),(0,n.jsx)(x.sNh,{onClick:()=>eU(!0),"data-testid":"rename-columns-btn",children:"Rename columns"})]})]}),ew&&(0,n.jsx)(eg,{columnNameMapOverrides:ed,setColumnNameMapOverrides:eu,setSavedCustomReportId:Q,setIsRenamingColumns:eU})]})]}),(0,n.jsx)(C.l0,{children:(0,n.jsx)(T.ZK,{tableInstance:ez,columnExpandStorageKey:i.COLUMN_EXPANSION_STATE,columnWrapStorageKey:i.WRAPPING_COLUMNS})})]})}),(0,n.jsx)(T.s8,{totalRows:eN||0,pageSizes:s,setPageSize:c,onPreviousPageClick:d,isPreviousPageDisabled:u||ej,onNextPageClick:S,isNextPageDisabled:g||ej,startRange:v,endRange:N}),(0,n.jsx)(P.Z,{selectedSystemId:X,resetSelectedSystemId:()=>J(void 0)})]})};var eC=()=>(0,n.jsxs)(c.Z,{title:"Datamap Report",children:[(0,n.jsx)(d.Z,{"data-testid":"datamap-report-heading",heading:"Data map report"}),(0,n.jsx)(g,{children:(0,n.jsx)(ex,{})})]})}},function(e){e.O(0,[431,8765,9278,5163,9187,9951,4718,504,2888,9774,179],function(){return e(e.s=86548)}),_N_E=e.O()}]);
|