ethyca-fides 2.70.0rc5__py2.py3-none-any.whl → 2.70.1b0__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.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/METADATA +4 -4
- {ethyca_fides-2.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/RECORD +196 -195
- fides/_version.py +3 -3
- fides/api/api/v1/endpoints/system.py +5 -1
- fides/api/db/crud.py +30 -2
- fides/api/db/safe_crud.py +377 -0
- fides/api/models/policy.py +24 -0
- fides/api/models/privacy_notice.py +1 -1
- fides/api/models/privacy_request/privacy_request.py +62 -0
- fides/api/models/privacy_request/webhook.py +3 -1
- fides/api/schemas/connection_configuration/connection_secrets_mongodb.py +14 -2
- fides/api/service/connectors/mongodb_connector.py +74 -9
- fides/service/system/system_service.py +17 -2
- fides/ui-build/static/admin/404.html +1 -1
- fides/ui-build/static/admin/_next/static/{YDIHw7NCpEulNqL5G--Yh → 6oPWh0EXUTEVS_OTLA_S1}/_buildManifest.js +1 -1
- fides/ui-build/static/admin/_next/static/chunks/155-047c3806cc41295e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/3700-865408b36fbee782.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/{7725-dd6736855807936a.js → 7725-fdc4298dfbea6f80.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/7929-0fd0d4948bc8d70e.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/{_app-e08a732e348aa667.js → _app-91cae6157e6f09b5.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-3ff2fd2570f02f1c.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/{reporting-09be5455ba85db39.js → reporting-ae4909cad9b67822.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-3d03cd31cd99fa07.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/{[monitorId]-0e4d9ff89c63793c.js → [monitorId]-b74dfaf4f4126e57.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/integrations/{[id]-8b13bb5f7bee61c6.js → [id]-9f6c82e14ff2cad2.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/{integrations-6f109ef64304ef59.js → integrations-ebc9c90fe99ee68d.js} +1 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-5b423687e227ad4d.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-916238dcc0596957.js +1 -0
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-616f5a7cbb99e46d.js +1 -0
- fides/ui-build/static/admin/_next/static/css/1866822702989bb3.css +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/chunks/155-88303b05c6e115a5.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/3700-2a7094f112a1608a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/7929-919e2dff24e40397.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-8fb92df30e8d496a.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/action-center/[monitorId]/[systemId]-758d51b4d37dbd09.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/reporting/datamap-0afb12096a35ab78.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/systems-ae3f3470e2734933.js +0 -1
- fides/ui-build/static/admin/_next/static/chunks/pages/taxonomy-1b9c4b2749e3ece4.js +0 -1
- fides/ui-build/static/admin/_next/static/css/018c12b58ee7f861.css +0 -1
- {ethyca_fides-2.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/WHEEL +0 -0
- {ethyca_fides-2.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/entry_points.txt +0 -0
- {ethyca_fides-2.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/licenses/LICENSE +0 -0
- {ethyca_fides-2.70.0rc5.dist-info → ethyca_fides-2.70.1b0.dist-info}/top_level.txt +0 -0
- /fides/ui-build/static/admin/_next/static/{YDIHw7NCpEulNqL5G--Yh → 6oPWh0EXUTEVS_OTLA_S1}/_ssgManifest.js +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1115-7888473b3dc28cda.js → 1115-90baef2a89f361ad.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{1817-ee9e29a6b8c4af50.js → 1817-dbde9966025d7970.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{2040-ab6212a3074f34f9.js → 2040-fdecc41a18e40bdc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3696-c25dc8d1b0e1aee1.js → 3696-90c8b336bbc46782.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{3872-3514b712afd683c0.js → 3872-04d3afbfa41a7782.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{4608-96f480766541124b.js → 4608-63fbb1f4f258a66e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{502-a40d39e615f7b664.js → 502-d3ecae97b67befbd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5185-33f50cf9ae17b42e.js → 5185-51eaa78e3ed6bfb7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5574-b8c4cba5a6938c00.js → 5574-c31ea831371610d5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{5783-8de76df87af55e98.js → 5783-8f5713517ebc35f3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6084-2cd165179c428a6f.js → 6084-dc473a58c3e2889b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6416-18d438ff85d807f8.js → 6416-39d12ffc78833cb1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6882-447f15e87b8c48a5.js → 6882-10296485ec326e6b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{6954-599f2de2c902e9b2.js → 6954-4b24e1731c1cc3b3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7158-835ba42fd881d8dd.js → 7158-04745cc8d684b2e7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7476-0b6e114658b15eaa.js → 7476-c709d0610ebf7e2e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{7630-e7ea13be69c118a1.js → 7630-d0d3a0fe3f95e971.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{796-e07ac2c543f569e3.js → 796-876998c86754da97.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{8002-25fd174aec9b077b.js → 8002-ed832921ad190832.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9226-2f960b7ca530642a.js → 9226-4a7027057f55ca2a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/{9826-c02be5882205bbbc.js → 9826-ccedc28e978ca9e1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{manual-939253f8daf349b2.js → manual-16ecb33f09224fbb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/add-systems/{multiple-83ed7da0bb90b0a5.js → multiple-2ca59996860a33c5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{add-systems-f90aa48500c1cbde.js → add-systems-caff552fce501f82.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/configure/{add-vendors-46b88bda3d7b15c5.js → add-vendors-7a258b7ecd6da4b8.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{configure-c0db068d1863222f.js → configure-259ad2e10fe6f413.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/{privacy-experience-92a337ee96845af2.js → privacy-experience-7e78616b7b048978.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{[id]-1fd2cda8707314f6.js → [id]-9c23fbe813c997d0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices/{new-2987e397445713c5.js → new-0e5e38bbcfe59fd2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{consent-e5a33654a2dfaf35.js → consent-d2bf72508c3cad55.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/[projectUrn]/{[resourceUrn]-293c1f2d9aefb447.js → [resourceUrn]-06a08970907ed3f0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/projects/{[projectUrn]-6a4b0d49dcbf17a8.js → [projectUrn]-4a1af12d2d7cd660.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{projects-be7b385073f22414.js → projects-99573a1ee3ef8f4c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/resources/{[resourceUrn]-18501152fa1e4f40.js → [resourceUrn]-4c84d952bb1db690.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-catalog/[systemId]/{resources-af80fdca3bbdc82f.js → resources-6e429b7511028d60.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{data-catalog-351caadeef03876a.js → data-catalog-56fd0f3e465e52b6.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{action-center-1554afcb8b9da2ab.js → action-center-040813022f0890c9.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/detection/{[resourceUrn]-0497f3ffdb632516.js → [resourceUrn]-844a8de0d1b506e2.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{detection-a780390da99f3e43.js → detection-11b07cf2d91b17ef.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/discovery/{[resourceUrn]-1901c26cdde820da.js → [resourceUrn]-65dc7f5a2ce3eae7.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/data-discovery/{discovery-0cea22af5929c81f.js → discovery-4d378516817cf00b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datamap-619f27c745188adb.js → datamap-4a05303416dcb657.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/[collectionName]/{[...subfieldNames]-ef71f387fbbab425.js → [...subfieldNames]-d4031e438c363fff.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/[datasetId]/{[collectionName]-d790553662caf5c3.js → [collectionName]-9463af37079762d0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{[datasetId]-cb63db8594fe8dc1.js → [datasetId]-60a4a9eb4aab4c11.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/dataset/{new-78e052c8f95110c4.js → new-910e28bce6a98f3d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{dataset-d6d7ee8bd8858a8a.js → dataset-108630926347724e.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{[id]-cc149157d290a94d.js → [id]-5119e6602507157f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/datastore-connection/{new-4c9fb068a5561658.js → new-cda4e7b5b888e17c.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{datastore-connection-a832084ce294f8af.js → datastore-connection-223c2d1ded51bfb1.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{index-269b8f81546dad66.js → index-b74d1e8608ae5b5d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{[id]-d8c5c03fb2f31d65.js → [id]-e8d2140787045acd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/messaging/{add-template-0e0c06e3c8aabe02.js → add-template-e3f93462a08251bf.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{messaging-3f15804cf9625f01.js → messaging-b5f7d6afdecd013d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/poc/{table-migration-e551fccfcaae76e7.js → table-migration-329333a88f3826eb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{[id]-8566e3b7b2a632fa.js → [id]-989c77898de2da75.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/configure/{storage-1b38b656807ed0cd.js → storage-648d775d0fce49dc.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/privacy-requests/{configure-b00532a0ad4f6927.js → configure-8f577df28ebca869.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{privacy-requests-65f0d5672041a202.js → privacy-requests-14a2efa72f0d4d12.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{[id]-322a01e2bceab3fb.js → [id]-57a75c7e9659271a.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/properties/{add-property-777ed2d73812043d.js → add-property-8964c2300206bc89.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{consent-55e36839d219a503.js → consent-1ae1257f5b388924.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{custom-fields-26ce8fc493993765.js → custom-fields-c2f1376aca192114.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domain-records-7ddf9d992fe714a6.js → domain-records-586505df9d853f1f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{domains-7c78ae51f0dd7102.js → domains-a3275554ffe8e640.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{email-templates-05ffbda19ab894b9.js → email-templates-604790638c656fbd.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{locations-77fb85bdd0be42b5.js → locations-be2a885150adc133.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{[key]-b0d93bf478bf63ee.js → [key]-8df31428446a6a96.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/messaging-providers/{new-084f9756b9987285.js → new-af1471bf4571d5d3.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{messaging-providers-6c51ffd46bb598e7.js → messaging-providers-8d92be437793c96f.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{organization-44456bfe54ac4ad5.js → organization-3c86162afe9759df.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{privacy-requests-fbe7e8030d837aed.js → privacy-requests-8cbdfd08e0fa88fb.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/settings/{regulations-2866ac99faa5a542.js → regulations-4fe3b90747d885e5.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/[id]/{test-datasets-a86bafe1b4e1205f.js → test-datasets-2deb6becece69d46.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/systems/configure/{[id]-1895c6a13b543436.js → [id]-589952aa1a31c33d.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/{new-6304dad2c5fab694.js → new-629c88e90699369b.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/user-management/profile/{[id]-ff4711db191099cd.js → [id]-98f737e735eaa0f0.js} +0 -0
- /fides/ui-build/static/admin/_next/static/chunks/pages/{user-management-82fcf1151e2fe2ba.js → user-management-562624e5461083ec.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3700],{30454:function(e,s,t){var a=t(40699);e.exports=function(e){return a(e,5)}},77867:function(e,s,t){"use strict";var a=t(24246),i=t(96306);s.Z=e=>{let{connected:s,...t}=e,n="red.500";return null==s?n="gray.300":s&&(n="green.500"),(0,a.jsx)(i.xuv,{width:"12px",height:"12px",borderRadius:"6px",backgroundColor:n,...t})}},59301:function(e,s,t){"use strict";var a=t(24246);let{Link:i}=t(96306).AntTypography;s.Z=e=>(0,a.jsx)(i,{target:"_blank",rel:"noopener noreferrer",...e})},19904:function(e,s,t){"use strict";t.d(s,{Tg:function(){return r}});var a=t(24246),i=t(16134),n=t(31793);let r=e=>(0,i.C)(n.uu).filter(s=>e.includes(s)).length>0;s.ZP=e=>{let{scopes:s,children:t}=e;return r(s)?(0,a.jsx)(a.Fragment,{children:t}):null}},83099:function(e,s,t){"use strict";var a=t(24246),i=t(79283),n=t(34929);s.Z=e=>{let{selectedTaxonomies:s,showDisabled:t=!1,...r}=e,{getDataUseDisplayNameProps:l,getDataUses:o}=(0,n.Z)(),d=(t?o():o().filter(e=>e.active)).filter(e=>!(null==s?void 0:s.includes(e.fides_key))).map(e=>{let{name:s,primaryName:t}=l(e.fides_key);return{value:e.fides_key,name:s,primaryName:t,description:e.description||""}});return(0,a.jsx)(i.l,{options:d,...r})}},16220:function(e,s,t){"use strict";t.d(s,{V:function(){return n}});var a=t(25980),i=t(77830);let n=()=>({systemOrDatamapRoute:(0,a.hz)().plus?i.oG:i.So})},90111:function(e,s,t){"use strict";var a=t(24246),i=t(96306);s.Z=e=>{let{children:s,...t}=e;return(0,a.jsx)(i.xuv,{p:4,mb:4,border:"1px solid",borderColor:"gray.200",bgColor:"gray.50",borderRadius:"md",...t,children:s})}},44553:function(e,s,t){"use strict";t.d(s,{Z:function(){return g}});var a=t(24246),i=t(96306),n=t(27378),r=t(45277),l=t(16125),o=t(812),d=t(46628),c=t(20682),u=t(54427),p=t(52253),m=t(78780);let{reducer:h}=(0,u.oM)({name:"connectorTemplate",initialState:{},reducers:{}}),{useRegisterConnectorTemplateMutation:x}=m.u.injectEndpoints({endpoints:e=>({registerConnectorTemplate:e.mutation({query:e=>{let s=new FormData;return s.append("file",e),{url:"".concat(p.o4,"/register"),method:"POST",body:s}},invalidatesTags:()=>["Connection Type"]})})});var g=e=>{let{isOpen:s,onClose:t,testId:u="connector-template-modal"}=e,p=(0,l.I0)(),[m,h]=(0,n.useState)(null),g=(0,i.pmc)(),{getRootProps:y,getInputProps:f,isDragActive:_}=(0,r.uI)({onDrop:e=>{var s;if("zip"!==(null===(s=e[0].name.split(".").pop())||void 0===s?void 0:s.toLowerCase())){g((0,d.Vo)("Only zip files are allowed."));return}h(e[0])}}),[b,{isLoading:j}]=x(),{refetch:v}=(0,c.$I)({search:""},{skip:!1}),k=async()=>{if(m)try{var e;await b(m).unwrap(),g((0,d.t5)("Integration template uploaded successfully."));let{data:s}=await v();p((0,c.fP)(null!==(e=null==s?void 0:s.items)&&void 0!==e?e:[])),t()}catch(e){g((0,d.Vo)((0,o.e$)(e)))}finally{h(null)}};return(0,a.jsxs)(i.u_l,{isOpen:s,onClose:t,size:"2xl",children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{textAlign:"left",p:2,"data-testid":u,children:[(0,a.jsx)(i.xBx,{children:"Upload integration template"}),(0,a.jsxs)(i.fef,{children:[(0,a.jsx)(i.xvT,{fontSize:"sm",mb:4,children:"Drag and drop your integration template zip file here, or click to browse your files."}),(0,a.jsxs)(i.xuv,{...y(),bg:_?"gray.100":"gray.50",border:"2px dashed",borderColor:_?"gray.300":"gray.200",borderRadius:"md",cursor:"pointer",minHeight:"150px",display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",children:[(0,a.jsx)("input",{...f()}),m?(0,a.jsx)(i.xvT,{children:m.name}):_?(0,a.jsx)(i.xvT,{children:"Drop the file here..."}):(0,a.jsx)(i.xvT,{children:"Click or drag and drop your file here."})]}),(0,a.jsx)(i.xvT,{fontSize:"sm",mt:4,children:"An integration template zip file must include a SaaS config and dataset, but may also contain an icon (.svg) as an optional file."})]}),(0,a.jsxs)(i.mzw,{className:"flex w-full justify-end gap-2",children:[(0,a.jsx)(i.wpx,{onClick:t,"data-testid":"cancel-btn",disabled:j,children:"Cancel"}),(0,a.jsx)(i.wpx,{type:"primary",htmlType:"submit",disabled:!m||j,onClick:k,"data-testid":"submit-btn",children:"Submit"})]})]})]})}},3765:function(e,s,t){"use strict";var a=t(96306),i=t(812),n=t(46628),r=t(1315),l=t(31883);s.Z=e=>{let s=(0,a.pmc)(),[t]=(0,r.qQ)(),o=t=>!!e.privacy_declarations.find(e=>e.data_use===t.data_use&&e.name===t.name)&&(s((0,n.Vo)("A declaration already exists with that data use in this system. Please supply a different data use.")),!0),d=(e,t)=>{if((0,l.D4)(e)){let t=(0,i.e$)(e.error,"An unexpected error occurred while updating the system. Please try again.");s((0,n.Vo)(t));return}return s.closeAll(),s((0,n.t5)(t?"Data use deleted":"Data use saved")),e.data.privacy_declarations},c=async(s,a)=>{let i=s.map(e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:""}}),n={...e,privacy_declarations:i};return d(await t(n),a)};return{createDataUse:async t=>{if(!o(t))return s.closeAll(),c([...e.privacy_declarations,t])},updateDataUse:async(s,t)=>{if(!(t.id!==s.id&&o(t)))return c(e.privacy_declarations.map(e=>e.id===s.id?t:e))},deleteDataUse:async s=>c(e.privacy_declarations.filter(e=>e.id!==s.id),!0),deleteDeclarationByDataUse:async s=>c(e.privacy_declarations.filter(e=>e.data_use!==s),!0)}}},73183:function(e,s,t){"use strict";var a=t(24246),i=t(96306);t(27378);var n=t(14207);s.Z=e=>{let{connection_key:s,disabled:t,name:r,access_type:l,connection_type:o,isSwitch:d}=e,{isOpen:c,onOpen:u,onClose:p}=(0,i.qY0)(),[m,h]=(0,n.XX)(),x=async()=>{await m({key:s,name:r,disabled:!t,access:l,connection_type:o}),p()},g=()=>{h.isLoading||p()};return(0,a.jsxs)(a.Fragment,{children:[d?(0,a.jsxs)(i.kCb,{justifyContent:"space-between",alignItems:"center",children:[(0,a.jsx)(i.xvT,{fontSize:"sm",children:"Enable integration"}),(0,a.jsx)(i.rAg,{className:"ml-2",checked:!t,onChange:()=>u()})]}):(0,a.jsx)(i.sNh,{_focus:{color:"complimentary.500",bg:"gray.100"},onClick:u,children:(0,a.jsx)(i.xvT,{fontSize:"sm",children:t?"Enable":"Disable"})}),(0,a.jsxs)(i.u_l,{isCentered:!0,isOpen:c,onClose:g,children:[(0,a.jsx)(i.ZAr,{}),(0,a.jsxs)(i.hzk,{children:[(0,a.jsxs)(i.xBx,{children:[t?"Enable":"Disable"," Connection"]}),(0,a.jsx)(i.olH,{}),(0,a.jsx)(i.fef,{pb:6,children:(0,a.jsx)(i.Kqy,{direction:"column",spacing:"15px",children:(0,a.jsxs)(i.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:[t?"Enabling":"Disabling"," a connection may impact any privacy request that is currently in progress. Do you wish to proceed?"]})})}),(0,a.jsxs)(i.mzw,{className:"flex gap-4",children:[(0,a.jsx)(i.wpx,{onClick:g,className:"w-1/2",children:"Cancel"}),(0,a.jsxs)(i.wpx,{onClick:x,loading:h.isLoading,className:"w-1/2",children:[t?"Enable":"Disable"," Connection"]})]})]})]})]})}},8627:function(e,s,t){"use strict";t.d(s,{s:function(){return l}});var a=t(24246),i=t(96306),n=t(77867),r=t(16394);let l=e=>{let{succeeded:s,timestamp:t}=e,l=t?(0,r.p6)(t):"";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.Z,{connected:s}),(0,a.jsx)(i.xvT,{color:"gray.500",fontSize:"xs",fontWeight:"semibold",lineHeight:"16px",ml:"10px",children:t?"Last tested on ".concat(l):"This connection has not been tested yet"})]})}},27259:function(e,s,t){"use strict";var a=t(24246),i=t(96306),n=t(34090);s.Z=e=>{let{disabled:s=!1,isRequired:t=!1,label:r,placeholder:l,type:o="text",...d}=e,{id:c,autoFocus:u}=d,[p,m]=(0,n.U$)(d);return(0,a.jsxs)(i.NIc,{display:"flex",isRequired:t,isInvalid:!!(m.error&&m.touched),children:[r&&(0,a.jsx)(i.lXp,{color:"gray.900",fontSize:"14px",fontWeight:"semibold",htmlFor:c,minWidth:"150px",children:r}),(0,a.jsxs)(i.gCW,{align:"flex-start",w:"inherit",children:["number"===o&&(0,a.jsxs)(i.Y2U,{allowMouseWheel:!0,color:"gray.700",defaultValue:0,min:0,size:"sm",children:[(0,a.jsx)(i.zuI,{...p,autoComplete:"off",autoFocus:u}),(0,a.jsxs)(i.FiK,{children:[(0,a.jsx)(i.WQu,{}),(0,a.jsx)(i.Y_d,{})]})]}),"text"===o&&(0,a.jsx)(i.IIB,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",isDisabled:s,placeholder:l,size:"sm"}),"textarea"===o&&(0,a.jsx)(i.gxH,{...p,autoComplete:"off",autoFocus:u,color:"gray.700",placeholder:l,resize:"none",size:"sm",value:p.value||""}),(0,a.jsx)(i.J1D,{children:m.error})]})]})}},72774:function(e,s,t){"use strict";t.d(s,{Z:function(){return r}});var a=t(24246),i=t(96306),n=e=>{let{title:s,description:t,button:n}=e;return(0,a.jsxs)(i.Ugi,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.400",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:[(0,a.jsx)(i.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,a.jsxs)(i.xuv,{flexGrow:1,children:[(0,a.jsx)(i.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,a.jsx)(i.xvT,{fontSize:"sm",color:"gray.600",lineHeight:"5",children:t})]}),n]})},r=()=>(0,a.jsx)(i.xuv,{mb:"6",maxW:"720px","data-testid":"locked-for-GVL-notice",children:(0,a.jsx)(n,{title:"This system is part of the TCF Global Vendor List (GVL)",description:(0,a.jsxs)(a.Fragment,{children:["As a result, certain fields are not editable as they come directly from Fides Compass and the Global Vendor List (GVL). In some cases, where the legal basis has been declared to be flexible, you may update the legal basis for particular data uses."," ",(0,a.jsx)(i.rUS,{href:"https://fid.es/tcf_gvl",isExternal:!0,color:"complimentary.500",children:"For more information on the Global Vendor List, click here."})]})})})},69525:function(e,s,t){"use strict";t.d(s,{U:function(){return a}});let a=e=>{let s=e.data_categories.flatMap(e=>e.split(","));return{data_use:e.data_use,data_categories:s,features:e.features,legal_basis_for_processing:e.legal_basis_for_processing,flexible_legal_basis_for_processing:e.flexible_legal_basis_for_processing,retention_period:e.retention_period?e.retention_period:""}}},21103:function(e,s,t){"use strict";t.d(s,{Z:function(){return sQ}});var a,i,n,r,l=t(24246),o=t(96306),d=t(79894),c=t.n(d),u=t(86677),p=t.n(u),m=t(27378),h=t(16134),x=t(25980),g=t(45938),y=t(16220),f=t(77830),_=t(84720),b=t(14908),j=t(46628),v=t(26089),k=t(19904),w=t(16394),C=t(20682),S=t(41337);let D=e=>{let{connectionConfig:s,hiddenTypes:t=[]}=e,a=(0,h.C)(C.pw),{data:i}=(0,C.$I)(a),n=(0,m.useMemo)(()=>(null==i?void 0:i.items)||[],[i]),[r,l]=(0,m.useState)(),o=(0,m.useMemo)(()=>[...n].filter(e=>!t.includes(e.identifier)).sort((e,s)=>e.human_readable>s.human_readable?1:-1),[n,t]),d=(0,m.useMemo)(()=>{let e=new Map;return null==o||o.map(s=>e.set(s.human_readable,{value:s})),e},[o]),c=(0,m.useMemo)(()=>{var e;return(null===(e=n.find(e=>e.identifier===(null==s?void 0:s.connection_type)||(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)))||void 0===e?void 0:e.type)||"ethyca"},[s,n]);return(0,m.useMemo)(()=>{let e=n.find(e=>(null==s?void 0:s.saas_config)&&e.identifier===(null==s?void 0:s.saas_config.type)||e.identifier===(null==s?void 0:s.connection_type));e&&l(e)},[s,n]),{dropDownOptions:d,selectedValue:r,setSelectedValue:l,systemType:c}};var T=e=>{var s;let{disabled:t,hasClear:a=!0,label:i,list:n,onChange:r,selectedValue:d}=e,c=(0,m.useRef)(null),[u,p]=(0,m.useState)(!1),[h,x]=(0,m.useState)(""),g=()=>{p(!1)},y=null===(s=[...n].find(e=>{let[,s]=e;return s.value.identifier===(null==d?void 0:d.identifier)}))||void 0===s?void 0:s[0],f=(0,m.useCallback)(e=>{(0===e.target.value.length||e.target.value.length>1)&&(x(e.target.value),setTimeout(()=>{var e;return null===(e=c.current)||void 0===e?void 0:e.focus()},0))},[]),_=(0,m.useMemo)(()=>(0,w.Ds)(f,100),[f]),b=(0,m.useMemo)(()=>[...n].filter(e=>e[0].toLowerCase().includes(h.toLowerCase())),[n,h]);return(0,l.jsxs)(o.v2r,{isLazy:!0,onClose:g,onOpen:()=>{p(!0)},strategy:"fixed",matchWidth:!0,children:[(0,l.jsx)(o.j2t,{"aria-label":null!=y?y:i,as:o.wpx,color:y?"complimentary.500":void 0,disabled:t,icon:(0,l.jsx)(o.mCO,{}),iconPosition:"end",className:"!bg-transparent text-left hover:bg-transparent active:bg-transparent","data-testid":"select-dropdown-btn",width:"272px",children:(0,l.jsx)(o.xvT,{noOfLines:1,style:{wordBreak:"break-all"},children:null!=y?y:i})}),u?(0,l.jsxs)(o.qyq,{id:"MENU_LIST",lineHeight:"1rem",p:"0",maxHeight:"400px",overflow:"hidden","data-testid":"select-dropdown-list",width:"272px",children:[(0,l.jsx)(o.xuv,{px:"8px",mt:2,children:(0,l.jsxs)(o.BZy,{size:"sm",children:[(0,l.jsx)(o.Z8_,{pointerEvents:"none",children:(0,l.jsx)(o.PTu,{color:"gray.300",h:"17px",w:"17px"})}),(0,l.jsx)(o.IIB,{"data-testid":"input-search-integrations",ref:c,autoComplete:"off",autoFocus:!0,borderRadius:"md",name:"search",onChange:_,placeholder:"Search integrations",size:"sm",type:"search"})]})}),a&&(0,l.jsx)(o.kCb,{borderBottom:"1px",borderColor:"gray.200",cursor:"auto",p:"8px",children:(0,l.jsx)(o.wpx,{onClick:()=>{r(void 0),x(""),g()},size:"small",children:"Clear"})}),(0,l.jsx)(o.xuv,{overflowY:"auto",maxHeight:"272px",children:b.map(e=>{let[s,t]=e;return(0,l.jsx)(o.esZ,{title:t.toolTip,placement:"rightTop",mouseEnterDelay:.5,children:(0,l.jsxs)(o.sNh,{color:d===t.value?"complimentary.500":void 0,isDisabled:t.isDisabled,onClick:()=>r(t.value),paddingTop:"10px",paddingRight:"8.5px",paddingBottom:"10px",paddingLeft:"8.5px",_focus:{bg:"gray.100"},children:[(0,l.jsx)(S.Z,{data:t.value}),(0,l.jsx)(o.xvT,{ml:2,fontSize:"0.75rem",noOfLines:1,wordBreak:"break-all",children:s})]})},s)})})]}):null]})},A=t(17245),E=t(1315),I=t(21910),q=t(84306),R=t(14207),z=t(59301),F=(0,o.IUT)({displayName:"RightArrow",viewBox:"0 0 16 16",d:"M10.7814 7.33312L7.20541 3.75712L8.14808 2.81445L13.3334 7.99979L8.14808 13.1851L7.20541 12.2425L10.7814 8.66645H2.66675V7.33312H10.7814Z"}),L=t(19812),O=e=>{let{status:s,failure_reason:t}=e;if("error"===s){let e="Connection test failed.";return t&&(e+=" ".concat(t)),(0,l.jsx)(o.xvT,{"data-testid":"toast-error-msg",children:e})}return(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Connection test was successful"})},Z=t(8627),P=t(32885),W=t(65450),N=t(40324),U=t(34090),V=t(55484),B=t(97181),M=t(57072),K=t(5785),H=t(27259);let Y=e=>{let{isSubmitting:s=!1,onCancelClick:t}=e;return(0,l.jsxs)(o.hE2,{size:"sm",spacing:"8px",variant:"outline",children:[(0,l.jsx)(o.zxk,{onClick:t,variant:"outline",children:"Cancel"}),(0,l.jsx)(o.zxk,{bg:"primary.800",color:"white",isDisabled:s,isLoading:s,loadingText:"Submitting",size:"sm",variant:"solid",type:"submit",_active:{bg:"primary.500"},_disabled:{opacity:"inherit"},_hover:{bg:"primary.400"},children:"Save"})]})};var G=e=>{let{data:s=[],isSubmitting:t=!1,onSaveClick:a,onCancel:i}=e,{isLoading:n}=(0,M.MO)(),r=(0,h.C)(K.qb),{errorAlert:d}=(0,A.VY)();return n?null:(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:{fields:s.length>0?s:[{pii_field:"",dsr_package_label:"",data_categories:[]}]},onSubmit:(e,s)=>{if(new Set(e.fields.map(e=>e.pii_field)).size<e.fields.length){d("PII Field must be unique");return}a(e,s)},validateOnBlur:!1,validateOnChange:!1,validationSchema:V.Ry({fields:V.IX().of(V.Ry().shape({pii_field:V.Z_().required("PII Field is required").min(1,"PII Field must have at least one character").max(200,"PII Field has a maximum of 200 characters").label("PII Field"),dsr_package_label:V.Z_().required("DSR Package Label is required").min(1,"DSR Package Label must have at least one character").max(200,"DSR Package Label has a maximum of 200 characters").label("DSR Package Label"),data_categories:V.IX(V.Z_()).label("Data Categories")}))}),children:e=>(0,l.jsx)(U.l0,{style:{marginTop:0},noValidate:!0,children:(0,l.jsx)(o.gCW,{align:"stretch",children:(0,l.jsx)(U.F2,{name:"fields",render:s=>{let{fields:a}=e.values;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{color:"gray.900",flex:"1",fontSize:"14px",fontWeight:"semibold",lineHeight:"20px",mb:"6px",spacing:"24px",children:[(0,l.jsx)(o.xuv,{w:"416px",children:"PII Field"}),(0,l.jsx)(o.xuv,{w:"416px",children:"DSR Package Label"}),(0,l.jsx)(o.xuv,{w:"416px",children:"Data Categories"}),(0,l.jsx)(o.xuv,{visibility:"hidden",children:(0,l.jsx)(o.lr0,{})})]}),(0,l.jsx)(o.xuv,{children:a&&a.length>0?a.map((e,t)=>(0,l.jsxs)(o.Ugi,{mt:t>0?"12px":void 0,spacing:"24px",align:"flex-start",children:[(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{autoFocus:0===t,isRequired:!0,name:"fields.".concat(t,".pii_field")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(H.Z,{isRequired:!0,name:"fields.".concat(t,".dsr_package_label")})}),(0,l.jsx)(o.xuv,{minH:"57px",w:"416px",children:(0,l.jsx)(B.d,{name:"fields.".concat(t,".data_categories"),options:r.map(e=>({value:e.fides_key,label:e.fides_key})),isRequired:!0,mode:"multiple"})}),(0,l.jsx)(o.xuv,{h:"57px",visibility:t>0?"visible":"hidden",children:(0,l.jsx)(o.lr0,{onClick:()=>s.remove(t),_hover:{cursor:"pointer"}})})]},t)):null}),(0,l.jsx)(o.xvT,{color:"complimentary.500",fontWeight:"medium",fontSize:"sm",mb:"24px !important",mt:"24px !important",onClick:()=>{s.push({pii_field:"",dsr_package_label:"",data_categories:[]})},_hover:{cursor:"pointer"},children:"Add new PII field"}),(0,l.jsx)(Y,{isSubmitting:t,onCancelClick:i})]})}})})})})},Q=e=>{let{connectionConfig:s}=e,t=(0,m.useRef)(!1),{successAlert:a}=(0,A.VY)(),{handleError:i}=(0,A.HK)(),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)([]),{isOpen:u,onOpen:p,onClose:h}=(0,o.qY0)(),{data:x,isFetching:g,isLoading:y,isSuccess:f}=(0,R.QV)(s?s.key:"",{skip:!s}),[_]=(0,R.jF)(),[b]=(0,R._d)(),j=async(e,t)=>{try{r(!0);let t={connection_key:s.key,body:{...e}};d.length>0?await b(t).unwrap():await _(t).unwrap(),a("DSR customization ".concat(d.length>0?"updated":"added","!"))}catch(e){i(e)}finally{r(!1)}};(0,m.useEffect)(()=>(t.current=!0,f&&x&&c(x.fields),()=>{t.current=!1}),[x,f]);let v=(0,l.jsx)(o.wpx,{disabled:!s||n,loading:n,onClick:p,children:"Customize DSR"});return(0,l.jsxs)(l.Fragment,{children:[s?v:(0,l.jsx)(o.esZ,{title:"Save an Integration first to customize the DSR",placement:"top",children:v}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:u,size:"lg",onClose:h,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{minWidth:"775px",children:[(0,l.jsx)(o.xBx,{children:"Customize DSR"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsx)(o.xuv,{color:"gray.700",fontSize:"14px",children:'Customize your PII fields to create a friendly label name for your privacy request packages. This "Package Label" is the label your user will see in their downloaded package.'}),(g||y)&&(0,l.jsx)(o.M5Y,{children:(0,l.jsx)(o.$jN,{})}),t.current&&!y?(0,l.jsx)(G,{data:d,isSubmitting:n,onSaveClick:j,onCancel:h}):null]})})]})]})]})},$=t(98784),J=t.n($),X=t(71248),ee=t(46782),es=t(73183),et=t(95492),ea=e=>{let{onDelete:s,deleteResult:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),r=()=>{(!t.isLoading&&t.isSuccess||!t.isLoading&&t.isUninitialized)&&n()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Delete integration"}),(0,l.jsx)(o.wpx,{"aria-label":"Delete integration",icon:(0,l.jsx)(et.l,{}),disabled:t.isLoading,onClick:i,className:"ml-2"})]})]}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,onClose:r,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Delete integration"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsx)(o.Kqy,{direction:"column",spacing:"15px",children:(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"Deleting an integration may impact any privacy request that is currently in progress. Do you wish to proceed?"})})}),(0,l.jsxs)(o.mzw,{children:[(0,l.jsx)(o.wpx,{onClick:r,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:()=>{s()},loading:t.isLoading,type:"primary",className:"w-1/2",children:"Delete integration"})]})]})]})]})},ei=t(99792);let en=(e,s)=>{let t={...e};return s&&Object.entries(s.properties).forEach(e=>{let[s,a]=e;if("secrets"in t||(t.secrets={}),"integer"===a.type)t.secrets[s]=a.default?Number(a.default):0;else{var i;t.secrets[s]=null!==(i=a.default)&&void 0!==i?i:""}}),t},er=(e,s)=>{let t=e.replace(/[^A-Za-z0-9\-_]/g,"");return t.includes(s.identifier)||(t+="_".concat(s.identifier)),s.type===ei.Z.SAAS&&(t+="_api"),t},el=e=>{let{secretsSchema:s,defaultValues:t,isSubmitting:a=!1,isAuthorizing:i=!1,onSaveClick:n,onTestConnectionClick:r,onTestDatasetsClick:d,onAuthorizeConnectionClick:c,testButtonLabel:u="Test integration",connectionOption:p,connectionConfig:m,initialDatasets:h,datasetDropdownOptions:g,isCreatingConnectionConfig:y,onDelete:f,deleteResult:_}=e,[b,{isLoading:j,isFetching:v}]=(0,R.h2)(),{plus:k}=(0,x.hz)(),{getFieldValidation:w,preprocessValues:C}=(0,ee.l)(s),S=async(e,s)=>{Object.keys(await s.validateForm()).length>0||c(C(e))},D=async e=>{Object.keys(await e.validateForm()).length>0||r(await b(m.key))},T=(null==m?void 0:m.disabled)||!1;return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:(()=>{let e={...t};if(null==m?void 0:m.key){var a,i;return e.name=null!==(i=m.name)&&void 0!==i?i:"",e.description=m.description,e.instance_key=m.connection_type===I.Rj.SAAS?null===(a=m.saas_config)||void 0===a?void 0:a.fides_key:m.key,e.enabled_actions=(m.enabled_actions||[]).map(e=>e.toString()),e.secrets=m.secrets?J().cloneDeep(m.secrets):{},e.dataset=h,(null==s?void 0:s.properties)&&Object.entries(s.properties).forEach(s=>{var t;let[a,i]=s;if((null===(t=i.allOf)||void 0===t?void 0:t[0].$ref)===ee.j){let s=e.secrets[a];s&&(e.secrets[a]="".concat(s.dataset,".").concat(s.field))}}),e}return J().isEmpty(e.enabled_actions)&&(e.enabled_actions=p.supported_actions.map(e=>e.toString())),en(e,s)})(),onSubmit:(e,s)=>{n(C(e),s)},validateOnBlur:!0,children:e=>{var t;let n=!e.dirty&&(null==m?void 0:m.authorized);return(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.gCW,{align:"stretch",gap:"16px",children:[(0,l.jsxs)("div",{className:"flex flex-row",children:[m?(0,l.jsx)(es.Z,{connection_key:null==m?void 0:m.key,disabled:T,connection_type:null==m?void 0:m.connection_type,access_type:null==m?void 0:m.access,name:null!==(t=null==m?void 0:m.name)&&void 0!==t?t:m.key,isSwitch:!0}):null,m?(0,l.jsx)(ea,{onDelete:f,deleteResult:_}):null]}),!!(null==m?void 0:m.key)&&(0,l.jsx)(N.j0,{name:"instance_key",id:"instance_key",label:"Integration identifier",isRequired:!0,disabled:!!(null==m?void 0:m.key),tooltip:"The fides_key will allow fidesops to associate dataset field references appropriately. Must be a unique alphanumeric value with no spaces (underscores allowed) to represent this integration."},"instance_key"),s?Object.entries(s.properties).map(e=>{var t;let[a,i]=e;return"advanced_settings"===a?null:(0,l.jsx)(X.A,{name:"secrets.".concat(a),fieldSchema:i,isRequired:null===(t=s.required)||void 0===t?void 0:t.includes(a),secretsSchema:s,validate:w(a,i),layout:"inline"},"secrets.".concat(a))}):null,k&&(0,l.jsx)(B.d,{name:"enabled_actions",id:"enabled_actions",label:"Request types",isRequired:!0,layout:"inline",mode:"multiple",tooltip:"The request types that are supported for this integration",options:p.supported_actions.map(e=>({label:J().upperFirst(e),value:e}))},"enabled_actions"),I.Zi.DATABASE===p.type&&!y&&(0,l.jsx)(B.d,{name:"dataset",id:"dataset",tooltip:"Select datasets to associate with this integration",label:"Datasets",options:g,layout:"inline",mode:"multiple"}),(0,l.jsxs)("div",{className:"flex gap-4",children:[!p.authorization_required||n?(0,l.jsx)(o.wpx,{disabled:!(null==m?void 0:m.key)||a||_.isLoading,loading:j||v,onClick:()=>D(e),"data-testid":"test-connection-button",children:u}):null,k&&I.Zi.DATABASE===p.type&&!J().isEmpty(h)&&(0,l.jsx)(o.wpx,{onClick:()=>d(),children:"Test datasets"}),p.authorization_required&&!n?(0,l.jsx)(o.wpx,{loading:i,onClick:()=>S(e.values,e),children:"Authorize integration"}):null,p.type===I.Zi.MANUAL?(0,l.jsx)(Q,{connectionConfig:m}):null,(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",disabled:_.isLoading||a,loading:a,htmlType:"submit","data-testid":"save-integration-btn",children:"Save"})]})]})})}})},eo=async(e,s,t,a,i)=>{let n={description:e.description||"",instance_key:er(a,t),saas_connector_type:t.identifier,secrets:{},...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},r={systemFidesKey:a,connectionConfig:n};return Object.entries(s.properties).forEach(s=>{r.connectionConfig.secrets[s[0]]=e.secrets[s[0]]}),await i(r).unwrap()},ed=async(e,s,t,a,i)=>{var n;let r=a?a.key:er(t,s),l={access:I.uv.WRITE,connection_type:s.type===I.Zi.SAAS?s.type:s.identifier,description:e.description,key:r,...e.enabled_actions?{enabled_actions:e.enabled_actions}:{}},o=await i({systemFidesKey:t,connectionConfigs:[l]}).unwrap();if((null===(n=o.failed)||void 0===n?void 0:n.length)>0){let e=o.failed[0].message;throw Object.assign(Error(e),{data:{detail:e}})}return o},ec=async(e,s,t,a,i)=>{let n={systemFidesKey:t,secrets:{}};return(Object.entries(s.properties).forEach(s=>{s[0]in a&&e.secrets[s[0]]===a[s[0]]||(n.secrets[s[0]]=e.secrets[s[0]])}),0===Object.keys(n.secrets).length)?Promise.resolve():await i(n).unwrap()},eu=e=>{let{secretsSchema:s,systemFidesKey:t,connectionOption:a,connectionConfig:i,setSelectedConnectionOption:n}=e,{successAlert:r}=(0,q.V)(),{handleError:l}=(0,A.HK)(),[o,d]=(0,m.useState)(!1),[c,u]=(0,m.useState)(!1),{dropdownOptions:p,patchConnectionDatasetConfig:h,initialDatasets:g}=(0,L.t)({connectionConfig:i}),[y]=(0,R.NG)(),[f]=(0,P.IB)(),[_]=(0,R.rO)(),[b]=(0,W.Zh)(),[j]=(0,W.qd)(),[v]=(0,P.kg)(),[k,w]=(0,W._w)(),{plus:C}=(0,x.hz)(),S=(0,m.useMemo)(()=>{var e;return null!==(e=null==i?void 0:i.secrets)&&void 0!==e?e:{}},[i]);return{isSubmitting:o,isAuthorizing:c,handleSubmit:async e=>{let n=!i;try{if(d(!0),a.type===I.Zi.SAAS&&n)i=(await eo(e,s,a,t,C?f:y)).connection;else{let n=await ed(e,a,t,i,C?v:j);i||a.type!==I.Zi.DATABASE||(i=n.succeeded[0]),a.type!==I.Zi.MANUAL&&await ec(e,s,t,S,b)}i&&e.dataset&&a.type===I.Zi.DATABASE&&await h(e,i.key,{showSuccessAlert:!1}),r("Integration successfully ".concat(n?"added":"updated","!"))}catch(e){l(e)}finally{d(!1)}},handleAuthorization:async e=>{let n=!i;try{u(!0),n?i=(await eo(e,s,a,t,y)).connection:await ec(e,s,t,S,b);let r=await _(i.key).unwrap();u(!1),setTimeout(()=>{window.location.href=r},0)}catch(e){l(e)}finally{u(!1)}},datasetDropdownOptions:p,initialDatasets:g,handleDelete:async()=>{try{await k(t),n(void 0),r("Integration successfully deleted!")}catch(e){l(e)}},deleteDatastoreConnectionResult:w}},ep=e=>{let{systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i}=e,[n,r]=(0,m.useState)(),d=(0,o.pmc)(),c=t.type===I.Zi.MANUAL,{data:u}=(0,C.n3)(t.identifier,{skip:c}),{isSubmitting:h,isAuthorizing:x,handleSubmit:g,handleAuthorization:y,datasetDropdownOptions:f,initialDatasets:_,handleDelete:b,deleteDatastoreConnectionResult:v}=eu({secretsSchema:u,systemFidesKey:s,connectionOption:t,connectionConfig:a,setSelectedConnectionOption:i});return u||t.type===I.Zi.MANUAL?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{borderRadius:"6px",border:"1px",borderColor:"gray.200",backgroundColor:"gray.50",fontSize:"14px",p:4,mb:4,children:[(0,l.jsxs)("div",{children:["Connect to your ",t.human_readable," environment by providing the information below. Once you have saved the form, you may test the integration to confirm that it's working correctly."]}),t.user_guide&&(0,l.jsx)("div",{style:{marginTop:"12px"},children:(0,l.jsxs)(z.Z,{href:t.user_guide,children:["View docs for help with this integration ",(0,l.jsx)(F,{})]})})]}),(0,l.jsx)(el,{secretsSchema:u,defaultValues:{description:"",instance_key:"",name:"",dataset:[]},isSubmitting:h,isAuthorizing:x,onSaveClick:g,onTestConnectionClick:e=>{var s,t;r(e);let a=(null===(s=e.data)||void 0===s?void 0:s.test_status)==="succeeded"?"success":"error";d({...j.MA,status:a,description:(0,l.jsx)(O,{status:a,failure_reason:null===(t=e.data)||void 0===t?void 0:t.failure_reason})})},onTestDatasetsClick:()=>{p().push("/systems/configure/".concat(s,"/test-datasets"))},onAuthorizeConnectionClick:y,connectionOption:t,connectionConfig:a,datasetDropdownOptions:f,initialDatasets:_,isCreatingConnectionConfig:!a,onDelete:b,deleteResult:v}),a?(0,l.jsxs)(o.kCb,{mt:"4",justifyContent:"between",alignItems:"center",children:[n&&n.data&&void 0!==n.fulfilledTimeStamp?(0,l.jsx)(Z.s,{succeeded:"succeeded"===n.data.test_status,timestamp:n.fulfilledTimeStamp}):(0,l.jsx)(Z.s,{succeeded:null==a?void 0:a.last_test_succeeded,timestamp:(null==a?void 0:a.last_test_timestamp)||""}),(0,l.jsx)(o.LZC,{})]}):null]}):null};var em=e=>{let{connectionConfigs:s,systemFidesKey:t}=e,{isOpen:a,onOpen:i,onClose:n}=(0,o.qY0)(),[r,d]=(0,m.useState)(null),{successAlert:c}=(0,A.VY)(),[u,{isLoading:p}]=(0,E.qd)(),x=(0,h.C)(C.pw),{data:g}=(0,C.$I)(x),y=(0,m.useMemo)(()=>(null==g?void 0:g.items)||[],[g]),{handleError:f}=(0,A.HK)(),_=()=>{p||(r&&d(null),n())},b=async()=>{try{if(r){var e;let s={...r,instance_key:r.connection_type===I.Rj.SAAS?null===(e=r.saas_config)||void 0===e?void 0:e.fides_key:r.key},a=y.find(e=>(null==r?void 0:r.saas_config)&&e.identifier===(null==r?void 0:r.saas_config.type)||e.identifier===(null==r?void 0:r.connection_type));(await ed(s,a,t,r,u)).succeeded[0]&&c("Integration successfully linked!"),d(null),n()}}catch(e){f(e)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{onClick:i,children:"Link integration"}),(0,l.jsxs)(o.u_l,{isCentered:!0,isOpen:a,size:"lg",onClose:_,children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsx)(o.xBx,{children:"Unlinked Integrations"}),(0,l.jsx)(o.olH,{}),(0,l.jsx)(o.fef,{pb:6,children:(0,l.jsxs)(o.Kqy,{direction:"column",spacing:"15px",children:[(0,l.jsx)(o.xvT,{color:"gray.600",fontSize:"sm",fontWeight:"sm",lineHeight:"20px",children:"These are all the integrations that are not linked to a system. Please select an integration to link to a system."}),(0,l.jsx)(o.xuv,{maxHeight:"350px",height:"100%",overflowY:"auto",children:s.map(e=>(0,l.jsxs)(o.kCb,{flexDirection:"row",alignItems:"center",_hover:{bg:"gray.100",color:"gray.600"},bg:(null==r?void 0:r.key)===e.key?"gray.100":"unset",color:(null==r?void 0:r.key)===e.key?"gray.600":"unset",cursor:"pointer",onClick:()=>{d(e)},className:"mb-2",children:[(0,l.jsx)(S.Z,{data:e,className:"mr-2"}),(0,l.jsx)(o.xvT,{children:e.name})]},e.key))})]})}),(0,l.jsxs)(o.mzw,{className:"flex gap-4",children:[(0,l.jsx)(o.wpx,{onClick:_,className:"w-1/2",children:"Cancel"}),(0,l.jsx)(o.wpx,{onClick:b,loading:p,disabled:!r||p,className:"w-1/2",children:"Link integration"})]})]})]})]})},eh=t(44553);let ex=[I.Rj.WEBSITE,I.Rj.TEST_WEBSITE];var eg=e=>{let{connectionConfig:s,systemFidesKey:t}=e,{dropDownOptions:a,selectedValue:i,setSelectedValue:n}=D({connectionConfig:s,hiddenTypes:ex}),r=(0,h.C)(R.dR),{data:d}=(0,R.AZ)({...r,orphaned_from_system:!0}),[c,u]=(0,m.useState)([]);(0,m.useEffect)(()=>{d&&u(d.items.filter(e=>!ex.includes(e.connection_type)))},[d]);let p=(0,o.qY0)();return(0,l.jsxs)(o.xuv,{id:"con-wrapper",px:6,children:[(0,l.jsxs)(o.kCb,{py:5,children:[(0,l.jsxs)(o.Kqy,{direction:{base:"column",lg:"row"},children:[(0,l.jsx)(T,{list:a,label:"Integration type",selectedValue:i,onChange:n,disabled:!!(s&&null!==s)}),!s&&c.length>0?(0,l.jsx)(em,{connectionConfigs:c,systemFidesKey:t}):null,(0,l.jsx)(k.ZP,{scopes:[I.Sh.CONNECTOR_TEMPLATE_REGISTER],children:(0,l.jsx)(o.wpx,{htmlType:"submit","data-testid":"upload-btn",onClick:p.onOpen,className:"ml-2",children:"Upload integration"})})]}),(0,l.jsx)(eh.Z,{isOpen:p.isOpen,onClose:p.onClose})]}),(null==i?void 0:i.type)&&[I.Zi.DATABASE,I.Zi.DATA_CATALOG,I.Zi.SAAS,I.Zi.MANUAL,I.Zi.EMAIL].includes(i.type)?(0,l.jsx)(ep,{connectionConfig:s,connectionOption:i,setSelectedConnectionOption:n,systemFidesKey:t}):null]})},ey=t(71922),ef=t(31883);let e_=e=>{let{item:s,options:t=[],onNoticeChange:a,isChild:i}=e,{external_id:n,name:r}=s,d="".concat(n,"-notice_id"),[c,,u]=(0,U.U$)(d),{setValue:p}=u;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.Ugi,{flexGrow:1,children:[i&&(0,l.jsx)(o.LqM,{}),(0,l.jsx)(o.lXp,{htmlFor:d,"data-testid":"consentable-item-label".concat(i?"-child":""),m:0,fontSize:"14px",fontWeight:i?"normal":"semibold",children:r})]}),(0,l.jsx)(o.WPr,{...c,id:d,allowClear:!0,placeholder:"None",options:t,onChange:e=>{p(e),a(s={...s,notice_id:e})},className:"w-full","data-testid":"consentable-item-select"})]})},eb=e=>{let{connectionKey:s,...t}=e,a=(0,o.pmc)(),{data:i,isLoading:n}=(0,P.EQ)(s),[r,{isLoading:d}]=(0,P.Am)(),c=(0,h.C)(ey.Zp),u=(0,h.C)(ey.G1),{data:p,isLoading:x}=(0,ey.J6)({page:c,size:u}),[g,y]=(0,m.useState)(),[f,_]=(0,m.useState)([]),b=(0,m.useMemo)(()=>null==g?void 0:g.reduce((e,s)=>{var t;return s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id),(null===(t=s.children)||void 0===t?void 0:t.length)&&s.children.forEach(s=>{s.notice_id&&(e["".concat(s.external_id,"-notice_id")]=s.notice_id)}),e},{}),[g]),v=e=>{let s=e.notice_id;if(s){let e=null==p?void 0:p.items.filter(e=>e.id===s);if(null==e?void 0:e.length){var t;let s=(null===(t=e[0].children)||void 0===t?void 0:t.map(e=>e.id))||[];return f.filter(e=>s.includes(e.value))}}return f},k=async()=>{let e=await r({connectionKey:s,consentableItems:g});(0,ef.D4)(e)?a((0,j.Vo)("Failed to save bidirectional consent")):a({variant:"subtle",position:"top",duration:3e3,status:"success",isClosable:!0,description:(0,l.jsx)(o.xvT,{"data-testid":"toast-success-msg",children:"Your bidirectional consent settings have been successfully saved and applied."}),title:"Settings updated"})};if((0,m.useEffect)(()=>{i&&y(i)},[i]),(0,m.useEffect)(()=>{p&&_(p.items.map(e=>({label:e.name,value:e.id})))},[p]),n||x)return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.OdW,{height:"35px"})});if(!g||!g.length||!p)return null;let w=(e,s)=>{y(g.map(t=>{if(s?t.external_id===s.external_id:t.external_id===e.external_id){if(s){var a;return{...t,children:null===(a=t.children)||void 0===a?void 0:a.map(s=>s.external_id===e.external_id?e:s)}}return e}return t}))};return(0,l.jsx)(o.xuv,{borderWidth:"1px",borderRadius:"md",...t,children:(0,l.jsx)(o.UQy,{allowMultiple:!0,"data-testid":"accordion-consent-automation",children:(0,l.jsxs)(o.Qdk,{border:"none",children:[(0,l.jsxs)(o.KFZ,{children:[(0,l.jsx)(o.xuv,{as:"span",flex:"1",textAlign:"left",children:(0,l.jsx)(o.xvT,{as:"h2",fontWeight:"semibold",fontSize:"sm",children:"Bidirectional consent"})}),(0,l.jsx)(o.XEm,{})]}),(0,l.jsxs)(o.Hk3,{p:5,fontSize:"sm","data-testid":"accordion-panel-consent-automation",children:[(0,l.jsx)(o.xvT,{mb:7,children:"Map consentable items, such as channels and subscriptions, from your integration to Fides privacy notices. This ensures that updates to consent preferences in either location remain accurate and up-to-date."}),(0,l.jsx)(U.J9,{initialValues:b||{},onSubmit:k,children:(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(o.MIq,{columns:2,spacing:3,children:g.map(e=>{var s;return(0,l.jsxs)(m.Fragment,{children:[(0,l.jsx)(e_,{item:e,options:f,onNoticeChange:w}),null===(s=e.children)||void 0===s?void 0:s.map(s=>(0,l.jsx)(e_,{item:s,options:v(e),isChild:!0,onNoticeChange:s=>w(s,e)},s.external_id))]},e.external_id)})}),(0,l.jsx)(o.Ugi,{justifyContent:"flex-end",mt:3,children:(0,l.jsx)(o.wpx,{disabled:d,loading:d,type:"primary",htmlType:"submit","data-testid":"save-consent-automation",children:"Save"})})]})})]})]})})})};var ej=t(57865),ev=t(3124),ek=t.n(ev),ew=(0,o.IUT)({displayName:"NextArrow",viewBox:"0 0 12 12",d:"M6.58584 5.99999L4.11084 3.52499L4.81784 2.81799L7.99984 5.99999L4.81784 9.18199L4.11084 8.47499L6.58584 5.99999Z"}),eC=(0,o.IUT)({displayName:"PrevArrow",viewBox:"0 0 12 12",d:"M5.414 5.99999L7.889 8.47499L7.182 9.18199L4 5.99999L7.182 2.81799L7.889 3.52499L5.414 5.99999Z"});let eS=e=>{let s=new Date(e),t=navigator.language;return{formattedTime:s.toLocaleTimeString(t,{hour:"2-digit",minute:"2-digit",hour12:!0,timeZoneName:"short"}),formattedDate:s.toLocaleDateString(t,{year:"numeric",month:"long",day:"numeric"})}},eD=e=>({privacy_declarations:"data uses",ingress:"sources",egress:"destinations"})[e]||e,eT=(e,s)=>{let t=new Set([...Object.keys(e),...Object.keys(s)]),a=[],i=[],n=[];return Array.from(t).forEach(t=>{let r=eD(t),l=e[t],o=s[t];if("boolean"==typeof l||"boolean"==typeof o||"number"==typeof l||"number"==typeof o){l!==o&&n.push(r);return}!((J().isNil(l)||J().isEmpty(l))&&(J().isNil(o)||J().isEmpty(o)))&&(J().isEqual(l,o)||(J().isNil(l)||J().isEmpty(l)?a.push(r):J().isNil(o)||J().isEmpty(o)?i.push(r):n.push(r)))}),{addedFields:a,removedFields:i,changedFields:n}},eA=e=>{let{edited_by:s,before:t,after:a,created_at:i}=e,n=[],r=[],o=[];t.custom_fields||a.custom_fields?{addedFields:n,removedFields:r,changedFields:o}=eT(t.custom_fields,a.custom_fields):{addedFields:n,removedFields:r,changedFields:o}=eT(t,a);let d=[];if(n.length>0&&d.push(["added ",(0,l.jsx)("b",{children:n.join(", ")})]),r.length>0&&d.push(["removed ",(0,l.jsx)("b",{children:r.join(", ")})]),o.length>0&&d.push(["changed ",(0,l.jsx)("b",{children:o.join(", ")})]),0===d.length)return null;let c=d.pop(),u=d.length>0?(0,l.jsxs)(l.Fragment,{children:[d.map((e,s)=>(0,l.jsxs)(m.Fragment,{children:[e,s<d.length-1?", ":""]},s)),d.length>=2?", and ":" and ",c]}):c,{formattedTime:p,formattedDate:h}=eS(i);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("b",{children:s})," ",u," on ",h," at ",p]})},eE=(e,s)=>{let t=e=>e.map(e=>{let t=s.find(s=>s.fides_key===e.fides_key);return t&&t.name?t.name:e.fides_key}),a={...e.before},i={...e.after};return a.ingress&&(a.ingress=t(a.ingress)),a.egress&&(a.egress=t(a.egress)),i.ingress&&(i.ingress=t(i.ingress)),i&&i.egress&&(i.egress=t(i.egress)),{...e,before:a,after:i}},eI=(e,s)=>{if(J().isEmpty(s))return e;let t=(e,s)=>{var t,a;return null!==(a=null===(t=s.find(s=>s.value===e))||void 0===t?void 0:t.label)&&void 0!==a?a:e};return{...e,before:{...e.before,vendor_id:t(e.before.vendor_id,s)},after:{...e.after,vendor_id:t(e.after.vendor_id,s)}}},eq=e=>{let s=e.before.privacy_declarations||[],t=e.after.privacy_declarations||[],a=new Set([...s,...t].map(e=>e.data_use)),i=[],n=[];return a.forEach(e=>{let a=s.find(s=>s.data_use===e)||{data_use:"",data_categories:[]},r=t.find(s=>s.data_use===e)||{data_use:"",data_categories:[]};i.push(a),n.push(r)}),{...e,before:{...e.before,privacy_declarations:i},after:{...e.after,privacy_declarations:n}}},eR=e=>{let s={...e.before.custom_fields},t={...e.after.custom_fields};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,custom_fields:s},after:{...e.after,custom_fields:t}}},ez=e=>{if(!e.before.privacy_declarations||!e.before.privacy_declarations[0]||!e.before.privacy_declarations[0].custom_fields)return e;let s={...e.before.privacy_declarations[0].custom_fields},t=e.after.privacy_declarations&&e.after.privacy_declarations[0]?{...e.after.privacy_declarations[0].custom_fields}:{};return new Set([...Object.keys(s),...Object.keys(t)]).forEach(e=>{e in s||(s[e]=null),e in t||(t[e]=null)}),{...e,before:{...e.before,privacy_declarations:[{...e.before.privacy_declarations[0],custom_fields:s}]},after:{...e.after,privacy_declarations:[{...e.after.privacy_declarations[0],custom_fields:t}]}}},eF=(0,m.createContext)(null),eL=()=>(0,m.useContext)(eF);var eO=e=>{let{children:s,selectedHistory:t,formType:a}=e,i=(0,m.useMemo)(()=>({selectedHistory:t,formType:a}),[t,a]);return(0,l.jsx)(eF.Provider,{value:i,children:s})},eZ=t(62165),eP=t(30320),eW=e=>{let{heading:s,children:t}=e,{selectedHistory:a}=eL(),i=m.Children.toArray(t).filter(e=>{if(m.isValidElement(e)&&e.props.name){let{name:s}=e.props,t=J().get(null==a?void 0:a.before,s),i=J().get(null==a?void 0:a.after,s),n="boolean"!=typeof t&&"number"!=typeof t&&J().isEmpty(t),r="boolean"!=typeof i&&"number"!=typeof i&&J().isEmpty(i);return!n||!r}return!1});return 0===i.length?null:(0,l.jsx)(o.Kqy,{marginTop:"0px !important",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,overflow:"visible",mt:6,children:[(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,display:"flex",flexDirection:"row",alignItems:"center",borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s})}),(0,l.jsx)(o.Kqy,{children:i})]})})},eN=t(46238),eU=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,U.U$)(i.name),c={...d,value:null!==(s=d.value)&&void 0!==s?s:[]},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)([]),[y,f]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||[],s=J().get(null==n?void 0:n.after,i.name)||[];f(!J().isEqual(e,s)),g(e.length>s.length?e:s)},[n,i.name]),(0,m.useEffect)(()=>{u.current&&h(u.current.offsetHeight)},[x]);let _={};return y&&(_="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:_,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.kCb,{wrap:"wrap",alignItems:"flex-start",ref:u,style:{minHeight:"".concat(p,"px")},children:(p?c.value:x).map((e,s)=>(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:"object"==typeof e?e.fides_key:e},s))}),"before"===r&&y&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eV=e=>{var s;let{label:t,tooltip:a,...i}=e,{selectedHistory:n,formType:r}=eL(),[d]=(0,U.U$)(i),c={...d,value:null!==(s=d.value)&&void 0!==s?s:""},u=(0,m.useRef)(null),[p,h]=(0,m.useState)(null),[x,g]=(0,m.useState)(!1);(0,m.useEffect)(()=>{let e=J().get(null==n?void 0:n.before,i.name)||"",s=J().get(null==n?void 0:n.after,i.name)||"";g(!J().isEqual(e,s));let t=e.length>s.length?e:s;u.current&&(u.current.textContent=t,h(u.current.offsetHeight),u.current.textContent=c.value)},[n,i.name,c.value]);let y={};return x&&(y="before"===r?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:y,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:i.id||i.name,fontSize:"xs",my:0,mr:1,children:t}),(0,l.jsx)(eN.b,{label:a})]}),(0,l.jsx)(o.xvT,{fontSize:"14px",ref:u,style:{height:"".concat(p,"px")},children:c.value}),"before"===r&&x&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eB=e=>{let{customFields:s={},resourceType:t}=e,{idToCustomFieldDefinition:a}=(0,eP.m)({resourceType:t}),i=e=>Array.from(a.values()).some(s=>s.name===e&&!!s.allow_list_id),n=t===I.P6.SYSTEM?"custom_fields":"privacy_declarations[0].custom_fields",r=Object.keys(s).sort();return(0,l.jsx)(eW,{heading:"Custom fields",children:r.map(e=>i(e)?(0,l.jsx)(eU,{label:e,name:"".concat(n,".").concat(e)},e):(0,l.jsx)(eV,{label:e,name:"".concat(n,".").concat(e)},e))})},eM=e=>{let{label:s,tooltip:t,...a}=e,{selectedHistory:i,formType:n}=eL(),[r]=(0,U.U$)(a),d={...r,value:r.value},[c,u]=(0,m.useState)(!1);(0,m.useEffect)(()=>{u(J().get(null==i?void 0:i.before,a.name)!==J().get(null==i?void 0:i.after,a.name))},[i,a.name,d.value]);let p={};return c&&(p="before"===n?{backgroundColor:"#FFF5F5",borderColor:"#E53E3E",borderTop:"1px dashed #E53E3E",borderBottom:"1px dashed #E53E3E"}:{backgroundColor:"#F0FFF4",borderColor:"#38A169",borderTop:"1px dashed #38A169",borderBottom:"1px dashed #38A169"}),(0,l.jsx)(o.NIc,{style:p,paddingLeft:4,paddingRight:4,paddingTop:3,paddingBottom:3,marginTop:"-1px !important",children:(0,l.jsxs)(o.gCW,{alignItems:"start",minHeight:"46px",children:[(0,l.jsxs)(o.kCb,{alignItems:"center",children:[(0,l.jsx)(N.__,{htmlFor:a.id||a.name,fontSize:"xs",my:0,mr:1,children:s}),(0,l.jsx)(eN.b,{label:t})]}),void 0!==d.value&&(0,l.jsx)(o.j8w,{color:"marble",className:"m-1",children:d.value?"YES":"NO"}),"before"===n&&c&&(0,l.jsx)("div",{style:{position:"absolute",right:"-22px",top:"50%",transform:"translateY(-50%)"},children:"→"})]})})},eK=e=>{let{initialValues:s}=e,t=(0,eZ.hz)();return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:s,onSubmit:()=>{},children:()=>(0,l.jsx)(U.l0,{children:(0,l.jsxs)(o.Kqy,{children:[(0,l.jsxs)(eW,{heading:"System details",children:[t.dictionaryService?(0,l.jsx)(eV,{name:"vendor_id",label:"Vendor",tooltip:"Select the vendor that matches the system"}):null,(0,l.jsx)(eV,{name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eV,{name:"fides_key",label:"Unique ID",disabled:!0,tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(eV,{name:"description",label:"Description",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”"}),(0,l.jsx)(eU,{name:"tags",label:"System Tags",tooltip:"Are there any tags to associate with this system?"})]}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eU,{name:"dataset_references",label:"Dataset references",tooltip:"Is there a dataset configured for this system"})}),(0,l.jsxs)(eW,{heading:"Data processing properties",children:[(0,l.jsx)(eM,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?"}),(0,l.jsx)(eM,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?"}),(0,l.jsx)(eV,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?"}),(0,l.jsx)(eM,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?"}),(0,l.jsx)(eU,{name:"legal_basis_for_profiling",label:"Legal basis for profiling",tooltip:"What is the legal basis under which profiling is performed?"}),(0,l.jsx)(eM,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?"}),(0,l.jsx)(eU,{name:"legal_basis_for_transfers",label:"Legal basis for transfer",tooltip:"What is the legal basis under which the data is transferred?"}),(0,l.jsx)(eM,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?"}),(0,l.jsx)(eV,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?"})]}),(0,l.jsxs)(eW,{heading:"Administrative properties",children:[(0,l.jsx)(eV,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?"}),(0,l.jsx)(eV,{name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?"}),(0,l.jsx)(eV,{name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(eV,{name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(eV,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?"}),(0,l.jsx)(eU,{label:"Responsibility",name:"responsibility",tooltip:"What is the role of the business with regard to data processing?"}),(0,l.jsx)(eV,{name:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?"}),(0,l.jsx)(eV,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?"}),(0,l.jsx)(eV,{label:"Data security practices",name:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"})]}),(0,l.jsx)(eB,{customFields:s.custom_fields,resourceType:I.P6.SYSTEM}),s.privacy_declarations&&s.privacy_declarations.map((e,t)=>(0,l.jsxs)(m.Fragment,{children:[(0,l.jsxs)(eW,{heading:"Data use",children:[(0,l.jsx)(eV,{label:"Declaration name (optional)",name:"privacy_declarations[".concat(t,"].name"),tooltip:"Would you like to append anything to the system name?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].data_use"),label:"Data use",tooltip:"For which business purposes is this data used?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_categories"),label:"Data categories",tooltip:"Which categories of personal data are collected for this purpose?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].data_subjects"),label:"Data subjects",tooltip:"Who are the subjects for this personal data?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].legal_basis_for_processing"),label:"Legal basis for processing",tooltip:"What is the legal basis under which personal data is processed for this purpose?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].impact_assessment_location"),label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].retention_period"),label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?"})]}),(0,l.jsx)(eW,{heading:"Features",children:(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].features"),label:"Features",tooltip:"What are some features of how data is processed?"})}),(0,l.jsx)(eW,{heading:"Dataset reference",children:(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].dataset_references"),label:"Dataset references",tooltip:"Is there a dataset configured for this system?"})}),(0,l.jsxs)(eW,{heading:"Special category data",children:[(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].processes_special_category_data"),label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].special_category_legal_basis"),label:"Legal basis for processing",tooltip:"What is the legal basis under which the special category data is processed?"})]}),(0,l.jsxs)(eW,{heading:"Third parties",children:[(0,l.jsx)(eM,{name:"privacy_declarations[".concat(t,"].data_shared_with_third_parties"),label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?"}),(0,l.jsx)(eV,{name:"privacy_declarations[".concat(t,"].third_parties"),label:"Third parties",tooltip:"Which type of third parties is the data shared with?"}),(0,l.jsx)(eU,{name:"privacy_declarations[".concat(t,"].shared_categories"),label:"Shared categories",tooltip:"Which categories of personal data does this system share with third parties?"})]}),(0,l.jsx)(eB,{customFields:s.privacy_declarations[0].custom_fields,resourceType:I.P6.PRIVACY_DECLARATION})]},t)),(0,l.jsxs)(eW,{heading:"Data flow",children:[(0,l.jsx)(eU,{name:"ingress",label:"Sources"}),(0,l.jsx)(eU,{name:"egress",label:"Destinations"})]})]})})})};let eH=(e,s)=>{let t=[],a=new Set(["egress","ingress","privacy_declarations","vendor_id"]);(e.egress||s.egress||e.ingress||s.ingress)&&t.push("Data Flow");let i=e.privacy_declarations&&e.privacy_declarations.length>0||s.privacy_declarations&&s.privacy_declarations.length>0;i&&t.push("Data Uses");let n=[...Object.keys(e),...Object.keys(s)].some(e=>!a.has(e));return!i&&n&&t.unshift("System Information"),t};var eY=e=>{let{selectedHistory:s,isOpen:t,onClose:a}=e;return(0,l.jsxs)(o.u_l,{isOpen:t,onClose:a,size:"4xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{children:[(0,l.jsxs)(o.xBx,{backgroundColor:ek().FIDESUI_NEUTRAL_50,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",borderBottom:"1px solid #E2E8F0",children:[(0,l.jsxs)(o.X6q,{size:"xs",children:[(0,l.jsx)("span",{style:{verticalAlign:"middle"},children:"Change detail"}),s&&(0,l.jsx)(l.Fragment,{children:eH(s.before,s.after).map((e,s)=>(0,l.jsx)(o.j8w,{color:"minos",className:"ml-2",children:e},s))})]}),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.olH,{})]})]}),(0,l.jsx)(o.fef,{paddingTop:0,paddingBottom:6,children:(0,l.jsxs)(o.kCb,{justifyContent:"space-between",children:[(0,l.jsx)("div",{style:{flex:"0 50%",marginRight:"12px"},children:(0,l.jsx)(eO,{selectedHistory:s,formType:"before",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.before})})}),(0,l.jsx)("div",{style:{flex:"0 50%",marginLeft:"12px"},children:(0,l.jsx)(eO,{selectedHistory:s,formType:"after",children:(0,l.jsx)(eK,{initialValues:null==s?void 0:s.after})})})]})})]})]})},eG=e=>{let{system:s}=e,[t,a]=(0,m.useState)(1),{data:i}=(0,P.Xc)({system_key:s.fides_key,page:t,size:10}),[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(null),u=(0,h.C)(P.o),{data:p=[]}=(0,W.K3)(),x=(null==i?void 0:i.items)||[],g=e=>{c(e=ez(e=eR(e=eE(e=eI(e=eq(e),u),p)))),r(!0)},{formattedTime:y,formattedDate:f}=eS(s.created_at),_=i&&i.total?Math.ceil(i.total/10):0;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.iA_,{ml:"24px",children:[(0,l.jsx)(o.hrZ,{children:(0,l.jsx)(o.Tr,{children:(0,l.jsxs)(o.Td,{p:"16px",fontSize:"12px",border:"1px solid #E2E8F0",background:ek().FIDESUI_NEUTRAL_50,children:["System created on ",f," at ",y]})})}),(0,l.jsx)(o.p3B,{children:x.map((e,s)=>{let t=eA(e);return t?(0,l.jsx)(o.Tr,{onClick:()=>g(e),style:{cursor:"pointer"},children:(0,l.jsx)(o.Td,{pt:"10px",pb:"10px",pl:"16px",fontSize:"12px",border:"1px solid #E2E8F0",children:t})},s):null})})]}),((null==i?void 0:i.total)||0)>10&&(0,l.jsxs)(o.kCb,{alignItems:"center",justifyContent:"flex-start",marginTop:"12px",marginLeft:"24px",children:[(0,l.jsxs)(o.xvT,{fontSize:"xs",lineHeight:4,fontWeight:"600",paddingX:2,children:[(t-1)*10+1," -"," ",Math.min(10*t,(null==i?void 0:i.total)||0)," of"," ",(null==i?void 0:i.total)||0]}),(0,l.jsx)(o.wpx,{size:"small",className:"mr-2",onClick:()=>{t>1&&a(t-1)},disabled:1===t,icon:(0,l.jsx)(eC,{})}),(0,l.jsx)(o.wpx,{size:"small",onClick:()=>{t<_&&a(t+1)},disabled:t===_||0===_,icon:(0,l.jsx)(ew,{})})]}),(0,l.jsx)(eY,{selectedHistory:d,isOpen:n,onClose:()=>{r(!1),c(null)}})]})},eQ=t(52368),e$=t(3765),eJ=e=>{let{title:s,description:t,handleAdd:a}=e;return(0,l.jsx)(o.Kqy,{backgroundColor:"gray.50",border:"1px solid",borderColor:"blue.500",borderRadius:"md",justifyContent:"space-between",py:4,px:6,"data-testid":"empty-state",children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.iid,{alignSelf:"start",color:"blue.400",mt:.5}),(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"bold",fontSize:"sm",mb:1,children:s}),(0,l.jsx)(o.xvT,{fontSize:"sm",color:"gray.800",lineHeight:"5",children:t}),(0,l.jsx)(o.Ugi,{mt:4,children:(0,l.jsx)(o.wpx,{size:"small",type:"primary","data-testid":"add-btn",onClick:a,icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end",children:"Add data use"})})]})]})})},eX=t(58452);let e0=e=>{let{declaration:s,title:t,handleDelete:a,handleEdit:i}=e,{isOpen:n,onOpen:r,onClose:d}=(0,o.qY0)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.fGe,{w:"100%",h:"100%",cursor:"pointer",_hover:{backgroundColor:"gray.50"},children:(0,l.jsx)(o.xuv,{px:6,py:4,"data-testid":"row-".concat(s.data_use),children:(0,l.jsxs)(o.Ugi,{children:[(0,l.jsx)(o.AB5,{onClick:()=>i(s),role:"button",tabIndex:0,children:(0,l.jsx)(o.xvT,{children:t||s.data_use})}),(0,l.jsx)(o.LZC,{}),a?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.wpx,{"aria-label":"delete-declaration",className:"z-[2]",onClick:r,"data-testid":"delete-btn",children:(0,l.jsx)(o.pJl,{})}),(0,l.jsx)(eX.Z,{isOpen:n,onClose:d,onConfirm:()=>a(s),title:"Delete data use declaration",message:(0,l.jsxs)(o.xvT,{children:["You are about to delete the data use declaration"," ",(0,l.jsx)(o.xvT,{color:"complimentary.500",as:"span",fontWeight:"bold",children:t||s.data_use}),", including all its cookies. Are you sure you want to continue?"]}),isCentered:!0})]}):null]})})}),(0,l.jsx)(o.izJ,{})]})},e1=e=>{let{heading:s,children:t,headerButton:a,footerButton:i}=e;return(0,l.jsx)(o.Kqy,{spacing:4,"data-testid":"privacy-declarations-table",children:(0,l.jsxs)(o.xuv,{maxWidth:"720px",border:"1px",borderColor:"gray.200",borderRadius:6,children:[(0,l.jsxs)(o.Ugi,{backgroundColor:"gray.50",px:6,py:4,borderBottom:"1px",borderColor:"gray.200",borderTopRadius:6,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"xs",children:s}),(0,l.jsx)(o.LZC,{}),a||null]}),(0,l.jsx)(o.Kqy,{spacing:0,children:t}),(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,borderBottomRadius:6,children:i||null})]})})},e2=e=>{let{heading:s,declarations:t,handleAdd:a,handleDelete:i,handleEdit:n,allDataUses:r}=e,d=e=>{let s=r.filter(s=>s.fides_key===e.data_use)[0];return s?e.name?"".concat(s.name," - ").concat(e.name):s.name:""},c=(0,h.C)(ej.gU);return(0,l.jsx)(e1,{heading:s,footerButton:!c&&(0,l.jsx)(o.wpx,{onClick:a,size:"small",icon:(0,l.jsx)(o.jBn,{boxSize:4}),iconPosition:"end","data-testid":"add-btn",children:"Add data use"}),children:t.map(e=>(0,l.jsx)(e0,{declaration:e,title:d(e),handleDelete:c?void 0:i,handleEdit:n},e.id))})};var e4=t(95346),e3=t(54748),e6=t(28325),e5=t(30234);let e9=V.Ry().shape({data_categories:V.IX(V.Z_()).min(1,"Must assign at least one data category").label("Data categories"),data_use:V.Z_().required().label("Data use")}),e8={name:"",data_categories:[],data_use:"",data_subjects:[],egress:void 0,ingress:void 0,features:[],legal_basis_for_processing:void 0,flexible_legal_basis_for_processing:!0,impact_assessment_location:"",retention_period:"",processes_special_category_data:!1,special_category_legal_basis:void 0,data_shared_with_third_parties:!1,third_parties:"",shared_categories:[],customFieldValues:{},id:""},e7=e=>{var s;return{...e,name:null!==(s=e.name)&&void 0!==s?s:"",special_category_legal_basis:e.processes_special_category_data?e.special_category_legal_basis:void 0,third_parties:e.data_shared_with_third_parties?e.third_parties:void 0,shared_categories:e.data_shared_with_third_parties?e.shared_categories:void 0}},se=e=>{let{allDataUses:s,allDataCategories:t,allDataSubjects:a,allDatasets:i,values:n,includeCustomFields:r,privacyDeclarationId:d,lockedForGVL:c}=e,u=!!d,{legalBasisOptions:p}=(0,e3.Z)(),{specialCategoryLegalBasisOptions:h}=(0,e6.Z)(),x=(0,m.useMemo)(()=>i?i.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[i]);return(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsxs)(e5.Z,{heading:"Data use declaration",children:[(0,l.jsx)(N.j0,{id:"name",label:"Declaration name (optional)",name:"name",tooltip:"Would you like to append anything to the system name?",disabled:u,variant:"stacked"}),(0,l.jsx)(B.d,{id:"data_use",label:"Data use",name:"data_use",options:s.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"For which business purposes is this data processed?",layout:"stacked",isRequired:!0,disabled:u}),(0,l.jsx)(B.d,{name:"data_categories",label:"Data categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data are collected for this purpose?",mode:"multiple",isRequired:!0,disabled:c,layout:"stacked"}),(0,l.jsx)(B.d,{name:"data_subjects",label:"Data subjects",options:a.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Who are the subjects for this personal data?",mode:"multiple",layout:"stacked"}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(B.d,{name:"legal_basis_for_processing",label:"Legal basis for processing",options:p,tooltip:"What is the legal basis under which personal data is processed for this purpose?",layout:"stacked",disabled:c}),(0,l.jsx)(o.UO1,{in:"Legitimate interests"===n.legal_basis_for_processing,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"impact_assessment_location",label:"Impact assessment location",tooltip:"Where is the legitimate interest impact assessment stored?",variant:"stacked"})})})]}),(0,l.jsx)(o.xuv,{mt:5,pl:4,children:(0,l.jsx)(N.w8,{name:"flexible_legal_basis_for_processing",label:"This legal basis is flexible",tooltip:"Has the vendor declared that the legal basis may be overridden?",variant:"stacked",isDisabled:c})}),(0,l.jsx)(N.j0,{name:"retention_period",label:"Retention period (days)",tooltip:"How long is personal data retained for this purpose?",variant:"stacked",disabled:c})]}),(0,l.jsx)(e5.Z,{heading:"Features",children:(0,l.jsx)(B.d,{name:"features",label:"Features",placeholder:"Describe features...",tooltip:"What are some features of how data is processed?",layout:"stacked",disabled:c,mode:"tags"})}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(B.d,{name:"dataset_references",label:"Dataset references",options:x,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Special category data",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"processes_special_category_data",label:"This system processes special category data",tooltip:"Is this system processing special category data as defined by GDPR Article 9?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.processes_special_category_data,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{name:"special_category_legal_basis",label:"Legal basis for processing",options:h,isRequired:n.processes_special_category_data,tooltip:"What is the legal basis under which the special category data is processed?",layout:"stacked"})})})]})}),(0,l.jsx)(e5.Z,{heading:"Third parties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"data_shared_with_third_parties",label:"This system shares data with 3rd parties for this purpose",tooltip:"Does this system disclose, sell, or share personal data collected for this business use with 3rd parties?",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:n.data_shared_with_third_parties,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsxs)(o.Kqy,{mt:4,spacing:4,children:[(0,l.jsx)(N.j0,{name:"third_parties",label:"Third parties",tooltip:"Which type of third parties is the data shared with?",variant:"stacked"}),(0,l.jsx)(B.d,{name:"shared_categories",label:"Shared categories",options:t.map(e=>({value:e.fides_key,label:e.fides_key})),tooltip:"Which categories of personal data does this system share with third parties?",layout:"stacked",mode:"multiple"})]})})]})}),r?(0,l.jsx)(e4.uc,{resourceType:I.P6.PRIVACY_DECLARATION,resourceFidesKey:d}):null]})},ss=(e,s)=>e?{...e,customFieldValues:s||{}}:e8,st=e=>{let{onSubmit:s,initialValues:t,privacyDeclarationId:a}=e,{customFieldValues:i,upsertCustomFields:n}=(0,e4.mZ)({resourceType:I.P6.PRIVACY_DECLARATION,resourceFidesKey:a});return{handleSubmit:async(e,t)=>{let{customFieldValues:a}=e,i=e7(e),r=await s(i,t);if(r){let s=r.filter(s=>s.data_use===e.data_use&&(!s.name||s.name===e.name));s.length>0&&await n({customFieldValues:a,fides_key:s[0].id})}},initialValues:(0,m.useMemo)(()=>ss(t,i),[t,i])}},sa=e=>{let{onSubmit:s,onCancel:t,initialValues:a,...i}=e,n=null==a?void 0:a.id,{handleSubmit:r,initialValues:d}=st({onSubmit:s,onCancel:t,initialValues:a,allDataUses:i.allDataUses,privacyDeclarationId:n}),c=(0,h.C)(ej.gU);return(0,l.jsx)(U.J9,{enableReinitialize:!0,initialValues:d,onSubmit:r,validationSchema:e9,children:e=>{let{dirty:s,values:a}=e;return(0,l.jsxs)(U.l0,{"data-testid":"declaration-form",children:[(0,l.jsx)(g.Gt,{id:"PrivacyDeclaration",name:"New Privacy Declaration"}),(0,l.jsxs)(o.Kqy,{spacing:4,children:[(0,l.jsx)(se,{values:a,lockedForGVL:c,privacyDeclarationId:n,...i}),(0,l.jsxs)(o.kCb,{w:"100%",children:[(0,l.jsx)(o.wpx,{onClick:t,"data-testid":"cancel-btn",children:"Cancel"}),(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",disabled:!s,"data-testid":"save-btn",children:"Save"})]})]})]})}})},si=e=>{let{isOpen:s,onClose:t,heading:a,isCentered:i=!1,testId:n="privacy-declaration-modal",children:r}=e;return(0,l.jsxs)(o.u_l,{isOpen:s,onClose:t,isCentered:i,scrollBehavior:"inside",size:"3xl",children:[(0,l.jsx)(o.ZAr,{}),(0,l.jsxs)(o.hzk,{textAlign:"left",p:0,"data-testid":n,children:[(0,l.jsx)(o.xBx,{p:0,children:(0,l.jsx)(o.xuv,{backgroundColor:"gray.50",px:6,py:4,border:"1px",borderColor:"gray.200",borderTopRadius:6,children:(0,l.jsx)(o.X6q,{as:"h3",size:"sm",children:a})})}),(0,l.jsx)(o.fef,{pb:4,children:r})]})]})};var sn=e=>{let{system:s,includeCustomFields:t,...a}=e,{isOpen:i,onClose:n,onOpen:r}=(0,o.qY0)(),[d,c]=(0,m.useState)(void 0),{createDataUse:u,updateDataUse:p,deleteDataUse:h}=(0,e$.Z)(s),x=()=>{n(),c(void 0)},g=()=>{r(),c(void 0)},y=async e=>(x(),d)?p(d,e):u(e);return(0,m.useEffect)(()=>{n()},[n,s.fides_key]),(0,l.jsxs)(o.Kqy,{spacing:6,"data-testid":"data-use-tab",children:[0===s.privacy_declarations.length?(0,l.jsx)(eJ,{title:"You don't have a data use set up for this system yet.",description:'A Data Use is the purpose for which data is used in a system. In Fides, a system may have more than one Data Use. For example, a CRM system may be used both for "Customer Support" and also for "Email Marketing", each of these is a Data Use.',handleAdd:g}):(0,l.jsx)(e2,{heading:"Data use",declarations:s.privacy_declarations,handleAdd:g,handleEdit:e=>{r(),c(e)},handleDelete:h,allDataUses:a.allDataUses}),(0,l.jsx)(si,{isOpen:i,onClose:x,heading:"Configure data use",children:(0,l.jsx)(sa,{initialValues:d,onSubmit:y,onCancel:x,includeCustomFields:t,...a})})]})},sr=e=>{let{system:s}=e,{isLoading:t,...a}=(0,eQ.f)({includeDatasets:!0,includeDisabled:!1}),i=a.allDataCategories.filter(e=>e.active),n=a.allDataUses.filter(e=>e.active),r=a.allDataSubjects.filter(e=>e.active),d={...a,allDataCategories:i,allDataUses:n,allDataSubject:r};return(0,l.jsxs)(o.Kqy,{spacing:3,"data-testid":"privacy-declaration-step",minWidth:580,children:[(0,l.jsx)(o.X6q,{as:"h3",size:"md",children:"Data uses"}),(0,l.jsxs)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:["Data Uses describe the business purpose for which the personal data is processed or collected. Within a Data Use, you assign which categories of personal information are collected for this purpose and for which categories of data subjects. To update the available categories and uses, please visit"," ",(0,l.jsx)(o.rUS,{as:c(),href:"/taxonomy",color:"link.900",children:"Manage taxonomy"}),"."]}),t?(0,l.jsx)(o.$jN,{}):(0,l.jsx)(sn,{system:s,includeCustomFields:!0,...d})]})},sl=t(812),so=t(93237),sd=t(69525),sc=t(33335);let su={system_type:"",fides_key:"",tags:[],name:"",description:"",dataset_references:[],processes_personal_data:!0,exempt_from_privacy_regulations:!1,reason_for_exemption:"",uses_profiling:!1,does_international_transfers:!1,requires_data_protection_assessments:!1,privacy_policy:"",legal_name:"",legal_address:"",administrating_department:"",responsibility:[],joint_controller_info:"",data_security_practices:"",privacy_declarations:[],data_stewards:"",dpo:"",cookie_max_age_seconds:void 0,uses_cookies:!1,cookie_refresh:!1,uses_non_cookie_access:!1,legitimate_interest_disclosure_url:"",system_groups:[]},sp=(e,s)=>{var t;let a=null==e?void 0:null===(t=e.data_stewards)||void 0===t?void 0:t.map(e=>e.username).join(", ");return{...e,customFieldValues:s,description:e.description?e.description:"",legal_address:e.legal_address?e.legal_address:"",dpo:e.dpo?e.dpo:"",cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:"",legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:"",vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,privacy_policy:e.privacy_policy?e.privacy_policy:"",data_security_practices:e.data_security_practices?e.data_security_practices:"",legal_basis_for_profiling:e.legal_basis_for_profiling?e.legal_basis_for_profiling:"",legal_basis_for_transfers:e.legal_basis_for_transfers?e.legal_basis_for_transfers:"",data_stewards:a||"",system_groups:e.system_groups||[]}},sm=e=>{let s=e.fides_key?e.fides_key:(0,sc.E)(e.name),t=""===e.privacy_policy?void 0:e.privacy_policy,a={system_type:e.system_type,fides_key:s,name:e.name,description:e.description?e.description:"",dataset_references:e.dataset_references,tags:e.tags,processes_personal_data:e.processes_personal_data,exempt_from_privacy_regulations:e.exempt_from_privacy_regulations,reason_for_exemption:e.exempt_from_privacy_regulations?e.reason_for_exemption:void 0,privacy_declarations:e.processes_personal_data?e.privacy_declarations:[],vendor_id:e.vendor_id,ingress:e.ingress,egress:e.egress,meta:e.meta,fidesctl_meta:e.fidesctl_meta,organization_fides_key:e.organization_fides_key,dpa_progress:e.dpa_progress,previous_vendor_id:e.previous_vendor_id,cookie_max_age_seconds:e.cookie_max_age_seconds?e.cookie_max_age_seconds:void 0,uses_cookies:e.uses_cookies,cookie_refresh:e.cookie_refresh,uses_non_cookie_access:e.uses_non_cookie_access,legitimate_interest_disclosure_url:e.legitimate_interest_disclosure_url?e.legitimate_interest_disclosure_url:void 0,vendor_deleted_date:e.vendor_deleted_date?e.vendor_deleted_date:void 0,system_groups:e.system_groups};return e.processes_personal_data&&(a={...a,dataset_references:e.dataset_references,uses_profiling:e.uses_profiling,legal_basis_for_profiling:e.uses_profiling?e.legal_basis_for_profiling:void 0,does_international_transfers:e.does_international_transfers,legal_basis_for_transfers:e.does_international_transfers?e.legal_basis_for_transfers:void 0,requires_data_protection_assessments:e.requires_data_protection_assessments,dpa_location:e.requires_data_protection_assessments?e.dpa_location:void 0,privacy_policy:t,legal_name:e.legal_name,legal_address:e.legal_address,responsibility:e.responsibility,dpo:e.dpo,data_security_practices:e.data_security_practices},e.administrating_department&&(a.administrating_department=e.administrating_department),e.joint_controller_info&&(a.joint_controller_info=e.joint_controller_info)),a},{useGetSystemAssetsQuery:sh,useAddSystemAssetMutation:sx,useUpdateSystemAssetsMutation:sg,useDeleteSystemAssetsMutation:sy,usePopulateSystemAssetsMutation:sf}=t(78780).u.injectEndpoints({endpoints:e=>({getSystemAssets:e.query({query:e=>{let{fides_key:s,...t}=e;return{method:"GET",url:"/plus/system-assets/".concat(s),params:t}},providesTags:["System Assets"]}),addSystemAsset:e.mutation({query:e=>{let{systemKey:s,asset:t}=e;return{method:"POST",url:"/plus/system-assets/".concat(s,"/assets"),body:t}},invalidatesTags:["System Assets"]}),updateSystemAssets:e.mutation({query:e=>{let{systemKey:s,assets:t}=e;return{method:"PUT",url:"/plus/system-assets/".concat(s,"/assets/"),body:t}},invalidatesTags:["System Assets"]}),deleteSystemAssets:e.mutation({query:e=>{let{systemKey:s,asset_ids:t}=e;return{method:"DELETE",url:"/plus/system-assets/".concat(s,"/assets?").concat((0,w.du)(t,"asset_ids"))}},invalidatesTags:["System Assets"]}),populateSystemAssets:e.mutation({query:e=>{let{systemKey:s}=e;return{method:"POST",url:"/plus/dictionary/system-vendors/cookie-assets",body:[s]}}})})});var s_=t(69353),sb=t(36345);let sj=["Explicit consent","Contract","Authorised by law"].map(e=>({value:e,label:e})),sv=[{value:"Adequacy Decision",label:"Adequacy decision"},{value:"Supplementary measures",label:"Supplementary measures"},{value:"SCCs",label:"Standard contractual clauses"},{value:"BCRs",label:"Binding corporate rules"},{value:"Other",label:"Other"}],sk=["Controller","Processor","Sub-Processor"].map(e=>({value:e,label:e})),sw=e=>{var s;let{system:t}=e,a=t?null!==(s=t.name)&&void 0!==s?s:"this system":"your new system";return(0,l.jsxs)(o.X6q,{as:"h3",size:"lg",children:["Describe ",a]})};var sC=e=>{let{onSuccess:s,system:t,withHeader:a,children:i}=e,{data:n=[]}=(0,W.K3)(),{plus:r}=(0,eZ.hz)(),d=(0,h.T)(),c=(0,e4.mZ)({resourceType:I.P6.SYSTEM,resourceFidesKey:null==t?void 0:t.fides_key}),{...u}=(0,eQ.f)({includeDatasets:!0,includeDisabled:!1}),p=(0,m.useMemo)(()=>t?sp(t,c.customFieldValues):su,[t,c.customFieldValues]),[x]=(0,W.in)(),y=(0,m.useMemo)(()=>V.Ry().shape({name:V.Z_().required().label("System name").test("is-unique","",async(e,s)=>{let{data:t}=await x({page:1,size:10,search:e});return!((null==t?void 0:t.items)||[]).filter(e=>e.name!==p.name).some(s=>s.name===e)||s.createError({message:'You already have a system called "'.concat(e,'". Please specify a unique name for this system.')})}),privacy_policy:V.Z_().min(1).url().nullable()}),[x,p.name]),f=(0,eZ.hz)(),[_,b]=(0,W.f7)(),[v,k]=(0,W.qQ)(),[w]=sf();(0,P.Rd)(void 0,{skip:!f.dictionaryService});let[C]=(0,P.qz)(),{data:S}=(0,s_.QD)(void 0,{skip:!r}),D=(0,m.useMemo)(()=>(null==S?void 0:S.map(e=>({value:e.fides_key,label:e.name})))||[],[S]),T=(0,h.C)(P.o),A=(0,h.C)(ej.gU),E=(0,m.useMemo)(()=>!!(t&&(null==n?void 0:n.some(e=>e.fides_key===(null==t?void 0:t.fides_key)))),[t,n]),q=(0,m.useMemo)(()=>u.allDatasets?u.allDatasets.map(e=>({value:e.fides_key,label:e.name?e.name:e.fides_key})):[],[u.allDatasets]),R=(0,o.pmc)(),z=async(e,t)=>{var a;let i,n;if(e.vendor_id&&0===e.privacy_declarations.length){let s=await C({vendor_id:e.vendor_id});if(s.isError){if(!((0,sl.fn)(s.error)&&404===s.error.status)){let e=(0,sl.e$)(s.error,"A problem occurred while fetching data uses from Fides Compass for your system. Please try again.");R((0,j.Vo)(e))}}else s.data&&s.data.items.length>0&&(i=s.data.items.map(e=>{var s;return{...(0,sd.U)(e),name:null!==(s=e.name)&&void 0!==s?s:""}}))}let r=sm({...e,privacy_declarations:null!=i?i:e.privacy_declarations});if(n=E?await v(r):await _(r),await c.upsertCustomFields(e),!E&&e.vendor_id&&(null===(a=n.data)||void 0===a?void 0:a.fides_key)){let e=await w({systemKey:n.data.fides_key});(0,sl.D4)(e)&&R((0,j.Vo)("An unexpected error occurred while populating the system assets from Compass. Please try again."))}(0,sl.D4)(n)?R({status:"error",description:(0,sl.e$)(n.error,"An unexpected error occurred while ".concat(E?"editing":"creating"," the system. Please try again."))}):(R.closeAll(),t.resetForm({values:e}),s(n.data),d((0,ej.b3)("initial")))},F=e=>{if(f.dictionaryService){if(!e){d((0,ej.b3)("hiding")),d((0,ej.gQ)(!1));return}d((0,ej.b3)("showing")),f.tcf&&(0,sl.cj)(e)===sl.c6.GVL?d((0,ej.gQ)(!0)):d((0,ej.gQ)(!1))}},L=k.isLoading||b.isLoading||c.isLoading;return(0,l.jsx)(U.J9,{initialValues:p,enableReinitialize:!0,onSubmit:z,validationSchema:y,children:e=>{let{dirty:s,values:n,isValid:d}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsx)(g.Gt,{id:"SystemInfoTab",name:"System Info"}),(0,l.jsxs)(o.Kqy,{spacing:0,maxWidth:{base:"100%",lg:"70%"},children:[a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsx)(o.xvT,{fontSize:"sm",fontWeight:"medium",children:"By providing a small amount of additional context for each system we can make reporting and understanding our tech stack much easier for everyone from engineering to legal teams. So let’s do this now."}),a?(0,l.jsx)(sw,{system:t}):null,(0,l.jsxs)(e5.Z,{heading:"System details",children:[f.dictionaryService?(0,l.jsx)(sb.Z,{label:"System name",options:T,onVendorSelected:F,isCreate:!t,lockedForGVL:A}):(0,l.jsx)(N.j0,{id:"name",name:"name",label:"System name",tooltip:"Give the system a unique, and relevant name for reporting purposes. e.g. “Email Data Warehouse”",variant:"stacked",isRequired:!0}),(null==t?void 0:t.fides_key)&&(0,l.jsx)(N.j0,{id:"fides_key",name:"fides_key",label:"Unique ID",disabled:!0,variant:"stacked",tooltip:"An auto-generated unique ID based on the system name"}),(0,l.jsx)(so.Sv,{id:"description",name:"description",label:"Description",tooltip:"What services does this system perform?"}),(0,l.jsx)(B.d,{mode:"tags",id:"tags",name:"tags",label:"System Tags",options:p.tags?p.tags.map(e=>({value:e,label:e})):[],layout:"stacked",tooltip:"Are there any tags to associate with this system?"}),r&&(0,l.jsx)(B.d,{name:"system_groups",label:"System groups",options:D,tooltip:"Which system groups are associated with this system?",mode:"multiple",layout:"stacked"})]}),(0,l.jsx)(e5.Z,{heading:"Dataset reference",children:(0,l.jsx)(B.d,{name:"dataset_references",label:"Dataset references",options:q,tooltip:"Is there a dataset configured for this system?",mode:"multiple",layout:"stacked"})}),(0,l.jsx)(e5.Z,{heading:"Data processing properties",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(o.xuv,{mb:4,children:(0,l.jsx)(so.dQ,{name:"processes_personal_data",label:"This system processes personal data",tooltip:"Does this system process personal data?",disabled:A})}),(0,l.jsx)(o.xuv,{padding:4,borderRadius:4,backgroundColor:"gray.50",children:(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"exempt_from_privacy_regulations",label:"This system is exempt from privacy regulations",tooltip:"Is this system exempt from privacy regulations?",disabled:!n.processes_personal_data||A}),(0,l.jsx)(o.UO1,{in:n.exempt_from_privacy_regulations,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{name:"reason_for_exemption",label:"Reason for exemption",tooltip:"Why is this system exempt from privacy regulation?",variant:"stacked",isRequired:n.exempt_from_privacy_regulations,disabled:A})})})]})}),(0,l.jsx)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,style:{overflow:"visible"},animateOpacity:!0,children:(0,l.jsxs)(o.Kqy,{spacing:4,mt:4,children:[(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"uses_profiling",label:"This system performs profiling",tooltip:"Does this system perform profiling that could have a legal effect?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.uses_profiling,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_profiling",label:"Legal basis for profiling",options:sj,tooltip:"What is the legal basis under which profiling is performed?",disabled:A,isRequired:n.uses_profiling})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(so.dQ,{name:"does_international_transfers",label:"This system transfers data",tooltip:"Does this system transfer data to other countries or international organizations?",disabled:A}),(0,l.jsx)(o.UO1,{in:n.does_international_transfers,animateOpacity:!0,style:{overflow:"visible"},children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",name:"legal_basis_for_transfers",label:"Legal basis for transfer",options:sv,tooltip:"What is the legal basis under which the data is transferred?",isRequired:n.does_international_transfers,disabled:A})})})]}),(0,l.jsxs)(o.Kqy,{spacing:0,children:[(0,l.jsx)(N.w8,{name:"requires_data_protection_assessments",label:"This system requires Data Privacy Assessments",tooltip:"Does this system require (DPA/DPIA) assessments?",variant:"stacked",isDisabled:A}),(0,l.jsx)(o.UO1,{in:n.requires_data_protection_assessments,animateOpacity:!0,children:(0,l.jsx)(o.xuv,{mt:4,children:(0,l.jsx)(N.j0,{label:"DPIA/DPA location",name:"dpa_location",tooltip:"Where is the DPA/DPIA stored?",variant:"stacked",disabled:A,isRequired:n.requires_data_protection_assessments})})})]})]})})]})}),(0,l.jsxs)(o.UO1,{in:n.processes_personal_data&&!n.exempt_from_privacy_regulations,animateOpacity:!0,children:[(0,l.jsxs)(e5.Z,{heading:"Cookie properties",children:[(0,l.jsx)(so.dQ,{name:"uses_cookies",label:"This system uses cookies",tooltip:"Does this system use cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"cookie_refresh",label:"This system refreshes cookies",tooltip:"Does this system automatically refresh cookies?",disabled:A}),(0,l.jsx)(so.dQ,{name:"uses_non_cookie_access",label:"This system uses non-cookie trackers",tooltip:"Does this system use other types of trackers?",disabled:A}),(0,l.jsx)(so.lm,{name:"cookie_max_age_seconds",label:"Maximum duration (seconds)",tooltip:"What is the maximum amount of time a cookie will live?",disabled:A})]}),(0,l.jsxs)(e5.Z,{heading:"Administrative properties",children:[(0,l.jsx)(N.j0,{label:"Data stewards",name:"data_stewards",tooltip:"Who are the stewards assigned to the system?",variant:"stacked",disabled:!0}),(0,l.jsx)(so.Yb,{id:"privacy_policy",name:"privacy_policy",label:"Privacy policy URL",tooltip:"Where can the privacy policy be located?",disabled:A}),(0,l.jsx)(so.Yb,{id:"legal_name",name:"legal_name",label:"Legal name",tooltip:"What is the legal name of the business?"}),(0,l.jsx)(so.Sv,{id:"legal_address",name:"legal_address",label:"Legal address",tooltip:"What is the legal address for the business?"}),(0,l.jsx)(N.j0,{label:"Department",name:"administrating_department",tooltip:"Which department is concerned with this system?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(B.d,{mode:"multiple",layout:"stacked",label:"Responsibility",name:"responsibility",options:sk,tooltip:"What is the role of the business with regard to data processing?",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{name:"dpo",id:"dpo",label:"Legal contact (DPO)",tooltip:"What is the official privacy contact information?",disabled:A}),(0,l.jsx)(N.j0,{label:"Joint controller",name:"joint_controller_info",tooltip:"Who are the party or parties that share responsibility for processing data?",variant:"stacked",disabled:!n.processes_personal_data||n.exempt_from_privacy_regulations}),(0,l.jsx)(so.Yb,{label:"Data security practices",name:"data_security_practices",id:"data_security_practices",tooltip:"Which data security practices are employed to keep the data safe?"}),(0,l.jsx)(so.Yb,{label:"Legitimate interest disclosure URL",name:"legitimate_interest_disclosure_url",id:"legitimate_interest_disclosure_url",disabled:A}),(0,l.jsx)(so.Yb,{label:"Vendor deleted date",name:"vendor_deleted_date",id:"vendor_deleted_date",tooltip:"If this vendor is no longer active, it will be 'soft' deleted. When that occurs, it's deleted date will be recorded here for reporting.",disabled:!0})]}),n.fides_key?(0,l.jsx)(e4.uc,{resourceType:I.P6.SYSTEM,resourceFidesKey:n.fides_key}):null]})]}),(0,l.jsx)(o.xuv,{mt:6,children:(0,l.jsx)(o.wpx,{htmlType:"submit",type:"primary",disabled:L||!s||!d,loading:L,"data-testid":"save-btn",children:"Save"})}),i]})}})},sS=t(59003),sD=t(92222),sT=t(30952),sA=t(47935),sE=t(90111),sI=t(8133),sq=t(83099),sR=e=>{let{name:s,label:t,labelProps:a,tooltip:i}=e,[n,r,{setValue:d,setTouched:c}]=(0,U.U$)(s),u=!!(r.touched&&r.error);return(0,l.jsx)(o.NIc,{isInvalid:u,isRequired:!0,children:(0,l.jsxs)(o.jqI,{vertical:!0,children:[(0,l.jsxs)(o.jqI,{align:"center",children:[t&&(0,l.jsx)(N.__,{htmlFor:s,fontSize:"xs",mr:1,...a,children:t}),i&&(0,l.jsx)(eN.b,{label:i})]}),(0,l.jsx)(sq.Z,{...n,mode:"multiple",selectedTaxonomies:[],onChange:e=>{d(e)},onBlur:()=>c(!0),variant:"outlined",autoFocus:!1,status:u?"error":void 0,"data-testid":"controlled-select-".concat(s)}),(0,l.jsx)(N.Bc,{isInvalid:u,message:r.error,fieldName:s})]})})};(a=n||(n={})).COOKIE="Cookie",a.BROWSER_REQUEST="Browser Request",a.I_FRAME="iFrame",a.JAVASCRIPT_TAG="Javascript tag",a.IMAGE="Image";let sz=V.Ry().shape({name:V.Z_().required("Enter a name for this asset"),domain:V.Z_().required("Enter a valid domain for this asset"),asset_type:V.Z_().required("Select an asset type"),data_uses:V.IX().min(1,"Select at least one data use"),base_url:V.Z_().when("asset_type",{is:e=>"Cookie"!==e,then:e=>e.required("Base URL is required"),otherwise:e=>e.notRequired()})}),sF={name:"",description:"",data_uses:[],domain:"",asset_type:"",id:"",system_id:""};var sL=e=>{let{isOpen:s,onClose:t,systemKey:a,asset:i,...r}=e,d=!i,[c,{isLoading:u}]=sx(),[p,{isLoading:m}]=sg(),h=(0,o.pmc)(),x=async e=>{let s=await c({systemKey:a,asset:e});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,j.Vo)(e))}else h((0,j.t5)("Asset added successfully")),t()},g=async e=>{let s=await p({systemKey:a,assets:[e]});if((0,sl.D4)(s)){let e=(0,sl.e$)(s.error,"An unexpected error occurred while saving this asset. Please try again.");h((0,j.Vo)(e))}else h((0,j.t5)("Asset updated successfully")),t()};return(0,l.jsx)(sI.Z,{title:d?"Add asset":"Edit asset",onClose:t,isOpen:s,...r,children:(0,l.jsx)(U.J9,{initialValues:null!=i?i:sF,onSubmit:e=>{d?x(e):g(e)},validationSchema:sz,children:e=>{let{values:s,isValid:a,dirty:i}=e;return(0,l.jsxs)(U.l0,{children:[(0,l.jsxs)(o.jqI,{vertical:!0,className:"pb-6 pt-4",children:[(0,l.jsx)(sE.Z,{children:(0,l.jsx)(o.xvT,{fontSize:"sm",children:"Create and configure assets (e.g. cookies, pixels, tags) for this system to ensure proper consent enforcement. Adding assets manually allows you to define key attributes, assign categories, and align them with compliance requirements."})}),(0,l.jsxs)(o.jqI,{vertical:!0,gap:20,children:[(0,l.jsx)(N.j0,{id:"name",name:"name",label:"Name",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(B.d,{isRequired:!0,id:"asset_type",name:"asset_type",label:"Asset type",options:(0,sl.MM)(n),layout:"stacked",disabled:!d}),(0,l.jsx)(sR,{name:"data_uses",label:"Data uses",layout:"stacked"}),(0,l.jsx)(N.j0,{id:"domain",name:"domain",label:"Domain",variant:"stacked",isRequired:!0,disabled:!d}),(0,l.jsx)(N.Ks,{id:"description",name:"description",label:"Description",variant:"stacked"}),(0,l.jsx)(o.UO1,{in:!!s.asset_type&&"Cookie"!==s.asset_type,children:(0,l.jsx)(N.j0,{id:"base_url",name:"base_url",label:"Base URL",variant:"stacked",isRequired:!!s.asset_type&&"Cookie"!==s.asset_type})})]})]}),(0,l.jsxs)(o.jqI,{justify:"space-between",children:[(0,l.jsx)(o.wpx,{onClick:t,children:"Cancel"}),(0,l.jsx)(o.wpx,{type:"primary",htmlType:"submit",loading:u||m,disabled:!a||!i,"data-testid":"save-btn",children:"Save"})]})]})}})})},sO=t(8411),sZ=t(72625),sP=t(29850),sW=t(77685),sN=e=>{let{systemKey:s,systemName:t,asset:a,readonly:i}=e,[n,r]=(0,m.useState)(!1),[d,c]=(0,m.useState)(),[u,p]=(0,m.useState)(!1),[h,{isLoading:x}]=sg(),{successAlert:g,errorAlert:y}=(0,A.VY)(),f=(0,o.qY0)(),{asset_type:_,name:b}=a,j=(0,m.useCallback)(e=>{e.preventDefault(),p(!0)},[]),v=async e=>{if(!e)return;let{newSystemKey:t,newSystemName:i,isNewSystem:n}=e,l=await h({systemKey:s,assets:[{id:a.id,system_key:t}]});(0,ef.D4)(l)?y((0,sl.e$)(l.error)):g(n?"".concat(i," has been added to your system inventory and the ").concat(_,' "').concat(b,'" has been assigned to that system.'):"".concat(_," ").concat(b," has been assigned to ").concat(i)),r(!1),c(void 0)},k=e=>{c(e),f.onOpen()};return i?(0,l.jsx)(o.j8w,{"data-testid":"system-badge",color:"white",children:t}):(0,l.jsxs)(l.Fragment,{children:[!n&&(0,l.jsxs)(o.j8w,{"data-testid":"system-badge",color:"white",onClick:()=>r(!0),children:[t," ",(0,l.jsx)(o.PJP.I8b,{})]}),!!n&&(0,l.jsx)(sP.R,{variant:"borderless",className:"w-full",autoFocus:!0,defaultOpen:!0,defaultValue:s,onBlur:e=>{var s;(null===(s=e.relatedTarget)||void 0===s?void 0:s.getAttribute("id"))!=="add-new-system"&&r(!1)},onAddSystem:j,onSelect:(e,s)=>k({newSystemKey:e,newSystemName:s.label}),loading:x}),u&&(0,l.jsx)(sW.i,{isOpen:!0,onClose:()=>p(!1),onSuccessfulSubmit:(e,s)=>k({newSystemKey:e,newSystemName:s,isNewSystem:!0})}),(0,l.jsx)(o.cVQ,{isOpen:f.isOpen,onClose:f.onClose,onConfirm:()=>{v(d)},title:"Reassign asset",message:"Are you sure you want to reassign this asset to ".concat(null==d?void 0:d.newSystemName,"?"),isCentered:!0})]})},sU=e=>{let{asset:s,systemKey:t,onEditClick:a}=e,[i,{isLoading:n}]=sy(),r=(0,o.pmc)(),{isOpen:d,onClose:c,onOpen:u}=(0,o.qY0)(),p=async()=>{let e=await i({systemKey:t,asset_ids:[s.id]});(0,ef.D4)(e)?r((0,j.Vo)((0,sl.e$)(e.error,"A problem occurred removing this asset. Please try again"))):r((0,j.t5)("Asset removed successfully"))};return(0,l.jsxs)(o.jqI,{className:"gap-1",children:[(0,l.jsx)(o.wpx,{size:"small",onClick:a,"data-testid":"edit-btn",children:"Edit"}),(0,l.jsx)(o.wpx,{size:"small",onClick:u,loading:n,"data-testid":"remove-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:d,onClose:c,onConfirm:p,title:"Remove asset",message:"Are you sure you want to ignore the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})},sV=t(34929),sB=t(26183),sM=e=>{var s,t;let{asset:a,systemId:i,readonly:n}=e,{getDataUseDisplayName:r}=(0,sV.Z)(),[d]=sg(),{errorAlert:c,successAlert:u}=(0,q.V)(),[p,h]=(0,m.useState)(!1),x=async e=>{let s=[...a.data_uses||[],e],t=await d({systemKey:i,assets:[{id:a.id,data_uses:s}]});(0,ef.D4)(t)?c((0,sl.e$)(t.error)):u("Consent category added to ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},g=async e=>{var s;let t=null===(s=a.data_uses)||void 0===s?void 0:s.filter(s=>s!==e),n=await d({systemKey:i,assets:[{id:a.id,data_uses:t}]});(0,ef.D4)(n)?c((0,sl.e$)(n.error)):u("Consent category removed from ".concat(a.asset_type,' "').concat(a.name,'".'),"Confirmed")},y=null!==(t=null===(s=a.data_uses)||void 0===s?void 0:s.map(e=>({label:r(e),key:e})))&&void 0!==t?t:[];return n?(0,l.jsx)(sB.Z,{children:y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",children:e.label},e.key))}):(0,l.jsxs)(sB.Z,{children:[!p&&(0,l.jsxs)(l.Fragment,{children:[y.map(e=>(0,l.jsx)(o.j8w,{"data-testid":"data-use-".concat(e.key),color:"white",closable:!0,onClose:()=>g(e.key),closeButtonLabel:"Remove data use",children:e.label},e.key)),(0,l.jsx)(o.j8w,{onClick:()=>h(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"})]}),p&&(0,l.jsx)(o.xuv,{className:"select-wrapper",position:"absolute",zIndex:10,top:"0",left:"0",width:"100%",height:"max",bgColor:"#fff",children:(0,l.jsx)(sq.Z,{selectedTaxonomies:a.data_uses||[],onSelect:x,onBlur:()=>h(!1),open:!0})})]})},sK=e=>{let{systemKey:s,systemName:t,lockedForGVL:a,onEditClick:i}=e,n=(0,sD.Cl)(),r=n.display({id:"select",cell:e=>{let{row:s}=e;return(0,l.jsx)(sZ.k,{isChecked:s.getIsSelected(),onChange:s.getToggleSelectedHandler(),dataTestId:"select-".concat(s.original.name||s.id)})},header:e=>{let{table:s}=e;return(0,l.jsx)(sZ.k,{isChecked:s.getIsAllPageRowsSelected(),isIndeterminate:s.getIsSomeRowsSelected(),onChange:s.getToggleAllRowsSelectedHandler(),dataTestId:"select-all-rows"})},maxSize:40,meta:{cellProps:{borderRight:"none",paddingRight:0}}}),o=n.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Asset"}),d=n.accessor(e=>e.asset_type,{id:"resource_type",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Type"}),c=n.display({id:"system",cell:e=>(0,l.jsx)(sN,{systemKey:s,systemName:t,asset:e.row.original,readonly:a}),header:"System"}),u=n.accessor(e=>e.data_uses,{id:"data_uses",cell:e=>(0,l.jsx)(sM,{asset:e.row.original,systemId:s,readonly:a}),header:"Categories of consent",size:200}),p=n.accessor(e=>e.locations,{id:"locations",cell:e=>(0,l.jsx)(sZ.mb,{values:e.getValue().map(e=>({label:sO.Z8[e],key:e}))}),header:"Locations",size:300}),m=n.accessor(e=>e.domain,{id:"domain",cell:e=>(0,l.jsx)(sA.G3,{value:e.getValue()}),header:"Domain"}),h=n.accessor(e=>e.page,{id:"page",cell:e=>(0,l.jsx)(sZ.tc,{values:e.getValue(),valueSuffix:"pages",cellProps:e}),header:e=>(0,l.jsx)(sZ.Rr,{value:"Detected on",...e}),meta:{showHeaderMenu:!0,disableRowClick:!0}}),x=n.display({id:"actions",cell:e=>{let{row:t}=e;return(0,l.jsx)(sU,{asset:t.original,systemKey:s,onEditClick:()=>i(t.original)})},header:"Actions"}),g=[o,d,c,u,p,m,h];return a?g:[r,...g,x]},sH=e=>{var s;let{system:t}=e,{PAGE_SIZES:a,pageSize:i,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d,onNextPageClick:c,isNextPageDisabled:u,startRange:p,endRange:x,pageIndex:g,setTotalPages:y,resetPageIndexToDefault:f}=(0,sA.oi)(),[_,b]=(0,m.useState)(""),[v,k]=(0,m.useState)(void 0),[w,C]=(0,m.useState)({}),[S]=sy(),D=(0,h.C)(ej.gU),T=(0,o.pmc)(),{data:A,isLoading:E,isFetching:I}=sh({fides_key:t.fides_key,search:_,page:g,size:i}),{isOpen:q,onClose:R,onOpen:z}=(0,o.qY0)(),{isOpen:F,onClose:L,onOpen:O}=(0,o.qY0)();(0,m.useEffect)(()=>{f()},[_,f]),(0,m.useEffect)(()=>{y(null==A?void 0:A.pages)},[A,y]);let Z=sK({systemName:null!==(s=t.name)&&void 0!==s?s:t.fides_key,systemKey:t.fides_key,onEditClick:e=>{k(e),z()},lockedForGVL:D}),P=(0,sS.b7)({getCoreRowModel:(0,sD.sC)(),columns:Z,manualPagination:!0,data:(null==A?void 0:A.items)||[],columnResizeMode:"onChange",onRowSelectionChange:C,state:{rowSelection:w}}),W=P.getSelectedRowModel().rows.map(e=>e.original.id),N=async()=>{let e=await S({systemKey:t.fides_key,asset_ids:W});(0,ef.D4)(e)?T((0,j.Vo)((0,sl.e$)(e.error,"A problem occurred removing these assets. Please try again."))):(P.resetRowSelection(),T((0,j.t5)("Assets removed successfully"))),L()};return t?E?(0,l.jsx)(sA.I4,{rowHeight:36,numRows:36}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.xvT,{fontSize:"sm",mb:4,children:D?"This page displays all assets associated with this system. Use the table below to review these technologies for compliance and detailed insights.":"This page displays all assets associated with this system. Use the table below to review and manage these technologies for compliance and detailed insights."}),(0,l.jsxs)(sA.Q$,{children:[(0,l.jsx)(sT.f,{value:_,onChange:b}),!D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.LZC,{}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.mm_,{}),iconPosition:"end",onClick:z,"data-testid":"add-asset-btn",children:"Add asset"}),(0,l.jsx)(sL,{isOpen:q,onClose:()=>{k(void 0),R()},systemKey:t.fides_key,asset:v}),(0,l.jsx)(o.wpx,{icon:(0,l.jsx)(o.PJP.ZNm,{}),iconPosition:"end",onClick:O,disabled:!W.length,"data-testid":"bulk-delete-btn",children:"Remove"}),(0,l.jsx)(o.cVQ,{isOpen:F,onClose:L,onConfirm:N,title:"Remove assets",message:"Are you sure you want to remove the selected assets? This action cannot be undone and may impact Bidirectional consent.",isCentered:!0})]})]}),(0,l.jsx)(sA.ZK,{tableInstance:P,emptyTableNotice:(0,l.jsx)(o.oj8,{image:o.oj8.PRESENTED_IMAGE_SIMPLE,description:"No assets found","data-testid":"empty-state"})}),(0,l.jsx)(sA.s8,{totalRows:(null==A?void 0:A.total)||0,pageSizes:a,setPageSize:n,onPreviousPageClick:r,isPreviousPageDisabled:d||I,onNextPageClick:c,isNextPageDisabled:u||I,startRange:p,endRange:x})]}):null},sY=e=>{let{setActiveTab:s}=e,t=(0,u.useRouter)(),a=(0,o.pmc)();(0,m.useEffect)(()=>{let{status:e}=t.query;if(e&&t.isReady){s("integrations"),"succeeded"===e?a((0,j.t5)("Integration successfully authorized.")):a((0,j.Vo)("Failed to authorize integration."));let i={...t.query};delete i.status,t.replace({pathname:t.pathname,query:i,hash:"integrations"},void 0,{shallow:!0})}},[t.query,s,t,a])};(i=r||(r={})).INFORMATION="information",i.DATA_USES="data-uses",i.DATA_FLOW="data-flow",i.INTEGRATIONS="integrations",i.ASSETS="assets",i.HISTORY="history";let sG=e=>{let{onViewDatamap:s,onAddPrivacyDeclaration:t}=e;return(0,l.jsxs)(o.xuv,{children:[(0,l.jsx)(o.xvT,{fontWeight:"700",children:"System has been saved successfully"}),(0,l.jsxs)(o.xvT,{textColor:"gray.700",whiteSpace:"inherit",children:["Your system has been added to your data map. You can"," ",(0,l.jsx)(v.Z,{onClick:s,children:"view it now"})," or"," ",(0,l.jsx)(v.Z,{onClick:t,children:"add privacy declarations in the next tab"}),"."]})]})};var sQ=e=>{var s,t;let{isCreate:a}=e,i=(0,u.useRouter)(),{activeTab:n,onTabChange:d,setActiveTab:p}=(0,b.Z)({tabKeys:Object.values(r)}),[v,k]=(0,m.useState)(!1),{systemOrDatamapRoute:w}=(0,y.V)(),C=(0,o.pmc)(),S=(0,h.T)(),[D,T]=(0,m.useState)(void 0),{plus:A}=(0,x.hz)(),E=i.query.id,{data:I}=(0,W.rn)(E,{skip:!E||a});(0,m.useEffect)(()=>{I&&T(I.processes_personal_data)},[I]);let q=(0,m.useCallback)(e=>{void 0===I&&k(!0),i.push({pathname:f.Dv,query:{id:e.fides_key}});let s={...j.MA,description:(0,l.jsx)(sG,{onViewDatamap:()=>{i.push(w).then(()=>{C.closeAll()})},onAddPrivacyDeclaration:()=>{d("data-uses"),C.closeAll()}})};C({...s})},[I,i,w,C,d]);(0,m.useEffect)(()=>{a&&(S((0,ej.b3)("initial")),S((0,ej.gQ)(!1)))},[S,a]);let{attemptAction:R}=(0,g.oI)(),z=(0,m.useCallback)(e=>{R().then(async s=>{s&&d(e)})},[R,d]);sY({setActiveTab:p});let F=[{label:"Information",key:"information",children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(o.xuv,{px:6,mb:9,children:[(0,l.jsx)(g.eB,{}),(0,l.jsx)(sC,{onSuccess:q,system:I})]}),v?(0,l.jsx)(o.xuv,{backgroundColor:"gray.100",px:6,py:3,children:(0,l.jsxs)(o.xvT,{color:"primary.900",fontSize:"sm","data-testid":"save-help-message",children:["Now that you have saved this new system it is"," ",(0,l.jsx)(o.rUS,{as:c(),href:w,textDecor:"underline",children:"ready to view in your data map"}),". You can return to this setup at any time to add privacy declarations to this system."]})}):null]})},{label:"Data uses",key:"data-uses",children:I?(0,l.jsx)(o.xuv,{px:6,width:{base:"100%",lg:"70%"},children:(0,l.jsx)(sr,{system:I})}):null,disabled:!I||!D},{label:"Data flow",key:"data-flow",children:I?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsxs)(o.xuv,{px:6,paddingBottom:2,children:[(0,l.jsx)(o.xvT,{fontSize:"md",lineHeight:6,fontWeight:"bold",marginBottom:3,children:"Data flow"}),(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"Data flow describes the flow of data between systems in your Data Map. Below, you can configure Source and Destination systems and the corresponding links will be drawn in the Data Map graph. Source systems are systems that send data to this system while Destination systems receive data from this system."})]}),(0,l.jsx)(_.q,{system:I,isSystemTab:!0})]}):null,disabled:!I},{label:"Integrations",key:"integrations",children:I?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:2,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,children:A?(0,l.jsxs)(l.Fragment,{children:["Add an integration to start managing privacy requests and consent. Visit"," ",(0,l.jsx)(o.rUS,{href:f.KH,color:"link.900",children:"Integration Management"})," ","to set up monitoring on databases."]}):"Integrations are used to process privacy requests for access erasure, portability, rectification, and consent."})}),(0,l.jsx)(eg,{connectionConfig:I.connection_configs,systemFidesKey:I.fides_key}),(null===(s=I.connection_configs)||void 0===s?void 0:s.key)&&(0,l.jsx)(eb,{m:6,connectionKey:null===(t=I.connection_configs)||void 0===t?void 0:t.key})]}):null,disabled:!I}];return A&&F.push({label:"Assets",key:"assets",children:I?(0,l.jsx)(sH,{system:I}):null,disabled:!I}),A&&F.push({label:"History",key:"history",children:I?(0,l.jsxs)(o.xuv,{width:{base:"100%",lg:"70%"},children:[(0,l.jsx)(o.xuv,{px:6,paddingBottom:6,children:(0,l.jsx)(o.xvT,{fontSize:"sm",lineHeight:5,fontWeight:"medium",children:"All changes to this system are tracked here in this audit table by date and by user. You can inspect the changes by selecting any of the events listed."})}),(0,l.jsx)(eG,{system:I})]}):null,disabled:!I}),{tabData:F,activeKey:n,onTabChange:z}}},54748:function(e,s,t){"use strict";var a=t(27378),i=t(21910);s.Z=()=>({legalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.gP).map(e=>({value:i.gP[e],label:i.gP[e]})),[])})},28325:function(e,s,t){"use strict";var a=t(27378),i=t(21910);s.Z=()=>({specialCategoryLegalBasisOptions:(0,a.useMemo)(()=>Object.keys(i.nV).map(e=>({value:i.nV[e],label:i.nV[e]})),[])})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7929],{56632:function(e,t,n){var a=n(89278),i=n(80068),r=n(50098);e.exports=function(e){return function(t,n,l){var s=Object(t);if(!i(t)){var o=a(n,3);t=r(t),n=function(e){return o(s[e],e,s)}}var u=e(t,n,l);return u>-1?s[o?t[u]:u]:void 0}}},64925:function(e,t,n){var a=n(56632)(n(66259));e.exports=a},66259:function(e,t,n){var a=n(95372),i=n(89278),r=n(47991),l=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return -1;var o=null==n?0:r(n);return o<0&&(o=l(s+o,0)),a(e,i(t,3),o)}},94919:function(e,t,n){var a=n(91936),i=1/0;e.exports=function(e){return e?(e=a(e))===i||e===-i?(e<0?-1:1)*17976931348623157e292:e==e?e:0:0===e?e:0}},47991:function(e,t,n){var a=n(94919);e.exports=function(e){var t=a(e),n=t%1;return t==t?n?t-n:t:0}},35287:function(e,t,n){"use strict";var a=n(24246),i=n(96306),r=n(88038),l=n.n(r);n(27378),t.Z=e=>{let{children:t,title:n,mainProps:r}=e;return(0,a.jsxs)(i.kCb,{"data-testid":n,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,a.jsxs)(l(),{children:[(0,a.jsxs)("title",{children:["Fides Admin UI - ",n]}),(0,a.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,a.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,a.jsx)(i.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...r,children:t})]})}},34929:function(e,t,n){"use strict";var a=n(24246),i=n(64925),r=n.n(i),l=n(27378),s=n(16134),o=n(30002),u=n(28079),c=n(57072);let d=()=>{let{isLoading:e}=(0,u.fd)(),t=(0,s.C)(u.U3),{isLoading:n}=(0,c.MO)(),a=(0,s.C)(c.qb),{isLoading:i}=(0,o.te)();return{dataUses:t,dataSubjects:(0,s.C)(o.ZL),dataCategories:a,isLoading:e||n||i}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:n,isLoading:i}=d(),s=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 n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=t(e);if(!a)return{};let i=t(s(e,n)),r=!!a.parent_key;return{name:a.name||void 0,primaryName:r&&(null==i?void 0:i.name)!==a.name&&(null==i?void 0:i.name)||void 0}},u=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:i,primaryName:r}=o(e,t,n);return i?r?(0,a.jsxs)(l.Fragment,{children:[(0,a.jsxs)("strong",{children:[r,":"]})," ",i]},e):(0,a.jsx)("strong",{children:i},e):e},c=t=>r()(e,{fides_key:t}),g=e=>r()(t,{fides_key:e}),p=e=>r()(n,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:c,getDataUseDisplayName:e=>u(e,c,1),getDataUseDisplayNameProps:e=>o(e,c,1),getDataCategories:()=>t,getDataCategoryByKey:g,getDataCategoryDisplayName:e=>u(e,g,2),getDataCategoryDisplayNameProps:e=>o(e,g,2),getDataSubjects:()=>n,getDataSubjectByKey:p,getDataSubjectDisplayName:e=>{let t=p(e);return t?t.name:e},getPrimaryKey:s,isLoading:i}}},25415:function(e,t,n){"use strict";n.d(t,{a:function(){return r}});var a=n(24246);let{Text:i}=n(96306).AntTypography,r=e=>{let{count:t}=e;return(0,a.jsx)(i,{size:"sm",strong:!0,"data-testid":"selected-count",children:"".concat(t," selected")})}},2525:function(e,t,n){"use strict";n.d(t,{Q:function(){return s}});var a=n(24246),i=n(96306),r=n(27378),l=n(3110);let s=e=>{let{values:t,columnState:n,tagProps:s,onTagClose:o,...u}=e,{isExpanded:c,isWrapped:d,version:g}=n||{},[p,f]=(0,r.useState)(!c),[h,v]=(0,r.useState)(!!d),[m,x]=(0,r.useState)(c?t:null==t?void 0:t.slice(0,2));(0,r.useEffect)(()=>{f(!c)},[c,g]),(0,r.useEffect)(()=>{v(!!d)},[d]),(0,r.useEffect)(()=>{(null==t?void 0:t.length)&&x(p?t.slice(0,2):t)},[p,t]);let y=(0,r.useCallback)(()=>{x(null==t?void 0:t.slice(0,2)),f(!0)},[t]),b=(0,r.useCallback)(()=>{f(!1)},[]),k=(0,r.useCallback)(()=>{p?b():y()},[p,b,y]);return(0,r.useMemo)(()=>(null==m?void 0:m.length)?(0,a.jsxs)(i.jqI,{align:p?"center":"start",wrap:h?"wrap":"nowrap",vertical:!p,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...u.style},...u,children:[m.map(e=>(0,a.jsx)(i.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...s,...e.tagProps,children:(0,a.jsx)(i.lKn,{ellipsis:!!p&&{tooltip:!0},style:{color:"inherit",maxWidth:p?l.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,a.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),k()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:p?"+".concat(t.length-2," more"):l.T5})]}):(0,a.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[m,p,h,u,t,s,o,k])}},3110:function(e,t,n){"use strict";n.d(t,{DI:function(){return s},T5:function(){return r},TD:function(){return l}});var a=n(24246),i=n(96306);let r="show less",l=150,s=[{key:"expand-all",label:"Expand all",icon:(0,a.jsx)(i.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,a.jsx)(i.PJP.MVB,{})}]},26070:function(e,t,n){"use strict";n.d(t,{v:function(){return o},Q:function(){return u.Q}});var a=n(24246),i=n(96306),r=n(27378),l=n(3110);let{Text:s}=i.AntTypography,o=e=>{let{values:t,valueSuffix:n,columnState:o}=e,{isExpanded:u,version:c}=o||{},[d,g]=(0,r.useState)(!u);(0,r.useEffect)(()=>{g(!u)},[u,c]);let p=(0,r.useCallback)(()=>{g(!0)},[]),f=(0,r.useCallback)(()=>{g(!1)},[]),h=(0,r.useCallback)(()=>{d?f():p()},[d,f,p]);return(0,r.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,a.jsx)(s,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,a.jsxs)(i.jqI,{align:d?"center":"flex-start",vertical:!d,gap:d?"small":"none","data-testid":"list-expandable-cell",children:[d?(0,a.jsxs)(s,{ellipsis:!0,children:[t.length," ",n]}):(0,a.jsx)(i.krs,{dataSource:t,renderItem:e=>(0,a.jsx)("li",{children:e})}),(0,a.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),h()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:d?"view":l.T5})]}):null,[d,t,n,h])};var u=n(2525)},8125:function(e,t,n){"use strict";n.d(t,{V:function(){return r},o:function(){return u}});var a=n(27378),i=n(32735);let r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:n=!1,getRowKey:r,bulkActions:l,isLoading:s=!1,isFetching:o=!1,dataSource:u=[],totalRows:c=0,currentPage:d,pageSize:g,customTableProps:p={}}=t,f=(0,a.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),h=r||f,[v,m]=(0,a.useState)([]),[x,y]=(0,a.useState)([]),b=(0,a.useCallback)(()=>{m([]),y([])},[]),k=(0,a.useMemo)(()=>({selectedRowKeys:v,selectedRows:x,resetSelections:b}),[v,x,b]),C=(0,a.useMemo)(()=>{if(n)return{selectedRowKeys:v,onChange:(e,t)=>{m(e),y(t)}}},[n,v]),j=(0,a.useCallback)((t,n,a)=>{var i,r;let l=null!==(i=t.current)&&void 0!==i?i:e.pageIndex,s=null!==(r=t.pageSize)&&void 0!==r?r:e.pageSize,o=l!==e.pageIndex||s!==e.pageSize;o?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(n||{});let u=a&&!Array.isArray(a)?a.field:void 0,c=a&&!Array.isArray(a)&&null!==a.order?a.order:void 0;o||e.updateSorting(u,c)},[e]),S=(0,a.useMemo)(()=>{var t,n,a,r,l;return{current:null!=d?d:e.pageIndex,pageSize:null!=g?g:e.pageSize,total:c,showSizeChanger:null===(r=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===r||r,pageSizeOptions:null!==(l=null===(a=e.paginationConfig)||void 0===a?void 0:null===(n=a.pageSizeOptions)||void 0===n?void 0:n.map(String))&&void 0!==l?l:i.VZ}},[d,e.pageIndex,g,e.pageSize,c,e.paginationConfig]),D=(0,a.useMemo)(()=>({dataSource:u,loading:s||o,pagination:S,onChange:j,rowKey:h,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...p}),[u,s,o,S,j,h,p]),z=v.map(String),I=x.length>0,w=(0,a.useCallback)(e=>{let t=null==l?void 0:l.actions.find(t=>t.key===e);return t?{disabled:!I||!!t.disabled&&t.disabled(x),loading:t.loading||!1,onClick:()=>t.onClick(x)}:{disabled:!0,loading:!1}},[l,I,x]);return(0,a.useMemo)(()=>({tableProps:D,selectionProps:C,selectionState:k,selectedRows:x,selectedKeys:z,hasSelectedRows:I,resetSelections:b,getBulkActionProps:w,isLoadingOrFetching:s||o,hasData:u.length>0}),[D,C,k,x,z,I,b,w,s,o,u.length])};var l=n(40431),s=n(17245);let o=()=>({filters:(0,l.WJ)(e=>e).withDefault({})}),u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:n={},search:i={},onStateChange:r}=e,{pageIndex:u,pageSize:c,resetPagination:d,updatePageIndex:g,updatePageSize:p,pageSizeOptions:f,showSizeChanger:h}=(0,s.h0)(t),{sortKey:v,sortOrder:m,updateSorting:x,resetSorting:y}=(0,s.rK)(n),{searchQuery:b,updateSearch:k,resetSearch:C}=(0,s.Rx)(i),j=(0,a.useMemo)(()=>o(),[]),[S,D]=(0,l.XI)(j,{history:"push"}),z=(0,a.useMemo)(()=>{var e;return{pageIndex:u,pageSize:c,sortKey:v,sortOrder:m,columnFilters:null!==(e=S.filters)&&void 0!==e?e:{},searchQuery:b}},[S,u,c,v,m,b]),I=(0,a.useCallback)((e,t)=>{x(e,t),d()},[x,d]),w=(0,a.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));D({filters:Object.keys(t).length>0?t:null}),d()},[D,d]),M=(0,a.useCallback)(e=>{k(e),d()},[k,d]),O=(0,a.useCallback)(()=>{D({filters:null}),d(),y(),C()},[D,d,y,C]);return(0,a.useEffect)(()=>{r&&r(z)},[z,r]),{state:z,pageIndex:z.pageIndex,pageSize:z.pageSize,updatePageIndex:g,updatePageSize:p,sortKey:z.sortKey,sortOrder:z.sortOrder,updateSorting:I,columnFilters:z.columnFilters,updateFilters:w,searchQuery:z.searchQuery,updateSearch:M,resetState:O,paginationConfig:{pageSizeOptions:f,showSizeChanger:h}}}},9320:function(e,t,n){"use strict";n.d(t,{_:function(){return r}});var a=n(24246),i=n(26089);let r=(e,t)=>(0,a.jsxs)(a.Fragment,{children:[e," ",t&&(0,a.jsx)(i.Z,{onClick:t,children:"View"})]})},88708:function(e,t,n){"use strict";n.d(t,{A:function(){return i}});var a,i,r=n(27378),l=n(14908),s=n(21910);(a=i||(i={})).ATTENTION_REQUIRED="attention-required",a.ADDED="added",a.IGNORED="ignored",t.Z=e=>{let{activeTab:t,onTabChange:n}=(0,l.Z)({tabKeys:Object.values(i)}),a=(0,r.useMemo)(()=>[{label:"Attention required",params:{diff_status:[s.LL.ADDITION],system:e},hash:"attention-required"},{label:"Added",params:{diff_status:[s.LL.MONITORED]},hash:"added"},{label:"Ignored",params:{diff_status:[s.LL.MUTED],system:e},hash:"ignored"}],[e]),{diff_status:o,system:u}=(0,r.useMemo)(()=>{var e;return null!==(e=a.find(e=>e.hash===t))&&void 0!==e?e:a[0]},[a,t]).params,c=(0,r.useMemo)(()=>o.includes(s.LL.MONITORED),[o]);return{filterTabs:a,activeTab:t,onTabChange:n,activeParams:(0,r.useMemo)(()=>e?{diff_status:o,system:u}:{diff_status:o},[e,o,u]),actionsDisabled:c}}},78238:function(e,t,n){"use strict";n.d(t,{g:function(){return a}});let a=["essential","functional.service.improve","personalize","analytics","marketing.advertising.first_party.targeted","marketing.advertising.third_party.targeted"];t.Z=e=>a.includes(e)},57072:function(e,t,n){"use strict";n.d(t,{Bd:function(){return a.Bd},L5:function(){return a.L5},MO:function(){return a.MO},qb:function(){return a.qb}});var a=n(5785)}}]);
|
fides/ui-build/static/admin/_next/static/chunks/pages/consent/privacy-notices-8fb92df30e8d496a.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7262],{81575:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/consent/privacy-notices",function(){return a(13089)}])},58754:function(e,t,a){"use strict";var l=a(24246),i=a(96306),n=a(70788);t.Z=e=>{let{heading:t,breadcrumbItems:a,isSticky:s=!0,children:r,rightContent:o,style:c,...d}=e;return(0,l.jsxs)("div",{...d,style:s?{position:"sticky",top:"-24px",paddingTop:"24px",paddingBottom:"24px",paddingLeft:"40px",marginLeft:"-40px",paddingRight:"40px",marginRight:"-40px",marginTop:"-24px",left:0,zIndex:20,backgroundColor:"white",...c}:{paddingBottom:"24px",...c},children:[(0,l.jsxs)(i.jqI,{justify:"space-between",children:["string"==typeof t?(0,l.jsx)(i.lQT,{className:a||r?"pb-4":void 0,level:1,"data-testid":"page-heading",children:t}):t,o&&(0,l.jsx)("div",{"data-testid":"page-header-right-content",children:o})]}),!!a&&(0,l.jsx)(n.m,{className:r?"pb-4":void 0,items:a,"data-testid":"page-breadcrumb"}),r]})}},70788:function(e,t,a){"use strict";a.d(t,{m:function(){return c}});var l=a(24246),i=a(96306),n=a(79894),s=a.n(n),r=a(27378);let{Text:o}=i.AntTypography,c=e=>{let{items:t,...a}=e,n=(0,r.useMemo)(()=>null==t?void 0:t.map((e,a)=>{let n=a===t.length-1,r={...e},c=r.onClick&&!r.href;return("string"==typeof r.title&&(r.title=(0,l.jsx)(o,{style:{color:"inherit",maxWidth:n?void 0:400},ellipsis:!n,id:n?"breadcrumb-current-page":void 0,children:r.title})),c)?r.title=(0,l.jsx)(i.wpx,{type:"text",size:"small",icon:r.icon,onClick:r.onClick,className:"ant-breadcrumb-link -mt-px px-1 text-inherit",children:r.title}):(r.icon&&(r.title=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"anticon align-text-bottom",children:r.icon}),r.title]})),r.href&&r.title&&(r.title=(0,l.jsx)(s(),{href:r.href,className:"ant-breadcrumb-link",children:r.title}),delete r.href)),r}),[t]);return(0,l.jsx)(i.zrq,{items:n,...a})}},2525:function(e,t,a){"use strict";a.d(t,{Q:function(){return r}});var l=a(24246),i=a(96306),n=a(27378),s=a(3110);let r=e=>{let{values:t,columnState:a,tagProps:r,onTagClose:o,...c}=e,{isExpanded:d,isWrapped:u,version:p}=a||{},[h,x]=(0,n.useState)(!d),[g,m]=(0,n.useState)(!!u),[v,f]=(0,n.useState)(d?t:null==t?void 0:t.slice(0,2));(0,n.useEffect)(()=>{x(!d)},[d,p]),(0,n.useEffect)(()=>{m(!!u)},[u]),(0,n.useEffect)(()=>{(null==t?void 0:t.length)&&f(h?t.slice(0,2):t)},[h,t]);let j=(0,n.useCallback)(()=>{f(null==t?void 0:t.slice(0,2)),x(!0)},[t]),b=(0,n.useCallback)(()=>{x(!1)},[]),y=(0,n.useCallback)(()=>{h?b():j()},[h,b,j]);return(0,n.useMemo)(()=>(null==v?void 0:v.length)?(0,l.jsxs)(i.jqI,{align:h?"center":"start",wrap:g?"wrap":"nowrap",vertical:!h,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...c.style},...c,children:[v.map(e=>(0,l.jsx)(i.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...r,...e.tagProps,children:(0,l.jsx)(i.lKn,{ellipsis:!!h&&{tooltip:!0},style:{color:"inherit",maxWidth:h?s.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,l.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),y()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:h?"+".concat(t.length-2," more"):s.T5})]}):(0,l.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[v,h,g,c,t,r,o,y])}},3110:function(e,t,a){"use strict";a.d(t,{DI:function(){return r},T5:function(){return n},TD:function(){return s}});var l=a(24246),i=a(96306);let n="show less",s=150,r=[{key:"expand-all",label:"Expand all",icon:(0,l.jsx)(i.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,l.jsx)(i.PJP.MVB,{})}]},26070:function(e,t,a){"use strict";a.d(t,{v:function(){return o},Q:function(){return c.Q}});var l=a(24246),i=a(96306),n=a(27378),s=a(3110);let{Text:r}=i.AntTypography,o=e=>{let{values:t,valueSuffix:a,columnState:o}=e,{isExpanded:c,version:d}=o||{},[u,p]=(0,n.useState)(!c);(0,n.useEffect)(()=>{p(!c)},[c,d]);let h=(0,n.useCallback)(()=>{p(!0)},[]),x=(0,n.useCallback)(()=>{p(!1)},[]),g=(0,n.useCallback)(()=>{u?x():h()},[u,x,h]);return(0,n.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,l.jsx)(r,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,l.jsxs)(i.jqI,{align:u?"center":"flex-start",vertical:!u,gap:u?"small":"none","data-testid":"list-expandable-cell",children:[u?(0,l.jsxs)(r,{ellipsis:!0,children:[t.length," ",a]}):(0,l.jsx)(i.krs,{dataSource:t,renderItem:e=>(0,l.jsx)("li",{children:e})}),(0,l.jsx)(i.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),g()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:u?"view":s.T5})]}):null,[u,t,a,g])};var c=a(2525)},13089:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return T}});var l=a(24246),i=a(96306),n=a(27378),s=a(35287),r=a(58754),o=a(92222),c=a(59003),d=a(47935),u=a(79894),p=a.n(u),h=a(86677),x=a(77830),g=a(8411),m=a(19904),v=a(32885),f=a(22286),j=a(65063),b=a(71922),y=a(21910),w=a(26070);let k={items:[],total:0,page:1,size:25,pages:1},C=()=>(0,l.jsxs)(i.gCW,{mt:6,p:10,spacing:4,borderRadius:"base",maxW:"70%","data-testid":"no-results-notice",alignSelf:"center",margin:"auto",children:[(0,l.jsxs)(i.gCW,{children:[(0,l.jsx)(i.xvT,{fontSize:"md",fontWeight:"600",children:"No privacy notices found."}),(0,l.jsx)(i.xvT,{fontSize:"sm",children:'Click "Add a privacy notice" to add your first privacy notice to Fides.'})]}),(0,l.jsx)(i.wpx,{href:"".concat(x.IT,"/new"),role:"link",size:"small",type:"primary","data-testid":"add-privacy-notice-btn",children:"Add a privacy notice +"})]}),P=(0,o.Cl)(),R=()=>{let{isLoading:e}=(0,v.x8)(),t=(0,h.useRouter)(),a=(0,m.Tg)([y.Sh.PRIVACY_NOTICE_UPDATE]),{PAGE_SIZES:s,pageSize:r,setPageSize:u,onPreviousPageClick:R,isPreviousPageDisabled:T,onNextPageClick:N,isNextPageDisabled:z,startRange:_,endRange:E,pageIndex:S,setTotalPages:M}=(0,d.oi)(),{isFetching:I,isLoading:V,data:A}=(0,b.J6)({page:S,size:r}),{items:q,total:Q,pages:W}=(0,n.useMemo)(()=>A||k,[A]);(0,n.useEffect)(()=>{M(W)},[W,M]);let D=(0,n.useMemo)(()=>[P.accessor(e=>e.name,{id:"name",cell:e=>(0,l.jsx)(d.G3,{value:e.getValue()}),header:e=>(0,l.jsx)(d.Rr,{value:"Title",...e})}),P.accessor(e=>e.consent_mechanism,{id:"consent_mechanism",cell:e=>(0,f.JA)(e.getValue()),header:e=>(0,l.jsx)(d.Rr,{value:"Mechanism",...e})}),P.accessor(e=>e.configured_regions,{id:"regions",cell:e=>{var t,a;return(0,l.jsx)(w.Q,{values:null!==(a=null===(t=e.getValue())||void 0===t?void 0:t.map(e=>{var t;let a=(0,i.QCN)(e);return{label:a?(0,i.c1K)({isoEntry:a,showFlag:!0}):null!==(t=g.Z8[e])&&void 0!==t?t:e,key:e}}))&&void 0!==a?a:[]})},header:e=>(0,l.jsx)(d.Rr,{value:"Locations",...e}),meta:{disableRowClick:!0}}),P.accessor(e=>e.disabled,{id:"status",cell:e=>(0,f.jN)(e),header:e=>(0,l.jsx)(d.Rr,{value:"Status",...e})}),P.accessor(e=>e.framework,{id:"framework",cell:e=>e.getValue()?(0,l.jsx)(d.A4,{value:j.Ep.get(e.getValue())}):null,header:e=>(0,l.jsx)(d.Rr,{value:"Framework",...e})}),P.accessor(e=>e.children,{id:"children",cell:e=>{var t;return(null===(t=(0,f.Mq)(e.getValue()))||void 0===t?void 0:t.length)?(0,l.jsx)(d.WP,{suffix:"Children",value:(0,f.Mq)(e.getValue()),...e}):(0,l.jsx)(d.G3,{value:"Unassigned"})},header:e=>(0,l.jsx)(d.Rr,{value:"Children",...e}),meta:{showHeaderMenu:!0}}),a&&P.accessor(e=>e.disabled,{id:"enable",cell:f.PS,header:e=>(0,l.jsx)(d.Rr,{value:"Enable",...e}),meta:{disableRowClick:!0}})].filter(Boolean),[a]),B=(0,c.b7)({getCoreRowModel:(0,o.sC)(),getGroupedRowModel:(0,o.qe)(),getExpandedRowModel:(0,o.rV)(),columns:D,manualPagination:!0,data:q,state:{expanded:!0},columnResizeMode:"onChange"});return V||e?(0,l.jsx)(d.I4,{rowHeight:36,numRows:15}):(0,l.jsx)("div",{children:(0,l.jsxs)(i.kCb,{flex:1,direction:"column",overflow:"auto",children:[a&&(0,l.jsx)(d.Q$,{children:(0,l.jsx)(i.Ugi,{alignItems:"center",spacing:4,marginLeft:"auto",children:(0,l.jsx)(p(),{href:"".concat(x.IT,"/new"),passHref:!0,legacyBehavior:!0,children:(0,l.jsx)(i.wpx,{type:"primary","data-testid":"add-privacy-notice-btn",children:"Add a privacy notice +"})})})}),(0,l.jsx)(d.ZK,{tableInstance:B,onRowClick:a?e=>{let{id:l}=e;a&&t.push("".concat(x.IT,"/").concat(l))}:void 0,emptyTableNotice:(0,l.jsx)(C,{})}),(0,l.jsx)(d.s8,{totalRows:Q||0,pageSizes:s,setPageSize:u,onPreviousPageClick:R,isPreviousPageDisabled:T||I,onNextPageClick:N,isNextPageDisabled:z||I,startRange:_,endRange:E})]})})};var T=()=>(0,l.jsxs)(s.Z,{title:"Privacy notices",children:[(0,l.jsx)(r.Z,{heading:"Privacy Notices",children:(0,l.jsx)(i.xvT,{fontSize:"sm",mb:8,width:{base:"100%",lg:"50%"},children:"Manage the privacy notices and mechanisms that are displayed to your users based on their location, what information you collect about them, and how you use that data."})}),(0,l.jsx)(i.xuv,{"data-testid":"privacy-notices-page",children:(0,l.jsx)(R,{})})]})}},function(e){e.O(0,[6853,2888,9774,179],function(){return e(e.s=81575)}),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4154],{58095:function(e,t,s){var n=s(8817);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},21796:function(e){e.exports=function(e,t,s){for(var n=-1,a=null==e?0:e.length;++n<a;)if(s(t,e[n]))return!0;return!1}},8817:function(e,t,s){var n=s(95372),a=s(1129),o=s(58263);e.exports=function(e,t,s){return t==t?o(e,t,s):n(e,a,s)}},1129:function(e){e.exports=function(e){return e!=e}},92198:function(e,t,s){var n=s(52485),a=s(58095),o=s(21796),l=s(65581),r=s(47111),i=s(43735);e.exports=function(e,t,s){var d=-1,c=a,u=e.length,m=!0,g=[],y=g;if(s)m=!1,c=o;else if(u>=200){var h=t?null:r(e);if(h)return i(h);m=!1,c=l,y=new n}else y=t?[]:g;e:for(;++d<u;){var p=e[d],v=t?t(p):p;if(p=s||0!==p?p:0,m&&v==v){for(var f=y.length;f--;)if(y[f]===v)continue e;t&&y.push(v),g.push(p)}else c(y,v,s)||(y!==g&&y.push(v),g.push(p))}return g}},47111:function(e,t,s){var n=s(46151),a=s(50344),o=s(43735),l=n&&1/o(new n([,-0]))[1]==1/0?function(e){return new n(e)}:a;e.exports=l},58263:function(e){e.exports=function(e,t,s){for(var n=s-1,a=e.length;++n<a;)if(e[n]===t)return n;return -1}},50344:function(e){e.exports=function(){}},83766:function(e,t,s){var n=s(92198);e.exports=function(e){return e&&e.length?n(e):[]}},25654:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/data-discovery/action-center/[monitorId]/[systemId]",function(){return s(74473)}])},79283:function(e,t,s){"use strict";s.d(t,{l:function(){return i}});var n=s(24246),a=s(96306),o=s(72707),l=s.n(o);let r=e=>{let{data:{formattedTitle:t,description:s,name:o,primaryName:l}}=e;return(0,n.jsxs)(a.jqI,{gap:12,title:"".concat(t," - ").concat(s),children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("strong",{children:l||o}),l&&": ".concat(o)]}),(0,n.jsx)("em",{children:s})]})},i=e=>{let{options:t,...s}=e,o=null==t?void 0:t.map(e=>({...e,className:l().option,formattedTitle:[e.primaryName,e.name].filter(e=>e).join(": ")}));return(0,n.jsx)(a.WPr,{options:o,filterOption:(e,t)=>(null==t?void 0:t.formattedTitle.toLowerCase().includes(e.toLowerCase()))||(null==t?void 0:t.value.toLowerCase().includes(e.toLowerCase()))||!1,optionFilterProp:"label",autoFocus:!0,variant:"borderless",optionRender:r,styles:{popup:{root:{minWidth:"500px"}}},className:"w-full p-0","data-testid":"taxonomy-select",...s})}},45938:function(e,t,s){"use strict";s.d(t,{Gt:function(){return m},eB:function(){return g},oI:function(){return u}});var n=s(24246),a=s(34090),o=s(27378),l=s(16134),r=s(38602),i=s(58452);let d=(0,o.createRef)(),c=(0,o.createRef)(),u=()=>{let e=(0,l.T)(),t=(0,l.C)(r.DB),s=(0,o.useCallback)(()=>{c.current=void 0,d.current=void 0},[]),n=(0,o.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!0),s())},[e,s]),a=(0,o.useCallback)(()=>{e((0,r.Mr)()),c.current&&(c.current(!1),s())},[e,s]);return{attemptAction:(0,o.useCallback)(()=>t?(e((0,r.h7)()),d.current||(d.current=new Promise(e=>{c.current=e})),d.current):Promise.resolve(!0),[t,e]),onConfirm:n,onClose:a}},m=e=>{let{id:t,name:s}=e,{dirty:n}=(0,a.u6)(),i=(0,l.T)();return(0,o.useEffect)(()=>(i((0,r.Zu)({id:t,name:s})),()=>{i((0,r.dz)({id:t}))}),[i,t,s]),(0,o.useEffect)(()=>{i((0,r.$p)({id:t,isDirty:n}))},[n,i,t]),null},g=()=>{let{onConfirm:e,onClose:t}=u(),s=(0,l.C)(r.uv);return(0,n.jsx)(i.Z,{isOpen:s,onClose:t,onConfirm:e,isCentered:!0,title:"Unsaved Changes",message:"You have unsaved changes"})}},74473:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return en}});var n=s(24246),a=s(86677),o=s(27378),l=s(35287),r=s(77830),i=s(58754),d=s(96306),c=s(25415),u=s(21910),m=s(30952),g=s(8133),y=s(79283),h=s(34929),p=s(78238),v=e=>{let{selectedTaxonomies:t,...s}=e,{getDataUseDisplayNameProps:a,getDataUses:o}=(0,h.Z)(),l=o().filter(e=>e.active&&p.g.includes(e.fides_key)).map(e=>{let{name:t,primaryName:s}=a(e.fides_key);return{value:e.fides_key,name:t,primaryName:s,description:e.description||""}});return(0,n.jsx)(y.l,{options:l,...s})};let{Text:f}=d.AntTypography;var x=e=>{let{onSave:t,isSaving:s,onClose:a,...l}=e,[r,i]=(0,o.useState)([]),c=()=>{i([]),a()};return(0,n.jsxs)(g.Z,{title:"Add consent category",...l,onClose:c,children:[(0,n.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(f,{children:"Assign consent categories to selected assets. This configures the system for consent management. Consent categories apply to both individual assets and the system."}),(0,n.jsx)(v,{mode:"tags",selectedTaxonomies:r,onSelect:(e,t)=>i([...r,t.value]),variant:"outlined"})]}),(0,n.jsxs)(d.jqI,{justify:"space-between",children:[(0,n.jsx)(d.wpx,{htmlType:"reset",onClick:c,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!r.length,loading:s,onClick:()=>{t(r),c()},"data-testid":"save-btn",children:"Save"})]})]})},j=s(29850),_=s(77685);let{Text:b}=d.AntTypography,C=e=>{let{onSave:t,isSaving:s,...a}=e,[l,r]=(0,o.useState)(),[i,c]=(0,o.useState)(!1),u=(0,o.useCallback)(e=>{e.preventDefault(),c(!0)},[]),m=()=>{c(!1)},y=()=>{r(void 0),a.onClose()};return(0,n.jsxs)(g.Z,{title:"Assign system",...a,onClose:y,children:[(0,n.jsxs)(d.jqI,{vertical:!0,gap:20,className:"pb-6 pt-4",children:[(0,n.jsx)(b,{children:"Assign a system to the selected assets. If no system exists, select 'Add new system' to create one."}),(0,n.jsx)(j.R,{placeholder:"Search or select...",onSelect:(e,t)=>{r(t)},onAddSystem:u,value:l})]})," ",(0,n.jsxs)(d.jqI,{justify:"space-between",children:[(0,n.jsx)(d.wpx,{htmlType:"reset",onClick:y,"data-testid":"cancel-btn",children:"Cancel"}),(0,n.jsx)(d.wpx,{htmlType:"submit",type:"primary",disabled:!l,loading:s,onClick:()=>{t(l),y()},"data-testid":"save-btn",children:"Save"})]}),i&&(0,n.jsx)(_.i,{isOpen:!0,onClose:m,onSuccessfulSubmit:(e,t)=>{m(),r({label:t,value:e})},toastOnSuccess:!0})]})};var w=s(8411),k=s(32735),S=s(8125),E=s(37059),T=s(98145);let{Link:N}=d.AntTypography,A=e=>{let{stagedResource:t,status:s}=e,a=(0,S.o)({pagination:{defaultPageSize:10,pageSizeOptions:[10,...k.VZ]}}),{pageIndex:l,pageSize:r}=a,{data:i,isFetching:d,isError:c}=(0,E.mi)({stagedResourceUrn:t.urn,status:s,page:l,size:r}),{items:u,total:m}=(0,o.useMemo)(()=>i||{items:[],total:0,pages:0,filterOptions:{assigned_users:[],systems:[]}},[i]),g=(0,o.useMemo)(()=>({enableSelection:!1,getRowKey:e=>e.location,isLoading:d,dataSource:u,totalRows:null!=m?m:0}),[d,u,m]),y=(0,S.V)(a,g);return{columns:(0,o.useMemo)(()=>[{title:"Location",dataIndex:T.EI.LOCATION,key:T.EI.LOCATION,render:e=>{var t;return null!==(t=w.Z8[e])&&void 0!==t?t:e}},{title:"Page",dataIndex:T.EI.PAGE,key:T.EI.PAGE,render:e=>(0,n.jsx)(N,{href:e,target:"_blank",rel:"noopener noreferrer",children:e})}],[]),data:i,isLoading:d,isError:c,totalRows:m,tableProps:y.tableProps,hasData:u.length>0}},{Paragraph:I,Text:O}=d.AntTypography,D=e=>{var t,s,a;let{isOpen:o,stagedResource:l,status:r,onCancel:i,onDownload:c}=e,{columns:u,tableProps:m,isError:g}=A({stagedResource:l,status:r});return(0,n.jsx)(d.$zI,{title:"Consent discovery",width:768,open:o,onCancel:i,footer:[(0,n.jsx)(d.wpx,{onClick:i,children:"Cancel"},"cancel"),!!c&&(0,n.jsx)(d.wpx,{type:"primary",onClick:c,children:"Download"},"download")],"data-testid":"consent-breakdown-modal",children:(0,n.jsxs)(d.jqI,{vertical:!0,className:"gap-6","data-testid":"consent-breakdown-modal-content",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)(I,{children:"View all instances where this asset was detected without consent, organized by location and page. Use this to investigate potential compliance issues."}),(0,n.jsxs)(I,{children:[(0,n.jsx)(O,{strong:!0,children:"Asset name:"})," ",null!==(t=l.name)&&void 0!==t?t:(0,n.jsx)(O,{italic:!0,children:"Unknown"}),","," ",(0,n.jsx)(O,{strong:!0,children:"System:"})," ",null!==(s=l.system)&&void 0!==s?s:(0,n.jsx)(O,{italic:!0,children:"Unassigned"}),","," ",(0,n.jsx)(O,{strong:!0,children:"Domain:"})," ",null!==(a=l.domain)&&void 0!==a?a:(0,n.jsx)(O,{italic:!0,children:"Unknown"})]})]}),g?(0,n.jsx)(d.DUx,{type:"error",message:"Error fetching data",description:"Please try again later.",showIcon:!0}):(0,n.jsx)(d.V5H,{...m,columns:u,"data-testid":"consent-breakdown-modal-table"})]})})};var P=s(83766),L=s.n(P),R=s(62165),U=s(812),G=s(26070),M=s(3110),Z=s(46628),V=s(16394),z=s(54762),W=s(9320),B=s(88708);let K=e=>{let{asset:t,onTabChange:s}=e,[o,{isLoading:l}]=(0,E.EY)(),[i,{isLoading:c}]=(0,E.nS)(),[m,{isLoading:g}]=(0,E.Tj)(),y=(0,d.pmc)(),h=(0,a.useRouter)(),p=l||c||g,{urn:v,name:f,resource_type:x,diff_status:j,system_key:_,user_assigned_system_key:b}=t,C=async()=>{let e=await o({urnList:[v]});if((0,U.D4)(e))y((0,Z.Vo)((0,U.e$)(e.error)));else{let e=b||_,t="".concat(r.So,"/configure/").concat(e,"#assets");y((0,Z.t5)((0,W._)("".concat(x,' "').concat(f,'" has been added to the system inventory.'),e?()=>h.push(t):void 0)))}},w=async()=>{let e=await i({urnList:[v]});(0,U.D4)(e)?y((0,Z.Vo)((0,U.e$)(e.error))):y((0,Z.t5)((0,W._)("".concat(x,' "').concat(f,'" has been ignored and will not appear in future scans.'),async()=>{await s(B.A.IGNORED)})))},k=async()=>{let e=await m({urnList:[v]});(0,U.D4)(e)?y((0,Z.Vo)((0,U.e$)(e.error))):y((0,Z.t5)("".concat(x,' "').concat(f,'" is no longer ignored and will appear in future scans.')))};return(0,n.jsxs)(d.vyj,{children:[j!==u.LL.MUTED&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.esZ,{title:t.system?void 0:"This asset requires a system before you can add it to the inventory.",children:(0,n.jsx)(d.wpx,{"data-testid":"add-btn",size:"small",onClick:C,disabled:!t.system||p,loading:l,children:"Add"})}),(0,n.jsx)(d.wpx,{"data-testid":"ignore-btn",size:"small",onClick:w,disabled:p,loading:c,children:"Ignore"})]}),j===u.LL.MUTED&&(0,n.jsx)(d.wpx,{"data-testid":"restore-btn",size:"small",onClick:k,disabled:p,loading:g,children:"Restore"})]})};var X=s(17245),$=s(18992),Y=s.n($),q=s(2525),H=s(31883),F=e=>{var t,s,a;let{asset:l,readonly:r,columnState:i}=e,[c,u]=(0,o.useState)(!1),[m]=(0,E.Ak)(),{successAlert:g,errorAlert:y}=(0,X.VY)(),{getDataUseDisplayName:f}=(0,h.Z)(),x=(null===(t=l.user_assigned_data_uses)||void 0===t?void 0:t.length)?l.user_assigned_data_uses:(null===(s=l.data_uses)||void 0===s?void 0:s.length)?l.data_uses:[],j=async e=>{let t=await m({monitorId:l.monitor_config_id,urnList:[l.urn],dataUses:[...x,e]});(0,H.D4)(t)?y((0,U.e$)(t.error)):g("Consent category added to ".concat(l.resource_type,' "').concat(l.name,'" .'),"Confirmed"),u(!1)},_=async e=>{let t=await m({monitorId:l.monitor_config_id,urnList:[l.urn],dataUses:x.filter(t=>t!==e)});(0,H.D4)(t)?y((0,U.e$)(t.error)):g("Consent category removed from ".concat(l.resource_type,' "').concat(l.name,'".'),"Confirmed")},b=(null===(a=l.user_assigned_data_uses)||void 0===a?void 0:a.length)?l.user_assigned_data_uses:l.data_uses,C=null==b?void 0:b.filter(e=>(0,p.Z)(e));return r?(0,n.jsx)(q.Q,{values:null==C?void 0:C.map(e=>({label:f(e),key:e})),columnState:i}):(0,n.jsxs)(n.Fragment,{children:[!c&&(0,n.jsxs)(d.vyj,{align:"start",children:[(0,n.jsx)(d.j8w,{onClick:()=>u(!0),"data-testid":"taxonomy-add-btn",addable:!0,"aria-label":"Add data use"}),(0,n.jsx)(q.Q,{values:null==C?void 0:C.map(e=>({label:f(e),key:e})),columnState:i,tagProps:{closable:!0,closeButtonLabel:"Remove data use"},onTagClose:_})]}),c&&(0,n.jsx)("div",{className:Y().cellBleed,style:{backgroundColor:"var(--fides-color-white)"},children:(0,n.jsx)(v,{selectedTaxonomies:C||[],onSelect:j,onBlur:()=>u(!1),open:!0})})]})};let J=e=>{let{consentAggregated:t,stagedResource:s,onShowBreakdown:a}=e;return(0,n.jsxs)(n.Fragment,{children:[t===u.lg.WITHOUT_CONSENT&&(0,n.jsx)(d.esZ,{title:"Asset was detected before the user gave consent or without any consent. Click the info icon for more details.",children:(0,n.jsx)(d.j8w,{color:"error",closeIcon:(0,n.jsx)(d.PJP.daM,{style:{width:12,height:12}}),closeButtonLabel:"View details",onClose:()=>{null==a||a(s,t)},"data-testid":"status-badge_without-consent",children:T.X1.WITHOUT_CONSENT})}),t===u.lg.WITH_CONSENT&&(0,n.jsx)(d.esZ,{title:"Asset was detected after the user gave consent",children:(0,n.jsx)(d.j8w,{color:"success","data-testid":"status-badge_with-consent",children:T.X1.WITH_CONSENT})}),t===u.lg.EXEMPT&&(0,n.jsx)(d.esZ,{title:"Asset is valid regardless of consent",children:(0,n.jsx)(d.j8w,{"data-testid":"status-badge_consent-exempt",children:T.X1.EXEMPT})}),t===u.lg.UNKNOWN&&(0,n.jsx)(d.esZ,{title:"Did not find consent information for this asset. You may need to re-run the monitor.",children:(0,n.jsx)(d.j8w,{"data-testid":"status-badge_unknown",children:T.X1.UNKNOWN})})]})};var Q=s(70675);let ee=e=>{let{aggregateSystem:t,monitorConfigId:s,readonly:a}=e,{resource_type:l,name:r,urn:i,system:c,user_assigned_system_key:u,system_key:m}=t,[g,y]=(0,o.useState)(!1),[h,p]=(0,o.useState)(!1),[v,{isLoading:f}]=(0,Q.NA)(),{successAlert:x,errorAlert:b}=(0,X.VY)(),C=(0,o.useCallback)(e=>{e.preventDefault(),p(!0)},[]),w=async(e,t,n)=>{let a=await v({staged_resource_urn:i,monitor_config_id:s,user_assigned_system_key:e});(0,U.D4)(a)?b((0,U.e$)(a.error)):x(n?"".concat(t," has been added to your system inventory and the ").concat(l,' "').concat(r,'" has been assigned to that system.'):"".concat(l,' "').concat(r,'" has been assigned to ').concat(t,"."),"Confirmed"),y(!1)};return a?c?(0,n.jsx)(d.j8w,{"data-testid":"system-badge",color:"white",children:c}):null:(0,n.jsxs)(n.Fragment,{children:[!g&&(c?(0,n.jsxs)(d.j8w,{onClick:()=>y(!0),"data-testid":"system-badge",children:[c,(0,n.jsx)(d.PJP.I8b,{})]}):(0,n.jsx)(d.j8w,{onClick:()=>y(!0),"data-testid":"add-system-btn",addable:!0})),!!g&&(0,n.jsx)("div",{className:Y().cellBleed,children:(0,n.jsx)(j.R,{variant:"borderless",autoFocus:!0,defaultOpen:!0,defaultValue:u||m,onBlur:e=>{var t;(null===(t=e.relatedTarget)||void 0===t?void 0:t.getAttribute("id"))!=="add-new-system"&&y(!1)},onAddSystem:C,onSelect:(e,t)=>w(e,t.label),loading:f})}),h&&(0,n.jsx)(_.i,{isOpen:!0,onClose:()=>{p(!1)},onSuccessfulSubmit:(e,t)=>w(e,t,!0)})]})},et=e=>{let{monitorId:t,systemId:s,onSystemName:l,onShowBreakdown:i}=e,c=(0,a.useRouter)(),m=(0,d.pmc)(),[g,y]=(0,o.useState)(s),[h,v]=(0,o.useState)(),[f,x]=(0,o.useState)(!1),[j,_]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!1),[k,N]=(0,o.useState)(0),[A,I]=(0,o.useState)(0),[O,D]=(0,o.useState)(0),{flags:P}=(0,R.hz)(),{assetConsentStatusLabels:X}=P,{filterTabs:$,activeTab:Y,onTabChange:q,activeParams:H,actionsDisabled:Q}=(0,B.Z)(s),et=(0,S.o)({sorting:{validColumns:Object.values(T.r6)}}),{columnFilters:es,pageIndex:en,pageSize:ea,resetState:eo,sortKey:el,sortOrder:er,searchQuery:ei,updateSearch:ed,updateFilters:ec,updateSorting:eu,updatePageIndex:em,updatePageSize:eg}=et,{data:ey,isLoading:eh,isFetching:ep}=(0,E.WJ)({key:t,page:en,size:ea,search:ei,sort_by:el?[el]:[T.r6.CONSENT_AGGREGATED,"urn"],sort_asc:"descend"!==er,...H,...es}),[ev,{isLoading:ef}]=(0,E.EY)(),[ex,{isLoading:ej}]=(0,E.nS)(),[e_,{isLoading:eb}]=(0,E.rs)(),[eC,{isLoading:ew}]=(0,E.sX)(),[ek,{isLoading:eS}]=(0,E.Vr)(),[eE,{isLoading:eT}]=(0,E.Tj)(),eN=ef||ej||eb||ew||eT||eS,eA=eN||s===r.Kl,{data:eI}=(0,E.ut)({monitor_config_id:t,resolved_system_id:s,diff_status:null==H?void 0:H.diff_status,search:ei,...es}),eO=(0,o.useMemo)(()=>({enableSelection:Y!==B.A.ADDED,getRowKey:e=>e.urn,isLoading:eh,isFetching:ep,dataSource:(null==ey?void 0:ey.items)||[],totalRows:(null==ey?void 0:ey.total)||0,customTableProps:{locale:{emptyText:(0,n.jsx)("div",{children:(0,n.jsx)("div",{children:"All caught up!"})})}}}),[Y,eh,ep,null==ey?void 0:ey.items,null==ey?void 0:ey.total]),eD=(0,S.V)(et,eO),eP=(0,o.useMemo)(()=>{var e;let t=[{title:"Asset",dataIndex:T.r6.NAME,key:T.r6.NAME,sorter:!0,sortOrder:el===T.r6.NAME?er:null,render:e=>(0,n.jsx)(d.lKn,{ellipsis:{tooltip:!0},style:{maxWidth:300},children:e}),fixed:"left"},{title:"Type",dataIndex:T.r6.RESOURCE_TYPE,key:T.r6.RESOURCE_TYPE,sorter:!0,sortOrder:el===T.r6.RESOURCE_TYPE?er:null,filters:(0,V.nZ)(null==eI?void 0:eI.resource_type),filteredValue:(null==es?void 0:es.resource_type)||null},{title:"System",dataIndex:T.r6.SYSTEM,key:T.r6.SYSTEM,render:(e,t)=>!!t.monitor_config_id&&(0,n.jsx)(ee,{aggregateSystem:t,monitorConfigId:t.monitor_config_id,readonly:Q||Y===B.A.IGNORED})},{title:"Categories of consent",key:T.r6.DATA_USES,menu:{items:M.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(C(!0),D(e=>e+1)):"collapse-all"===e.key&&(C(!1),D(e=>e+1))}},filters:(0,V.nZ)(null==eI?void 0:null===(e=eI.data_uses)||void 0===e?void 0:e.filter(e=>(0,p.Z)(e))),filteredValue:(null==es?void 0:es.data_uses)||null,render:(e,t)=>(0,n.jsx)(F,{asset:t,readonly:Q||Y===B.A.IGNORED,columnState:{isExpanded:b,version:O}})},{title:"Locations",dataIndex:T.r6.LOCATIONS,key:T.r6.LOCATIONS,menu:{items:M.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(x(!0),N(e=>e+1)):"collapse-all"===e.key&&(x(!1),N(e=>e+1))}},filters:(0,V.nZ)(null==eI?void 0:eI.locations,e=>{var t;return null!==(t=w.Z8[e])&&void 0!==t?t:e}),filteredValue:(null==es?void 0:es.locations)||null,render:e=>{var t;return(0,n.jsx)(G.Q,{values:null!==(t=null==e?void 0:e.map(e=>{var t;return{label:null!==(t=w.Z8[e])&&void 0!==t?t:e,key:e}}))&&void 0!==t?t:[],columnState:{isExpanded:f,version:k}})}},{title:"Domain",dataIndex:T.r6.DOMAIN,key:T.r6.DOMAIN},{title:"Detected on",dataIndex:T.r6.PAGE,menu:{items:M.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?(_(!0),I(e=>e+1)):"collapse-all"===e.key&&(_(!1),I(e=>e+1))}},key:T.r6.PAGE,render:e=>(0,n.jsx)(G.v,{values:e,valueSuffix:"pages",columnState:{isExpanded:j,version:A}})}];return X&&t.push({title:()=>(0,n.jsxs)(d.vyj,{children:[(0,n.jsx)("div",{children:"Compliance"}),h===u.lg.WITHOUT_CONSENT&&(0,n.jsx)(z.l,{consentStatus:{status:u.pF.ALERT,message:"One or more assets were detected without consent"}})]}),dataIndex:T.r6.CONSENT_AGGREGATED,key:T.r6.CONSENT_AGGREGATED,sorter:!0,sortOrder:el===T.r6.CONSENT_AGGREGATED?er:null,filters:(0,V.nZ)(null==eI?void 0:eI[T.r6.CONSENT_AGGREGATED],e=>{var t;return null!==(t=({with_consent:T.X1.WITH_CONSENT,without_consent:T.X1.WITHOUT_CONSENT,exempt:T.X1.EXEMPT,unknown:T.X1.UNKNOWN})[e])&&void 0!==t?t:e}),filteredValue:(null==es?void 0:es[T.r6.CONSENT_AGGREGATED])||null,render:(e,t)=>(0,n.jsx)(J,{consentAggregated:null!=e?e:u.lg.UNKNOWN,stagedResource:t,onShowBreakdown:i})}),Q||t.push({title:"Actions",key:T.r6.ACTIONS,fixed:"right",render:(e,t)=>(0,n.jsx)(K,{asset:t,onTabChange:q})}),t},[el,er,eI,es,X,Q,Y,b,f,j,O,k,A,h,i,q]);(0,o.useEffect)(()=>{if(ey){var e;let t=(null===(e=ey.items[0])||void 0===e?void 0:e.system)||g||s||"";y(t),null==l||l(t)}},[ey,s,l,g]),(0,o.useEffect)(()=>{if((null==ey?void 0:ey.items)&&!h){var e;v(null===(e=ey.items.find(e=>e.consent_aggregated===u.lg.WITHOUT_CONSENT))||void 0===e?void 0:e.consent_aggregated)}},[ey,h]);let{selectedKeys:eL,selectedRows:eR,resetSelections:eU}=eD,eG=(0,o.useCallback)(async()=>{var e,t;let s=await ev({urnList:eL}),n=(null===(e=eR[0])||void 0===e?void 0:e.user_assigned_system_key)||(null===(t=eR[0])||void 0===t?void 0:t.system_key),a=eR.every(e=>(e.user_assigned_system_key||e.system_key)===n)?n:void 0;(0,U.D4)(s)?m((0,Z.Vo)((0,U.e$)(s.error))):(m((0,Z.t5)((0,W._)("".concat(eL.length," assets from ").concat(g," have been added to the system inventory."),a?()=>c.push("".concat(r.So,"/configure/").concat(a,"#assets")):()=>c.push(r.So)))),eU())},[ev,eL,eR,g,m,c,eU]),eM=(0,o.useCallback)(async e=>{if("string"==typeof(null==e?void 0:e.value)){let s=await eC({monitorId:t,urnList:eL,systemKey:e.value});(0,U.D4)(s)?m((0,Z.Vo)((0,U.e$)(s.error))):m((0,Z.t5)("".concat(eL.length," assets have been assigned to ").concat(e.label,"."),"Confirmed"))}},[eC,t,eL,m]),eZ=(0,o.useCallback)(async e=>{if(!eR.length)return;let s=eR.map(t=>{let s=L()([...t.user_assigned_data_uses||t.data_uses||[],...e]);return{urn:t.urn,user_assigned_data_uses:s}}),n=await ek({monitorId:t,assets:s});(0,U.D4)(n)?m((0,Z.Vo)((0,U.e$)(n.error))):m((0,Z.t5)("Consent categories added to ".concat(eL.length," assets").concat(g?" from ".concat(g):"","."),"Confirmed"))},[eR,ek,t,eL,g,m]),eV=(0,o.useCallback)(async()=>{let e=await ex({urnList:eL});(0,U.D4)(e)?m((0,Z.Vo)((0,U.e$)(e.error))):(m((0,Z.t5)(g===r.Kl?"".concat(eL.length," uncategorized assets have been ignored and will not appear in future scans."):"".concat(eL.length," assets from ").concat(g," have been ignored and will not appear in future scans."),"Confirmed")),eU())},[ex,eL,g,m,eU]),ez=(0,o.useCallback)(async()=>{let e=await eE({urnList:eL});(0,U.D4)(e)?m((0,Z.Vo)((0,U.e$)(e.error))):(m((0,Z.t5)("".concat(eL.length," assets have been restored and will appear in future scans."),"Confirmed")),eU())},[eE,eL,m,eU]),eW=(0,o.useCallback)(async()=>{let e=(null==ey?void 0:ey.items.length)||0,n=await e_({monitor_config_key:t,resolved_system_ids:[s]});(0,U.D4)(n)?m((0,Z.Vo)((0,U.e$)(n.error))):(c.push("".concat(r.vi,"/").concat(t)),m((0,Z.t5)("".concat(e," assets from ").concat(g," have been added to the system inventory."),"Confirmed")),eU())},[null==ey?void 0:ey.items.length,e_,t,s,c,m,g,eU]),eB=(0,o.useCallback)(async e=>{await q(e),eo(),eU()},[q,eo,eU]);return{columns:eP,data:ey,isLoading:eh,isFetching:ep,tableState:et,searchQuery:ei,updateSearch:ed,updateFilters:ec,updateSorting:eu,updatePageIndex:em,updatePageSize:eg,resetState:eo,tableProps:eD.tableProps,selectionProps:eD.selectionProps,filterTabs:$,activeTab:Y,handleTabChange:eB,activeParams:H,actionsDisabled:Q,selectedRows:eR,selectedUrns:eL,hasSelectedRows:eD.hasSelectedRows,resetSelections:eU,systemName:g,firstItemConsentStatus:h,handleBulkAdd:eG,handleBulkAssignSystem:eM,handleBulkAddDataUse:eZ,handleBulkIgnore:eV,handleBulkRestore:ez,handleAddAll:eW,anyBulkActionIsLoading:eN,isAddingResults:ef,isIgnoringResults:ej,isAddingAllResults:eb,isBulkUpdatingSystem:ew,isBulkAddingDataUses:eS,isRestoringResults:eT,disableAddAll:eA}},es=e=>{var t;let{monitorId:s,systemId:a,onSystemName:l}=e,[r,i]=(0,o.useState)(!1),[g,y]=(0,o.useState)(!1),[h,p]=(0,o.useState)(null),{columns:v,searchQuery:f,updateSearch:j,resetState:_,tableProps:b,selectionProps:w,filterTabs:k,activeTab:S,handleTabChange:E,activeParams:T,actionsDisabled:N,selectedUrns:A,hasSelectedRows:I,resetSelections:O,handleBulkAdd:P,handleBulkAssignSystem:L,handleBulkAddDataUse:R,handleBulkIgnore:U,handleBulkRestore:G,handleAddAll:M,anyBulkActionIsLoading:Z,isAddingAllResults:V,isBulkUpdatingSystem:z,isBulkAddingDataUses:W,disableAddAll:B}=et({monitorId:s,systemId:a,onSystemName:l,onShowBreakdown:(e,t)=>{p({stagedResource:e,status:t})}}),K=async e=>{await L(e),i(!1)},X=async e=>{await R(e),y(!1)};return s&&a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Niu,{"aria-label":"Asset state filter",mode:"horizontal",items:k.map(e=>({key:e.hash,label:e.label})),selectedKeys:[S],onClick:async e=>{await E(e.key)},className:"mb-4","data-testid":"asset-state-filter"}),(0,n.jsxs)(d.jqI,{justify:"space-between",align:"center",className:"mb-4",children:[(0,n.jsx)(m.f,{value:f,onChange:j,placeholder:"Search by asset name..."}),(0,n.jsxs)(d.vyj,{size:"large",children:[I&&(0,n.jsx)(c.a,{count:A.length}),(0,n.jsxs)(d.vyj,{size:"small",children:[(0,n.jsx)(d.wpx,{onClick:()=>{_(),O()},"data-testid":"clear-filters",children:"Clear filters"}),(0,n.jsx)(d.S0p,{overlayClassName:"bulk-actions-menu-dropdown",menu:{items:[...(null==T?void 0:null===(t=T.diff_status)||void 0===t?void 0:t.includes(u.LL.MUTED))?[{key:"restore",label:"Restore",onClick:G}]:[{key:"add",label:"Add",onClick:P},{key:"add-data-use",label:"Add consent category",onClick:()=>y(!0)},{key:"assign-system",label:"Assign system",onClick:()=>i(!0)},{type:"divider"},{key:"ignore",label:"Ignore",onClick:U}]]},trigger:["click"],children:(0,n.jsx)(d.wpx,{icon:(0,n.jsx)(d.PJP._ME,{}),iconPosition:"end",loading:Z,"data-testid":"bulk-actions-menu",disabled:!I||Z||N,type:"primary",children:"Actions"})}),(0,n.jsx)(d.esZ,{title:B?"These assets require a system before you can add them to the inventory.":void 0,children:(0,n.jsx)(d.wpx,{onClick:M,disabled:B,loading:V,type:"primary",icon:(0,n.jsx)(d.PJP.MCw,{}),iconPosition:"end","data-testid":"add-all",children:"Add all"})})]})]})]}),(0,n.jsx)(d.V5H,{...b,columns:v,rowSelection:w,locale:{emptyText:(0,n.jsx)(d.oj8,{image:d.oj8.PRESENTED_IMAGE_SIMPLE,description:"All caught up!"})},"aria-labelledby":"breadcrumb-current-page"}),(0,n.jsx)(C,{isOpen:r,onClose:()=>{i(!1)},onSave:K,isSaving:z}),(0,n.jsx)(x,{isOpen:g,onClose:()=>{y(!1)},onSave:X,isSaving:W}),h&&(0,n.jsx)(D,{isOpen:!!h,stagedResource:h.stagedResource,status:h.status,onCancel:()=>{p(null)}})]}):null};var en=()=>{let e=(0,a.useRouter)(),t=decodeURIComponent(e.query.monitorId),s=decodeURIComponent(e.query.systemId),[d,c]=(0,o.useState)(s===r.Kl?"Uncategorized assets":s);return(0,n.jsxs)(l.Z,{title:"Action center - Discovered assets",children:[(0,n.jsx)(i.Z,{heading:"Action center",breadcrumbItems:[{title:"All activity",href:r.vi},{title:t,href:"".concat(r.vi,"/").concat(t)},{title:s===r.Kl?"Uncategorized assets":d}]}),(0,n.jsx)(es,{monitorId:t,systemId:s,onSystemName:c})]})}},31883:function(e,t,s){"use strict";s.d(t,{Bw:function(){return n.Bw},D4:function(){return n.D4}});var n=s(19043)},72707:function(e){e.exports={option:"TaxonomySelect_option__vY6v2"}},18992:function(e){e.exports={cellBleed:"Cells_cellBleed__dik43"}}},function(e){e.O(0,[431,8765,9278,5163,7045,401,3585,7725,7929,2888,9774,179],function(){return e(e.s=25654)}),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
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]||"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()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3785],{90988:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/systems",function(){return l(52295)}])},30952:function(e,t,l){"use strict";l.d(t,{f:function(){return o}});var s=l(24246),a=l(66726),n=l.n(a),i=l(27378),r=l(26917);let o=e=>{let{value:t,onChange:l,placeholder:a,...o}=e,[d,u]=(0,i.useState)(t);(0,i.useEffect)(()=>{u(t||"")},[t]);let c=n()(l,500),p=(0,i.useCallback)(e=>{u(e),c(e)},[]);return(0,s.jsx)(r.Z,{value:d,onChange:p,onClear:()=>{u(""),l("")},placeholder:a,...o})}},35287:function(e,t,l){"use strict";var s=l(24246),a=l(96306),n=l(88038),i=l.n(n);l(27378),t.Z=e=>{let{children:t,title:l,mainProps:n}=e;return(0,s.jsxs)(a.kCb,{"data-testid":l,direction:"column",height:"calc(100vh - 48px)",width:"calc(100vw - 240px)",children:[(0,s.jsxs)(i(),{children:[(0,s.jsxs)("title",{children:["Fides Admin UI - ",l]}),(0,s.jsx)("meta",{name:"description",content:"Privacy Engineering Platform"}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,s.jsx)(a.kCb,{px:10,py:6,as:"main",overflow:"auto",direction:"column",flex:1,minWidth:0,...n,children:t})]})}},34929:function(e,t,l){"use strict";var s=l(24246),a=l(64925),n=l.n(a),i=l(27378),r=l(16134),o=l(30002),d=l(28079),u=l(57072);let c=()=>{let{isLoading:e}=(0,d.fd)(),t=(0,r.C)(d.U3),{isLoading:l}=(0,u.MO)(),s=(0,r.C)(u.qb),{isLoading:a}=(0,o.te)();return{dataUses:t,dataSubjects:(0,r.C)(o.ZL),dataCategories:s,isLoading:e||l||a}};t.Z=()=>{let{dataUses:e,dataCategories:t,dataSubjects:l,isLoading:a}=c(),r=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 l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,s=t(e);if(!s)return{};let a=t(r(e,l)),n=!!s.parent_key;return{name:s.name||void 0,primaryName:n&&(null==a?void 0:a.name)!==s.name&&(null==a?void 0:a.name)||void 0}},d=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,{name:a,primaryName:n}=o(e,t,l);return a?n?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsxs)("strong",{children:[n,":"]})," ",a]},e):(0,s.jsx)("strong",{children:a},e):e},u=t=>n()(e,{fides_key:t}),p=e=>n()(t,{fides_key:e}),g=e=>n()(l,{fides_key:e});return{getDataUses:()=>e,getDataUseByKey:u,getDataUseDisplayName:e=>d(e,u,1),getDataUseDisplayNameProps:e=>o(e,u,1),getDataCategories:()=>t,getDataCategoryByKey:p,getDataCategoryDisplayName:e=>d(e,p,2),getDataCategoryDisplayNameProps:e=>o(e,p,2),getDataSubjects:()=>l,getDataSubjectByKey:g,getDataSubjectDisplayName:e=>{let t=g(e);return t?t.name:e},getPrimaryKey:r,isLoading:a}}},99640:function(e,t,l){"use strict";l.d(t,{Z:function(){return d}});var s=l(24246),a=l(96306),n=l(79894),i=l.n(n);let{Link:r,Text:o}=a.AntTypography,d=e=>{let{href:t,children:l,...a}=e;return t?(0,s.jsx)(i(),{href:t,passHref:!0,legacyBehavior:!0,children:(0,s.jsx)(r,{strong:!0,ellipsis:!0,onClick:e=>e.stopPropagation(),...a,children:l})}):(0,s.jsx)(o,{strong:!0,ellipsis:!0,...a,children:l})}},2525:function(e,t,l){"use strict";l.d(t,{Q:function(){return r}});var s=l(24246),a=l(96306),n=l(27378),i=l(3110);let r=e=>{let{values:t,columnState:l,tagProps:r,onTagClose:o,...d}=e,{isExpanded:u,isWrapped:c,version:p}=l||{},[g,m]=(0,n.useState)(!u),[y,v]=(0,n.useState)(!!c),[h,f]=(0,n.useState)(u?t:null==t?void 0:t.slice(0,2));(0,n.useEffect)(()=>{m(!u)},[u,p]),(0,n.useEffect)(()=>{v(!!c)},[c]),(0,n.useEffect)(()=>{(null==t?void 0:t.length)&&f(g?t.slice(0,2):t)},[g,t]);let x=(0,n.useCallback)(()=>{f(null==t?void 0:t.slice(0,2)),m(!0)},[t]),j=(0,n.useCallback)(()=>{m(!1)},[]),k=(0,n.useCallback)(()=>{g?j():x()},[g,j,x]);return(0,n.useMemo)(()=>(null==h?void 0:h.length)?(0,s.jsxs)(a.jqI,{align:g?"center":"start",wrap:y?"wrap":"nowrap",vertical:!g,gap:"small","data-testid":"tag-expandable-cell",style:{overflowX:"auto",...d.style},...d,children:[h.map(e=>(0,s.jsx)(a.j8w,{color:"white","data-testid":e.key,onClose:o?()=>o(e.key):void 0,...r,...e.tagProps,children:(0,s.jsx)(a.lKn,{ellipsis:!!g&&{tooltip:!0},style:{color:"inherit",maxWidth:g?i.TD:void 0},children:e.label})},e.key)),t&&t.length>2&&(0,s.jsx)(a.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),k()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:g?"+".concat(t.length-2," more"):i.T5})]}):(0,s.jsx)("span",{"data-testid":"tag-expandable-cell-empty"}),[h,g,y,d,t,r,o,k])}},3110:function(e,t,l){"use strict";l.d(t,{DI:function(){return r},T5:function(){return n},TD:function(){return i}});var s=l(24246),a=l(96306);let n="show less",i=150,r=[{key:"expand-all",label:"Expand all",icon:(0,s.jsx)(a.PJP.jbG,{})},{key:"collapse-all",label:"Collapse all",icon:(0,s.jsx)(a.PJP.MVB,{})}]},26070:function(e,t,l){"use strict";l.d(t,{v:function(){return o},Q:function(){return d.Q}});var s=l(24246),a=l(96306),n=l(27378),i=l(3110);let{Text:r}=a.AntTypography,o=e=>{let{values:t,valueSuffix:l,columnState:o}=e,{isExpanded:d,version:u}=o||{},[c,p]=(0,n.useState)(!d);(0,n.useEffect)(()=>{p(!d)},[d,u]);let g=(0,n.useCallback)(()=>{p(!0)},[]),m=(0,n.useCallback)(()=>{p(!1)},[]),y=(0,n.useCallback)(()=>{c?m():g()},[c,m,g]);return(0,n.useMemo)(()=>(null==t?void 0:t.length)?1===t.length?(0,s.jsx)(r,{ellipsis:!0,"data-testid":"list-expandable-cell-single",children:t[0]}):(0,s.jsxs)(a.jqI,{align:c?"center":"flex-start",vertical:!c,gap:c?"small":"none","data-testid":"list-expandable-cell",children:[c?(0,s.jsxs)(r,{ellipsis:!0,children:[t.length," ",l]}):(0,s.jsx)(a.krs,{dataSource:t,renderItem:e=>(0,s.jsx)("li",{children:e})}),(0,s.jsx)(a.wpx,{type:"link",size:"small",onClick:e=>{e.stopPropagation(),y()},className:"h-auto p-0",style:{fontSize:"var(--ant-font-size)"},children:c?"view":i.T5})]}):null,[c,t,l,y])};var d=l(2525)},8125:function(e,t,l){"use strict";l.d(t,{V:function(){return n},o:function(){return d}});var s=l(27378),a=l(32735);let n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{enableSelection:l=!1,getRowKey:n,bulkActions:i,isLoading:r=!1,isFetching:o=!1,dataSource:d=[],totalRows:u=0,currentPage:c,pageSize:p,customTableProps:g={}}=t,m=(0,s.useCallback)(e=>{if(e&&"object"==typeof e){if(e.id)return String(e.id);if(e.key)return String(e.key)}return String(e)},[]),y=n||m,[v,h]=(0,s.useState)([]),[f,x]=(0,s.useState)([]),j=(0,s.useCallback)(()=>{h([]),x([])},[]),k=(0,s.useMemo)(()=>({selectedRowKeys:v,selectedRows:f,resetSelections:j}),[v,f,j]),b=(0,s.useMemo)(()=>{if(l)return{selectedRowKeys:v,onChange:(e,t)=>{h(e),x(t)}}},[l,v]),S=(0,s.useCallback)((t,l,s)=>{var a,n;let i=null!==(a=t.current)&&void 0!==a?a:e.pageIndex,r=null!==(n=t.pageSize)&&void 0!==n?n:e.pageSize,o=i!==e.pageIndex||r!==e.pageSize;o?(t.current&&t.current!==e.pageIndex&&e.updatePageIndex(t.current),t.pageSize&&t.pageSize!==e.pageSize&&e.updatePageSize(t.pageSize)):e.updateFilters(l||{});let d=s&&!Array.isArray(s)?s.field:void 0,u=s&&!Array.isArray(s)&&null!==s.order?s.order:void 0;o||e.updateSorting(d,u)},[e]),_=(0,s.useMemo)(()=>{var t,l,s,n,i;return{current:null!=c?c:e.pageIndex,pageSize:null!=p?p:e.pageSize,total:u,showSizeChanger:null===(n=null===(t=e.paginationConfig)||void 0===t?void 0:t.showSizeChanger)||void 0===n||n,pageSizeOptions:null!==(i=null===(s=e.paginationConfig)||void 0===s?void 0:null===(l=s.pageSizeOptions)||void 0===l?void 0:l.map(String))&&void 0!==i?i:a.VZ}},[c,e.pageIndex,p,e.pageSize,u,e.paginationConfig]),C=(0,s.useMemo)(()=>({dataSource:d,loading:r||o,pagination:_,onChange:S,rowKey:y,scroll:{x:"max-content",scrollToFirstRowOnChange:!0},size:"small",bordered:!0,...g}),[d,r,o,_,S,y,g]),w=v.map(String),E=f.length>0,D=(0,s.useCallback)(e=>{let t=null==i?void 0:i.actions.find(t=>t.key===e);return t?{disabled:!E||!!t.disabled&&t.disabled(f),loading:t.loading||!1,onClick:()=>t.onClick(f)}:{disabled:!0,loading:!1}},[i,E,f]);return(0,s.useMemo)(()=>({tableProps:C,selectionProps:b,selectionState:k,selectedRows:f,selectedKeys:w,hasSelectedRows:E,resetSelections:j,getBulkActionProps:D,isLoadingOrFetching:r||o,hasData:d.length>0}),[C,b,k,f,w,E,j,D,r,o,d.length])};var i=l(40431),r=l(17245);let o=()=>({filters:(0,i.WJ)(e=>e).withDefault({})}),d=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{pagination:t={},sorting:l={},search:a={},onStateChange:n}=e,{pageIndex:d,pageSize:u,resetPagination:c,updatePageIndex:p,updatePageSize:g,pageSizeOptions:m,showSizeChanger:y}=(0,r.h0)(t),{sortKey:v,sortOrder:h,updateSorting:f,resetSorting:x}=(0,r.rK)(l),{searchQuery:j,updateSearch:k,resetSearch:b}=(0,r.Rx)(a),S=(0,s.useMemo)(()=>o(),[]),[_,C]=(0,i.XI)(S,{history:"push"}),w=(0,s.useMemo)(()=>{var e;return{pageIndex:d,pageSize:u,sortKey:v,sortOrder:h,columnFilters:null!==(e=_.filters)&&void 0!==e?e:{},searchQuery:j}},[_,d,u,v,h,j]),E=(0,s.useCallback)((e,t)=>{f(e,t),c()},[f,c]),D=(0,s.useCallback)(e=>{let t=Object.fromEntries(Object.entries(e).filter(e=>{let[,t]=e;return null!=t}));C({filters:Object.keys(t).length>0?t:null}),c()},[C,c]),P=(0,s.useCallback)(e=>{k(e),c()},[k,c]),M=(0,s.useCallback)(()=>{C({filters:null}),c(),x(),b()},[C,c,x,b]);return(0,s.useEffect)(()=>{n&&n(w)},[w,n]),{state:w,pageIndex:w.pageIndex,pageSize:w.pageSize,updatePageIndex:p,updatePageSize:g,sortKey:w.sortKey,sortOrder:w.sortOrder,updateSorting:E,columnFilters:w.columnFilters,updateFilters:D,searchQuery:w.searchQuery,updateSearch:P,resetState:M,paginationConfig:{pageSizeOptions:m,showSizeChanger:y}}}},33335:function(e,t,l){"use strict";l.d(t,{E:function(){return s}});let s=e=>e.toLowerCase().replace(/[ .]/g,"_").replace(/[^a-zA-Z0-9_<>-]/g,"")},92818:function(e,t,l){"use strict";l.d(t,{r:function(){return o}});var s=l(24246),a=l(27378),n=l(97181),i=l(22583),r=l(21910);let o={[r.Ej.TAXONOMY_WHITE]:"White",[r.Ej.TAXONOMY_RED]:"Red",[r.Ej.TAXONOMY_ORANGE]:"Orange",[r.Ej.TAXONOMY_YELLOW]:"Yellow",[r.Ej.TAXONOMY_GREEN]:"Green",[r.Ej.TAXONOMY_BLUE]:"Blue",[r.Ej.TAXONOMY_PURPLE]:"Purple",[r.Ej.SANDSTONE]:"Sandstone",[r.Ej.MINOS]:"Minos"},d=e=>{let{color:t,...l}=e;return(0,s.jsx)("span",{"aria-hidden":!0,className:"mr-2 inline-block size-4 rounded-lg align-middle",style:{backgroundColor:"var(--fidesui-bg-".concat(i.j[t],")"),border:t===r.Ej.TAXONOMY_WHITE?"1px solid var(--fidesui-neutral-200)":"none",...l.style}})},u=e=>{let t=null==e?void 0:e.value,l=null==e?void 0:e.label;return(0,s.jsxs)("span",{className:"flex items-center",children:[(0,s.jsx)(d,{color:t}),(0,s.jsx)("span",{children:l})]})};t.Z=e=>{let t=Object.values(r.Ej).map(e=>({value:e,label:o[e]})),[l,i]=(0,a.useState)(void 0);return(0,s.jsx)(n.d,{...e,options:t,optionRender:u,layout:"stacked",value:l,onChange:e=>{i(e)},prefix:(0,s.jsx)(d,{color:null!=l?l:r.Ej.TAXONOMY_WHITE,style:{marginBottom:"2px"}})})}},57072:function(e,t,l){"use strict";l.d(t,{Bd:function(){return s.Bd},L5:function(){return s.L5},MO:function(){return s.MO},qb:function(){return s.qb}});var s=l(5785)},52295:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return J}});var s=l(24246),a=l(96306),n=l(27378),i=l(35287),r=l(58754),o=l(30952),d=l(25980),u=l(34090),c=l(83766),p=l.n(c),g=l(55484),m=l(97181),y=l(40324),v=l(28079),h=l(1315),f=l(92818);let x="all-suggested";var j=e=>{let{options:t,loading:l,name:i,suggestedDataUses:r,...o}=e,[d,c,{setValue:g}]=(0,u.U$)(i),m=!!(c.touched&&c.error),v=(0,n.useMemo)(()=>{let e=[],l=[];return null==t||t.forEach(t=>{r.includes(t.value)?e.push(t):l.push(t)}),{suggested:e,all:l}},[t,r]);return(0,s.jsxs)(a.jqI,{vertical:!0,gap:"small",children:[(0,s.jsx)(a.jqI,{align:"center",children:(0,s.jsx)(y.__,{htmlFor:o.id||i,fontSize:"xs",my:0,mr:1,children:"Data uses"})}),(0,s.jsx)(a.WPr,{options:[{label:"Select all suggested",value:x},{label:(0,s.jsxs)(a.jqI,{gap:"small",align:"center",children:[(0,s.jsx)(a.QMR,{}),(0,s.jsx)("strong",{children:"Suggested data uses"})]}),value:"suggested",options:v.suggested},{label:(0,s.jsxs)(a.jqI,{gap:"small",align:"center",children:[(0,s.jsx)(a.PJP.BBB,{}),(0,s.jsx)("strong",{children:"All data uses"})]}),value:"all",options:v.all}],mode:"multiple",placeholder:"Select data uses",allowClear:!0,loading:l,value:d.value,onChange:e=>{e.includes(x)?g(p()([...r,...e.filter(e=>e!==x)])):g(e)},status:m?"error":void 0,virtual:!1,...o}),(0,s.jsx)(y.Bc,{isInvalid:m,message:c.error,fieldName:d.name})]})},k=l(21910);let b=g.Ry().shape({name:g.Z_().required("Name is required").label("Name"),label_color:g.Z_().required("Color is required").label("Color"),systems:g.IX().of(g.Z_()).label("Systems"),data_uses:g.IX().of(g.Z_()).label("Data uses")});var S=e=>{let{selectedSystemKeys:t=[],onSubmit:l,onCancel:i,isSubmitting:r=!1}=e,{data:o=[],isLoading:d}=(0,v.fd)(),{data:c,isLoading:g}=(0,h.K3)(),x=(0,n.useMemo)(()=>o.map(e=>({label:e.name||e.fides_key,value:e.fides_key})),[o]),S=(0,n.useMemo)(()=>{var e;let l=null!==(e=null==c?void 0:c.filter(e=>t.includes(e.fides_key)))&&void 0!==e?e:[];return p()(null==l?void 0:l.flatMap(e=>e.privacy_declarations.map(e=>e.data_use)))},[c,t]),_=(0,n.useMemo)(()=>{var e;return null!==(e=null==c?void 0:c.map(e=>({label:e.name||e.fides_key,value:e.fides_key})))&&void 0!==e?e:[]},[c]),C={name:"",description:"",label_color:k.Ej.TAXONOMY_WHITE,systems:t,data_uses:[],active:!0};return(0,s.jsx)(u.J9,{initialValues:C,validationSchema:b,onSubmit:l,enableReinitialize:!0,children:e=>{let{isValid:t,dirty:l}=e;return(0,s.jsx)(u.l0,{children:(0,s.jsxs)(a.jqI,{vertical:!0,gap:"middle",children:[(0,s.jsx)(a.AntTypography.Title,{level:2,children:"Create system group"}),(0,s.jsx)(y.j0,{name:"name",label:"Name",isRequired:!0,variant:"stacked",placeholder:"Enter system group name"}),(0,s.jsx)(y.Ks,{name:"description",label:"Description",variant:"stacked",placeholder:"Enter system group description",resize:!1}),(0,s.jsx)(m.d,{name:"systems",label:"Systems",mode:"multiple",placeholder:"Select systems",options:_,layout:"stacked",allowClear:!0,loading:g}),(0,s.jsx)(f.Z,{name:"label_color",label:"Color"}),(0,s.jsx)(j,{name:"data_uses",options:x,loading:d,suggestedDataUses:S}),(0,s.jsxs)(a.jqI,{gap:"small",justify:"space-between",className:"pt-4",children:[(0,s.jsx)(a.wpx,{onClick:i,disabled:r,children:"Cancel"}),(0,s.jsx)(a.wpx,{type:"primary",htmlType:"submit",loading:r,disabled:!t||!l||r,"data-testid":"save-btn",children:"Create group"})]})]})})}})},_=l(812),C=l(65450),w=l(31793),E=l(31883),D=e=>{let{selectedRowKeys:t}=e,[l,i]=a.Pg3.useMessage(),[r,o]=(0,n.useState)(!1),[d]=(0,C.WP)(),{data:u}=(0,w.wv)({page:1,size:100,username:""}),[c]=(0,C.C9)(),p=async e=>{let s=await d({data_steward:e,system_keys:t});(0,E.D4)(s)?l.error((0,_.e$)(s.error,"A problem occurred assigning stewards")):l.success("".concat(t.length," systems assigned to ").concat(e," successfully"))},g=async()=>{let e=await c(t);(0,E.D4)(e)?l.error((0,_.e$)(e.error,"A problem occurred deleting systems")):l.success("".concat(t.length," systems deleted successfully"))};return(0,s.jsxs)(s.Fragment,{children:[i,(0,s.jsx)(a.$zI,{open:r,onCancel:()=>o(!1),onOk:g,okText:"Delete",okType:"danger",centered:!0,children:(0,s.jsxs)(a.AntTypography.Paragraph,{children:["Delete ",t.length," systems? This action cannot be undone."]})}),(0,s.jsx)(a.S0p,{trigger:["click"],menu:{items:[...(null==u?void 0:u.items)&&u.items.length>0?[{key:"assign-data-steward",label:"Assign data steward",children:u.items.map(e=>({key:e.username,label:e.username,onClick:()=>p(e.username)}))},{type:"divider"}]:[],{key:"delete",label:"Delete",onClick:()=>{o(!0)}}]},children:(0,s.jsx)(a.wpx,{disabled:0===t.length,icon:(0,s.jsx)(a.PJP._ME,{}),children:"Actions"})})]})},P=l(86677),M=l(19904),O=l(26070),T=l(3110),I=l(99640),z=l(8125),N=l(16394),A=l(33335),q=l(69353),Z=l(34929),R=e=>{let{privacyDeclarations:t,...l}=e,{getDataUseDisplayName:a}=(0,Z.Z)(),n=t.map(e=>e.data_use).map(e=>({label:a(e),key:e}));return(0,s.jsx)(O.Q,{values:n,...l})},F=l(56141),X=l.n(F),L=l(22583);let W="update-system-groups-msg";var B=e=>{let{selectedGroups:t,allGroups:l,system:i,columnState:r,...o}=e,[d,u]=(0,n.useState)(!1),[c,p]=(0,n.useState)(t.map(e=>e.fides_key)),[g,m]=a.Pg3.useMessage(),[y]=(0,h.qQ)(),v=async()=>{if(u(!1),X()(c,t.map(e=>e.fides_key)))return;g.open({key:W,type:"loading",content:"Updating groups for ".concat(i.name,"...")});let e=await y({...i,system_groups:c});(0,E.D4)(e)?g.open({key:W,type:"error",content:(0,_.e$)(e.error,"Failed to update system groups")}):g.open({key:W,type:"success",content:"Groups updated for ".concat(i.name)}),setTimeout(()=>{g.destroy(W)},3e3)};return(0,s.jsxs)(a.jqI,{gap:"small",...o,children:[m,!d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.j8w,{onClick:()=>u(!0),addable:!0,"data-testid":"group-add-btn","aria-label":"Add group"}),(0,s.jsx)(O.Q,{values:t.map(e=>e&&{label:e.name,key:e.fides_key,tagProps:{color:e.label_color?"".concat(L.j[e.label_color]):void 0,bordered:!1}}),columnState:r})]}),d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.WPr,{options:l.map(e=>({label:e.name,value:e.fides_key})),mode:"tags",defaultValue:t.map(e=>e.fides_key),defaultOpen:!0,onChange:e=>{p(e)}}),(0,s.jsx)(a.wpx,{icon:(0,s.jsx)(a.PJP.MCw,{}),onClick:v})]})]})},K=()=>{var e,t;let{data:l}=(0,q.QD)(),i=(0,n.useMemo)(()=>l?l.reduce((e,t)=>({...e,[t.fides_key]:t}),{}):{},[l]),{data:r}=(0,w.wv)({page:1,size:100,username:""}),[o]=(0,C.DW)(),[u]=(0,q.Xz)(),[c]=(0,q.Nr)(),[p,g]=(0,n.useState)(!1),[m,y]=(0,n.useState)(!1),[v,h]=(0,n.useState)(!1),[f,x]=(0,n.useState)(!1),[j,b]=(0,n.useState)(null),S=(0,z.o)({pagination:{defaultPageSize:25,pageSizeOptions:[25,50,100]},search:{defaultSearchQuery:""}}),{columnFilters:D,pageIndex:Z,pageSize:F,searchQuery:X,updateSearch:L}=S,{data:W,isLoading:K,isFetching:Y}=(0,C.xF)({page:Z,size:F,search:X,system_group:null==D?void 0:null===(t=D.system_groups)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.toString(),...D}),J=(0,n.useMemo)(()=>{var e,t;return{enableSelection:!0,dataSource:null!==(e=null==W?void 0:W.items)&&void 0!==e?e:[],totalRows:null!==(t=null==W?void 0:W.total)&&void 0!==t?t:0,isLoading:K,isFetching:Y,getRowKey:e=>e.fides_key,customTableProps:{locale:{emptyText:(0,s.jsx)("div",{children:"No systems found"})}}}},[W,K,Y]),{tableProps:Q,selectionProps:U}=(0,z.V)(S,J),{selectedRowKeys:$}=null!=U?U:{},[V,G]=a.Pg3.useMessage(),{plus:H}=(0,d.hz)(),ee=(0,P.useRouter)(),et=(0,M.Tg)([k.Sh.SYSTEM_DELETE]),el=async e=>{let t=await o(e.fides_key);(0,E.D4)(t)?V.error((0,_.e$)(t.error,"Failed to delete system")):V.success("Successfully deleted system"),x(!1)},es=async e=>{let t={...e,fides_key:(0,A.E)(e.name),active:!0},l=await c(t);if((0,E.D4)(l))V.error((0,_.e$)(l.error));else{var s,a;let e="System group '".concat(l.data.name,"' created");(null===(s=l.data.systems)||void 0===s?void 0:s.length)===1?e+=" with system '".concat(l.data.systems[0],"'"):(null===(a=l.data.systems)||void 0===a?void 0:a.length)&&(e+=" with ".concat(l.data.systems.length," systems")),V.success(e)}h(!1)},ea=(0,n.useCallback)(async e=>{var t;if(!$)return;let l=i[e],s=await u({...l,systems:[...null!==(t=l.systems)&&void 0!==t?t:[],...$.map(e=>e.toString())]});(0,E.D4)(s)?V.error((0,_.e$)(s.error)):V.success("".concat(null==$?void 0:$.length," systems added to group '").concat(e,"'"))},[i,u,$,V]),en=(0,n.useMemo)(()=>{var e;return null!==(e=null==l?void 0:l.map(e=>({key:e.fides_key,label:e.name,onClick:()=>ea(e.fides_key)})))&&void 0!==e?e:[]},[l,ea]);return{tableProps:Q,selectionProps:U,columns:(0,n.useMemo)(()=>{var e;return[{title:"Name",dataIndex:"name",key:"name",render:(e,t)=>(0,s.jsx)(I.Z,{href:"/systems/configure/".concat(t.fides_key),"data-testid":"system-link-".concat(t.fides_key),children:e||t.fides_key}),ellipsis:!0,fixed:"left"},{dataIndex:"system_groups",key:"system_groups",render:(e,t)=>{var a;return(0,s.jsx)(B,{selectedGroups:null!==(a=null==e?void 0:e.map(e=>null==i?void 0:i[e]).filter(e=>!!e))&&void 0!==a?a:[],allGroups:l,system:{...t,system_groups:null!=e?e:[]},columnState:{isWrapped:!0,isExpanded:p},className:"w-96"})},title:"Groups",hidden:!H,menu:{items:T.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?g(!0):"collapse-all"===e.key&&g(!1)}},filters:(0,N.nZ)(null==l?void 0:l.map(e=>e.fides_key),e=>{var t,l;return null!==(l=null===(t=i[e])||void 0===t?void 0:t.name)&&void 0!==l?l:e}),filteredValue:(null==D?void 0:D.system_groups)||null,filterMultiple:!1},{title:"Data uses",menu:{items:T.DI,onClick:e=>{e.domEvent.stopPropagation(),"expand-all"===e.key?y(!0):"collapse-all"===e.key&&y(!1)}},dataIndex:"privacy_declarations",key:"privacy_declarations",render:e=>(0,s.jsx)(R,{privacyDeclarations:e,columnState:{isWrapped:!0,isExpanded:m}})},{title:"Data stewards",dataIndex:"data_stewards",key:"data_steward",render:e=>(0,s.jsx)(O.v,{values:null!=e?e:[],valueSuffix:"users"}),filters:(0,N.nZ)(null==r?void 0:null===(e=r.items)||void 0===e?void 0:e.map(e=>e.username)),filteredValue:(null==D?void 0:D.data_steward)||null,filterMultiple:!1},{title:"Description",dataIndex:"description",key:"description",render:e=>(0,s.jsx)("div",{className:"max-w-96",children:(0,s.jsx)(a.AntTypography.Text,{ellipsis:{tooltip:e},children:e})}),ellipsis:!0},{title:"Actions",key:"actions",render:(e,t)=>(0,s.jsx)(a.kCb,{justify:"end",children:(0,s.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"edit",label:"Edit",icon:(0,s.jsx)(a.PJP.I8b,{}),onClick:()=>ee.push("/systems/configure/".concat(t.fides_key))},...et?[{key:"delete",label:"Delete",icon:(0,s.jsx)(a.PJP.ZNm,{}),onClick:()=>{b(t),x(!0)}}]:[]]},children:(0,s.jsx)(a.wpx,{size:"small",icon:(0,s.jsx)(a.PJP.r43,{}),"aria-label":"More actions",type:"text","data-testid":"system-actions-menu"})})}),fixed:"right"}]},[H,l,null==D?void 0:D.system_groups,null==D?void 0:D.data_steward,null==r?void 0:r.items,p,i,m,et,ee]),searchQuery:X,updateSearch:L,columnFilters:D,pageIndex:Z,pageSize:F,createModalIsOpen:v,setCreateModalIsOpen:h,deleteModalIsOpen:f,setDeleteModalIsOpen:x,setSelectedSystemForDelete:b,handleCreateSystemGroup:es,handleDelete:el,handleBulkAddToGroup:ea,messageContext:G,groupMenuItems:en,selectedSystemForDelete:j}},Y=()=>{var e,t;let{plus:l}=(0,d.hz)(),{tableProps:n,selectionProps:i,columns:r,searchQuery:u,updateSearch:c,createModalIsOpen:p,setCreateModalIsOpen:g,deleteModalIsOpen:m,setDeleteModalIsOpen:y,handleCreateSystemGroup:v,handleDelete:h,groupMenuItems:f,messageContext:x,selectedSystemForDelete:j}=K();return(0,s.jsxs)(s.Fragment,{children:[x,(0,s.jsxs)(a.jqI,{justify:"space-between",className:"mb-4",children:[(0,s.jsx)(o.f,{value:u,onChange:c,"data-testid":"system-search"}),(0,s.jsxs)(a.jqI,{gap:"small",children:[l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.S0p,{trigger:["click"],menu:{items:[{key:"new-group",label:"Create new group +",onClick:()=>g(!0)},...f.length>0?[{type:"divider"},...f]:[]]},children:(0,s.jsx)(a.wpx,{disabled:(null==i?void 0:i.selectedRowKeys.length)===0,icon:(0,s.jsx)(a.PJP._ME,{}),children:"Add to group"})}),(0,s.jsx)(a.$zI,{open:p,destroyOnHidden:!0,onCancel:()=>g(!1),centered:!0,width:768,footer:null,children:(0,s.jsx)(S,{selectedSystemKeys:null==i?void 0:i.selectedRowKeys.map(e=>e.toString()),onSubmit:v,onCancel:()=>g(!1)})})]}),(0,s.jsx)(D,{selectedRowKeys:null!==(e=null==i?void 0:i.selectedRowKeys)&&void 0!==e?e:[]}),(0,s.jsx)(a.$zI,{open:m,onCancel:()=>y(!1),onOk:()=>!!j&&h(j),okText:"Delete",okType:"danger",cancelText:"Cancel",centered:!0,children:(0,s.jsxs)(a.AntTypography.Paragraph,{children:["Are you sure you want to delete"," ",null!==(t=null==j?void 0:j.name)&&void 0!==t?t:null==j?void 0:j.fides_key,"? This action cannot be undone."]})})]})]}),(0,s.jsx)(a.V5H,{...n,columns:r,rowSelection:i})]})},J=()=>(0,s.jsx)(i.Z,{title:"System inventory",children:(0,s.jsxs)(a.xuv,{"data-testid":"system-management",children:[(0,s.jsx)(r.Z,{heading:"System inventory",breadcrumbItems:[{title:"All systems"}]}),(0,s.jsx)(Y,{})]})})},31883:function(e,t,l){"use strict";l.d(t,{Bw:function(){return s.Bw},D4:function(){return s.D4}});var s=l(19043)}},function(e){e.O(0,[431,8765,9278,5163,1896,4718,2888,9774,179],function(){return e(e.s=90988)}),_N_E=e.O()}]);
|